Skip to content

Commit

Permalink
addressing zonal VMSS offline review comments (#1930)
Browse files Browse the repository at this point in the history
* addressing zonal VMSS offline review comments

* addressing zonal VMSS offline review comments
  • Loading branch information
anuchandy authored and Dan Schulte committed Oct 5, 2017
1 parent a0f8333 commit 99e465b
Show file tree
Hide file tree
Showing 3 changed files with 469 additions and 459 deletions.
Expand Up @@ -32,10 +32,9 @@
* - Create a zone resilient load balancer with
* - the existing zone resilient ip address
* - two load balancing rule which is applied to two different backend pools
* - Create two zone redundant virtual machine scale set each associated with one backend pool
* - Update the virtual machine scale set by appending new zone.
* - Create two zone aware virtual machine scale set each associated with one backend pool.
*/
public final class ManageZoneRedundantVirtualMachineScaleSet {
public final class ManageZonalVirtualMachineScaleSet {
/**
* Main function which runs the actual sample.
* @param azure instance of the azure client
Expand Down Expand Up @@ -161,9 +160,9 @@ public static boolean runSample(Azure azure) {
Utils.print(network);

//=============================================================
// Create a zone redundant virtual machine scale set
// Create a zone aware virtual machine scale set

System.out.println("Creating a zone redundant virtual machine scale set");
System.out.println("Creating a zone aware virtual machine scale set");

// HTTP goes to this virtual machine scale set
//
Expand All @@ -181,15 +180,14 @@ public static boolean runSample(Azure azure) {
.withRootUsername(userName)
.withRootPassword(password)
.withAvailabilityZone(AvailabilityZoneId.ZONE_1)
.withAvailabilityZone(AvailabilityZoneId.ZONE_2)
.create();

System.out.println("Created zone redundant virtual machine scale set");
System.out.println("Created zone aware virtual machine scale set");

//=============================================================
// Create a zone redundant virtual machine scale set
// Create a zone aware virtual machine scale set

System.out.println("Creating second zone redundant virtual machine scale set");
System.out.println("Creating second zone aware virtual machine scale set");

// HTTPS goes to this virtual machine scale set
//
Expand All @@ -207,23 +205,9 @@ public static boolean runSample(Azure azure) {
.withRootUsername(userName)
.withRootPassword(password)
.withAvailabilityZone(AvailabilityZoneId.ZONE_1)
.withAvailabilityZone(AvailabilityZoneId.ZONE_2)
.create();

// Note: updating zone for VMSS will be supported as part of GA, this functionality is not yet deployed.

// System.out.println("Created second zone redundant virtual machine scale set");

//=============================================================
// Update a zone redundant virtual machine scale set with new zone

// System.out.println("Updating zone redundant virtual machine scale set to have additional zone");

// virtualMachineScaleSet1.update()
// .withAvailabilityZone(AvailabilityZoneId.ZONE_3)
// .apply();

// System.out.println("Updated zone redundant virtual machine scale set");
System.out.println("Created zone aware virtual machine scale set");

return true;
} catch (Exception f) {
Expand Down Expand Up @@ -272,7 +256,7 @@ public static void main(String[] args) {
}
}

private ManageZoneRedundantVirtualMachineScaleSet() {
private ManageZonalVirtualMachineScaleSet() {

}
}
Expand Up @@ -32,7 +32,7 @@
import com.microsoft.azure.management.compute.samples.ManageVirtualMachinesInParallel;
import com.microsoft.azure.management.compute.samples.ConvertVirtualMachineToManagedDisks;
import com.microsoft.azure.management.compute.samples.ManageZonalVirtualMachine;
import com.microsoft.azure.management.compute.samples.ManageZoneRedundantVirtualMachineScaleSet;
import com.microsoft.azure.management.compute.samples.ManageZonalVirtualMachineScaleSet;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
Expand Down Expand Up @@ -178,7 +178,7 @@ public void testManageZonalVirtualMachine() {
}

@Test
public void testManageZoneRedundantVirtualMachineScaleSet() {
Assert.assertTrue(ManageZoneRedundantVirtualMachineScaleSet.runSample(azure));
public void testManageZonalVirtualMachineScaleSet() {
Assert.assertTrue(ManageZonalVirtualMachineScaleSet.runSample(azure));
}
}

0 comments on commit 99e465b

Please sign in to comment.