@Override public boolean isOSBasedOnCustomImage() { ImageReference imageReference = this.inner().storageProfile().imageReference(); if (imageReference != null && imageReference.id() != null) { return true; } return false; }
@Override public boolean isOSBasedOnCustomImage() { ImageReference imageReference = this.inner().storageProfile().imageReference(); if (imageReference != null && imageReference.id() != null) { return true; } return false; }
/** * Checks whether the OS disk is based on a CustomImage. * <p> * A custom image is represented by {@link com.microsoft.azure.management.compute.VirtualMachineCustomImage}. * * @param storageProfile the storage profile * @return true if the OS disk is configured to be based on custom image. */ private boolean isOsDiskFromCustomImage(StorageProfile storageProfile) { ImageReference imageReference = storageProfile.imageReference(); return isOSDiskFromImage(storageProfile.osDisk()) && imageReference != null && imageReference.id() != null; }
/** * Checks whether the OS disk is based on a CustomImage. * <p> * A custom image is represented by {@link com.microsoft.azure.management.compute.VirtualMachineCustomImage}. * * @param storageProfile the storage profile * @return true if the OS disk is configured to be based on custom image. */ private boolean isOsDiskFromCustomImage(VirtualMachineScaleSetStorageProfile storageProfile) { ImageReference imageReference = storageProfile.imageReference(); return isOSDiskFromImage(storageProfile.osDisk()) && imageReference != null && imageReference.id() != null; }
/** * Checks whether the OS disk is based on a CustomImage. * <p> * A custom image is represented by {@link com.microsoft.azure.management.compute.VirtualMachineCustomImage}. * * @param storageProfile the storage profile * @return true if the OS disk is configured to be based on custom image. */ private boolean isOsDiskFromCustomImage(StorageProfile storageProfile) { ImageReference imageReference = storageProfile.imageReference(); return isOSDiskFromImage(storageProfile.osDisk()) && imageReference != null && imageReference.id() != null; }
/** * Checks whether the OS disk is based on a CustomImage. * <p> * A custom image is represented by {@link com.microsoft.azure.management.compute.VirtualMachineCustomImage}. * * @param storageProfile the storage profile * @return true if the OS disk is configured to be based on custom image. */ private boolean isOsDiskFromCustomImage(VirtualMachineScaleSetStorageProfile storageProfile) { ImageReference imageReference = storageProfile.imageReference(); return isOSDiskFromImage(storageProfile.osDisk()) && imageReference != null && imageReference.id() != null; }
@Override public VirtualMachineCustomImage getOSCustomImage() { if (this.isOSBasedOnCustomImage()) { ImageReference imageReference = this.inner().storageProfile().imageReference(); return this.computeManager.virtualMachineCustomImages().getById(imageReference.id()); } return null; }
@Override public VirtualMachineCustomImage getOSCustomImage() { if (this.isOSBasedOnCustomImage()) { ImageReference imageReference = this.inner().storageProfile().imageReference(); return this.computeManager.virtualMachineCustomImages().getById(imageReference.id()); } return null; }