@Test void createInstanceGroupAttributesTestAvailabilitySetsAddedWhenAzure() { Json attributes = underTest.createAttributes(CloudPlatform.AZURE, STACK_NM, IG_NAME); assertThat(attributes).isNotNull(); JSONObject availabilitySet = attributes.getValue(AVAILABILITY_SET); assertThat(availabilitySet.getInt(AzureInstanceGroupParameters.FAULT_DOMAIN_COUNT)).isEqualTo(2); assertThat(availabilitySet.getInt(AzureInstanceGroupParameters.UPDATE_DOMAIN_COUNT)).isEqualTo(20); assertThat(availabilitySet.getString(AzureInstanceGroupParameters.NAME)).isEqualTo(String.format("%s-%s-as", STACK_NM, IG_NAME)); }
public Json createAttributes(CloudPlatform cloudPlatform, String stackName, String instanceGroupName) { if (cloudPlatform == CloudPlatform.AZURE) { Map<String, Object> asParameters = Map.ofEntries( entry(AzureInstanceGroupParameters.NAME, String.format("%s-%s-as", stackName, instanceGroupName)), entry(AzureInstanceGroupParameters.FAULT_DOMAIN_COUNT, DEFAULT_FAULT_DOMAIN_COUNTER), entry(AzureInstanceGroupParameters.UPDATE_DOMAIN_COUNT, DEFAULT_UPDATE_DOMAIN_COUNTER)); return new Json(Map.of("availabilitySet", asParameters)); } else { return null; } }
DefaultInstanceGroupProvider { public Json createAttributes(CloudPlatform cloudPlatform, String stackName, String instanceGroupName) { if (cloudPlatform == CloudPlatform.AZURE) { Map<String, Object> asParameters = Map.ofEntries( entry(AzureInstanceGroupParameters.NAME, String.format("%s-%s-as", stackName, instanceGroupName)), entry(AzureInstanceGroupParameters.FAULT_DOMAIN_COUNT, DEFAULT_FAULT_DOMAIN_COUNTER), entry(AzureInstanceGroupParameters.UPDATE_DOMAIN_COUNT, DEFAULT_UPDATE_DOMAIN_COUNTER)); return new Json(Map.of("availabilitySet", asParameters)); } else { return null; } } }
DefaultInstanceGroupProvider { public Json createAttributes(CloudPlatform cloudPlatform, String stackName, String instanceGroupName) { if (cloudPlatform == CloudPlatform.AZURE) { Map<String, Object> asParameters = Map.ofEntries( entry(AzureInstanceGroupParameters.NAME, String.format("%s-%s-as", stackName, instanceGroupName)), entry(AzureInstanceGroupParameters.FAULT_DOMAIN_COUNT, DEFAULT_FAULT_DOMAIN_COUNTER), entry(AzureInstanceGroupParameters.UPDATE_DOMAIN_COUNT, DEFAULT_UPDATE_DOMAIN_COUNTER)); return new Json(Map.of("availabilitySet", asParameters)); } else { return null; } }  }
DefaultInstanceGroupProvider { public Json createAttributes(CloudPlatform cloudPlatform, String stackName, String instanceGroupName) { if (cloudPlatform == CloudPlatform.AZURE) { Map<String, Object> asParameters = Map.ofEntries( entry(AzureInstanceGroupParameters.NAME, String.format("%s-%s-as", stackName, instanceGroupName)), entry(AzureInstanceGroupParameters.FAULT_DOMAIN_COUNT, DEFAULT_FAULT_DOMAIN_COUNTER), entry(AzureInstanceGroupParameters.UPDATE_DOMAIN_COUNT, DEFAULT_UPDATE_DOMAIN_COUNTER)); return new Json(Map.of("availabilitySet", asParameters)); } else { return null; } }  Template createDefaultTemplate(CloudPlatform cloudPlatform, String accountId); Json createAttributes(CloudPlatform cloudPlatform, String stackName, String instanceGroupName); }
DefaultInstanceGroupProvider { public Json createAttributes(CloudPlatform cloudPlatform, String stackName, String instanceGroupName) { if (cloudPlatform == CloudPlatform.AZURE) { Map<String, Object> asParameters = Map.ofEntries( entry(AzureInstanceGroupParameters.NAME, String.format("%s-%s-as", stackName, instanceGroupName)), entry(AzureInstanceGroupParameters.FAULT_DOMAIN_COUNT, DEFAULT_FAULT_DOMAIN_COUNTER), entry(AzureInstanceGroupParameters.UPDATE_DOMAIN_COUNT, DEFAULT_UPDATE_DOMAIN_COUNTER)); return new Json(Map.of("availabilitySet", asParameters)); } else { return null; } }  Template createDefaultTemplate(CloudPlatform cloudPlatform, String accountId); Json createAttributes(CloudPlatform cloudPlatform, String stackName, String instanceGroupName);  }