use of com.microsoft.azure.management.containerregistry.StorageAccountParameters in project azure-sdk-for-java by Azure.
the class RegistryImpl method handleStorageSettings.
private Observable<StorageAccountParameters> handleStorageSettings() {
final Func1<StorageAccount, StorageAccountParameters> onStorageAccountReady = new Func1<StorageAccount, StorageAccountParameters>() {
@Override
public StorageAccountParameters call(StorageAccount storageAccount) {
RegistryImpl.this.storageAccount = storageAccount;
List<StorageAccountKey> keys = storageAccount.getKeys();
StorageAccountParameters storageAccountParameters = new StorageAccountParameters();
storageAccountParameters.withName(storageAccount.name());
storageAccountParameters.withAccessKey(keys.get(0).value());
return storageAccountParameters;
}
};
if (this.creatableStorageAccountKey != null) {
return Observable.just((StorageAccount) this.createdResource(this.creatableStorageAccountKey)).map(onStorageAccountReady);
} else {
return Observable.just(this.storageAccount).map(onStorageAccountReady);
}
}
Aggregations