From 6bdc46aefb260bda62f85a492829ec705ce32fdd Mon Sep 17 00:00:00 2001 From: sdk-team Date: Wed, 1 Dec 2021 06:21:45 +0000 Subject: [PATCH] Support not switching routes when VBR health check fails. --- CHANGELOG | 4 ++ VERSION | 2 +- .../model/DescribeCenVbrHealthCheckResult.h | 3 +- .../cbn/model/DescribeGrantRulesToCenResult.h | 1 + .../model/EnableCenVbrHealthCheckRequest.h | 3 ++ .../model/DescribeCenVbrHealthCheckResult.cc | 42 ++++++++++--------- .../model/DescribeGrantRulesToCenResult.cc | 14 ++++--- .../model/EnableCenVbrHealthCheckRequest.cc | 11 +++++ 8 files changed, 52 insertions(+), 28 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index e625200ec..03338e388 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +2021-12-01 Version: 1.36.960 +- Support not switching routes when VBR health check fails. +- Support order type when cross-account authorization and display. + 2021-12-01 Version: 1.36.959 - Supported RequestDecision For YN. diff --git a/VERSION b/VERSION index bbd7aa6c2..2174962ef 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.959 \ No newline at end of file +1.36.960 \ No newline at end of file diff --git a/cbn/include/alibabacloud/cbn/model/DescribeCenVbrHealthCheckResult.h b/cbn/include/alibabacloud/cbn/model/DescribeCenVbrHealthCheckResult.h index ae0a087ca..db9ebdf64 100644 --- a/cbn/include/alibabacloud/cbn/model/DescribeCenVbrHealthCheckResult.h +++ b/cbn/include/alibabacloud/cbn/model/DescribeCenVbrHealthCheckResult.h @@ -38,12 +38,13 @@ namespace AlibabaCloud std::string linkStatus; int healthCheckInterval; std::string vbrInstanceId; - std::string healthCheckSourceIp; int healthyThreshold; + std::string healthCheckSourceIp; std::string cenId; long packetLoss; std::string healthCheckTargetIp; long delay; + bool healthCheckOnly; }; diff --git a/cbn/include/alibabacloud/cbn/model/DescribeGrantRulesToCenResult.h b/cbn/include/alibabacloud/cbn/model/DescribeGrantRulesToCenResult.h index aa6737313..6dd294419 100644 --- a/cbn/include/alibabacloud/cbn/model/DescribeGrantRulesToCenResult.h +++ b/cbn/include/alibabacloud/cbn/model/DescribeGrantRulesToCenResult.h @@ -35,6 +35,7 @@ namespace AlibabaCloud struct GrantRule { std::string childInstanceType; + std::string orderType; std::string cenId; long childInstanceOwnerId; std::string childInstanceId; diff --git a/cbn/include/alibabacloud/cbn/model/EnableCenVbrHealthCheckRequest.h b/cbn/include/alibabacloud/cbn/model/EnableCenVbrHealthCheckRequest.h index cda660883..0f177fc74 100644 --- a/cbn/include/alibabacloud/cbn/model/EnableCenVbrHealthCheckRequest.h +++ b/cbn/include/alibabacloud/cbn/model/EnableCenVbrHealthCheckRequest.h @@ -45,6 +45,8 @@ namespace AlibabaCloud void setHealthyThreshold(int healthyThreshold); long getVbrInstanceOwnerId()const; void setVbrInstanceOwnerId(long vbrInstanceOwnerId); + bool getHealthCheckOnly()const; + void setHealthCheckOnly(bool healthCheckOnly); std::string getVbrInstanceRegionId()const; void setVbrInstanceRegionId(const std::string& vbrInstanceRegionId); std::string getResourceOwnerAccount()const; @@ -66,6 +68,7 @@ namespace AlibabaCloud std::string healthCheckTargetIp_; int healthyThreshold_; long vbrInstanceOwnerId_; + bool healthCheckOnly_; std::string vbrInstanceRegionId_; std::string resourceOwnerAccount_; std::string ownerAccount_; diff --git a/cbn/src/model/DescribeCenVbrHealthCheckResult.cc b/cbn/src/model/DescribeCenVbrHealthCheckResult.cc index 2012a546d..37021e91b 100644 --- a/cbn/src/model/DescribeCenVbrHealthCheckResult.cc +++ b/cbn/src/model/DescribeCenVbrHealthCheckResult.cc @@ -43,34 +43,36 @@ void DescribeCenVbrHealthCheckResult::parse(const std::string &payload) for (auto valueVbrHealthChecksVbrHealthCheck : allVbrHealthChecksNode) { VbrHealthCheck vbrHealthChecksObject; - if(!valueVbrHealthChecksVbrHealthCheck["CenId"].isNull()) - vbrHealthChecksObject.cenId = valueVbrHealthChecksVbrHealthCheck["CenId"].asString(); - if(!valueVbrHealthChecksVbrHealthCheck["VbrInstanceId"].isNull()) - vbrHealthChecksObject.vbrInstanceId = valueVbrHealthChecksVbrHealthCheck["VbrInstanceId"].asString(); - if(!valueVbrHealthChecksVbrHealthCheck["LinkStatus"].isNull()) - vbrHealthChecksObject.linkStatus = valueVbrHealthChecksVbrHealthCheck["LinkStatus"].asString(); - if(!valueVbrHealthChecksVbrHealthCheck["PacketLoss"].isNull()) - vbrHealthChecksObject.packetLoss = std::stol(valueVbrHealthChecksVbrHealthCheck["PacketLoss"].asString()); - if(!valueVbrHealthChecksVbrHealthCheck["HealthCheckSourceIp"].isNull()) - vbrHealthChecksObject.healthCheckSourceIp = valueVbrHealthChecksVbrHealthCheck["HealthCheckSourceIp"].asString(); if(!valueVbrHealthChecksVbrHealthCheck["HealthCheckTargetIp"].isNull()) vbrHealthChecksObject.healthCheckTargetIp = valueVbrHealthChecksVbrHealthCheck["HealthCheckTargetIp"].asString(); - if(!valueVbrHealthChecksVbrHealthCheck["Delay"].isNull()) - vbrHealthChecksObject.delay = std::stol(valueVbrHealthChecksVbrHealthCheck["Delay"].asString()); - if(!valueVbrHealthChecksVbrHealthCheck["HealthCheckInterval"].isNull()) - vbrHealthChecksObject.healthCheckInterval = std::stoi(valueVbrHealthChecksVbrHealthCheck["HealthCheckInterval"].asString()); - if(!valueVbrHealthChecksVbrHealthCheck["HealthyThreshold"].isNull()) - vbrHealthChecksObject.healthyThreshold = std::stoi(valueVbrHealthChecksVbrHealthCheck["HealthyThreshold"].asString()); + if(!valueVbrHealthChecksVbrHealthCheck["VbrInstanceId"].isNull()) + vbrHealthChecksObject.vbrInstanceId = valueVbrHealthChecksVbrHealthCheck["VbrInstanceId"].asString(); if(!valueVbrHealthChecksVbrHealthCheck["VbrInstanceRegionId"].isNull()) vbrHealthChecksObject.vbrInstanceRegionId = valueVbrHealthChecksVbrHealthCheck["VbrInstanceRegionId"].asString(); + if(!valueVbrHealthChecksVbrHealthCheck["Delay"].isNull()) + vbrHealthChecksObject.delay = std::stol(valueVbrHealthChecksVbrHealthCheck["Delay"].asString()); + if(!valueVbrHealthChecksVbrHealthCheck["LinkStatus"].isNull()) + vbrHealthChecksObject.linkStatus = valueVbrHealthChecksVbrHealthCheck["LinkStatus"].asString(); + if(!valueVbrHealthChecksVbrHealthCheck["CenId"].isNull()) + vbrHealthChecksObject.cenId = valueVbrHealthChecksVbrHealthCheck["CenId"].asString(); + if(!valueVbrHealthChecksVbrHealthCheck["HealthyThreshold"].isNull()) + vbrHealthChecksObject.healthyThreshold = std::stoi(valueVbrHealthChecksVbrHealthCheck["HealthyThreshold"].asString()); + if(!valueVbrHealthChecksVbrHealthCheck["HealthCheckInterval"].isNull()) + vbrHealthChecksObject.healthCheckInterval = std::stoi(valueVbrHealthChecksVbrHealthCheck["HealthCheckInterval"].asString()); + if(!valueVbrHealthChecksVbrHealthCheck["HealthCheckSourceIp"].isNull()) + vbrHealthChecksObject.healthCheckSourceIp = valueVbrHealthChecksVbrHealthCheck["HealthCheckSourceIp"].asString(); + if(!valueVbrHealthChecksVbrHealthCheck["PacketLoss"].isNull()) + vbrHealthChecksObject.packetLoss = std::stol(valueVbrHealthChecksVbrHealthCheck["PacketLoss"].asString()); + if(!valueVbrHealthChecksVbrHealthCheck["HealthCheckOnly"].isNull()) + vbrHealthChecksObject.healthCheckOnly = valueVbrHealthChecksVbrHealthCheck["HealthCheckOnly"].asString() == "true"; vbrHealthChecks_.push_back(vbrHealthChecksObject); } - if(!value["TotalCount"].isNull()) - totalCount_ = std::stoi(value["TotalCount"].asString()); - if(!value["PageNumber"].isNull()) - pageNumber_ = std::stoi(value["PageNumber"].asString()); if(!value["PageSize"].isNull()) pageSize_ = std::stoi(value["PageSize"].asString()); + if(!value["PageNumber"].isNull()) + pageNumber_ = std::stoi(value["PageNumber"].asString()); + if(!value["TotalCount"].isNull()) + totalCount_ = std::stoi(value["TotalCount"].asString()); } diff --git a/cbn/src/model/DescribeGrantRulesToCenResult.cc b/cbn/src/model/DescribeGrantRulesToCenResult.cc index 76312e792..41b26a258 100644 --- a/cbn/src/model/DescribeGrantRulesToCenResult.cc +++ b/cbn/src/model/DescribeGrantRulesToCenResult.cc @@ -43,16 +43,18 @@ void DescribeGrantRulesToCenResult::parse(const std::string &payload) for (auto valueGrantRulesGrantRule : allGrantRulesNode) { GrantRule grantRulesObject; - if(!valueGrantRulesGrantRule["CenId"].isNull()) - grantRulesObject.cenId = valueGrantRulesGrantRule["CenId"].asString(); - if(!valueGrantRulesGrantRule["ChildInstanceRegionId"].isNull()) - grantRulesObject.childInstanceRegionId = valueGrantRulesGrantRule["ChildInstanceRegionId"].asString(); if(!valueGrantRulesGrantRule["ChildInstanceType"].isNull()) grantRulesObject.childInstanceType = valueGrantRulesGrantRule["ChildInstanceType"].asString(); - if(!valueGrantRulesGrantRule["ChildInstanceId"].isNull()) - grantRulesObject.childInstanceId = valueGrantRulesGrantRule["ChildInstanceId"].asString(); + if(!valueGrantRulesGrantRule["ChildInstanceRegionId"].isNull()) + grantRulesObject.childInstanceRegionId = valueGrantRulesGrantRule["ChildInstanceRegionId"].asString(); if(!valueGrantRulesGrantRule["ChildInstanceOwnerId"].isNull()) grantRulesObject.childInstanceOwnerId = std::stol(valueGrantRulesGrantRule["ChildInstanceOwnerId"].asString()); + if(!valueGrantRulesGrantRule["ChildInstanceId"].isNull()) + grantRulesObject.childInstanceId = valueGrantRulesGrantRule["ChildInstanceId"].asString(); + if(!valueGrantRulesGrantRule["CenId"].isNull()) + grantRulesObject.cenId = valueGrantRulesGrantRule["CenId"].asString(); + if(!valueGrantRulesGrantRule["OrderType"].isNull()) + grantRulesObject.orderType = valueGrantRulesGrantRule["OrderType"].asString(); grantRules_.push_back(grantRulesObject); } diff --git a/cbn/src/model/EnableCenVbrHealthCheckRequest.cc b/cbn/src/model/EnableCenVbrHealthCheckRequest.cc index cdc1ee08e..ac204fe6a 100644 --- a/cbn/src/model/EnableCenVbrHealthCheckRequest.cc +++ b/cbn/src/model/EnableCenVbrHealthCheckRequest.cc @@ -82,6 +82,17 @@ void EnableCenVbrHealthCheckRequest::setVbrInstanceOwnerId(long vbrInstanceOwner setParameter("VbrInstanceOwnerId", std::to_string(vbrInstanceOwnerId)); } +bool EnableCenVbrHealthCheckRequest::getHealthCheckOnly()const +{ + return healthCheckOnly_; +} + +void EnableCenVbrHealthCheckRequest::setHealthCheckOnly(bool healthCheckOnly) +{ + healthCheckOnly_ = healthCheckOnly; + setParameter("HealthCheckOnly", healthCheckOnly ? "true" : "false"); +} + std::string EnableCenVbrHealthCheckRequest::getVbrInstanceRegionId()const { return vbrInstanceRegionId_;