/** * Checks whether the OS disk is directly attached to a managed disk. * * @param osDisk the osDisk value in the storage profile * @return true if the OS disk is attached to a managed disk, false otherwise */ private boolean isOSDiskAttachedManaged(OSDisk osDisk) { return osDisk.createOption() == DiskCreateOptionTypes.ATTACH && osDisk.managedDisk() != null && osDisk.managedDisk().id() != null; }
/** * Checks whether the OS disk is directly attached to a managed disk. * * @param osDisk the osDisk value in the storage profile * @return true if the OS disk is attached to a managed disk, false otherwise */ private boolean isOSDiskAttachedManaged(OSDisk osDisk) { return osDisk.createOption() == DiskCreateOptionTypes.ATTACH && osDisk.managedDisk() != null && osDisk.managedDisk().id() != null; }
@Override public String osDiskId() { if (this.storageProfile().osDisk().managedDisk() != null) { return this.storageProfile().osDisk().managedDisk().id(); } return null; }
@Override public String osDiskId() { if (this.storageProfile().osDisk().managedDisk() != null) { return this.storageProfile().osDisk().managedDisk().id(); } return null; }
@Override public StorageAccountTypes osDiskStorageAccountType() { if (!isManagedDiskEnabled() || this.storageProfile().osDisk().managedDisk() == null) { return null; } return this.storageProfile().osDisk().managedDisk().storageAccountType(); }
@Override public StorageAccountTypes osDiskStorageAccountType() { if (!isManagedDiskEnabled() || this.storageProfile().osDisk().managedDisk() == null) { return null; } return this.storageProfile().osDisk().managedDisk().storageAccountType(); }
@Override public String osDiskId() { if (!isManagedDiskEnabled()) { return null; } return this.storageProfile().osDisk().managedDisk().id(); }
@Override public String osDiskId() { if (!isManagedDiskEnabled()) { return null; } return this.storageProfile().osDisk().managedDisk().id(); }
@Override public VirtualMachineImpl withOSDiskStorageAccountType(StorageAccountTypes accountType) { if (this.inner().storageProfile().osDisk().managedDisk() == null) { this.inner() .storageProfile() .osDisk() .withManagedDisk(new ManagedDiskParameters()); } this.inner() .storageProfile() .osDisk() .managedDisk() .withStorageAccountType(accountType); return this; }
@Override public VirtualMachineImpl withOSDiskStorageAccountType(StorageAccountTypes accountType) { if (this.inner().storageProfile().osDisk().managedDisk() == null) { this.inner() .storageProfile() .osDisk() .withManagedDisk(new ManagedDiskParameters()); } this.inner() .storageProfile() .osDisk() .managedDisk() .withStorageAccountType(accountType); return this; }
if (osDisk.managedDisk() == null) { osDisk.withManagedDisk(new ManagedDiskParameters()); if (osDisk.managedDisk().storageAccountType() == null) { osDisk.managedDisk() .withStorageAccountType(StorageAccountTypes.STANDARD_LRS); if (osDisk.managedDisk() != null) { osDisk.managedDisk().withStorageAccountType(null);
if (osDisk.managedDisk() == null) { osDisk.withManagedDisk(new ManagedDiskParameters()); if (osDisk.managedDisk().storageAccountType() == null) { osDisk.managedDisk() .withStorageAccountType(StorageAccountTypes.STANDARD_LRS); if (osDisk.managedDisk() != null) { osDisk.managedDisk().withStorageAccountType(null);
dockerVM.osHost = new AzureOSHost(vm.storageProfile().imageReference()); if (vm.storageProfile().osDisk().managedDisk() != null) { dockerVM.storageAccountName = vm.storageProfile().osDisk().name(); dockerVM.storageAccountType = "Managed disk";