Supported Jumbo for HDENI and LENI.
This commit is contained in:
@@ -1923,6 +1923,42 @@ EfloClient::ListSubnetsOutcomeCallable EfloClient::listSubnetsCallable(const Lis
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EfloClient::ListVccFlowInfosOutcome EfloClient::listVccFlowInfos(const ListVccFlowInfosRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListVccFlowInfosOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListVccFlowInfosOutcome(ListVccFlowInfosResult(outcome.result()));
|
||||
else
|
||||
return ListVccFlowInfosOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EfloClient::listVccFlowInfosAsync(const ListVccFlowInfosRequest& request, const ListVccFlowInfosAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listVccFlowInfos(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EfloClient::ListVccFlowInfosOutcomeCallable EfloClient::listVccFlowInfosCallable(const ListVccFlowInfosRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListVccFlowInfosOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listVccFlowInfos(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EfloClient::ListVccGrantRulesOutcome EfloClient::listVccGrantRules(const ListVccGrantRulesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -70,6 +70,15 @@ void CreateElasticNetworkInterfaceRequest::setNodeId(const std::string &nodeId)
|
||||
setBodyParameter(std::string("NodeId"), nodeId);
|
||||
}
|
||||
|
||||
bool CreateElasticNetworkInterfaceRequest::getEnableJumboFrame() const {
|
||||
return enableJumboFrame_;
|
||||
}
|
||||
|
||||
void CreateElasticNetworkInterfaceRequest::setEnableJumboFrame(bool enableJumboFrame) {
|
||||
enableJumboFrame_ = enableJumboFrame;
|
||||
setBodyParameter(std::string("EnableJumboFrame"), enableJumboFrame ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string CreateElasticNetworkInterfaceRequest::getVSwitchId() const {
|
||||
return vSwitchId_;
|
||||
}
|
||||
|
||||
@@ -61,6 +61,15 @@ void CreateVccRequest::setCenOwnerId(const std::string &cenOwnerId) {
|
||||
setBodyParameter(std::string("CenOwnerId"), cenOwnerId);
|
||||
}
|
||||
|
||||
long CreateVccRequest::getBgpAsn() const {
|
||||
return bgpAsn_;
|
||||
}
|
||||
|
||||
void CreateVccRequest::setBgpAsn(long bgpAsn) {
|
||||
bgpAsn_ = bgpAsn;
|
||||
setBodyParameter(std::string("BgpAsn"), std::to_string(bgpAsn));
|
||||
}
|
||||
|
||||
bool CreateVccRequest::getAccessCouldService() const {
|
||||
return accessCouldService_;
|
||||
}
|
||||
|
||||
@@ -74,6 +74,8 @@ void GetElasticNetworkInterfaceResult::parse(const std::string &payload)
|
||||
content_.description = contentNode["Description"].asString();
|
||||
if(!contentNode["SecurityGroupId"].isNull())
|
||||
content_.securityGroupId = contentNode["SecurityGroupId"].asString();
|
||||
if(!contentNode["EnableJumboFrame"].isNull())
|
||||
content_.enableJumboFrame = contentNode["EnableJumboFrame"].asString() == "true";
|
||||
auto allPrivateIpAddressesNode = contentNode["PrivateIpAddresses"]["PrivateIpAddress"];
|
||||
for (auto contentNodePrivateIpAddressesPrivateIpAddress : allPrivateIpAddressesNode)
|
||||
{
|
||||
@@ -98,6 +100,30 @@ void GetElasticNetworkInterfaceResult::parse(const std::string &payload)
|
||||
privateIpAddressObject.message = contentNodePrivateIpAddressesPrivateIpAddress["Message"].asString();
|
||||
content_.privateIpAddresses.push_back(privateIpAddressObject);
|
||||
}
|
||||
auto allIpv6AddressesNode = contentNode["Ipv6Addresses"]["Ipv6Addresse"];
|
||||
for (auto contentNodeIpv6AddressesIpv6Addresse : allIpv6AddressesNode)
|
||||
{
|
||||
Content::Ipv6Addresse ipv6AddresseObject;
|
||||
if(!contentNodeIpv6AddressesIpv6Addresse["ElasticNetworkInterfaceId"].isNull())
|
||||
ipv6AddresseObject.elasticNetworkInterfaceId = contentNodeIpv6AddressesIpv6Addresse["ElasticNetworkInterfaceId"].asString();
|
||||
if(!contentNodeIpv6AddressesIpv6Addresse["IpName"].isNull())
|
||||
ipv6AddresseObject.ipName = contentNodeIpv6AddressesIpv6Addresse["IpName"].asString();
|
||||
if(!contentNodeIpv6AddressesIpv6Addresse["Ipv6Address"].isNull())
|
||||
ipv6AddresseObject.ipv6Address = contentNodeIpv6AddressesIpv6Addresse["Ipv6Address"].asString();
|
||||
if(!contentNodeIpv6AddressesIpv6Addresse["Status"].isNull())
|
||||
ipv6AddresseObject.status = contentNodeIpv6AddressesIpv6Addresse["Status"].asString();
|
||||
if(!contentNodeIpv6AddressesIpv6Addresse["Description"].isNull())
|
||||
ipv6AddresseObject.description = contentNodeIpv6AddressesIpv6Addresse["Description"].asString();
|
||||
if(!contentNodeIpv6AddressesIpv6Addresse["Message"].isNull())
|
||||
ipv6AddresseObject.message = contentNodeIpv6AddressesIpv6Addresse["Message"].asString();
|
||||
if(!contentNodeIpv6AddressesIpv6Addresse["RegionId"].isNull())
|
||||
ipv6AddresseObject.regionId = contentNodeIpv6AddressesIpv6Addresse["RegionId"].asString();
|
||||
if(!contentNodeIpv6AddressesIpv6Addresse["GmtCreate"].isNull())
|
||||
ipv6AddresseObject.gmtCreate = contentNodeIpv6AddressesIpv6Addresse["GmtCreate"].asString();
|
||||
if(!contentNodeIpv6AddressesIpv6Addresse["GmtModified"].isNull())
|
||||
ipv6AddresseObject.gmtModified = contentNodeIpv6AddressesIpv6Addresse["GmtModified"].asString();
|
||||
content_.ipv6Addresses.push_back(ipv6AddresseObject);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
|
||||
@@ -100,6 +100,8 @@ void GetVccResult::parse(const std::string &payload)
|
||||
content_.connectionType = contentNode["ConnectionType"].asString();
|
||||
if(!contentNode["CenOwnerId"].isNull())
|
||||
content_.cenOwnerId = contentNode["CenOwnerId"].asString();
|
||||
if(!contentNode["BgpAsn"].isNull())
|
||||
content_.bgpAsn = contentNode["BgpAsn"].asString();
|
||||
auto allErInfosNode = contentNode["ErInfos"]["ErInfo"];
|
||||
for (auto contentNodeErInfosErInfo : allErInfosNode)
|
||||
{
|
||||
|
||||
81
eflo/src/model/ListVccFlowInfosRequest.cc
Normal file
81
eflo/src/model/ListVccFlowInfosRequest.cc
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/eflo/model/ListVccFlowInfosRequest.h>
|
||||
|
||||
using AlibabaCloud::Eflo::Model::ListVccFlowInfosRequest;
|
||||
|
||||
ListVccFlowInfosRequest::ListVccFlowInfosRequest()
|
||||
: RpcServiceRequest("eflo", "2022-05-30", "ListVccFlowInfos") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListVccFlowInfosRequest::~ListVccFlowInfosRequest() {}
|
||||
|
||||
std::string ListVccFlowInfosRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void ListVccFlowInfosRequest::setRegionId(const std::string ®ionId) {
|
||||
regionId_ = regionId;
|
||||
setBodyParameter(std::string("RegionId"), regionId);
|
||||
}
|
||||
|
||||
long ListVccFlowInfosRequest::getFrom() const {
|
||||
return from_;
|
||||
}
|
||||
|
||||
void ListVccFlowInfosRequest::setFrom(long from) {
|
||||
from_ = from;
|
||||
setBodyParameter(std::string("From"), std::to_string(from));
|
||||
}
|
||||
|
||||
long ListVccFlowInfosRequest::getTo() const {
|
||||
return to_;
|
||||
}
|
||||
|
||||
void ListVccFlowInfosRequest::setTo(long to) {
|
||||
to_ = to;
|
||||
setBodyParameter(std::string("To"), std::to_string(to));
|
||||
}
|
||||
|
||||
std::string ListVccFlowInfosRequest::getVccId() const {
|
||||
return vccId_;
|
||||
}
|
||||
|
||||
void ListVccFlowInfosRequest::setVccId(const std::string &vccId) {
|
||||
vccId_ = vccId;
|
||||
setBodyParameter(std::string("VccId"), vccId);
|
||||
}
|
||||
|
||||
std::string ListVccFlowInfosRequest::getMetricName() const {
|
||||
return metricName_;
|
||||
}
|
||||
|
||||
void ListVccFlowInfosRequest::setMetricName(const std::string &metricName) {
|
||||
metricName_ = metricName;
|
||||
setBodyParameter(std::string("MetricName"), metricName);
|
||||
}
|
||||
|
||||
std::string ListVccFlowInfosRequest::getDirection() const {
|
||||
return direction_;
|
||||
}
|
||||
|
||||
void ListVccFlowInfosRequest::setDirection(const std::string &direction) {
|
||||
direction_ = direction;
|
||||
setBodyParameter(std::string("Direction"), direction);
|
||||
}
|
||||
|
||||
84
eflo/src/model/ListVccFlowInfosResult.cc
Normal file
84
eflo/src/model/ListVccFlowInfosResult.cc
Normal file
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/eflo/model/ListVccFlowInfosResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eflo;
|
||||
using namespace AlibabaCloud::Eflo::Model;
|
||||
|
||||
ListVccFlowInfosResult::ListVccFlowInfosResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListVccFlowInfosResult::ListVccFlowInfosResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListVccFlowInfosResult::~ListVccFlowInfosResult()
|
||||
{}
|
||||
|
||||
void ListVccFlowInfosResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto contentNode = value["Content"];
|
||||
if(!contentNode["Total"].isNull())
|
||||
content_.total = std::stol(contentNode["Total"].asString());
|
||||
auto allDataNode = contentNode["Data"]["DataItem"];
|
||||
for (auto contentNodeDataDataItem : allDataNode)
|
||||
{
|
||||
Content::DataItem dataItemObject;
|
||||
if(!contentNodeDataDataItem["RegionId"].isNull())
|
||||
dataItemObject.regionId = contentNodeDataDataItem["RegionId"].asString();
|
||||
if(!contentNodeDataDataItem["VccId"].isNull())
|
||||
dataItemObject.vccId = contentNodeDataDataItem["VccId"].asString();
|
||||
if(!contentNodeDataDataItem["MetricName"].isNull())
|
||||
dataItemObject.metricName = contentNodeDataDataItem["MetricName"].asString();
|
||||
if(!contentNodeDataDataItem["Direction"].isNull())
|
||||
dataItemObject.direction = contentNodeDataDataItem["Direction"].asString();
|
||||
if(!contentNodeDataDataItem["Timestamp"].isNull())
|
||||
dataItemObject.timestamp = std::stol(contentNodeDataDataItem["Timestamp"].asString());
|
||||
if(!contentNodeDataDataItem["Value"].isNull())
|
||||
dataItemObject.value = contentNodeDataDataItem["Value"].asString();
|
||||
content_.data.push_back(dataItemObject);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ListVccFlowInfosResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
ListVccFlowInfosResult::Content ListVccFlowInfosResult::getContent()const
|
||||
{
|
||||
return content_;
|
||||
}
|
||||
|
||||
int ListVccFlowInfosResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
@@ -98,6 +98,8 @@ void ListVccsResult::parse(const std::string &payload)
|
||||
dataItemObject.connectionType = contentNodeDataDataItem["ConnectionType"].asString();
|
||||
if(!contentNodeDataDataItem["CenOwnerId"].isNull())
|
||||
dataItemObject.cenOwnerId = contentNodeDataDataItem["CenOwnerId"].asString();
|
||||
if(!contentNodeDataDataItem["BgpAsn"].isNull())
|
||||
dataItemObject.bgpAsn = contentNodeDataDataItem["BgpAsn"].asString();
|
||||
auto allErInfosNode = contentNodeDataDataItem["ErInfos"]["ErInfo"];
|
||||
for (auto contentNodeDataDataItemErInfosErInfo : allErInfosNode)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user