From ef9d5b9dcc1999a33f866b1b9780f66cc6d4724c Mon Sep 17 00:00:00 2001 From: anuchan Date: Mon, 23 May 2016 11:36:38 -0700 Subject: [PATCH 1/3] Availability sets fluent methods in VirtualMachine, adding some javadocs --- .../management/compute/VirtualMachine.java | 52 ++++++++++++++-- .../management/compute/VirtualMachines.java | 4 +- .../implementation/ComputeManager.java | 47 +++++++++++++- .../ComputeResourceConnector.java | 15 +++++ .../KnownVirtualMachineImage.java | 23 +++++++ .../implementation/VirtualMachineImpl.java | 61 ++++++++++++++++++- 6 files changed, 192 insertions(+), 10 deletions(-) diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachine.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachine.java index bde5269581a4d..9eaf268ad0c45 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachine.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachine.java @@ -26,7 +26,7 @@ import java.util.List; /** - * The type representing Azure virtual machine. + * Client-side representation of an Azure virtual machine. */ public interface VirtualMachine extends GroupableResource, @@ -481,6 +481,49 @@ interface DefinitionWithDataDisk { ConfigureExistingDataDisk defineExistingDataDisk(String name); } + /** + * The virtual machine definition stage with availability set. + * + * @param The virtual machine definition in creatable stage. + */ + interface DefinitionWithAvailabilitySet { + /** + * Specifies the name of the availability set to create, the virtual machine will be part of + * this availability set. + *

+ * Adding virtual machines running your application to an availability set ensures that during + * maintenance event at least one virtual machine will be available. + * + * @param name The name of the availability set + * @return The stage representing creatable VM definition + */ + T withNewAvailabilitySet(String name); + + /** + * Specifies an instance of AvailabilitySet.DefinitionCreatable representing the availability set + * to be created, the virtual machine will be part of this availability set. + *

+ * Adding virtual machines running your application to an availability set ensures that during + * maintenance event at least one virtual machine will be available. + * + * @param creatable The availability set in creatable stage + * @return The stage representing creatable VM definition + */ + T withNewAvailabilitySet(AvailabilitySet.DefinitionCreatable creatable); + + /** + * Specifies the name of an existing availability set under which this virtual machine needs to be + * added. + *

+ * Adding virtual machines running your application to an availability set ensures that during + * maintenance event at least one virtual machine will be available. + * + * @param name The name of an existing availability set + * @return The stage representing creatable VM definition + */ + T withExistingAvailabilitySet(String name); + } + /** * The virtual machine definition stage with storage account. * @@ -488,7 +531,7 @@ interface DefinitionWithDataDisk { */ interface DefinitionStorageAccount { /** - * Specifies the name of the storage account to create, the OS disk for VM created from a market-place. + * Specifies the name of the storage account to create, the OS disk for VM created from a market-place * image will be stored in this account. * * @param name The name of the storage account @@ -500,7 +543,7 @@ interface DefinitionStorageAccount { * Specifies an instance of StorageAccount.DefinitionCreatable representing the storage account to be * created, the OS disk for VM created from a market-place image will be stored in this account. * - * @param creatable The name of the storage account + * @param creatable The storage account in creatable stage * @return The stage representing creatable VM definition */ T withNewStorageAccount(StorageAccount.DefinitionCreatable creatable); @@ -516,7 +559,7 @@ interface DefinitionStorageAccount { } /** - * The virtual machine definition in cretable stage. + * The virtual machine definition in creatable stage. */ interface DefinitionCreatable extends DefinitionPassword, @@ -524,6 +567,7 @@ interface DefinitionCreatable extends DefinitionWithVMSize, DefinitionStorageAccount, DefinitionWithDataDisk, + DefinitionWithAvailabilitySet, Creatable { } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachines.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachines.java index 1f37b5aab7a48..a15df71b8f3db 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachines.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachines.java @@ -12,7 +12,7 @@ import java.io.IOException; /** - * The type representing Azure virtual machine collection. + * Type represents Azure virtual machine collection. */ public interface VirtualMachines extends SupportsListing, @@ -32,7 +32,7 @@ public interface VirtualMachines extends PagedList listSizes(String region) throws CloudException, IOException; /** - * A type representing Azure virtual machine under a resource gorup. + * A type representing Azure virtual machine under a resource group. */ interface InGroup extends SupportsListing, diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManager.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManager.java index 042102428c0d3..7482406368d0e 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManager.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManager.java @@ -10,6 +10,9 @@ import com.microsoft.rest.RestClient; import com.microsoft.rest.credentials.ServiceClientCredentials; +/** + * A type that exposes Azure Compute service resource collections. + */ public final class ComputeManager { // The service managers private ResourceManager resourceManager; @@ -19,25 +22,52 @@ public final class ComputeManager { private AvailabilitySets availabilitySets; private VirtualMachines virtualMachines; + /** + * Get a Configurable instance that can be used to create ComputeManager with optional configuration. + * + * @return Configurable + */ public static Configurable configure() { return new ComputeManager.ConfigurableImpl(); } + /** + * Creates an instance of ComputeManager that exposes Azure Compute service resource collections. + * + * @param credentials The credentials to use + * @param subscriptionId The subscription + * @return The ComputeManager + */ public static ComputeManager authenticate(ServiceClientCredentials credentials, String subscriptionId) { return new ComputeManager(AzureEnvironment.AZURE.newRestClientBuilder() .withCredentials(credentials) .build(), subscriptionId); } + /** + * Creates an instance of ComputeManager that exposes Azure Compute service resource collections. + * + * @param restClient The RestClient to be used for API calls. + * @param subscriptionId The subscription + * @return The ComputeManager + */ public static ComputeManager authenticate(RestClient restClient, String subscriptionId) { return new ComputeManager(restClient, subscriptionId); } public interface Configurable extends AzureConfigurable { + /** + * Creates an instance of ComputeManager that exposes Azure Compute service resource collections. + * + * @param credentials The credentials to use + * @param subscriptionId The subscription + * @return The ComputeManager + */ ComputeManager authenticate(ServiceClientCredentials credentials, String subscriptionId); } private static final class ConfigurableImpl extends AzureConfigurableImpl implements Configurable { + @Override public ComputeManager authenticate(ServiceClientCredentials credentials, String subscriptionId) { return ComputeManager.authenticate(buildRestClient(credentials), subscriptionId); } @@ -49,8 +79,16 @@ private ComputeManager(RestClient restClient, String subscriptionId) { resourceManager = ResourceManager.authenticate(restClient).withSubscription(subscriptionId); } - private ComputeManager() {} + private ComputeManager() { + } + /** + * Get Azure availability set collection. + *

+ * The collection supports performing CRUD operations on Azure availability sets + * + * @return The availability set collection + */ public AvailabilitySets availabilitySets() { if (availabilitySets == null) { availabilitySets = new AvailabilitySetsImpl(computeManagementClient.availabilitySets(), @@ -59,6 +97,13 @@ public AvailabilitySets availabilitySets() { return availabilitySets; } + /** + * Get Azure virtual machine collection. + *

+ * The collection supports performing CRUD operations on Azure virtual machines + * + * @return The virtual machine collection + */ public VirtualMachines virtualMachines() { if (virtualMachines == null) { virtualMachines = new VirtualMachinesImpl(computeManagementClient.virtualMachines(), computeManagementClient.virtualMachineSizes()); diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeResourceConnector.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeResourceConnector.java index 451133fd41c67..e01bca66ce157 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeResourceConnector.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeResourceConnector.java @@ -21,11 +21,19 @@ private static ComputeResourceConnector create(RestClient restClient, String sub } public static class Builder implements ResourceConnector.Builder { + @Override public ComputeResourceConnector create(RestClient restClient, String subscriptionId, ResourceGroup resourceGroup) { return ComputeResourceConnector.create(restClient, subscriptionId, resourceGroup); } } + /** + * Get Azure availability set collection in the resource group. + *

+ * The collection supports performing CRUD operations on Azure availability sets + * + * @return The availability set collection + */ public AvailabilitySets.InGroup availabilitySets() { if (availabilitySets == null) { availabilitySets = new AvailabilitySetsInGroup(computeClient().availabilitySets(), resourceGroup); @@ -33,6 +41,13 @@ public AvailabilitySets.InGroup availabilitySets() { return availabilitySets; } + /** + * Get Azure virtual machine collection in the reosurce gorup. + *

+ * The collection supports performing CRUD operations on Azure virtual machines + * + * @return The virtual machine collection + */ public VirtualMachines.InGroup VirtualMachines() { // TODO return null; diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/KnownVirtualMachineImage.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/KnownVirtualMachineImage.java index a17b7fc6608b8..1a0ee3817daf1 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/KnownVirtualMachineImage.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/KnownVirtualMachineImage.java @@ -2,6 +2,9 @@ import com.microsoft.azure.management.compute.implementation.api.ImageReference; +/** + * The popular Azure images. + */ public enum KnownVirtualMachineImage { /** Linux */ UBUNTU_SERVER_14_04_LTS("Canonical", "UbuntuServer", "14.04.4-LTS"), @@ -27,18 +30,38 @@ public enum KnownVirtualMachineImage { this.sku = sku; } + /** + * The name of the image publisher. + * + * @return The publisher + */ public String publisher() { return this.publisher; } + /** + * The name of the image offer. + * + * @return The offer + */ public String offer() { return this.offer; } + /** + * The name of the image SKU. + * + * @return The SKU + */ public String sku() { return this.sku; } + /** + * The reference of the image. + * + * @return The image reference. + */ public ImageReference imageReference() { return new ImageReference() .setPublisher(publisher()) diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImpl.java index 9df87884dad51..52564ca880e14 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImpl.java @@ -1,8 +1,34 @@ package com.microsoft.azure.management.compute.implementation; import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.compute.AvailabilitySet; +import com.microsoft.azure.management.compute.AvailabilitySets; import com.microsoft.azure.management.compute.VirtualMachine; -import com.microsoft.azure.management.compute.implementation.api.*; +import com.microsoft.azure.management.compute.implementation.api.VirtualMachineInner; +import com.microsoft.azure.management.compute.implementation.api.Plan; +import com.microsoft.azure.management.compute.implementation.api.HardwareProfile; +import com.microsoft.azure.management.compute.implementation.api.StorageProfile; +import com.microsoft.azure.management.compute.implementation.api.OSProfile; +import com.microsoft.azure.management.compute.implementation.api.NetworkProfile; +import com.microsoft.azure.management.compute.implementation.api.DiagnosticsProfile; +import com.microsoft.azure.management.compute.implementation.api.VirtualMachineInstanceView; +import com.microsoft.azure.management.compute.implementation.api.VirtualMachineExtensionInner; +import com.microsoft.azure.management.compute.implementation.api.OperatingSystemTypes; +import com.microsoft.azure.management.compute.implementation.api.ImageReference; +import com.microsoft.azure.management.compute.implementation.api.WinRMListener; +import com.microsoft.azure.management.compute.implementation.api.CachingTypes; +import com.microsoft.azure.management.compute.implementation.api.DiskEncryptionSettings; +import com.microsoft.azure.management.compute.implementation.api.VirtualMachineSizeTypes; +import com.microsoft.azure.management.compute.implementation.api.VirtualHardDisk; +import com.microsoft.azure.management.compute.implementation.api.VirtualMachinesInner; +import com.microsoft.azure.management.compute.implementation.api.OSDisk; +import com.microsoft.azure.management.compute.implementation.api.DiskCreateOptionTypes; +import com.microsoft.azure.management.compute.implementation.api.DataDisk; +import com.microsoft.azure.management.compute.implementation.api.LinuxConfiguration; +import com.microsoft.azure.management.compute.implementation.api.WindowsConfiguration; +import com.microsoft.azure.management.compute.implementation.api.WinRMConfiguration; +import com.microsoft.azure.management.compute.implementation.api.SshConfiguration; +import com.microsoft.azure.management.compute.implementation.api.SshPublicKey; import com.microsoft.azure.management.resources.fluentcore.arm.models.implementation.GroupableResourceImpl; import com.microsoft.azure.management.resources.implementation.ResourceManager; import com.microsoft.azure.management.storage.StorageAccount; @@ -30,23 +56,28 @@ class VirtualMachineImpl VirtualMachine.DefinitionWindowsCreatable, VirtualMachine.DefinitionCreatable, VirtualMachine.ConfigureDataDisk, - VirtualMachine.ConfigureNewDataDiskWithStoreAt, + VirtualMachine.ConfigureNewDataDiskWithStoreAt, VirtualMachine.ConfigureNewDataDisk, VirtualMachine.ConfigureExistingDataDisk { private final VirtualMachinesInner client; private final VirtualMachineInner innerModel; private final ResourceManager resourceManager; private final StorageManager storageManager; + private final AvailabilitySets availabilitySets; private String storageAccountName; + private String availabilitySetName; - VirtualMachineImpl(String name, VirtualMachineInner innerModel, VirtualMachinesInner client, + VirtualMachineImpl(String name, VirtualMachineInner innerModel, + VirtualMachinesInner client, + AvailabilitySets availabilitySets, ResourceManager resourceManager, StorageManager storageManager) { super(name, innerModel, resourceManager.resourceGroups()); this.client = client; this.innerModel = innerModel; this.resourceManager = resourceManager; this.storageManager = storageManager; + this.availabilitySets = availabilitySets; this.innerModel.setStorageProfile(new StorageProfile()); this.innerModel.storageProfile().setOsDisk(new OSDisk()); @@ -398,6 +429,30 @@ public DefinitionCreatable withExistingStorageAccount(String name) { return this; } + // Virtual machine availability set fluent methods + // + + @Override + public DefinitionCreatable withNewAvailabilitySet(String name) { + return withNewAvailabilitySet(availabilitySets.define(name) + .withRegion(region()) + .withExistingGroup(this.resourceGroupName()) + ); + } + + @Override + public DefinitionCreatable withNewAvailabilitySet(AvailabilitySet.DefinitionCreatable creatable) { + this.availabilitySetName = creatable.key(); + this.prerequisites().put(creatable.key(), creatable); + return this; + } + + @Override + public DefinitionCreatable withExistingAvailabilitySet(String name) { + this.availabilitySetName = name; + return this; + } + @Override public VirtualMachine create() throws Exception { setDefaults(); From 987eac1edb16fdc4f29d46abb30ddcba805c552f Mon Sep 17 00:00:00 2001 From: anuchan Date: Mon, 23 May 2016 12:03:59 -0700 Subject: [PATCH 2/3] updating VirtualMachine comments to inline with AvailabilitySet --- .../management/compute/VirtualMachine.java | 48 +++++++++++-------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachine.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachine.java index 9eaf268ad0c45..30e1aa2fafcc7 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachine.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachine.java @@ -26,7 +26,7 @@ import java.util.List; /** - * Client-side representation of an Azure virtual machine. + * An immutable client-side representation of an Azure virtual machine. */ public interface VirtualMachine extends GroupableResource, @@ -110,19 +110,19 @@ public interface VirtualMachine extends List resources(); /** - * The initial stage representing virtual machine definition. + * The first stage of a virtual machine definition. */ interface DefinitionBlank extends GroupableResource.DefinitionWithRegion { } /** - * The virtual machine definition stage with resource group. + * The stage of the virtual machine definition allowing to specify the resource group. */ interface DefinitionWithGroup extends GroupableResource.DefinitionWithGroup { } /** - * The virtual machine definition stage with Operation System. + * The stage of the virtual machine definition allowing to specify the Operation System. */ interface DefinitionWithOS { /** @@ -150,7 +150,7 @@ interface DefinitionWithOS { } /** - * The virtual machine definition stage with marketplace (platform) image. + * The stage of the virtual machine definition allowing to specify marketplace (platform) image. */ interface DefinitionWithMarketplaceImage { /** @@ -181,7 +181,7 @@ interface DefinitionWithMarketplaceImage { } /** - * The virtual machine definition stage with Operating system type. + * The stage of the virtual machine definition allowing to specify Operating system type. */ interface DefinitionWithOSType { /** @@ -200,7 +200,7 @@ interface DefinitionWithOSType { } /** - * The Linux virtual machine definition stage with root user name. + * The stage of the Linux virtual machine definition allowing to specify root user name. */ interface DefinitionWithRootUserName { /** @@ -213,7 +213,7 @@ interface DefinitionWithRootUserName { } /** - * The Windows virtual machine definition stage with root user name. + * The stage of the Windows virtual machine definition allowing to specify administrator user name. */ interface DefinitionWithAdminUserName { /** @@ -226,7 +226,9 @@ interface DefinitionWithAdminUserName { } /** - * The Linux virtual machine in creatable stage. + * The stage of the Linux virtual machine definition which contains all the minimum required inputs for + * the resource to be created (via {@link DefinitionCreatable#create()}), but also allows + * for any other optional settings to be specified. */ interface DefinitionLinuxCreatable extends DefinitionCreatable { /** @@ -241,7 +243,9 @@ interface DefinitionLinuxCreatable extends DefinitionCreatable { } /** - * The Windows virtual machine in cretable stage. + * The stage of the Windows virtual machine definition which contains all the minimum required inputs for + * the resource to be created (via {@link DefinitionCreatable#create()}), but also allows + * for any other optional settings to be specified. */ interface DefinitionWindowsCreatable extends DefinitionCreatable { /** @@ -276,7 +280,7 @@ interface DefinitionWindowsCreatable extends DefinitionCreatable { } /** - * The virtual machine definition stage with password. + * The stage of the virtual machine definition allowing to specify password. * * @param The virtual machine definition in creatable stage. */ @@ -291,7 +295,7 @@ interface DefinitionPassword { } /** - * The virtual machine definition stage with OS disk configurations. + * The stage of the virtual machine definition allowing to specify OS disk configurations. * * @param The virtual machine definition in creatable stage. */ @@ -339,7 +343,7 @@ interface DefinitionOSDiskSettings { } /** - * The virtual machine definition stage with size. + * The stage of the virtual machine definition allowing to specify VM size. * * @param The virtual machine definition in creatable stage. */ @@ -362,7 +366,7 @@ interface DefinitionWithVMSize { } /** - * The virtual machine definition stage with data disk configurations. + * The stage of the virtual machine definition allowing to specify data disk configurations. * * @param The virtual machine definition in creatable stage. */ @@ -392,7 +396,7 @@ interface ConfigureDataDisk { } /** - * The virtual machine definition stage with data disk target location. + * The stage of the virtual machine definition allowing to specify data disk target location. * * @param The virtual machine definition in creatable stage. */ @@ -409,7 +413,7 @@ interface ConfigureNewDataDiskWithStoreAt extends } /** - * The virtual machine definition stage with new data disk configuration. + * The stage of the virtual machine definition allowing to specify new data disk configuration. * * @param The virtual machine definition in creatable stage. */ @@ -424,7 +428,7 @@ interface ConfigureNewDataDisk { } /** - * The virtual machine definition stage with existing data disk configuration. + * The stage of the virtual machine definition allowing to specify existing data disk configuration. * * @param The virtual machine definition in creatable stage. */ @@ -441,7 +445,7 @@ interface ConfigureExistingDataDisk { } /** - * The virtual machine definition stage with data disk configuration. + * The stage of the virtual machine definition allowing to specify data disk configuration. * * @param The virtual machine definition in creatable stage. */ @@ -482,7 +486,7 @@ interface DefinitionWithDataDisk { } /** - * The virtual machine definition stage with availability set. + * The stage of the virtual machine definition allowing to specify availability set. * * @param The virtual machine definition in creatable stage. */ @@ -525,7 +529,7 @@ interface DefinitionWithAvailabilitySet { } /** - * The virtual machine definition stage with storage account. + * The stage of the virtual machine definition allowing to specify storage account. * * @param The virtual machine definition in creatable stage. */ @@ -559,7 +563,9 @@ interface DefinitionStorageAccount { } /** - * The virtual machine definition in creatable stage. + * The stage of the virtual machine definition which contains all the minimum required inputs for + * the resource to be created (via {@link DefinitionCreatable#create()}), but also allows + * for any other optional settings to be specified. */ interface DefinitionCreatable extends DefinitionPassword, From d76b7739bf2a8df6e22adb09cf8b1f5a1d3de387 Mon Sep 17 00:00:00 2001 From: anuchan Date: Mon, 23 May 2016 16:11:32 -0700 Subject: [PATCH 3/3] Adding more javadocs --- .../management/compute/VirtualMachine.java | 254 +++++++++--------- .../compute/VirtualMachineImage.java | 94 +++---- .../compute/VirtualMachineImages.java | 10 +- .../compute/VirtualMachineSize.java | 12 +- .../management/compute/VirtualMachines.java | 14 +- .../implementation/ComputeManager.java | 38 ++- .../ComputeResourceConnector.java | 2 +- 7 files changed, 203 insertions(+), 221 deletions(-) diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachine.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachine.java index 30e1aa2fafcc7..eeca2007d765e 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachine.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachine.java @@ -33,78 +33,82 @@ public interface VirtualMachine extends Refreshable, Wrapper { /** - * Get the plan value. - * * @return the plan value */ Plan plan(); /** - * Get the hardwareProfile value. + * Returns the hardware profile of an Azure virtual machine. + *

+ * Currently the profile contains only virtual machine size information. * * @return the hardwareProfile value */ HardwareProfile hardwareProfile(); /** - * Get the storageProfile value. + * Returns the storage profile of an Azure virtual machine. + *

+ * The storage profile contains information such as the details of the VM image or user image + * from which this virtual machine is created, the Azure storage account where the operating system + * disk is stored, details of the data disk attached to the virtual machine. * * @return the storageProfile value */ StorageProfile storageProfile(); /** - * Get the osProfile value. + * Returns the operating system profile of an Azure virtual machine. * * @return the osProfile value */ OSProfile osProfile(); /** - * Get the networkProfile value. + * Returns the network profile of an Azure virtual machine. + *

+ * The network profile describes the network interfaces associated with the virtual machine. * * @return the networkProfile value */ NetworkProfile networkProfile(); /** - * Get the diagnosticsProfile value. + * Returns the diagnostics profile of an Azure virtual machine. + *

+ * Enabling diagnostic features in a virtual machine enable you to easily diagnose and recover + * virtual machine from boot failures. * * @return the diagnosticsProfile value */ DiagnosticsProfile diagnosticsProfile(); /** - * Get the availabilitySet value. + * Returns reference to the availability set an Azure virtual machine associated with. + *

+ * Having a set of virtual machines in an availability set ensures that during maintenance + * event at least one virtual machine will be available. * - * @return the availabilitySet value + * @return the availabilitySet reference */ SubResource availabilitySet(); /** - * Get the provisioningState value. - * * @return the provisioningState value */ String provisioningState(); /** - * Get the instanceView value. - * * @return the instanceView value */ VirtualMachineInstanceView instanceView(); /** - * Get the licenseType value. - * * @return the licenseType value */ String licenseType(); /** - * Get the resources value. - * * @return the resources value */ List resources(); @@ -128,23 +132,23 @@ interface DefinitionWithOS { /** * Specifies the market-place image used for the virtual machine's OS. * - * @return The next stage of the virtual machine definition + * @return the next stage of the virtual machine definition */ DefinitionWithMarketplaceImage withMarketplaceImage(); /** * Specifies the user (generalized) image used for the virtual machine's OS. * - * @param imageUrl The url the the VHD - * @return The next stage of the virtual machine definition + * @param imageUrl the url the the VHD + * @return the next stage of the virtual machine definition */ DefinitionWithOSType withStoredImage(String imageUrl); /** * Specifies the specialized operating system disk to be attached to the virtual machine. * - * @param osDiskUrl The url to the OS disk in the Azure Storage account - * @return The next stage of the Windows virtual machine definition + * @param osDiskUrl the url to the OS disk in the Azure Storage account + * @return the next stage of the Windows virtual machine definition */ DefinitionCreatable withOSDisk(String osDiskUrl, OperatingSystemTypes osType); } @@ -157,25 +161,25 @@ interface DefinitionWithMarketplaceImage { * Specifies the version of image. * * @param imageReference describes publisher, offer, sku and version of the market-place image - * @return The next stage of the virtual machine definition + * @return the next stage of the virtual machine definition */ DefinitionWithOSType version(ImageReference imageReference); /** * Specifies that the latest version of the image needs to be used. * - * @param publisher Specifies the publisher of the image - * @param offer Specifies the offer of the image - * @param sku Specifies the SKU of the image - * @return The next stage of the virtual machine definition + * @param publisher specifies the publisher of the image + * @param offer specifies the offer of the image + * @param sku specifies the SKU of the image + * @return the next stage of the virtual machine definition */ DefinitionWithOSType latest(String publisher, String offer, String sku); /** * Specifies the known image to be used. * - * @param knownImage Enum value indicating known market-place image - * @return The next stage of the virtual machine definition + * @param knownImage enum value indicating known market-place image + * @return the next stage of the virtual machine definition */ DefinitionWithOSType popular(KnownVirtualMachineImage knownImage); } @@ -187,14 +191,14 @@ interface DefinitionWithOSType { /** * Specifies the OS type of the virtual machine as Linux. * - * @return The next stage of the Linux virtual machine definition + * @return the next stage of the Linux virtual machine definition */ DefinitionWithRootUserName withLinuxOS(); /** * Specifies the OS type as Windows. * - * @return The next stage of the Windows virtual machine definition + * @return the next stage of the Windows virtual machine definition */ DefinitionWithAdminUserName withWindowsOS(); } @@ -206,8 +210,8 @@ interface DefinitionWithRootUserName { /** * Specifies the root user name for the Linux virtual machine. * - * @param rootUserName The Linux root user name. This must follow the required naming convention for Linux user name - * @return The next stage of the Linux virtual machine definition + * @param rootUserName the Linux root user name. This must follow the required naming convention for Linux user name + * @return the next stage of the Linux virtual machine definition */ DefinitionLinuxCreatable withRootUserName(String rootUserName); } @@ -219,8 +223,8 @@ interface DefinitionWithAdminUserName { /** * Specifies the administrator user name for the Windows virtual machine. * - * @param adminUserName The Windows administrator user name. This must follow the required naming convention for Windows user name. - * @return The stage representing creatable Linux VM definition + * @param adminUserName the Windows administrator user name. This must follow the required naming convention for Windows user name. + * @return the stage representing creatable Linux VM definition */ DefinitionWindowsCreatable withAdminUserName(String adminUserName); } @@ -236,8 +240,8 @@ interface DefinitionLinuxCreatable extends DefinitionCreatable { *

* each call to this method adds the given public key to the list of VM's public keys. * - * @param publicKey The SSH public key in PEM format. - * @return The stage representing creatable Linux VM definition + * @param publicKey the SSH public key in PEM format. + * @return the stage representing creatable Linux VM definition */ DefinitionLinuxCreatable withSsh(String publicKey); } @@ -251,30 +255,30 @@ interface DefinitionWindowsCreatable extends DefinitionCreatable { /** * Specifies that VM Agent should not be provisioned. * - * @return The stage representing creatable Windows VM definition + * @return the stage representing creatable Windows VM definition */ DefinitionWindowsCreatable disableVMAgent(); /** * Specifies that automatic updates should be disabled. * - * @return The stage representing creatable Windows VM definition + * @return the stage representing creatable Windows VM definition */ DefinitionWindowsCreatable disableAutoUpdate(); /** * Specifies the time-zone. * - * @return The stage representing creatable Windows VM definition + * @return the stage representing creatable Windows VM definition */ DefinitionWindowsCreatable withTimeZone(String timeZone); /** * Specifies the WINRM listener. *

- * each call to this method adds the given listener to the list of VM's WinRM listeners. + * Each call to this method adds the given listener to the list of VM's WinRM listeners. * - * @return The stage representing creatable Windows VM definition + * @return the stage representing creatable Windows VM definition */ DefinitionWindowsCreatable withWinRM(WinRMListener listener); } @@ -282,14 +286,14 @@ interface DefinitionWindowsCreatable extends DefinitionCreatable { /** * The stage of the virtual machine definition allowing to specify password. * - * @param The virtual machine definition in creatable stage. + * @param the virtual machine definition in creatable stage. */ interface DefinitionPassword { /** * Specifies the password for the virtual machine. * - * @param password The password. This must follow the criteria for Azure VM password. - * @return The stage representing creatable VM definition + * @param password the password. This must follow the criteria for Azure VM password. + * @return the stage representing creatable VM definition */ T withPassword(String password); } @@ -297,47 +301,47 @@ interface DefinitionPassword { /** * The stage of the virtual machine definition allowing to specify OS disk configurations. * - * @param The virtual machine definition in creatable stage. + * @param the virtual machine definition in creatable stage. */ interface DefinitionOSDiskSettings { /** * Specifies the caching type for the Operating System disk. * - * @param cachingType The caching type. - * @return The stage representing creatable VM definition + * @param cachingType the caching type. + * @return the stage representing creatable VM definition */ T withOSDiskCaching(CachingTypes cachingType); /** * Specifies the name of the OS Disk Vhd file and it's parent container. * - * @param containerName The name of the container in the selected storage account. - * @param vhdName The name for the OS Disk vhd. - * @return The stage representing creatable VM definition + * @param containerName the name of the container in the selected storage account. + * @param vhdName the name for the OS Disk vhd. + * @return the stage representing creatable VM definition */ T withOSDiskVhdLocation(String containerName, String vhdName); /** * Specifies the encryption settings for the OS Disk. * - * @param settings The encryption settings. - * @return The stage representing creatable VM definition + * @param settings the encryption settings. + * @return the stage representing creatable VM definition */ T withOSDiskEncryptionSettings(DiskEncryptionSettings settings); /** * Specifies the size of the OSDisk in GB. * - * @param size The VHD size. - * @return The stage representing creatable VM definition + * @param size the VHD size. + * @return the stage representing creatable VM definition */ T withOSDiskSizeInGB(Integer size); /** * Specifies the name for the OS Disk. * - * @param name The OS Disk name. - * @return The stage representing creatable VM definition + * @param name the OS Disk name. + * @return the stage representing creatable VM definition */ T withOSDiskName(String name); } @@ -345,22 +349,22 @@ interface DefinitionOSDiskSettings { /** * The stage of the virtual machine definition allowing to specify VM size. * - * @param The virtual machine definition in creatable stage. + * @param the virtual machine definition in creatable stage. */ interface DefinitionWithVMSize { /** * Specifies the virtual machine size. * - * @param sizeName The name of the size for the virtual machine as text - * @return The stage representing creatable VM definition + * @param sizeName the name of the size for the virtual machine as text + * @return the stage representing creatable VM definition */ T withSize(String sizeName); /** * Specifies the virtual machine size. * - * @param size A size from the list of available sizes for the virtual machine - * @return The stage representing creatable VM definition + * @param size a size from the list of available sizes for the virtual machine + * @return the stage representing creatable VM definition */ T withSize(VirtualMachineSizeTypes size); } @@ -368,29 +372,29 @@ interface DefinitionWithVMSize { /** * The stage of the virtual machine definition allowing to specify data disk configurations. * - * @param The virtual machine definition in creatable stage. + * @param the virtual machine definition in creatable stage. */ interface ConfigureDataDisk { /** * Specifies the logical unit number for the data disk. * - * @param lun The logical unit number - * @return The stage representing optional additional configurations for the attachable data disk + * @param lun the logical unit number + * @return the stage representing optional additional configurations for the attachable data disk */ ConfigureDataDisk withLun(Integer lun); /** * Specifies the caching type for the data disk. * - * @param cachingType The disk caching type. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - * @return The stage representing optional additional configurations for the attachable data disk + * @param cachingType the disk caching type. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * @return the stage representing optional additional configurations for the attachable data disk */ ConfigureDataDisk withCaching(CachingTypes cachingType); /** * Adds the data disk to the list of virtual machine's data disks. * - * @return The stage representing creatable VM definition + * @return the stage representing creatable VM definition */ T attach(); } @@ -398,16 +402,16 @@ interface ConfigureDataDisk { /** * The stage of the virtual machine definition allowing to specify data disk target location. * - * @param The virtual machine definition in creatable stage. + * @param the virtual machine definition in creatable stage. */ interface ConfigureNewDataDiskWithStoreAt extends ConfigureDataDisk { /** * Specifies where the VHD associated with the new blank data disk needs to be stored. * - * @param storageAccountName The storage account name - * @param containerName The name of the container to hold the new VHD file - * @param vhdName The name for the new VHD file - * @return The stage representing optional additional configurations for the attachable data disk + * @param storageAccountName the storage account name + * @param containerName the name of the container to hold the new VHD file + * @param vhdName the name for the new VHD file + * @return the stage representing optional additional configurations for the attachable data disk */ ConfigureDataDisk storeAt(String storageAccountName, String containerName, String vhdName); } @@ -415,14 +419,14 @@ interface ConfigureNewDataDiskWithStoreAt extends /** * The stage of the virtual machine definition allowing to specify new data disk configuration. * - * @param The virtual machine definition in creatable stage. + * @param the virtual machine definition in creatable stage. */ interface ConfigureNewDataDisk { /** * Specifies the initial disk size in GB for new blank data disk. * - * @param size The disk size in GB - * @return The stage representing optional additional configurations for the attachable data disk + * @param size the disk size in GB + * @return the stage representing optional additional configurations for the attachable data disk */ ConfigureNewDataDiskWithStoreAt withSizeInGB(Integer size); } @@ -430,16 +434,16 @@ interface ConfigureNewDataDisk { /** * The stage of the virtual machine definition allowing to specify existing data disk configuration. * - * @param The virtual machine definition in creatable stage. + * @param the virtual machine definition in creatable stage. */ interface ConfigureExistingDataDisk { /** * Specifies an existing VHD that needs to be attached to the virtual machine as data disk. * - * @param storageAccountName The storage account name - * @param containerName The name of the container holding the VHD file - * @param vhdName The name for the VHD file - * @return The stage representing optional additional configurations for the attachable data disk + * @param storageAccountName the storage account name + * @param containerName the name of the container holding the VHD file + * @param vhdName the name for the VHD file + * @return the stage representing optional additional configurations for the attachable data disk */ ConfigureDataDisk from(String storageAccountName, String containerName, String vhdName); } @@ -447,40 +451,41 @@ interface ConfigureExistingDataDisk { /** * The stage of the virtual machine definition allowing to specify data disk configuration. * - * @param The virtual machine definition in creatable stage. + * @param the virtual machine definition in creatable stage. */ interface DefinitionWithDataDisk { /** * Specifies that a new blank data disk needs to be attached to virtual machine. * - * @param sizeInGB The disk size in GB - * @return The stage representing creatable VM definition + * @param sizeInGB the disk size in GB + * @return the stage representing creatable VM definition */ T withNewDataDisk(Integer sizeInGB); /** * Specifies an existing VHD that needs to be attached to the virtual machine as data disk. * - * @param storageAccountName The storage account name - * @param containerName The name of the container holding the VHD file - * @param vhdName The name for the VHD file - * @return The stage representing creatable VM definition + * @param storageAccountName the storage account name + * @param containerName the name of the container holding the VHD file + * @param vhdName the name for the VHD file + * @return the stage representing creatable VM definition */ T withExistingDataDisk(String storageAccountName, String containerName, String vhdName); /** * Specifies a new blank data disk to be attached to the virtual machine along with it's configuration. * - * @param name The name for the data disk - * @return The stage representing configuration for the data disk + * @param name the name for the data disk + * @return the stage representing configuration for the data disk */ ConfigureNewDataDisk defineNewDataDisk(String name); /** - * Specifies an existing VHD that needs to be attached to the virtual machine as data disk along with it's configuration. + * Specifies an existing VHD that needs to be attached to the virtual machine as data disk along with + * it's configuration. * - * @param name The name for the data disk - * @return The stage representing configuration for the data disk + * @param name the name for the data disk + * @return the stage representing configuration for the data disk */ ConfigureExistingDataDisk defineExistingDataDisk(String name); } @@ -488,42 +493,40 @@ interface DefinitionWithDataDisk { /** * The stage of the virtual machine definition allowing to specify availability set. * - * @param The virtual machine definition in creatable stage. + * @param the virtual machine definition in creatable stage. */ interface DefinitionWithAvailabilitySet { /** - * Specifies the name of the availability set to create, the virtual machine will be part of - * this availability set. - *

+ * Specifies the name of a new availability set to associate the virtual machine with. + *

* Adding virtual machines running your application to an availability set ensures that during * maintenance event at least one virtual machine will be available. * - * @param name The name of the availability set - * @return The stage representing creatable VM definition + * @param name the name of the availability set + * @return the stage representing creatable VM definition */ T withNewAvailabilitySet(String name); /** - * Specifies an instance of AvailabilitySet.DefinitionCreatable representing the availability set - * to be created, the virtual machine will be part of this availability set. - *

+ * Specifies definition of a not-yet-created {@link AvailabilitySet.DefinitionCreatable} availability set + * to associate the virtual machine with. + *

* Adding virtual machines running your application to an availability set ensures that during * maintenance event at least one virtual machine will be available. * - * @param creatable The availability set in creatable stage - * @return The stage representing creatable VM definition + * @param creatable the availability set in creatable stage + * @return the stage representing creatable VM definition */ T withNewAvailabilitySet(AvailabilitySet.DefinitionCreatable creatable); /** - * Specifies the name of an existing availability set under which this virtual machine needs to be - * added. - *

+ * Specifies the name of an existing availability set to to associate the virtual machine with. + *

* Adding virtual machines running your application to an availability set ensures that during * maintenance event at least one virtual machine will be available. * - * @param name The name of an existing availability set - * @return The stage representing creatable VM definition + * @param name the name of an existing availability set + * @return the stage representing creatable VM definition */ T withExistingAvailabilitySet(String name); } @@ -531,33 +534,40 @@ interface DefinitionWithAvailabilitySet { /** * The stage of the virtual machine definition allowing to specify storage account. * - * @param The virtual machine definition in creatable stage. + * @param the virtual machine definition in creatable stage. */ interface DefinitionStorageAccount { /** - * Specifies the name of the storage account to create, the OS disk for VM created from a market-place - * image will be stored in this account. + * Specifies the name of a new storage account to put the VM's OS disk VHD in. + *

+ * Only the OS disk based on marketplace image will be stored in the new storage account, + * an OS disk based on user image will be stored in the same storage account as user image. * - * @param name The name of the storage account - * @return The stage representing creatable VM definition + * @param name the name of the storage account + * @return the stage representing creatable VM definition */ T withNewStorageAccount(String name); /** - * Specifies an instance of StorageAccount.DefinitionCreatable representing the storage account to be - * created, the OS disk for VM created from a market-place image will be stored in this account. + * Specifies definition of a not-yet-created {@link StorageAccount.DefinitionCreatable} storage account + * to put the VM's OS disk VHD in. + *

+ * Only the OS disk based on marketplace image will be stored in the new storage account, + * an OS disk based on user image will be stored in the same storage account as user image. * - * @param creatable The storage account in creatable stage - * @return The stage representing creatable VM definition + * @param creatable the storage account in creatable stage + * @return the stage representing creatable VM definition */ T withNewStorageAccount(StorageAccount.DefinitionCreatable creatable); /** - * Specifies the name of an existing storage account where the OS disk for VM created from market-place - * or user image (generalized image) needs be stored. + * Specifies the name of an existing storage account to put the VM's OS disk in. + *

+ * An OS disk based on marketplace or user image (generalized image) will be stored in this + * storage account. * - * @param name The name of an existing storage account - * @return The stage representing creatable VM definition + * @param name the name of an existing storage account + * @return the stage representing creatable VM definition */ T withExistingStorageAccount(String name); } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineImage.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineImage.java index d2e0363ee9f1e..2b5936b6c97a6 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineImage.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineImage.java @@ -13,70 +13,52 @@ import java.util.List; /** - * The type representing Azure virtual machine image. + * An immutable client-side representation of an Azure virtual machine image. */ public interface VirtualMachineImage extends Wrapper { /** - * The region in which virtual machine image is available. - * - * @return The region + * @return the region in which virtual machine image is available */ Region location(); /** - * The publisher name of the virtual machine image. - * - * @return The publisher name + * @return the publisher name of the virtual machine image */ String publisher(); /** - * The name of the virtual machine image offer. - * - * @return The offer name + * @return the name of the virtual machine image offer */ String offer(); /** - * The commercial name of the virtual machine image (SKU). - * - * @return The SKU name + * @return the commercial name of the virtual machine image (SKU) */ String sku(); /** - * The version of the virtual machine image. - * - * @return The version + * @return the version of the virtual machine image */ String version(); /** - * The image reference representing publisher, offer, sku and version of the virtual machine image. - * - * @return The image reference + * @return The image reference representing publisher, offer, sku and version of the virtual machine image */ ImageReference imageReference(); /** - * The purchase plan for the virtual machine image. - * - * @return The purchase plan. + * @return the purchase plan for the virtual machine image. */ PurchasePlan plan(); /** - * Describes the OS Disk image in the virtual machine image. - * - * @return The OS Disk image + * @return description of the OS Disk image in the virtual machine image. */ OSDiskImage osDiskImage(); /** - * Describes the Data disk images in the virtual machine. - * - * @return The data disks. + * @return description of the Data disk images in the virtual machine. */ List dataDiskImages(); @@ -85,16 +67,12 @@ public interface VirtualMachineImage extends */ interface Publisher { /** - * Gets the region where virtual machine images from this publisher is available. - * - * @return The region name + * @return the region where virtual machine images from this publisher is available */ Region region(); /** - * Gets the name of the virtual machine image publisher. - * - * @return The publisher name + * @return the name of the virtual machine image publisher */ String publisher(); @@ -102,8 +80,8 @@ interface Publisher { * Lists the virtual machine image offers from this publisher in the specific region. * * @return list of virtual machine image offers - * @throws CloudException - * @throws IOException + * @throws CloudException thrown for an invalid response from the service + * @throws IOException thrown for IO exception */ List listOffers() throws CloudException, IOException; } @@ -113,25 +91,27 @@ interface Publisher { */ interface Offer { /** - * Gets the region where this virtual machine image offer is available. - * - * @return The region name + * @return the region where this virtual machine image offer is available */ Region region(); /** - * Gets the publisher name of this virtual machine image offer. - * - * @return The publisher name + * @return the publisher name of this virtual machine image offer */ String publisher(); /** - * Gets the name of the virtual machine image offer. - * - * @return The offer name + * @return the name of the virtual machine image offer */ String offer(); + + /** + * Lists the virtual machine image SKUs in this offer. + * + * @return the virtual machine image SKUs + * @throws CloudException thrown for an invalid response from the service + * @throws IOException thrown for IO exception + */ List listSkus() throws CloudException, IOException; } @@ -140,32 +120,32 @@ interface Offer { */ interface Sku { /** - * Gets the region where this virtual machine image offer SKU is available. - * - * @return The region name + * @return the region where this virtual machine image offer SKU is available */ Region region(); /** - * Gets the publisher name of this virtual machine image offer SKU. - * - * @return The publisher name + * @return the publisher name of this virtual machine image offer SKU */ String publisher(); /** - * Gets the virtual machine offer name that this SKU belongs to. - * - * @return The offer name + * @return the virtual machine offer name that this SKU belongs to */ String offer(); /** - * Gets the commercial name of the virtual machine image (SKU). - * - * @return The SKU name + * @return the commercial name of the virtual machine image (SKU) */ String sku(); + + /** + * Lists the virtual machines in this SKU. + * + * @return the virtual machine images + * @throws CloudException thrown for an invalid response from the service + * @throws IOException thrown for IO exception + */ List listImages() throws CloudException, IOException; } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineImages.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineImages.java index 59cffaa8a1a19..c344406a3081a 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineImages.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineImages.java @@ -8,17 +8,17 @@ import java.util.List; /** - * The type representing Azure virtual machine image collection. + * Entry point to virtual machine image management API. */ public interface VirtualMachineImages extends SupportsListingByLocation { /** * Lists the virtual machine publishers in a region. * - * @param region The region - * @return The list of VM image publishers - * @throws CloudException Thrown for an invalid response from the service. - * @throws IOException Thrown for IO exception. + * @param region the region + * @return the list of VM image publishers + * @throws CloudException thrown for an invalid response from the service + * @throws IOException thrown for IO exception */ List listPublishers(final Region region) throws CloudException, IOException; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineSize.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineSize.java index b8a7aacbb797f..0f077445b19e1 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineSize.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineSize.java @@ -5,32 +5,32 @@ */ public interface VirtualMachineSize { /** - * Gets the VM size name. + * @return the VM size name */ String name(); /** - * Gets the Number of cores supported by a VM size. + * @return the Number of cores supported by a VM size */ Integer numberOfCores(); /** - * Gets the OS disk size allowed by a VM size. + * @return the OS disk size allowed by a VM size */ Integer osDiskSizeInMB(); /** - * Gets Resource disk size allowed by a VM size. + * @return Resource disk size allowed by a VM size */ Integer resourceDiskSizeInMB(); /** - * Gets the Memory size supported by a VM size. + * @return the Memory size supported by a VM size */ Integer memoryInMB(); /** - * Gets the Maximum number of data disks allowed by a VM size. + * @return the Maximum number of data disks allowed by a VM size */ Integer maxDataDiskCount(); } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachines.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachines.java index a15df71b8f3db..11b55d9b9ca09 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachines.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachines.java @@ -12,7 +12,7 @@ import java.io.IOException; /** - * Type represents Azure virtual machine collection. + * Entry point to virtual machine management API. */ public interface VirtualMachines extends SupportsListing, @@ -26,13 +26,13 @@ public interface VirtualMachines extends * * @param region The region upon which virtual-machine-sizes is queried. * @return the List<VirtualMachineSize> if successful. - * @throws CloudException Thrown for an invalid response from the service. - * @throws IOException Thrown for IO exception. + * @throws CloudException thrown for an invalid response from the service. + * @throws IOException thrown for IO exception. */ PagedList listSizes(String region) throws CloudException, IOException; /** - * A type representing Azure virtual machine under a resource group. + * Entry point to virtual machine management API within a specific resource group. */ interface InGroup extends SupportsListing, @@ -41,10 +41,10 @@ interface InGroup extends /** * Lists all available virtual machine sizes in a region. * - * @param region The region upon which virtual-machine-sizes is queried. + * @param region the region upon which virtual-machine-sizes is queried. * @return the List<VirtualMachineSize> if successful. - * @throws CloudException - * @throws IOException + * @throws CloudException thrown for an invalid response from the service. + * @throws IOException thrown for IO exception. */ PagedList listSizes(String region) throws CloudException, IOException; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManager.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManager.java index 7482406368d0e..058234c797035 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManager.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManager.java @@ -11,7 +11,7 @@ import com.microsoft.rest.credentials.ServiceClientCredentials; /** - * A type that exposes Azure Compute service resource collections. + * Entry point to Azure compute resource management. */ public final class ComputeManager { // The service managers @@ -32,11 +32,11 @@ public static Configurable configure() { } /** - * Creates an instance of ComputeManager that exposes Azure Compute service resource collections. + * Creates an instance of ComputeManager that exposes Compute resource management API entry points. * - * @param credentials The credentials to use - * @param subscriptionId The subscription - * @return The ComputeManager + * @param credentials the credentials to use + * @param subscriptionId the subscription + * @return the ComputeManager */ public static ComputeManager authenticate(ServiceClientCredentials credentials, String subscriptionId) { return new ComputeManager(AzureEnvironment.AZURE.newRestClientBuilder() @@ -45,11 +45,11 @@ public static ComputeManager authenticate(ServiceClientCredentials credentials, } /** - * Creates an instance of ComputeManager that exposes Azure Compute service resource collections. + * Creates an instance of ComputeManager that exposes Compute resource management API entry points. * - * @param restClient The RestClient to be used for API calls. - * @param subscriptionId The subscription - * @return The ComputeManager + * @param restClient the RestClient to be used for API calls. + * @param subscriptionId the subscription + * @return the ComputeManager */ public static ComputeManager authenticate(RestClient restClient, String subscriptionId) { return new ComputeManager(restClient, subscriptionId); @@ -57,11 +57,11 @@ public static ComputeManager authenticate(RestClient restClient, String subscrip public interface Configurable extends AzureConfigurable { /** - * Creates an instance of ComputeManager that exposes Azure Compute service resource collections. + * Creates an instance of ComputeManager that exposes Compute resource management API entry points. * - * @param credentials The credentials to use - * @param subscriptionId The subscription - * @return The ComputeManager + * @param credentials the credentials to use + * @param subscriptionId the subscription + * @return the ComputeManager */ ComputeManager authenticate(ServiceClientCredentials credentials, String subscriptionId); } @@ -83,11 +83,7 @@ private ComputeManager() { } /** - * Get Azure availability set collection. - *

- * The collection supports performing CRUD operations on Azure availability sets - * - * @return The availability set collection + * @return the availability set resource management API entry point */ public AvailabilitySets availabilitySets() { if (availabilitySets == null) { @@ -98,11 +94,7 @@ public AvailabilitySets availabilitySets() { } /** - * Get Azure virtual machine collection. - *

- * The collection supports performing CRUD operations on Azure virtual machines - * - * @return The virtual machine collection + * @return the virtual machine resource management API entry point */ public VirtualMachines virtualMachines() { if (virtualMachines == null) { diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeResourceConnector.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeResourceConnector.java index e01bca66ce157..440b3e5d982bb 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeResourceConnector.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeResourceConnector.java @@ -42,7 +42,7 @@ public AvailabilitySets.InGroup availabilitySets() { } /** - * Get Azure virtual machine collection in the reosurce gorup. + * Get Azure virtual machine collection in the resource group. *

* The collection supports performing CRUD operations on Azure virtual machines *