Supported gateway for hdeni api.

This commit is contained in:
sdk-team
2024-06-03 07:01:54 +00:00
parent 051077c805
commit 886cef155f
9 changed files with 40 additions and 1 deletions

View File

@@ -25,6 +25,15 @@ GetFabricTopologyRequest::GetFabricTopologyRequest()
GetFabricTopologyRequest::~GetFabricTopologyRequest() {}
std::string GetFabricTopologyRequest::getClusterId() const {
return clusterId_;
}
void GetFabricTopologyRequest::setClusterId(const std::string &clusterId) {
clusterId_ = clusterId;
setBodyParameter(std::string("ClusterId"), clusterId);
}
std::string GetFabricTopologyRequest::getRegionId() const {
return regionId_;
}
@@ -43,6 +52,15 @@ void GetFabricTopologyRequest::setVpdId(const std::string &vpdId) {
setBodyParameter(std::string("VpdId"), vpdId);
}
std::string GetFabricTopologyRequest::getVpcId() const {
return vpcId_;
}
void GetFabricTopologyRequest::setVpcId(const std::string &vpcId) {
vpcId_ = vpcId;
setBodyParameter(std::string("VpcId"), vpcId);
}
std::vector<std::string> GetFabricTopologyRequest::getLniIds() const {
return lniIds_;
}

View File

@@ -44,6 +44,10 @@ void GetFabricTopologyResult::parse(const std::string &payload)
content_.regionId = contentNode["RegionId"].asString();
if(!contentNode["VpdId"].isNull())
content_.vpdId = contentNode["VpdId"].asString();
if(!contentNode["VpcId"].isNull())
content_.vpcId = contentNode["VpcId"].asString();
if(!contentNode["ClusterId"].isNull())
content_.clusterId = contentNode["ClusterId"].asString();
auto allTopoInfoNode = contentNode["TopoInfo"]["Layer"];
for (auto contentNodeTopoInfoLayer : allTopoInfoNode)
{

View File

@@ -54,6 +54,8 @@ void GetNodeInfoForPodResult::parse(const std::string &payload)
content_.leniQuota = std::stoi(contentNode["LeniQuota"].asString());
if(!contentNode["LniSipQuota"].isNull())
content_.lniSipQuota = std::stoi(contentNode["LniSipQuota"].asString());
if(!contentNode["LeniSipQuota"].isNull())
content_.leniSipQuota = std::stoi(contentNode["LeniSipQuota"].asString());
if(!contentNode["HdeniQuota"].isNull())
content_.hdeniQuota = std::stoi(contentNode["HdeniQuota"].asString());
auto allVSwitches = contentNode["VSwitches"]["VSwitche"];

View File

@@ -57,6 +57,10 @@ void ListNodeInfosForPodResult::parse(const std::string &payload)
contentObject.leniQuota = std::stoi(valueContentContentItem["LeniQuota"].asString());
if(!valueContentContentItem["LniSipQuota"].isNull())
contentObject.lniSipQuota = std::stoi(valueContentContentItem["LniSipQuota"].asString());
if(!valueContentContentItem["LeniSipQuota"].isNull())
contentObject.leniSipQuota = std::stoi(valueContentContentItem["LeniSipQuota"].asString());
if(!valueContentContentItem["HdeniQuota"].isNull())
contentObject.hdeniQuota = std::stoi(valueContentContentItem["HdeniQuota"].asString());
auto allVSwitches = value["VSwitches"]["VSwitche"];
for (auto value : allVSwitches)
contentObject.vSwitches.push_back(value.asString());