[1/4] jclouds-labs git commit: Refactored Azure ARM to not use Deployments
Repository: jclouds-labs Updated Branches: refs/heads/master 5742745e0 -> 2f1103873 http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/2f110387/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/DeploymentTemplateBuilderTest.java -- diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/DeploymentTemplateBuilderTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/DeploymentTemplateBuilderTest.java deleted file mode 100644 index 1657899..000 --- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/DeploymentTemplateBuilderTest.java +++ /dev/null @@ -1,287 +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.features; - -import java.util.List; -import java.util.Map; - -import org.jclouds.azurecompute.arm.compute.options.AzureTemplateOptions; -import org.jclouds.azurecompute.arm.domain.DeploymentBody; -import org.jclouds.azurecompute.arm.domain.ImageReference; -import org.jclouds.azurecompute.arm.domain.IpConfiguration; -import org.jclouds.azurecompute.arm.domain.IpConfigurationProperties; -import org.jclouds.azurecompute.arm.domain.NetworkInterfaceCardProperties; -import org.jclouds.azurecompute.arm.domain.PublicIPAddressProperties; -import org.jclouds.azurecompute.arm.domain.ResourceDefinition; -import org.jclouds.azurecompute.arm.domain.StorageService; -import org.jclouds.azurecompute.arm.domain.StorageService.StorageServiceProperties; -import org.jclouds.azurecompute.arm.domain.VirtualMachineProperties; -import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiMockTest; -import org.jclouds.azurecompute.arm.util.DeploymentTemplateBuilder; -import org.jclouds.compute.domain.Hardware; -import org.jclouds.compute.domain.HardwareBuilder; -import org.jclouds.compute.domain.Image; -import org.jclouds.compute.domain.ImageBuilder; -import org.jclouds.compute.domain.OperatingSystem; -import org.jclouds.compute.domain.Template; -import org.jclouds.compute.domain.internal.TemplateImpl; -import org.jclouds.compute.options.TemplateOptions; -import org.jclouds.domain.Location; -import org.jclouds.domain.LocationBuilder; -import org.jclouds.domain.LocationScope; -import org.testng.Assert; -import org.testng.annotations.Test; - -import com.google.common.collect.Iterables; - -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; -import static org.testng.Assert.assertTrue; - -@Test(groups = "unit", testName = "DeploymentTemplateBuilderTest", singleThreaded = true) -public class DeploymentTemplateBuilderTest extends BaseAzureComputeApiMockTest { - - final String group = "jcgroup"; - final String vnetName = group + "virtualnetwork"; - final String subnetId = ""; - - @Test - public void testResourceGroup() { - DeploymentTemplateBuilder builder = getMockDeploymentTemplateBuilderWithEmptyOptions(); - DeploymentBody deploymentBody = builder.getDeploymentTemplate(); - List resources = deploymentBody.template().resources(); - Map variables = deploymentBody.template().variables(); - - ResourceDefinition resource = getResourceByType(resources, "Microsoft.Storage/storageAccounts"); - - StorageServiceProperties properties = (StorageServiceProperties) resource.properties(); - assertEquals(properties.accountType(), StorageService.AccountType.Standard_LRS); - assertTrue(variables.containsKey(parseVariableName(resource.name(; - } - - @Test - void testPublicIpAddress() { - DeploymentTemplateBuilder builder = getMockDeploymentTemplateBuilderWithEmptyOptions(); - DeploymentBody deploymentBody = builder.getDeploymentTemplate(); - List resources = deploymentBody.template().resources(); - Map variables = deploymentBody.template().variables(); - - ResourceDefinition resource = getResourceByType(resources, "Microsoft.Network/publicIPAddresses"); - - PublicIPAddressProperties properties = (PublicIPAddressProperties) resource.properties(); - assertEquals(properties.publicIPAllocationMethod(), "Dynamic"); - assertTrue(variab
[1/4] jclouds-labs git commit: Refactored Azure ARM to not use Deployments
Repository: jclouds-labs Updated Branches: refs/heads/azure-rebased [created] 2f1103873 http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/2f110387/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/DeploymentTemplateBuilderTest.java -- diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/DeploymentTemplateBuilderTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/DeploymentTemplateBuilderTest.java deleted file mode 100644 index 1657899..000 --- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/DeploymentTemplateBuilderTest.java +++ /dev/null @@ -1,287 +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.features; - -import java.util.List; -import java.util.Map; - -import org.jclouds.azurecompute.arm.compute.options.AzureTemplateOptions; -import org.jclouds.azurecompute.arm.domain.DeploymentBody; -import org.jclouds.azurecompute.arm.domain.ImageReference; -import org.jclouds.azurecompute.arm.domain.IpConfiguration; -import org.jclouds.azurecompute.arm.domain.IpConfigurationProperties; -import org.jclouds.azurecompute.arm.domain.NetworkInterfaceCardProperties; -import org.jclouds.azurecompute.arm.domain.PublicIPAddressProperties; -import org.jclouds.azurecompute.arm.domain.ResourceDefinition; -import org.jclouds.azurecompute.arm.domain.StorageService; -import org.jclouds.azurecompute.arm.domain.StorageService.StorageServiceProperties; -import org.jclouds.azurecompute.arm.domain.VirtualMachineProperties; -import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiMockTest; -import org.jclouds.azurecompute.arm.util.DeploymentTemplateBuilder; -import org.jclouds.compute.domain.Hardware; -import org.jclouds.compute.domain.HardwareBuilder; -import org.jclouds.compute.domain.Image; -import org.jclouds.compute.domain.ImageBuilder; -import org.jclouds.compute.domain.OperatingSystem; -import org.jclouds.compute.domain.Template; -import org.jclouds.compute.domain.internal.TemplateImpl; -import org.jclouds.compute.options.TemplateOptions; -import org.jclouds.domain.Location; -import org.jclouds.domain.LocationBuilder; -import org.jclouds.domain.LocationScope; -import org.testng.Assert; -import org.testng.annotations.Test; - -import com.google.common.collect.Iterables; - -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; -import static org.testng.Assert.assertTrue; - -@Test(groups = "unit", testName = "DeploymentTemplateBuilderTest", singleThreaded = true) -public class DeploymentTemplateBuilderTest extends BaseAzureComputeApiMockTest { - - final String group = "jcgroup"; - final String vnetName = group + "virtualnetwork"; - final String subnetId = ""; - - @Test - public void testResourceGroup() { - DeploymentTemplateBuilder builder = getMockDeploymentTemplateBuilderWithEmptyOptions(); - DeploymentBody deploymentBody = builder.getDeploymentTemplate(); - List resources = deploymentBody.template().resources(); - Map variables = deploymentBody.template().variables(); - - ResourceDefinition resource = getResourceByType(resources, "Microsoft.Storage/storageAccounts"); - - StorageServiceProperties properties = (StorageServiceProperties) resource.properties(); - assertEquals(properties.accountType(), StorageService.AccountType.Standard_LRS); - assertTrue(variables.containsKey(parseVariableName(resource.name(; - } - - @Test - void testPublicIpAddress() { - DeploymentTemplateBuilder builder = getMockDeploymentTemplateBuilderWithEmptyOptions(); - DeploymentBody deploymentBody = builder.getDeploymentTemplate(); - List resources = deploymentBody.template().resources(); - Map variables = deploymentBody.template().variables(); - - ResourceDefinition resource = getResourceByType(resources, "Microsoft.Network/publicIPAddresses"); - - PublicIPAddressProperties properties = (PublicIPAddressProperties) resource.properties(); - assertEquals(properties.publicIPAllocationMethod(), "Dynamic"); - assertTrue(va