Bladeren bron

DescribeInstanceTypes add CpuOptions.

sdk-team 1 jaar geleden
bovenliggende
commit
5edf5643a2

+ 1 - 1
VERSION

@@ -1 +1 @@
-1.36.2012
+1.36.2013

+ 5 - 0
ecs/include/alibabacloud/ecs/model/DescribeInstanceTypesResult.h

@@ -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;

+ 4 - 0
ecs/src/model/DescribeInstanceTypesResult.cc

@@ -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());