DescribeInstanceTypes add CpuOptions.
This commit is contained in:
@@ -39,6 +39,10 @@ namespace AlibabaCloud
|
||||
int vfQueueNumberPerEni;
|
||||
bool sriovSupport;
|
||||
};
|
||||
struct CpuOptions
|
||||
{
|
||||
std::vector<std::string> supportedTopologyTypes;
|
||||
};
|
||||
struct NetworkCardInfo
|
||||
{
|
||||
int networkCardIndex;
|
||||
@@ -70,6 +74,7 @@ namespace AlibabaCloud
|
||||
float gPUMemorySize;
|
||||
int eniTotalQuantity;
|
||||
int cpuCoreCount;
|
||||
CpuOptions cpuOptions;
|
||||
int initialCredit;
|
||||
int networkCardQuantity;
|
||||
std::string instanceCategory;
|
||||
|
||||
@@ -130,6 +130,10 @@ void DescribeInstanceTypesResult::parse(const std::string &payload)
|
||||
instanceTypesObject.enhancedNetwork.sriovSupport = enhancedNetworkNode["SriovSupport"].asString() == "true";
|
||||
if(!enhancedNetworkNode["VfQueueNumberPerEni"].isNull())
|
||||
instanceTypesObject.enhancedNetwork.vfQueueNumberPerEni = std::stoi(enhancedNetworkNode["VfQueueNumberPerEni"].asString());
|
||||
auto cpuOptionsNode = value["CpuOptions"];
|
||||
auto allSupportedTopologyTypes = cpuOptionsNode["SupportedTopologyTypes"]["SupportedTopologyType"];
|
||||
for (auto value : allSupportedTopologyTypes)
|
||||
instanceTypesObject.cpuOptions.supportedTopologyTypes.push_back(value.asString());
|
||||
auto allSupportedBootModes = value["SupportedBootModes"]["SupportedBootMode"];
|
||||
for (auto value : allSupportedBootModes)
|
||||
instanceTypesObject.supportedBootModes.push_back(value.asString());
|
||||
|
||||
Reference in New Issue
Block a user