use of com.microsoft.azure.toolkit.lib.storage.model.Redundancy in project azure-tools-for-java by Microsoft.
the class CreateArmStorageAccountForm method fillReplicationTypes.
private void fillReplicationTypes() {
replicationComboBox.removeAll();
Kind kind = (Kind) kindCombo.getData(kindCombo.getText());
Performance performance = (Performance) performanceCombo.getData(performanceCombo.getText());
List<Redundancy> redundancies = Objects.isNull(performance) ? Collections.emptyList() : Azure.az(AzureStorageAccount.class).listSupportedRedundancies(performance, kind);
for (Redundancy redundancy : redundancies) {
replicationComboBox.add(redundancy.getLabel());
replicationComboBox.setData(redundancy.getLabel(), redundancy);
}
if (redundancies.contains(Redundancy.STANDARD_RAGRS)) {
replicationComboBox.select(redundancies.indexOf(Redundancy.STANDARD_RAGRS));
} else {
replicationComboBox.select(0);
}
}
Aggregations