DescribeInstanceTypes add CpuOptions.

This commit is contained in:
sdk-team
2024-10-31 12:18:01 +00:00
parent 5cdab50afe
commit 5edf5643a2
3 changed files with 10 additions and 1 deletions

View File

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