Skip to content

Commit

Permalink
DescribeInstanceTypes add CpuOptions.
Browse files Browse the repository at this point in the history
  • Loading branch information
sdk-team committed Oct 31, 2024
1 parent b17e0ee commit 54ce098
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 1 deletion.
3 changes: 3 additions & 0 deletions aliyun-java-sdk-ecs/ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2024-10-31 Version: 5.11.12
- DescribeInstanceTypes add CpuOptions.

2024-10-30 Version: 5.11.11
- Support describe and modify NVMe on instance.

Expand Down
2 changes: 1 addition & 1 deletion aliyun-java-sdk-ecs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-ecs</artifactId>
<packaging>jar</packaging>
<version>5.11.11</version>
<version>5.11.12</version>
<name>aliyun-java-sdk-ecs</name>
<url>http://www.aliyun.com</url>
<description>Aliyun Open API SDK for Java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ public static class InstanceType {

private EnhancedNetwork enhancedNetwork;

private CpuOptions cpuOptions;

public Integer getEniTotalQuantity() {
return this.eniTotalQuantity;
}
Expand Down Expand Up @@ -457,6 +459,14 @@ public void setEnhancedNetwork(EnhancedNetwork enhancedNetwork) {
this.enhancedNetwork = enhancedNetwork;
}

public CpuOptions getCpuOptions() {
return this.cpuOptions;
}

public void setCpuOptions(CpuOptions cpuOptions) {
this.cpuOptions = cpuOptions;
}

public static class NetworkCardInfo {

private Integer networkCardIndex;
Expand Down Expand Up @@ -492,6 +502,19 @@ public void setVfQueueNumberPerEni(Integer vfQueueNumberPerEni) {
this.vfQueueNumberPerEni = vfQueueNumberPerEni;
}
}

public static class CpuOptions {

private List<String> supportedTopologyTypes;

public List<String> getSupportedTopologyTypes() {
return this.supportedTopologyTypes;
}

public void setSupportedTopologyTypes(List<String> supportedTopologyTypes) {
this.supportedTopologyTypes = supportedTopologyTypes;
}
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import com.aliyuncs.ecs.model.v20140526.DescribeInstanceTypesResponse;
import com.aliyuncs.ecs.model.v20140526.DescribeInstanceTypesResponse.InstanceType;
import com.aliyuncs.ecs.model.v20140526.DescribeInstanceTypesResponse.InstanceType.CpuOptions;
import com.aliyuncs.ecs.model.v20140526.DescribeInstanceTypesResponse.InstanceType.EnhancedNetwork;
import com.aliyuncs.ecs.model.v20140526.DescribeInstanceTypesResponse.InstanceType.NetworkCardInfo;
import com.aliyuncs.transform.UnmarshallerContext;
Expand Down Expand Up @@ -83,6 +84,15 @@ public static DescribeInstanceTypesResponse unmarshall(DescribeInstanceTypesResp
enhancedNetwork.setVfQueueNumberPerEni(_ctx.integerValue("DescribeInstanceTypesResponse.InstanceTypes["+ i +"].EnhancedNetwork.VfQueueNumberPerEni"));
instanceType.setEnhancedNetwork(enhancedNetwork);

CpuOptions cpuOptions = new CpuOptions();

List<String> supportedTopologyTypes = new ArrayList<String>();
for (int j = 0; j < _ctx.lengthValue("DescribeInstanceTypesResponse.InstanceTypes["+ i +"].CpuOptions.SupportedTopologyTypes.Length"); j++) {
supportedTopologyTypes.add(_ctx.stringValue("DescribeInstanceTypesResponse.InstanceTypes["+ i +"].CpuOptions.SupportedTopologyTypes["+ j +"]"));
}
cpuOptions.setSupportedTopologyTypes(supportedTopologyTypes);
instanceType.setCpuOptions(cpuOptions);

List<NetworkCardInfo> networkCards = new ArrayList<NetworkCardInfo>();
for (int j = 0; j < _ctx.lengthValue("DescribeInstanceTypesResponse.InstanceTypes["+ i +"].NetworkCards.Length"); j++) {
NetworkCardInfo networkCardInfo = new NetworkCardInfo();
Expand Down

0 comments on commit 54ce098

Please sign in to comment.