jclouds-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From deste...@apache.org
Subject [2/2] jclouds git commit: [JCLOUDS-1474] Adds SKU field to both LB and PublicIP
Date Fri, 28 Dec 2018 21:56:12 GMT
[JCLOUDS-1474] Adds SKU field to both LB and PublicIP

Changes order in parameters to keep properties as last parameter
Removes wrong @Nullable parameters

Moves LoadBalancer and PublicAddress to new package with SKU as inner
class

Moves LoadBalancerSKU inside LoadBalancer. Creates new loadbalancer package

Refactors PublicAddress domain objects

Extracts SKU from LoadBalancer

LoadBalancer SKU as inner class

PublicIPAddress SKU as inner class

Reorder parameters sku and properties


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/d621edd7
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/d621edd7
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/d621edd7

Branch: refs/heads/master
Commit: d621edd79f1d95c7bdaa4803bf36fa4d62cfdd99
Parents: 2d9bb93
Author: Dani Estevez <contact@danielestevez.com>
Authored: Fri Nov 30 16:23:33 2018 -0500
Committer: Dani Estevez <contact@danielestevez.com>
Committed: Fri Dec 28 16:55:35 2018 -0500

----------------------------------------------------------------------
 .../arm/AzureComputeProviderMetadata.java       |   4 +-
 .../arm/compute/AzureComputeServiceAdapter.java |   7 +-
 .../compute/config/AzurePredicatesModule.java   |   2 +-
 .../functions/VirtualMachineToNodeMetadata.java |   3 +-
 .../arm/compute/strategy/CleanupResources.java  |   3 +-
 .../CreateResourcesThenCreateNodes.java         |   2 +-
 .../azurecompute/arm/domain/LoadBalancer.java   |  67 ---------
 .../arm/domain/LoadBalancerProperties.java      | 109 ---------------
 .../arm/domain/LoadBalancingRule.java           |  43 ------
 .../arm/domain/LoadBalancingRuleProperties.java | 135 ------------------
 .../arm/domain/PublicIPAddress.java             |  71 ----------
 .../arm/domain/PublicIPAddressProperties.java   |  86 ------------
 .../azurecompute/arm/domain/VMDeployment.java   |   1 +
 .../arm/domain/loadbalancer/LoadBalancer.java   |  94 +++++++++++++
 .../loadbalancer/LoadBalancerProperties.java    | 114 ++++++++++++++++
 .../domain/loadbalancer/LoadBalancingRule.java  |  43 ++++++
 .../LoadBalancingRuleProperties.java            | 136 +++++++++++++++++++
 .../domain/publicipaddress/PublicIPAddress.java |  97 +++++++++++++
 .../PublicIPAddressProperties.java              |  89 ++++++++++++
 .../arm/features/LoadBalancerApi.java           |   7 +-
 .../arm/features/PublicIPAddressApi.java        |  11 +-
 .../CreateResourcesThenCreateNodesTest.java     |   4 +-
 .../arm/features/LoadBalancerApiLiveTest.java   |  54 ++++++--
 .../arm/features/LoadBalancerApiMockTest.java   |  19 ++-
 .../features/PublicIPAddressApiLiveTest.java    |  38 +++++-
 .../features/PublicIPAddressApiMockTest.java    |  23 +++-
 .../arm/features/VirtualNetworkApiLiveTest.java |   6 +-
 .../VirtualNetworkGatewayApiLiveTest.java       |   6 +-
 ...tualNetworkGatewayConnectionApiLiveTest.java |   6 +-
 .../test/resources/PublicIPAddressCreate.json   |   5 +-
 .../test/resources/PublicIPAddressGetInfo.json  |   5 +-
 .../src/test/resources/loadbalancercreate.json  |   5 +-
 .../src/test/resources/loadbalancerget.json     |   5 +-
 33 files changed, 724 insertions(+), 576 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/d621edd7/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/AzureComputeProviderMetadata.java
----------------------------------------------------------------------
diff --git a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/AzureComputeProviderMetadata.java b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/AzureComputeProviderMetadata.java
index 85ec8b9..274c738 100644
--- a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/AzureComputeProviderMetadata.java
+++ b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/AzureComputeProviderMetadata.java
@@ -116,7 +116,7 @@ public class AzureComputeProviderMetadata extends BaseProviderMetadata {
       properties.put(API_VERSION_PREFIX + NetworkSecurityGroupApi.class.getSimpleName(), "2016-03-30");
       properties.put(API_VERSION_PREFIX + NetworkSecurityRuleApi.class.getSimpleName(), "2016-03-30");
       properties.put(API_VERSION_PREFIX + OSImageApi.class.getSimpleName(), "2015-06-15");
-      properties.put(API_VERSION_PREFIX + PublicIPAddressApi.class.getSimpleName(), "2015-06-15");
+      properties.put(API_VERSION_PREFIX + PublicIPAddressApi.class.getSimpleName(), "2018-08-01");
       properties.put(API_VERSION_PREFIX + ResourceGroupApi.class.getSimpleName(), "2015-01-01");
       properties.put(API_VERSION_PREFIX + ResourceProviderApi.class.getSimpleName(), "2015-01-01");
       properties.put(API_VERSION_PREFIX + StorageAccountApi.class.getSimpleName(), "2015-06-15");
@@ -124,7 +124,7 @@ public class AzureComputeProviderMetadata extends BaseProviderMetadata {
       properties.put(API_VERSION_PREFIX + VirtualNetworkApi.class.getSimpleName(), "2015-06-15");
       properties.put(API_VERSION_PREFIX + VMSizeApi.class.getSimpleName(), "2015-06-15");
       properties.put(API_VERSION_PREFIX + VirtualMachineApi.class.getSimpleName(), "2018-06-01");
-      properties.put(API_VERSION_PREFIX + LoadBalancerApi.class.getSimpleName(), "2016-03-30");
+      properties.put(API_VERSION_PREFIX + LoadBalancerApi.class.getSimpleName(), "2018-08-01");
       properties.put(API_VERSION_PREFIX + AvailabilitySetApi.class.getSimpleName(), "2016-04-30-preview");
       properties.put(API_VERSION_PREFIX + DiskApi.class.getSimpleName(), "2017-03-30");
       properties.put(API_VERSION_PREFIX + ImageApi.class.getSimpleName(), "2016-04-30-preview");

http://git-wip-us.apache.org/repos/asf/jclouds/blob/d621edd7/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/AzureComputeServiceAdapter.java
----------------------------------------------------------------------
diff --git a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/AzureComputeServiceAdapter.java b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/AzureComputeServiceAdapter.java
index bcf3e4f..ff74ffa 100644
--- a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/AzureComputeServiceAdapter.java
+++ b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/AzureComputeServiceAdapter.java
@@ -38,7 +38,6 @@ import java.util.Comparator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-
 import javax.annotation.Resource;
 import javax.inject.Inject;
 import javax.inject.Named;
@@ -71,8 +70,6 @@ import org.jclouds.azurecompute.arm.domain.OSProfile;
 import org.jclouds.azurecompute.arm.domain.Offer;
 import org.jclouds.azurecompute.arm.domain.Plan;
 import org.jclouds.azurecompute.arm.domain.Provisionable;
-import org.jclouds.azurecompute.arm.domain.PublicIPAddress;
-import org.jclouds.azurecompute.arm.domain.PublicIPAddressProperties;
 import org.jclouds.azurecompute.arm.domain.ResourceGroup;
 import org.jclouds.azurecompute.arm.domain.ResourceProviderMetaData;
 import org.jclouds.azurecompute.arm.domain.SKU;
@@ -84,6 +81,8 @@ import org.jclouds.azurecompute.arm.domain.VMSize;
 import org.jclouds.azurecompute.arm.domain.Version;
 import org.jclouds.azurecompute.arm.domain.VirtualMachine;
 import org.jclouds.azurecompute.arm.domain.VirtualMachineProperties;
+import org.jclouds.azurecompute.arm.domain.publicipaddress.PublicIPAddress;
+import org.jclouds.azurecompute.arm.domain.publicipaddress.PublicIPAddressProperties;
 import org.jclouds.azurecompute.arm.features.NetworkInterfaceCardApi;
 import org.jclouds.azurecompute.arm.features.OSImageApi;
 import org.jclouds.compute.ComputeServiceAdapter;
@@ -510,7 +509,7 @@ public class AzureComputeServiceAdapter implements ComputeServiceAdapter<Virtual
       logger.debug(">> allocating new public ip address: %s", name);
 
       PublicIPAddress ip = api.getPublicIPAddressApi(resourceGroup).createOrUpdate(name, location,
-            ImmutableMap.of("jclouds", nodeName, AUTOGENERATED_IP_KEY, "true"), properties);
+            ImmutableMap.of("jclouds", nodeName, AUTOGENERATED_IP_KEY, "true"), null, properties);
 
       checkState(publicIpAvailable.create(resourceGroup).apply(name),
               "Public IP was not provisioned in the configured timeout");

http://git-wip-us.apache.org/repos/asf/jclouds/blob/d621edd7/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/config/AzurePredicatesModule.java
----------------------------------------------------------------------
diff --git a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/config/AzurePredicatesModule.java b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/config/AzurePredicatesModule.java
index 6d7f8ac..01650de 100644
--- a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/config/AzurePredicatesModule.java
+++ b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/config/AzurePredicatesModule.java
@@ -46,13 +46,13 @@ import org.jclouds.azurecompute.arm.domain.Key.DeletedKeyBundle;
 import org.jclouds.azurecompute.arm.domain.Key.KeyBundle;
 import org.jclouds.azurecompute.arm.domain.NetworkSecurityGroup;
 import org.jclouds.azurecompute.arm.domain.Provisionable;
-import org.jclouds.azurecompute.arm.domain.PublicIPAddress;
 import org.jclouds.azurecompute.arm.domain.ResourceDefinition;
 import org.jclouds.azurecompute.arm.domain.Secret.DeletedSecretBundle;
 import org.jclouds.azurecompute.arm.domain.Secret.SecretBundle;
 import org.jclouds.azurecompute.arm.domain.Vault;
 import org.jclouds.azurecompute.arm.domain.VirtualMachineInstance;
 import org.jclouds.azurecompute.arm.domain.VirtualNetwork;
+import org.jclouds.azurecompute.arm.domain.publicipaddress.PublicIPAddress;
 import org.jclouds.azurecompute.arm.domain.vpn.VirtualNetworkGateway;
 import org.jclouds.azurecompute.arm.functions.ParseJobStatus;
 import org.jclouds.compute.reference.ComputeServiceConstants;

http://git-wip-us.apache.org/repos/asf/jclouds/blob/d621edd7/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/VirtualMachineToNodeMetadata.java
----------------------------------------------------------------------
diff --git a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/VirtualMachineToNodeMetadata.java b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/VirtualMachineToNodeMetadata.java
index af43cbb..cc9de6c 100644
--- a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/VirtualMachineToNodeMetadata.java
+++ b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/VirtualMachineToNodeMetadata.java
@@ -30,7 +30,6 @@ import static org.jclouds.location.predicates.LocationPredicates.idEquals;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-
 import javax.annotation.Resource;
 import javax.inject.Inject;
 import javax.inject.Named;
@@ -42,9 +41,9 @@ import org.jclouds.azurecompute.arm.domain.IdReference;
 import org.jclouds.azurecompute.arm.domain.IpConfiguration;
 import org.jclouds.azurecompute.arm.domain.NetworkInterfaceCard;
 import org.jclouds.azurecompute.arm.domain.NetworkProfile.NetworkInterface;
-import org.jclouds.azurecompute.arm.domain.PublicIPAddress;
 import org.jclouds.azurecompute.arm.domain.StorageProfile;
 import org.jclouds.azurecompute.arm.domain.VirtualMachine;
+import org.jclouds.azurecompute.arm.domain.publicipaddress.PublicIPAddress;
 import org.jclouds.collect.Memoized;
 import org.jclouds.compute.domain.Hardware;
 import org.jclouds.compute.domain.Image;

http://git-wip-us.apache.org/repos/asf/jclouds/blob/d621edd7/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/strategy/CleanupResources.java
----------------------------------------------------------------------
diff --git a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/strategy/CleanupResources.java b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/strategy/CleanupResources.java
index 3ca1a5d..df6cfd2 100644
--- a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/strategy/CleanupResources.java
+++ b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/strategy/CleanupResources.java
@@ -31,7 +31,6 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-
 import javax.annotation.Resource;
 import javax.inject.Inject;
 import javax.inject.Named;
@@ -48,8 +47,8 @@ import org.jclouds.azurecompute.arm.domain.NetworkInterfaceCard;
 import org.jclouds.azurecompute.arm.domain.NetworkProfile.NetworkInterface;
 import org.jclouds.azurecompute.arm.domain.NetworkSecurityGroup;
 import org.jclouds.azurecompute.arm.domain.OSDisk;
-import org.jclouds.azurecompute.arm.domain.PublicIPAddress;
 import org.jclouds.azurecompute.arm.domain.VirtualMachine;
+import org.jclouds.azurecompute.arm.domain.publicipaddress.PublicIPAddress;
 import org.jclouds.azurecompute.arm.features.NetworkSecurityGroupApi;
 import org.jclouds.compute.functions.GroupNamingConvention;
 import org.jclouds.compute.reference.ComputeServiceConstants;

http://git-wip-us.apache.org/repos/asf/jclouds/blob/d621edd7/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/strategy/CreateResourcesThenCreateNodes.java
----------------------------------------------------------------------
diff --git a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/strategy/CreateResourcesThenCreateNodes.java b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/strategy/CreateResourcesThenCreateNodes.java
index a2f2919..eba69c0 100644
--- a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/strategy/CreateResourcesThenCreateNodes.java
+++ b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/strategy/CreateResourcesThenCreateNodes.java
@@ -44,11 +44,11 @@ import org.jclouds.azurecompute.arm.compute.options.IpOptions;
 import org.jclouds.azurecompute.arm.domain.AddressSpace;
 import org.jclouds.azurecompute.arm.domain.AvailabilitySet;
 import org.jclouds.azurecompute.arm.domain.NetworkSecurityGroup;
-import org.jclouds.azurecompute.arm.domain.PublicIPAddress;
 import org.jclouds.azurecompute.arm.domain.ResourceGroup;
 import org.jclouds.azurecompute.arm.domain.Subnet;
 import org.jclouds.azurecompute.arm.domain.Subnet.SubnetProperties;
 import org.jclouds.azurecompute.arm.domain.VirtualNetwork.VirtualNetworkProperties;
+import org.jclouds.azurecompute.arm.domain.publicipaddress.PublicIPAddress;
 import org.jclouds.compute.config.CustomizationResponse;
 import org.jclouds.compute.domain.NodeMetadata;
 import org.jclouds.compute.domain.Template;

http://git-wip-us.apache.org/repos/asf/jclouds/blob/d621edd7/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/LoadBalancer.java
----------------------------------------------------------------------
diff --git a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/LoadBalancer.java b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/LoadBalancer.java
deleted file mode 100644
index 6e3e748..0000000
--- a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/LoadBalancer.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.azurecompute.arm.domain;
-
-import java.util.Map;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import com.google.auto.value.AutoValue;
-import com.google.common.collect.ImmutableMap;
-
-@AutoValue
-public abstract class LoadBalancer {
-   
-   @Nullable public abstract String id();
-   @Nullable public abstract String name();
-   @Nullable public abstract String location();
-   @Nullable public abstract String etag();
-   @Nullable public abstract Map<String, String> tags();
-   @Nullable public abstract LoadBalancerProperties properties();
-
-   @SerializedNames({ "id", "name", "location", "etag", "tags", "properties", })
-   public static LoadBalancer create(String id, final String name, final String location, final String etag,
-         final Map<String, String> tags, final LoadBalancerProperties properties) {
-      return builder().id(id).name(name).location(location).etag(etag).tags(tags).properties(properties).build();
-   }
-   
-   public abstract Builder toBuilder();
-
-   public static Builder builder() {
-      return new AutoValue_LoadBalancer.Builder();
-   }
-   
-   @AutoValue.Builder
-   public abstract static class Builder {
-      public abstract Builder id(String id);
-      public abstract Builder name(String name);
-      public abstract Builder location(String location);
-      public abstract Builder etag(String etag);
-      public abstract Builder tags(Map<String, String> tags);
-      public abstract Builder properties(LoadBalancerProperties properties);
-      
-      abstract Map<String, String> tags();
-
-      abstract LoadBalancer autoBuild();
-      
-      public LoadBalancer build() {
-         tags(tags() != null ? ImmutableMap.copyOf(tags()) : null);
-         return autoBuild();
-      }
-   }
-}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/d621edd7/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/LoadBalancerProperties.java
----------------------------------------------------------------------
diff --git a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/LoadBalancerProperties.java b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/LoadBalancerProperties.java
deleted file mode 100644
index b8ab723..0000000
--- a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/LoadBalancerProperties.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.azurecompute.arm.domain;
-
-import java.util.List;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import com.google.auto.value.AutoValue;
-import com.google.common.collect.ImmutableList;
-
-@AutoValue
-public abstract class LoadBalancerProperties implements Provisionable {
-
-   @Nullable
-   public abstract List<FrontendIPConfigurations> frontendIPConfigurations();
-
-   @Nullable
-   public abstract List<BackendAddressPool> backendAddressPools();
-
-   @Nullable
-   public abstract List<LoadBalancingRule> loadBalancingRules();
-
-   @Nullable
-   public abstract List<Probe> probes();
-
-   @Nullable
-   public abstract List<InboundNatRule> inboundNatRules();
-
-   @Nullable
-   public abstract String resourceGuid();
-
-   @Nullable
-   public abstract String provisioningState();
-
-   @SerializedNames({ "frontendIPConfigurations", "backendAddressPools", "loadBalancingRules", "probes",
-         "inboundNatRules", "resourceGuid", "provisioningState" })
-   public static LoadBalancerProperties create(final List<FrontendIPConfigurations> frontendIPConfigurations,
-         final List<BackendAddressPool> backendAddressPools, final List<LoadBalancingRule> loadBalancingRules,
-         final List<Probe> probes, final List<InboundNatRule> inboundNatRules, final String resourceGuid,
-         final String provisioningState) {
-      return builder().frontendIPConfigurations(frontendIPConfigurations)
-            .backendAddressPools(backendAddressPools == null ? null : ImmutableList.copyOf(backendAddressPools))
-            .loadBalancingRules(loadBalancingRules == null ? null : ImmutableList.copyOf(loadBalancingRules))
-            .probes(probes == null ? null : ImmutableList.copyOf(probes))
-            .inboundNatRules(inboundNatRules == null ? null : ImmutableList.copyOf(inboundNatRules))
-            .resourceGuid(resourceGuid).provisioningState(provisioningState).build();
-   }
-
-   public abstract Builder toBuilder();
-
-   public static Builder builder() {
-      return new AutoValue_LoadBalancerProperties.Builder();
-   }
-
-   @AutoValue.Builder
-   public abstract static class Builder {
-      public abstract Builder frontendIPConfigurations(List<FrontendIPConfigurations> frontendIPConfigurations);
-
-      public abstract Builder backendAddressPools(List<BackendAddressPool> backendAddressPools);
-
-      public abstract Builder loadBalancingRules(List<LoadBalancingRule> networkInterfaces);
-
-      public abstract Builder probes(List<Probe> probes);
-
-      public abstract Builder inboundNatRules(List<InboundNatRule> inboundNatRules);
-
-      public abstract Builder resourceGuid(String resourceGuid);
-
-      public abstract Builder provisioningState(String provisioningState);
-
-      abstract List<FrontendIPConfigurations> frontendIPConfigurations();
-
-      abstract List<BackendAddressPool> backendAddressPools();
-
-      abstract List<LoadBalancingRule> loadBalancingRules();
-
-      abstract List<Probe> probes();
-
-      abstract List<InboundNatRule> inboundNatRules();
-
-      abstract LoadBalancerProperties autoBuild();
-
-      public LoadBalancerProperties build() {
-         frontendIPConfigurations(frontendIPConfigurations() != null ? ImmutableList.copyOf(frontendIPConfigurations())
-               : null);
-         backendAddressPools(backendAddressPools() != null ? ImmutableList.copyOf(backendAddressPools()) : null);
-         loadBalancingRules(loadBalancingRules() != null ? ImmutableList.copyOf(loadBalancingRules()) : null);
-         probes(probes() != null ? ImmutableList.copyOf(probes()) : null);
-         inboundNatRules(inboundNatRules() != null ? ImmutableList.copyOf(inboundNatRules()) : null);
-         return autoBuild();
-      }
-   }
-}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/d621edd7/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/LoadBalancingRule.java
----------------------------------------------------------------------
diff --git a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/LoadBalancingRule.java b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/LoadBalancingRule.java
deleted file mode 100644
index ecc97dd..0000000
--- a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/LoadBalancingRule.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.azurecompute.arm.domain;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import com.google.auto.value.AutoValue;
-
-@AutoValue
-public abstract class LoadBalancingRule {
-   @Nullable
-   public abstract String name();
-
-   @Nullable
-   public abstract String id();
-
-   @Nullable
-   public abstract LoadBalancingRuleProperties properties();
-
-   @Nullable
-   public abstract String etag();
-
-   @SerializedNames({ "name", "id", "properties", "etag" })
-   public static LoadBalancingRule create(final String name, final String id,
-         final LoadBalancingRuleProperties properties, final String etag) {
-      return new AutoValue_LoadBalancingRule(name, id, properties, etag);
-   }
-}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/d621edd7/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/LoadBalancingRuleProperties.java
----------------------------------------------------------------------
diff --git a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/LoadBalancingRuleProperties.java b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/LoadBalancingRuleProperties.java
deleted file mode 100644
index ca90a15..0000000
--- a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/LoadBalancingRuleProperties.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.azurecompute.arm.domain;
-
-import org.jclouds.azurecompute.arm.util.GetEnumValue;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import com.google.auto.value.AutoValue;
-
-@AutoValue
-public abstract class LoadBalancingRuleProperties {
-
-   public enum Protocol {
-      Tcp("Tcp"), Udp("Udp"), UNRECOGNIZED("Unrecognized");
-
-      private final String label;
-
-      private Protocol(final String label) {
-         this.label = label;
-      }
-
-      public static Protocol fromValue(final String text) {
-         return (Protocol) GetEnumValue.fromValueOrDefault(text, Protocol.UNRECOGNIZED);
-      }
-
-      @Override
-      public String toString() {
-         return label;
-      }
-   }
-   
-   public enum LoadDistribution {
-      Default("Default"), SourceIp("SourceIP"), SourceIPProtocol("SourceIPProtocol"), UNRECOGNIZED("Unrecognized");
-
-      private final String label;
-
-      private LoadDistribution(final String label) {
-         this.label = label;
-      }
-
-      public static LoadDistribution fromValue(final String text) {
-         return (LoadDistribution) GetEnumValue.fromValueOrDefault(text, LoadDistribution.UNRECOGNIZED);
-      }
-
-      @Override
-      public String toString() {
-         return label;
-      }
-   }
-
-   @Nullable
-   public abstract IdReference frontendIPConfiguration();
-
-   @Nullable
-   public abstract IdReference backendAddressPool();
-
-   public abstract Protocol protocol();
-
-   public abstract int frontendPort();
-
-   public abstract int backendPort();
-
-   @Nullable
-   public abstract IdReference probe();
-
-   @Nullable
-   public abstract Boolean enableFloatingIP();
-
-   @Nullable
-   public abstract Integer idleTimeoutInMinutes();
-
-   @Nullable
-   public abstract LoadDistribution loadDistribution();
-
-   @Nullable
-   public abstract String provisioningState();
-
-   @SerializedNames({ "frontendIPConfiguration", "backendAddressPool", "protocol", "frontendPort", "backendPort",
-         "probe", "enableFloatingIP", "idleTimeoutInMinutes", "loadDistribution", "provisioningState" })
-   public static LoadBalancingRuleProperties create(final IdReference frontendIPConfiguration,
-         final IdReference backendAddressPool, final Protocol protocol, final int frontendPort, final int backendPort,
-         final IdReference probe, final Boolean enableFloatingIP, final Integer idleTimeoutInMinutes,
-         final LoadDistribution loadDistribution, final String provisioningState) {
-      return builder().frontendIPConfiguration(frontendIPConfiguration).backendAddressPool(backendAddressPool)
-            .protocol(protocol).frontendPort(frontendPort).backendPort(backendPort).probe(probe)
-            .enableFloatingIP(enableFloatingIP).idleTimeoutInMinutes(idleTimeoutInMinutes)
-            .loadDistribution(loadDistribution).build();
-   }
-   
-   public abstract Builder toBuilder();
-
-   public static Builder builder() {
-      return new AutoValue_LoadBalancingRuleProperties.Builder();
-   }
-
-   @AutoValue.Builder
-   public abstract static class Builder {
-      public abstract Builder frontendIPConfiguration(IdReference frontendIPConfiguration);
-
-      public abstract Builder backendAddressPool(IdReference backendAddressPool);
-
-      public abstract Builder protocol(Protocol protocol);
-
-      public abstract Builder frontendPort(int frontendPort);
-
-      public abstract Builder backendPort(int backendPort);
-
-      public abstract Builder probe(IdReference probe);
-
-      public abstract Builder enableFloatingIP(Boolean enableFloatingIP);
-
-      public abstract Builder idleTimeoutInMinutes(Integer idleTimeoutInMinutes);
-
-      public abstract Builder loadDistribution(LoadDistribution loadDistribution);
-
-      public abstract Builder provisioningState(String provisioningState);
-
-      public abstract LoadBalancingRuleProperties build();
-   }
-}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/d621edd7/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/PublicIPAddress.java
----------------------------------------------------------------------
diff --git a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/PublicIPAddress.java b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/PublicIPAddress.java
deleted file mode 100644
index 8d0cb2b..0000000
--- a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/PublicIPAddress.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jclouds.azurecompute.arm.domain;
-
-import java.util.Map;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import com.google.auto.value.AutoValue;
-import com.google.common.collect.ImmutableMap;
-
-@AutoValue
-public abstract class PublicIPAddress {
-
-   public abstract String name();
-   public abstract String id();
-   public abstract String etag();
-   public abstract String location();
-   @Nullable public abstract Map<String, String> tags();
-   public abstract PublicIPAddressProperties properties();
-
-   @SerializedNames({ "name", "id", "etag", "location", "tags", "properties" })
-   public static PublicIPAddress create(String name, String id, String etag, String location, Map<String, String> tags,
-         PublicIPAddressProperties properties) {
-      return builder().name(name).id(id).etag(etag).location(location).tags(tags).properties(properties).build();
-   }
-   
-   PublicIPAddress() {
-      
-   }
-   
-   public abstract Builder toBuilder();
-
-   public static Builder builder() {
-      return new AutoValue_PublicIPAddress.Builder();
-   }
-
-   @AutoValue.Builder
-   public abstract static class Builder {
-      public abstract Builder name(String name);
-      public abstract Builder id(String id);
-      public abstract Builder etag(String etag);
-      public abstract Builder location(String location);
-      public abstract Builder tags(Map<String, String> tags);
-      public abstract Builder properties(PublicIPAddressProperties properties);
-      
-      abstract Map<String, String> tags();
-      abstract PublicIPAddress autoBuild();
-
-      public PublicIPAddress build() {
-         tags(tags() != null ? ImmutableMap.copyOf(tags()) : null);
-         return autoBuild();
-      }
-   }
-}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/d621edd7/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/PublicIPAddressProperties.java
----------------------------------------------------------------------
diff --git a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/PublicIPAddressProperties.java b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/PublicIPAddressProperties.java
deleted file mode 100644
index af7da0d..0000000
--- a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/PublicIPAddressProperties.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.azurecompute.arm.domain;
-
-import com.google.auto.value.AutoValue;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-@AutoValue
-public abstract class PublicIPAddressProperties implements Provisionable {
-
-   @Nullable // needs to be nullable to create the payload for create request
-   public abstract String provisioningState();
-
-   @Nullable // only set in succeeded provisioningState for Static IP and for Dynamic when attached to a NIC
-   public abstract String ipAddress();
-
-   public abstract String publicIPAllocationMethod();
-
-   @Nullable
-   public abstract Integer idleTimeoutInMinutes();
-
-   @Nullable // only if attached to NIC
-   public abstract IdReference ipConfiguration();
-
-   @Nullable // only if DNS name is set
-   public abstract DnsSettings dnsSettings();
-
-   @SerializedNames({"provisioningState", "ipAddress", "publicIPAllocationMethod", "idleTimeoutInMinutes", "ipConfiguration", "dnsSettings"})
-   public static PublicIPAddressProperties create(final String provisioningState,
-                                                  final String ipAddress,
-                                                  final String publicIPAllocationMethod,
-                                                  final Integer idleTimeoutInMinutes,
-                                                  final IdReference ipConfiguration,
-                                                  final DnsSettings dnsSettings) {
-      return builder()
-              .provisioningState(provisioningState)
-              .ipAddress(ipAddress)
-              .publicIPAllocationMethod(publicIPAllocationMethod)
-              .idleTimeoutInMinutes(idleTimeoutInMinutes)
-              .ipConfiguration(ipConfiguration)
-              .dnsSettings(dnsSettings)
-              .publicIPAllocationMethod(publicIPAllocationMethod)
-              .dnsSettings(dnsSettings)
-              .build();
-   }
-   
-   public abstract Builder toBuilder();
-
-   public static Builder builder() {
-      return new AutoValue_PublicIPAddressProperties.Builder();
-   }
-
-   @AutoValue.Builder
-   public abstract static class Builder {
-      public abstract Builder provisioningState(String provisioningState);
-
-      public abstract Builder ipAddress(String ipAddress);
-
-      public abstract Builder publicIPAllocationMethod(String publicIPAllocationMethod);
-
-      public abstract Builder idleTimeoutInMinutes(Integer idleTimeoutInMinutes);
-
-      public abstract Builder ipConfiguration(IdReference ipConfiguration);
-
-      public abstract Builder dnsSettings(DnsSettings dnsSettings);
-
-      public abstract PublicIPAddressProperties build();
-   }
-
-}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/d621edd7/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VMDeployment.java
----------------------------------------------------------------------
diff --git a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VMDeployment.java b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VMDeployment.java
index 99edc5c..54a73a4 100644
--- a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VMDeployment.java
+++ b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VMDeployment.java
@@ -18,6 +18,7 @@ package org.jclouds.azurecompute.arm.domain;
 
 import java.util.List;
 
+import org.jclouds.azurecompute.arm.domain.publicipaddress.PublicIPAddress;
 import org.jclouds.javax.annotation.Nullable;
 
 import com.google.auto.value.AutoValue;

http://git-wip-us.apache.org/repos/asf/jclouds/blob/d621edd7/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/loadbalancer/LoadBalancer.java
----------------------------------------------------------------------
diff --git a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/loadbalancer/LoadBalancer.java b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/loadbalancer/LoadBalancer.java
new file mode 100644
index 0000000..c0dd6eb
--- /dev/null
+++ b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/loadbalancer/LoadBalancer.java
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jclouds.azurecompute.arm.domain.loadbalancer;
+
+import java.util.Map;
+
+import org.jclouds.azurecompute.arm.util.GetEnumValue;
+import org.jclouds.javax.annotation.Nullable;
+import org.jclouds.json.SerializedNames;
+
+import com.google.auto.value.AutoValue;
+import com.google.common.collect.ImmutableMap;
+
+@AutoValue
+public abstract class LoadBalancer {
+   
+   @Nullable public abstract String id();
+   @Nullable public abstract String name();
+   @Nullable public abstract String location();
+   @Nullable public abstract String etag();
+   @Nullable public abstract Map<String, String> tags();
+   @Nullable public abstract LoadBalancerProperties properties();
+
+   @Nullable
+   public abstract SKU sku();
+
+   @SerializedNames({ "id", "name", "location", "etag", "tags", "sku", "properties"})
+   public static LoadBalancer create(String id, final String name, final String location, final String etag,
+         final Map<String, String> tags, final SKU sku, final LoadBalancerProperties properties) {
+      return builder().id(id).name(name).location(location).etag(etag).tags(tags).sku(sku).properties(properties).build();
+   }
+   
+   public abstract Builder toBuilder();
+
+   public static Builder builder() {
+      return new AutoValue_LoadBalancer.Builder();
+   }
+   
+   @AutoValue.Builder
+   public abstract static class Builder {
+      public abstract Builder id(String id);
+      public abstract Builder name(String name);
+      public abstract Builder location(String location);
+      public abstract Builder etag(String etag);
+      public abstract Builder tags(Map<String, String> tags);
+      public abstract Builder properties(LoadBalancerProperties properties);
+
+      public abstract Builder sku(SKU sku);
+      
+      abstract Map<String, String> tags();
+
+      abstract LoadBalancer autoBuild();
+      
+      public LoadBalancer build() {
+         tags(tags() != null ? ImmutableMap.copyOf(tags()) : null);
+         return autoBuild();
+      }
+   }
+
+   @AutoValue
+   public abstract static class SKU {
+
+      public enum SKUName {
+         Basic, Standard, Unrecognized;
+
+         public static SKUName fromValue(final String text) {
+            return (SKUName) GetEnumValue.fromValueOrDefault(text, SKUName.Unrecognized);
+         }
+      }
+
+      public abstract SKUName name();
+
+      @SerializedNames({ "name" })
+      public static SKU create(final SKUName name) {
+
+         return new AutoValue_LoadBalancer_SKU(name);
+      }
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/d621edd7/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/loadbalancer/LoadBalancerProperties.java
----------------------------------------------------------------------
diff --git a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/loadbalancer/LoadBalancerProperties.java b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/loadbalancer/LoadBalancerProperties.java
new file mode 100644
index 0000000..047f82a
--- /dev/null
+++ b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/loadbalancer/LoadBalancerProperties.java
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jclouds.azurecompute.arm.domain.loadbalancer;
+
+import java.util.List;
+
+import org.jclouds.azurecompute.arm.domain.BackendAddressPool;
+import org.jclouds.azurecompute.arm.domain.FrontendIPConfigurations;
+import org.jclouds.azurecompute.arm.domain.InboundNatRule;
+import org.jclouds.azurecompute.arm.domain.Probe;
+import org.jclouds.azurecompute.arm.domain.Provisionable;
+import org.jclouds.javax.annotation.Nullable;
+import org.jclouds.json.SerializedNames;
+
+import com.google.auto.value.AutoValue;
+import com.google.common.collect.ImmutableList;
+
+@AutoValue
+public abstract class LoadBalancerProperties implements Provisionable {
+
+   @Nullable
+   public abstract List<FrontendIPConfigurations> frontendIPConfigurations();
+
+   @Nullable
+   public abstract List<BackendAddressPool> backendAddressPools();
+
+   @Nullable
+   public abstract List<LoadBalancingRule> loadBalancingRules();
+
+   @Nullable
+   public abstract List<Probe> probes();
+
+   @Nullable
+   public abstract List<InboundNatRule> inboundNatRules();
+
+   @Nullable
+   public abstract String resourceGuid();
+
+   @Nullable
+   public abstract String provisioningState();
+
+   @SerializedNames({ "frontendIPConfigurations", "backendAddressPools", "loadBalancingRules", "probes",
+         "inboundNatRules", "resourceGuid", "provisioningState" })
+   public static LoadBalancerProperties create(final List<FrontendIPConfigurations> frontendIPConfigurations,
+         final List<BackendAddressPool> backendAddressPools, final List<LoadBalancingRule> loadBalancingRules,
+         final List<Probe> probes, final List<InboundNatRule> inboundNatRules, final String resourceGuid,
+         final String provisioningState) {
+      return builder().frontendIPConfigurations(frontendIPConfigurations)
+            .backendAddressPools(backendAddressPools == null ? null : ImmutableList.copyOf(backendAddressPools))
+            .loadBalancingRules(loadBalancingRules == null ? null : ImmutableList.copyOf(loadBalancingRules))
+            .probes(probes == null ? null : ImmutableList.copyOf(probes))
+            .inboundNatRules(inboundNatRules == null ? null : ImmutableList.copyOf(inboundNatRules))
+            .resourceGuid(resourceGuid).provisioningState(provisioningState).build();
+   }
+
+   public abstract Builder toBuilder();
+
+   public static Builder builder() {
+      return new AutoValue_LoadBalancerProperties.Builder();
+   }
+
+   @AutoValue.Builder
+   public abstract static class Builder {
+      public abstract Builder frontendIPConfigurations(List<FrontendIPConfigurations> frontendIPConfigurations);
+
+      public abstract Builder backendAddressPools(List<BackendAddressPool> backendAddressPools);
+
+      public abstract Builder loadBalancingRules(List<LoadBalancingRule> networkInterfaces);
+
+      public abstract Builder probes(List<Probe> probes);
+
+      public abstract Builder inboundNatRules(List<InboundNatRule> inboundNatRules);
+
+      public abstract Builder resourceGuid(String resourceGuid);
+
+      public abstract Builder provisioningState(String provisioningState);
+
+      abstract List<FrontendIPConfigurations> frontendIPConfigurations();
+
+      abstract List<BackendAddressPool> backendAddressPools();
+
+      abstract List<LoadBalancingRule> loadBalancingRules();
+
+      abstract List<Probe> probes();
+
+      abstract List<InboundNatRule> inboundNatRules();
+
+      abstract LoadBalancerProperties autoBuild();
+
+      public LoadBalancerProperties build() {
+         frontendIPConfigurations(frontendIPConfigurations() != null ? ImmutableList.copyOf(frontendIPConfigurations())
+               : null);
+         backendAddressPools(backendAddressPools() != null ? ImmutableList.copyOf(backendAddressPools()) : null);
+         loadBalancingRules(loadBalancingRules() != null ? ImmutableList.copyOf(loadBalancingRules()) : null);
+         probes(probes() != null ? ImmutableList.copyOf(probes()) : null);
+         inboundNatRules(inboundNatRules() != null ? ImmutableList.copyOf(inboundNatRules()) : null);
+         return autoBuild();
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/d621edd7/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/loadbalancer/LoadBalancingRule.java
----------------------------------------------------------------------
diff --git a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/loadbalancer/LoadBalancingRule.java b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/loadbalancer/LoadBalancingRule.java
new file mode 100644
index 0000000..7d1cafb
--- /dev/null
+++ b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/loadbalancer/LoadBalancingRule.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jclouds.azurecompute.arm.domain.loadbalancer;
+
+import org.jclouds.javax.annotation.Nullable;
+import org.jclouds.json.SerializedNames;
+
+import com.google.auto.value.AutoValue;
+
+@AutoValue
+public abstract class LoadBalancingRule {
+   @Nullable
+   public abstract String name();
+
+   @Nullable
+   public abstract String id();
+
+   @Nullable
+   public abstract LoadBalancingRuleProperties properties();
+
+   @Nullable
+   public abstract String etag();
+
+   @SerializedNames({ "name", "id", "properties", "etag" })
+   public static LoadBalancingRule create(final String name, final String id,
+         final LoadBalancingRuleProperties properties, final String etag) {
+      return new AutoValue_LoadBalancingRule(name, id, properties, etag);
+   }
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/d621edd7/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/loadbalancer/LoadBalancingRuleProperties.java
----------------------------------------------------------------------
diff --git a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/loadbalancer/LoadBalancingRuleProperties.java b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/loadbalancer/LoadBalancingRuleProperties.java
new file mode 100644
index 0000000..6e810d0
--- /dev/null
+++ b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/loadbalancer/LoadBalancingRuleProperties.java
@@ -0,0 +1,136 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jclouds.azurecompute.arm.domain.loadbalancer;
+
+import org.jclouds.azurecompute.arm.domain.IdReference;
+import org.jclouds.azurecompute.arm.util.GetEnumValue;
+import org.jclouds.javax.annotation.Nullable;
+import org.jclouds.json.SerializedNames;
+
+import com.google.auto.value.AutoValue;
+
+@AutoValue
+public abstract class LoadBalancingRuleProperties {
+
+   public enum Protocol {
+      Tcp("Tcp"), Udp("Udp"), UNRECOGNIZED("Unrecognized");
+
+      private final String label;
+
+      private Protocol(final String label) {
+         this.label = label;
+      }
+
+      public static Protocol fromValue(final String text) {
+         return (Protocol) GetEnumValue.fromValueOrDefault(text, Protocol.UNRECOGNIZED);
+      }
+
+      @Override
+      public String toString() {
+         return label;
+      }
+   }
+   
+   public enum LoadDistribution {
+      Default("Default"), SourceIp("SourceIP"), SourceIPProtocol("SourceIPProtocol"), UNRECOGNIZED("Unrecognized");
+
+      private final String label;
+
+      private LoadDistribution(final String label) {
+         this.label = label;
+      }
+
+      public static LoadDistribution fromValue(final String text) {
+         return (LoadDistribution) GetEnumValue.fromValueOrDefault(text, LoadDistribution.UNRECOGNIZED);
+      }
+
+      @Override
+      public String toString() {
+         return label;
+      }
+   }
+
+   @Nullable
+   public abstract IdReference frontendIPConfiguration();
+
+   @Nullable
+   public abstract IdReference backendAddressPool();
+
+   public abstract Protocol protocol();
+
+   public abstract int frontendPort();
+
+   public abstract int backendPort();
+
+   @Nullable
+   public abstract IdReference probe();
+
+   @Nullable
+   public abstract Boolean enableFloatingIP();
+
+   @Nullable
+   public abstract Integer idleTimeoutInMinutes();
+
+   @Nullable
+   public abstract LoadDistribution loadDistribution();
+
+   @Nullable
+   public abstract String provisioningState();
+
+   @SerializedNames({ "frontendIPConfiguration", "backendAddressPool", "protocol", "frontendPort", "backendPort",
+         "probe", "enableFloatingIP", "idleTimeoutInMinutes", "loadDistribution", "provisioningState" })
+   public static LoadBalancingRuleProperties create(final IdReference frontendIPConfiguration,
+         final IdReference backendAddressPool, final Protocol protocol, final int frontendPort, final int backendPort,
+         final IdReference probe, final Boolean enableFloatingIP, final Integer idleTimeoutInMinutes,
+         final LoadDistribution loadDistribution, final String provisioningState) {
+      return builder().frontendIPConfiguration(frontendIPConfiguration).backendAddressPool(backendAddressPool)
+            .protocol(protocol).frontendPort(frontendPort).backendPort(backendPort).probe(probe)
+            .enableFloatingIP(enableFloatingIP).idleTimeoutInMinutes(idleTimeoutInMinutes)
+            .loadDistribution(loadDistribution).build();
+   }
+   
+   public abstract Builder toBuilder();
+
+   public static Builder builder() {
+      return new AutoValue_LoadBalancingRuleProperties.Builder();
+   }
+
+   @AutoValue.Builder
+   public abstract static class Builder {
+      public abstract Builder frontendIPConfiguration(IdReference frontendIPConfiguration);
+
+      public abstract Builder backendAddressPool(IdReference backendAddressPool);
+
+      public abstract Builder protocol(Protocol protocol);
+
+      public abstract Builder frontendPort(int frontendPort);
+
+      public abstract Builder backendPort(int backendPort);
+
+      public abstract Builder probe(IdReference probe);
+
+      public abstract Builder enableFloatingIP(Boolean enableFloatingIP);
+
+      public abstract Builder idleTimeoutInMinutes(Integer idleTimeoutInMinutes);
+
+      public abstract Builder loadDistribution(LoadDistribution loadDistribution);
+
+      public abstract Builder provisioningState(String provisioningState);
+
+      public abstract LoadBalancingRuleProperties build();
+   }
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/d621edd7/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/publicipaddress/PublicIPAddress.java
----------------------------------------------------------------------
diff --git a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/publicipaddress/PublicIPAddress.java b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/publicipaddress/PublicIPAddress.java
new file mode 100644
index 0000000..3677ffb
--- /dev/null
+++ b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/publicipaddress/PublicIPAddress.java
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jclouds.azurecompute.arm.domain.publicipaddress;
+
+import java.util.Map;
+
+import org.jclouds.azurecompute.arm.util.GetEnumValue;
+import org.jclouds.javax.annotation.Nullable;
+import org.jclouds.json.SerializedNames;
+
+import com.google.auto.value.AutoValue;
+import com.google.common.collect.ImmutableMap;
+
+@AutoValue
+public abstract class PublicIPAddress {
+
+   public abstract String name();
+   public abstract String id();
+   public abstract String etag();
+   public abstract String location();
+   @Nullable public abstract Map<String, String> tags();
+   public abstract PublicIPAddressProperties properties();
+
+   @Nullable
+   public abstract SKU sku();
+
+   @SerializedNames({ "name", "id", "etag", "location", "tags", "sku", "properties"})
+   public static PublicIPAddress create(String name, String id, String etag, String location, Map<String, String> tags,
+         SKU sku, PublicIPAddressProperties properties) {
+      return builder().name(name).id(id).etag(etag).location(location).tags(tags).sku(sku).properties(properties).build();
+   }
+   
+   PublicIPAddress() {
+      
+   }
+   
+   public abstract Builder toBuilder();
+
+   public static Builder builder() {
+      return new AutoValue_PublicIPAddress.Builder();
+   }
+
+   @AutoValue.Builder
+   public abstract static class Builder {
+      public abstract Builder name(String name);
+      public abstract Builder id(String id);
+      public abstract Builder etag(String etag);
+      public abstract Builder location(String location);
+      public abstract Builder tags(Map<String, String> tags);
+      public abstract Builder properties(PublicIPAddressProperties properties);
+
+      public abstract Builder sku(SKU sku);
+      
+      abstract Map<String, String> tags();
+      abstract PublicIPAddress autoBuild();
+
+      public PublicIPAddress build() {
+         tags(tags() != null ? ImmutableMap.copyOf(tags()) : null);
+         return autoBuild();
+      }
+   }
+
+   @AutoValue
+   public abstract static class SKU {
+
+      public enum SKUName {
+         Basic, Standard, Unrecognized;
+
+         public static SKUName fromValue(final String text) {
+            return (SKUName) GetEnumValue.fromValueOrDefault(text, SKUName.Unrecognized);
+         }
+      }
+
+      public abstract SKUName name();
+
+      @SerializedNames({ "name" })
+      public static SKU create(final SKUName name) {
+
+         return new AutoValue_PublicIPAddress_SKU(name);
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/d621edd7/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/publicipaddress/PublicIPAddressProperties.java
----------------------------------------------------------------------
diff --git a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/publicipaddress/PublicIPAddressProperties.java b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/publicipaddress/PublicIPAddressProperties.java
new file mode 100644
index 0000000..7c718c7
--- /dev/null
+++ b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/publicipaddress/PublicIPAddressProperties.java
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jclouds.azurecompute.arm.domain.publicipaddress;
+
+import org.jclouds.azurecompute.arm.domain.DnsSettings;
+import org.jclouds.azurecompute.arm.domain.IdReference;
+import org.jclouds.azurecompute.arm.domain.Provisionable;
+import org.jclouds.javax.annotation.Nullable;
+import org.jclouds.json.SerializedNames;
+
+import com.google.auto.value.AutoValue;
+
+@AutoValue
+public abstract class PublicIPAddressProperties implements Provisionable {
+
+   @Nullable // needs to be nullable to create the payload for create request
+   public abstract String provisioningState();
+
+   @Nullable // only set in succeeded provisioningState for Static IP and for Dynamic when attached to a NIC
+   public abstract String ipAddress();
+
+   public abstract String publicIPAllocationMethod();
+
+   @Nullable
+   public abstract Integer idleTimeoutInMinutes();
+
+   @Nullable // only if attached to NIC
+   public abstract IdReference ipConfiguration();
+
+   @Nullable // only if DNS name is set
+   public abstract DnsSettings dnsSettings();
+
+   @SerializedNames({"provisioningState", "ipAddress", "publicIPAllocationMethod", "idleTimeoutInMinutes", "ipConfiguration", "dnsSettings"})
+   public static PublicIPAddressProperties create(final String provisioningState,
+                                                  final String ipAddress,
+                                                  final String publicIPAllocationMethod,
+                                                  final Integer idleTimeoutInMinutes,
+                                                  final IdReference ipConfiguration,
+                                                  final DnsSettings dnsSettings) {
+      return builder()
+              .provisioningState(provisioningState)
+              .ipAddress(ipAddress)
+              .publicIPAllocationMethod(publicIPAllocationMethod)
+              .idleTimeoutInMinutes(idleTimeoutInMinutes)
+              .ipConfiguration(ipConfiguration)
+              .dnsSettings(dnsSettings)
+              .publicIPAllocationMethod(publicIPAllocationMethod)
+              .dnsSettings(dnsSettings)
+              .build();
+   }
+   
+   public abstract Builder toBuilder();
+
+   public static Builder builder() {
+      return new AutoValue_PublicIPAddressProperties.Builder();
+   }
+
+   @AutoValue.Builder
+   public abstract static class Builder {
+      public abstract Builder provisioningState(String provisioningState);
+
+      public abstract Builder ipAddress(String ipAddress);
+
+      public abstract Builder publicIPAllocationMethod(String publicIPAllocationMethod);
+
+      public abstract Builder idleTimeoutInMinutes(Integer idleTimeoutInMinutes);
+
+      public abstract Builder ipConfiguration(IdReference ipConfiguration);
+
+      public abstract Builder dnsSettings(DnsSettings dnsSettings);
+
+      public abstract PublicIPAddressProperties build();
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/d621edd7/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/LoadBalancerApi.java
----------------------------------------------------------------------
diff --git a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/LoadBalancerApi.java b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/LoadBalancerApi.java
index f9805c0..f8b65dc 100644
--- a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/LoadBalancerApi.java
+++ b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/LoadBalancerApi.java
@@ -19,7 +19,6 @@ package org.jclouds.azurecompute.arm.features;
 import java.net.URI;
 import java.util.List;
 import java.util.Map;
-
 import javax.inject.Named;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.DELETE;
@@ -31,8 +30,9 @@ import javax.ws.rs.core.MediaType;
 
 import org.jclouds.Fallbacks.EmptyListOnNotFoundOr404;
 import org.jclouds.Fallbacks.NullOnNotFoundOr404;
-import org.jclouds.azurecompute.arm.domain.LoadBalancer;
-import org.jclouds.azurecompute.arm.domain.LoadBalancerProperties;
+import org.jclouds.azurecompute.arm.domain.loadbalancer.LoadBalancer;
+import org.jclouds.azurecompute.arm.domain.loadbalancer.LoadBalancer.SKU;
+import org.jclouds.azurecompute.arm.domain.loadbalancer.LoadBalancerProperties;
 import org.jclouds.azurecompute.arm.filters.ApiVersionFilter;
 import org.jclouds.azurecompute.arm.functions.URIParser;
 import org.jclouds.javax.annotation.Nullable;
@@ -68,6 +68,7 @@ public interface LoadBalancerApi {
    @MapBinder(BindToJsonPayload.class)
    LoadBalancer createOrUpdate(@PathParam("loadbalancername") String lbName,
          @PayloadParam("location") String location, @Nullable @PayloadParam("tags") Map<String, String> tags,
+         @Nullable @PayloadParam("sku") SKU sku,
          @PayloadParam("properties") LoadBalancerProperties properties);
 
    @Named("loadbalancer:delete")

http://git-wip-us.apache.org/repos/asf/jclouds/blob/d621edd7/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/PublicIPAddressApi.java
----------------------------------------------------------------------
diff --git a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/PublicIPAddressApi.java b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/PublicIPAddressApi.java
index 1632613..55d1cd6 100644
--- a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/PublicIPAddressApi.java
+++ b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/PublicIPAddressApi.java
@@ -29,8 +29,9 @@ import javax.ws.rs.core.MediaType;
 
 import org.jclouds.Fallbacks.EmptyListOnNotFoundOr404;
 import org.jclouds.Fallbacks.NullOnNotFoundOr404;
-import org.jclouds.azurecompute.arm.domain.PublicIPAddress;
-import org.jclouds.azurecompute.arm.domain.PublicIPAddressProperties;
+import org.jclouds.azurecompute.arm.domain.publicipaddress.PublicIPAddress;
+import org.jclouds.azurecompute.arm.domain.publicipaddress.PublicIPAddress.SKU;
+import org.jclouds.azurecompute.arm.domain.publicipaddress.PublicIPAddressProperties;
 import org.jclouds.azurecompute.arm.filters.ApiVersionFilter;
 import org.jclouds.azurecompute.arm.functions.FalseOn204;
 import org.jclouds.javax.annotation.Nullable;
@@ -66,9 +67,9 @@ public interface PublicIPAddressApi {
    @MapBinder(BindToJsonPayload.class)
    @PUT
    PublicIPAddress createOrUpdate(@PathParam("publicipaddressname") String publicipaddressname,
-                                                 @PayloadParam("location") String location,
-                                                 @Nullable @PayloadParam("tags") Map<String, String> tags,
-                                                 @PayloadParam("properties") PublicIPAddressProperties properties);
+         @PayloadParam("location") String location, @Nullable @PayloadParam("tags") Map<String, String> tags,
+         @Nullable @PayloadParam("sku") SKU sku,
+         @PayloadParam("properties") PublicIPAddressProperties properties);
 
    @Named("publicipaddress:get")
    @Path("/resourcegroups/{resourcegroup}/providers/Microsoft.Network/publicIPAddresses/{publicipaddressname}")

http://git-wip-us.apache.org/repos/asf/jclouds/blob/d621edd7/providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/compute/strategy/CreateResourcesThenCreateNodesTest.java
----------------------------------------------------------------------
diff --git a/providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/compute/strategy/CreateResourcesThenCreateNodesTest.java b/providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/compute/strategy/CreateResourcesThenCreateNodesTest.java
index 6693ec7..88d1240 100644
--- a/providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/compute/strategy/CreateResourcesThenCreateNodesTest.java
+++ b/providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/compute/strategy/CreateResourcesThenCreateNodesTest.java
@@ -26,9 +26,9 @@ import static org.testng.Assert.assertEquals;
 import org.jclouds.azurecompute.arm.AzureComputeApi;
 import org.jclouds.azurecompute.arm.compute.options.AzureTemplateOptions;
 import org.jclouds.azurecompute.arm.compute.options.IpOptions;
-import org.jclouds.azurecompute.arm.domain.PublicIPAddress;
-import org.jclouds.azurecompute.arm.domain.PublicIPAddressProperties;
 import org.jclouds.azurecompute.arm.domain.Subnet;
+import org.jclouds.azurecompute.arm.domain.publicipaddress.PublicIPAddress;
+import org.jclouds.azurecompute.arm.domain.publicipaddress.PublicIPAddressProperties;
 import org.jclouds.azurecompute.arm.features.PublicIPAddressApi;
 import org.jclouds.azurecompute.arm.features.SubnetApi;
 import org.jclouds.util.PasswordGenerator;

http://git-wip-us.apache.org/repos/asf/jclouds/blob/d621edd7/providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/LoadBalancerApiLiveTest.java
----------------------------------------------------------------------
diff --git a/providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/LoadBalancerApiLiveTest.java b/providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/LoadBalancerApiLiveTest.java
index adcde2b..0dde775 100644
--- a/providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/LoadBalancerApiLiveTest.java
+++ b/providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/LoadBalancerApiLiveTest.java
@@ -25,6 +25,8 @@ import static org.jclouds.azurecompute.arm.compute.options.AzureTemplateOptions.
 import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.TIMEOUT_RESOURCE_DELETED;
 import static org.jclouds.azurecompute.arm.domain.IdReference.extractName;
 import static org.jclouds.azurecompute.arm.domain.InboundNatRuleProperties.Protocol.Tcp;
+import static org.jclouds.azurecompute.arm.domain.loadbalancer.LoadBalancer.SKU.SKUName.Basic;
+import static org.jclouds.azurecompute.arm.domain.loadbalancer.LoadBalancer.SKU.SKUName.Standard;
 import static org.jclouds.compute.predicates.NodePredicates.inGroup;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertNotNull;
@@ -52,19 +54,19 @@ import org.jclouds.azurecompute.arm.domain.InboundNatRule;
 import org.jclouds.azurecompute.arm.domain.InboundNatRuleProperties;
 import org.jclouds.azurecompute.arm.domain.IpConfiguration;
 import org.jclouds.azurecompute.arm.domain.IpConfigurationProperties;
-import org.jclouds.azurecompute.arm.domain.LoadBalancer;
-import org.jclouds.azurecompute.arm.domain.LoadBalancerProperties;
-import org.jclouds.azurecompute.arm.domain.LoadBalancingRule;
-import org.jclouds.azurecompute.arm.domain.LoadBalancingRuleProperties;
-import org.jclouds.azurecompute.arm.domain.LoadBalancingRuleProperties.Protocol;
 import org.jclouds.azurecompute.arm.domain.NetworkInterfaceCard;
 import org.jclouds.azurecompute.arm.domain.NetworkInterfaceCardProperties;
 import org.jclouds.azurecompute.arm.domain.Probe;
 import org.jclouds.azurecompute.arm.domain.ProbeProperties;
 import org.jclouds.azurecompute.arm.domain.Provisionable;
-import org.jclouds.azurecompute.arm.domain.PublicIPAddress;
-import org.jclouds.azurecompute.arm.domain.PublicIPAddressProperties;
 import org.jclouds.azurecompute.arm.domain.VirtualMachine;
+import org.jclouds.azurecompute.arm.domain.loadbalancer.LoadBalancer;
+import org.jclouds.azurecompute.arm.domain.loadbalancer.LoadBalancerProperties;
+import org.jclouds.azurecompute.arm.domain.loadbalancer.LoadBalancingRule;
+import org.jclouds.azurecompute.arm.domain.loadbalancer.LoadBalancingRuleProperties;
+import org.jclouds.azurecompute.arm.domain.loadbalancer.LoadBalancingRuleProperties.Protocol;
+import org.jclouds.azurecompute.arm.domain.publicipaddress.PublicIPAddress;
+import org.jclouds.azurecompute.arm.domain.publicipaddress.PublicIPAddressProperties;
 import org.jclouds.azurecompute.arm.internal.AzureLiveTestUtils;
 import org.jclouds.compute.RunNodesException;
 import org.jclouds.compute.domain.NodeMetadata;
@@ -89,6 +91,8 @@ public class LoadBalancerApiLiveTest extends BaseComputeServiceContextLiveTest {
    private static final String lbName = String.format("lb-%s-%s", LoadBalancerApiLiveTest.class.getSimpleName()
          .toLowerCase(), System.getProperty("user.name"));
 
+   private static final String lbStandardName = lbName + "Standard";
+
    private Predicate<URI> resourceDeleted;
    private PublicIpAvailablePredicateFactory publicIpAvailable;
    private Predicate<Supplier<Provisionable>> resourceAvailable;
@@ -161,18 +165,40 @@ public class LoadBalancerApiLiveTest extends BaseComputeServiceContextLiveTest {
    }
 
    @Test(dependsOnMethods = "testDeleteLoadBalancerDoesNotExist")
+   public void testCreateLoadBalancerStandard() {
+      LoadBalancer createLB = newLoadBalancer(lbStandardName, location);
+
+      PublicIPAddress publicIP = createPublicIPAddress("Ip4LoadBalancerStandard",
+            PublicIPAddress.SKU.create(PublicIPAddress.SKU.SKUName.Standard));
+      FrontendIPConfigurationsProperties frontendProps = FrontendIPConfigurationsProperties.builder()
+            .publicIPAddress(IdReference.create(publicIP.id())).build();
+      FrontendIPConfigurations frontendIps = FrontendIPConfigurations.create("ipConfigs", null, frontendProps, null);
+      LoadBalancerProperties props = LoadBalancerProperties.builder()
+            .frontendIPConfigurations(ImmutableList.of(frontendIps)).build();
+
+      lb = lbApi.createOrUpdate(lbStandardName, createLB.location(), createLB.tags(), LoadBalancer.SKU.create(Standard),
+            props);
+      assertNotNull(lb);
+      assertEquals(lb.name(), lbStandardName);
+      assertEquals(lb.sku().name(), Standard);
+   }
+
+   @Test(dependsOnMethods = "testDeleteLoadBalancerDoesNotExist")
    public void testCreateLoadBalancer() {
       LoadBalancer createLB = newLoadBalancer(lbName, location);
 
-      PublicIPAddress publicIP = createPublicIPAddress("Ip4LoadBalancer");
-      FrontendIPConfigurationsProperties fronendProps = FrontendIPConfigurationsProperties.builder()
+      PublicIPAddress publicIP = createPublicIPAddress("Ip4LoadBalancer",
+            PublicIPAddress.SKU.create(PublicIPAddress.SKU.SKUName.Basic));
+      FrontendIPConfigurationsProperties frontendProps = FrontendIPConfigurationsProperties.builder()
             .publicIPAddress(IdReference.create(publicIP.id())).build();
-      FrontendIPConfigurations frontendIps = FrontendIPConfigurations.create("ipConfigs", null, fronendProps, null);
+      FrontendIPConfigurations frontendIps = FrontendIPConfigurations.create("ipConfigs", null, frontendProps, null);
       LoadBalancerProperties props = LoadBalancerProperties.builder()
             .frontendIPConfigurations(ImmutableList.of(frontendIps)).build();
 
-      lb = lbApi.createOrUpdate(lbName, createLB.location(), createLB.tags(), props);
+      lb = lbApi.createOrUpdate(lbName, createLB.location(), createLB.tags(), null, props);
       assertNotNull(lb);
+      assertEquals(lb.name(), lbName);
+      assertEquals(lb.sku().name(), Basic);
    }
 
    @Test(dependsOnMethods = "testCreateLoadBalancer")
@@ -305,7 +331,7 @@ public class LoadBalancerApiLiveTest extends BaseComputeServiceContextLiveTest {
       assertResourceDeleted(uri);
    }
 
-   private PublicIPAddress createPublicIPAddress(final String publicIpAddressName) {
+   private PublicIPAddress createPublicIPAddress(final String publicIpAddressName, final PublicIPAddress.SKU sku) {
       final PublicIPAddressApi ipApi = view.unwrapApi(AzureComputeApi.class).getPublicIPAddressApi(group);
       PublicIPAddress publicIPAddress = ipApi.get(publicIpAddressName);
 
@@ -313,7 +339,7 @@ public class LoadBalancerApiLiveTest extends BaseComputeServiceContextLiveTest {
          final Map<String, String> tags = ImmutableMap.of("testkey", "testvalue");
          PublicIPAddressProperties properties = PublicIPAddressProperties.builder().publicIPAllocationMethod("Static")
                .idleTimeoutInMinutes(4).build();
-         publicIPAddress = ipApi.createOrUpdate(publicIpAddressName, location, tags, properties);
+         publicIPAddress = ipApi.createOrUpdate(publicIpAddressName, location, tags, sku, properties);
 
          checkState(publicIpAvailable.create(group).apply(publicIpAddressName),
                "Public IP was not provisioned in the configured timeout");
@@ -421,7 +447,7 @@ public class LoadBalancerApiLiveTest extends BaseComputeServiceContextLiveTest {
    }
 
    private LoadBalancer updateLoadBalancer(final String name, LoadBalancerProperties props) {
-      lbApi.createOrUpdate(name, location, null, props);
+      lbApi.createOrUpdate(name, location, null, null, props);
       resourceAvailable.apply(new Supplier<Provisionable>() {
          @Override
          public Provisionable get() {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/d621edd7/providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/LoadBalancerApiMockTest.java
----------------------------------------------------------------------
diff --git a/providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/LoadBalancerApiMockTest.java b/providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/LoadBalancerApiMockTest.java
index 45663ea..a0a5a42 100644
--- a/providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/LoadBalancerApiMockTest.java
+++ b/providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/LoadBalancerApiMockTest.java
@@ -17,6 +17,8 @@
 package org.jclouds.azurecompute.arm.features;
 
 import static com.google.common.collect.Iterables.isEmpty;
+import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.API_VERSION_PREFIX;
+import static org.jclouds.azurecompute.arm.domain.loadbalancer.LoadBalancer.SKU.SKUName.Basic;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertNotNull;
 import static org.testng.Assert.assertNull;
@@ -25,10 +27,11 @@ import static org.testng.Assert.assertTrue;
 import java.net.URI;
 import java.util.List;
 
+import org.jclouds.azurecompute.arm.AzureComputeProviderMetadata;
 import org.jclouds.azurecompute.arm.domain.FrontendIPConfigurations;
 import org.jclouds.azurecompute.arm.domain.FrontendIPConfigurationsProperties;
-import org.jclouds.azurecompute.arm.domain.LoadBalancer;
-import org.jclouds.azurecompute.arm.domain.LoadBalancerProperties;
+import org.jclouds.azurecompute.arm.domain.loadbalancer.LoadBalancer;
+import org.jclouds.azurecompute.arm.domain.loadbalancer.LoadBalancerProperties;
 import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiMockTest;
 import org.testng.annotations.Test;
 
@@ -38,25 +41,28 @@ import com.google.common.collect.ImmutableList;
 public class LoadBalancerApiMockTest extends BaseAzureComputeApiMockTest {
    private final String subscriptionid = "SUBSCRIPTIONID";
    private final String resourcegroup = "myresourcegroup";
-   private final String apiVersion = "api-version=2016-03-30";
+   private final String apiVersion = "api-version=" + AzureComputeProviderMetadata.defaultProperties()
+         .getProperty(API_VERSION_PREFIX + LoadBalancerApi.class.getSimpleName());
    private final String lbName = "testLoadBalancer";
 
    public void createLoadBalancer() throws InterruptedException {
       LoadBalancer nsg = newLoadBalancer();
 
       server.enqueue(jsonResponse("/loadbalancercreate.json").setResponseCode(200));
-      final LoadBalancerApi nsgApi = api.getLoadBalancerApi(resourcegroup);
+      final LoadBalancerApi loadBalancerApi = api.getLoadBalancerApi(resourcegroup);
 
       String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/loadBalancers/%s?%s",
             subscriptionid, resourcegroup, lbName, apiVersion);
       
-      String json = "{\"location\":\"westeurope\",\"properties\":{\"frontendIPConfigurations\":[{\"name\":\"ipConfigs\",\"properties\":{}}]}}";
+      String json = "{\"location\":\"westeurope\",\"properties\":{\"frontendIPConfigurations\":[{\"name\":\"ipConfigs"
+            + "\",\"properties\":{}}]} }";
       
-      LoadBalancer result = nsgApi.createOrUpdate(lbName, "westeurope", null, nsg.properties());
+      LoadBalancer result = loadBalancerApi.createOrUpdate(lbName, "westeurope", null, null, nsg.properties());
       assertSent(server, "PUT", path, json);
 
       assertEquals(result.name(), lbName);
       assertEquals(result.location(), "westeurope");
+      assertEquals(result.sku().name(), Basic);
    }
 
    public void getLoadBalancer() throws InterruptedException {
@@ -73,6 +79,7 @@ public class LoadBalancerApiMockTest extends BaseAzureComputeApiMockTest {
       assertEquals(result.location(), "westeurope");
       assertEquals(result.properties().loadBalancingRules().size(), 1);
       assertEquals(result.properties().loadBalancingRules().get(0).name(), "lbRule1");
+      assertEquals(result.sku().name(), Basic);
    }
 
    public void getLoadBalancerReturns404() throws InterruptedException {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/d621edd7/providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/PublicIPAddressApiLiveTest.java
----------------------------------------------------------------------
diff --git a/providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/PublicIPAddressApiLiveTest.java b/providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/PublicIPAddressApiLiveTest.java
index 3d393db..69fda55 100644
--- a/providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/PublicIPAddressApiLiveTest.java
+++ b/providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/PublicIPAddressApiLiveTest.java
@@ -16,6 +16,8 @@
  */
 package org.jclouds.azurecompute.arm.features;
 
+import static org.jclouds.azurecompute.arm.domain.publicipaddress.PublicIPAddress.SKU.SKUName.Basic;
+import static org.jclouds.azurecompute.arm.domain.publicipaddress.PublicIPAddress.SKU.SKUName.Standard;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertFalse;
 import static org.testng.Assert.assertNotNull;
@@ -25,8 +27,9 @@ import static org.testng.Assert.assertTrue;
 import java.util.List;
 import java.util.Map;
 
-import org.jclouds.azurecompute.arm.domain.PublicIPAddress;
-import org.jclouds.azurecompute.arm.domain.PublicIPAddressProperties;
+import org.jclouds.azurecompute.arm.domain.publicipaddress.PublicIPAddress;
+import org.jclouds.azurecompute.arm.domain.publicipaddress.PublicIPAddress.SKU;
+import org.jclouds.azurecompute.arm.domain.publicipaddress.PublicIPAddressProperties;
 import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiLiveTest;
 import org.jclouds.util.Predicates2;
 import org.testng.annotations.BeforeClass;
@@ -39,6 +42,7 @@ import com.google.common.collect.ImmutableMap;
 public class PublicIPAddressApiLiveTest extends BaseAzureComputeApiLiveTest {
 
    private final String publicIpAddressName = "myipaddress";
+   private final String publicIpAddressNameStandard = "myipaddressStandard";
    private String subscriptionid;
 
    @BeforeClass
@@ -69,7 +73,7 @@ public class PublicIPAddressApiLiveTest extends BaseAzureComputeApiLiveTest {
                   .idleTimeoutInMinutes(4)
                   .build();
 
-      PublicIPAddress ip = ipApi.createOrUpdate(publicIpAddressName, LOCATION, tags, properties);
+      PublicIPAddress ip = ipApi.createOrUpdate(publicIpAddressName, LOCATION, tags, null, properties);
 
       assertNotNull(ip);
       assertEquals(ip.name(), publicIpAddressName);
@@ -81,6 +85,34 @@ public class PublicIPAddressApiLiveTest extends BaseAzureComputeApiLiveTest {
       assertNull(ip.properties().ipAddress()); // as we don't get IP address until Succeeded state
       assertEquals(ip.properties().publicIPAllocationMethod(), "Static");
       assertEquals(ip.properties().idleTimeoutInMinutes().intValue(), 4);
+      assertEquals(ip.sku().name(), Basic);
+   }
+
+   @Test(groups = "live", dependsOnMethods = "deletePublicIPAddressResourceDoesNotExist")
+   public void createPublicIPAddressStandard() {
+      final PublicIPAddressApi ipApi = api.getPublicIPAddressApi(resourceGroupName);
+
+      final Map<String, String> tags = ImmutableMap.of("testkey", "testvalue");
+
+      PublicIPAddressProperties properties = PublicIPAddressProperties.builder().publicIPAllocationMethod("Static")
+            .idleTimeoutInMinutes(4).build();
+
+      PublicIPAddress ip = ipApi
+            .createOrUpdate(publicIpAddressNameStandard, LOCATION, tags, SKU.create(Standard), properties);
+
+      assertNotNull(ip);
+      assertEquals(ip.name(), publicIpAddressNameStandard);
+      assertEquals(ip.location(), LOCATION);
+      assertEquals(ip.id(),
+            String.format("/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/publicIPAddresses/%s",
+                  subscriptionid, resourceGroupName, publicIpAddressNameStandard));
+      assertEquals(ip.tags().get("testkey"), "testvalue");
+      assertNotNull(ip.properties());
+      assertEquals(ip.properties().provisioningState(), "Updating");
+      assertNull(ip.properties().ipAddress()); // as we don't get IP address until Succeeded state
+      assertEquals(ip.properties().publicIPAllocationMethod(), "Static");
+      assertEquals(ip.properties().idleTimeoutInMinutes().intValue(), 4);
+      assertEquals(ip.sku().name(), Standard);
    }
 
    @Test(groups = "live", dependsOnMethods = "createPublicIPAddress")


Mime
View raw message