Skip to content

Commit

Permalink
Merge pull request #2 from Azure/master
Browse files Browse the repository at this point in the history
Merge 'master' into 'jianghaolu:master'
  • Loading branch information
jianghaolu committed May 23, 2016
2 parents 0e9cb37 + e0d20b2 commit 2b1ec82
Show file tree
Hide file tree
Showing 55 changed files with 2,221 additions and 464 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,66 +3,113 @@
import com.microsoft.azure.management.compute.implementation.api.AvailabilitySetInner;
import com.microsoft.azure.management.compute.implementation.api.InstanceViewStatus;
import com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource;
import com.microsoft.azure.management.resources.fluentcore.arm.models.Resource;
import com.microsoft.azure.management.resources.fluentcore.model.Appliable;
import com.microsoft.azure.management.resources.fluentcore.model.Creatable;
import com.microsoft.azure.management.resources.fluentcore.model.Refreshable;
import com.microsoft.azure.management.resources.fluentcore.model.Updatable;
import com.microsoft.azure.management.resources.fluentcore.model.Wrapper;

import java.util.List;

/**
* An immutable client-side representation of an Azure availability set.
*/
public interface AvailabilitySet extends
GroupableResource,
Refreshable<AvailabilitySet>,
Wrapper<AvailabilitySetInner> {
Wrapper<AvailabilitySetInner>,
Updatable<AvailabilitySet.Update> {

/**
* Get the update domain count of availability set, an update domain represents the group of virtual
* Returns the update domain count of an availability set.
* <p>
* An update domain represents the group of virtual
* machines and underlying physical hardware that can be rebooted at the same time.
*
* @return the platformUpdateDomainCount value
* @return the update domain count
*/
Integer updateDomainCount();
int updateDomainCount();

/**
* Get the fault domain count of availability set., a fault domain represents the group of virtual
* Returns the fault domain count of availability set.
* <p>
* A fault domain represents the group of virtual
* machines that shares common power source and network switch.
*
* @return the platformUpdateDomainCount value
* @return the fault domain count
*/
Integer FaultDomainCount();
int faultDomainCount();

/**
* Get the list of ids of virtual machines in the availability set.
* Lists the resource IDs of the virtual machines in the availability set.
*
* @return the virtualMachineIds value
* @return list of resource ID strings
*/
List<String> virtualMachineIds();

/**
* Get the list of virtual machines in the availability set.
* Lists the virtual machines in the availability set.
*
* @return the virtualMachineIds value
* @return list of virtual machines
*/
List<VirtualMachine> virtualMachines() throws Exception;

/**
* Get the statuses value.
* Lists the statuses of the existing virtual machines in the availability set.
*
* @return the statuses value
* @return list of virtual machine statuses
*/
List<InstanceViewStatus> statuses();


/**************************************************************
* Fluent interfaces to provision an AvailabilitySet
**************************************************************/

/**
* The first stage of an availability set definition
*/
interface DefinitionBlank extends GroupableResource.DefinitionWithRegion<DefinitionWithGroup> {
}

/**
* The stage of the availability set definition allowing to specify the resource group
*/
interface DefinitionWithGroup extends GroupableResource.DefinitionWithGroup<DefinitionCreatable> {
}

interface DefinitionCreatable extends Creatable<AvailabilitySet> {
DefinitionCreatable withUpdateDomainCount(Integer updateDomainCount);
DefinitionCreatable withFaultDomainCount(Integer faultDomainCount);
/**
* The stage of an availability set 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
Creatable<AvailabilitySet>,
Resource.DefinitionWithTags<DefinitionCreatable> {
/**
* Specifies the update domain count for the availability set.
* @param updateDomainCount update domain count
* @return the next stage of the resource definition
*/
DefinitionCreatable withUpdateDomainCount(int updateDomainCount);

/**
* Specifies the fault domain count for the availability set.
* @param faultDomainCount fault domain count
* @return the next stage of the resource definition
*/
DefinitionCreatable withFaultDomainCount(int faultDomainCount);
}

/**
* The template for an availability set update operation, containing all the settings that
* can be modified.
* <p>
* Call {@link Update#apply()} to apply the changes to the resource in Azure.
*/
interface Update extends
Appliable<AvailabilitySet>,
Resource.UpdateWithTags<Update> {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,19 @@
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeleting;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing;

/**
* Entry point to availability set management API.
*/
public interface AvailabilitySets extends
SupportsListing<AvailabilitySet>,
SupportsListingByGroup<AvailabilitySet>,
SupportsGettingByGroup<AvailabilitySet>,
SupportsCreating<AvailabilitySet.DefinitionBlank>,
SupportsDeleting,
SupportsDeletingByGroup {
/**
* Entry point to availability set management API within a specific resource group.
*/
interface InGroup extends
SupportsListing<AvailabilitySet>,
SupportsCreating<AvailabilitySet.DefinitionCreatable>,
Expand Down
Loading

0 comments on commit 2b1ec82

Please sign in to comment.