/** * Checks whether the OS disk is directly attached to a unmanaged VHD. * * @param osDisk the osDisk value in the storage profile * @return true if the OS disk is attached to a unmanaged VHD, false otherwise */ private boolean isOSDiskAttachedUnmanaged(OSDisk osDisk) { return osDisk.createOption() == DiskCreateOptionTypes.ATTACH && osDisk.vhd() != null && osDisk.vhd().uri() != null; }
/** * Checks whether the OS disk is directly attached to a unmanaged VHD. * * @param osDisk the osDisk value in the storage profile * @return true if the OS disk is attached to a unmanaged VHD, false otherwise */ private boolean isOSDiskAttachedUnmanaged(OSDisk osDisk) { return osDisk.createOption() == DiskCreateOptionTypes.ATTACH && osDisk.vhd() != null && osDisk.vhd().uri() != null; }
@Override public String osUnmanagedDiskVhdUri() { if (isManagedDiskEnabled()) { return null; } return inner().storageProfile().osDisk().vhd().uri(); }
@Override public String osUnmanagedDiskVhdUri() { if (isManagedDiskEnabled()) { return null; } return inner().storageProfile().osDisk().vhd().uri(); }
@Override public boolean isManagedDiskEnabled() { if (isOSBasedOnCustomImage()) { return true; } if (isOSBasedOnStoredImage()) { return false; } if (isOSBasedOnPlatformImage()) { if (this.inner().storageProfile().osDisk() != null && this.inner().storageProfile().osDisk().vhd() != null) { return false; } } return true; }
@Override public boolean isManagedDiskEnabled() { if (isOSBasedOnCustomImage()) { return true; } if (isOSBasedOnStoredImage()) { return false; } if (isOSBasedOnPlatformImage()) { if (this.inner().storageProfile().osDisk() != null && this.inner().storageProfile().osDisk().vhd() != null) { return false; } } return true; }
dockerVM.storageAccountType = "Managed disk"; } else { dockerVM.storageAccountName = vm.storageProfile().osDisk().vhd().uri().split("[.]")[0].split("/")[2]; dockerVM.storageAccountType = AzureDockerUtils.getStorageTypeForVMSize(dockerVM.vmSize);
if (osDisk.vhd() == null) { String osDiskVhdContainerName = "vhds"; String osDiskVhdName = this.vmName + "-os-disk-" + UUID.randomUUID().toString() + ".vhd";
@Override public boolean isManagedDiskEnabled() { if (isOsDiskFromCustomImage(this.inner().storageProfile())) { return true; } if (isOSDiskAttachedManaged(this.inner().storageProfile().osDisk())) { return true; } if (isOSDiskFromStoredImage(this.inner().storageProfile())) { return false; } if (isOSDiskAttachedUnmanaged(this.inner().storageProfile().osDisk())) { return false; } if (isOSDiskFromPlatformImage(this.inner().storageProfile())) { if (this.isUnmanagedDiskSelected) { return false; } } if (isInCreateMode()) { return true; } else { return this.inner().storageProfile().osDisk().vhd() == null; } }
if (osDisk.vhd() == null) { String osDiskVhdContainerName = "vhds"; String osDiskVhdName = this.vmName + "-os-disk-" + UUID.randomUUID().toString() + ".vhd";
@Override public boolean isManagedDiskEnabled() { if (isOsDiskFromCustomImage(this.inner().storageProfile())) { return true; } if (isOSDiskAttachedManaged(this.inner().storageProfile().osDisk())) { return true; } if (isOSDiskFromStoredImage(this.inner().storageProfile())) { return false; } if (isOSDiskAttachedUnmanaged(this.inner().storageProfile().osDisk())) { return false; } if (isOSDiskFromPlatformImage(this.inner().storageProfile())) { if (this.isUnmanagedDiskSelected) { return false; } } if (isInCreateMode()) { return true; } else { return this.inner().storageProfile().osDisk().vhd() == null; } }