mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
fix(ec2): include supported usage classes in DescribeInstanceTypes (#3347)
* fix(ec2): include supported usage classes in DescribeInstanceTypes * test(stepfunctions): document executor fixture dependencies * test(ec2): document usage class regression coverage
This commit is contained in:
1 parent
084ac87fc4
commit
19f410d6b0
4 files changed
+30
-1
No files matched your search
@@ -95,6 +95,9 @@ public class Ec2InstanceTypeCatalog {
|
||||
if (instanceType.supportedArchitectures == null || instanceType.supportedArchitectures.isEmpty()) {
|
||||
throw new IllegalStateException("EC2 instance type catalog entry is missing supportedArchitectures: " + name);
|
||||
}
|
||||
if (instanceType.supportedUsageClasses == null || instanceType.supportedUsageClasses.isEmpty()) {
|
||||
throw new IllegalStateException("EC2 instance type catalog entry is missing supportedUsageClasses: " + name);
|
||||
}
|
||||
if (instanceType.encryptionInTransitSupported == null) {
|
||||
throw new IllegalStateException(
|
||||
"EC2 instance type catalog entry is missing encryptionInTransitSupported: " + name);
|
||||
@@ -156,6 +159,7 @@ public class Ec2InstanceTypeCatalog {
|
||||
public int memoryMib;
|
||||
public int localStorageGiB;
|
||||
public List<String> supportedArchitectures = List.of();
|
||||
public List<String> supportedUsageClasses = List.of("on-demand", "spot");
|
||||
public Boolean currentGeneration;
|
||||
public Boolean encryptionInTransitSupported;
|
||||
public Integer defaultNetworkCardIndex;
|
||||
@@ -170,6 +174,7 @@ public class Ec2InstanceTypeCatalog {
|
||||
type.put("instanceStorageSupported", localStorageGiB > 0);
|
||||
type.put("localStorageGiB", localStorageGiB);
|
||||
type.put("supportedArchitectures", List.copyOf(supportedArchitectures));
|
||||
type.put("supportedUsageClasses", List.copyOf(supportedUsageClasses));
|
||||
type.put("currentGeneration", currentGeneration == null || currentGeneration);
|
||||
Map<String, Object> networkInfo = new LinkedHashMap<>();
|
||||
networkInfo.put("encryptionInTransitSupported", encryptionInTransitSupported);
|
||||
|
||||
@@ -3849,7 +3849,12 @@ public class Ec2QueryHandler {
|
||||
for (String arch : (List<String>) t.get("supportedArchitectures")) {
|
||||
xml.elem("item", arch);
|
||||
}
|
||||
xml.end("supportedArchitectures").end("processorInfo");
|
||||
xml.end("supportedArchitectures").end("processorInfo")
|
||||
.start("supportedUsageClasses");
|
||||
for (String usageClass : (List<String>) t.get("supportedUsageClasses")) {
|
||||
xml.elem("item", usageClass);
|
||||
}
|
||||
xml.end("supportedUsageClasses");
|
||||
Map<String, Object> networkInfo = (Map<String, Object>) t.get("networkInfo");
|
||||
xml.start("networkInfo")
|
||||
.elem("encryptionInTransitSupported",
|
||||
|
||||
Reference in new issue
Block a user