@Override public boolean isOSBasedOnCustomImage() { ImageReference imageReference = this.inner().storageProfile().imageReference(); if (imageReference != null && imageReference.id() != null) { return true; } return false; }
@Override public ImageReference platformImageReference() { if (isOSBasedOnPlatformImage()) { return this.inner().storageProfile().imageReference(); } return null; }
@Override public boolean isOSBasedOnCustomImage() { ImageReference imageReference = this.inner().storageProfile().imageReference(); if (imageReference != null && imageReference.id() != null) { return true; } return false; }
@Override public ImageReference platformImageReference() { if (isOSBasedOnPlatformImage()) { return this.inner().storageProfile().imageReference(); } return 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(StorageProfile storageProfile) { ImageReference imageReference = storageProfile.imageReference(); return isOSDiskFromImage(storageProfile.osDisk()) && imageReference != null && imageReference.id() != null; }
@Override public boolean isOSBasedOnPlatformImage() { ImageReference imageReference = this.inner().storageProfile().imageReference(); if (imageReference != null && imageReference.publisher() != null && imageReference.sku() != null && imageReference.offer() != null && imageReference.version() != null) { return true; } return false; }
@Override public boolean isOSBasedOnPlatformImage() { ImageReference imageReference = this.inner().storageProfile().imageReference(); if (imageReference != null && imageReference.publisher() != null && imageReference.sku() != null && imageReference.offer() != null && imageReference.version() != null) { return true; } return false; }
@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; }
/** * Checks whether the OS disk is based on an platform image (image in PIR). * * @param storageProfile the storage profile * @return true if the OS disk is configured to be based on platform image. */ private boolean isOSDiskFromPlatformImage(StorageProfile storageProfile) { ImageReference imageReference = storageProfile.imageReference(); return isOSDiskFromImage(storageProfile.osDisk()) && imageReference != null && imageReference.publisher() != null && imageReference.offer() != null && imageReference.sku() != null && imageReference.version() != null; }
/** * Checks whether the OS disk is based on an platform image (image in PIR). * * @param storageProfile the storage profile * @return true if the OS disk is configured to be based on platform image. */ private boolean isOSDiskFromPlatformImage(StorageProfile storageProfile) { ImageReference imageReference = storageProfile.imageReference(); return isOSDiskFromImage(storageProfile.osDisk()) && imageReference != null && imageReference.publisher() != null && imageReference.offer() != null && imageReference.sku() != null && imageReference.version() != null; }
dockerVM.vmSize = vm.size().toString(); dockerVM.osDiskName = vm.storageProfile().osDisk().name(); if (vm.storageProfile().imageReference() != null) { dockerVM.osHost = new AzureOSHost(vm.storageProfile().imageReference());