Skip to content

Commit

Permalink
Merge pull request #1071 from anuchandy/vmss-fluent2
Browse files Browse the repository at this point in the history
merging since code review has been addressed. there are just some naming corrections (Backend not BackEnd) which we can followup up with aftet the merge, but the javadoc scrub will need to happen as a more focused effort.
  • Loading branch information
Martin Sawicki authored Sep 21, 2016
2 parents 80e2202 + 357b8bb commit 0b98bc5
Show file tree
Hide file tree
Showing 16 changed files with 4,055 additions and 2 deletions.
6 changes: 6 additions & 0 deletions azure-mgmt-compute/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@
<artifactId>api-annotations</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>0.1.53</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.microsoft.azure.management.compute;

import com.microsoft.azure.management.apigeneration.LangDefinition;

/**
* A type representing sku available for virtual machines in a scale set.
*/
@LangDefinition(ContainerName = "~/")
public interface VirtualMachineScaleSetSku {
/**
* @return the type of resource the sku applies to.
*/
String resourceType();

/**
* @return the Sku type.
*/
VirtualMachineScaleSetSkuTypes skuType();

/**
* @return available scaling information.
*/
VirtualMachineScaleSetSkuCapacity capacity();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,247 @@
package com.microsoft.azure.management.compute;

import com.microsoft.azure.management.apigeneration.LangDefinition;

/**
* Scale set virtual machine sku types.
*/
@LangDefinition
public class VirtualMachineScaleSetSkuTypes {
/** Static value Standard_A0 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_A0 = new VirtualMachineScaleSetSkuTypes("Standard_A0", "Standard");

/** Static value Standard_A1 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_A1 = new VirtualMachineScaleSetSkuTypes("Standard_A1", "Standard");

/** Static value Standard_A2 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_A2 = new VirtualMachineScaleSetSkuTypes("Standard_A2", "Standard");

/** Static value Standard_A3 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_A3 = new VirtualMachineScaleSetSkuTypes("Standard_A3", "Standard");

/** Static value Standard_A4 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_A4 = new VirtualMachineScaleSetSkuTypes("Standard_A4", "Standard");

/** Static value Standard_A5 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_A5 = new VirtualMachineScaleSetSkuTypes("Standard_A5", "Standard");

/** Static value Standard_A6 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_A6 = new VirtualMachineScaleSetSkuTypes("Standard_A6", "Standard");

/** Static value Standard_A7 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_A7 = new VirtualMachineScaleSetSkuTypes("Standard_A7", "Standard");

/** Static value Standard_A8 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_A8 = new VirtualMachineScaleSetSkuTypes("Standard_A8", "Standard");

/** Static value Standard_A9 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_A9 = new VirtualMachineScaleSetSkuTypes("Standard_A9", "Standard");

/** Static value Standard_A10 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_A10 = new VirtualMachineScaleSetSkuTypes("Standard_A10", "Standard");

/** Static value Standard_A11 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_A11 = new VirtualMachineScaleSetSkuTypes("Standard_A11", "Standard");

/** Static value Standard_D1 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_D1 = new VirtualMachineScaleSetSkuTypes("Standard_D1", "Standard");

/** Static value Standard_D2 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_D2 = new VirtualMachineScaleSetSkuTypes("Standard_D2", "Standard");

/** Static value Standard_D3 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_D3 = new VirtualMachineScaleSetSkuTypes("Standard_D3", "Standard");

/** Static value Standard_D4 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_D4 = new VirtualMachineScaleSetSkuTypes("Standard_D4", "Standard");

/** Static value Standard_D11 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_D11 = new VirtualMachineScaleSetSkuTypes("Standard_D11", "Standard");

/** Static value Standard_D12 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_D12 = new VirtualMachineScaleSetSkuTypes("Standard_D12", "Standard");

/** Static value Standard_D13 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_D13 = new VirtualMachineScaleSetSkuTypes("Standard_D13", "Standard");

/** Static value Standard_D14 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_D14 = new VirtualMachineScaleSetSkuTypes("Standard_D14", "Standard");

/** Static value Standard_D1_v2 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_D1_V2 = new VirtualMachineScaleSetSkuTypes("Standard_D1_v2", "Standard");

/** Static value Standard_D2_v2 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_D2_V2 = new VirtualMachineScaleSetSkuTypes("Standard_D2_v2", "Standard");

/** Static value Standard_D3_v2 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_D3_V2 = new VirtualMachineScaleSetSkuTypes("Standard_D3_v2", "Standard");

/** Static value Standard_D4_v2 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_D4_V2 = new VirtualMachineScaleSetSkuTypes("Standard_D4_v2", "Standard");

/** Static value Standard_D5_v2 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_D5_V2 = new VirtualMachineScaleSetSkuTypes("Standard_D5_v2", "Standard");

/** Static value Standard_D11_v2 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_D11_V2 = new VirtualMachineScaleSetSkuTypes("Standard_D11_v2", "Standard");

/** Static value Standard_D12_v2 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_D12_V2 = new VirtualMachineScaleSetSkuTypes("Standard_D12_v2", "Standard");

/** Static value Standard_D13_v2 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_D13_V2 = new VirtualMachineScaleSetSkuTypes("Standard_D13_v2", "Standard");

/** Static value Standard_D14_v2 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_D14_V2 = new VirtualMachineScaleSetSkuTypes("Standard_D14_v2", "Standard");

/** Static value Standard_D15_v2 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_D15_V2 = new VirtualMachineScaleSetSkuTypes("Standard_D15_v2", "Standard");

/** Static value Standard_DS1 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_DS1 = new VirtualMachineScaleSetSkuTypes("Standard_DS1", "Standard");

/** Static value Standard_DS2 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_DS2 = new VirtualMachineScaleSetSkuTypes("Standard_DS2", "Standard");

/** Static value Standard_DS3 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_DS3 = new VirtualMachineScaleSetSkuTypes("Standard_DS3", "Standard");

/** Static value Standard_DS4 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_DS4 = new VirtualMachineScaleSetSkuTypes("Standard_DS4", "Standard");

/** Static value Standard_DS11 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_DS11 = new VirtualMachineScaleSetSkuTypes("Standard_DS11", "Standard");

/** Static value Standard_DS12 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_DS12 = new VirtualMachineScaleSetSkuTypes("Standard_DS12", "Standard");

/** Static value Standard_DS13 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_DS13 = new VirtualMachineScaleSetSkuTypes("Standard_DS13", "Standard");

/** Static value Standard_DS14 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_DS14 = new VirtualMachineScaleSetSkuTypes("Standard_DS14", "Standard");

/** Static value Standard_DS1_v2 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_DS1_V2 = new VirtualMachineScaleSetSkuTypes("Standard_DS1_v2", "Standard");

/** Static value Standard_DS2_v2 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_DS2_V2 = new VirtualMachineScaleSetSkuTypes("Standard_DS2_v2", "Standard");

/** Static value Standard_DS3_v2 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_DS3_V2 = new VirtualMachineScaleSetSkuTypes("Standard_DS3_v2", "Standard");

/** Static value Standard_DS4_v2 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_DS4_V2 = new VirtualMachineScaleSetSkuTypes("Standard_DS4_v2", "Standard");

/** Static value Standard_DS5_v2 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_DS5_V2 = new VirtualMachineScaleSetSkuTypes("Standard_DS5_v2", "Standard");

/** Static value Standard_DS11_v2 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_DS11_V2 = new VirtualMachineScaleSetSkuTypes("Standard_DS11_v2", "Standard");

/** Static value Standard_DS12_v2 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_DS12_V2 = new VirtualMachineScaleSetSkuTypes("Standard_DS12_v2", "Standard");

/** Static value Standard_DS13_v2 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_DS13_V2 = new VirtualMachineScaleSetSkuTypes("Standard_DS13_v2", "Standard");

/** Static value Standard_DS14_v2 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_DS14_V2 = new VirtualMachineScaleSetSkuTypes("Standard_DS14_v2", "Standard");

/** Static value Standard_DS15_v2 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_DS15_V2 = new VirtualMachineScaleSetSkuTypes("Standard_DS15_v2", "Standard");

/** Static value STANDARD_F1S for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_F1S = new VirtualMachineScaleSetSkuTypes("STANDARD_F1S", "Standard");

/** Static value STANDARD_F2S for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_F2S = new VirtualMachineScaleSetSkuTypes("STANDARD_F2S", "Standard");

/** Static value STANDARD_F4S for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_F4S = new VirtualMachineScaleSetSkuTypes("STANDARD_F4S", "Standard");

/** Static value STANDARD_F8S for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_F8S = new VirtualMachineScaleSetSkuTypes("STANDARD_F8S", "Standard");

/** Static value STANDARD_F16S for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_F16S = new VirtualMachineScaleSetSkuTypes("STANDARD_F16S", "Standard");

/** Static value STANDARD_F1 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_F1 = new VirtualMachineScaleSetSkuTypes("STANDARD_F1", "Standard");

/** Static value STANDARD_F2 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_F2 = new VirtualMachineScaleSetSkuTypes("STANDARD_F2", "Standard");

/** Static value STANDARD_F4 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_F4 = new VirtualMachineScaleSetSkuTypes("STANDARD_F4", "Standard");

/** Static value STANDARD_F8 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_F8 = new VirtualMachineScaleSetSkuTypes("STANDARD_F8", "Standard");

/** Static value STANDARD_F16 for VirtualMachineScaleSetSkuTypes. */
public static final VirtualMachineScaleSetSkuTypes STANDARD_F16 = new VirtualMachineScaleSetSkuTypes("STANDARD_F16", "Standard");

/**
* the sku corresponding to this size.
*/
private Sku sku;

/**
* The string value of the sku.
*/
private String value;
/**
* Creates a custom value for VirtualMachineSizeTypes.
* @param skuName the sku name
* @param skuTier thr sku tier
*/
public VirtualMachineScaleSetSkuTypes(String skuName, String skuTier) {
this(new Sku().withName(skuName).withTier(skuTier));
}

/**
* Creates a custom value for VirtualMachineSizeTypes.
* @param sku the sku
*/
public VirtualMachineScaleSetSkuTypes(Sku sku) {
this.sku = sku;
this.value = this.sku.name();
if (this.sku.tier() != null) {
this.value = this.value + "_" + this.sku.tier();
}
}

/**
* @return the sku
*/
public Sku sku() {
return this.sku;
}

@Override
public String toString() {
return this.value;
}

@Override
public int hashCode() {
return this.value.hashCode();
}

@Override
public boolean equals(Object obj) {
String value = this.toString();
if (!(obj instanceof VirtualMachineScaleSetSkuTypes)) {
return false;
}
if (obj == this) {
return true;
}
VirtualMachineScaleSetSkuTypes rhs = (VirtualMachineScaleSetSkuTypes) obj;
if (value == null) {
return rhs.value == null;
} else {
return value.equals(rhs.value);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
package com.microsoft.azure.management.compute;

import com.microsoft.azure.CloudException;
import com.microsoft.azure.management.apigeneration.LangDefinition;
import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsDeletingByGroup;
import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingByGroup;
import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingById;
import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsListingByGroup;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsBatchCreation;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsCreating;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeleting;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing;

import java.io.IOException;

/**
* Entry point to virtual machine scale set management API.
*/
@LangDefinition(ContainerName = "~/")
public interface VirtualMachineScaleSets extends
SupportsListing<VirtualMachineScaleSet>,
SupportsListingByGroup<VirtualMachineScaleSet>,
SupportsGettingByGroup<VirtualMachineScaleSet>,
SupportsGettingById<VirtualMachineScaleSet>,
SupportsCreating<VirtualMachineScaleSet.DefinitionStages.Blank>,
SupportsDeleting,
SupportsDeletingByGroup,
SupportsBatchCreation<VirtualMachineScaleSet> {
/**
* Shuts down the Virtual Machine in the scale set and releases the compute resources.
* <p>
* You are not billed for the compute resources that the Virtual Machines uses
*
* @param groupName the name of the resource group the virtual machine scale set is in
* @param name the name of the virtual machine scale set
* @throws CloudException thrown for an invalid response from the service.
* @throws IOException exception thrown from serialization/deserialization
* @throws InterruptedException exception thrown when the operation is interrupted
*/
void deallocate(String groupName, String name) throws CloudException, IOException, InterruptedException;

/**
* Power off (stop) the virtual machines in the scale set.
* <p>
* You will be billed for the compute resources that the Virtual Machines uses.
*
* @param groupName the name of the resource group the virtual machine scale set is in
* @param name the name of the virtual machine scale set
* @throws CloudException thrown for an invalid response from the service.
* @throws IOException exception thrown from serialization/deserialization
* @throws InterruptedException exception thrown when the operation is interrupted
*/
void powerOff(String groupName, String name) throws CloudException, IOException, InterruptedException;

/**
* Restart the virtual machines in the scale set.
*
* @param groupName the name of the resource group the virtual machine scale set is in
* @param name the name of the virtual machine scale set
* @throws CloudException thrown for an invalid response from the service.
* @throws IOException exception thrown from serialization/deserialization
* @throws InterruptedException exception thrown when the operation is interrupted
*/
void restart(String groupName, String name) throws CloudException, IOException, InterruptedException;

/**
* Start the virtual machines in the scale set.
*
* @param groupName the name of the resource group the virtual machine scale set is in
* @param name the name of the virtual machine scale set
* @throws CloudException thrown for an invalid response from the service.
* @throws IOException exception thrown from serialization/deserialization
* @throws InterruptedException exception thrown when the operation is interrupted
*/
void start(String groupName, String name) throws CloudException, IOException, InterruptedException;

/**
* Re-image (update the version of the installed operating system) the virtual machines in the scale set.
*
* @param groupName the name of the resource group the virtual machine scale set is in
* @param name the name of the virtual machine scale set
* @throws CloudException thrown for an invalid response from the service.
* @throws IOException exception thrown from serialization/deserialization
* @throws InterruptedException exception thrown when the operation is interrupted
*/
void reimage(String groupName, String name) throws CloudException, IOException, InterruptedException;
}
Loading

0 comments on commit 0b98bc5

Please sign in to comment.