Promoted Azure ARM to the main repo
diff --git a/azurecompute-arm/README.md b/azurecompute-arm/README.md
deleted file mode 100644
index ed8abd4..0000000
--- a/azurecompute-arm/README.md
+++ /dev/null
@@ -1,101 +0,0 @@
-jclouds Labs - Azure Compute ARM Provider
-============
-
-Build status for azurecomputearm module:
-[![Build Status](https://jclouds.ci.cloudbees.com/buildStatus/icon?job=jclouds-labs/org.apache.jclouds.labs$azurecompute-arm)](https://jclouds.ci.cloudbees.com/job/jclouds-labs/org.apache.jclouds.labs$azurecompute-arm/)
-
-## Setting Up Test Credentials
-
-### Create a Service Principal
-
-Install and configure Azure CLI following these [steps](http://azure.microsoft.com/en-us/documentation/articles/xplat-cli/).
-
-Using the Azure CLI, run the following commands to create a service principal
-
-```bash
-# Enter your Microsoft account credentials when prompted
-az login
-
-# Set current subscription to create a service principal
-az account set --subscription <Subscription-id>
-
-# Create an AD application with your information.
-az ad app create --display-name <name> --password <password> --homepage <home-page> --identifier-uris <identifier-uris>
-
-# For example: az ad app create --display-name "jcloudsarm" --password abcd --homepage "https://jcloudsarm" --identifier-uris "https://jcloudsarm"
-
-# Output will include a value for `Application Id`, which will be used for the live tests
-
-# Create a Service Principal
-az ad sp create --id <Application-id>
-
-# Output will include a value for `Object Id`, to be used in the next step
-```
-
-Run the following commands to assign roles to the service principal
-
-```bash
-# Assign roles for this service principal
-az role assignment create --role Contributor --assignee <ObjectId>
-```
-
-Look up the the tenant Id
-
-```bash
-az account show
-
-# output will be a JSON which will include the `Tenant id`
-```
-
-Verify service principal
-
-```bash
-az login -u <Application-id> -p <password> --service-principal --tenant <Tenant-id>
-```
-
-## Run Live Tests
-
-Use the following to run one live test:
-
-```bash
-mvn -Dtest=<name of the live test> \
- -Dtest.azurecompute-arm.identity="<Application-id>" \
- -Dtest.azurecompute-arm.credential="<password>" \
- -Dtest.azurecompute-arm.endpoint="https://management.azure.com/subscriptions/<Subscription-id>" \
- -Dtest.oauth.endpoint="https://login.microsoftonline.com/<Tenant-id>/oauth2/token"
- integration-test -Plive
-
-```
-
-Use the following to run all the live tests:
-
-```bash
-
-mvn clean verify -Plive \
- -Dtest.azurecompute-arm.identity="<Application-id>"" \
- -Dtest.azurecompute-arm.credential="<password>"" \
- -Dtest.azurecompute-arm.endpoint="https://management.azure.com/subscriptions/<Subscription-id>"" \
- -Dtest.oauth.endpoint=https://login.microsoftonline.com/<Tenant-id>/oauth2/token
-
-```
-
-## How to use it
-
-Azure Compute ARM provider works exactly as any other jclouds provider.
-Notice that as Azure supports dozens of locations, operations like listImages can be really time-consuming.
-To limit the scope of such operations there are some additional properties you may want to use:
-
-```bash
-jclouds.azurecompute.arm.publishers
-```
-which is by default `Canonical,RedHat`
-
-and
-```bash
-jclouds.regions
-```
-which is by default `null`. If you want to target only the `north europe` region, you can use
-
-```bash
-jclouds.regions="northeurope"
-```
diff --git a/azurecompute-arm/pom.xml b/azurecompute-arm/pom.xml
deleted file mode 100644
index 72ff3e2..0000000
--- a/azurecompute-arm/pom.xml
+++ /dev/null
@@ -1,165 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.jclouds.labs</groupId>
- <artifactId>jclouds-labs</artifactId>
- <version>2.1.0-SNAPSHOT</version>
- </parent>
- <artifactId>azurecompute-arm</artifactId>
- <name>jclouds Azure Compute ARM API</name>
- <description>jclouds components to access an implementation of Azure's ARM Compute Service</description>
- <packaging>bundle</packaging>
-
- <properties>
- <test.jclouds.oauth.resource>https://management.azure.com/</test.jclouds.oauth.resource>
- <test.oauth.endpoint>https://login.microsoftonline.com/FIXME_tenant-id/oauth2/token</test.oauth.endpoint>
- <test.azurecompute-arm.endpoint>https://management.azure.com/subscriptions/FIXME_subscription-id</test.azurecompute-arm.endpoint>
- <test.azurecompute-arm.api-version></test.azurecompute-arm.api-version>
- <test.azurecompute-arm.build-version />
- <test.azurecompute-arm.identity>app id</test.azurecompute-arm.identity>
- <test.azurecompute-arm.credential>app password</test.azurecompute-arm.credential>
- <jclouds.osgi.export>org.jclouds.azurecompute.arm*;version="${project.version}"</jclouds.osgi.export>
- <jclouds.osgi.import>org.jclouds*;version="${project.version}",*</jclouds.osgi.import>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.jclouds</groupId>
- <artifactId>jclouds-compute</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>com.google.auto.service</groupId>
- <artifactId>auto-service</artifactId>
- <scope>provided</scope>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>com.google.auto.value</groupId>
- <artifactId>auto-value</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.jclouds</groupId>
- <artifactId>jclouds-core</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.jclouds.api</groupId>
- <artifactId>oauth</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.jclouds.driver</groupId>
- <artifactId>jclouds-okhttp</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.jclouds.api</groupId>
- <artifactId>oauth</artifactId>
- <version>${project.version}</version>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.jclouds</groupId>
- <artifactId>jclouds-compute</artifactId>
- <version>${project.version}</version>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.jclouds</groupId>
- <artifactId>jclouds-core</artifactId>
- <version>${project.version}</version>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.jclouds.driver</groupId>
- <artifactId>jclouds-slf4j</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.jclouds.driver</groupId>
- <artifactId>jclouds-sshj</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.squareup.okhttp</groupId>
- <artifactId>mockwebserver</artifactId>
- <scope>test</scope>
- <exclusions>
- <!-- Already provided by jclouds-sshj -->
- <exclusion>
- <groupId>org.bouncycastle</groupId>
- <artifactId>bcprov-jdk15on</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
-
- <profiles>
- <profile>
- <id>live</id>
- <build>
- <defaultGoal>clean verify</defaultGoal>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <executions>
- <execution>
- <id>integration</id>
- <phase>integration-test</phase>
- <goals>
- <goal>test</goal>
- </goals>
- <configuration>
- <threadCount>1</threadCount>
- <systemPropertyVariables>
- <test.azurecompute-arm.endpoint>${test.azurecompute-arm.endpoint}</test.azurecompute-arm.endpoint>
- <test.azurecompute-arm.api-version>${test.azurecompute-arm.api-version}</test.azurecompute-arm.api-version>
- <test.azurecompute-arm.build-version>${test.azurecompute-arm.build-version}</test.azurecompute-arm.build-version>
- <test.azurecompute-arm.identity>${test.azurecompute-arm.identity}</test.azurecompute-arm.identity>
- <test.azurecompute-arm.credential>${test.azurecompute-arm.credential}</test.azurecompute-arm.credential>
- <test.jclouds.oauth.resource>${test.jclouds.oauth.resource}</test.jclouds.oauth.resource>
- <test.oauth.endpoint>${test.oauth.endpoint}</test.oauth.endpoint>
- </systemPropertyVariables>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
-</project>
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/AzureComputeApi.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/AzureComputeApi.java
deleted file mode 100644
index d62a5b7..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/AzureComputeApi.java
+++ /dev/null
@@ -1,270 +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;
-
-import java.io.Closeable;
-
-import javax.ws.rs.PathParam;
-
-import org.jclouds.azurecompute.arm.domain.ServicePrincipal;
-import org.jclouds.azurecompute.arm.features.AvailabilitySetApi;
-import org.jclouds.azurecompute.arm.features.DeploymentApi;
-import org.jclouds.azurecompute.arm.features.DiskApi;
-import org.jclouds.azurecompute.arm.features.GraphRBACApi;
-import org.jclouds.azurecompute.arm.features.ImageApi;
-import org.jclouds.azurecompute.arm.features.JobApi;
-import org.jclouds.azurecompute.arm.features.LoadBalancerApi;
-import org.jclouds.azurecompute.arm.features.LocationApi;
-import org.jclouds.azurecompute.arm.features.MetricDefinitionsApi;
-import org.jclouds.azurecompute.arm.features.MetricsApi;
-import org.jclouds.azurecompute.arm.features.NetworkInterfaceCardApi;
-import org.jclouds.azurecompute.arm.features.NetworkSecurityGroupApi;
-import org.jclouds.azurecompute.arm.features.NetworkSecurityRuleApi;
-import org.jclouds.azurecompute.arm.features.OSImageApi;
-import org.jclouds.azurecompute.arm.features.PublicIPAddressApi;
-import org.jclouds.azurecompute.arm.features.ResourceGroupApi;
-import org.jclouds.azurecompute.arm.features.ResourceProviderApi;
-import org.jclouds.azurecompute.arm.features.StorageAccountApi;
-import org.jclouds.azurecompute.arm.features.SubnetApi;
-import org.jclouds.azurecompute.arm.features.VMSizeApi;
-import org.jclouds.azurecompute.arm.features.VaultApi;
-import org.jclouds.azurecompute.arm.features.VirtualMachineApi;
-import org.jclouds.azurecompute.arm.features.VirtualMachineScaleSetApi;
-import org.jclouds.azurecompute.arm.features.VirtualNetworkApi;
-import org.jclouds.rest.annotations.Delegate;
-
-import com.google.common.base.Supplier;
-import com.google.inject.Provides;
-
-/**
- * The Azure Resource Manager API is a REST API for managing your services and deployments.
- * <p>
- *
- * @see <a href="https://msdn.microsoft.com/en-us/library/azure/dn790568.aspx" >doc</a>
- */
-public interface AzureComputeApi extends Closeable {
-
- /**
- * The Azure Resource Manager API includes operations for managing resource groups in your subscription.
- *
- * @see <a href="https://msdn.microsoft.com/en-us/library/azure/dn790546.aspx">docs</a>
- */
- @Delegate
- ResourceGroupApi getResourceGroupApi();
-
- /**
- * Provides access to the Job tracking API.
- */
- @Delegate
- JobApi getJobApi();
-
- /**
- * This Azure Resource Manager API provides all of the locations that are available for resource providers
- *
- * @see <a href="https://msdn.microsoft.com/en-US/library/azure/dn790540.aspx">docs</a>
- */
- @Delegate
- LocationApi getLocationApi();
-
- /**
- * The Azure Resource Manager API includes operations for managing the storage accounts in your subscription.
- *
- * @see <https://msdn.microsoft.com/en-us/library/mt163683.aspx">docs</a>
- */
- @Delegate
- StorageAccountApi getStorageAccountApi(@PathParam("resourceGroup") String resourceGroup);
-
- /**
- * The Subnet API includes operations for managing the subnets in your virtual network.
- *
- * @see <a href="https://msdn.microsoft.com/en-us/library/azure/mt163621.aspx">docs</a>
- */
- @Delegate
- SubnetApi getSubnetApi(@PathParam("resourcegroup") String resourcegroup,
- @PathParam("virtualnetwork") String virtualnetwork);
-
- /**
- * The Virtual Network API includes operations for managing the virtual networks in your subscription.
- *
- * @see <a href="https://msdn.microsoft.com/en-us/library/azure/mt163661.aspx">docs</a>
- */
- @Delegate
- VirtualNetworkApi getVirtualNetworkApi(@PathParam("resourcegroup") String resourcegroup);
-
-
- /**
- * The Network Interface Card API includes operations for managing the NICs in your subscription.
- *
- * @see <a href="https://msdn.microsoft.com/en-us/library/mt163668.aspx">docs</a>
- */
- @Delegate
- NetworkInterfaceCardApi getNetworkInterfaceCardApi(@PathParam("resourcegroup") String resourcegroup);
-
- /**
- * The Public IP Address API includes operations for managing public ID Addresses for NICs in your subscription.
- *
- * @see <a href="https://msdn.microsoft.com/en-us/library/azure/mt163638.aspx">docs</a>
- */
- @Delegate
- PublicIPAddressApi getPublicIPAddressApi(@PathParam("resourcegroup") String resourcegroup);
-
-
- /**
- * The Virtual Machine API includes operations for managing the virtual machines in your subscription.
- *
- * @see <a href="https://msdn.microsoft.com/en-us/library/azure/mt163630.aspx">docs</a>
- */
- @Delegate
- VirtualMachineApi getVirtualMachineApi(@PathParam("resourceGroup") String resourceGroup);
-
- /**
- * The Virtual Machine Scale Set API includes operations for managing the virtual machines in your subscription.
- *
- * @see <a href="https://msdn.microsoft.com/en-us/library/azure/mt163630.aspx">docs</a>
- */
- @Delegate
- VirtualMachineScaleSetApi getVirtualMachineScaleSetApi(@PathParam("resourceGroup") String resourceGroup);
-
- /**
- * This Azure Resource Manager API lists all available virtual machine sizes for a subscription in a given region
- *
- * @see <a href="https://msdn.microsoft.com/en-us/library/azure/mt269440.aspx">docs</a>
- */
- @Delegate
- VMSizeApi getVMSizeApi(@PathParam("location") String location);
-
- /**
- * The Azure Resource Manager API gets all the OS images in your subscription.
- *
- * @see <a href="http://msdn.microsoft.com/en-us/library/jj157175">docs</a>
- */
- @Delegate
- OSImageApi getOSImageApi(@PathParam("location") String location);
-
- /**
- * The Deployment API allows for the management of Azure Resource Manager resources through the use of templates.
- *
- * @see <a href="https://msdn.microsoft.com/en-us/library/azure/dn790549.aspx">docs</a>
- */
- @Delegate
- DeploymentApi getDeploymentApi(@PathParam("resourcegroup") String resourceGroup);
-
- /**
- * The NetworkSecurityGroup API includes operations for managing network security groups within your subscription.
- *
- * @see <a href="https://msdn.microsoft.com/en-us/library/azure/mt163615.aspx">docs</a>
- */
- @Delegate
- NetworkSecurityGroupApi getNetworkSecurityGroupApi(@PathParam("resourcegroup") String resourcegroup);
-
- /**
- * The NetworkSecurityRule API includes operations for managing network security rules within a network security group.
- *
- * @see <a href="https://msdn.microsoft.com/en-us/library/azure/mt163580.aspx">docs</a>
- */
- @Delegate
- NetworkSecurityRuleApi getNetworkSecurityRuleApi(@PathParam("resourcegroup") String resourcegroup,
- @PathParam("networksecuritygroup") String networksecuritygroup);
-
- /**
- * The LoadBalancer API includes operations for managing load balancers
- * within your subscription.
- *
- * @see <a href=
- * "https://msdn.microsoft.com/en-us/library/azure/mt163574.aspx">docs
- * </a>
- */
- @Delegate
- LoadBalancerApi getLoadBalancerApi(@PathParam("resourcegroup") String resourcegroup);
-
- /**
- * The AvailabilitySet API includes operations for managing availability sets
- * within your subscription.
- *
- * @see <a href=
- * "https://docs.microsoft.com/en-us/rest/api/compute/availabilitysets">docs
- * </a>
- */
- @Delegate
- AvailabilitySetApi getAvailabilitySetApi(@PathParam("resourcegroup") String resourcegroup);
-
- /**
- * The Azure Resource Provider API provides information about a resource provider and its supported resource types.
- *
- * @see <a href="https://msdn.microsoft.com/en-us/library/azure/dn790534.aspx">docs</a>
- */
- @Delegate
- ResourceProviderApi getResourceProviderApi();
-
- /**
- * The ManagedDataDisk API includes operations for managing data disks within your subscription.
- *
- * @see <a href="https://docs.microsoft.com/en-us/rest/api/manageddisks/disks/disks-rest-api">docs</a>
- */
- @Delegate
- DiskApi getDiskApi(@PathParam("resourcegroup") String resourcegroup);
-
- /**
- * The virtual machine image API includes operations for managing data disks within your subscription.
- *
- * @see <a href="https://docs.microsoft.com/en-us/rest/api/manageddisks/images/images-rest-api">docs</a>
- */
- @Delegate
- ImageApi getVirtualMachineImageApi(@PathParam("resourcegroup") String resourcegroup);
-
- /**
- * The metrics API includes operations to get insights into entities within your
- * subscription.
- *
- * @see <a href="https://docs.microsoft.com/en-us/rest/api/monitor/metrics">docs</a>
- */
- @Delegate
- MetricsApi getMetricsApi(@PathParam("resourceid") String resourceid);
-
- /**
- * The metric definitions API includes operations to get insights available for entities within your
- * subscription.
- *
- * @see <a href="https://docs.microsoft.com/en-us/rest/api/monitor/metricdefinitions">docs</a>
- */
- @Delegate
- MetricDefinitionsApi getMetricsDefinitionsApi(@PathParam("resourceid") String resourceid);
-
- /**
- * The Azure Active Directory Graph API provides programmatic access to Azure
- * AD through REST API endpoints.
- *
- * @see <a href="https://docs.microsoft.com/en-us/rest/api/graphrbac/">docs</a>
- */
- @Delegate
- GraphRBACApi getGraphRBACApi();
-
- /**
- * Managing your key vaults as well as the keys, secrets, and certificates within your key vaults can be
- * accomplished through a REST interface.
- *
- * @see <a href="https://docs.microsoft.com/en-us/rest/api/keyvault/">docs</a>
- */
- @Delegate
- VaultApi getVaultApi(@PathParam("resourcegroup") String resourcegroup);
-
- /**
- * Returns the information about the current service principal.
- */
- @Provides
- Supplier<ServicePrincipal> getServicePrincipal();
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/AzureComputeProviderMetadata.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/AzureComputeProviderMetadata.java
deleted file mode 100644
index c85beb9..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/AzureComputeProviderMetadata.java
+++ /dev/null
@@ -1,165 +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;
-
-import static org.jclouds.Constants.PROPERTY_MAX_RATE_LIMIT_WAIT;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.API_VERSION_PREFIX;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.DEFAULT_SUBNET_ADDRESS_PREFIX;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.DEFAULT_VNET_ADDRESS_SPACE_PREFIX;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.IMAGE_PUBLISHERS;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.OPERATION_TIMEOUT;
-import static org.jclouds.compute.config.ComputeServiceProperties.IMAGE_AUTHENTICATE_SUDO;
-import static org.jclouds.compute.config.ComputeServiceProperties.IMAGE_LOGIN_USER;
-import static org.jclouds.compute.config.ComputeServiceProperties.POLL_INITIAL_PERIOD;
-import static org.jclouds.compute.config.ComputeServiceProperties.POLL_MAX_PERIOD;
-import static org.jclouds.compute.config.ComputeServiceProperties.RESOURCENAME_DELIMITER;
-import static org.jclouds.compute.config.ComputeServiceProperties.RESOURCENAME_PREFIX;
-import static org.jclouds.compute.config.ComputeServiceProperties.TEMPLATE;
-import static org.jclouds.compute.config.ComputeServiceProperties.TIMEOUT_NODE_TERMINATED;
-import static org.jclouds.oauth.v2.config.CredentialType.CLIENT_CREDENTIALS_SECRET;
-import static org.jclouds.oauth.v2.config.OAuthProperties.CREDENTIAL_TYPE;
-import static org.jclouds.oauth.v2.config.OAuthProperties.RESOURCE;
-
-import java.net.URI;
-import java.util.Properties;
-
-import org.jclouds.azurecompute.arm.domain.Region;
-import org.jclouds.azurecompute.arm.features.AvailabilitySetApi;
-import org.jclouds.azurecompute.arm.features.DeploymentApi;
-import org.jclouds.azurecompute.arm.features.DiskApi;
-import org.jclouds.azurecompute.arm.features.GraphRBACApi;
-import org.jclouds.azurecompute.arm.features.ImageApi;
-import org.jclouds.azurecompute.arm.features.LoadBalancerApi;
-import org.jclouds.azurecompute.arm.features.LocationApi;
-import org.jclouds.azurecompute.arm.features.MetricDefinitionsApi;
-import org.jclouds.azurecompute.arm.features.MetricsApi;
-import org.jclouds.azurecompute.arm.features.NetworkInterfaceCardApi;
-import org.jclouds.azurecompute.arm.features.NetworkSecurityGroupApi;
-import org.jclouds.azurecompute.arm.features.NetworkSecurityRuleApi;
-import org.jclouds.azurecompute.arm.features.OSImageApi;
-import org.jclouds.azurecompute.arm.features.PublicIPAddressApi;
-import org.jclouds.azurecompute.arm.features.ResourceGroupApi;
-import org.jclouds.azurecompute.arm.features.ResourceProviderApi;
-import org.jclouds.azurecompute.arm.features.StorageAccountApi;
-import org.jclouds.azurecompute.arm.features.SubnetApi;
-import org.jclouds.azurecompute.arm.features.VMSizeApi;
-import org.jclouds.azurecompute.arm.features.VaultApi;
-import org.jclouds.azurecompute.arm.features.VirtualMachineApi;
-import org.jclouds.azurecompute.arm.features.VirtualMachineScaleSetApi;
-import org.jclouds.azurecompute.arm.features.VirtualNetworkApi;
-import org.jclouds.providers.ProviderMetadata;
-import org.jclouds.providers.internal.BaseProviderMetadata;
-
-import com.google.auto.service.AutoService;
-
-@AutoService(ProviderMetadata.class)
-public class AzureComputeProviderMetadata extends BaseProviderMetadata {
-
- public static Builder builder() {
- return new Builder();
- }
-
- @Override
- public Builder toBuilder() {
- return builder().fromProviderMetadata(this);
- }
-
- public AzureComputeProviderMetadata() {
- super(builder());
- }
-
- public static Properties defaultProperties() {
- final Properties properties = AzureManagementApiMetadata.defaultProperties();
- properties.put(POLL_INITIAL_PERIOD, 1000);
- properties.put(POLL_MAX_PERIOD, 15000);
- properties.put(OPERATION_TIMEOUT, 46000000);
- properties.put(TIMEOUT_NODE_TERMINATED, 60 * 10 * 1000);
- // Default max wait in rate limit: 5m30s
- properties.put(PROPERTY_MAX_RATE_LIMIT_WAIT, 330000);
- properties.put(RESOURCE, "https://management.azure.com/");
- properties.put(CREDENTIAL_TYPE, CLIENT_CREDENTIALS_SECRET.toString());
- // Set a default Oauth endpoint for Azure, fill in the tenantId based on the value supplied
- properties.put("oauth.endpoint", "https://login.microsoft.com/${azurecompute-arm.tenantId}/oauth2/token");
- properties.put(DEFAULT_VNET_ADDRESS_SPACE_PREFIX, "10.0.0.0/16");
- properties.put(DEFAULT_SUBNET_ADDRESS_PREFIX, "10.0.0.0/24");
- properties.put(RESOURCENAME_PREFIX, "jclouds");
- properties.put(RESOURCENAME_DELIMITER, "-");
- properties.put(IMAGE_PUBLISHERS, "Canonical,RedHat");
- // Default credentials for all images, Azure doesn't accept root, admin; generate the password on the fly
- properties.put(IMAGE_LOGIN_USER, "jclouds");
- // Azure allows for passwordless sudo only when using a public key to login to the machine
- properties.put(IMAGE_AUTHENTICATE_SUDO, "true");
- properties.put(TEMPLATE, "imageNameMatches=UbuntuServer,osVersionMatches=1[456]\\.[01][04](\\.[0-9])?-LTS");
- // Api versions used in each API
- properties.put(API_VERSION_PREFIX + DeploymentApi.class.getSimpleName(), "2016-02-01");
- properties.put(API_VERSION_PREFIX + LocationApi.class.getSimpleName(), "2015-11-01");
- properties.put(API_VERSION_PREFIX + NetworkInterfaceCardApi.class.getSimpleName(), "2017-03-01");
- 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 + 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");
- properties.put(API_VERSION_PREFIX + SubnetApi.class.getSimpleName(), "2017-03-01");
- 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(), "2016-04-30-preview");
- properties.put(API_VERSION_PREFIX + LoadBalancerApi.class.getSimpleName(), "2016-03-30");
- 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");
- properties.put(API_VERSION_PREFIX + MetricDefinitionsApi.class.getSimpleName(), "2017-05-01-preview");
- properties.put(API_VERSION_PREFIX + MetricsApi.class.getSimpleName(), "2016-09-01");
- properties.put(API_VERSION_PREFIX + VirtualMachineScaleSetApi.class.getSimpleName(), "2017-03-30");
- properties.put(API_VERSION_PREFIX + GraphRBACApi.class.getSimpleName(), "1.6");
- properties.put(API_VERSION_PREFIX + VaultApi.class.getSimpleName(), "2016-10-01");
-
- return properties;
- }
-
- public AzureComputeProviderMetadata(final Builder builder) {
- super(builder);
- }
-
- public static class Builder extends BaseProviderMetadata.Builder {
-
- protected Builder() {
- super();
- id("azurecompute-arm")
- .name("Azure Resource Management")
- .apiMetadata(new AzureManagementApiMetadata())
- .endpoint("https://management.azure.com/subscriptions/${azurecompute-arm.subscriptionId}")
- .homepage(URI.create("https://www.windowsazure.com/"))
- .console(URI.create("https://windows.azure.com/default.aspx"))
- .linkedServices("azureblob")
- .iso3166Codes(Region.iso3166Codes())
- .defaultProperties(AzureComputeProviderMetadata.defaultProperties());
- }
-
- @Override
- public AzureComputeProviderMetadata build() {
- return new AzureComputeProviderMetadata(this);
- }
-
- @Override
- public Builder fromProviderMetadata(final ProviderMetadata providerMetadata) {
- super.fromProviderMetadata(providerMetadata);
- return this;
- }
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/AzureManagementApiMetadata.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/AzureManagementApiMetadata.java
deleted file mode 100644
index 56cb788..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/AzureManagementApiMetadata.java
+++ /dev/null
@@ -1,99 +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;
-
-import static org.jclouds.reflect.Reflection2.typeToken;
-
-import java.net.URI;
-import java.util.Properties;
-
-import org.jclouds.apis.ApiMetadata;
-import org.jclouds.azurecompute.arm.compute.config.AzureComputeServiceContextModule;
-import org.jclouds.azurecompute.arm.compute.config.AzurePredicatesModule;
-import org.jclouds.azurecompute.arm.config.AzureComputeHttpApiModule;
-import org.jclouds.azurecompute.arm.config.AzureComputeParserModule;
-import org.jclouds.azurecompute.arm.config.AzureComputeRateLimitModule;
-import org.jclouds.compute.ComputeServiceContext;
-import org.jclouds.http.okhttp.config.OkHttpCommandExecutorServiceModule;
-import org.jclouds.oauth.v2.config.OAuthModule;
-import org.jclouds.rest.internal.BaseHttpApiMetadata;
-
-import com.google.common.collect.ImmutableSet;
-import com.google.inject.Module;
-
-/**
- * Implementation of {@link ApiMetadata} for Microsoft Azure Resource Manager REST API
- */
-public class AzureManagementApiMetadata extends BaseHttpApiMetadata<AzureComputeApi> {
-
- @Override
- public Builder toBuilder() {
- return new Builder().fromApiMetadata(this);
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public AzureManagementApiMetadata() {
- this(builder());
- }
-
- protected AzureManagementApiMetadata(final Builder builder) {
- super(builder);
- }
-
- public static Properties defaultProperties() {
- final Properties properties = BaseHttpApiMetadata.defaultProperties();
- return properties;
- }
-
- public static class Builder extends BaseHttpApiMetadata.Builder<AzureComputeApi, Builder> {
-
- protected Builder() {
- super();
-
- id("azurecompute-arm")
- .name("Microsoft Azure Resource Manager REST API")
- .identityName("Azure Service Principal Application Id")
- .credentialName("Azure Service Principal Application Password")
- .endpointName("Resource Manager Endpoint ending in your Subscription Id")
- .documentation(URI.create("https://msdn.microsoft.com/en-us/library/azure/dn790568.aspx"))
- .defaultProperties(AzureManagementApiMetadata.defaultProperties())
- .view(typeToken(ComputeServiceContext.class))
- .defaultModules(ImmutableSet.<Class<? extends Module>>builder()
- .add(OAuthModule.class)
- .add(OkHttpCommandExecutorServiceModule.class)
- .add(AzureComputeParserModule.class)
- .add(AzureComputeHttpApiModule.class)
- .add(AzureComputeServiceContextModule.class)
- .add(AzurePredicatesModule.class)
- .add(AzureComputeRateLimitModule.class)
- .build());
- }
-
- @Override
- public AzureManagementApiMetadata build() {
- return new AzureManagementApiMetadata(this);
- }
-
- @Override
- protected Builder self() {
- return this;
- }
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/AzureComputeService.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/AzureComputeService.java
deleted file mode 100644
index e676460..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/AzureComputeService.java
+++ /dev/null
@@ -1,128 +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.compute;
-
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-import java.util.concurrent.atomic.AtomicReference;
-
-import javax.inject.Inject;
-import javax.inject.Named;
-import javax.inject.Provider;
-import javax.inject.Singleton;
-
-import org.jclouds.Constants;
-import org.jclouds.azurecompute.arm.compute.domain.ResourceGroupAndName;
-import org.jclouds.azurecompute.arm.compute.strategy.CleanupResources;
-import org.jclouds.collect.Memoized;
-import org.jclouds.compute.ComputeServiceContext;
-import org.jclouds.compute.callables.RunScriptOnNode;
-import org.jclouds.compute.domain.Hardware;
-import org.jclouds.compute.domain.Image;
-import org.jclouds.compute.domain.NodeMetadata;
-import org.jclouds.compute.domain.TemplateBuilder;
-import org.jclouds.compute.extensions.ImageExtension;
-import org.jclouds.compute.extensions.SecurityGroupExtension;
-import org.jclouds.compute.internal.BaseComputeService;
-import org.jclouds.compute.internal.PersistNodeCredentials;
-import org.jclouds.compute.options.TemplateOptions;
-import org.jclouds.compute.reference.ComputeServiceConstants.Timeouts;
-import org.jclouds.compute.strategy.CreateNodesInGroupThenAddToSet;
-import org.jclouds.compute.strategy.DestroyNodeStrategy;
-import org.jclouds.compute.strategy.GetImageStrategy;
-import org.jclouds.compute.strategy.GetNodeMetadataStrategy;
-import org.jclouds.compute.strategy.InitializeRunScriptOnNodeOrPlaceInBadMap;
-import org.jclouds.compute.strategy.ListNodesStrategy;
-import org.jclouds.compute.strategy.RebootNodeStrategy;
-import org.jclouds.compute.strategy.ResumeNodeStrategy;
-import org.jclouds.compute.strategy.SuspendNodeStrategy;
-import org.jclouds.domain.Credentials;
-import org.jclouds.domain.Location;
-import org.jclouds.scriptbuilder.functions.InitAdminAccess;
-
-import com.google.common.base.Optional;
-import com.google.common.base.Predicate;
-import com.google.common.base.Supplier;
-import com.google.common.collect.ImmutableMultimap;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.util.concurrent.ListeningExecutorService;
-
-import static org.jclouds.compute.config.ComputeServiceProperties.TIMEOUT_NODE_RUNNING;
-import static org.jclouds.compute.config.ComputeServiceProperties.TIMEOUT_NODE_SUSPENDED;
-import static org.jclouds.compute.config.ComputeServiceProperties.TIMEOUT_NODE_TERMINATED;
-
-@Singleton
-public class AzureComputeService extends BaseComputeService {
- private final CleanupResources cleanupResources;
-
- @Inject
- protected AzureComputeService(ComputeServiceContext context, Map<String, Credentials> credentialStore,
- @Memoized Supplier<Set<? extends Image>> images, @Memoized Supplier<Set<? extends Hardware>> sizes,
- @Memoized Supplier<Set<? extends Location>> locations, ListNodesStrategy listNodesStrategy,
- GetImageStrategy getImageStrategy, GetNodeMetadataStrategy getNodeMetadataStrategy,
- CreateNodesInGroupThenAddToSet runNodesAndAddToSetStrategy, RebootNodeStrategy rebootNodeStrategy,
- DestroyNodeStrategy destroyNodeStrategy, ResumeNodeStrategy startNodeStrategy,
- SuspendNodeStrategy stopNodeStrategy, Provider<TemplateBuilder> templateBuilderProvider,
- @Named("DEFAULT") Provider<TemplateOptions> templateOptionsProvider,
- @Named(TIMEOUT_NODE_RUNNING) Predicate<AtomicReference<NodeMetadata>> nodeRunning,
- @Named(TIMEOUT_NODE_TERMINATED) Predicate<AtomicReference<NodeMetadata>> nodeTerminated,
- @Named(TIMEOUT_NODE_SUSPENDED) Predicate<AtomicReference<NodeMetadata>> nodeSuspended,
- InitializeRunScriptOnNodeOrPlaceInBadMap.Factory initScriptRunnerFactory,
- RunScriptOnNode.Factory runScriptOnNodeFactory, InitAdminAccess initAdminAccess,
- PersistNodeCredentials persistNodeCredentials, Timeouts timeouts,
- @Named(Constants.PROPERTY_USER_THREADS) ListeningExecutorService userExecutor,
- CleanupResources cleanupResources, Optional<ImageExtension> imageExtension,
- Optional<SecurityGroupExtension> securityGroupExtension) {
- super(context, credentialStore, images, sizes, locations, listNodesStrategy, getImageStrategy,
- getNodeMetadataStrategy, runNodesAndAddToSetStrategy, rebootNodeStrategy, destroyNodeStrategy,
- startNodeStrategy, stopNodeStrategy, templateBuilderProvider, templateOptionsProvider, nodeRunning,
- nodeTerminated, nodeSuspended, initScriptRunnerFactory, initAdminAccess, runScriptOnNodeFactory,
- persistNodeCredentials, timeouts, userExecutor, imageExtension, securityGroupExtension);
- this.cleanupResources = cleanupResources;
- }
-
- @Override
- protected void cleanUpIncidentalResourcesOfDeadNodes(Set<? extends NodeMetadata> deadNodes) {
- ImmutableMultimap.Builder<String, String> regionGroups = ImmutableMultimap.builder();
- ImmutableSet.Builder<String> resourceGroups = ImmutableSet.builder();
-
- for (NodeMetadata deadNode : deadNodes) {
- String resourceGroupName = ResourceGroupAndName.fromSlashEncoded(deadNode.getId()).resourceGroup();
- resourceGroups.add(resourceGroupName);
-
- if (deadNode.getGroup() != null) {
- regionGroups.put(resourceGroupName, deadNode.getGroup());
- }
-
- try {
- cleanupResources.cleanupNode(deadNode.getId());
- } catch (Exception ex) {
- logger.warn(ex, "Error cleaning up resources for node %s", deadNode);
- }
- }
-
- for (Entry<String, String> regionGroup : regionGroups.build().entries()) {
- cleanupResources.cleanupSecurityGroupIfOrphaned(regionGroup.getKey(), regionGroup.getValue());
- }
-
- for (String resourceGroup : resourceGroups.build()) {
- cleanupResources.deleteResourceGroupIfEmpty(resourceGroup);
- }
- }
-
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/AzureComputeServiceAdapter.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/AzureComputeServiceAdapter.java
deleted file mode 100644
index cd5e0e9..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/AzureComputeServiceAdapter.java
+++ /dev/null
@@ -1,545 +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.compute;
-
-import static com.google.common.base.Preconditions.checkState;
-import static com.google.common.collect.ImmutableList.builder;
-import static com.google.common.collect.ImmutableList.of;
-import static com.google.common.collect.Iterables.filter;
-import static com.google.common.collect.Iterables.getOnlyElement;
-import static com.google.common.collect.Iterables.transform;
-import static com.google.common.collect.Lists.newArrayList;
-import static org.jclouds.azurecompute.arm.compute.domain.LocationAndName.fromSlashEncoded;
-import static org.jclouds.azurecompute.arm.compute.domain.ResourceGroupAndName.fromResourceGroupAndName;
-import static org.jclouds.azurecompute.arm.compute.functions.VMImageToImage.getMarketplacePlanFromImageMetadata;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.IMAGE_PUBLISHERS;
-import static org.jclouds.azurecompute.arm.domain.IdReference.extractName;
-import static org.jclouds.azurecompute.arm.domain.IdReference.extractResourceGroup;
-import static org.jclouds.azurecompute.arm.util.VMImages.isCustom;
-import static org.jclouds.compute.util.ComputeServiceUtils.metadataAndTagsAsCommaDelimitedValue;
-
-import java.util.ArrayList;
-import java.util.Collections;
-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;
-import javax.inject.Singleton;
-
-import org.jclouds.azurecompute.arm.AzureComputeApi;
-import org.jclouds.azurecompute.arm.compute.config.AzurePredicatesModule.PublicIpAvailablePredicateFactory;
-import org.jclouds.azurecompute.arm.compute.domain.ResourceGroupAndName;
-import org.jclouds.azurecompute.arm.compute.functions.CustomImageToVMImage;
-import org.jclouds.azurecompute.arm.compute.options.AzureTemplateOptions;
-import org.jclouds.azurecompute.arm.compute.options.IpOptions;
-import org.jclouds.azurecompute.arm.compute.strategy.CleanupResources;
-import org.jclouds.azurecompute.arm.domain.AvailabilitySet;
-import org.jclouds.azurecompute.arm.domain.CreationData;
-import org.jclouds.azurecompute.arm.domain.DataDisk;
-import org.jclouds.azurecompute.arm.domain.HardwareProfile;
-import org.jclouds.azurecompute.arm.domain.IdReference;
-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.Location;
-import org.jclouds.azurecompute.arm.domain.ManagedDiskParameters;
-import org.jclouds.azurecompute.arm.domain.NetworkInterfaceCard;
-import org.jclouds.azurecompute.arm.domain.NetworkInterfaceCardProperties;
-import org.jclouds.azurecompute.arm.domain.NetworkProfile;
-import org.jclouds.azurecompute.arm.domain.NetworkProfile.NetworkInterface;
-import org.jclouds.azurecompute.arm.domain.NetworkProfile.NetworkInterface.NetworkInterfaceProperties;
-import org.jclouds.azurecompute.arm.domain.OSDisk;
-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;
-import org.jclouds.azurecompute.arm.domain.StorageAccountType;
-import org.jclouds.azurecompute.arm.domain.StorageProfile;
-import org.jclouds.azurecompute.arm.domain.VMHardware;
-import org.jclouds.azurecompute.arm.domain.VMImage;
-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.features.NetworkInterfaceCardApi;
-import org.jclouds.azurecompute.arm.features.OSImageApi;
-import org.jclouds.compute.ComputeServiceAdapter;
-import org.jclouds.compute.domain.Image;
-import org.jclouds.compute.domain.OsFamily;
-import org.jclouds.compute.domain.Template;
-import org.jclouds.compute.functions.GroupNamingConvention;
-import org.jclouds.compute.reference.ComputeServiceConstants;
-import org.jclouds.location.Region;
-import org.jclouds.logging.Logger;
-
-import com.google.common.base.Function;
-import com.google.common.base.MoreObjects;
-import com.google.common.base.Predicate;
-import com.google.common.base.Splitter;
-import com.google.common.base.Strings;
-import com.google.common.base.Supplier;
-import com.google.common.collect.FluentIterable;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Lists;
-
-/**
- * Defines the connection between the {@link AzureComputeApi} implementation and
- * the jclouds {@link org.jclouds.compute.ComputeService}.
- */
-@Singleton
-public class AzureComputeServiceAdapter implements ComputeServiceAdapter<VirtualMachine, VMHardware, VMImage, Location> {
-
- public static final String GROUP_KEY = "jclouds_group";
- public static final String AUTOGENERATED_IP_KEY = "jclouds-autogenerated";
-
- @Resource
- @Named(ComputeServiceConstants.COMPUTE_LOGGER)
- protected Logger logger = Logger.NULL;
-
- private final CleanupResources cleanupResources;
- private final AzureComputeApi api;
- private final List<String> imagePublishers;
- private final Supplier<Set<String>> regionIds;
- private final PublicIpAvailablePredicateFactory publicIpAvailable;
- private final CustomImageToVMImage customImagetoVmImage;
- private final GroupNamingConvention namingConvention;
- private Predicate<Supplier<Provisionable>> resourceAvailable;
-
- @Inject
- AzureComputeServiceAdapter(final AzureComputeApi api, @Named(IMAGE_PUBLISHERS) String imagePublishers,
- CleanupResources cleanupResources, @Region Supplier<Set<String>> regionIds,
- PublicIpAvailablePredicateFactory publicIpAvailable, CustomImageToVMImage customImagetoVmImage,
- GroupNamingConvention.Factory namingConvention, Predicate<Supplier<Provisionable>> resourceAvailable) {
- this.api = api;
- this.imagePublishers = Splitter.on(',').trimResults().omitEmptyStrings().splitToList(imagePublishers);
- this.cleanupResources = cleanupResources;
- this.regionIds = regionIds;
- this.publicIpAvailable = publicIpAvailable;
- this.customImagetoVmImage = customImagetoVmImage;
- this.namingConvention = namingConvention.create();
- this.resourceAvailable = resourceAvailable;
- }
-
- @Override
- public NodeAndInitialCredentials<VirtualMachine> createNodeWithGroupEncodedIntoName(final String group, final String name, final Template template) {
- String locationName = template.getLocation().getId();
- Image image = template.getImage();
- String hardwareId = fromSlashEncoded(template.getHardware().getId()).name();
- AzureTemplateOptions templateOptions = template.getOptions().as(AzureTemplateOptions.class);
- String resourceGroupName = templateOptions.getResourceGroup();
-
- IdReference availabilitySet = getAvailabilitySetIdReference(templateOptions.getAvailabilitySet());
- NetworkProfile networkProfile = createNetworkProfile(createNetworkInterfaceCards(name, locationName,
- templateOptions));
- StorageProfile storageProfile = createStorageProfile(image, templateOptions.getDataDisks());
- HardwareProfile hardwareProfile = HardwareProfile.builder().vmSize(hardwareId).build();
- OSProfile osProfile = createOsProfile(name, template);
-
- VirtualMachineProperties virtualMachineProperties = VirtualMachineProperties.builder()
- .availabilitySet(availabilitySet)
- .hardwareProfile(hardwareProfile)
- .storageProfile(storageProfile)
- .osProfile(osProfile)
- .networkProfile(networkProfile)
- .build();
-
- // Store group apart from the name to be able to identify nodes with
- // custom names in the configured group
- templateOptions.getUserMetadata().put(GROUP_KEY, group);
- Map<String, String> metadataAndTags = metadataAndTagsAsCommaDelimitedValue(templateOptions);
- Plan plan = getMarketplacePlanFromImageMetadata(image);
-
- VirtualMachine virtualMachine = api.getVirtualMachineApi(resourceGroupName).createOrUpdate(name, locationName,
- virtualMachineProperties, metadataAndTags, plan);
-
- // Safe to pass null credentials here, as jclouds will default populate
- // the node with the default credentials from the image, or the ones in
- // the options, if provided.
- ResourceGroupAndName resourceGroupAndName = fromResourceGroupAndName(resourceGroupName, name);
- return new NodeAndInitialCredentials<VirtualMachine>(virtualMachine, resourceGroupAndName.slashEncode(), null);
- }
-
- @Override
- public Iterable<VMHardware> listHardwareProfiles() {
- final List<VMHardware> hwProfiles = Lists.newArrayList();
- for (Location location : listLocations()) {
- Iterable<VMSize> vmSizes = api.getVMSizeApi(location.name()).list();
- for (VMSize vmSize : vmSizes) {
- VMHardware hwProfile = VMHardware
- .create(vmSize.name(), vmSize.numberOfCores(), vmSize.osDiskSizeInMB(),
- vmSize.resourceDiskSizeInMB(), vmSize.memoryInMB(), vmSize.maxDataDiskCount(), location.name());
- hwProfiles.add(hwProfile);
- }
- }
- return hwProfiles;
- }
-
- private List<VMImage> getImagesFromPublisher(String publisherName, String location) {
- List<VMImage> osImagesRef = Lists.newArrayList();
- OSImageApi osImageApi = api.getOSImageApi(location);
- Iterable<Offer> offerList = osImageApi.listOffers(publisherName);
-
- for (Offer offer : offerList) {
- Iterable<SKU> skuList = osImageApi.listSKUs(publisherName, offer.name());
-
- for (SKU sku : skuList) {
- Iterable<Version> versionList = osImageApi.listVersions(publisherName, offer.name(), sku.name());
- for (Version version : versionList) {
- Version versionDetails = osImageApi.getVersion(publisherName, offer.name(), sku.name(), version.name());
- VMImage vmImage = VMImage.azureImage().publisher(publisherName).offer(offer.name()).sku(sku.name())
- .version(versionDetails.name()).location(location).versionProperties(versionDetails.properties())
- .build();
- osImagesRef.add(vmImage);
- }
- }
- }
- return osImagesRef;
- }
-
- private List<VMImage> listImagesByLocation(String location) {
- final List<VMImage> osImages = Lists.newArrayList();
- for (String publisher : imagePublishers) {
- osImages.addAll(getImagesFromPublisher(publisher, location));
- }
- return osImages;
- }
-
- private List<VMImage> listCustomImagesByResourceGroup(String resourceGroup) {
- List<org.jclouds.azurecompute.arm.domain.Image> customImgs = api.getVirtualMachineImageApi(resourceGroup).list();
- return ImmutableList.copyOf(transform(
- filter(customImgs, new Predicate<org.jclouds.azurecompute.arm.domain.Image>() {
- @Override
- public boolean apply(org.jclouds.azurecompute.arm.domain.Image input) {
- return regionIds.get().contains(input.location());
- }
- }), customImagetoVmImage));
- }
-
- @Override
- public Iterable<VMImage> listImages() {
- final ImmutableList.Builder<VMImage> osImages = ImmutableList.builder();
-
- final List<String> availableLocationNames = newArrayList(transform(listLocations(),
- new Function<Location, String>() {
- @Override
- public String apply(Location location) {
- return location.name();
- }
- }));
-
- for (String locationName : availableLocationNames) {
- osImages.addAll(listImagesByLocation(locationName));
- }
-
- // We need to look for custom images in all resource groups
- for (ResourceGroup resourceGroup : api.getResourceGroupApi().list()) {
- osImages.addAll(listCustomImagesByResourceGroup(resourceGroup.name()));
- }
-
- return osImages.build();
- }
-
- @Override
- public VMImage getImage(final String id) {
- VMImage image = VMImage.decodeFieldsFromUniqueId(id);
-
- if (image.custom()) {
- org.jclouds.azurecompute.arm.domain.Image vmImage = api.getVirtualMachineImageApi(image.resourceGroup()).get(
- image.name());
- return vmImage == null ? null : customImagetoVmImage.apply(vmImage);
- }
-
- String location = image.location();
- String publisher = image.publisher();
- String offer = image.offer();
- String sku = image.sku();
-
- OSImageApi osImageApi = api.getOSImageApi(location);
- List<Version> versions = osImageApi.listVersions(publisher, offer, sku);
- if (!versions.isEmpty()) {
- Version version = osImageApi.getVersion(publisher, offer, sku, versions.get(0).name());
- return VMImage.azureImage().publisher(publisher).offer(offer).sku(sku).version(version.name())
- .location(location).versionProperties(version.properties()).build();
- }
-
- return null;
- }
-
- @Override
- public Iterable<Location> listLocations() {
- final Iterable<String> vmLocations = FluentIterable.from(api.getResourceProviderApi().get("Microsoft.Compute"))
- .filter(new Predicate<ResourceProviderMetaData>() {
- @Override
- public boolean apply(ResourceProviderMetaData input) {
- return input.resourceType().equals("virtualMachines");
- }
- }).transformAndConcat(new Function<ResourceProviderMetaData, Iterable<String>>() {
- @Override
- public Iterable<String> apply(ResourceProviderMetaData resourceProviderMetaData) {
- return resourceProviderMetaData.locations();
- }
- });
-
- List<Location> locations = FluentIterable.from(api.getLocationApi().list()).filter(new Predicate<Location>() {
- @Override
- public boolean apply(Location location) {
- return Iterables.contains(vmLocations, location.displayName());
- }
- }).filter(new Predicate<Location>() {
- @Override
- public boolean apply(Location location) {
- return regionIds.get().isEmpty() ? true : regionIds.get().contains(location.name());
- }
- }).toList();
-
- return locations;
- }
-
- @Override
- public VirtualMachine getNode(final String id) {
- ResourceGroupAndName resourceGroupAndName = ResourceGroupAndName.fromSlashEncoded(id);
- return api.getVirtualMachineApi(resourceGroupAndName.resourceGroup()).get(resourceGroupAndName.name());
- }
-
- @Override
- public void destroyNode(final String id) {
- checkState(cleanupResources.cleanupNode(id), "server(%s) and its resources still there after deleting!?", id);
- }
-
- @Override
- public void rebootNode(final String id) {
- ResourceGroupAndName resourceGroupAndName = ResourceGroupAndName.fromSlashEncoded(id);
- api.getVirtualMachineApi(resourceGroupAndName.resourceGroup()).restart(resourceGroupAndName.name());
- }
-
- @Override
- public void resumeNode(final String id) {
- ResourceGroupAndName resourceGroupAndName = ResourceGroupAndName.fromSlashEncoded(id);
- api.getVirtualMachineApi(resourceGroupAndName.resourceGroup()).start(resourceGroupAndName.name());
- }
-
- @Override
- public void suspendNode(final String id) {
- ResourceGroupAndName resourceGroupAndName = ResourceGroupAndName.fromSlashEncoded(id);
- api.getVirtualMachineApi(resourceGroupAndName.resourceGroup()).stop(resourceGroupAndName.name());
- }
-
- @Override
- public Iterable<VirtualMachine> listNodes() {
- ImmutableList.Builder<VirtualMachine> nodes = builder();
- for (ResourceGroup resourceGroup : api.getResourceGroupApi().list()) {
- List<VirtualMachine> vms = api.getVirtualMachineApi(resourceGroup.name()).list();
- nodes.addAll(filter(vms, new Predicate<VirtualMachine>() {
- @Override
- public boolean apply(VirtualMachine input) {
- return regionIds.get().contains(input.location());
- }
- }));
- }
- return nodes.build();
- }
-
- @Override
- public Iterable<VirtualMachine> listNodesByIds(final Iterable<String> ids) {
- return transform(ids, new Function<String, VirtualMachine>() {
- @Override
- public VirtualMachine apply(String input) {
- return getNode(input);
- }
- });
- }
-
- private OSProfile createOsProfile(String computerName, Template template) {
- String defaultLoginUser = template.getImage().getDefaultCredentials().getUser();
- String adminUsername = MoreObjects.firstNonNull(template.getOptions().getLoginUser(), defaultLoginUser);
- // Password already generated in CreateResourcesThenCreateNodes (if not set by user)
- String adminPassword = template.getOptions().getLoginPassword();
- OSProfile.Builder builder = OSProfile.builder().adminUsername(adminUsername).adminPassword(adminPassword)
- .computerName(computerName);
-
- if (!Strings.isNullOrEmpty(template.getOptions().getPublicKey())
- && OsFamily.WINDOWS != template.getImage().getOperatingSystem().getFamily()) {
- OSProfile.LinuxConfiguration linuxConfiguration = OSProfile.LinuxConfiguration.create("true",
- OSProfile.LinuxConfiguration.SSH.create(of(
- OSProfile.LinuxConfiguration.SSH.SSHPublicKey.create(
- String.format("/home/%s/.ssh/authorized_keys", adminUsername),
- template.getOptions().getPublicKey()))));
- builder.linuxConfiguration(linuxConfiguration);
- }
-
- AzureTemplateOptions azureTemplateOptions = template.getOptions().as(AzureTemplateOptions.class);
-
- if (azureTemplateOptions.getWindowsConfiguration() != null) {
- builder.windowsConfiguration(azureTemplateOptions.getWindowsConfiguration());
- }
-
- if (azureTemplateOptions.getSecrets() != null) {
- builder.secrets(azureTemplateOptions.getSecrets());
- }
-
- if (!Strings.isNullOrEmpty(azureTemplateOptions.getCustomData())) {
- builder.customData(azureTemplateOptions.getCustomData());
- }
-
- return builder.build();
- }
-
- private List<NetworkInterfaceCard> createNetworkInterfaceCards(final String nodeName, final String location,
- AzureTemplateOptions options) {
- // Prefer a sorted list of NICs with the ones with public IPs first, to
- // make sure the primary NIC is the public one
- final String securityGroup = getOnlyElement(options.getGroups(), null);
- return Lists.transform(publicIpsFirst(options.getIpOptions()), new Function<IpOptions, NetworkInterfaceCard>() {
- @Override
- public NetworkInterfaceCard apply(IpOptions input) {
- return createNetworkInterfaceCard(input, nodeName, location, securityGroup);
- }
- });
- }
-
- private NetworkInterfaceCard createNetworkInterfaceCard(IpOptions ipConfig, String nodeName, String location,
- String securityGroup) {
- String resourceGroup = extractResourceGroup(ipConfig.subnet());
- String subnetName = extractName(ipConfig.subnet());
-
- IpConfigurationProperties.Builder ipProperties = IpConfigurationProperties.builder()
- .subnet(IdReference.create(ipConfig.subnet()))
- .privateIPAllocationMethod(ipConfig.address().isPresent() ? "Static" : "Dynamic")
- .privateIPAddress(ipConfig.address().orNull());
-
- configurePublicIP(ipConfig, ipProperties, resourceGroup, location, nodeName);
-
- String ipName = namingConvention.uniqueNameForGroup(subnetName);
- final String nicName = namingConvention.uniqueNameForGroup(subnetName);
-
- IpConfiguration config = IpConfiguration.builder().name(ipName).properties(ipProperties.build()).build();
-
- NetworkInterfaceCardProperties.Builder nicProperties = NetworkInterfaceCardProperties.builder().ipConfigurations(
- ImmutableList.of(config));
-
- if (securityGroup != null) {
- nicProperties.networkSecurityGroup(IdReference.create(securityGroup));
- }
-
- logger.debug(">> creating nic %s(%s) with security groups (%s)", nicName, config,
- securityGroup != null ? securityGroup : "");
-
- final NetworkInterfaceCardApi nicApi = api.getNetworkInterfaceCardApi(resourceGroup);
- NetworkInterfaceCard nic = nicApi.createOrUpdate(nicName, location, nicProperties.build(),
- ImmutableMap.of("jclouds", nodeName));
-
- resourceAvailable.apply(new Supplier<Provisionable>() {
- @Override
- public Provisionable get() {
- NetworkInterfaceCard updated = nicApi.get(nicName);
- return updated == null ? null : updated.properties();
- }
- });
-
- return nic;
- }
-
- private void configurePublicIP(IpOptions ipConfig, IpConfigurationProperties.Builder ipProperties,
- String resourceGroup, String location, String nodeName) {
- if (ipConfig.publicIpId() != null) {
- logger.debug(">> configuring public ip: %s", extractName(ipConfig.publicIpId()));
- PublicIPAddress publicIp = api.getPublicIPAddressApi(extractResourceGroup(ipConfig.publicIpId())).get(
- extractName(ipConfig.publicIpId()));
- ipProperties.publicIPAddress(IdReference.create(publicIp.id()));
- } else if (ipConfig.allocateNewPublicIp()) {
- PublicIPAddress publicIp = createPublicIp(resourceGroup, location, nodeName);
- ipProperties.publicIPAddress(IdReference.create(publicIp.id()));
- }
- }
-
- /**
- * Create the network profile and configure the first NIC as primary.
- */
- private NetworkProfile createNetworkProfile(List<NetworkInterfaceCard> nics) {
- List<NetworkInterface> nicAttachments = new ArrayList<NetworkInterface>(nics.size());
- for (int i = 0; i < nics.size(); i++) {
- nicAttachments.add(NetworkInterface.create(nics.get(i).id(), NetworkInterfaceProperties.create(i == 0)));
- }
- return NetworkProfile.create(nicAttachments);
- }
-
- private static List<IpOptions> publicIpsFirst(List<IpOptions> ipOptions) {
- List<IpOptions> sorted = new ArrayList<IpOptions>(ipOptions);
- Collections.sort(sorted, new Comparator<IpOptions>() {
- @Override
- public int compare(IpOptions o1, IpOptions o2) {
- return o1.allocateNewPublicIp() == o2.allocateNewPublicIp() ? 0 : o1.allocateNewPublicIp() ? -1 : 1;
- }
- });
- return sorted;
- }
-
- private PublicIPAddress createPublicIp(String resourceGroup, String location, String nodeName) {
- String name = namingConvention.uniqueNameForGroup(nodeName);
-
- PublicIPAddressProperties properties = PublicIPAddressProperties.builder()
- .publicIPAllocationMethod("Static")
- .idleTimeoutInMinutes(4)
- .build();
-
- 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);
-
- checkState(publicIpAvailable.create(resourceGroup).apply(name),
- "Public IP was not provisioned in the configured timeout");
-
- return ip;
- }
-
- private StorageProfile createStorageProfile(Image image, List<DataDisk> dataDisks) {
- return StorageProfile.create(createImageReference(image), createOSDisk(image), dataDisks);
- }
-
- private ImageReference createImageReference(Image image) {
- return isCustom(image.getId()) ? ImageReference.builder().customImageId(image.getProviderId()).build() : ImageReference
- .builder().publisher(image.getProviderId()).offer(image.getName()).sku(image.getVersion())
- .version("latest").build();
- }
-
- private OSDisk createOSDisk(Image image) {
- OsFamily osFamily = image.getOperatingSystem().getFamily();
- String osType = osFamily == OsFamily.WINDOWS ? "Windows" : "Linux";
- return OSDisk.builder()
- .osType(osType)
- .caching(DataDisk.CachingTypes.READ_WRITE.toString())
- .createOption(CreationData.CreateOptions.FROM_IMAGE.toString())
- .managedDiskParameters(ManagedDiskParameters.create(null, StorageAccountType.STANDARD_LRS.toString()))
- .build();
- }
-
- private IdReference getAvailabilitySetIdReference(AvailabilitySet availabilitySet) {
- return availabilitySet != null ? IdReference.create(availabilitySet.id()) : null;
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/config/AzureComputeServiceContextModule.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/config/AzureComputeServiceContextModule.java
deleted file mode 100644
index 0a81ecb..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/config/AzureComputeServiceContextModule.java
+++ /dev/null
@@ -1,134 +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.compute.config;
-
-import javax.inject.Singleton;
-
-import org.jclouds.azurecompute.arm.compute.AzureComputeService;
-import org.jclouds.azurecompute.arm.compute.AzureComputeServiceAdapter;
-import org.jclouds.azurecompute.arm.compute.domain.ResourceGroupAndNameAndIngressRules;
-import org.jclouds.azurecompute.arm.compute.extensions.AzureComputeImageExtension;
-import org.jclouds.azurecompute.arm.compute.extensions.AzureComputeSecurityGroupExtension;
-import org.jclouds.azurecompute.arm.compute.functions.LocationToLocation;
-import org.jclouds.azurecompute.arm.compute.functions.NetworkSecurityGroupToSecurityGroup;
-import org.jclouds.azurecompute.arm.compute.functions.NetworkSecurityRuleToIpPermission;
-import org.jclouds.azurecompute.arm.compute.functions.VMHardwareToHardware;
-import org.jclouds.azurecompute.arm.compute.functions.VMImageToImage;
-import org.jclouds.azurecompute.arm.compute.functions.VirtualMachineToNodeMetadata;
-import org.jclouds.azurecompute.arm.compute.loaders.CreateSecurityGroupIfNeeded;
-import org.jclouds.azurecompute.arm.compute.loaders.DefaultResourceGroup;
-import org.jclouds.azurecompute.arm.compute.options.AzureTemplateOptions;
-import org.jclouds.azurecompute.arm.compute.strategy.CreateResourcesThenCreateNodes;
-import org.jclouds.azurecompute.arm.domain.Location;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityGroup;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityRule;
-import org.jclouds.azurecompute.arm.domain.ResourceGroup;
-import org.jclouds.azurecompute.arm.domain.VMHardware;
-import org.jclouds.azurecompute.arm.domain.VMImage;
-import org.jclouds.azurecompute.arm.domain.VirtualMachine;
-import org.jclouds.compute.ComputeService;
-import org.jclouds.compute.ComputeServiceAdapter;
-import org.jclouds.compute.config.ComputeServiceAdapterContextModule;
-import org.jclouds.compute.domain.Hardware;
-import org.jclouds.compute.domain.NodeMetadata;
-import org.jclouds.compute.domain.SecurityGroup;
-import org.jclouds.compute.extensions.ImageExtension;
-import org.jclouds.compute.extensions.SecurityGroupExtension;
-import org.jclouds.compute.functions.NodeAndTemplateOptionsToStatement;
-import org.jclouds.compute.functions.NodeAndTemplateOptionsToStatementWithoutPublicKey;
-import org.jclouds.compute.options.TemplateOptions;
-import org.jclouds.compute.strategy.CreateNodesInGroupThenAddToSet;
-import org.jclouds.net.domain.IpPermission;
-import org.jclouds.util.PasswordGenerator;
-
-import com.google.common.base.Function;
-import com.google.common.cache.CacheBuilder;
-import com.google.common.cache.CacheLoader;
-import com.google.common.cache.LoadingCache;
-import com.google.inject.Provides;
-import com.google.inject.TypeLiteral;
-
-public class AzureComputeServiceContextModule extends
- ComputeServiceAdapterContextModule<VirtualMachine, VMHardware, VMImage, Location> {
-
- @Override
- protected void configure() {
- super.configure();
-
- bind(new TypeLiteral<ComputeServiceAdapter<VirtualMachine, VMHardware, VMImage, Location>>() {
- }).to(AzureComputeServiceAdapter.class);
-
- bind(new TypeLiteral<Function<VMImage, org.jclouds.compute.domain.Image>>() {
- }).to(VMImageToImage.class);
- bind(new TypeLiteral<Function<VMHardware, Hardware>>() {
- }).to(VMHardwareToHardware.class);
- bind(new TypeLiteral<Function<VirtualMachine, NodeMetadata>>() {
- }).to(VirtualMachineToNodeMetadata.class);
- bind(new TypeLiteral<Function<Location, org.jclouds.domain.Location>>() {
- }).to(LocationToLocation.class);
- bind(new TypeLiteral<Function<NetworkSecurityGroup, SecurityGroup>>() {
- }).to(NetworkSecurityGroupToSecurityGroup.class);
- bind(new TypeLiteral<Function<NetworkSecurityRule, IpPermission>>() {
- }).to(NetworkSecurityRuleToIpPermission.class);
- bind(ComputeService.class).to(AzureComputeService.class);
-
- install(new LocationsFromComputeServiceAdapterModule<VirtualMachine, VMHardware, VMImage, Location>() {
- });
-
- bind(TemplateOptions.class).to(AzureTemplateOptions.class);
- bind(NodeAndTemplateOptionsToStatement.class).to(NodeAndTemplateOptionsToStatementWithoutPublicKey.class);
- bind(CreateNodesInGroupThenAddToSet.class).to(CreateResourcesThenCreateNodes.class);
-
- bind(new TypeLiteral<CacheLoader<ResourceGroupAndNameAndIngressRules, String>>() {
- }).to(CreateSecurityGroupIfNeeded.class);
- bind(new TypeLiteral<CacheLoader<String, ResourceGroup>>() {
- }).to(DefaultResourceGroup.class);
-
- bind(new TypeLiteral<ImageExtension>() {
- }).to(AzureComputeImageExtension.class);
- bind(new TypeLiteral<SecurityGroupExtension>() {
- }).to(AzureComputeSecurityGroupExtension.class);
- }
-
- @Provides
- @Singleton
- protected PasswordGenerator.Config providePasswordGenerator() {
- // Guest passwords must be between 6-72 characters long.
- // Must contain an upper case character.
- // Must contain a lower case character.
- // Must contain a numeric digit.
- // Must contain a special character. Control characters are not allowed.
- return new PasswordGenerator()
- .lower().min(2).max(10)
- .upper().min(2).max(10)
- .numbers().min(2).max(10)
- .symbols().min(2).max(10);
- }
-
- @Provides
- @Singleton
- protected final LoadingCache<ResourceGroupAndNameAndIngressRules, String> securityGroupMap(
- CacheLoader<ResourceGroupAndNameAndIngressRules, String> in) {
- return CacheBuilder.newBuilder().build(in);
- }
-
- @Provides
- @Singleton
- protected final LoadingCache<String, ResourceGroup> defaultResourceGroup(CacheLoader<String, ResourceGroup> in) {
- return CacheBuilder.newBuilder().build(in);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/config/AzurePredicatesModule.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/config/AzurePredicatesModule.java
deleted file mode 100644
index c8dfd6e..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/config/AzurePredicatesModule.java
+++ /dev/null
@@ -1,602 +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.compute.config;
-
-import com.google.common.annotations.VisibleForTesting;
-import com.google.common.base.Predicate;
-import com.google.common.base.Supplier;
-import com.google.common.collect.Iterables;
-import com.google.inject.AbstractModule;
-import com.google.inject.Provides;
-import com.google.inject.name.Named;
-
-import org.jclouds.compute.reference.ComputeServiceConstants;
-import org.jclouds.compute.reference.ComputeServiceConstants.PollPeriod;
-
-import org.jclouds.azurecompute.arm.domain.Image;
-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.Vault;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineInstance;
-import org.jclouds.azurecompute.arm.functions.ParseJobStatus;
-import org.jclouds.azurecompute.arm.AzureComputeApi;
-import org.jclouds.azurecompute.arm.domain.Key.DeletedKeyBundle;
-import org.jclouds.azurecompute.arm.domain.Key.KeyBundle;
-import org.jclouds.azurecompute.arm.domain.Secret.DeletedSecretBundle;
-import org.jclouds.azurecompute.arm.domain.Secret.SecretBundle;
-import org.jclouds.azurecompute.arm.domain.Certificate.DeletedCertificateBundle;
-import org.jclouds.azurecompute.arm.domain.Certificate.CertificateBundle;
-import org.jclouds.azurecompute.arm.domain.Certificate.CertificateOperation;
-
-import java.net.URI;
-import java.util.List;
-
-import static org.jclouds.util.Predicates2.retry;
-import static org.jclouds.compute.config.ComputeServiceProperties.TIMEOUT_NODE_RUNNING;
-import static org.jclouds.compute.config.ComputeServiceProperties.TIMEOUT_NODE_TERMINATED;
-import static org.jclouds.compute.config.ComputeServiceProperties.TIMEOUT_NODE_SUSPENDED;
-import static org.jclouds.compute.config.ComputeServiceProperties.TIMEOUT_IMAGE_AVAILABLE;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.TIMEOUT_RESOURCE_DELETED;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.OPERATION_TIMEOUT;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.VAULT_DELETE_STATUS;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.VAULT_KEY_DELETED_STATUS;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.VAULT_KEY_RECOVERABLE_STATUS;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.VAULT_SECRET_DELETE_STATUS;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.VAULT_SECRET_RECOVERABLE_STATUS;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.VAULT_CERTIFICATE_DELETE_STATUS;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.VAULT_CERTIFICATE_RECOVERABLE_STATUS;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.VAULT_CERTIFICATE_OPERATION_STATUS;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-public class AzurePredicatesModule extends AbstractModule {
- protected void configure() {
- }
-
- @Provides
- @Named(TIMEOUT_NODE_RUNNING)
- protected VirtualMachineInStatePredicateFactory provideVirtualMachineRunningPredicate(final AzureComputeApi api,
- final ComputeServiceConstants.Timeouts timeouts, final PollPeriod pollPeriod) {
- return new VirtualMachineInStatePredicateFactory(api, VirtualMachineInstance.PowerState.RUNNING, timeouts.nodeRunning,
- pollPeriod.pollInitialPeriod, pollPeriod.pollMaxPeriod);
- }
-
- @Provides
- @Named(TIMEOUT_NODE_TERMINATED)
- protected Predicate<URI> provideNodeTerminatedPredicate(final AzureComputeApi api, final ComputeServiceConstants.Timeouts timeouts,
- final PollPeriod pollPeriod) {
- return retry(new ActionDonePredicate(api), timeouts.nodeTerminated, pollPeriod.pollInitialPeriod,
- pollPeriod.pollMaxPeriod);
- }
-
- @Provides
- @Named(TIMEOUT_IMAGE_AVAILABLE)
- protected Predicate<URI> provideImageCapturedPredicate(final AzureComputeApi api, final ComputeServiceConstants.Timeouts timeouts,
- final PollPeriod pollPeriod) {
- return retry(new ImageCapturedPredicate(api), timeouts.imageAvailable, pollPeriod.pollInitialPeriod,
- pollPeriod.pollMaxPeriod);
- }
-
- @Provides
- @Named(TIMEOUT_RESOURCE_DELETED)
- protected Predicate<URI> provideResourceDeletedPredicate(final AzureComputeApi api, final ComputeServiceConstants.Timeouts timeouts,
- final PollPeriod pollPeriod) {
- return retry(new ActionDonePredicate(api), timeouts.nodeTerminated, pollPeriod.pollInitialPeriod,
- pollPeriod.pollMaxPeriod);
- }
-
- @Provides
- @Named(TIMEOUT_NODE_SUSPENDED)
- protected VirtualMachineInStatePredicateFactory provideNodeSuspendedPredicate(final AzureComputeApi api,
- final ComputeServiceConstants.Timeouts timeouts, final PollPeriod pollPeriod) {
- return new VirtualMachineInStatePredicateFactory(api, VirtualMachineInstance.PowerState.STOPPED, timeouts.nodeTerminated,
- pollPeriod.pollInitialPeriod, pollPeriod.pollMaxPeriod);
- }
-
- @Provides
- protected PublicIpAvailablePredicateFactory providePublicIpAvailablePredicate(final AzureComputeApi api,
- Predicate<Supplier<Provisionable>> resourceAvailable) {
- return new PublicIpAvailablePredicateFactory(api, resourceAvailable);
- }
-
- @Provides
- protected SecurityGroupAvailablePredicateFactory provideSecurityGroupAvailablePredicate(final AzureComputeApi api,
- Predicate<Supplier<Provisionable>> resourceAvailable) {
- return new SecurityGroupAvailablePredicateFactory(api, resourceAvailable);
- }
-
- @Provides
- protected ImageAvailablePredicateFactory provideImageAvailablePredicate(final AzureComputeApi api,
- Predicate<Supplier<Provisionable>> resourceAvailable, final ComputeServiceConstants.Timeouts timeouts, final PollPeriod pollPeriod) {
- return new ImageAvailablePredicateFactory(api, retry(new ResourceInStatusPredicate("Succeeded"),
- timeouts.imageAvailable, pollPeriod.pollInitialPeriod, pollPeriod.pollMaxPeriod));
- }
-
- @Provides
- protected Predicate<Supplier<Provisionable>> provideResourceAvailablePredicate(final AzureComputeApi api,
- @Named(OPERATION_TIMEOUT) Integer operationTimeout, PollPeriod pollPeriod) {
- return retry(new ResourceInStatusPredicate("Succeeded"), operationTimeout, pollPeriod.pollInitialPeriod,
- pollPeriod.pollMaxPeriod);
- }
-
- @VisibleForTesting
- static class ActionDonePredicate implements Predicate<URI> {
-
- private final AzureComputeApi api;
-
- public ActionDonePredicate(final AzureComputeApi api) {
- this.api = checkNotNull(api, "api must not be null");
- }
-
- @Override
- public boolean apply(final URI uri) {
- checkNotNull(uri, "uri cannot be null");
- return ParseJobStatus.JobStatus.DONE == api.getJobApi().jobStatus(uri)
- || ParseJobStatus.JobStatus.NO_CONTENT == api.getJobApi().jobStatus(uri);
- }
- }
-
- @VisibleForTesting
- static class ImageCapturedPredicate implements Predicate<URI> {
-
- private final AzureComputeApi api;
-
- public ImageCapturedPredicate(final AzureComputeApi api) {
- this.api = checkNotNull(api, "api must not be null");
- }
-
- @Override
- public boolean apply(final URI uri) {
- checkNotNull(uri, "uri cannot be null");
- if (api.getJobApi().jobStatus(uri) != ParseJobStatus.JobStatus.DONE) {
- return false;
- }
- List<ResourceDefinition> definitions = api.getJobApi().captureStatus(uri);
- return definitions != null;
- }
- }
-
- public static class VirtualMachineInStatePredicateFactory {
-
- private final AzureComputeApi api;
- private final VirtualMachineInstance.PowerState powerState;
- private final long timeout;
- private final long period;
- private final long maxPeriod;
-
- VirtualMachineInStatePredicateFactory(final AzureComputeApi api, final VirtualMachineInstance.PowerState powerState, final long timeout,
- final long period, final long maxPeriod) {
- this.api = checkNotNull(api, "api cannot be null");
- this.powerState = checkNotNull(powerState, "powerState cannot be null");
- this.timeout = timeout;
- this.period = period;
- this.maxPeriod = maxPeriod;
- }
-
- public Predicate<String> create(final String azureGroup) {
- return retry(new Predicate<String>() {
- @Override
- public boolean apply(final String name) {
- checkNotNull(name, "name cannot be null");
- VirtualMachineInstance vmInstance = api.getVirtualMachineApi(azureGroup).getInstanceDetails(name);
- if (vmInstance == null) {
- return false;
- }
- return powerState == vmInstance.powerState();
- }
- }, timeout, period, maxPeriod);
- }
- }
-
- public static class ResourceInStatusPredicate implements Predicate<Supplier<Provisionable>> {
- private final String expectedStatus;
-
- ResourceInStatusPredicate(String expectedStatus) {
- this.expectedStatus = checkNotNull(expectedStatus, "expectedStatus cannot be null");
- }
-
- @Override
- public boolean apply(Supplier<Provisionable> provisionableSupplier) {
- checkNotNull(provisionableSupplier, "provisionableSupplier supplier cannot be null");
- Provisionable provisionable = provisionableSupplier.get();
- return provisionable != null && provisionable.provisioningState().equalsIgnoreCase(expectedStatus);
- }
- }
-
- public static class PublicIpAvailablePredicateFactory {
- private final AzureComputeApi api;
- private final Predicate<Supplier<Provisionable>> resourceAvailable;
-
- PublicIpAvailablePredicateFactory(final AzureComputeApi api, Predicate<Supplier<Provisionable>> resourceAvailable) {
- this.api = checkNotNull(api, "api cannot be null");
- this.resourceAvailable = resourceAvailable;
- }
-
- public Predicate<String> create(final String azureGroup) {
- checkNotNull(azureGroup, "azureGroup cannot be null");
- return new Predicate<String>() {
- @Override
- public boolean apply(final String name) {
- checkNotNull(name, "name cannot be null");
- return resourceAvailable.apply(new Supplier<Provisionable>() {
- @Override
- public Provisionable get() {
- PublicIPAddress publicIp = api.getPublicIPAddressApi(azureGroup).get(name);
- return publicIp == null ? null : publicIp.properties();
- }
- });
- }
- };
- }
- }
-
- public static class SecurityGroupAvailablePredicateFactory {
- private final AzureComputeApi api;
- private final Predicate<Supplier<Provisionable>> resourceAvailable;
-
- SecurityGroupAvailablePredicateFactory(final AzureComputeApi api,
- Predicate<Supplier<Provisionable>> resourceAvailable) {
- this.api = checkNotNull(api, "api cannot be null");
- this.resourceAvailable = resourceAvailable;
- }
-
- public Predicate<String> create(final String resourceGroup) {
- checkNotNull(resourceGroup, "resourceGroup cannot be null");
- return new Predicate<String>() {
- @Override
- public boolean apply(final String name) {
- checkNotNull(name, "name cannot be null");
- return resourceAvailable.apply(new Supplier<Provisionable>() {
- @Override
- public Provisionable get() {
- NetworkSecurityGroup sg = api.getNetworkSecurityGroupApi(resourceGroup).get(name);
- return sg == null ? null : sg.properties();
- }
- });
- }
- };
- }
- }
-
- public static class ImageAvailablePredicateFactory {
- private final AzureComputeApi api;
- private final Predicate<Supplier<Provisionable>> resourceAvailable;
-
- ImageAvailablePredicateFactory(final AzureComputeApi api,
- Predicate<Supplier<Provisionable>> resourceAvailable) {
- this.api = checkNotNull(api, "api cannot be null");
- this.resourceAvailable = resourceAvailable;
- }
-
- public Predicate<String> create(final String resourceGroup) {
- checkNotNull(resourceGroup, "resourceGroup cannot be null");
- return new Predicate<String>() {
- @Override
- public boolean apply(final String name) {
- checkNotNull(name, "name cannot be null");
- return resourceAvailable.apply(new Supplier<Provisionable>() {
- @Override
- public Provisionable get() {
- Image img = api.getVirtualMachineImageApi(resourceGroup).get(name);
- return img == null ? null : img.properties();
- }
- });
- }
- };
- }
- }
-
- @Provides
- @Named(VAULT_DELETE_STATUS)
- protected VaultPredicates.DeletedVaultStatusPredicateFactory provideDeletedVaultStatusPredicateFactory(final AzureComputeApi api,
- @Named(OPERATION_TIMEOUT) Integer operationTimeout,
- final PollPeriod pollPeriod) {
- return new VaultPredicates.DeletedVaultStatusPredicateFactory(api, operationTimeout.longValue(), pollPeriod.pollInitialPeriod, pollPeriod.pollMaxPeriod);
- }
-
- public static class VaultPredicates {
- public static class DeletedVaultStatusPredicateFactory {
- private final AzureComputeApi api;
- private final long operationTimeout;
- private final long initialPeriod;
- private final long maxPeriod;
-
- DeletedVaultStatusPredicateFactory(final AzureComputeApi api, final long operationTimeout, final long initialPeriod, final long maxPeriod) {
- this.api = checkNotNull(api, "api cannot be null");
- this.operationTimeout = operationTimeout;
- this.initialPeriod = initialPeriod;
- this.maxPeriod = maxPeriod;
- }
-
- public Predicate<String> create(final String resourceGroup, final boolean shouldBePresent) {
- checkNotNull(resourceGroup, "resourceGroup cannot be null");
- return retry(new Predicate<String>() {
- @Override
- public boolean apply(final String name) {
- checkNotNull(name, "name cannot be null");
- boolean present = false;
- List<Vault.DeletedVault> vaults = api.getVaultApi(resourceGroup).listDeletedVaults();
- return shouldBePresent == Iterables.any(vaults, new Predicate<Vault.DeletedVault>() {
- @Override public boolean apply(Vault.DeletedVault input) {
- return input.name().equals(name);
- }
- });
- }
- }, operationTimeout, initialPeriod, maxPeriod);
- }
- }
- }
-
- @Provides
- @Named(VAULT_KEY_DELETED_STATUS)
- protected VaultKeyPredicates.DeletedKeyStatusPredicateFactory provideDeletedKeyStatusPredicateFactory(final AzureComputeApi api,
- @Named(OPERATION_TIMEOUT) Integer operationTimeout,
- final PollPeriod pollPeriod) {
- return new VaultKeyPredicates.DeletedKeyStatusPredicateFactory(api, operationTimeout.longValue(), pollPeriod.pollInitialPeriod, pollPeriod.pollMaxPeriod);
- }
-
- @Provides
- @Named(VAULT_KEY_RECOVERABLE_STATUS)
- protected VaultKeyPredicates.RecoverableKeyStatusPredicateFactory provideRecoverableKeyStatusPredicateFactory(final AzureComputeApi api,
- @Named(OPERATION_TIMEOUT) Integer operationTimeout,
- final PollPeriod pollPeriod) {
- return new VaultKeyPredicates.RecoverableKeyStatusPredicateFactory(api, operationTimeout.longValue(), pollPeriod.pollInitialPeriod, pollPeriod.pollMaxPeriod);
- }
-
- public static class VaultKeyPredicates {
- public static class DeletedKeyStatusPredicateFactory {
- private final AzureComputeApi api;
- private final long operationTimeout;
- private final long initialPeriod;
- private final long maxPeriod;
-
- DeletedKeyStatusPredicateFactory(final AzureComputeApi api, final long operationTimeout, final long initialPeriod, final long maxPeriod) {
- this.api = checkNotNull(api, "api cannot be null");
- this.operationTimeout = operationTimeout;
- this.initialPeriod = initialPeriod;
- this.maxPeriod = maxPeriod;
- }
-
- public Predicate<String> create(final String resourceGroup, final URI vaultUri, final boolean shouldBePresent) {
- checkNotNull(resourceGroup, "resourceGroup cannot be null");
- checkNotNull(vaultUri, "vaultUri cannot be null");
- return retry(new Predicate<String>() {
- @Override
- public boolean apply(final String name) {
- checkNotNull(name, "name cannot be null");
- boolean present = false;
- DeletedKeyBundle key = api.getVaultApi(resourceGroup).getDeletedKey(vaultUri, name);
- return shouldBePresent == (key != null);
- }
- }, operationTimeout, initialPeriod, maxPeriod);
- }
- }
-
- public static class RecoverableKeyStatusPredicateFactory {
- private final AzureComputeApi api;
- private final long operationTimeout;
- private final long initialPeriod;
- private final long maxPeriod;
-
- RecoverableKeyStatusPredicateFactory(final AzureComputeApi api, final long operationTimeout, final long initialPeriod, final long maxPeriod) {
- this.api = checkNotNull(api, "api cannot be null");
- this.operationTimeout = operationTimeout;
- this.initialPeriod = initialPeriod;
- this.maxPeriod = maxPeriod;
- }
-
- public Predicate<String> create(final String resourceGroup, final URI vaultUri, final boolean isRecovered) {
- checkNotNull(resourceGroup, "resourceGroup cannot be null");
- checkNotNull(vaultUri, "vaultUri cannot be null");
- return retry(new Predicate<String>() {
- @Override
- public boolean apply(final String name) {
- checkNotNull(name, "name cannot be null");
- boolean result = false;
- KeyBundle key = api.getVaultApi(resourceGroup).getKey(vaultUri, name);
- return key != null ? (isRecovered ? true : key.attributes().recoveryLevel().contains("Recoverable")) : false;
- }
- }, operationTimeout, initialPeriod, maxPeriod);
- }
- }
- }
-
- @Provides
- @Named(VAULT_SECRET_DELETE_STATUS)
- protected VaultSecretPredicates.DeletedSecretStatusPredicateFactory provideDeletedSecretStatusPredicateFactory(final AzureComputeApi api,
- @Named(OPERATION_TIMEOUT) Integer operationTimeout,
- final PollPeriod pollPeriod) {
- return new VaultSecretPredicates.DeletedSecretStatusPredicateFactory(api, operationTimeout.longValue(), pollPeriod.pollInitialPeriod, pollPeriod.pollMaxPeriod);
- }
-
- @Provides
- @Named(VAULT_SECRET_RECOVERABLE_STATUS)
- protected VaultSecretPredicates.RecoverableSecretStatusPredicateFactory provideRecoverableSecretStatusPredicateFactory(final AzureComputeApi api,
- @Named(OPERATION_TIMEOUT) Integer operationTimeout,
- final PollPeriod pollPeriod) {
- return new VaultSecretPredicates.RecoverableSecretStatusPredicateFactory(api, operationTimeout.longValue(), pollPeriod.pollInitialPeriod, pollPeriod.pollMaxPeriod);
- }
-
- public static class VaultSecretPredicates {
- public static class DeletedSecretStatusPredicateFactory {
- private final AzureComputeApi api;
- private final long operationTimeout;
- private final long initialPeriod;
- private final long maxPeriod;
-
- DeletedSecretStatusPredicateFactory(final AzureComputeApi api, final long operationTimeout, final long initialPeriod, final long maxPeriod) {
- this.api = checkNotNull(api, "api cannot be null");
- this.operationTimeout = operationTimeout;
- this.initialPeriod = initialPeriod;
- this.maxPeriod = maxPeriod;
- }
-
- public Predicate<String> create(final String resourceGroup, final URI vaultUri, final boolean shouldBePresent) {
- checkNotNull(resourceGroup, "resourceGroup cannot be null");
- checkNotNull(vaultUri, "vaultUri cannot be null");
- return retry(new Predicate<String>() {
- @Override
- public boolean apply(final String name) {
- boolean present = false;
- checkNotNull(name, "name cannot be null");
- DeletedSecretBundle secret = api.getVaultApi(resourceGroup).getDeletedSecret(vaultUri, name);
- return shouldBePresent == (secret != null);
- }
- }, operationTimeout, initialPeriod, maxPeriod);
- }
- }
-
- public static class RecoverableSecretStatusPredicateFactory {
- private final AzureComputeApi api;
- private final long operationTimeout;
- private final long initialPeriod;
- private final long maxPeriod;
-
- RecoverableSecretStatusPredicateFactory(final AzureComputeApi api, final long operationTimeout, final long initialPeriod, final long maxPeriod) {
- this.api = checkNotNull(api, "api cannot be null");
- this.operationTimeout = operationTimeout;
- this.initialPeriod = initialPeriod;
- this.maxPeriod = maxPeriod;
- }
-
- public Predicate<String> create(final String resourceGroup, final URI vaultUri, final boolean isRecovered) {
- checkNotNull(resourceGroup, "resourceGroup cannot be null");
- checkNotNull(vaultUri, "vaultUri cannot be null");
- return retry(new Predicate<String>() {
- @Override
- public boolean apply(final String name) {
- checkNotNull(name, "name cannot be null");
- SecretBundle secret = api.getVaultApi(resourceGroup).getSecret(vaultUri, name, null);
- return secret != null ? (isRecovered ? true : secret.attributes().recoveryLevel().contains("Recoverable")) : false;
- }
- }, operationTimeout, initialPeriod, maxPeriod);
- }
- }
- }
-
- @Provides
- @Named(VAULT_CERTIFICATE_DELETE_STATUS)
- protected VaultCertificatePredicates.DeletedCertificateStatusPredicateFactory provideDeletedCertificateStatusPredicateFactory(final AzureComputeApi api,
- @Named(OPERATION_TIMEOUT) Integer operationTimeout,
- final PollPeriod pollPeriod) {
- return new VaultCertificatePredicates.DeletedCertificateStatusPredicateFactory(api, operationTimeout.longValue(), pollPeriod.pollInitialPeriod, pollPeriod.pollMaxPeriod);
- }
-
- @Provides
- @Named(VAULT_CERTIFICATE_RECOVERABLE_STATUS)
- protected VaultCertificatePredicates.RecoverableCertificateStatusPredicateFactory provideRecoverableCertificateStatusPredicateFactory(final AzureComputeApi api,
- @Named(OPERATION_TIMEOUT) Integer operationTimeout,
- final PollPeriod pollPeriod) {
- return new VaultCertificatePredicates.RecoverableCertificateStatusPredicateFactory(api, operationTimeout.longValue(), pollPeriod.pollInitialPeriod, pollPeriod.pollMaxPeriod);
- }
-
- @Provides
- @Named(VAULT_CERTIFICATE_OPERATION_STATUS)
- protected VaultCertificatePredicates.CertificateOperationStatusPredicateFactory provideCertificateOperationStatusPredicateFactory(final AzureComputeApi api,
- @Named(OPERATION_TIMEOUT) Integer operationTimeout,
- final PollPeriod pollPeriod) {
- return new VaultCertificatePredicates.CertificateOperationStatusPredicateFactory(api, operationTimeout.longValue(), pollPeriod.pollInitialPeriod, pollPeriod.pollMaxPeriod);
- }
-
- public static class VaultCertificatePredicates {
- public static class DeletedCertificateStatusPredicateFactory {
- private final AzureComputeApi api;
- private final long operationTimeout;
- private final long initialPeriod;
- private final long maxPeriod;
-
- DeletedCertificateStatusPredicateFactory(final AzureComputeApi api, final long operationTimeout, final long initialPeriod, final long maxPeriod) {
- this.api = checkNotNull(api, "api cannot be null");
- this.operationTimeout = operationTimeout;
- this.initialPeriod = initialPeriod;
- this.maxPeriod = maxPeriod;
- }
-
- public Predicate<String> create(final String resourceGroup, final URI vaultUri, final boolean shouldBePresent) {
- checkNotNull(resourceGroup, "resourceGroup cannot be null");
- checkNotNull(vaultUri, "vaultUri cannot be null");
- return retry(new Predicate<String>() {
- @Override
- public boolean apply(final String name) {
- boolean present = false;
- checkNotNull(name, "name cannot be null");
- DeletedCertificateBundle cert = api.getVaultApi(resourceGroup).getDeletedCertificate(vaultUri, name);
- return shouldBePresent == (cert != null);
- }
- }, operationTimeout, initialPeriod, maxPeriod);
- }
- }
-
- public static class RecoverableCertificateStatusPredicateFactory {
- private final AzureComputeApi api;
- private final long operationTimeout;
- private final long initialPeriod;
- private final long maxPeriod;
-
- RecoverableCertificateStatusPredicateFactory(final AzureComputeApi api, final long operationTimeout, final long initialPeriod, final long maxPeriod) {
- this.api = checkNotNull(api, "api cannot be null");
- this.operationTimeout = operationTimeout;
- this.initialPeriod = initialPeriod;
- this.maxPeriod = maxPeriod;
- }
-
- public Predicate<String> create(final String resourceGroup, final URI vaultUri, final boolean isImport) {
- checkNotNull(resourceGroup, "resourceGroup cannot be null");
- checkNotNull(vaultUri, "vaultUri cannot be null");
- return retry(new Predicate<String>() {
- @Override
- public boolean apply(final String name) {
- checkNotNull(name, "name cannot be null");
- CertificateBundle cert = api.getVaultApi(resourceGroup).getCertificate(vaultUri, name, null);
- return cert != null ? (isImport ? true : cert.attributes().recoveryLevel().contains("Recoverable")) : false;
-
- }
- }, operationTimeout, initialPeriod, maxPeriod);
- }
- }
-
- public static class CertificateOperationStatusPredicateFactory {
- private final AzureComputeApi api;
- private final long operationTimeout;
- private final long initialPeriod;
- private final long maxPeriod;
-
- CertificateOperationStatusPredicateFactory(final AzureComputeApi api, final long operationTimeout, final long initialPeriod, final long maxPeriod) {
- this.api = checkNotNull(api, "api cannot be null");
- this.operationTimeout = operationTimeout;
- this.initialPeriod = initialPeriod;
- this.maxPeriod = maxPeriod;
- }
-
- public Predicate<String> create(final String resourceGroup, final URI vaultUri, final boolean isCreate) {
- checkNotNull(resourceGroup, "resourceGroup cannot be null");
- checkNotNull(vaultUri, "vaultUri cannot be null");
- return retry(new Predicate<String>() {
- @Override
- public boolean apply(final String name) {
- checkNotNull(name, "name cannot be null");
- boolean result = false;
- CertificateOperation certOp = api.getVaultApi(resourceGroup).getCertificateOperation(vaultUri, name);
- return isCreate ? ((certOp != null) ? !certOp.status().equals("inProgress") : false) : (certOp == null);
- }
- }, operationTimeout, initialPeriod, maxPeriod);
- }
- }
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/domain/LocationAndName.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/domain/LocationAndName.java
deleted file mode 100644
index 0142448..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/domain/LocationAndName.java
+++ /dev/null
@@ -1,50 +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.compute.domain;
-
-import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import com.google.auto.value.AutoValue;
-import com.google.common.base.Splitter;
-import com.google.common.collect.Iterables;
-
-@AutoValue
-public abstract class LocationAndName {
-
- public abstract String location();
- public abstract String name();
-
- protected LocationAndName() {
-
- }
-
- public static LocationAndName fromSlashEncoded(String id) {
- Iterable<String> parts = Splitter.on('/').split(checkNotNull(id, "id"));
- checkArgument(Iterables.size(parts) == 2, "id must be in format location/name");
- return new AutoValue_LocationAndName(Iterables.get(parts, 0), Iterables.get(parts, 1));
- }
-
- public static LocationAndName fromLocationAndName(String location, String name) {
- return new AutoValue_LocationAndName(location, name);
- }
-
- public String slashEncode() {
- return location() + "/" + name();
- }
-
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/domain/ResourceGroupAndName.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/domain/ResourceGroupAndName.java
deleted file mode 100644
index c06056e..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/domain/ResourceGroupAndName.java
+++ /dev/null
@@ -1,50 +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.compute.domain;
-
-import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import com.google.auto.value.AutoValue;
-import com.google.common.base.Splitter;
-import com.google.common.collect.Iterables;
-
-@AutoValue
-public abstract class ResourceGroupAndName {
-
- public abstract String resourceGroup();
- public abstract String name();
-
- protected ResourceGroupAndName() {
-
- }
-
- public static ResourceGroupAndName fromSlashEncoded(String id) {
- Iterable<String> parts = Splitter.on('/').split(checkNotNull(id, "id"));
- checkArgument(Iterables.size(parts) == 2, "id must be in format resourcegroup/name");
- return new AutoValue_ResourceGroupAndName(Iterables.get(parts, 0), Iterables.get(parts, 1));
- }
-
- public static ResourceGroupAndName fromResourceGroupAndName(String resourceGroup, String name) {
- return new AutoValue_ResourceGroupAndName(resourceGroup, name);
- }
-
- public String slashEncode() {
- return resourceGroup() + "/" + name();
- }
-
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/domain/ResourceGroupAndNameAndIngressRules.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/domain/ResourceGroupAndNameAndIngressRules.java
deleted file mode 100644
index 7c11642..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/domain/ResourceGroupAndNameAndIngressRules.java
+++ /dev/null
@@ -1,74 +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.compute.domain;
-
-import static org.jclouds.azurecompute.arm.compute.domain.ResourceGroupAndName.fromResourceGroupAndName;
-
-import java.util.Arrays;
-
-import com.google.auto.value.AutoValue;
-import com.google.common.base.Objects;
-
-@AutoValue
-public abstract class ResourceGroupAndNameAndIngressRules {
-
- abstract ResourceGroupAndName resourceGroupAndName(); // Intentionally hidden
-
- public abstract String location();
-
- @SuppressWarnings("mutable")
- public abstract int[] inboundPorts();
-
- ResourceGroupAndNameAndIngressRules() {
-
- }
-
- public static ResourceGroupAndNameAndIngressRules create(String resourceGroup, String location, String name,
- int[] inboundPorts) {
- return new AutoValue_ResourceGroupAndNameAndIngressRules(fromResourceGroupAndName(resourceGroup, name), location,
- Arrays.copyOf(inboundPorts, inboundPorts.length));
- }
-
- public String name() {
- return resourceGroupAndName().name();
- }
-
- public String resourceGroup() {
- return resourceGroupAndName().resourceGroup();
- }
-
- // Intentionally delegate equals and hashcode to the fields in the parent
- // class so that we can search only by region/id in a map
-
- @Override
- public int hashCode() {
- return Objects.hashCode(resourceGroup(), name());
- }
-
- @Override
- public boolean equals(Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof ResourceGroupAndName)) {
- return false;
- }
- ResourceGroupAndName that = (ResourceGroupAndName) obj;
- return Objects.equal(resourceGroup(), that.resourceGroup()) && Objects.equal(name(), that.name());
- }
-
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/extensions/AzureComputeImageExtension.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/extensions/AzureComputeImageExtension.java
deleted file mode 100644
index 6cba2c4..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/extensions/AzureComputeImageExtension.java
+++ /dev/null
@@ -1,134 +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.compute.extensions;
-
-import static com.google.common.base.Functions.compose;
-import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Preconditions.checkState;
-import static org.jclouds.azurecompute.arm.compute.domain.ResourceGroupAndName.fromSlashEncoded;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.TIMEOUT_RESOURCE_DELETED;
-import static org.jclouds.compute.config.ComputeServiceProperties.TIMEOUT_NODE_SUSPENDED;
-
-import java.net.URI;
-import java.util.concurrent.Callable;
-
-import javax.annotation.Resource;
-
-import org.jclouds.Constants;
-import org.jclouds.azurecompute.arm.AzureComputeApi;
-import org.jclouds.azurecompute.arm.compute.config.AzurePredicatesModule.ImageAvailablePredicateFactory;
-import org.jclouds.azurecompute.arm.compute.config.AzurePredicatesModule.VirtualMachineInStatePredicateFactory;
-import org.jclouds.azurecompute.arm.compute.domain.ResourceGroupAndName;
-import org.jclouds.azurecompute.arm.compute.functions.CustomImageToVMImage;
-import org.jclouds.azurecompute.arm.domain.IdReference;
-import org.jclouds.azurecompute.arm.domain.ImageProperties;
-import org.jclouds.azurecompute.arm.domain.VMImage;
-import org.jclouds.azurecompute.arm.domain.VirtualMachine;
-import org.jclouds.compute.domain.CloneImageTemplate;
-import org.jclouds.compute.domain.Image;
-import org.jclouds.compute.domain.ImageTemplate;
-import org.jclouds.compute.domain.ImageTemplateBuilder;
-import org.jclouds.compute.extensions.ImageExtension;
-import org.jclouds.compute.reference.ComputeServiceConstants;
-import org.jclouds.logging.Logger;
-
-import com.google.common.base.Function;
-import com.google.common.base.Predicate;
-import com.google.common.util.concurrent.ListenableFuture;
-import com.google.common.util.concurrent.ListeningExecutorService;
-import com.google.inject.Inject;
-import com.google.inject.name.Named;
-
-public class AzureComputeImageExtension implements ImageExtension {
- public static final String CUSTOM_IMAGE_OFFER = "custom";
-
- @Resource
- @Named(ComputeServiceConstants.COMPUTE_LOGGER)
- protected Logger logger = Logger.NULL;
-
- private final AzureComputeApi api;
- private final ListeningExecutorService userExecutor;
- private final ImageAvailablePredicateFactory imageAvailablePredicate;
- private final VirtualMachineInStatePredicateFactory nodeSuspendedPredicate;
- private final Function<VMImage, Image> vmImageToImage;
- private final Predicate<URI> resourceDeleted;
- private final CustomImageToVMImage customImagetoVmImage;
-
- @Inject
- AzureComputeImageExtension(AzureComputeApi api, ImageAvailablePredicateFactory imageAvailablePredicate,
- @Named(TIMEOUT_NODE_SUSPENDED) VirtualMachineInStatePredicateFactory nodeSuspendedPredicate,
- @Named(Constants.PROPERTY_USER_THREADS) ListeningExecutorService userExecutor,
- Function<VMImage, Image> vmImageToImage, @Named(TIMEOUT_RESOURCE_DELETED) Predicate<URI> resourceDeleted,
- CustomImageToVMImage customImagetoVmImage) {
- this.api = api;
- this.imageAvailablePredicate = imageAvailablePredicate;
- this.nodeSuspendedPredicate = nodeSuspendedPredicate;
- this.userExecutor = userExecutor;
- this.vmImageToImage = vmImageToImage;
- this.resourceDeleted = resourceDeleted;
- this.customImagetoVmImage = customImagetoVmImage;
- }
-
- @Override
- public ImageTemplate buildImageTemplateFromNode(String name, String id) {
- return new ImageTemplateBuilder.CloneImageTemplateBuilder().nodeId(id).name(name.toLowerCase()).build();
- }
-
- @Override
- public ListenableFuture<Image> createImage(ImageTemplate template) {
- final CloneImageTemplate cloneTemplate = (CloneImageTemplate) template;
- final ResourceGroupAndName resourceGroupAndName = fromSlashEncoded(cloneTemplate.getSourceNodeId());
- final String resourceGroupName = resourceGroupAndName.resourceGroup();
- final String vmName = resourceGroupAndName.name();
-
- final VirtualMachine vm = api.getVirtualMachineApi(resourceGroupName).get(vmName);
- final IdReference vmIdRef = IdReference.create(vm.id());
-
- logger.debug(">> stopping node %s...", cloneTemplate.getSourceNodeId());
- api.getVirtualMachineApi(resourceGroupName).stop(vmName);
- checkState(nodeSuspendedPredicate.create(resourceGroupName).apply(vmName),
- "Node %s was not suspended within the configured time limit", cloneTemplate.getSourceNodeId());
-
- return userExecutor.submit(new Callable<Image>() {
- @Override
- public Image call() throws Exception {
- logger.debug(">> generalizing virtal machine %s...", vmName);
-
- api.getVirtualMachineApi(resourceGroupName).generalize(vmName);
-
- org.jclouds.azurecompute.arm.domain.Image imageFromVM = api.getVirtualMachineImageApi(resourceGroupName)
- .createOrUpdate(cloneTemplate.getName(), vm.location(),
- ImageProperties.builder().sourceVirtualMachine(vmIdRef).build());
-
- checkState(imageAvailablePredicate.create(resourceGroupName).apply(imageFromVM.name()),
- "Image for node %s was not created within the configured time limit", cloneTemplate.getName());
-
- return compose(vmImageToImage, customImagetoVmImage).apply(imageFromVM);
- }
- });
- }
-
- @Override
- public boolean deleteImage(String id) {
- VMImage image = VMImage.decodeFieldsFromUniqueId(id);
- checkArgument(image.custom(), "Only custom images can be deleted");
-
- logger.debug(">> deleting image %s", id);
- URI uri = api.getVirtualMachineImageApi(image.resourceGroup()).delete(image.name());
- return resourceDeleted.apply(uri);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/extensions/AzureComputeSecurityGroupExtension.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/extensions/AzureComputeSecurityGroupExtension.java
deleted file mode 100644
index b31e2a0..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/extensions/AzureComputeSecurityGroupExtension.java
+++ /dev/null
@@ -1,345 +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.compute.extensions;
-
-import static com.google.common.base.Preconditions.checkState;
-import static com.google.common.base.Predicates.equalTo;
-import static com.google.common.base.Predicates.notNull;
-import static com.google.common.collect.Iterables.any;
-import static com.google.common.collect.Iterables.filter;
-import static com.google.common.collect.Iterables.transform;
-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.IdReference.extractResourceGroup;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
-import javax.annotation.Resource;
-import javax.inject.Inject;
-import javax.inject.Named;
-
-import org.jclouds.azurecompute.arm.AzureComputeApi;
-import org.jclouds.azurecompute.arm.compute.config.AzurePredicatesModule.SecurityGroupAvailablePredicateFactory;
-import org.jclouds.azurecompute.arm.compute.domain.ResourceGroupAndName;
-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.NetworkSecurityGroupProperties;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityRule;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityRuleProperties;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityRuleProperties.Access;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityRuleProperties.Direction;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityRuleProperties.Protocol;
-import org.jclouds.azurecompute.arm.domain.ResourceGroup;
-import org.jclouds.azurecompute.arm.domain.VirtualMachine;
-import org.jclouds.azurecompute.arm.features.NetworkSecurityGroupApi;
-import org.jclouds.azurecompute.arm.features.NetworkSecurityRuleApi;
-import org.jclouds.compute.domain.SecurityGroup;
-import org.jclouds.compute.domain.SecurityGroupBuilder;
-import org.jclouds.compute.extensions.SecurityGroupExtension;
-import org.jclouds.compute.reference.ComputeServiceConstants;
-import org.jclouds.domain.Location;
-import org.jclouds.location.Region;
-import org.jclouds.logging.Logger;
-import org.jclouds.net.domain.IpPermission;
-import org.jclouds.net.domain.IpProtocol;
-
-import com.google.common.base.Function;
-import com.google.common.base.Objects;
-import com.google.common.base.Predicate;
-import com.google.common.base.Supplier;
-import com.google.common.cache.LoadingCache;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Multimap;
-import com.google.common.collect.Ordering;
-
-public class AzureComputeSecurityGroupExtension implements SecurityGroupExtension {
- @Resource
- @Named(ComputeServiceConstants.COMPUTE_LOGGER)
- protected Logger logger = Logger.NULL;
-
- private final AzureComputeApi api;
- private final Function<NetworkSecurityGroup, SecurityGroup> securityGroupConverter;
- private final SecurityGroupAvailablePredicateFactory securityGroupAvailable;
- private final Predicate<URI> resourceDeleted;
- private final LoadingCache<String, ResourceGroup> defaultResourceGroup;
- private final Supplier<Set<String>> regionIds;
-
- @Inject
- AzureComputeSecurityGroupExtension(AzureComputeApi api,
- Function<NetworkSecurityGroup, SecurityGroup> groupConverter,
- SecurityGroupAvailablePredicateFactory securityRuleAvailable,
- @Named(TIMEOUT_RESOURCE_DELETED) Predicate<URI> resourceDeleted,
- LoadingCache<String, ResourceGroup> defaultResourceGroup,
- @Region Supplier<Set<String>> regionIds) {
- this.api = api;
- this.securityGroupConverter = groupConverter;
- this.securityGroupAvailable = securityRuleAvailable;
- this.resourceDeleted = resourceDeleted;
- this.defaultResourceGroup = defaultResourceGroup;
- this.regionIds = regionIds;
- }
-
- @Override
- public Set<SecurityGroup> listSecurityGroupsInLocation(Location location) {
- return securityGroupsInLocations(ImmutableSet.of(location.getId()));
- }
-
- @Override
- public Set<SecurityGroup> listSecurityGroups() {
- return securityGroupsInLocations(regionIds.get());
- }
-
- private Set<SecurityGroup> securityGroupsInLocations(final Set<String> locations) {
- List<SecurityGroup> securityGroups = new ArrayList<SecurityGroup>();
- for (ResourceGroup rg : api.getResourceGroupApi().list()) {
- securityGroups.addAll(securityGroupsInResourceGroup(rg.name()));
- }
-
- return ImmutableSet.copyOf(filter(securityGroups, new Predicate<SecurityGroup>() {
- @Override
- public boolean apply(SecurityGroup input) {
- return locations.contains(input.getLocation().getId());
- }
- }));
- }
-
- private Set<SecurityGroup> securityGroupsInResourceGroup(String resourceGroup) {
- List<NetworkSecurityGroup> networkGroups = api.getNetworkSecurityGroupApi(resourceGroup).list();
- return ImmutableSet.copyOf(transform(filter(networkGroups, notNull()), securityGroupConverter));
- }
-
- @Override
- public Set<SecurityGroup> listSecurityGroupsForNode(String nodeId) {
- logger.debug(">> getting security groups for node %s...", nodeId);
-
- final ResourceGroupAndName resourceGroupAndName = ResourceGroupAndName.fromSlashEncoded(nodeId);
-
- VirtualMachine vm = api.getVirtualMachineApi(resourceGroupAndName.resourceGroup()).get(
- resourceGroupAndName.name());
- if (vm == null) {
- throw new IllegalArgumentException("Node " + nodeId + " was not found");
- }
- List<NetworkInterface> networkInterfaces = vm.properties().networkProfile().networkInterfaces();
- List<NetworkSecurityGroup> networkGroups = new ArrayList<NetworkSecurityGroup>();
-
- for (NetworkInterface networkInterfaceCardIdReference : networkInterfaces) {
- String nicName = extractName(networkInterfaceCardIdReference.id());
- String nicResourceGroup = extractResourceGroup(networkInterfaceCardIdReference.id());
- NetworkInterfaceCard card = api.getNetworkInterfaceCardApi(nicResourceGroup).get(nicName);
- if (card != null && card.properties().networkSecurityGroup() != null) {
- String secGroupName = card.properties().networkSecurityGroup().name();
- String sgResourceGroup = card.properties().networkSecurityGroup().resourceGroup();
- NetworkSecurityGroup group = api.getNetworkSecurityGroupApi(sgResourceGroup).get(secGroupName);
- networkGroups.add(group);
- }
- }
-
- return ImmutableSet.copyOf(transform(filter(networkGroups, notNull()), securityGroupConverter));
- }
-
- @Override
- public SecurityGroup getSecurityGroupById(String id) {
- logger.debug(">> getting security group %s...", id);
- final ResourceGroupAndName resourceGroupAndName = ResourceGroupAndName.fromSlashEncoded(id);
- NetworkSecurityGroup securityGroup = api.getNetworkSecurityGroupApi(resourceGroupAndName.resourceGroup()).get(
- resourceGroupAndName.name());
- return securityGroup == null ? null : securityGroupConverter.apply(securityGroup);
- }
-
- @Override
- public SecurityGroup createSecurityGroup(String name, Location location) {
- ResourceGroup resourceGroup = defaultResourceGroup.getUnchecked(location.getId());
-
- logger.debug(">> creating security group %s in %s...", name, location);
-
- SecurityGroupBuilder builder = new SecurityGroupBuilder();
- builder.name(name);
- builder.location(location);
-
- NetworkSecurityGroup sg = api.getNetworkSecurityGroupApi(resourceGroup.name()).createOrUpdate(name,
- location.getId(), null, NetworkSecurityGroupProperties.builder().build());
-
- checkState(securityGroupAvailable.create(resourceGroup.name()).apply(name),
- "Security group was not created in the configured timeout");
-
- return securityGroupConverter.apply(sg);
- }
-
- @Override
- public boolean removeSecurityGroup(String id) {
- logger.debug(">> deleting security group %s...", id);
-
- final ResourceGroupAndName resourceGroupAndName = ResourceGroupAndName.fromSlashEncoded(id);
- URI uri = api.getNetworkSecurityGroupApi(resourceGroupAndName.resourceGroup())
- .delete(resourceGroupAndName.name());
-
- // https://docs.microsoft.com/en-us/rest/api/network/virtualnetwork/delete-a-network-security-group
- if (uri != null) {
- // 202-Accepted if resource exists and the request is accepted.
- return resourceDeleted.apply(uri);
- } else {
- // 204-No Content if resource does not exist.
- return false;
- }
- }
-
- @Override
- public SecurityGroup addIpPermission(IpPermission ipPermission, SecurityGroup group) {
- return addIpPermission(ipPermission.getIpProtocol(), ipPermission.getFromPort(), ipPermission.getToPort(),
- ipPermission.getTenantIdGroupNamePairs(), ipPermission.getCidrBlocks(), ipPermission.getGroupIds(), group);
- }
-
- @Override
- public SecurityGroup removeIpPermission(IpPermission ipPermission, SecurityGroup group) {
- return removeIpPermission(ipPermission.getIpProtocol(), ipPermission.getFromPort(), ipPermission.getToPort(),
- ipPermission.getTenantIdGroupNamePairs(), ipPermission.getCidrBlocks(), ipPermission.getGroupIds(), group);
- }
-
- @Override
- public SecurityGroup addIpPermission(IpProtocol protocol, int startPort, int endPort,
- Multimap<String, String> tenantIdGroupNamePairs, Iterable<String> ipRanges, Iterable<String> groupIds,
- SecurityGroup group) {
- String portRange = startPort + "-" + endPort;
- String ruleName = "ingress-" + protocol.name().toLowerCase() + "-" + portRange;
-
- logger.debug(">> adding ip permission [%s] to %s...", ruleName, group.getName());
-
- // TODO: Support Azure network tags somehow?
-
- final ResourceGroupAndName resourceGroupAndName = ResourceGroupAndName.fromSlashEncoded(group.getId());
-
- NetworkSecurityGroupApi groupApi = api.getNetworkSecurityGroupApi(resourceGroupAndName.resourceGroup());
- NetworkSecurityGroup networkSecurityGroup = groupApi.get(resourceGroupAndName.name());
-
- if (networkSecurityGroup == null) {
- throw new IllegalArgumentException("Security group " + group.getName() + " was not found");
- }
-
- NetworkSecurityRuleApi ruleApi = api.getNetworkSecurityRuleApi(resourceGroupAndName.resourceGroup(), networkSecurityGroup.name());
- int nextPriority = getRuleStartingPriority(networkSecurityGroup);
-
- for (String ipRange : ipRanges) {
- NetworkSecurityRuleProperties properties = NetworkSecurityRuleProperties.builder()
- .protocol(Protocol.fromValue(protocol.name()))
- .sourceAddressPrefix(ipRange)
- .sourcePortRange("*")
- .destinationAddressPrefix("*")
- .destinationPortRange(portRange)
- .direction(Direction.Inbound)
- .access(Access.Allow)
- .priority(nextPriority++)
- .build();
-
- logger.debug(">> creating network security rule %s for %s...", ruleName, ipRange);
-
- ruleApi.createOrUpdate(ruleName, properties);
-
- checkState(
- securityGroupAvailable.create(resourceGroupAndName.resourceGroup()).apply(networkSecurityGroup.name()),
- "Security group was not updated in the configured timeout");
- }
-
- return getSecurityGroupById(group.getId());
- }
-
- @Override
- public SecurityGroup removeIpPermission(final IpProtocol protocol, int startPort, int endPort,
- Multimap<String, String> tenantIdGroupNamePairs, final Iterable<String> ipRanges, Iterable<String> groupIds,
- SecurityGroup group) {
- final String portRange = startPort + "-" + endPort;
- String ruleName = "ingress-" + protocol.name().toLowerCase() + "-" + portRange;
-
- logger.debug(">> deleting ip permissions matching [%s] from %s...", ruleName, group.getName());
-
- final ResourceGroupAndName resourceGroupAndName = ResourceGroupAndName.fromSlashEncoded(group.getId());
-
- NetworkSecurityGroupApi groupApi = api.getNetworkSecurityGroupApi(resourceGroupAndName.resourceGroup());
- NetworkSecurityGroup networkSecurityGroup = groupApi.get(resourceGroupAndName.name());
-
- if (networkSecurityGroup == null) {
- throw new IllegalArgumentException("Security group " + group.getName() + " was not found");
- }
-
- NetworkSecurityRuleApi ruleApi = api.getNetworkSecurityRuleApi(resourceGroupAndName.resourceGroup(),
- networkSecurityGroup.name());
- Iterable<NetworkSecurityRule> rules = filter(ruleApi.list(), new Predicate<NetworkSecurityRule>() {
- @Override
- public boolean apply(NetworkSecurityRule input) {
- NetworkSecurityRuleProperties props = input.properties();
- return Objects.equal(portRange, props.destinationPortRange())
- && Objects.equal(Protocol.fromValue(protocol.name()), props.protocol())
- && Objects.equal(Direction.Inbound, props.direction()) //
- && Objects.equal(Access.Allow, props.access())
- && any(ipRanges, equalTo(props.sourceAddressPrefix().replace("*", "0.0.0.0/0")));
- }
- });
-
- for (NetworkSecurityRule matchingRule : rules) {
- logger.debug(">> deleting network security rule %s from %s...", matchingRule.name(), group.getName());
- ruleApi.delete(matchingRule.name());
- checkState(
- securityGroupAvailable.create(resourceGroupAndName.resourceGroup()).apply(networkSecurityGroup.name()),
- "Security group was not updated in the configured timeout");
- }
-
- return getSecurityGroupById(group.getId());
- }
-
- @Override
- public boolean supportsTenantIdGroupNamePairs() {
- return false;
- }
-
- @Override
- public boolean supportsTenantIdGroupIdPairs() {
- return false;
- }
-
- @Override
- public boolean supportsGroupIds() {
- return false;
- }
-
- @Override
- public boolean supportsPortRangesForGroups() {
- return false;
- }
-
- @Override
- public boolean supportsExclusionCidrBlocks() {
- return false;
- }
-
- private int getRuleStartingPriority(NetworkSecurityGroup securityGroup) {
- List<NetworkSecurityRule> existingRules = securityGroup.properties().securityRules();
- return existingRules.isEmpty() ? 100 : rulesByPriority().max(existingRules).properties().priority() + 1;
- }
-
- private static Ordering<NetworkSecurityRule> rulesByPriority() {
- return new Ordering<NetworkSecurityRule>() {
- @Override
- public int compare(NetworkSecurityRule left, NetworkSecurityRule right) {
- return left.properties().priority() - right.properties().priority();
- }
- };
- }
-
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/CustomImageToVMImage.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/CustomImageToVMImage.java
deleted file mode 100644
index 2220535..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/CustomImageToVMImage.java
+++ /dev/null
@@ -1,33 +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.compute.functions;
-
-import static org.jclouds.azurecompute.arm.domain.IdReference.extractResourceGroup;
-
-import org.jclouds.azurecompute.arm.domain.Image;
-import org.jclouds.azurecompute.arm.domain.VMImage;
-
-import com.google.common.base.Function;
-
-public class CustomImageToVMImage implements Function<Image, VMImage> {
-
- @Override
- public VMImage apply(Image input) {
- return VMImage.customImage().resourceGroup(extractResourceGroup(input.id())).customImageId(input.id()).location(input.location()).name(input.name())
- .offer(input.properties().storageProfile().osDisk().osType()).build();
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/LocationToLocation.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/LocationToLocation.java
deleted file mode 100644
index 7c60175..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/LocationToLocation.java
+++ /dev/null
@@ -1,61 +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.compute.functions;
-
-import javax.inject.Inject;
-import javax.inject.Singleton;
-
-import org.jclouds.azurecompute.arm.domain.Location;
-import org.jclouds.azurecompute.arm.domain.Region;
-import org.jclouds.domain.LocationBuilder;
-import org.jclouds.domain.LocationScope;
-import org.jclouds.location.suppliers.all.JustProvider;
-
-import com.google.common.base.Function;
-import com.google.common.collect.ImmutableSet;
-
-import static com.google.common.collect.Iterables.getOnlyElement;
-
-/**
- * Converts an Location into a Location.
- */
-@Singleton
-public class LocationToLocation implements Function<Location, org.jclouds.domain.Location> {
-
- private final JustProvider justProvider;
-
- // allow us to lazy discover the provider of a resource
- @Inject
- LocationToLocation(JustProvider justProvider) {
- this.justProvider = justProvider;
- }
-
- @Override
- public org.jclouds.domain.Location apply(final Location location) {
- final LocationBuilder builder = new LocationBuilder();
- builder.id(location.name());
- builder.description(location.displayName());
- builder.parent(getOnlyElement(justProvider.get()));
- builder.scope(LocationScope.REGION);
- final Region region = Region.byName(location.displayName());
- if (region != null) {
- builder.iso3166Codes(ImmutableSet.of(region.iso3166Code()));
- }
- return builder.build();
- }
-
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/LocationToResourceGroupName.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/LocationToResourceGroupName.java
deleted file mode 100644
index c97850a..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/LocationToResourceGroupName.java
+++ /dev/null
@@ -1,46 +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.compute.functions;
-
-import static org.jclouds.compute.config.ComputeServiceProperties.RESOURCENAME_DELIMITER;
-import static org.jclouds.compute.config.ComputeServiceProperties.RESOURCENAME_PREFIX;
-
-import javax.inject.Inject;
-import javax.inject.Named;
-
-import com.google.common.base.Function;
-
-/**
- * Returns the name of the resource group for the current location.
- */
-public class LocationToResourceGroupName implements Function<String, String> {
-
- private final String prefix;
- private final char delimiter;
-
- @Inject
- LocationToResourceGroupName(@Named(RESOURCENAME_PREFIX) String prefix, @Named(RESOURCENAME_DELIMITER) char delimiter) {
- this.prefix = prefix;
- this.delimiter = delimiter;
- }
-
- @Override
- public String apply(String input) {
- return String.format("%s%s%s", prefix, delimiter, input);
- }
-
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/NetworkSecurityGroupToSecurityGroup.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/NetworkSecurityGroupToSecurityGroup.java
deleted file mode 100644
index d38f94c..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/NetworkSecurityGroupToSecurityGroup.java
+++ /dev/null
@@ -1,73 +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.compute.functions;
-
-import static com.google.common.collect.Iterables.filter;
-import static com.google.common.collect.Iterables.transform;
-import static org.jclouds.azurecompute.arm.compute.domain.ResourceGroupAndName.fromResourceGroupAndName;
-import static org.jclouds.azurecompute.arm.compute.functions.NetworkSecurityRuleToIpPermission.InboundRule;
-import static org.jclouds.azurecompute.arm.compute.functions.VirtualMachineToNodeMetadata.getLocation;
-import static org.jclouds.azurecompute.arm.domain.IdReference.extractResourceGroup;
-
-import java.util.Set;
-
-import javax.inject.Singleton;
-
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityGroup;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityRule;
-import org.jclouds.collect.Memoized;
-import org.jclouds.compute.domain.SecurityGroup;
-import org.jclouds.compute.domain.SecurityGroupBuilder;
-import org.jclouds.domain.Location;
-import org.jclouds.net.domain.IpPermission;
-
-import com.google.common.base.Function;
-import com.google.common.base.Supplier;
-import com.google.inject.Inject;
-
-@Singleton
-public class NetworkSecurityGroupToSecurityGroup implements Function<NetworkSecurityGroup, SecurityGroup> {
- private final Function<NetworkSecurityRule, IpPermission> ruleToPermission;
- private final Supplier<Set<? extends Location>> locations;
-
- @Inject
- NetworkSecurityGroupToSecurityGroup(Function<NetworkSecurityRule, IpPermission> ruleToPermission,
- @Memoized Supplier<Set<? extends Location>> locations) {
- this.ruleToPermission = ruleToPermission;
- this.locations = locations;
- }
-
- @Override
- public SecurityGroup apply(NetworkSecurityGroup input) {
- SecurityGroupBuilder builder = new SecurityGroupBuilder();
-
- builder.id(fromResourceGroupAndName(extractResourceGroup(input.id()), input.name()).slashEncode());
- builder.providerId(input.id());
- builder.name(input.name());
- builder.location(getLocation(locations, input.location()));
-
- if (input.properties().securityRules() != null) {
- // We just support security groups that allow traffic to a set of
- // targets. We don't support deny rules or origin based rules in the
- // security group api.
- builder.ipPermissions(transform(filter(input.properties().securityRules(), InboundRule), ruleToPermission));
- }
-
- return builder.build();
- }
-
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/NetworkSecurityRuleToIpPermission.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/NetworkSecurityRuleToIpPermission.java
deleted file mode 100644
index 10b3174..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/NetworkSecurityRuleToIpPermission.java
+++ /dev/null
@@ -1,76 +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.compute.functions;
-
-import javax.annotation.Resource;
-import javax.inject.Named;
-import javax.inject.Singleton;
-
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityRule;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityRuleProperties.Access;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityRuleProperties.Direction;
-import org.jclouds.compute.reference.ComputeServiceConstants;
-import org.jclouds.logging.Logger;
-import org.jclouds.net.domain.IpPermission;
-import org.jclouds.net.domain.IpProtocol;
-import org.jclouds.net.util.IpPermissions;
-import org.jclouds.net.util.IpPermissions.PortSelection;
-import org.jclouds.net.util.IpPermissions.ToSourceSelection;
-
-import com.google.common.base.Function;
-import com.google.common.base.Predicate;
-
-@Singleton
-public class NetworkSecurityRuleToIpPermission implements Function<NetworkSecurityRule, IpPermission> {
-
- public static final Predicate<NetworkSecurityRule> InboundRule = new Predicate<NetworkSecurityRule>() {
- @Override
- public boolean apply(NetworkSecurityRule input) {
- return Direction.Inbound.equals(input.properties().direction())
- && Access.Allow.equals(input.properties().access());
- }
- };
-
- @Resource
- @Named(ComputeServiceConstants.COMPUTE_LOGGER)
- protected Logger logger = Logger.NULL;
-
- @Override
- public IpPermission apply(final NetworkSecurityRule rule) {
- if (!InboundRule.apply(rule)) {
- logger.warn(">> ignoring non-inbound network security rule %s...", rule.name());
- return null;
- }
-
- IpPermission permissions = IpPermissions.permit(IpProtocol.fromValue(rule.properties().protocol().name()));
-
- String portRange = rule.properties().destinationPortRange();
- if (!"*".equals(portRange)) {
- String[] range = portRange.split("-"); // One single element if it is a single port
- permissions = PortSelection.class.cast(permissions).fromPort(Integer.parseInt(range[0]))
- .to(Integer.parseInt(range[range.length - 1]));
- }
-
- if (!"*".equals(rule.properties().sourceAddressPrefix())) {
- permissions = ToSourceSelection.class.cast(permissions).originatingFromCidrBlock(
- rule.properties().sourceAddressPrefix());
- }
-
- return permissions;
- }
-
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/TemplateToAvailabilitySet.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/TemplateToAvailabilitySet.java
deleted file mode 100644
index 7359ace..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/TemplateToAvailabilitySet.java
+++ /dev/null
@@ -1,94 +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.compute.functions;
-
-import static com.google.common.base.Preconditions.checkArgument;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.annotation.Resource;
-import javax.inject.Inject;
-import javax.inject.Named;
-import javax.inject.Singleton;
-
-import org.jclouds.azurecompute.arm.AzureComputeApi;
-import org.jclouds.azurecompute.arm.compute.options.AzureTemplateOptions;
-import org.jclouds.azurecompute.arm.domain.AvailabilitySet;
-import org.jclouds.compute.domain.Template;
-import org.jclouds.compute.reference.ComputeServiceConstants;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.logging.Logger;
-
-import com.google.common.base.Function;
-
-@Singleton
-public class TemplateToAvailabilitySet implements Function<Template, AvailabilitySet> {
-
- @Resource
- @Named(ComputeServiceConstants.COMPUTE_LOGGER)
- protected Logger logger = Logger.NULL;
-
- private final AzureComputeApi api;
-
- @Inject
- TemplateToAvailabilitySet(AzureComputeApi api) {
- this.api = api;
- }
-
- @Nullable
- @Override
- public AvailabilitySet apply(final Template input) {
- checkArgument(input.getOptions() instanceof AzureTemplateOptions, "An AzureTemplateOptions object is required");
- AzureTemplateOptions options = input.getOptions().as(AzureTemplateOptions.class);
-
- AvailabilitySet availabilitySet = null;
- String location = input.getLocation().getId();
- String resourceGroup = options.getResourceGroup();
-
- if (options.getAvailabilitySetName() != null) {
- availabilitySet = api.getAvailabilitySetApi(resourceGroup).get(options.getAvailabilitySetName());
-
- checkArgument(availabilitySet != null, "No availability set with name '%s' was found", options.getAvailabilitySetName());
- checkArgument(location.equals(availabilitySet.location()), "The availability set %s does not belong to location %s",
- options.getAvailabilitySetName(), location);
-
- } else if (options.getAvailabilitySet() != null) {
- availabilitySet = api.getAvailabilitySetApi(resourceGroup).get(options.getAvailabilitySet().name());
-
- if (availabilitySet != null) {
- checkArgument(location.equals(availabilitySet.location()), "The availability set %s does not belong to location %s",
- options.getAvailabilitySet().name(), location);
- } else {
- Map<String, String> tags = new HashMap<String, String>();
- if (options.getAvailabilitySet().tags() != null) {
- tags.putAll(options.getAvailabilitySet().tags());
- }
- tags.put("jclouds", options.getAvailabilitySet().name());
-
- logger.debug(">> creating availability set [%s]", options.getAvailabilitySet().name());
-
- availabilitySet = api.getAvailabilitySetApi(resourceGroup).createOrUpdate(
- options.getAvailabilitySet().name(), options.getAvailabilitySet().sku(), location, tags,
- options.getAvailabilitySet().properties());
- }
- }
-
- return availabilitySet;
- }
-
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/VMHardwareToHardware.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/VMHardwareToHardware.java
deleted file mode 100644
index d877aba..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/VMHardwareToHardware.java
+++ /dev/null
@@ -1,82 +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.compute.functions;
-
-import static org.jclouds.azurecompute.arm.compute.domain.LocationAndName.fromLocationAndName;
-
-import java.util.Set;
-
-import org.jclouds.azurecompute.arm.domain.VMHardware;
-import org.jclouds.collect.Memoized;
-import org.jclouds.compute.domain.Hardware;
-import org.jclouds.compute.domain.HardwareBuilder;
-import org.jclouds.compute.domain.Processor;
-import org.jclouds.compute.domain.Volume;
-import org.jclouds.compute.domain.VolumeBuilder;
-import org.jclouds.domain.Location;
-import org.jclouds.location.predicates.LocationPredicates;
-
-import com.google.common.base.Function;
-import com.google.common.base.Supplier;
-import com.google.common.collect.FluentIterable;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.inject.Inject;
-
-public class VMHardwareToHardware implements Function<VMHardware, Hardware> {
-
- private final Supplier<Set<? extends Location>> locations;
-
- @Inject
- VMHardwareToHardware(@Memoized final Supplier<Set<? extends Location>> locations) {
- this.locations = locations;
- }
-
- @Override
- public Hardware apply(VMHardware from) {
- final HardwareBuilder builder = new HardwareBuilder()
- .name(from.name())
- .providerId(from.name())
- .id(fromLocationAndName(from.location(), from.name()).slashEncode())
- .processors(ImmutableList.of(new Processor(from.numberOfCores(), 2)))
- .ram(from.memoryInMB())
- .location(FluentIterable.from(locations.get())
- .firstMatch(LocationPredicates.idEquals(from.location()))
- .get());
-
- // No id or providerId from Azure
- if (from.resourceDiskSizeInMB() != null) {
- builder.volume(new VolumeBuilder()
- .size(Float.valueOf(from.resourceDiskSizeInMB()))
- .type(Volume.Type.LOCAL)
- .build());
- }
- if (from.osDiskSizeInMB() != null) {
- builder.volume(new VolumeBuilder()
- .size(Float.valueOf(from.osDiskSizeInMB()))
- .type(Volume.Type.LOCAL)
- .build());
- }
-
- ImmutableMap.Builder<String, String> metadata = ImmutableMap.builder();
- metadata.put("maxDataDiskCount", String.valueOf(from.maxDataDiskCount()));
- builder.userMetadata(metadata.build());
-
- return builder.build();
- }
-
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/VMImageToImage.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/VMImageToImage.java
deleted file mode 100644
index 028ad9c..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/VMImageToImage.java
+++ /dev/null
@@ -1,157 +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.compute.functions;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-import static com.google.common.collect.Iterables.tryFind;
-import static java.util.Arrays.asList;
-import static org.jclouds.location.predicates.LocationPredicates.idEquals;
-
-import java.util.Map;
-import java.util.Set;
-
-import org.jclouds.azurecompute.arm.compute.extensions.AzureComputeImageExtension;
-import org.jclouds.azurecompute.arm.domain.Plan;
-import org.jclouds.azurecompute.arm.domain.VMImage;
-import org.jclouds.collect.Memoized;
-import org.jclouds.compute.domain.Image;
-import org.jclouds.compute.domain.ImageBuilder;
-import org.jclouds.compute.domain.OperatingSystem;
-import org.jclouds.compute.domain.OsFamily;
-import org.jclouds.domain.Location;
-import org.jclouds.javax.annotation.Nullable;
-
-import com.google.common.base.Function;
-import com.google.common.base.Optional;
-import com.google.common.base.Predicate;
-import com.google.common.base.Supplier;
-import com.google.common.collect.FluentIterable;
-import com.google.common.collect.ImmutableMap;
-import com.google.inject.Inject;
-
-public class VMImageToImage implements Function<VMImage, Image> {
-
- private static final Map<String, OsFamily> OTHER_OS_MAP = ImmutableMap.<String, OsFamily> builder()
- .put("openlogic", OsFamily.CENTOS)
- .put("win", OsFamily.WINDOWS)
- .put("sles", OsFamily.SUSE)
- .put("oracle-linux", OsFamily.OEL)
- .build();
-
- private final Supplier<Set<? extends org.jclouds.domain.Location>> locations;
-
- @Inject
- VMImageToImage(@Memoized Supplier<Set<? extends Location>> locations) {
- this.locations = locations;
- }
-
- @Override
- public Image apply(final VMImage image) {
- final ImageBuilder builder = new ImageBuilder();
- addMarketplacePlanToMetadataIfPresent(builder, image);
-
- Location location = FluentIterable.from(locations.get()).firstMatch(idEquals(image.location())).get();
-
- if (image.custom()) {
- builder
- .id(image.encodeFieldsToUniqueIdCustom())
- .providerId(image.customImageId())
- .name(image.name())
- .location(location)
- .description(image.group())
- .status(Image.Status.AVAILABLE)
- .version("latest");
- } else {
- builder
- .id(image.encodeFieldsToUniqueId())
- .providerId(image.publisher())
- .name(image.offer())
- .location(location)
- .description(image.sku())
- .status(Image.Status.AVAILABLE)
- .version(image.sku());
- }
-
- final OperatingSystem.Builder osBuilder = osFamily().apply(image);
- builder.operatingSystem(osBuilder.build());
-
- return builder.build();
- }
-
- private static void addMarketplacePlanToMetadataIfPresent(ImageBuilder builder, VMImage image) {
- if (image.versionProperties() != null && image.versionProperties().plan() != null) {
- // Store the plan information in the metadata so the adapter can
- // properly configure it when deploying images from the marketplace
- Plan plan = image.versionProperties().plan();
- builder.userMetadata(ImmutableMap.of("publisher", plan.publisher(), "name", plan.name(), "product",
- plan.product()));
- }
- }
-
- @Nullable
- public static Plan getMarketplacePlanFromImageMetadata(Image image) {
- Map<String, String> imageMetadata = image.getUserMetadata();
- return imageMetadata.containsKey("product") ? Plan.create(imageMetadata.get("publisher"),
- imageMetadata.get("name"), imageMetadata.get("product")) : null;
- }
-
- public static Function<VMImage, OperatingSystem.Builder> osFamily() {
- return new Function<VMImage, OperatingSystem.Builder>() {
- @Override
- public OperatingSystem.Builder apply(final VMImage image) {
- final String label = checkNotNull(image.offer(), "offer").toLowerCase();
- OsFamily family = findInStandardFamilies(label).or(findInOtherOSMap(label)).or(OsFamily.UNRECOGNIZED);
-
- // Fallback to generic operating system type
- if (OsFamily.UNRECOGNIZED == family && image.versionProperties() != null
- && image.versionProperties().osDiskImage() != null
- && image.versionProperties().osDiskImage().operatingSystem() != null) {
- family = OsFamily.fromValue(image.versionProperties().osDiskImage().operatingSystem().toUpperCase());
- }
-
- // only 64bit OS images are supported by Azure ARM
- return OperatingSystem.builder().family(family).is64Bit(true)
- .description(image.custom() ? AzureComputeImageExtension.CUSTOM_IMAGE_OFFER : image.sku())
- .version(image.custom() ? "latest" : image.sku());
- }
- };
- }
-
- private static Optional<OsFamily> findInStandardFamilies(final String label) {
- return tryFind(asList(OsFamily.values()), new Predicate<OsFamily>() {
- @Override
- public boolean apply(OsFamily input) {
- return label.contains(input.value());
- }
- });
- }
-
- private static Optional<OsFamily> findInOtherOSMap(final String label) {
- return tryFind(OTHER_OS_MAP.keySet(), new Predicate<String>() {
- @Override
- public boolean apply(String input) {
- return label.contains(input);
- }
- }).transform(new Function<String, OsFamily>() {
- @Override
- public OsFamily apply(String input) {
- return OTHER_OS_MAP.get(input);
- }
- });
- }
-
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/VirtualMachineToNodeMetadata.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/VirtualMachineToNodeMetadata.java
deleted file mode 100644
index af43cbb..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/VirtualMachineToNodeMetadata.java
+++ /dev/null
@@ -1,208 +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.compute.functions;
-
-import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Strings.nullToEmpty;
-import static com.google.common.collect.Iterables.find;
-import static org.jclouds.azurecompute.arm.compute.AzureComputeServiceAdapter.GROUP_KEY;
-import static org.jclouds.azurecompute.arm.compute.domain.LocationAndName.fromLocationAndName;
-import static org.jclouds.azurecompute.arm.compute.domain.ResourceGroupAndName.fromResourceGroupAndName;
-import static org.jclouds.azurecompute.arm.domain.IdReference.extractName;
-import static org.jclouds.azurecompute.arm.domain.IdReference.extractResourceGroup;
-import static org.jclouds.compute.util.ComputeServiceUtils.addMetadataAndParseTagsFromCommaDelimitedValue;
-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;
-
-import org.jclouds.azurecompute.arm.AzureComputeApi;
-import org.jclouds.azurecompute.arm.compute.domain.LocationAndName;
-import org.jclouds.azurecompute.arm.compute.functions.VirtualMachineToStatus.StatusAndBackendStatus;
-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.collect.Memoized;
-import org.jclouds.compute.domain.Hardware;
-import org.jclouds.compute.domain.Image;
-import org.jclouds.compute.domain.NodeMetadata;
-import org.jclouds.compute.domain.NodeMetadataBuilder;
-import org.jclouds.compute.functions.GroupNamingConvention;
-import org.jclouds.compute.reference.ComputeServiceConstants;
-import org.jclouds.compute.suppliers.ImageCacheSupplier;
-import org.jclouds.domain.Credentials;
-import org.jclouds.domain.Location;
-import org.jclouds.logging.Logger;
-
-import com.google.common.base.Function;
-import com.google.common.base.Optional;
-import com.google.common.base.Predicate;
-import com.google.common.base.Supplier;
-import com.google.common.collect.Lists;
-
-public class VirtualMachineToNodeMetadata implements Function<VirtualMachine, NodeMetadata> {
-
- @Resource
- @Named(ComputeServiceConstants.COMPUTE_LOGGER)
- protected Logger logger = Logger.NULL;
-
- private final AzureComputeApi api;
- private final GroupNamingConvention nodeNamingConvention;
- private final Supplier<Set<? extends Location>> locations;
- private final Supplier<Map<String, ? extends Hardware>> hardwares;
- private final ImageCacheSupplier imageCache;
- private final VirtualMachineToStatus virtualMachineToStatus;
-
- @Inject
- VirtualMachineToNodeMetadata(AzureComputeApi api, GroupNamingConvention.Factory namingConvention,
- Supplier<Map<String, ? extends Hardware>> hardwares, @Memoized Supplier<Set<? extends Location>> locations,
- Map<String, Credentials> credentialStore, @Memoized Supplier<Set<? extends Image>> imageCache,
- VirtualMachineToStatus virtualMachineToStatus) {
- this.api = api;
- this.nodeNamingConvention = namingConvention.createWithoutPrefix();
- this.locations = locations;
- this.hardwares = hardwares;
- this.virtualMachineToStatus = virtualMachineToStatus;
- checkArgument(imageCache instanceof ImageCacheSupplier,
- "This provider needs an instance of the ImageCacheSupplier");
- this.imageCache = (ImageCacheSupplier) imageCache;
- }
-
- @Override
- public NodeMetadata apply(VirtualMachine virtualMachine) {
- NodeMetadataBuilder builder = new NodeMetadataBuilder();
- builder.id(fromResourceGroupAndName(extractResourceGroup(virtualMachine.id()), virtualMachine.name())
- .slashEncode());
- builder.providerId(virtualMachine.id());
- builder.name(virtualMachine.name());
- builder.hostname(virtualMachine.name());
-
- StatusAndBackendStatus status = virtualMachineToStatus.apply(virtualMachine);
- builder.status(status.status());
- builder.backendStatus(status.backendStatus());
-
- builder.publicAddresses(getPublicIpAddresses(virtualMachine.properties().networkProfile().networkInterfaces()));
- builder.privateAddresses(getPrivateIpAddresses(virtualMachine.properties().networkProfile().networkInterfaces()));
-
- String groupFromMetadata = null;
- if (virtualMachine.tags() != null) {
- addMetadataAndParseTagsFromCommaDelimitedValue(builder, virtualMachine.tags());
- groupFromMetadata = virtualMachine.tags().get(GROUP_KEY);
- }
-
- // Try to read the group from the virtual machine tags, and parse the name
- // if missing
- builder.group(groupFromMetadata != null ? groupFromMetadata : nodeNamingConvention.extractGroup(virtualMachine
- .name()));
-
- String locationName = virtualMachine.location();
- builder.location(getLocation(locations, locationName));
-
- Optional<? extends Image> image = findImage(virtualMachine.properties().storageProfile(), locationName);
-
- if (image.isPresent()) {
- builder.imageId(image.get().getId());
- builder.operatingSystem(image.get().getOperatingSystem());
- } else {
- logger.info(">> image with id %s for virtualmachine %s was not found. "
- + "This might be because the image that was used to create the virtualmachine has a new id.",
- virtualMachine.id(), virtualMachine.id());
- }
-
- builder.hardware(getHardware(fromLocationAndName(virtualMachine.location(), virtualMachine.properties()
- .hardwareProfile().vmSize())));
-
- return builder.build();
- }
-
- private Iterable<String> getPrivateIpAddresses(List<NetworkInterface> networkInterfaces) {
- List<String> privateIpAddresses = Lists.newArrayList();
- for (NetworkInterface networkInterfaceCardIdReference : networkInterfaces) {
- NetworkInterfaceCard networkInterfaceCard = getNetworkInterfaceCard(networkInterfaceCardIdReference);
- if (networkInterfaceCard != null && networkInterfaceCard.properties() != null
- && networkInterfaceCard.properties().ipConfigurations() != null) {
- for (IpConfiguration ipConfiguration : networkInterfaceCard.properties().ipConfigurations()) {
- if (ipConfiguration.properties().privateIPAddress() != null) {
- privateIpAddresses.add(ipConfiguration.properties().privateIPAddress());
- }
- }
- }
- }
- return privateIpAddresses;
- }
-
- private NetworkInterfaceCard getNetworkInterfaceCard(NetworkInterface nic) {
- return api.getNetworkInterfaceCardApi(extractResourceGroup(nic.id())).get(extractName(nic.id()));
- }
-
- private Iterable<String> getPublicIpAddresses(List<NetworkInterface> networkInterfaces) {
- List<String> publicIpAddresses = Lists.newArrayList();
- for (NetworkInterface networkInterfaceCardIdReference : networkInterfaces) {
- NetworkInterfaceCard networkInterfaceCard = getNetworkInterfaceCard(networkInterfaceCardIdReference);
- if (networkInterfaceCard != null && networkInterfaceCard.properties() != null
- && networkInterfaceCard.properties().ipConfigurations() != null) {
- for (IpConfiguration ipConfiguration : networkInterfaceCard.properties().ipConfigurations()) {
- if (ipConfiguration.properties().publicIPAddress() != null) {
- IdReference publicIpId = ipConfiguration.properties().publicIPAddress();
- PublicIPAddress publicIp = api.getPublicIPAddressApi(publicIpId.resourceGroup()).get(
- publicIpId.name());
- if (publicIp != null && publicIp.properties().ipAddress() != null) {
- publicIpAddresses.add(publicIp.properties().ipAddress());
- }
- }
- }
- }
- }
- return publicIpAddresses;
- }
-
- protected static Location getLocation(Supplier<Set<? extends Location>> locations, final String locationName) {
- return find(locations.get(), idEquals(nullToEmpty(locationName)), null);
- }
-
- protected Optional<? extends Image> findImage(final StorageProfile storageProfile, String locatioName) {
- if (storageProfile.imageReference() != null) {
- String imageId = storageProfile.imageReference().customImageId() != null ?
- storageProfile.imageReference().encodeFieldsToUniqueIdCustom(locatioName) :
- storageProfile.imageReference().encodeFieldsToUniqueId(locatioName);
- return imageCache.get(imageId);
- } else {
- logger.warn("could not find image for storage profile %s", storageProfile);
- return Optional.absent();
- }
- }
-
- protected Hardware getHardware(final LocationAndName hardwareId) {
- final String slashEncoded = hardwareId.slashEncode();
- return find(hardwares.get().values(), new Predicate<Hardware>() {
- @Override
- public boolean apply(Hardware input) {
- return input.getId().equals(slashEncoded);
- }
- });
- }
-
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/VirtualMachineToStatus.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/VirtualMachineToStatus.java
deleted file mode 100644
index 9669f50..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/VirtualMachineToStatus.java
+++ /dev/null
@@ -1,116 +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.compute.functions;
-
-import static com.google.common.collect.Iterables.transform;
-import static org.jclouds.azurecompute.arm.domain.IdReference.extractResourceGroup;
-
-import javax.inject.Inject;
-import javax.inject.Singleton;
-
-import org.jclouds.azurecompute.arm.AzureComputeApi;
-import org.jclouds.azurecompute.arm.compute.functions.VirtualMachineToStatus.StatusAndBackendStatus;
-import org.jclouds.azurecompute.arm.domain.Status;
-import org.jclouds.azurecompute.arm.domain.VirtualMachine;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineInstance;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineInstance.PowerState;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineProperties;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineProperties.ProvisioningState;
-import org.jclouds.compute.domain.NodeMetadata;
-
-import com.google.auto.value.AutoValue;
-import com.google.common.base.Function;
-import com.google.common.base.Functions;
-import com.google.common.base.Joiner;
-import com.google.common.collect.ImmutableMap;
-
-@Singleton
-public class VirtualMachineToStatus implements Function<VirtualMachine, StatusAndBackendStatus> {
-
- @AutoValue
- public abstract static class StatusAndBackendStatus {
- public abstract NodeMetadata.Status status();
-
- public abstract String backendStatus();
-
- public static StatusAndBackendStatus create(NodeMetadata.Status status, String backendStatus) {
- return new AutoValue_VirtualMachineToStatus_StatusAndBackendStatus(status, backendStatus);
- }
- }
-
- // When using the Deployment API to deploy an ARM template, the deployment
- // goes through stages: Accepted -> Running -> Succeeded.
- // Only when the deployment has SUCCEEDED is the resource deployed using the
- // template actually ready.
- // To get details about the resource(s) deployed via template, one needs to
- // query the various resources after the deployment has SUCCEEDED.
- private static final Function<VirtualMachineProperties.ProvisioningState, NodeMetadata.Status> PROVISIONINGSTATE_TO_NODESTATUS = Functions
- .forMap(
- ImmutableMap.<VirtualMachineProperties.ProvisioningState, NodeMetadata.Status> builder()
- .put(VirtualMachineProperties.ProvisioningState.ACCEPTED, NodeMetadata.Status.PENDING)
- .put(VirtualMachineProperties.ProvisioningState.READY, NodeMetadata.Status.PENDING)
- .put(VirtualMachineProperties.ProvisioningState.CREATING, NodeMetadata.Status.PENDING)
- .put(VirtualMachineProperties.ProvisioningState.RUNNING, NodeMetadata.Status.PENDING)
- .put(VirtualMachineProperties.ProvisioningState.UPDATING, NodeMetadata.Status.PENDING)
- .put(VirtualMachineProperties.ProvisioningState.DELETED, NodeMetadata.Status.TERMINATED)
- .put(VirtualMachineProperties.ProvisioningState.CANCELED, NodeMetadata.Status.TERMINATED)
- .put(VirtualMachineProperties.ProvisioningState.FAILED, NodeMetadata.Status.ERROR)
- .put(VirtualMachineProperties.ProvisioningState.UNRECOGNIZED, NodeMetadata.Status.UNRECOGNIZED)
- .build(), NodeMetadata.Status.UNRECOGNIZED);
-
- private static final Function<PowerState, NodeMetadata.Status> POWERSTATE_TO_NODESTATUS = Functions.forMap(
- ImmutableMap.<PowerState, NodeMetadata.Status> builder().put(PowerState.RUNNING, NodeMetadata.Status.RUNNING)
- .put(PowerState.STOPPED, NodeMetadata.Status.SUSPENDED)
- .put(PowerState.UNRECOGNIZED, NodeMetadata.Status.UNRECOGNIZED).build(),
- NodeMetadata.Status.UNRECOGNIZED);
-
- private final AzureComputeApi api;
-
- @Inject
- VirtualMachineToStatus(AzureComputeApi api) {
- this.api = api;
- }
-
- @Override
- public StatusAndBackendStatus apply(VirtualMachine virtualMachine) {
- String resourceGroup = extractResourceGroup(virtualMachine.id());
- ProvisioningState provisioningState = virtualMachine.properties().provisioningState();
-
- NodeMetadata.Status status = PROVISIONINGSTATE_TO_NODESTATUS.apply(provisioningState);
- String backendStatus = provisioningState.name();
-
- if (ProvisioningState.SUCCEEDED.equals(provisioningState)) {
- // If the provisioning succeeded, we need to query the *real* status of
- // the VM
- VirtualMachineInstance instanceDetails = api.getVirtualMachineApi(resourceGroup).getInstanceDetails(
- virtualMachine.name());
- if (instanceDetails != null && instanceDetails.powerState() != null) {
- status = POWERSTATE_TO_NODESTATUS.apply(instanceDetails.powerState());
- backendStatus = Joiner.on(',').join(transform(instanceDetails.statuses(), new Function<Status, String>() {
- @Override
- public String apply(Status input) {
- return input.code();
- }
- }));
- } else {
- status = NodeMetadata.Status.PENDING;
- }
- }
-
- return StatusAndBackendStatus.create(status, backendStatus);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/loaders/CreateSecurityGroupIfNeeded.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/loaders/CreateSecurityGroupIfNeeded.java
deleted file mode 100644
index baba6f9..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/loaders/CreateSecurityGroupIfNeeded.java
+++ /dev/null
@@ -1,100 +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.compute.loaders;
-
-import static com.google.common.base.Preconditions.checkState;
-import static org.jclouds.compute.util.ComputeServiceUtils.getPortRangesFromList;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import javax.annotation.Resource;
-import javax.inject.Inject;
-import javax.inject.Named;
-import javax.inject.Singleton;
-
-import org.jclouds.azurecompute.arm.AzureComputeApi;
-import org.jclouds.azurecompute.arm.compute.config.AzurePredicatesModule.SecurityGroupAvailablePredicateFactory;
-import org.jclouds.azurecompute.arm.compute.domain.ResourceGroupAndNameAndIngressRules;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityGroup;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityGroupProperties;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityRule;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityRuleProperties;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityRuleProperties.Access;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityRuleProperties.Direction;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityRuleProperties.Protocol;
-import org.jclouds.compute.reference.ComputeServiceConstants;
-import org.jclouds.logging.Logger;
-
-import com.google.common.cache.CacheLoader;
-
-@Singleton
-public class CreateSecurityGroupIfNeeded extends CacheLoader<ResourceGroupAndNameAndIngressRules, String> {
- @Resource
- @Named(ComputeServiceConstants.COMPUTE_LOGGER)
- protected Logger logger = Logger.NULL;
-
- private final AzureComputeApi api;
- private final SecurityGroupAvailablePredicateFactory securityGroupAvailable;
-
- @Inject
- CreateSecurityGroupIfNeeded(AzureComputeApi api, SecurityGroupAvailablePredicateFactory securityRuleAvailable) {
- this.api = api;
- this.securityGroupAvailable = securityRuleAvailable;
- }
-
- @Override
- public String load(ResourceGroupAndNameAndIngressRules key) throws Exception {
- return createSecurityGroup(key.location(), key.resourceGroup(), key.name(), key.inboundPorts());
- }
-
- private String createSecurityGroup(String location, String resourceGroup, String name, int[] inboundPorts) {
- logger.debug(">> creating security group %s in %s...", name, location);
-
- Map<Integer, Integer> portRanges = getPortRangesFromList(inboundPorts);
-
- List<NetworkSecurityRule> rules = new ArrayList<NetworkSecurityRule>();
-
- int startPriority = 100;
- for (Map.Entry<Integer, Integer> portRange : portRanges.entrySet()) {
- String range = portRange.getKey() + "-" + portRange.getValue();
- String ruleName = "tcp-" + range;
-
- NetworkSecurityRuleProperties properties = NetworkSecurityRuleProperties.builder().protocol(Protocol.Tcp) //
- .sourceAddressPrefix("*") //
- .sourcePortRange("*") //
- .destinationAddressPrefix("*") //
- .destinationPortRange(range) //
- .direction(Direction.Inbound) //
- .access(Access.Allow) //
- .priority(startPriority++) //
- .build();
-
- rules.add(NetworkSecurityRule.create(ruleName, null, null, properties));
- }
-
- NetworkSecurityGroup securityGroup = api.getNetworkSecurityGroupApi(resourceGroup).createOrUpdate(name, location,
- null, NetworkSecurityGroupProperties.builder().securityRules(rules).build());
-
- checkState(securityGroupAvailable.create(resourceGroup).apply(name),
- "Security group was not created in the configured timeout");
-
- return securityGroup.id();
- }
-
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/loaders/DefaultResourceGroup.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/loaders/DefaultResourceGroup.java
deleted file mode 100644
index 7caec25..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/loaders/DefaultResourceGroup.java
+++ /dev/null
@@ -1,62 +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.compute.loaders;
-
-import java.util.Map;
-
-import javax.annotation.Resource;
-import javax.inject.Inject;
-import javax.inject.Named;
-import javax.inject.Singleton;
-
-import org.jclouds.azurecompute.arm.AzureComputeApi;
-import org.jclouds.azurecompute.arm.compute.functions.LocationToResourceGroupName;
-import org.jclouds.azurecompute.arm.domain.ResourceGroup;
-import org.jclouds.azurecompute.arm.features.ResourceGroupApi;
-import org.jclouds.compute.reference.ComputeServiceConstants;
-import org.jclouds.logging.Logger;
-
-import com.google.common.cache.CacheLoader;
-import com.google.common.collect.ImmutableMap;
-
-@Singleton
-public class DefaultResourceGroup extends CacheLoader<String, ResourceGroup> {
- @Resource
- @Named(ComputeServiceConstants.COMPUTE_LOGGER)
- protected Logger logger = Logger.NULL;
-
- private final ResourceGroupApi api;
- private final LocationToResourceGroupName locationToResourceGroupName;
-
- @Inject
- DefaultResourceGroup(AzureComputeApi api, LocationToResourceGroupName locationToResourceGroupName) {
- this.api = api.getResourceGroupApi();
- this.locationToResourceGroupName = locationToResourceGroupName;
- }
-
- @Override
- public ResourceGroup load(String locationId) throws Exception {
- String azureGroupName = locationToResourceGroupName.apply(locationId);
- ResourceGroup resourceGroup = api.get(azureGroupName);
- if (resourceGroup == null) {
- logger.debug(">> creating resource group %s", azureGroupName);
- final Map<String, String> tags = ImmutableMap.of("description", "jclouds default resource group");
- resourceGroup = api.create(azureGroupName, locationId, tags);
- }
- return resourceGroup;
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/options/AzureTemplateOptions.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/options/AzureTemplateOptions.java
deleted file mode 100644
index b551811..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/options/AzureTemplateOptions.java
+++ /dev/null
@@ -1,324 +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.compute.options;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import java.util.List;
-
-import org.jclouds.azurecompute.arm.domain.AvailabilitySet;
-import org.jclouds.azurecompute.arm.domain.DataDisk;
-import org.jclouds.azurecompute.arm.domain.OSProfile.WindowsConfiguration;
-import org.jclouds.azurecompute.arm.domain.Secrets;
-import org.jclouds.compute.options.TemplateOptions;
-
-import com.google.common.base.MoreObjects;
-import com.google.common.base.Objects;
-import com.google.common.collect.ImmutableList;
-
-/**
- * Azure ARM custom options
- */
-public class AzureTemplateOptions extends TemplateOptions implements Cloneable {
-
- private AvailabilitySet availabilitySet;
- private String availabilitySetName;
- private List<DataDisk> dataDisks = ImmutableList.of();
- private String resourceGroup;
- private List<IpOptions> ipOptions = ImmutableList.of();
- private WindowsConfiguration windowsConfiguration;
- private List<Secrets> secrets = ImmutableList.of();
- private String customData;
-
- /**
- * Sets the availability set where the nodes will be configured. If it does
- * not exist jclouds will create a new one with the given configuration.
- */
- public AzureTemplateOptions availabilitySet(AvailabilitySet availabilitySet) {
- this.availabilitySet = availabilitySet;
- return this;
- }
-
- /**
- * Sets the availability set where the nodes will be configured. The
- * availability set must exist.
- */
- public AzureTemplateOptions availabilitySet(String availabilitySetName) {
- this.availabilitySetName = availabilitySetName;
- return this;
- }
-
- /**
- * The resource group where the new resources will be created.
- */
- public AzureTemplateOptions resourceGroup(String resourceGroup) {
- this.resourceGroup = resourceGroup;
- return this;
- }
-
- public AzureTemplateOptions dataDisks(Iterable<DataDisk> dataDisks) {
- for (DataDisk dataDisk : checkNotNull(dataDisks, "dataDisks"))
- checkNotNull(dataDisk, "all dataDisks must be non-empty");
- this.dataDisks = ImmutableList.copyOf(dataDisks);
- return this;
- }
-
- public AzureTemplateOptions dataDisks(DataDisk... dataDisks) {
- return dataDisks(ImmutableList.copyOf(checkNotNull(dataDisks, "dataDisks")));
- }
-
- /**
- * Configure the NICs that will be attached to the created nodes.
- * <p>
- * Note that the number of NICs that can be attached depends on the size of
- * the virtual machine, and that the guest operating system needs to be
- * prepared to set up all the configured interfaces.
- * <p>
- * Depending on the image being used, a cloud-init or bootstrap script might
- * be needed to make the interface setup.
- */
- public AzureTemplateOptions ipOptions(Iterable<IpOptions> ipOptions) {
- for (IpOptions ipOption : checkNotNull(ipOptions, "ipOptions"))
- checkNotNull(ipOption, "all ipOptions must be non-empty");
- this.ipOptions = ImmutableList.copyOf(ipOptions);
- return this;
- }
-
- /**
- * @see {@link AzureTemplateOptions#ipOptions(Iterable)
-
- */
- public AzureTemplateOptions ipOptions(IpOptions... ipOptions) {
- return ipOptions(ImmutableList.copyOf(checkNotNull(ipOptions, "ipOptions")));
- }
-
- /**
- * Windows configuration parameters
- *
- * @see <a
- * href="https://docs.microsoft.com/en-us/rest/api/compute/virtualmachines/virtualmachines-create-or-update#bk_windowsconfig5">docs</a>
- */
- public AzureTemplateOptions windowsConfiguration(WindowsConfiguration windowsConfiguration) {
- this.windowsConfiguration = windowsConfiguration;
- return this;
- }
-
- /**
- * Import certificates in the Windows Certificate Store
- *
- * @see <a
- * href="https://docs.microsoft.com/en-us/rest/api/compute/virtualmachines/virtualmachines-create-or-update#bk_srcvault">docs</a>
- */
- public AzureTemplateOptions secrets(Iterable<? extends Secrets> secrets) {
- for (Secrets secret : checkNotNull(secrets, "secrets"))
- checkNotNull(secret, "secrets can not be empty");
- this.secrets = ImmutableList.copyOf(secrets);
- return this;
- }
-
- /**
- * Custom data (for cloud-init) for the Azure ARM API
- */
- public AzureTemplateOptions customData(String customData) {
- this.customData = customData;
- return this;
- }
-
- public AvailabilitySet getAvailabilitySet() {
- return availabilitySet;
- }
-
- public String getAvailabilitySetName() {
- return availabilitySetName;
- }
-
- public List<DataDisk> getDataDisks() {
- return dataDisks;
- }
-
- public String getResourceGroup() {
- return resourceGroup;
- }
-
- public List<IpOptions> getIpOptions() {
- return ipOptions;
- }
-
- public WindowsConfiguration getWindowsConfiguration() {
- return windowsConfiguration;
- }
-
- public List<Secrets> getSecrets() {
- return secrets;
- }
-
- public String getCustomData() {
- return customData;
- }
-
- @Override
- public AzureTemplateOptions clone() {
- AzureTemplateOptions options = new AzureTemplateOptions();
- copyTo(options);
- return options;
- }
-
- @Override
- public void copyTo(TemplateOptions to) {
- super.copyTo(to);
- if (to instanceof AzureTemplateOptions) {
- AzureTemplateOptions eTo = AzureTemplateOptions.class.cast(to);
- eTo.availabilitySet(availabilitySet);
- eTo.availabilitySet(availabilitySetName);
- eTo.dataDisks(dataDisks);
- eTo.resourceGroup(resourceGroup);
- eTo.ipOptions(ipOptions);
- eTo.windowsConfiguration(windowsConfiguration);
- eTo.secrets(secrets);
- eTo.customData(customData);
- }
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o)
- return true;
- if (!(o instanceof AzureTemplateOptions))
- return false;
- if (!super.equals(o))
- return false;
-
- AzureTemplateOptions that = (AzureTemplateOptions) o;
-
- return Objects.equal(availabilitySetName, that.availabilitySetName)
- && Objects.equal(resourceGroup, that.resourceGroup) && Objects.equal(availabilitySet, that.availabilitySet)
- && Objects.equal(dataDisks, that.dataDisks) && Objects.equal(ipOptions, that.ipOptions)
- && Objects.equal(windowsConfiguration, that.windowsConfiguration) && Objects.equal(secrets, that.secrets)
- && Objects.equal(this.customData, that.customData);
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(super.hashCode(), availabilitySet, availabilitySetName, dataDisks, resourceGroup,
- ipOptions, customData);
- }
-
- @Override
- public MoreObjects.ToStringHelper string() {
- MoreObjects.ToStringHelper toString = super.string();
- if (availabilitySet != null)
- toString.add("availabilitySet", availabilitySet);
- if (availabilitySetName != null)
- toString.add("availabilitySetName", availabilitySetName);
- if (!dataDisks.isEmpty())
- toString.add("dataDisks", dataDisks);
- if (resourceGroup != null)
- toString.add("resourceGroup", resourceGroup);
- if (!ipOptions.isEmpty())
- toString.add("ipOptions", ipOptions);
- if (windowsConfiguration != null)
- toString.add("windowsConfiguration", windowsConfiguration);
- if (!secrets.isEmpty())
- toString.add("secrets", secrets);
- if (customData != null)
- toString.add("customData", customData);
- return toString;
- }
-
- public static class Builder {
-
- /**
- * @see AzureTemplateOptions#availabilitySet(AvailabilitySet)
- */
- public static AzureTemplateOptions availabilitySet(AvailabilitySet availabilitySet) {
- AzureTemplateOptions options = new AzureTemplateOptions();
- return options.availabilitySet(availabilitySet);
- }
-
- /**
- * @see AzureTemplateOptions#availabilitySet(String)
- */
- public static AzureTemplateOptions availabilitySet(String availabilitySetName) {
- AzureTemplateOptions options = new AzureTemplateOptions();
- return options.availabilitySet(availabilitySetName);
- }
-
- /**
- * @see AzureTemplateOptions#dataDisks(DataDisk...)
- */
- public static AzureTemplateOptions dataDisks(DataDisk... dataDisks) {
- AzureTemplateOptions options = new AzureTemplateOptions();
- return options.dataDisks(dataDisks);
- }
-
- /**
- * @see AzureTemplateOptions#dataDisks(Iterable)
- */
- public static AzureTemplateOptions dataDisks(Iterable<DataDisk> dataDisks) {
- AzureTemplateOptions options = new AzureTemplateOptions();
- return options.dataDisks(dataDisks);
- }
-
- /**
- * @see AzureTemplateOptions#resourceGroup(String)
- */
- public static AzureTemplateOptions resourceGroup(String resourceGroup) {
- AzureTemplateOptions options = new AzureTemplateOptions();
- return options.resourceGroup(resourceGroup);
- }
-
- /**
- * @see AzureTemplateOptions#ipOptions(IpOptions...)
- */
- public static AzureTemplateOptions ipOptions(IpOptions... ipOptions) {
- AzureTemplateOptions options = new AzureTemplateOptions();
- return options.ipOptions(ipOptions);
- }
-
- /**
- * @see AzureTemplateOptions#ipOptions(Iterable)
- */
- public static AzureTemplateOptions ipOptions(Iterable<IpOptions> ipOptions) {
- AzureTemplateOptions options = new AzureTemplateOptions();
- return options.ipOptions(ipOptions);
- }
-
- /**
- * @see AzureTemplateOptions#windowsConfiguration(WindowsConfiguration)
- */
- public static AzureTemplateOptions windowsConfiguration(WindowsConfiguration windowsConfiguration) {
- AzureTemplateOptions options = new AzureTemplateOptions();
- return options.windowsConfiguration(windowsConfiguration);
- }
-
- /**
- * @see AzureTemplateOptions#secrets(List)
- */
- public static AzureTemplateOptions secrets(Iterable<? extends Secrets> secrets) {
- AzureTemplateOptions options = new AzureTemplateOptions();
- return options.secrets(secrets);
- }
-
- /**
- * @see AzureTemplateOptions#customData
- */
- public static AzureTemplateOptions customData(String customData) {
- AzureTemplateOptions options = new AzureTemplateOptions();
- return options.customData(customData);
- }
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/options/IpOptions.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/options/IpOptions.java
deleted file mode 100644
index 73c4c6c..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/options/IpOptions.java
+++ /dev/null
@@ -1,76 +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.compute.options;
-
-import org.jclouds.javax.annotation.Nullable;
-
-import com.google.auto.value.AutoValue;
-import com.google.common.base.Optional;
-
-/**
- * Configures the ip addresses to be configured for the created nodes.
- */
-@AutoValue
-public abstract class IpOptions {
-
- /**
- * The subnet where the NIC will be attached.
- */
- public abstract String subnet();
-
- /**
- * The IP address to be configured, in case of static allocation, or absent
- * for dynamic assignment.
- */
- public abstract Optional<String> address();
-
- /**
- * Flag to indicate if a public ip address should be allocated and bound to
- * this NIC.
- */
- public abstract boolean allocateNewPublicIp();
-
- /**
- * ID of the public IP to associate with the NIC.
- */
- @Nullable
- public abstract String publicIpId();
-
- IpOptions() {
-
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_IpOptions.Builder().address((String) null).allocateNewPublicIp(false);
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
- public abstract Builder subnet(String subnet);
- public abstract Builder allocateNewPublicIp(boolean allocatePublicIp);
- public abstract Builder publicIpId(String publicIpId);
-
- abstract Builder address(Optional<String> address);
- public Builder address(String address) {
- return address(Optional.fromNullable(address));
- }
-
- public abstract IpOptions build();
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/strategy/CleanupResources.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/strategy/CleanupResources.java
deleted file mode 100644
index 3ca1a5d..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/strategy/CleanupResources.java
+++ /dev/null
@@ -1,237 +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.compute.strategy;
-
-import static com.google.common.base.Predicates.not;
-import static com.google.common.base.Predicates.notNull;
-import static com.google.common.collect.Iterables.filter;
-import static com.google.common.collect.Iterables.transform;
-import static com.google.common.collect.Maps.filterValues;
-import static org.jclouds.azurecompute.arm.compute.AzureComputeServiceAdapter.AUTOGENERATED_IP_KEY;
-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.IdReference.extractResourceGroup;
-
-import java.net.URI;
-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;
-import javax.inject.Singleton;
-
-import org.jclouds.azurecompute.arm.AzureComputeApi;
-import org.jclouds.azurecompute.arm.compute.domain.ResourceGroupAndName;
-import org.jclouds.azurecompute.arm.domain.AvailabilitySet;
-import org.jclouds.azurecompute.arm.domain.DataDisk;
-import org.jclouds.azurecompute.arm.domain.IdReference;
-import org.jclouds.azurecompute.arm.domain.IpConfiguration;
-import org.jclouds.azurecompute.arm.domain.ManagedDiskParameters;
-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.features.NetworkSecurityGroupApi;
-import org.jclouds.compute.functions.GroupNamingConvention;
-import org.jclouds.compute.reference.ComputeServiceConstants;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.logging.Logger;
-
-import com.google.common.base.Function;
-import com.google.common.base.Joiner;
-import com.google.common.base.Predicate;
-
-@Singleton
-public class CleanupResources {
-
- @Resource
- @Named(ComputeServiceConstants.COMPUTE_LOGGER)
- protected Logger logger = Logger.NULL;
-
- private final AzureComputeApi api;
- private final Predicate<URI> resourceDeleted;
- private final GroupNamingConvention.Factory namingConvention;
-
- @Inject
- CleanupResources(AzureComputeApi azureComputeApi, @Named(TIMEOUT_RESOURCE_DELETED) Predicate<URI> resourceDeleted,
- GroupNamingConvention.Factory namingConvention) {
- this.api = azureComputeApi;
- this.resourceDeleted = resourceDeleted;
- this.namingConvention = namingConvention;
- }
-
- public boolean cleanupNode(final String id) {
- ResourceGroupAndName resourceGroupAndName = ResourceGroupAndName.fromSlashEncoded(id);
- String resourceGroupName = resourceGroupAndName.resourceGroup();
-
- VirtualMachine virtualMachine = api.getVirtualMachineApi(resourceGroupName).get(resourceGroupAndName.name());
- if (virtualMachine == null) {
- return true;
- }
-
- logger.debug(">> destroying %s ...", id);
- boolean vmDeleted = deleteVirtualMachine(resourceGroupName, virtualMachine);
-
- // We don't delete the network here, as it is global to the resource
- // group. It will be deleted when the resource group is deleted
-
- cleanupVirtualMachineNICs(virtualMachine);
- cleanupManagedDisks(virtualMachine);
- cleanupAvailabilitySetIfOrphaned(virtualMachine);
-
- return vmDeleted;
- }
-
- public boolean cleanupVirtualMachineNICs(VirtualMachine virtualMachine) {
- boolean deleted = true;
- for (NetworkInterface nicRef : virtualMachine.properties().networkProfile().networkInterfaces()) {
- String nicResourceGroup = extractResourceGroup(nicRef.id());
- String nicName = extractName(nicRef.id());
- NetworkInterfaceCard nic = api.getNetworkInterfaceCardApi(nicResourceGroup).get(nicName);
-
- Iterable<IdReference> publicIps = getPublicIps(nic);
-
- logger.debug(">> destroying nic %s...", nicName);
- URI nicDeletionURI = api.getNetworkInterfaceCardApi(nicResourceGroup).delete(nicName);
- deleted &= nicDeletionURI == null || resourceDeleted.apply(nicDeletionURI);
-
- for (IdReference publicIp : publicIps) {
- String publicIpResourceGroup = publicIp.resourceGroup();
- String publicIpName = publicIp.name();
-
- PublicIPAddress ip = api.getPublicIPAddressApi(publicIpResourceGroup).get(publicIpName);
- if (ip.tags() != null && Boolean.parseBoolean(ip.tags().get(AUTOGENERATED_IP_KEY))) {
- logger.debug(">> deleting public ip %s...", publicIpName);
- deleted &= api.getPublicIPAddressApi(publicIpResourceGroup).delete(publicIpName);
- }
- }
- }
- return deleted;
- }
-
- public boolean cleanupManagedDisks(VirtualMachine virtualMachine) {
- Map<String, URI> deleteJobs = new HashMap<String, URI>();
-
- OSDisk osDisk = virtualMachine.properties().storageProfile().osDisk();
- deleteManagedDisk(osDisk.managedDiskParameters(), deleteJobs);
-
- for (DataDisk dataDisk : virtualMachine.properties().storageProfile().dataDisks()) {
- deleteManagedDisk(dataDisk.managedDiskParameters(), deleteJobs);
- }
-
- Set<String> nonDeletedDisks = filterValues(deleteJobs, not(resourceDeleted)).keySet();
- if (!nonDeletedDisks.isEmpty()) {
- logger.warn(">> could not delete disks: %s", Joiner.on(',').join(nonDeletedDisks));
- }
-
- return nonDeletedDisks.isEmpty();
- }
-
- private void deleteManagedDisk(@Nullable ManagedDiskParameters managedDisk, Map<String, URI> deleteJobs) {
- if (managedDisk != null) {
- IdReference diskRef = IdReference.create(managedDisk.id());
- logger.debug(">> deleting managed disk %s...", diskRef.name());
- URI uri = api.getDiskApi(diskRef.resourceGroup()).delete(diskRef.name());
- if (uri != null) {
- deleteJobs.put(diskRef.name(), uri);
- }
- }
- }
-
- public boolean cleanupSecurityGroupIfOrphaned(String resourceGroup, String group) {
- String name = namingConvention.create().sharedNameForGroup(group);
- NetworkSecurityGroupApi sgapi = api.getNetworkSecurityGroupApi(resourceGroup);
-
- boolean deleted = false;
-
- try {
- NetworkSecurityGroup securityGroup = sgapi.get(name);
- if (securityGroup != null) {
- List<NetworkInterfaceCard> nics = securityGroup.properties().networkInterfaces();
- if (nics == null || nics.isEmpty()) {
- logger.debug(">> deleting orphaned security group %s from %s...", name, resourceGroup);
- try {
- deleted = resourceDeleted.apply(sgapi.delete(name));
- } catch (Exception ex) {
- logger.warn(ex, ">> error deleting orphaned security group %s from %s...", name, resourceGroup);
- }
- }
- }
- } catch (Exception ex) {
- logger.warn(ex, "Error deleting security groups for %s and group %s", resourceGroup, group);
- }
-
- return deleted;
- }
-
- public boolean cleanupAvailabilitySetIfOrphaned(VirtualMachine virtualMachine) {
- boolean deleted = true;
- IdReference availabilitySetRef = virtualMachine.properties().availabilitySet();
-
- if (availabilitySetRef != null) {
- String name = availabilitySetRef.name();
- String resourceGroup = availabilitySetRef.resourceGroup();
- AvailabilitySet availabilitySet = api.getAvailabilitySetApi(resourceGroup).get(name);
-
- if (isOrphanedJcloudsAvailabilitySet(availabilitySet)) {
- logger.debug(">> deleting orphaned availability set %s from %s...", name, resourceGroup);
- URI uri = api.getAvailabilitySetApi(resourceGroup).delete(name);
- deleted = uri == null || resourceDeleted.apply(uri);
- }
- }
-
- return deleted;
- }
-
- public boolean deleteResourceGroupIfEmpty(String group) {
- boolean deleted = false;
- if (api.getResourceGroupApi().resources(group).isEmpty()) {
- logger.debug(">> the resource group %s is empty. Deleting...", group);
- deleted = resourceDeleted.apply(api.getResourceGroupApi().delete(group));
- }
- return deleted;
- }
-
- private Iterable<IdReference> getPublicIps(NetworkInterfaceCard nic) {
- return filter(transform(nic.properties().ipConfigurations(), new Function<IpConfiguration, IdReference>() {
- @Override
- public IdReference apply(IpConfiguration input) {
- return input.properties().publicIPAddress();
- }
- }), notNull());
- }
-
- private static boolean isOrphanedJcloudsAvailabilitySet(AvailabilitySet availabilitySet) {
- // We check for the presence of the 'jclouds' tag to make sure we only
- // delete availability sets that were automatically created by jclouds
- return availabilitySet != null
- && availabilitySet.tags() != null
- && availabilitySet.tags().containsKey("jclouds")
- && (availabilitySet.properties().virtualMachines() == null || availabilitySet.properties()
- .virtualMachines().isEmpty());
- }
-
- private boolean deleteVirtualMachine(String group, VirtualMachine virtualMachine) {
- return resourceDeleted.apply(api.getVirtualMachineApi(group).delete(virtualMachine.name()));
- }
-
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/strategy/CreateResourcesThenCreateNodes.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/strategy/CreateResourcesThenCreateNodes.java
deleted file mode 100644
index 511d531..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/strategy/CreateResourcesThenCreateNodes.java
+++ /dev/null
@@ -1,258 +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.compute.strategy;
-
-import java.util.Arrays;
-import java.util.Map;
-import java.util.Set;
-
-import javax.annotation.Resource;
-import javax.inject.Inject;
-import javax.inject.Named;
-import javax.inject.Singleton;
-
-import org.jclouds.Constants;
-import org.jclouds.azurecompute.arm.AzureComputeApi;
-import org.jclouds.azurecompute.arm.compute.domain.ResourceGroupAndName;
-import org.jclouds.azurecompute.arm.compute.domain.ResourceGroupAndNameAndIngressRules;
-import org.jclouds.azurecompute.arm.compute.functions.TemplateToAvailabilitySet;
-import org.jclouds.azurecompute.arm.compute.options.AzureTemplateOptions;
-import org.jclouds.azurecompute.arm.compute.options.IpOptions;
-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.AddressSpace;
-import org.jclouds.azurecompute.arm.domain.VirtualNetwork.VirtualNetworkProperties;
-import org.jclouds.compute.config.CustomizationResponse;
-import org.jclouds.compute.domain.NodeMetadata;
-import org.jclouds.compute.domain.Template;
-import org.jclouds.compute.functions.GroupNamingConvention;
-import org.jclouds.compute.options.TemplateOptions;
-import org.jclouds.compute.reference.ComputeServiceConstants;
-import org.jclouds.compute.strategy.CreateNodeWithGroupEncodedIntoName;
-import org.jclouds.compute.strategy.CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap;
-import org.jclouds.compute.strategy.ListNodesStrategy;
-import org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet;
-import org.jclouds.domain.Location;
-import org.jclouds.logging.Logger;
-import org.jclouds.util.PasswordGenerator;
-
-import com.google.common.annotations.VisibleForTesting;
-import com.google.common.base.Optional;
-import com.google.common.cache.LoadingCache;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Multimap;
-import com.google.common.util.concurrent.ListenableFuture;
-import com.google.common.util.concurrent.ListeningExecutorService;
-
-import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Preconditions.checkState;
-import static com.google.common.collect.Iterables.getOnlyElement;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.DEFAULT_SUBNET_ADDRESS_PREFIX;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.DEFAULT_VNET_ADDRESS_SPACE_PREFIX;
-import static org.jclouds.azurecompute.arm.domain.IdReference.extractName;
-import static org.jclouds.azurecompute.arm.domain.IdReference.extractResourceGroup;
-import static org.jclouds.azurecompute.arm.domain.Subnet.extractVirtualNetwork;
-
-@Singleton
-public class CreateResourcesThenCreateNodes extends CreateNodesWithGroupEncodedIntoNameThenAddToSet {
-
- @Resource
- @Named(ComputeServiceConstants.COMPUTE_LOGGER)
- protected Logger logger = Logger.NULL;
-
- private final AzureComputeApi api;
- private final LoadingCache<ResourceGroupAndNameAndIngressRules, String> securityGroupMap;
- private final String defaultVnetAddressPrefix;
- private final String defaultSubnetAddressPrefix;
- private final TemplateToAvailabilitySet templateToAvailabilitySet;
- private final PasswordGenerator.Config passwordGenerator;
-
- @Inject
- protected CreateResourcesThenCreateNodes(
- CreateNodeWithGroupEncodedIntoName addNodeWithGroupStrategy,
- ListNodesStrategy listNodesStrategy,
- GroupNamingConvention.Factory namingConvention,
- @Named(Constants.PROPERTY_USER_THREADS) ListeningExecutorService userExecutor,
- CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.Factory customizeNodeAndAddToGoodMapOrPutExceptionIntoBadMapFactory,
- AzureComputeApi api, @Named(DEFAULT_VNET_ADDRESS_SPACE_PREFIX) String defaultVnetAddressPrefix,
- @Named(DEFAULT_SUBNET_ADDRESS_PREFIX) String defaultSubnetAddressPrefix,
- LoadingCache<ResourceGroupAndNameAndIngressRules, String> securityGroupMap,
- TemplateToAvailabilitySet templateToAvailabilitySet,
- PasswordGenerator.Config passwordGenerator) {
- super(addNodeWithGroupStrategy, listNodesStrategy, namingConvention, userExecutor,
- customizeNodeAndAddToGoodMapOrPutExceptionIntoBadMapFactory);
- this.api = api;
- this.securityGroupMap = securityGroupMap;
- this.defaultVnetAddressPrefix = defaultVnetAddressPrefix;
- this.defaultSubnetAddressPrefix = defaultSubnetAddressPrefix;
- this.templateToAvailabilitySet = templateToAvailabilitySet;
- this.passwordGenerator = passwordGenerator;
- }
-
- @Override
- public Map<?, ListenableFuture<Void>> execute(String group, int count, Template template,
- Set<NodeMetadata> goodNodes, Map<NodeMetadata, Exception> badNodes,
- Multimap<NodeMetadata, CustomizationResponse> customizationResponses) {
-
- AzureTemplateOptions options = template.getOptions().as(AzureTemplateOptions.class);
-
- // TODO Generate a private key instead. Also no need to use AUTHENTICATE_SUDO in this case.
- generatePasswordIfNoneProvided(template);
-
- // If there is a script to be run on the node and public key
- // authentication has been configured, warn users if the private key
- // is not present
- if (hasRunScriptWithKeyAuthAndNoPrivateKey(template)) {
- logger.warn(">> a runScript was configured but no SSH key has been provided. "
- + "Authentication will delegate to the ssh-agent");
- }
-
- String location = template.getLocation().getId();
-
- createResourceGroupIfNeeded(group, location, options);
-
- normalizeNetworkOptions(options);
- createDefaultNetworkIfNeeded(group, location, options);
-
- configureSecurityGroupForOptions(group, template.getLocation(), options);
- configureAvailabilitySetForTemplate(template);
-
- return super.execute(group, count, template, goodNodes, badNodes, customizationResponses);
- }
-
- // Azure requires that we pass it the VM password. Need to generate one if not overridden by the user.
- private void generatePasswordIfNoneProvided(Template template) {
- TemplateOptions options = template.getOptions();
- if (options.getLoginPassword() == null) {
- Optional<String> passwordOptional = template.getImage().getDefaultCredentials().getOptionalPassword();
- options.overrideLoginPassword(passwordOptional.or(passwordGenerator.generate()));
- }
- }
-
- protected synchronized void createDefaultNetworkIfNeeded(String group, String location, AzureTemplateOptions options) {
- if (options.getIpOptions().isEmpty()) {
- String name = namingConvention.create().sharedNameForGroup(group);
-
- Subnet subnet = Subnet.builder().name(name)
- .properties(SubnetProperties.builder().addressPrefix(defaultSubnetAddressPrefix).build()).build();
-
- VirtualNetworkProperties properties = VirtualNetworkProperties.builder()
- .addressSpace(AddressSpace.create(Arrays.asList(defaultVnetAddressPrefix)))
- .subnets(Arrays.asList(subnet)).build();
-
- logger.debug(">> network options have not been configured. Creating network %s(%s) and subnet %s(%s)", name,
- defaultVnetAddressPrefix, name, defaultSubnetAddressPrefix);
-
- api.getVirtualNetworkApi(options.getResourceGroup()).createOrUpdate(name, location, null, properties);
- Subnet createdSubnet = api.getSubnetApi(options.getResourceGroup(), name).get(name);
-
- options.ipOptions(IpOptions.builder().subnet(createdSubnet.id()).allocateNewPublicIp(true).build());
- }
- }
-
- private static boolean hasRunScriptWithKeyAuthAndNoPrivateKey(Template template) {
- return template.getOptions().getRunScript() != null && template.getOptions().getPublicKey() != null
- && !template.getOptions().hasLoginPrivateKeyOption();
- }
-
- private void configureSecurityGroupForOptions(String group, Location location, AzureTemplateOptions options) {
-
- checkArgument(options.getGroups().size() <= 1,
- "Only one security group can be configured for each network interface");
-
- if (!options.getGroups().isEmpty()) {
- ResourceGroupAndName securityGroupId = ResourceGroupAndName.fromSlashEncoded(getOnlyElement(options.getGroups()));
- NetworkSecurityGroup securityGroup = api.getNetworkSecurityGroupApi(securityGroupId.resourceGroup()).get(
- securityGroupId.name());
- checkArgument(securityGroup != null, "Security group %s was not found", securityGroupId.slashEncode());
- options.securityGroups(securityGroup.id());
- } else if (options.getInboundPorts().length > 0) {
- String name = namingConvention.create().sharedNameForGroup(group);
- ResourceGroupAndNameAndIngressRules regionAndIdAndIngressRules = ResourceGroupAndNameAndIngressRules.create(
- options.getResourceGroup(), location.getId(), name, options.getInboundPorts());
- // this will create if not yet exists.
- String securityGroupId = securityGroupMap.getUnchecked(regionAndIdAndIngressRules);
- options.securityGroups(securityGroupId);
- }
- }
-
- private void configureAvailabilitySetForTemplate(Template template) {
- AvailabilitySet availabilitySet = templateToAvailabilitySet.apply(template);
- if (availabilitySet != null) {
- logger.debug(">> configuring nodes in availability set [%s]", availabilitySet.name());
- template.getOptions().as(AzureTemplateOptions.class).availabilitySet(availabilitySet);
- }
- }
-
- private void createResourceGroupIfNeeded(String group, String location, AzureTemplateOptions options) {
- if (options.getResourceGroup() == null) {
- options.resourceGroup(group);
- }
- logger.debug(">> using resource group [%s]", options.getResourceGroup());
- ResourceGroup rg = api.getResourceGroupApi().get(options.getResourceGroup());
- if (rg == null) {
- logger.debug(">> resource group [%s] does not exist. Creating!", options.getResourceGroup());
- api.getResourceGroupApi().create(options.getResourceGroup(), location,
- ImmutableMap.of("description", "jclouds default resource group"));
- }
- }
-
- @VisibleForTesting
- void normalizeNetworkOptions(AzureTemplateOptions options) {
- if (!options.getNetworks().isEmpty() && !options.getIpOptions().isEmpty()) {
- throw new IllegalArgumentException("The options.networks and options.ipOptions are exclusive");
- }
-
- if (!options.getNetworks().isEmpty()) {
- // The portable interface allows to configure network IDs (subnet IDs),
- // but we don't know the type of the IP configurations to be applied
- // when attaching nodes to those networks. We'll assume private IPs
- // with Dynamic allocation and new public ip address allocated.
- ImmutableList.Builder<IpOptions> ipOptions = ImmutableList.builder();
- for (String subnetId : options.getNetworks()) {
- ipOptions.add(IpOptions.builder().subnet(subnetId).allocateNewPublicIp(true).build());
- }
- options.ipOptions(ipOptions.build());
- }
-
- if (!options.getIpOptions().isEmpty()) {
- // Eagerly validate that all configured subnets exist.
- for (IpOptions ipConfig : options.getIpOptions()) {
- if (ipConfig.allocateNewPublicIp() && ipConfig.publicIpId() != null) {
- throw new IllegalArgumentException("The allocateNewPublicIps and publicIpId are exclusive");
- }
-
- String resourceGroup = extractResourceGroup(ipConfig.subnet());
- String networkName = extractVirtualNetwork(ipConfig.subnet());
- String subnetName = extractName(ipConfig.subnet());
- Subnet subnet = api.getSubnetApi(resourceGroup, networkName).get(subnetName);
- checkState(subnet != null, "Configured subnet %s does not exist", ipConfig.subnet());
-
- if (ipConfig.publicIpId() != null) {
- PublicIPAddress publicIp = api.getPublicIPAddressApi(extractResourceGroup(ipConfig.publicIpId())).get(
- extractName(ipConfig.publicIpId()));
- checkState(publicIp != null, "Configured public ip %s does not exist", ipConfig.publicIpId());
- }
- }
- }
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/config/AzureComputeHttpApiModule.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/config/AzureComputeHttpApiModule.java
deleted file mode 100644
index 7ba23db..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/config/AzureComputeHttpApiModule.java
+++ /dev/null
@@ -1,108 +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.config;
-
-import static org.jclouds.Constants.PROPERTY_SESSION_INTERVAL;
-
-import java.net.URI;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicReference;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import javax.inject.Singleton;
-
-import org.jclouds.azurecompute.arm.AzureComputeApi;
-import org.jclouds.azurecompute.arm.config.GraphRBAC.GraphRBACForTenant;
-import org.jclouds.azurecompute.arm.domain.ServicePrincipal;
-import org.jclouds.azurecompute.arm.handlers.AzureComputeErrorHandler;
-import org.jclouds.http.HttpErrorHandler;
-import org.jclouds.http.annotation.ClientError;
-import org.jclouds.http.annotation.Redirection;
-import org.jclouds.http.annotation.ServerError;
-import org.jclouds.location.suppliers.ImplicitLocationSupplier;
-import org.jclouds.location.suppliers.implicit.FirstRegion;
-import org.jclouds.oauth.v2.config.OAuthConfigFactory;
-import org.jclouds.oauth.v2.config.OAuthScopes;
-import org.jclouds.rest.AuthorizationException;
-import org.jclouds.rest.ConfiguresHttpApi;
-import org.jclouds.rest.config.HttpApiModule;
-import org.jclouds.rest.suppliers.MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier;
-
-import com.google.common.base.Supplier;
-import com.google.inject.Provides;
-import com.google.inject.Scopes;
-import com.google.inject.TypeLiteral;
-import com.google.inject.name.Named;
-
-@ConfiguresHttpApi
-public class AzureComputeHttpApiModule extends HttpApiModule<AzureComputeApi> {
-
- private static final Pattern OAUTH_TENANT_PATTERN = Pattern
- .compile("https://login.microsoft(?:online)?.com/([^/]+)/oauth2/token");
-
- @Override
- protected void bindErrorHandlers() {
- bind(HttpErrorHandler.class).annotatedWith(Redirection.class).to(AzureComputeErrorHandler.class);
- bind(HttpErrorHandler.class).annotatedWith(ClientError.class).to(AzureComputeErrorHandler.class);
- bind(HttpErrorHandler.class).annotatedWith(ServerError.class).to(AzureComputeErrorHandler.class);
- }
-
- @Override
- protected void installLocations() {
- super.installLocations();
- bind(ImplicitLocationSupplier.class).to(FirstRegion.class).in(Scopes.SINGLETON);
- }
-
- @Override
- protected void configure() {
- super.configure();
- bind(OAuthScopes.class).toInstance(OAuthScopes.NoScopes.create());
- bind(OAuthConfigFactory.class).to(AzureOAuthConfigFactory.class).in(Scopes.SINGLETON);
- bindServiceEndpoints();
- }
-
- protected void bindServiceEndpoints() {
- bind(new TypeLiteral<Supplier<URI>>() {
- }).annotatedWith(GraphRBAC.class).to(GraphRBACForTenant.class).in(Scopes.SINGLETON);
- }
-
- @Provides
- @Singleton
- @Tenant
- protected final String provideTenant(@Named("oauth.endpoint") final String oauthEndpoint) {
- Matcher m = OAUTH_TENANT_PATTERN.matcher(oauthEndpoint);
- if (!m.matches()) {
- throw new IllegalArgumentException("Could not parse tenantId from: " + oauthEndpoint);
- }
- return m.group(1);
- }
-
- @Provides
- @Singleton
- protected final Supplier<ServicePrincipal> provideServicePrincipal(final AzureComputeApi api,
- AtomicReference<AuthorizationException> authException, @Named(PROPERTY_SESSION_INTERVAL) long seconds) {
- // This supplier must be defensive against any auth exception.
- return MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.create(authException,
- new Supplier<ServicePrincipal>() {
- @Override
- public ServicePrincipal get() {
- return api.getGraphRBACApi().getCurrentServicePrincipal();
- }
- }, seconds, TimeUnit.SECONDS);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/config/AzureComputeParserModule.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/config/AzureComputeParserModule.java
deleted file mode 100644
index 396f5be..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/config/AzureComputeParserModule.java
+++ /dev/null
@@ -1,29 +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.config;
-
-import org.jclouds.json.config.GsonModule;
-
-import com.google.inject.AbstractModule;
-
-public class AzureComputeParserModule extends AbstractModule {
-
- @Override
- protected void configure() {
- bind(GsonModule.DateAdapter.class).to(GsonModule.Iso8601DateAdapter.class);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/config/AzureComputeProperties.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/config/AzureComputeProperties.java
deleted file mode 100644
index abe057d..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/config/AzureComputeProperties.java
+++ /dev/null
@@ -1,46 +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.config;
-
-/**
- * Configuration properties and constants used in Azure Resource Manager
- * connections.
- */
-public class AzureComputeProperties {
-
- public static final String OPERATION_TIMEOUT = "jclouds.azurecompute.arm.operation.timeout";
-
- public static final String IMAGE_PUBLISHERS = "jclouds.azurecompute.arm.publishers";
-
- public static final String TIMEOUT_RESOURCE_DELETED = "jclouds.azurecompute.arm.timeout.resourcedeleted";
-
- public static final String DEFAULT_VNET_ADDRESS_SPACE_PREFIX = "jclouds.azurecompute.arm.vnet.addressprefix";
-
- public static final String DEFAULT_SUBNET_ADDRESS_PREFIX = "jclouds.azurecompute.arm.subnet.addressprefix";
-
- public static final String API_VERSION_PREFIX = "jclouds.azurecompute.arm.apiversion.";
-
- // Predicate constants
- public static final String VAULT_DELETE_STATUS = "jclouds.azurecompute.arm.vault.delete_status";
- public static final String VAULT_KEY_DELETED_STATUS = "jclouds.azurecompute.arm.vault.key.delete_status";
- public static final String VAULT_KEY_RECOVERABLE_STATUS = "jclouds.azurecompute.arm.vault.key.recoverable_status";
- public static final String VAULT_SECRET_DELETE_STATUS = "jclouds.azurecompute.arm.vault.secret.delete_status";
- public static final String VAULT_SECRET_RECOVERABLE_STATUS = "jclouds.azurecompute.arm.vault.secret.recoverable_status";
- public static final String VAULT_CERTIFICATE_DELETE_STATUS = "jclouds.azurecompute.arm.vault.certificate.delete_status";
- public static final String VAULT_CERTIFICATE_RECOVERABLE_STATUS = "jclouds.azurecompute.arm.vault.certificate.recoverable_status";
- public static final String VAULT_CERTIFICATE_OPERATION_STATUS = "jclouds.azurecompute.arm.vault.certificate.operation_status";
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/config/AzureComputeRateLimitModule.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/config/AzureComputeRateLimitModule.java
deleted file mode 100644
index 3038b86..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/config/AzureComputeRateLimitModule.java
+++ /dev/null
@@ -1,30 +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.config;
-
-import org.jclouds.azurecompute.arm.handlers.AzureRateLimitRetryHandler;
-import org.jclouds.http.HttpRetryHandler;
-import org.jclouds.http.annotation.ClientError;
-
-import com.google.inject.AbstractModule;
-
-public class AzureComputeRateLimitModule extends AbstractModule {
- @Override
- protected void configure() {
- bind(HttpRetryHandler.class).annotatedWith(ClientError.class).to(AzureRateLimitRetryHandler.class);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/config/AzureOAuthConfigFactory.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/config/AzureOAuthConfigFactory.java
deleted file mode 100644
index 9128b59..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/config/AzureOAuthConfigFactory.java
+++ /dev/null
@@ -1,60 +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.config;
-
-import static org.jclouds.oauth.v2.config.OAuthProperties.AUDIENCE;
-import static org.jclouds.oauth.v2.config.OAuthProperties.RESOURCE;
-
-import org.jclouds.http.HttpRequest;
-import org.jclouds.oauth.v2.config.OAuthConfigFactory;
-import org.jclouds.oauth.v2.config.OAuthScopes;
-import org.jclouds.rest.internal.GeneratedHttpRequest;
-
-import com.google.inject.Inject;
-import com.google.inject.name.Named;
-
-public class AzureOAuthConfigFactory implements OAuthConfigFactory {
- private final OAuthScopes scopes;
-
- @Named(AUDIENCE)
- @Inject(optional = true)
- private String audience;
-
- @Named(RESOURCE)
- @Inject(optional = true)
- private String resource;
-
- @Inject
- AzureOAuthConfigFactory(OAuthScopes scopes) {
- this.scopes = scopes;
- }
-
- @Override
- public OAuthConfig forRequest(HttpRequest input) {
- OAuthResource customResource = null;
- if (input instanceof GeneratedHttpRequest) {
- GeneratedHttpRequest request = (GeneratedHttpRequest) input;
- customResource = request.getInvocation().getInvokable().getAnnotation(OAuthResource.class);
- if (customResource == null) {
- customResource = request.getInvocation().getInvokable().getDeclaringClass()
- .getAnnotation(OAuthResource.class);
- }
- }
- String oauthResource = customResource != null ? customResource.value() : resource;
- return OAuthConfig.create(scopes.forRequest(input), audience, oauthResource);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/config/GraphRBAC.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/config/GraphRBAC.java
deleted file mode 100644
index a7f8b4f..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/config/GraphRBAC.java
+++ /dev/null
@@ -1,54 +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.config;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-import java.net.URI;
-
-import javax.inject.Inject;
-import javax.inject.Qualifier;
-
-import com.google.common.base.Supplier;
-
-/**
- * Provides the Graph RBAC API endpoint for the current tenant.
- */
-@Retention(value = RetentionPolicy.RUNTIME)
-@Target(value = {ElementType.TYPE, ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD})
-@Qualifier
-public @interface GraphRBAC {
-
- String ENDPOINT = "https://graph.windows.net/";
-
- static class GraphRBACForTenant implements Supplier<URI> {
- private final String tenantId;
-
- @Inject
- GraphRBACForTenant(@Tenant String tenantId) {
- this.tenantId = tenantId;
- }
-
- @Override
- public URI get() {
- return URI.create(GraphRBAC.ENDPOINT + tenantId);
- }
-
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/config/OAuthResource.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/config/OAuthResource.java
deleted file mode 100644
index 6e5a2df..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/config/OAuthResource.java
+++ /dev/null
@@ -1,35 +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.config;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-/**
- * Configures a custom OAuth resource for certain APIs and methods.
- */
-@Retention(value = RetentionPolicy.RUNTIME)
-@Target(value = { ElementType.TYPE, ElementType.METHOD })
-@Qualifier
-public @interface OAuthResource {
-
- String value();
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/config/Tenant.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/config/Tenant.java
deleted file mode 100644
index 5524361..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/config/Tenant.java
+++ /dev/null
@@ -1,34 +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.config;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-/**
- * Qualifies an object that describes the current tenant.
- */
-@Retention(value = RetentionPolicy.RUNTIME)
-@Target(value = {ElementType.TYPE, ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD})
-@Qualifier
-public @interface Tenant {
-
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Availability.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Availability.java
deleted file mode 100644
index eb8c341..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Availability.java
+++ /dev/null
@@ -1,32 +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.json.SerializedNames;
-
-@AutoValue
-public abstract class Availability {
-
- public abstract String nameAvailable();
-
- @SerializedNames({"nameAvailable"})
- public static Availability create(final String nameAvailable) {
- return new AutoValue_Availability(nameAvailable);
- }
-
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/AvailabilitySet.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/AvailabilitySet.java
deleted file mode 100644
index 4c4720e..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/AvailabilitySet.java
+++ /dev/null
@@ -1,223 +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 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.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-
-/**
- * AvailabilitySet for subscription
- */
-@AutoValue
-public abstract class AvailabilitySet {
-
- @AutoValue
- public abstract static class AvailabilitySetProperties {
-
- /**
- * A platform Update Domain Count
- */
- public abstract int platformUpdateDomainCount();
-
- /**
- * A platform Fault Domain Count
- */
- public abstract int platformFaultDomainCount();
-
- /**
- * A list of virtual machines in the availability set
- */
- @Nullable
- public abstract List<IdReference> virtualMachines();
-
- /**
- * A list of statuses in the availability set
- */
- @Nullable
- public abstract List<Status> statuses();
-
- @SerializedNames({ "platformUpdateDomainCount", "platformFaultDomainCount", "virtualMachines", "statuses" })
- public static AvailabilitySetProperties create(final int platformUpdateDomainCount,
- final int platformFaultDomainCount, List<IdReference> virtualMachines, List<Status> statuses) {
- return builder().platformUpdateDomainCount(platformUpdateDomainCount)
- .platformFaultDomainCount(platformFaultDomainCount).virtualMachines(virtualMachines).statuses(statuses)
- .build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_AvailabilitySet_AvailabilitySetProperties.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
- public abstract Builder platformUpdateDomainCount(int platformUpdateDomainCount);
- public abstract Builder platformFaultDomainCount(int platformFaultDomainCount);
- public abstract Builder virtualMachines(List<IdReference> virtualMachines);
- public abstract Builder statuses(List<Status> statuses);
-
- abstract List<IdReference> virtualMachines();
- abstract List<Status> statuses();
- abstract AvailabilitySetProperties autoBuild();
-
- public AvailabilitySetProperties build() {
- virtualMachines(virtualMachines() != null ? ImmutableList.copyOf(virtualMachines()) : null);
- statuses(statuses() != null ? ImmutableList.copyOf(statuses()) : null);
- return autoBuild();
- }
- }
- }
-
- public static enum AvailabilitySetType {
- MANAGED("Aligned"),
- CLASSIC("Classic");
-
- private final String value;
-
- AvailabilitySetType(String value) {
- this.value = value;
- }
-
- public static AvailabilitySetType fromString(String value) {
- AvailabilitySetType[] items = AvailabilitySetType.values();
- for (AvailabilitySetType item : items) {
- if (item.toString().equalsIgnoreCase(value)) {
- return item;
- }
- }
- throw new IllegalArgumentException("Unexpected type: " + value);
- }
-
- @Override
- public String toString() {
- return this.value;
- }
- }
-
- @AutoValue
- public abstract static class SKU {
-
- public abstract AvailabilitySetType type();
-
- @SerializedNames({ "name" })
- public static SKU create(final String type) {
- return create(AvailabilitySetType.fromString(type));
- }
-
- public static SKU create(AvailabilitySetType type) {
- return new AutoValue_AvailabilitySet_SKU(type);
- }
- }
-
- /**
- * The id of the availability set
- */
- @Nullable
- public abstract String id();
-
- /**
- * The name of the availability set.
- */
- @Nullable
- public abstract String name();
-
- /**
- * The type of the availability set.
- */
- @Nullable
- public abstract String type();
-
- /**
- * The location of the availability set
- */
- @Nullable
- public abstract String location();
-
- /**
- * Specifies the type of the availability set
- */
- @Nullable
- public abstract SKU sku();
-
- /**
- * Specifies the tags of the availability set
- */
- @Nullable
- public abstract Map<String, String> tags();
-
- /**
- * Specifies the properties of the availability set
- */
- @Nullable
- public abstract AvailabilitySetProperties properties();
-
- @SerializedNames({ "id", "name", "type", "location", "sku", "tags", "properties" })
- public static AvailabilitySet create(final String id, final String name, final String type, final String location,
- SKU sku, final Map<String, String> tags, AvailabilitySetProperties properties) {
- return builder().id(id).name(name).type(type).location(location).sku(sku).tags(tags).properties(properties)
- .build();
- }
-
- public abstract Builder toBuilder();
-
- private static Builder builder() {
- return new AutoValue_AvailabilitySet.Builder();
- }
-
- public static Builder managed() {
- return builder().managed();
- }
-
- public static Builder classic() {
- return builder().classic();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
- public abstract Builder id(String id);
- public abstract Builder name(String name);
- public abstract Builder type(String type);
- public abstract Builder location(String location);
- public abstract Builder tags(Map<String, String> tags);
- public abstract Builder properties(AvailabilitySetProperties properties);
-
- abstract Builder sku(SKU sku);
- public Builder managed() {
- return sku(SKU.create(AvailabilitySetType.MANAGED));
- }
- public Builder classic() {
- return sku(SKU.create(AvailabilitySetType.CLASSIC));
- }
-
- abstract Map<String, String> tags();
- abstract AvailabilitySet autoBuild();
-
- public AvailabilitySet build() {
- tags(tags() != null ? ImmutableMap.copyOf(tags()) : null);
- return autoBuild();
- }
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/BackendAddressPool.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/BackendAddressPool.java
deleted file mode 100644
index 37ea4aa..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/BackendAddressPool.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 BackendAddressPool {
- public abstract String name();
-
- @Nullable
- public abstract String id();
-
- @Nullable
- public abstract BackendAddressPoolProperties properties();
-
- @Nullable
- public abstract String etag();
-
- @SerializedNames({ "name", "id", "properties", "etag" })
- public static BackendAddressPool create(final String name, final String id,
- final BackendAddressPoolProperties properties, final String etag) {
- return new AutoValue_BackendAddressPool(name, id, properties, etag);
- }
-}
-
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/BackendAddressPoolProperties.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/BackendAddressPoolProperties.java
deleted file mode 100644
index 4daed6f..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/BackendAddressPoolProperties.java
+++ /dev/null
@@ -1,74 +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 BackendAddressPoolProperties implements Provisionable {
-
- @Nullable
- public abstract String provisioningState();
-
- @Nullable
- public abstract List<IdReference> backendIPConfigurations();
-
- @Nullable
- public abstract List<IdReference> loadBalancingRules();
-
-
- @SerializedNames({ "provisioningState", "backendIPConfigurations", "loadBalancingRules"})
- public static BackendAddressPoolProperties create(final String provisioningState,
- final List<IdReference> backendIPConfigurations, final List<IdReference> loadBalancingRules) {
- return builder().provisioningState(provisioningState).backendIPConfigurations(backendIPConfigurations).loadBalancingRules(loadBalancingRules).build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_BackendAddressPoolProperties.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
-
- public abstract Builder provisioningState(String provisioningState);
-
- public abstract Builder backendIPConfigurations(List<IdReference> backendIPConfigurations);
-
- public abstract Builder loadBalancingRules(List<IdReference> loadBalancingRules);
-
- abstract List<IdReference> backendIPConfigurations();
- abstract List<IdReference> loadBalancingRules();
-
- abstract BackendAddressPoolProperties autoBuild();
-
- public BackendAddressPoolProperties build() {
- backendIPConfigurations(backendIPConfigurations() != null ? ImmutableList.copyOf(backendIPConfigurations())
- : null);
- loadBalancingRules(loadBalancingRules() != null ? ImmutableList.copyOf(loadBalancingRules()) : null);
- return autoBuild();
- }
- }
-}
-
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Certificate.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Certificate.java
deleted file mode 100644
index 65de40c..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Certificate.java
+++ /dev/null
@@ -1,638 +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 java.util.List;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import com.google.auto.value.AutoValue;
-
-
-@AutoValue
-public abstract class Certificate {
- @AutoValue
- public abstract static class CertificateAttributes {
- @Nullable
- public abstract Integer created();
-
- public abstract boolean enabled();
-
- @Nullable
- public abstract Integer expiry();
-
- @Nullable
- public abstract Integer notBefore();
-
- @Nullable
- public abstract String recoveryLevel();
-
- @Nullable
- public abstract Integer updated();
-
- @SerializedNames({"created", "enabled", "exp", "nbf", "recoveryLevel", "updated"})
- public static CertificateAttributes create(final Integer created,
- final boolean enabled,
- final Integer expiry,
- final Integer notBefore,
- final String recoveryLevel,
- final Integer updated) {
- return new AutoValue_Certificate_CertificateAttributes(created, enabled, expiry, notBefore, recoveryLevel, updated);
- }
- }
-
- @AutoValue
- public abstract static class IssuerParameters {
- @Nullable
- public abstract String certType();
-
- @Nullable
- public abstract String name();
-
- @SerializedNames({"cty", "name"})
- public static IssuerParameters create(final String certType,
- final String name) {
- return new AutoValue_Certificate_IssuerParameters(certType, name);
- }
- }
-
- @AutoValue
- public abstract static class KeyProperties {
- @Nullable
- public abstract Boolean exportable();
-
- @Nullable
- public abstract Integer keySize();
-
- @Nullable
- public abstract String keyType();
-
- @Nullable
- public abstract Boolean reuseKey();
-
- @SerializedNames({"exportable", "key_size", "kty", "reuse_key"})
- public static KeyProperties create(final boolean exportable,
- final Integer keySize,
- final String keyType,
- final boolean reuseKey) {
- return new AutoValue_Certificate_KeyProperties(exportable, keySize, keyType, reuseKey);
- }
- }
-
- @AutoValue
- public abstract static class LifetimeActionTrigger {
- @Nullable
- public abstract Integer daysBeforeExpiry();
-
- @Nullable
- public abstract Integer lifetimePercentage();
-
- @SerializedNames({"days_before_expiry", "lifetime_percentage"})
- public static LifetimeActionTrigger create(final Integer daysBeforeExpiry,
- final Integer lifetimePercentage) {
- return new AutoValue_Certificate_LifetimeActionTrigger(daysBeforeExpiry, lifetimePercentage);
- }
- }
-
- @AutoValue
- public abstract static class LifetimeActionAction {
- public abstract String actionType();
-
- @SerializedNames({"action_type"})
- public static LifetimeActionAction create(final String actionType) {
- return new AutoValue_Certificate_LifetimeActionAction(actionType);
- }
- }
-
- @AutoValue
- public abstract static class LifetimeAction {
- public abstract LifetimeActionAction action();
-
- public abstract LifetimeActionTrigger trigger();
-
- @SerializedNames({"action", "trigger"})
- public static LifetimeAction create(final LifetimeActionAction action,
- final LifetimeActionTrigger trigger) {
- return new AutoValue_Certificate_LifetimeAction(action, trigger);
- }
- }
-
- @AutoValue
- public abstract static class SecretProperties {
- public abstract String contentType();
-
- @SerializedNames({"contentType"})
- public static SecretProperties create(final String contentType) {
- return new AutoValue_Certificate_SecretProperties(contentType);
- }
- }
-
- @AutoValue
- public abstract static class SubjectAlternativeNames {
- public abstract List<String> dnsNames();
-
- public abstract List<String> emails();
-
- public abstract List<String> upns();
-
- @SerializedNames({"dns_names", "emails", "upns"})
- public static SubjectAlternativeNames create(final List<String> dnsNames,
- final List<String> emails,
- final List<String> upns) {
- return new AutoValue_Certificate_SubjectAlternativeNames(
- dnsNames != null ? ImmutableList.copyOf(dnsNames) : ImmutableList.<String> of(),
- emails != null ? ImmutableList.copyOf(emails) : ImmutableList.<String> of(),
- upns != null ? ImmutableList.copyOf(upns) : ImmutableList.<String> of()
- );
- }
- }
-
- @AutoValue
- public abstract static class X509CertificateProperties {
- public abstract List<String> enhancedKeyUsage();
-
- public abstract List<String> keyUsage();
-
- @Nullable
- public abstract SubjectAlternativeNames subjectAltNames();
-
- @Nullable
- public abstract String subject();
-
- @Nullable
- public abstract Integer validityMonths();
-
- @SerializedNames({"ekus", "key_usage", "sans", "subject", "validity_months"})
- public static X509CertificateProperties create(final List<String> enhancedKeyUsage,
- final List<String> keyUsage,
- final SubjectAlternativeNames subjectAltNames,
- final String subject,
- final Integer validityMonths) {
- return new AutoValue_Certificate_X509CertificateProperties(
- enhancedKeyUsage != null ? ImmutableList.copyOf(enhancedKeyUsage) : ImmutableList.<String> of(),
- keyUsage != null ? ImmutableList.copyOf(keyUsage) : ImmutableList.<String> of(),
- subjectAltNames,
- subject,
- validityMonths
- );
- }
- }
-
- @AutoValue
- public abstract static class CertificatePolicy {
- @Nullable
- public abstract CertificateAttributes attributes();
-
- @Nullable
- public abstract String id();
-
- @Nullable
- public abstract IssuerParameters issuer();
-
- @Nullable
- public abstract KeyProperties keyProps();
-
- public abstract List<LifetimeAction> lifetimeActions();
-
- @Nullable
- public abstract SecretProperties secretProps();
-
- @Nullable
- public abstract X509CertificateProperties x509props();
-
- @SerializedNames({"attributes", "id", "issuer", "key_props", "lifetime_actions", "secret_props", "x509_props"})
- public static CertificatePolicy create(final CertificateAttributes attributes,
- final String id,
- final IssuerParameters issuer,
- final KeyProperties keyProps,
- final List<LifetimeAction> lifetimeActions,
- final SecretProperties secretProperties,
- final X509CertificateProperties x509Props) {
- return new AutoValue_Certificate_CertificatePolicy(
- attributes,
- id,
- issuer,
- keyProps,
- lifetimeActions != null ? ImmutableList.copyOf(lifetimeActions) : ImmutableList.<LifetimeAction>of(),
- secretProperties,
- x509Props
- );
- }
- }
-
- @AutoValue
- public abstract static class CertificateError {
- @Nullable
- public abstract String code();
-
- @Nullable
- public abstract String message();
-
- @SerializedNames({"code", "message"})
- public static CertificateError create(final String code,
- final String message) {
- return new AutoValue_Certificate_CertificateError(code, message);
- }
- }
-
- @AutoValue
- public abstract static class CertificateOperation {
- @Nullable
- public abstract Boolean cancellationRequested();
-
- @Nullable
- public abstract String csr();
-
- @Nullable
- public abstract CertificateError error();
-
- @Nullable
- public abstract String id();
-
- @Nullable
- public abstract IssuerParameters issuer();
-
- @Nullable
- public abstract String requestId();
-
- @Nullable
- public abstract String status();
-
- @Nullable
- public abstract String statusDetails();
-
- @Nullable
- public abstract String target();
-
- @SerializedNames({"cancellation_requested", "csr", "error", "id", "issuer", "request_id", "status", "status_details", "target"})
- public static CertificateOperation create(final boolean cancellationRequested,
- final String csr,
- final CertificateError error,
- final String id,
- final IssuerParameters issuer,
- final String requestId,
- final String status,
- final String statusDetails,
- final String target) {
- return new AutoValue_Certificate_CertificateOperation(
- cancellationRequested,
- csr,
- error,
- id,
- issuer,
- requestId,
- status,
- statusDetails,
- target);
- }
- }
-
- @AutoValue
- public abstract static class CertificateBundle {
- @Nullable
- public abstract CertificateAttributes attributes();
-
- @Nullable
- public abstract String certificate();
-
- @Nullable
- public abstract String contentType();
-
- @Nullable
- public abstract String id();
-
- @Nullable
- public abstract String keyId();
-
- @Nullable
- public abstract CertificatePolicy policy();
-
- @Nullable
- public abstract String secretId();
-
- @Nullable
- public abstract Map<String, String> tags();
-
- @Nullable
- public abstract String thumbprint();
-
- @SerializedNames({"attributes", "cer", "contentType", "id", "kid", "policy", "sid", "tags", "x5t"})
- public static CertificateBundle create(final CertificateAttributes attributes,
- final String certificate,
- final String contentType,
- final String id,
- final String keyId,
- final CertificatePolicy policy,
- final String secretId,
- final Map<String, String> tags,
- final String thumbprint) {
- return new AutoValue_Certificate_CertificateBundle(attributes,
- certificate,
- contentType,
- id,
- keyId,
- policy,
- secretId,
- tags != null ? ImmutableMap.copyOf(tags) : null,
- thumbprint
- );
- }
- }
-
- @AutoValue
- public abstract static class CertificateIssuer {
- public abstract String id();
-
- public abstract String provider();
-
- @SerializedNames({"id", "provider"})
- public static CertificateIssuer create(final String id,
- final String provider) {
- return new AutoValue_Certificate_CertificateIssuer(id, provider);
- }
- }
-
- @AutoValue
- public abstract static class IssuerAttributes {
- @Nullable
- public abstract Integer created();
-
- @Nullable
- public abstract Boolean enabled();
-
- @Nullable
- public abstract Integer updated();
-
- @SerializedNames({"created", "enabled", "updated"})
- public static IssuerAttributes create(final Integer created,
- final Boolean enabled,
- final Integer updated) {
- return new AutoValue_Certificate_IssuerAttributes(created, enabled, updated);
- }
- }
-
- @AutoValue
- public abstract static class IssuerCredentials {
- @Nullable
- public abstract String accountId();
-
- @Nullable
- public abstract String password();
-
- @SerializedNames({"account_id", "pwd"})
- public static IssuerCredentials create(final String accountId,
- final String password) {
- return new AutoValue_Certificate_IssuerCredentials(accountId, password);
- }
- }
-
- @AutoValue
- public abstract static class OrganizationDetails {
- public abstract List<AdministrationDetails> adminDetails();
-
- @Nullable
- public abstract String id();
-
- @SerializedNames({"admin_details", "id"})
- public static OrganizationDetails create(final List<AdministrationDetails> adminDetails,
- final String id) {
- return new AutoValue_Certificate_OrganizationDetails(
- adminDetails != null ? ImmutableList.copyOf(adminDetails) : ImmutableList.<AdministrationDetails> of(),
- id
- );
- }
- }
-
- @AutoValue
- public abstract static class AdministrationDetails {
- @Nullable
- public abstract String email();
-
- @Nullable
- public abstract String firstName();
-
- @Nullable
- public abstract String lastName();
-
- @Nullable
- public abstract String phoneNumber();
-
- @SerializedNames({"email", "first_name", "last_name", "phone"})
- public static AdministrationDetails create(final String email,
- final String firstName,
- final String lastName,
- final String phoneNumber) {
- return new AutoValue_Certificate_AdministrationDetails(email, firstName, lastName, phoneNumber);
- }
- }
-
- @AutoValue
- public abstract static class IssuerBundle {
- @Nullable
- public abstract IssuerAttributes attributes();
-
- @Nullable
- public abstract IssuerCredentials credentials();
-
- @Nullable
- public abstract String id();
-
- @Nullable
- public abstract OrganizationDetails organizationDetails();
-
- @Nullable
- public abstract String provider();
-
- @SerializedNames({"attributes", "credentials", "id", "org_details", "provider"})
- public static IssuerBundle create(final IssuerAttributes attributes,
- final IssuerCredentials credentials,
- final String id,
- final OrganizationDetails orgDetails,
- final String provider) {
- return new AutoValue_Certificate_IssuerBundle(attributes, credentials, id, orgDetails, provider);
- }
- }
-
- @AutoValue
- public abstract static class Contact {
- @Nullable
- public abstract String email();
-
- @Nullable
- public abstract String name();
-
- @Nullable
- public abstract String phone();
-
- @SerializedNames({"email", "name", "phone"})
- public static Contact create(final String email,
- final String name,
- final String phone) {
- return new AutoValue_Certificate_Contact(email, name, phone);
- }
- }
-
- @AutoValue
- public abstract static class Contacts {
- public abstract List<Contact> contacts();
-
- @Nullable
- public abstract String id();
-
- @SerializedNames({"contacts", "id"})
- public static Contacts create(final List<Contact> contacts,
- final String id) {
- return new AutoValue_Certificate_Contacts(
- contacts != null ? ImmutableList.copyOf(contacts) : ImmutableList.<Contact> of(),
- id
- );
- }
- }
-
- @AutoValue
- public abstract static class DeletedCertificateBundle {
- @Nullable
- public abstract CertificateAttributes attributes();
-
- @Nullable
- public abstract String bytes();
-
- @Nullable
- public abstract Integer deletedDate();
-
- @Nullable
- public abstract String id();
-
- @Nullable
- public abstract String keyId();
-
- @Nullable
- public abstract String recoveryId();
-
- @Nullable
- public abstract Integer scheduledPurgeDate();
-
- @Nullable
- public abstract String secredId();
-
- @Nullable
- public abstract Map<String, String> tags();
-
- @Nullable
- public abstract String thumbprint();
-
- @SerializedNames({"attributes", "cer", "deletedDate", "id", "kid", "recoveryId", "scheduledPurgeDate", "sid", "tags", "x5t"})
- public static DeletedCertificateBundle create(final CertificateAttributes attributes,
- final String bytes,
- final Integer deletedDate,
- final String id,
- final String keyId,
- final String recoveryId,
- final Integer scheduledPurgeDate,
- final String secretId,
- final Map<String, String> tags,
- final String thumbprint) {
- return new AutoValue_Certificate_DeletedCertificateBundle(
- attributes,
- bytes,
- deletedDate,
- id,
- keyId,
- recoveryId,
- scheduledPurgeDate,
- secretId,
- tags != null ? ImmutableMap.copyOf(tags) : null,
- thumbprint
- );
- }
- }
-
- @AutoValue
- public abstract static class DeletedCertificate {
- @Nullable
- public abstract CertificateAttributes attributes();
-
- @Nullable
- public abstract Integer deletedDate();
-
- @Nullable
- public abstract String id();
-
- @Nullable
- public abstract String recoveryId();
-
- @Nullable
- public abstract Integer scheduledPurgeDate();
-
- @Nullable
- public abstract Map<String, String> tags();
-
- @Nullable
- public abstract String thumbprint();
-
- @SerializedNames({"attributes", "deletedDate", "id", "recoveryId", "scheduledPurgeDate", "tags", "x5t"})
- public static DeletedCertificate create(final CertificateAttributes attributes,
- final Integer deletedDate,
- final String id,
- final String recoveryId,
- final Integer scheduledPurgeDate,
- final Map<String, String> tags,
- final String thumbprint) {
- return new AutoValue_Certificate_DeletedCertificate(
- attributes,
- deletedDate,
- id,
- recoveryId,
- scheduledPurgeDate,
- tags != null ? ImmutableMap.copyOf(tags) : null,
- thumbprint
- );
- }
- }
-
- @Nullable
- public abstract CertificateAttributes attributes();
-
- @Nullable
- public abstract String id();
-
- @Nullable
- public abstract Map<String, String> tags();
-
- @Nullable
- public abstract String thumbprint();
-
- @SerializedNames({"attributes", "id", "tags", "x5t"})
- public static Certificate create(final CertificateAttributes attributes,
- final String id,
- final Map<String, String> tags,
- final String thumbprint) {
- return new AutoValue_Certificate(
- attributes,
- id,
- tags != null ? ImmutableMap.copyOf(tags) : null,
- thumbprint
- );
- }
-
- Certificate() {
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ComputeNode.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ComputeNode.java
deleted file mode 100644
index 516bbf6..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ComputeNode.java
+++ /dev/null
@@ -1,31 +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;
-
-public class ComputeNode {
- public enum Status {
- GOOD,
- BAD,
- UNRECOGNIZED;
-
- public static Status fromValue(final String text) {
- return (Status) GetEnumValue.fromValueOrDefault(text, Status.UNRECOGNIZED);
- }
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/CreationData.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/CreationData.java
deleted file mode 100644
index ff31ef2..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/CreationData.java
+++ /dev/null
@@ -1,54 +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;
-import com.google.common.base.CaseFormat;
-
-@AutoValue
-public abstract class CreationData {
-
-
- public enum CreateOptions {
- EMPTY,
- FROM_IMAGE,
- COPY,
- IMPORT,
- UNRECOGNIZED;
-
- public static CreateOptions fromValue(final String text) {
- return (CreateOptions) GetEnumValue.fromValueOrDefault(text, UNRECOGNIZED);
- }
-
- @Override
- public String toString() {
- return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, name());
- }
- }
-
- @Nullable
- public abstract CreateOptions createOption();
-
- @SerializedNames({ "createOption" })
- public static CreationData create(CreateOptions createOption) {
- return new AutoValue_CreationData(createOption);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/DataDisk.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/DataDisk.java
deleted file mode 100644
index 2d61509..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/DataDisk.java
+++ /dev/null
@@ -1,160 +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;
-import com.google.common.base.CaseFormat;
-
-@AutoValue
-public abstract class DataDisk implements Provisionable {
-
- public enum DiskCreateOptionTypes {
- FROM_IMAGE,
- EMPTY,
- ATTACH,
- UNRECOGNIZED;
-
- public static DiskCreateOptionTypes fromValue(final String text) {
- return (DiskCreateOptionTypes) GetEnumValue.fromValueOrDefault(text, UNRECOGNIZED);
- }
-
- @Override
- public String toString() {
- return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, name());
- }
- }
-
- public enum CachingTypes {
- NONE,
- READ_ONLY,
- READ_WRITE,
- UNRECOGNIZED;
-
- public static CachingTypes fromValue(final String text) {
- for (CachingTypes type : CachingTypes.values()) {
- if (type.toString().equals(text)) {
- return type;
- }
- }
- return UNRECOGNIZED;
- }
-
- @Override
- public String toString() {
- return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, name());
- }
- }
-
- /**
- * The name of the data disk
- */
- @Nullable public abstract String name();
-
- /**
- * The size of the data disk
- */
- @Nullable public abstract String diskSizeGB();
-
- /**
- * The lun value of the data disk
- */
- @Nullable public abstract Integer lun();
-
- /**
- * The vhd of the data disk
- */
- @Nullable public abstract VHD vhd();
-
- /**
- * The source user image virtual hard disk. This virtual hard disk will be
- * copied before using it to attach to the virtual machine. If SourceImage
- * is provided, the destination virtual hard disk must not exist.
- */
- @Nullable public abstract VHD image();
-
- /**
- * The create option of the data disk
- */
- public abstract DiskCreateOptionTypes createOption();
-
- /**
- * The caching type. Possible values include: 'None', 'ReadOnly',
- * 'ReadWrite'.
- */
- @Nullable public abstract CachingTypes caching();
-
- /**
- * The managed disk parameters.
- */
- @Nullable public abstract ManagedDiskParameters managedDiskParameters();
-
- @Nullable
- public abstract String provisioningState();
-
- @SerializedNames({"name", "diskSizeGB", "lun", "vhd", "image", "createOption", "caching", "managedDisk", "provisioningState"})
- public static DataDisk create(final String name, final String diskSizeGB, final Integer lun,
- final VHD vhd, final VHD image, final String createOption, final String caching,
- final ManagedDiskParameters managedDiskParamenters, final String provisioningState) {
- final Builder builder = builder();
- if (caching != null) {
- builder.caching(CachingTypes.fromValue(caching));
- }
- return builder.name(name)
- .diskSizeGB(diskSizeGB)
- .lun(lun)
- .vhd(vhd)
- .image(image)
- .createOption(DiskCreateOptionTypes.fromValue(createOption))
- .managedDiskParameters(managedDiskParamenters)
- .provisioningState(provisioningState)
- .build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_DataDisk.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
-
- public abstract Builder name(String name);
-
- public abstract Builder diskSizeGB(String diskSizeGB);
-
- public abstract Builder createOption(DiskCreateOptionTypes createOption);
-
- public abstract Builder lun(Integer lun);
-
- public abstract Builder vhd(VHD vhd);
-
- public abstract Builder image(VHD image);
-
- public abstract Builder caching(CachingTypes caching);
-
- public abstract Builder managedDiskParameters(ManagedDiskParameters managedDiskParameters);
-
- public abstract Builder provisioningState(String provisioningState);
-
- public abstract DataDisk build();
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Deployment.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Deployment.java
deleted file mode 100644
index fe22591..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Deployment.java
+++ /dev/null
@@ -1,254 +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 java.util.Map;
-
-import org.jclouds.azurecompute.arm.util.GetEnumValue;
-import org.jclouds.domain.JsonBall;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import com.google.auto.value.AutoValue;
-import com.google.common.collect.ImmutableMap;
-
-import static com.google.common.collect.ImmutableList.copyOf;
-
-@AutoValue
-public abstract class Deployment {
-
- public enum ProvisioningState {
- ACCEPTED,
- READY,
- CANCELED,
- FAILED,
- DELETED,
- SUCCEEDED,
- RUNNING,
- UNRECOGNIZED;
-
- public static ProvisioningState fromValue(final String text) {
- return (ProvisioningState) GetEnumValue.fromValueOrDefault(text, ProvisioningState.UNRECOGNIZED);
- }
- }
-
- public enum DeploymentMode {
- INCREMENTAL,
- COMPLETE,
- UNRECOGNIZED;
-
- public static DeploymentMode fromValue(final String text) {
- return (DeploymentMode) GetEnumValue.fromValueOrDefault(text, DeploymentMode.UNRECOGNIZED);
- }
- }
-
- @AutoValue
- public abstract static class TypeValue {
- public abstract String type();
-
- public abstract String value();
-
- @SerializedNames({"type", "value"})
- public static TypeValue create(final String type, final String value) {
- return new AutoValue_Deployment_TypeValue(type, value);
- }
- }
-
- @AutoValue
- public abstract static class ProviderResourceType {
- @Nullable
- public abstract String resourceType();
-
- @Nullable
- public abstract List<String> locations();
-
- @Nullable
- public abstract List<String> apiVersions();
-
- @Nullable
- public abstract Map<String, JsonBall> properties();
-
- @SerializedNames({"resourceType", "locations", "apiVersions", "properties"})
- public static ProviderResourceType create(final String resourceType,
- final List<String> locations,
- final List<String> apiVersions,
- @Nullable final Map<String, JsonBall> properties) {
- return new AutoValue_Deployment_ProviderResourceType(resourceType,
- locations == null ? null : copyOf(locations),
- apiVersions == null ? null : copyOf(apiVersions),
- properties == null ? ImmutableMap.<String, JsonBall>builder().build() : ImmutableMap.copyOf(properties));
- }
- }
-
- @AutoValue
- public abstract static class Provider {
- @Nullable
- public abstract String id();
-
- @Nullable
- public abstract String namespace();
-
- @Nullable
- public abstract String registrationState();
-
- @Nullable
- public abstract List<ProviderResourceType> resourceTypes();
-
- @SerializedNames({"id", "namespace", "registrationState", "resourceTypes"})
- public static Provider create(final String id,
- final String namespace,
- final String registrationState,
- final List<ProviderResourceType> resourceTypes) {
- return new AutoValue_Deployment_Provider(id, namespace, registrationState, resourceTypes == null ? null : copyOf(resourceTypes));
- }
- }
-
- @AutoValue
- public abstract static class Dependency {
- @Nullable
- public abstract List<Dependency> dependencies();
-
- @Nullable
- public abstract List<Dependency> dependsOn();
-
- @Nullable
- public abstract String id();
-
- @Nullable
- public abstract String resourceType();
-
- @Nullable
- public abstract String resourceName();
-
- @SerializedNames({"dependencies", "dependsOn", "id", "resourceType", "resourceName"})
- public static Dependency create(final List<Dependency> dependencies,
- final List<Dependency> dependsOn,
- final String id,
- final String resourceType,
- final String resourceName) {
- return new AutoValue_Deployment_Dependency(dependencies == null ? null : copyOf(dependencies),
- dependsOn == null ? null : copyOf(dependsOn), id, resourceType, resourceName);
- }
- }
-
- @AutoValue
- public abstract static class ContentLink {
- public abstract String uri();
-
- @Nullable
- public abstract String contentVersion();
-
- @SerializedNames({"uri", "contentVersion"})
- public static ContentLink create(final String uri, final String contentVersion) {
- return new AutoValue_Deployment_ContentLink(uri, contentVersion);
- }
- }
-
- @AutoValue
- public abstract static class DeploymentProperties implements Provisionable {
- @Nullable
- public abstract String provisioningState();
-
- @Nullable
- public abstract String correlationId();
-
- @Nullable
- public abstract String timestamp();
-
- @Nullable
- public abstract Map<String, JsonBall> outputs();
-
- @Nullable
- public abstract List<Provider> providers();
-
- @Nullable
- public abstract List<Dependency> dependencies();
-
- @Nullable
- public abstract Map<String, JsonBall> template();
-
- @Nullable
- public abstract ContentLink templateLink();
-
- @Nullable
- public abstract Map<String, Value> parameters();
-
- @Nullable
- public abstract ContentLink parametersLink();
-
- public abstract String mode();
-
- // The entries below seem to be dynamic/not documented in the specification
- @Nullable
- public abstract String duration();
-
- @Nullable
- public abstract List<Map<String, String>> outputResources();
-
- @SerializedNames({"provisioningState", "correlationId", "timestamp", "outputs", "providers", "dependencies", "template", "templateLink", "parameters", "parametersLink", "mode", "duration", "outputResources"})
- public static DeploymentProperties create(final String provisioningState,
- final String correlationId,
- final String timestamp,
- @Nullable final Map<String, JsonBall> outputs,
- final List<Provider> providers,
- final List<Dependency> dependencies,
- final Map<String, JsonBall> template,
- final ContentLink templateLink,
- final Map<String, Value> parameters,
- final ContentLink parametersLink,
- final String mode,
- final String duration,
- final List<Map<String, String>> outputResources) {
- return new AutoValue_Deployment_DeploymentProperties(provisioningState,
- correlationId,
- timestamp,
- outputs == null ? ImmutableMap.<String, JsonBall>builder().build() : ImmutableMap.copyOf(outputs),
- providers == null ? null : copyOf(providers),
- dependencies == null ? null : copyOf(dependencies),
- template == null ? ImmutableMap.<String, JsonBall>builder().build() : ImmutableMap.copyOf(template),
- templateLink,
- parameters == null ? ImmutableMap.<String, Value>builder().build() : ImmutableMap.copyOf(parameters),
- parametersLink,
- mode,
- duration,
- outputResources == null ? null : copyOf(outputResources));
- }
- }
-
- /**
- * The ID associated with the template deployment.
- */
- @Nullable
- public abstract String id();
-
- /**
- * The name associated with the template deployment.
- */
- public abstract String name();
-
- /**
- * Properties of the deployment.
- */
- @Nullable
- public abstract DeploymentProperties properties();
-
- @SerializedNames({"id", "name", "properties"})
- public static Deployment create(final String id, final String name, final DeploymentProperties properties) {
- return new AutoValue_Deployment(id, name, properties);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/DeploymentBody.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/DeploymentBody.java
deleted file mode 100644
index 0f91360..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/DeploymentBody.java
+++ /dev/null
@@ -1,42 +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.azurecompute.arm.domain.DeploymentTemplate.Parameters;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-@AutoValue
-public abstract class DeploymentBody {
-
- @Nullable
- public abstract DeploymentTemplate template();
-
- @Nullable
- public abstract String mode();
-
- @Nullable
- public abstract Parameters parameters();
-
- @SerializedNames({"template", "mode", "parameters"})
- public static DeploymentBody create(final DeploymentTemplate template,
- final String mode,
- final Parameters parameters) {
- return new AutoValue_DeploymentBody(template, mode, parameters);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/DeploymentProperties.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/DeploymentProperties.java
deleted file mode 100644
index 94b53c5..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/DeploymentProperties.java
+++ /dev/null
@@ -1,31 +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.json.SerializedNames;
-
-@AutoValue
-public abstract class DeploymentProperties {
-
- public abstract DeploymentBody properties();
-
- @SerializedNames({"properties"})
- public static DeploymentProperties create(final DeploymentBody properties) {
- return new AutoValue_DeploymentProperties(properties);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/DeploymentTemplate.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/DeploymentTemplate.java
deleted file mode 100644
index 84e6061..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/DeploymentTemplate.java
+++ /dev/null
@@ -1,125 +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 com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-
-import org.jclouds.javax.annotation.Nullable;
-
-import java.util.List;
-import java.util.Map;
-import org.jclouds.json.SerializedNames;
-
-@AutoValue
-public abstract class DeploymentTemplate {
-
- //Empty placeholders as we want to generate the empty JSON object
- @AutoValue
- public abstract static class Parameters {
-
- @Nullable
- public abstract KeyVaultReference publicKeyFromAzureKeyVault();
-
- public static Parameters create(KeyVaultReference reference)
- {
- return new AutoValue_DeploymentTemplate_Parameters(reference);
- }
- }
-
- @AutoValue
- public abstract static class TemplateParameters {
-
- @Nullable
- public abstract TemplateParameterType publicKeyFromAzureKeyVault();
-
- public static TemplateParameters create(TemplateParameterType publicKeyFromAzureKeyVault)
- {
- return new AutoValue_DeploymentTemplate_TemplateParameters(publicKeyFromAzureKeyVault);
- }
- }
-
- public abstract String schema();
-
- public abstract String contentVersion();
-
- public abstract TemplateParameters parameters();
-
- public abstract Map<String, String> variables();
-
- public abstract List<ResourceDefinition> resources();
-
- @Nullable
- public abstract List<?> outputs();
-
- @SerializedNames({"$schema", "contentVersion", "parameters", "variables", "resources" , "outputs"})
- public static DeploymentTemplate create(final String schema,
- final String contentVersion,
- final TemplateParameters parameters,
- final Map<String, String> variables,
- final List<ResourceDefinition> resources,
- final List<?> outputs) {
-
- DeploymentTemplate.Builder builder = DeploymentTemplate.builder()
- .schema(schema)
- .contentVersion(contentVersion)
- .parameters(parameters);
-
- if (variables != null)
- builder.variables(variables);
-
- if (resources != null)
- builder.resources(resources);
-
- builder.outputs(outputs == null ? null : ImmutableList.copyOf(outputs));
-
- return builder.build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_DeploymentTemplate.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
- public abstract Builder schema(String schema);
-
- public abstract Builder contentVersion(String type);
-
- public abstract Builder parameters(TemplateParameters parameters);
-
- public abstract Builder variables(Map<String, String> variables);
-
- public abstract Builder resources(List<ResourceDefinition> resources);
-
- public abstract Builder outputs(List<?> outputs);
-
- abstract Map<String, String> variables();
- abstract List<ResourceDefinition> resources();
-
- abstract DeploymentTemplate autoBuild();
-
- public DeploymentTemplate build() {
- variables(variables() != null ? ImmutableMap.copyOf(variables()) : null);
- resources(resources() != null ? ImmutableList.copyOf(resources()) : null);
- return autoBuild();
- }
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/DiagnosticsProfile.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/DiagnosticsProfile.java
deleted file mode 100644
index bd8cb0c..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/DiagnosticsProfile.java
+++ /dev/null
@@ -1,74 +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 DiagnosticsProfile {
-
- @AutoValue
- public abstract static class BootDiagnostics{
-
- public abstract boolean enabled();
-
- @Nullable
- public abstract String storageUri();
-
- @SerializedNames({"enabled", "storageUri"})
- public static BootDiagnostics create(final boolean enabled, final String storageUri) {
- return builder()
- .enabled(enabled)
- .storageUri(storageUri)
- .build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_DiagnosticsProfile_BootDiagnostics.Builder();
- }
- @AutoValue.Builder
- public abstract static class Builder {
- public abstract Builder enabled(boolean enabled);
- public abstract Builder storageUri(String storageUri);
- public abstract BootDiagnostics build();
- }
- }
-
- public abstract BootDiagnostics bootDiagnostics();
-
- @SerializedNames({"bootDiagnostics"})
- public static DiagnosticsProfile create(final BootDiagnostics bootDiagnostics) {
- return builder().bootDiagnostics(bootDiagnostics).build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_DiagnosticsProfile.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
- public abstract Builder bootDiagnostics(BootDiagnostics bootDiagnostics);
- public abstract DiagnosticsProfile build();
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Disk.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Disk.java
deleted file mode 100644
index c090aa8..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Disk.java
+++ /dev/null
@@ -1,105 +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 Disk {
-
- /**
- * The id of the disk
- */
- @Nullable public abstract String id();
-
- /**
- * The name of the disk
- */
- @Nullable public abstract String name();
-
- /**
- * The location of the disk
- */
- public abstract String location();
-
- /**
- * The type of the disk
- */
- @Nullable public abstract String type();
-
- /**
- * The sku of the disk
- */
- @Nullable public abstract SKU sku();
-
- /**
- * The managed disk parameters.
- */
- public abstract DiskProperties properties();
-
- /**
- * the tags of the disk
- */
- @Nullable public abstract Map<String, String> tags();
-
- @SerializedNames({"id", "name", "location", "type", "sku", "properties", "tags"})
- public static Disk create(final String id, final String name, final String location,
- final String type, final SKU sku,
- final DiskProperties properties, final Map<String, String> tags) {
- return builder()
- .id(id)
- .name(name)
- .location(location)
- .type(type)
- .sku(sku)
- .properties(properties)
- .tags(tags)
- .build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_Disk.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 type(String type);
- public abstract Builder sku(SKU sku);
- public abstract Builder properties(DiskProperties properties);
- public abstract Builder tags(Map<String, String> tags);
-
- abstract Map<String, String> tags();
- abstract Disk autoBuild();
-
- public Disk build() {
- tags(tags() != null ? ImmutableMap.copyOf(tags()) : null);
- return autoBuild();
- }
-
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/DiskProperties.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/DiskProperties.java
deleted file mode 100644
index bcc62ca..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/DiskProperties.java
+++ /dev/null
@@ -1,78 +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 DiskProperties implements Provisionable {
-
- @Nullable
- public abstract String provisioningState();
-
- @Nullable
- public abstract String timeCreated();
-
- @Nullable
- public abstract String diskState();
-
- @Nullable
- public abstract Integer diskSizeGB();
-
- @Nullable
- public abstract Integer lun();
-
- @Nullable
- public abstract VHD vhd();
-
- public abstract CreationData creationData();
-
- @SerializedNames({"provisioningState", "timeCreated", "diskState", "diskSizeGB", "lun", "vhd", "creationData"})
- public static DiskProperties create(final String provisioningState, final String timeCreated, final String diskState, final Integer diskSizeGB, final Integer lun, final VHD vhd, final CreationData creationData) {
- return builder()
- .provisioningState(provisioningState)
- .timeCreated(timeCreated)
- .diskState(diskState)
- .diskSizeGB(diskSizeGB)
- .lun(lun)
- .vhd(vhd)
- .creationData(creationData)
- .build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_DiskProperties.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
- public abstract Builder provisioningState(String provisioningState);
- public abstract Builder timeCreated(String timeCreated);
- public abstract Builder diskState(String diskState);
- public abstract Builder diskSizeGB(Integer diskSizeGB);
- public abstract Builder lun(Integer lun);
- public abstract Builder vhd(VHD vhd);
- public abstract Builder creationData(CreationData creationData);
- public abstract DiskProperties build();
-
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/DnsSettings.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/DnsSettings.java
deleted file mode 100644
index c06ef22..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/DnsSettings.java
+++ /dev/null
@@ -1,60 +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 DnsSettings {
-
- public abstract String domainNameLabel();
-
- @Nullable
- public abstract String fqdn();
-
- @Nullable
- public abstract String reverseFqdn();
-
- @SerializedNames({"domainNameLabel", "fqdn", "reverseFqdn"})
- public static DnsSettings create(final String domainNameLabel, final String fqdn, final String reverseFqdn) {
- return builder()
- .domainNameLabel(domainNameLabel)
- .fqdn(fqdn)
- .reverseFqdn(reverseFqdn)
- .build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_DnsSettings.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
- public abstract Builder domainNameLabel(String domainNameLabel);
-
- public abstract Builder fqdn(String fqdn);
-
- public abstract Builder reverseFqdn(String reverseFqdn);
-
- public abstract DnsSettings build();
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Extension.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Extension.java
deleted file mode 100644
index 5eafb04..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Extension.java
+++ /dev/null
@@ -1,40 +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.json.SerializedNames;
-
-@AutoValue
-public abstract class Extension {
-
- /**
- * The name reference of the extension profile
- */
- public abstract String name();
-
- /**
- * The properties reference of the extension profile
- */
- public abstract ExtensionProperties properties();
-
-
- @SerializedNames({"name", "properties"})
- public static Extension create(final String name, final ExtensionProperties properties) {
- return new AutoValue_Extension(name, properties);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ExtensionProfile.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ExtensionProfile.java
deleted file mode 100644
index 92ab4fb..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ExtensionProfile.java
+++ /dev/null
@@ -1,39 +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 com.google.common.collect.ImmutableList;
-import org.jclouds.json.SerializedNames;
-
-import java.util.List;
-
-@AutoValue
-public abstract class ExtensionProfile {
-
- /**
- * The list of extensions of the extension profile
- */
- public abstract List<Extension> extensions();
-
-
- @SerializedNames({"extensions"})
- public static ExtensionProfile create(final List<Extension> extensions) {
- return new AutoValue_ExtensionProfile(extensions == null ?
- ImmutableList.<Extension>of() : ImmutableList.copyOf(extensions));
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ExtensionProfileSettings.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ExtensionProfileSettings.java
deleted file mode 100644
index 265bf76..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ExtensionProfileSettings.java
+++ /dev/null
@@ -1,42 +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 com.google.common.collect.ImmutableList;
-import org.jclouds.json.SerializedNames;
-
-import java.util.List;
-
-@AutoValue
-public abstract class ExtensionProfileSettings {
-
- /**
- * The fileUris reference of the extension profile settings
- */
- public abstract List<String> fileUris();
-
- /**
- * The commandToExecute of the extension profile settings
- */
- public abstract String commandToExecute();
-
- @SerializedNames({"fileUris", "commandToExecute"})
- public static ExtensionProfileSettings create(final List<String> fileUris, final String commandToExecute) {
- return new AutoValue_ExtensionProfileSettings(fileUris == null ? ImmutableList.<String>of() : ImmutableList.copyOf(fileUris), commandToExecute);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ExtensionProperties.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ExtensionProperties.java
deleted file mode 100644
index d4e8b7f..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ExtensionProperties.java
+++ /dev/null
@@ -1,70 +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 com.google.common.collect.ImmutableMap;
-import org.jclouds.json.SerializedNames;
-
-import java.util.Map;
-
-@AutoValue
-public abstract class ExtensionProperties {
-
- /**
- * The publisher reference of the extension properties
- */
- public abstract String publisher();
-
- /**
- * The type reference of the extension properties
- */
- public abstract String type();
-
- /**
- * The typeHandlerVersion reference of the extension properties
- */
- public abstract String typeHandlerVersion();
-
- /**
- * The autoUpgradeMinorVersion reference of the extension properties
- */
- public abstract Boolean autoUpgradeMinorVersion();
-
- /**
- * The ExtensionProfileSettings of the extension properties
- */
- public abstract ExtensionProfileSettings settings();
-
- /**
- * The list of the protectedSettings of the extension properties
- */
- public abstract Map<String, String> protectedSettings();
-
- @SerializedNames({ "publisher", "type", "typeHandlerVersion",
- "autoUpgradeMinorVersion", "settings", "protectedSettings"})
- public static ExtensionProperties create(final String publisher, String type,
- final String typeHandlerVersion,
- final Boolean autoUpgradeMinorVersion,
- final ExtensionProfileSettings settings,
- final Map<String, String> protectedSettings) {
- return new AutoValue_ExtensionProperties(publisher, type, typeHandlerVersion, autoUpgradeMinorVersion,
- settings, protectedSettings == null ?
- ImmutableMap.<String, String>of() : ImmutableMap.copyOf(protectedSettings));
- }
-}
-
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/FrontendIPConfigurations.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/FrontendIPConfigurations.java
deleted file mode 100644
index fae60c9..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/FrontendIPConfigurations.java
+++ /dev/null
@@ -1,45 +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 FrontendIPConfigurations {
- public abstract String name();
-
- @Nullable
- public abstract String id();
-
- @Nullable
- public abstract FrontendIPConfigurationsProperties properties();
-
- @Nullable
- public abstract String etag();
-
- @SerializedNames({ "name", "id", "properties", "etag" })
- public static FrontendIPConfigurations create(final String name, final String id,
- final FrontendIPConfigurationsProperties properties,
- final String etag) {
- return new AutoValue_FrontendIPConfigurations(name, id,
- properties, etag);
- }
-}
-
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/FrontendIPConfigurationsProperties.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/FrontendIPConfigurationsProperties.java
deleted file mode 100644
index b451773..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/FrontendIPConfigurationsProperties.java
+++ /dev/null
@@ -1,66 +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 FrontendIPConfigurationsProperties {
-
- @Nullable
- public abstract IdReference subnet();
-
- @Nullable
- public abstract String privateIPAddress();
-
- @Nullable
- public abstract String privateIPAllocationMethod();
-
- @Nullable
- public abstract IdReference publicIPAddress();
-
-
- @SerializedNames({ "subnet", "privateIPAddress", "privateIPAllocationMethod", "publicIPAddress" })
- public static FrontendIPConfigurationsProperties create(final IdReference subnet, final String privateIPAddress,
- final String privateIPAllocationMethod, final IdReference publicIPAddress) {
- return builder().subnet(subnet).publicIPAddress(publicIPAddress).privateIPAddress(privateIPAddress)
- .privateIPAllocationMethod(privateIPAllocationMethod).build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_FrontendIPConfigurationsProperties.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
- public abstract Builder subnet(IdReference subnet);
-
- public abstract Builder privateIPAddress(String privateIPAddress);
-
- public abstract Builder privateIPAllocationMethod(String privateIPAllocationMethod);
-
- public abstract Builder publicIPAddress(IdReference publicIPAddress);
-
- public abstract FrontendIPConfigurationsProperties build();
- }
-}
-
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/HardwareProfile.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/HardwareProfile.java
deleted file mode 100644
index 9342202..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/HardwareProfile.java
+++ /dev/null
@@ -1,48 +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.json.SerializedNames;
-
-@AutoValue
-public abstract class HardwareProfile {
-
- /**
- * The vm size of the virtual machine.
- */
- public abstract String vmSize();
-
- @SerializedNames({"vmSize"})
- public static HardwareProfile create(final String vmSize) {
- return builder().vmSize(vmSize).build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_HardwareProfile.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
- public abstract Builder vmSize(String vmSize);
-
- public abstract HardwareProfile build();
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/IdReference.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/IdReference.java
deleted file mode 100644
index f73e3e4..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/IdReference.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.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import com.google.auto.value.AutoValue;
-
-// Simple helper class to serialize / deserialize id reference.
-
-@AutoValue
-public abstract class IdReference {
-
- private static final Pattern RESOURCE_GROUP_PATTERN = Pattern.compile("^.*/resourceGroups/([^/]+)(/.*)?$");
-
- @Nullable
- public abstract String id();
-
- @Nullable
- public String resourceGroup() {
- return extractResourceGroup(id());
- }
-
- @Nullable
- public String name() {
- return extractName(id());
- }
-
- @SerializedNames({"id"})
- public static IdReference create(final String id) {
- return new AutoValue_IdReference(id);
- }
-
- /**
- * Extracts the name from the given URI.
- */
- public static String extractName(String uri) {
- if (uri == null)
- return null;
- String noSlashAtEnd = uri.replaceAll("/+$", "");
- return noSlashAtEnd.substring(noSlashAtEnd.lastIndexOf('/') + 1);
- }
-
- /**
- * Extracts the resource group name from the given URI.
- */
- public static String extractResourceGroup(String uri) {
- if (uri == null)
- return null;
- Matcher m = RESOURCE_GROUP_PATTERN.matcher(uri);
- return m.matches() ? m.group(1) : null;
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Image.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Image.java
deleted file mode 100644
index b442617..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Image.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 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 Image {
-
- /**
- * The id of the image
- */
- @Nullable
- public abstract String id();
-
- /**
- * The name of the image
- */
- @Nullable
- public abstract String name();
-
- /**
- * The location of the image
- */
- public abstract String location();
-
- /**
- * The image properties.
- */
- public abstract ImageProperties properties();
-
- /**
- * the tags of the image
- */
- @Nullable public abstract Map<String, String> tags();
-
- @SerializedNames({"id", "name", "location", "properties", "tags"})
- public static Image create(final String id, final String name, final String location,
- final ImageProperties properties, final Map<String, String> tags) {
- return builder().id(id).name(name).location(location).properties(properties).tags(tags).build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_Image.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 properties(ImageProperties properties);
- public abstract Builder tags(Map<String, String> tags);
-
- abstract Map<String, String> tags();
-
- abstract Image autoBuild();
-
- public Image build() {
- tags(tags() != null ? ImmutableMap.copyOf(tags()) : null);
- return autoBuild();
- }
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ImageProperties.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ImageProperties.java
deleted file mode 100644
index 44cb16e..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ImageProperties.java
+++ /dev/null
@@ -1,61 +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 ImageProperties implements Provisionable {
-
- @Nullable
- public abstract IdReference sourceVirtualMachine();
-
- @Nullable
- public abstract StorageProfile storageProfile();
-
- @Nullable
- public abstract String provisioningState();
-
- @SerializedNames({ "sourceVirtualMachine", "storageProfile", "provisioningState"})
- public static ImageProperties create(final IdReference sourceVirtualMachine,
- final StorageProfile storageProfile,
- final String provisioningState) {
- return builder()
- .sourceVirtualMachine(sourceVirtualMachine)
- .storageProfile(storageProfile)
- .provisioningState(provisioningState)
- .build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_ImageProperties.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
- public abstract Builder sourceVirtualMachine(IdReference sourceVirtualMachine);
- public abstract Builder storageProfile(StorageProfile storageProfile);
- public abstract Builder provisioningState(String provisioningState);
- public abstract ImageProperties build();
-
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ImageReference.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ImageReference.java
deleted file mode 100644
index d001949..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ImageReference.java
+++ /dev/null
@@ -1,106 +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 static org.jclouds.azurecompute.arm.domain.IdReference.extractName;
-import static org.jclouds.azurecompute.arm.domain.IdReference.extractResourceGroup;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import com.google.auto.value.AutoValue;
-
-@AutoValue
-public abstract class ImageReference {
-
- /**
- * Specifies the resource identifier of a virtual machine image in your subscription. This element is only used
- * for virtual machine images, not platform images or marketplace images.
- */
- @Nullable
- public abstract String customImageId();
-
- /**
- * The publisher of the image reference.
- */
- @Nullable
- public abstract String publisher();
-
- /**
- * The offer of the image reference.
- */
- @Nullable
- public abstract String offer();
-
- /**
- * The sku of the image reference.
- */
- @Nullable
- public abstract String sku();
-
- /**
- * The version of the image reference.
- */
- @Nullable
- public abstract String version();
-
- ImageReference() {
-
- }
-
- @SerializedNames({"id", "publisher", "offer", "sku", "version"})
- public static ImageReference create(final String id,
- final String publisher,
- final String offer,
- final String sku,
- final String version) {
-
- return builder().customImageId(id)
- .publisher(publisher)
- .offer(offer)
- .sku(sku)
- .version(version)
- .build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_ImageReference.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
- public abstract Builder customImageId(String ids);
- public abstract Builder publisher(String publisher);
- public abstract Builder offer(String offer);
- public abstract Builder sku(String sku);
- public abstract Builder version(String version);
-
- public abstract ImageReference build();
- }
-
- public String encodeFieldsToUniqueId(String location) {
- return VMImage.azureImage().location(location).publisher(publisher()).offer(offer()).sku(sku()).build()
- .encodeFieldsToUniqueId();
- }
-
- public String encodeFieldsToUniqueIdCustom(String location) {
- return VMImage.customImage().resourceGroup(extractResourceGroup(customImageId())).location(location)
- .name(extractName(customImageId())).build().encodeFieldsToUniqueIdCustom();
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/InboundNatRule.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/InboundNatRule.java
deleted file mode 100644
index dccc2e9..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/InboundNatRule.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 InboundNatRule {
- @Nullable
- public abstract String name();
-
- @Nullable
- public abstract String id();
-
- @Nullable
- public abstract InboundNatRuleProperties properties();
-
- @Nullable
- public abstract String etag();
-
- @SerializedNames({ "name", "id", "properties", "etag" })
- public static InboundNatRule create(final String name, final String id, final InboundNatRuleProperties properties,
- final String etag) {
- return new AutoValue_InboundNatRule(name, id, properties, etag);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/InboundNatRuleProperties.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/InboundNatRuleProperties.java
deleted file mode 100644
index 9ed6aed..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/InboundNatRuleProperties.java
+++ /dev/null
@@ -1,105 +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 InboundNatRuleProperties implements Provisionable {
- 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;
- }
- }
-
- @Nullable
- public abstract IdReference frontendIPConfiguration();
-
- @Nullable
- public abstract IdReference backendIPConfiguration();
-
- public abstract Protocol protocol();
-
- public abstract int backendPort();
-
- public abstract int frontendPort();
-
- @Nullable
- public abstract Boolean enableFloatingIP();
-
- @Nullable
- public abstract Integer idleTimeoutInMinutes();
-
- @Nullable
- public abstract String provisioningState();
-
- @SerializedNames({ "frontendIPConfiguration", "backendIPConfiguration", "protocol", "frontendPort", "backendPort",
- "provisioningState", "enableFloatingIP", "idleTimeoutInMinutes" })
- public static InboundNatRuleProperties create(final IdReference frontendIPConfiguration,
- final IdReference backendIPConfiguration, final Protocol protocol, final int frontendPort,
- final int backendPort, final String provisioningState, Boolean enableFloatingIP, Integer idleTimeoutInMinutes) {
- return builder().frontendIPConfiguration(frontendIPConfiguration).backendIPConfiguration(backendIPConfiguration)
- .protocol(protocol).frontendPort(frontendPort).backendPort(backendPort)
- .provisioningState(provisioningState).enableFloatingIP(enableFloatingIP)
- .idleTimeoutInMinutes(idleTimeoutInMinutes).build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_InboundNatRuleProperties.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
-
- public abstract Builder frontendIPConfiguration(IdReference frontendIPConfiguration);
-
- public abstract Builder backendIPConfiguration(IdReference backendIPConfiguration);
-
- public abstract Builder protocol(Protocol protocol);
-
- public abstract Builder frontendPort(int frontendPort);
-
- public abstract Builder backendPort(int backendPort);
-
- public abstract Builder provisioningState(String provisioningState);
-
- public abstract Builder enableFloatingIP(Boolean enableFloatingIP);
-
- public abstract Builder idleTimeoutInMinutes(Integer idleTimeoutInMinutes);
-
- public abstract InboundNatRuleProperties build();
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/IpConfiguration.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/IpConfiguration.java
deleted file mode 100644
index e523622..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/IpConfiguration.java
+++ /dev/null
@@ -1,68 +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 IpConfiguration {
-
- @Nullable
- public abstract String name();
-
- @Nullable
- public abstract String id();
-
- @Nullable
- public abstract String etag();
-
- @Nullable
- public abstract Boolean primary();
-
- @Nullable
- public abstract IpConfigurationProperties properties();
-
- @SerializedNames({"name", "id", "etag", "primary", "properties"})
- public static IpConfiguration create(final String name, final String id, final String etag, final Boolean primary, final IpConfigurationProperties properties) {
- return builder()
- .name(name)
- .id(id)
- .etag(etag)
- .primary(primary)
- .properties(properties)
- .build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_IpConfiguration.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 primary(Boolean primary);
- public abstract Builder properties(IpConfigurationProperties properties);
- public abstract IpConfiguration build();
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/IpConfigurationProperties.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/IpConfigurationProperties.java
deleted file mode 100644
index 21f494f..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/IpConfigurationProperties.java
+++ /dev/null
@@ -1,105 +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 com.google.auto.value.AutoValue;
-import com.google.common.collect.ImmutableList;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-@AutoValue
-public abstract class IpConfigurationProperties implements Provisionable {
-
- @Nullable
- public abstract String provisioningState();
-
- @Nullable
- public abstract String privateIPAddress();
-
- @Nullable
- public abstract String privateIPAllocationMethod();
-
- @Nullable
- public abstract IdReference subnet();
-
- @Nullable
- public abstract IdReference publicIPAddress();
-
- @Nullable
- public abstract List<IdReference> loadBalancerBackendAddressPools();
-
- @Nullable
- public abstract List<IdReference> loadBalancerInboundNatRules();
-
- @SerializedNames({ "provisioningState", "privateIPAddress", "privateIPAllocationMethod", "subnet",
- "publicIPAddress", "loadBalancerBackendAddressPools", "loadBalancerInboundNatRules" })
- public static IpConfigurationProperties create(final String provisioningState, final String privateIPAddress,
- final String privateIPAllocationMethod, final IdReference subnet, final IdReference publicIPAddress,
- List<IdReference> loadBalancerBackendAddressPools, List<IdReference> loadBalancerInboundNatRules) {
-
- return builder()
- .provisioningState(provisioningState)
- .privateIPAddress(privateIPAddress)
- .privateIPAllocationMethod(privateIPAllocationMethod)
- .subnet(subnet)
- .publicIPAddress(publicIPAddress)
- .loadBalancerBackendAddressPools(loadBalancerBackendAddressPools)
- .loadBalancerInboundNatRules(loadBalancerInboundNatRules)
- .build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_IpConfigurationProperties.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
- public abstract Builder provisioningState(String provisioningState);
-
- public abstract Builder privateIPAddress(String privateIPAddress);
-
- public abstract Builder privateIPAllocationMethod(String privateIPAllocationMethod);
-
- public abstract Builder subnet(IdReference subnet);
-
- public abstract Builder publicIPAddress(IdReference publicIPAddress);
-
- public abstract Builder loadBalancerBackendAddressPools(List<IdReference> loadBalancerBackendAddressPools);
-
- public abstract Builder loadBalancerInboundNatRules(List<IdReference> loadBalancerInboundNatRules);
-
- abstract List<IdReference> loadBalancerBackendAddressPools();
-
- abstract List<IdReference> loadBalancerInboundNatRules();
-
- abstract IpConfigurationProperties autoBuild();
-
- public IpConfigurationProperties build() {
- loadBalancerBackendAddressPools(loadBalancerBackendAddressPools() != null ? ImmutableList
- .copyOf(loadBalancerBackendAddressPools()) : null);
- loadBalancerInboundNatRules(loadBalancerInboundNatRules() != null ? ImmutableList
- .copyOf(loadBalancerInboundNatRules()) : null);
- return autoBuild();
- }
- }
-}
-
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Key.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Key.java
deleted file mode 100644
index ed9b778..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Key.java
+++ /dev/null
@@ -1,229 +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 java.util.List;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import com.google.auto.value.AutoValue;
-
-@AutoValue
-public abstract class Key {
- @AutoValue
- public abstract static class JsonWebKey {
- @Nullable
- public abstract String crv();
-
- @Nullable
- public abstract String d();
-
- @Nullable
- public abstract String dp();
-
- @Nullable
- public abstract String dq();
-
- @Nullable
- public abstract String e();
-
- @Nullable
- public abstract String k();
-
- @Nullable
- public abstract String keyHsm();
-
- public abstract List<String> keyOps();
-
- @Nullable
- public abstract String kid();
-
- @Nullable
- public abstract String kty();
-
- @Nullable
- public abstract String n();
-
- @Nullable
- public abstract String p();
-
- @Nullable
- public abstract String q();
-
- @Nullable
- public abstract String qi();
-
- @Nullable
- public abstract String x();
-
- @Nullable
- public abstract String y();
-
- @SerializedNames({"crv", "d", "dp", "dq", "e", "k", "key_hsm", "key_ops", "kid", "kty", "n", "p", "q", "qi", "x", "y"})
- public static JsonWebKey create(final String crv, final String d, final String dp, final String dq,
- final String e, final String k, final String keyHsm, final List<String> keyOps,
- final String kid, final String kty, final String n, final String p,
- final String q, final String qi, final String x, final String y) {
- return new AutoValue_Key_JsonWebKey(
- crv, d, dp, dq, e, k, keyHsm,
- keyOps != null ? ImmutableList.copyOf(keyOps) : ImmutableList.<String> of(),
- kid, kty, n, p, q, qi, x, y);
- }
- }
-
- @AutoValue
- public abstract static class KeyAttributes {
- @Nullable
- public abstract Boolean enabled();
-
- @Nullable
- public abstract Integer created();
-
- @Nullable
- public abstract Integer expires();
-
- @Nullable
- public abstract Integer notBefore();
-
- @Nullable
- public abstract String recoveryLevel();
-
- @Nullable
- public abstract Integer updated();
-
- @SerializedNames({"enabled", "created", "expires", "notBefore", "recoveryLevel", "updated"})
- public static KeyAttributes create(final Boolean enabled,
- final Integer created,
- final Integer expires,
- final Integer notBefore,
- final String recoveryLevel,
- final Integer updated) {
- return new AutoValue_Key_KeyAttributes(enabled, created, expires, notBefore, recoveryLevel, updated);
- }
-
- KeyAttributes() {
- }
- }
-
- @AutoValue
- public abstract static class KeyBundle {
- @Nullable
- public abstract KeyAttributes attributes();
-
- @Nullable
- public abstract JsonWebKey key();
-
- @Nullable
- public abstract Boolean managed();
-
- @Nullable
- public abstract Map<String, String> tags();
-
- @SerializedNames({"attributes", "key", "managed", "tags"})
- public static KeyBundle create(final KeyAttributes attributes, final JsonWebKey key, final boolean managed, final Map<String, String> tags) {
- return new AutoValue_Key_KeyBundle(
- attributes,
- key,
- managed,
- tags != null ? ImmutableMap.copyOf(tags) : null
- );
- }
- }
-
- @AutoValue
- public abstract static class DeletedKeyBundle {
- @Nullable
- public abstract KeyAttributes attributes();
-
- @Nullable
- public abstract String deletedDate();
-
- @Nullable
- public abstract JsonWebKey key();
-
- @Nullable
- public abstract Boolean managed();
-
- @Nullable
- public abstract String recoveryId();
-
- @Nullable
- public abstract String scheduledPurgeDate();
-
- @Nullable
- public abstract Map<String, String> tags();
-
- @SerializedNames({"attributes", "deletedDate", "key", "managed", "recoveryId", "scheduledPurgeDate", "tags"})
- public static DeletedKeyBundle create(final KeyAttributes attributes, final String deletedDate, final JsonWebKey key, final boolean managed, final String recoveryId, final String scheduledPurgeDate, final Map<String, String> tags) {
- return new AutoValue_Key_DeletedKeyBundle(
- attributes,
- deletedDate,
- key,
- managed,
- recoveryId,
- scheduledPurgeDate,
- tags != null ? ImmutableMap.copyOf(tags) : null
-
- );
- }
- }
-
- @AutoValue
- public abstract static class KeyOperationResult {
- @Nullable
- public abstract String keyId();
-
- @Nullable
- public abstract String value();
-
- @SerializedNames({"kid", "value"})
- public static KeyOperationResult create(final String keyId, final String value) {
- return new AutoValue_Key_KeyOperationResult(
- keyId,
- value
- );
- }
- }
-
- @Nullable
- public abstract String kid();
-
- public abstract KeyAttributes attributes();
-
- @Nullable
- public abstract Boolean managed();
-
- @Nullable
- public abstract Map<String, String> tags();
-
- @SerializedNames({"kid", "attributes", "managed", "tags"})
- public static Key create(final String kid, final KeyAttributes attributes, final boolean managed, final Map<String, String> tags) {
- return new AutoValue_Key(
- kid,
- attributes,
- managed,
- tags != null ? ImmutableMap.copyOf(tags) : null
- );
- }
-
- Key() {
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/KeyVaultReference.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/KeyVaultReference.java
deleted file mode 100644
index 2eb2f87..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/KeyVaultReference.java
+++ /dev/null
@@ -1,46 +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.json.SerializedNames;
-
-// Simple helper class to serialize / deserialize keyvault reference.
-
-@AutoValue
-public abstract class KeyVaultReference {
-
- @AutoValue
- public abstract static class Reference {
-
- public abstract IdReference keyVault();
-
- public abstract String secretName();
-
- @SerializedNames({"keyVault", "secretName"})
- public static Reference create(final IdReference keyVault, final String secretName) {
- return new AutoValue_KeyVaultReference_Reference(keyVault, secretName);
- }
- }
-
- public abstract Reference reference();
-
- @SerializedNames({"reference"})
- public static KeyVaultReference create(final Reference reference) {
- return new AutoValue_KeyVaultReference(reference);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/LoadBalancer.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/LoadBalancer.java
deleted file mode 100644
index 6e3e748..0000000
--- a/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();
- }
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/LoadBalancerProperties.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/LoadBalancerProperties.java
deleted file mode 100644
index b8ab723..0000000
--- a/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();
- }
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/LoadBalancingRule.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/LoadBalancingRule.java
deleted file mode 100644
index ecc97dd..0000000
--- a/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);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/LoadBalancingRuleProperties.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/LoadBalancingRuleProperties.java
deleted file mode 100644
index ca90a15..0000000
--- a/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();
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Location.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Location.java
deleted file mode 100644
index a597a61..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Location.java
+++ /dev/null
@@ -1,58 +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.json.SerializedNames;
-
-/**
- * A data center location that is valid for your subscription.
- */
-@AutoValue
-public abstract class Location {
- /**
- * The id of the data center.
- */
- public abstract String id();
-
- /**
- * The name of the data center location. Ex. {@code West Europe}.
- */
- public abstract String name();
-
- /**
- * The localized name of the data center location.
- */
- public abstract String displayName();
-
- /**
- * The longitude of the datacenter
- */
- public abstract double longitude();
-
- /**
- * The latitude of the datacenter
- */
- public abstract double latitude();
-
- @SerializedNames({"id", "name", "displayName", "longitude", "latitude"})
- public static Location create(final String id, final String name, final String displayName, final double longitude,
- final double latitude) {
-
- return new AutoValue_Location(id, name, displayName, longitude, latitude);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ManagedDiskParameters.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ManagedDiskParameters.java
deleted file mode 100644
index a8a0ae3..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ManagedDiskParameters.java
+++ /dev/null
@@ -1,36 +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 ManagedDiskParameters {
-
- @Nullable public abstract String id();
-
- // Might be null in custom images. In that case the API returns it in the OSDisk object.
- @Nullable public abstract StorageAccountType storageAccountType();
-
- @SerializedNames({"id", "storageAccountType"})
- public static ManagedDiskParameters create(final String id, final String storageAccountType) {
- return new AutoValue_ManagedDiskParameters(id, StorageAccountType.fromString(storageAccountType));
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Metric.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Metric.java
deleted file mode 100644
index 0320db2..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Metric.java
+++ /dev/null
@@ -1,51 +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;
-
-/**
- * A Metric with its values for a resource
- */
-@AutoValue
-public abstract class Metric {
-
- public abstract List<MetricData> data();
-
- public abstract String id();
-
- @Nullable
- public abstract MetricName name();
-
- public abstract String type();
-
- public abstract String unit();
-
- @SerializedNames({ "data", "id", "name", "type", "unit" })
- public static Metric create(final List<MetricData> data, final String id, final MetricName name, final String type,
- final String unit) {
- return new AutoValue_Metric(data == null ? ImmutableList.<MetricData> of() : ImmutableList.copyOf(data), id, name,
- type, unit);
- }
-
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/MetricData.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/MetricData.java
deleted file mode 100644
index 29e810e..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/MetricData.java
+++ /dev/null
@@ -1,74 +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.Date;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import com.google.auto.value.AutoValue;
-
-/**
- *
- */
-@AutoValue
-public abstract class MetricData
-{
-
- /**
- * The timestamp for the metric value in ISO 8601 format.
- */
- public abstract Date timeStamp();
-
- /**
- * The average value in the time range
- */
- @Nullable
- public abstract Double total();
-
- /**
- * The sum of all of the values in the time range.
- */
- @Nullable
- public abstract Double average();
-
- /**
- * The least value in the time range.
- */
- @Nullable
- public abstract Double minimum();
-
- /**
- * The greatest value in the time range.
- */
- @Nullable
- public abstract Double maximum();
-
- /**
- * The number of samples in the time range.
- */
- @Nullable
- public abstract Long count();
-
- @SerializedNames({"timeStamp", "total", "average", "minimum", "maximum", "count"})
- public static MetricData create(final Date timeStamp, final Double total, final Double average,
- final Double minimum, final Double maximum, final Long count)
- {
- return new AutoValue_MetricData(timeStamp, total, average, minimum, maximum, count);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/MetricDefinition.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/MetricDefinition.java
deleted file mode 100644
index 95f8d47..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/MetricDefinition.java
+++ /dev/null
@@ -1,97 +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.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.ImmutableList;
-
-/**
- * A Metric definition for a resource
- */
-@AutoValue
-public abstract class MetricDefinition {
-
- public enum AggregationType {
- None("None"), Average("Average"), Count("Count"), Total("Total"), Minimum("Minimum"), Maximum(
- "Maximum"), UNRECOGNIZED("Unrecognized");
-
- private final String label;
-
- AggregationType(String label) {
- this.label = label;
- }
-
- public static AggregationType fromValue(final String text) {
- return (AggregationType) GetEnumValue.fromValueOrDefault(text, AggregationType.UNRECOGNIZED);
- }
-
- @Override
- public String toString() {
- return label;
- }
- }
-
- @Nullable
- public abstract String resourceId();
-
- public abstract MetricName name();
-
- @Nullable
- public abstract Boolean isDimensionRequired();
-
- public abstract String unit();
-
- public abstract AggregationType primaryAggregationType();
-
- public abstract List<MetricDefinition.MetricAvailability> metricAvailabilities();
-
- public abstract String id();
-
- @SerializedNames({ "resourceId", "name", "isDimensionRequired", "unit", "primaryAggregationType",
- "metricAvailabilities", "id" })
- public static MetricDefinition create(final String resourceId, final MetricName name,
- final Boolean isDimensionRequired, final String unit, final AggregationType primaryAggregationType,
- List<MetricAvailability> metricAvailabilities, final String id) {
- return new AutoValue_MetricDefinition(resourceId, name, isDimensionRequired, unit, primaryAggregationType,
- metricAvailabilities == null ?
- ImmutableList.<MetricAvailability> of() :
- ImmutableList.copyOf(metricAvailabilities), id);
- }
-
- @AutoValue
- public abstract static class MetricAvailability {
-
- public abstract String timeGrain();
-
- public abstract String retention();
-
- MetricAvailability() {
-
- }
-
- @SerializedNames({ "timeGrain", "retention" })
- public static MetricDefinition.MetricAvailability create(String timeGrain, String retention) {
- return new AutoValue_MetricDefinition_MetricAvailability(timeGrain, retention);
- }
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/MetricName.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/MetricName.java
deleted file mode 100644
index 7caf52e..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/MetricName.java
+++ /dev/null
@@ -1,38 +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.json.SerializedNames;
-
-import com.google.auto.value.AutoValue;
-
-/**
- * A Metric with its values for a resource
- */
-@AutoValue
-public abstract class MetricName {
-
- public abstract String value();
-
- public abstract String localizedValue();
-
- @SerializedNames({ "value", "localizedValue" })
- public static MetricName create(String value, String localizedValue) {
- return new AutoValue_MetricName(value, localizedValue);
- }
-
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/NetworkInterfaceCard.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/NetworkInterfaceCard.java
deleted file mode 100644
index 66bc1a3..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/NetworkInterfaceCard.java
+++ /dev/null
@@ -1,57 +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 com.google.common.collect.ImmutableMap;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import java.util.Map;
-
-@AutoValue
-public abstract class NetworkInterfaceCard {
-
- @Nullable
- public abstract String name();
-
- @Nullable
- public abstract String id();
-
- @Nullable
- public abstract String etag();
-
- @Nullable
- public abstract String location();
-
- @Nullable
- public abstract NetworkInterfaceCardProperties properties();
-
- @Nullable
- public abstract Map<String, String> tags();
-
- @SerializedNames({"name", "id", "etag", "location", "properties", "tags"})
- public static NetworkInterfaceCard create(final String name,
- final String id,
- final String etag,
- final String location,
- final NetworkInterfaceCardProperties properties,
- final Map<String, String> tags) {
- return new AutoValue_NetworkInterfaceCard(name, id, etag, location, properties,
- tags != null ? ImmutableMap.copyOf(tags) : null);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/NetworkInterfaceCardProperties.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/NetworkInterfaceCardProperties.java
deleted file mode 100644
index 680d0a2..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/NetworkInterfaceCardProperties.java
+++ /dev/null
@@ -1,78 +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 com.google.common.collect.ImmutableList;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import java.util.List;
-
-@AutoValue
-public abstract class NetworkInterfaceCardProperties implements Provisionable {
-
- @Nullable public abstract String provisioningState();
- @Nullable public abstract String resourceGuid();
- @Nullable public abstract Boolean enableIPForwarding();
- @Nullable public abstract List<IpConfiguration> ipConfigurations();
- @Nullable public abstract IdReference networkSecurityGroup();
-
- @SerializedNames({"provisioningState", "resourceGuid", "enableIPForwarding", "ipConfigurations",
- "networkSecurityGroup"})
- public static NetworkInterfaceCardProperties create(final String provisioningState, final String resourceGuid,
- final Boolean enableIPForwarding, final List<IpConfiguration> ipConfigurations,
- final IdReference networkSecurityGroup) {
- NetworkInterfaceCardProperties.Builder builder = NetworkInterfaceCardProperties.builder()
- .provisioningState(provisioningState)
- .resourceGuid(resourceGuid)
- .enableIPForwarding(enableIPForwarding)
- .ipConfigurations(ipConfigurations == null ? null : ImmutableList.copyOf(ipConfigurations))
- .networkSecurityGroup(networkSecurityGroup);
-
- return builder.build();
- }
-
- NetworkInterfaceCardProperties() {
-
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_NetworkInterfaceCardProperties.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
- public abstract Builder provisioningState(String provisioningState);
- public abstract Builder resourceGuid(String resourceGuid);
- public abstract Builder enableIPForwarding(Boolean enableIPForwarding);
- public abstract Builder ipConfigurations(List<IpConfiguration> ipConfigurations);
- public abstract Builder networkSecurityGroup(IdReference networkSecurityGroup);
-
- abstract List<IpConfiguration> ipConfigurations();
- abstract NetworkInterfaceCardProperties autoBuild();
-
- public NetworkInterfaceCardProperties build() {
- ipConfigurations(ipConfigurations() != null ? ImmutableList.copyOf(ipConfigurations()) : null);
- return autoBuild();
- }
- }
-}
-
-
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/NetworkInterfaceConfiguration.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/NetworkInterfaceConfiguration.java
deleted file mode 100644
index b2e81b2..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/NetworkInterfaceConfiguration.java
+++ /dev/null
@@ -1,44 +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 NetworkInterfaceConfiguration {
- /**
- * The name of the NetworkInterfaceConfiguration
- */
- @Nullable
- public abstract String name();
-
- /**
- * The networkConfigurationProperties of the NetworkInterfaceConfiguration
- */
- @Nullable
- public abstract NetworkInterfaceConfigurationProperties networkInterfaceConfigurationProperties();
-
- @SerializedNames({"name", "properties"})
- public static NetworkInterfaceConfiguration create(
- final String name, NetworkInterfaceConfigurationProperties networkInterfaceConfigurationProperties) {
-
- return new AutoValue_NetworkInterfaceConfiguration(name, networkInterfaceConfigurationProperties);
- }
-
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/NetworkInterfaceConfigurationProperties.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/NetworkInterfaceConfigurationProperties.java
deleted file mode 100644
index 85518b8..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/NetworkInterfaceConfigurationProperties.java
+++ /dev/null
@@ -1,68 +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;
-
-import java.util.List;
-
-
-@AutoValue
-public abstract class NetworkInterfaceConfigurationProperties {
- /**
- * The primary of the NetworkInterfaceConfigurationProperties
- */
- @Nullable
- public abstract Boolean primary();
-
- /**
- * The enableAcceleratedNetworking of the NetworkInterfaceConfigurationProperties
- */
- @Nullable
- public abstract Boolean enableAcceleratedNetworking();
-
- /**
- * The networkSecurityGroup of the NetworkInterfaceConfigurationProperties
- */
- @Nullable
- public abstract VirtualMachineScaleSetNetworkSecurityGroup networkSecurityGroup();
-
- /**
- * The dnsSettings of the NetworkInterfaceConfigurationProperties
- */
- @Nullable
- public abstract VirtualMachineScaleSetDNSSettings dnsSettings();
-
- /**
- * The ipConfigurations of the NetworkInterfaceConfigurationProperties
- */
- public abstract List<VirtualMachineScaleSetIpConfiguration> ipConfigurations();
-
-
- @SerializedNames({"primary", "enableAcceleratedNetworking", "networkSecurityGroup", "dnsSettings", "ipConfigurations"})
- public static NetworkInterfaceConfigurationProperties create(final Boolean primary,
- final Boolean enableAcceleratedNetworking,
- final VirtualMachineScaleSetNetworkSecurityGroup networkSecurityGroup,
- final VirtualMachineScaleSetDNSSettings dnsSettings,
- final List<VirtualMachineScaleSetIpConfiguration> ipConfigurations) {
-
- return new AutoValue_NetworkInterfaceConfigurationProperties(primary, enableAcceleratedNetworking,
- networkSecurityGroup, dnsSettings, ipConfigurations);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/NetworkProfile.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/NetworkProfile.java
deleted file mode 100644
index cdb6d51..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/NetworkProfile.java
+++ /dev/null
@@ -1,92 +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 com.google.common.collect.ImmutableList;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import java.util.List;
-
-@AutoValue
-public abstract class NetworkProfile {
-
- @AutoValue
- public abstract static class NetworkInterface {
- public abstract String id();
- @Nullable public abstract NetworkInterfaceProperties properties();
-
- @AutoValue
- public abstract static class NetworkInterfaceProperties {
- public abstract boolean primary();
-
- NetworkInterfaceProperties() {
-
- }
-
- @SerializedNames({"primary"})
- public static NetworkInterfaceProperties create(boolean primary) {
- return new AutoValue_NetworkProfile_NetworkInterface_NetworkInterfaceProperties(primary);
- }
- }
-
- NetworkInterface() {
-
- }
-
- @SerializedNames({"id", "properties"})
- public static NetworkInterface create(String id, NetworkInterfaceProperties properties) {
- return new AutoValue_NetworkProfile_NetworkInterface(id, properties);
- }
- }
-
- /**
- * List of network interfaces
- */
- public abstract List<NetworkInterface> networkInterfaces();
-
- @SerializedNames({"networkInterfaces"})
- public static NetworkProfile create(final List<NetworkInterface> networkInterfaces) {
- return builder().networkInterfaces(networkInterfaces).build();
- }
-
- NetworkProfile() {
-
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_NetworkProfile.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
- public abstract Builder networkInterfaces(List<NetworkInterface> networkInterfaces);
-
- abstract List<NetworkInterface> networkInterfaces();
-
- abstract NetworkProfile autoBuild();
-
- public NetworkProfile build() {
- networkInterfaces(networkInterfaces() != null ? ImmutableList.copyOf(networkInterfaces()) : ImmutableList.<NetworkInterface>of());
- return autoBuild();
- }
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/NetworkSecurityGroup.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/NetworkSecurityGroup.java
deleted file mode 100644
index e7c75e8..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/NetworkSecurityGroup.java
+++ /dev/null
@@ -1,49 +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 com.google.common.collect.ImmutableMap;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import java.util.Map;
-
-@AutoValue
-public abstract class NetworkSecurityGroup {
- public abstract String id();
- public abstract String name();
-
- @Nullable
- public abstract String location();
-
- @Nullable
- public abstract Map<String, String> tags();
-
- @Nullable
- public abstract NetworkSecurityGroupProperties properties();
-
- @Nullable
- public abstract String etag();
-
- @SerializedNames({ "id", "name", "location", "tags", "properties", "etag" })
- public static NetworkSecurityGroup create(final String id, final String name, final String location,
- final Map<String, String> tags, final NetworkSecurityGroupProperties properties, final String etag) {
- return new AutoValue_NetworkSecurityGroup(id, name, location, (tags == null) ? null : ImmutableMap.copyOf(tags),
- properties, etag);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/NetworkSecurityGroupProperties.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/NetworkSecurityGroupProperties.java
deleted file mode 100644
index 60fb2e6..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/NetworkSecurityGroupProperties.java
+++ /dev/null
@@ -1,89 +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;
-import com.google.common.collect.ImmutableList;
-
-import java.util.List;
-
-@AutoValue
-public abstract class NetworkSecurityGroupProperties implements Provisionable {
-
- @Nullable
- public abstract List<NetworkSecurityRule> securityRules();
-
- @Nullable
- public abstract List<NetworkSecurityRule> defaultSecurityRules();
-
- @Nullable
- public abstract List<NetworkInterfaceCard> networkInterfaces();
-
- @Nullable
- public abstract List<Subnet> subnets();
-
- @Nullable
- public abstract String resourceGuid();
-
- @Nullable
- public abstract String provisioningState();
-
- @SerializedNames({"securityRules", "defaultSecurityRules", "networkInterfaces", "subnets", "resourceGuid",
- "provisioningState"})
- public static NetworkSecurityGroupProperties create(final List<NetworkSecurityRule> securityRules,
- final List<NetworkSecurityRule> defaultSecurityRules,
- final List<NetworkInterfaceCard> networkInterfaces,
- final List<Subnet> subnets,
- final String resourceGuid,
- final String provisioningState) {
- return builder()
- .securityRules((securityRules == null) ? null : ImmutableList.copyOf(securityRules))
- .defaultSecurityRules((defaultSecurityRules == null) ? null : ImmutableList.copyOf(defaultSecurityRules))
- .networkInterfaces((networkInterfaces == null) ? null : ImmutableList.copyOf(networkInterfaces))
- .subnets((subnets == null) ? null : ImmutableList.copyOf(subnets))
- .resourceGuid(resourceGuid)
- .provisioningState(provisioningState)
- .build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_NetworkSecurityGroupProperties.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
- public abstract Builder securityRules(List<NetworkSecurityRule> securityRules);
-
- public abstract Builder defaultSecurityRules(List<NetworkSecurityRule> securityRules);
-
- public abstract Builder networkInterfaces(List<NetworkInterfaceCard> networkInterfaces);
-
- public abstract Builder subnets(List<Subnet> subnets);
-
- public abstract Builder resourceGuid(String resourceGuid);
-
- public abstract Builder provisioningState(String provisioningState);
-
- public abstract NetworkSecurityGroupProperties build();
- }
-}
-
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/NetworkSecurityRule.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/NetworkSecurityRule.java
deleted file mode 100644
index 857a568..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/NetworkSecurityRule.java
+++ /dev/null
@@ -1,46 +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 NetworkSecurityRule {
-
- @Nullable
- public abstract String name();
-
- @Nullable
- public abstract String id();
-
- @Nullable
- public abstract String etag();
-
- @Nullable
- public abstract NetworkSecurityRuleProperties properties();
-
- @SerializedNames({"name", "id", "etag", "properties"})
- public static NetworkSecurityRule create(final String name,
- final String id,
- final String etag,
- final NetworkSecurityRuleProperties properties) {
- return new AutoValue_NetworkSecurityRule(name, id, etag, properties);
- }
-}
-
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/NetworkSecurityRuleProperties.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/NetworkSecurityRuleProperties.java
deleted file mode 100644
index e93107e..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/NetworkSecurityRuleProperties.java
+++ /dev/null
@@ -1,146 +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.azurecompute.arm.util.GetEnumValue;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-@AutoValue
-public abstract class NetworkSecurityRuleProperties {
- public enum Protocol {
- // * is an allowed value, will handle in
- Tcp("Tcp"),
- Udp("Udp"),
- All("*"),
- UNRECOGNIZED("Unrecognized");
-
- private final String label;
-
- private Protocol(String label) { this.label = label; }
-
- public static Protocol fromValue(final String text) {
- if ("*".equals(text)) {
- return All;
- } else {
- return (Protocol) GetEnumValue.fromValueOrDefault(text, Protocol.UNRECOGNIZED);
- }
- }
-
- @Override
- public String toString() {
- return label;
- }
- }
-
- public enum Access {
- Allow,
- Deny,
- UNRECOGNIZED;
-
- public static Access fromValue(final String text) {
- return (Access) GetEnumValue.fromValueOrDefault(text, Access.UNRECOGNIZED);
- }
- }
-
- public enum Direction {
- Inbound,
- Outbound,
- UNRECOGNIZED;
-
- public static Direction fromValue(final String text) {
- return (Direction) GetEnumValue.fromValueOrDefault(text, Direction.UNRECOGNIZED);
- }
- }
-
- @Nullable
- public abstract String description();
-
- public abstract Protocol protocol();
-
- @Nullable
- public abstract String sourcePortRange();
-
- @Nullable
- public abstract String destinationPortRange();
-
- public abstract String sourceAddressPrefix();
-
- public abstract String destinationAddressPrefix();
-
- public abstract Access access();
-
- @Nullable
- public abstract Integer priority();
-
- public abstract Direction direction();
-
- @SerializedNames({"description", "protocol", "sourcePortRange", "destinationPortRange", "sourceAddressPrefix", "destinationAddressPrefix", "access", "priority", "direction"})
- public static NetworkSecurityRuleProperties create(final String description,
- final Protocol protocol,
- final String sourcePortRange,
- final String destinationPortRange,
- final String sourceAddressPrefix,
- final String destinationAddressPrefix,
- final Access access,
- final Integer priority,
- final Direction direction) {
- return builder()
- .description(description)
- .protocol(protocol)
- .sourcePortRange(sourcePortRange)
- .destinationPortRange(destinationPortRange)
- .sourceAddressPrefix(sourceAddressPrefix)
- .destinationAddressPrefix(destinationAddressPrefix)
- .access(access)
- .priority(priority)
- .direction(direction)
- .build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_NetworkSecurityRuleProperties.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
- public abstract Builder description(String description);
-
- public abstract Builder protocol(Protocol protocol);
-
- public abstract Builder sourcePortRange(String sourcePortRange);
-
- public abstract Builder destinationPortRange(String destinationPortRange);
-
- public abstract Builder sourceAddressPrefix(String sourceAddressPrefix);
-
- public abstract Builder destinationAddressPrefix(String sourceAddressPrefix);
-
- public abstract Builder access(Access access);
-
- public abstract Builder priority(Integer priority);
-
- public abstract Builder direction(Direction direction);
-
- public abstract NetworkSecurityRuleProperties build();
- }
-}
-
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/OSDisk.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/OSDisk.java
deleted file mode 100644
index 20392a0..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/OSDisk.java
+++ /dev/null
@@ -1,99 +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 OSDisk {
- /**
- * The OS type of the os disk
- */
- @Nullable
- public abstract String osType();
-
- /**
- * The name of the os disk
- */
- @Nullable
- public abstract String name();
-
- /**
- * The vhd of the os disk
- */
- @Nullable
- public abstract VHD vhd();
-
- /**
- * The caching mode of the os disk
- */
- @Nullable
- public abstract String caching();
-
- /**
- * The create options of the os disk
- */
- @Nullable
- public abstract String createOption();
-
- /**
- * The url of the custom image
- */
- @Nullable
- public abstract VHD image();
-
- /**
- * The managed disk parameters.
- */
- @Nullable public abstract ManagedDiskParameters managedDiskParameters();
-
- /**
- * The storage account type. This field is returned in custom images.
- */
- @Nullable public abstract StorageAccountType storageAccountType();
-
- @SerializedNames({ "osType", "name", "vhd", "caching", "createOption", "image", "managedDisk", "storageAccountType" })
- public static OSDisk create(final String osType, final String name, final VHD vhd, final String caching,
- final String createOption, final VHD image, final ManagedDiskParameters managedDiskParamenters,
- final String storageAccountType) {
- return builder().osType(osType).name(name).vhd(vhd).caching(caching).createOption(createOption).image(image)
- .managedDiskParameters(managedDiskParamenters)
- .storageAccountType(StorageAccountType.fromString(storageAccountType)).build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_OSDisk.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
- public abstract Builder osType(String osType);
- public abstract Builder name(String name);
- public abstract Builder caching(String caching);
- public abstract Builder createOption(String createOption);
- public abstract Builder vhd(VHD vhd);
- public abstract Builder image(VHD image);
- public abstract Builder managedDiskParameters(ManagedDiskParameters managedDiskParameters);
- public abstract Builder storageAccountType(StorageAccountType storageAccountType);
- public abstract OSDisk build();
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/OSProfile.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/OSProfile.java
deleted file mode 100644
index 67c1ad3..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/OSProfile.java
+++ /dev/null
@@ -1,277 +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.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.ImmutableList;
-
-@AutoValue
-public abstract class OSProfile {
-
- @AutoValue
- public abstract static class LinuxConfiguration {
-
- @AutoValue
- public abstract static class SSH {
-
- @AutoValue
- public abstract static class SSHPublicKey {
-
- @Nullable
- public abstract String path();
-
- @Nullable
- public abstract String keyData();
-
- @SerializedNames({"path", "keyData"})
- public static SSHPublicKey create(final String path, final String keyData) {
-
- return new AutoValue_OSProfile_LinuxConfiguration_SSH_SSHPublicKey(
- path, keyData);
- }
- }
-
- /**
- * The list of public keys and paths
- */
- @Nullable
- public abstract List<SSHPublicKey> publicKeys();
-
- @SerializedNames({"publicKeys"})
- public static SSH create(final List<SSHPublicKey> publicKeys) {
-
- return new AutoValue_OSProfile_LinuxConfiguration_SSH(
- publicKeys);
- }
- }
-
- /**
- * The authentication method password or ssh
- */
- public abstract String disablePasswordAuthentication();
-
- /**
- * ssh keys
- */
- @Nullable
- public abstract SSH ssh();
-
- @SerializedNames({"disablePasswordAuthentication", "ssh"})
- public static LinuxConfiguration create(final String disablePasswordAuthentication,
- final SSH ssh) {
-
- return new AutoValue_OSProfile_LinuxConfiguration(disablePasswordAuthentication,
- ssh);
- }
- }
-
- @AutoValue
- public abstract static class WindowsConfiguration {
-
- @AutoValue
- public abstract static class WinRM {
- public enum Protocol {
-
- HTTP("http"),
- HTTPS("https"),
- UNRECOGNIZED("Unrecognized");
-
- private String value;
-
- Protocol(String value) {
- this.value = value;
- }
-
- public static Protocol fromValue(String value) {
- return (Protocol) GetEnumValue.fromValueOrDefault(value, Protocol.UNRECOGNIZED);
- }
-
- @Override
- public String toString() {
- return this.value;
- }
- }
-
- @AutoValue
- public abstract static class ProtocolListener {
-
- public abstract Protocol protocol();
-
- @Nullable
- public abstract String certificateUrl();
-
- @SerializedNames({"protocol", "certificateUrl"})
- public static ProtocolListener create(final Protocol protocol, final String certificateUrl) {
-
- return new AutoValue_OSProfile_WindowsConfiguration_WinRM_ProtocolListener(
- protocol, certificateUrl);
- }
- }
-
- /**
- * Map of different settings
- */
- public abstract List<ProtocolListener> listeners();
-
- @SerializedNames({"listeners"})
- public static WinRM create(final List<ProtocolListener> listeners) {
- return new AutoValue_OSProfile_WindowsConfiguration_WinRM(listeners == null ? ImmutableList.<ProtocolListener>of() : ImmutableList.copyOf(listeners));
- }
- }
-
- @AutoValue
- public abstract static class AdditionalUnattendContent {
-
- public abstract String pass();
-
- public abstract String component();
-
- public abstract String settingName();
-
- @Nullable public abstract String content();
-
- @SerializedNames({"passName", "componentName", "settingName", "content"})
- public static AdditionalUnattendContent create(final String passName, final String componentName,
- final String settingName,
- final String content) {
-
- return new AutoValue_OSProfile_WindowsConfiguration_AdditionalUnattendContent(
- passName, componentName, settingName, content);
- }
- }
-
- /**
- * The provision VM Agent true of false.
- */
- public abstract boolean provisionVMAgent();
-
- /**
- * winR
- */
- @Nullable
- public abstract WinRM winRM();
-
- /**
- * unattend content
- */
- @Nullable
- public abstract List<AdditionalUnattendContent> additionalUnattendContent();
-
- /**
- * is automatic updates enabled
- */
- public abstract boolean enableAutomaticUpdates();
-
- @SerializedNames({"provisionVMAgent", "winRM", "additionalUnattendContent", "enableAutomaticUpdates"})
- public static WindowsConfiguration create(final boolean provisionVMAgent, final WinRM winRM,
- final List<AdditionalUnattendContent> additionalUnattendContent,
- final boolean enableAutomaticUpdates) {
-
- return new AutoValue_OSProfile_WindowsConfiguration(provisionVMAgent, winRM,
- additionalUnattendContent, enableAutomaticUpdates);
- }
- }
-
- /**
- * The computer name of the VM
- */
- @Nullable
- public abstract String computerName();
-
- /**
- * The admin username of the VM
- */
- @Nullable
- public abstract String adminUsername();
-
- /**
- * The admin password of the VM
- */
- @Nullable
- public abstract String adminPassword();
-
- /**
- * The custom data of the VM
- */
- @Nullable
- public abstract String customData();
-
- /**
- * The linux configuration of the VM
- */
- @Nullable
- public abstract LinuxConfiguration linuxConfiguration();
-
- /**
- * The windows configuration of the VM
- */
- @Nullable
- public abstract WindowsConfiguration windowsConfiguration();
-
- /**
- * The Secrets configuration of the VM
- */
- @Nullable
- public abstract List<Secrets> secrets();
-
- @SerializedNames({"computerName", "adminUsername", "adminPassword", "customData", "linuxConfiguration",
- "windowsConfiguration", "secrets"})
- public static OSProfile create(final String computerName, final String adminUsername, final String adminPassword,
- final String customData, final LinuxConfiguration linuxConfiguration,
- final WindowsConfiguration windowsConfiguration, final List<Secrets> secrets) {
- return builder()
- .computerName(computerName)
- .adminUsername(adminUsername)
- .adminPassword(adminPassword)
- .customData(customData)
- .linuxConfiguration(linuxConfiguration)
- .windowsConfiguration(windowsConfiguration)
- .secrets(secrets)
- .build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_OSProfile.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
- public abstract Builder computerName(String computerName);
-
- public abstract Builder adminUsername(String adminUsername);
-
- public abstract Builder adminPassword(String adminPassword);
-
- public abstract Builder customData(String customData);
-
- public abstract Builder linuxConfiguration(LinuxConfiguration linuxConfiguration);
-
- public abstract Builder windowsConfiguration(WindowsConfiguration windowsConfiguration);
-
- public abstract Builder secrets(List<Secrets> secrets);
-
- public abstract OSProfile build();
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Offer.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Offer.java
deleted file mode 100644
index d44c8f8..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Offer.java
+++ /dev/null
@@ -1,51 +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;
-
-/**
- * Offer
- */
-@AutoValue
-public abstract class Offer {
- /**
- * The location of the Offer
- */
- @Nullable
- public abstract String location();
-
- /**
- * The name of the Offer
- */
- @Nullable
- public abstract String name();
-
- /**
- * The id of the Offer
- */
- @Nullable
- public abstract String id();
-
- @SerializedNames({"location", "name", "id"})
- public static Offer create(final String location, final String name, final String id) {
-
- return new AutoValue_Offer(location, name, id);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Plan.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Plan.java
deleted file mode 100644
index 6863146..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Plan.java
+++ /dev/null
@@ -1,47 +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.json.SerializedNames;
-
-import com.google.auto.value.AutoValue;
-
-/**
- * Plan
- */
-@AutoValue
-public abstract class Plan {
- /**
- * The publisher of the Plan
- */
- public abstract String publisher();
-
- /**
- * The name of the Plan
- */
- public abstract String name();
-
- /**
- * The product of the Plan
- */
- public abstract String product();
-
- @SerializedNames({"publisher", "name", "product"})
- public static Plan create(final String publisher, final String name, final String product) {
- return new AutoValue_Plan(publisher, name, product);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Probe.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Probe.java
deleted file mode 100644
index e523984..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Probe.java
+++ /dev/null
@@ -1,42 +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 Probe {
- @Nullable
- public abstract String name();
-
- @Nullable
- public abstract String id();
-
- @Nullable
- public abstract ProbeProperties properties();
-
- @Nullable
- public abstract String etag();
-
- @SerializedNames({ "name", "id", "properties", "etag" })
- public static Probe create(final String name, final String id, final ProbeProperties properties, final String etag) {
- return new AutoValue_Probe(name, id, properties, etag);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ProbeProperties.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ProbeProperties.java
deleted file mode 100644
index 6fe273e..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ProbeProperties.java
+++ /dev/null
@@ -1,91 +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 ProbeProperties implements Provisionable {
- public enum Protocol {
- Tcp("Tcp"), Http("Http"), 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;
- }
- }
-
- @Nullable
- public abstract Protocol protocol();
-
- public abstract int port();
-
- @Nullable
- public abstract String requestPath();
-
- public abstract int intervalInSeconds();
-
- public abstract int numberOfProbes();
-
- @Nullable
- public abstract String provisioningState();
-
- @SerializedNames({ "protocol", "port", "requestPath", "intervalInSeconds", "numberOfProbes", "provisioningState" })
- public static ProbeProperties create(final Protocol protocol, final int port, final String requestPath,
- final int intervalInSeconds, final int numberOfProbes, final String provisioningState) {
- return builder().protocol(protocol).port(port).requestPath(requestPath).intervalInSeconds(intervalInSeconds)
- .numberOfProbes(numberOfProbes).provisioningState(provisioningState).build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_ProbeProperties.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
-
- public abstract Builder protocol(Protocol protocol);
-
- public abstract Builder port(int port);
-
- public abstract Builder requestPath(String requestPath);
-
- public abstract Builder intervalInSeconds(int intervalInSeconds);
-
- public abstract Builder numberOfProbes(int numberOfProbes);
-
- public abstract Builder provisioningState(String provisioningState);
-
- public abstract ProbeProperties build();
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Provisionable.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Provisionable.java
deleted file mode 100644
index f400e93..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Provisionable.java
+++ /dev/null
@@ -1,22 +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;
-
-public interface Provisionable {
-
- String provisioningState();
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/PublicIPAddress.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/PublicIPAddress.java
deleted file mode 100644
index 8d0cb2b..0000000
--- a/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();
- }
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/PublicIPAddressProperties.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/PublicIPAddressProperties.java
deleted file mode 100644
index af7da0d..0000000
--- a/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();
- }
-
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Publisher.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Publisher.java
deleted file mode 100644
index 4f5c53f..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Publisher.java
+++ /dev/null
@@ -1,52 +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;
-
-/**
- * Publisher
- */
-@AutoValue
-public abstract class Publisher {
-
- /**
- * The location of the publisher
- */
- @Nullable
- public abstract String location();
-
- /**
- * The name of the publisher
- */
- @Nullable
- public abstract String name();
-
- /**
- * The id of the publisher
- */
- @Nullable
- public abstract String id();
-
- @SerializedNames({"location", "name", "id"})
- public static Publisher create(final String location, final String name, final String id) {
-
- return new AutoValue_Publisher(location, name, id);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Region.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Region.java
deleted file mode 100644
index c65ae59..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Region.java
+++ /dev/null
@@ -1,103 +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.Arrays;
-import java.util.Set;
-
-import com.google.common.base.Function;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Iterables;
-
-/**
- * Regions used in Azure.
- *
- * @see <a href="http://azure.microsoft.com/en-us/regions/">this page</a>
- */
-public enum Region {
-
- CENTRAL_US("Central US", "US-IA"),
- EAST_US("East US", "US-VA"),
- EAST_US_2("East US 2", "US-VA"),
- US_GOV_IOWA("US Gov Iowa", "US-IA"),
- US_GOV_VIRGINIA("US Gov Virginia", "US-VA"),
- NORTH_CENTRAL_US("North Central US", "US-IL"),
- SOUTH_CENTRAL_US("South Central US", "US-TX"),
- WEST_CENTRAL_US("West Central US", "US-WY"),
- WEST_US("West US", "US-CA"),
- WEST_US_2("West US 2", "US-WA"),
- NORTH_EUROPE("North Europe", "IE"),
- UK_SOUTH("UK South", "GB-LND"),
- UK_WEST("UK West", "GB-CRF"),
- WEST_EUROPE("West Europe", "NL"),
- EAST_ASIA("East Asia", "HK"),
- SOUTH_EAST_ASIA("Southeast Asia", "SG"),
- KOREA_CENTRAL("Korea Central", "KR-11"),
- KOREA_SOUTH("Korea South", "KR-26"),
- JAPAN_EAST("Japan East", "JP-11"),
- JAPAN_WEST("Japan West", "JP-27"),
- BRAZIL_SOUTH("Brazil South", "BR"),
- AUSTRALIA_EAST("Australia East", "AU-NSW"),
- AUSTRALIA_SOUTH_EAST("Australia Southeast", "AU-VIC"),
- CENTRAL_INDIA("Central India", "IN-GA"),
- SOUTH_INDIA("South India", "IN-TN"),
- WEST_INDIA("West India", "IN-MH"),
- CHINA_EAST("China East", "CN-SH"),
- CHINA_NORTH("China North", "CN-BJ"),
- CANADA_CENTRAL("Canada Central", "CA-ON"),
- CANADA_EAST("Canada East", "CA-QC");
-
- private final String name;
-
- private final String iso3166Code;
-
- Region(final String name, final String iso3166Code) {
- this.name = name;
- this.iso3166Code = iso3166Code;
- }
-
- public String getName() {
- return name;
- }
-
- public String iso3166Code() {
- return iso3166Code;
- }
-
- public static Region byName(final String name) {
- Preconditions.checkNotNull(name);
-
- for (Region region : values()) {
- if (name.equals(region.name)) {
- return region;
- }
- }
- return null;
- }
-
- public static Set<String> iso3166Codes() {
- return ImmutableSet.copyOf(Iterables.transform(Arrays.asList(values()), new Function<Region, String>() {
-
- @Override
- public String apply(final Region region) {
- return region.iso3166Code;
- }
- }));
- }
-
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Resource.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Resource.java
deleted file mode 100644
index f048234..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Resource.java
+++ /dev/null
@@ -1,72 +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 Resource {
-
- @AutoValue
- public abstract static class Identity {
-
- public abstract String principalId();
- public abstract String tenantId();
- public abstract String type();
-
- @SerializedNames({"principalId", "tenantId", "type" })
- public static Identity create(String principalId, String tenantId, String type) {
- return new AutoValue_Resource_Identity(principalId, tenantId, type);
- }
- }
-
- @AutoValue
- public abstract static class ResourceProperties{
- @Nullable
- public abstract String provisioningState();
-
- @SerializedNames({"provisioningState"})
- public static ResourceProperties create(final String provisioningState) {
- return new AutoValue_Resource_ResourceProperties(provisioningState);
- }
- }
-
- public abstract String id();
- public abstract String name();
- public abstract String type();
- public abstract String location();
- @Nullable public abstract Map<String, String> tags();
- @Nullable public abstract Identity identity();
- @Nullable public abstract SKU sku();
- @Nullable public abstract String managedBy();
- @Nullable public abstract String kind();
- @Nullable public abstract Plan plan();
- @Nullable public abstract ResourceProperties properties();
-
- @SerializedNames({"id", "name", "type", "location", "tags", "identity", "sku", "managedBy", "kind", "plan", "properties"})
- public static Resource create(String id, String name, String type, String location, Map<String, String> tags,
- Identity identity, SKU sku, String managedBy, String kind, Plan plan, ResourceProperties properties) {
- return new AutoValue_Resource(id, name, type, location, tags == null ? null : ImmutableMap.copyOf(tags),
- identity, sku, managedBy, kind, plan, properties);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ResourceDefinition.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ResourceDefinition.java
deleted file mode 100644
index 1b51375..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ResourceDefinition.java
+++ /dev/null
@@ -1,106 +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 com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import java.util.List;
-import java.util.Map;
-
-@AutoValue
-public abstract class ResourceDefinition {
-
- public abstract String name();
-
- public abstract String type();
-
- public abstract String location();
-
- public abstract String apiVersion();
-
- @Nullable
- public abstract List<String> dependsOn();
-
- @Nullable
- public abstract Map<String, String> tags();
-
- @Nullable
- public abstract Object properties();
-
- @SerializedNames({"name", "type", "location", "apiVersion", "dependsOn", "tags", "properties"})
- public static ResourceDefinition create(final String name,
- final String type,
- final String location,
- final String apiVersion,
- final List<String> dependsOn,
- final Map<String, String> tags,
- final Object properties) {
- ResourceDefinition.Builder builder = ResourceDefinition.builder()
- .name(name)
- .type(type)
- .location(location)
- .apiVersion(apiVersion)
- .properties(properties);
-
- builder.dependsOn(dependsOn == null ? null : ImmutableList.copyOf(dependsOn));
-
- builder.tags(tags == null ? null : ImmutableMap.copyOf(tags));
-
- return builder.build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_ResourceDefinition.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
- public abstract Builder name(String name);
-
- public abstract Builder type(String type);
-
- public abstract Builder location(String location);
-
- public abstract Builder apiVersion(String apiVersion);
-
- public abstract Builder dependsOn(List<String> dependencies);
-
- public abstract Builder tags(Map<String, String> tags);
-
- public abstract Builder properties(Object properties);
-
- abstract List<String> dependsOn();
- abstract Map<String, String> tags();
-
- abstract ResourceDefinition autoBuild();
-
- public ResourceDefinition build() {
- dependsOn(dependsOn() != null ? ImmutableList.copyOf(dependsOn()) : null);
- tags(tags() != null ? ImmutableMap.copyOf(tags()) : null);
- return autoBuild();
- }
- }
-
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ResourceGroup.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ResourceGroup.java
deleted file mode 100644
index 51bea9e..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ResourceGroup.java
+++ /dev/null
@@ -1,52 +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 java.util.Map;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-import com.google.common.collect.ImmutableMap;
-
-
-@AutoValue
-public abstract class ResourceGroup {
-
- @AutoValue
- public abstract static class ResourceGroupProperties implements Provisionable {
- @Nullable
- public abstract String provisioningState();
-
- @SerializedNames({"provisioningState"})
- public static ResourceGroupProperties create(final String provisioningState) {
- return new AutoValue_ResourceGroup_ResourceGroupProperties(provisioningState);
- }
- }
-
- public abstract String id();
- public abstract String name();
- public abstract String location();
-
- @Nullable
- public abstract Map<String, String> tags();
- public abstract ResourceGroupProperties properties();
-
- @SerializedNames({"id", "name", "location", "tags", "properties"})
- public static ResourceGroup create(String id, String name, String location, Map<String, String> tags, ResourceGroupProperties properties) {
- return new AutoValue_ResourceGroup(id, name, location, tags == null ? null : ImmutableMap.copyOf(tags), properties);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ResourceProviderMetaData.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ResourceProviderMetaData.java
deleted file mode 100644
index e919f02..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ResourceProviderMetaData.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 com.google.auto.value.AutoValue;
-import com.google.common.collect.ImmutableList;
-
-import org.jclouds.json.SerializedNames;
-
-import java.util.List;
-
-@AutoValue
-public abstract class ResourceProviderMetaData {
-
- public abstract String resourceType();
-
- public abstract List<String> locations();
-
- public abstract List<String> apiVersions();
-
- @SerializedNames({"resourceType", "locations", "apiVersions"})
- public static ResourceProviderMetaData create(final String resourceType, final List<String> locations, final List<String> apiVersions) {
- ResourceProviderMetaData.Builder builder = ResourceProviderMetaData.builder()
- .resourceType(resourceType)
- .locations(locations == null ? ImmutableList.<String>of() : ImmutableList.copyOf(locations))
- .apiVersions(apiVersions == null ? ImmutableList.<String>of() : ImmutableList.copyOf(apiVersions));
-
- return builder.build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_ResourceProviderMetaData.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
- public abstract Builder resourceType(String resourceType);
-
- public abstract Builder locations(List<String> locations);
-
- public abstract Builder apiVersions(List<String> apiVersions);
-
- abstract List<String> locations();
-
- abstract List<String> apiVersions();
-
- abstract ResourceProviderMetaData autoBuild();
-
- public ResourceProviderMetaData build() {
- locations(locations() != null ? ImmutableList.copyOf(locations()) : ImmutableList.<String>of());
- apiVersions(apiVersions() != null ? ImmutableList.copyOf(apiVersions()) : ImmutableList.<String>of());
- return autoBuild();
- }
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/SKU.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/SKU.java
deleted file mode 100644
index 6af4406..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/SKU.java
+++ /dev/null
@@ -1,40 +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 SKU {
- @Nullable
- public abstract String location();
- @Nullable
- public abstract String name();
- @Nullable
- public abstract String id();
- @Nullable
- public abstract String family();
-
- @SerializedNames({"location", "name", "id", "family"})
- public static SKU create(final String location, final String name, final String id, final String family) {
-
- return new AutoValue_SKU(location, name, id, family);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Secret.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Secret.java
deleted file mode 100644
index 789a71c..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Secret.java
+++ /dev/null
@@ -1,186 +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.common.collect.ImmutableMap;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import java.util.Map;
-
-import com.google.auto.value.AutoValue;
-
-@AutoValue
-public abstract class Secret {
-
- @AutoValue
- public abstract static class SecretAttributes {
- @Nullable
- public abstract Boolean enabled();
-
- @Nullable
- public abstract Integer created();
-
- @Nullable
- public abstract Integer expires();
-
- @Nullable
- public abstract Integer notBefore();
-
- @Nullable
- public abstract String recoveryLevel();
-
- @Nullable
- public abstract Integer updated();
-
- @SerializedNames({"enabled", "created", "expires", "notBefore", "recoveryLevel", "updated"})
- public static SecretAttributes create(final Boolean enabled,
- final Integer created,
- final Integer expires,
- final Integer notBefore,
- final String recoveryLevel,
- final Integer updated) {
- return new AutoValue_Secret_SecretAttributes(enabled, created, expires, notBefore, recoveryLevel, updated);
- }
-
- SecretAttributes() {
- }
- }
-
- @AutoValue
- public abstract static class DeletedSecretBundle {
- @Nullable
- public abstract SecretAttributes attributes();
-
- @Nullable
- public abstract String contentType();
-
- @Nullable
- public abstract String deletedDate();
-
- @Nullable
- public abstract String id();
-
- @Nullable
- public abstract String kid();
-
- @Nullable
- public abstract Boolean managed();
-
- @Nullable
- public abstract String recoveryId();
-
- @Nullable
- public abstract String scheduledPurgeDate();
-
- @Nullable
- public abstract Map<String, String> tags();
-
- @Nullable
- public abstract String value();
-
- @SerializedNames({"attributes", "contentType", "deletedDate", "id", "kid", "managed", "recoveryId", "scheduledPurgeDate", "tags", "value"})
- public static DeletedSecretBundle create(final SecretAttributes attributes,
- final String contentType,
- final String deletedDate,
- final String id,
- final String kid,
- final Boolean managed,
- final String recoveryId,
- final String scheduledPurgeDate,
- final Map<String, String> tags,
- String value) {
- return new AutoValue_Secret_DeletedSecretBundle(
- attributes, contentType, deletedDate,
- id, kid, managed, recoveryId, scheduledPurgeDate,
- tags != null ? ImmutableMap.copyOf(tags) : null,
- value);
- }
- }
-
- @AutoValue
- public abstract static class SecretBundle {
- @Nullable
- public abstract SecretAttributes attributes();
-
- @Nullable
- public abstract String contentType();
-
- @Nullable
- public abstract String id();
-
- @Nullable
- public abstract String kid();
-
- @Nullable
- public abstract Boolean managed();
-
- @Nullable
- public abstract Map<String, String> tags();
-
- @Nullable
- public abstract String value();
-
- @SerializedNames({"attributes", "contentType", "id", "kid", "managed", "tags", "value"})
- public static SecretBundle create(final SecretAttributes attributes,
- final String contentType,
- final String id,
- final String kid,
- final Boolean managed,
- final Map<String, String> tags,
- String value) {
- return new AutoValue_Secret_SecretBundle(
- attributes, contentType, id,
- kid, managed,
- tags != null ? ImmutableMap.copyOf(tags) : null,
- value);
- }
- }
-
- @Nullable
- public abstract SecretAttributes attributes();
-
- @Nullable
- public abstract String contentType();
-
- @Nullable
- public abstract String id();
-
- @Nullable
- public abstract Boolean managed();
-
- @Nullable
- public abstract Map<String, String> tags();
-
- @SerializedNames({"attributes", "contentType", "id", "managed", "tags"})
- public static Secret create(final SecretAttributes attributes,
- final String contentType,
- final String id,
- final Boolean managed,
- final Map<String, String> tags) {
- return new AutoValue_Secret(
- attributes,
- contentType,
- id,
- managed,
- tags != null ? ImmutableMap.copyOf(tags) : null
- );
- }
-
- Secret() {
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Secrets.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Secrets.java
deleted file mode 100644
index 5fcf704..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Secrets.java
+++ /dev/null
@@ -1,55 +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.json.SerializedNames;
-import java.util.List;
-
-/**
- * Group of certificates stored in one and the same KeyVault
- */
-@AutoValue
-public abstract class Secrets {
-
- @AutoValue
- public abstract static class SourceVault {
-
- public abstract String id();
-
- @SerializedNames({"id"})
- public static SourceVault create(final String id) {
- return new AutoValue_Secrets_SourceVault(id);
- }
- }
-
- /**
- * Name of the KeyVault which contains all the certificates
- */
- public abstract SourceVault sourceVault();
-
- /**
- * List of the certificates
- */
- public abstract List<VaultCertificate> vaultCertificates();
-
- @SerializedNames({"sourceVault", "vaultCertificates"})
- public static Secrets create(final SourceVault sourceVault, final List<VaultCertificate> vaultCertificates) {
- return new AutoValue_Secrets(sourceVault, vaultCertificates);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ServicePrincipal.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ServicePrincipal.java
deleted file mode 100644
index 2faba3f..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ServicePrincipal.java
+++ /dev/null
@@ -1,66 +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.Date;
-import java.util.List;
-
-import javax.annotation.Nullable;
-
-import org.jclouds.json.SerializedNames;
-
-import com.google.auto.value.AutoValue;
-import com.google.common.collect.ImmutableList;
-
-@AutoValue
-public abstract class ServicePrincipal {
-
- @Nullable public abstract String appId();
- @Nullable public abstract Date deletionTimestamp();
- @Nullable public abstract String displayName();
- public abstract String objectId();
- public abstract String objectType();
- public abstract List<String> servicePrincipalNames();
-
- @SerializedNames({ "appId", "deletionTimestamp", "displayName", "objectId", "objectType", "servicePrincipalNames" })
- public static ServicePrincipal create(String appId, Date deletionTimestamp, String displayName, String objectId,
- String objectType, List<String> servicePrincipalNames) {
- List<String> servicePrincipals = servicePrincipalNames != null ? ImmutableList.copyOf(servicePrincipalNames)
- : ImmutableList.<String> of();
- return builder().appId(appId).deletionTimestamp(deletionTimestamp).displayName(displayName).objectId(objectId)
- .objectType(objectType).servicePrincipalNames(servicePrincipals).build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_ServicePrincipal.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
-
- public abstract Builder appId(String appId);
- public abstract Builder deletionTimestamp(Date deletionTimestamp);
- public abstract Builder displayName(String displayName);
- public abstract Builder objectId(String objectId);
- public abstract Builder objectType(String objectType);
- public abstract Builder servicePrincipalNames(List<String> servicePrincipalNames);
-
- public abstract ServicePrincipal build();
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Status.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Status.java
deleted file mode 100644
index 780877b..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Status.java
+++ /dev/null
@@ -1,49 +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.Date;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import com.google.auto.value.AutoValue;
-
-@AutoValue
-public abstract class Status {
-
- @Nullable
- public abstract String code();
-
- @Nullable
- public abstract String level();
-
- @Nullable
- public abstract String displayStatus();
-
- @Nullable
- public abstract String message();
-
- @Nullable
- public abstract Date time();
-
- @SerializedNames({ "code", "level", "displayStatus", "message", "time" })
- public static Status create(final String code, final String level, final String displayStatus, final String message,
- final Date time) {
- return new AutoValue_Status(code, level, displayStatus, message, time);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/StorageAccountType.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/StorageAccountType.java
deleted file mode 100644
index 33e1109..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/StorageAccountType.java
+++ /dev/null
@@ -1,47 +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;
-
-public enum StorageAccountType {
- /** Enum value Standard_LRS. */
- STANDARD_LRS("Standard_LRS"),
-
- /** Enum value Premium_LRS. */
- PREMIUM_LRS("Premium_LRS");
-
- /** The actual serialized value for a StorageAccountTypes instance. */
- private String value;
-
- StorageAccountType(String value) {
- this.value = value;
- }
-
- public static StorageAccountType fromString(String value) {
- StorageAccountType[] items = StorageAccountType.values();
- for (StorageAccountType item : items) {
- if (item.toString().equalsIgnoreCase(value)) {
- return item;
- }
- }
- return null;
- }
-
- @Override
- public String toString() {
- return this.value;
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/StorageProfile.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/StorageProfile.java
deleted file mode 100644
index a65ffd7..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/StorageProfile.java
+++ /dev/null
@@ -1,82 +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 com.google.common.collect.ImmutableList;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import java.util.List;
-
-@AutoValue
-public abstract class StorageProfile {
-
- /**
- * The image reference of the storage profile
- */
- @Nullable
- public abstract ImageReference imageReference();
-
- /**
- * The image reference of the storage profile
- */
- public abstract OSDisk osDisk();
-
- /**
- * The list of the data disks of the storage profile
- */
- @Nullable
- public abstract List<DataDisk> dataDisks();
-
- @SerializedNames({"imageReference", "osDisk", "dataDisks"})
- public static StorageProfile create(final ImageReference imageReference,
- final OSDisk osDisk, final List<DataDisk> dataDisks) {
- StorageProfile.Builder builder = StorageProfile.builder()
- .imageReference(imageReference)
- .osDisk(osDisk)
- .dataDisks(dataDisks != null ? ImmutableList.copyOf(dataDisks) : null);
-
- return builder.build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_StorageProfile.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
- public abstract Builder imageReference(ImageReference imageReference);
-
- public abstract Builder osDisk(OSDisk osDisk);
-
- public abstract Builder dataDisks(List<DataDisk> dataDisks);
-
- abstract List<DataDisk> dataDisks();
-
- abstract StorageProfile autoBuild();
-
- public StorageProfile build() {
- dataDisks(dataDisks() != null ? ImmutableList.copyOf(dataDisks()) : null);
- return autoBuild();
- }
- }
-
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/StorageService.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/StorageService.java
deleted file mode 100644
index 0f5dbe5..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/StorageService.java
+++ /dev/null
@@ -1,226 +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 java.util.Date;
-import java.util.Map;
-import com.google.common.collect.ImmutableMap;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-import org.jclouds.azurecompute.arm.util.GetEnumValue;
-
-@AutoValue
-public abstract class StorageService {
-
- public enum AccountType {
-
- Standard_LRS,
- Standard_ZRS,
- Standard_GRS,
- Standard_RAGRS,
- Premium_LRS,
- UNRECOGNIZED;
-
- public static AccountType fromValue(final String text) {
- return (AccountType) GetEnumValue.fromValueOrDefault(text, AccountType.UNRECOGNIZED);
- }
- }
-
- public enum RegionStatus {
-
- Available,
- Unavailable,
- UNRECOGNIZED;
-
- public static RegionStatus fromValue(final String text) {
- return (RegionStatus) GetEnumValue.fromValueOrDefault(text, RegionStatus.UNRECOGNIZED);
- }
-
- }
-
- public enum Status {
-
- Creating,
- Created,
- Deleting,
- Deleted,
- Changing,
- ResolvingDns,
- Succeeded,
- UNRECOGNIZED;
-
- public static Status fromValue(final String text) {
- return (Status) GetEnumValue.fromValueOrDefault(text, Status.UNRECOGNIZED);
- }
- }
-
- @AutoValue
- public abstract static class StorageServiceProperties {
-
- /**
- * Specifies whether the account supports locally-redundant storage, geo-redundant storage, zone-redundant
- * storage, or read access geo-redundant storage.
- */
- public abstract AccountType accountType();
-
- /**
- * Specifies the time that the storage account was created.
- */
- @Nullable
- public abstract Date creationTime();
-
- /**
- * Specifies the endpoints of the storage account.
- */
- @Nullable
- public abstract Map<String, String> primaryEndpoints();
-
- /**
- * A primaryLocation for the storage account.
- */
- @Nullable
- public abstract String primaryLocation();
-
- /**
- * provisioningState for the storage group
- */
- @Nullable
- public abstract Status provisioningState();
-
- /**
- * Specifies the secondary endpoints of the storage account.
- */
- @Nullable
- public abstract Map<String, String> secondaryEndpoints();
-
- /**
- * Secondary location for the storage group
- */
- @Nullable
- public abstract String secondaryLocation();
-
- /**
- * The status of primary endpoints
- */
- @Nullable
- public abstract RegionStatus statusOfPrimary();
-
- /**
- * The secondary status of the storage account.
- */
- @Nullable
- public abstract RegionStatus statusOfSecondary();
-
-
- @SerializedNames({"accountType", "creationTime", "primaryEndpoints", "primaryLocation",
- "provisioningState", "secondaryEndpoints", "secondaryLocation", "statusOfPrimary", "statusOfSecondary"})
- public static StorageServiceProperties create(final AccountType accountType, final Date creationTime,
- final Map<String, String> primaryEndpoints, final String primaryLocation, final Status provisioningState,
- final Map<String, String> secondaryEndpoints, final String secondaryLocation,
- final RegionStatus statusOfPrimary, final RegionStatus statusOfSecondary) {
-
- StorageServiceProperties.Builder builder = StorageServiceProperties.builder()
- .accountType(accountType)
- .creationTime(creationTime)
- .primaryLocation(primaryLocation)
- .provisioningState(provisioningState)
- .secondaryLocation(secondaryLocation)
- .statusOfPrimary(statusOfPrimary)
- .statusOfSecondary(statusOfSecondary);
-
-
- builder.primaryEndpoints(primaryEndpoints != null ? ImmutableMap.copyOf(primaryEndpoints) : null);
- builder.secondaryEndpoints(secondaryEndpoints != null ? ImmutableMap.copyOf(secondaryEndpoints) : null);
-
- return builder.build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_StorageService_StorageServiceProperties.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
- public abstract Builder accountType(AccountType accountType);
- public abstract Builder creationTime(Date creationTime);
- public abstract Builder primaryEndpoints(Map<String, String> primaryEndpoints);
- public abstract Builder primaryLocation(String primaryLocation);
- public abstract Builder provisioningState(Status provisioningState);
- public abstract Builder secondaryEndpoints(Map<String, String> secondaryEndpoints);
- public abstract Builder secondaryLocation(String secondaryLocation);
- public abstract Builder statusOfPrimary(RegionStatus statusOfPrimary);
- public abstract Builder statusOfSecondary(RegionStatus statusOfSecondary);
-
- abstract Map<String, String> primaryEndpoints();
- abstract Map<String, String> secondaryEndpoints();
-
- abstract StorageServiceProperties autoBuild();
-
- public StorageServiceProperties build() {
- primaryEndpoints(primaryEndpoints() != null ? ImmutableMap.copyOf(primaryEndpoints()) : null);
- secondaryEndpoints(secondaryEndpoints() != null ? ImmutableMap.copyOf(secondaryEndpoints()) : null);
- return autoBuild();
- }
- }
- }
-
- /**
- * Specifies the id of the storage account.
- */
- @Nullable
- public abstract String id();
-
- /**
- * Specifies the name of the storage account. This name is the DNS prefix name and can be used to access blobs,
- * queues, and tables in the storage account.
- */
- @Nullable
- public abstract String name();
-
- /**
- * Specifies the location of the storage account.
- */
- public abstract String location();
-
- /**
- * Specifies the tags of the storage account.
- */
- @Nullable
- public abstract Map<String, String> tags();
-
- /**
- * Specifies the type of the storage account.
- */
- @Nullable
- public abstract String type();
-
- /**
- * Specifies the properties of the storage account.
- */
- public abstract StorageServiceProperties storageServiceProperties();
-
-
- @SerializedNames({"id", "name", "location", "tags", "type", "properties"})
- public static StorageService create(final String id, final String name, final String location,
- final Map<String, String> tags, final String type,
- final StorageServiceProperties storageServiceProperties) {
- return new AutoValue_StorageService(id, name, location, tags == null ? null : ImmutableMap.copyOf(tags), type, storageServiceProperties);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/StorageServiceKeys.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/StorageServiceKeys.java
deleted file mode 100644
index 63cb70b..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/StorageServiceKeys.java
+++ /dev/null
@@ -1,39 +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.json.SerializedNames;
-
-@AutoValue
-public abstract class StorageServiceKeys {
-
- /**
- * The primary access key for the storage account.
- */
- public abstract String key1();
-
- /**
- * The secondary access key for the storage account.
- */
- public abstract String key2();
-
- @SerializedNames({"key1", "key2"})
- public static StorageServiceKeys create(final String key1, final String key2) {
- return new AutoValue_StorageServiceKeys(key1, key2);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/StorageServiceUpdateParams.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/StorageServiceUpdateParams.java
deleted file mode 100644
index 692565c..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/StorageServiceUpdateParams.java
+++ /dev/null
@@ -1,65 +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 com.google.common.collect.ImmutableMap;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-import java.util.Map;
-
-@AutoValue
-public abstract class StorageServiceUpdateParams {
-
- @AutoValue
- public abstract static class StorageServiceUpdateProperties {
-
- /**
- * Specifies whether the account supports locally-redundant storage, geo-redundant storage, zone-redundant
- * storage, or read access geo-redundant storage.
- * Note: This implementation is for version 2015-10-01 and earlier.
- * For version 2016-01-01 or later, refer to https://msdn.microsoft.com/en-us/library/mt163639.aspx
- */
- @Nullable
- public abstract StorageService.AccountType accountType();
-
-
- @SerializedNames({"accountType"})
- public static StorageServiceUpdateProperties create(final StorageService.AccountType accountType) {
-
- return new AutoValue_StorageServiceUpdateParams_StorageServiceUpdateProperties(accountType);
- }
- }
-
- /**
- * Specifies the tags of the storage account.
- */
- @Nullable
- public abstract Map<String, String> tags();
-
- /**
- * Specifies the properties of the storage account.
- */
- public abstract StorageServiceUpdateProperties storageServiceProperties();
-
-
- @SerializedNames({"tags", "properties"})
- public static StorageServiceUpdateParams create(final Map<String, String> tags,
- final StorageServiceUpdateProperties storageServiceProperties) {
- return new AutoValue_StorageServiceUpdateParams(tags == null ? null : ImmutableMap.copyOf(tags), storageServiceProperties);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Subnet.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Subnet.java
deleted file mode 100644
index 80460b8..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Subnet.java
+++ /dev/null
@@ -1,136 +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 static com.google.common.collect.ImmutableList.copyOf;
-
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import com.google.common.collect.ImmutableList;
-
-import org.jclouds.javax.annotation.Nullable;
-import com.google.auto.value.AutoValue;
-import org.jclouds.json.SerializedNames;
-
-@AutoValue
-public abstract class Subnet {
-
- private static final Pattern NETWORK_PATTERN = Pattern.compile("^.*/virtualNetworks/([^/]+)(/.*)?$");
-
- @AutoValue
- public abstract static class IpConfiguration {
-
- public abstract String id();
-
- @SerializedNames({"id"})
- public static IpConfiguration create(final String id) {
- return new AutoValue_Subnet_IpConfiguration(id);
- }
-
- IpConfiguration() {
-
- }
- }
-
- @AutoValue
- public abstract static class SubnetProperties implements Provisionable {
-
- @Nullable public abstract String provisioningState();
- @Nullable public abstract String addressPrefix();
- @Nullable public abstract List<IpConfiguration> ipConfigurations();
-
- @SerializedNames({"provisioningState", "addressPrefix", "ipConfigurations"})
- public static SubnetProperties create(final String provisioningState, final String addressPrefix, final List<IpConfiguration> ipConfigurations) {
- return builder()
- .provisioningState(provisioningState)
- .addressPrefix(addressPrefix)
- .ipConfigurations(ipConfigurations != null ? copyOf(ipConfigurations) : null)
- .build();
- }
-
- SubnetProperties() {
-
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_Subnet_SubnetProperties.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
- public abstract Builder provisioningState(String provisioningState);
- public abstract Builder addressPrefix(String addressPrefix);
- public abstract Builder ipConfigurations(List<IpConfiguration> ipConfigurations);
-
- abstract List<IpConfiguration> ipConfigurations();
- abstract SubnetProperties autoBuild();
-
- public SubnetProperties build() {
- ipConfigurations(ipConfigurations() != null ? ImmutableList.copyOf(ipConfigurations()) : null);
- return autoBuild();
- }
- }
- }
-
- @Nullable public abstract String name();
- @Nullable public abstract String id();
- @Nullable public abstract String etag();
- @Nullable public abstract SubnetProperties properties();
-
- @Nullable public String virtualNetwork() {
- return extractVirtualNetwork(id());
- }
-
- public static String extractVirtualNetwork(String id) {
- if (id == null)
- return null;
- Matcher m = NETWORK_PATTERN.matcher(id);
- m.matches();
- return m.group(1);
- }
-
- @SerializedNames({"name", "id", "etag", "properties"})
- public static Subnet create(final String name,
- final String id,
- final String etag,
- final SubnetProperties properties) {
- return builder().name(name).id(id).etag(etag).properties(properties).build();
- }
-
- Subnet() {
-
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_Subnet.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 properties(SubnetProperties properties);
- public abstract Subnet build();
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/TemplateParameterType.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/TemplateParameterType.java
deleted file mode 100644
index d0ccc71..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/TemplateParameterType.java
+++ /dev/null
@@ -1,34 +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;
-
-// Simple helper class to serialize / deserialize id reference.
-
-@AutoValue
-public abstract class TemplateParameterType {
- @Nullable
- public abstract String type();
-
- @SerializedNames({"type"})
- public static TemplateParameterType create(final String type) {
- return new AutoValue_TemplateParameterType(type);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VHD.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VHD.java
deleted file mode 100644
index 7e6b387..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VHD.java
+++ /dev/null
@@ -1,48 +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.json.SerializedNames;
-
-@AutoValue
-public abstract class VHD {
-
- /**
- * The uri of the vhd.
- */
- public abstract String uri();
-
- @SerializedNames({"uri"})
- public static VHD create(final String uri) {
- return builder().uri(uri).build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_VHD.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
- public abstract Builder uri(String uri);
-
- public abstract VHD build();
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VMDeployment.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VMDeployment.java
deleted file mode 100644
index 99edc5c..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VMDeployment.java
+++ /dev/null
@@ -1,44 +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 com.google.auto.value.AutoValue;
-
-@AutoValue
-public abstract class VMDeployment {
-
- public abstract String deploymentId();
-
- @Nullable
- public abstract VirtualMachine virtualMachine();
-
- @Nullable
- public abstract List<PublicIPAddress> ipAddressList();
-
- @Nullable
- public abstract List<NetworkInterfaceCard> networkInterfaceCards();
-
- public static VMDeployment create(String deploymentId, VirtualMachine virtualMachine,
- List<PublicIPAddress> ipAddressList,
- List<NetworkInterfaceCard> networkInterfaceCards) {
- return new AutoValue_VMDeployment(deploymentId, virtualMachine, ipAddressList, networkInterfaceCards);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VMHardware.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VMHardware.java
deleted file mode 100644
index e771903..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VMHardware.java
+++ /dev/null
@@ -1,70 +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.json.SerializedNames;
-
-/**
- * A VM Size that is available in a region for a given subscription.
- *
- * @see <a href="https://msdn.microsoft.com/en-us/library/azure/mt269440.aspx" >api</a>
- */
-@AutoValue
-public abstract class VMHardware {
-
- /**
- * The name of the VM size.
- */
- public abstract String name();
-
- /**
- * The number of cores that are available in the VM size.
- */
- public abstract Integer numberOfCores();
-
- /**
- * Specifies the size in MB of the OS Disk.
- */
- public abstract Integer osDiskSizeInMB();
-
- /**
- * The size of the resource disk.
- */
- public abstract Integer resourceDiskSizeInMB();
-
- /**
- * Specifies the available RAM in MB.
- */
- public abstract Integer memoryInMB();
-
- /**
- * Specifies the maximum number of data disks that can be attached to the VM size.
- */
- public abstract Integer maxDataDiskCount();
-
- /**
- * Specifies the location of the HW resource
- */
- public abstract String location();
-
- @SerializedNames({ "name", "numberOfCores", "osDiskSizeInMB", "resourceDiskSizeInMB", "memoryInMB", "maxDataDiskCount", "location"})
- public static VMHardware create(String name, Integer numberOfCores, Integer osDiskSizeInMB, Integer resourceDiskSizeInMB, Integer memoryInMB, Integer maxDataDiskCount, String location) {
-
- return new AutoValue_VMHardware(name, numberOfCores, osDiskSizeInMB, resourceDiskSizeInMB, memoryInMB, maxDataDiskCount, location);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VMImage.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VMImage.java
deleted file mode 100644
index 202481d..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VMImage.java
+++ /dev/null
@@ -1,182 +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 static com.google.common.base.Preconditions.checkNotNull;
-import static org.jclouds.azurecompute.arm.util.VMImages.isCustom;
-
-import org.jclouds.azurecompute.arm.domain.Version.VersionProperties;
-import org.jclouds.javax.annotation.Nullable;
-
-import com.google.auto.value.AutoValue;
-
-@AutoValue
-public abstract class VMImage {
- /**
- * The publisher of the image reference.
- */
- @Nullable
- public abstract String publisher();
-
- /**
- * The offer of the image reference.
- */
- @Nullable
- public abstract String offer();
-
- /**
- * The sku of the image reference.
- */
- @Nullable
- public abstract String sku();
-
- /**
- * The version of the image reference.
- */
- @Nullable
- public abstract String version();
-
- /**
- * The location from where Image was fetched
- */
- @Nullable
- public abstract String location();
-
- /**
- * The group of the custom image
- */
- @Nullable
- public abstract String group();
-
- /**
- * The storage of the custom image.
- */
- @Nullable
- public abstract String storage();
-
- /**
- * The vhd1 of the custom image
- */
- @Nullable
- public abstract String vhd1();
-
- /**
- * The vhd2 of the custom image.
- */
- @Nullable
- public abstract String vhd2();
-
- /**
- * The name of the custom image template.
- */
- @Nullable
- public abstract String name();
-
- /**
- * True if custom image
- */
- public abstract boolean custom();
-
- /**
- * The id of the custom image template.
- */
- @Nullable
- public abstract String customImageId();
-
- /**
- * The resource group for the image in case of custom images.
- * @return
- */
- @Nullable
- public abstract String resourceGroup();
-
- /**
- * Extended version properties.
- */
- @Nullable
- public abstract VersionProperties versionProperties();
-
- private static Builder builder() {
- return new AutoValue_VMImage.Builder();
- }
-
- public static Builder azureImage() {
- return builder().custom(false);
- }
-
- public static Builder customImage() {
- return builder().custom(true);
- }
-
- VMImage() {
-
- }
-
- public abstract Builder toBuilder();
-
- @AutoValue.Builder
- public abstract static class Builder {
-
- public abstract Builder customImageId(String id);
- public abstract Builder resourceGroup(String resourceGroup);
- public abstract Builder publisher(String published);
- public abstract Builder offer(String offer);
- public abstract Builder sku(String sku);
- public abstract Builder version(String version);
- public abstract Builder location(String location);
- public abstract Builder group(String group);
- public abstract Builder storage(String storage);
- public abstract Builder vhd1(String vhd1);
- public abstract Builder vhd2(String vhd2);
- public abstract Builder name(String name);
- public abstract Builder custom(boolean custom);
- public abstract Builder versionProperties(VersionProperties versionProperties);
-
- public abstract VMImage build();
- }
-
- public String encodeFieldsToUniqueId() {
- return String.format("%s/%s/%s/%s", location(), publisher(), offer(), sku());
- }
-
- public String encodeFieldsToUniqueIdCustom() {
- return String.format("%s/%s/%s", resourceGroup(), location(), name());
- }
-
- public static VMImage decodeFieldsFromUniqueId(final String id) {
- VMImage vmImage;
- String[] fields = checkNotNull(id, "id").split("/");
- if (isCustom(id)) {
- /* id fields indexes
- 0: imageReference.resourceGroup
- 1: imageReference.location + "/" +
- 2: imageReference.name
- */
- vmImage = VMImage.customImage().resourceGroup(fields[0]).location(fields[1]).name(fields[2]).build();
- } else {
- /* id fields indexes
- 0: imageReference.location + "/" +
- 1: imageReference.publisher + "/" +
- 2: imageReference.offer + "/" +
- 3: imageReference.sku + "/" +
- */
- vmImage = VMImage.azureImage().location(fields[0]).publisher(fields[1]).offer(fields[2]).sku(fields[3])
- .build();
- }
- return vmImage;
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VMSize.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VMSize.java
deleted file mode 100644
index 6794735..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VMSize.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 com.google.auto.value.AutoValue;
-import org.jclouds.json.SerializedNames;
-
-/**
- * A VM Size that is available in a region for a given subscription.
- *
- * @see <a href="https://msdn.microsoft.com/en-us/library/azure/mt269440.aspx" >api</a>
- */
-@AutoValue
-public abstract class VMSize {
-
- /**
- * The name of the VM size.
- */
- public abstract String name();
-
- /**
- * The number of cores that are available in the VM size.
- */
- public abstract Integer numberOfCores();
-
- /**
- * Specifies the size in MB of the OS Disk.
- */
- public abstract Integer osDiskSizeInMB();
-
- /**
- * The size of the resource disk.
- */
- public abstract Integer resourceDiskSizeInMB();
-
- /**
- * Specifies the available RAM in MB.
- */
- public abstract Integer memoryInMB();
-
- /**
- * Specifies the maximum number of data disks that can be attached to the VM size.
- */
- public abstract Integer maxDataDiskCount();
-
- @SerializedNames({ "name", "numberOfCores", "osDiskSizeInMB", "resourceDiskSizeInMB", "memoryInMB", "maxDataDiskCount"})
- public static VMSize create(final String name, final Integer numberOfCores, final Integer osDiskSizeInMB,
- final Integer resourceDiskSizeInMB, final Integer memoryInMB, final Integer maxDataDiskCount) {
-
- return new AutoValue_VMSize(name, numberOfCores, osDiskSizeInMB, resourceDiskSizeInMB, memoryInMB, maxDataDiskCount);
- }
-
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Value.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Value.java
deleted file mode 100644
index 4b0ce0c..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Value.java
+++ /dev/null
@@ -1,42 +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.json.SerializedNames;
-
-import com.google.auto.value.AutoValue;
-
-@AutoValue
-public abstract class Value {
-
- /**
- * The type of the Value
- */
- public abstract String type();
-
- /**
- * The name of the Value
- */
- public abstract String value();
-
- @SerializedNames({"type", "value"})
- public static Value create(final String type, final String value) {
-
- return new AutoValue_Value(type, value);
- }
-
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Vault.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Vault.java
deleted file mode 100644
index 3683df6..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Vault.java
+++ /dev/null
@@ -1,112 +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.Date;
-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 Vault {
-
- @AutoValue
- public abstract static class DeletedVault {
- @Nullable public abstract String id();
- @Nullable public abstract String name();
- @Nullable public abstract String type();
- @Nullable public abstract DeletedVaultProperties properties();
-
- @SerializedNames({"id", "name", "type", "properties"})
- public static DeletedVault create(final String id, final String name,
- final String type, final DeletedVaultProperties properties) {
- return new AutoValue_Vault_DeletedVault(id, name, type, properties);
- }
- }
-
- @AutoValue
- public abstract static class DeletedVaultProperties {
- @Nullable public abstract Date deletionDate();
- @Nullable public abstract String location();
- @Nullable public abstract Date scheduledPurgeDate();
- @Nullable public abstract Map<String, String> tags();
- @Nullable public abstract String vaultId();
-
- @SerializedNames({"deletionDate", "location", "scheduledPurgeDate", "tags", "vaultId"})
- public static DeletedVaultProperties create (final Date deletionDate, final String location,
- final Date scheduledPurgeDate, final Map<String, String> tags,
- final String vaultId) {
- return new AutoValue_Vault_DeletedVaultProperties(
- deletionDate,
- location,
- scheduledPurgeDate,
- tags != null ? ImmutableMap.copyOf(tags) : null,
- vaultId
- );
- }
- }
-
- @Nullable public abstract String id();
- @Nullable public abstract String type();
- public abstract String location();
- @Nullable public abstract Map<String, String> tags();
- @Nullable public abstract String name();
- public abstract VaultProperties properties();
-
- @SerializedNames({"id", "name", "type", "location", "properties", "tags"})
- public static Vault create(final String id, final String name, final String type,
- final String location,
- final VaultProperties properties, final Map<String, String> tags) {
- return builder()
- .id(id)
- .name(name)
- .type(type)
- .location(location)
- .properties(properties)
- .tags(tags != null ? ImmutableMap.copyOf(tags) : null)
- .build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_Vault.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
- public abstract Builder id(String id);
- public abstract Builder name(String name);
- public abstract Builder type(String type);
- public abstract Builder location(String location);
- public abstract Builder properties(VaultProperties properties);
- public abstract Builder tags(Map<String, String> tags);
-
- abstract Map<String, String> tags();
- abstract Vault autoBuild();
-
- public Vault build() {
- tags(tags() != null ? ImmutableMap.copyOf(tags()) : null);
- return autoBuild();
- }
-
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VaultCertificate.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VaultCertificate.java
deleted file mode 100644
index dd35eb6..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VaultCertificate.java
+++ /dev/null
@@ -1,46 +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;
-
-/**
- * Certificate stored in a Key Vault
- */
-@AutoValue
-public abstract class VaultCertificate {
-
- /**
- * The URL of the certificate
- */
- public abstract String certificateUrl();
-
- /**
- * Certificate's store name
- */
- @Nullable
- public abstract String certificateStore();
-
- @SerializedNames({"certificateUrl", "certificateStore"})
- public static VaultCertificate create(final String certificateUrl, final String certificateStore) {
- return new AutoValue_VaultCertificate(certificateUrl, certificateStore);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VaultProperties.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VaultProperties.java
deleted file mode 100644
index 5e97cf3..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VaultProperties.java
+++ /dev/null
@@ -1,131 +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.net.URI;
-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 VaultProperties {
-
- @AutoValue
- public abstract static class Permissions {
-
- public abstract List<String> certificates();
- public abstract List<String> keys();
- public abstract List<String> secrets();
- public abstract List<String> storage();
-
- @SerializedNames({ "certificates", "keys", "secrets", "storage"})
- public static Permissions create(final List<String> certificates, final List<String> keys, final List<String> secrets, final List<String> storage) {
- return new AutoValue_VaultProperties_Permissions(
- certificates != null ? ImmutableList.copyOf(certificates) : ImmutableList.<String> of(),
- keys != null ? ImmutableList.copyOf(keys) : ImmutableList.<String> of(),
- secrets != null ? ImmutableList.copyOf(secrets) : ImmutableList.<String> of(),
- storage != null ? ImmutableList.copyOf(storage) : ImmutableList.<String> of()
- );
- }
-
- Permissions() {
-
- }
- }
-
- @AutoValue
- public abstract static class AccessPolicyEntry {
-
- @Nullable public abstract String applicationId();
- public abstract String objectId();
- public abstract String tenantId();
- @Nullable public abstract Permissions permissions();
-
- @SerializedNames({"applicationId", "objectId", "tenantId", "permissions"})
- public static AccessPolicyEntry create(final String applicationId, final String objectId, final String tenantId, final Permissions permissions) {
- return new AutoValue_VaultProperties_AccessPolicyEntry(applicationId, objectId, tenantId, permissions);
- }
-
- AccessPolicyEntry() {
-
- }
- }
-
- @Nullable
- public abstract String tenantId();
- @Nullable
- public abstract URI vaultUri();
- @Nullable
- public abstract Boolean enabledForDeployment();
- @Nullable
- public abstract Boolean enabledForTemplateDeployment();
- @Nullable
- public abstract Boolean enableSoftDelete();
- @Nullable
- public abstract String createMode();
- @Nullable
- public abstract SKU sku();
- @Nullable
- public abstract List<AccessPolicyEntry> accessPolicies();
-
- @SerializedNames({"tenantId", "vaultUri", "enabledForDeployment", "enabledForTemplateDeployment", "enableSoftDelete", "createMode", "sku", "accessPolicies" })
- public static VaultProperties create(final String tenantId, final URI vaultUri, final Boolean enabledForDeployment, final Boolean enabledForTemplateDeployment, final Boolean enableSoftDelete, final String createMode,
- final SKU sku, final List<AccessPolicyEntry> accessPolicies) {
- return builder()
- .tenantId(tenantId)
- .vaultUri(vaultUri)
- .enabledForDeployment(enabledForDeployment)
- .enabledForTemplateDeployment(enabledForTemplateDeployment)
- .enableSoftDelete(enableSoftDelete)
- .createMode(createMode)
- .sku(sku)
- .accessPolicies(accessPolicies)
- .build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_VaultProperties.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
- public abstract Builder tenantId(String tenantId);
- public abstract Builder vaultUri(URI vaultUri);
- public abstract Builder enabledForDeployment(Boolean enabledForDeployment);
- public abstract Builder enabledForTemplateDeployment(Boolean enabledForTemplateDeployment);
- public abstract Builder enableSoftDelete(Boolean enableSoftDelete);
- public abstract Builder createMode(String createMode);
- public abstract Builder sku(SKU sku);
- public abstract Builder accessPolicies(List<AccessPolicyEntry> accessPolicies);
-
- abstract List<AccessPolicyEntry> accessPolicies();
-
- abstract VaultProperties autoBuild();
-
- public VaultProperties build() {
- return accessPolicies(accessPolicies() != null ? ImmutableList.copyOf(accessPolicies()) : ImmutableList.<AccessPolicyEntry>of())
- .autoBuild();
- }
-
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Version.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Version.java
deleted file mode 100644
index 26bf4b0..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Version.java
+++ /dev/null
@@ -1,90 +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;
-
-/**
- * Version
- */
-@AutoValue
-public abstract class Version {
-
- /**
- * The location of the Version
- */
- public abstract String location();
-
- /**
- * The name of the Version
- */
- public abstract String name();
-
- /**
- * The id of the Version
- */
- public abstract String id();
-
- /**
- * The plan for the Version if this image is from the marketplace.
- */
- @Nullable
- public abstract VersionProperties properties();
-
- Version() {
-
- }
-
- @SerializedNames({"location", "name", "id", "properties"})
- public static Version create(final String location, final String name, final String id,
- final VersionProperties properties) {
- return new AutoValue_Version(location, name, id, properties);
- }
-
- @AutoValue
- public abstract static class VersionProperties {
- @Nullable public abstract Plan plan();
- public abstract OSDiskImage osDiskImage();
-
- VersionProperties() {
-
- }
-
- @SerializedNames({"plan", "osDiskImage"})
- public static VersionProperties create(Plan plan, OSDiskImage osDiskImage) {
- return new AutoValue_Version_VersionProperties(plan, osDiskImage);
- }
-
- @AutoValue
- public abstract static class OSDiskImage {
- public abstract String operatingSystem();
-
- OSDiskImage() {
-
- }
-
- @SerializedNames({"operatingSystem"})
- public static OSDiskImage create(String operatingSystem) {
- return new AutoValue_Version_VersionProperties_OSDiskImage(operatingSystem);
- }
- }
- }
-}
-
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachine.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachine.java
deleted file mode 100644
index c0224f3..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachine.java
+++ /dev/null
@@ -1,103 +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;
-
-/**
- * A virtual machine that is valid for your subscription.
- */
-@AutoValue
-public abstract class VirtualMachine {
-
- /**
- * The id of the virtual machine.
- */
- public abstract String id();
-
- /**
- * The name of the virtual machine
- */
- public abstract String name();
-
- /**
- * The type of the virtual machine .
- */
- public abstract String type();
-
- /**
- * The localized name of the virtual machine .
- */
- public abstract String location();
-
- /**
- * Specifies the tags of the vm
- */
- @Nullable
- public abstract Map<String, String> tags();
-
- /**
- * Specifies the properties of the vm
- */
- public abstract VirtualMachineProperties properties();
-
- /**
- * Specifies the plan, for marketplace images
- */
- @Nullable
- public abstract Plan plan();
-
- @SerializedNames({"id", "name", "type", "location", "tags", "properties", "plan"})
- public static VirtualMachine create(final String id, final String name, final String type, final String location,
- @Nullable final Map<String, String> tags, VirtualMachineProperties properties, @Nullable Plan plan) {
- return builder().id(id).name(name).type(type).location(location).tags(tags).properties(properties).plan(plan)
- .build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_VirtualMachine.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
-
- public abstract Builder id(String id);
- public abstract Builder name(String name);
- public abstract Builder type(String type);
- public abstract Builder location(String location);
- public abstract Builder tags(Map<String, String> tags);
- public abstract Builder properties(VirtualMachineProperties properties);
- public abstract Builder plan(Plan plan);
-
- abstract Map<String, String> tags();
-
- abstract VirtualMachine autoBuild();
-
- public VirtualMachine build() {
- tags(tags() != null ? ImmutableMap.copyOf(tags()) : null);
- return autoBuild();
- }
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineInstance.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineInstance.java
deleted file mode 100644
index 66ef283..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineInstance.java
+++ /dev/null
@@ -1,90 +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 static com.google.common.collect.Iterables.filter;
-import static com.google.common.collect.Iterables.getFirst;
-import static com.google.common.collect.Iterables.transform;
-import static org.jclouds.util.Predicates2.startsWith;
-
-import java.util.List;
-
-import org.jclouds.azurecompute.arm.domain.VirtualMachineProperties.ProvisioningState;
-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.base.Function;
-import com.google.common.collect.ImmutableList;
-
-/**
- * A virtual machine instance view that is valid for your subscription.
- */
-@AutoValue
-public abstract class VirtualMachineInstance {
-
- public static final String PROVISIONING_STATE_PREFIX = "ProvisioningState/";
- public static final String POWER_STATE_PREFIX = "PowerState/";
-
- public enum PowerState {
- RUNNING,
- STOPPED,
- UNRECOGNIZED;
-
- public static PowerState fromValue(final String text) {
- return (PowerState) GetEnumValue.fromValueOrDefault(text, PowerState.UNRECOGNIZED);
- }
- }
-
- @Nullable
- public abstract String platformUpdateDomain();
-
- @Nullable
- public abstract String platformFaultDomain();
-
- @Nullable
- public abstract List<Status> statuses();
-
- public ProvisioningState provisioningState() {
- return ProvisioningState.fromValue(firstStatus(PROVISIONING_STATE_PREFIX));
- }
-
- public PowerState powerState() {
- return PowerState.fromValue(firstStatus(POWER_STATE_PREFIX));
- }
-
- private String firstStatus(final String type) {
- return getFirst(transform(filter(transform(statuses(), new Function<Status, String>() {
- @Override public String apply(Status input) {
- return input.code();
- }
- }), startsWith(type)), new Function<String, String>() {
- @Override public String apply(String input) {
- return input.substring(type.length());
- }
- }), null);
- }
-
-
- @SerializedNames({"platformUpdateDomain", "platformFaultDomain", "statuses"})
- public static VirtualMachineInstance create(final String platformUpdateDomain, final String platformFaultDomain,
- final List<Status> statuses) {
-
- return new AutoValue_VirtualMachineInstance(platformUpdateDomain, platformFaultDomain, statuses == null ? null : ImmutableList.copyOf(statuses));
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineProperties.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineProperties.java
deleted file mode 100644
index 732da5c..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineProperties.java
+++ /dev/null
@@ -1,154 +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;
-
-/**
- * A virtual machine properties for the virtual machine.
- */
-@AutoValue
-public abstract class VirtualMachineProperties {
-
- public enum ProvisioningState {
- ACCEPTED,
- CREATING,
- READY,
- CANCELED,
- FAILED,
- DELETED,
- SUCCEEDED,
- RUNNING,
- UPDATING,
- UNRECOGNIZED;
-
- public static ProvisioningState fromValue(final String text) {
- return (ProvisioningState) GetEnumValue.fromValueOrDefault(text, ProvisioningState.UNRECOGNIZED);
- }
- }
-
- /**
- * The id of the virtual machine.
- */
- @Nullable
- public abstract String vmId();
-
- /**
- * The license type of the virtual machine.
- */
- @Nullable
- public abstract String licenseType();
-
- /**
- * The availability set of the virtual machine
- */
- @Nullable
- public abstract IdReference availabilitySet();
-
- /**
- * The hardware Profile of the virtual machine .
- */
- @Nullable
- public abstract HardwareProfile hardwareProfile();
-
- /**
- * The Storage Profile of the virtual machine .
- */
- @Nullable
- public abstract StorageProfile storageProfile();
-
- /**
- * The OS Profile of the virtual machine .
- */
- @Nullable
- public abstract OSProfile osProfile();
-
- /**
- * The network profile of the VM
- */
- @Nullable
- public abstract NetworkProfile networkProfile();
-
- /**
- * The diagnostics profile of the VM
- */
- @Nullable
- public abstract DiagnosticsProfile diagnosticsProfile();
-
- /**
- * The provisioning state of the VM
- */
- @Nullable
- public abstract ProvisioningState provisioningState();
-
- @SerializedNames({"vmId", "licenseType", "availabilitySet", "hardwareProfile", "storageProfile", "osProfile",
- "networkProfile", "diagnosticsProfile", "provisioningState"})
- public static VirtualMachineProperties create(final String vmId,
- final String licenseType,
- final IdReference availabilitySet,
- final HardwareProfile hardwareProfile,
- final StorageProfile storageProfile,
- final OSProfile osProfile,
- final NetworkProfile networkProfile,
- final DiagnosticsProfile diagnosticsProfile,
- final ProvisioningState provisioningState) {
- return builder()
- .vmId(vmId)
- .licenseType(licenseType)
- .availabilitySet(availabilitySet)
- .hardwareProfile(hardwareProfile)
- .storageProfile(storageProfile)
- .osProfile(osProfile)
- .networkProfile(networkProfile)
- .diagnosticsProfile(diagnosticsProfile)
- .provisioningState(provisioningState)
- .build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_VirtualMachineProperties.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
- public abstract Builder vmId(String vmId);
-
- public abstract Builder licenseType(String licenseType);
-
- public abstract Builder availabilitySet(IdReference availabilitySet);
-
- public abstract Builder hardwareProfile(HardwareProfile hardwareProfile);
-
- public abstract Builder storageProfile(StorageProfile storageProfile);
-
- public abstract Builder osProfile(OSProfile osProfile);
-
- public abstract Builder networkProfile(NetworkProfile networkProfile);
-
- public abstract Builder diagnosticsProfile(DiagnosticsProfile diagnosticsProfile);
-
- public abstract Builder provisioningState(ProvisioningState provisioningState);
-
- public abstract VirtualMachineProperties build();
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSet.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSet.java
deleted file mode 100644
index 2fc3f59..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSet.java
+++ /dev/null
@@ -1,110 +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 com.google.common.collect.ImmutableMap;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import java.util.Map;
-
-/**
- * VirtualMachineScaleSet for subscription
- */
-@AutoValue
-public abstract class VirtualMachineScaleSet {
-
- /**
- * The id of the virtual machine scale set
- */
- @Nullable
- public abstract String id();
-
- /**
- * The name of the virtual machine scale set
- */
- @Nullable
- public abstract String name();
-
- /**
- * The location of the virtual machine scale set
- */
- @Nullable
- public abstract String location();
-
- /**
- * Specifies the sku of the virtual machine scale set
- */
- public abstract VirtualMachineScaleSetSKU sku();
-
- /**
- * Specifies the tags of the virtual machine scale set
- */
- @Nullable
- public abstract Map<String, String> tags();
-
-
- /**
- * Specifies the optional plan of the virtual machine scale set (only for market image)
- */
- @Nullable
- public abstract VirtualMachineScaleSetPlan plan();
-
- /**
- * Specifies the properties of the availability set
- */
- @Nullable
- public abstract VirtualMachineScaleSetProperties properties();
-
- @SerializedNames({ "id", "name", "location", "sku", "tags", "plan", "properties"})
- public static VirtualMachineScaleSet create(final String id, final String name, final String location,
- VirtualMachineScaleSetSKU sku, final Map<String, String> tags,
- VirtualMachineScaleSetPlan plan,
- VirtualMachineScaleSetProperties properties) {
- return builder().id(id).name(name).location(location).sku(sku).tags(tags)
- .plan(plan).properties(properties)
- .build();
- }
-
- public abstract Builder toBuilder();
-
- private static Builder builder() {
- return new AutoValue_VirtualMachineScaleSet.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 sku(VirtualMachineScaleSetSKU sku);
- public abstract Builder tags(Map<String, String> tags);
- public abstract Builder plan(VirtualMachineScaleSetPlan plan);
- public abstract Builder properties(VirtualMachineScaleSetProperties properties);
-
- abstract Map<String, String> tags();
- abstract VirtualMachineScaleSet autoBuild();
-
- public VirtualMachineScaleSet build() {
- tags(tags() != null ? ImmutableMap.copyOf(tags()) : null);
- return autoBuild();
- }
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetDNSSettings.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetDNSSettings.java
deleted file mode 100644
index d91c68b..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetDNSSettings.java
+++ /dev/null
@@ -1,41 +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 com.google.common.collect.ImmutableList;
-import org.jclouds.json.SerializedNames;
-
-import java.util.List;
-
-/**
- * VirtualMachineScaleSetDNSSettings
- */
-@AutoValue
-public abstract class VirtualMachineScaleSetDNSSettings {
- /**
- * The list of DNS servers of the Virtual Machine Scale Set DNS Settings
- */
- public abstract List<String> dnsServers();
-
- @SerializedNames({"dnsServers"})
- public static VirtualMachineScaleSetDNSSettings create(final List<String> dnsServers) {
-
- return new AutoValue_VirtualMachineScaleSetDNSSettings(
- dnsServers == null ? ImmutableList.<String>of() : ImmutableList.copyOf(dnsServers));
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetIpConfiguration.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetIpConfiguration.java
deleted file mode 100644
index 257072e..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetIpConfiguration.java
+++ /dev/null
@@ -1,61 +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 VirtualMachineScaleSetIpConfiguration {
-
- /**
- * The name of the Virtual Machine Scale Set Ip Configuration
- */
- @Nullable
- public abstract String name();
-
- /**
- * The properties of the Virtual Machine Scale Set Ip Configuration
- */
- @Nullable
- public abstract VirtualMachineScaleSetIpConfigurationProperties properties();
-
- @SerializedNames({"name", "properties"})
- public static VirtualMachineScaleSetIpConfiguration create(
- final String name,
- final VirtualMachineScaleSetIpConfigurationProperties properties) {
- return builder()
- .name(name)
- .properties(properties)
- .build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_VirtualMachineScaleSetIpConfiguration.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
- public abstract Builder name(String name);
- public abstract Builder properties(VirtualMachineScaleSetIpConfigurationProperties properties);
- public abstract VirtualMachineScaleSetIpConfiguration build();
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetIpConfigurationProperties.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetIpConfigurationProperties.java
deleted file mode 100644
index 739dadf..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetIpConfigurationProperties.java
+++ /dev/null
@@ -1,104 +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 com.google.common.collect.ImmutableList;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import java.util.List;
-
-@AutoValue
-public abstract class VirtualMachineScaleSetIpConfigurationProperties {
-
- /**
- * The public IP address configuration of the Virtual Machine Scale Set Ip Configuration Properties
- */
- @Nullable
- public abstract VirtualMachineScaleSetPublicIPAddressConfiguration publicIPAddressConfiguration();
-
- /**
- * The subnet of the Virtual Machine Scale Set Ip Configuration Properties
- */
- public abstract Subnet subnet();
-
- /**
- * The private IP address version of the Virtual Machine Scale Set Ip Configuration Properties
- */
- @Nullable
- public abstract String privateIPAddressVersion();
-
- /**
- * The load balancer backend address pools of the Virtual Machine Scale Set Ip Configuration Properties
- */
- public abstract List<IdReference> loadBalancerBackendAddressPools();
-
- /**
- * The load balancer inbound nat pools of the Virtual Machine Scale Set Ip Configuration Properties
- */
- public abstract List<IdReference> loadBalancerInboundNatPools();
-
- /**
- * The application gateway backend address Pools of the Virtual Machine Scale Set Ip Configuration Properties
- */
- @Nullable
- public abstract String applicationGatewayBackendAddressPools();
-
- @SerializedNames({"publicIPAddressConfiguration", "subnet", "privateIPAddressVersion",
- "loadBalancerBackendAddressPools", "loadBalancerInboundNatPools", "applicationGatewayBackendAddressPools"})
- public static VirtualMachineScaleSetIpConfigurationProperties create(
- final VirtualMachineScaleSetPublicIPAddressConfiguration publicIPAddressConfiguration,
- final Subnet subnet,
- final String privateIPAddressVersion,
- final List<IdReference> loadBalancerBackendAddressPools,
- final List<IdReference> loadBalancerInboundNatPools,
- final String applicationGatewayBackendAddressPools)
-
- {
- return builder()
- .publicIPAddressConfiguration(publicIPAddressConfiguration)
- .subnet(subnet)
- .privateIPAddressVersion(privateIPAddressVersion)
- .loadBalancerBackendAddressPools(
- loadBalancerBackendAddressPools != null ? ImmutableList.copyOf(loadBalancerBackendAddressPools)
- : ImmutableList.<IdReference> of())
- .loadBalancerInboundNatPools(
- loadBalancerInboundNatPools != null ? ImmutableList.copyOf(loadBalancerInboundNatPools)
- : ImmutableList.<IdReference> of())
- .applicationGatewayBackendAddressPools(applicationGatewayBackendAddressPools).build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_VirtualMachineScaleSetIpConfigurationProperties.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
- public abstract Builder publicIPAddressConfiguration(VirtualMachineScaleSetPublicIPAddressConfiguration publicIPAddressConfiguration);
- public abstract Builder subnet(Subnet subnet);
- public abstract Builder loadBalancerBackendAddressPools(List<IdReference> loadBalancerBackendAddressPools);
- public abstract Builder loadBalancerInboundNatPools(List<IdReference> loadBalancerInboundNatPools);
- public abstract Builder privateIPAddressVersion(String privateIPAddressVersion);
- public abstract Builder applicationGatewayBackendAddressPools(String applicationGatewayBackendAddressPools);
-
- public abstract VirtualMachineScaleSetIpConfigurationProperties build();
- }
-}
-
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetNetworkProfile.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetNetworkProfile.java
deleted file mode 100644
index 9d4c462..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetNetworkProfile.java
+++ /dev/null
@@ -1,58 +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 com.google.common.collect.ImmutableList;
-import org.jclouds.json.SerializedNames;
-
-import java.util.List;
-
-@AutoValue
-public abstract class VirtualMachineScaleSetNetworkProfile {
-
- /**
- * The network interface configurations of the Virtual Machine Scale Set Network Profile
- */
- public abstract List<NetworkInterfaceConfiguration> networkInterfaceConfigurations();
-
-
- @SerializedNames({"networkInterfaceConfigurations"})
- public static VirtualMachineScaleSetNetworkProfile create(
- final List<NetworkInterfaceConfiguration> networkInterfaceConfigurations) {
- return builder()
- .networkInterfaceConfigurations(networkInterfaceConfigurations == null ?
- ImmutableList.<NetworkInterfaceConfiguration>of() : ImmutableList.copyOf(networkInterfaceConfigurations) )
- .build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_VirtualMachineScaleSetNetworkProfile.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
-
- public abstract Builder networkInterfaceConfigurations(
- List<NetworkInterfaceConfiguration> networkInterfaceConfigurations);
-
- public abstract VirtualMachineScaleSetNetworkProfile build();
-
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetNetworkSecurityGroup.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetNetworkSecurityGroup.java
deleted file mode 100644
index 8874d50..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetNetworkSecurityGroup.java
+++ /dev/null
@@ -1,39 +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;
-
-/**
- * Virtual Machine Scale Set Network Security Group
- */
-@AutoValue
-public abstract class VirtualMachineScaleSetNetworkSecurityGroup {
- /**
- * The id of the Virtual Machine Scale Set Network Security Group
- */
- @Nullable
- public abstract String id();
-
- @SerializedNames({"id"})
- public static VirtualMachineScaleSetNetworkSecurityGroup create(final String id) {
-
- return new AutoValue_VirtualMachineScaleSetNetworkSecurityGroup(id);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetOSProfile.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetOSProfile.java
deleted file mode 100644
index e417d5a..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetOSProfile.java
+++ /dev/null
@@ -1,273 +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 com.google.common.collect.ImmutableList;
-import org.jclouds.azurecompute.arm.util.GetEnumValue;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import java.util.List;
-
-@AutoValue
-public abstract class VirtualMachineScaleSetOSProfile {
-
- @AutoValue
- public abstract static class LinuxConfiguration {
-
-
- @AutoValue
- public abstract static class SSH {
-
- @AutoValue
- public abstract static class SSHPublicKey {
-
- /**
- * The path for the SSH public key
- */
- @Nullable
- public abstract String path();
-
- /**
- * The key data for the SSH public key
- */
- @Nullable
- public abstract String keyData();
-
- @SerializedNames({"path", "keyData"})
- public static SSHPublicKey create(final String path, final String keyData) {
-
- return new AutoValue_VirtualMachineScaleSetOSProfile_LinuxConfiguration_SSH_SSHPublicKey(
- path, keyData);
- }
- }
-
- /**
- * The list of public keys and paths
- */
- @Nullable
- public abstract List<SSHPublicKey> publicKeys();
-
- @SerializedNames({"publicKeys"})
- public static SSH create(final List<SSHPublicKey> publicKeys) {
-
- return new AutoValue_VirtualMachineScaleSetOSProfile_LinuxConfiguration_SSH(
- publicKeys);
- }
- }
-
- /**
- * The authentication method password or ssh
- */
- public abstract Boolean disablePasswordAuthentication();
-
- /**
- * ssh keys
- */
- @Nullable
- public abstract SSH ssh();
-
- @SerializedNames({"disablePasswordAuthentication", "ssh"})
- public static LinuxConfiguration create(final Boolean disablePasswordAuthentication,
- final SSH ssh) {
-
- return new AutoValue_VirtualMachineScaleSetOSProfile_LinuxConfiguration(disablePasswordAuthentication,
- ssh);
- }
- }
-
- @AutoValue
- public abstract static class WindowsConfiguration {
-
- @AutoValue
- public abstract static class WinRM {
- public enum Protocol {
-
- HTTP("http"),
- HTTPS("https"),
- UNRECOGNIZED("Unrecognized");
-
- private String value;
-
- Protocol(String value) {
- this.value = value;
- }
-
- public static Protocol fromValue(String value) {
- return (Protocol) GetEnumValue.fromValueOrDefault(value, Protocol.UNRECOGNIZED);
- }
-
- @Override
- public String toString() {
- return this.value;
- }
- }
-
- @AutoValue
- public abstract static class ProtocolListener {
-
- /**
- * The protocol for the protcol listener
- */
- public abstract Protocol protocol();
-
- /**
- * The certificate url or the protcol listener
- */
- @Nullable
- public abstract String certificateUrl();
-
- @SerializedNames({"protocol", "certificateUrl"})
- public static ProtocolListener create(final Protocol protocol, final String certificateUrl) {
-
- return new AutoValue_VirtualMachineScaleSetOSProfile_WindowsConfiguration_WinRM_ProtocolListener(
- protocol, certificateUrl);
- }
- }
-
- /**
- * Map of different settings
- */
- public abstract List<ProtocolListener> listeners();
-
- @SerializedNames({"listeners"})
- public static WinRM create(final List<ProtocolListener> listeners) {
- return new AutoValue_VirtualMachineScaleSetOSProfile_WindowsConfiguration_WinRM(listeners == null ? ImmutableList.<ProtocolListener>of() : ImmutableList.copyOf(listeners));
- }
- }
-
- @AutoValue
- public abstract static class AdditionalUnattendContent {
-
- public abstract String pass();
-
- public abstract String component();
-
- public abstract String settingName();
-
- public abstract String content();
-
- @SerializedNames({"pass", "component", "settingName", "content"})
- public static AdditionalUnattendContent create(final String pass, final String component,
- final String settingName,
- final String content) {
-
- return new AutoValue_VirtualMachineScaleSetOSProfile_WindowsConfiguration_AdditionalUnattendContent(
- pass, component, settingName, content);
- }
- }
-
- /**
- * The provision VM Agent true of false.
- */
- public abstract boolean provisionVMAgent();
-
- /**
- * winRM
- */
- @Nullable
- public abstract WinRM winRM();
-
- /**
- * unattend content
- */
- public abstract List<AdditionalUnattendContent> additionalUnattendContent();
-
- /**
- * is automatic updates enabled
- */
- public abstract boolean enableAutomaticUpdates();
-
- @SerializedNames({"provisionVMAgent", "winRM", "additionalUnattendContent", "enableAutomaticUpdates"})
- public static WindowsConfiguration create(final boolean provisionVMAgent, final WinRM winRM,
- final List<AdditionalUnattendContent> additionalUnattendContent,
- final boolean enableAutomaticUpdates) {
-
- return new AutoValue_VirtualMachineScaleSetOSProfile_WindowsConfiguration(provisionVMAgent, winRM,
- additionalUnattendContent == null ? ImmutableList.<AdditionalUnattendContent>of() : ImmutableList.copyOf(additionalUnattendContent), enableAutomaticUpdates);
- }
- }
-
- /**
- * The computer name of the VM
- */
- @Nullable
- public abstract String computerNamePrefix();
-
- /**
- * The admin username of the VM
- */
- @Nullable
- public abstract String adminUsername();
-
- /**
- * The admin password of the VM
- */
- @Nullable
- public abstract String adminPassword();
-
- /**
- * The linux configuration of the VM
- */
- @Nullable
- public abstract LinuxConfiguration linuxConfiguration();
-
- /**
- * The windows configuration of the VM
- */
- @Nullable
- public abstract WindowsConfiguration windowsConfiguration();
-
- /**
- * The Secrets configuration of the VM
- */
- public abstract List<Secrets> secrets();
-
- @SerializedNames({"computerNamePrefix", "adminUsername", "adminPassword", "linuxConfiguration",
- "windowsConfiguration", "secrets"})
- public static VirtualMachineScaleSetOSProfile create(final String computerNamePrefix, final String adminUsername,
- final String adminPassword, final LinuxConfiguration linuxConfiguration,
- final WindowsConfiguration windowsConfiguration, final List<Secrets> secrets) {
- return builder()
- .computerNamePrefix(computerNamePrefix)
- .adminUsername(adminUsername)
- .adminPassword(adminPassword)
- .linuxConfiguration(linuxConfiguration)
- .windowsConfiguration(windowsConfiguration)
- .secrets(secrets != null ? ImmutableList.copyOf(secrets) : ImmutableList.<Secrets> of())
- .build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_VirtualMachineScaleSetOSProfile.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
- public abstract Builder computerNamePrefix(String computerNamePrefix);
- public abstract Builder adminUsername(String adminUsername);
- public abstract Builder adminPassword(String adminPassword);
- public abstract Builder linuxConfiguration(LinuxConfiguration linuxConfiguration);
- public abstract Builder windowsConfiguration(WindowsConfiguration windowsConfiguration);
- public abstract Builder secrets(List<Secrets> secrets);
-
- public abstract VirtualMachineScaleSetOSProfile build();
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetPlan.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetPlan.java
deleted file mode 100644
index 1864ca7..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetPlan.java
+++ /dev/null
@@ -1,51 +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;
-
-/**
- * SKU
- */
-@AutoValue
-public abstract class VirtualMachineScaleSetPlan {
- /**
- * The name of the Virtual Machine Scale Set Plan
- */
- @Nullable
- public abstract String name();
-
- /**
- * The publisher of the Virtual Machine Scale Set Plan
- */
- @Nullable
- public abstract String publisher();
-
- /**
- * The product of the Virtual Machine Scale Set Plan
- */
- @Nullable
- public abstract String product();
-
- @SerializedNames({"name", "publisher", "product"})
- public static VirtualMachineScaleSetPlan create(final String name, final String publisher, final String product) {
-
- return new AutoValue_VirtualMachineScaleSetPlan(name, publisher, product);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetProperties.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetProperties.java
deleted file mode 100644
index d737086..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetProperties.java
+++ /dev/null
@@ -1,106 +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.azurecompute.arm.util.GetEnumValue;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-
-@AutoValue
-public abstract class VirtualMachineScaleSetProperties {
-
- public enum ProvisioningState {
- ACCEPTED,
- CREATING,
- READY,
- CANCELED,
- FAILED,
- DELETED,
- SUCCEEDED,
- RUNNING,
- UPDATING,
- UNRECOGNIZED;
-
- public static ProvisioningState fromValue(final String text) {
- return (ProvisioningState) GetEnumValue.fromValueOrDefault(text, ProvisioningState.UNRECOGNIZED);
- }
- }
-
- /**
- * The singlePlacementGroup of the VirtualMachineScaleSetProperties
- */
- @Nullable
- public abstract Boolean singlePlacementGroup();
-
- /**
- * Specifies the over provision of the virtual machine scale set
- */
- @Nullable
- public abstract Boolean overProvision();
-
- /**
- * Specifies the upgrade policy of the virtual machine scale set
- */
- public abstract VirtualMachineScaleSetUpgradePolicy upgradePolicy();
-
- /**
- * Specifies the state of the provision of the virtual machine scale set
- */
- @Nullable
- public abstract ProvisioningState provisioningState();
-
- /**
- * Specifies the virtual machine profile of the virtual machine scale set
- */
- public abstract VirtualMachineScaleSetVirtualMachineProfile virtualMachineProfile();
-
- @SerializedNames({"singlePlacementGroup", "overProvision", "upgradePolicy", "provisioningState", "virtualMachineProfile"})
- public static VirtualMachineScaleSetProperties create(
- final Boolean singlePlacementGroup,
- final Boolean overProvision,
- final VirtualMachineScaleSetUpgradePolicy upgradePolicy,
- final ProvisioningState provisioningState,
- final VirtualMachineScaleSetVirtualMachineProfile virtualMachineProfile) {
- return builder().singlePlacementGroup(singlePlacementGroup).overProvision(overProvision).
- upgradePolicy(upgradePolicy).provisioningState(provisioningState).virtualMachineProfile(virtualMachineProfile).build();
- }
-
- public abstract Builder toBuilder();
-
- private static Builder builder() {
- return new AutoValue_VirtualMachineScaleSetProperties.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
- public abstract Builder singlePlacementGroup(Boolean singlePlacementGroup);
-
- public abstract Builder overProvision(Boolean overProvision);
-
- public abstract Builder upgradePolicy(VirtualMachineScaleSetUpgradePolicy upgradePolicy);
-
- public abstract Builder provisioningState(ProvisioningState provisioningState);
-
- public abstract Builder virtualMachineProfile(VirtualMachineScaleSetVirtualMachineProfile virtualMachineProfile);
-
- public abstract VirtualMachineScaleSetProperties build();
- }
-}
-
-
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetPublicIPAddressConfiguration.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetPublicIPAddressConfiguration.java
deleted file mode 100644
index 3347713..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetPublicIPAddressConfiguration.java
+++ /dev/null
@@ -1,59 +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.json.SerializedNames;
-
-@AutoValue
-public abstract class VirtualMachineScaleSetPublicIPAddressConfiguration {
-
- /**
- * The name of the Virtual Machine Scale Set Public IP Address Configuration
- */
- public abstract String name();
-
- /**
- * The properties of the Virtual Machine Scale Set Public IP Address Configuration
- */
- public abstract VirtualMachineScaleSetPublicIPAddressProperties properties();
-
- @SerializedNames({ "name", "properties" })
- public static VirtualMachineScaleSetPublicIPAddressConfiguration create(
- String name,
- VirtualMachineScaleSetPublicIPAddressProperties properties) {
- return builder().name(name).properties(properties).build();
- }
-
- VirtualMachineScaleSetPublicIPAddressConfiguration() {
-
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_VirtualMachineScaleSetPublicIPAddressConfiguration.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
- public abstract Builder name(String name);
- public abstract Builder properties(VirtualMachineScaleSetPublicIPAddressProperties properties);
- public abstract VirtualMachineScaleSetPublicIPAddressConfiguration build();
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetPublicIPAddressProperties.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetPublicIPAddressProperties.java
deleted file mode 100644
index d01e305..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetPublicIPAddressProperties.java
+++ /dev/null
@@ -1,54 +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 VirtualMachineScaleSetPublicIPAddressProperties {
-
- /**
- * The idle timeout (in minutes) of the Virtual Machine Scale Set Public IP Address Configuration
- */
- @Nullable
- public abstract Integer idleTimeoutInMinutes();
-
-
- @SerializedNames({ "idleTimeoutInMinutes" })
- public static VirtualMachineScaleSetPublicIPAddressProperties create(final Integer idleTimeoutInMinutes) {
- return builder()
- .idleTimeoutInMinutes(idleTimeoutInMinutes)
- .build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_VirtualMachineScaleSetPublicIPAddressProperties.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
-
- public abstract Builder idleTimeoutInMinutes(Integer idleTimeoutInMinutes);
-
- public abstract VirtualMachineScaleSetPublicIPAddressProperties build();
- }
-
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetSKU.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetSKU.java
deleted file mode 100644
index 251562d..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetSKU.java
+++ /dev/null
@@ -1,45 +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.json.SerializedNames;
-
-
-@AutoValue
-public abstract class VirtualMachineScaleSetSKU {
- /**
- * The name of the Virtual Machine Scale Set SKU
- */
- public abstract String name();
-
- /**
- * The tier of the Virtual Machine Scale Set SKU
- */
- public abstract String tier();
-
- /**
- * The capacity of the Virtual Machine Scale Set SKU
- */
- public abstract int capacity();
-
- @SerializedNames({"name", "tier", "capacity"})
- public static VirtualMachineScaleSetSKU create(final String name, final String tier, final int capacity) {
-
- return new AutoValue_VirtualMachineScaleSetSKU(name, tier, capacity);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetUpgradeMode.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetUpgradeMode.java
deleted file mode 100644
index cca007f..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetUpgradeMode.java
+++ /dev/null
@@ -1,35 +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;
-
-
-public class VirtualMachineScaleSetUpgradeMode {
- /**
- * VirtualMachineScaleSetUpgradeMode
- * **/
- public enum Status {
- Manual,
- Automatic,
- Unrecognized;
-
- public static Status fromValue(final String text) {
- return (Status) GetEnumValue.fromValueOrDefault(text, Status.Unrecognized);
- }
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetUpgradePolicy.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetUpgradePolicy.java
deleted file mode 100644
index 6945e81..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetUpgradePolicy.java
+++ /dev/null
@@ -1,35 +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.json.SerializedNames;
-
-
-@AutoValue
-public abstract class VirtualMachineScaleSetUpgradePolicy {
- /**
- * The mode of the Virtual Machine Scale Set Upgrade Policy
- */
- public abstract String mode();
-
- @SerializedNames({"mode"})
- public static VirtualMachineScaleSetUpgradePolicy create(final String mode) {
-
- return new AutoValue_VirtualMachineScaleSetUpgradePolicy(mode);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetVirtualMachineProfile.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetVirtualMachineProfile.java
deleted file mode 100644
index a238467..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualMachineScaleSetVirtualMachineProfile.java
+++ /dev/null
@@ -1,83 +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.json.SerializedNames;
-
-/**
- * A virtual machine properties for the virtual machine.
- */
-@AutoValue
-public abstract class VirtualMachineScaleSetVirtualMachineProfile {
-
- /**
- * The storage profile of the Virtual Machine Scale Set Virtual Machine Profile.
- */
- public abstract StorageProfile storageProfile();
-
- /**
- * The OS profile of the Virtual Machine Scale Set Virtual Machine Profile.
- */
- public abstract VirtualMachineScaleSetOSProfile osProfile();
-
- /**
- * The network profile of the Virtual Machine Scale Set Virtual Machine Profile
- */
- public abstract VirtualMachineScaleSetNetworkProfile networkProfile();
-
- /**
- * The extension profile of the Virtual Machine Scale Set Virtual Machine Profile .
- */
- public abstract ExtensionProfile extensionProfile();
-
-
-
- @SerializedNames({"storageProfile", "osProfile", "networkProfile", "extensionProfile"})
- public static VirtualMachineScaleSetVirtualMachineProfile create(
- final StorageProfile storageProfile,
- final VirtualMachineScaleSetOSProfile osProfile,
- final VirtualMachineScaleSetNetworkProfile networkProfile,
- final ExtensionProfile extensionProfile) {
- return builder()
- .storageProfile(storageProfile)
- .osProfile(osProfile)
- .networkProfile(networkProfile)
- .extensionProfile(extensionProfile)
- .build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_VirtualMachineScaleSetVirtualMachineProfile.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
-
- public abstract Builder storageProfile(StorageProfile storageProfile);
-
- public abstract Builder osProfile(VirtualMachineScaleSetOSProfile osProfile);
-
- public abstract Builder networkProfile(VirtualMachineScaleSetNetworkProfile networkProfile);
-
- public abstract Builder extensionProfile(ExtensionProfile extensionProfile);
-
- public abstract VirtualMachineScaleSetVirtualMachineProfile build();
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualNetwork.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualNetwork.java
deleted file mode 100644
index a0f5c3e..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VirtualNetwork.java
+++ /dev/null
@@ -1,122 +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 static com.google.common.collect.ImmutableList.copyOf;
-
-import java.util.Map;
-import java.util.List;
-import com.google.common.collect.ImmutableList;
-
-import com.google.auto.value.AutoValue;
-import com.google.common.collect.ImmutableMap;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-@AutoValue
-public abstract class VirtualNetwork {
-
- @AutoValue
- public abstract static class AddressSpace {
-
- public abstract List<String> addressPrefixes();
-
- @SerializedNames({"addressPrefixes"})
- public static AddressSpace create(final List<String> addressPrefixes) {
- return new AutoValue_VirtualNetwork_AddressSpace(addressPrefixes == null ? ImmutableList.<String>of() : ImmutableList.copyOf(addressPrefixes));
- }
- }
-
- @AutoValue
- public abstract static class VirtualNetworkProperties implements Provisionable {
-
- @Nullable
- public abstract String provisioningState();
-
- @Nullable
- public abstract String resourceGuid();
-
- public abstract AddressSpace addressSpace();
-
- @Nullable
- public abstract List<Subnet> subnets();
-
-
- @SerializedNames({"provisioningState", "resourceGuid", "addressSpace", "subnets"})
- public static VirtualNetworkProperties create(final String provisioningState, final String resourceGuid, final AddressSpace addressSpace, final List<Subnet> subnets) {
- return builder()
- .provisioningState(provisioningState)
- .resourceGuid(resourceGuid)
- .addressSpace(addressSpace)
- .subnets(subnets != null ? copyOf(subnets) : null)
- .build();
- }
-
- public abstract Builder toBuilder();
-
- public static Builder builder() {
- return new AutoValue_VirtualNetwork_VirtualNetworkProperties.Builder();
- }
-
- @AutoValue.Builder
- public abstract static class Builder {
- public abstract Builder provisioningState(String provisioningState);
-
- public abstract Builder resourceGuid(String resourceGuid);
-
- public abstract Builder addressSpace(AddressSpace addressSpace);
-
- public abstract Builder subnets(List<Subnet> subnets);
-
- abstract List<Subnet> subnets();
-
- abstract VirtualNetworkProperties autoBuild();
-
- public VirtualNetworkProperties build() {
- subnets(subnets() != null ? ImmutableList.copyOf(subnets()) : null);
- return autoBuild();
- }
- }
- }
-
- @Nullable
- public abstract String name();
-
- @Nullable
- public abstract String id();
-
- @Nullable
- public abstract String etag();
-
- public abstract String location();
-
- public abstract VirtualNetworkProperties properties();
-
- @Nullable
- public abstract Map<String, String> tags();
-
- @SerializedNames({"name", "id", "etag", "location", "properties", "tags"})
- public static VirtualNetwork create(final String name,
- final String id,
- final String etag,
- final String location,
- final VirtualNetworkProperties properties,
- final Map<String, String> tags) {
- return new AutoValue_VirtualNetwork(name, id, etag, location, properties, tags == null ? null : ImmutableMap.copyOf(tags));
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/exceptions/AzureComputeRateLimitExceededException.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/exceptions/AzureComputeRateLimitExceededException.java
deleted file mode 100644
index d8d478e..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/exceptions/AzureComputeRateLimitExceededException.java
+++ /dev/null
@@ -1,51 +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.exceptions;
-
-import org.jclouds.http.HttpResponse;
-import org.jclouds.rest.RateLimitExceededException;
-
-import com.google.common.annotations.Beta;
-import com.google.common.base.Predicate;
-import com.google.common.collect.Multimap;
-import com.google.common.collect.Multimaps;
-
-/**
- * Provides detailed information for rate limit exceptions.
- */
-@Beta
-public class AzureComputeRateLimitExceededException extends RateLimitExceededException {
- private static final long serialVersionUID = 1L;
- private static final String RATE_LIMIT_HEADER_PREFIX = "x-ms-ratelimit-remaining-";
-
- public AzureComputeRateLimitExceededException(HttpResponse response) {
- super(response.getStatusLine() + "\n" + rateLimitHeaders(response));
- }
-
- public AzureComputeRateLimitExceededException(HttpResponse response, Throwable cause) {
- super(response.getStatusLine() + "\n" + rateLimitHeaders(response), cause);
- }
-
- private static Multimap<String, String> rateLimitHeaders(HttpResponse response) {
- return Multimaps.filterKeys(response.getHeaders(), new Predicate<String>() {
- @Override
- public boolean apply(String input) {
- return input.startsWith(RATE_LIMIT_HEADER_PREFIX);
- }
- });
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/AvailabilitySetApi.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/AvailabilitySetApi.java
deleted file mode 100644
index cf5116c..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/AvailabilitySetApi.java
+++ /dev/null
@@ -1,84 +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.io.Closeable;
-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;
-import javax.ws.rs.GET;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.Fallbacks.EmptyListOnNotFoundOr404;
-import org.jclouds.Fallbacks.NullOnNotFoundOr404;
-import org.jclouds.azurecompute.arm.domain.AvailabilitySet;
-import org.jclouds.azurecompute.arm.domain.AvailabilitySet.AvailabilitySetProperties;
-import org.jclouds.azurecompute.arm.domain.AvailabilitySet.SKU;
-import org.jclouds.azurecompute.arm.filters.ApiVersionFilter;
-import org.jclouds.azurecompute.arm.functions.URIParser;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.oauth.v2.filters.OAuthFilter;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.MapBinder;
-import org.jclouds.rest.annotations.PayloadParam;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.ResponseParser;
-import org.jclouds.rest.annotations.SelectJson;
-import org.jclouds.rest.binders.BindToJsonPayload;
-
-@Path("/resourcegroups/{resourcegroup}/providers/Microsoft.Compute/availabilitySets")
-@RequestFilters({ OAuthFilter.class, ApiVersionFilter.class })
-@Consumes(MediaType.APPLICATION_JSON)
-public interface AvailabilitySetApi extends Closeable {
-
- @Named("availabilityset:list")
- @GET
- @SelectJson("value")
- @Fallback(EmptyListOnNotFoundOr404.class)
- List<AvailabilitySet> list();
-
- @Named("availabilityset:get")
- @Path("/{name}")
- @GET
- @Fallback(NullOnNotFoundOr404.class)
- AvailabilitySet get(@PathParam("name") String name);
-
- @Named("availabilityset:createOrUpdate")
- @MapBinder(BindToJsonPayload.class)
- @Path("/{name}")
- @PUT
- AvailabilitySet createOrUpdate(@PathParam("name") String name,
- @Nullable @PayloadParam("sku") SKU sku,
- @PayloadParam("location") String location,
- @Nullable @PayloadParam("tags") Map<String, String> tags,
- @PayloadParam("properties") AvailabilitySetProperties properties);
-
- @Named("availabilityset:delete")
- @Path("/{name}")
- @DELETE
- @ResponseParser(URIParser.class)
- @Fallback(NullOnNotFoundOr404.class)
- URI delete(@PathParam("name") String name);
-
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/DeploymentApi.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/DeploymentApi.java
deleted file mode 100644
index 1ff43de..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/DeploymentApi.java
+++ /dev/null
@@ -1,107 +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.net.URI;
-import java.util.List;
-
-import javax.inject.Named;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.Fallbacks;
-import org.jclouds.Fallbacks.EmptyListOnNotFoundOr404;
-import org.jclouds.Fallbacks.NullOnNotFoundOr404;
-import org.jclouds.azurecompute.arm.domain.Deployment;
-import org.jclouds.azurecompute.arm.filters.ApiVersionFilter;
-import org.jclouds.azurecompute.arm.functions.URIParser;
-import org.jclouds.oauth.v2.filters.OAuthFilter;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.Payload;
-import org.jclouds.rest.annotations.PayloadParam;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.ResponseParser;
-import org.jclouds.rest.annotations.SelectJson;
-
-/**
- * - create deployment
- * - delete deployment
- * - get information about deployment
- */
-@Path("/resourcegroups/{resourcegroup}/providers/microsoft.resources/deployments")
-@RequestFilters({ OAuthFilter.class, ApiVersionFilter.class })
-@Consumes(MediaType.APPLICATION_JSON)
-public interface DeploymentApi {
-
- /**
- * The Create Template Deployment operation starts the process of an ARM Template deployment.
- * It then returns a Deployment object.
- */
- @Named("deployment:create")
- @Path("/{deploymentname}")
- @Payload("{template}")
- @PUT
- @Produces(MediaType.APPLICATION_JSON)
- Deployment create(@PathParam("deploymentname") String deploymentname,
- @PayloadParam("template") String template);
-
- /**
- * Get Deployment Information returns information about the specified deployment.
- */
- @Named("deployment:get")
- @Path("/{deploymentname}")
- @GET
- @Fallback(NullOnNotFoundOr404.class)
- Deployment get(@PathParam("deploymentname") String deploymentname);
-
- /**
- * Validate Deployment validates deployment template before deployment
- */
- @Named("deployment:validate")
- @Path("/{deploymentname}/validate")
- @Payload("{template}")
- @POST
- @Produces(MediaType.APPLICATION_JSON)
- Deployment validate(@PathParam("deploymentname") String deploymentname,
- @PayloadParam("template") String template);
-
- /**
- * List all deployments in a resource group
- */
- @Named("deployment:list")
- @GET
- @SelectJson("value")
- @Fallback(EmptyListOnNotFoundOr404.class)
- List<Deployment> list();
-
- /**
- * The Delete Template Deployment operation starts the process of an ARM Template removal.
- */
- @Named("deployment:delete")
- @DELETE
- @ResponseParser(URIParser.class)
- @Path("/{deploymentname}")
- @Fallback(Fallbacks.NullOnNotFoundOr404.class)
- URI delete(@PathParam("deploymentname") String deploymentname);
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/DiskApi.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/DiskApi.java
deleted file mode 100644
index 10e9ac6..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/DiskApi.java
+++ /dev/null
@@ -1,77 +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.net.URI;
-import java.util.List;
-
-import javax.inject.Named;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.Fallbacks.EmptyListOnNotFoundOr404;
-import org.jclouds.Fallbacks.NullOnNotFoundOr404;
-import org.jclouds.azurecompute.arm.domain.Disk;
-import org.jclouds.azurecompute.arm.domain.DiskProperties;
-import org.jclouds.azurecompute.arm.filters.ApiVersionFilter;
-import org.jclouds.azurecompute.arm.functions.URIParser;
-import org.jclouds.oauth.v2.filters.OAuthFilter;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.MapBinder;
-import org.jclouds.rest.annotations.PayloadParam;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.ResponseParser;
-import org.jclouds.rest.annotations.SelectJson;
-import org.jclouds.rest.binders.BindToJsonPayload;
-
-@Path("/resourcegroups/{resourcegroup}/providers/Microsoft.Compute/disks")
-@RequestFilters({ OAuthFilter.class, ApiVersionFilter.class })
-@Consumes(MediaType.APPLICATION_JSON)
-public interface DiskApi {
-
- @Named("disk:list")
- @SelectJson("value")
- @GET
- @Fallback(EmptyListOnNotFoundOr404.class)
- List<Disk> list();
-
- @Named("disk:create_or_update")
- @PUT
- @MapBinder(BindToJsonPayload.class)
- @Path("/{diskName}")
- Disk createOrUpdate(@PathParam("diskName") String diskName,
- @PayloadParam("location") String location,
- @PayloadParam("properties") DiskProperties properties);
-
- @Named("disk:get")
- @Path("/{diskName}")
- @GET
- @Fallback(NullOnNotFoundOr404.class)
- Disk get(@PathParam("diskName") String diskName);
-
- @Named("disk:delete")
- @Path("/{diskName}")
- @DELETE
- @ResponseParser(URIParser.class)
- @Fallback(NullOnNotFoundOr404.class)
- URI delete(@PathParam("diskName") String diskName);
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/GraphRBACApi.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/GraphRBACApi.java
deleted file mode 100644
index fe2bccc..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/GraphRBACApi.java
+++ /dev/null
@@ -1,50 +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 javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.azurecompute.arm.config.GraphRBAC;
-import org.jclouds.azurecompute.arm.config.OAuthResource;
-import org.jclouds.azurecompute.arm.domain.ServicePrincipal;
-import org.jclouds.azurecompute.arm.filters.ApiVersionFilter;
-import org.jclouds.oauth.v2.filters.OAuthFilter;
-import org.jclouds.rest.annotations.Endpoint;
-import org.jclouds.rest.annotations.OnlyElement;
-import org.jclouds.rest.annotations.QueryParams;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.SelectJson;
-
-import com.google.inject.name.Named;
-
-@RequestFilters({ OAuthFilter.class, ApiVersionFilter.class })
-@Consumes(MediaType.APPLICATION_JSON)
-@Endpoint(GraphRBAC.class)
-@OAuthResource(GraphRBAC.ENDPOINT)
-public interface GraphRBACApi {
-
- @Named("servicePrincipal:get")
- @GET
- @Path("/servicePrincipals")
- @QueryParams(keys = "$filter", values = "appId eq '{jclouds.identity}'")
- @SelectJson("value")
- @OnlyElement
- ServicePrincipal getCurrentServicePrincipal();
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/ImageApi.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/ImageApi.java
deleted file mode 100644
index 96caa40..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/ImageApi.java
+++ /dev/null
@@ -1,77 +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.net.URI;
-import java.util.List;
-
-import javax.inject.Named;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.Fallbacks.EmptyListOnNotFoundOr404;
-import org.jclouds.Fallbacks.NullOnNotFoundOr404;
-import org.jclouds.azurecompute.arm.domain.Image;
-import org.jclouds.azurecompute.arm.domain.ImageProperties;
-import org.jclouds.azurecompute.arm.filters.ApiVersionFilter;
-import org.jclouds.azurecompute.arm.functions.URIParser;
-import org.jclouds.oauth.v2.filters.OAuthFilter;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.MapBinder;
-import org.jclouds.rest.annotations.PayloadParam;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.ResponseParser;
-import org.jclouds.rest.annotations.SelectJson;
-import org.jclouds.rest.binders.BindToJsonPayload;
-
-@Path("/resourcegroups/{resourcegroup}/providers/Microsoft.Compute/images")
-@RequestFilters({ OAuthFilter.class, ApiVersionFilter.class })
-@Consumes(MediaType.APPLICATION_JSON)
-public interface ImageApi {
-
- @Named("image:list")
- @SelectJson("value")
- @GET
- @Fallback(EmptyListOnNotFoundOr404.class)
- List<Image> list();
-
- @Named("image:create_or_update")
- @PUT
- @MapBinder(BindToJsonPayload.class)
- @Path("/{imageName}")
- Image createOrUpdate(@PathParam("imageName") String imageName,
- @PayloadParam("location") String location,
- @PayloadParam("properties") ImageProperties properties);
-
- @Named("image:get")
- @Path("/{imageName}")
- @GET
- @Fallback(NullOnNotFoundOr404.class)
- Image get(@PathParam("imageName") String imageName);
-
- @Named("image:delete")
- @Path("/{imageName}")
- @DELETE
- @ResponseParser(URIParser.class)
- @Fallback(NullOnNotFoundOr404.class)
- URI delete(@PathParam("imageName") String imageName);
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/JobApi.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/JobApi.java
deleted file mode 100644
index a854fed..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/JobApi.java
+++ /dev/null
@@ -1,58 +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.io.Closeable;
-import java.net.URI;
-import java.util.List;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.Fallbacks;
-import org.jclouds.azurecompute.arm.domain.ResourceDefinition;
-import org.jclouds.azurecompute.arm.functions.ParseJobStatus;
-import org.jclouds.azurecompute.arm.functions.ParseJobStatus.JobStatus;
-import org.jclouds.oauth.v2.filters.OAuthFilter;
-import org.jclouds.rest.annotations.EndpointParam;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.ResponseParser;
-import org.jclouds.rest.annotations.SelectJson;
-
-/**
- * The Azure Resource Manager API checks for job status and progress.
- */
-@RequestFilters(OAuthFilter.class)
-@Consumes(MediaType.APPLICATION_JSON)
-public interface JobApi extends Closeable {
-
- @GET
- @ResponseParser(ParseJobStatus.class)
- JobStatus jobStatus(@EndpointParam URI jobURI);
-
- /**
- * Get status of captured custom image after capture call
- */
- @GET
- @Fallback(Fallbacks.EmptyListOnNotFoundOr404.class)
- @SelectJson("resources")
- List<ResourceDefinition> captureStatus(@EndpointParam URI jobURI);
-
-}
-
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/LoadBalancerApi.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/LoadBalancerApi.java
deleted file mode 100644
index f9805c0..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/LoadBalancerApi.java
+++ /dev/null
@@ -1,80 +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.net.URI;
-import java.util.List;
-import java.util.Map;
-
-import javax.inject.Named;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-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.filters.ApiVersionFilter;
-import org.jclouds.azurecompute.arm.functions.URIParser;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.oauth.v2.filters.OAuthFilter;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.MapBinder;
-import org.jclouds.rest.annotations.PayloadParam;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.ResponseParser;
-import org.jclouds.rest.annotations.SelectJson;
-import org.jclouds.rest.binders.BindToJsonPayload;
-
-@Path("/resourcegroups/{resourcegroup}/providers/Microsoft.Network/loadBalancers")
-@RequestFilters({ OAuthFilter.class, ApiVersionFilter.class })
-@Consumes(MediaType.APPLICATION_JSON)
-public interface LoadBalancerApi {
-
- @Named("loadbalancer:list")
- @GET
- @SelectJson("value")
- @Fallback(EmptyListOnNotFoundOr404.class)
- List<LoadBalancer> list();
-
- @Named("loadbalancer:get")
- @Path("/{loadbalancername}")
- @GET
- @Fallback(NullOnNotFoundOr404.class)
- LoadBalancer get(@PathParam("loadbalancername") String lbName);
-
- @Named("loadbalancer:createOrUpdate")
- @Path("/{loadbalancername}")
- @PUT
- @MapBinder(BindToJsonPayload.class)
- LoadBalancer createOrUpdate(@PathParam("loadbalancername") String lbName,
- @PayloadParam("location") String location, @Nullable @PayloadParam("tags") Map<String, String> tags,
- @PayloadParam("properties") LoadBalancerProperties properties);
-
- @Named("loadbalancer:delete")
- @Path("/{loadbalancername}")
- @DELETE
- @ResponseParser(URIParser.class)
- @Fallback(NullOnNotFoundOr404.class)
- URI delete(@PathParam("loadbalancername") String lbName);
-
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/LocationApi.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/LocationApi.java
deleted file mode 100644
index 257293c..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/LocationApi.java
+++ /dev/null
@@ -1,56 +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 javax.inject.Named;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.Fallbacks.EmptyListOnNotFoundOr404;
-import org.jclouds.azurecompute.arm.domain.Location;
-import org.jclouds.azurecompute.arm.filters.ApiVersionFilter;
-import org.jclouds.oauth.v2.filters.OAuthFilter;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.SelectJson;
-
-/**
- * This Azure Resource Manager API provides all of the locations that are available for resource providers
- * <p/>
- *
- * @see <a href="https://msdn.microsoft.com/en-US/library/azure/dn790540.aspx">docs</a>
- */
-@Path("/locations")
-@RequestFilters({ OAuthFilter.class, ApiVersionFilter.class })
-@Produces(MediaType.APPLICATION_JSON)
-@Consumes(MediaType.APPLICATION_JSON)
-public interface LocationApi {
-
- /**
- * The List Locations operation lists all of the data center locations that are valid for your subscription.
- */
- @Named("location:list")
- @GET
- @SelectJson("value")
- @Fallback(EmptyListOnNotFoundOr404.class)
- List<Location> list();
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/MetricDefinitionsApi.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/MetricDefinitionsApi.java
deleted file mode 100644
index ba62a28..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/MetricDefinitionsApi.java
+++ /dev/null
@@ -1,52 +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 javax.inject.Named;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.Fallbacks.EmptyListOnNotFoundOr404;
-import org.jclouds.azurecompute.arm.domain.MetricDefinition;
-import org.jclouds.azurecompute.arm.filters.ApiVersionFilter;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.oauth.v2.filters.OAuthFilter;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.SelectJson;
-
-/**
- * This Azure Resource Manager API provides all the metric definitions available for a given resource
- * <p/>
- *
- * @see <a href="https://docs.microsoft.com/en-us/rest/api/monitor/metricdefinitions">docs</a>
- */
-@Path("/{resourceid}")
-@RequestFilters({ OAuthFilter.class, ApiVersionFilter.class })
-@Consumes(MediaType.APPLICATION_JSON)
-public interface MetricDefinitionsApi {
- @Named("metrics:list")
- @Path("/providers/microsoft.insights/metricdefinitions")
- @GET
- @SelectJson("value")
- @Fallback(EmptyListOnNotFoundOr404.class)
- List<MetricDefinition> list(@Nullable @QueryParam("$filter") String filter);
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/MetricsApi.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/MetricsApi.java
deleted file mode 100644
index 03d19a1..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/MetricsApi.java
+++ /dev/null
@@ -1,51 +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 javax.inject.Named;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.Fallbacks.EmptyListOnNotFoundOr404;
-import org.jclouds.azurecompute.arm.domain.Metric;
-import org.jclouds.azurecompute.arm.filters.ApiVersionFilter;
-import org.jclouds.oauth.v2.filters.OAuthFilter;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.SelectJson;
-
-/**
- * This Azure Resource Manager API provides all the metric data available for a given resource
- * <p/>
- *
- * @see <a href="https://docs.microsoft.com/en-us/rest/api/monitor/metricdefinitions">docs</a>
- */
-@Path("/{resourceid}")
-@RequestFilters({ OAuthFilter.class, ApiVersionFilter.class })
-@Consumes(MediaType.APPLICATION_JSON)
-public interface MetricsApi {
- @Named("metrics:list")
- @Path("/providers/microsoft.insights/metrics")
- @GET
- @SelectJson("value")
- @Fallback(EmptyListOnNotFoundOr404.class)
- List<Metric> list(@QueryParam("$filter") String filter);
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/NetworkInterfaceCardApi.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/NetworkInterfaceCardApi.java
deleted file mode 100644
index 5d2773f..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/NetworkInterfaceCardApi.java
+++ /dev/null
@@ -1,80 +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.net.URI;
-import java.util.List;
-import java.util.Map;
-
-import javax.inject.Named;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.Fallbacks.EmptyListOnNotFoundOr404;
-import org.jclouds.Fallbacks.NullOnNotFoundOr404;
-import org.jclouds.azurecompute.arm.domain.NetworkInterfaceCard;
-import org.jclouds.azurecompute.arm.domain.NetworkInterfaceCardProperties;
-import org.jclouds.azurecompute.arm.filters.ApiVersionFilter;
-import org.jclouds.azurecompute.arm.functions.URIParser;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.oauth.v2.filters.OAuthFilter;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.MapBinder;
-import org.jclouds.rest.annotations.PayloadParam;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.ResponseParser;
-import org.jclouds.rest.annotations.SelectJson;
-import org.jclouds.rest.binders.BindToJsonPayload;
-
-@Path("/resourcegroups/{resourcegroup}/providers/Microsoft.Network/networkInterfaces")
-@RequestFilters({ OAuthFilter.class, ApiVersionFilter.class })
-@Consumes(MediaType.APPLICATION_JSON)
-public interface NetworkInterfaceCardApi {
-
- @Named("networkinterfacecard:list")
- @SelectJson("value")
- @GET
- @Fallback(EmptyListOnNotFoundOr404.class)
- List<NetworkInterfaceCard> list();
-
- @Named("networkinterfacecard:create_or_update")
- @Path("/{networkinterfacecardname}")
- @MapBinder(BindToJsonPayload.class)
- @PUT
- NetworkInterfaceCard createOrUpdate(@PathParam("networkinterfacecardname") String networkinterfacecardname,
- @PayloadParam("location") String location,
- @PayloadParam("properties") NetworkInterfaceCardProperties properties,
- @Nullable @PayloadParam("tags") Map<String, String> tags);
-
- @Named("networkinterfacecard:get")
- @Path("/{networkinterfacecardname}")
- @GET
- @Fallback(NullOnNotFoundOr404.class)
- NetworkInterfaceCard get(@PathParam("networkinterfacecardname") String networkinterfacecardname);
-
- @Named("networkinterfacecard:delete")
- @Path("/{networkinterfacecardname}")
- @DELETE
- @ResponseParser(URIParser.class)
- @Fallback(NullOnNotFoundOr404.class)
- URI delete(@PathParam("networkinterfacecardname") String networkinterfacecardname);
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/NetworkSecurityGroupApi.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/NetworkSecurityGroupApi.java
deleted file mode 100644
index 41c0c85..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/NetworkSecurityGroupApi.java
+++ /dev/null
@@ -1,79 +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.net.URI;
-import java.util.List;
-import java.util.Map;
-
-import javax.inject.Named;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.Fallbacks.EmptyListOnNotFoundOr404;
-import org.jclouds.Fallbacks.NullOnNotFoundOr404;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityGroup;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityGroupProperties;
-import org.jclouds.azurecompute.arm.filters.ApiVersionFilter;
-import org.jclouds.azurecompute.arm.functions.URIParser;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.oauth.v2.filters.OAuthFilter;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.MapBinder;
-import org.jclouds.rest.annotations.PayloadParam;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.ResponseParser;
-import org.jclouds.rest.annotations.SelectJson;
-import org.jclouds.rest.binders.BindToJsonPayload;
-
-@Path("/resourcegroups/{resourcegroup}/providers/Microsoft.Network/networkSecurityGroups")
-@RequestFilters({ OAuthFilter.class, ApiVersionFilter.class })
-@Consumes(MediaType.APPLICATION_JSON)
-public interface NetworkSecurityGroupApi {
-
- @Named("networksecuritygroup:list")
- @GET
- @SelectJson("value")
- @Fallback(EmptyListOnNotFoundOr404.class)
- List<NetworkSecurityGroup> list();
-
- @Named("networksecuritygroup:delete")
- @Path("/{networksecuritygroupname}")
- @DELETE
- @ResponseParser(URIParser.class)
- @Fallback(NullOnNotFoundOr404.class)
- URI delete(@PathParam("networksecuritygroupname") String nsgName);
-
- @Named("networksecuritygroup:createOrUpdate")
- @Path("/{networksecuritygroupname}")
- @PUT
- @MapBinder(BindToJsonPayload.class)
- NetworkSecurityGroup createOrUpdate(@PathParam("networksecuritygroupname") String nsgName,
- @PayloadParam("location") String location, @Nullable @PayloadParam("tags") Map<String, String> tags,
- @PayloadParam("properties") NetworkSecurityGroupProperties properties);
-
- @Named("networksecuritygroup:get")
- @Path("/{networksecuritygroupname}")
- @GET
- @Fallback(NullOnNotFoundOr404.class)
- NetworkSecurityGroup get(@PathParam("networksecuritygroupname") String nsgName);
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/NetworkSecurityRuleApi.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/NetworkSecurityRuleApi.java
deleted file mode 100644
index 7404234..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/NetworkSecurityRuleApi.java
+++ /dev/null
@@ -1,91 +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.net.URI;
-import java.util.List;
-
-import javax.inject.Named;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.Fallbacks.EmptyListOnNotFoundOr404;
-import org.jclouds.Fallbacks.NullOnNotFoundOr404;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityRule;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityRuleProperties;
-import org.jclouds.azurecompute.arm.filters.ApiVersionFilter;
-import org.jclouds.azurecompute.arm.functions.URIParser;
-import org.jclouds.oauth.v2.filters.OAuthFilter;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.MapBinder;
-import org.jclouds.rest.annotations.PayloadParam;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.ResponseParser;
-import org.jclouds.rest.annotations.SelectJson;
-import org.jclouds.rest.binders.BindToJsonPayload;
-
-@Path("/resourcegroups/{resourcegroup}/providers/Microsoft.Network/networkSecurityGroups/{networksecuritygroup}")
-@RequestFilters({ OAuthFilter.class, ApiVersionFilter.class })
-@Consumes(MediaType.APPLICATION_JSON)
-public interface NetworkSecurityRuleApi {
-
- @Named("networksecurityrule:createOrUpdate")
- @Path("/securityRules/{networksecurityrulename}")
- @PUT
- @MapBinder(BindToJsonPayload.class)
- NetworkSecurityRule createOrUpdate(@PathParam("networksecurityrulename") String ruleName,
- @PayloadParam("properties") NetworkSecurityRuleProperties properties);
-
- @Named("networksecurityrule:getDefaultRule")
- @Path("/defaultSecurityRules/{networksecurityrulename}")
- @GET
- @Fallback(NullOnNotFoundOr404.class)
- NetworkSecurityRule getDefaultRule(@PathParam("networksecurityrulename") String ruleName);
-
- @Named("networksecurityrule:get")
- @Path("/securityRules/{networksecurityrulename}")
- @GET
- @Fallback(NullOnNotFoundOr404.class)
- NetworkSecurityRule get(@PathParam("networksecurityrulename") String ruleName);
-
- @Named("networksecurityrule:delete")
- @Path("/securityRules/{networksecurityrulename}")
- @DELETE
- @ResponseParser(URIParser.class)
- @Fallback(NullOnNotFoundOr404.class)
- URI delete(@PathParam("networksecurityrulename") String ruleName);
-
- @Named("networksecuritygroup:list")
- @Path("/securityRules")
- @GET
- @SelectJson("value")
- @Fallback(EmptyListOnNotFoundOr404.class)
- List<NetworkSecurityRule> list();
-
- @Named("networksecuritygroup:listDefaultRules")
- @Path("/defaultSecurityRules")
- @GET
- @SelectJson("value")
- @Fallback(EmptyListOnNotFoundOr404.class)
- List<NetworkSecurityRule> listDefaultRules();
-}
-
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/OSImageApi.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/OSImageApi.java
deleted file mode 100644
index 32b3ccc..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/OSImageApi.java
+++ /dev/null
@@ -1,94 +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 javax.inject.Named;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-
-import org.jclouds.Fallbacks.EmptyListOnNotFoundOr404;
-import org.jclouds.azurecompute.arm.domain.Offer;
-import org.jclouds.azurecompute.arm.domain.Publisher;
-import org.jclouds.azurecompute.arm.domain.SKU;
-import org.jclouds.azurecompute.arm.domain.Version;
-import org.jclouds.azurecompute.arm.filters.ApiVersionFilter;
-import org.jclouds.oauth.v2.filters.OAuthFilter;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.RequestFilters;
-
-import static javax.ws.rs.core.MediaType.APPLICATION_JSON;
-
-/**
- * The Azure Resource Management API includes operations for managing the OS images in your subscription.
- */
-@Path("/providers/Microsoft.Compute/locations/{location}")
-@RequestFilters({ OAuthFilter.class, ApiVersionFilter.class })
-@Consumes(APPLICATION_JSON)
-public interface OSImageApi {
-
- /**
- * List Publishers in location
- */
- @Named("publisher:list")
- @GET
- @Path("/publishers")
- @Fallback(EmptyListOnNotFoundOr404.class)
- List<Publisher> listPublishers();
-
- /**
- * List Offers in publisher
- */
- @Named("offer:list")
- @GET
- @Path("/publishers/{publisher}/artifacttypes/vmimage/offers")
- @Fallback(EmptyListOnNotFoundOr404.class)
- List<Offer> listOffers(@PathParam("publisher") String publisher);
-
- /**
- * List SKUs in offer
- */
- @Named("sku:list")
- @GET
- @Path("/publishers/{publisher}/artifacttypes/vmimage/offers/{offer}/skus")
- @Fallback(EmptyListOnNotFoundOr404.class)
- List<SKU> listSKUs(@PathParam("publisher") String publisher, @PathParam("offer") String offer);
-
- /**
- * List Versions in SKU
- */
- @Named("version:list")
- @GET
- @Path("/publishers/{publisher}/artifacttypes/vmimage/offers/{offer}/skus/{sku}/versions")
- @Fallback(EmptyListOnNotFoundOr404.class)
- List<Version> listVersions(@PathParam("publisher") String publisher, @PathParam("offer") String offer,
- @PathParam("sku") String sku);
-
- /**
- * Get the details of a Version
- */
- @Named("version:get")
- @GET
- @Path("/publishers/{publisher}/artifacttypes/vmimage/offers/{offer}/skus/{sku}/versions/{version}")
- @Fallback(EmptyListOnNotFoundOr404.class)
- Version getVersion(@PathParam("publisher") String publisher, @PathParam("offer") String offer,
- @PathParam("sku") String sku, @PathParam("version") String version);
-
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/PublicIPAddressApi.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/PublicIPAddressApi.java
deleted file mode 100644
index 75af4ff..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/PublicIPAddressApi.java
+++ /dev/null
@@ -1,78 +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 javax.inject.Named;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-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.filters.ApiVersionFilter;
-import org.jclouds.azurecompute.arm.functions.FalseOn204;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.oauth.v2.filters.OAuthFilter;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.MapBinder;
-import org.jclouds.rest.annotations.PayloadParam;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.ResponseParser;
-import org.jclouds.rest.annotations.SelectJson;
-import org.jclouds.rest.binders.BindToJsonPayload;
-
-@Path("/resourcegroups/{resourcegroup}/providers/Microsoft.Network/publicIPAddresses")
-@RequestFilters({ OAuthFilter.class, ApiVersionFilter.class })
-@Consumes(MediaType.APPLICATION_JSON)
-public interface PublicIPAddressApi {
-
- @Named("publicipaddress:list")
- @SelectJson("value")
- @GET
- @Fallback(EmptyListOnNotFoundOr404.class)
- List<PublicIPAddress> list();
-
- @Named("publicipaddress:create_or_update")
- @Path("/{publicipaddressname}")
- @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);
-
- @Named("publicipaddress:get")
- @Path("/{publicipaddressname}")
- @GET
- @Fallback(NullOnNotFoundOr404.class)
- PublicIPAddress get(@PathParam("publicipaddressname") String publicipaddressname);
-
- @Named("publicipaddress:delete")
- @Path("/{publicipaddressname}")
- @DELETE
- @ResponseParser(FalseOn204.class)
- boolean delete(@PathParam("publicipaddressname") String publicipaddressname);
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/ResourceGroupApi.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/ResourceGroupApi.java
deleted file mode 100644
index 7c51621..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/ResourceGroupApi.java
+++ /dev/null
@@ -1,99 +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.io.Closeable;
-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;
-import javax.ws.rs.GET;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.Fallbacks.EmptyListOnNotFoundOr404;
-import org.jclouds.Fallbacks.NullOnNotFoundOr404;
-import org.jclouds.azurecompute.arm.domain.Resource;
-import org.jclouds.azurecompute.arm.domain.ResourceGroup;
-import org.jclouds.azurecompute.arm.filters.ApiVersionFilter;
-import org.jclouds.azurecompute.arm.functions.URIParser;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.oauth.v2.filters.OAuthFilter;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.MapBinder;
-import org.jclouds.rest.annotations.PATCH;
-import org.jclouds.rest.annotations.PayloadParam;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.ResponseParser;
-import org.jclouds.rest.annotations.SelectJson;
-import org.jclouds.rest.binders.BindToJsonPayload;
-
-/**
- * The Azure Resource Manager API includes operations for managing resource groups in your subscription.
- *
- * @see <a href="https://msdn.microsoft.com/en-us/library/azure/dn790546.aspx">docs</a>
- */
-@Path("/resourcegroups")
-@RequestFilters({ OAuthFilter.class, ApiVersionFilter.class })
-@Consumes(MediaType.APPLICATION_JSON)
-public interface ResourceGroupApi extends Closeable{
-
- @Named("resourcegroup:list")
- @SelectJson("value")
- @GET
- @Fallback(EmptyListOnNotFoundOr404.class)
- List<ResourceGroup> list();
-
- @Named("resourcegroup:create")
- @PUT
- @Path("/{name}")
- @MapBinder(BindToJsonPayload.class)
- ResourceGroup create(@PathParam("name") String name, @PayloadParam("location") String location, @Nullable @PayloadParam("tags") Map<String, String> tags);
-
- @Named("resourcegroup:get")
- @GET
- @Path("/{name}")
- @Fallback(NullOnNotFoundOr404.class)
- @Nullable
- ResourceGroup get(@PathParam("name") String name);
-
- @Named("resourcegroup:resources")
- @GET
- @Path("/{name}/resources")
- @SelectJson("value")
- @Fallback(EmptyListOnNotFoundOr404.class)
- List<Resource> resources(@PathParam("name") String name);
-
- @Named("resourcegroup:update")
- @PATCH
- @Path("/{name}")
- @MapBinder(BindToJsonPayload.class)
- ResourceGroup update(@PathParam("name") String name, @Nullable @PayloadParam("tags") Map<String, String> tags);
-
- @Named("resourcegroup:delete")
- @DELETE
- @ResponseParser(URIParser.class)
- @Path("/{name}")
- @Fallback(NullOnNotFoundOr404.class)
- URI delete(@PathParam("name") String name);
-}
-
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/ResourceProviderApi.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/ResourceProviderApi.java
deleted file mode 100644
index 56dd0d4..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/ResourceProviderApi.java
+++ /dev/null
@@ -1,56 +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.io.Closeable;
-import java.util.List;
-
-import javax.inject.Named;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.Fallbacks.NullOnNotFoundOr404;
-import org.jclouds.azurecompute.arm.domain.ResourceProviderMetaData;
-import org.jclouds.azurecompute.arm.filters.ApiVersionFilter;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.oauth.v2.filters.OAuthFilter;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.SelectJson;
-
-/**
- * The Azure Resource Provider API provides information about a resource provider and its supported resource types.
- *
- * @see <a href="https://msdn.microsoft.com/en-us/library/azure/dn790534.aspx">docs</a>
- */
-@Path("/providers")
-
-@RequestFilters({ OAuthFilter.class, ApiVersionFilter.class })
-@Consumes(MediaType.APPLICATION_JSON)
-public interface ResourceProviderApi extends Closeable {
-
- @Named("providers:get")
- @GET
- @Path("/{namespace}")
- @SelectJson("resourceTypes")
- @Fallback(NullOnNotFoundOr404.class)
- @Nullable
- List<ResourceProviderMetaData> get(@PathParam("namespace") String namespace);
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/StorageAccountApi.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/StorageAccountApi.java
deleted file mode 100644
index 0c9399c..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/StorageAccountApi.java
+++ /dev/null
@@ -1,160 +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.net.URI;
-import java.util.List;
-import java.util.Map;
-
-import javax.inject.Named;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.Fallbacks;
-import org.jclouds.azurecompute.arm.domain.Availability;
-import org.jclouds.azurecompute.arm.domain.StorageService;
-import org.jclouds.azurecompute.arm.domain.StorageServiceKeys;
-import org.jclouds.azurecompute.arm.domain.StorageServiceUpdateParams;
-import org.jclouds.azurecompute.arm.filters.ApiVersionFilter;
-import org.jclouds.azurecompute.arm.functions.FalseOn204;
-import org.jclouds.azurecompute.arm.functions.URIParser;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.oauth.v2.filters.OAuthFilter;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.MapBinder;
-import org.jclouds.rest.annotations.PATCH;
-import org.jclouds.rest.annotations.Payload;
-import org.jclouds.rest.annotations.PayloadParam;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.ResponseParser;
-import org.jclouds.rest.annotations.SelectJson;
-import org.jclouds.rest.binders.BindToJsonPayload;
-
-/**
- * The Azure Resource Management API includes operations for managing the storage accounts in your subscription.
- *
- * @see <a href="https://msdn.microsoft.com/en-us/library/mt163683.aspx">docs</a>
- */
-@Path("/")
-@RequestFilters({ OAuthFilter.class, ApiVersionFilter.class })
-@Consumes(MediaType.APPLICATION_JSON)
-public interface StorageAccountApi {
-
- /**
- * The List Storage Accounts operation lists the storage accounts that are available in the specified subscription
- * and resource group.
- * https://msdn.microsoft.com/en-us/library/mt163559.aspx
- */
- @Named("storageaccount:list")
- @Path("/resourcegroups/{resourceGroup}/providers/Microsoft.Storage/storageAccounts")
- @GET
- @SelectJson("value")
- @Fallback(Fallbacks.EmptyListOnNotFoundOr404.class)
- List<StorageService> list();
-
- /**
- * The Create Storage Account asynchronous operation creates a new storage account in Microsoft Azure.
- * https://msdn.microsoft.com/en-us/library/mt163564.aspx
- * PUT
- */
- @Named("storageaccount:create")
- @Path("/resourcegroups/{resourceGroup}/providers/Microsoft.Storage/storageAccounts/{storageAccountName}")
- @ResponseParser(URIParser.class)
- @MapBinder(BindToJsonPayload.class)
- @PUT
- URI create(@PathParam("storageAccountName") String storageAccountName,
- @PayloadParam("location") String location,
- @Nullable @PayloadParam("tags") Map<String, String> tags,
- @PayloadParam("properties") Map<String, String> properties);
-
- /**
- * The Check Storage Account Name Availability operation checks to see if the specified storage account name is
- * available, or if it has already been taken. https://msdn.microsoft.com/en-us/library/mt163642.aspx
- * POST
- */
- @Named("CheckStorageAccountNameAvailability")
- @POST
- @Payload("%7B\"name\":\"{name}\",\"type\":\"Microsoft.Storage/storageAccounts\"%7D")
- @Path("/providers/Microsoft.Storage/checkNameAvailability")
- @Produces(MediaType.APPLICATION_JSON)
- Availability isAvailable(@PayloadParam("name") String storageAccountName);
-
- /**
- * The Get Storage Account Properties operation returns system properties for the specified storage account.
- * https://msdn.microsoft.com/en-us/library/mt163553.aspx
- */
- @Named("storageaccountproperty:get")
- @GET
- @Path("/resourcegroups/{resourceGroup}/providers/Microsoft.Storage/storageAccounts/{storageAccountName}")
- @Fallback(Fallbacks.NullOnNotFoundOr404.class)
- StorageService get(@PathParam("storageAccountName") String storageAccountName);
-
- /**
- * The Get Storage Keys operation returns the primary and secondary access keys for the specified storage account.
- * https://msdn.microsoft.com/en-us/library/mt163589.aspx
- * POST
- */
- @Named("storageaccountkey:get")
- @POST
- @Path("/resourcegroups/{resourceGroup}/providers/Microsoft.Storage/storageAccounts/{storageAccountName}/listKeys")
- @Fallback(Fallbacks.NullOnNotFoundOr404.class)
- StorageServiceKeys getKeys(@PathParam("storageAccountName") String storageAccountName);
-
- /**
- * https://msdn.microsoft.com/en-us/library/mt163567.aspx
- * POST
- */
- @Named("RegenerateStorageAccountKeys")
- @POST
- @Payload("%7B\"keyName\":\"{keyName}\"%7D")
- @Path("/resourcegroups/{resourceGroup}/providers/Microsoft.Storage/storageAccounts/{storageAccount}/regenerateKey")
- @Produces(MediaType.APPLICATION_JSON)
- StorageServiceKeys regenerateKeys(@PathParam("storageAccount") String storageAccount,
- @PayloadParam("keyName") String keyName);
-
- /**
- * The Update Storage Account asynchronous operation updates the label, the description, and enables or disables the
- * geo-replication status for the specified storage account. https://msdn.microsoft.com/en-us/library/mt163639.aspx
- * PATCH
- */
- @Named("storageaccount:update")
- @PATCH
- @MapBinder(BindToJsonPayload.class)
- @Path("/resourcegroups/{resourceGroup}/providers/Microsoft.Storage/storageAccounts/{storageAccountName}")
- StorageServiceUpdateParams update(
- @PathParam("storageAccountName") String storageAccountName,
- @Nullable @PayloadParam("tags") Map<String, String> tags,
- @PayloadParam("properties") StorageServiceUpdateParams.StorageServiceUpdateProperties properties);
-
- /**
- * https://msdn.microsoft.com/en-us/library/mt163652.aspx
- * DELETE
- */
- @Named("storageaccount:delete")
- @DELETE
- @ResponseParser(FalseOn204.class)
- @Path("/resourcegroups/{resourceGroup}/providers/Microsoft.Storage/storageAccounts/{storageAccountName}")
- boolean delete(@PathParam("storageAccountName") String storageAccountName);
-
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/SubnetApi.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/SubnetApi.java
deleted file mode 100644
index 8f30d6c..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/SubnetApi.java
+++ /dev/null
@@ -1,74 +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 javax.inject.Named;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.Fallbacks.EmptyListOnNotFoundOr404;
-import org.jclouds.Fallbacks.NullOnNotFoundOr404;
-import org.jclouds.azurecompute.arm.domain.Subnet;
-import org.jclouds.azurecompute.arm.filters.ApiVersionFilter;
-import org.jclouds.azurecompute.arm.functions.FalseOn204;
-import org.jclouds.oauth.v2.filters.OAuthFilter;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.MapBinder;
-import org.jclouds.rest.annotations.PayloadParam;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.ResponseParser;
-import org.jclouds.rest.annotations.SelectJson;
-import org.jclouds.rest.binders.BindToJsonPayload;
-
-@Path("/resourcegroups/{resourcegroup}/providers/Microsoft.Network/virtualNetworks/{virtualnetwork}/subnets")
-
-@RequestFilters({ OAuthFilter.class, ApiVersionFilter.class })
-@Consumes(MediaType.APPLICATION_JSON)
-public interface SubnetApi {
-
- @Named("subnet:list")
- @SelectJson("value")
- @GET
- @Fallback(EmptyListOnNotFoundOr404.class)
- List<Subnet> list();
-
- @Named("subnet:create_or_update")
- @Path("/{subnetname}")
- @MapBinder(BindToJsonPayload.class)
- @PUT
- Subnet createOrUpdate(@PathParam("subnetname") String name,
- @PayloadParam("properties") Subnet.SubnetProperties properties);
-
- @Named("subnet:get")
- @Path("/{subnetname}")
- @GET
- @Fallback(NullOnNotFoundOr404.class)
- Subnet get(@PathParam("subnetname") String subnetname);
-
- @Named("subnet:delete")
- @Path("/{subnetname}")
- @DELETE
- @ResponseParser(FalseOn204.class)
- boolean delete(@PathParam("subnetname") String subnetname);
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/VMSizeApi.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/VMSizeApi.java
deleted file mode 100644
index b5917ce..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/VMSizeApi.java
+++ /dev/null
@@ -1,45 +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 javax.inject.Named;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.Fallbacks.EmptyListOnNotFoundOr404;
-import org.jclouds.azurecompute.arm.domain.VMSize;
-import org.jclouds.azurecompute.arm.filters.ApiVersionFilter;
-import org.jclouds.oauth.v2.filters.OAuthFilter;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.SelectJson;
-
-@Path("/providers/Microsoft.Compute/locations/{location}/vmSizes")
-@RequestFilters({ OAuthFilter.class, ApiVersionFilter.class })
-@Consumes(MediaType.APPLICATION_JSON)
-public interface VMSizeApi {
-
- @Named("vmSizes:list")
- @GET
- @SelectJson("value")
- @Fallback(EmptyListOnNotFoundOr404.class)
- List<VMSize> list();
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/VaultApi.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/VaultApi.java
deleted file mode 100644
index 5ae39ba..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/VaultApi.java
+++ /dev/null
@@ -1,635 +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.net.URI;
-import java.util.List;
-import java.util.Map;
-
-import javax.inject.Named;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.core.MediaType;
-
-import com.google.common.base.Function;
-
-import org.jclouds.Fallbacks.EmptyListOnNotFoundOr404;
-import org.jclouds.Fallbacks.FalseOnNotFoundOr404;
-import org.jclouds.Fallbacks.NullOnNotFoundOr404;
-import org.jclouds.azurecompute.arm.config.OAuthResource;
-import org.jclouds.azurecompute.arm.domain.Certificate;
-import org.jclouds.azurecompute.arm.domain.Certificate.CertificateAttributes;
-import org.jclouds.azurecompute.arm.domain.Certificate.CertificateBundle;
-import org.jclouds.azurecompute.arm.domain.Certificate.CertificateIssuer;
-import org.jclouds.azurecompute.arm.domain.Certificate.CertificateOperation;
-import org.jclouds.azurecompute.arm.domain.Certificate.CertificatePolicy;
-import org.jclouds.azurecompute.arm.domain.Certificate.Contact;
-import org.jclouds.azurecompute.arm.domain.Certificate.Contacts;
-import org.jclouds.azurecompute.arm.domain.Certificate.DeletedCertificate;
-import org.jclouds.azurecompute.arm.domain.Certificate.DeletedCertificateBundle;
-import org.jclouds.azurecompute.arm.domain.Certificate.IssuerAttributes;
-import org.jclouds.azurecompute.arm.domain.Certificate.IssuerBundle;
-import org.jclouds.azurecompute.arm.domain.Certificate.IssuerCredentials;
-import org.jclouds.azurecompute.arm.domain.Certificate.IssuerParameters;
-import org.jclouds.azurecompute.arm.domain.Certificate.KeyProperties;
-import org.jclouds.azurecompute.arm.domain.Certificate.LifetimeAction;
-import org.jclouds.azurecompute.arm.domain.Certificate.OrganizationDetails;
-import org.jclouds.azurecompute.arm.domain.Certificate.SecretProperties;
-import org.jclouds.azurecompute.arm.domain.Certificate.X509CertificateProperties;
-import org.jclouds.azurecompute.arm.domain.Key;
-import org.jclouds.azurecompute.arm.domain.Key.DeletedKeyBundle;
-import org.jclouds.azurecompute.arm.domain.Key.JsonWebKey;
-import org.jclouds.azurecompute.arm.domain.Key.KeyAttributes;
-import org.jclouds.azurecompute.arm.domain.Key.KeyBundle;
-import org.jclouds.azurecompute.arm.domain.Key.KeyOperationResult;
-import org.jclouds.azurecompute.arm.domain.Secret;
-import org.jclouds.azurecompute.arm.domain.Secret.DeletedSecretBundle;
-import org.jclouds.azurecompute.arm.domain.Secret.SecretAttributes;
-import org.jclouds.azurecompute.arm.domain.Secret.SecretBundle;
-import org.jclouds.azurecompute.arm.domain.Vault;
-import org.jclouds.azurecompute.arm.domain.Vault.DeletedVault;
-import org.jclouds.azurecompute.arm.domain.VaultProperties;
-import org.jclouds.azurecompute.arm.filters.ApiVersionFilter;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.oauth.v2.filters.OAuthFilter;
-import org.jclouds.rest.annotations.EndpointParam;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.MapBinder;
-import org.jclouds.rest.annotations.PATCH;
-import org.jclouds.rest.annotations.PayloadParam;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.SelectJson;
-import org.jclouds.rest.binders.BindToJsonPayload;
-import org.jclouds.rest.annotations.ParamParser;
-
-@RequestFilters({ OAuthFilter.class, ApiVersionFilter.class })
-@Consumes(MediaType.APPLICATION_JSON)
-public interface VaultApi {
- static class PrependSlashOrEmptyString implements Function<Object, String> {
- public String apply(Object from) {
- if ((from == null) || (from.toString().length() == 0)) {
- return "";
- } else {
- return "/" + from.toString();
- }
- }
- }
-
- // Vault operations
- @Named("vault:list")
- @SelectJson("value")
- @GET
- @Path("/resourcegroups/{resourcegroup}/providers/Microsoft.KeyVault/vaults")
- @Fallback(EmptyListOnNotFoundOr404.class)
- List<Vault> listVaults();
-
- @Named("vault:create_or_update")
- @PUT
- @MapBinder(BindToJsonPayload.class)
- @Path("/resourcegroups/{resourcegroup}/providers/Microsoft.KeyVault/vaults/{vaultName}")
- Vault createOrUpdateVault(@PathParam("vaultName") String vaultName, @PayloadParam("location") String location,
- @PayloadParam("properties") VaultProperties properties, @Nullable @PayloadParam("tags") Map<String, String> tags);
-
- @Named("vault:get")
- @Path("/resourcegroups/{resourcegroup}/providers/Microsoft.KeyVault/vaults/{vaultName}")
- @GET
- @Fallback(NullOnNotFoundOr404.class)
- Vault getVault(@PathParam("vaultName") String vaultName);
-
- @Named("vault:delete")
- @Path("/resourcegroups/{resourcegroup}/providers/Microsoft.KeyVault/vaults/{vaultName}")
- @DELETE
- @Fallback(FalseOnNotFoundOr404.class)
- boolean deleteVault(@PathParam("vaultName") String vaultName);
-
- @Named("vault:list_deleted_vaults")
- @Path("/providers/Microsoft.KeyVault/deletedVaults")
- @GET
- @SelectJson("value")
- @Fallback(EmptyListOnNotFoundOr404.class)
- List<DeletedVault> listDeletedVaults();
-
- @Named("vault:get_deleted")
- @GET
- @Path("/providers/Microsoft.KeyVault/locations/{location}/deletedVaults/{vaultName}")
- @Fallback(NullOnNotFoundOr404.class)
- DeletedVault getDeletedVault(@PathParam("location") String location, @PathParam("vaultName") String vaultName);
-
- @Named("vault:purge")
- @POST
- @Fallback(FalseOnNotFoundOr404.class)
- @Path("/providers/Microsoft.KeyVault/locations/{location}/deletedVaults/{vaultName}/purge")
- boolean purgeVault(@PathParam("location") String location, @PathParam("vaultName") String vaultName);
-
- // Key operations
- @Named("key:list")
- @SelectJson("value")
- @GET
- @Fallback(EmptyListOnNotFoundOr404.class)
- @Path("/keys")
- @OAuthResource("https://vault.azure.net")
- List<Key> listKeys(@EndpointParam URI keyVaultUri);
-
- @Named("key:create")
- @POST
- @MapBinder(BindToJsonPayload.class)
- @Path("/keys/{keyName}/create")
- @OAuthResource("https://vault.azure.net")
- KeyBundle createKey(@EndpointParam URI vaultBaseUrl, @PathParam("keyName") String keyName,
- @Nullable @PayloadParam("attributes") KeyAttributes attributes,
- @Nullable @PayloadParam("crv") String curveName, @Nullable @PayloadParam("key_ops") List<String> keyOps,
- @PayloadParam("key_size") int keySize, @PayloadParam("kty") String keyType,
- @Nullable @PayloadParam("tags") Map<String, String> tags);
-
- @Named("key:import")
- @PUT
- @MapBinder(BindToJsonPayload.class)
- @Path("/keys/{keyName}")
- @OAuthResource("https://vault.azure.net")
- KeyBundle importKey(@EndpointParam URI vaultBaseUrl, @PathParam("keyName") String keyName,
- @PayloadParam("Hsm") boolean hsm, @Nullable @PayloadParam("attributes") KeyAttributes attributes,
- @Nullable @PayloadParam("key") JsonWebKey key, @Nullable @PayloadParam("tags") Map<String, String> tags);
-
- @Named("key:get")
- @GET
- @Path("/keys/{keyName}")
- @Fallback(NullOnNotFoundOr404.class)
- @OAuthResource("https://vault.azure.net")
- KeyBundle getKey(@EndpointParam URI vaultBaseUrl, @PathParam("keyName") String keyName);
-
- @Named("key:delete")
- @DELETE
- @Path("/keys/{keyName}")
- @Fallback(NullOnNotFoundOr404.class)
- @OAuthResource("https://vault.azure.net")
- DeletedKeyBundle deleteKey(@EndpointParam URI vaultBaseUrl, @PathParam("keyName") String keyName);
-
- @Named("key:get_versions")
- @GET
- @SelectJson("value")
- @Path("/keys/{keyName}/versions")
- @Fallback(EmptyListOnNotFoundOr404.class)
- @OAuthResource("https://vault.azure.net")
- List<Key> getKeyVersions(@EndpointParam URI vaultBaseUrl, @PathParam("keyName") String keyName);
-
- @Named("key:update")
- @PATCH
- @MapBinder(BindToJsonPayload.class)
- @Path("/keys/{keyName}{keyVersion}")
- @OAuthResource("https://vault.azure.net")
- KeyBundle updateKey(@EndpointParam URI vaultBaseUrl,
- @PathParam("keyName") String keyName,
- @Nullable @PathParam("keyVersion") @ParamParser(PrependSlashOrEmptyString.class) String keyVersion,
- @Nullable @PayloadParam("attributes") KeyAttributes attributes,
- @Nullable @PayloadParam("key_ops") List<String> keyOps,
- @Nullable @PayloadParam("tags") Map<String, String> tags);
-
- @Named("key:backup")
- @POST
- @SelectJson("value")
- @Path("/keys/{keyName}/backup")
- @OAuthResource("https://vault.azure.net")
- String backupKey(@EndpointParam URI vaultBaseUrl, @PathParam("keyName") String keyName);
-
- @Named("key:restore")
- @POST
- @MapBinder(BindToJsonPayload.class)
- @Path("/keys/restore")
- @OAuthResource("https://vault.azure.net")
- KeyBundle restoreKey(@EndpointParam URI vaultBaseUrl, @PayloadParam("value") String keyInfo);
-
- // Soft-delete key operations
- @Named("key:list_deleted")
- @GET
- @SelectJson("value")
- @Path("/deletedkeys")
- @Fallback(EmptyListOnNotFoundOr404.class)
- @OAuthResource("https://vault.azure.net")
- List<DeletedKeyBundle> listDeletedKeys(@EndpointParam URI vaultBaseUrl);
-
- @Named("key:get_deleted")
- @GET
- @Path("/deletedkeys/{keyName}")
- @Fallback(NullOnNotFoundOr404.class)
- @OAuthResource("https://vault.azure.net")
- DeletedKeyBundle getDeletedKey(@EndpointParam URI vaultBaseUrl, @PathParam("keyName") String keyName);
-
- @Named("key:recover_deleted")
- @POST
- @Path("/deletedkeys/{keyName}/recover")
- @OAuthResource("https://vault.azure.net")
- KeyBundle recoverDeletedKey(@EndpointParam URI vaultBaseUrl, @PathParam("keyName") String keyName);
-
- @Named("key:purge_deleted")
- @DELETE
- @Path("/deletedkeys/{keyName}")
- @Fallback(FalseOnNotFoundOr404.class)
- @OAuthResource("https://vault.azure.net")
- boolean purgeDeletedKey(@EndpointParam URI vaultBaseUrl, @PathParam("keyName") String keyName);
-
- // Key cryptographic operations
- @Named("key:crypto_encrypt")
- @POST
- @Path("/keys/{keyName}{keyVersion}/encrypt")
- @MapBinder(BindToJsonPayload.class)
- @OAuthResource("https://vault.azure.net")
- KeyOperationResult encrypt(@EndpointParam URI vaultBaseUrl,
- @PathParam("keyName") String keyName,
- @Nullable @PathParam("keyVersion") @ParamParser(PrependSlashOrEmptyString.class) String keyVersion,
- @PayloadParam("alg") String algorithm,
- @PayloadParam("value") String value);
-
- @Named("key:crypto_decrypt")
- @POST
- @Path("/keys/{keyName}{keyVersion}/decrypt")
- @MapBinder(BindToJsonPayload.class)
- @OAuthResource("https://vault.azure.net")
- KeyOperationResult decrypt(@EndpointParam URI vaultBaseUrl,
- @PathParam("keyName") String keyName,
- @Nullable @PathParam("keyVersion") @ParamParser(PrependSlashOrEmptyString.class) String keyVersion,
- @PayloadParam("alg") String algorithm,
- @PayloadParam("value") String value);
-
- @Named("key:crypto_sign")
- @POST
- @Path("/keys/{keyName}{keyVersion}/sign")
- @MapBinder(BindToJsonPayload.class)
- @OAuthResource("https://vault.azure.net")
- KeyOperationResult sign(@EndpointParam URI vaultBaseUrl,
- @PathParam("keyName") String keyName,
- @Nullable @PathParam("keyVersion") @ParamParser(PrependSlashOrEmptyString.class) String keyVersion,
- @PayloadParam("alg") String algorithm,
- @PayloadParam("value") String value);
-
- @Named("key:crypto_verify")
- @POST
- @Path("/keys/{keyName}{keyVersion}/verify")
- @MapBinder(BindToJsonPayload.class)
- @OAuthResource("https://vault.azure.net")
- boolean verify(@EndpointParam URI vaultBaseUrl,
- @PathParam("keyName") String keyName,
- @Nullable @PathParam("keyVersion") @ParamParser(PrependSlashOrEmptyString.class) String keyVersion,
- @PayloadParam("alg") String algorithm,
- @PayloadParam("digest") String digest,
- @PayloadParam("value") String value);
-
- @Named("key:crypto_wrap")
- @POST
- @Path("/keys/{keyName}{keyVersion}/wrapkey")
- @MapBinder(BindToJsonPayload.class)
- @OAuthResource("https://vault.azure.net")
- KeyOperationResult wrap(@EndpointParam URI vaultBaseUrl,
- @PathParam("keyName") String keyName,
- @Nullable @PathParam("keyVersion") @ParamParser(PrependSlashOrEmptyString.class) String keyVersion,
- @PayloadParam("alg") String algorithm,
- @PayloadParam("value") String value);
-
- @Named("key:crypto_unwrap")
- @POST
- @Path("/keys/{keyName}{keyVersion}/unwrapkey")
- @MapBinder(BindToJsonPayload.class)
- @OAuthResource("https://vault.azure.net")
- KeyOperationResult unwrap(@EndpointParam URI vaultBaseUrl,
- @PathParam("keyName") String keyName,
- @Nullable @PathParam("keyVersion") @ParamParser(PrependSlashOrEmptyString.class) String keyVersion,
- @PayloadParam("alg") String algorithm,
- @PayloadParam("value") String value);
-
- // Secret operations
- @Named("secret:list")
- @SelectJson("value")
- @GET
- @Fallback(EmptyListOnNotFoundOr404.class)
- @Path("/secrets")
- @OAuthResource("https://vault.azure.net")
- List<Secret> listSecrets(@EndpointParam URI keyVaultUri);
-
- @Named("secret:set")
- @PUT
- @MapBinder(BindToJsonPayload.class)
- @Path("/secrets/{secretName}")
- @OAuthResource("https://vault.azure.net")
- SecretBundle setSecret(@EndpointParam URI keyVaultUri, @PathParam("secretName") String secretName,
- @Nullable @PayloadParam("attributes") SecretAttributes attributes,
- @Nullable @PayloadParam("contentType") String contentType,
- @Nullable @PayloadParam("tags") Map<String, String> tags, @PayloadParam("value") String value);
-
- @Named("secret:get")
- @GET
- @Path("/secrets/{secretName}{secretVersion}")
- @Fallback(NullOnNotFoundOr404.class)
- @OAuthResource("https://vault.azure.net")
- SecretBundle getSecret(@EndpointParam URI vaultBaseUrl,
- @PathParam("secretName") String secretName,
- @Nullable @PathParam("secretVersion") @ParamParser(PrependSlashOrEmptyString.class) String secretVersion);
-
- @Named("secret:delete")
- @DELETE
- @Path("/secrets/{secretName}")
- @Fallback(NullOnNotFoundOr404.class)
- @OAuthResource("https://vault.azure.net")
- DeletedSecretBundle deleteSecret(@EndpointParam URI vaultBaseUrl, @PathParam("secretName") String secretName);
-
- @Named("secret:get_versions")
- @GET
- @SelectJson("value")
- @Path("/secrets/{secretName}/versions")
- @Fallback(EmptyListOnNotFoundOr404.class)
- @OAuthResource("https://vault.azure.net")
- List<Secret> getSecretVersions(@EndpointParam URI vaultBaseUrl, @PathParam("secretName") String secretName);
-
- @Named("secret:update")
- @PATCH
- @MapBinder(BindToJsonPayload.class)
- @Path("/secrets/{secretName}{secretVersion}")
- @OAuthResource("https://vault.azure.net")
- SecretBundle updateSecret(@EndpointParam URI vaultBaseUrl,
- @PathParam("secretName") String secretName,
- @Nullable @PathParam("secretVersion") @ParamParser(PrependSlashOrEmptyString.class) String secretVersion,
- @Nullable @PayloadParam("attributes") SecretAttributes attributes,
- @Nullable @PayloadParam("contentType") String contentType,
- @Nullable @PayloadParam("tags") Map<String, String> tags);
-
- @Named("secret:backup")
- @POST
- @SelectJson("value")
- @Path("/secrets/{secretName}/backup")
- @OAuthResource("https://vault.azure.net")
- String backupSecret(@EndpointParam URI vaultBaseUrl, @PathParam("secretName") String secretName);
-
- @Named("secret:restore")
- @POST
- @MapBinder(BindToJsonPayload.class)
- @Path("/secrets/restore")
- @OAuthResource("https://vault.azure.net")
- SecretBundle restoreSecret(@EndpointParam URI vaultBaseUrl, @PayloadParam("value") String secretInfo);
-
- // Soft-delete secret operations
- @Named("secret:list_deleted")
- @GET
- @SelectJson("value")
- @Path("/deletedsecrets")
- @Fallback(EmptyListOnNotFoundOr404.class)
- @OAuthResource("https://vault.azure.net")
- List<DeletedSecretBundle> listDeletedSecrets(@EndpointParam URI vaultBaseUrl);
-
- @Named("secret:get_deleted")
- @GET
- @Path("/deletedsecrets/{secretName}")
- @Fallback(NullOnNotFoundOr404.class)
- @OAuthResource("https://vault.azure.net")
- DeletedSecretBundle getDeletedSecret(@EndpointParam URI vaultBaseUrl, @PathParam("secretName") String secretName);
-
- @Named("secret:recover_deleted")
- @POST
- @Path("/deletedsecrets/{secretName}/recover")
- @OAuthResource("https://vault.azure.net")
- SecretBundle recoverDeletedSecret(@EndpointParam URI vaultBaseUrl, @PathParam("secretName") String secretName);
-
- @Named("secret:purge_deleted")
- @DELETE
- @Path("/deletedsecrets/{secretName}")
- @Fallback(FalseOnNotFoundOr404.class)
- @OAuthResource("https://vault.azure.net")
- boolean purgeDeletedSecret(@EndpointParam URI vaultBaseUrl, @PathParam("secretName") String secretName);
-
- // Certificate operations
- @Named("certificate:create")
- @POST
- @MapBinder(BindToJsonPayload.class)
- @Path("/certificates/{certificateName}/create")
- @OAuthResource("https://vault.azure.net")
- CertificateOperation createCertificate(@EndpointParam URI vaultBaseUrl,
- @PathParam("certificateName") String certificateName,
- @Nullable @PayloadParam("attributes") CertificateAttributes attributes,
- @Nullable @PayloadParam("policy") CertificatePolicy policy,
- @Nullable @PayloadParam("tags") Map<String, String> tags);
-
- @Named("certificate:get")
- @GET
- @Path("/certificates/{certificateName}{certificateVersion}")
- @Fallback(NullOnNotFoundOr404.class)
- @OAuthResource("https://vault.azure.net")
- CertificateBundle getCertificate(@EndpointParam URI vaultBaseUrl,
- @PathParam("certificateName") String certificateName,
- @Nullable @PathParam("certificateVersion") @ParamParser(PrependSlashOrEmptyString.class) String certificateVersion);
-
- @Named("certificate:delete")
- @DELETE
- @Path("/certificates/{certificateName}")
- @Fallback(NullOnNotFoundOr404.class)
- @OAuthResource("https://vault.azure.net")
- DeletedCertificateBundle deleteCertificate(@EndpointParam URI vaultBaseUrl,
- @PathParam("certificateName") String certificateName);
-
- @Named("certificate:list")
- @GET
- @SelectJson("value")
- @Path("/certificates")
- @Fallback(EmptyListOnNotFoundOr404.class)
- @OAuthResource("https://vault.azure.net")
- List<Certificate> getCertificates(@EndpointParam URI vaultBaseUrl);
-
- @Named("certificate:list_deleted")
- @GET
- @SelectJson("value")
- @Path("/deletedcertificates")
- @Fallback(EmptyListOnNotFoundOr404.class)
- @OAuthResource("https://vault.azure.net")
- List<DeletedCertificate> getDeletedCertificates(@EndpointParam URI vaultBaseUrl);
-
- @Named("certificate:get_deleted")
- @GET
- @Path("/deletedcertificates/{certificateName}")
- @Fallback(NullOnNotFoundOr404.class)
- @OAuthResource("https://vault.azure.net")
- DeletedCertificateBundle getDeletedCertificate(@EndpointParam URI vaultBaseUrl,
- @PathParam("certificateName") String certificateName);
-
- @Named("certificate:recover_deleted")
- @POST
- @Path("/deletedcertificates/{certificateName}/recover")
- @OAuthResource("https://vault.azure.net")
- CertificateBundle recoverDeletedCertificate(@EndpointParam URI vaultBaseUrl,
- @PathParam("certificateName") String certificateName);
-
- @Named("certificate:purge_deleted")
- @DELETE
- @Path("/deletedcertificates/{certificateName}")
- @Fallback(FalseOnNotFoundOr404.class)
- @OAuthResource("https://vault.azure.net")
- boolean purgeDeletedCertificate(@EndpointParam URI vaultBaseUrl, @PathParam("certificateName") String certificateName);
-
- @Named("certificate:get_versions")
- @GET
- @SelectJson("value")
- @Path("/certificates/{certificateName}/versions")
- @Fallback(EmptyListOnNotFoundOr404.class)
- @OAuthResource("https://vault.azure.net")
- List<Certificate> getCertificateVersions(@EndpointParam URI vaultBaseUrl,
- @PathParam("certificateName") String certificateName);
-
- @Named("certificate:update")
- @PATCH
- @MapBinder(BindToJsonPayload.class)
- @Path("/certificates/{certificateName}{certificateVersion}")
- @OAuthResource("https://vault.azure.net")
- CertificateBundle updateCertificate(@EndpointParam URI vaultBaseUrl,
- @PathParam("certificateName") String certificateName,
- @Nullable @PathParam("certificateVersion") @ParamParser(PrependSlashOrEmptyString.class) String certificateVersion,
- @Nullable @PayloadParam("attributes") CertificateAttributes attributes,
- @Nullable @PayloadParam("policy") CertificatePolicy policy,
- @Nullable @PayloadParam("tags") Map<String, String> tags);
-
- @Named("certificate:import")
- @POST
- @MapBinder(BindToJsonPayload.class)
- @Path("/certificates/{certificateName}/import")
- @OAuthResource("https://vault.azure.net")
- CertificateBundle importCertificate(@EndpointParam URI vaultBaseUrl,
- @PathParam("certificateName") String certificateName,
- @Nullable @PayloadParam("attributes") CertificateAttributes attributes,
- @Nullable @PayloadParam("policy") CertificatePolicy policy, @Nullable @PayloadParam("pwd") String password,
- @Nullable @PayloadParam("tags") Map<String, String> tags, @PayloadParam("value") String value);
-
- @Named("certificate:merge")
- @POST
- @MapBinder(BindToJsonPayload.class)
- @Path("/certificates/{certificateName}/pending/merge")
- @OAuthResource("https://vault.azure.net")
- CertificateBundle mergeCertificate(@EndpointParam URI vaultBaseUrl,
- @PathParam("certificateName") String certificateName,
- @Nullable @PayloadParam("attributes") CertificateAttributes attributes,
- @Nullable @PayloadParam("tags") Map<String, String> tags, @PayloadParam("x5c") List<String> value);
-
- @Named("certificate:get_operation")
- @GET
- @Path("/certificates/{certificateName}/pending")
- @Fallback(NullOnNotFoundOr404.class)
- @OAuthResource("https://vault.azure.net")
- CertificateOperation getCertificateOperation(@EndpointParam URI vaultBaseUrl,
- @PathParam("certificateName") String certificateName);
-
- @Named("certificate:update_operation")
- @PATCH
- @Path("/certificates/{certificateName}/pending")
- @MapBinder(BindToJsonPayload.class)
- @OAuthResource("https://vault.azure.net")
- CertificateOperation updateCertificateOperation(@EndpointParam URI vaultBaseUrl,
- @PathParam("certificateName") String certificateName,
- @PayloadParam("cancellation_requested") boolean cancellationRequested);
-
- @Named("certificate:delete_operation")
- @DELETE
- @Path("/certificates/{certificateName}/pending")
- @Fallback(NullOnNotFoundOr404.class)
- @OAuthResource("https://vault.azure.net")
- CertificateOperation deleteCertificateOperation(@EndpointParam URI vaultBaseUrl,
- @PathParam("certificateName") String certificateName);
-
- @Named("certificate:set_issuer")
- @PUT
- @Path("/certificates/issuers/{issuerName}")
- @MapBinder(BindToJsonPayload.class)
- @OAuthResource("https://vault.azure.net")
- IssuerBundle setCertificateIssuer(@EndpointParam URI vaultBaseUrl, @PathParam("issuerName") String issuerName,
- @Nullable @PayloadParam("attributes") IssuerAttributes attributes,
- @Nullable @PayloadParam("credentials") IssuerCredentials credentials,
- @Nullable @PayloadParam("org_details") OrganizationDetails orgDetails,
- @PayloadParam("provider") String provider);
-
- @Named("certificate:get_issuers")
- @GET
- @SelectJson("value")
- @Path("/certificates/issuers")
- @Fallback(EmptyListOnNotFoundOr404.class)
- @OAuthResource("https://vault.azure.net")
- List<CertificateIssuer> getCertificateIssuers(@EndpointParam URI vaultBaseUrl);
-
- @Named("certificate:get_issuer")
- @GET
- @Path("/certificates/issuers/{issuerName}")
- @Fallback(NullOnNotFoundOr404.class)
- @OAuthResource("https://vault.azure.net")
- IssuerBundle getCertificateIssuer(@EndpointParam URI vaultBaseUrl, @PathParam("issuerName") String issuerName);
-
- @Named("certificate:update_issuer")
- @PATCH
- @Path("/certificates/issuers/{issuerName}")
- @MapBinder(BindToJsonPayload.class)
- @OAuthResource("https://vault.azure.net")
- IssuerBundle updateCertificateIssuer(@EndpointParam URI vaultBaseUrl, @PathParam("issuerName") String issuerName,
- @Nullable @PayloadParam("attributes") IssuerAttributes attributes,
- @Nullable @PayloadParam("credentials") IssuerCredentials credentials,
- @Nullable @PayloadParam("org_details") OrganizationDetails orgDetails,
- @PayloadParam("provider") String provider);
-
- @Named("certificate:delete_issuer")
- @DELETE
- @Path("/certificates/issuers/{issuerName}")
- @Fallback(NullOnNotFoundOr404.class)
- @OAuthResource("https://vault.azure.net")
- IssuerBundle deleteCertificateIssuer(@EndpointParam URI vaultBaseUrl, @PathParam("issuerName") String issuerName);
-
- @Named("certificate:get_contacts")
- @GET
- @Path("/certificates/contacts")
- @Fallback(NullOnNotFoundOr404.class)
- @OAuthResource("https://vault.azure.net")
- Contacts getCertificateContacts(@EndpointParam URI vaultBaseUrl);
-
- @Named("certificate:set_contacts")
- @PUT
- @Path("/certificates/contacts")
- @MapBinder(BindToJsonPayload.class)
- @OAuthResource("https://vault.azure.net")
- Contacts setCertificateContacts(@EndpointParam URI vaultBaseUrl, @PayloadParam("contacts") List<Contact> contacts);
-
- @Named("certificate:delete_contacts")
- @DELETE
- @Path("/certificates/contacts")
- @Fallback(NullOnNotFoundOr404.class)
- @OAuthResource("https://vault.azure.net")
- Contacts deleteCertificateContacts(@EndpointParam URI vaultBaseUrl);
-
- @Named("certificate:get_policy")
- @GET
- @Path("/certificates/{certificateName}/policy")
- @Fallback(NullOnNotFoundOr404.class)
- @OAuthResource("https://vault.azure.net")
- CertificatePolicy getCertificatePolicy(@EndpointParam URI vaultBaseUrl,
- @PathParam("certificateName") String certificateName);
-
- @Named("certificate:update_policy")
- @PATCH
- @MapBinder(BindToJsonPayload.class)
- @Path("/certificates/{certificateName}/policy")
- @OAuthResource("https://vault.azure.net")
- CertificatePolicy updateCertificatePolicy(@EndpointParam URI vaultBaseUrl,
- @PathParam("certificateName") String certificateName,
- @Nullable @PayloadParam("attributes") CertificateAttributes attributes,
- @Nullable @PayloadParam("issuer") IssuerParameters issuer,
- @Nullable @PayloadParam("key_props") KeyProperties keyProps,
- @Nullable @PayloadParam("lifetime_actions") List<LifetimeAction> lifetimeActions,
- @Nullable @PayloadParam("secret_props") SecretProperties secretProps,
- @Nullable @PayloadParam("x509_props") X509CertificateProperties x509Props);
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/VirtualMachineApi.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/VirtualMachineApi.java
deleted file mode 100644
index 39ed860..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/VirtualMachineApi.java
+++ /dev/null
@@ -1,140 +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.net.URI;
-import java.util.List;
-import java.util.Map;
-
-import javax.inject.Named;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.Fallbacks;
-import org.jclouds.azurecompute.arm.domain.Plan;
-import org.jclouds.azurecompute.arm.domain.VirtualMachine;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineInstance;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineProperties;
-import org.jclouds.azurecompute.arm.filters.ApiVersionFilter;
-import org.jclouds.azurecompute.arm.functions.URIParser;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.oauth.v2.filters.OAuthFilter;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.MapBinder;
-import org.jclouds.rest.annotations.Payload;
-import org.jclouds.rest.annotations.PayloadParam;
-import org.jclouds.rest.annotations.QueryParams;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.ResponseParser;
-import org.jclouds.rest.annotations.SelectJson;
-import org.jclouds.rest.binders.BindToJsonPayload;
-
-/**
- * The Virtual Machine API includes operations for managing the virtual machines in your subscription.
- *
- * @see <a href="https://docs.microsoft.com/en-us/rest/api/compute/virtualmachines/virtualmachines-rest-api">docs</a>
- */
-@Path("/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines")
-@RequestFilters({ OAuthFilter.class, ApiVersionFilter.class })
-@Consumes(MediaType.APPLICATION_JSON)
-public interface VirtualMachineApi {
-
- @Named("GetVirtualMachine")
- @GET
- @Path("/{name}")
- @Fallback(Fallbacks.NullOnNotFoundOr404.class)
- VirtualMachine get(@PathParam("name") String name);
-
- /**
- * Get information about the model view and instance view of a virtual machine
- */
- @Named("GetVirtualMachineInstance")
- @GET
- @Path("/{name}/instanceView")
- @Fallback(Fallbacks.NullOnNotFoundOr404.class)
- VirtualMachineInstance getInstanceDetails(@PathParam("name") String name);
-
- @Named("CreateOrUpdateVirtualMachine")
- @PUT
- @MapBinder(BindToJsonPayload.class)
- @Path("/{vmname}")
- @QueryParams(keys = "validating", values = "false")
- VirtualMachine createOrUpdate(@PathParam("vmname") String vmname,
- @PayloadParam("location") String location,
- @PayloadParam("properties") VirtualMachineProperties properties,
- @PayloadParam("tags") Map<String, String> tags,
- @Nullable @PayloadParam("plan") Plan plan);
-
- @Named("ListVirtualMachines")
- @GET
- @SelectJson("value")
- @Fallback(Fallbacks.EmptyListOnNotFoundOr404.class)
- List<VirtualMachine> list();
-
- @Named("DeleteVirtualMachine")
- @DELETE
- @Path("/{name}")
- @ResponseParser(URIParser.class)
- @Fallback(Fallbacks.NullOnNotFoundOr404.class)
- URI delete(@PathParam("name") String name);
-
- @Named("RestartVirtualMachine")
- @POST
- @Path("/{name}/restart")
- void restart(@PathParam("name") String name);
-
- @Named("StartVirtualMachine")
- @POST
- @Path("/{name}/start")
- void start(@PathParam("name") String name);
-
- @Named("StopVirtualMachine")
- @POST
- @Path("/{name}/powerOff")
- void stop(@PathParam("name") String name);
-
- @Named("generalize")
- @POST
- @Path("/{name}/generalize")
- void generalize(@PathParam("name") String name);
-
- /**
- * Capture the virtual machine image
- * destinationContainerName: the name of the folder created under the "system" container in the storage account
- * Folder structure: Microsoft.Computer > Images > destinationContainerName
- * Within the folder, there will be 1 page blob for the osDisk vhd and 1 block blob for the vmTemplate json file
- */
- @Named("capture")
- @POST
- @Payload("%7B\"vhdPrefix\":\"{vhdPrefix}\",\"destinationContainerName\":\"{destinationContainerName}\",\"overwriteVhds\":\"true\"%7D")
- @Path("/{name}/capture")
- @ResponseParser(URIParser.class)
- @Fallback(Fallbacks.NullOnNotFoundOr404.class)
- @Produces(MediaType.APPLICATION_JSON)
- URI capture(@PathParam("name") String name,
- @PayloadParam("vhdPrefix") String vhdPrefix,
- @PayloadParam("destinationContainerName") String destinationContainerName);
-
-}
-
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/VirtualMachineScaleSetApi.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/VirtualMachineScaleSetApi.java
deleted file mode 100644
index f6a237f..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/VirtualMachineScaleSetApi.java
+++ /dev/null
@@ -1,88 +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 org.jclouds.Fallbacks.EmptyListOnNotFoundOr404;
-import org.jclouds.Fallbacks.NullOnNotFoundOr404;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineScaleSet;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineScaleSetProperties;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineScaleSetSKU;
-import org.jclouds.azurecompute.arm.filters.ApiVersionFilter;
-import org.jclouds.azurecompute.arm.functions.URIParser;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.oauth.v2.filters.OAuthFilter;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.SelectJson;
-import org.jclouds.rest.annotations.PayloadParam;
-import org.jclouds.rest.annotations.MapBinder;
-import org.jclouds.rest.annotations.ResponseParser;
-import org.jclouds.rest.binders.BindToJsonPayload;
-
-import javax.inject.Named;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.PUT;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.core.MediaType;
-import java.io.Closeable;
-import java.net.URI;
-import java.util.List;
-import java.util.Map;
-
-/**
- * The Virtual Machine Scale Set API includes operations for managing the virtual machines in your subscription.
- *
- * @see <a href="https://docs.microsoft.com/en-us/rest/api/virtualmachinescalesets/">docs</a>
- */
-@Path("/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/VirtualMachineScaleSets")
-@RequestFilters({OAuthFilter.class, ApiVersionFilter.class})
-@Consumes(MediaType.APPLICATION_JSON)
-public interface VirtualMachineScaleSetApi extends Closeable {
-
- @Named("virtualmachinescaleset:list")
- @GET
- @SelectJson("value")
- @Fallback(EmptyListOnNotFoundOr404.class)
- List<VirtualMachineScaleSet> list();
-
- @Named("virtualmachinescaleset:get")
- @Path("/{name}")
- @GET
- @Fallback(NullOnNotFoundOr404.class)
- VirtualMachineScaleSet get(@PathParam("name") String name);
-
- @Named("virtualmachinescaleset:createOrUpdate")
- @MapBinder(BindToJsonPayload.class)
- @Path("/{name}")
- @PUT
- VirtualMachineScaleSet createOrUpdate(@PathParam("name") String name,
- @PayloadParam("location") String location,
- @PayloadParam("sku") VirtualMachineScaleSetSKU sku,
- @Nullable @PayloadParam("tags") Map<String, String> tags,
- @PayloadParam("properties") VirtualMachineScaleSetProperties properties);
-
- @Named("virtualmachinescaleset:delete")
- @Path("/{name}")
- @DELETE
- @ResponseParser(URIParser.class)
- @Fallback(NullOnNotFoundOr404.class)
- URI delete(@PathParam("name") String name);
-
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/VirtualNetworkApi.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/VirtualNetworkApi.java
deleted file mode 100644
index a4237ff..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/VirtualNetworkApi.java
+++ /dev/null
@@ -1,76 +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 javax.inject.Named;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.Fallbacks.EmptyListOnNotFoundOr404;
-import org.jclouds.Fallbacks.NullOnNotFoundOr404;
-import org.jclouds.azurecompute.arm.domain.VirtualNetwork;
-import org.jclouds.azurecompute.arm.filters.ApiVersionFilter;
-import org.jclouds.azurecompute.arm.functions.FalseOn204;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.oauth.v2.filters.OAuthFilter;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.MapBinder;
-import org.jclouds.rest.annotations.PayloadParam;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.ResponseParser;
-import org.jclouds.rest.annotations.SelectJson;
-import org.jclouds.rest.binders.BindToJsonPayload;
-
-@Path("/resourcegroups/{resourcegroup}/providers/Microsoft.Network/virtualNetworks")
-@RequestFilters({ OAuthFilter.class, ApiVersionFilter.class })
-@Consumes(MediaType.APPLICATION_JSON)
-public interface VirtualNetworkApi {
-
- @Named("virtualnetwork:list")
- @SelectJson("value")
- @GET
- @Fallback(EmptyListOnNotFoundOr404.class)
- List<VirtualNetwork> list();
-
- @Named("virtualnetwork:create_or_update")
- @Path("/{virtualnetworkname}")
- @MapBinder(BindToJsonPayload.class)
- @PUT
- VirtualNetwork createOrUpdate(@PathParam("virtualnetworkname") String virtualnetworkname,
- @PayloadParam("location") String location,
- @Nullable @PayloadParam("tags") Map<String, String> tags,
- @PayloadParam("properties")VirtualNetwork.VirtualNetworkProperties properties);
-
- @Named("virtualnetwork:get")
- @Path("/{virtualnetworkname}")
- @GET
- @Fallback(NullOnNotFoundOr404.class)
- VirtualNetwork get(@PathParam("virtualnetworkname") String virtualnetworkname);
-
- @Named("virtualnetwork:delete")
- @Path("/{virtualnetworkname}")
- @DELETE
- @ResponseParser(FalseOn204.class)
- boolean delete(@PathParam("virtualnetworkname") String virtualnetworkname);
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/filters/ApiVersionFilter.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/filters/ApiVersionFilter.java
deleted file mode 100644
index 904c2e8..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/filters/ApiVersionFilter.java
+++ /dev/null
@@ -1,90 +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.filters;
-
-import static com.google.common.base.Preconditions.checkArgument;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.API_VERSION_PREFIX;
-import static org.jclouds.util.Maps2.transformKeys;
-import static org.jclouds.util.Predicates2.startsWith;
-
-import java.util.Map;
-
-import javax.inject.Inject;
-
-import org.jclouds.http.HttpException;
-import org.jclouds.http.HttpRequest;
-import org.jclouds.http.HttpRequestFilter;
-import org.jclouds.rest.config.InvocationConfig;
-import org.jclouds.rest.internal.GeneratedHttpRequest;
-
-import com.google.common.base.Function;
-import com.google.common.base.Predicate;
-import com.google.common.reflect.Invokable;
-
-/**
- * Allow users to customize the api versions for each method call.
- * <p>
- * In Azure ARM, each method may have its own api version. This filter allows to
- * configure the versions of each method, so there is no need to change the code
- * when Azure deprecates old versions.
- */
-public class ApiVersionFilter implements HttpRequestFilter {
-
- private final InvocationConfig config;
- private final Map<String, String> versions;
-
- @Inject
- ApiVersionFilter(InvocationConfig config, Function<Predicate<String>, Map<String, String>> filterStringsBoundByName) {
- this.config = config;
- this.versions = versions(filterStringsBoundByName);
- }
-
- @Override
- public HttpRequest filter(HttpRequest request) throws HttpException {
- checkArgument(request instanceof GeneratedHttpRequest,
- "This filter can only be applied to GeneratedHttpRequest objects");
- GeneratedHttpRequest generatedRequest = (GeneratedHttpRequest) request;
-
- // Look if there is a custom api version for the current method
- String commandName = config.getCommandName(generatedRequest.getInvocation());
- String customApiVersion = versions.get(commandName);
-
- if (customApiVersion == null) {
- // No custom config for the specific method. Let's look for custom
- // config for the class
- Invokable<?, ?> invoked = generatedRequest.getInvocation().getInvokable();
- String className = invoked.getOwnerType().getRawType().getSimpleName();
- customApiVersion = versions.get(className);
- }
-
- if (customApiVersion != null) {
- return request.toBuilder().replaceQueryParam("api-version", customApiVersion).build();
- }
-
- return request;
- }
-
- private static Map<String, String> versions(Function<Predicate<String>, Map<String, String>> filterStringsBoundByName) {
- Map<String, String> stringBoundWithApiVersionPrefix = filterStringsBoundByName
- .apply(startsWith(API_VERSION_PREFIX));
- return transformKeys(stringBoundWithApiVersionPrefix, new Function<String, String>() {
- public String apply(String input) {
- return input.replaceFirst(API_VERSION_PREFIX, "");
- }
- });
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/functions/FalseOn204.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/functions/FalseOn204.java
deleted file mode 100644
index 6b73260..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/functions/FalseOn204.java
+++ /dev/null
@@ -1,40 +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.functions;
-import com.google.common.base.Function;
-import org.jclouds.http.HttpResponse;
-
-import javax.inject.Singleton;
-
-import static org.jclouds.http.HttpUtils.releasePayload;
-/**
- * Parses an http response code from http responser
- */
-@Singleton
-public class FalseOn204 implements Function<HttpResponse, Boolean> {
- public Boolean apply(final HttpResponse from) {
- releasePayload(from);
- final int statusCode = from.getStatusCode();
- if (statusCode == 200 || statusCode == 202) {
- return true;
- }
- if (statusCode == 204) {
- return false;
- }
- throw new IllegalStateException("not expected response from: " + from);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/functions/ParseJobStatus.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/functions/ParseJobStatus.java
deleted file mode 100644
index 045431c..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/functions/ParseJobStatus.java
+++ /dev/null
@@ -1,51 +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.functions;
-import com.google.common.base.Function;
-import org.jclouds.azurecompute.arm.util.GetEnumValue;
-import org.jclouds.http.HttpResponse;
-
-import javax.inject.Singleton;
-/**
- * Parses job status from http response
- */
-@Singleton
-public class ParseJobStatus implements Function<HttpResponse, ParseJobStatus.JobStatus> {
- public enum JobStatus {
-
- DONE,
- IN_PROGRESS,
- FAILED,
- NO_CONTENT,
- UNRECOGNIZED;
-
- public static JobStatus fromValue(final String text) {
- return (JobStatus) GetEnumValue.fromValueOrDefault(text, JobStatus.UNRECOGNIZED);
- }
- }
- public JobStatus apply(final HttpResponse from) {
- if (from.getStatusCode() == 202 ){
- return JobStatus.IN_PROGRESS;
- } else if (from.getStatusCode() == 204) {
- return JobStatus.NO_CONTENT;
- } else if (from.getStatusCode() == 200 ){
- return JobStatus.DONE;
- } else {
- return JobStatus.FAILED;
- }
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/functions/StatusCodeParser.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/functions/StatusCodeParser.java
deleted file mode 100644
index 4c14ec2..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/functions/StatusCodeParser.java
+++ /dev/null
@@ -1,38 +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.functions;
-import com.google.common.base.Function;
-import org.jclouds.http.HttpResponse;
-
-import javax.inject.Singleton;
-
-import static org.jclouds.http.HttpUtils.releasePayload;
-
-/**
- * Parses an http response code from http responser
- */
-@Singleton
-public class StatusCodeParser implements Function<HttpResponse, String> {
- public String apply(final HttpResponse from) {
- releasePayload(from);
- final String statusCode = Integer.toString(from.getStatusCode());
- if (statusCode != null) {
- return statusCode;
- }
- throw new IllegalStateException("did not receive RequestId in: " + from);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/functions/URIParser.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/functions/URIParser.java
deleted file mode 100644
index f67e7e2..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/functions/URIParser.java
+++ /dev/null
@@ -1,40 +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.functions;
-import java.net.URI;
-
-import javax.inject.Singleton;
-
-import org.jclouds.http.HttpResponse;
-
-import com.google.common.base.Function;
-/**
- * Parses job status from http response
- */
-@Singleton
-public class URIParser implements Function<HttpResponse, URI> {
- public URI apply(final HttpResponse from) {
- if (from.getStatusCode() == 202 && from.getHeaders().containsKey("Location")){
- String uri = from.getFirstHeaderOrNull("Location");
- return URI.create(uri);
-
- } else if (from.getStatusCode() == 200 || from.getStatusCode() == 204){
- return null;
- }
- throw new IllegalStateException("did not receive expected response code and header in: " + from);
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/handlers/AzureComputeErrorHandler.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/handlers/AzureComputeErrorHandler.java
deleted file mode 100644
index 8492d51..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/handlers/AzureComputeErrorHandler.java
+++ /dev/null
@@ -1,93 +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.handlers;
-
-import java.io.IOException;
-
-import javax.inject.Singleton;
-
-import org.jclouds.azurecompute.arm.exceptions.AzureComputeRateLimitExceededException;
-import org.jclouds.http.HttpCommand;
-import org.jclouds.http.HttpErrorHandler;
-import org.jclouds.http.HttpResponse;
-import org.jclouds.http.HttpResponseException;
-import org.jclouds.rest.AuthorizationException;
-import org.jclouds.rest.ResourceNotFoundException;
-import org.jclouds.util.Closeables2;
-import org.jclouds.util.Strings2;
-
-/**
- * This will parse and set an appropriate exception on the command object.
- */
-@Singleton
-public class AzureComputeErrorHandler implements HttpErrorHandler {
-
- @Override
- public void handleError(final HttpCommand command, final HttpResponse response) {
- // it is important to always read fully and close streams
- String message = parseMessage(response);
- Exception exception = message == null
- ? new HttpResponseException(command, response)
- : new HttpResponseException(command, response, message);
- try {
- message = message == null
- ? String.format("%s -> %s", command.getCurrentRequest().getRequestLine(), response.getStatusLine())
- : message;
- switch (response.getStatusCode()) {
- case 400:
- if (message.contains("unauthorized_client")) {
- exception = new AuthorizationException(message, exception);
- }
- else {
- exception = new IllegalArgumentException(message, exception);
- }
- break;
- case 401:
- case 403:
- exception = new AuthorizationException(message, exception);
- break;
-
- case 404:
- if (!command.getCurrentRequest().getMethod().equals("DELETE")) {
- exception = new ResourceNotFoundException(message, exception);
- }
- break;
- case 409:
- exception = new IllegalStateException(message, exception);
- break;
- case 429:
- exception = new AzureComputeRateLimitExceededException(response, exception);
- break;
- default:
- }
- } finally {
- Closeables2.closeQuietly(response.getPayload());
- command.setException(exception);
- }
- }
-
- public String parseMessage(final HttpResponse response) {
- if (response.getPayload() == null) {
- return null;
- }
- try {
- return Strings2.toStringAndClose(response.getPayload().openStream());
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/handlers/AzureRateLimitRetryHandler.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/handlers/AzureRateLimitRetryHandler.java
deleted file mode 100644
index ee5f5e5..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/handlers/AzureRateLimitRetryHandler.java
+++ /dev/null
@@ -1,39 +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.handlers;
-
-import javax.inject.Singleton;
-
-import org.jclouds.http.HttpCommand;
-import org.jclouds.http.HttpResponse;
-import org.jclouds.http.handlers.RateLimitRetryHandler;
-
-import com.google.common.annotations.Beta;
-import com.google.common.base.Optional;
-import com.google.common.net.HttpHeaders;
-
-@Beta
-@Singleton
-public class AzureRateLimitRetryHandler extends RateLimitRetryHandler {
-
- @Override
- protected Optional<Long> millisToNextAvailableRequest(HttpCommand command, HttpResponse response) {
- String secondsToNextAvailableRequest = response.getFirstHeaderOrNull(HttpHeaders.RETRY_AFTER);
- return secondsToNextAvailableRequest != null ? Optional.of(Long.valueOf(secondsToNextAvailableRequest) * 1000)
- : Optional.<Long> absent();
- }
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/util/GetEnumValue.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/util/GetEnumValue.java
deleted file mode 100644
index f42bad3..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/util/GetEnumValue.java
+++ /dev/null
@@ -1,35 +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.util;
-
-import java.util.EnumSet;
-
-public class GetEnumValue {
-
- public static <T extends Enum<T>> Enum<T> fromValueOrDefault(String text, Enum<T> defaultValue) {
- if (text != null) {
- EnumSet<T> elements = EnumSet.allOf(defaultValue.getDeclaringClass());
- for (Enum<T> element : elements) {
- if (text.equalsIgnoreCase(element.name())) {
- return element;
- }
- }
- }
- return defaultValue;
- }
-
-}
diff --git a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/util/VMImages.java b/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/util/VMImages.java
deleted file mode 100644
index 238832e..0000000
--- a/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/util/VMImages.java
+++ /dev/null
@@ -1,27 +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.util;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-public class VMImages {
-
- public static boolean isCustom(String imageId) {
- return checkNotNull(imageId, "id").split("/").length == 3;
- }
-
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/AzureComputeProviderMetadataTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/AzureComputeProviderMetadataTest.java
deleted file mode 100644
index 2003f9a..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/AzureComputeProviderMetadataTest.java
+++ /dev/null
@@ -1,28 +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;
-
-import org.jclouds.providers.internal.BaseProviderMetadataTest;
-import org.testng.annotations.Test;
-
-@Test(groups = "unit", testName = "AzureManagementProviderMetadataTest")
-public class AzureComputeProviderMetadataTest extends BaseProviderMetadataTest {
-
- public AzureComputeProviderMetadataTest() {
- super(new AzureComputeProviderMetadata(), new AzureManagementApiMetadata());
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/compute/AzureComputeServiceLiveTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/compute/AzureComputeServiceLiveTest.java
deleted file mode 100644
index 46f4ed4..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/compute/AzureComputeServiceLiveTest.java
+++ /dev/null
@@ -1,121 +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.compute;
-
-import static org.jclouds.azurecompute.arm.compute.options.AzureTemplateOptions.Builder.resourceGroup;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.TIMEOUT_RESOURCE_DELETED;
-import static org.testng.Assert.assertTrue;
-
-import java.net.URI;
-import java.util.Properties;
-
-import org.jclouds.azurecompute.arm.AzureComputeApi;
-import org.jclouds.azurecompute.arm.AzureComputeProviderMetadata;
-import org.jclouds.azurecompute.arm.internal.AzureLiveTestUtils;
-import org.jclouds.compute.domain.Template;
-import org.jclouds.compute.domain.TemplateBuilder;
-import org.jclouds.compute.internal.BaseComputeServiceLiveTest;
-import org.jclouds.logging.config.LoggingModule;
-import org.jclouds.logging.slf4j.config.SLF4JLoggingModule;
-import org.jclouds.providers.ProviderMetadata;
-import org.jclouds.scriptbuilder.domain.Statement;
-import org.jclouds.scriptbuilder.domain.Statements;
-import org.jclouds.scriptbuilder.statements.java.InstallJDK;
-import org.jclouds.scriptbuilder.statements.login.AdminAccess;
-import org.jclouds.sshj.config.SshjSshClientModule;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Predicate;
-import com.google.inject.Key;
-import com.google.inject.Module;
-import com.google.inject.TypeLiteral;
-import com.google.inject.name.Names;
-
-/**
- * Live tests for the {@link org.jclouds.compute.ComputeService} integration.
- */
-@Test(groups = "live", singleThreaded = true, testName = "AzureComputeServiceLiveTest")
-public class AzureComputeServiceLiveTest extends BaseComputeServiceLiveTest {
-
- private Predicate<URI> resourceDeleted;
- private String resourceGroupName;
-
- public AzureComputeServiceLiveTest() {
- provider = "azurecompute-arm";
- resourceGroupName = getClass().getSimpleName().toLowerCase();
- }
-
- @Override
- public void initializeContext() {
- super.initializeContext();
- resourceDeleted = context.utils().injector().getInstance(Key.get(new TypeLiteral<Predicate<URI>>() {
- }, Names.named(TIMEOUT_RESOURCE_DELETED)));
- }
-
- @Override
- @AfterClass(groups = "live", alwaysRun = true)
- protected void tearDownContext() {
- try {
- URI uri = view.unwrapApi(AzureComputeApi.class).getResourceGroupApi().delete(resourceGroupName);
- if (uri != null) {
- assertTrue(resourceDeleted.apply(uri),
- String.format("Resource %s was not terminated in the configured timeout", uri));
- }
- } finally {
- super.tearDownContext();
- }
- }
-
- @Override
- protected LoggingModule getLoggingModule() {
- return new SLF4JLoggingModule();
- }
-
- @Override
- protected Module getSshModule() {
- return new SshjSshClientModule();
- }
-
- @Override
- protected ProviderMetadata createProviderMetadata() {
- return AzureComputeProviderMetadata.builder().build();
- }
-
- @Override
- protected Properties setupProperties() {
- Properties properties = super.setupProperties();
- AzureLiveTestUtils.defaultProperties(properties);
- setIfTestSystemPropertyPresent(properties, "oauth.endpoint");
- return properties;
- }
-
- @Override
- protected TemplateBuilder templateBuilder() {
- return super.templateBuilder().options(
- resourceGroup(resourceGroupName).authorizePublicKey(keyPair.get("public")).overrideLoginPrivateKey(
- keyPair.get("private")));
- }
-
- @Override
- protected Template addRunScriptToTemplate(Template template) {
- template.getOptions().runScript(
- Statements.newStatementList(new Statement[] { AdminAccess.standard(), Statements.exec("sleep 50"),
- InstallJDK.fromOpenJDK() }));
- return template;
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/compute/AzureTemplateBuilderLiveTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/compute/AzureTemplateBuilderLiveTest.java
deleted file mode 100644
index b00aa05..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/compute/AzureTemplateBuilderLiveTest.java
+++ /dev/null
@@ -1,80 +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.compute;
-
-import static org.jclouds.compute.util.ComputeServiceUtils.getCores;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-
-import java.io.IOException;
-import java.util.Properties;
-import java.util.Set;
-
-import org.jclouds.azurecompute.arm.AzureComputeProviderMetadata;
-import org.jclouds.azurecompute.arm.domain.Region;
-import org.jclouds.azurecompute.arm.internal.AzureLiveTestUtils;
-import org.jclouds.compute.domain.OsFamily;
-import org.jclouds.compute.domain.Template;
-import org.jclouds.compute.internal.BaseTemplateBuilderLiveTest;
-import org.jclouds.providers.ProviderMetadata;
-import org.jclouds.sshj.config.SshjSshClientModule;
-import org.testng.annotations.Test;
-
-import com.google.inject.Module;
-
-@Test(groups = "live", testName = "AzureTemplateBuilderLiveTest")
-public class AzureTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTest {
-
- public AzureTemplateBuilderLiveTest() {
- provider = "azurecompute-arm";
- }
-
- @Override
- protected Module getSshModule() {
- return new SshjSshClientModule();
- }
-
- @Override
- protected ProviderMetadata createProviderMetadata() {
- return AzureComputeProviderMetadata.builder().build();
- }
-
- @Override
- protected Properties setupProperties() {
- Properties properties = super.setupProperties();
- AzureLiveTestUtils.defaultProperties(properties);
- setIfTestSystemPropertyPresent(properties, "oauth.endpoint");
- return properties;
- }
-
- @Override
- @Test
- public void testDefaultTemplateBuilder() throws IOException {
- Template defaultTemplate = view.getComputeService().templateBuilder().build();
- assertTrue(defaultTemplate.getImage().getOperatingSystem().getVersion().matches("1[456]\\.[01][04](\\.[0-9])?-LTS"),
- "Version mismatch, expected dd.dd(.d)?-LTS, found: "
- + defaultTemplate.getImage().getOperatingSystem().getVersion());
- assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true);
- assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU);
- assertEquals(getCores(defaultTemplate.getHardware()), 1.0d);
- }
-
- @Override
- protected Set<String> getIso3166Codes() {
- return Region.iso3166Codes();
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/compute/extensions/AzureComputeImageExtensionLiveTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/compute/extensions/AzureComputeImageExtensionLiveTest.java
deleted file mode 100644
index 885269d..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/compute/extensions/AzureComputeImageExtensionLiveTest.java
+++ /dev/null
@@ -1,128 +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.compute.extensions;
-
-import static org.jclouds.azurecompute.arm.compute.options.AzureTemplateOptions.Builder.resourceGroup;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.TIMEOUT_RESOURCE_DELETED;
-import static org.jclouds.compute.options.RunScriptOptions.Builder.wrapInInitScript;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-
-import java.net.URI;
-import java.util.Map;
-import java.util.Properties;
-
-import org.jclouds.azurecompute.arm.AzureComputeApi;
-import org.jclouds.azurecompute.arm.AzureComputeProviderMetadata;
-import org.jclouds.azurecompute.arm.internal.AzureLiveTestUtils;
-import org.jclouds.compute.ComputeTestUtils;
-import org.jclouds.compute.domain.ExecResponse;
-import org.jclouds.compute.domain.NodeMetadata;
-import org.jclouds.compute.domain.TemplateBuilder;
-import org.jclouds.compute.extensions.internal.BaseImageExtensionLiveTest;
-import org.jclouds.domain.Location;
-import org.jclouds.providers.ProviderMetadata;
-import org.jclouds.sshj.config.SshjSshClientModule;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Predicate;
-import com.google.inject.Key;
-import com.google.inject.Module;
-import com.google.inject.TypeLiteral;
-import com.google.inject.name.Names;
-
-/**
- * Live tests for the {@link org.jclouds.compute.extensions.ImageExtension}
- * integration.
- */
-@Test(groups = "live", singleThreaded = true, testName = "AzureComputeImageExtensionLiveTest")
-public class AzureComputeImageExtensionLiveTest extends BaseImageExtensionLiveTest {
-
- private Predicate<URI> resourceDeleted;
- private String resourceGroupName;
-
- public AzureComputeImageExtensionLiveTest() {
- provider = "azurecompute-arm";
- resourceGroupName = getClass().getSimpleName().toLowerCase();
- }
-
- @BeforeClass(groups = { "integration", "live" })
- public void setupContext() {
- super.setupContext();
- resourceDeleted = context.utils().injector().getInstance(Key.get(new TypeLiteral<Predicate<URI>>() {
- }, Names.named(TIMEOUT_RESOURCE_DELETED)));
- createResourceGroup(resourceGroupName);
- }
-
- @AfterClass(groups = { "integration", "live" })
- @Override
- protected void tearDownContext() {
- try {
- URI uri = view.unwrapApi(AzureComputeApi.class).getResourceGroupApi().delete(resourceGroupName);
- if (uri != null) {
- assertTrue(resourceDeleted.apply(uri),
- String.format("Resource %s was not terminated in the configured timeout", uri));
- }
- } finally {
- super.tearDownContext();
- }
- }
-
- @Override
- protected void prepareNodeBeforeCreatingImage(NodeMetadata node) {
- // Don't wrap in the init-script, since the comand will clear the user
- // config, and jclouds won't be able to execute more than one command
- // (won't be able to poll for the execution status of the command when
- // running with the init-script)
- ExecResponse result = view.getComputeService().runScriptOnNode(node.getId(), "waagent -deprovision+user -force",
- wrapInInitScript(false));
- assertEquals(result.getExitStatus(), 0);
- }
-
- @Override
- protected Module getSshModule() {
- return new SshjSshClientModule();
- }
-
- @Override
- protected Properties setupProperties() {
- Properties properties = super.setupProperties();
- AzureLiveTestUtils.defaultProperties(properties);
- setIfTestSystemPropertyPresent(properties, "oauth.endpoint");
- return properties;
- }
-
- @Override
- protected ProviderMetadata createProviderMetadata() {
- return AzureComputeProviderMetadata.builder().build();
- }
-
- @Override
- public TemplateBuilder getNodeTemplate() {
- Map<String, String> keyPair = ComputeTestUtils.setupKeyPair();
- return super.getNodeTemplate().options(
- resourceGroup(resourceGroupName).authorizePublicKey(keyPair.get("public")).overrideLoginPrivateKey(
- keyPair.get("private")));
- }
-
- private void createResourceGroup(String name) {
- Location location = getNodeTemplate().build().getLocation();
- view.unwrapApi(AzureComputeApi.class).getResourceGroupApi().create(name, location.getId(), null);
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/compute/extensions/AzureComputeSecurityGroupExtensionLiveTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/compute/extensions/AzureComputeSecurityGroupExtensionLiveTest.java
deleted file mode 100644
index 153df29..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/compute/extensions/AzureComputeSecurityGroupExtensionLiveTest.java
+++ /dev/null
@@ -1,177 +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.compute.extensions;
-
-import static com.google.common.collect.Iterables.get;
-import static com.google.common.collect.Iterables.getOnlyElement;
-import static org.jclouds.azurecompute.arm.compute.options.AzureTemplateOptions.Builder.resourceGroup;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.TIMEOUT_RESOURCE_DELETED;
-import static org.jclouds.compute.predicates.NodePredicates.inGroup;
-import static org.jclouds.net.domain.IpProtocol.TCP;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
-
-import java.net.URI;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.ExecutionException;
-
-import org.jclouds.azurecompute.arm.AzureComputeApi;
-import org.jclouds.azurecompute.arm.AzureComputeProviderMetadata;
-import org.jclouds.azurecompute.arm.compute.options.AzureTemplateOptions;
-import org.jclouds.azurecompute.arm.internal.AzureLiveTestUtils;
-import org.jclouds.compute.ComputeService;
-import org.jclouds.compute.RunNodesException;
-import org.jclouds.compute.domain.NodeMetadata;
-import org.jclouds.compute.domain.SecurityGroup;
-import org.jclouds.compute.domain.Template;
-import org.jclouds.compute.extensions.SecurityGroupExtension;
-import org.jclouds.compute.extensions.internal.BaseSecurityGroupExtensionLiveTest;
-import org.jclouds.domain.Location;
-import org.jclouds.net.domain.IpPermission;
-import org.jclouds.net.util.IpPermissions;
-import org.jclouds.providers.ProviderMetadata;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Optional;
-import com.google.common.base.Predicate;
-import com.google.inject.Key;
-import com.google.inject.TypeLiteral;
-import com.google.inject.name.Names;
-
-/**
- * Live test for AzureCompute
- * {@link org.jclouds.compute.extensions.SecurityGroupExtension} implementation.
- */
-@Test(groups = "live", singleThreaded = true, testName = "AzureComputeSecurityGroupExtensionLiveTest")
-public class AzureComputeSecurityGroupExtensionLiveTest extends BaseSecurityGroupExtensionLiveTest {
-
- private Predicate<URI> resourceDeleted;
- private String resourceGroupName;
-
- public AzureComputeSecurityGroupExtensionLiveTest() {
- provider = "azurecompute-arm";
- resourceGroupName = "sgelivetest";
- }
-
- @BeforeClass(groups = { "integration", "live" })
- public void setupContext() {
- super.setupContext();
- resourceDeleted = context.utils().injector().getInstance(Key.get(new TypeLiteral<Predicate<URI>>() {
- }, Names.named(TIMEOUT_RESOURCE_DELETED)));
- createResourceGroup(resourceGroupName);
- }
-
- @Test(groups = { "integration", "live" }, singleThreaded = true, dependsOnMethods = "testAddIpPermissionsFromSpec")
- public void testAddIpPermissionForAnyProtocol() {
- ComputeService computeService = view.getComputeService();
- Optional<SecurityGroupExtension> securityGroupExtension = computeService.getSecurityGroupExtension();
- assertTrue(securityGroupExtension.isPresent(), "security group extension was not present");
-
- SecurityGroup group = securityGroupExtension.get().getSecurityGroupById(groupId);
- assertNotNull(group, "No security group was found with id: " + groupId);
-
- IpPermission openAll = IpPermissions.permitAnyProtocol();
- SecurityGroup allOpenSecurityGroup = securityGroupExtension.get().addIpPermission(openAll, group);
-
- assertTrue(allOpenSecurityGroup.getIpPermissions().contains(openAll));
- }
-
- @Test(groups = { "integration", "live" }, dependsOnMethods = "testCreateSecurityGroup")
- public void testCreateNodeWithSecurityGroup() throws RunNodesException, InterruptedException, ExecutionException {
- ComputeService computeService = view.getComputeService();
- Optional<SecurityGroupExtension> securityGroupExtension = computeService.getSecurityGroupExtension();
- assertTrue(securityGroupExtension.isPresent(), "security group extension was not present");
-
- NodeMetadata node = getOnlyElement(computeService.createNodesInGroup(nodeGroup, 1,
- options().securityGroups(groupId)));
-
- try {
- Set<SecurityGroup> groups = securityGroupExtension.get().listSecurityGroupsForNode(node.getId());
- assertEquals(groups.size(), 1, "node has " + groups.size() + " groups");
- assertEquals(getOnlyElement(groups).getId(), groupId);
- } finally {
- computeService.destroyNodesMatching(inGroup(node.getGroup()));
- }
- }
-
- @Test(groups = { "integration", "live" }, dependsOnMethods = "testCreateSecurityGroup")
- public void testCreateNodeWithInboundPorts() throws RunNodesException, InterruptedException, ExecutionException {
- ComputeService computeService = view.getComputeService();
- Optional<SecurityGroupExtension> securityGroupExtension = computeService.getSecurityGroupExtension();
- assertTrue(securityGroupExtension.isPresent(), "security group extension was not present");
-
- NodeMetadata node = getOnlyElement(computeService.createNodesInGroup(nodeGroup, 1,
- options().inboundPorts(22, 23, 24, 8000)));
-
- try {
- Set<SecurityGroup> groups = securityGroupExtension.get().listSecurityGroupsForNode(node.getId());
- assertEquals(groups.size(), 1, "node has " + groups.size() + " groups");
-
- SecurityGroup group = getOnlyElement(groups);
- assertEquals(group.getIpPermissions().size(), 2);
- assertEquals(get(group.getIpPermissions(), 0), IpPermissions.permit(TCP).fromPort(22).to(24));
- assertEquals(get(group.getIpPermissions(), 1), IpPermissions.permit(TCP).port(8000));
- } finally {
- computeService.destroyNodesMatching(inGroup(node.getGroup()));
- }
- }
-
- @AfterClass(groups = { "integration", "live" })
- @Override
- protected void tearDownContext() {
- try {
- URI uri = view.unwrapApi(AzureComputeApi.class).getResourceGroupApi().delete(resourceGroupName);
- if (uri != null) {
- assertTrue(resourceDeleted.apply(uri),
- String.format("Resource %s was not terminated in the configured timeout", uri));
- }
- } finally {
- super.tearDownContext();
- }
- }
-
- @Override
- protected Properties setupProperties() {
- Properties properties = super.setupProperties();
- AzureLiveTestUtils.defaultProperties(properties);
- setIfTestSystemPropertyPresent(properties, "oauth.endpoint");
- return properties;
- }
-
- @Override
- protected ProviderMetadata createProviderMetadata() {
- return AzureComputeProviderMetadata.builder().build();
- }
-
- private AzureTemplateOptions options() {
- return resourceGroup(resourceGroupName);
- }
-
- @Override
- public Template getNodeTemplate() {
- return view.getComputeService().templateBuilder().options(options()).build();
- }
-
- private void createResourceGroup(String name) {
- Location location = getNodeTemplate().getLocation();
- view.unwrapApi(AzureComputeApi.class).getResourceGroupApi().create(name, location.getId(), null);
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/compute/strategy/CreateResourcesThenCreateNodesTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/compute/strategy/CreateResourcesThenCreateNodesTest.java
deleted file mode 100644
index 45c56a3..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/compute/strategy/CreateResourcesThenCreateNodesTest.java
+++ /dev/null
@@ -1,116 +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.compute.strategy;
-
-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.features.PublicIPAddressApi;
-import org.jclouds.azurecompute.arm.features.SubnetApi;
-import org.jclouds.util.PasswordGenerator;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-
-import static org.easymock.EasyMock.anyObject;
-import static org.easymock.EasyMock.createMock;
-import static org.easymock.EasyMock.expect;
-import static org.easymock.EasyMock.replay;
-import static org.easymock.EasyMock.verify;
-import static org.testng.Assert.assertEquals;
-
-@Test(groups = "unit", testName = "CreateResourcesThenCreateNodesTest")
-public class CreateResourcesThenCreateNodesTest {
-
- @Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = "The options.networks and options.ipOptions are exclusive")
- public void testNormalizeNetworkOptionsWithConflictingConfig() {
- AzureTemplateOptions options = new AzureTemplateOptions();
- options.ipOptions(IpOptions.builder().subnet(netResource("/virtualNetworks/vn/subnets/foo")).build());
- options.networks(netResource("/virtualNetworks/vn/subnets/bar"));
- strategy(null).normalizeNetworkOptions(options);
- }
-
- @Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = "The allocateNewPublicIps and publicIpId are exclusive")
- public void testNormalizeNetworkOptionsExclusivePublicIps() {
- AzureTemplateOptions options = new AzureTemplateOptions();
- options.ipOptions(IpOptions.builder().subnet(netResource("/virtualNetworks/vn/subnets/foo"))
- .allocateNewPublicIp(true).publicIpId(netResource("/publicIPAddresses/pub")).build());
- strategy(null).normalizeNetworkOptions(options);
- }
-
- public void testPortableNetworkOptions() {
- AzureComputeApi api = createMock(AzureComputeApi.class);
- SubnetApi subnetApi = createMock(SubnetApi.class);
-
- expect(api.getSubnetApi(anyObject(String.class), anyObject(String.class))).andReturn(subnetApi).times(2);
- expect(subnetApi.get(anyObject(String.class))).andReturn(Subnet.builder().build()).times(2);
- replay(api, subnetApi);
-
- AzureTemplateOptions options = new AzureTemplateOptions();
- options.networks(netResource("/virtualNetworks/vn/subnets/foo"), netResource("/virtualNetworks/vn/subnets/bar"));
- strategy(api).normalizeNetworkOptions(options);
-
- assertEquals(options.getIpOptions(), ImmutableList.of(
- IpOptions.builder().subnet(netResource("/virtualNetworks/vn/subnets/foo")).allocateNewPublicIp(true).build(),
- IpOptions.builder().subnet(netResource("/virtualNetworks/vn/subnets/bar")).allocateNewPublicIp(true).build())
- );
-
- // Verify that the code has validated that the subnets exist
- verify(api, subnetApi);
- }
-
- public void testProviderSpecificNetworkOptions() {
- AzureComputeApi api = createMock(AzureComputeApi.class);
- SubnetApi subnetApi = createMock(SubnetApi.class);
- PublicIPAddressApi publicIpApi = createMock(PublicIPAddressApi.class);
-
- expect(api.getSubnetApi(anyObject(String.class), anyObject(String.class))).andReturn(subnetApi).times(2);
- expect(api.getPublicIPAddressApi(anyObject(String.class))).andReturn(publicIpApi);
- expect(subnetApi.get(anyObject(String.class))).andReturn(Subnet.builder().build()).times(2);
- expect(publicIpApi.get(anyObject(String.class))).andReturn(mockAddress());
- replay(api, subnetApi, publicIpApi);
-
- IpOptions publicOpts = IpOptions.builder().subnet(netResource("/virtualNetworks/vn/subnets/foo"))
- .publicIpId(netResource("/publicIPAddresses/pub")).address("10.0.0.2").build();
- IpOptions privateOpts = IpOptions.builder().subnet(netResource("/virtualNetworks/vn/subnets/bar")).build();
-
- AzureTemplateOptions options = new AzureTemplateOptions();
- options.ipOptions(publicOpts, privateOpts);
- strategy(api).normalizeNetworkOptions(options);
-
- assertEquals(options.getIpOptions(), ImmutableList.of(publicOpts, privateOpts));
-
- // Verify that the code has validated that the subnets exist
- verify(api, subnetApi, publicIpApi);
- }
-
- private static CreateResourcesThenCreateNodes strategy(AzureComputeApi api) {
- return new CreateResourcesThenCreateNodes(null, null, null, null, null, api, null, null, null, null, new PasswordGenerator().lower());
- }
-
- private static String netResource(String resource) {
- return "/subscriptions/subs/resourceGroups/rg/providers/Microsoft.Network" + resource;
- }
-
- private static PublicIPAddress mockAddress() {
- return PublicIPAddress.builder().name("name").id("id").etag("etag").location("location")
- .properties(PublicIPAddressProperties.builder().publicIPAllocationMethod("Dynamic").build()).build();
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/config/ParseTenantIdTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/config/ParseTenantIdTest.java
deleted file mode 100644
index 5894505..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/config/ParseTenantIdTest.java
+++ /dev/null
@@ -1,50 +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.config;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.fail;
-
-import org.testng.annotations.Test;
-
-@Test(groups = "unit", testName = "ParseTenantIdTest")
-public class ParseTenantIdTest {
-
- @Test
- public void testParseTenantId() {
- AzureComputeHttpApiModule module = new AzureComputeHttpApiModule();
-
- assertEquals(module.provideTenant("https://login.microsoftonline.com/tenantId/oauth2/token"), "tenantId");
- assertEquals(module.provideTenant("https://login.microsoft.com/tenant2/oauth2/token"), "tenant2");
-
- assertInvalid(module, "https://login.microsoftonline.com/a/b/c/oauth2/token");
- assertInvalid(module, "https://login.microsoft.com/a/b/c/oauth2/token");
- assertInvalid(module, "https://login.microsoftonline.com//oauth2/token");
- assertInvalid(module, "https://login.microsoft.com//oauth2/token");
- assertInvalid(module, "https://login.microsoftabc.com/tenant/oauth2/token");
- }
-
- private static void assertInvalid(AzureComputeHttpApiModule module, String endpoint) {
- try {
- module.provideTenant(endpoint);
- fail("Expected an IllegalArgumentException for endpoint: " + endpoint);
- } catch (IllegalArgumentException ex) {
- assertEquals(ex.getMessage(), "Could not parse tenantId from: " + endpoint);
- }
- }
-
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/domain/IdReferenceTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/domain/IdReferenceTest.java
deleted file mode 100644
index e2a56e1..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/domain/IdReferenceTest.java
+++ /dev/null
@@ -1,63 +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 static org.jclouds.azurecompute.arm.domain.IdReference.extractName;
-import static org.jclouds.azurecompute.arm.domain.IdReference.extractResourceGroup;
-import static org.testng.Assert.assertEquals;
-
-import org.testng.annotations.Test;
-
-@Test(groups = "unit", testName = "IdReferenceTest")
-public class IdReferenceTest {
-
- @Test
- public void testExtractResourceGroup() {
- assertEquals(extractResourceGroup(null), null);
- assertEquals(extractResourceGroup(""), null);
- assertEquals(
- extractResourceGroup("/subscriptions/subscription/resourceGroups/jclouds-northeurope/providers/Microsoft.Compute/virtualMachines/resources-8c5"),
- "jclouds-northeurope");
- assertEquals(extractResourceGroup("/subscriptions/subscription/resourceGroups/jclouds-west"), "jclouds-west");
- assertEquals(extractResourceGroup("/resourceGroups/jclouds-west2"), "jclouds-west2");
- assertEquals(
- extractResourceGroup("/resourceGroups/jclouds-northeurope2/providers/Microsoft.Compute/virtualMachines/resources-8c5"),
- "jclouds-northeurope2");
- assertEquals(extractResourceGroup("resourceGroups/jclouds-west2"), null);
- assertEquals(
- extractResourceGroup("resourceGroups/jclouds-northeurope2/providers/Microsoft.Compute/virtualMachines/resources-8c5"),
- null);
- assertEquals(
- extractResourceGroup("/subscriptions/subscription/providers/Microsoft.Compute/virtualMachines/resources-8c5"),
- null);
- assertEquals(
- extractResourceGroup("/subscriptions/subscription/resourceGroups//jclouds-northeurope/providers/Microsoft.Compute/virtualMachines/resources-8c5"),
- null);
- }
-
- @Test
- public void testExtractName() {
- assertEquals(extractName(null), null);
- assertEquals(extractName(""), "");
- assertEquals(extractName("foo"), "foo");
- assertEquals(extractName("/foo/bar"), "bar");
- assertEquals(extractName("/foo/bar/"), "bar");
- assertEquals(extractName("/foo/bar////"), "bar");
- assertEquals(extractName("/foo///bar////"), "bar");
- assertEquals(extractName("////bar"), "bar");
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/domain/SubnetTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/domain/SubnetTest.java
deleted file mode 100644
index a5ef44c..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/domain/SubnetTest.java
+++ /dev/null
@@ -1,47 +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 static org.testng.Assert.assertEquals;
-import static org.testng.Assert.fail;
-
-import org.testng.annotations.Test;
-
-@Test(groups = "unit", testName = "SubnetTest")
-public class SubnetTest {
-
- @Test
- public void testExtractVirtualNetwork() {
-
- assertEquals(Subnet.builder().build().virtualNetwork(), null);
- assertEquals(
- Subnet.builder()
- .id("/subscriptions/subscription/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vn/subnets/subnet")
- .build().virtualNetwork(), "vn");
- assertInvalidId("/subscriptions/subscription/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks");
- assertInvalidId("virtualNetworks/vn");
- }
-
- private static void assertInvalidId(String id) {
- try {
- Subnet.builder().id(id).build().virtualNetwork();
- fail("The given ID " + id + "should not match a valid virtual network");
- } catch (IllegalStateException ex) {
- // Expected
- }
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/AvailabilitySetApiLiveTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/AvailabilitySetApiLiveTest.java
deleted file mode 100644
index 2b9e30a..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/AvailabilitySetApiLiveTest.java
+++ /dev/null
@@ -1,105 +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 static com.google.common.collect.Iterables.any;
-import static org.jclouds.azurecompute.arm.domain.AvailabilitySet.AvailabilitySetType.MANAGED;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertNull;
-import static org.testng.Assert.assertTrue;
-
-import java.net.URI;
-import java.util.UUID;
-
-import org.jclouds.azurecompute.arm.domain.AvailabilitySet;
-import org.jclouds.azurecompute.arm.domain.AvailabilitySet.AvailabilitySetProperties;
-import org.jclouds.azurecompute.arm.domain.AvailabilitySet.SKU;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiLiveTest;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Predicate;
-import com.google.common.collect.ImmutableMap;
-
-@Test(groups = "live", testName = "AvailabilitySetApiLiveTest", singleThreaded = true)
-public class AvailabilitySetApiLiveTest extends BaseAzureComputeApiLiveTest {
-
- private String asName;
-
- @BeforeClass
- @Override
- public void setup() {
- super.setup();
- createTestResourceGroup();
- asName = "jclouds-" + RAND;
- }
-
- @Test
- public void deleteAvailabilitySetDoesNotExist() {
- assertNull(api().delete(UUID.randomUUID().toString()));
- }
-
- @Test
- public void createAvailabilitySet() {
- AvailabilitySetProperties props = AvailabilitySetProperties.builder().platformUpdateDomainCount(2)
- .platformFaultDomainCount(3).build();
- AvailabilitySet as = api().createOrUpdate(asName, SKU.create(MANAGED), LOCATION, null, props);
-
- assertNotNull(as);
- assertEquals(as.name(), asName);
-
- assertNotNull(as.sku());
- assertEquals(as.sku().type(), MANAGED);
- }
-
- @Test(dependsOnMethods = "createAvailabilitySet")
- public void getAvailabilitySet() {
- assertNotNull(api().get(asName));
- }
-
- @Test(dependsOnMethods = "createAvailabilitySet")
- public void listAvailabilitySet() {
- assertTrue(any(api().list(), new Predicate<AvailabilitySet>() {
- @Override
- public boolean apply(AvailabilitySet input) {
- return asName.equals(input.name());
- }
- }));
- }
-
- @Test(dependsOnMethods = "createAvailabilitySet")
- public void updateAvailabilitySet() {
- AvailabilitySet as = api().get(asName);
- as = api().createOrUpdate(asName, SKU.create(MANAGED), LOCATION, ImmutableMap.of("foo", "bar"), as.properties());
-
- assertNotNull(as);
- assertTrue(as.tags().containsKey("foo"));
- assertEquals(as.tags().get("foo"), "bar");
- }
-
- @Test(dependsOnMethods = { "getAvailabilitySet", "listAvailabilitySet", "updateAvailabilitySet" })
- public void deleteAvailabilitySet() {
- URI uri = api().delete(asName);
- assertResourceDeleted(uri);
- }
-
- private AvailabilitySetApi api() {
- return api.getAvailabilitySetApi(resourceGroupName);
- }
-
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/AvailabilitySetApiMockTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/AvailabilitySetApiMockTest.java
deleted file mode 100644
index 430c32f..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/AvailabilitySetApiMockTest.java
+++ /dev/null
@@ -1,155 +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 static com.google.common.collect.Iterables.isEmpty;
-import static org.jclouds.azurecompute.arm.domain.AvailabilitySet.AvailabilitySetType.MANAGED;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertNull;
-import static org.testng.Assert.assertTrue;
-
-import java.net.URI;
-import java.util.List;
-
-import org.jclouds.azurecompute.arm.domain.AvailabilitySet;
-import org.jclouds.azurecompute.arm.domain.AvailabilitySet.AvailabilitySetProperties;
-import org.jclouds.azurecompute.arm.domain.AvailabilitySet.SKU;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiMockTest;
-import org.testng.annotations.Test;
-
-@Test(groups = "unit", testName = "AvailabilitySetApiMockTest", singleThreaded = true)
-public class AvailabilitySetApiMockTest extends BaseAzureComputeApiMockTest {
-
- private final String subscriptionid = "SUBSCRIPTIONID";
- private final String resourcegroup = "myresourcegroup";
- private final String asName = "myas";
- private final String apiVersion = "api-version=2016-04-30-preview";
-
- public void createAvailabilitySet() throws InterruptedException {
-
- server.enqueue(jsonResponse("/availabilitysetcreate.json").setResponseCode(200));
-
- AvailabilitySetApi asApi = api.getAvailabilitySetApi(resourcegroup);
-
- AvailabilitySetProperties props = AvailabilitySetProperties.builder().platformUpdateDomainCount(2)
- .platformFaultDomainCount(3).build();
- AvailabilitySet as = asApi.createOrUpdate(asName, SKU.create(MANAGED), "westeurope", null, props);
-
- String path = String.format(
- "/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Compute/availabilitySets/%s?%s", subscriptionid,
- resourcegroup, asName, apiVersion);
- String json = "{\"location\":\"westeurope\",\"properties\":{\"platformUpdateDomainCount\":2,\"platformFaultDomainCount\":3},\"sku\":{\"name\":\"Aligned\"}}";
- assertSent(server, "PUT", path, json);
-
- assertEquals(as.name(), asName);
- assertEquals(as.properties().platformUpdateDomainCount(), 2);
- assertEquals(as.properties().platformFaultDomainCount(), 3);
- }
-
- public void getAvailabilitySet() throws InterruptedException {
-
- server.enqueue(jsonResponse("/availabilitysetget.json").setResponseCode(200));
-
- AvailabilitySetApi asApi = api.getAvailabilitySetApi(resourcegroup);
-
- AvailabilitySet as = asApi.get(asName);
-
- String path = String.format(
- "/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Compute/availabilitySets/%s?%s", subscriptionid,
- resourcegroup, asName, apiVersion);
- assertSent(server, "GET", path);
-
- assertEquals(as.name(), asName);
- }
-
- public void getAvailabilitySet404() throws InterruptedException {
- server.enqueue(response404());
-
- AvailabilitySetApi asApi = api.getAvailabilitySetApi(resourcegroup);
-
- AvailabilitySet as = asApi.get(asName);
-
- String path = String.format(
- "/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Compute/availabilitySets/%s?%s", subscriptionid,
- resourcegroup, asName, apiVersion);
- assertSent(server, "GET", path);
-
- assertNull(as);
- }
-
- public void listAvailabilitySets() throws InterruptedException {
-
- server.enqueue(jsonResponse("/availabilitysetlist.json").setResponseCode(200));
-
- AvailabilitySetApi asApi = api.getAvailabilitySetApi(resourcegroup);
-
- List<AvailabilitySet> asList = asApi.list();
-
- String path = String.format(
- "/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Compute/availabilitySets?%s", subscriptionid,
- resourcegroup, apiVersion);
- assertSent(server, "GET", path);
-
- assertTrue(asList.size() > 0);
- }
-
- public void listAvailabilitySets404() throws InterruptedException {
- server.enqueue(response404());
-
- AvailabilitySetApi asApi = api.getAvailabilitySetApi(resourcegroup);
-
- List<AvailabilitySet> asList = asApi.list();
-
- String path = String.format(
- "/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Compute/availabilitySets?%s", subscriptionid,
- resourcegroup, apiVersion);
- assertSent(server, "GET", path);
-
- assertTrue(isEmpty(asList));
- }
-
- public void deleteAvailabilitySet() throws InterruptedException {
-
- server.enqueue(response202WithHeader());
-
- AvailabilitySetApi asApi = api.getAvailabilitySetApi(resourcegroup);
-
- URI uri = asApi.delete(asName);
- assertNotNull(uri);
-
- String path = String.format(
- "/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Compute/availabilitySets/%s?%s", subscriptionid,
- resourcegroup, asName, apiVersion);
- assertSent(server, "DELETE", path);
- }
-
- public void deleteSubnetResourceDoesNotExist() throws InterruptedException {
-
- server.enqueue(response204());
-
- AvailabilitySetApi asApi = api.getAvailabilitySetApi(resourcegroup);
-
- URI uri = asApi.delete(asName);
- assertNull(uri);
-
- String path = String.format(
- "/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Compute/availabilitySets/%s?%s", subscriptionid,
- resourcegroup, asName, apiVersion);
- assertSent(server, "DELETE", path);
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/DeploymentApiLiveTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/DeploymentApiLiveTest.java
deleted file mode 100644
index 0b9ab05..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/DeploymentApiLiveTest.java
+++ /dev/null
@@ -1,156 +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 static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertNull;
-import static org.testng.Assert.assertTrue;
-
-import java.net.URI;
-import java.util.List;
-
-import org.jclouds.azurecompute.arm.domain.Deployment;
-import org.jclouds.azurecompute.arm.domain.Deployment.ProvisioningState;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiLiveTest;
-import org.jclouds.util.Predicates2;
-import org.testng.Assert;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Predicate;
-import com.google.common.net.UrlEscapers;
-
-@Test(groups = "live", testName = "DeploymentApiLiveTest", singleThreaded = true)
-public class DeploymentApiLiveTest extends BaseAzureComputeApiLiveTest {
-
- private String deploymentName;
- private String properties;
- private String badProperties;
-
- @BeforeClass
- @Override
- public void setup() {
- super.setup();
- createTestResourceGroup();
- deploymentName = "jc" + System.currentTimeMillis();
- String storageAccountName = String.format("st%s%s", System.getProperty("user.name"), RAND);
-
- String rawtemplate = "{\"$schema\":\"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\"contentVersion\":\"1.0.0.0\",\"parameters\":{\"newStorageAccountName\":{\"type\":\"string\",\"metadata\":{\"description\":\"Name of the Storage Account\"}},\"storageAccountType\":{\"type\":\"string\",\"defaultValue\":\"Standard_LRS\",\"allowedValues\":[\"Standard_LRS\",\"Standard_GRS\",\"Standard_ZRS\"],\"metadata\":{\"description\":\"Storage Account type\"}},\"location\":{\"type\":\"string\",\"allowedValues\":[\"East US\",\"West US\",\"West Europe\",\"East Asia\",\"Southeast Asia\"],\"metadata\":{\"description\":\"Location of storage account\"}}},\"resources\":[{\"type\":\"Microsoft.Storage/storageAccounts\",\"name\":\"[parameters('newStorageAccountName')]\",\"apiVersion\":\"2015-05-01-preview\",\"location\":\"[parameters('location')]\",\"properties\":{\"accountType\":\"[parameters('storageAccountType')]\"}}]}";
- String rawparameters = "{\"newStorageAccountName\":{\"value\":\"" + storageAccountName + "\"},\"storageAccountType\":{\"value\":\"Standard_LRS\"},\"location\":{\"value\":\"West US\"}}";
- String rawbadParameters = "{\"newStorageAccountName\":{\"value\":\"" + storageAccountName + "\"},\"storageAccountType\":{\"value\":\"Standard_LRS\"},\"location\":{\"value\":\"West\"}}";
-
- properties = getPutBody(rawtemplate, "Incremental", rawparameters);
- badProperties = getPutBody(rawtemplate, "Incremental", rawbadParameters);
- }
-
- private String getPutBody(String template, String mode, String parameters) {
- String body = "{ " +
- "\"properties\" : " +
- " { " +
- " \"template\" : " + template + ", " +
- " \"mode\" : \"" + mode + "\", " +
- " \"parameters\" : " + parameters + " " +
- " } " +
- "}";
- return body;
- }
-
- @Test
- public void testValidate(){
- Deployment deploymentInvalid = null;
- try {
- deploymentInvalid = api().validate(deploymentName + "invalid", badProperties);
- } catch (Exception ex) {
- assertTrue(ex.getClass() == java.lang.IllegalArgumentException.class);
- }
- assertNull(deploymentInvalid);
-
- Deployment deploymentValid = null;
- try {
- deploymentValid = api().validate(deploymentName + "valid", properties);
- } catch (Exception ex) {
- assertTrue(ex.getClass() == java.lang.IllegalArgumentException.class);
- }
- assertNotNull(deploymentValid);
- }
-
- @Test(dependsOnMethods = "testValidate")
- public void testCreate() {
- String deploymentTemplate = UrlEscapers.urlFormParameterEscaper().escape(properties);
-
- Deployment deploymentValid = api().validate(deploymentName, deploymentTemplate);
- assertNotNull(deploymentValid);
-
- Deployment deployment = api().create(deploymentName, deploymentTemplate);
- assertNotNull(deployment);
-
- //Poll until resource is ready to be used
- boolean jobDone = Predicates2.retry(new Predicate<String>() {
- @Override
- public boolean apply(String name) {
- Deployment dp = api().get(deploymentName);
- ProvisioningState state = ProvisioningState.fromValue(dp.properties().provisioningState());
- if (state == ProvisioningState.FAILED) Assert.fail();
- return state == ProvisioningState.SUCCEEDED;
- }
- }, 60 * 20 * 1000).apply(deploymentName);
- assertTrue(jobDone, "create operation did not complete in the configured timeout");
-
- Deployment dp = api().get(deploymentName);
- ProvisioningState state = ProvisioningState.fromValue(dp.properties().provisioningState());
- assertTrue(state == ProvisioningState.SUCCEEDED);
- }
-
-
- @Test(dependsOnMethods = "testCreate")
- public void testGetDeployment() {
- Deployment deployment = api().get(deploymentName);
- assertNotNull(deployment);
- ProvisioningState state = ProvisioningState.fromValue(deployment.properties().provisioningState());
- assertTrue(state == ProvisioningState.SUCCEEDED);
- }
-
- @Test(dependsOnMethods = "testCreate")
- public void testListDeployments() {
- List<Deployment> deployments = api().list();
- assertTrue(deployments.size() > 0);
- boolean deploymentFound = false;
- for (Deployment d : deployments) {
-
- if (d.name().equals(deploymentName)) {
- deploymentFound = true;
- break;
- }
- }
- assertTrue(deploymentFound);
- }
-
- @Test(dependsOnMethods = {"testGetDeployment", "testListDeployments"})
- public void testDelete() throws Exception {
- List<Deployment> deployments = api().list();
- for (Deployment d : deployments) {
- if (d.name().contains("jc")) {
- URI uri = api().delete(d.name());
- assertResourceDeleted(uri);
- }
- }
- }
-
- private DeploymentApi api() {
- return api.getDeploymentApi(resourceGroupName);
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/DeploymentApiMockTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/DeploymentApiMockTest.java
deleted file mode 100644
index 89d6aca..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/DeploymentApiMockTest.java
+++ /dev/null
@@ -1,154 +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 org.jclouds.azurecompute.arm.domain.Deployment;
-import org.jclouds.azurecompute.arm.domain.Deployment.ProvisioningState;
-import com.squareup.okhttp.mockwebserver.MockResponse;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiMockTest;
-import org.testng.annotations.Test;
-
-import java.net.URI;
-import java.util.List;
-
-import static org.testng.Assert.assertNull;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
-import static org.testng.Assert.assertEquals;
-
-@Test(groups = "unit", testName = "DeploymentApiMockTest", singleThreaded = true)
-public class DeploymentApiMockTest extends BaseAzureComputeApiMockTest {
-
- private String subscriptionId = "SUBSCRIPTIONID";
- private String resourceGroup = "resourceGroup";
- private String deploymentName = "jcdep1458344383064";
- private String resourceName = "jcres1458344383064";
-
- private String getPutBody(String template, String mode, String parameters) {
- String body = "{ " +
- "\"properties\" : " +
- " { " +
- " \"template\" : " + template + ", " +
- " \"mode\" : \"" + mode + "\", " +
- " \"parameters\" : " + parameters + " " +
- " } " +
- "}";
- return body;
- }
-
- @Test
- public void testCreateDeployment() throws Exception {
- final DeploymentApi deploymentApi = api.getDeploymentApi(resourceGroup);
-
- // check if deployment accepted
- server.enqueue(jsonResponse("/createdeploymentaccepted.json"));
- String template = "{\"$schema\":\"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\"contentVersion\":\"1.0.0.0\",\"parameters\":{\"newStorageAccountName\":{\"type\":\"string\",\"metadata\":{\"description\":\"Name of the Storage Account\"}},\"storageAccountType\":{\"type\":\"string\",\"defaultValue\":\"Standard_LRS\",\"allowedValues\":[\"Standard_LRS\",\"Standard_GRS\",\"Standard_ZRS\"],\"metadata\":{\"description\":\"Storage Account type\"}},\"location\":{\"type\":\"string\",\"allowedValues\":[\"East US\",\"West US\",\"West Europe\",\"East Asia\",\"Southeast Asia\"],\"metadata\":{\"description\":\"Location of storage account\"}}},\"resources\":[{\"type\":\"Microsoft.Storage/storageAccounts\",\"name\":\"[parameters('newStorageAccountName')]\",\"apiVersion\":\"2015-05-01-preview\",\"location\":\"[parameters('location')]\",\"properties\":{\"accountType\":\"[parameters('storageAccountType')]\"}}]}";
- String parameters = "{\"newStorageAccountName\":{\"value\":\"" + resourceName + "\"},\"storageAccountType\":{\"value\":\"Standard_LRS\"},\"location\":{\"value\":\"West US\"}}";
- String properties = getPutBody(template, "Incremental", parameters);
- Deployment deployment = deploymentApi.create(deploymentName, properties);
- assertTrue(deployment != null);
- assertEquals(ProvisioningState.fromValue(deployment.properties().provisioningState()), ProvisioningState.ACCEPTED);
-
- // check if deployment succeeded
- server.enqueue(jsonResponse("/createdeploymentsucceeded.json"));
- deployment = deploymentApi.create(deploymentName, properties);
- assertTrue(deployment != null);
- assertEquals(ProvisioningState.fromValue(deployment.properties().provisioningState()), ProvisioningState.SUCCEEDED);
- assertSent(server, "PUT", "/subscriptions/" + subscriptionId + "/resourcegroups/" + resourceGroup +
- "/providers/microsoft.resources/deployments/" + deploymentName + "?api-version=2016-02-01", properties);
- }
-
- @Test
- public void testGetDeployment() throws Exception {
- final DeploymentApi deploymentApi = api.getDeploymentApi(resourceGroup);
-
- // check if deployment succeeded
- server.enqueue(jsonResponse("/createdeploymentsucceeded.json"));
- Deployment deployment = deploymentApi.get(deploymentName);
- assertTrue(deployment != null);
- assertEquals(ProvisioningState.fromValue(deployment.properties().provisioningState()), ProvisioningState.SUCCEEDED);
- assertSent(server, "GET", "/subscriptions/" + subscriptionId + "/resourcegroups/" + resourceGroup +
- "/providers/microsoft.resources/deployments/" + deploymentName + "?api-version=2016-02-01");
- }
-
- @Test
- public void testGetDeploymentEmpty() throws Exception {
- final DeploymentApi deploymentApi = api.getDeploymentApi(resourceGroup);
-
- server.enqueue(new MockResponse().setResponseCode(404));
-
- Deployment deployment = deploymentApi.get(deploymentName);
- assertNull(deployment);
-
- assertSent(server, "GET", "/subscriptions/" + subscriptionId + "/resourcegroups/" + resourceGroup +
- "/providers/microsoft.resources/deployments/" + deploymentName + "?api-version=2016-02-01");
- }
-
- @Test
- public void testListDeployment() throws Exception {
- final DeploymentApi deploymentApi = api.getDeploymentApi(resourceGroup);
-
- // check if deployment succeeded
- server.enqueue(jsonResponse("/listdeployments.json"));
- List<Deployment> deployments = deploymentApi.list();
- assertTrue(deployments.size() > 0);
-
- assertSent(server, "GET", "/subscriptions/" + subscriptionId + "/resourcegroups/" + resourceGroup +
- "/providers/microsoft.resources/deployments?api-version=2016-02-01");
-
- }
-
- @Test
- public void testListDeploymentEmpty() throws Exception {
- final DeploymentApi deploymentApi = api.getDeploymentApi(resourceGroup);
-
- server.enqueue(new MockResponse().setResponseCode(404));
-
- List<Deployment> deployments = deploymentApi.list();
- assertTrue(deployments.size() == 0);
-
- assertSent(server, "GET", "/subscriptions/" + subscriptionId + "/resourcegroups/" + resourceGroup +
- "/providers/microsoft.resources/deployments?api-version=2016-02-01");
-
- }
-
- @Test
- public void testDeleteDeployment() throws InterruptedException {
- final DeploymentApi deploymentApi = api.getDeploymentApi(resourceGroup);
-
- server.enqueue(response202WithHeader());
-
- URI uri = deploymentApi.delete(deploymentName);
- assertNotNull(uri);
-
- assertSent(server, "DELETE", "/subscriptions/" + subscriptionId + "/resourcegroups/" + resourceGroup +
- "/providers/microsoft.resources/deployments/" + deploymentName + "?api-version=2016-02-01");
- }
-
- @Test
- public void testDeleteDeploymentReturns404() throws InterruptedException {
- final DeploymentApi deploymentApi = api.getDeploymentApi(resourceGroup);
-
- server.enqueue(response404());
-
- URI uri = deploymentApi.delete(deploymentName);
- assertNull(uri);
-
- assertSent(server, "DELETE", "/subscriptions/" + subscriptionId + "/resourcegroups/" + resourceGroup +
- "/providers/microsoft.resources/deployments/" + deploymentName + "?api-version=2016-02-01");
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/DiskApiLiveTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/DiskApiLiveTest.java
deleted file mode 100644
index f5af885..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/DiskApiLiveTest.java
+++ /dev/null
@@ -1,107 +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.net.URI;
-import java.util.List;
-import java.util.UUID;
-
-import org.jclouds.azurecompute.arm.domain.CreationData;
-import org.jclouds.azurecompute.arm.domain.Disk;
-import org.jclouds.azurecompute.arm.domain.DiskProperties;
-import org.jclouds.azurecompute.arm.domain.Provisionable;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiLiveTest;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Predicate;
-import com.google.common.base.Supplier;
-import com.google.common.collect.Iterables;
-
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertNull;
-import static org.testng.Assert.assertTrue;
-
-@Test(groups = "live", testName = "DiskApiLiveTest", singleThreaded = true)
-public class DiskApiLiveTest extends BaseAzureComputeApiLiveTest {
-
- public static final String JCLOUDS_DISK_PREFIX = "jclouds-";
- private String diskName;
-
- @BeforeClass
- @Override
- public void setup() {
- super.setup();
- createTestResourceGroup();
- diskName = JCLOUDS_DISK_PREFIX + RAND;
- }
-
- @Test
- public void deleteDiskResourceDoesNotExist() {
- assertNull(api().delete(JCLOUDS_DISK_PREFIX + UUID.randomUUID()));
- }
-
- @Test
- public void createDisk() {
- DiskProperties properties = DiskProperties.builder().creationData(CreationData.create(CreationData.CreateOptions.EMPTY)).diskSizeGB(2).build();
- Disk dataDisk = api().createOrUpdate(diskName, LOCATION, properties);
- assertTrue(waitUntilAvailable(diskName), "creation operation did not complete in the configured timeout");
- assertTrue(dataDisk.properties().diskSizeGB() == 2);
- }
-
- @Test(dependsOnMethods = "createDisk")
- public void getDisk() {
- Disk dataDisk = api().get(diskName);
- assertNotNull(dataDisk.name());
- assertTrue(dataDisk.properties().diskSizeGB() == 2);
- }
-
- @Test(dependsOnMethods = "createDisk")
- public void listDisks() {
- List<Disk> dataDisks = api().list();
- assertTrue(dataDisks.size() > 0);
- final Disk dataDisk = api().get(diskName);
-
- assertTrue(Iterables.any(dataDisks, new Predicate<Disk>() {
- @Override
- public boolean apply(Disk input) {
- return dataDisk.equals(input);
- }
- }));
- }
-
- @Test(dependsOnMethods = {"listDisks", "getDisk"}, alwaysRun = true)
- public void deleteDisk() {
- URI uri = api().delete(diskName);
- assertNotNull(uri);
- }
-
- private DiskApi api() {
- return api.getDiskApi(resourceGroupName);
- }
-
- private boolean waitUntilAvailable(final String name) {
- return resourceAvailable.apply(new Supplier<Provisionable>() {
- @Override public Provisionable get() {
- Disk disk = api().get(name);
- return disk == null ? null : disk.properties();
- }
- });
- }
-
-}
-
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/DiskApiMockTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/DiskApiMockTest.java
deleted file mode 100644
index 4c8ba2e..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/DiskApiMockTest.java
+++ /dev/null
@@ -1,141 +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.net.URI;
-import java.util.List;
-
-import org.jclouds.azurecompute.arm.domain.CreationData;
-import org.jclouds.azurecompute.arm.domain.Disk;
-import org.jclouds.azurecompute.arm.domain.DiskProperties;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiMockTest;
-import org.testng.Assert;
-import org.testng.annotations.Test;
-
-import static com.google.common.collect.Iterables.isEmpty;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNull;
-import static org.testng.Assert.assertTrue;
-
-
-@Test(groups = "unit", testName = "DiskApiMockTest", singleThreaded = true)
-public class DiskApiMockTest extends BaseAzureComputeApiMockTest {
-
- private final String subscriptionid = "SUBSCRIPTIONID";
- private final String resourcegroup = "myresourcegroup";
- private final String diskName = "myDisk";
- private final String apiVersion = "api-version=2017-03-30";
-
- public void createDisk() throws InterruptedException {
-
- server.enqueue(jsonResponse("/creatediskresponse.json").setResponseCode(200));
-
- final DiskApi diskApi = api.getDiskApi(resourcegroup);
-
- DiskProperties properties = DiskProperties.builder().diskSizeGB(2).creationData(CreationData.create(CreationData.CreateOptions.EMPTY)).build();
-
- Disk dataDisk = diskApi.createOrUpdate(diskName, "westus", properties);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Compute/disks/%s?%s", subscriptionid, resourcegroup, diskName, apiVersion);
- String json = "{\"location\":\"westus\",\"properties\":{\"diskSizeGB\":2,\"creationData\":{\"createOption\":\"Empty\"}}}";
- assertSent(server, "PUT", path, json);
-
- assertEquals(dataDisk.properties().provisioningState(), "Updating");
- assertTrue(dataDisk.properties().diskSizeGB() == 2);
- }
-
- public void getDisk() throws InterruptedException {
-
- server.enqueue(jsonResponse("/getdisk.json").setResponseCode(200));
-
- final DiskApi diskApi = api.getDiskApi(resourcegroup);
-
- Disk dataDisk = diskApi.get(diskName);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Compute/disks/%s?%s", subscriptionid, resourcegroup, diskName, apiVersion);
- assertSent(server, "GET", path);
-
- assertEquals(dataDisk.name(), diskName);
- assertTrue(dataDisk.properties().diskSizeGB() == 2);
- }
-
- public void getDiskReturns404() throws InterruptedException {
- server.enqueue(response404());
-
- final DiskApi diskApi = api.getDiskApi(resourcegroup);
-
- Disk dataDisk = diskApi.get(diskName);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Compute/disks/%s?%s", subscriptionid, resourcegroup, diskName, apiVersion);
- assertSent(server, "GET", path);
-
- assertNull(dataDisk);
- }
-
- public void listDisks() throws InterruptedException {
-
- server.enqueue(jsonResponse("/listdisks.json").setResponseCode(200));
-
- final DiskApi diskApi = api.getDiskApi(resourcegroup);
-
- List<Disk> dataDisks = diskApi.list();
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Compute/disks?%s", subscriptionid, resourcegroup, apiVersion);
- assertSent(server, "GET", path);
-
- assertTrue(dataDisks.size() > 0);
- }
-
- public void listDisksReturns404() throws InterruptedException {
- server.enqueue(response404());
-
- final DiskApi diskApi = api.getDiskApi(resourcegroup);
-
- List<Disk> dataDisks = diskApi.list();
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Compute/disks?%s", subscriptionid, resourcegroup, apiVersion);
- assertSent(server, "GET", path);
-
- assertTrue(isEmpty(dataDisks));
- }
-
- public void deleteDisk() throws InterruptedException {
-
- server.enqueue(response202WithHeader());
-
- final DiskApi diskApi = api.getDiskApi(resourcegroup);
-
- URI uri = diskApi.delete(diskName);
- Assert.assertNotNull(uri);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Compute/disks/%s?%s", subscriptionid, resourcegroup, diskName, apiVersion);
- assertSent(server, "DELETE", path);
- }
-
- public void deleteDiskResourceDoesNotExist() throws InterruptedException {
-
- server.enqueue(response204());
-
- final DiskApi diskApi = api.getDiskApi(resourcegroup);
-
- URI uri = diskApi.delete(diskName);
- assertNull(uri);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Compute/disks/%s?%s", subscriptionid, resourcegroup, diskName, apiVersion);
- assertSent(server, "DELETE", path);
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/GraphRBACApiLiveTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/GraphRBACApiLiveTest.java
deleted file mode 100644
index ca6ce5e..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/GraphRBACApiLiveTest.java
+++ /dev/null
@@ -1,39 +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 static org.testng.Assert.assertEquals;
-
-import org.jclouds.azurecompute.arm.domain.ServicePrincipal;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiLiveTest;
-import org.testng.annotations.Test;
-
-@Test(groups = "live", testName = "GraphRBACApiLiveTest", singleThreaded = true)
-public class GraphRBACApiLiveTest extends BaseAzureComputeApiLiveTest {
-
- @Test
- public void testGetCurrentServicePrincipalSupplier() {
- ServicePrincipal currentUser = api.getServicePrincipal().get();
- assertEquals(currentUser.appId(), identity);
- }
-
- @Test
- public void testGetCurrentServicePrincipal() {
- ServicePrincipal currentUser = api.getGraphRBACApi().getCurrentServicePrincipal();
- assertEquals(currentUser.appId(), identity);
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/GraphRBACApiMockTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/GraphRBACApiMockTest.java
deleted file mode 100644
index 20b95e2..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/GraphRBACApiMockTest.java
+++ /dev/null
@@ -1,39 +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 static org.testng.Assert.assertEquals;
-
-import java.io.IOException;
-
-import org.jclouds.azurecompute.arm.domain.ServicePrincipal;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiMockTest;
-import org.testng.annotations.Test;
-
-@Test(groups = "unit", testName = "GraphRBACApiMockTest", singleThreaded = true)
-public class GraphRBACApiMockTest extends BaseAzureComputeApiMockTest {
-
- public void testGetCurrentServicePrincipal() throws IOException, InterruptedException {
- server.enqueue(jsonResponse("/serviceprincipals.json"));
-
- ServicePrincipal sp = api.getGraphRBACApi().getCurrentServicePrincipal();
-
- assertEquals(sp.appId(), "applicationId");
- assertSent(server, "GET", "/graphrbac/tenant-id/servicePrincipals?$filter=appId%20eq%20%27mock%27&api-version=1.6");
- }
-
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/ImageApiLiveTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/ImageApiLiveTest.java
deleted file mode 100644
index 15231fd..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/ImageApiLiveTest.java
+++ /dev/null
@@ -1,155 +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 static com.google.common.base.Preconditions.checkNotNull;
-import static com.google.common.collect.Iterables.any;
-import static com.google.common.collect.Iterables.getOnlyElement;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.TIMEOUT_RESOURCE_DELETED;
-import static org.jclouds.compute.predicates.NodePredicates.inGroup;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertNull;
-import static org.testng.Assert.assertTrue;
-import static org.jclouds.azurecompute.arm.compute.options.AzureTemplateOptions.Builder.resourceGroup;
-import java.net.URI;
-import java.util.Properties;
-
-import org.jclouds.azurecompute.arm.AzureComputeApi;
-import org.jclouds.azurecompute.arm.domain.IdReference;
-import org.jclouds.azurecompute.arm.domain.Image;
-import org.jclouds.azurecompute.arm.domain.ImageProperties;
-import org.jclouds.azurecompute.arm.internal.AzureLiveTestUtils;
-import org.jclouds.compute.RunNodesException;
-import org.jclouds.compute.domain.NodeMetadata;
-import org.jclouds.compute.internal.BaseComputeServiceContextLiveTest;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Predicate;
-import com.google.inject.Key;
-import com.google.inject.TypeLiteral;
-import com.google.inject.name.Names;
-
-// We extend the BaseComputeServiceContextLiveTest to create nodes using the abstraction, which is much easier
-@Test(groups = "live", singleThreaded = true, testName = "ImageApiLiveTest")
-public class ImageApiLiveTest extends BaseComputeServiceContextLiveTest {
-
- private static final String imageName = "imageFromRest";
-
- private Predicate<URI> resourceDeleted;
- private AzureComputeApi api;
-
- private String location;
- private ImageApi imageApi;
- private Image image;
-
- private String group;
-
- public ImageApiLiveTest() {
- provider = "azurecompute-arm";
- group = getClass().getSimpleName().toLowerCase();
- }
-
- @Override
- protected Properties setupProperties() {
- Properties properties = super.setupProperties();
- AzureLiveTestUtils.defaultProperties(properties);
- checkNotNull(setIfTestSystemPropertyPresent(properties, "oauth.endpoint"), "test.oauth.endpoint");
- return properties;
- }
-
- @Override
- protected void initializeContext() {
- super.initializeContext();
- resourceDeleted = context.utils().injector().getInstance(Key.get(new TypeLiteral<Predicate<URI>>() {
- }, Names.named(TIMEOUT_RESOURCE_DELETED)));
- api = view.unwrapApi(AzureComputeApi.class);
- }
-
- @Override
- @BeforeClass
- public void setupContext() {
- super.setupContext();
- // Use the resource name conventions used in the abstraction
- location = view.getComputeService().templateBuilder().build().getLocation().getId();
- view.unwrapApi(AzureComputeApi.class).getResourceGroupApi().create(group, location, null);
- imageApi = api.getVirtualMachineImageApi(group);
- }
-
- @Override
- @AfterClass(alwaysRun = true)
- protected void tearDownContext() {
- try {
- view.getComputeService().destroyNodesMatching(inGroup(group));
- } finally {
- try {
- URI uri = api.getResourceGroupApi().delete(group);
- assertResourceDeleted(uri);
- } finally {
- super.tearDownContext();
- }
- }
- }
-
- @Test
- public void testDeleteImageDoesNotExist() {
- assertNull(imageApi.delete("notAnImage"));
- }
-
- @Test
- public void testCreateImage() throws RunNodesException {
- NodeMetadata node = getOnlyElement(view.getComputeService().createNodesInGroup(group, 1, resourceGroup(group)));
- IdReference vmIdRef = IdReference.create(node.getProviderId());
- view.getComputeService().suspendNode(node.getId());
-
- api.getVirtualMachineApi(group).generalize(node.getName());
-
- image = imageApi.createOrUpdate(imageName, location, ImageProperties.builder()
- .sourceVirtualMachine(vmIdRef).build());
- assertNotNull(image);
- }
-
- @Test(dependsOnMethods = "testCreateImage")
- public void testListImages() {
- // Check that the image we've just created exists
- assertTrue(any(imageApi.list(), new Predicate<Image>() {
- @Override
- public boolean apply(Image input) {
- return image.name().equals(input.name());
- }
- }));
- }
-
- @Test(dependsOnMethods = "testCreateImage")
- public void testGetImage() {
- assertNotNull(imageApi.get(imageName));
- }
-
- @Test(dependsOnMethods = { "testCreateImage", "testListImages", "testGetImage" }, alwaysRun = true)
- public void deleteImage() {
- assertResourceDeleted(imageApi.delete(imageName));
- }
-
- private void assertResourceDeleted(final URI uri) {
- if (uri != null) {
- assertTrue(resourceDeleted.apply(uri),
- String.format("Resource %s was not deleted in the configured timeout", uri));
- }
- }
-
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/ImageApiMockTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/ImageApiMockTest.java
deleted file mode 100644
index cec0483..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/ImageApiMockTest.java
+++ /dev/null
@@ -1,155 +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 static com.google.common.collect.Iterables.isEmpty;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertNull;
-import static org.testng.Assert.assertTrue;
-
-import java.net.URI;
-import java.util.List;
-
-import org.jclouds.azurecompute.arm.domain.DataDisk;
-import org.jclouds.azurecompute.arm.domain.IdReference;
-import org.jclouds.azurecompute.arm.domain.Image;
-import org.jclouds.azurecompute.arm.domain.ImageProperties;
-import org.jclouds.azurecompute.arm.domain.OSDisk;
-import org.jclouds.azurecompute.arm.domain.StorageProfile;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiMockTest;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-
-@Test(groups = "unit", testName = "ImageApiMockTest", singleThreaded = true)
-public class ImageApiMockTest extends BaseAzureComputeApiMockTest {
- private static final String subscriptionid = "SUBSCRIPTIONID";
- private static final String resourcegroup = "myresourcegroup";
- private static final String apiVersion = "api-version=2016-04-30-preview";
- private static final String imageName = "testVirtualMachineImage";
- private static final String location = "canadaeast";
-
- private static final String PATH = String
- .format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Compute/images/%s?%s", subscriptionid,
- resourcegroup, imageName, apiVersion);
-
- public void createVirtualMachineImage() throws InterruptedException {
- server.enqueue(jsonResponse("/virtualmachineimagecreate.json"));
-
- ImageApi imageApi = api.getVirtualMachineImageApi(resourcegroup);
- Image result = imageApi.createOrUpdate(imageName, location, newVirtualMachineImage().properties());
-
- assertSent(server, "PUT", PATH, "{\"location\":\"" + location + "\","
- + "\"properties\":{\"sourceVirtualMachine\":{\"id\":\"vmId\"},"
- + "\"storageProfile\":{\"osDisk\":{\"osType\":\"Linux\",\"name\":\"Ubuntu\"},\"dataDisks\":[]},"
- + "\"provisioningState\":\"Succeeded\"}}");
-
- assertEquals(result.name(), imageName);
- assertEquals(result.location(), location);
- }
-
- public void getVirtualMachineImage() throws InterruptedException {
- server.enqueue(jsonResponse("/virtualmachineimageget.json"));
-
- ImageApi imageApi = api.getVirtualMachineImageApi(resourcegroup);
- Image result = imageApi.get(imageName);
-
- assertSent(server, "GET", PATH);
-
- assertEquals(result.name(), imageName);
- assertEquals(result.location(), location);
- assertNotNull(result.properties().sourceVirtualMachine());
- assertNotNull(result.properties().storageProfile());
- }
-
- public void getVirtualMachineImageReturns404() throws InterruptedException {
- server.enqueue(response404());
-
- final ImageApi imageApi = api.getVirtualMachineImageApi(resourcegroup);
- Image result = imageApi.get(imageName);
-
- assertSent(server, "GET", PATH);
-
- assertNull(result);
- }
-
- public void listVirtualMachineImages() throws InterruptedException {
- server.enqueue(jsonResponse("/virtualmachineimagelist.json"));
-
- final ImageApi imageApi = api.getVirtualMachineImageApi(resourcegroup);
- List<Image> result = imageApi.list();
-
- assertSent(server, "GET", String
- .format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Compute/images?%s", subscriptionid,
- resourcegroup, apiVersion));
-
- assertNotNull(result);
- assertTrue(result.size() > 0);
- }
-
- public void listVirtualMachineImagesReturns404() throws InterruptedException {
- server.enqueue(response404());
-
- final ImageApi imageApi = api.getVirtualMachineImageApi(resourcegroup);
- List<Image> result = imageApi.list();
-
- assertSent(server, "GET", String
- .format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Compute/images?%s", subscriptionid,
- resourcegroup, apiVersion));
-
- assertTrue(isEmpty(result));
- }
-
- public void deleteVirtualMachineImage() throws InterruptedException {
- server.enqueue(response202WithHeader());
-
- final ImageApi imageApi = api.getVirtualMachineImageApi(resourcegroup);
- URI uri = imageApi.delete(imageName);
-
- assertSent(server, "DELETE", PATH);
-
- assertNotNull(uri);
- assertTrue(uri.toString().contains("api-version"));
- assertTrue(uri.toString().contains("operationresults"));
- }
-
- public void deleteVirtualMachineImageDoesNotExist() throws InterruptedException {
- server.enqueue(response404());
-
- final ImageApi imageApi = api.getVirtualMachineImageApi(resourcegroup);
- URI uri = imageApi.delete(imageName);
- assertNull(uri);
-
- assertSent(server, "DELETE", PATH);
- }
-
- private Image newVirtualMachineImage() {
- return Image
- .builder()
- .name(imageName)
- .location(location)
- .properties(
- ImageProperties
- .builder()
- .sourceVirtualMachine(IdReference.create("vmId"))
- .storageProfile(
- StorageProfile.create(null, OSDisk.builder().osType("Linux").name("Ubuntu").build(),
- ImmutableList.<DataDisk> of())).provisioningState("Succeeded").build()).build();
-
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/JobApiMockTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/JobApiMockTest.java
deleted file mode 100644
index 7364145..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/JobApiMockTest.java
+++ /dev/null
@@ -1,96 +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.io.IOException;
-import java.net.URI;
-import java.util.List;
-
-import org.jclouds.azurecompute.arm.domain.ResourceDefinition;
-import org.jclouds.azurecompute.arm.functions.ParseJobStatus.JobStatus;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiMockTest;
-import org.testng.annotations.Test;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-
-@Test(groups = "unit", testName = "JobApiMockTest", singleThreaded = true)
-public class JobApiMockTest extends BaseAzureComputeApiMockTest {
-
- final String requestUrl = "/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SVEVTVC1DRU5UUkFMVVMiLCJqb2JMb2NhdGlvbiI6ImNlbnRyYWx1cyJ9?api-version=2014-04-01";
-
- public void testGetJobStatus() throws IOException, InterruptedException {
- server.enqueue(response200());
-
- JobStatus status = api.getJobApi().jobStatus(URI.create(requestUrl));
-
- assertEquals(status, JobStatus.DONE);
-
- assertSent(server, "GET", requestUrl);
- }
-
- public void testGetJobStatusInProgress() throws InterruptedException {
- server.enqueue(response202WithHeader());
-
- JobStatus status = api.getJobApi().jobStatus(URI.create(requestUrl));
-
- assertEquals(status, JobStatus.IN_PROGRESS);
-
- assertSent(server, "GET", requestUrl);
- }
-
- public void testGetJobStatusNoContent() throws InterruptedException {
- server.enqueue(jsonResponse("/resourcegroup.json").setStatus("HTTP/1.1 204 No Content"));
-
- JobStatus status = api.getJobApi().jobStatus(URI.create(requestUrl));
-
- assertEquals(status, JobStatus.NO_CONTENT);
-
- assertSent(server, "GET", requestUrl);
- }
-
- public void testGetJobStatusFailed() throws InterruptedException {
- server.enqueue(jsonResponse("/resourcegroup.json").setStatus("HTTP/1.1 208 Error"));
-
- JobStatus status = api.getJobApi().jobStatus(URI.create(requestUrl));
-
- assertEquals(status, JobStatus.FAILED);
-
- assertSent(server, "GET", requestUrl);
- }
-
- public void testCaptureJobStatus() throws IOException, InterruptedException {
- server.enqueue(jsonResponse("/resourceDefinition.json").setResponseCode(200));
-
- List<ResourceDefinition> resourceDefinitionsList = api.getJobApi().captureStatus(URI.create(requestUrl));
-
- assertTrue(resourceDefinitionsList.size() > 0);
-
- assertSent(server, "GET", requestUrl);
- }
-
- public void testCaptureJobStatusFailed() throws InterruptedException {
- server.enqueue(response404());
-
- List<ResourceDefinition> resourceDefinitionsList = api.getJobApi().captureStatus(URI.create(requestUrl));
-
- assertEquals(resourceDefinitionsList.size(), 0);
-
- assertSent(server, "GET", requestUrl);
- }
-
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/LoadBalancerApiLiveTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/LoadBalancerApiLiveTest.java
deleted file mode 100644
index adcde2b..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/LoadBalancerApiLiveTest.java
+++ /dev/null
@@ -1,449 +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 static com.google.common.base.Preconditions.checkNotNull;
-import static com.google.common.base.Preconditions.checkState;
-import static com.google.common.collect.Iterables.any;
-import static com.google.common.collect.Iterables.transform;
-import static com.google.common.collect.Lists.newArrayList;
-import static org.jclouds.azurecompute.arm.compute.options.AzureTemplateOptions.Builder.availabilitySet;
-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.compute.predicates.NodePredicates.inGroup;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertNull;
-import static org.testng.Assert.assertTrue;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import org.jclouds.azurecompute.arm.AzureComputeApi;
-import org.jclouds.azurecompute.arm.compute.config.AzurePredicatesModule.PublicIpAvailablePredicateFactory;
-import org.jclouds.azurecompute.arm.compute.domain.ResourceGroupAndName;
-import org.jclouds.azurecompute.arm.domain.AvailabilitySet;
-import org.jclouds.azurecompute.arm.domain.AvailabilitySet.AvailabilitySetProperties;
-import org.jclouds.azurecompute.arm.domain.BackendAddressPool;
-import org.jclouds.azurecompute.arm.domain.BackendAddressPoolProperties;
-import org.jclouds.azurecompute.arm.domain.FrontendIPConfigurations;
-import org.jclouds.azurecompute.arm.domain.FrontendIPConfigurationsProperties;
-import org.jclouds.azurecompute.arm.domain.IdReference;
-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.internal.AzureLiveTestUtils;
-import org.jclouds.compute.RunNodesException;
-import org.jclouds.compute.domain.NodeMetadata;
-import org.jclouds.compute.internal.BaseComputeServiceContextLiveTest;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Function;
-import com.google.common.base.Predicate;
-import com.google.common.base.Supplier;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.inject.Key;
-import com.google.inject.TypeLiteral;
-import com.google.inject.name.Names;
-
-// We extend the BaseComputeServiceContextLiveTest to create nodes using the abstraction, which is much easier
-@Test(groups = "live", singleThreaded = true)
-public class LoadBalancerApiLiveTest extends BaseComputeServiceContextLiveTest {
-
- private static final String lbName = String.format("lb-%s-%s", LoadBalancerApiLiveTest.class.getSimpleName()
- .toLowerCase(), System.getProperty("user.name"));
-
- private Predicate<URI> resourceDeleted;
- private PublicIpAvailablePredicateFactory publicIpAvailable;
- private Predicate<Supplier<Provisionable>> resourceAvailable;
- private AzureComputeApi api;
-
- private String location;
- private LoadBalancerApi lbApi;
- private NetworkInterfaceCardApi nicApi;
-
- private LoadBalancer lb;
- private String group;
- private List<String> nicNames;
-
- public LoadBalancerApiLiveTest() {
- provider = "azurecompute-arm";
- group = getClass().getSimpleName().toLowerCase();
- }
-
- @Override
- protected Properties setupProperties() {
- Properties properties = super.setupProperties();
- AzureLiveTestUtils.defaultProperties(properties);
- checkNotNull(setIfTestSystemPropertyPresent(properties, "oauth.endpoint"), "test.oauth.endpoint");
- return properties;
- }
-
- @Override
- protected void initializeContext() {
- super.initializeContext();
- resourceDeleted = context.utils().injector().getInstance(Key.get(new TypeLiteral<Predicate<URI>>() {
- }, Names.named(TIMEOUT_RESOURCE_DELETED)));
- publicIpAvailable = context.utils().injector().getInstance(PublicIpAvailablePredicateFactory.class);
- resourceAvailable = context.utils().injector()
- .getInstance(Key.get(new TypeLiteral<Predicate<Supplier<Provisionable>>>() {
- }));
- api = view.unwrapApi(AzureComputeApi.class);
- }
-
- @Override
- @BeforeClass
- public void setupContext() {
- super.setupContext();
- // Use the resource name conventions used in the abstraction so the nodes
- // can see the load balancer
- location = view.getComputeService().templateBuilder().build().getLocation().getId();
- view.unwrapApi(AzureComputeApi.class).getResourceGroupApi().create(group, location, null);
- lbApi = api.getLoadBalancerApi(group);
- nicApi = api.getNetworkInterfaceCardApi(group);
- }
-
- @Override
- @AfterClass(alwaysRun = true)
- protected void tearDownContext() {
- try {
- view.getComputeService().destroyNodesMatching(inGroup(group));
- } finally {
- try {
- URI uri = api.getResourceGroupApi().delete(group);
- assertResourceDeleted(uri);
- } finally {
- super.tearDownContext();
- }
- }
- }
-
- @Test
- public void testDeleteLoadBalancerDoesNotExist() {
- URI uri = lbApi.delete(lbName);
- assertNull(uri);
- }
-
- @Test(dependsOnMethods = "testDeleteLoadBalancerDoesNotExist")
- public void testCreateLoadBalancer() {
- LoadBalancer createLB = newLoadBalancer(lbName, location);
-
- PublicIPAddress publicIP = createPublicIPAddress("Ip4LoadBalancer");
- FrontendIPConfigurationsProperties fronendProps = FrontendIPConfigurationsProperties.builder()
- .publicIPAddress(IdReference.create(publicIP.id())).build();
- FrontendIPConfigurations frontendIps = FrontendIPConfigurations.create("ipConfigs", null, fronendProps, null);
- LoadBalancerProperties props = LoadBalancerProperties.builder()
- .frontendIPConfigurations(ImmutableList.of(frontendIps)).build();
-
- lb = lbApi.createOrUpdate(lbName, createLB.location(), createLB.tags(), props);
- assertNotNull(lb);
- }
-
- @Test(dependsOnMethods = "testCreateLoadBalancer")
- public void testListLoadBalancers() {
- List<LoadBalancer> result = lbApi.list();
-
- // Verify we have something
- assertNotNull(result);
- assertTrue(result.size() > 0);
-
- // Check that the load balancer matches the one we originally passed in
- assertTrue(any(result, new Predicate<LoadBalancer>() {
- @Override
- public boolean apply(LoadBalancer input) {
- return lb.name().equals(input.name());
- }
- }));
- }
-
- @Test(dependsOnMethods = "testCreateLoadBalancer")
- public void testGetLoadBalancer() {
- lb = lbApi.get(lbName);
- assertNotNull(lb);
- }
-
- @Test(dependsOnMethods = "testGetLoadBalancer")
- public void testAddProbe() {
- ProbeProperties probeProps = ProbeProperties.builder().protocol(ProbeProperties.Protocol.Http).port(80)
- .requestPath("/").intervalInSeconds(5).numberOfProbes(2).build();
-
- Probe probe = Probe.create("probetest", null, probeProps, null);
- LoadBalancerProperties props = lb.properties().toBuilder().probes(ImmutableList.of(probe)).build();
-
- lb = updateLoadBalancer(lbName, props);
-
- assertEquals(lb.properties().probes().size(), 1);
- assertEquals(lb.properties().probes().get(0).name(), probe.name());
- }
-
- @Test(dependsOnMethods = "testGetLoadBalancer")
- public void testAddBackendPool() throws Exception {
- List<IdReference> rules = newArrayList(transform(lb.properties().loadBalancingRules(), ToIdReference));
- BackendAddressPool pool = BackendAddressPool.create("backpools", null, BackendAddressPoolProperties.builder()
- .loadBalancingRules(rules).build(), null);
-
- LoadBalancerProperties props = lb.properties().toBuilder().backendAddressPools(ImmutableList.of(pool)).build();
-
- lb = updateLoadBalancer(lbName, props);
-
- assertEquals(lb.properties().backendAddressPools().size(), 1);
- assertEquals(lb.properties().backendAddressPools().get(0).name(), pool.name());
- }
-
- @Test(dependsOnMethods = { "testAddProbe", "testAddBackendPool" })
- public void testAddLoadBalancingRule() {
- IdReference frontendIp = IdReference.create(lb.properties().frontendIPConfigurations().get(0).id());
- IdReference probe = IdReference.create(lb.properties().probes().get(0).id());
- IdReference backendPool = IdReference.create(lb.properties().backendAddressPools().get(0).id());
-
- LoadBalancingRuleProperties ruleProperties = LoadBalancingRuleProperties.builder()
- .frontendIPConfiguration(frontendIp).backendAddressPool(backendPool).frontendPort(80).backendPort(80)
- .protocol(Protocol.Tcp).probe(probe).build();
-
- LoadBalancingRule rule = LoadBalancingRule.create("lbRule1", null, ruleProperties, null);
- LoadBalancerProperties props = lb.properties().toBuilder().loadBalancingRules(ImmutableList.of(rule)).build();
-
- lb = updateLoadBalancer(lbName, props);
-
- assertEquals(lb.properties().loadBalancingRules().size(), 1);
- assertEquals(lb.properties().loadBalancingRules().get(0).name(), rule.name());
- }
-
- @Test(dependsOnMethods = { "testAddBackendPool", "testAddProbe", "testAddLoadBalancingRule" })
- public void testAttachNodesToBackendPool() throws Exception {
- nicNames = createVirtualMachinesInGroupAndGetNicRefs(group, 2);
-
- // Add the first IP of each node to the pool
- List<NetworkInterfaceCard> attachedNics = new ArrayList<NetworkInterfaceCard>();
- BackendAddressPool targetPool = lb.properties().backendAddressPools().get(0);
- for (String nicName : nicNames) {
- attachedNics.add(attachNicToBackendPool(nicName, targetPool));
- }
-
- // Refresh the LB after having attached NICs to the pool
- lb = lbApi.get(lbName);
- List<BackendAddressPool> pools = lb.properties().backendAddressPools();
- assertEquals(pools.size(), 1);
-
- List<IdReference> backendIps = pools.get(0).properties().backendIPConfigurations();
- assertEquals(backendIps.size(), attachedNics.size());
- assertTrue(backendIps.containsAll(newArrayList(transform(attachedNics, ToFirstIpReference))));
- }
-
- @Test(dependsOnMethods = "testAttachNodesToBackendPool")
- public void testAddInboundNatRule() {
- IdReference frontendIp = IdReference.create(lb.properties().frontendIPConfigurations().get(0).id());
-
- InboundNatRuleProperties natProps = InboundNatRuleProperties.builder().frontendIPConfiguration(frontendIp)
- .frontendPort(5679).backendPort(56710).protocol(Tcp).build();
-
- InboundNatRule natRule = InboundNatRule.create("inboundnat", null, natProps, null);
- LoadBalancerProperties props = lb.properties().toBuilder().inboundNatRules(ImmutableList.of(natRule)).build();
-
- lb = updateLoadBalancer(lbName, props);
-
- assertEquals(lb.properties().inboundNatRules().size(), 1);
- assertEquals(lb.properties().inboundNatRules().get(0).name(), natRule.name());
-
- InboundNatRule createdRule = lb.properties().inboundNatRules().get(0);
- NetworkInterfaceCard updatedNic = attachNicToNatRule(nicNames.get(0), createdRule);
- List<IdReference> natRulesInNic = updatedNic.properties().ipConfigurations().get(0).properties()
- .loadBalancerInboundNatRules();
-
- assertEquals(natRulesInNic.size(), 1);
- assertEquals(natRulesInNic.get(0), IdReference.create(createdRule.id()));
-
- // Refresh the LB after having attached NICs to the pool
- lb = lbApi.get(lbName);
-
- IdReference backendIpRef = IdReference.create(updatedNic.properties().ipConfigurations().get(0).id());
- assertEquals(lb.properties().inboundNatRules().size(), 1);
- assertEquals(lb.properties().inboundNatRules().get(0).properties().backendIPConfiguration(), backendIpRef);
-
- }
-
- @Test(dependsOnMethods = { "testCreateLoadBalancer", "testListLoadBalancers", "testGetLoadBalancer", "testAddProbe",
- "testAddLoadBalancingRule", "testAddBackendPool", "testAttachNodesToBackendPool", "testAddInboundNatRule" }, alwaysRun = true)
- public void deleteLoadBalancer() {
- URI uri = lbApi.delete(lbName);
- assertResourceDeleted(uri);
- }
-
- private PublicIPAddress createPublicIPAddress(final String publicIpAddressName) {
- final PublicIPAddressApi ipApi = view.unwrapApi(AzureComputeApi.class).getPublicIPAddressApi(group);
- PublicIPAddress publicIPAddress = ipApi.get(publicIpAddressName);
-
- if (publicIPAddress == null) {
- 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);
-
- checkState(publicIpAvailable.create(group).apply(publicIpAddressName),
- "Public IP was not provisioned in the configured timeout");
- }
-
- return publicIPAddress;
- }
-
- private LoadBalancer newLoadBalancer(final String lbName, final String locationName) {
- FrontendIPConfigurationsProperties frontendIPConfigurationsProperties = FrontendIPConfigurationsProperties
- .builder().build();
- FrontendIPConfigurations frontendIPConfigurations = FrontendIPConfigurations.create("ipConfigs", null,
- frontendIPConfigurationsProperties, null);
- return LoadBalancer
- .builder()
- .name(lbName)
- .location(locationName)
- .properties(
- LoadBalancerProperties.builder().frontendIPConfigurations(ImmutableList.of(frontendIPConfigurations))
- .build()).build();
- }
-
- private void assertResourceDeleted(final URI uri) {
- if (uri != null) {
- assertTrue(resourceDeleted.apply(uri),
- String.format("Resource %s was not terminated in the configured timeout", uri));
- }
- }
-
- private List<String> createVirtualMachinesInGroupAndGetNicRefs(final String group, final int count)
- throws RunNodesException {
-
- // To add multiple nodes in a LB they must belong to the same availability
- // set
- AvailabilitySetProperties props = AvailabilitySetProperties.builder().platformUpdateDomainCount(count)
- .platformFaultDomainCount(count).build();
- AvailabilitySet as = AvailabilitySet.managed().name(group).properties(props).build();
-
- Set<? extends NodeMetadata> nodes = view.getComputeService().createNodesInGroup(group, count,
- availabilitySet(as).resourceGroup(this.group));
-
- List<String> nicNames = new ArrayList<String>();
- for (NodeMetadata node : nodes) {
- ResourceGroupAndName resourceGroupAndName = ResourceGroupAndName.fromSlashEncoded(node.getId());
- VirtualMachine vm = api.getVirtualMachineApi(resourceGroupAndName.resourceGroup()).get(
- resourceGroupAndName.name());
-
- String nicName = extractName(vm.properties().networkProfile().networkInterfaces().get(0).id());
- nicNames.add(nicName);
- }
-
- return nicNames;
- }
-
- private NetworkInterfaceCard attachNicToBackendPool(final String nicName, BackendAddressPool pool) {
- List<IdReference> poolRefs = ImmutableList.of(IdReference.create(pool.id()));
-
- // Assume we are attaching the first IP to the Load Balancer
- NetworkInterfaceCard nic = nicApi.get(nicName);
-
- IpConfigurationProperties ipProps = nic.properties().ipConfigurations().get(0).properties().toBuilder()
- .loadBalancerBackendAddressPools(poolRefs).build();
- List<IpConfiguration> ips = ImmutableList.of(nic.properties().ipConfigurations().get(0).toBuilder()
- .properties(ipProps).build());
-
- NetworkInterfaceCardProperties nicProps = nic.properties().toBuilder().ipConfigurations(ips).build();
-
- nicApi.createOrUpdate(nicName, location, nicProps, null);
-
- resourceAvailable.apply(new Supplier<Provisionable>() {
- @Override
- public Provisionable get() {
- NetworkInterfaceCard updated = nicApi.get(nicName);
- return updated == null ? null : updated.properties();
- }
- });
-
- return nicApi.get(nicName);
- }
-
- private NetworkInterfaceCard attachNicToNatRule(final String nicName, InboundNatRule rule) {
- List<IdReference> natRuleRefs = ImmutableList.of(IdReference.create(rule.id()));
-
- // Assume we are attaching the first IP to the NAT rule
- NetworkInterfaceCard nic = nicApi.get(nicName);
-
- IpConfigurationProperties ipProps = nic.properties().ipConfigurations().get(0).properties().toBuilder()
- .loadBalancerInboundNatRules(natRuleRefs).build();
- List<IpConfiguration> ips = ImmutableList.of(nic.properties().ipConfigurations().get(0).toBuilder()
- .properties(ipProps).build());
-
- NetworkInterfaceCardProperties nicProps = nic.properties().toBuilder().ipConfigurations(ips).build();
-
- nicApi.createOrUpdate(nicName, location, nicProps, null);
-
- resourceAvailable.apply(new Supplier<Provisionable>() {
- @Override
- public Provisionable get() {
- NetworkInterfaceCard updated = nicApi.get(nicName);
- return updated == null ? null : updated.properties();
- }
- });
-
- return nicApi.get(nicName);
- }
-
- private LoadBalancer updateLoadBalancer(final String name, LoadBalancerProperties props) {
- lbApi.createOrUpdate(name, location, null, props);
- resourceAvailable.apply(new Supplier<Provisionable>() {
- @Override
- public Provisionable get() {
- LoadBalancer updated = lbApi.get(name);
- return updated == null ? null : updated.properties();
- }
- });
- return lbApi.get(name);
- }
-
- private static final Function<LoadBalancingRule, IdReference> ToIdReference = new Function<LoadBalancingRule, IdReference>() {
- @Override
- public IdReference apply(LoadBalancingRule input) {
- return IdReference.create(input.id());
- }
- };
-
- private static final Function<NetworkInterfaceCard, IdReference> ToFirstIpReference = new Function<NetworkInterfaceCard, IdReference>() {
- @Override
- public IdReference apply(NetworkInterfaceCard input) {
- return IdReference.create(input.properties().ipConfigurations().get(0).id());
- }
- };
-
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/LoadBalancerApiMockTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/LoadBalancerApiMockTest.java
deleted file mode 100644
index 45663ea..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/LoadBalancerApiMockTest.java
+++ /dev/null
@@ -1,160 +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 static com.google.common.collect.Iterables.isEmpty;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertNull;
-import static org.testng.Assert.assertTrue;
-
-import java.net.URI;
-import java.util.List;
-
-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.internal.BaseAzureComputeApiMockTest;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-
-@Test(groups = "unit", testName = "LoadBalancerApiMockTest", singleThreaded = true)
-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 lbName = "testLoadBalancer";
-
- public void createLoadBalancer() throws InterruptedException {
- LoadBalancer nsg = newLoadBalancer();
-
- server.enqueue(jsonResponse("/loadbalancercreate.json").setResponseCode(200));
- final LoadBalancerApi nsgApi = 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\":{}}]}}";
-
- LoadBalancer result = nsgApi.createOrUpdate(lbName, "westeurope", null, nsg.properties());
- assertSent(server, "PUT", path, json);
-
- assertEquals(result.name(), lbName);
- assertEquals(result.location(), "westeurope");
- }
-
- public void getLoadBalancer() throws InterruptedException {
- server.enqueue(jsonResponse("/loadbalancerget.json").setResponseCode(200));
-
- final LoadBalancerApi nsgApi = api.getLoadBalancerApi(resourcegroup);
- LoadBalancer result = nsgApi.get(lbName);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/loadBalancers/%s?%s",
- subscriptionid, resourcegroup, lbName, apiVersion);
- assertSent(server, "GET", path);
-
- assertEquals(result.name(), lbName);
- assertEquals(result.location(), "westeurope");
- assertEquals(result.properties().loadBalancingRules().size(), 1);
- assertEquals(result.properties().loadBalancingRules().get(0).name(), "lbRule1");
- }
-
- public void getLoadBalancerReturns404() throws InterruptedException {
- server.enqueue(response404());
-
- final LoadBalancerApi nsgApi = api.getLoadBalancerApi(resourcegroup);
- LoadBalancer result = nsgApi.get(lbName);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/loadBalancers/%s?%s",
- subscriptionid, resourcegroup, lbName, apiVersion);
- assertSent(server, "GET", path);
-
- assertNull(result);
- }
-
- public void listLoadBalancers() throws InterruptedException {
- server.enqueue(jsonResponse("/loadbalancerlist.json").setResponseCode(200));
-
- final LoadBalancerApi nsgApi = api.getLoadBalancerApi(resourcegroup);
- List<LoadBalancer> result = nsgApi.list();
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/loadBalancers?%s",
- subscriptionid, resourcegroup, apiVersion);
- assertSent(server, "GET", path);
-
- assertNotNull(result);
- assertTrue(result.size() > 0);
- }
-
- public void listLoadBalancersReturns404() throws InterruptedException {
- server.enqueue(response404());
-
- final LoadBalancerApi nsgApi = api.getLoadBalancerApi(resourcegroup);
- List<LoadBalancer> result = nsgApi.list();
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/loadBalancers?%s",
- subscriptionid, resourcegroup, apiVersion);
- assertSent(server, "GET", path);
-
- assertTrue(isEmpty(result));
- }
-
- public void deleteLoadBalancer() throws InterruptedException {
- server.enqueue(response202WithHeader());
-
- final LoadBalancerApi nsgApi = api.getLoadBalancerApi(resourcegroup);
- URI uri = nsgApi.delete(lbName);
-
- assertEquals(server.getRequestCount(), 1);
- assertNotNull(uri);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/loadBalancers/%s?%s",
- subscriptionid, resourcegroup, lbName, apiVersion);
- assertSent(server, "DELETE", path);
-
- assertTrue(uri.toString().contains("api-version"));
- assertTrue(uri.toString().contains("operationresults"));
- }
-
- public void deleteLoadBalancerDoesNotExist() throws InterruptedException {
- server.enqueue(response404());
-
- final LoadBalancerApi nsgApi = api.getLoadBalancerApi(resourcegroup);
- URI uri = nsgApi.delete(lbName);
- assertNull(uri);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/loadBalancers/%s?%s",
- subscriptionid, resourcegroup, lbName, apiVersion);
- assertSent(server, "DELETE", path);
- }
-
- private LoadBalancer newLoadBalancer() {
- FrontendIPConfigurationsProperties frontendIPConfigurationsProperties = FrontendIPConfigurationsProperties
- .builder().build();
- FrontendIPConfigurations frontendIPConfigurations = FrontendIPConfigurations.create("ipConfigs", null,
- frontendIPConfigurationsProperties, null);
- return LoadBalancer
- .builder()
- .name(lbName)
- .location("westus")
- .properties(
- LoadBalancerProperties.builder().frontendIPConfigurations(ImmutableList.of(frontendIPConfigurations))
- .build()).build();
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/LocationApiLiveTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/LocationApiLiveTest.java
deleted file mode 100644
index 4e37294..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/LocationApiLiveTest.java
+++ /dev/null
@@ -1,51 +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 org.jclouds.azurecompute.arm.domain.Location;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiLiveTest;
-import org.testng.annotations.Test;
-
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
-
-@Test(groups = "live", testName = "LocationApiLiveTest")
-public class LocationApiLiveTest extends BaseAzureComputeApiLiveTest {
-
- @Test
- public void testList() {
- List<Location> locations = api().list();
- assertTrue(!locations.isEmpty());
- for (Location location : locations) {
- checkLocation(location);
- }
- }
-
- private LocationApi api() {
- return api.getLocationApi();
- }
-
- private void checkLocation(final Location location) {
- assertNotNull(location.name(), "Name cannot be null for a Location.");
- assertNotNull(location.displayName(), "DisplayName cannot be null for: " + location.name());
- assertNotNull(location.id(), "Id cannot be null for: " + location.name());
- assertNotNull(location.latitude(), "Latitude cannot be null for: " + location.name());
- assertNotNull(location.longitude(), "Longitude cannot be null for: " + location.name());
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/LocationApiMockTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/LocationApiMockTest.java
deleted file mode 100644
index 5ea60d4..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/LocationApiMockTest.java
+++ /dev/null
@@ -1,50 +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 com.google.common.collect.ImmutableList;
-import com.squareup.okhttp.mockwebserver.MockResponse;
-import org.jclouds.azurecompute.arm.domain.Location;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiMockTest;
-import org.testng.annotations.Test;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-
-@Test(groups = "unit", testName = "LocationApiMockTest", singleThreaded = true)
-public class LocationApiMockTest extends BaseAzureComputeApiMockTest {
-
- public void testList() throws Exception {
- server.enqueue(jsonResponse("/locations.json"));
- final LocationApi locationAPI = api.getLocationApi();
- assertEquals(locationAPI.list(), ImmutableList.of(
- Location.create("/subscriptions/SUBSCRIPTIONID/locations/eastasia",
- "eastasia", "East Asia", 114.188, 22.267)
- ));
- assertSent(server, "GET", "/subscriptions/SUBSCRIPTIONID/locations?api-version=2015-11-01");
- }
-
- public void testEmptyList() throws Exception {
- server.enqueue(new MockResponse().setResponseCode(404));
-
- final LocationApi locationAPI = api.getLocationApi();
-
- assertTrue(locationAPI.list().isEmpty());
-
- assertSent(server, "GET", "/subscriptions/SUBSCRIPTIONID/locations?api-version=2015-11-01");
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/MetricDefinitionsApiLiveTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/MetricDefinitionsApiLiveTest.java
deleted file mode 100644
index cb8027f..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/MetricDefinitionsApiLiveTest.java
+++ /dev/null
@@ -1,131 +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 static com.google.common.base.Preconditions.checkNotNull;
-import static com.google.common.collect.Iterables.getOnlyElement;
-import static org.jclouds.azurecompute.arm.compute.options.AzureTemplateOptions.Builder.resourceGroup;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.TIMEOUT_RESOURCE_DELETED;
-import static org.jclouds.compute.predicates.NodePredicates.inGroup;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
-import static org.testng.Assert.fail;
-
-import java.net.URI;
-import java.util.List;
-import java.util.Properties;
-
-import org.jclouds.azurecompute.arm.AzureComputeApi;
-import org.jclouds.azurecompute.arm.domain.IdReference;
-import org.jclouds.azurecompute.arm.domain.MetricDefinition;
-import org.jclouds.azurecompute.arm.internal.AzureLiveTestUtils;
-import org.jclouds.compute.RunNodesException;
-import org.jclouds.compute.domain.NodeMetadata;
-import org.jclouds.compute.internal.BaseComputeServiceContextLiveTest;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Predicate;
-import com.google.inject.Key;
-import com.google.inject.TypeLiteral;
-import com.google.inject.name.Names;
-
-@Test(groups = "live", singleThreaded = true)
-public class MetricDefinitionsApiLiveTest extends BaseComputeServiceContextLiveTest {
-
- private Predicate<URI> resourceDeleted;
- private AzureComputeApi api;
-
- private String location;
- private MetricDefinitionsApi metricDefinitionsApi;
-
- private String group;
-
- public MetricDefinitionsApiLiveTest() {
- provider = "azurecompute-arm";
- group = getClass().getSimpleName().toLowerCase();
- }
-
- @Override
- protected Properties setupProperties() {
- Properties properties = super.setupProperties();
- AzureLiveTestUtils.defaultProperties(properties);
- checkNotNull(setIfTestSystemPropertyPresent(properties, "oauth.endpoint"), "test.oauth.endpoint");
- return properties;
- }
-
- @Override
- protected void initializeContext() {
- super.initializeContext();
- resourceDeleted = context.utils().injector().getInstance(Key.get(new TypeLiteral<Predicate<URI>>() {
- }, Names.named(TIMEOUT_RESOURCE_DELETED)));
- api = view.unwrapApi(AzureComputeApi.class);
- }
-
- @Override
- @BeforeClass
- public void setupContext() {
- super.setupContext();
- NodeMetadata node = null;
- try {
- node = getOnlyElement(view.getComputeService().createNodesInGroup(group, 1, resourceGroup(group)));
- } catch (RunNodesException e) {
- fail();
- }
- String resourceId = String.format("/resourceGroups/%s/providers/Microsoft.Compute/virtualMachines/%s",
- IdReference.extractResourceGroup(node.getProviderId()), IdReference.extractName(node.getProviderId()));
-
- location = view.getComputeService().templateBuilder().build().getLocation().getId();
- view.unwrapApi(AzureComputeApi.class).getResourceGroupApi().create(group, location, null);
- metricDefinitionsApi = api.getMetricsDefinitionsApi(resourceId);
- }
-
- @Override
- @AfterClass(alwaysRun = true)
- protected void tearDownContext() {
- try {
- view.getComputeService().destroyNodesMatching(inGroup(group));
- } finally {
- try {
- URI uri = api.getResourceGroupApi().delete(group);
- assertResourceDeleted(uri);
- } finally {
- super.tearDownContext();
- }
- }
- }
-
- public void listVirtualMachineMetricDefinitions() {
- List<MetricDefinition> result = metricDefinitionsApi.list("name.value eq 'Percentage CPU'");
-
- // verify we have something
- assertNotNull(result);
- assertTrue(result.size() > 1);
- assertEquals(result.get(0).name().value(), "Percentage CPU");
- }
-
- private void assertResourceDeleted(final URI uri) {
- if (uri != null) {
- assertTrue(resourceDeleted.apply(uri),
- String.format("Resource %s was not deleted in the configured timeout", uri));
- }
- }
-
-}
-
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/MetricDefinitionsApiMockTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/MetricDefinitionsApiMockTest.java
deleted file mode 100644
index 8fd06b8..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/MetricDefinitionsApiMockTest.java
+++ /dev/null
@@ -1,65 +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 static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-
-import org.jclouds.azurecompute.arm.domain.MetricDefinition;
-import org.jclouds.azurecompute.arm.domain.MetricName;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiMockTest;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import com.squareup.okhttp.mockwebserver.MockResponse;
-
-@Test(groups = "unit", testName = "MetricDefinitionsApiMockTest", singleThreaded = true)
-public class MetricDefinitionsApiMockTest extends BaseAzureComputeApiMockTest {
-
- private final String resourceId = "resourceGroups/myresourceGroup/providers/Microsoft.Compute/virtualMachines/myvm";
- private final String filter = "(name.value eq 'Percentage CPU')";
-
- public void testList() throws Exception {
- server.enqueue(jsonResponse("/metricdefinitions.json"));
- final MetricDefinitionsApi metricDefinitionsApi = api.getMetricsDefinitionsApi(resourceId);
- assertEquals(metricDefinitionsApi.list(filter), ImmutableList.of(MetricDefinition.create(
- "/subscriptions/SUBSCRIPTIONID/resourceGroups/myresourcegroup/providers/Microsoft"
- + ".Compute/virtualMachines/myvm", MetricName.create("Percentage CPU", "Percentage CPU"),
- Boolean.FALSE, "Percent", MetricDefinition.AggregationType.Average,
- ImmutableList.<MetricDefinition.MetricAvailability> of(
- MetricDefinition.MetricAvailability.create("PT1M", "P30D"),
- MetricDefinition.MetricAvailability.create("PT1H", "P30D")),
- "/subscriptions/SUBSCRIPTIONID/resourceGroups/myresourcegroup/providers"
- + "/Microsoft.Compute/virtualMachines/myvm/providers/microsoft"
- + ".insights/metricdefinitions/Percentage " + "CPU")));
- assertSent(server, "GET", "/subscriptions/SUBSCRIPTIONID/resourceGroups/myresourceGroup/providers/Microsoft"
- + ".Compute/virtualMachines/myvm/providers/microsoft.insights/metricdefinitions?$filter=%28name"
- + ".value%20eq%20%27Percentage%20CPU%27%29&api-version=2017-05-01-preview");
- }
-
- public void testEmptyList() throws Exception {
- server.enqueue(new MockResponse().setResponseCode(404));
-
- final MetricDefinitionsApi metricDefinitionsApi = api.getMetricsDefinitionsApi(resourceId);
-
- assertTrue(metricDefinitionsApi.list(filter).isEmpty());
-
- assertSent(server, "GET", "/subscriptions/SUBSCRIPTIONID/resourceGroups/myresourceGroup/providers/Microsoft"
- + ".Compute/virtualMachines/myvm/providers/microsoft.insights/metricdefinitions?$filter=%28name"
- + ".value%20eq%20%27Percentage%20CPU%27%29&api-version=2017-05-01-preview");
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/MetricsApiLiveTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/MetricsApiLiveTest.java
deleted file mode 100644
index 5fe19db..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/MetricsApiLiveTest.java
+++ /dev/null
@@ -1,143 +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 static com.google.common.base.Preconditions.checkNotNull;
-import static com.google.common.collect.Iterables.getOnlyElement;
-import static org.jclouds.azurecompute.arm.compute.options.AzureTemplateOptions.Builder.resourceGroup;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.TIMEOUT_RESOURCE_DELETED;
-import static org.jclouds.compute.predicates.NodePredicates.inGroup;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
-import static org.testng.Assert.fail;
-
-import java.net.URI;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.List;
-import java.util.Properties;
-
-import org.jclouds.azurecompute.arm.AzureComputeApi;
-import org.jclouds.azurecompute.arm.domain.IdReference;
-import org.jclouds.azurecompute.arm.domain.Metric;
-import org.jclouds.azurecompute.arm.internal.AzureLiveTestUtils;
-import org.jclouds.compute.RunNodesException;
-import org.jclouds.compute.domain.NodeMetadata;
-import org.jclouds.compute.internal.BaseComputeServiceContextLiveTest;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Predicate;
-import com.google.inject.Key;
-import com.google.inject.TypeLiteral;
-import com.google.inject.name.Names;
-
-@Test(groups = "live", singleThreaded = true)
-public class MetricsApiLiveTest extends BaseComputeServiceContextLiveTest {
-
- private Predicate<URI> resourceDeleted;
- private AzureComputeApi api;
-
- private String location;
- private MetricsApi metricsApi;
-
- private String group;
-
- private String startTime;
- private SimpleDateFormat dateFormat;
-
- public MetricsApiLiveTest() {
- provider = "azurecompute-arm";
- group = getClass().getSimpleName().toLowerCase();
- }
-
- @Override
- protected Properties setupProperties() {
- Properties properties = super.setupProperties();
- AzureLiveTestUtils.defaultProperties(properties);
- checkNotNull(setIfTestSystemPropertyPresent(properties, "oauth.endpoint"), "test.oauth.endpoint");
- return properties;
- }
-
- @Override
- protected void initializeContext() {
- super.initializeContext();
- resourceDeleted = context.utils().injector().getInstance(Key.get(new TypeLiteral<Predicate<URI>>() {
- }, Names.named(TIMEOUT_RESOURCE_DELETED)));
- api = view.unwrapApi(AzureComputeApi.class);
- }
-
- @Override
- @BeforeClass
- public void setupContext() {
- super.setupContext();
-
- dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
- startTime = dateFormat.format(new Date());
-
- NodeMetadata node = null;
- try {
- node = getOnlyElement(view.getComputeService().createNodesInGroup(group, 1, resourceGroup(group)));
- } catch (RunNodesException e) {
- fail();
- }
- String resourceId = String.format("/resourceGroups/%s/providers/Microsoft.Compute/virtualMachines/%s",
- IdReference.extractResourceGroup(node.getProviderId()), IdReference.extractName(node.getProviderId()));
-
- location = view.getComputeService().templateBuilder().build().getLocation().getId();
- view.unwrapApi(AzureComputeApi.class).getResourceGroupApi().create(group, location, null);
- metricsApi = api.getMetricsApi(resourceId);
- }
-
- @Override
- @AfterClass(alwaysRun = true)
- protected void tearDownContext() {
- try {
- view.getComputeService().destroyNodesMatching(inGroup(group));
- } finally {
- try {
- URI uri = api.getResourceGroupApi().delete(group);
- assertResourceDeleted(uri);
- } finally {
- super.tearDownContext();
- }
- }
- }
-
- public void listVirtualMachineMetrics() throws RunNodesException {
- List<Metric> result = metricsApi
- .list("(name.value eq 'Percentage CPU') and startTime eq " + startTime + " and endTime eq " + dateFormat
- .format(new Date()) + " and timeGrain eq duration'PT1M'");
-
- // verify we have something
- assertNotNull(result);
- assertEquals(result.size(), 1);
- assertEquals(result.get(0).name().value(), "Percentage CPU");
- assertTrue(result.get(0).data().size() > 1);
- }
-
- private void assertResourceDeleted(final URI uri) {
- if (uri != null) {
- assertTrue(resourceDeleted.apply(uri),
- String.format("Resource %s was not deleted in the configured timeout", uri));
- }
- }
-
-}
-
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/MetricsApiMockTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/MetricsApiMockTest.java
deleted file mode 100644
index 2001d19..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/MetricsApiMockTest.java
+++ /dev/null
@@ -1,69 +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 static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-
-import java.util.Date;
-
-import org.jclouds.azurecompute.arm.domain.Metric;
-import org.jclouds.azurecompute.arm.domain.MetricData;
-import org.jclouds.azurecompute.arm.domain.MetricName;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiMockTest;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import com.squareup.okhttp.mockwebserver.MockResponse;
-
-@Test(groups = "unit", testName = "MetricsApiMockTest", singleThreaded = true)
-public class MetricsApiMockTest extends BaseAzureComputeApiMockTest {
-
- private final String resourceId = "resourceGroups/myresourceGroup/providers/Microsoft.Compute/virtualMachines/myvm";
- private final String filter = "(name.value eq 'Percentage CPU') and startTime eq 2017-06-01T11:14:00Z and "
- + "endTime eq 2017-06-01T11:23:00Z and timeGrain eq duration'PT1M'";
-
- public void testList() throws Exception {
- server.enqueue(jsonResponse("/metrics.json"));
- final MetricsApi metricsApi = api.getMetricsApi(resourceId);
- Date timestamp = dateService.iso8601DateOrSecondsDateParse("2017-06-01T11:14:00Z");
- assertEquals(metricsApi.list(filter), ImmutableList.of(Metric.create(
- ImmutableList.of(MetricData.create(timestamp, null, Double.valueOf(0.295), null, null, null)),
- "/subscriptions/SUBSCRIPTIONID/resourceGroups/myresourcegroup/providers"
- + "/Microsoft.Compute/virtualMachines/myvm/providers/Microsoft.Insights/metrics/Percentage CPU",
- MetricName.create("Percentage CPU", "Percentage CPU"), "Microsoft.Insights/metrics", "Percent")));
- assertSent(server, "GET", "/subscriptions/SUBSCRIPTIONID/resourceGroups/myresourceGroup/providers/Microsoft"
- + ".Compute/virtualMachines/myvm/providers/microsoft.insights/metrics?$filter=%28name"
- + ".value%20eq%20%27Percentage%20CPU%27%29%20and%20startTime%20eq%202017-06-01T11%3A14%3A00Z%20and"
- + "%20endTime%20eq%202017-06-01T11%3A23%3A00Z%20and%20timeGrain%20eq%20duration%27PT1M%27&api-version"
- + "=2016-09-01");
- }
-
- public void testEmptyList() throws Exception {
- server.enqueue(new MockResponse().setResponseCode(404));
-
- final MetricsApi metricsAPI = api.getMetricsApi(resourceId);
-
- assertTrue(metricsAPI.list(filter).isEmpty());
-
- assertSent(server, "GET", "/subscriptions/SUBSCRIPTIONID/resourceGroups/myresourceGroup/providers/Microsoft"
- + ".Compute/virtualMachines/myvm/providers/microsoft.insights/metrics?$filter=%28name"
- + ".value%20eq%20%27Percentage%20CPU%27%29%20and%20startTime%20eq%202017-06-01T11%3A14%3A00Z%20and"
- + "%20endTime%20eq%202017-06-01T11%3A23%3A00Z%20and%20timeGrain%20eq%20duration%27PT1M%27&api-version"
- + "=2016-09-01");
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/NetworkInterfaceCardApiLiveTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/NetworkInterfaceCardApiLiveTest.java
deleted file mode 100644
index cd95a2c..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/NetworkInterfaceCardApiLiveTest.java
+++ /dev/null
@@ -1,119 +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 static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
-
-import java.net.URI;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-
-import org.jclouds.azurecompute.arm.domain.IdReference;
-import org.jclouds.azurecompute.arm.domain.IpConfiguration;
-import org.jclouds.azurecompute.arm.domain.IpConfigurationProperties;
-import org.jclouds.azurecompute.arm.domain.NetworkInterfaceCard;
-import org.jclouds.azurecompute.arm.domain.NetworkInterfaceCardProperties;
-import org.jclouds.azurecompute.arm.domain.Subnet;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiLiveTest;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableMap;
-
-@Test(groups = "live", singleThreaded = true)
-public class NetworkInterfaceCardApiLiveTest extends BaseAzureComputeApiLiveTest {
-
- private String subnetId;
- private String nicName;
-
- @BeforeClass
- @Override
- public void setup() {
- super.setup();
- createTestResourceGroup();
- assertNotNull(api.getResourceGroupApi().create(resourceGroupName, LOCATION, ImmutableMap.<String, String>of()));
- String virtualNetworkName = String.format("vn-%s-%s", this.getClass().getSimpleName().toLowerCase(), System.getProperty("user.name"));
- nicName = String.format("nic-%s-%s", this.getClass().getSimpleName().toLowerCase(), System.getProperty("user.name"));
- String subnetName = String.format("s-%s-%s", this.getClass().getSimpleName().toLowerCase(), System.getProperty("user.name"));
-
- //Subnets belong to a virtual network so that needs to be created first
- assertNotNull(createDefaultVirtualNetwork(resourceGroupName, virtualNetworkName, "10.2.0.0/16", LOCATION));
-
- //Subnet needs to be up & running before NIC can be created
- Subnet subnet = createDefaultSubnet(resourceGroupName, subnetName, virtualNetworkName, "10.2.0.0/23");
- assertNotNull(subnet);
- assertNotNull(subnet.id());
- subnetId = subnet.id();
- }
-
- @Test
- public void createNetworkInterfaceCard() {
- //Create properties object
- final NetworkInterfaceCardProperties networkInterfaceCardProperties =
- NetworkInterfaceCardProperties.builder().ipConfigurations(
- Arrays.asList(IpConfiguration.builder()
- .name("myipconfig")
- .properties(IpConfigurationProperties.builder()
- .privateIPAllocationMethod("Dynamic")
- .subnet(IdReference.create(subnetId)).build()
- ).build()
- )).build();
-
- final Map<String, String> tags = ImmutableMap.of("jclouds", "livetest");
- NetworkInterfaceCard nic = api().createOrUpdate(nicName, LOCATION, networkInterfaceCardProperties, tags);
-
- assertEquals(nic.name(), nicName);
- assertEquals(nic.location(), LOCATION);
- assertTrue(nic.properties().ipConfigurations().size() > 0);
- assertEquals(nic.properties().ipConfigurations().get(0).name(), "myipconfig");
- assertEquals(nic.properties().ipConfigurations().get(0).properties().privateIPAllocationMethod(), "Dynamic");
- assertEquals(nic.properties().ipConfigurations().get(0).properties().subnet().id(), subnetId);
- assertEquals(nic.tags().get("jclouds"), "livetest");
- }
-
- @Test(dependsOnMethods = "createNetworkInterfaceCard")
- public void getNetworkInterfaceCard() {
- NetworkInterfaceCard nic = api().get(nicName);
-
- assertEquals(nic.name(), nicName);
- assertEquals(nic.location(), LOCATION);
- assertTrue(nic.properties().ipConfigurations().size() > 0);
- assertEquals(nic.properties().ipConfigurations().get(0).name(), "myipconfig");
- assertEquals(nic.properties().ipConfigurations().get(0).properties().privateIPAllocationMethod(), "Dynamic");
- assertEquals(nic.properties().ipConfigurations().get(0).properties().subnet().id(), subnetId);
- }
-
- @Test(dependsOnMethods = "createNetworkInterfaceCard")
- public void listNetworkInterfaceCards() {
- List<NetworkInterfaceCard> nicList = api().list();
- assertTrue(nicList.contains(api().get(nicName)));
- }
-
- @Test(dependsOnMethods = {"listNetworkInterfaceCards", "getNetworkInterfaceCard"})
- public void deleteNetworkInterfaceCard() {
- URI uri = api().delete(nicName);
- assertResourceDeleted(uri);
- }
-
- private NetworkInterfaceCardApi api() {
- return api.getNetworkInterfaceCardApi(resourceGroupName);
- }
-
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/NetworkInterfaceCardApiMockTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/NetworkInterfaceCardApiMockTest.java
deleted file mode 100644
index dd10046..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/NetworkInterfaceCardApiMockTest.java
+++ /dev/null
@@ -1,145 +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 com.google.common.collect.ImmutableMap;
-import com.squareup.okhttp.mockwebserver.MockResponse;
-import org.jclouds.azurecompute.arm.domain.IdReference;
-import org.jclouds.azurecompute.arm.domain.IpConfiguration;
-import org.jclouds.azurecompute.arm.domain.IpConfigurationProperties;
-import org.jclouds.azurecompute.arm.domain.NetworkInterfaceCard;
-import org.jclouds.azurecompute.arm.domain.NetworkInterfaceCardProperties;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiMockTest;
-import org.testng.annotations.Test;
-
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertNull;
-import static org.testng.Assert.assertTrue;
-import static org.testng.Assert.assertEquals;
-
-@Test(groups = "unit", testName = "NetworkInterfaceCardApiMockTest", singleThreaded = true)
-public class NetworkInterfaceCardApiMockTest extends BaseAzureComputeApiMockTest {
-
- private final String subscriptionid = "SUBSCRIPTIONID";
- private final String resourcegroup = "myresourcegroup";
- private final String apiVersion = "api-version=2017-03-01";
- private final String location = "northeurope";
- private final String nicName = "myNic";
-
- public void getNetworkInterfaceCard() throws InterruptedException {
- server.enqueue(jsonResponse("/getnetworkinterfacecard.json"));
-
- final NetworkInterfaceCardApi nicApi = api.getNetworkInterfaceCardApi(resourcegroup);
- NetworkInterfaceCard nic = nicApi.get(nicName);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/networkInterfaces/%s?%s", subscriptionid, resourcegroup, nicName, apiVersion);
- assertSent(server, "GET", path);
- assertNotNull(nic);
- assertEquals(nic.name(), nicName);
- assertEquals(nic.properties().ipConfigurations().get(0).name(), "myip1");
- assertEquals(nic.tags().get("mycustomtag"), "foobar");
- }
-
- public void getNetworkInterfaceCardEmpty() throws Exception {
- server.enqueue(new MockResponse().setResponseCode(404));
-
- final NetworkInterfaceCardApi nicApi = api.getNetworkInterfaceCardApi(resourcegroup);
-
- assertNull(nicApi.get(nicName));
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/networkInterfaces/%s?%s", subscriptionid, resourcegroup, nicName, apiVersion);
- assertSent(server, "GET", path);
- }
-
- public void listNetworkInterfaceCards() throws InterruptedException {
- server.enqueue(jsonResponse("/listnetworkinterfaces.json"));
-
- final NetworkInterfaceCardApi nicApi = api.getNetworkInterfaceCardApi(resourcegroup);
- List<NetworkInterfaceCard> nicList = nicApi.list();
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/networkInterfaces?%s", subscriptionid, resourcegroup, apiVersion);
-
- assertSent(server, "GET", path);
- assertTrue(nicList.size() == 2);
- assertTrue(nicList.get(0).properties().ipConfigurations().size() > 0);
- assertEquals(nicList.get(0).properties().ipConfigurations().get(0).properties().privateIPAllocationMethod(), "Dynamic");
- assertTrue(nicList.get(1).properties().ipConfigurations().size() > 0);
- assertEquals(nicList.get(1).properties().ipConfigurations().get(0).properties().privateIPAllocationMethod(), "Static");
- }
-
- public void listNetworkInterfaceCardsEmpty() throws Exception {
- server.enqueue(new MockResponse().setResponseCode(404));
-
- final NetworkInterfaceCardApi nicApi = api.getNetworkInterfaceCardApi(resourcegroup);
-
- assertTrue(nicApi.list().isEmpty());
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/networkInterfaces?%s", subscriptionid, resourcegroup, apiVersion);
-
- assertSent(server, "GET", path);
- }
-
- public void createNetworkInterfaceCard() throws InterruptedException {
-
- server.enqueue(jsonResponse("/createnetworkinterfacecard.json").setStatus("HTTP/1.1 201 Created"));
-
- final NetworkInterfaceCardApi nicApi = api.getNetworkInterfaceCardApi(resourcegroup);
-
-
- final String SubnetID = "/subscriptions/" + subscriptionid + "/resourceGroups/azurearmtesting/providers/Microsoft.Network/virtualNetworks/myvirtualnetwork/subnets/mysubnet";
- //Create properties object
- final NetworkInterfaceCardProperties networkInterfaceCardProperties = NetworkInterfaceCardProperties.create(null,
- null, null, Arrays.asList(IpConfiguration.create("myipconfig", null, null, null, IpConfigurationProperties
- .create(null, null, "Dynamic", IdReference.create(SubnetID), null, null, null))), null);
-
- final Map<String, String> tags = ImmutableMap.of("mycustomtag", "foobar");
-
- NetworkInterfaceCard nic = nicApi.createOrUpdate(nicName, location, networkInterfaceCardProperties, tags);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/networkInterfaces/%s?%s", subscriptionid, resourcegroup, nicName, apiVersion);
- String json = String.format("{ \"location\":\"%s\", \"tags\": { \"mycustomtag\": \"foobar\" }, \"properties\":{ \"ipConfigurations\":[ { \"name\":\"%s\", \"properties\":{ \"subnet\":{ \"id\": \"%s\" }, \"privateIPAllocationMethod\":\"%s\" } } ] } }", location, "myipconfig", SubnetID, "Dynamic");
- assertSent(server, "PUT", path, json);
- assertEquals(nic.tags().get("mycustomtag"), "foobar");
- }
-
- public void deleteNetworkInterfaceCard() throws InterruptedException {
-
- server.enqueue(response202WithHeader());
-
- final NetworkInterfaceCardApi nicApi = api.getNetworkInterfaceCardApi(resourcegroup);
-
- nicApi.delete(nicName);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/networkInterfaces/%s?%s", subscriptionid, resourcegroup, nicName, apiVersion);
- assertSent(server, "DELETE", path);
-
- }
-
- public void deleteNetworkInterfaceCardResourceDoesNotExist() throws InterruptedException {
-
- server.enqueue(response404());
-
- final NetworkInterfaceCardApi nicApi = api.getNetworkInterfaceCardApi(resourcegroup);
-
- nicApi.delete(nicName);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/networkInterfaces/%s?%s", subscriptionid, resourcegroup, nicName, apiVersion);
- assertSent(server, "DELETE", path);
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/NetworkSecurityGroupApiLiveTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/NetworkSecurityGroupApiLiveTest.java
deleted file mode 100644
index 3a2f4eb..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/NetworkSecurityGroupApiLiveTest.java
+++ /dev/null
@@ -1,106 +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 static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertNull;
-import static org.testng.Assert.assertTrue;
-
-import java.net.URI;
-import java.util.List;
-
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityGroup;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityRule;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiLiveTest;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-@Test(groups = "live", singleThreaded = true)
-public class NetworkSecurityGroupApiLiveTest extends BaseAzureComputeApiLiveTest {
-
- private static String nsgName = "testNetworkSecurityGroup";
-
- @BeforeClass
- @Override
- public void setup() {
- super.setup();
- createTestResourceGroup();
- nsgName = String.format("nsg-%s-%s", this.getClass().getSimpleName().toLowerCase(), System.getProperty("user.name"));
- }
-
- @Test
- public void deleteNetworkSecurityGroupDoesNotExist() {
- URI uri = api().delete(nsgName);
- assertNull(uri);
- }
-
- @Test(dependsOnMethods = "deleteNetworkSecurityGroupDoesNotExist")
- public void createNetworkSecurityGroup() {
- final NetworkSecurityGroup nsg = newNetworkSecurityGroup(nsgName, LOCATION);
- assertNotNull(nsg);
-
- NetworkSecurityGroup result = api().createOrUpdate(nsgName,
- nsg.location(),
- nsg.tags(),
- nsg.properties());
- assertNotNull(result);
- }
-
- @Test(dependsOnMethods = "createNetworkSecurityGroup")
- public void listNetworkSecurityGroups() {
- List<NetworkSecurityGroup> result = api().list();
-
- // verify we have something
- assertNotNull(result);
- assertEquals(result.size(), 1);
-
- // check that the nework security group matches the one we originally passed in
- NetworkSecurityGroup original = newNetworkSecurityGroup(nsgName, LOCATION);
- NetworkSecurityGroup nsg = result.get(0);
- assertEquals(original.name(), nsg.name());
- assertEquals(original.location(), nsg.location());
- assertEquals(original.tags(), nsg.tags());
-
- // check the network security rule in the group
- assertEquals(nsg.properties().securityRules().size(), 1);
- NetworkSecurityRule originalRule = original.properties().securityRules().get(0);
- NetworkSecurityRule nsgRule = nsg.properties().securityRules().get(0);
- assertEquals(originalRule.name(), nsgRule.name());
- assertTrue(originalRule.properties().equals(nsgRule.properties()));
- }
-
- @Test(dependsOnMethods = {"listNetworkSecurityGroups", "getNetworkSecurityGroup"}, alwaysRun = true)
- public void deleteNetworkSecurityGroup() {
- URI uri = api().delete(nsgName);
- assertResourceDeleted(uri);
- }
-
- @Test(dependsOnMethods = "createNetworkSecurityGroup")
- public void getNetworkSecurityGroup() {
- NetworkSecurityGroup nsg = api().get(nsgName);
- assertNotNull(nsg);
- assertNotNull(nsg.etag());
- assertEquals(nsg.name(), nsgName);
- }
-
- private NetworkSecurityGroupApi api() {
- return api.getNetworkSecurityGroupApi(resourceGroupName);
- }
-
-}
-
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/NetworkSecurityGroupApiMockTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/NetworkSecurityGroupApiMockTest.java
deleted file mode 100644
index 3dc0e4a..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/NetworkSecurityGroupApiMockTest.java
+++ /dev/null
@@ -1,163 +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 com.google.gson.Gson;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityGroup;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityGroupProperties;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityRule;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityRuleProperties;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityRuleProperties.Protocol;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiMockTest;
-import org.testng.annotations.Test;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-
-import static com.google.common.collect.Iterables.isEmpty;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNull;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
-
-@Test(groups = "unit", testName = "NetworkSecurityGroupApiMockTest", singleThreaded = true)
-public class NetworkSecurityGroupApiMockTest extends BaseAzureComputeApiMockTest {
- private final String subscriptionid = "SUBSCRIPTIONID";
- private final String resourcegroup = "myresourcegroup";
- private final String apiVersion = "api-version=2016-03-30";
- private static String DEFAULT_NSG_NAME = "testNetworkSecurityGroup";
-
- private NetworkSecurityGroup createGroup() {
- NetworkSecurityRule rule = NetworkSecurityRule.create("denyallout", null, null,
- NetworkSecurityRuleProperties.builder()
- .description("deny all out")
- .protocol(Protocol.Tcp)
- .sourcePortRange("*")
- .destinationPortRange("*")
- .sourceAddressPrefix("*")
- .destinationAddressPrefix("*")
- .access(NetworkSecurityRuleProperties.Access.Deny)
- .priority(4095)
- .direction(NetworkSecurityRuleProperties.Direction.Outbound)
- .build());
- ArrayList<NetworkSecurityRule> ruleList = new ArrayList<NetworkSecurityRule>();
- ruleList.add(rule);
- NetworkSecurityGroup nsg = NetworkSecurityGroup.create("id", "samplensg", "westus", null,
- NetworkSecurityGroupProperties.builder()
- .securityRules(ruleList)
- .build(),
- null);
- return nsg;
- }
-
- public void createNetworkSecurityGroup() throws InterruptedException {
- NetworkSecurityGroup nsg = createGroup();
-
- server.enqueue(jsonResponse("/networksecuritygroupcreate.json").setResponseCode(200));
- final NetworkSecurityGroupApi nsgApi = api.getNetworkSecurityGroupApi(resourcegroup);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/networkSecurityGroups/%s?%s", subscriptionid, resourcegroup, DEFAULT_NSG_NAME, apiVersion);
- String json = String.format("{\"location\":\"%s\",\"properties\":%s}", "westus", new Gson().toJson(nsg.properties()));
- NetworkSecurityGroup result = nsgApi.createOrUpdate(DEFAULT_NSG_NAME, "westus", null, nsg.properties());
- assertSent(server, "PUT", path, json);
-
- assertEquals(result.name(), DEFAULT_NSG_NAME);
- assertEquals(result.location(), "westus");
- assertEquals(result.properties().securityRules().size(), 1);
- assertEquals(result.properties().securityRules().get(0).properties().protocol(), Protocol.Tcp);
- }
-
- public void getNetworkSecurityGroup() throws InterruptedException {
- server.enqueue(jsonResponse("/networksecuritygroupget.json").setResponseCode(200));
-
- final NetworkSecurityGroupApi nsgApi = api.getNetworkSecurityGroupApi(resourcegroup);
- NetworkSecurityGroup result = nsgApi.get(DEFAULT_NSG_NAME);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/networkSecurityGroups/%s?%s", subscriptionid, resourcegroup, DEFAULT_NSG_NAME, apiVersion);
- assertSent(server, "GET", path);
-
- assertEquals(result.name(), DEFAULT_NSG_NAME);
- assertEquals(result.location(), "westus");
- assertEquals(result.properties().securityRules().size(), 1);
- assertEquals(result.properties().securityRules().get(0).properties().protocol(), Protocol.Tcp);
- }
-
- public void getNetworkSecurityGroupReturns404() throws InterruptedException {
- server.enqueue(response404());
-
- final NetworkSecurityGroupApi nsgApi = api.getNetworkSecurityGroupApi(resourcegroup);
- NetworkSecurityGroup result = nsgApi.get(DEFAULT_NSG_NAME);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/networkSecurityGroups/%s?%s", subscriptionid, resourcegroup, DEFAULT_NSG_NAME, apiVersion);
- assertSent(server, "GET", path);
-
- assertNull(result);
- }
-
- public void listNetworkSecurityGroups() throws InterruptedException {
- server.enqueue(jsonResponse("/networksecuritygrouplist.json").setResponseCode(200));
-
- final NetworkSecurityGroupApi nsgApi = api.getNetworkSecurityGroupApi(resourcegroup);
- List<NetworkSecurityGroup> result = nsgApi.list();
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/networkSecurityGroups?%s", subscriptionid, resourcegroup, apiVersion);
- assertSent(server, "GET", path);
-
- assertNotNull(result);
- assertTrue(result.size() > 0);
- }
-
- public void listNetworkSecurityGroupsReturns404() throws InterruptedException {
- server.enqueue(response404());
-
- final NetworkSecurityGroupApi nsgApi = api.getNetworkSecurityGroupApi(resourcegroup);
- List<NetworkSecurityGroup> result = nsgApi.list();
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/networkSecurityGroups?%s", subscriptionid, resourcegroup, apiVersion);
- assertSent(server, "GET", path);
-
- assertTrue(isEmpty(result));
- }
-
- public void deleteNetworkSecurityGroup() throws InterruptedException {
- server.enqueue(response202WithHeader());
-
- final NetworkSecurityGroupApi nsgApi = api.getNetworkSecurityGroupApi(resourcegroup);
- URI uri = nsgApi.delete(DEFAULT_NSG_NAME);
-
- assertEquals(server.getRequestCount(), 1);
- assertNotNull(uri);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/networkSecurityGroups/%s?%s", subscriptionid, resourcegroup, DEFAULT_NSG_NAME, apiVersion);
- assertSent(server, "DELETE", path);
-
- assertTrue(uri.toString().contains("api-version"));
- assertTrue(uri.toString().contains("operationresults"));
- }
-
- public void deleteNetworkSecurityGroupDoesNotExist() throws InterruptedException {
- server.enqueue(response404());
-
- final NetworkSecurityGroupApi nsgApi = api.getNetworkSecurityGroupApi(resourcegroup);
- URI uri = nsgApi.delete(DEFAULT_NSG_NAME);
- assertNull(uri);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/networkSecurityGroups/%s?%s", subscriptionid, resourcegroup, DEFAULT_NSG_NAME, apiVersion);
- assertSent(server, "DELETE", path);
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/NetworkSecurityRuleApiLiveTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/NetworkSecurityRuleApiLiveTest.java
deleted file mode 100644
index 821dbe3..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/NetworkSecurityRuleApiLiveTest.java
+++ /dev/null
@@ -1,156 +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 static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertNull;
-import static org.testng.Assert.assertTrue;
-
-import java.net.URI;
-import java.util.List;
-
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityGroup;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityRule;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityRuleProperties;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityRuleProperties.Access;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityRuleProperties.Direction;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityRuleProperties.Protocol;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiLiveTest;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Predicate;
-import com.google.common.collect.Iterables;
-
-@Test(groups = "live", singleThreaded = true)
-public class NetworkSecurityRuleApiLiveTest extends BaseAzureComputeApiLiveTest {
-
- private static String UNKNOWN_RULE_NAME = "ruledoesntexist";
- private String nsgName;
-
- @BeforeClass
- @Override
- public void setup() {
- super.setup();
- createTestResourceGroup();
- nsgName = String.format("nsg-%s-%s", this.getClass().getSimpleName().toLowerCase(), System.getProperty("user.name"));
-
- // a network security group is needed
- final NetworkSecurityGroup nsg = newNetworkSecurityGroup(nsgName, LOCATION);
- assertNotNull(api.getNetworkSecurityGroupApi(resourceGroupName).createOrUpdate(nsgName,
- nsg.location(),
- nsg.tags(),
- nsg.properties()));
- }
-
- @Test
- public void deleteNetworkSecurityRuleDoesNotExist() {
- URI uri = api().delete(UNKNOWN_RULE_NAME);
- assertNull(uri);
- }
-
- @Test(dependsOnMethods = "deleteNetworkSecurityRuleDoesNotExist")
- public void createNetworkSecurityRule() {
- final NetworkSecurityRule rule = createRule();
- assertNotNull(rule);
-
- final NetworkSecurityRuleApi ruleApi = api.getNetworkSecurityRuleApi(resourceGroupName, nsgName);
- NetworkSecurityRule result = ruleApi.createOrUpdate(rule.name(), rule.properties());
- assertNotNull(result);
- assertEquals(result.name(), rule.name());
- }
-
- @Test(dependsOnMethods = "createNetworkSecurityRule")
- public void getNetworkSecurityRule() {
- final NetworkSecurityRule rule = createRule();
- assertNotNull(rule);
-
- NetworkSecurityRule result = api().get(rule.name());
- assertNotNull(result);
- assertNotNull(result.etag());
- assertEquals(result.name(), rule.name());
- }
-
- @Test(dependsOnMethods = "createNetworkSecurityRule")
- public void getNetworkSecurityDefaultRule() {
- String defaultRuleName = "AllowVnetInBound";
-
- NetworkSecurityRule result = api().getDefaultRule(defaultRuleName);
-
- assertNotNull(result);
- assertNotNull(result.etag());
- assertEquals(result.name(), defaultRuleName);
- }
-
- @Test(dependsOnMethods = "createNetworkSecurityRule")
- public void listNetworkSecurityRules() {
- final NetworkSecurityRule rule = createRule();
- assertNotNull(rule);
-
- List<NetworkSecurityRule> result = api().list();
-
- assertNotNull(result);
- assertEquals(result.size(), 2);
-
- boolean rulePresent = Iterables.any(result, new Predicate<NetworkSecurityRule>() {
- public boolean apply(NetworkSecurityRule input) {
- return input.name().equals(rule.name());
- }
- });
-
- assertTrue(rulePresent);
- }
-
- @Test(dependsOnMethods = "createNetworkSecurityRule")
- public void listDefaultSecurityRules() {
- List<NetworkSecurityRule> result = api().listDefaultRules();
- assertNotNull(result);
- assertTrue(result.size() > 0);
- }
-
- @Test(dependsOnMethods = {"listNetworkSecurityRules", "listDefaultSecurityRules", "getNetworkSecurityRule"})
- public void deleteNetworkSecurityRule() {
- final NetworkSecurityRule rule = createRule();
- assertNotNull(rule);
-
- URI uri = api().delete(rule.name());
- assertResourceDeleted(uri);
- }
-
- private NetworkSecurityRule createRule() {
- NetworkSecurityRule rule = NetworkSecurityRule.create("allowalludpin", null, null,
- NetworkSecurityRuleProperties.builder()
- .description("allow all udp in")
- .protocol(Protocol.Udp)
- .sourcePortRange("*")
- .destinationPortRange("*")
- .sourceAddressPrefix("*")
- .destinationAddressPrefix("*")
- .access(Access.Allow)
- .priority(4094)
- .direction(Direction.Inbound)
- .build());
- return rule;
- }
-
- private NetworkSecurityRuleApi api() {
- return api.getNetworkSecurityRuleApi(resourceGroupName, nsgName);
- }
-
-}
-
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/NetworkSecurityRuleApiMockTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/NetworkSecurityRuleApiMockTest.java
deleted file mode 100644
index 1ca4284..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/NetworkSecurityRuleApiMockTest.java
+++ /dev/null
@@ -1,206 +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 com.google.gson.Gson;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityRule;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityRuleProperties;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityRuleProperties.Protocol;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiMockTest;
-import org.testng.annotations.Test;
-
-import java.net.URI;
-import java.util.List;
-
-import static com.google.common.collect.Iterables.isEmpty;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNull;
-import static org.testng.Assert.assertTrue;
-import static org.testng.Assert.assertNotNull;
-
-
-@Test(groups = "unit", testName = "NetworkSecurityRuleApiMockTest", singleThreaded = true)
-public class NetworkSecurityRuleApiMockTest extends BaseAzureComputeApiMockTest {
- private final String subscriptionid = "SUBSCRIPTIONID";
- private final String resourcegroup = "myresourcegroup";
- private final String apiVersion = "api-version=2016-03-30";
- private static String DEFAULT_NSG_NAME = "testNetworkSecurityGroup";
-
- private NetworkSecurityRule createRule() {
- NetworkSecurityRule rule = NetworkSecurityRule.create("allowalludpin", null, null,
- NetworkSecurityRuleProperties.builder()
- .description("allow all udp in")
- .protocol(Protocol.Udp)
- .sourcePortRange("*")
- .destinationPortRange("*")
- .sourceAddressPrefix("*")
- .destinationAddressPrefix("*")
- .access(NetworkSecurityRuleProperties.Access.Allow)
- .priority(4094)
- .direction(NetworkSecurityRuleProperties.Direction.Inbound)
- .build());
- return rule;
- }
-
- public void createNetworkSecurityRule() throws InterruptedException {
- NetworkSecurityRule rule = createRule();
-
- server.enqueue(jsonResponse("/networksecurityrulecreate.json").setResponseCode(200));
- final NetworkSecurityRuleApi ruleApi = api.getNetworkSecurityRuleApi(resourcegroup, DEFAULT_NSG_NAME);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/networkSecurityGroups/%s/securityRules/%s?%s", subscriptionid, resourcegroup, DEFAULT_NSG_NAME, rule.name(), apiVersion);
- NetworkSecurityRule result = ruleApi.createOrUpdate(rule.name(), rule.properties());
- String json = String.format("{\"properties\":%s}", new Gson().toJson(rule.properties()));
-
- assertSent(server, "PUT", path, json);
-
- assertNotNull(result);
- assertEquals(result.name(), rule.name());
- }
-
- public void getNetworkSecurityRule() throws InterruptedException {
- NetworkSecurityRule rule = createRule();
-
- server.enqueue(jsonResponse("/networksecurityruleget.json").setResponseCode(200));
- final NetworkSecurityRuleApi ruleApi = api.getNetworkSecurityRuleApi(resourcegroup, DEFAULT_NSG_NAME);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/networkSecurityGroups/%s/securityRules/%s?%s", subscriptionid, resourcegroup, DEFAULT_NSG_NAME, rule.name(), apiVersion);
- NetworkSecurityRule result = ruleApi.get(rule.name());
- assertSent(server, "GET", path);
-
- assertEquals(result.name(), rule.name());
- }
-
- public void getNetworkSecurityRuleReturns404() throws InterruptedException {
- server.enqueue(response404());
-
- String missingRuleName = "ruleismissing";
- final NetworkSecurityRuleApi ruleApi = api.getNetworkSecurityRuleApi(resourcegroup, DEFAULT_NSG_NAME);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/networkSecurityGroups/%s/securityRules/%s?%s", subscriptionid, resourcegroup, DEFAULT_NSG_NAME, missingRuleName, apiVersion);
- NetworkSecurityRule result = ruleApi.get(missingRuleName);
- assertSent(server, "GET", path);
-
- assertNull(result);
- }
-
- public void getNetworkSecurityDefaultRule() throws InterruptedException {
- server.enqueue(jsonResponse("/networksecurityrulegetdefault.json").setResponseCode(200));
- final NetworkSecurityRuleApi ruleApi = api.getNetworkSecurityRuleApi(resourcegroup, DEFAULT_NSG_NAME);
- String ruleName = "AllowVnetInBound";
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/networkSecurityGroups/%s/defaultSecurityRules/%s?%s", subscriptionid, resourcegroup, DEFAULT_NSG_NAME, ruleName, apiVersion);
- NetworkSecurityRule result = ruleApi.getDefaultRule(ruleName);
- assertSent(server, "GET", path);
-
- assertNotNull(result);
- assertEquals(result.name(), ruleName);
- }
-
- public void getNetworkSecurityDefaultRuleReturns404() throws InterruptedException {
- server.enqueue(response404());
-
- String missingRuleName = "ruleismissing";
- final NetworkSecurityRuleApi ruleApi = api.getNetworkSecurityRuleApi(resourcegroup, DEFAULT_NSG_NAME);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/networkSecurityGroups/%s/defaultSecurityRules/%s?%s", subscriptionid, resourcegroup, DEFAULT_NSG_NAME, missingRuleName, apiVersion);
- NetworkSecurityRule result = ruleApi.getDefaultRule(missingRuleName);
- assertSent(server, "GET", path);
-
- assertNull(result);
- }
-
- public void listNetworkSecurityRules() throws InterruptedException {
- server.enqueue(jsonResponse("/networksecurityrulelist.json").setResponseCode(200));
-
- final NetworkSecurityRuleApi ruleApi = api.getNetworkSecurityRuleApi(resourcegroup, DEFAULT_NSG_NAME);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/networkSecurityGroups/%s/securityRules?%s", subscriptionid, resourcegroup, DEFAULT_NSG_NAME, apiVersion);
- List<NetworkSecurityRule> result = ruleApi.list();
- assertSent(server, "GET", path);
-
- assertNotNull(result);
- assertTrue(result.size() > 0);
- }
-
- public void listNetworkSecurityRulesReturns404() throws InterruptedException {
- server.enqueue(response404());
-
- final NetworkSecurityRuleApi ruleApi = api.getNetworkSecurityRuleApi(resourcegroup, DEFAULT_NSG_NAME);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/networkSecurityGroups/%s/securityRules?%s", subscriptionid, resourcegroup, DEFAULT_NSG_NAME, apiVersion);
- List<NetworkSecurityRule> result = ruleApi.list();
- assertSent(server, "GET", path);
-
- assertTrue(isEmpty(result));
- }
-
- public void listNetworkSecurityDefaultRules() throws InterruptedException {
- server.enqueue(jsonResponse("/networksecurityrulelistdefault.json").setResponseCode(200));
-
- final NetworkSecurityRuleApi ruleApi = api.getNetworkSecurityRuleApi(resourcegroup, DEFAULT_NSG_NAME);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/networkSecurityGroups/%s/defaultSecurityRules?%s", subscriptionid, resourcegroup, DEFAULT_NSG_NAME, apiVersion);
- List<NetworkSecurityRule> result = ruleApi.listDefaultRules();
- assertSent(server, "GET", path);
-
- assertNotNull(result);
- assertTrue(result.size() > 0);
- }
-
- public void listNetworkSecurityDefaultRulesReturns404() throws InterruptedException {
- server.enqueue(response404());
-
- final NetworkSecurityRuleApi ruleApi = api.getNetworkSecurityRuleApi(resourcegroup, DEFAULT_NSG_NAME);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/networkSecurityGroups/%s/defaultSecurityRules?%s", subscriptionid, resourcegroup, DEFAULT_NSG_NAME, apiVersion);
- List<NetworkSecurityRule> result = ruleApi.listDefaultRules();
- assertSent(server, "GET", path);
-
- assertTrue(isEmpty(result));
- }
-
- public void deleteNetworkSecurityRule() throws InterruptedException {
- server.enqueue(response202WithHeader());
-
- NetworkSecurityRule rule = createRule();
-
- final NetworkSecurityRuleApi ruleApi = api.getNetworkSecurityRuleApi(resourcegroup, DEFAULT_NSG_NAME);
- URI uri = ruleApi.delete(rule.name());
-
- assertEquals(server.getRequestCount(), 1);
- assertNotNull(uri);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/networkSecurityGroups/%s/securityRules/%s?%s", subscriptionid, resourcegroup, DEFAULT_NSG_NAME, rule.name(), apiVersion);
- assertSent(server, "DELETE", path);
-
- assertTrue(uri.toString().contains("api-version"));
- assertTrue(uri.toString().contains("operationresults"));
- }
-
- public void deleteNetworkSecurityRuleDoesNotExist() throws InterruptedException {
- server.enqueue(response404());
-
- final NetworkSecurityRuleApi ruleApi = api.getNetworkSecurityRuleApi(resourcegroup, DEFAULT_NSG_NAME);
- String dummyname = "dummyrulename";
- URI uri = ruleApi.delete(dummyname);
- assertNull(uri);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/networkSecurityGroups/%s/securityRules/%s?%s", subscriptionid, resourcegroup, DEFAULT_NSG_NAME, dummyname, apiVersion);
- assertSent(server, "DELETE", path);
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/OSImageApiLiveTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/OSImageApiLiveTest.java
deleted file mode 100644
index 0756643..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/OSImageApiLiveTest.java
+++ /dev/null
@@ -1,70 +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 org.jclouds.azurecompute.arm.domain.Offer;
-import org.jclouds.azurecompute.arm.domain.Publisher;
-import org.jclouds.azurecompute.arm.domain.SKU;
-import org.jclouds.azurecompute.arm.domain.Version;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiLiveTest;
-import org.testng.annotations.Test;
-
-import static org.testng.Assert.assertTrue;
-
-@Test(groups = "live", testName = "OSImageApiLiveTest")
-public class OSImageApiLiveTest extends BaseAzureComputeApiLiveTest {
-
- @Test
- public void testPublisher() {
- List<Publisher> publishers = api().listPublishers();
- assertTrue(publishers.size() > 0);
- }
-
- @Test
- public void testList() {
- List<Offer> offerList = api().listOffers("MicrosoftWindowsServer");
- assertTrue(offerList.size() > 0);
-
- List<SKU> skuList = api().listSKUs("MicrosoftWindowsServer", offerList.get(0).name());
- assertTrue(skuList.size() > 0);
-
- List<Version> versionList = api().listVersions("MicrosoftWindowsServer", offerList.get(0).name(), skuList.get(0).name());
-
- assertTrue(versionList.size() > 0);
- }
-
- @Test
- public void testListCanonicalUbuntu() {
- Iterable<Offer> offerList = api().listOffers("canonical");
- int total = 0;
-
- for (Offer offer : offerList) {
- Iterable<SKU> skuList = api().listSKUs("canonical", offer.name());
- for (SKU sku : skuList) {
- List<Version> versionList = api().listVersions("canonical", offer.name(), sku.name());
- total += versionList.size();
- }
- }
- assertTrue(total > 0);
- }
-
- private OSImageApi api() {
- return api.getOSImageApi("eastus");
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/OSImageApiMockTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/OSImageApiMockTest.java
deleted file mode 100644
index d7dbc92..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/OSImageApiMockTest.java
+++ /dev/null
@@ -1,123 +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 static com.google.common.collect.Iterables.isEmpty;
-import static com.google.common.collect.Iterables.size;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-
-import java.util.List;
-
-import org.jclouds.azurecompute.arm.domain.Offer;
-import org.jclouds.azurecompute.arm.domain.Publisher;
-import org.jclouds.azurecompute.arm.domain.SKU;
-import org.jclouds.azurecompute.arm.domain.Version;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiMockTest;
-import org.testng.annotations.Test;
-
-@Test(groups = "unit", testName = "OSImageApiMockTest", singleThreaded = true)
-public class OSImageApiMockTest extends BaseAzureComputeApiMockTest {
-
- private final String subscriptionid = "SUBSCRIPTIONID";
- private final String apiversion = "?api-version=2015-06-15";
- private final String location = "eastus";
- private final String publisher = "MicrosoftWindowsServer";
- private final String offer = "WindowsServer";
- private final String sku = "2008-R2-SP1";
-
- final String requestUrl = "/subscriptions/" + subscriptionid + "/providers/Microsoft.Compute/locations/" + location + "/publishers";
-
- public void testPublishers() throws InterruptedException {
- server.enqueue(jsonResponse("/publishers.json"));
-
- List<Publisher> publishers = api.getOSImageApi(location).listPublishers();
-
- assertEquals(size(publishers), 2);
-
- assertSent(server, "GET", requestUrl + apiversion);
- }
- public void testPublishersEmtpy() throws InterruptedException {
- server.enqueue(response404());
-
- List<Publisher> publishers = api.getOSImageApi(location).listPublishers();
-
- assertTrue(isEmpty(publishers));
-
- assertSent(server, "GET", requestUrl + apiversion);
- }
-
- public void testOffers() throws InterruptedException {
- server.enqueue(jsonResponse("/offers.json"));
-
- List<Offer> offers = api.getOSImageApi(location).listOffers(publisher);
-
- assertEquals(size(offers), 1);
-
- assertSent(server, "GET", requestUrl + "/" + publisher + "/artifacttypes/vmimage/offers" + apiversion);
- }
- public void testOffersEmtpy() throws InterruptedException {
- server.enqueue(response404());
-
- List<Offer> offers = api.getOSImageApi(location).listOffers(publisher);
-
- assertTrue(isEmpty(offers));
-
- assertSent(server, "GET", requestUrl + "/" + publisher + "/artifacttypes/vmimage/offers" + apiversion);
- }
-
- public void testSkus() throws InterruptedException {
- server.enqueue(jsonResponse("/skus.json"));
-
- List<SKU> skus = api.getOSImageApi(location).listSKUs(publisher, offer);
-
- assertEquals(size(skus), 2);
-
- assertSent(server, "GET", requestUrl + "/" + publisher + "/artifacttypes/vmimage/offers/" + offer + "/skus" + apiversion);
- }
-
- public void testSkusEmtpy() throws InterruptedException {
- server.enqueue(response404());
-
- List<SKU> skus = api.getOSImageApi(location).listSKUs(publisher, offer);
-
- assertTrue(isEmpty(skus));
-
- assertSent(server, "GET", requestUrl + "/" + publisher + "/artifacttypes/vmimage/offers/" + offer + "/skus" + apiversion);
- }
-
- public void testVersions() throws InterruptedException {
- server.enqueue(jsonResponse("/versions.json"));
-
- List<Version> versions = api.getOSImageApi(location).listVersions(publisher, offer, sku);
-
- assertEquals(size(versions), 2);
-
- assertSent(server, "GET", requestUrl + "/" + publisher + "/artifacttypes/vmimage/offers/" + offer + "/skus/" + sku + "/versions" + apiversion);
- }
- public void testVersionsEmtpy() throws InterruptedException {
- server.enqueue(response404());
-
- List<Version> versions = api.getOSImageApi(location).listVersions(publisher, offer, sku);
-
- assertTrue(isEmpty(versions));
-
- assertSent(server, "GET", requestUrl + "/" + publisher + "/artifacttypes/vmimage/offers/" + offer + "/skus/" + sku + "/versions" + apiversion);
- }
-
-
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/PublicIPAddressApiLiveTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/PublicIPAddressApiLiveTest.java
deleted file mode 100644
index 9519ed6..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/PublicIPAddressApiLiveTest.java
+++ /dev/null
@@ -1,129 +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 static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertNull;
-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.internal.BaseAzureComputeApiLiveTest;
-import org.jclouds.util.Predicates2;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Predicate;
-import com.google.common.collect.ImmutableMap;
-
-@Test(groups = "live", singleThreaded = true)
-public class PublicIPAddressApiLiveTest extends BaseAzureComputeApiLiveTest {
-
- private final String publicIpAddressName = "myipaddress";
- private String subscriptionid;
-
- @BeforeClass
- @Override
- public void setup() {
- super.setup();
- createTestResourceGroup();
- subscriptionid = getSubscriptionId();
- }
-
- @Test(groups = "live")
- public void deletePublicIPAddressResourceDoesNotExist() {
- final PublicIPAddressApi ipApi = api.getPublicIPAddressApi(resourceGroupName);
- boolean status = ipApi.delete(publicIpAddressName);
- assertFalse(status);
- }
-
- @Test(groups = "live", dependsOnMethods = "deletePublicIPAddressResourceDoesNotExist")
- public void createPublicIPAddress() {
-
- 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(publicIpAddressName, LOCATION, tags, properties);
-
- assertNotNull(ip);
- assertEquals(ip.name(), publicIpAddressName);
- assertEquals(ip.location(), LOCATION);
- assertEquals(ip.id(), String.format("/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/publicIPAddresses/%s", subscriptionid, resourceGroupName, publicIpAddressName));
- 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);
- }
-
- @Test(groups = "live", dependsOnMethods = "createPublicIPAddress")
- public void getPublicIPAddress() {
-
- final PublicIPAddressApi ipApi = api.getPublicIPAddressApi(resourceGroupName);
-
- //Poll until resource is ready to be used
- boolean jobDone = Predicates2.retry(new Predicate<String>() {
- @Override public boolean apply(String name) {
- return ipApi.get(name).properties().provisioningState().equals("Succeeded");
- }
- }, 10 * 1000).apply(publicIpAddressName);
- assertTrue(jobDone, "get operation did not complete in the configured timeout");
-
- PublicIPAddress ip = ipApi.get(publicIpAddressName);
- assertNotNull(ip);
- assertEquals(ip.name(), publicIpAddressName);
- assertEquals(ip.location(), LOCATION);
- assertEquals(ip.id(), String.format("/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/publicIPAddresses/%s", subscriptionid, resourceGroupName, publicIpAddressName));
- assertEquals(ip.tags().get("testkey"), "testvalue");
- assertNotNull(ip.properties());
- assertEquals(ip.properties().provisioningState(), "Succeeded");
- assertNotNull(ip.properties().ipAddress()); // by this time we should have IP address already
- assertEquals(ip.properties().publicIPAllocationMethod(), "Static");
- assertEquals(ip.properties().idleTimeoutInMinutes().intValue(), 4);
- }
-
- @Test(groups = "live", dependsOnMethods = "createPublicIPAddress")
- public void listPublicIPAddresses() {
-
- final PublicIPAddressApi ipApi = api.getPublicIPAddressApi(resourceGroupName);
-
- List<PublicIPAddress> ipList = ipApi.list();
-
- assertTrue(ipList.size() > 0);
- }
-
- @Test(groups = "live", dependsOnMethods = {"listPublicIPAddresses", "getPublicIPAddress"}, alwaysRun = true)
- public void deletePublicIPAddress() {
- final PublicIPAddressApi ipApi = api.getPublicIPAddressApi(resourceGroupName);
- boolean status = ipApi.delete(publicIpAddressName);
- assertTrue(status);
- }
-
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/PublicIPAddressApiMockTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/PublicIPAddressApiMockTest.java
deleted file mode 100644
index b510580..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/PublicIPAddressApiMockTest.java
+++ /dev/null
@@ -1,178 +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 com.google.common.collect.ImmutableMap;
-import com.squareup.okhttp.mockwebserver.MockResponse;
-import org.jclouds.azurecompute.arm.domain.DnsSettings;
-import org.jclouds.azurecompute.arm.domain.PublicIPAddress;
-import org.jclouds.azurecompute.arm.domain.PublicIPAddressProperties;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiMockTest;
-import org.testng.annotations.Test;
-
-import java.util.List;
-import java.util.Map;
-
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertNull;
-
-
-@Test(groups = "unit", testName = "NetworkInterfaceCardApiMockTest", singleThreaded = true)
-public class PublicIPAddressApiMockTest extends BaseAzureComputeApiMockTest {
-
- private final String subscriptionid = "SUBSCRIPTIONID";
- private final String resourcegroup = "myresourcegroup";
- private final String apiVersion = "api-version=2015-06-15";
- private final String location = "northeurope";
- private final String publicIpName = "mypublicaddress";
-
- public void getPublicIPAddressInfo() throws InterruptedException {
- server.enqueue(jsonResponse("/PublicIPAddressGetInfo.json"));
-
- final PublicIPAddressApi ipApi = api.getPublicIPAddressApi(resourcegroup);
- PublicIPAddress ip = ipApi.get(publicIpName);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/publicIPAddresses/%s?%s", subscriptionid, resourcegroup, publicIpName, apiVersion);
- assertSent(server, "GET", path);
-
- assertNotNull(ip);
- assertEquals(ip.name(), "mypublicaddress");
- assertEquals(ip.location(), "northeurope");
- assertEquals(ip.id(), "/subscriptions/fakeb2f5-4710-4e93-bdf4-419edbde2178/resourceGroups/myresourcegroup/providers/Microsoft.Network/publicIPAddresses/mypublicaddress");
- assertEquals(ip.tags().get("testkey"), "testvalue");
- assertNotNull(ip.properties());
- assertEquals(ip.properties().provisioningState(), "Succeeded");
- assertEquals(ip.properties().ipAddress(), "12.123.12.123");
- assertEquals(ip.properties().publicIPAllocationMethod(), "Static");
- assertEquals(ip.properties().idleTimeoutInMinutes().intValue(), 4);
- assertNotNull(ip.properties().dnsSettings());
- assertEquals(ip.properties().dnsSettings().domainNameLabel(), "foobar");
- assertEquals(ip.properties().dnsSettings().fqdn(), "foobar.northeurope.cloudapp.azure.com");
- assertNotNull(ip.properties().ipConfiguration());
- assertEquals(ip.properties().ipConfiguration().id(), "/subscriptions/fakeb2f5-4710-4e93-bdf4-419edbde2178/resourceGroups/myresourcegroup/providers/Microsoft.Network/networkInterfaces/myNic/ipConfigurations/myip1");
- }
-
- public void getPublicIPAddressInfoEmpty() throws Exception {
- server.enqueue(new MockResponse().setResponseCode(404));
-
- final PublicIPAddressApi ipApi = api.getPublicIPAddressApi(resourcegroup);
- PublicIPAddress ip = ipApi.get(publicIpName);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/publicIPAddresses/%s?%s", subscriptionid, resourcegroup, publicIpName, apiVersion);
- assertSent(server, "GET", path);
-
- assertNull(ip);
- }
-
- public void listPublicIPAddresses() throws InterruptedException {
- server.enqueue(jsonResponse("/PublicIPAddressList.json"));
-
- final PublicIPAddressApi ipApi = api.getPublicIPAddressApi(resourcegroup);
- List<PublicIPAddress> ipList = ipApi.list();
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/publicIPAddresses?%s", subscriptionid, resourcegroup, apiVersion);
- assertSent(server, "GET", path);
- assertEquals(ipList.size(), 4);
- }
-
- public void listPublicIPAddressesEmpty() throws InterruptedException {
- server.enqueue(new MockResponse().setResponseCode(404));
-
- final PublicIPAddressApi ipApi = api.getPublicIPAddressApi(resourcegroup);
- List<PublicIPAddress> ipList = ipApi.list();
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/publicIPAddresses?%s", subscriptionid, resourcegroup, apiVersion);
- assertSent(server, "GET", path);
- assertEquals(ipList.size(), 0);
- }
-
- public void createPublicIPAddress() throws InterruptedException {
-
- server.enqueue(jsonResponse("/PublicIPAddressCreate.json").setStatus("HTTP/1.1 201 Created"));
-
- final PublicIPAddressApi ipApi = api.getPublicIPAddressApi(resourcegroup);
-
- final Map<String, String> tags = ImmutableMap.of("testkey", "testvalue");
-
- PublicIPAddressProperties properties = PublicIPAddressProperties.create(null, null, "Static", 4, null,
- DnsSettings.create("foobar", "foobar.northeurope.cloudapp.azure.com", null));
-
- PublicIPAddress ip = ipApi.createOrUpdate(publicIpName, location, tags, properties);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/publicIPAddresses/%s?%s", subscriptionid, resourcegroup, publicIpName, apiVersion);
- String json = String.format("{ \"location\": \"%s\", \"tags\": { \"testkey\": \"testvalue\" }, \"properties\": { \"publicIPAllocationMethod\": \"Static\", \"idleTimeoutInMinutes\": 4, \"dnsSettings\": { \"domainNameLabel\": \"foobar\", \"fqdn\": \"foobar.northeurope.cloudapp.azure.com\" } } }", location);
- assertSent(server, "PUT", path, json);
-
- assertNotNull(ip);
- assertEquals(ip.name(), "mypublicaddress");
- assertEquals(ip.location(), "northeurope");
- assertEquals(ip.id(), "/subscriptions/fakeb2f5-4710-4e93-bdf4-419edbde2178/resourceGroups/myresourcegroup/providers/Microsoft.Network/publicIPAddresses/mypublicaddress");
- 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);
- assertNotNull(ip.properties().dnsSettings());
- assertEquals(ip.properties().dnsSettings().domainNameLabel(), "foobar");
- assertEquals(ip.properties().dnsSettings().fqdn(), "foobar.northeurope.cloudapp.azure.com");
- }
-
- @Test(expectedExceptions = IllegalArgumentException.class)
- public void createPublicIPAddressDnsRecordInUse() throws IllegalArgumentException, InterruptedException {
-
- server.enqueue(jsonResponse("/PublicIPAddressCreateDnsRecordInUse.json").setStatus("HTTP/1.1 400 Bad Request"));
-
- final PublicIPAddressApi ipApi = api.getPublicIPAddressApi(resourcegroup);
-
- final Map<String, String> tags = ImmutableMap.of("testkey", "testvalue");
-
- PublicIPAddressProperties properties = PublicIPAddressProperties.create(null, null, "Static", 4, null,
- DnsSettings.create("foobar", "foobar.northeurope.cloudapp.azure.com", null));
-
- ipApi.createOrUpdate(publicIpName, location, tags, properties);
- }
-
- public void deletePublicIPAddress() throws InterruptedException {
-
- server.enqueue(response202());
-
- final PublicIPAddressApi ipApi = api.getPublicIPAddressApi(resourcegroup);
- boolean status = ipApi.delete(publicIpName);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/publicIPAddresses/%s?%s", subscriptionid, resourcegroup, publicIpName, apiVersion);
- assertSent(server, "DELETE", path);
-
- assertTrue(status);
- }
-
- public void deletePublicIPAddressResourceDoesNotExist() throws InterruptedException {
-
- server.enqueue(response204());
-
- final PublicIPAddressApi ipApi = api.getPublicIPAddressApi(resourcegroup);
- boolean status = ipApi.delete(publicIpName);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/publicIPAddresses/%s?%s", subscriptionid, resourcegroup, publicIpName, apiVersion);
- assertSent(server, "DELETE", path);
-
- assertFalse(status);
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/ResourceGroupApiLiveTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/ResourceGroupApiLiveTest.java
deleted file mode 100644
index 2dd8097..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/ResourceGroupApiLiveTest.java
+++ /dev/null
@@ -1,112 +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.net.URI;
-import java.util.List;
-
-import org.jclouds.azurecompute.arm.domain.Resource;
-import org.jclouds.azurecompute.arm.domain.ResourceGroup;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiLiveTest;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Predicate;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Iterables;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertNull;
-import static org.testng.Assert.assertTrue;
-
-@Test(groups = "live", testName = "ResourceGroupApiLiveTest")
-public class ResourceGroupApiLiveTest extends BaseAzureComputeApiLiveTest {
-
- private static final String RESOURCE_GROUP_NAME = "jcloudstest";
-
- private ResourceGroupApi api() {
- return api.getResourceGroupApi();
- }
-
- @Test(dependsOnMethods = "testCreate")
- public void testResources() {
- List<Resource> resources = api().resources(RESOURCE_GROUP_NAME);
- assertTrue(resources.isEmpty());
- for (Resource resource : resources) {
- assertNotNull(resource);
- }
- }
-
- @Test(dependsOnMethods = "testCreate")
- public void testList() {
- final List<ResourceGroup> resourceGroups = api().list();
-
- assertTrue(resourceGroups.size() > 0);
-
- assertTrue(Iterables.any(resourceGroups, new Predicate<ResourceGroup>() {
-
- @Override
- public boolean apply(final ResourceGroup group) {
- return RESOURCE_GROUP_NAME.equals(group.name());
- }
- }));
- }
-
- @Test(dependsOnMethods = "testCreate")
- public void testRead() {
- final ResourceGroup resourceGroup = api().get(RESOURCE_GROUP_NAME);
- assertNotNull(resourceGroup);
- assertEquals(resourceGroup.name(), RESOURCE_GROUP_NAME);
- assertEquals(resourceGroup.location(), LOCATION);
- }
-
- public void testCreate() {
- final ResourceGroup resourceGroup = api().create(RESOURCE_GROUP_NAME, LOCATION, null);
- assertEquals(resourceGroup.name(), RESOURCE_GROUP_NAME);
- assertEquals(resourceGroup.location(), LOCATION);
- assertNull(resourceGroup.tags());
- assertTrue(resourceGroup.id().contains(RESOURCE_GROUP_NAME));
- assertEquals(resourceGroup.properties().provisioningState(), "Succeeded");
- }
-
- @Test(dependsOnMethods = "testCreate")
- public void testUpdateWithEmptyTag() {
- ImmutableMap<String, String> tags = ImmutableMap.<String, String>builder().build();
-
- final ResourceGroup resourceGroup = api().update(RESOURCE_GROUP_NAME, tags);
-
- assertEquals(resourceGroup.tags().size(), 0);
- assertEquals(resourceGroup.properties().provisioningState(), "Succeeded");
- }
-
- @Test(dependsOnMethods = "testCreate")
- public void testUpdateWithTag() {
- ImmutableMap<String, String> tags = ImmutableMap.<String, String>builder().put("test1", "value1").build();
-
- final ResourceGroup resourceGroup = api().update(RESOURCE_GROUP_NAME, tags);
-
- assertEquals(resourceGroup.tags().size(), 1);
- assertEquals(resourceGroup.properties().provisioningState(), "Succeeded");
- }
-
- @AfterClass(alwaysRun = true)
- public void testDelete() throws Exception {
- URI uri = api().delete(RESOURCE_GROUP_NAME);
- assertResourceDeleted(uri);
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/ResourceGroupApiMockTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/ResourceGroupApiMockTest.java
deleted file mode 100644
index acac271..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/ResourceGroupApiMockTest.java
+++ /dev/null
@@ -1,173 +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.net.URI;
-import java.util.List;
-
-import org.jclouds.azurecompute.arm.domain.Resource;
-import org.jclouds.azurecompute.arm.domain.ResourceGroup;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiMockTest;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableMap;
-
-import static com.google.common.collect.Iterables.isEmpty;
-import static com.google.common.collect.Iterables.size;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertNull;
-import static org.testng.Assert.assertTrue;
-
-@Test(groups = "unit", testName = "ResourceGroupApiMockTest", singleThreaded = true)
-public class ResourceGroupApiMockTest extends BaseAzureComputeApiMockTest {
-
- final String subscriptionid = "SUBSCRIPTIONID";
- final String requestUrl = "/subscriptions/" + subscriptionid + "/resourcegroups";
- final String version = "?api-version=2015-01-01";
-
- public void testListResourceGroups() throws InterruptedException {
- server.enqueue(jsonResponse("/resourcegroups.json"));
-
- List<ResourceGroup> resourceGroups = api.getResourceGroupApi().list();
-
- assertEquals(size(resourceGroups), 2);
-
- assertSent(server, "GET", requestUrl + version);
- }
-
- public void testListResourceGroupsReturns404() throws InterruptedException {
- server.enqueue(response404());
-
- List<ResourceGroup> resourceGroups = api.getResourceGroupApi().list();
-
- assertTrue(isEmpty(resourceGroups));
-
- assertEquals(server.getRequestCount(), 1);
- assertSent(server, "GET", requestUrl + version);
- }
-
- public void testCreateResourceGroup() throws InterruptedException {
- server.enqueue(jsonResponse("/resourcegroup.json").setStatus("HTTP/1.1 201 Created"));
-
- ImmutableMap<String, String> tags = ImmutableMap.<String, String>builder().put("tagname1", "tagvalue1").build();
-
- ResourceGroup resourceGroup = api.getResourceGroupApi().create("jcloudstest", "West US", tags);
-
- assertEquals(resourceGroup.name(), "jcloudstest");
- assertEquals(resourceGroup.location(), "westus");
- assertEquals(resourceGroup.tags().size(), 1);
- assertTrue(resourceGroup.id().contains("jcloudstest"));
-
- assertEquals(server.getRequestCount(), 1);
- assertSent(server, "PUT", requestUrl + "/jcloudstest" + version, String.format("{\"location\":\"%s\", \"tags\":{\"tagname1\":\"tagvalue1\"}}", "West US"));
- }
-
- public void testCreateResourceGroupWithNoTag() throws InterruptedException {
- server.enqueue(jsonResponse("/resourcegroup.json").setStatus("HTTP/1.1 201 Created"));
-
- ResourceGroup resourceGroup = api.getResourceGroupApi().create("jcloudstest", "West US", null);
-
- assertEquals(resourceGroup.name(), "jcloudstest");
- assertEquals(resourceGroup.location(), "westus");
- assertTrue(resourceGroup.id().contains("jcloudstest"));
-
- assertEquals(server.getRequestCount(), 1);
- assertSent(server, "PUT", requestUrl + "/jcloudstest" + version, String.format("{\"location\":\"%s\"}", "West US"));
- }
-
- public void testGetResourceGroup() throws InterruptedException {
- server.enqueue(jsonResponse("/resourcegroup.json"));
-
- ResourceGroup resourceGroup = api.getResourceGroupApi().get("jcloudstest");
-
- assertEquals(resourceGroup.name(), "jcloudstest");
-
- assertEquals(server.getRequestCount(), 1);
- assertSent(server, "GET", requestUrl + "/jcloudstest" + version);
- }
-
- public void testGetResourceGroupReturns404() throws InterruptedException {
- server.enqueue(response404());
-
- ResourceGroup resourceGroup = api.getResourceGroupApi().get("jcloudstest");
-
- assertNull(resourceGroup);
-
- assertEquals(server.getRequestCount(), 1);
- assertSent(server, "GET", requestUrl + "/jcloudstest" + version);
- }
-
- public void testUpdateResourceGroupTags() throws InterruptedException {
- server.enqueue(jsonResponse("/resourcegroupupdated.json"));
-
- ImmutableMap<String, String> tags = ImmutableMap.<String, String>builder().build();
-
- ResourceGroup resourceGroup = api.getResourceGroupApi().update("jcloudstest", tags);
-
-
- assertEquals(resourceGroup.tags().size(), 0);
- assertEquals(resourceGroup.properties().provisioningState(), "Succeeded");
-
- assertEquals(server.getRequestCount(), 1);
- assertSent(server, "PATCH", requestUrl + "/jcloudstest" + version, "{\"tags\":{}}");
- }
-
- public void testDeleteResourceGroup() throws InterruptedException {
- server.enqueue(response202WithHeader());
-
- URI uri = api.getResourceGroupApi().delete("jcloudstest");
-
- assertEquals(server.getRequestCount(), 1);
- assertSent(server, "DELETE", requestUrl + "/jcloudstest" + version);
- assertNotNull(uri);
-
- assertTrue(uri.toString().contains("api-version"));
- assertTrue(uri.toString().contains("operationresults"));
- }
-
- public void testDeleteResourceGroupReturns404() throws InterruptedException {
- server.enqueue(response404());
-
- URI uri = api.getResourceGroupApi().delete("jcloudstest");
- assertNull(uri);
- assertEquals(server.getRequestCount(), 1);
- assertSent(server, "DELETE", requestUrl + "/jcloudstest" + version);
- }
-
- public void testListResourceGroupResources() throws InterruptedException {
- server.enqueue(jsonResponse("/resourcegroup-resources.json"));
-
- List<Resource> resources = api.getResourceGroupApi().resources("jcloudstest");
-
- assertEquals(size(resources), 6);
-
- assertSent(server, "GET", requestUrl + "/jcloudstest/resources" + version);
- }
-
- public void testListResourceGroupResourcesReturns404() throws InterruptedException {
- server.enqueue(response404());
-
- List<Resource> resources = api.getResourceGroupApi().resources("jcloudstest");
-
- assertTrue(isEmpty(resources));
-
- assertEquals(server.getRequestCount(), 1);
- assertSent(server, "GET", requestUrl + "/jcloudstest/resources" + version);
- }
-
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/ResourceProviderAPIMockTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/ResourceProviderAPIMockTest.java
deleted file mode 100644
index 3c90d42..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/ResourceProviderAPIMockTest.java
+++ /dev/null
@@ -1,66 +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 org.jclouds.azurecompute.arm.domain.ResourceProviderMetaData;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiMockTest;
-import org.testng.annotations.Test;
-
-import java.util.List;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNull;
-import static org.testng.Assert.assertTrue;
-
-@Test(groups = "unit", testName = "NetworkInterfaceCardApiMockTest", singleThreaded = true)
-public class ResourceProviderAPIMockTest extends BaseAzureComputeApiMockTest {
-
- final String apiVersion = "2015-01-01";
- final String resource = "Microsoft.Compute";
-
- public void getPublicIPAddressInfo() throws InterruptedException {
- server.enqueue(jsonResponse("/getresourceprovidermetadata.json"));
-
- final ResourceProviderApi resourceProviderApi = api.getResourceProviderApi();
-
- List<ResourceProviderMetaData> metaDatas = resourceProviderApi.get(resource);
-
- String path = String.format("/subscriptions/SUBSCRIPTIONID/providers/%s?api-version=%s", resource, apiVersion);
-
- assertSent(server, "GET", path);
- assertTrue(metaDatas.size() > 0);
- ResourceProviderMetaData md = metaDatas.get(0);
-
- assertEquals(md.resourceType(), "availabilitySets");
- assertEquals(md.locations().get(0), "East US");
- assertEquals(md.apiVersions().get(0), "2016-03-30");
- }
-
- public void getPublicIPAddressInfoEmpty() throws InterruptedException {
- server.enqueue(response404());
-
- final ResourceProviderApi resourceProviderApi = api.getResourceProviderApi();
-
- List<ResourceProviderMetaData> metaDatas = resourceProviderApi.get(resource);
-
- String path = String.format("/subscriptions/SUBSCRIPTIONID/providers/%s?api-version=%s", resource, apiVersion);
-
- assertSent(server, "GET", path);
- assertNull(metaDatas);
- }
-}
-
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/ResourceProviderApiLiveTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/ResourceProviderApiLiveTest.java
deleted file mode 100644
index 59ca114..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/ResourceProviderApiLiveTest.java
+++ /dev/null
@@ -1,55 +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 org.jclouds.azurecompute.arm.domain.ResourceProviderMetaData;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiLiveTest;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Predicate;
-import com.google.common.collect.Iterables;
-
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
-
-@Test(groups = "live", testName = "ResourceProviderApiLiveTest")
-public class ResourceProviderApiLiveTest extends BaseAzureComputeApiLiveTest {
-
- private final String PROVIDER = "Microsoft.Compute";
- private final String VM_RESOURCE_TYPE = "virtualMachines";
-
- private ResourceProviderApi api() {
- return api.getResourceProviderApi();
- }
-
- @Test
- public void testGetComputeProviderMetadata() {
-
- List<ResourceProviderMetaData> resourceProviderMetaDatas = api().get(PROVIDER);
-
- assertNotNull(resourceProviderMetaDatas);
-
- assertTrue(Iterables.any(resourceProviderMetaDatas, new Predicate<ResourceProviderMetaData>() {
- @Override
- public boolean apply(final ResourceProviderMetaData providerMetaData) {
- return providerMetaData.resourceType().equals(VM_RESOURCE_TYPE);
- }
- }));
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/StorageAccountApiLiveTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/StorageAccountApiLiveTest.java
deleted file mode 100644
index d01a972..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/StorageAccountApiLiveTest.java
+++ /dev/null
@@ -1,143 +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 static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertNull;
-import static org.testng.Assert.assertTrue;
-
-import java.net.URI;
-import java.util.List;
-
-import org.jclouds.azurecompute.arm.domain.StorageService;
-import org.jclouds.azurecompute.arm.domain.StorageServiceKeys;
-import org.jclouds.azurecompute.arm.domain.StorageServiceUpdateParams;
-import org.jclouds.azurecompute.arm.functions.ParseJobStatus;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiLiveTest;
-import org.jclouds.util.Predicates2;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Predicate;
-import com.google.common.collect.ImmutableMap;
-
-@Test(groups = "live", testName = "StorageAccountApiLiveTest")
-public class StorageAccountApiLiveTest extends BaseAzureComputeApiLiveTest {
-
- private static final String NAME = String.format("%3.24s",
- RAND + StorageAccountApiLiveTest.class.getSimpleName().toLowerCase());
-
- @BeforeClass
- @Override
- public void setup() {
- super.setup();
- createTestResourceGroup();
- }
-
- @Test(dependsOnMethods = "testCreate")
- public void testList() {
- List<StorageService> storages = api().list();
- assertTrue(storages.size() > 0);
- for (StorageService storage : storages) {
- check(storage);
- }
- }
-
- @Test()
- public void testIsAvailable() {
- assertTrue(api().isAvailable(NAME).nameAvailable().equals("true"));
- }
-
- @Test(dependsOnMethods = "testIsAvailable")
- public void testCreate() {
- URI uri = api().create(NAME, LOCATION, ImmutableMap.of("property_name",
- "property_value"), ImmutableMap.of("accountType", StorageService.AccountType.Standard_LRS.toString()));
- if (uri != null){
- assertTrue(uri.toString().contains("api-version"));
-
- boolean jobDone = Predicates2.retry(new Predicate<URI>() {
- @Override public boolean apply(URI uri) {
- return ParseJobStatus.JobStatus.DONE == api.getJobApi().jobStatus(uri);
- }
- }, 60 * 1 * 1000 /* 1 minute timeout */).apply(uri);
- assertTrue(jobDone, "create operation did not complete in the configured timeout");
- }
- final StorageService service = api().get(NAME);
- assertNotNull(service);
- assertEquals(service.location(), LOCATION);
- assertNotNull(service.storageServiceProperties().creationTime());
- }
-
- @Test(dependsOnMethods = "testCreate")
- public void testGet() {
- final StorageService service = api().get(NAME);
- assertNotNull(service);
- assertEquals(service.name(), NAME);
- assertEquals(service.storageServiceProperties().primaryLocation(), LOCATION);
- assertEquals(service.storageServiceProperties().accountType(), StorageService.AccountType.Standard_LRS);
- }
-
- @Test(dependsOnMethods = "testCreate")
- public void testGetKeys() {
- final StorageServiceKeys keys = api().getKeys(NAME);
- assertNotNull(keys);
- assertNotNull(keys.key1());
- assertNotNull(keys.key2());
- }
-
- @Test(dependsOnMethods = "testCreate")
- public void testRegenerateKeys() {
- StorageServiceKeys keys = api().regenerateKeys(NAME, "key1");
- assertFalse(keys.key1().isEmpty());
- assertFalse(keys.key2().isEmpty());
- }
-
- @Test(dependsOnMethods = "testCreate")
- public void testUpdateTags() {
- StorageServiceUpdateParams.StorageServiceUpdateProperties props =
- StorageServiceUpdateParams.StorageServiceUpdateProperties.create(null);
- final StorageServiceUpdateParams params = api().update(NAME,
- ImmutableMap.of("another_property_name", "another_property_value"), props);
- assertTrue(params.tags().containsKey("another_property_name"));
- assertNull(params.storageServiceProperties().accountType());
- }
-
- @Test(dependsOnMethods = {"testCreate", "testGet"})
- public void testUpdateAccountType() {
- StorageServiceUpdateParams.StorageServiceUpdateProperties props =
- StorageServiceUpdateParams.StorageServiceUpdateProperties.create(StorageService.AccountType.Standard_GRS);
- final StorageServiceUpdateParams params = api().update(NAME,
- null, props);
- assertNull(params.tags());
- assertEquals(params.storageServiceProperties().accountType(), StorageService.AccountType.Standard_GRS);
- }
-
- private void check(final StorageService storage) {
- assertNotNull(storage.id());
- assertNotNull(storage.name());
- assertNotNull(storage.storageServiceProperties());
- assertNotNull(storage.storageServiceProperties().accountType());
- assertFalse(storage.storageServiceProperties().primaryEndpoints().isEmpty());
- assertNotNull(storage.storageServiceProperties().creationTime());
- }
-
- private StorageAccountApi api() {
- return api.getStorageAccountApi(resourceGroupName);
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/StorageAccountApiMockTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/StorageAccountApiMockTest.java
deleted file mode 100644
index e3fdf6d..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/StorageAccountApiMockTest.java
+++ /dev/null
@@ -1,312 +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 com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-
-import org.jclouds.azurecompute.arm.domain.StorageService;
-import org.jclouds.azurecompute.arm.domain.Availability;
-import org.jclouds.azurecompute.arm.domain.StorageServiceKeys;
-import org.jclouds.azurecompute.arm.domain.StorageServiceUpdateParams;
-import com.squareup.okhttp.mockwebserver.MockResponse;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiMockTest;
-import org.jclouds.date.DateService;
-import org.jclouds.date.internal.SimpleDateFormatDateService;
-import org.testng.annotations.Test;
-
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import static com.google.common.collect.Iterables.isEmpty;
-
-import static org.testng.Assert.assertTrue;
-import static org.testng.Assert.assertNull;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertFalse;
-
-
-@Test(groups = "unit", testName = "StorageAccountApiMockTest", singleThreaded = true)
-public class StorageAccountApiMockTest extends BaseAzureComputeApiMockTest {
-
- private String subsriptionId = "SUBSCRIPTIONID";
- private String resourceGroup = "resourceGroup";
-
- public void testList() throws Exception {
- server.enqueue(jsonResponse("/storageAccounts.json"));
-
- final StorageAccountApi storageAPI = api.getStorageAccountApi(resourceGroup);
-
- List<StorageService> list = storageAPI.list();
- assertEquals(list, expected());
-
- assertSent(server, "GET", "/subscriptions/" + subsriptionId +
- "/resourcegroups/resourceGroup/providers/Microsoft.Storage/storageAccounts?api-version=2015-06-15");
- }
-
- public void testListReturns404() throws InterruptedException {
- server.enqueue(response404());
-
- final StorageAccountApi storageAPI = api.getStorageAccountApi(resourceGroup);
-
- List<StorageService> list = storageAPI.list();
-
- assertTrue(isEmpty(list));
-
- assertEquals(server.getRequestCount(), 1);
- assertSent(server, "GET", "/subscriptions/" + subsriptionId +
- "/resourcegroups/resourceGroup/providers/Microsoft.Storage/storageAccounts?api-version=2015-06-15");
- }
-
- public void testCreate() throws Exception {
- final StorageAccountApi storageAPI = api.getStorageAccountApi(resourceGroup);
-
- server.enqueue(response202WithHeader());
-
- URI uri = storageAPI.create("name-of-storage-account", "westus",
- ImmutableMap.of("property_name", "property_value"),
- ImmutableMap.of("accountType", StorageService.AccountType.Premium_LRS.toString()));
- assertNotNull(uri);
-
- assertSent(server, "PUT", "/subscriptions/" + subsriptionId +
- "/resourcegroups/resourceGroup/providers/Microsoft.Storage/" +
- "storageAccounts/name-of-storage-account?api-version=2015-06-15", String.format("{\"location\":\"westus\",\"tags\":{\"property_name\":\"property_value\"},\"properties\":{\"accountType\":\"Premium_LRS\"}}"));
- }
-
- public void testCreateWithNullTag() throws Exception {
- final StorageAccountApi storageAPI = api.getStorageAccountApi(resourceGroup);
-
- server.enqueue(response202WithHeader());
-
- URI uri = storageAPI.create("name-of-storage-account", "westus",
- null,
- ImmutableMap.of("accountType", StorageService.AccountType.Premium_LRS.toString()));
- assertNotNull(uri);
-
- assertSent(server, "PUT", "/subscriptions/" + subsriptionId +
- "/resourcegroups/resourceGroup/providers/Microsoft.Storage/" +
- "storageAccounts/name-of-storage-account?api-version=2015-06-15", String.format("{\"location\":\"westus\",\"properties\":{\"accountType\":\"Premium_LRS\"}}"));
- }
-
- public void testIsAvailable() throws Exception {
- server.enqueue(jsonResponse("/isavailablestorageservice.json"));
-
- final StorageAccountApi storageAPI = api.getStorageAccountApi(resourceGroup);
-
- assertEquals(storageAPI.isAvailable("TESTSTORAGE"),
- Availability.create("true"));
-
- assertSent(server, "POST", "/subscriptions/" + subsriptionId +
- "/providers/Microsoft.Storage/checkNameAvailability?api-version=2015-06-15", String.format("{\"name\":\"TESTSTORAGE\",\"type\":\"Microsoft.Storage/storageAccounts\"}"));
- }
-
- public void testGet() throws Exception {
- server.enqueue(jsonResponse("/storageservices.json"));
-
- final StorageAccountApi storageAPI = api.getStorageAccountApi(resourceGroup);
-
- assertEquals(storageAPI.get("TESTSTORAGE"), expected().get(0));
-
- assertSent(server, "GET", "/subscriptions/" + subsriptionId + "/resourcegroups/" + resourceGroup +
- "/providers/Microsoft.Storage/storageAccounts/TESTSTORAGE?api-version=2015-06-15");
- }
-
- public void testNullGet() throws Exception {
- server.enqueue(new MockResponse().setResponseCode(404));
-
- final StorageAccountApi storageAPI = api.getStorageAccountApi(resourceGroup);
-
- assertNull(storageAPI.get("TESTSTORAGE"));
-
- assertSent(server, "GET", "/subscriptions/" + subsriptionId + "/resourcegroups/" + resourceGroup +
- "/providers/Microsoft.Storage/storageAccounts/TESTSTORAGE?api-version=2015-06-15");
- }
-
- public void testGetKeys() throws Exception {
- server.enqueue(jsonResponse("/storageaccountkeys.json"));
-
- final StorageAccountApi storageAPI = api.getStorageAccountApi(resourceGroup);
-
- assertEquals(storageAPI.getKeys("TESTSTORAGE"), StorageServiceKeys.create(
- "bndO7lydwDkMo4Y0mFvmfLyi2f9aZY7bwfAVWoJWv4mOVK6E9c/exLnFsSm/NMWgifLCfxC/c6QBTbdEvWUA7w==",
- "/jMLLT3kKqY4K+cUtJTbh7pCBdvG9EMKJxUvaJJAf6W6aUiZe1A1ulXHcibrqRVA2RJE0oUeXQGXLYJ2l85L7A=="));
-
- assertSent(server, "POST", "/subscriptions/" + subsriptionId + "/resourcegroups/" + resourceGroup +
- "/providers/Microsoft.Storage/storageAccounts/TESTSTORAGE/listKeys?api-version=2015-06-15");
- }
-
- public void testNullGetKeys() throws Exception {
- server.enqueue(new MockResponse().setResponseCode(404));
-
- final StorageAccountApi storageAPI = api.getStorageAccountApi(resourceGroup);
-
- assertNull(storageAPI.getKeys("TESTSTORAGE"));
-
- assertSent(server, "POST", "/subscriptions/" + subsriptionId + "/resourcegroups/" + resourceGroup +
- "/providers/Microsoft.Storage/storageAccounts/TESTSTORAGE/listKeys?api-version=2015-06-15");
- }
-
- public void testRegenerateKeys() throws Exception {
- server.enqueue(jsonResponse("/storageaccountkeys.json"));
-
- final StorageAccountApi storageAPI = api.getStorageAccountApi(resourceGroup);
-
- assertEquals(storageAPI.regenerateKeys("TESTSTORAGE", "key1"), StorageServiceKeys.create(
- "bndO7lydwDkMo4Y0mFvmfLyi2f9aZY7bwfAVWoJWv4mOVK6E9c/exLnFsSm/NMWgifLCfxC/c6QBTbdEvWUA7w==",
- "/jMLLT3kKqY4K+cUtJTbh7pCBdvG9EMKJxUvaJJAf6W6aUiZe1A1ulXHcibrqRVA2RJE0oUeXQGXLYJ2l85L7A=="));
-
- assertSent(server, "POST", "/subscriptions/" + subsriptionId + "/resourcegroups/" + resourceGroup +
- "/providers/Microsoft.Storage/storageAccounts/TESTSTORAGE/regenerateKey?api-version=2015-06-15", String.format("{\"keyName\":\"key1\"}"));
- }
-
- public void testUpdate() throws Exception {
- server.enqueue(jsonResponse("/storageaccountupdate.json"));
-
- final StorageAccountApi storageAPI = api.getStorageAccountApi(resourceGroup);
-
- StorageServiceUpdateParams.StorageServiceUpdateProperties props =
- StorageServiceUpdateParams.StorageServiceUpdateProperties.create(StorageService.AccountType.Standard_LRS);
-
- final StorageServiceUpdateParams params = storageAPI.update("TESTSTORAGE",
- ImmutableMap.of("another_property_name", "another_property_value"), props);
-
- assertTrue(params.tags().containsKey("another_property_name"));
-
- assertSent(server, "PATCH", "/subscriptions/" + subsriptionId + "/resourcegroups/" + resourceGroup +
- "/providers/Microsoft.Storage/storageAccounts/TESTSTORAGE?api-version=2015-06-15", String.format("{\"properties\":{ \"accountType\": \"Standard_LRS\" },\"tags\":{\"another_property_name\":\"another_property_value\"}}"));
- }
-
- public void testUpdateWithNullTagAndNullProperty() throws Exception {
- server.enqueue(jsonResponse("/storageaccountupdate.json"));
-
- final StorageAccountApi storageAPI = api.getStorageAccountApi(resourceGroup);
-
- StorageServiceUpdateParams.StorageServiceUpdateProperties props =
- StorageServiceUpdateParams.StorageServiceUpdateProperties.create(null);
-
- final StorageServiceUpdateParams params = storageAPI.update("TESTSTORAGE", null, props);
-
- assertTrue(params.tags().containsKey("another_property_name"));
-
- assertSent(server, "PATCH", "/subscriptions/" + subsriptionId + "/resourcegroups/" + resourceGroup +
- "/providers/Microsoft.Storage/storageAccounts/TESTSTORAGE?api-version=2015-06-15", String.format("{\"properties\":{}}"));
- }
-
- public void testDelete() throws Exception {
- server.enqueue(new MockResponse().setResponseCode(200));
-
- final StorageAccountApi storageAPI = api.getStorageAccountApi(resourceGroup);
-
- boolean status = storageAPI.delete("TESTSTORAGE");
- assertTrue(status);
-
- assertSent(server, "DELETE", "/subscriptions/" + subsriptionId + "/resourcegroups/" + resourceGroup +
- "/providers/Microsoft.Storage/storageAccounts/TESTSTORAGE?api-version=2015-06-15");
- }
-
- public void testDelete204() throws Exception {
-
- server.enqueue(new MockResponse().setResponseCode(204));
-
- final StorageAccountApi storageAPI = api.getStorageAccountApi(resourceGroup);
-
- boolean status = storageAPI.delete("TESTSTORAGE");
- assertFalse(status);
-
- assertSent(server, "DELETE", "/subscriptions/" + subsriptionId + "/resourcegroups/" + resourceGroup +
- "/providers/Microsoft.Storage/storageAccounts/TESTSTORAGE?api-version=2015-06-15");
- }
-
- private List<StorageService> expected() throws MalformedURLException {
- DateService DATE_SERVICE = new SimpleDateFormatDateService();
- Map<String, String> endpoints = new HashMap<String, String>();
- endpoints.put("blob", "https://TESTSTORAGE.blob.core.windows.net/");
- endpoints.put("file", "https://TESTSTORAGE.file.core.windows.net/");
- endpoints.put("queue", "https://TESTSTORAGE.queue.core.windows.net/");
- endpoints.put("table", "https://TESTSTORAGE.table.core.windows.net/");
- Map<String, String> secondaryEndpoints = new HashMap<String, String>();
- secondaryEndpoints.put("blob", "https://TESTSTORAGE-secondary.blob.core.windows.net/");
- secondaryEndpoints.put("queue", "https://TESTSTORAGE-secondary.queue.core.windows.net/");
- secondaryEndpoints.put("table", "https://TESTSTORAGE-secondary.table.core.windows.net/");
- Map<String, String> endpoints2 = new HashMap<String, String>();
- endpoints2.put("blob", "https://TESTSTORAGE2.blob.core.windows.net/");
- endpoints2.put("file", "https://TESTSTORAGE2.file.core.windows.net/");
- endpoints2.put("queue", "https://TESTSTORAGE2.queue.core.windows.net/");
- endpoints2.put("table", "https://TESTSTORAGE2.table.core.windows.net/");
- Map<String, String> secondaryEndpoints2 = new HashMap<String, String>();
- secondaryEndpoints2.put("blob", "https://TESTSTORAGE2-secondary.blob.core.windows.net/");
- secondaryEndpoints2.put("queue", "https://TESTSTORAGE2-secondary.queue.core.windows.net/");
- secondaryEndpoints2.put("table", "https://TESTSTORAGE2-secondary.table.core.windows.net/");
- Map<String, String> endpoints3 = new HashMap<String, String>();
- endpoints3.put("blob", "https://TESTSTORAGE3.blob.core.windows.net/");
- endpoints3.put("file", "https://TESTSTORAGE3.file.core.windows.net/");
- endpoints3.put("queue", "https://TESTSTORAGE3.queue.core.windows.net/");
- endpoints3.put("table", "https://TESTSTORAGE3.table.core.windows.net/");
- Map<String, String> secondaryEndpoints3 = new HashMap<String, String>();
- secondaryEndpoints3.put("blob", "https://TESTSTORAGE3-secondary.blob.core.windows.net/");
- secondaryEndpoints3.put("queue", "https://TESTSTORAGE3-secondary.queue.core.windows.net/");
- secondaryEndpoints3.put("table", "https://TESTSTORAGE3-secondary.table.core.windows.net/");
-
-
- String location = "westus";
- String secondaryLocation = "eastus";
- final StorageService.StorageServiceProperties props = StorageService.StorageServiceProperties.create(
- StorageService.AccountType.Standard_RAGRS,
- DATE_SERVICE.iso8601DateOrSecondsDateParse("2016-02-24T13:04:45.0890883Z"),
- endpoints,
- location,
- StorageService.Status.Succeeded, secondaryEndpoints, secondaryLocation,
- StorageService.RegionStatus.Available,
- StorageService.RegionStatus.Available);
- final StorageService.StorageServiceProperties props2 = StorageService.StorageServiceProperties.create(
- StorageService.AccountType.Standard_RAGRS,
- DATE_SERVICE.iso8601DateOrSecondsDateParse("2016-02-24T13:11:43.8265672Z"),
- endpoints2, location,
- StorageService.Status.Succeeded, secondaryEndpoints2, secondaryLocation,
- StorageService.RegionStatus.Available,
- StorageService.RegionStatus.Available);
- final StorageService.StorageServiceProperties props3 = StorageService.StorageServiceProperties.create(
- StorageService.AccountType.Standard_RAGRS,
- DATE_SERVICE.iso8601DateOrSecondsDateParse("2016-02-24T14:12:59.5223315Z"),
- endpoints3, location,
- StorageService.Status.Succeeded, secondaryEndpoints3, secondaryLocation,
- StorageService.RegionStatus.Available,
- StorageService.RegionStatus.Available);
-
- final Map<String, String> tags = ImmutableMap.of(
- "key1", "value1",
- "key2", "value2");
-
- return ImmutableList.of(StorageService.create(
- "/subscriptions/SUBSCRIPTIONID/resourceGroups/resourceGroup/" +
- "providers/Microsoft.Storage/storageAccounts/TESTSTORAGE",
- "TESTSTORAGE", location, tags, "Microsoft.Storage/storageAccounts", props),
- StorageService.create(
- "/subscriptions/SUBSCRIPTIONID/resourceGroups/resourceGroup/" +
- "providers/Microsoft.Storage/storageAccounts/TESTSTORAGE2",
- "TESTSTORAGE2", location, tags, "Microsoft.Storage/storageAccounts", props2),
- StorageService.create(
- "/subscriptions/SUBSCRIPTIONID/resourceGroups/resourceGroup/" +
- "providers/Microsoft.Storage/storageAccounts/TESTSTORAGE3",
- "TESTSTORAGE3", location, tags, "Microsoft.Storage/storageAccounts", props3));
- }
-
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/SubnetApiLiveTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/SubnetApiLiveTest.java
deleted file mode 100644
index 8144001..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/SubnetApiLiveTest.java
+++ /dev/null
@@ -1,93 +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 static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
-
-import java.util.List;
-
-import org.jclouds.azurecompute.arm.domain.Subnet;
-import org.jclouds.azurecompute.arm.domain.VirtualNetwork;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiLiveTest;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-@Test(groups = "live", singleThreaded = true)
-public class SubnetApiLiveTest extends BaseAzureComputeApiLiveTest {
-
- private String virtualNetworkName;
- private String subnetName;
-
- @BeforeClass
- @Override
- public void setup() {
- super.setup();
- createTestResourceGroup();
- virtualNetworkName = String.format("vn-%s-%s", this.getClass().getSimpleName().toLowerCase(),
- System.getProperty("user.name"));
- subnetName = "jclouds-" + RAND;
-
- // Subnets belong to a virtual network so that needs to be created first
- // VN will be deleted when resource group is deleted
- VirtualNetwork vn = createDefaultVirtualNetwork(resourceGroupName, virtualNetworkName, "10.2.0.0/16", LOCATION);
- assertNotNull(vn);
- }
-
- @Test
- public void deleteSubnetResourceDoesNotExist() {
- assertFalse(api().delete(subnetName));
- }
-
- @Test(dependsOnMethods = "deleteSubnetResourceDoesNotExist")
- public void createSubnet() {
- //Create properties object
- //addressPrefix must match Virtual network address space!
- Subnet.SubnetProperties properties = Subnet.SubnetProperties.builder().addressPrefix("10.2.0.0/23").build();
-
- Subnet subnet = api().createOrUpdate(subnetName, properties);
-
- assertEquals(subnet.name(), subnetName);
- assertEquals(subnet.properties().addressPrefix(), "10.2.0.0/23");
- }
-
- @Test(dependsOnMethods = "createSubnet")
- public void getSubnet() {
- Subnet subnet = api().get(subnetName);
- assertNotNull(subnet.name());
- assertNotNull(subnet.properties().addressPrefix());
- }
-
- @Test(dependsOnMethods = "createSubnet")
- public void listSubnets() {
- List<Subnet> subnets = api().list();
- assertTrue(subnets.size() > 0);
- }
-
- @Test(dependsOnMethods = {"listSubnets", "getSubnet"}, alwaysRun = true)
- public void deleteSubnet() {
- boolean status = api().delete(subnetName);
- assertTrue(status);
- }
-
- private SubnetApi api() {
- return api.getSubnetApi(resourceGroupName, virtualNetworkName);
- }
-
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/SubnetApiMockTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/SubnetApiMockTest.java
deleted file mode 100644
index 3d58591..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/SubnetApiMockTest.java
+++ /dev/null
@@ -1,139 +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 static com.google.common.collect.Iterables.isEmpty;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertNull;
-import static org.testng.Assert.assertTrue;
-
-import java.util.List;
-
-import org.jclouds.azurecompute.arm.domain.Subnet;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiMockTest;
-import org.testng.annotations.Test;
-
-
-@Test(groups = "unit", testName = "SubnetApiMockTest", singleThreaded = true)
-public class SubnetApiMockTest extends BaseAzureComputeApiMockTest {
-
- private final String subscriptionid = "SUBSCRIPTIONID";
- private final String resourcegroup = "myresourcegroup";
- private final String virtualNetwork = "myvirtualnetwork";
- private final String subnetName = "mysubnet";
- private final String apiVersion = "api-version=2017-03-01";
-
- public void createSubnet() throws InterruptedException {
-
- server.enqueue(jsonResponse("/createsubnetresponse.json").setResponseCode(200));
-
- final SubnetApi subnetApi = api.getSubnetApi(resourcegroup, virtualNetwork);
-
- Subnet.SubnetProperties properties = Subnet.SubnetProperties.builder().addressPrefix("10.2.0.0/24").build();
-
- Subnet subnet = subnetApi.createOrUpdate(subnetName, properties);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/virtualNetworks/%s/subnets/%s?%s", subscriptionid, resourcegroup, virtualNetwork, subnetName, apiVersion);
- String json = "{ \"properties\":{\"addressPrefix\":\"10.2.0.0/24\"}}";
- assertSent(server, "PUT", path, json);
-
- assertEquals(subnet.name(), subnetName);
- assertEquals(subnet.properties().addressPrefix(), "10.2.0.0/24");
- }
-
- public void getSubnet() throws InterruptedException {
-
- server.enqueue(jsonResponse("/getonesubnet.json").setResponseCode(200));
-
- final SubnetApi subnetApi = api.getSubnetApi(resourcegroup, virtualNetwork);
-
- Subnet subnet = subnetApi.get(subnetName);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/virtualNetworks/%s/subnets/%s?%s", subscriptionid, resourcegroup, virtualNetwork, subnetName, apiVersion);
- assertSent(server, "GET", path);
-
- assertEquals(subnet.name(), subnetName);
- assertEquals(subnet.properties().addressPrefix(), "10.2.0.0/24");
- }
-
- public void getSubnetReturns404() throws InterruptedException {
- server.enqueue(response404());
-
- final SubnetApi subnetApi = api.getSubnetApi(resourcegroup, virtualNetwork);
-
- Subnet subnet = subnetApi.get(subnetName);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/virtualNetworks/%s/subnets/%s?%s", subscriptionid, resourcegroup, virtualNetwork, subnetName, apiVersion);
- assertSent(server, "GET", path);
-
- assertNull(subnet);
- }
-
- public void listSubnets() throws InterruptedException {
-
- server.enqueue(jsonResponse("/listsubnetswithinvirtualnetwork.json").setResponseCode(200));
-
- final SubnetApi subnetApi = api.getSubnetApi(resourcegroup, virtualNetwork);
-
- List<Subnet> subnets = subnetApi.list();
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/virtualNetworks/%s/subnets?%s", subscriptionid, resourcegroup, virtualNetwork, apiVersion);
- assertSent(server, "GET", path);
-
- assertTrue(subnets.size() > 0);
- }
-
- public void listSubnetsReturns404() throws InterruptedException {
- server.enqueue(response404());
-
- final SubnetApi subnetApi = api.getSubnetApi(resourcegroup, virtualNetwork);
-
- List<Subnet> subnets = subnetApi.list();
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/virtualNetworks/%s/subnets?%s", subscriptionid, resourcegroup, virtualNetwork, apiVersion);
- assertSent(server, "GET", path);
-
- assertTrue(isEmpty(subnets));
- }
-
- public void deleteSubnet() throws InterruptedException {
-
- server.enqueue(response202());
-
- final SubnetApi subnetApi = api.getSubnetApi(resourcegroup, virtualNetwork);
-
- boolean status = subnetApi.delete(subnetName);
- assertTrue(status);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/virtualNetworks/%s/subnets/%s?%s", subscriptionid, resourcegroup, virtualNetwork, subnetName, apiVersion);
- assertSent(server, "DELETE", path);
- }
-
- public void deleteSubnetResourceDoesNotExist() throws InterruptedException {
-
- server.enqueue(response204());
-
- final SubnetApi subnetApi = api.getSubnetApi(resourcegroup, virtualNetwork);
-
- boolean status = subnetApi.delete(subnetName);
- assertFalse(status);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/virtualNetworks/%s/subnets/%s?%s", subscriptionid, resourcegroup, virtualNetwork, subnetName, apiVersion);
- assertSent(server, "DELETE", path);
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VMSizeApiLiveTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VMSizeApiLiveTest.java
deleted file mode 100644
index 90e258b..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VMSizeApiLiveTest.java
+++ /dev/null
@@ -1,40 +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 org.jclouds.azurecompute.arm.domain.VMSize;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiLiveTest;
-import org.testng.annotations.Test;
-
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
-
-@Test(groups = "live", testName = "VMSizeApiLiveTest")
-public class VMSizeApiLiveTest extends BaseAzureComputeApiLiveTest {
-
- @Test
- public void testList() {
- for (VMSize vmSize : api().list()) {
- assertNotNull(vmSize.name());
- }
- assertTrue(api().list().size() > 0);
- }
-
- private VMSizeApi api() {
- return api.getVMSizeApi(LOCATION);
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VMSizeApiMockTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VMSizeApiMockTest.java
deleted file mode 100644
index 6717e8b..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VMSizeApiMockTest.java
+++ /dev/null
@@ -1,57 +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 com.squareup.okhttp.mockwebserver.MockResponse;
-import org.jclouds.azurecompute.arm.domain.VMSize;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiMockTest;
-import org.testng.annotations.Test;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
-
-import java.util.List;
-
-@Test(groups = "unit", testName = "VMSizeApiMockTest", singleThreaded = true)
-public class VMSizeApiMockTest extends BaseAzureComputeApiMockTest {
-
- public void testList() throws Exception {
- server.enqueue(jsonResponse("/vmsizes.json"));
- final VMSizeApi vmSizeAPI = api.getVMSizeApi("westeurope");
- List<VMSize> vmSizes = vmSizeAPI.list();
-
- assertNotNull(vmSizes);
- assertEquals(vmSizes.size(), 3);
- assertEquals(
- vmSizes.get(0),
- VMSize.create("Standard_A0", 1, 1047552, 20480, 768, 1));
-
-
- assertSent(server, "GET", "/subscriptions/SUBSCRIPTIONID/providers/Microsoft.Compute/locations/westeurope/vmSizes?api-version=2015-06-15");
- }
-
- public void testEmptyList() throws Exception {
- server.enqueue(new MockResponse().setResponseCode(404));
-
- final VMSizeApi vmSizeAPI = api.getVMSizeApi("location");
-
- assertTrue(vmSizeAPI.list().isEmpty());
-
- assertSent(server, "GET", "/subscriptions/SUBSCRIPTIONID/providers/Microsoft.Compute/locations/location/vmSizes?api-version=2015-06-15");
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VaultApiLiveTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VaultApiLiveTest.java
deleted file mode 100644
index 026aa28..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VaultApiLiveTest.java
+++ /dev/null
@@ -1,1057 +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.net.URI;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.List;
-import java.util.ArrayList;
-
-import com.google.common.base.Predicate;
-import com.google.common.collect.FluentIterable;
-import org.jclouds.azurecompute.arm.domain.Certificate;
-import org.jclouds.azurecompute.arm.domain.Certificate.Contact;
-import org.jclouds.azurecompute.arm.domain.Certificate.Contacts;
-import org.jclouds.azurecompute.arm.domain.Certificate.AdministrationDetails;
-import org.jclouds.azurecompute.arm.domain.Certificate.CertificateIssuer;
-import org.jclouds.azurecompute.arm.domain.Certificate.CertificateBundle;
-import org.jclouds.azurecompute.arm.domain.Certificate.CertificateOperation;
-import org.jclouds.azurecompute.arm.domain.Certificate.CertificatePolicy;
-import org.jclouds.azurecompute.arm.domain.Certificate.DeletedCertificate;
-import org.jclouds.azurecompute.arm.domain.Certificate.DeletedCertificateBundle;
-import org.jclouds.azurecompute.arm.domain.Certificate.OrganizationDetails;
-import org.jclouds.azurecompute.arm.domain.Certificate.IssuerBundle;
-import org.jclouds.azurecompute.arm.domain.Certificate.IssuerCredentials;
-import org.jclouds.azurecompute.arm.domain.Certificate.IssuerParameters;
-import org.jclouds.azurecompute.arm.domain.Certificate.KeyProperties;
-import org.jclouds.azurecompute.arm.domain.Certificate.SecretProperties;
-import org.jclouds.azurecompute.arm.domain.Certificate.X509CertificateProperties;
-import org.jclouds.azurecompute.arm.domain.Secret;
-import org.jclouds.azurecompute.arm.domain.Secret.SecretBundle;
-import org.jclouds.azurecompute.arm.domain.Secret.SecretAttributes;
-import org.jclouds.azurecompute.arm.domain.Secret.DeletedSecretBundle;
-import org.jclouds.azurecompute.arm.domain.Key;
-import org.jclouds.azurecompute.arm.domain.Key.JsonWebKey;
-import org.jclouds.azurecompute.arm.domain.Key.KeyBundle;
-import org.jclouds.azurecompute.arm.domain.Key.KeyAttributes;
-import org.jclouds.azurecompute.arm.domain.Key.DeletedKeyBundle;
-import org.jclouds.azurecompute.arm.domain.Key.KeyOperationResult;
-import org.jclouds.azurecompute.arm.domain.SKU;
-import org.jclouds.azurecompute.arm.domain.Vault;
-import org.jclouds.azurecompute.arm.domain.Vault.DeletedVault;
-import org.jclouds.azurecompute.arm.domain.VaultProperties;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiLiveTest;
-import org.testng.SkipException;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-
-import static com.google.common.base.Preconditions.checkState;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
-import static org.testng.Assert.assertEquals;
-import static org.testng.AssertJUnit.assertNull;
-
-@Test(groups = "live", testName = "VaultApiLiveTest")
-public class VaultApiLiveTest extends BaseAzureComputeApiLiveTest {
- private String vaultName;
- private URI vaultUri = null;
- private static String KEY_NAME = "myKey";
- private static String IMPORT_KEY_NAME = "myImportKey";
- private static String RECOVERABLE_KEY_NAME = "myRecoverableKey";
- private static String SECRET_NAME = "mySecret";
- private static String RECOVERABLE_SECRET_NAME = "myRecoverableSecret";
- private static String CERTIFICATE_NAME = "myCertificate";
- private static String TEMP_CERTIFICATE_NAME = "myTempCertificate";
- private static String RECOVERABLE_CERTIFICATE_NAME = "myRecoverableCertificate";
- private static String IMPORTABLE_CERTIFICATE_NAME = "myImportableCertificate";
- private String importableCertificatePem = stringFromResource("/vaultimportablecert.txt");
- private String sampleSecret = stringFromResource("/vaultsamplesecret.txt");
- private static String cryptoText = "R29sZCUyNTIxJTJCR29sZCUyNTIxJTJCR2" +
- "9sZCUyQmZyb20lMkJ0aGUlMkJBbWVyaWNhbiUyQlJpdmVyJTI1MjE";
- private static String cryptoAlgorithm = "RSA-OAEP";
- private static String hashToSign = "FvabKT6qGwpml59iHUJ72DZ4XyJcJ8bgpgFA4_8JFmM";
- private static String signatureAlgorithm = "RS256";
- private static String contentEncryptionKey = "YxzoHR65aFwD2_IOiZ5rD08jMSALA1y7b_yYW0G3hyI";
-
- @BeforeClass
- @Override
- public void setup() {
- super.setup();
- createTestResourceGroup();
- vaultName = String.format("kv%s", this.getClass().getSimpleName().toLowerCase());
- }
-
- @AfterClass(alwaysRun = true)
- public void forceVaultRemoval() {
- // see if the vault has been deleted or not
- Vault vault = api().getVault(vaultName);
- if (vault != null) {
- if ((vault.properties().enableSoftDelete() != null) && vault.properties().enableSoftDelete()) {
- api().deleteVault(vaultName);
- checkState(deletedVaultStatus.create(resourceGroupName, true).apply(vaultName),
- "vault was not deleted before timeout");
- } else {
- return;
- }
- }
-
- DeletedVault deletedVault = api().getDeletedVault(LOCATION, vaultName);
- if (deletedVault != null) {
- api().purgeVault(LOCATION, vaultName);
- checkState(deletedVaultStatus.create(resourceGroupName, false).apply(vaultName),
- "vault was not purged before timeout");
- }
- }
-
- @Test
- public void testCreate() {
- String objectId = api.getServicePrincipal().get().objectId();
- Vault vault = api().createOrUpdateVault(vaultName, LOCATION, VaultProperties.builder()
- .tenantId(tenantId)
- .sku(SKU.create(LOCATION, "standard", null, "A"))
- .accessPolicies(ImmutableList.of(VaultProperties.AccessPolicyEntry.create(null, objectId, tenantId,
- VaultProperties.Permissions.create(
- ImmutableList.of( // certificates
- "Get",
- "List",
- "Update",
- "Create",
- "Import",
- "Delete",
- "ManageContacts",
- "ManageIssuers",
- "GetIssuers",
- "ListIssuers",
- "SetIssuers",
- "DeleteIssuers",
- "Purge",
- "Recover"
- ),
- ImmutableList.of( // keys
- "Get",
- "List",
- "Update",
- "Create",
- "Import",
- "Delete",
- "Recover",
- "Backup",
- "Restore",
- "Purge",
- "Encrypt",
- "Decrypt",
- "Sign",
- "Verify",
- "WrapKey",
- "UnwrapKey"
- ),
- ImmutableList.of( // secrets
- "Get",
- "List",
- "Set",
- "Delete",
- "Recover",
- "Backup",
- "Restore",
- "Purge"
- ),
- ImmutableList.<String>of()
- ))))
- .build(),
- null);
- vaultUri = vault.properties().vaultUri();
- assertTrue(!vault.name().isEmpty());
- }
-
- @Test(dependsOnMethods = "testCreate")
- public void testGet() {
- Vault vaultFound = api().getVault(vaultName);
- assertNotNull(vaultFound);
- }
-
- @Test(dependsOnMethods = "testCreate")
- public void testList() {
- for (Vault vault : api().listVaults()) {
- assertTrue(!vault.name().isEmpty());
- }
- }
-
- @Test(dependsOnMethods = {"testDeleteKey", "testDeleteSecret"})
- public void testUpdateVaultToSoftDelete() {
- Vault v = api().getVault(vaultName);
- assertNotNull(v);
- VaultProperties newProps = VaultProperties.create(v.properties().tenantId(),
- v.properties().vaultUri(),
- v.properties().enabledForDeployment(),
- v.properties().enabledForTemplateDeployment(),
- true,
- v.properties().createMode(),
- v.properties().sku(),
- v.properties().accessPolicies());
- Vault updatedVault = api().createOrUpdateVault(vaultName, LOCATION, newProps, null);
- assertNotNull(updatedVault);
- updatedVault = api().getVault(vaultName);
- assertTrue(updatedVault.properties().enableSoftDelete());
- }
-
- @Test(dependsOnMethods = {"testPurgeDeletedKey", "testPurgeDeletedSecret"})
- public void testDelete() {
- boolean result = api().deleteVault(vaultName);
- assertTrue(result);
- checkState(deletedVaultStatus.create(resourceGroupName, true).apply(vaultName),
- "vault was not deleted before timeout");
- }
-
- @Test(dependsOnMethods = "testDelete")
- public void testGetDeleted() {
- DeletedVault dv = api().getDeletedVault(LOCATION, vaultName);
- assertNotNull(dv);
- }
-
- @Test(dependsOnMethods = "testDelete")
- public void testListDeleted() {
- for (DeletedVault vault : api().listDeletedVaults()) {
- assertNotNull(vault.name());
- }
- }
-
- @Test(dependsOnMethods = {"testGetDeleted", "testListDeleted"})
- public void testPurgeDeletedVault() {
- api().purgeVault(LOCATION, vaultName);
- checkState(deletedVaultStatus.create(resourceGroupName, true).apply(vaultName),
- "vault was not purged before timeout");
-
- }
-
- @Test(dependsOnMethods = "testGet")
- public void testCreateKey() {
- KeyAttributes keyAttr = KeyAttributes.create(true, 0, null, null, null, null);
- KeyBundle keyBundle = api().createKey(vaultUri,
- KEY_NAME,
- keyAttr,
- null,
- null,
- 2048,
- "RSA",
- null
- );
- assertNotNull(keyBundle);
- }
-
- @Test(dependsOnMethods = "testCreateKey")
- public void testImportKey() {
- KeyAttributes keyAttr = KeyAttributes.create(true, null, null, null, null, null);
- List<String> keyOps = new ArrayList<String>();
- keyOps.add("encrypt");
- JsonWebKey keyInfo = JsonWebKey.create(
- null,
- "DjU54mYvHpICXHjc5-JiFqiH8NkUgOG8LL4kwt3DeBp9bP0-5hSJH8vmzwJkeGG9L79EWG4b_bfxgYdeNX7cFFagmW" +
- "PRFrlxbd64VRYFawZHRJt-2cbzMVI6DL8EK4bu5Ux5qTiV44Jw19hoD9nDzCTfPzSTSGrKD3iLPdnREYaIGDVxcjB" +
- "v3Tx6rrv3Z2lhHHKhEHb0RRjATcjAVKV9NZhMajJ4l9pqJ3A4IQrCBl95ux6Xm1oXP0i6aR78cjchsCpcMXdP3WMs" +
- "vHgTlsZT0RZLFHrvkiNHlPiil4G2_eHkwvT__CrcbO6SmI_zCtMmypuHJqcr-Xb7GPJoa64WoQ",
- "DB9nGuHplY_7Xv5a5UCs5YgxkWPtJFfbIZ1Zr-XHCCY09JIWReOGQG226OhjwixKtOK_OqmAKtMKM9OmKviJRHNbD" +
- "hbTxumN3u7cL8dftjXpSryiEQlPmWyW94MneI2WNIrvh4wruQuDt8EztgOiDFxwcnUgey8iend7WmZnE7E",
- "O-bSTUQ4N_UuQezgkF3TDrnBraO67leDGwR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zP5Tti4",
- null,
- null
- );
- KeyBundle importedKey = api().importKey(vaultUri, IMPORT_KEY_NAME, false, keyAttr, keyInfo, null);
- assertNotNull(importedKey);
- }
-
- @Test(dependsOnMethods = "testCreateKey")
- public void testListKeys() {
- for (Key key : api().listKeys(vaultUri)) {
- assertNotNull(key);
- }
- }
-
- @Test(dependsOnMethods = "testListKeys")
- public void testGetKey() {
- KeyBundle keyBundle = api().getKey(vaultUri, KEY_NAME);
- assertNotNull(keyBundle);
- }
-
- @Test(dependsOnMethods = "testGetKey")
- public void testUpdateKey() {
- Map<String, String> tags = new HashMap<String, String>();
- tags.put("purpose", "testing");
- KeyBundle updatedKey = api().updateKey(vaultUri, KEY_NAME, "", null, null, tags);
- assertNotNull(updatedKey.tags());
- assertEquals(updatedKey.tags().size(), 1);
- }
-
- @Test(dependsOnMethods = "testUpdateKey")
- public void testListKeyVersions() {
- // Create a second version of the key
- KeyAttributes keyAttr = KeyAttributes.create(true, null, null, null, null, null);
- KeyBundle keyBundle = api().createKey(vaultUri,
- KEY_NAME,
- keyAttr,
- null,
- null,
- 3072,
- "RSA",
- null);
-
- // List key versions
- List<Key> keys = api().getKeyVersions(vaultUri, KEY_NAME);
- assertNotNull(keys);
- assertTrue(keys.size() > 1);
- }
-
- @Test(dependsOnMethods = "testListKeyVersions")
- public void testUpdateKeyWithVersion() {
- List<Key> keys = api().getKeyVersions(vaultUri, KEY_NAME);
- assertNotNull(keys);
- assertTrue(keys.size() > 1);
-
- // get key version to operate on
- Key key = keys.get(1);
- assertNotNull(key);
- final String version = key.kid().substring(key.kid().lastIndexOf("/") + 1).trim();
-
- Map<String, String> tags = new HashMap<String, String>();
- tags.put("purpose", "testing again");
- KeyBundle updatedKey = api().updateKey(vaultUri, KEY_NAME, version, null, null, tags);
- assertNotNull(updatedKey);
-
- FluentIterable<Key> iKeys = FluentIterable.from(api().getKeyVersions(vaultUri, KEY_NAME));
- assertTrue(iKeys.anyMatch(new Predicate<Key>() {
- @Override public boolean apply(Key input) {
- return input.kid().contains(version);
- }
- }));
-
- assertEquals(tags, updatedKey.tags());
- }
-
- @Test(dependsOnMethods = "testUpdateKeyWithVersion")
- public void testBackupRestoreKey() {
- KeyBundle originalKey = api().getKey(vaultUri, KEY_NAME);
- assertNotNull(originalKey);
-
- String backupKey = api().backupKey(vaultUri, KEY_NAME);
- assertNotNull(backupKey);
-
- DeletedKeyBundle dkb = api().deleteKey(vaultUri, KEY_NAME);
- assertNotNull(dkb);
-
- KeyBundle restoredKey = api().restoreKey(vaultUri, backupKey);
- assertNotNull(restoredKey);
-
- KeyBundle verifyKey = api().getKey(vaultUri, KEY_NAME);
- assertNotNull(verifyKey);
-
- assertEquals(verifyKey, originalKey);
- }
-
- @Test(dependsOnMethods = "testBackupRestoreKey")
- public void testDeleteKey() {
- DeletedKeyBundle dkb = api().deleteKey(vaultUri, KEY_NAME);
- assertNotNull(dkb);
- }
-
- @Test(dependsOnMethods = "testUpdateVaultToSoftDelete")
- public void testCreateRecoverableKey() {
- KeyAttributes keyAttr = KeyAttributes.create(true, null, null, null, null, null);
- KeyBundle keyBundle = api().createKey(vaultUri, RECOVERABLE_KEY_NAME,
- keyAttr,
- null,
- null,
- 2048,
- "RSA",
- null
- );
- assertNotNull(keyBundle);
- checkState(recoverableKeyStatus.create(resourceGroupName, vaultUri, false).apply(RECOVERABLE_KEY_NAME),
- "key was not created before timeout");
- }
-
- @Test(dependsOnMethods = "testCreateRecoverableKey")
- public void testDeleteRecoverableKey() {
- DeletedKeyBundle dkb = api().deleteKey(vaultUri, RECOVERABLE_KEY_NAME);
- assertNotNull(dkb.deletedDate());
- assertNotNull(dkb.recoveryId());
- checkState(deletedKeyStatus.create(resourceGroupName, vaultUri, true).apply(RECOVERABLE_KEY_NAME),
- "key was not deleted before timeout");
- }
-
- @Test(dependsOnMethods = "testDeleteRecoverableKey")
- public void testListDeletedKeys() {
- for (DeletedKeyBundle key : api().listDeletedKeys(vaultUri)) {
- assertNotNull(key.deletedDate());
- }
- }
-
- @Test(dependsOnMethods = "testListDeletedKeys")
- public void testGetDeletedKey() {
- DeletedKeyBundle key = api().getDeletedKey(vaultUri, RECOVERABLE_KEY_NAME);
- assertNotNull(key.deletedDate());
- }
-
- @Test(dependsOnMethods = {"testDeleteRecoverableKey", "testGetDeletedKey"})
- public void testRecoverDeletedKey() {
- KeyBundle key = api().recoverDeletedKey(vaultUri, RECOVERABLE_KEY_NAME);
- checkState(recoverableKeyStatus.create(resourceGroupName, vaultUri, true).apply(RECOVERABLE_KEY_NAME),
- "key was not recovered before timeout");
- }
-
- @Test(dependsOnMethods = "testRecoverDeletedKey")
- public void testPurgeDeletedKey() {
- // delete the key
- DeletedKeyBundle dkb = api().deleteKey(vaultUri, RECOVERABLE_KEY_NAME);
- checkState(deletedKeyStatus.create(resourceGroupName, vaultUri, true).apply(RECOVERABLE_KEY_NAME),
- "key was not deleted before timeout");
-
- // purge the key and verify that it is no longer listed as deleted
- api().purgeDeletedKey(vaultUri, RECOVERABLE_KEY_NAME);
- checkState(deletedKeyStatus.create(resourceGroupName, vaultUri, false).apply(RECOVERABLE_KEY_NAME),
- "key was not purged before timeout");
- }
-
- @Test(dependsOnMethods = "testCreateKey")
- public void testEncryptDecrypt() {
- // Encrypt some text
- KeyOperationResult encryptResult = api().encrypt(vaultUri,
- KEY_NAME,
- "",
- cryptoAlgorithm,
- cryptoText
- );
- assertNotNull(encryptResult);
- assertTrue(encryptResult.value().length() > cryptoText.length());
-
- // Decrypt the encrypted text
- KeyOperationResult decryptResult = api().decrypt(vaultUri,
- KEY_NAME,
- "",
- cryptoAlgorithm,
- encryptResult.value()
- );
- assertNotNull(decryptResult);
- assertTrue(decryptResult.value().equals(cryptoText));
- }
-
- @Test(dependsOnMethods = "testCreateKey")
- public void testSignVerify() {
- // Sign a hash
- KeyOperationResult signResult = api().sign(vaultUri,
- KEY_NAME,
- "",
- signatureAlgorithm,
- hashToSign
- );
- assertNotNull(signResult);
- assertTrue(!signResult.value().isEmpty());
-
- // Verify the signature
- boolean verifyResult = api().verify(vaultUri,
- KEY_NAME,
- "",
- signatureAlgorithm,
- hashToSign,
- signResult.value()
- );
- assertTrue(verifyResult);
- }
-
- @Test(dependsOnMethods = "testCreateKey")
- public void testWrapUnwrapKey() {
- // Wrap a 256bit symmetric key
- KeyOperationResult wrapResult = api().wrap(vaultUri,
- KEY_NAME,
- "",
- cryptoAlgorithm,
- contentEncryptionKey
- );
- assertNotNull(wrapResult);
- assertTrue(!wrapResult.value().isEmpty());
-
- // Unwrap symmetric key
- KeyOperationResult unwrapResult = api().unwrap(vaultUri,
- KEY_NAME,
- "",
- cryptoAlgorithm,
- wrapResult.value()
- );
- assertNotNull(unwrapResult);
- assertTrue(unwrapResult.value().equals(contentEncryptionKey));
- }
-
- @Test(dependsOnMethods = "testBackupRestoreKey")
- public void testSetSecret() {
- SecretAttributes attributes = SecretAttributes.create(true, null, null, null, null, null);
- SecretBundle secretBundle = api().setSecret(vaultUri,
- SECRET_NAME,
- attributes,
- "testSecretKey",
- null,
- sampleSecret
- );
- assertNotNull(secretBundle);
- }
-
- @Test(dependsOnMethods = "testSetSecret")
- public void testGetSecret() {
- SecretBundle secret = api().getSecret(vaultUri, SECRET_NAME, null);
- assertNotNull(secret);
- }
-
- @Test(dependsOnMethods = "testSetSecret")
- public void testGetSecrets() {
- for (Secret secret : api().listSecrets(vaultUri)) {
- assertNotNull(secret);
- }
- }
-
- @Test(dependsOnMethods = {"testBackupRestoreSecret"})
- public void testDeleteSecret() {
- DeletedSecretBundle dsb = api().deleteSecret(vaultUri, SECRET_NAME);
- assertNotNull(dsb);
- }
-
- @Test(dependsOnMethods = "testGetSecret")
- public void testUpdateSecret() {
- Map<String, String> tags = new HashMap<String, String>();
- tags.put("purpose", "testing");
- SecretBundle updatedSecret = api().updateSecret(vaultUri, SECRET_NAME, "", null, null, tags);
- assertNotNull(updatedSecret.tags());
- assertEquals(updatedSecret.tags().size(), 1);
- }
-
- @Test(dependsOnMethods = "testUpdateSecret")
- public void testListSecretVersions() {
- // Create a second version of the secret
- SecretAttributes attributes = SecretAttributes.create(true, null, null, null, null, null);
- SecretBundle secretBundle = api().setSecret(vaultUri,
- SECRET_NAME,
- attributes,
- "aNewSecretKey",
- null,
- "-----BEGIN DSA PRIVATE KEY-----\n" +
- "MIIBvAIBAAKBgQDvgcVEyeU5gfw69xY2n1zHWGp/Z8O573SiWIcy29rW382W6jvn\n" +
- "X5rF/LX8AscwRhf2pUTEy64ECkd08eRgEjRIKdGSaTZpBXxM25TPb2fF9k1/ObXd\n" +
- "SkNOQNlwoCHdyQlvwdkVRohJoBX9u371owXObwLiBR1V597p3PdGNYD3DQIVAPtD\n" +
- "dHQQaHCYMxAIXRsaCmOZfsjdAoGBANVOovY4XqS48hvi/RzcCMbRbuHMFBXh/lEM\n" +
- "FmBdZ5sczpi1S3KpEjnBPQfOTzspTlEm5y6cHbkQjh1qT1tMdPAAr5aHYVLCTR+v\n" +
- "CSSALXP48YiZrJcgdyfhbyr5h/Su2QuwX2DvYrR9d88fYHU4O0njEyMd8UFwQ6Uy\n" +
- "qez/catgAoGAJ2AbSklFUXYvehmCVO6XVo3bgO++C3GMycJY3HHTTFQNAb3LJkeO\n" +
- "fa2ZCSqWbd85M00Lt0VEkqlb0EkjDvAgL0R78IJUmvb3FH1RiUofP/yK3g1/3I/l\n" +
- "jUa1fXXn2jSFYcyzGaDnC2U/B55g9G7hXsXJuldwATfDnLtqCdNPoWcCFQDx5K/k\n" +
- "Ub4xHF/4Tau8wDAkxHeJiw==\n" +
- "-----END DSA PRIVATE KEY-----"
- );
-
- // List secret versions
- List<Secret> secrets = api().getSecretVersions(vaultUri, SECRET_NAME);
- assertNotNull(secrets);
- assertEquals(secrets.size(), 2);
- }
-
- @Test(dependsOnMethods = "testListSecretVersions")
- public void testUpdateSecretWithVersion() {
- List<Secret> secrets = api().getSecretVersions(vaultUri, SECRET_NAME);
- assertNotNull(secrets);
- assertEquals(secrets.size(), 2);
-
- // get secret version to operate on
- Secret secret = secrets.get(1);
- assertNotNull(secret);
- String version = secret.id().substring(secret.id().lastIndexOf("/") + 1).trim();
-
- Map<String, String> tags = new HashMap<String, String>();
- tags.put("purpose", "testing again");
- SecretBundle updatedSecret = api().updateSecret(vaultUri, SECRET_NAME, version, null, null, tags);
- assertNotNull(updatedSecret);
-
- secrets = api().getSecretVersions(vaultUri, SECRET_NAME);
- assertNotNull(secrets);
- boolean found = false;
- for (Secret s : secrets) {
- if (s.id().contains(version)) {
- secret = s;
- found = true;
- break;
- }
- }
- assertTrue(found);
- assertEquals(tags, secret.tags());
- }
-
- @Test(dependsOnMethods = "testUpdateSecretWithVersion")
- public void testBackupRestoreSecret() {
- SecretBundle originalSecret = api().getSecret(vaultUri, SECRET_NAME, null);
- assertNotNull(originalSecret);
-
- String backupSecret = api().backupSecret(vaultUri, SECRET_NAME);
- assertNotNull(backupSecret);
-
- DeletedSecretBundle dsb = api().deleteSecret(vaultUri, SECRET_NAME);
- assertNotNull(dsb);
-
- SecretBundle restoredSecret = api().restoreSecret(vaultUri, backupSecret);
- assertNotNull(restoredSecret);
-
- SecretBundle verifySecret = api().getSecret(vaultUri, SECRET_NAME, null);
- assertNotNull(verifySecret);
-
- assertEquals(verifySecret, originalSecret);
- }
-
- @Test(dependsOnMethods = "testUpdateVaultToSoftDelete")
- public void testCreateRecoverableSecret() {
- SecretAttributes attributes = SecretAttributes.create(true, null, null, null, null, null);
- SecretBundle secretBundle = api().setSecret(vaultUri,
- RECOVERABLE_SECRET_NAME,
- attributes,
- "aNewSecretKey",
- null,
- "-----BEGIN DSA PRIVATE KEY-----\n" +
- "MIIBvAIBAAKBgQDvgcVEyeU5gfw69xY2n1zHWGp/Z8O573SiWIcy29rW382W6jvn\n" +
- "X5rF/LX8AscwRhf2pUTEy64ECkd08eRgEjRIKdGSaTZpBXxM25TPb2fF9k1/ObXd\n" +
- "SkNOQNlwoCHdyQlvwdkVRohJoBX9u371owXObwLiBR1V597p3PdGNYD3DQIVAPtD\n" +
- "dHQQaHCYMxAIXRsaCmOZfsjdAoGBANVOovY4XqS48hvi/RzcCMbRbuHMFBXh/lEM\n" +
- "FmBdZ5sczpi1S3KpEjnBPQfOTzspTlEm5y6cHbkQjh1qT1tMdPAAr5aHYVLCTR+v\n" +
- "CSSALXP48YiZrJcgdyfhbyr5h/Su2QuwX2DvYrR9d88fYHU4O0njEyMd8UFwQ6Uy\n" +
- "qez/catgAoGAJ2AbSklFUXYvehmCVO6XVo3bgO++C3GMycJY3HHTTFQNAb3LJkeO\n" +
- "fa2ZCSqWbd85M00Lt0VEkqlb0EkjDvAgL0R78IJUmvb3FH1RiUofP/yK3g1/3I/l\n" +
- "jUa1fXXn2jSFYcyzGaDnC2U/B55g9G7hXsXJuldwATfDnLtqCdNPoWcCFQDx5K/k\n" +
- "Ub4xHF/4Tau8wDAkxHeJiw==\n" +
- "-----END DSA PRIVATE KEY-----"
- );
- assertNotNull(secretBundle);
- checkState(recoverableSecretStatus.create(resourceGroupName, vaultUri, false).apply(RECOVERABLE_SECRET_NAME),
- "secret was not created before timeout");
- }
-
- @Test(dependsOnMethods = "testCreateRecoverableSecret")
- public void testDeleteRecoverableSecret() {
- DeletedSecretBundle dsb = api().deleteSecret(vaultUri, RECOVERABLE_SECRET_NAME);
- assertNotNull(dsb.deletedDate());
- assertNotNull(dsb.recoveryId());
- checkState(deletedSecretStatus.create(resourceGroupName, vaultUri, true).apply(RECOVERABLE_SECRET_NAME),
- "secret was not deleted before timeout");
- }
-
- @Test(dependsOnMethods = "testDeleteRecoverableSecret")
- public void testListDeletedSecrets() {
- for (DeletedSecretBundle secret : api().listDeletedSecrets(vaultUri)) {
- assertNotNull(secret.deletedDate());
- }
- }
-
- @Test(dependsOnMethods = "testListDeletedSecrets")
- public void testGetDeletedSecret() {
- DeletedSecretBundle dsb = api().getDeletedSecret(vaultUri, RECOVERABLE_SECRET_NAME);
- assertNotNull(dsb.deletedDate());
- }
-
- @Test(dependsOnMethods = {"testDeleteRecoverableSecret", "testGetDeletedSecret"})
- public void testRecoverDeletedSecret() {
- SecretBundle secret = api().recoverDeletedSecret(vaultUri, RECOVERABLE_SECRET_NAME);
- checkState(recoverableSecretStatus.create(resourceGroupName, vaultUri, true).apply(RECOVERABLE_SECRET_NAME),
- "secret was not created before timeout");
- }
-
- @Test(dependsOnMethods = "testRecoverDeletedSecret")
- public void testPurgeDeletedSecret() {
- // delete the secret
- DeletedSecretBundle dsb = api().deleteSecret(vaultUri, RECOVERABLE_SECRET_NAME);
- checkState(deletedSecretStatus.create(resourceGroupName, vaultUri, true).apply(RECOVERABLE_SECRET_NAME),
- "secret was not deleted before timeout");
-
- // purge the secret and verify that it is no longer listed as deleted
- api().purgeDeletedSecret(vaultUri, RECOVERABLE_SECRET_NAME);
- checkState(deletedSecretStatus.create(resourceGroupName, vaultUri, false).apply(RECOVERABLE_SECRET_NAME),
- "secret was not purged before timeout");
- }
-
- @Test(dependsOnMethods = "testGet")
- public void testCreateCertificate() {
- CertificatePolicy policy = Certificate.CertificatePolicy.create(null,
- CERTIFICATE_NAME,
- IssuerParameters.create(null, "Self"),
- KeyProperties.create(false, 2048, "RSA", false),
- null,
- null,
- X509CertificateProperties.create(null, null, null, "CN=mycertificate.foobar.com", 12)
- );
- assertNotNull(policy);
-
- CertificateOperation certOp = api().createCertificate(vaultUri,
- CERTIFICATE_NAME,
- null,
- policy,
- null
- );
- assertNotNull(certOp);
- }
-
- @Test(dependsOnMethods = "testCreateCertificate")
- public void testImportCertificate() {
- String certPem = importableCertificatePem;
- CertificateBundle certBundle = api().importCertificate(
- vaultUri,
- IMPORTABLE_CERTIFICATE_NAME,
- null,
- CertificatePolicy.create(
- null,
- null,
- null,
- null,
- null,
- SecretProperties.create("application/x-pem-file"),
- null
- ),
- null,
- null,
- certPem);
- assertNotNull(certBundle);
- }
-
- @Test(dependsOnMethods = "testImportCertificate")
- public void testMergeCertificate() {
- /* XXX - Merging certificates is used in the case where a CSR is generated
- * within the Azure Key Vault and then signed by an external entity.
- * Since this requires an offline process outside the scope of automated
- * tests, this test is currently not implemented.
- */
- throw new SkipException("merging certificates requires an external entity, skipping");
- }
-
- @Test(dependsOnMethods = "testGetCertificateOperation")
- public void testGetCertificate() {
- CertificateBundle certBundle = api().getCertificate(vaultUri, "myCertificate", null);
- assertNotNull(certBundle);
- }
-
- @Test(dependsOnMethods = "testGetCertificateOperation")
- public void testListCertificates() {
- List<Certificate> certs = api().getCertificates(vaultUri);
- assertTrue(!certs.isEmpty());
- for (Certificate cert : certs) {
- assertNotNull(cert.id());
- }
- }
-
- @Test(dependsOnMethods = "testGetCertificateOperation")
- public void testListCertificateVersions() {
- List<Certificate> certs = api().getCertificateVersions(vaultUri, CERTIFICATE_NAME);
- assertNotNull(certs);
- assertEquals(certs.size(), 1);
- }
-
- @Test(dependsOnMethods = "testGetCertificatePolicy")
- public void testUpdateCertificate() {
- Map<String, String> tags = new HashMap<String, String>();
- tags.put("selfsigned", "true");
- CertificatePolicy policy = api().getCertificatePolicy(
- vaultUri,
- CERTIFICATE_NAME
- );
- assertNotNull(policy);
- CertificateBundle certBundle = api().updateCertificate(
- vaultUri,
- CERTIFICATE_NAME,
- "",
- null,
- policy,
- tags
- );
- assertNotNull(certBundle);
- assertEquals(certBundle.tags().size(), 1);
- }
-
- @Test(dependsOnMethods = "testUpdateCertificate")
- public void testUpdateCertificateVersion() {
- // create a new version of the certificate
- /*
- * XXX -- update using version complains about needing policy (required input), yet
- * passing in the same policy results in the error:
- *
- * Policy cannot be updated with a specific version of a certificate
- *
- * Will uncomment/fix once this issue is resolved.
- *
- */
- throw new SkipException("bug in requirements for function");
- }
-
- @Test(dependsOnMethods = {"testDeleteCertificateOperation", "testDeleteCertificateIssuer",
- "testDeleteCertificateContacts", "testUpdateCertificatePolicy"})
- public void testDeleteCertificate() {
- DeletedCertificateBundle dcb = api().deleteCertificate(
- vaultUri,
- CERTIFICATE_NAME
- );
- assertNotNull(dcb);
- }
-
- @Test(dependsOnMethods = "testCreateCertificate")
- public void testGetCertificateOperation() {
- CertificateOperation certOp = api().getCertificateOperation(vaultUri, CERTIFICATE_NAME);
- assertNotNull(certOp);
- checkState(certificateOperationStatus.create(resourceGroupName, vaultUri, true).apply(CERTIFICATE_NAME),
- "certificate was not created before timeout");
- }
-
- @Test(dependsOnMethods = "testDeleteCertificateContacts")
- public void testUpdateCertificateOperation() {
- CertificatePolicy policy = Certificate.CertificatePolicy.create(null,
- TEMP_CERTIFICATE_NAME,
- IssuerParameters.create(null, "Self"),
- KeyProperties.create(false, 4096, "RSA", false),
- null,
- null,
- X509CertificateProperties.create(null, null, null, "CN=mytempcertificate.foobar.com", 12)
- );
- assertNotNull(policy);
- CertificateOperation certOp = api().createCertificate(vaultUri,
- TEMP_CERTIFICATE_NAME,
- null,
- policy,
- null
- );
- assertNotNull(certOp);
-
- certOp = api().updateCertificateOperation(vaultUri, TEMP_CERTIFICATE_NAME, true);
- assertNotNull(certOp);
- assertTrue(certOp.cancellationRequested());
- }
-
- @Test(dependsOnMethods = "testUpdateCertificateOperation")
- public void testDeleteCertificateOperation() {
- CertificateOperation certOp = api().deleteCertificateOperation(vaultUri, TEMP_CERTIFICATE_NAME);
- assertNotNull(certOp);
- checkState(certificateOperationStatus.create(resourceGroupName, vaultUri, false).apply(TEMP_CERTIFICATE_NAME),
- "certificate was not deleted before timeout");
- }
-
- @Test(dependsOnMethods = "testGetCertificate")
- public void testSetCertificateIssuer() {
- AdministrationDetails adminDetail = AdministrationDetails.create(
- "adminguy@certsforme.com",
- "Admin",
- "Guy",
- "867-5309"
- );
- List<AdministrationDetails> adminDetails = new ArrayList<AdministrationDetails>();
- adminDetails.add(adminDetail);
- OrganizationDetails orgDetails = OrganizationDetails.create(
- adminDetails,
- null
- );
- IssuerBundle issuer = api().setCertificateIssuer(
- vaultUri,
- "globalsign01",
- null,
- IssuerCredentials.create("imauser", "This1sMyPa55wurD!"),
- orgDetails,
- "GlobalSign"
- );
- assertNotNull(issuer);
- }
-
- @Test(dependsOnMethods = "testSetCertificateIssuer")
- public void testGetCertificateIssuers() {
- List<CertificateIssuer> issuers = api().getCertificateIssuers(vaultUri);
- assertNotNull(issuers);
- assertTrue(issuers.size() > 0);
- }
-
- @Test(dependsOnMethods = "testSetCertificateIssuer")
- public void testGetCertificateIssuer() {
- IssuerBundle issuer = api().getCertificateIssuer(vaultUri, "globalsign01");
- assertNotNull(issuer);
- assertEquals(issuer.provider(), "GlobalSign");
- }
-
- @Test(dependsOnMethods = "testGetCertificateIssuer")
- public void testUpdateCertificateIssuer() {
- AdministrationDetails adminDetail = AdministrationDetails.create(
- "adminguy@certsforme.com",
- "Admin",
- "Guy",
- "867-5309"
- );
- List<AdministrationDetails> adminDetails = new ArrayList<AdministrationDetails>();
- adminDetails.add(adminDetail);
- OrganizationDetails orgDetails = OrganizationDetails.create(
- adminDetails,
- null
- );
- IssuerBundle issuer = api().updateCertificateIssuer(
- vaultUri,
- "globalsign01",
- null,
- IssuerCredentials.create("imauser", "CanHa5P455wuRd!"),
- orgDetails,
- "GlobalSign"
- );
- assertNotNull(issuer);
- }
-
- @Test(dependsOnMethods = "testUpdateCertificateIssuer")
- public void testDeleteCertificateIssuer() {
- IssuerBundle issuer = api().deleteCertificateIssuer(vaultUri, "globalsign01");
- assertNotNull(issuer);
-
- issuer = api().getCertificateIssuer(vaultUri, "globalsign01");
- assertEquals(issuer, null);
- }
-
- @Test(dependsOnMethods = "testDeleteCertificateIssuer")
- public void testSetCertificateContacts() {
- List<Contact> contactsIn = new ArrayList<Contact>();
- contactsIn.add(Contact.create("foo@bar.com", "Foo bar", "867-5309"));
- Contacts contacts = api().setCertificateContacts(vaultUri, contactsIn);
- assertNotNull(contacts);
- }
- @Test(dependsOnMethods = "testSetCertificateContacts")
- public void testGetCertificateContacts() {
- Contacts contacts = api().getCertificateContacts(vaultUri);
- assertNotNull(contacts.id());
- assertEquals(contacts.contacts().size(), 1);
- }
-
- @Test(dependsOnMethods = "testGetCertificateContacts")
- public void testDeleteCertificateContacts() {
- Contacts contacts = api().deleteCertificateContacts(vaultUri);
- assertNotNull(contacts.id());
-
- contacts = api().getCertificateContacts(vaultUri);
- assertNull(contacts);
- }
-
- @Test(dependsOnMethods = "testCreateCertificate")
- public void testGetCertificatePolicy() {
- CertificatePolicy policy = api().getCertificatePolicy(vaultUri, CERTIFICATE_NAME);
- assertNotNull(policy);
- }
-
- @Test(dependsOnMethods = "testUpdateCertificate")
- public void testUpdateCertificatePolicy() {
- CertificatePolicy policy = api().updateCertificatePolicy(
- vaultUri,
- CERTIFICATE_NAME,
- null,
- null,
- KeyProperties.create(true, 3072, "RSA", false),
- null,
- null,
- null
- );
- assertNotNull(policy);
- assertTrue(policy.keyProps().exportable());
- }
-
- @Test(dependsOnMethods = "testUpdateVaultToSoftDelete")
- public void testImportRecoverableCertificate() {
- String certPem = importableCertificatePem;
- CertificateBundle certBundle = api().importCertificate(
- vaultUri,
- RECOVERABLE_CERTIFICATE_NAME,
- null,
- CertificatePolicy.create(
- null,
- null,
- null,
- null,
- null,
- SecretProperties.create("application/x-pem-file"),
- null
- ),
- null,
- null,
- certPem);
- checkState(recoverableCertificateStatus.create(resourceGroupName, vaultUri, true).apply(RECOVERABLE_CERTIFICATE_NAME),
- "certificate was not imported before timeout");
-
- certBundle = api().getCertificate(vaultUri, RECOVERABLE_CERTIFICATE_NAME, null);
- assertNotNull(certBundle);
- assertTrue(certBundle.attributes().recoveryLevel().contains("Recoverable"));
- }
-
- @Test(dependsOnMethods = "testImportRecoverableCertificate")
- public void testDeleteRecoverableCertificate() {
- DeletedCertificateBundle dcb = api().deleteCertificate(vaultUri, RECOVERABLE_CERTIFICATE_NAME);
- assertNotNull(dcb.deletedDate());
- assertNotNull(dcb.recoveryId());
- checkState(deletedCertificateStatus.create(resourceGroupName, vaultUri, true).apply(RECOVERABLE_CERTIFICATE_NAME),
- "certificate was not deleted before timeout");
- }
-
- @Test(dependsOnMethods = "testDeleteRecoverableCertificate")
- public void testListDeletedCertificates() {
- for (DeletedCertificate dc : api().getDeletedCertificates(vaultUri)) {
- assertNotNull(dc.deletedDate());
- }
- }
-
- @Test(dependsOnMethods = "testListDeletedCertificates")
- public void testGetDeletedCertificate() {
- DeletedCertificateBundle dcb = api().getDeletedCertificate(vaultUri, RECOVERABLE_CERTIFICATE_NAME);
- assertNotNull(dcb.deletedDate());
- }
-
- @Test(dependsOnMethods = "testGetDeletedCertificate")
- public void testRecoverDeletedCertificate() {
- CertificateBundle dcb = api().recoverDeletedCertificate(vaultUri, RECOVERABLE_CERTIFICATE_NAME);
- assertNotNull(dcb);
- checkState(recoverableCertificateStatus.create(resourceGroupName, vaultUri, false).apply(RECOVERABLE_CERTIFICATE_NAME),
- "certificate was not recovered before timeout");
- }
-
- @Test(dependsOnMethods = "testRecoverDeletedCertificate")
- public void testPurgeDeletedCertificate() {
- // delete the certificate
- DeletedCertificateBundle dcb = api().deleteCertificate(vaultUri, RECOVERABLE_CERTIFICATE_NAME);
- checkState(deletedCertificateStatus.create(resourceGroupName, vaultUri, true).apply(RECOVERABLE_CERTIFICATE_NAME),
- "certificate was not deleted before timeout");
-
- // purge the certificate and verify that it is no longer listed as deleted
- api().purgeDeletedCertificate(vaultUri, RECOVERABLE_CERTIFICATE_NAME);
- checkState(deletedCertificateStatus.create(resourceGroupName, vaultUri, false).apply(RECOVERABLE_CERTIFICATE_NAME),
- "certificate was not purged before timeout");
- }
-
- private VaultApi api() {
- return api.getVaultApi(resourceGroupName);
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VaultApiMockTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VaultApiMockTest.java
deleted file mode 100644
index 7459f48..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VaultApiMockTest.java
+++ /dev/null
@@ -1,1619 +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 static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertNull;
-import static org.testng.Assert.assertTrue;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import java.util.List;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.Arrays;
-import java.util.ArrayList;
-
-import org.jclouds.azurecompute.arm.domain.Certificate;
-import org.jclouds.azurecompute.arm.domain.Certificate.AdministrationDetails;
-import org.jclouds.azurecompute.arm.domain.Certificate.CertificateAttributes;
-import org.jclouds.azurecompute.arm.domain.Certificate.CertificateBundle;
-import org.jclouds.azurecompute.arm.domain.Certificate.CertificateIssuer;
-import org.jclouds.azurecompute.arm.domain.Certificate.CertificateOperation;
-import org.jclouds.azurecompute.arm.domain.Certificate.CertificatePolicy;
-import org.jclouds.azurecompute.arm.domain.Certificate.Contact;
-import org.jclouds.azurecompute.arm.domain.Certificate.Contacts;
-import org.jclouds.azurecompute.arm.domain.Certificate.DeletedCertificate;
-import org.jclouds.azurecompute.arm.domain.Certificate.DeletedCertificateBundle;
-import org.jclouds.azurecompute.arm.domain.Certificate.IssuerBundle;
-import org.jclouds.azurecompute.arm.domain.Certificate.IssuerCredentials;
-import org.jclouds.azurecompute.arm.domain.Certificate.IssuerParameters;
-import org.jclouds.azurecompute.arm.domain.Certificate.KeyProperties;
-import org.jclouds.azurecompute.arm.domain.Certificate.OrganizationDetails;
-import org.jclouds.azurecompute.arm.domain.Certificate.SecretProperties;
-import org.jclouds.azurecompute.arm.domain.Certificate.X509CertificateProperties;
-import org.jclouds.azurecompute.arm.domain.Key;
-import org.jclouds.azurecompute.arm.domain.Key.DeletedKeyBundle;
-import org.jclouds.azurecompute.arm.domain.Key.JsonWebKey;
-import org.jclouds.azurecompute.arm.domain.Key.KeyAttributes;
-import org.jclouds.azurecompute.arm.domain.Key.KeyBundle;
-import org.jclouds.azurecompute.arm.domain.Key.KeyOperationResult;
-import org.jclouds.azurecompute.arm.domain.SKU;
-import org.jclouds.azurecompute.arm.domain.Secret;
-import org.jclouds.azurecompute.arm.domain.Secret.DeletedSecretBundle;
-import org.jclouds.azurecompute.arm.domain.Secret.SecretAttributes;
-import org.jclouds.azurecompute.arm.domain.Secret.SecretBundle;
-import org.jclouds.azurecompute.arm.domain.Vault;
-import org.jclouds.azurecompute.arm.domain.Vault.DeletedVault;
-import org.jclouds.azurecompute.arm.domain.VaultProperties;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiMockTest;
-import org.jclouds.rest.ResourceNotFoundException;
-import org.testng.SkipException;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-
-
-@Test(groups = "unit", testName = "VaultApiMockTest", singleThreaded = true)
-public class VaultApiMockTest extends BaseAzureComputeApiMockTest {
- private final String subscriptionId = "SUBSCRIPTIONID";
- private final String resourceGroup = "myresourcegroup";
- private final String tenantId = "myTenantId";
- private final String identityObjId = "myIdentityObjectId";
- private final String vaultName = "kvvaultapimocktest";
- private final String apiVersion = "api-version=2016-10-01";
- private final String location = "westeurope";
- private URI vaultUri;
-
- private static String KEY_NAME = "myKey";
- private static String TEMP_KEY_NAME = "myTempKey";
- private static String IMPORT_KEY_NAME = "myImportKey";
- private static String RECOVERABLE_KEY_NAME = "myRecoverableKey";
- private static String SECRET_NAME = "mySecret";
- private static String RECOVERABLE_SECRET_NAME = "myRecoverableSecret";
- private static String CERTIFICATE_NAME = "myCertificate";
- private static String TEMP_CERTIFICATE_NAME = "myTempCertificate";
- private static String RECOVERABLE_CERTIFICATE_NAME = "myRecoverableCertificate";
- private static String IMPORTABLE_CERTIFICATE_NAME = "myImportableCertificate";
- private static String CERTIFICATE_ISSUER_NAME = "globalsign01";
- private String IMPORTABLE_CERTIFICATE_PEM = stringFromResource("/vaultimportablecert.txt");
- private String sampleSecret = stringFromResource("/vaultsamplesecret.txt");
- private String keyBackup = stringFromResource("/vaultkeybackup.txt");
- private String secretBackup = stringFromResource("/vaultsecretbackup.txt");
- private String[] mergeX5C = {
- stringFromResource("/vaultmergex5c-1.txt"),
- stringFromResource("/vaultmergex5c-2.txt"),
- stringFromResource("/vaultmergex5c-3.txt")
- };
- private static String cryptoText = "R29sZCUyNTIxJTJCR29sZCUyNTIxJTJCR2" +
- "9sZCUyQmZyb20lMkJ0aGUlMkJBbWVyaWNhbiUyQlJpdmVyJTI1MjE";
- private static String cryptoAlgorithm = "RSA-OAEP";
- private static String hashToSign = "FvabKT6qGwpml59iHUJ72DZ4XyJcJ8bgpgFA4_8JFmM";
- private static String signatureAlgorithm = "RS256";
- private static String contentEncryptionKey = "YxzoHR65aFwD2_IOiZ5rD08jMSALA1y7b_yYW0G3hyI";
- private static String keyDecryptData = "0_S8pyjjnGRlcbDa-Lt0jYjMXpXrf9Fat3elx-fSO" +
- "g3dj6mYgEEs6kt79OMD4MFmVyOt6umeWAfdDIkNVnqb5fgyWceveh9wN-37jc5CFgG2PF3XI" +
- "A6RII-HF2BkBcVa9KcAX3_di4KQE70PXgHf-dlz_RgLOJILeG50wzFeBFCLsjEEPp3itmoai" +
- "E6vfDidCRm5At8Vjka0G-N_afwkIijfQZLT0VaXvL39cIJE2QN3HJPZM8YPUlkFlYnY4GIRy" +
- "RWSBpK_KYuVufzUGtDi6Sh8pUa67ppa7DHVZlixlmnVqI3Oeg6XUvMqbFFqVSrcNbRQDwVGL" +
- "3cUtK-KB1PfKg";
- private static String keySignedData = "uO0r4P1cB-fKsDZ8cj5ahiNw8Tdsudt5zLCeEKOt29" +
- "LAlPDpeGx9Q1SOFNaR7JlRYVelxsohdzvydwX8ao6MLnqlpdEj0Xt5Aadp-kN84AXW238gab" +
- "S1AUyiWILCmdsBFeRU4wTRSxz2qGS_0ztHkaNln32P_9GJC72ZRlgZoVA4C_fowZolUoCWGj" +
- "4V7fAzcSoiNYipWP0HkFe3xmuz-cSQg3CCAs-MclHHfMeSagLJZZQ9bpl5LIr-Ik89bNtqEq" +
- "yP7Jb_fCgHajAx2lUFcRZhSIKuCfrLPMl6wzejQ2rQXX-ixEkDa73dYaPIrVW4IL3iC0Ufxn" +
- "fxYffHJ7QCRw";
- private static String keyWrappedData = "1jcTlu3KJNDBYydhaH9POWOo0tAPGkpsZVizCkHpC" +
- "3g_9Kg91Q3HKK-rfZynn5W5nVPM-SVFHA3JTankcXX8gx8GycwUh4pMoyil_DV35m2QjyuiT" +
- "ln83OJXw-nMvRXyKdVfF7nyRcs256kW7gthAOsYUVBrfFS7DFFxsXqLNREsA8j85IqIXIm8p" +
- "AB3C9uvl1I7SQhLvrwZZXXqjeCWMfseVJwWgsQFyyqH2P0f3-xnngV7cvik2k3Elrk3G_2Cu" +
- "JCozIIrANg9zG9Z8DrwSNNm9YooxWkSu0ZeDLOJ0bMdhcPGGm5OvKz3oZqX-39yv5klNlCRb" +
- "r0q7gqmI0x25w";
-
- @BeforeMethod
- public void start() throws IOException, URISyntaxException {
- super.start();
- vaultUri = server.getUrl("").toURI();
- }
-
- public void createVault() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultcreate.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- Vault vault = vaultApi.createOrUpdateVault(vaultName, location, VaultProperties.builder()
- .tenantId(this.tenantId)
- .sku(SKU.create(location, "standard", null, "A"))
- .accessPolicies(ImmutableList.of(VaultProperties.AccessPolicyEntry.create(null, this.identityObjId, this.tenantId,
- VaultProperties.Permissions.create(
- ImmutableList.of( // certificates
- "Get",
- "List",
- "Update",
- "Create",
- "Import",
- "Delete",
- "ManageContacts",
- "ManageIssuers",
- "GetIssuers",
- "ListIssuers",
- "SetIssuers",
- "DeleteIssuers",
- "Purge",
- "Recover"
- ),
- ImmutableList.of( // keys
- "Get",
- "List",
- "Update",
- "Create",
- "Import",
- "Delete",
- "Recover",
- "Backup",
- "Restore",
- "Purge",
- "Encrypt",
- "Decrypt",
- "Sign",
- "Verify",
- "WrapKey",
- "UnwrapKey"
- ),
- ImmutableList.of( // secrets
- "Get",
- "List",
- "Set",
- "Delete",
- "Recover",
- "Backup",
- "Restore",
- "Purge"
- ),
- ImmutableList.<String>of()
- ))))
- .build(),
- null);
-
- String path = String.format(
- "/subscriptions/%s/resourcegroups/%s/providers/Microsoft.KeyVault/vaults/%s?%s",
- subscriptionId, resourceGroup, vaultName, apiVersion
- );
- assertSent(server, "PUT", path, stringFromResource("/vaultcreaterequestbody.json"));
-
- assertNotNull(vault);
- assertNotNull(vault.properties().vaultUri());
- assertTrue(!vault.name().isEmpty());
- }
-
- public void listVaults() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultlist.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- List<Vault> vaults = vaultApi.listVaults();
-
- String path = String.format(
- "/subscriptions/%s/resourcegroups/%s/providers/Microsoft.KeyVault/vaults?%s",
- subscriptionId, resourceGroup, apiVersion
- );
- assertSent(server, "GET", path);
-
- assertNotNull(vaults);
- assertTrue(vaults.size() > 0);
- assertTrue(!vaults.get(0).name().isEmpty());
- }
-
- public void listVaultsReturns404() throws InterruptedException {
- server.enqueue(response404());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- List<Vault> vaults = vaultApi.listVaults();
-
- String path = String.format(
- "/subscriptions/%s/resourcegroups/%s/providers/Microsoft.KeyVault/vaults?%s",
- subscriptionId, resourceGroup, apiVersion
- );
- assertSent(server, "GET", path);
-
- assertTrue(vaults.isEmpty());
- }
-
- public void getVault() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultget.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- Vault vault = vaultApi.getVault(vaultName);
-
- String path = String.format(
- "/subscriptions/%s/resourcegroups/%s/providers/Microsoft.KeyVault/vaults/%s?%s",
- subscriptionId, resourceGroup, vaultName, apiVersion
- );
- assertSent(server, "GET", path);
-
- assertNotNull(vault);
- assertTrue(!vault.name().isEmpty());
- }
-
- public void getVaultReturns404() throws InterruptedException {
- server.enqueue(response404());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- Vault vault = vaultApi.getVault(vaultName);
-
- String path = String.format(
- "/subscriptions/%s/resourcegroups/%s/providers/Microsoft.KeyVault/vaults/%s?%s",
- subscriptionId, resourceGroup, vaultName, apiVersion
- );
- assertSent(server, "GET", path);
-
- assertNull(vault);
- }
-
- public void deleteVault() throws InterruptedException {
- server.enqueue(response200());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- boolean status = vaultApi.deleteVault(vaultName);
-
- String path = String.format(
- "/subscriptions/%s/resourcegroups/%s/providers/Microsoft.KeyVault/vaults/%s?%s",
- subscriptionId, resourceGroup, vaultName, apiVersion
- );
- assertSent(server, "DELETE", path);
-
- assertTrue(status);
- }
-
- public void deleteVaultReturns404() throws InterruptedException {
- server.enqueue(response404());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- boolean status = vaultApi.deleteVault(vaultName);
-
- String path = String.format(
- "/subscriptions/%s/resourcegroups/%s/providers/Microsoft.KeyVault/vaults/%s?%s",
- subscriptionId, resourceGroup, vaultName, apiVersion
- );
- assertSent(server, "DELETE", path);
-
- assertFalse(status);
- }
-
- public void purgeDeletedVault() throws InterruptedException {
- server.enqueue(response200());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- boolean status = vaultApi.purgeVault(location, vaultName);
-
- String path = String.format(
- "/subscriptions/%s/providers/Microsoft.KeyVault/locations/%s/deletedVaults/%s/purge?%s",
- subscriptionId, location, vaultName, apiVersion
- );
- assertSent(server, "POST", path);
-
- assertTrue(status);
- }
-
- public void purgeDeletedVaultReturns404() throws InterruptedException {
- server.enqueue(response404());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- boolean status = vaultApi.purgeVault(location, vaultName);
-
- String path = String.format(
- "/subscriptions/%s/providers/Microsoft.KeyVault/locations/%s/deletedVaults/%s/purge?%s",
- subscriptionId, location, vaultName, apiVersion
- );
- assertSent(server, "POST", path);
-
- assertFalse(status);
- }
-
- public void listDeletedVaults() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultlistdeleted.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- List<DeletedVault> vaults = vaultApi.listDeletedVaults();
-
- String path = String.format(
- "/subscriptions/%s/providers/Microsoft.KeyVault/deletedVaults?%s",
- subscriptionId, apiVersion
- );
- assertSent(server, "GET", path);
-
- assertNotNull(vaults);
- assertTrue(vaults.size() > 0);
- }
-
- public void listDeletedVaultsReturns404() throws InterruptedException {
- server.enqueue(response404());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- List<DeletedVault> vaults = vaultApi.listDeletedVaults();
-
- String path = String.format(
- "/subscriptions/%s/providers/Microsoft.KeyVault/deletedVaults?%s",
- subscriptionId, apiVersion
- );
- assertSent(server, "GET", path);
-
- assertTrue(vaults.isEmpty());
- }
-
- public void getDeletedVault() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultgetdeleted.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- DeletedVault vault = vaultApi.getDeletedVault(location, vaultName);
-
- String path = String.format(
- "/subscriptions/%s/providers/Microsoft.KeyVault/locations/%s/deletedVaults/%s?%s",
- subscriptionId, location, vaultName, apiVersion
- );
- assertSent(server, "GET", path);
-
- assertNotNull(vault);
- assertTrue(!vault.name().isEmpty());
- assertTrue(!vault.properties().deletionDate().toString().isEmpty());
- }
-
- public void getDeletedVaultReturns404() throws InterruptedException {
- server.enqueue(response404());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- DeletedVault vault = vaultApi.getDeletedVault(location, vaultName);
-
- String path = String.format(
- "/subscriptions/%s/providers/Microsoft.KeyVault/locations/%s/deletedVaults/%s?%s",
- subscriptionId, location, vaultName, apiVersion
- );
- assertSent(server, "GET", path);
-
- assertNull(vault);
- }
-
-
- // Key mock tests
- public void listKeys() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultlistkeys.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- List<Key> keys = vaultApi.listKeys(vaultUri);
-
- String path = String.format("/keys?%s", apiVersion);
- assertSent(server, "GET", path);
-
- assertNotNull(keys);
- assertTrue(keys.size() > 0);
- }
-
- public void listKeysReturns404() throws InterruptedException {
- server.enqueue(response404());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- List<Key> keys = vaultApi.listKeys(vaultUri);
-
- String path = String.format("/keys?%s", apiVersion);
- assertSent(server, "GET", path);
-
- assertTrue(keys.isEmpty());
- }
-
- public void createKey() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultcreatekey.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- KeyAttributes keyAttr = KeyAttributes.create(true, null, null, null, null, null);
- KeyBundle keyBundle = vaultApi.createKey(vaultUri,
- KEY_NAME,
- keyAttr,
- null,
- null,
- 2048,
- "RSA",
- null
- );
-
- String path = String.format("/keys/%s/create?%s", KEY_NAME, apiVersion);
- assertSent(server, "POST", path, stringFromResource("/vaultcreatekeyrequestbody.json"));
-
- assertNotNull(keyBundle);
- assertNotNull(keyBundle.attributes().created());
- }
-
- public void importKey() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultcreatekey.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- KeyAttributes keyAttr = KeyAttributes.create(true, null, null, null, null, null);
- List<String> keyOps = new ArrayList<String>();
- keyOps.add("encrypt");
- JsonWebKey keyInfo = JsonWebKey.create(
- null,
- "DjU54mYvHpICXHjc5-JiFqiH8NkUgOG8LL4kwt3DeBp9bP0-5hSJH8vmzwJkeGG9L79EWG4b_bfxgY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lqWFT03nUMvOAytqdxhO2HysiPn4W58OaJd1tY4372Qpiv6enmUeI4MidCie-s-d0" +
- "_B6A0xfhU5EeeaDN0xDOOl8yN-kaaVj9b4HDR3c91OAwKpDJQIeJVZtxoijxl-SRx3u7Vs_7meeSpOfE",
- "7a5KnUs1pTo72A-JquJvIz4Eu794Yh3ftTk_Et-83aE_FVc6Nk-EhfnwYSNpVmM6UKdrAoy5gsCvZPxrq-eR9pEwU8M" +
- "5UOlki03vWY_nqDBpJSIqwPvGHUB16zvggsPQUyQBfnN3N8XlDi12n88ltvWwEhn1LQOwMUALEfka9_s",
- "InfGmkb2jNkPGuNiZ-mU0-ZrOgLza_fLL9ErZ35jUPhGFzdGxJNobklvsNoTd-E2GAU41YkJh24bncMLvJVYxHHA5iF" +
- "7FBWx1SvpEyKVhhnIcuXGD7N5PbNZzEdmr9C6I7cPVkWO-sUV7zfFukexIcANmsd_oBBGKRoYzP5Tti4",
- null,
- null
- );
- KeyBundle importedKey = vaultApi.importKey(vaultUri, IMPORT_KEY_NAME, false, keyAttr, keyInfo, null);
-
- String path = String.format("/keys/%s?%s", IMPORT_KEY_NAME, apiVersion);
- assertSent(server, "PUT", path, stringFromResource("/vaultimportkeyrequestbody.json"));
-
- assertNotNull(importedKey);
- assertNotNull(importedKey.attributes().created());
- }
-
- public void getKey() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultgetkey.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- KeyBundle key = vaultApi.getKey(vaultUri, KEY_NAME);
-
- String path = String.format("/keys/%s?%s", KEY_NAME, apiVersion);
- assertSent(server, "GET", path);
-
- assertNotNull(key);
- assertNotNull(key.attributes().created());
- }
-
- public void getKeyReturns404() throws InterruptedException {
- server.enqueue(response404());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- KeyBundle key = vaultApi.getKey(vaultUri, KEY_NAME);
-
- String path = String.format("/keys/%s?%s", KEY_NAME, apiVersion);
- assertSent(server, "GET", path);
-
- assertNull(key);
- }
-
- public void deleteKey() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultdeletekey.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- DeletedKeyBundle key = vaultApi.deleteKey(vaultUri, KEY_NAME);
-
- String path = String.format("/keys/%s?%s", KEY_NAME, apiVersion);
- assertSent(server, "DELETE", path);
-
- assertNotNull(key);
- assertNotNull(key.attributes().created());
- }
-
- public void deleteKeyReturns404() throws InterruptedException {
- server.enqueue(response404());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- DeletedKeyBundle key = vaultApi.deleteKey(vaultUri, KEY_NAME);
-
- String path = String.format("/keys/%s?%s", KEY_NAME, apiVersion);
- assertSent(server, "DELETE", path);
-
- assertNull(key);
- }
-
- public void getKeyVersions() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultgetkeyversions.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- List<Key> keys = vaultApi.getKeyVersions(vaultUri, KEY_NAME);
-
- String path = String.format("/keys/%s/versions?%s", KEY_NAME, apiVersion);
- assertSent(server, "GET", path);
-
- assertNotNull(keys);
- assertTrue(keys.size() > 0);
- assertNotNull(keys.get(0).attributes().created());
- }
-
- public void getKeyVersionsReturns404() throws InterruptedException {
- server.enqueue(response404());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- List<Key> keys = vaultApi.getKeyVersions(vaultUri, KEY_NAME);
-
- String path = String.format("/keys/%s/versions?%s", KEY_NAME, apiVersion);
- assertSent(server, "GET", path);
-
- assertTrue(keys.isEmpty());
- }
-
- public void updateKey() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultupdatekey.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- Map<String, String> tags = new HashMap<String, String>();
- tags.put("purpose", "testing");
- KeyBundle updatedKey = vaultApi.updateKey(vaultUri, KEY_NAME, null, null, null, tags);
-
- String path = String.format("/keys/%s?%s", KEY_NAME, apiVersion);
- assertSent(server, "PATCH", path, stringFromResource("/vaultupdatekeyrequestbody.json"));
-
- assertNotNull(updatedKey);
- assertNotNull(updatedKey.attributes().created());
- }
-
- public void updateKeyWithVersion() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultupdatekeywithversion.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- String keyVersion = "bd6566ec707e4ad89f4ab9577d9d0bef";
- Map<String, String> tags = new HashMap<String, String>();
- tags.put("purpose", "testing");
- KeyBundle updatedKey = vaultApi.updateKey(vaultUri, KEY_NAME, keyVersion, null, null, tags);
-
- String path = String.format("/keys/%s/%s?%s", KEY_NAME, keyVersion, apiVersion);
- assertSent(server, "PATCH", path, stringFromResource("/vaultupdatekeyrequestbody.json"));
-
- assertNotNull(updatedKey);
- assertNotNull(updatedKey.attributes().created());
- }
-
- public void backupKey() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultbackupkey.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- String keyBackup = vaultApi.backupKey(vaultUri, KEY_NAME);
-
- String path = String.format("/keys/%s/backup?%s", KEY_NAME, apiVersion);
- assertSent(server, "POST", path);
-
- assertNotNull(keyBackup);
- assertTrue(keyBackup.length() > 0);
- }
-
- public void restoreKey() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultrestorekey.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- KeyBundle restoredKey = vaultApi.restoreKey(vaultUri, keyBackup);
-
- String path = String.format("/keys/restore?%s", apiVersion);
- assertSent(server, "POST", path, stringFromResource("/vaultrestorekeyrequestbody.json"));
-
- assertNotNull(restoredKey);
- assertNotNull(restoredKey.attributes().created());
- }
-
- public void listDeletedKeys() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultlistdeletedkeys.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- List<DeletedKeyBundle> keys = vaultApi.listDeletedKeys(vaultUri);
-
- String path = String.format("/deletedkeys?%s", apiVersion);
- assertSent(server, "GET", path);
-
- assertNotNull(keys);
- assertTrue(keys.size() > 0);
- }
-
- public void listDeletedKeysReturns404() throws InterruptedException {
- server.enqueue(response404());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- List<DeletedKeyBundle> keys = vaultApi.listDeletedKeys(vaultUri);
-
- String path = String.format("/deletedkeys?%s", apiVersion);
- assertSent(server, "GET", path);
-
- assertTrue(keys.isEmpty());
- }
-
- public void getDeletedKey() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultgetdeletedkey.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- DeletedKeyBundle key = vaultApi.getDeletedKey(vaultUri, RECOVERABLE_KEY_NAME);
-
- String path = String.format("/deletedkeys/%s?%s", RECOVERABLE_KEY_NAME, apiVersion);
- assertSent(server, "GET", path);
-
- assertNotNull(key);
- assertTrue(!key.deletedDate().isEmpty());
- }
-
- public void getDeletedKeyReturns404() throws InterruptedException {
- server.enqueue(response404());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- DeletedKeyBundle key = vaultApi.getDeletedKey(vaultUri, RECOVERABLE_KEY_NAME);
-
- String path = String.format("/deletedkeys/%s?%s", RECOVERABLE_KEY_NAME, apiVersion);
- assertSent(server, "GET", path);
-
- assertNull(key);
- }
-
- public void recoverDeletedKey() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultrecoverdeletedkey.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- KeyBundle key = vaultApi.recoverDeletedKey(vaultUri, RECOVERABLE_KEY_NAME);
-
- String path = String.format("/deletedkeys/%s/recover?%s", RECOVERABLE_KEY_NAME, apiVersion);
- assertSent(server, "POST", path);
-
- assertNotNull(key);
- assertNotNull(key.attributes().created());
- }
-
- public void purgeDeletedKey() throws InterruptedException {
- server.enqueue(response200());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- boolean status = vaultApi.purgeDeletedKey(vaultUri, RECOVERABLE_KEY_NAME);
-
- String path = String.format("/deletedkeys/%s?%s", RECOVERABLE_KEY_NAME, apiVersion);
- assertSent(server, "DELETE", path);
-
- assertTrue(status);
- }
-
- public void purgeDeletedKeyReturns404() throws InterruptedException {
- server.enqueue(response404());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- boolean status = vaultApi.purgeDeletedKey(vaultUri, RECOVERABLE_KEY_NAME);
-
- String path = String.format("/deletedkeys/%s?%s", RECOVERABLE_KEY_NAME, apiVersion);
- assertSent(server, "DELETE", path);
-
- assertFalse(status);
- }
-
- public void encrypt() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultkeyencrypt.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- KeyOperationResult encryptResult = vaultApi.encrypt(vaultUri,
- KEY_NAME,
- null,
- cryptoAlgorithm,
- cryptoText
- );
-
- String path = String.format("/keys/%s/encrypt?%s", KEY_NAME, apiVersion);
- assertSent(server, "POST", path, stringFromResource("/vaultkeyencryptrequestbody.json"));
-
- assertNotNull(encryptResult);
- assertTrue(!encryptResult.value().isEmpty());
- }
-
- public void decrypt() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultkeydecrypt.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- KeyOperationResult decryptResult = vaultApi.decrypt(vaultUri,
- KEY_NAME,
- null,
- cryptoAlgorithm,
- keyDecryptData
- );
-
- String path = String.format("/keys/%s/decrypt?%s", KEY_NAME, apiVersion);
- assertSent(server, "POST", path, stringFromResource("/vaultkeydecryptrequestbody.json"));
-
- assertNotNull(decryptResult);
- assertTrue(!decryptResult.value().isEmpty());
- }
-
- public void sign() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultkeysign.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- KeyOperationResult signResult = vaultApi.sign(vaultUri,
- KEY_NAME,
- null,
- signatureAlgorithm,
- hashToSign
- );
-
- String path = String.format("/keys/%s/sign?%s", KEY_NAME, apiVersion);
- assertSent(server, "POST", path, stringFromResource("/vaultkeysignrequestbody.json"));
-
- assertNotNull(signResult);
- assertTrue(!signResult.value().isEmpty());
- }
-
- public void verify() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultkeyverify.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- boolean verifyResult = vaultApi.verify(vaultUri,
- KEY_NAME,
- null,
- signatureAlgorithm,
- hashToSign,
- keySignedData
- );
-
- String path = String.format("/keys/%s/verify?%s", KEY_NAME, apiVersion);
- assertSent(server, "POST", path, stringFromResource("/vaultkeyverifyrequestbody.json"));
-
- assertTrue(verifyResult);
- }
-
- public void wrap() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultkeywrap.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- KeyOperationResult wrapResult = vaultApi.wrap(vaultUri,
- KEY_NAME,
- null,
- cryptoAlgorithm,
- contentEncryptionKey
- );
-
- String path = String.format("/keys/%s/wrapkey?%s", KEY_NAME, apiVersion);
- assertSent(server, "POST", path, stringFromResource("/vaultkeywraprequestbody.json"));
-
- assertNotNull(wrapResult);
- assertTrue(!wrapResult.value().isEmpty());
- }
-
- public void unwrap() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultkeyunwrap.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- KeyOperationResult unwrapResult = vaultApi.unwrap(vaultUri,
- KEY_NAME,
- null,
- cryptoAlgorithm,
- keyWrappedData
- );
-
- String path = String.format("/keys/%s/unwrapkey?%s", KEY_NAME, apiVersion);
- assertSent(server, "POST", path, stringFromResource("/vaultkeyunwraprequestbody.json"));
-
- assertNotNull(unwrapResult);
- assertTrue(!unwrapResult.value().isEmpty());
- }
-
- // Secret mock tests
- public void listSecrets() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultlistsecrets.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- List<Secret> secrets = vaultApi.listSecrets(vaultUri);
-
- String path = String.format("/secrets?%s", apiVersion);
- assertSent(server, "GET", path);
-
- assertNotNull(secrets);
- assertTrue(secrets.size() > 0);
- }
-
- public void listSecretsReturns404() throws InterruptedException {
- server.enqueue(response404());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- List<Secret> secrets = vaultApi.listSecrets(vaultUri);
-
- String path = String.format("/secrets?%s", apiVersion);
- assertSent(server, "GET", path);
-
- assertTrue(secrets.isEmpty());
- }
-
- public void setSecret() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultsetsecret.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- SecretAttributes attributes = SecretAttributes.create(true, null, null, null, null, null);
- SecretBundle secretBundle = vaultApi.setSecret(vaultUri,
- SECRET_NAME,
- attributes,
- "testSecretKey",
- null,
- sampleSecret
- );
-
- String path = String.format("/secrets/%s?%s", SECRET_NAME, apiVersion);
- assertSent(server, "PUT", path, stringFromResource("/vaultsetsecretrequestbody.json"));
-
- assertNotNull(secretBundle);
- assertTrue(!secretBundle.id().isEmpty());
- }
-
- public void getSecret() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultgetsecret.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- SecretBundle secret = vaultApi.getSecret(vaultUri, SECRET_NAME, null);
-
- String path = String.format("/secrets/%s?%s", SECRET_NAME, apiVersion);
- assertSent(server, "GET", path);
-
- assertNotNull(secret);
- assertNotNull(secret.attributes().created());
- }
-
- public void getSecretReturns404() throws InterruptedException {
- server.enqueue(response404());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- SecretBundle secret = vaultApi.getSecret(vaultUri, SECRET_NAME, null);
-
- String path = String.format("/secrets/%s?%s", SECRET_NAME, apiVersion);
- assertSent(server, "GET", path);
-
- assertNull(secret);
- }
-
- public void deleteSecret() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultdeletesecret.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- DeletedSecretBundle secret = vaultApi.deleteSecret(vaultUri, SECRET_NAME);
-
- String path = String.format("/secrets/%s?%s", SECRET_NAME, apiVersion);
- assertSent(server, "DELETE", path);
-
- assertNotNull(secret);
- assertNotNull(secret.attributes().created());
- }
-
- public void deleteSecretReturns404() throws InterruptedException {
- server.enqueue(response404());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- DeletedSecretBundle secret = vaultApi.deleteSecret(vaultUri, SECRET_NAME);
-
- String path = String.format("/secrets/%s?%s", SECRET_NAME, apiVersion);
- assertSent(server, "DELETE", path);
-
- assertNull(secret);
- }
-
- public void getSecretVersions() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultgetsecretversions.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- List<Secret> secrets = vaultApi.getSecretVersions(vaultUri, SECRET_NAME);
-
- String path = String.format("/secrets/%s/versions?%s", SECRET_NAME, apiVersion);
- assertSent(server, "GET", path);
-
- assertNotNull(secrets);
- assertTrue(secrets.size() > 0);
- assertNotNull(secrets.get(0).attributes().created());
- }
-
- public void getSecretVersionsReturns404() throws InterruptedException {
- server.enqueue(response404());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- List<Secret> secrets = vaultApi.getSecretVersions(vaultUri, SECRET_NAME);
-
- String path = String.format("/secrets/%s/versions?%s", SECRET_NAME, apiVersion);
- assertSent(server, "GET", path);
-
- assertTrue(secrets.isEmpty());
- }
-
- public void updateSecret() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultupdatekey.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- Map<String, String> tags = new HashMap<String, String>();
- tags.put("purpose", "testing");
- SecretBundle updatedSecret = vaultApi.updateSecret(vaultUri, SECRET_NAME, null, null, null, tags);
-
- String path = String.format("/secrets/%s?%s", SECRET_NAME, apiVersion);
- assertSent(server, "PATCH", path, stringFromResource("/vaultupdatesecretrequestbody.json"));
-
- assertNotNull(updatedSecret);
- assertNotNull(updatedSecret.attributes().created());
- }
-
- public void updateSecretWithVersion() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultupdatesecretwithversion.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- String secretVersion = "b936ececbc674f3bb1367ae50d28ada0";
- Map<String, String> tags = new HashMap<String, String>();
- tags.put("purpose", "testing again");
- SecretBundle updatedSecret = vaultApi.updateSecret(vaultUri, SECRET_NAME, secretVersion, null, null, tags);
-
- String path = String.format("/secrets/%s/%s?%s", SECRET_NAME, secretVersion, apiVersion);
- assertSent(server, "PATCH", path, stringFromResource("/vaultupdatesecretwithversionrequestbody.json"));
-
- assertNotNull(updatedSecret);
- assertNotNull(updatedSecret.attributes().created());
- }
-
- public void backupSecret() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultbackupsecret.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- String secretBackup = vaultApi.backupSecret(vaultUri, SECRET_NAME);
-
- String path = String.format("/secrets/%s/backup?%s", SECRET_NAME, apiVersion);
- assertSent(server, "POST", path);
-
- assertNotNull(secretBackup);
- assertTrue(secretBackup.length() > 0);
- }
-
- public void restoreSecret() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultrestoresecret.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- SecretBundle restoredSecret = vaultApi.restoreSecret(vaultUri, secretBackup);
-
- String path = String.format("/secrets/restore?%s", apiVersion);
- assertSent(server, "POST", path, stringFromResource("/vaultrestoresecretrequestbody.json"));
-
- assertNotNull(restoredSecret);
- assertNotNull(restoredSecret.attributes().created());
- }
-
- public void listDeletedSecrets() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultlistdeletedsecrets.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- List<DeletedSecretBundle> secrets = vaultApi.listDeletedSecrets(vaultUri);
-
- String path = String.format("/deletedsecrets?%s", apiVersion);
- assertSent(server, "GET", path);
-
- assertNotNull(secrets);
- assertTrue(secrets.size() > 0);
- }
-
- public void listDeletedSecretsReturns404() throws InterruptedException {
- server.enqueue(response404());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- List<DeletedSecretBundle> secrets = vaultApi.listDeletedSecrets(vaultUri);
-
- String path = String.format("/deletedsecrets?%s", apiVersion);
- assertSent(server, "GET", path);
-
- assertTrue(secrets.isEmpty());
- }
-
- public void getDeletedSecret() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultgetdeletedsecret.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- DeletedSecretBundle secret = vaultApi.getDeletedSecret(vaultUri, RECOVERABLE_SECRET_NAME);
-
- String path = String.format("/deletedsecrets/%s?%s", RECOVERABLE_SECRET_NAME, apiVersion);
- assertSent(server, "GET", path);
-
- assertNotNull(secret);
- assertTrue(!secret.deletedDate().isEmpty());
- }
-
- public void getDeletedSecretReturns404() throws InterruptedException {
- server.enqueue(response404());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- DeletedSecretBundle secret = vaultApi.getDeletedSecret(vaultUri, RECOVERABLE_SECRET_NAME);
-
- String path = String.format("/deletedsecrets/%s?%s", RECOVERABLE_SECRET_NAME, apiVersion);
- assertSent(server, "GET", path);
-
- assertNull(secret);
- }
-
- public void recoverDeletedSecret() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultrecoverdeletedsecret.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- SecretBundle secret = vaultApi.recoverDeletedSecret(vaultUri, RECOVERABLE_SECRET_NAME);
-
- String path = String.format("/deletedsecrets/%s/recover?%s", RECOVERABLE_SECRET_NAME, apiVersion);
- assertSent(server, "POST", path);
-
- assertNotNull(secret);
- assertNotNull(secret.attributes().created());
- }
-
- public void purgeDeletedSecret() throws InterruptedException {
- server.enqueue(response200());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- boolean status = vaultApi.purgeDeletedSecret(vaultUri, RECOVERABLE_SECRET_NAME);
-
- String path = String.format("/deletedsecrets/%s?%s", RECOVERABLE_SECRET_NAME, apiVersion);
- assertSent(server, "DELETE", path);
-
- assertTrue(status);
- }
-
- public void purgeDeletedSecretReturns404() throws InterruptedException {
- server.enqueue(response404());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- boolean status = vaultApi.purgeDeletedSecret(vaultUri, RECOVERABLE_SECRET_NAME);
-
- String path = String.format("/deletedsecrets/%s?%s", RECOVERABLE_SECRET_NAME, apiVersion);
- assertSent(server, "DELETE", path);
-
- assertFalse(status);
- }
-
- public void createCertificate() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultcreatecertificate.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- CertificatePolicy policy = CertificatePolicy.create(null,
- CERTIFICATE_NAME,
- IssuerParameters.create(null, "Self"),
- KeyProperties.create(false, 2048, "RSA", false),
- null,
- null,
- X509CertificateProperties.create(null, null, null, "CN=mycertificate.foobar.com", 12)
- );
- CertificateOperation certOp = vaultApi.createCertificate(vaultUri,
- CERTIFICATE_NAME,
- null,
- policy,
- null
- );
-
- String path = String.format("/certificates/%s/create?%s", CERTIFICATE_NAME, apiVersion);
- assertSent(server, "POST", path, stringFromResource("/vaultcreatecertificaterequestbody.json"));
-
- assertNotNull(certOp);
- assertTrue(!certOp.id().isEmpty());
- }
-
- public void getCertificate() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultgetcertificate.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- CertificateBundle cert = vaultApi.getCertificate(vaultUri, CERTIFICATE_NAME, null);
-
- String path = String.format("/certificates/%s?%s", CERTIFICATE_NAME, apiVersion);
- assertSent(server, "GET", path);
-
- assertNotNull(cert);
- assertTrue(!cert.id().isEmpty());
- }
-
- public void getCertificateReturns404() throws InterruptedException {
- server.enqueue(response404());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- CertificateBundle cert = vaultApi.getCertificate(vaultUri, CERTIFICATE_NAME, null);
-
- String path = String.format("/certificates/%s?%s", CERTIFICATE_NAME, apiVersion);
- assertSent(server, "GET", path);
-
- assertNull(cert);
- }
-
- public void deleteCertificate() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultdeletecertificate.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- DeletedCertificateBundle cert = vaultApi.deleteCertificate(vaultUri, CERTIFICATE_NAME);
-
- String path = String.format("/certificates/%s?%s", CERTIFICATE_NAME, apiVersion);
- assertSent(server, "DELETE", path);
-
- assertNotNull(cert);
- assertTrue(!cert.id().isEmpty());
- }
-
- public void deleteCertificateReturns404() throws InterruptedException {
- server.enqueue(response404());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- DeletedCertificateBundle cert = vaultApi.deleteCertificate(vaultUri, CERTIFICATE_NAME);
-
- String path = String.format("/certificates/%s?%s", CERTIFICATE_NAME, apiVersion);
- assertSent(server, "DELETE", path);
-
- assertNull(cert);
- }
-
- public void listCertificates() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultlistcertificates.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- List<Certificate> certs = vaultApi.getCertificates(vaultUri);
-
- String path = String.format("/certificates?%s", apiVersion);
- assertSent(server, "GET", path);
-
- assertNotNull(certs);
- assertTrue(certs.size() > 0);
- }
-
- public void listCertificatesReturns404() throws InterruptedException {
- server.enqueue(response404());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- List<Certificate> certs = vaultApi.getCertificates(vaultUri);
-
- String path = String.format("/certificates?%s", apiVersion);
- assertSent(server, "GET", path);
-
- assertTrue(certs.isEmpty());
- }
-
- public void listDeletedCertificates() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultlistdeletedcertificates.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- List<DeletedCertificate> certs = vaultApi.getDeletedCertificates(vaultUri);
-
- String path = String.format("/deletedcertificates?%s", apiVersion);
- assertSent(server, "GET", path);
-
- assertNotNull(certs);
- assertTrue(certs.size() > 0);
- }
-
- public void listDeletedCertificatesReturns404() throws InterruptedException {
- server.enqueue(response404());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- List<DeletedCertificate> certs = vaultApi.getDeletedCertificates(vaultUri);
-
- String path = String.format("/deletedcertificates?%s", apiVersion);
- assertSent(server, "GET", path);
-
- assertTrue(certs.isEmpty());
- }
-
- public void getDeletedCertificate() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultgetdeletedcertificate.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- DeletedCertificateBundle cert = vaultApi.getDeletedCertificate(vaultUri, RECOVERABLE_CERTIFICATE_NAME);
-
- String path = String.format("/deletedcertificates/%s?%s", RECOVERABLE_CERTIFICATE_NAME, apiVersion);
- assertSent(server, "GET", path);
-
- assertNotNull(cert);
- assertTrue(!cert.id().isEmpty());
- }
-
- public void getDeletedCertificateReturns404() throws InterruptedException {
- server.enqueue(response404());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- DeletedCertificateBundle cert = vaultApi.getDeletedCertificate(vaultUri, RECOVERABLE_CERTIFICATE_NAME);
-
- String path = String.format("/deletedcertificates/%s?%s", RECOVERABLE_CERTIFICATE_NAME, apiVersion);
- assertSent(server, "GET", path);
-
- assertNull(cert);
- }
-
- public void recoverDeletedCertificate() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultrecoverdeletedcertificate.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- CertificateBundle cert = vaultApi.recoverDeletedCertificate(vaultUri, RECOVERABLE_CERTIFICATE_NAME);
-
- String path = String.format("/deletedcertificates/%s/recover?%s", RECOVERABLE_CERTIFICATE_NAME, apiVersion);
- assertSent(server, "POST", path);
-
- assertNotNull(cert);
- assertTrue(!cert.id().isEmpty());
- }
-
- public void purgeDeletedCertificate() throws InterruptedException {
- server.enqueue(response200());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- boolean status = vaultApi.purgeDeletedCertificate(vaultUri, RECOVERABLE_CERTIFICATE_NAME);
-
- String path = String.format("/deletedcertificates/%s?%s", RECOVERABLE_CERTIFICATE_NAME, apiVersion);
- assertSent(server, "DELETE", path);
-
- assertTrue(status);
- }
-
- public void purgeDeletedCertificateReturns404() throws InterruptedException {
- server.enqueue(response404());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- boolean status = vaultApi.purgeDeletedCertificate(vaultUri, RECOVERABLE_CERTIFICATE_NAME);
-
- String path = String.format("/deletedcertificates/%s?%s", RECOVERABLE_CERTIFICATE_NAME, apiVersion);
- assertSent(server, "DELETE", path);
-
- assertFalse(status);
- }
-
- public void listCertificateVersions() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultlistcertificateversions.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- List<Certificate> certs = vaultApi.getCertificateVersions(vaultUri, CERTIFICATE_NAME);
-
- String path = String.format("/certificates/%s/versions?%s", CERTIFICATE_NAME, apiVersion);
- assertSent(server, "GET", path);
-
- assertNotNull(certs);
- assertTrue(certs.size() > 0);
- }
-
- public void listCertificateVersionsReturns404() throws InterruptedException {
- server.enqueue(response404());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- List<Certificate> certs = vaultApi.getCertificateVersions(vaultUri, CERTIFICATE_NAME);
-
- String path = String.format("/certificates/%s/versions?%s", CERTIFICATE_NAME, apiVersion);
- assertSent(server, "GET", path);
-
- assertTrue(certs.isEmpty());
- }
-
- public void updateCertificate() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultupdatecertificate.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- Map<String, String> tags = new HashMap<String, String>();
- tags.put("selfsigned", "true");
- CertificatePolicy policy = CertificatePolicy.create(null,
- CERTIFICATE_NAME,
- IssuerParameters.create(null, "Self"),
- KeyProperties.create(false, 2048, "RSA", false),
- null,
- null,
- X509CertificateProperties.create(null, null, null, "CN=mycertificate.foobar.com", 12)
- );
- CertificateBundle certBundle = vaultApi.updateCertificate(
- vaultUri,
- CERTIFICATE_NAME,
- null,
- null,
- policy,
- tags
- );
-
- String path = String.format("/certificates/%s?%s", CERTIFICATE_NAME, apiVersion);
- assertSent(server, "PATCH", path, stringFromResource("/vaultupdatecertificaterequestbody.json"));
-
- assertNotNull(certBundle);
- assertTrue(!certBundle.id().isEmpty());
- }
-
- public void updateCertificateVersion() {
- // Update the specific version of a certificate
-
- /*
- * XXX -- update using version complains about needing policy (required input), yet
- * passing in the same policy results in the error:
- *
- * Policy cannot be updated with a specific version of a certificate
- *
- * Will uncomment/fix once this issue is resolved.
- *
- */
- throw new SkipException("azure bug - update using version complains about needing policy");
- }
-
- public void importCertificate() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultimportcertificate.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- String certPem = IMPORTABLE_CERTIFICATE_PEM;
- CertificateBundle certBundle = null;
- try {
- certBundle = vaultApi.importCertificate(
- vaultUri,
- RECOVERABLE_CERTIFICATE_NAME,
- null,
- CertificatePolicy.create(
- null,
- null,
- null,
- null,
- null,
- SecretProperties.create("application/x-pem-file"),
- null
- ),
- null,
- null,
- certPem);
- } catch (ResourceNotFoundException rnf) {
- assertNotNull(rnf);
- }
-
- String path = String.format("/certificates/%s/import?%s", RECOVERABLE_CERTIFICATE_NAME, apiVersion);
- assertSent(server, "POST", path, stringFromResource("/vaultimportcertificaterequestbody.json"));
-
- assertNotNull(certBundle);
- assertTrue(!certBundle.id().isEmpty());
- }
-
- public void mergeCertificate() throws InterruptedException {
- // Merging a certificate is for when a CSR is signed by an external CA
- server.enqueue(jsonResponse("/vaultmergecertificate.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- CertificateAttributes attributes = CertificateAttributes.create(null, true, null, null, null, null);
- CertificateBundle certBundle = vaultApi.mergeCertificate(
- vaultUri,
- CERTIFICATE_NAME,
- attributes,
- null,
- Arrays.asList(mergeX5C)
- );
-
- String path = String.format("/certificates/%s/pending/merge?%s", CERTIFICATE_NAME, apiVersion);
- assertSent(server, "POST", path, stringFromResource("/vaultmergecertificaterequestbody.json"));
-
- assertNotNull(certBundle);
- assertTrue(!certBundle.attributes().created().toString().isEmpty());
- }
-
- public void getCertificateOperation() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultgetcertificateoperation.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- CertificateOperation certOp = vaultApi.getCertificateOperation(vaultUri, CERTIFICATE_NAME);
-
- String path = String.format("/certificates/%s/pending?%s", CERTIFICATE_NAME, apiVersion);
- assertSent(server, "GET", path);
-
- assertNotNull(certOp);
- assertTrue(!certOp.id().isEmpty());
- }
-
- public void getCertificateOperationReturns404() throws InterruptedException {
- server.enqueue(response404());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- CertificateOperation certOp = vaultApi.getCertificateOperation(vaultUri, CERTIFICATE_NAME);
-
- String path = String.format("/certificates/%s/pending?%s", CERTIFICATE_NAME, apiVersion);
- assertSent(server, "GET", path);
-
- assertNull(certOp);
- }
-
- public void updateCertificateOperation() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultupdatecertificateoperation.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- CertificateOperation certOp = vaultApi.updateCertificateOperation(vaultUri, CERTIFICATE_NAME, true);
-
- String path = String.format("/certificates/%s/pending?%s", CERTIFICATE_NAME, apiVersion);
- assertSent(server, "PATCH", path, stringFromResource("/vaultupdatecertificateoperationrequestbody.json"));
-
- assertNotNull(certOp);
- assertTrue(!certOp.id().isEmpty());
- }
-
- public void deleteCertificateOperation() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultdeletecertificateoperation.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- CertificateOperation certOp = vaultApi.deleteCertificateOperation(vaultUri, CERTIFICATE_NAME);
-
- String path = String.format("/certificates/%s/pending?%s", CERTIFICATE_NAME, apiVersion);
- assertSent(server, "DELETE", path);
-
- assertNotNull(certOp);
- assertTrue(!certOp.id().isEmpty());
- }
-
- public void deleteCertificateOperationReturns404() throws InterruptedException {
- server.enqueue(response404());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- CertificateOperation certOp = vaultApi.deleteCertificateOperation(vaultUri, CERTIFICATE_NAME);
-
- String path = String.format("/certificates/%s/pending?%s", CERTIFICATE_NAME, apiVersion);
- assertSent(server, "DELETE", path);
-
- assertNull(certOp);
- }
-
- public void setCertificateIssuer() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultsetcertificateissuer.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- AdministrationDetails adminDetail = AdministrationDetails.create(
- "adminguy@certsforme.com",
- "Admin",
- "Guy",
- "867-5309"
- );
- List<AdministrationDetails> adminDetails = new ArrayList<AdministrationDetails>();
- adminDetails.add(adminDetail);
- OrganizationDetails orgDetails = OrganizationDetails.create(
- adminDetails,
- null
- );
- IssuerBundle issuer = null;
- try {
- issuer = vaultApi.setCertificateIssuer(
- vaultUri,
- CERTIFICATE_ISSUER_NAME,
- null,
- IssuerCredentials.create("imauser", "This1sMyPa55wurD!"),
- orgDetails,
- "GlobalSign"
- );
- } catch (ResourceNotFoundException rnf) {
- assertNotNull(rnf);
- }
-
- String path = String.format("/certificates/issuers/%s?%s", CERTIFICATE_ISSUER_NAME, apiVersion);
- assertSent(server, "PUT", path, stringFromResource("/vaultsetcertificateissuerrequestbody.json"));
-
- assertNotNull(issuer);
- assertTrue(!issuer.id().isEmpty());
- }
-
- public void listCertificateIssuers() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultlistcertificateissuers.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- List<CertificateIssuer> issuers = vaultApi.getCertificateIssuers(vaultUri);
-
- String path = String.format("/certificates/issuers?%s", apiVersion);
- assertSent(server, "GET", path);
-
- assertNotNull(issuers);
- assertTrue(issuers.size() > 0);
- }
-
- public void listCertificateIssuersReturns404() throws InterruptedException {
- server.enqueue(response404());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- List<CertificateIssuer> issuers = vaultApi.getCertificateIssuers(vaultUri);
-
- String path = String.format("/certificates/issuers?%s", apiVersion);
- assertSent(server, "GET", path);
-
- assertTrue(issuers.isEmpty());
- }
-
- public void getCertificateIssuer() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultgetcertificateissuer.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- IssuerBundle issuer = vaultApi.getCertificateIssuer(vaultUri, CERTIFICATE_ISSUER_NAME);
-
- String path = String.format("/certificates/issuers/%s?%s", CERTIFICATE_ISSUER_NAME, apiVersion);
- assertSent(server, "GET", path);
-
- assertNotNull(issuer);
- assertTrue(!issuer.id().isEmpty());
- }
-
- public void getCertificateIssuerReturns404() throws InterruptedException {
- server.enqueue(response404());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- IssuerBundle issuer = vaultApi.getCertificateIssuer(vaultUri, CERTIFICATE_ISSUER_NAME);
-
- String path = String.format("/certificates/issuers/%s?%s", CERTIFICATE_ISSUER_NAME, apiVersion);
- assertSent(server, "GET", path);
-
- assertNull(issuer);
- }
-
- public void updateCertificateIssuer() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultupdatecertificateissuer.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- AdministrationDetails adminDetail = AdministrationDetails.create(
- "adminguy@certsforme.com",
- "Admin",
- "Guy",
- "867-5309"
- );
- List<AdministrationDetails> adminDetails = new ArrayList<AdministrationDetails>();
- adminDetails.add(adminDetail);
- OrganizationDetails orgDetails = OrganizationDetails.create(
- adminDetails,
- null
- );
- IssuerBundle issuer = vaultApi.updateCertificateIssuer(
- vaultUri,
- "globalsign01",
- null,
- IssuerCredentials.create("imauser", "CanHa5P455wuRd!"),
- orgDetails,
- "GlobalSign"
- );
-
- String path = String.format("/certificates/issuers/%s?%s", CERTIFICATE_ISSUER_NAME, apiVersion);
- assertSent(server, "PATCH", path, stringFromResource("/vaultupdatecertificateissuerrequestbody.json"));
-
- assertNotNull(issuer);
- assertTrue(!issuer.id().isEmpty());
- }
-
- public void deleteCertificateIssuer() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultdeletecertificateissuer.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- IssuerBundle issuer = vaultApi.deleteCertificateIssuer(vaultUri, CERTIFICATE_ISSUER_NAME);
-
- String path = String.format("/certificates/issuers/%s?%s", CERTIFICATE_ISSUER_NAME, apiVersion);
- assertSent(server, "DELETE", path);
-
- assertNotNull(issuer);
- assertTrue(!issuer.id().isEmpty());
- }
-
- public void deleteCertificateIssuerReturns404() throws InterruptedException {
- server.enqueue(response404());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- IssuerBundle issuer = vaultApi.deleteCertificateIssuer(vaultUri, CERTIFICATE_ISSUER_NAME);
-
- String path = String.format("/certificates/issuers/%s?%s", CERTIFICATE_ISSUER_NAME, apiVersion);
- assertSent(server, "DELETE", path);
-
- assertNull(issuer);
- }
-
- public void getCertificateContacts() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultgetcertificatecontacts.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- Contacts contacts = vaultApi.getCertificateContacts(vaultUri);
-
- String path = String.format("/certificates/contacts?%s", apiVersion);
- assertSent(server, "GET", path);
-
- assertNotNull(contacts);
- assertTrue(!contacts.id().isEmpty());
- assertTrue(contacts.contacts().size() > 0);
- }
-
- public void getCertificateContactsReturns404() throws InterruptedException {
- server.enqueue(response404());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- IssuerBundle issuer = null;
- try {
- issuer = vaultApi.getCertificateIssuer(vaultUri, CERTIFICATE_ISSUER_NAME);
- } catch (ResourceNotFoundException rnf) {
- assertNotNull(rnf);
- }
-
- String path = String.format("/certificates/issuers/%s?%s", CERTIFICATE_ISSUER_NAME, apiVersion);
- assertSent(server, "GET", path);
-
- assertNull(issuer);
- }
-
- public void setCertificateContacts() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultsetcertificatecontacts.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- List<Contact> contactsIn = new ArrayList<Contact>();
- contactsIn.add(Contact.create("foo@bar.com", "Foo bar", "867-5309"));
- Contacts contacts = vaultApi.setCertificateContacts(vaultUri, contactsIn);
-
- String path = String.format("/certificates/contacts?%s", apiVersion);
- assertSent(server, "PUT", path, stringFromResource("/vaultsetcertificatecontactsrequestbody.json"));
-
- assertNotNull(contacts);
- assertTrue(!contacts.id().isEmpty());
- assertTrue(contacts.contacts().size() > 0);
- }
-
- public void deleteCertificateContacts() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultdeletecertificatecontacts.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- Contacts contacts = vaultApi.deleteCertificateContacts(vaultUri);
-
- String path = String.format("/certificates/contacts?%s", apiVersion);
- assertSent(server, "DELETE", path);
-
- assertNotNull(contacts);
- assertTrue(!contacts.id().isEmpty());
- assertTrue(contacts.contacts().size() > 0);
- }
-
- public void deleteCertificateContactsReturns404() throws InterruptedException {
- server.enqueue(response404());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- Contacts contacts = vaultApi.deleteCertificateContacts(vaultUri);
-
- String path = String.format("/certificates/contacts?%s", apiVersion);
- assertSent(server, "DELETE", path);
-
- assertNull(contacts);
- }
-
- public void getCertificatePolicy() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultgetcertificatepolicy.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- CertificatePolicy policy = vaultApi.getCertificatePolicy(vaultUri, CERTIFICATE_NAME);
-
- String path = String.format("/certificates/%s/policy?%s", CERTIFICATE_NAME, apiVersion);
- assertSent(server, "GET", path);
-
- assertNotNull(policy);
- assertTrue(!policy.id().isEmpty());
- }
-
- public void getCertificatePolicyReturns404() throws InterruptedException {
- server.enqueue(response404());
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- CertificatePolicy policy = vaultApi.getCertificatePolicy(vaultUri, CERTIFICATE_NAME);
-
- String path = String.format("/certificates/%s/policy?%s", CERTIFICATE_NAME, apiVersion);
- assertSent(server, "GET", path);
-
- assertNull(policy);
- }
-
- public void updateCertificatePolicy() throws InterruptedException {
- server.enqueue(jsonResponse("/vaultupdatecertificatepolicy.json").setResponseCode(200));
- final VaultApi vaultApi = api.getVaultApi(resourceGroup);
- CertificatePolicy policy = vaultApi.updateCertificatePolicy(
- vaultUri,
- CERTIFICATE_NAME,
- null,
- null,
- KeyProperties.create(true, 3072, "RSA", false),
- null,
- null,
- null
- );
-
- String path = String.format("/certificates/%s/policy?%s", CERTIFICATE_NAME, apiVersion);
- assertSent(server, "PATCH", path, stringFromResource("/vaultupdatecertificatepolicyrequestbody.json"));
-
- assertNotNull(policy);
- assertTrue(!policy.id().isEmpty());
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VirtualMachineApiLiveTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VirtualMachineApiLiveTest.java
deleted file mode 100644
index 34b289e..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VirtualMachineApiLiveTest.java
+++ /dev/null
@@ -1,349 +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 static org.assertj.core.api.Assertions.assertThat;
-import static org.jclouds.util.Predicates2.retry;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-import org.jclouds.azurecompute.arm.domain.DataDisk;
-import org.jclouds.azurecompute.arm.domain.HardwareProfile;
-import org.jclouds.azurecompute.arm.domain.IdReference;
-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.ManagedDiskParameters;
-import org.jclouds.azurecompute.arm.domain.NetworkInterfaceCard;
-import org.jclouds.azurecompute.arm.domain.NetworkInterfaceCardProperties;
-import org.jclouds.azurecompute.arm.domain.NetworkProfile;
-import org.jclouds.azurecompute.arm.domain.OSDisk;
-import org.jclouds.azurecompute.arm.domain.OSProfile;
-import org.jclouds.azurecompute.arm.domain.ResourceDefinition;
-import org.jclouds.azurecompute.arm.domain.Secrets;
-import org.jclouds.azurecompute.arm.domain.StorageAccountType;
-import org.jclouds.azurecompute.arm.domain.StorageProfile;
-import org.jclouds.azurecompute.arm.domain.StorageService;
-import org.jclouds.azurecompute.arm.domain.Subnet;
-import org.jclouds.azurecompute.arm.domain.VHD;
-import org.jclouds.azurecompute.arm.domain.VaultCertificate;
-import org.jclouds.azurecompute.arm.domain.VirtualMachine;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineInstance;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineInstance.PowerState;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineProperties;
-import org.jclouds.azurecompute.arm.domain.NetworkProfile.NetworkInterface;
-import org.jclouds.azurecompute.arm.domain.NetworkProfile.NetworkInterface.NetworkInterfaceProperties;
-import org.jclouds.azurecompute.arm.domain.OSProfile.WindowsConfiguration.WinRM.Protocol;
-import org.jclouds.azurecompute.arm.domain.OSProfile.WindowsConfiguration.WinRM.ProtocolListener;
-import org.jclouds.azurecompute.arm.functions.ParseJobStatus;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiLiveTest;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-import static org.testng.util.Strings.isNullOrEmpty;
-
-import com.beust.jcommander.internal.Lists;
-import com.google.common.base.Predicate;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Iterables;
-
-@Test(groups = "live", testName = "VirtualMachineApiLiveTest")
-public class VirtualMachineApiLiveTest extends BaseAzureComputeApiLiveTest {
-
- private String subscriptionid;
- private String vmName;
- private String nicName;
- private String virtualNetworkName;
- private String subnetId;
-
- @BeforeClass
- @Override
- public void setup() {
- super.setup();
- subscriptionid = getSubscriptionId();
-
- createTestResourceGroup();
-
- virtualNetworkName = String.format("vn-%s-%s", this.getClass().getSimpleName().toLowerCase(), System.getProperty("user.name"));
-
- // Subnets belong to a virtual network so that needs to be created first
- assertNotNull(createDefaultVirtualNetwork(resourceGroupName, virtualNetworkName, "10.2.0.0/16", LOCATION));
-
- //Subnet needs to be up & running before NIC can be created
- String subnetName = String.format("s-%s-%s", this.getClass().getSimpleName().toLowerCase(), System.getProperty("user.name"));
- Subnet subnet = createDefaultSubnet(resourceGroupName, subnetName, virtualNetworkName, "10.2.0.0/23");
- assertNotNull(subnet);
- assertNotNull(subnet.id());
- subnetId = subnet.id();
-
- NetworkInterfaceCard nic = createNetworkInterfaceCard(resourceGroupName, "jc-nic-" + RAND, LOCATION, "ipConfig-" + RAND);
- assertNotNull(nic);
- nicName = nic.name();
-
- vmName = String.format("%3.24s", System.getProperty("user.name") + RAND + this.getClass().getSimpleName()).toLowerCase().substring(0, 15);
- }
-
- @Test
- public void testCreate() {
- VirtualMachine vm = api().createOrUpdate(vmName, LOCATION, getProperties(nicName, null),
- Collections.<String, String> emptyMap(), null);
- assertTrue(!vm.name().isEmpty());
- waitUntilReady(vmName);
- }
-
- @Test(dependsOnMethods = "testCreate")
- public void testGet() {
- VirtualMachine vm = api().get(vmName);
- assertTrue(!vm.name().isEmpty());
- }
-
- @Test(dependsOnMethods = "testCreate")
- public void testGetInstanceView() {
- VirtualMachineInstance vmi = api().getInstanceDetails(vmName);
- assertTrue(!vmi.statuses().isEmpty());
- }
-
- @Test(dependsOnMethods = "testGet")
- public void testStart() {
- api().start(vmName);
- assertTrue(stateReached(vmName, PowerState.RUNNING), "start operation did not complete in the configured timeout");
- }
-
- @Test(dependsOnMethods = "testStart")
- public void testUpdate() {
- VirtualMachine vm = api().get(vmName);
- VirtualMachineProperties oldProperties = vm.properties();
- StorageProfile oldStorageProfile = oldProperties.storageProfile();
-
- DataDisk newDataDisk = DataDisk.builder()
- .name(vmName + "new-data-disk")
- .diskSizeGB("1")
- .lun(1)
- .createOption(DataDisk.DiskCreateOptionTypes.EMPTY)
- .build();
- List<DataDisk> oldDataDisks = oldStorageProfile.dataDisks();
- assertEquals(oldDataDisks.size(), 1);
-
- ImmutableList<DataDisk> newDataDisks = ImmutableList.<DataDisk> builder().addAll(oldDataDisks).add(newDataDisk).build();
- StorageProfile newStorageProfile = oldStorageProfile.toBuilder().dataDisks(newDataDisks).build();
- VirtualMachineProperties newProperties = oldProperties.toBuilder().storageProfile(newStorageProfile).build();
-
- VirtualMachine newVm = vm.toBuilder().properties(newProperties).build();
- vm = api().createOrUpdate(vmName, newVm.location(), newVm.properties(), newVm.tags(), newVm.plan());
-
- assertEquals(vm.properties().storageProfile().dataDisks().size(), oldDataDisks.size() + 1);
- }
-
- @Test(dependsOnMethods = "testUpdate")
- public void testStop() {
- api().stop(vmName);
- assertTrue(stateReached(vmName, PowerState.STOPPED), "stop operation did not complete in the configured timeout");
- }
-
- @Test(dependsOnMethods = "testStop")
- public void testRestart() {
- api().start(vmName);
- assertTrue(stateReached(vmName, PowerState.RUNNING), "start operation did not complete in the configured timeout");
- api().restart(vmName);
- assertTrue(stateReached(vmName, PowerState.RUNNING), "restart operation did not complete in the configured timeout");
- }
-
- @Test(dependsOnMethods = "testCreate")
- public void testList() {
- List<VirtualMachine> list = api().list();
- final VirtualMachine vm = api().get(vmName);
-
- boolean vmPresent = Iterables.any(list, new Predicate<VirtualMachine>() {
- public boolean apply(VirtualMachine input) {
- return input.name().equals(vm.name());
- }
- });
-
- assertTrue(vmPresent);
- }
-
- @Test(dependsOnMethods = "testRestart")
- public void testGeneralize() throws IllegalStateException {
- api().stop(vmName);
- assertTrue(stateReached(vmName, PowerState.STOPPED), "restart operation did not complete in the configured timeout");
- api().generalize(vmName);
- }
-
- @SuppressWarnings("unchecked")
- @Test
- public void testCapture() throws IllegalStateException {
- // Capture is only allowed for Blob based VMs, so let's create one VM for this test
- NetworkInterfaceCard nic = createNetworkInterfaceCard(resourceGroupName, "capture-nic-" + RAND, LOCATION, "ipConfig-" + RAND);
- StorageService storageService = createStorageService(resourceGroupName, "capture" + RAND, LOCATION);
- String blob = storageService.storageServiceProperties().primaryEndpoints().get("blob");
-
- String captureVmName = "capture-" + RAND;
- api().createOrUpdate(captureVmName, LOCATION, getProperties(nic.name(), blob),
- Collections.<String, String> emptyMap(), null);
- waitUntilReady(captureVmName);
-
- api().stop(captureVmName);
- assertTrue(stateReached(captureVmName, PowerState.STOPPED),
- "restart operation did not complete in the configured timeout");
- api().generalize(captureVmName);
-
- URI uri = api().capture(captureVmName, captureVmName, captureVmName);
- assertNotNull(uri);
-
- if (imageAvailablePredicate.apply(uri)) {
- List<ResourceDefinition> definitions = api.getJobApi().captureStatus(uri);
- if (definitions != null) {
- for (ResourceDefinition definition : definitions) {
- Map<String, String> properties = (Map<String, String>) definition.properties();
- Object storageObject = properties.get("storageProfile");
- Map<String, String> properties2 = (Map<String, String>) storageObject;
- Object osDiskObject = properties2.get("osDisk");
- Map<String, String> osProperties = (Map<String, String>) osDiskObject;
- assertNotNull(osProperties.get("name"));
- }
- }
- }
- }
-
- @Test(dependsOnMethods = "testGeneralize", alwaysRun = true)
- public void testDelete() throws Exception {
- URI uri = api().delete(vmName);
- assertResourceDeleted(uri);
- }
-
- private VirtualMachineApi api() {
- return api.getVirtualMachineApi(resourceGroupName);
- }
-
- private VirtualMachineProperties getProperties(String nic, String blob) {
-
- HardwareProfile hwProf = HardwareProfile.create("Standard_D1_v2");
- ImageReference imgRef = ImageReference.builder().publisher("MicrosoftWindowsServer")
- .offer("WindowsServer").sku("2008-R2-SP1").version("latest").build();
-
- DataDisk.Builder dataDisk = DataDisk.builder().name("data").diskSizeGB("100").lun(0).createOption(DataDisk.DiskCreateOptionTypes.EMPTY);
-
- OSDisk.Builder osDisk = OSDisk.builder()
- .name("os")
- .osType("Windows")
- .caching(DataDisk.CachingTypes.READ_WRITE.toString())
- .createOption("FromImage");
-
- if (blob == null) {
- osDisk.managedDiskParameters(ManagedDiskParameters.create(null, StorageAccountType.STANDARD_LRS.toString()));
- } else {
- osDisk.vhd(VHD.create(blob + "vhds/" + vmName + ".vhd"));
- dataDisk.vhd(VHD.create(blob + "vhds/" + vmName + "data.vhd"));
- }
-
- StorageProfile storageProfile = StorageProfile.create(imgRef, osDisk.build(), ImmutableList.of(dataDisk.build()));
-
- List<Secrets> secrets = null;
- OSProfile.WindowsConfiguration.WinRM winRm = null;
- if (!isNullOrEmpty(vaultResourceGroup) && !isNullOrEmpty(vaultName) && !isNullOrEmpty(vaultCertificateUrl)) {
- List<ProtocolListener> listeners = Lists.newArrayList();
-
- listeners.add(OSProfile.WindowsConfiguration.WinRM.ProtocolListener.create(Protocol.HTTPS, vaultCertificateUrl));
- listeners.add(OSProfile.WindowsConfiguration.WinRM.ProtocolListener.create(Protocol.HTTP, null));
-
- winRm = OSProfile.WindowsConfiguration.WinRM.create(listeners);
- VaultCertificate vaultCertificate = VaultCertificate.create(vaultCertificateUrl, vaultName);
- secrets = ImmutableList.of(Secrets.create(Secrets.SourceVault.create(String.format("%s/providers/Microsoft.KeyVault/vaults/%s",
- api.getResourceGroupApi().get(vaultResourceGroup).id(), vaultName)),
- ImmutableList.of(vaultCertificate)));
- }
- OSProfile.WindowsConfiguration windowsConfig = OSProfile.WindowsConfiguration.create(true, winRm, null, true);
- OSProfile osProfile = OSProfile.create(vmName, "azureuser", "RFe3&432dg", null, null, windowsConfig, secrets);
- NetworkInterface networkInterface =
- NetworkInterface.create("/subscriptions/" + subscriptionid +
- "/resourceGroups/" + resourceGroupName + "/providers/Microsoft.Network/networkInterfaces/"
- + nic, NetworkInterfaceProperties.create(true));
- List<NetworkInterface> networkInterfaces = new ArrayList<NetworkInterface>();
- networkInterfaces.add(networkInterface);
- NetworkProfile networkProfile = NetworkProfile.create(networkInterfaces);
- VirtualMachineProperties properties = VirtualMachineProperties.create(null,
- null, null, hwProf, storageProfile, osProfile, networkProfile, null, VirtualMachineProperties.ProvisioningState.CREATING);
- return properties;
- }
-
- private NetworkInterfaceCard createNetworkInterfaceCard(final String resourceGroupName, String networkInterfaceCardName, String locationName, String ipConfigurationName) {
- //Create properties object
- final NetworkInterfaceCardProperties networkInterfaceCardProperties = NetworkInterfaceCardProperties
- .builder()
- .ipConfigurations(
- Arrays.asList(IpConfiguration.create(ipConfigurationName, null, null, null, IpConfigurationProperties
- .create(null, null, "Dynamic", IdReference.create(subnetId), null, null, null)))).build();
-
- final Map<String, String> tags = ImmutableMap.of("jclouds", "livetest");
- return api.getNetworkInterfaceCardApi(resourceGroupName).createOrUpdate(networkInterfaceCardName, locationName, networkInterfaceCardProperties, tags);
- }
-
- private StorageService createStorageService(final String resourceGroupName, final String storageServiceName,
- final String location) {
- URI uri = api.getStorageAccountApi(resourceGroupName).create(storageServiceName, location,
- ImmutableMap.of("property_name", "property_value"),
- ImmutableMap.of("accountType", StorageService.AccountType.Standard_LRS.toString()));
- if (uri != null) {
- assertTrue(uri.toString().contains("api-version"));
-
- boolean jobDone = retry(new Predicate<URI>() {
- @Override
- public boolean apply(final URI uri) {
- return ParseJobStatus.JobStatus.DONE == api.getJobApi().jobStatus(uri);
- }
- }, 60 * 1 * 1000 /* 1 minute timeout */).apply(uri);
- assertTrue(jobDone, "create operation did not complete in the configured timeout");
- }
- return api.getStorageAccountApi(resourceGroupName).get(storageServiceName);
- }
-
- private boolean waitForState(String name, final PowerState state) {
- return api().getInstanceDetails(name).powerState().equals(state);
- }
-
- private void waitUntilReady(String vmName) {
- boolean ready = retry(new Predicate<String>() {
- @Override
- public boolean apply(String name) {
- return !api().get(name).properties().provisioningState().equals(VirtualMachineProperties.ProvisioningState.CREATING);
- }
- }, 60 * 20 * 1000).apply(vmName);
- assertTrue(ready, "createOrUpdate operation did not complete in the configured timeout");
-
- VirtualMachineProperties.ProvisioningState status = api().get(vmName).properties().provisioningState();
- // Cannot be creating anymore. Should be succeeded or running but not failed.
- assertThat(status).isNotEqualTo(VirtualMachineProperties.ProvisioningState.CREATING);
- assertThat(status).isNotEqualTo(VirtualMachineProperties.ProvisioningState.FAILED);
- }
-
- private boolean stateReached(String vmName, final PowerState state) {
- return retry(new Predicate<String>() {
- @Override
- public boolean apply(String name) {
- return waitForState(name, state);
- }
- }, 60 * 4 * 1000).apply(vmName);
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VirtualMachineApiMockTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VirtualMachineApiMockTest.java
deleted file mode 100644
index 372b303..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VirtualMachineApiMockTest.java
+++ /dev/null
@@ -1,409 +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.net.URI;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import org.jclouds.azurecompute.arm.domain.DataDisk;
-import org.jclouds.azurecompute.arm.domain.DiagnosticsProfile;
-import org.jclouds.azurecompute.arm.domain.HardwareProfile;
-import org.jclouds.azurecompute.arm.domain.IdReference;
-import org.jclouds.azurecompute.arm.domain.ImageReference;
-import org.jclouds.azurecompute.arm.domain.ManagedDiskParameters;
-import org.jclouds.azurecompute.arm.domain.NetworkProfile;
-import org.jclouds.azurecompute.arm.domain.NetworkProfile.NetworkInterface;
-import org.jclouds.azurecompute.arm.domain.OSDisk;
-import org.jclouds.azurecompute.arm.domain.OSProfile;
-import org.jclouds.azurecompute.arm.domain.OSProfile.LinuxConfiguration;
-import org.jclouds.azurecompute.arm.domain.OSProfile.WindowsConfiguration.AdditionalUnattendContent;
-import org.jclouds.azurecompute.arm.domain.OSProfile.WindowsConfiguration.WinRM.Protocol;
-import org.jclouds.azurecompute.arm.domain.Plan;
-import org.jclouds.azurecompute.arm.domain.Secrets;
-import org.jclouds.azurecompute.arm.domain.Secrets.SourceVault;
-import org.jclouds.azurecompute.arm.domain.Status;
-import org.jclouds.azurecompute.arm.domain.StorageProfile;
-import org.jclouds.azurecompute.arm.domain.VHD;
-import org.jclouds.azurecompute.arm.domain.VaultCertificate;
-import org.jclouds.azurecompute.arm.domain.VirtualMachine;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineInstance;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineProperties;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiMockTest;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.squareup.okhttp.mockwebserver.MockResponse;
-
-import static com.google.common.collect.Iterables.isEmpty;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertNull;
-import static org.testng.Assert.assertTrue;
-
-@Test(groups = "unit", testName = "VirtualMachineApiMockTest", singleThreaded = true)
-public class VirtualMachineApiMockTest extends BaseAzureComputeApiMockTest {
-
- public void testGet() throws Exception {
- server.enqueue(jsonResponse("/virtualmachine.json"));
- final VirtualMachineApi vmAPI = api.getVirtualMachineApi("groupname");
- assertEquals(vmAPI.get("windowsmachine"),
- getVM(Plan.create("thinkboxsoftware", "deadline-slave-7-2", "deadline7-2")));
- assertSent(server, "GET", "/subscriptions/SUBSCRIPTIONID/resourceGroups/groupname/providers/Microsoft.Compute"
- + "/virtualMachines/windowsmachine?api-version=2016-04-30-preview");
- }
-
- public void testGetEmpty() throws Exception {
- server.enqueue(new MockResponse().setResponseCode(404));
- final VirtualMachineApi vmAPI = api.getVirtualMachineApi("groupname");
- assertNull(vmAPI.get("windowsmachine"));
- assertSent(server, "GET", "/subscriptions/SUBSCRIPTIONID/resourceGroups/groupname/providers/Microsoft.Compute"
- + "/virtualMachines/windowsmachine?api-version=2016-04-30-preview");
- }
-
- public void testGetInstanceDetails() throws Exception {
- server.enqueue(jsonResponse("/virtualmachineInstance.json"));
- final VirtualMachineApi vmAPI = api.getVirtualMachineApi("groupname");
- VirtualMachineInstance actual = vmAPI.getInstanceDetails("windowsmachine");
- VirtualMachineInstance expected = getVMInstance();
-
- assertEquals(actual.statuses().get(0).code(), expected.statuses().get(0).code());
- assertEquals(actual.statuses().get(0).displayStatus(), expected.statuses().get(0).displayStatus());
- assertEquals(actual.statuses().get(0).level(), expected.statuses().get(0).level());
- // assertEquals(actual.statuses().get(0).time().toString(),
- // expected.statuses().get(0).time().toString());
- assertSent(server, "GET", "/subscriptions/SUBSCRIPTIONID/resourceGroups/groupname/providers/Microsoft.Compute"
- + "/virtualMachines/windowsmachine/instanceView?api-version=2016-04-30-preview");
- }
-
- public void testGetInstanceDetailsEmpty() throws Exception {
- server.enqueue(new MockResponse().setResponseCode(404));
- final VirtualMachineApi vmAPI = api.getVirtualMachineApi("groupname");
- assertNull(vmAPI.getInstanceDetails("windowsmachine"));
- assertSent(server, "GET", "/subscriptions/SUBSCRIPTIONID/resourceGroups/groupname/providers/Microsoft.Compute"
- + "/virtualMachines/windowsmachine/instanceView?api-version=2016-04-30-preview");
- }
-
- public void testList() throws Exception {
- server.enqueue(jsonResponse("/virtualmachines.json"));
- final VirtualMachineApi vmAPI = api.getVirtualMachineApi("groupname");
- assertEquals(vmAPI.list(), getVMList());
- assertSent(server, "GET", "/subscriptions/SUBSCRIPTIONID/resourceGroups/groupname/providers/Microsoft.Compute"
- + "/virtualMachines?api-version=2016-04-30-preview");
- }
-
- public void testListEmpty() throws Exception {
- server.enqueue(new MockResponse().setResponseCode(404));
- final VirtualMachineApi vmAPI = api.getVirtualMachineApi("groupname");
- assertTrue(isEmpty(vmAPI.list()));
- assertSent(server, "GET", "/subscriptions/SUBSCRIPTIONID/resourceGroups/groupname/providers/Microsoft.Compute"
- + "/virtualMachines?api-version=2016-04-30-preview");
- }
-
- public void testCreateWithPlan() throws Exception {
- server.enqueue(jsonResponse("/createvirtualmachineresponse.json"));
- Plan plan = Plan.create("thinkboxsoftware", "deadline-slave-7-2", "deadline7-2");
- final VirtualMachineApi vmAPI = api.getVirtualMachineApi("groupname");
- VirtualMachine vm = vmAPI
- .createOrUpdate("windowsmachine", "westus", getVMWithManagedDisksProperties(), ImmutableMap.of("foo", "bar"), plan);
- assertEquals(vm, getVM(plan));
- assertSent(
- server,
- "PUT",
- "/subscriptions/SUBSCRIPTIONID/resourceGroups/groupname/providers/Microsoft.Compute"
- + "/virtualMachines/windowsmachine?validating=false&api-version=2016-04-30-preview",
- "{\"location\":\"westus\",\"properties\":"
- + "{\"vmId\":\"27ee085b-d707-xxxx-yyyy-2370e2eb1cc1\",\"licenseType\":\"Windows_Server\","
- + "\"availabilitySet\":{\"id\":\"/subscriptions/SUBSCRIPTIONID/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/myAVSet\"},"
- + "\"hardwareProfile\":{\"vmSize\":\"Standard_D1\"},"
- + "\"storageProfile\":{\"imageReference\":{\"id\":\"/subscriptions/SUBSCRIPTIONID/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServerEssentials/artifactype/vmimage/offers/OFFER/skus/OFFER/versions/latest\","
- + "\"publisher\":\"publisher\",\"offer\":\"OFFER\",\"sku\":\"sku\",\"version\":\"ver\"},"
- + "\"osDisk\":{\"osType\":\"Windows\",\"name\":\"windowsmachine\","
- + "\"caching\":\"ReadWrite\",\"createOption\":\"FromImage\","
- + "\"managedDisk\":{\"id\":\"/subscriptions/SUBSCRIPTIONID/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/osDisk\",\"storageAccountType\":\"Standard_LRS\"}},"
- + "\"dataDisks\":[{\"name\":\"mydatadisk1\",\"diskSizeGB\":\"1\",\"lun\":0,\"createOption\":\"Empty\",\"caching\":\"ReadWrite\",\"managedDisk\":{\"id\":\"/subscriptions/SUBSCRIPTIONID/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/osDisk\",\"storageAccountType\":\"Standard_LRS\"}}]},"
- + "\"osProfile\":{\"computerName\":\"windowsmachine\",\"adminUsername\":\"azureuser\",\"adminPassword\":\"password\",\"customData\":\"\",\"windowsConfiguration\":{\"provisionVMAgent\":false,"
- + "\"winRM\":{\"listeners\":[{\"protocol\":\"https\",\"certificateUrl\":\"url-to-certificate\"}]},\"additionalUnattendContent\":[{\"passName\":\"oobesystem\",\"componentName\":\"Microsoft-Windows-Shell-Setup\",\"settingName\":\"FirstLogonCommands\",\"content\":\"<XML unattend content>\"}],"
- + "\"enableAutomaticUpdates\":true},"
- + "\"secrets\":[{\"sourceVault\":{\"id\":\"/subscriptions/SUBSCRIPTIONID/resourceGroups/myresourcegroup1/providers/Microsoft.KeyVault/vaults/myvault1\"},\"vaultCertificates\":[{\"certificateUrl\":\"https://myvault1.vault.azure.net/secrets/SECRETNAME/SECRETVERSION\",\"certificateStore\":\"CERTIFICATESTORENAME\"}]}]},"
- + "\"networkProfile\":{\"networkInterfaces\":[{\"id\":\"/subscriptions/SUBSCRIPTIONID/resourceGroups/groupname/providers/Microsoft.Network/networkInterfaces/windowsmachine167\"}]},"
- + "\"diagnosticsProfile\":{\"bootDiagnostics\":{\"enabled\":true,\"storageUri\":\"https://groupname2760.blob.core.windows.net/\"}},\"provisioningState\":\"CREATING\"},"
- + "\"tags\":{\"foo\":\"bar\"},"
- + "\"plan\":{\"name\":\"deadline-slave-7-2\",\"publisher\":\"thinkboxsoftware\",\"product\":\"deadline7-2\"}}");
- }
-
- // See https://docs.microsoft.com/en-us/rest/api/compute/virtualmachines/virtualmachines-create-or-update
- // for where part of the example json response comes from. Unfortunately examples in the microsoft docs
- // are not valid json (e.g. missing commas, illegal quotes). Therefore this example merges the original
- // real-world example (presumably taken from the jclouds wire log), and snippets from the microsoft docs.
- public void testCreate() throws Exception {
- server.enqueue(jsonResponse("/createvirtualmachineresponse.json"));
-
- final VirtualMachineApi vmAPI = api.getVirtualMachineApi("groupname");
- VirtualMachine vm = vmAPI.createOrUpdate("windowsmachine", "westus", getVMWithManagedDisksProperties(), ImmutableMap.of("foo", "bar"), null);
- assertEquals(vm, getVM());
- assertSent(
- server,
- "PUT",
- "/subscriptions/SUBSCRIPTIONID/resourceGroups/groupname/providers/Microsoft.Compute"
- + "/virtualMachines/windowsmachine?validating=false&api-version=2016-04-30-preview",
- "{\"location\":\"westus\",\"properties\":"
- + "{\"vmId\":\"27ee085b-d707-xxxx-yyyy-2370e2eb1cc1\",\"licenseType\":\"Windows_Server\","
- + "\"availabilitySet\":{\"id\":\"/subscriptions/SUBSCRIPTIONID/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/myAVSet\"},"
- + "\"hardwareProfile\":{\"vmSize\":\"Standard_D1\"},"
- + "\"storageProfile\":{\"imageReference\":{\"id\":\"/subscriptions/SUBSCRIPTIONID/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServerEssentials/artifactype/vmimage/offers/OFFER/skus/OFFER/versions/latest\","
- + "\"publisher\":\"publisher\",\"offer\":\"OFFER\",\"sku\":\"sku\",\"version\":\"ver\"},"
- + "\"osDisk\":{\"osType\":\"Windows\",\"name\":\"windowsmachine\","
- + "\"caching\":\"ReadWrite\",\"createOption\":\"FromImage\","
- + "\"managedDisk\":{\"id\":\"/subscriptions/SUBSCRIPTIONID/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/osDisk\",\"storageAccountType\":\"Standard_LRS\"}},"
- + "\"dataDisks\":[{\"name\":\"mydatadisk1\",\"diskSizeGB\":\"1\",\"lun\":0,\"createOption\":\"Empty\",\"caching\":\"ReadWrite\",\"managedDisk\":{\"id\":\"/subscriptions/SUBSCRIPTIONID/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/osDisk\",\"storageAccountType\":\"Standard_LRS\"}}]},"
- + "\"osProfile\":{\"computerName\":\"windowsmachine\",\"adminUsername\":\"azureuser\",\"adminPassword\":\"password\",\"customData\":\"\",\"windowsConfiguration\":{\"provisionVMAgent\":false,"
- + "\"winRM\":{\"listeners\":[{\"protocol\":\"https\",\"certificateUrl\":\"url-to-certificate\"}]},\"additionalUnattendContent\":[{\"passName\":\"oobesystem\",\"componentName\":\"Microsoft-Windows-Shell-Setup\",\"settingName\":\"FirstLogonCommands\",\"content\":\"<XML unattend content>\"}],"
- + "\"enableAutomaticUpdates\":true},"
- + "\"secrets\":[{\"sourceVault\":{\"id\":\"/subscriptions/SUBSCRIPTIONID/resourceGroups/myresourcegroup1/providers/Microsoft.KeyVault/vaults/myvault1\"},\"vaultCertificates\":[{\"certificateUrl\":\"https://myvault1.vault.azure.net/secrets/SECRETNAME/SECRETVERSION\",\"certificateStore\":\"CERTIFICATESTORENAME\"}]}]},"
- + "\"networkProfile\":{\"networkInterfaces\":[{\"id\":\"/subscriptions/SUBSCRIPTIONID/resourceGroups/groupname/providers/Microsoft.Network/networkInterfaces/windowsmachine167\"}]},"
- + "\"diagnosticsProfile\":{\"bootDiagnostics\":{\"enabled\":true,\"storageUri\":\"https://groupname2760.blob.core.windows.net/\"}},\"provisioningState\":\"CREATING\"},"
- + "\"tags\":{\"foo\":\"bar\"}}");
- }
-
- public void testDeleteReturns404() throws Exception {
- server.enqueue(response404());
-
- final VirtualMachineApi vmAPI = api.getVirtualMachineApi("groupname");
-
- URI uri = vmAPI.delete("windowsmachine");
-
- assertEquals(server.getRequestCount(), 1);
- assertNull(uri);
-
- assertSent(server, "DELETE", "/subscriptions/SUBSCRIPTIONID/resourceGroups/groupname/providers/Microsoft.Compute"
- + "/virtualMachines/windowsmachine?api-version=2016-04-30-preview");
- }
-
- public void testDelete() throws Exception {
- server.enqueue(response202WithHeader());
-
- final VirtualMachineApi vmAPI = api.getVirtualMachineApi("groupname");
-
- URI uri = vmAPI.delete("windowsmachine");
-
- assertEquals(server.getRequestCount(), 1);
- assertNotNull(uri);
-
- assertSent(server, "DELETE", "/subscriptions/SUBSCRIPTIONID/resourceGroups/groupname/providers/Microsoft.Compute"
- + "/virtualMachines/windowsmachine?api-version=2016-04-30-preview");
- }
-
- public void testStart() throws Exception {
- server.enqueue(new MockResponse().setResponseCode(204));
-
- final VirtualMachineApi vmAPI = api.getVirtualMachineApi("groupname");
-
- vmAPI.start("windowsmachine");
-
- assertSent(server, "POST", "/subscriptions/SUBSCRIPTIONID/resourceGroups/groupname/providers/Microsoft.Compute"
- + "/virtualMachines/windowsmachine/start?api-version=2016-04-30-preview");
- }
-
- public void testRestart() throws Exception {
- server.enqueue(new MockResponse().setResponseCode(204));
-
- final VirtualMachineApi vmAPI = api.getVirtualMachineApi("groupname");
-
- vmAPI.restart("windowsmachine");
-
- assertSent(server, "POST", "/subscriptions/SUBSCRIPTIONID/resourceGroups/groupname/providers/Microsoft.Compute"
- + "/virtualMachines/windowsmachine/restart?api-version=2016-04-30-preview");
- }
-
- public void testStop() throws Exception {
- server.enqueue(new MockResponse().setResponseCode(204));
-
- final VirtualMachineApi vmAPI = api.getVirtualMachineApi("groupname");
-
- vmAPI.stop("windowsmachine");
-
- assertSent(server, "POST", "/subscriptions/SUBSCRIPTIONID/resourceGroups/groupname/providers/Microsoft.Compute"
- + "/virtualMachines/windowsmachine/powerOff?api-version=2016-04-30-preview");
- }
-
- public void testGeneralize() throws Exception {
- server.enqueue(new MockResponse().setResponseCode(200));
- final VirtualMachineApi vmAPI = api.getVirtualMachineApi("groupname");
- vmAPI.generalize("vm"); // IllegalStateException if failed
- assertSent(server, "POST", "/subscriptions/SUBSCRIPTIONID/resourceGroups/groupname/providers/Microsoft.Compute"
- + "/virtualMachines/vm/generalize?api-version=2016-04-30-preview");
- }
-
- public void testCapture() throws Exception {
- server.enqueue(response202WithHeader());
-
- final VirtualMachineApi vmAPI = api.getVirtualMachineApi("groupname");
- URI uri = vmAPI.capture("vm", "prefix", "container");
- assertNotNull(uri);
- assertSent(server, "POST", "/subscriptions/SUBSCRIPTIONID/resourceGroups/groupname/providers/Microsoft.Compute"
- + "/virtualMachines/vm/capture?api-version=2016-04-30-preview",
- "{\"vhdPrefix\":\"prefix\",\"destinationContainerName\":\"container\",\"overwriteVhds\":\"true\"}");
- }
-
- public void testCapture404() throws Exception {
- server.enqueue(response404());
-
- final VirtualMachineApi vmAPI = api.getVirtualMachineApi("groupname");
- URI uri = vmAPI.capture("vm", "prefix", "container");
- assertNull(uri);
- assertSent(server, "POST", "/subscriptions/SUBSCRIPTIONID/resourceGroups/groupname/providers/Microsoft.Compute"
- + "/virtualMachines/vm/capture?api-version=2016-04-30-preview",
- "{\"vhdPrefix\":\"prefix\",\"destinationContainerName\":\"container\",\"overwriteVhds\":\"true\"}");
- }
-
- private VirtualMachineProperties getVMWithBlobDisksProperties() {
- String licenseType = "Windows_Server";
- IdReference availabilitySet = IdReference.create("/subscriptions/SUBSCRIPTIONID/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/myAVSet");
- HardwareProfile hwProf = HardwareProfile.create("Standard_D1");
- ImageReference imgRef = ImageReference.builder().publisher("publisher").offer("OFFER").sku("sku").version("ver")
- .customImageId("/subscriptions/SUBSCRIPTIONID/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServerEssentials/artifactype/vmimage/offers/OFFER/skus/OFFER/versions/latest")
- .build();
- VHD vhd = VHD.create("https://groupname2760.blob.core.windows.net/vhds/windowsmachine201624102936.vhd");
- List<DataDisk> dataDisks = ImmutableList.of(
- DataDisk.create("mydatadisk1", "1", 0, VHD.create("http://mystorage1.blob.core.windows.net/vhds/mydatadisk1.vhd"),
- null, "Empty", null, null, null));
- ManagedDiskParameters managedDiskParameters = ManagedDiskParameters.create("/subscriptions/SUBSCRIPTIONID/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/osDisk",
- "Standard_LRS");
- OSDisk osDisk = OSDisk.create("Windows", "windowsmachine", vhd, "ReadWrite", "FromImage", null, managedDiskParameters, null);
- StorageProfile storageProfile = StorageProfile.create(imgRef, osDisk, dataDisks);
- LinuxConfiguration linuxConfig = null;
- OSProfile.WindowsConfiguration.WinRM winrm = OSProfile.WindowsConfiguration.WinRM.create(
- ImmutableList.of(
- OSProfile.WindowsConfiguration.WinRM.ProtocolListener.create(Protocol.HTTPS, "url-to-certificate")));
- List<AdditionalUnattendContent> additionalUnattendContent = ImmutableList.of(
- AdditionalUnattendContent.create("oobesystem", "Microsoft-Windows-Shell-Setup", "FirstLogonCommands", "<XML unattend content>"));
- OSProfile.WindowsConfiguration windowsConfig = OSProfile.WindowsConfiguration.create(false, winrm, additionalUnattendContent, true);
- List<Secrets> secrets = ImmutableList.of(
- Secrets.create(SourceVault.create("/subscriptions/SUBSCRIPTIONID/resourceGroups/myresourcegroup1/providers/Microsoft.KeyVault/vaults/myvault1"),
- ImmutableList.of(VaultCertificate.create("https://myvault1.vault.azure.net/secrets/SECRETNAME/SECRETVERSION", "CERTIFICATESTORENAME"))));
- OSProfile osProfile = OSProfile.create("windowsmachine", "azureuser", "password", "", linuxConfig, windowsConfig, secrets);
- NetworkInterface networkInterface = NetworkInterface.create("/subscriptions/SUBSCRIPTIONID"
- + "/resourceGroups/groupname/providers/Microsoft.Network/networkInterfaces/" + "windowsmachine167", null);
- List<NetworkInterface> networkInterfaces = new ArrayList<NetworkInterface>();
- networkInterfaces.add(networkInterface);
- NetworkProfile networkProfile = NetworkProfile.create(networkInterfaces);
- DiagnosticsProfile.BootDiagnostics bootDiagnostics = DiagnosticsProfile.BootDiagnostics.create(true,
- "https://groupname2760.blob.core.windows.net/");
- DiagnosticsProfile diagnosticsProfile = DiagnosticsProfile.create(bootDiagnostics);
- VirtualMachineProperties properties = VirtualMachineProperties.create("27ee085b-d707-xxxx-yyyy-2370e2eb1cc1",
- licenseType, availabilitySet, hwProf, storageProfile, osProfile, networkProfile, diagnosticsProfile,
- VirtualMachineProperties.ProvisioningState.CREATING);
- return properties;
- }
-
- private VirtualMachineProperties getVMWithManagedDisksProperties() {
- String licenseType = "Windows_Server";
- IdReference availabilitySet = IdReference.create("/subscriptions/SUBSCRIPTIONID/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/myAVSet");
- HardwareProfile hwProf = HardwareProfile.create("Standard_D1");
- ImageReference imgRef = ImageReference.builder().publisher("publisher").offer("OFFER").sku("sku").version("ver")
- .customImageId("/subscriptions/SUBSCRIPTIONID/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServerEssentials/artifactype/vmimage/offers/OFFER/skus/OFFER/versions/latest")
- .build();
- ManagedDiskParameters managedDiskParameters = ManagedDiskParameters.create("/subscriptions/SUBSCRIPTIONID/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/osDisk",
- "Standard_LRS");
- List<DataDisk> dataDisks = ImmutableList.of(
- DataDisk.builder().name("mydatadisk1").diskSizeGB("1").lun(0).managedDiskParameters(managedDiskParameters).createOption(DataDisk.DiskCreateOptionTypes.EMPTY).caching(DataDisk.CachingTypes.READ_WRITE).build());
- OSDisk osDisk = OSDisk.builder().osType("Windows").name("windowsmachine").caching("ReadWrite").createOption("FromImage").managedDiskParameters(managedDiskParameters).build();
- StorageProfile storageProfile = StorageProfile.create(imgRef, osDisk, dataDisks);
- LinuxConfiguration linuxConfig = null;
- OSProfile.WindowsConfiguration.WinRM winrm = OSProfile.WindowsConfiguration.WinRM.create(
- ImmutableList.of(
- OSProfile.WindowsConfiguration.WinRM.ProtocolListener.create(Protocol.HTTPS, "url-to-certificate")));
- List<AdditionalUnattendContent> additionalUnattendContent = ImmutableList.of(
- AdditionalUnattendContent.create("oobesystem", "Microsoft-Windows-Shell-Setup", "FirstLogonCommands", "<XML unattend content>"));
- OSProfile.WindowsConfiguration windowsConfig = OSProfile.WindowsConfiguration.create(false, winrm, additionalUnattendContent, true);
- List<Secrets> secrets = ImmutableList.of(
- Secrets.create(SourceVault.create("/subscriptions/SUBSCRIPTIONID/resourceGroups/myresourcegroup1/providers/Microsoft.KeyVault/vaults/myvault1"),
- ImmutableList.of(VaultCertificate.create("https://myvault1.vault.azure.net/secrets/SECRETNAME/SECRETVERSION", "CERTIFICATESTORENAME"))));
- OSProfile osProfile = OSProfile.create("windowsmachine", "azureuser", "password", "", linuxConfig, windowsConfig, secrets);
- NetworkInterface networkInterface = NetworkInterface.create("/subscriptions/SUBSCRIPTIONID"
- + "/resourceGroups/groupname/providers/Microsoft.Network/networkInterfaces/" + "windowsmachine167", null);
- List<NetworkInterface> networkInterfaces = new ArrayList<NetworkInterface>();
- networkInterfaces.add(networkInterface);
- NetworkProfile networkProfile = NetworkProfile.create(networkInterfaces);
- DiagnosticsProfile.BootDiagnostics bootDiagnostics = DiagnosticsProfile.BootDiagnostics.create(true,
- "https://groupname2760.blob.core.windows.net/");
- DiagnosticsProfile diagnosticsProfile = DiagnosticsProfile.create(bootDiagnostics);
- VirtualMachineProperties properties = VirtualMachineProperties.create("27ee085b-d707-xxxx-yyyy-2370e2eb1cc1",
- licenseType, availabilitySet, hwProf, storageProfile, osProfile, networkProfile, diagnosticsProfile,
- VirtualMachineProperties.ProvisioningState.CREATING);
- return properties;
- }
-
- private VirtualMachine getVM() {
- VirtualMachineProperties properties = getVMWithManagedDisksProperties();
- VirtualMachine machine = VirtualMachine.create("/subscriptions/SUBSCRIPTIONID/" + ""
- + "resourceGroups/groupname/providers/Microsoft.Compute/virtualMachines/windowsmachine", "windowsmachine",
- "Microsoft.Compute/virtualMachines", "westus", ImmutableMap.of("foo", "bar"), properties,
- Plan.create("thinkboxsoftware", "deadline-slave-7-2", "deadline7-2"));
- return machine;
- }
-
- private VirtualMachine getVM(Plan plan) {
- VirtualMachineProperties properties = getVMWithManagedDisksProperties();
- VirtualMachine machine = VirtualMachine.create("/subscriptions/SUBSCRIPTIONID/" + ""
- + "resourceGroups/groupname/providers/Microsoft.Compute/virtualMachines/windowsmachine", "windowsmachine",
- "Microsoft.Compute/virtualMachines", "westus", ImmutableMap.of("foo", "bar"), properties, plan);
- return machine;
- }
-
- private VirtualMachineInstance getVMInstance() {
- List<Status> statuses = new ArrayList<Status>();
- String testDate = "Wed May 04 01:38:52 PDT 2016";
- DateFormat formatter = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy");
- Date date = null;
- try {
- date = formatter.parse(testDate);
- } catch (Exception e) {
- e.printStackTrace();
- }
- Status vmStatus = Status.create(
- "ProvisioningState/succeeded", "Info", "Provisioning succeeded", null, date);
- statuses.add(vmStatus);
- Status vmStatus1 = Status.create(
- "PowerState/running", "Info", "VM running", null, null);
- statuses.add(vmStatus1);
-
- VirtualMachineInstance machineInstance = VirtualMachineInstance
- .create(null, null, ImmutableList.copyOf(statuses));
- return machineInstance;
- }
-
- private List<VirtualMachine> getVMList() {
- List<VirtualMachine> list = new ArrayList<VirtualMachine>();
- VirtualMachineProperties propertiesWithManagedDisks = getVMWithManagedDisksProperties();
- VirtualMachine machineWithManagedDisks = VirtualMachine.create("/subscriptions/SUBSCRIPTIONID/" + ""
- + "resourceGroups/groupname/providers/Microsoft.Compute/virtualMachines/windowsmachine", "windowsmachine",
- "Microsoft.Compute/virtualMachines", "westus", null, propertiesWithManagedDisks, null);
- list.add(machineWithManagedDisks);
- VirtualMachineProperties propertiesWithBlobDisks = getVMWithBlobDisksProperties();
- VirtualMachine machineWithBlobDisks = VirtualMachine.create("/subscriptions/SUBSCRIPTIONID/" + ""
- + "resourceGroups/groupname/providers/Microsoft.Compute/virtualMachines/windowsmachine", "windowsmachine",
- "Microsoft.Compute/virtualMachines", "westus", null, propertiesWithBlobDisks, null);
- list.add(machineWithBlobDisks);
- return list;
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VirtualMachineScaleSetApiLiveTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VirtualMachineScaleSetApiLiveTest.java
deleted file mode 100644
index ff93998..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VirtualMachineScaleSetApiLiveTest.java
+++ /dev/null
@@ -1,265 +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 com.google.common.collect.ImmutableMap;
-import org.jclouds.azurecompute.arm.domain.Extension;
-import org.jclouds.azurecompute.arm.domain.ExtensionProfile;
-import org.jclouds.azurecompute.arm.domain.ExtensionProfileSettings;
-import org.jclouds.azurecompute.arm.domain.ExtensionProperties;
-import org.jclouds.azurecompute.arm.domain.IdReference;
-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.ManagedDiskParameters;
-import org.jclouds.azurecompute.arm.domain.NetworkInterfaceCard;
-import org.jclouds.azurecompute.arm.domain.NetworkInterfaceCardProperties;
-import org.jclouds.azurecompute.arm.domain.NetworkInterfaceConfiguration;
-import org.jclouds.azurecompute.arm.domain.NetworkInterfaceConfigurationProperties;
-import org.jclouds.azurecompute.arm.domain.NetworkProfile;
-import org.jclouds.azurecompute.arm.domain.OSDisk;
-import org.jclouds.azurecompute.arm.domain.StorageProfile;
-import org.jclouds.azurecompute.arm.domain.Subnet;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineScaleSet;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineScaleSetDNSSettings;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineScaleSetIpConfiguration;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineScaleSetIpConfigurationProperties;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineScaleSetNetworkProfile;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineScaleSetNetworkSecurityGroup;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineScaleSetOSProfile;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineScaleSetProperties;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineScaleSetPublicIPAddressConfiguration;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineScaleSetPublicIPAddressProperties;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineScaleSetSKU;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineScaleSetUpgradePolicy;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineScaleSetVirtualMachineProfile;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiLiveTest;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.Arrays;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
-
-@Test(groups = "live", testName = "VirtualMachineScaleSetApiLiveTest")
-public class VirtualMachineScaleSetApiLiveTest extends BaseAzureComputeApiLiveTest {
-
- private String subscriptionid;
- private String vmssName;
- private String virtualNetworkName;
- private String subnetId;
- private Subnet subnet;
-
- @BeforeClass
- @Override
- public void setup() {
- super.setup();
- subscriptionid = getSubscriptionId();
-
- createTestResourceGroup(); //BASE: Creates a random resource group using the properties location
-
- virtualNetworkName = String.format("vn-%s-%s", this.getClass().getSimpleName().toLowerCase(), System.getProperty("user.name"));
-
- // Subnets belong to a virtual network so that needs to be created first
- assertNotNull(createDefaultVirtualNetwork(resourceGroupName, virtualNetworkName, "10.2.0.0/16", LOCATION));
-
- //Subnet needs to be up & running before NIC can be created
- String subnetName = String.format("s-%s-%s", this.getClass().getSimpleName().toLowerCase(), System.getProperty("user.name"));
- this.subnet = createDefaultSubnet(resourceGroupName, subnetName, virtualNetworkName, "10.2.0.0/23");
- assertNotNull(subnet);
- assertNotNull(subnet.id());
- this.subnetId = subnet.id();
-
-
- vmssName = String.format("%3.24s", System.getProperty("user.name") + RAND + this.getClass().getSimpleName()).toLowerCase().substring(0, 15);
- }
-
- private VirtualMachineScaleSetApi api() {
- return api.getVirtualMachineScaleSetApi(resourceGroupName);
- }
-
- @Test
- public void testCreate() {
- VirtualMachineScaleSet vmss = api().createOrUpdate(vmssName, LOCATIONDESCRIPTION, getSKU(),
- Collections.<String, String>emptyMap(), getProperties());
- assertTrue(!vmss.name().isEmpty());
-// waitUntilReady(vmssName);
- }
-
- @Test(dependsOnMethods = "testCreate")
- public void testList() throws InterruptedException {
- final VirtualMachineScaleSetApi vmssAPI = api.getVirtualMachineScaleSetApi(resourceGroupName);
- assertEquals(vmssAPI.list().size(), 1);
- }
-
- @Test(dependsOnMethods = "testList")
- public void testGet() {
- final VirtualMachineScaleSetApi vmssAPI = api.getVirtualMachineScaleSetApi(resourceGroupName);
- assertEquals(vmssAPI.get(vmssName).name(), vmssName);
- }
-
- @Test(dependsOnMethods = "testGet", alwaysRun = true)
- public void testDelete() throws Exception {
- final VirtualMachineScaleSetApi vmssAPI = api.getVirtualMachineScaleSetApi(resourceGroupName);
- URI uri = vmssAPI.delete(vmssName);
- assertResourceDeleted(uri);
- }
-
- protected void assertResourceDeleted(URI uri) {
- if (uri != null) {
- assertTrue(resourceDeleted.apply(uri),
- String.format("Resource %s was not terminated in the configured timeout", uri));
- }
- }
-
-
- /**
- * Create a standard SKU
- *
- * @return VirtualMachineScaleSetSKU
- */
- public VirtualMachineScaleSetSKU getSKU() {
- return VirtualMachineScaleSetSKU.create("Standard_A1", "Standard", 10);
- }
-
- private VirtualMachineScaleSetUpgradePolicy getUpgradePolicy() {
- return VirtualMachineScaleSetUpgradePolicy.create("Manual");
- }
-
- private StorageProfile getLinuxStorageProfile_Default() {
- return StorageProfile.create(getLinuxImageReference(), getLinuxOSDisk(), null);
- }
-
- private ManagedDiskParameters getManagedDiskParameters() {
- return ManagedDiskParameters.create(null, "Standard_LRS");
- }
-
- private OSDisk getLinuxOSDisk() {
- return OSDisk.create("Linux", null, null, null, "FromImage",
- null, getManagedDiskParameters(), null);
- }
-
- private ImageReference getLinuxImageReference() {
- return ImageReference.create(null, "Canonical", "UbuntuServer",
- "16.04-LTS", "latest");
- }
-
- private VirtualMachineScaleSetOSProfile getOSProfile() {
- VirtualMachineScaleSetOSProfile.LinuxConfiguration linuxConfiguration =
- VirtualMachineScaleSetOSProfile.LinuxConfiguration.create(false, null);
- VirtualMachineScaleSetOSProfile.WindowsConfiguration windowsConfiguration = null;
-
- return VirtualMachineScaleSetOSProfile.create(vmssName, "jclouds", "jClouds1!",
- linuxConfiguration, windowsConfiguration, null);
- }
-
-
- private VirtualMachineScaleSetNetworkProfile getNetworkProfile() {
- List<NetworkProfile.NetworkInterface> networkInterfacesList = new ArrayList<NetworkProfile.NetworkInterface>();
-
- NetworkInterfaceCard nic = createNetworkInterfaceCard(resourceGroupName, "jc-nic-" + RAND, LOCATION, "ipConfig-" + RAND);
- assertNotNull(nic);
- networkInterfacesList.add(NetworkProfile.NetworkInterface.create(nic.id(), NetworkProfile.NetworkInterface.NetworkInterfaceProperties.create(true)));
-
- List<NetworkInterfaceConfiguration> networkInterfaceConfigurations = new ArrayList<NetworkInterfaceConfiguration>();
- List<VirtualMachineScaleSetIpConfiguration> virtualMachineScaleSetIpConfigurations = new ArrayList<VirtualMachineScaleSetIpConfiguration>();
-
-
- VirtualMachineScaleSetPublicIPAddressConfiguration publicIPAddressConfiguration =
- VirtualMachineScaleSetPublicIPAddressConfiguration.create("pub1", VirtualMachineScaleSetPublicIPAddressProperties.create(15));
-
-
- VirtualMachineScaleSetIpConfigurationProperties virtualMachineScaleSetIpConfigurationProperties =
- VirtualMachineScaleSetIpConfigurationProperties.create(publicIPAddressConfiguration,
- this.subnet, "IPv4", null,
- null, null);
-
- VirtualMachineScaleSetIpConfiguration virtualMachineScaleSetIpConfiguration =
- VirtualMachineScaleSetIpConfiguration.create("ipconfig1", virtualMachineScaleSetIpConfigurationProperties);
-
- virtualMachineScaleSetIpConfigurations.add(virtualMachineScaleSetIpConfiguration);
-
- VirtualMachineScaleSetNetworkSecurityGroup networkSecurityGroup = null;
-
- ArrayList<String> dnsList = new ArrayList<String>();
- dnsList.add("8.8.8.8");
- VirtualMachineScaleSetDNSSettings dnsSettings = VirtualMachineScaleSetDNSSettings.create(dnsList);
-
- NetworkInterfaceConfigurationProperties networkInterfaceConfigurationProperties =
- NetworkInterfaceConfigurationProperties.create(true, false, networkSecurityGroup, dnsSettings, virtualMachineScaleSetIpConfigurations);
- NetworkInterfaceConfiguration networkInterfaceConfiguration = NetworkInterfaceConfiguration.create("nicconfig1", networkInterfaceConfigurationProperties);
- networkInterfaceConfigurations.add(networkInterfaceConfiguration);
-
- return VirtualMachineScaleSetNetworkProfile.create(networkInterfaceConfigurations);
- }
-
-
- private ExtensionProfile getExtensionProfile() {
- List<Extension> extensions = new ArrayList<Extension>();
-
- List<String> uris = new ArrayList<String>();
- uris.add("https://mystorage1.blob.core.windows.net/winvmextekfacnt/SampleCmd_1.cmd");
- ExtensionProfileSettings extensionProfileSettings = ExtensionProfileSettings.create(uris, "SampleCmd_1.cmd");
-
- Map<String, String> protectedSettings = new HashMap<String, String>();
- protectedSettings.put("StorageAccountKey", "jclouds-accountkey");
-
- ExtensionProperties extensionProperties = ExtensionProperties.create("Microsoft.compute", "CustomScriptExtension",
- "1.1", false, extensionProfileSettings,
- protectedSettings);
-
- Extension extension = Extension.create("extensionName", extensionProperties);
- extensions.add(extension);
-
- return ExtensionProfile.create(extensions);
- }
-
-
- private VirtualMachineScaleSetVirtualMachineProfile getVirtualMachineProfile() {
- return VirtualMachineScaleSetVirtualMachineProfile.create(getLinuxStorageProfile_Default(), getOSProfile(), getNetworkProfile(), getExtensionProfile());
- }
-
- public VirtualMachineScaleSetProperties getProperties() {
-
- return VirtualMachineScaleSetProperties.create(null, null, getUpgradePolicy(), null, getVirtualMachineProfile());
- }
-
- private NetworkInterfaceCard createNetworkInterfaceCard(final String resourceGroupName, String networkInterfaceCardName, String locationName, String ipConfigurationName) {
- //Create properties object
- final NetworkInterfaceCardProperties networkInterfaceCardProperties = NetworkInterfaceCardProperties
- .builder()
- .ipConfigurations(
- Arrays.asList(IpConfiguration.create(ipConfigurationName, null, null, null, IpConfigurationProperties
- .create(null, null, "Dynamic", IdReference.create(subnetId), null, null, null)))).build();
-
- final Map<String, String> tags = ImmutableMap.of("jclouds", "livetest");
- return api.getNetworkInterfaceCardApi(resourceGroupName).createOrUpdate(networkInterfaceCardName, locationName, networkInterfaceCardProperties, tags);
- }
-
- public String getSubscriptionid() {
- return subscriptionid;
- }
-
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VirtualMachineScaleSetApiMockTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VirtualMachineScaleSetApiMockTest.java
deleted file mode 100644
index e0420fa..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VirtualMachineScaleSetApiMockTest.java
+++ /dev/null
@@ -1,453 +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 com.google.common.collect.ImmutableMap;
-import org.jclouds.azurecompute.arm.domain.DataDisk;
-import org.jclouds.azurecompute.arm.domain.Extension;
-import org.jclouds.azurecompute.arm.domain.ExtensionProfile;
-import org.jclouds.azurecompute.arm.domain.ExtensionProfileSettings;
-import org.jclouds.azurecompute.arm.domain.ExtensionProperties;
-import org.jclouds.azurecompute.arm.domain.IdReference;
-import org.jclouds.azurecompute.arm.domain.ImageReference;
-import org.jclouds.azurecompute.arm.domain.ManagedDiskParameters;
-import org.jclouds.azurecompute.arm.domain.NetworkInterfaceCard;
-import org.jclouds.azurecompute.arm.domain.NetworkInterfaceCardProperties;
-import org.jclouds.azurecompute.arm.domain.NetworkInterfaceConfiguration;
-import org.jclouds.azurecompute.arm.domain.NetworkInterfaceConfigurationProperties;
-import org.jclouds.azurecompute.arm.domain.NetworkProfile;
-import org.jclouds.azurecompute.arm.domain.OSDisk;
-import org.jclouds.azurecompute.arm.domain.Secrets;
-import org.jclouds.azurecompute.arm.domain.StorageProfile;
-import org.jclouds.azurecompute.arm.domain.Subnet;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineScaleSet;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineScaleSetDNSSettings;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineScaleSetIpConfiguration;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineScaleSetIpConfigurationProperties;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineScaleSetNetworkProfile;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineScaleSetOSProfile;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineScaleSetProperties;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineScaleSetPublicIPAddressConfiguration;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineScaleSetPublicIPAddressProperties;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineScaleSetSKU;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineScaleSetUpgradePolicy;
-import org.jclouds.azurecompute.arm.domain.VirtualMachineScaleSetVirtualMachineProfile;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiMockTest;
-import org.testng.annotations.Test;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import static com.google.common.collect.Iterables.isEmpty;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertNull;
-import static org.testng.Assert.assertTrue;
-
-
-@Test(groups = "unit", testName = "VirtualMachineScaleSetAPIMockTest", singleThreaded = true)
-public class VirtualMachineScaleSetApiMockTest extends BaseAzureComputeApiMockTest {
-
- private final String resourcegroup = "myresourcegroup";
- private final String vmssname = "jclouds-vmssname";
-
- public void testGet() throws InterruptedException {
- server.enqueue(jsonResponse("/virtualmachinescalesetget.json").setResponseCode(200));
- final VirtualMachineScaleSetApi vmssAPI = api.getVirtualMachineScaleSetApi(resourcegroup);
- assertEquals(vmssAPI.get(vmssname).name(), vmssname);
- assertSent(server,
- "GET", "/subscriptions/SUBSCRIPTIONID/resourceGroups/myresourcegroup/" +
- "providers/Microsoft.Compute"
- + "/VirtualMachineScaleSets/jclouds-vmssname?api-version=2017-03-30");
- }
-
- public void testGetWhen404() throws InterruptedException {
- server.enqueue(jsonResponse("/virtualmachinescalesetgetwhen404.json").setResponseCode(404));
- final VirtualMachineScaleSetApi vmssAPI = api.getVirtualMachineScaleSetApi(resourcegroup);
- VirtualMachineScaleSet vmss = vmssAPI.get(vmssname + 1);
- assertSent(server,
- "GET",
- "/subscriptions/SUBSCRIPTIONID/resourceGroups/myresourcegroup/providers/" +
- "Microsoft.Compute/VirtualMachineScaleSets/" +
- vmssname + "1?api-version=2017-03-30");
- assertNull(vmss);
- }
-
- public void testCreateOrUpdate() throws InterruptedException {
- server.enqueue(
- jsonResponse(
- "/virtualmachinescalesetresponsecreateorupdate.json").setResponseCode(200));
- final VirtualMachineScaleSetApi vmssAPI = api.getVirtualMachineScaleSetApi(resourcegroup);
- VirtualMachineScaleSet vmss = CreateOrUpdateVMSS(vmssAPI);
-
- assertNotNull(vmss);
- assertSent(server,
- "PUT",
- "/subscriptions/SUBSCRIPTIONID/resourceGroups/myresourcegroup/providers/" +
- "Microsoft.Compute"
- + "/VirtualMachineScaleSets/" + vmssname + "?api-version=2017-03-30",
- "{\n" +
- " \"location\": \"eastus\",\n" +
- " \"sku\": {\n" +
- " \"name\": \"Standard_A1\",\n" +
- " \"tier\": \"Standard\",\n" +
- " \"capacity\": 10\n" +
- " },\n" +
- " \"properties\": {\n" +
- " \"singlePlacementGroup\": true,\n" +
- " \"overProvision\": true,\n" +
- " \"upgradePolicy\": {\n" +
- " \"mode\": \"Manual\"\n" +
- " },\n" +
- " \"virtualMachineProfile\": {\n" +
- " \"storageProfile\": {\n" +
- " \"imageReference\": {\n" +
- " \"publisher\": \"Canonical\",\n" +
- " \"offer\": \"UbuntuServer\",\n" +
- " \"sku\": \"16.04-LTS\",\n" +
- " \"version\": \"latest\"\n" +
- " },\n" +
- " \"osDisk\": {\n" +
- " \"osType\": \"Windows\",\n" +
- " \"createOption\": \"FromImage\",\n" +
- " \"managedDisk\": {\n" +
- " \"storageAccountType\": \"Standard_LRS\"\n" +
- " }\n" +
- " },\n" +
- " \"dataDisks\": [{\n" +
- " \"diskSizeGB\": \"10\",\n" +
- " \"lun\": 1,\n" +
- " \"createOption\": \"Unrecognized\",\n" +
- " \"caching\": \"None\",\n" +
- " \"managedDisk\": {\n" +
- " \"storageAccountType\": \"Standard_LRS\"\n" +
- " }\n" +
- " }\n" +
- " ]\n" +
- " },\n" +
- " \"osProfile\": {\n" +
- " \"computerNamePrefix\": \"jclouds-vmssname\",\n" +
- " \"adminUsername\": \"admin\",\n" +
- " \"adminPassword\": \"password\",\n" +
- " \"linuxConfiguration\": {\n" +
- " \"disablePasswordAuthentication\": false\n" +
- " },\n" +
- " \"secrets\": []\n" +
- " },\n" +
- " \"networkProfile\": {\n" +
- " \"networkInterfaceConfigurations\": [{\n" +
- " \"name\": \"nicconfig1\",\n" +
- " \"properties\": {\n" +
- " \"primary\": true,\n" +
- " \"enableAcceleratedNetworking\": false,\n" +
- " \"dnsSettings\": {\n" +
- " \"dnsServers\": [\"8.8.8.8\"]\n" +
- " },\n" +
- " \"ipConfigurations\": [{\n" +
- " \"name\": \"ipconfig1\",\n" +
- " \"properties\": {\n" +
- " \"publicIPAddressConfiguration\": {\n" +
- " \"name\": \"pub1\",\n" +
- " \"properties\": {\n" +
- " \"idleTimeoutInMinutes\": 15\n" +
- " }\n" +
- " },\n" +
- " \"subnet\": {\n" +
- " \"name\": \"virtualNetworkName\",\n" +
- " \"id\": \"/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxxx/resourceGroups/" +
- "jcloud-eastus/providers/Microsoft.Network/virtualNetworks/" +
- "jclouds-eastus-virtualNetworkName/subnets/jclouds-eastus-subnet\",\n" +
- " \"properties\": {}\n" +
- " },\n" +
- " \"privateIPAddressVersion\": \"IPv4\",\n" +
- " \"loadBalancerBackendAddressPools\": [],\n" +
- " \"loadBalancerInboundNatPools\": []\n" +
- " }\n" +
- " }\n" +
- " ]\n" +
- " }\n" +
- " }\n" +
- " ]\n" +
- " },\n" +
- " \"extensionProfile\": {\n" +
- " \"extensions\": [{\n" +
- " \"name\": \"extensionName\",\n" +
- " \"properties\": {\n" +
- " \"publisher\": \"Microsoft.compute\",\n" +
- " \"type\": \"CustomScriptExtension\",\n" +
- " \"typeHandlerVersion\": \"1.1\",\n" +
- " \"autoUpgradeMinorVersion\": false,\n" +
- " \"settings\": {\n" +
- " \"fileUris\": [\"https://mystorage1.blob.core.windows.net/winvmextekfacnt/" +
- "SampleCmd_1.cmd\"],\n" +
- " \"commandToExecute\": \"SampleCmd_1.cmd\"\n" +
- " },\n" +
- " \"protectedSettings\": {\n" +
- " \"StorageAccountKey\": \"jclouds-accountkey\"\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- " ]\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n"
- );
- }
-
- private VirtualMachineScaleSet CreateOrUpdateVMSS(VirtualMachineScaleSetApi vmssAPI) {
- return vmssAPI.createOrUpdate(
- vmssname,
- "eastus",
- VirtualMachineScaleSetSKU.create(
- "Standard_A1",
- "Standard",
- 10),
- null,
- VirtualMachineScaleSetProperties.create(
- true,
- true,
- VirtualMachineScaleSetUpgradePolicy.create("Manual"),
- null,
- VirtualMachineScaleSetVirtualMachineProfile.create(
- StorageProfile.create(
- ImageReference.create(
- null,
- "Canonical",
- "UbuntuServer",
- "16.04-LTS",
- "latest"),
- OSDisk.create(
- "Windows",
- null,
- null,
- null,
- "FromImage",
- null,
- ManagedDiskParameters.create(
- null,
- "Standard_LRS"),
- null),
- Arrays.asList(DataDisk.create(
- null,
- "10",
- 1,
- null,
- null,
- "FromImage",
- "None",
- ManagedDiskParameters.create(
- null,
- "Standard_LRS"),
- null))),
- VirtualMachineScaleSetOSProfile.create(
- "jclouds-vmssname",
- "admin",
- "password",
- VirtualMachineScaleSetOSProfile.LinuxConfiguration.create(
- false,
- null),
- null,
- new ArrayList<Secrets>()),
- getNetworkProfile(),
- getExtensionProfile()
-
- )
- ));
- }
-
-
- private VirtualMachineScaleSetNetworkProfile getNetworkProfile() {
- List<NetworkProfile.NetworkInterface> networkInterfacesList =
- new ArrayList<NetworkProfile.NetworkInterface>();
-
- NetworkInterfaceCard nic =
- createNetworkInterfaceCard(
- "jc-nic-" + 123,
- "eastus");
- networkInterfacesList.add(NetworkProfile.NetworkInterface.create(
- nic.id(),
- NetworkProfile.NetworkInterface.NetworkInterfaceProperties.create(true)));
-
- List<NetworkInterfaceConfiguration> networkInterfaceConfigurations =
- new ArrayList<NetworkInterfaceConfiguration>();
- List<VirtualMachineScaleSetIpConfiguration> virtualMachineScaleSetIpConfigurations =
- new ArrayList<VirtualMachineScaleSetIpConfiguration>();
-
-
- VirtualMachineScaleSetPublicIPAddressConfiguration publicIPAddressConfiguration =
- VirtualMachineScaleSetPublicIPAddressConfiguration.create(
- "pub1",
- VirtualMachineScaleSetPublicIPAddressProperties.create(15));
-
-
- VirtualMachineScaleSetIpConfigurationProperties virtualMachineScaleSetIpConfigurationProperties =
- VirtualMachineScaleSetIpConfigurationProperties.create(
- publicIPAddressConfiguration,
- createDefaultSubnet(
- "virtualNetworkName"
- ),
- "IPv4",
- null,
- null,
- null);
-
- VirtualMachineScaleSetIpConfiguration virtualMachineScaleSetIpConfiguration =
- VirtualMachineScaleSetIpConfiguration.create(
- "ipconfig1",
- virtualMachineScaleSetIpConfigurationProperties);
-
- virtualMachineScaleSetIpConfigurations.add(virtualMachineScaleSetIpConfiguration);
-
- ArrayList<String> dnsList = new ArrayList<String>();
- dnsList.add("8.8.8.8");
- VirtualMachineScaleSetDNSSettings dnsSettings = VirtualMachineScaleSetDNSSettings.create(dnsList);
-
- NetworkInterfaceConfigurationProperties networkInterfaceConfigurationProperties =
- NetworkInterfaceConfigurationProperties.create(
- true,
- false,
- null,
- dnsSettings,
- virtualMachineScaleSetIpConfigurations);
- NetworkInterfaceConfiguration networkInterfaceConfiguration =
- NetworkInterfaceConfiguration.create(
- "nicconfig1",
- networkInterfaceConfigurationProperties);
- networkInterfaceConfigurations.add(networkInterfaceConfiguration);
-
- return VirtualMachineScaleSetNetworkProfile.create(networkInterfaceConfigurations);
- }
-
-
- private NetworkInterfaceCard createNetworkInterfaceCard(
- String networkInterfaceCardName, String locationName) {
- //Create properties object
- NetworkInterfaceCardProperties networkInterfaceCardProperties =
- NetworkInterfaceCardProperties.create(
- null,
- null,
- false,
- null,
- IdReference.create(
- "/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxxx/resourceGroups/" +
- "jcloud-eastus/providers/" +
- "Microsoft.Network/virtualNetworks/" +
- "jclouds-eastus-virtualNetworkName/subnets/" +
- "jclouds-eastus-subnet")
- );
-
- Map<String, String> tags = ImmutableMap.of("jclouds", "livetest");
- return NetworkInterfaceCard.create(
- networkInterfaceCardName,
- "",
- null,
- locationName,
- networkInterfaceCardProperties, tags);
- }
-
- protected Subnet createDefaultSubnet(final String subnetName) {
- Subnet.SubnetProperties properties = Subnet.SubnetProperties.create(
- null,
- null,
- null);
- return Subnet.create(
- subnetName,
- "/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxxx/resourceGroups/jcloud-eastus/providers/" +
- "Microsoft.Network/virtualNetworks/jclouds-eastus-virtualNetworkName/subnets/" +
- "jclouds-eastus-subnet",
- null,
- properties);
- }
-
- private ExtensionProfile getExtensionProfile() {
- List<Extension> extensions = new ArrayList<Extension>();
-
- List<String> uris = new ArrayList<String>();
- uris.add("https://mystorage1.blob.core.windows.net/winvmextekfacnt/SampleCmd_1.cmd");
-
- Map<String, String> protectedSettings = new HashMap<String, String>();
- protectedSettings.put("StorageAccountKey", "jclouds-accountkey");
-
- Extension extension = Extension.create(
- "extensionName",
- ExtensionProperties.create(
- "Microsoft.compute",
- "CustomScriptExtension",
- "1.1",
- false,
- ExtensionProfileSettings.create(
- uris,
- "SampleCmd_1.cmd"),
- protectedSettings));
- extensions.add(extension);
-
- return ExtensionProfile.create(extensions);
- }
-
- public void testList() throws InterruptedException {
- server.enqueue(jsonResponse("/virtualmachinescalesetlist.json").setResponseCode(200));
- final VirtualMachineScaleSetApi vmssAPI = api.getVirtualMachineScaleSetApi(resourcegroup);
- assertEquals(vmssAPI.list().size(), 1);
- assertSent(server,
- "GET",
- "/subscriptions/SUBSCRIPTIONID/resourceGroups/myresourcegroup/providers/" +
- "Microsoft.Compute"
- + "/VirtualMachineScaleSets?api-version=2017-03-30");
- }
-
- public void testListWhen404() throws InterruptedException {
- server.enqueue(
- jsonResponse("/virtualmachinescalesetlistwhen404.json").setResponseCode(404));
- final VirtualMachineScaleSetApi vmssAPI = api.getVirtualMachineScaleSetApi(
- resourcegroup + "1");
- List<VirtualMachineScaleSet> vmssList = vmssAPI.list();
- assertSent(server,
- "GET",
- "/subscriptions/SUBSCRIPTIONID/resourceGroups/myresourcegroup1/providers/" +
- "Microsoft.Compute"
- + "/VirtualMachineScaleSets?api-version=2017-03-30");
- assertTrue(isEmpty(vmssList));
- }
-
-
- public void testDeleteWhen404() throws InterruptedException {
- server.enqueue(jsonResponse("/virtualmachinescalesetlist.json").setResponseCode(404));
- final VirtualMachineScaleSetApi vmssAPI = api.getVirtualMachineScaleSetApi(resourcegroup);
- assertNull(vmssAPI.delete(vmssname));
- assertSent(server,
- "DELETE",
- "/subscriptions/SUBSCRIPTIONID/resourceGroups/myresourcegroup/providers/" +
- "Microsoft.Compute"
- + "/VirtualMachineScaleSets/" + vmssname + "?api-version=2017-03-30");
-
- }
-
- public void testDelete() throws InterruptedException {
- server.enqueue(response202WithHeader());
- final VirtualMachineScaleSetApi vmssAPI = api.getVirtualMachineScaleSetApi(resourcegroup);
- assertNotNull(vmssAPI.delete(vmssname));
- assertSent(server,
- "DELETE",
- "/subscriptions/SUBSCRIPTIONID/resourceGroups/myresourcegroup/providers/" +
- "Microsoft.Compute"
- + "/VirtualMachineScaleSets/jclouds-vmssname?api-version=2017-03-30");
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VirtualNetworkApiLiveTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VirtualNetworkApiLiveTest.java
deleted file mode 100644
index c0271d3..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VirtualNetworkApiLiveTest.java
+++ /dev/null
@@ -1,89 +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 static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.jclouds.azurecompute.arm.domain.VirtualNetwork;
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiLiveTest;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-@Test(groups = "live", singleThreaded = true)
-public class VirtualNetworkApiLiveTest extends BaseAzureComputeApiLiveTest {
-
- private String virtualNetworkName;
-
- @BeforeClass
- @Override
- public void setup() {
- super.setup();
- createTestResourceGroup();
- virtualNetworkName = String.format("vn-%s-%s", this.getClass().getSimpleName().toLowerCase(), System.getProperty("user.name"));
- }
-
- @Test
- public void deleteVirtualNetworkResourceDoesNotExist() {
- boolean status = api().delete(virtualNetworkName);
- assertFalse(status);
- }
-
- @Test(dependsOnMethods = "deleteVirtualNetworkResourceDoesNotExist")
- public void createVirtualNetwork() {
-
- final VirtualNetwork.VirtualNetworkProperties virtualNetworkProperties =
- VirtualNetwork.VirtualNetworkProperties.builder().addressSpace(
- VirtualNetwork.AddressSpace.create(Arrays.asList(DEFAULT_VIRTUALNETWORK_ADDRESS_PREFIX))).build();
-
- VirtualNetwork vn = api().createOrUpdate(virtualNetworkName, LOCATION, null, virtualNetworkProperties);
-
- assertEquals(vn.name(), virtualNetworkName);
- assertEquals(vn.location(), LOCATION);
- }
-
- @Test(dependsOnMethods = "createVirtualNetwork")
- public void getVirtualNetwork() {
- VirtualNetwork vn = api().get(virtualNetworkName);
-
- assertNotNull(vn.name());
- assertNotNull(vn.location());
- assertNotNull(vn.properties().addressSpace().addressPrefixes());
- }
-
- @Test(dependsOnMethods = "createVirtualNetwork")
- public void listVirtualNetworks() {
- List<VirtualNetwork> vnList = api().list();
- assertTrue(vnList.size() > 0);
- }
-
- @Test(dependsOnMethods = {"listVirtualNetworks", "getVirtualNetwork"}, alwaysRun = true)
- public void deleteVirtualNetwork() {
- boolean status = api().delete(virtualNetworkName);
- assertTrue(status);
- }
-
- private VirtualNetworkApi api() {
- return api.getVirtualNetworkApi(resourceGroupName);
- }
-
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VirtualNetworkApiMockTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VirtualNetworkApiMockTest.java
deleted file mode 100644
index 8ba0406..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/VirtualNetworkApiMockTest.java
+++ /dev/null
@@ -1,137 +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 org.jclouds.azurecompute.arm.domain.VirtualNetwork;
-
-import org.testng.annotations.Test;
-
-import org.jclouds.azurecompute.arm.internal.BaseAzureComputeApiMockTest;
-
-import java.util.Arrays;
-import java.util.List;
-
-import static com.google.common.collect.Iterables.isEmpty;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
-import static org.testng.Assert.assertNull;
-
-@Test(groups = "unit", testName = "VirtualNetworkApiMockTest", singleThreaded = true)
-public class VirtualNetworkApiMockTest extends BaseAzureComputeApiMockTest {
-
- private final String subscriptionid = "SUBSCRIPTIONID";
- private final String resourcegroup = "myresourcegroup";
- private final String virtualNetwork = "mockvirtualnetwork";
- private final String apiVersion = "api-version=2015-06-15";
- private final String location = "westeurope";
-
- public void getVirtualNetwork() throws InterruptedException {
- server.enqueue(jsonResponse("/virtualnetwork.json"));
-
- final VirtualNetworkApi vnApi = api.getVirtualNetworkApi(resourcegroup);
- VirtualNetwork vn = vnApi.get(virtualNetwork);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/virtualNetworks/%s?%s", subscriptionid, resourcegroup, virtualNetwork, apiVersion);
- assertSent(server, "GET", path);
- assertEquals(vn.name(), "mockvirtualnetwork");
- assertEquals(vn.properties().resourceGuid(), "1568c76a-73a4-4a60-8dfb-53b823197ccb");
- assertEquals(vn.properties().addressSpace().addressPrefixes().get(0), "10.2.0.0/16");
- assertEquals(vn.tags().get("tagkey"), "tagvalue");
- }
-
- public void getVirtualNetworkReturns404() throws InterruptedException {
- server.enqueue(response404());
-
- final VirtualNetworkApi vnApi = api.getVirtualNetworkApi(resourcegroup);
- VirtualNetwork vn = vnApi.get(virtualNetwork);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/virtualNetworks/%s?%s", subscriptionid, resourcegroup, virtualNetwork, apiVersion);
- assertSent(server, "GET", path);
-
- assertNull(vn);
- }
-
- public void listVirtualNetworks() throws InterruptedException {
- server.enqueue(jsonResponse("/listvirtualnetworks.json"));
-
- final VirtualNetworkApi vnApi = api.getVirtualNetworkApi(resourcegroup);
- List<VirtualNetwork> vnList = vnApi.list();
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/virtualNetworks?%s", subscriptionid, resourcegroup, apiVersion);
-
- assertSent(server, "GET", path);
- assertEquals(vnList.size(), 3);
- }
-
- public void listVirtualNetworkReturns404() throws InterruptedException {
- server.enqueue(response404());
-
- final VirtualNetworkApi vnApi = api.getVirtualNetworkApi(resourcegroup);
- List<VirtualNetwork> vnList = vnApi.list();
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/virtualNetworks?%s", subscriptionid, resourcegroup, apiVersion);
-
- assertSent(server, "GET", path);
-
- assertTrue(isEmpty(vnList));
- }
-
- public void createVirtualNetwork() throws InterruptedException {
-
- server.enqueue(jsonResponse("/createvirtualnetwork.json").setStatus("HTTP/1.1 201 Created"));
-
- final VirtualNetworkApi vnApi = api.getVirtualNetworkApi(resourcegroup);
-
- final VirtualNetwork.VirtualNetworkProperties virtualNetworkProperties =
- VirtualNetwork.VirtualNetworkProperties.create(null, null,
- VirtualNetwork.AddressSpace.create(Arrays.asList("10.2.0.0/16")), null);
-
-
- vnApi.createOrUpdate(virtualNetwork, location, null, virtualNetworkProperties);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/virtualNetworks/%s?%s", subscriptionid, resourcegroup, virtualNetwork, apiVersion);
- String json = String.format("{\"location\":\"%s\",\"properties\":{\"addressSpace\":{\"addressPrefixes\":[\"%s\"]}}}", location, "10.2.0.0/16");
- assertSent(server, "PUT", path, json);
- }
-
- public void deleteVirtualNetwork() throws InterruptedException {
-
- server.enqueue(response202());
-
- final VirtualNetworkApi vnApi = api.getVirtualNetworkApi(resourcegroup);
-
- boolean status = vnApi.delete(virtualNetwork);
- assertTrue(status);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/virtualNetworks/%s?%s", subscriptionid, resourcegroup, virtualNetwork, apiVersion);
- assertSent(server, "DELETE", path);
-
- }
-
- public void deleteVirtualNetworkResourceDoesNotExist() throws InterruptedException {
-
- server.enqueue(response204());
-
- final VirtualNetworkApi vnApi = api.getVirtualNetworkApi(resourcegroup);
-
- boolean status = vnApi.delete(virtualNetwork);
- assertFalse(status);
-
- String path = String.format("/subscriptions/%s/resourcegroups/%s/providers/Microsoft.Network/virtualNetworks/%s?%s", subscriptionid, resourcegroup, virtualNetwork, apiVersion);
- assertSent(server, "DELETE", path);
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/filters/ApiVersionFilterTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/filters/ApiVersionFilterTest.java
deleted file mode 100644
index f3b15ce..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/filters/ApiVersionFilterTest.java
+++ /dev/null
@@ -1,129 +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.filters;
-
-import static org.easymock.EasyMock.createMock;
-import static org.easymock.EasyMock.expect;
-import static org.easymock.EasyMock.replay;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.API_VERSION_PREFIX;
-import static org.jclouds.reflect.Reflection2.method;
-import static org.testng.Assert.assertEquals;
-
-import java.util.Properties;
-
-import javax.inject.Named;
-
-import org.jclouds.http.HttpRequest;
-import org.jclouds.http.HttpResponse;
-import org.jclouds.internal.FilterStringsBoundToInjectorByName;
-import org.jclouds.reflect.Invocation;
-import org.jclouds.rest.config.InvocationConfig;
-import org.jclouds.rest.internal.GeneratedHttpRequest;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import com.google.inject.AbstractModule;
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-import com.google.inject.name.Names;
-
-@Test(groups = "unit", testName = "ApiVersionFilterTest", singleThreaded = true)
-public class ApiVersionFilterTest {
-
- public interface VersionedApi {
- HttpResponse noName();
-
- @Named("named:get")
- HttpResponse named();
- }
-
- private Invocation noName;
- private Invocation named;
- private InvocationConfig config;
-
- @BeforeMethod
- public void setup() {
- noName = Invocation.create(method(VersionedApi.class, "noName"), ImmutableList.of());
- named = Invocation.create(method(VersionedApi.class, "named"), ImmutableList.of());
-
- config = createMock(InvocationConfig.class);
- expect(config.getCommandName(noName)).andReturn("VersionedApi.noName");
- expect(config.getCommandName(named)).andReturn("named:get");
- replay(config);
- }
-
- @Test(expectedExceptions = IllegalArgumentException.class)
- public void testFailIfNoGeneratedHttpRequest() {
- ApiVersionFilter filter = new ApiVersionFilter(config, filterStringsBoundToInjectorByName(new Properties()));
- filter.filter(HttpRequest.builder().method("GET").endpoint("http://localhost").build());
- }
-
- @Test
- public void testOverrideMethodVersion() {
- Properties props = new Properties();
- props.setProperty(API_VERSION_PREFIX + "named:get", "namedversion");
- props.setProperty(API_VERSION_PREFIX + "VersionedApi.noName", "noNameversion");
- ApiVersionFilter filter = new ApiVersionFilter(config, filterStringsBoundToInjectorByName(props));
-
- HttpRequest request = GeneratedHttpRequest.builder().method("GET").endpoint("http://localhost")
- .invocation(noName).addQueryParam("api-version", "original", "original2").build();
- HttpRequest filtered = filter.filter(request);
- assertEquals(filtered.getEndpoint().getQuery(), "api-version=noNameversion");
-
- request = GeneratedHttpRequest.builder().method("GET").endpoint("http://localhost").invocation(named)
- .addQueryParam("api-version", "original", "original2").build();
- filtered = filter.filter(request);
- assertEquals(filtered.getEndpoint().getQuery(), "api-version=namedversion");
- }
-
- @Test
- public void testFallbackToClassName() {
- Properties props = new Properties();
- props.setProperty(API_VERSION_PREFIX + "VersionedApi", "classversion");
- ApiVersionFilter filter = new ApiVersionFilter(config, filterStringsBoundToInjectorByName(props));
-
- HttpRequest request = GeneratedHttpRequest.builder().method("GET").endpoint("http://localhost")
- .invocation(noName).addQueryParam("api-version", "original", "original2").build();
- HttpRequest filtered = filter.filter(request);
- assertEquals(filtered.getEndpoint().getQuery(), "api-version=classversion");
-
- request = GeneratedHttpRequest.builder().method("GET").endpoint("http://localhost").invocation(named)
- .addQueryParam("api-version", "original", "original2").build();
- filtered = filter.filter(request);
- assertEquals(filtered.getEndpoint().getQuery(), "api-version=classversion");
- }
-
- @Test
- public void testNothingChangesIfNoCustomVersion() {
- ApiVersionFilter filter = new ApiVersionFilter(config, filterStringsBoundToInjectorByName(new Properties()));
-
- HttpRequest request = GeneratedHttpRequest.builder().method("GET").endpoint("http://localhost").invocation(named)
- .addQueryParam("api-version", "foo").build();
- HttpRequest filtered = filter.filter(request);
- assertEquals(filtered.getEndpoint().getQuery(), "api-version=foo");
- }
-
- private FilterStringsBoundToInjectorByName filterStringsBoundToInjectorByName(final Properties props) {
- Injector injector = Guice.createInjector(new AbstractModule() {
- protected void configure() {
- Names.bindProperties(binder(), props);
- }
- });
- return new FilterStringsBoundToInjectorByName(injector);
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/functions/URIParserTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/functions/URIParserTest.java
deleted file mode 100644
index cd0eb02..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/functions/URIParserTest.java
+++ /dev/null
@@ -1,51 +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.functions;
-
-import static org.testng.Assert.assertNull;
-import static org.testng.Assert.assertNotNull;
-
-import java.net.URI;
-
-import org.jclouds.http.HttpResponse;
-import org.testng.annotations.Test;
-import com.google.common.collect.Multimap;
-import com.google.common.collect.LinkedHashMultimap;
-
-@Test(groups = "unit", testName = "URIParserTest")
-public class URIParserTest {
-
- public void testApply() {
- URIParser parser = new URIParser();
- Multimap<String, String> headers = LinkedHashMultimap.<String, String>create();
-
- URI uri = parser.apply(HttpResponse.builder().statusCode(200).build());
- assertNull(uri);
-
- try {
- uri = parser.apply(HttpResponse.builder().statusCode(202).build());
- } catch (IllegalStateException ex) {
- assertNotNull(ex);
- }
-
- headers.put("Location", "https://someuri");
-
- uri = parser.apply(HttpResponse.builder().statusCode(202).headers(headers).build());
- assertNotNull(uri);
-
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/internal/AzureLiveTestUtils.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/internal/AzureLiveTestUtils.java
deleted file mode 100644
index 4d101ca..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/internal/AzureLiveTestUtils.java
+++ /dev/null
@@ -1,49 +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.internal;
-
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.IMAGE_PUBLISHERS;
-import static org.jclouds.compute.config.ComputeServiceProperties.TIMEOUT_NODE_RUNNING;
-import static org.jclouds.compute.config.ComputeServiceProperties.TIMEOUT_NODE_SUSPENDED;
-import static org.jclouds.compute.config.ComputeServiceProperties.TIMEOUT_NODE_TERMINATED;
-import static org.jclouds.compute.config.ComputeServiceProperties.TIMEOUT_PORT_OPEN;
-import static org.jclouds.compute.config.ComputeServiceProperties.TIMEOUT_SCRIPT_COMPLETE;
-import static org.jclouds.location.reference.LocationConstants.PROPERTY_REGIONS;
-import static org.jclouds.oauth.v2.config.CredentialType.CLIENT_CREDENTIALS_SECRET;
-import static org.jclouds.oauth.v2.config.OAuthProperties.CREDENTIAL_TYPE;
-
-import java.util.Properties;
-import java.util.concurrent.TimeUnit;
-
-public class AzureLiveTestUtils {
-
- public static Properties defaultProperties(Properties properties) {
- properties = properties == null ? new Properties() : properties;
- properties.put(CREDENTIAL_TYPE, CLIENT_CREDENTIALS_SECRET.toString());
- properties.put(PROPERTY_REGIONS, "westeurope");
- properties.put(IMAGE_PUBLISHERS, "Canonical");
-
- String defaultTimeout = String.valueOf(TimeUnit.MILLISECONDS.convert(60, TimeUnit.MINUTES));
- properties.setProperty(TIMEOUT_SCRIPT_COMPLETE, defaultTimeout);
- properties.setProperty(TIMEOUT_NODE_RUNNING, defaultTimeout);
- properties.setProperty(TIMEOUT_PORT_OPEN, defaultTimeout);
- properties.setProperty(TIMEOUT_NODE_TERMINATED, defaultTimeout);
- properties.setProperty(TIMEOUT_NODE_SUSPENDED, defaultTimeout);
-
- return properties;
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/internal/BaseAzureComputeApiLiveTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/internal/BaseAzureComputeApiLiveTest.java
deleted file mode 100644
index 78d5425..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/internal/BaseAzureComputeApiLiveTest.java
+++ /dev/null
@@ -1,249 +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.internal;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-import static org.jclouds.compute.config.ComputeServiceProperties.TIMEOUT_IMAGE_AVAILABLE;
-import static org.jclouds.util.Predicates2.retry;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.TIMEOUT_RESOURCE_DELETED;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.VAULT_DELETE_STATUS;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.VAULT_SECRET_DELETE_STATUS;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.VAULT_SECRET_RECOVERABLE_STATUS;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.VAULT_KEY_DELETED_STATUS;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.VAULT_KEY_RECOVERABLE_STATUS;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.VAULT_CERTIFICATE_DELETE_STATUS;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.VAULT_CERTIFICATE_RECOVERABLE_STATUS;
-import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.VAULT_CERTIFICATE_OPERATION_STATUS;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Properties;
-import java.util.Random;
-
-import com.google.common.base.Charsets;
-import com.google.common.base.Throwables;
-import com.google.common.io.Resources;
-import org.jclouds.apis.BaseApiLiveTest;
-import org.jclouds.azurecompute.arm.AzureComputeApi;
-import org.jclouds.azurecompute.arm.config.Tenant;
-import org.jclouds.azurecompute.arm.compute.config.AzurePredicatesModule.VaultPredicates.DeletedVaultStatusPredicateFactory;
-import org.jclouds.azurecompute.arm.compute.config.AzurePredicatesModule.VaultKeyPredicates.DeletedKeyStatusPredicateFactory;
-import org.jclouds.azurecompute.arm.compute.config.AzurePredicatesModule.VaultKeyPredicates.RecoverableKeyStatusPredicateFactory;
-import org.jclouds.azurecompute.arm.compute.config.AzurePredicatesModule.VaultSecretPredicates.DeletedSecretStatusPredicateFactory;
-import org.jclouds.azurecompute.arm.compute.config.AzurePredicatesModule.VaultSecretPredicates.RecoverableSecretStatusPredicateFactory;
-import org.jclouds.azurecompute.arm.compute.config.AzurePredicatesModule.VaultCertificatePredicates.CertificateOperationStatusPredicateFactory;
-import org.jclouds.azurecompute.arm.compute.config.AzurePredicatesModule.VaultCertificatePredicates.DeletedCertificateStatusPredicateFactory;
-import org.jclouds.azurecompute.arm.compute.config.AzurePredicatesModule.VaultCertificatePredicates.RecoverableCertificateStatusPredicateFactory;
-import org.jclouds.azurecompute.arm.compute.config.AzurePredicatesModule.PublicIpAvailablePredicateFactory;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityGroup;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityGroupProperties;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityRule;
-import org.jclouds.azurecompute.arm.domain.NetworkSecurityRuleProperties;
-import org.jclouds.azurecompute.arm.domain.Provisionable;
-import org.jclouds.azurecompute.arm.domain.ResourceGroup;
-import org.jclouds.azurecompute.arm.domain.Subnet;
-import org.jclouds.azurecompute.arm.domain.VirtualNetwork;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-
-import com.google.common.base.Predicate;
-import com.google.common.base.Supplier;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Lists;
-import com.google.inject.name.Names;
-import com.google.inject.Injector;
-import com.google.inject.Module;
-import com.google.inject.Key;
-import com.google.inject.TypeLiteral;
-
-public class BaseAzureComputeApiLiveTest extends BaseApiLiveTest<AzureComputeApi> {
-
- protected static final int RAND = new Random().nextInt(999);
- public static final String LOCATION = "westeurope";
- public static final String LOCATIONDESCRIPTION = "West Europe";
- public static final String DEFAULT_VIRTUALNETWORK_ADDRESS_PREFIX = "10.2.0.0/16";
-
- protected Predicate<URI> imageAvailablePredicate;
- protected Predicate<URI> resourceDeleted;
- protected PublicIpAvailablePredicateFactory publicIpAvailable;
- protected Predicate<Supplier<Provisionable>> resourceAvailable;
- protected DeletedVaultStatusPredicateFactory deletedVaultStatus;
- protected DeletedKeyStatusPredicateFactory deletedKeyStatus;
- protected RecoverableKeyStatusPredicateFactory recoverableKeyStatus;
- protected DeletedSecretStatusPredicateFactory deletedSecretStatus;
- protected RecoverableSecretStatusPredicateFactory recoverableSecretStatus;
- protected DeletedCertificateStatusPredicateFactory deletedCertificateStatus;
- protected RecoverableCertificateStatusPredicateFactory recoverableCertificateStatus;
- protected CertificateOperationStatusPredicateFactory certificateOperationStatus;
-
-
- protected String resourceGroupName;
-
- protected String vaultResourceGroup;
- protected String vaultName;
- protected String vaultCertificateUrl;
- protected String tenantId;
-
- public BaseAzureComputeApiLiveTest() {
- provider = "azurecompute-arm";
- }
-
- @Override
- @AfterClass(groups = "live")
- protected void tearDown() {
- try {
- if (resourceGroupName != null) {
- deleteResourceGroup(resourceGroupName);
- }
- } finally {
- super.tearDown();
- }
- }
-
- @BeforeClass
- @Override
- public void setup() {
- super.setup();
-
- // Providing system properties for specifying the required Azure KeyVault configurations for Live tests
- // They have to be externally provided, because azurecompute-arm doesn't support creating KeyVaults yet
- //
- // TODO Replace the used configurations once full KeyVault implementation is added to azurecompute-arm
- vaultResourceGroup = System.getProperty("test.azurecompute-arm.vault.resource.group");
- vaultName = System.getProperty("test.azurecompute-arm.vault.name");
- vaultCertificateUrl = System.getProperty("test.azurecompute-arm.vault.certificate.url");
- }
-
- @Override protected AzureComputeApi create(Properties props, Iterable<Module> modules) {
- Injector injector = newBuilder().modules(modules).overrides(props).buildInjector();
- imageAvailablePredicate = injector.getInstance(Key.get(new TypeLiteral<Predicate<URI>>() {
- }, Names.named(TIMEOUT_IMAGE_AVAILABLE)));
- resourceDeleted = injector.getInstance(Key.get(new TypeLiteral<Predicate<URI>>() {
- }, Names.named(TIMEOUT_RESOURCE_DELETED)));
- publicIpAvailable = injector.getInstance(PublicIpAvailablePredicateFactory.class);
- resourceAvailable = injector.getInstance(Key.get(new TypeLiteral<Predicate<Supplier<Provisionable>>>() {
- }));
- deletedVaultStatus = injector.getInstance(Key.get(DeletedVaultStatusPredicateFactory.class, Names.named(VAULT_DELETE_STATUS)));
- deletedKeyStatus = injector.getInstance(Key.get(DeletedKeyStatusPredicateFactory.class, Names.named(VAULT_KEY_DELETED_STATUS)));
- recoverableKeyStatus = injector.getInstance(Key.get(RecoverableKeyStatusPredicateFactory.class, Names.named(VAULT_KEY_RECOVERABLE_STATUS)));
- deletedSecretStatus = injector.getInstance(Key.get(DeletedSecretStatusPredicateFactory.class, Names.named(VAULT_SECRET_DELETE_STATUS)));
- recoverableSecretStatus = injector.getInstance(Key.get(RecoverableSecretStatusPredicateFactory.class, Names.named(VAULT_SECRET_RECOVERABLE_STATUS)));
- deletedCertificateStatus = injector.getInstance(Key.get(DeletedCertificateStatusPredicateFactory.class, Names.named(VAULT_CERTIFICATE_DELETE_STATUS)));
- recoverableCertificateStatus = injector.getInstance(Key.get(RecoverableCertificateStatusPredicateFactory.class, Names.named(VAULT_CERTIFICATE_RECOVERABLE_STATUS)));
- certificateOperationStatus = injector.getInstance(Key.get(CertificateOperationStatusPredicateFactory.class, Names.named(VAULT_CERTIFICATE_OPERATION_STATUS)));
-
- tenantId = injector.getInstance(Key.get(String.class, Tenant.class));
- return injector.getInstance(AzureComputeApi.class);
- }
-
- @Override protected Properties setupProperties() {
- Properties properties = super.setupProperties();
- // for oauth
- AzureLiveTestUtils.defaultProperties(properties);
- checkNotNull(setIfTestSystemPropertyPresent(properties, "oauth.endpoint"), "test.oauth.endpoint");
- return properties;
- }
-
- protected void assertResourceDeleted(URI uri) {
- if (uri != null) {
- assertTrue(resourceDeleted.apply(uri),
- String.format("Resource %s was not terminated in the configured timeout", uri));
- }
- }
-
- protected VirtualNetwork createDefaultVirtualNetwork(final String resourceGroupName, final String virtualNetworkName, final String virtualnetworkAddressPrefix, final String location) {
- final VirtualNetwork.VirtualNetworkProperties virtualNetworkProperties =
- VirtualNetwork.VirtualNetworkProperties.create(null, null,
- VirtualNetwork.AddressSpace.create(Arrays.asList(virtualnetworkAddressPrefix)), null);
- VirtualNetwork virtualNetwork = api.getVirtualNetworkApi(resourceGroupName).createOrUpdate(virtualNetworkName, location, null, virtualNetworkProperties);
- retry(new Predicate<String>() {
- @Override
- public boolean apply(final String name) {
- VirtualNetwork virtualNetwork = api.getVirtualNetworkApi(resourceGroupName).get(name);
- return virtualNetwork.properties().provisioningState().equals("Succeeded");
- }
- }, 60 * 4 * 1000).apply(virtualNetwork.name());
- return virtualNetwork;
- }
-
- protected Subnet createDefaultSubnet(final String resourceGroupName, final String subnetName, final String virtualNetworkName, final String subnetAddressSpace) {
- Subnet.SubnetProperties properties = Subnet.SubnetProperties.builder().addressPrefix(subnetAddressSpace).build();
- Subnet subnet = api.getSubnetApi(resourceGroupName, virtualNetworkName).createOrUpdate(subnetName, properties);
- retry(new Predicate<String>() {
- @Override
- public boolean apply(final String name) {
- Subnet subnet = api.getSubnetApi(resourceGroupName, virtualNetworkName).get(name);
- return subnet.properties().provisioningState().equals("Succeeded");
- }
- }, 60 * 4 * 1000).apply(subnet.name());
- return subnet;
- }
-
- protected void createTestResourceGroup() {
- String name = String.format("rg-%s-%s", this.getClass().getSimpleName().toLowerCase(),
- System.getProperty("user.name"));
- ResourceGroup rg = api.getResourceGroupApi().create(name, LOCATION, ImmutableMap.<String, String> of());
- assertNotNull(rg);
- resourceGroupName = rg.name();
- }
-
- protected void deleteResourceGroup(final String resourceGroupName) {
- URI uri = api.getResourceGroupApi().delete(resourceGroupName);
- assertResourceDeleted(uri);
- }
-
- protected NetworkSecurityGroup newNetworkSecurityGroup(String nsgName, String locationName) {
- NetworkSecurityRule rule = NetworkSecurityRule.create("denyallout", null, null,
- NetworkSecurityRuleProperties.builder()
- .description("deny all out")
- .protocol(NetworkSecurityRuleProperties.Protocol.Tcp)
- .sourcePortRange("*")
- .destinationPortRange("*")
- .sourceAddressPrefix("*")
- .destinationAddressPrefix("*")
- .access(NetworkSecurityRuleProperties.Access.Deny)
- .priority(4095)
- .direction(NetworkSecurityRuleProperties.Direction.Outbound)
- .build());
- List<NetworkSecurityRule> ruleList = Lists.newArrayList();
- ruleList.add(rule);
- NetworkSecurityGroup nsg = NetworkSecurityGroup.create("id", nsgName, locationName, null,
- NetworkSecurityGroupProperties.builder()
- .securityRules(ruleList)
- .build(),
- null);
- return nsg;
- }
-
- protected String getSubscriptionId() {
- String subscriptionId = endpoint.substring(endpoint.lastIndexOf("/") + 1);
- assertNotNull(subscriptionId);
- return subscriptionId;
- }
-
- protected String stringFromResource(String resourceName) {
- try {
- return Resources.toString(getClass().getResource(resourceName), Charsets.UTF_8);
- } catch (IOException e) {
- throw Throwables.propagate(e);
- }
- }
-}
diff --git a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/internal/BaseAzureComputeApiMockTest.java b/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/internal/BaseAzureComputeApiMockTest.java
deleted file mode 100644
index 8a0efd4..0000000
--- a/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/internal/BaseAzureComputeApiMockTest.java
+++ /dev/null
@@ -1,203 +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.internal;
-
-import static com.google.common.base.Predicates.not;
-import static com.google.common.collect.Iterables.filter;
-import static com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor;
-import static org.assertj.core.util.Sets.newHashSet;
-import static org.jclouds.oauth.v2.config.CredentialType.BEARER_TOKEN_CREDENTIALS;
-import static org.jclouds.oauth.v2.config.OAuthProperties.CREDENTIAL_TYPE;
-import static org.testng.Assert.assertEquals;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Properties;
-import java.util.Set;
-
-import org.jclouds.ContextBuilder;
-import org.jclouds.azurecompute.arm.AzureComputeApi;
-import org.jclouds.azurecompute.arm.AzureComputeProviderMetadata;
-import org.jclouds.azurecompute.arm.AzureManagementApiMetadata;
-import org.jclouds.azurecompute.arm.config.AzureComputeHttpApiModule;
-import org.jclouds.azurecompute.arm.config.GraphRBAC;
-import org.jclouds.concurrent.config.ExecutorServiceModule;
-import org.jclouds.date.DateService;
-import org.jclouds.providers.ProviderMetadata;
-import org.jclouds.rest.ApiContext;
-import org.jclouds.rest.ConfiguresHttpApi;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-
-import com.google.common.base.Charsets;
-import com.google.common.base.Predicates;
-import com.google.common.base.Supplier;
-import com.google.common.base.Suppliers;
-import com.google.common.base.Throwables;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.io.Resources;
-import com.google.gson.JsonParser;
-import com.google.inject.Module;
-import com.google.inject.TypeLiteral;
-import com.squareup.okhttp.mockwebserver.MockResponse;
-import com.squareup.okhttp.mockwebserver.MockWebServer;
-import com.squareup.okhttp.mockwebserver.RecordedRequest;
-
-public class BaseAzureComputeApiMockTest {
-
- private static final String MOCK_BEARER_TOKEN = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik1uQ19WWmNBVGZNNXBPWWlKSE1iYTlnb0VLWSIsImtpZCI6Ik1uQ19WWmNBVGZNNXBPWWlKSE1iYTlnb0VLWSJ9";
- private static final String DEFAULT_ENDPOINT = new AzureComputeProviderMetadata().getEndpoint();
-
- protected MockWebServer server;
- protected AzureComputeApi api;
- protected ApiContext<AzureComputeApi> context;
- protected DateService dateService;
-
- // So that we can ignore formatting.
- private final JsonParser parser = new JsonParser();
-
- @BeforeMethod
- public void start() throws IOException, URISyntaxException {
- server = new MockWebServer();
- server.play();
-
- context = ContextBuilder.newBuilder(testProviderMetadata())
- .credentials("mock", MOCK_BEARER_TOKEN)
- .endpoint(server.getUrl("/").toString() + "subscriptions/SUBSCRIPTIONID")
- .modules(setupModules())
- .overrides(setupProperties())
- .build();
- api = context.getApi();
- dateService = context.utils().injector().getInstance(DateService.class);
- }
-
- protected ProviderMetadata testProviderMetadata() {
- // Omit the default HTTP API modules to allow overriding
- Set<Class<? extends Module>> defaultModules = newHashSet(filter(
- new AzureManagementApiMetadata().getDefaultModules(),
- not(Predicates.<Class<? extends Module>> equalTo(AzureComputeHttpApiModule.class))));
- return AzureComputeProviderMetadata.builder()
- .apiMetadata(AzureManagementApiMetadata.builder().defaultModules(defaultModules).build()).build();
- }
-
- protected Properties setupProperties() {
- Properties properties = new Properties();
- properties.put(CREDENTIAL_TYPE, BEARER_TOKEN_CREDENTIALS.toString());
- properties.put("oauth.endpoint", "https://login.microsoftonline.com/tenant-id/oauth2/token");
- return properties;
- }
-
- protected Set<Module> setupModules() {
- ImmutableSet.Builder<Module> modules = ImmutableSet.builder();
- modules.add(new ExecutorServiceModule(sameThreadExecutor()));
- // Override the default HTTP module to accomodate custom bindings for the
- // hardcoded endpoints such as the Graph RBAC API one.
- modules.add(new TestAzureComputeHttpApiModule(server));
- return modules.build();
- }
-
- @AfterMethod(alwaysRun = true)
- public void stop() throws IOException {
- server.shutdown();
- api.close();
- }
-
- protected String url(String path) {
- return server.getUrl(path).toString();
- }
-
- protected MockResponse jsonResponse(String resource) {
- return new MockResponse().addHeader("Content-Type", "application/json").setBody(stringFromResource(resource));
- }
-
- protected MockResponse response404() {
- return new MockResponse().setStatus("HTTP/1.1 404 Not Found");
- }
-
- protected MockResponse response200() {
- return new MockResponse().setStatus("HTTP/1.1 200 OK");
- }
-
- protected MockResponse response202() {
- return new MockResponse().setStatus("HTTP/1.1 202 Accepted");
- }
-
- protected MockResponse response204() {
- return new MockResponse().setStatus("HTTP/1.1 204 No Content");
- }
-
- protected MockResponse response202WithHeader() {
- return new MockResponse()
- .setStatus("HTTP/1.1 202 Accepted")
- .addHeader(
- "Location",
- "https://management.azure.com/subscriptions/SUBSCRIPTIONID/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SVEVTVC1DRU5UUkFMVVMiLCJqb2JMb2NhdGlvbiI6ImNlbnRyYWx1cyJ9?api-version=2014-04-01");
- }
-
- protected MockResponse response200WithHeader() {
- return new MockResponse()
- .setStatus("HTTP/1.1 200 O")
- .addHeader("Location", "https://management.azure.com/subscriptions/SUBSCRIPTIONID/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SVEVTVC1DRU5UUkFMVVMiLCJqb2JMb2NhdGlvbiI6ImNlbnRyYWx1cyJ9?api-version=2014-04-01");
- }
-
- protected String stringFromResource(String resourceName) {
- try {
- String rsrc = Resources.toString(getClass().getResource(resourceName), Charsets.UTF_8);
- if (rsrc.contains(DEFAULT_ENDPOINT)) {
- rsrc = rsrc.replace(DEFAULT_ENDPOINT, url(""));
- }
- return rsrc;
- } catch (IOException e) {
- throw Throwables.propagate(e);
- }
- }
-
- protected RecordedRequest assertSent(MockWebServer server, String method, String path) throws InterruptedException {
- RecordedRequest request = server.takeRequest();
- assertEquals(request.getMethod(), method);
- assertEquals(request.getPath(), path);
- assertEquals(request.getHeader("Accept"), "application/json");
- assertEquals(request.getHeader("Authorization"), "Bearer " + MOCK_BEARER_TOKEN);
- return request;
- }
-
- protected RecordedRequest assertSent(MockWebServer server, String method, String path, String json)
- throws InterruptedException {
- RecordedRequest request = assertSent(server, method, path);
- assertEquals(request.getHeader("Content-Type"), "application/json");
- assertEquals(parser.parse(new String(request.getBody(), Charsets.UTF_8)), parser.parse(json));
- return request;
- }
-
- @ConfiguresHttpApi
- private static class TestAzureComputeHttpApiModule extends AzureComputeHttpApiModule {
- private final MockWebServer server;
-
- public TestAzureComputeHttpApiModule(MockWebServer server) {
- this.server = server;
- }
-
- @Override
- protected void bindServiceEndpoints() {
- // Override the hardcoded service URIs to allow mocking service endpoints
- bind(new TypeLiteral<Supplier<URI>>() {
- }).annotatedWith(GraphRBAC.class).toInstance(
- Suppliers.ofInstance(URI.create(server.getUrl("/graphrbac").toString() + "/tenant-id")));
- }
- }
-}
diff --git a/azurecompute-arm/src/test/resources/PublicIPAddressCreate.json b/azurecompute-arm/src/test/resources/PublicIPAddressCreate.json
deleted file mode 100644
index d9e06aa..0000000
--- a/azurecompute-arm/src/test/resources/PublicIPAddressCreate.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "name": "mypublicaddress",
- "id": "/subscriptions/fakeb2f5-4710-4e93-bdf4-419edbde2178/resourceGroups/myresourcegroup/providers/Microsoft.Network/publicIPAddresses/mypublicaddress",
- "etag": "W/\"f0bdaf62-456b-4338-8f65-05417b1a55e9\"",
- "type": "Microsoft.Network/publicIPAddresses",
- "location": "northeurope",
- "tags": {
- "testkey": "testvalue"
- },
- "properties": {
- "provisioningState": "Updating",
- "resourceGuid": "ebe3f160-2484-447a-8980-c587b214b16f",
- "publicIPAllocationMethod": "Static",
- "idleTimeoutInMinutes": 4,
- "dnsSettings": {
- "domainNameLabel": "foobar",
- "fqdn": "foobar.northeurope.cloudapp.azure.com"
- }
- }
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/PublicIPAddressCreateDnsRecordInUse.json b/azurecompute-arm/src/test/resources/PublicIPAddressCreateDnsRecordInUse.json
deleted file mode 100644
index 16a52c8..0000000
--- a/azurecompute-arm/src/test/resources/PublicIPAddressCreateDnsRecordInUse.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "error": {
- "code": "DnsRecordInUse",
- "message": "DNS record foobar.northeurope.cloudapp.azure.com is already used by another public IP.",
- "details": []
- }
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/PublicIPAddressGetInfo.json b/azurecompute-arm/src/test/resources/PublicIPAddressGetInfo.json
deleted file mode 100644
index 00ca989..0000000
--- a/azurecompute-arm/src/test/resources/PublicIPAddressGetInfo.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "name": "mypublicaddress",
- "id": "/subscriptions/fakeb2f5-4710-4e93-bdf4-419edbde2178/resourceGroups/myresourcegroup/providers/Microsoft.Network/publicIPAddresses/mypublicaddress",
- "etag": "W/\"0b020646-202f-4ac6-b1a7-f9645db7c371\"",
- "type": "Microsoft.Network/publicIPAddresses",
- "location": "northeurope",
- "tags": {
- "testkey": "testvalue"
- },
- "properties": {
- "provisioningState": "Succeeded",
- "resourceGuid": "eb0da01e-2a30-4e84-b7a4-0ce9dde019f5",
- "ipAddress": "12.123.12.123",
- "publicIPAllocationMethod": "Static",
- "idleTimeoutInMinutes": 4,
- "dnsSettings": {
- "domainNameLabel": "foobar",
- "fqdn": "foobar.northeurope.cloudapp.azure.com"
- },
- "ipConfiguration": {
- "id": "/subscriptions/fakeb2f5-4710-4e93-bdf4-419edbde2178/resourceGroups/myresourcegroup/providers/Microsoft.Network/networkInterfaces/myNic/ipConfigurations/myip1"
- }
- }
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/PublicIPAddressList.json b/azurecompute-arm/src/test/resources/PublicIPAddressList.json
deleted file mode 100644
index 2b78b37..0000000
--- a/azurecompute-arm/src/test/resources/PublicIPAddressList.json
+++ /dev/null
@@ -1,80 +0,0 @@
-{
- "value": [
- {
- "name": "my2ndpublicaddress",
- "id": "/subscriptions/fakeb2f5-4710-4e93-bdf4-419edbde2178/resourceGroups/myresourcegroup/providers/Microsoft.Network/publicIPAddresses/my2ndpublicaddress",
- "etag": "W/\"b83fa879-46ee-48a9-8120-26572449788f\"",
- "type": "Microsoft.Network/publicIPAddresses",
- "location": "northeurope",
- "tags": {
- "testkey": "testvalue"
- },
- "properties": {
- "provisioningState": "Succeeded",
- "resourceGuid": "ebe3f160-2484-447a-8980-c587b214b16f",
- "publicIPAllocationMethod": "Dynamic",
- "idleTimeoutInMinutes": 4,
- "dnsSettings": {
- "domainNameLabel": "foobar123",
- "fqdn": "foobar123.northeurope.cloudapp.azure.com"
- }
- }
- },
- {
- "name": "my3rdpublicaddress",
- "id": "/subscriptions/fakeb2f5-4710-4e93-bdf4-419edbde2178/resourceGroups/myresourcegroup/providers/Microsoft.Network/publicIPAddresses/my3rdpublicaddress",
- "etag": "W/\"17d2cf9a-7aa8-4c53-a5b8-ebc2ccb7bf93\"",
- "type": "Microsoft.Network/publicIPAddresses",
- "location": "northeurope",
- "tags": {
- "testkey": "testvalue"
- },
- "properties": {
- "provisioningState": "Succeeded",
- "resourceGuid": "e1107240-79c5-4829-ba16-f7a00c2763df",
- "ipAddress": "12.12.123.123",
- "publicIPAllocationMethod": "Static",
- "idleTimeoutInMinutes": 4
- }
- },
- {
- "name": "my4thpublicaddress",
- "id": "/subscriptions/fakeb2f5-4710-4e93-bdf4-419edbde2178/resourceGroups/myresourcegroup/providers/Microsoft.Network/publicIPAddresses/my4thpublicaddress",
- "etag": "W/\"c32275e9-e1fc-465a-a5de-728c1359e123\"",
- "type": "Microsoft.Network/publicIPAddresses",
- "location": "northeurope",
- "tags": {
- "testkey": "testvalue"
- },
- "properties": {
- "provisioningState": "Succeeded",
- "resourceGuid": "dbde9a83-8c1a-43f4-8d81-0fa469703e8a",
- "ipAddress": "12.12.123.124",
- "publicIPAllocationMethod": "Static",
- "idleTimeoutInMinutes": 4
- }
- },
- {
- "name": "mypublicaddress",
- "id": "/subscriptions/fakeb2f5-4710-4e93-bdf4-419edbde2178/resourceGroups/myresourcegroup/providers/Microsoft.Network/publicIPAddresses/mypublicaddress",
- "etag": "W/\"0b020646-202f-4ac6-b1a7-f9645db7c371\"",
- "type": "Microsoft.Network/publicIPAddresses",
- "location": "northeurope",
- "tags": {},
- "properties": {
- "provisioningState": "Succeeded",
- "resourceGuid": "eb0da01e-2a30-4e84-b7a4-0ce9dde019f5",
- "ipAddress": "12.123.12.125",
- "publicIPAllocationMethod": "Static",
- "idleTimeoutInMinutes": 4,
- "dnsSettings": {
- "domainNameLabel": "foobar",
- "fqdn": "foobar.northeurope.cloudapp.azure.com"
- },
- "ipConfiguration": {
- "id": "/subscriptions/fakeb2f5-4710-4e93-bdf4-419edbde2178/resourceGroups/myresourcegroup/providers/Microsoft.Network/networkInterfaces/myNic/ipConfigurations/myip1"
- }
- }
- }
- ]
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/availabilitysetcreate.json b/azurecompute-arm/src/test/resources/availabilitysetcreate.json
deleted file mode 100644
index 748f749..0000000
--- a/azurecompute-arm/src/test/resources/availabilitysetcreate.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "properties": {
- "platformUpdateDomainCount": 2,
- "platformFaultDomainCount": 3
- },
- "type": "Microsoft.Compute/availabilitySets",
- "location": "westeurope",
- "tags": {},
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/myresourcegroup/providers/Microsoft.Compute/availabilitySets/myas",
- "name": "myas"
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/availabilitysetget.json b/azurecompute-arm/src/test/resources/availabilitysetget.json
deleted file mode 100644
index 97870cb..0000000
--- a/azurecompute-arm/src/test/resources/availabilitysetget.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "properties": {
- "platformUpdateDomainCount": 2,
- "platformFaultDomainCount": 3,
- "virtualMachines": []
- },
- "type": "Microsoft.Compute/availabilitySets",
- "location": "westeurope",
- "tags": {},
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/myresourcegroup/providers/Microsoft.Compute/availabilitySets/myas",
- "name": "myas"
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/availabilitysetlist.json b/azurecompute-arm/src/test/resources/availabilitysetlist.json
deleted file mode 100644
index 77b8fbf..0000000
--- a/azurecompute-arm/src/test/resources/availabilitysetlist.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "value": [
- {
- "properties": {
- "platformUpdateDomainCount": 2,
- "platformFaultDomainCount": 3,
- "virtualMachines": []
- },
- "type": "Microsoft.Compute/availabilitySets",
- "location": "westeurope",
- "tags": {},
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/myresourcegroup/providers/Microsoft.Compute/availabilitySets/myas",
- "name": "myas"
- }
- ]
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/createdeploymentaccepted.json b/azurecompute-arm/src/test/resources/createdeploymentaccepted.json
deleted file mode 100644
index 8ae5a59..0000000
--- a/azurecompute-arm/src/test/resources/createdeploymentaccepted.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- "id": "/subscriptions/04f7ec88-8e28-41ed-8537-5e17766001f5/resourceGroups/jims216group/providers/Microsoft.Resources/deployments/jcdep1458344383064",
- "name": "jcdep1458344383064",
- "properties": {
- "parameters": {
- "newStorageAccountName": {
- "type": "String",
- "value": "jcres1458344383064"
- },
- "storageAccountType": {
- "type": "String",
- "value": "Standard_LRS"
- },
- "location": {
- "type": "String",
- "value": "West US"
- }
- },
- "mode": "Incremental",
- "provisioningState": "Accepted",
- "timestamp": "2016-03-18T23:39:47.3048037Z",
- "duration": "PT2.4433028S",
- "correlationId": "8dee9711-8632-4948-9fe6-368bb75e6438",
- "providers": [{
- "namespace": "Microsoft.Storage",
- "resourceTypes": [{
- "resourceType": "storageAccounts",
- "locations": ["westus"]
- }]
- }],
- "dependencies": []
- }
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/createdeploymentsucceeded.json b/azurecompute-arm/src/test/resources/createdeploymentsucceeded.json
deleted file mode 100644
index e992204..0000000
--- a/azurecompute-arm/src/test/resources/createdeploymentsucceeded.json
+++ /dev/null
@@ -1,36 +0,0 @@
-{
- "id": "/subscriptions/04f7ec88-8e28-41ed-8537-5e17766001f5/resourceGroups/jims216group/providers/Microsoft.Resources/deployments/jcdep1458344383064",
- "name": "jcdep1458344383064",
- "properties": {
- "parameters": {
- "newStorageAccountName": {
- "type": "String",
- "value": "jcres1458344383064"
- },
- "storageAccountType": {
- "type": "String",
- "value": "Standard_LRS"
- },
- "location": {
- "type": "String",
- "value": "West US"
- }
- },
- "mode": "Incremental",
- "provisioningState": "Succeeded",
- "timestamp": "2016-03-18T23:40:25.1856907Z",
- "duration": "PT40.3241898S",
- "correlationId": "8dee9711-8632-4948-9fe6-368bb75e6438",
- "providers": [{
- "namespace": "Microsoft.Storage",
- "resourceTypes": [{
- "resourceType": "storageAccounts",
- "locations": ["westus"]
- }]
- }],
- "dependencies": [],
- "outputResources": [{
- "id": "Microsoft.Storage/storageAccounts/jcres1458344383064"
- }]
- }
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/creatediskresponse.json b/azurecompute-arm/src/test/resources/creatediskresponse.json
deleted file mode 100644
index 1fcc2bb..0000000
--- a/azurecompute-arm/src/test/resources/creatediskresponse.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "properties": {
- "creationData": {
- "createOption": "Empty"
- },
- "diskSizeGB": 2,
- "provisioningState": "Updating",
- "isArmResource": true
- },
- "location": "westeurope"
-}
diff --git a/azurecompute-arm/src/test/resources/createnetworkinterfacecard.json b/azurecompute-arm/src/test/resources/createnetworkinterfacecard.json
deleted file mode 100644
index d08b8f6..0000000
--- a/azurecompute-arm/src/test/resources/createnetworkinterfacecard.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "name": "myNic",
- "id": "/subscriptions/12345678-2749-4e68-9dcf-123456789abc/resourceGroups/azurearmtesting/providers/Microsoft.Network/networkInterfaces/myNic",
- "etag": "W/\"6b51f6e7-232b-4289-b740-04a996929f5e\"",
- "type": "Microsoft.Network/networkInterfaces",
- "location": "northeurope",
- "tags": {
- "mycustomtag": "foobar"
- },
- "properties": {
- "provisioningState": "Succeeded",
- "resourceGuid": "f3465472-536f-49e7-9e9c-fa91b971a618",
- "ipConfigurations": [
- {
- "name": "myip1",
- "id": "/subscriptions/12345678-2749-4e68-9dcf-123456789abc/resourceGroups/azurearmtesting/providers/Microsoft.Network/networkInterfaces/myNic/ipConfigurations/myip1",
- "etag": "W/\"6b51f6e7-232b-4289-b740-04a996929f5e\"",
- "properties": {
- "provisioningState": "Succeeded",
- "privateIPAddress": "10.2.0.4",
- "privateIPAllocationMethod": "Dynamic",
- "subnet": {
- "id": "/subscriptions/12345678-2749-4e68-9dcf-123456789abc/resourceGroups/azurearmtesting/providers/Microsoft.Network/virtualNetworks/myvirtualnetwork/subnets/mysubnet"
- },
- "primary": true
- }
- }
- ],
- "dnsSettings": {
- "dnsServers": [],
- "appliedDnsServers": []
- },
- "enableIPForwarding": false
- }
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/createsubnet.json b/azurecompute-arm/src/test/resources/createsubnet.json
deleted file mode 100644
index 60db9cf..0000000
--- a/azurecompute-arm/src/test/resources/createsubnet.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "properties":{
- "addressPrefix":"10.2.0.0/24"
- }
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/createsubnetresponse.json b/azurecompute-arm/src/test/resources/createsubnetresponse.json
deleted file mode 100644
index 0be69a6..0000000
--- a/azurecompute-arm/src/test/resources/createsubnetresponse.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "name": "mysubnet",
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/azurearmtesting/providers/Microsoft.Network/virtualNetworks/myvirtualnetwork/subnets/mysubnet",
- "etag": "W/\"b68ab7a3-38d5-4690-a978-20149a6a0994\"",
- "properties": {
- "provisioningState": "Succeeded",
- "addressPrefix": "10.2.0.0/24",
- "ipConfigurations": [
- {
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/azurearmtesting/providers/Microsoft.Network/networkInterfaces/myNic/ipConfigurations/myip1"
- }
- ]
- }
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/createvirtualmachineresponse.json b/azurecompute-arm/src/test/resources/createvirtualmachineresponse.json
deleted file mode 100644
index 7402e14..0000000
--- a/azurecompute-arm/src/test/resources/createvirtualmachineresponse.json
+++ /dev/null
@@ -1,109 +0,0 @@
-{
- "properties": {
- "vmId": "27ee085b-d707-xxxx-yyyy-2370e2eb1cc1",
- "licenseType": "Windows_Server",
- "availabilitySet": {
- "id":"/subscriptions/SUBSCRIPTIONID/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/myAVSet"
- },
- "hardwareProfile": {
- "vmSize": "Standard_D1"
- },
- "storageProfile": {
- "imageReference": {
- "publisher": "publisher",
- "offer": "OFFER",
- "sku": "sku",
- "version": "ver",
- "id": "/subscriptions/SUBSCRIPTIONID/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServerEssentials/artifactype/vmimage/offers/OFFER/skus/OFFER/versions/latest"
- },
- "osDisk": {
- "osType": "Windows",
- "name": "windowsmachine",
- "createOption": "FromImage",
- "managedDisk": {
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/osDisk",
- "storageAccountType": "Standard_LRS"
- },
- "caching": "ReadWrite"
- },
- "dataDisks":[
- {
- "name":"mydatadisk1",
- "diskSizeGB":"1",
- "lun": 0,
- "managedDisk": {
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/osDisk",
- "storageAccountType": "Standard_LRS"
- },
- "caching": "ReadWrite",
- "createOption":"Empty"
- }
- ]
- },
- "osProfile": {
- "computerName": "windowsmachine",
- "adminUsername": "azureuser",
- "adminPassword": "password",
- "customData": "",
- "windowsConfiguration": {
- "provisionVMAgent": false,
- "enableAutomaticUpdates": true,
- "winRM": {
- "listeners": [
- {
- "protocol": "https",
- "certificateUrl": "url-to-certificate"
- }
- ]
- },
- "additionalUnattendContent": [
- {
- "passName":"oobesystem",
- "componentName":"Microsoft-Windows-Shell-Setup",
- "settingName":"FirstLogonCommands",
- "content":"<XML unattend content>"
- }
- ]
- },
- "secrets":[
- {
- "sourceVault": {
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/myresourcegroup1/providers/Microsoft.KeyVault/vaults/myvault1"
- },
- "vaultCertificates": [
- {
- "certificateUrl": "https://myvault1.vault.azure.net/secrets/SECRETNAME/SECRETVERSION",
- "certificateStore": "CERTIFICATESTORENAME"
- }
- ]
- }
- ]
- },
- "networkProfile": {
- "networkInterfaces":[
- {
- "id":"/subscriptions/SUBSCRIPTIONID/resourceGroups/groupname/providers/Microsoft.Network/networkInterfaces/windowsmachine167"
- }
- ]
- },
- "diagnosticsProfile": {
- "bootDiagnostics": {
- "enabled": true,
- "storageUri": "https://groupname2760.blob.core.windows.net/"
- }
- },
- "provisioningState": "Creating"
- },
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/groupname/providers/Microsoft.Compute/virtualMachines/windowsmachine",
- "name": "windowsmachine",
- "type": "Microsoft.Compute/virtualMachines",
- "location": "westus",
- "tags": {
- "foo": "bar"
- },
- "plan": {
- "name": "deadline-slave-7-2",
- "publisher": "thinkboxsoftware",
- "product": "deadline7-2"
- }
-}
diff --git a/azurecompute-arm/src/test/resources/createvirtualnetwork.json b/azurecompute-arm/src/test/resources/createvirtualnetwork.json
deleted file mode 100644
index 49484b0..0000000
--- a/azurecompute-arm/src/test/resources/createvirtualnetwork.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "name": "mockvirtualnetwork",
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/azurearmtesting/providers/Microsoft.Network/virtualNetworks/mockvirtualnetwork",
- "etag": "W/\"bb0f3bf7-381e-424b-8e00-8f813c61956c\"",
- "type": "Microsoft.Network/virtualNetworks",
- "location": "westeurope",
- "tags": {
- "key": "value"
- },
- "properties": {
- "provisioningState": "Updating",
- "resourceGuid": "5192bdb3-f6ed-44ad-bf4c-059cff905791",
- "addressSpace": {
- "addressPrefixes": [
- "10.2.0.0/16"
- ]
- },
- "subnets": []
- }
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/getdisk.json b/azurecompute-arm/src/test/resources/getdisk.json
deleted file mode 100644
index db09d8d..0000000
--- a/azurecompute-arm/src/test/resources/getdisk.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "sku": {
- "name": "Standard_LRS",
- "tier": "Standard"
- },
- "properties": {
- "creationData": {
- "createOption": "Empty"
- },
- "diskSizeGB": 2,
- "timeCreated": "2017-03-01T09:38:18.5808215+00:00",
- "provisioningState": "Succeeded",
- "diskState": "Unattached"
- },
- "type": "Microsoft.Compute/disks",
- "location": "westeurope",
- "id": "/subscriptions/610bba05-d7a7-4567-96af-48ecbd09453b/resourceGroups/rg-diskapilivetest-andrea/providers/Microsoft.Compute/disks/myDisk",
- "name": "myDisk"
-}
diff --git a/azurecompute-arm/src/test/resources/getnetworkinterfacecard.json b/azurecompute-arm/src/test/resources/getnetworkinterfacecard.json
deleted file mode 100644
index f613291..0000000
--- a/azurecompute-arm/src/test/resources/getnetworkinterfacecard.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "name": "myNic",
- "id": "/subscriptions/12345678-2749-4e68-9dcf-123456789abc/resourceGroups/azurearmtesting/providers/Microsoft.Network/networkInterfaces/myNic",
- "etag": "W/\"3dff0c55-a7a7-434f-837b-0cad946b755f\"",
- "type": "Microsoft.Network/networkInterfaces",
- "location": "northeurope",
- "tags": {
- "mycustomtag": "foobar"
- },
- "properties": {
- "provisioningState": "Succeeded",
- "resourceGuid": "f3465472-536f-49e7-9e9c-fa91b971a618",
- "ipConfigurations": [
- {
- "name": "myip1",
- "id": "/subscriptions/12345678-2749-4e68-9dcf-123456789abc/resourceGroups/azurearmtesting/providers/Microsoft.Network/networkInterfaces/myNic/ipConfigurations/myip1",
- "etag": "W/\"3dff0c55-a7a7-434f-837b-0cad946b755f\"",
- "properties": {
- "provisioningState": "Succeeded",
- "privateIPAddress": "10.2.0.4",
- "privateIPAllocationMethod": "Dynamic",
- "subnet": {
- "id": "/subscriptions/12345678-2749-4e68-9dcf-123456789abc/resourceGroups/azurearmtesting/providers/Microsoft.Network/virtualNetworks/myvirtualnetwork/subnets/mysubnet"
- },
- "primary": true
- }
- }
- ],
- "dnsSettings": {
- "dnsServers": [],
- "appliedDnsServers": []
- },
- "enableIPForwarding": false
- }
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/getonesubnet.json b/azurecompute-arm/src/test/resources/getonesubnet.json
deleted file mode 100644
index b1c7786..0000000
--- a/azurecompute-arm/src/test/resources/getonesubnet.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "name": "mysubnet",
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/azurearmtesting/providers/Microsoft.Network/virtualNetworks/myvirtualnetwork/subnets/mysubnet",
- "etag": "W/\"bc7e1d77-eec0-4b91-ae80-afc33cf3c867\"",
- "properties": {
- "provisioningState": "Succeeded",
- "addressPrefix": "10.2.0.0/24",
- "ipConfigurations": [
- {
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/azurearmtesting/providers/Microsoft.Network/networkInterfaces/myNic/ipConfigurations/myip1"
- }
- ]
- }
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/getresourceprovidermetadata.json b/azurecompute-arm/src/test/resources/getresourceprovidermetadata.json
deleted file mode 100644
index b7693d7..0000000
--- a/azurecompute-arm/src/test/resources/getresourceprovidermetadata.json
+++ /dev/null
@@ -1,366 +0,0 @@
-{
- "id": "/subscriptions/SUBSCRIPTIONID/providers/Microsoft.Compute",
- "namespace": "Microsoft.Compute",
- "authorization": {
- "applicationId": "12312312-1212-1212-1212-121212121212",
- "roleDefinitionId": "34534534-272e-4238-8723-123423452224"
- },
- "resourceTypes": [
- {
- "resourceType": "availabilitySets",
- "locations": [
- "East US",
- "East US 2",
- "West US",
- "Central US",
- "North Central US",
- "South Central US",
- "North Europe",
- "West Europe",
- "East Asia",
- "Southeast Asia",
- "Japan East",
- "Japan West",
- "Brazil South"
- ],
- "apiVersions": [
- "2016-03-30",
- "2015-06-15",
- "2015-05-01-preview"
- ],
- "capabilities": "CrossResourceGroupResourceMove, CrossSubscriptionResourceMove"
- },
- {
- "resourceType": "virtualMachines",
- "locations": [
- "East US",
- "East US 2",
- "West US",
- "Central US",
- "North Central US",
- "South Central US",
- "North Europe",
- "West Europe",
- "East Asia",
- "Southeast Asia",
- "Japan East",
- "Japan West",
- "Brazil South"
- ],
- "apiVersions": [
- "2016-03-30",
- "2015-06-15",
- "2015-05-01-preview"
- ],
- "capabilities": "CrossResourceGroupResourceMove, CrossSubscriptionResourceMove"
- },
- {
- "resourceType": "virtualMachines/extensions",
- "locations": [
- "East US",
- "East US 2",
- "West US",
- "Central US",
- "North Central US",
- "South Central US",
- "North Europe",
- "West Europe",
- "East Asia",
- "Southeast Asia",
- "Japan East",
- "Japan West",
- "Brazil South"
- ],
- "apiVersions": [
- "2016-03-30",
- "2015-06-15",
- "2015-05-01-preview"
- ],
- "capabilities": "CrossResourceGroupResourceMove, CrossSubscriptionResourceMove"
- },
- {
- "resourceType": "virtualMachines/diagnosticSettings",
- "locations": [
- "East US",
- "East US 2",
- "West US",
- "Central US",
- "North Central US",
- "South Central US",
- "North Europe",
- "West Europe",
- "East Asia",
- "Southeast Asia",
- "Japan East",
- "Japan West",
- "Brazil South"
- ],
- "apiVersions": [
- "2014-04-01"
- ]
- },
- {
- "resourceType": "virtualMachines/metricDefinitions",
- "locations": [
- "East US",
- "East US 2",
- "West US",
- "Central US",
- "North Central US",
- "South Central US",
- "North Europe",
- "West Europe",
- "East Asia",
- "Southeast Asia",
- "Japan East",
- "Japan West",
- "Brazil South"
- ],
- "apiVersions": [
- "2014-04-01"
- ]
- },
- {
- "resourceType": "virtualMachineScaleSets",
- "locations": [
- "East US",
- "East US 2",
- "West US",
- "Central US",
- "North Central US",
- "South Central US",
- "North Europe",
- "West Europe",
- "East Asia",
- "Southeast Asia",
- "Japan East",
- "Japan West",
- "Brazil South"
- ],
- "apiVersions": [
- "2016-03-30",
- "2015-06-15",
- "2015-05-01-preview"
- ],
- "capabilities": "None"
- },
- {
- "resourceType": "virtualMachineScaleSets/extensions",
- "locations": [
- "East US",
- "East US 2",
- "West US",
- "Central US",
- "North Central US",
- "South Central US",
- "North Europe",
- "West Europe",
- "East Asia",
- "Southeast Asia",
- "Japan East",
- "Japan West",
- "Brazil South"
- ],
- "apiVersions": [
- "2016-03-30",
- "2015-06-15",
- "2015-05-01-preview"
- ],
- "capabilities": "CrossResourceGroupResourceMove, CrossSubscriptionResourceMove"
- },
- {
- "resourceType": "virtualMachineScaleSets/virtualMachines",
- "locations": [
- "East US",
- "East US 2",
- "West US",
- "Central US",
- "North Central US",
- "South Central US",
- "North Europe",
- "West Europe",
- "East Asia",
- "Southeast Asia",
- "Japan East",
- "Japan West",
- "Brazil South"
- ],
- "apiVersions": [
- "2016-03-30",
- "2015-06-15",
- "2015-05-01-preview"
- ]
- },
- {
- "resourceType": "virtualMachineScaleSets/networkInterfaces",
- "locations": [
- "East US",
- "East US 2",
- "West US",
- "Central US",
- "North Central US",
- "South Central US",
- "North Europe",
- "West Europe",
- "East Asia",
- "Southeast Asia",
- "Japan East",
- "Japan West",
- "Brazil South"
- ],
- "apiVersions": [
- "2016-03-30",
- "2015-06-15",
- "2015-05-01-preview"
- ]
- },
- {
- "resourceType": "virtualMachineScaleSets/virtualMachines/networkInterfaces",
- "locations": [
- "East US",
- "East US 2",
- "West US",
- "Central US",
- "North Central US",
- "South Central US",
- "North Europe",
- "West Europe",
- "East Asia",
- "Southeast Asia",
- "Japan East",
- "Japan West",
- "Brazil South"
- ],
- "apiVersions": [
- "2016-03-30",
- "2015-06-15",
- "2015-05-01-preview"
- ]
- },
- {
- "resourceType": "locations",
- "locations": [],
- "apiVersions": [
- "2016-03-30",
- "2015-06-15",
- "2015-05-01-preview"
- ]
- },
- {
- "resourceType": "locations/operations",
- "locations": [
- "East US",
- "East US 2",
- "West US",
- "Central US",
- "North Central US",
- "South Central US",
- "North Europe",
- "West Europe",
- "East Asia",
- "Southeast Asia",
- "Japan East",
- "Japan West",
- "Brazil South"
- ],
- "apiVersions": [
- "2016-03-30",
- "2015-06-15",
- "2015-05-01-preview"
- ]
- },
- {
- "resourceType": "locations/vmSizes",
- "locations": [
- "East US",
- "East US 2",
- "West US",
- "Central US",
- "North Central US",
- "South Central US",
- "North Europe",
- "West Europe",
- "East Asia",
- "Southeast Asia",
- "Japan East",
- "Japan West",
- "Brazil South"
- ],
- "apiVersions": [
- "2016-03-30",
- "2015-06-15",
- "2015-05-01-preview"
- ]
- },
- {
- "resourceType": "locations/usages",
- "locations": [
- "East US",
- "East US 2",
- "West US",
- "Central US",
- "North Central US",
- "South Central US",
- "North Europe",
- "West Europe",
- "East Asia",
- "Southeast Asia",
- "Japan East",
- "Japan West",
- "Brazil South"
- ],
- "apiVersions": [
- "2016-03-30",
- "2015-06-15",
- "2015-05-01-preview"
- ]
- },
- {
- "resourceType": "locations/publishers",
- "locations": [
- "East US",
- "East US 2",
- "West US",
- "Central US",
- "North Central US",
- "South Central US",
- "North Europe",
- "West Europe",
- "East Asia",
- "Southeast Asia",
- "Japan East",
- "Japan West",
- "Brazil South"
- ],
- "apiVersions": [
- "2016-03-30",
- "2015-06-15",
- "2015-05-01-preview"
- ]
- },
- {
- "resourceType": "operations",
- "locations": [
- "East US",
- "East US 2",
- "West US",
- "Central US",
- "North Central US",
- "South Central US",
- "North Europe",
- "West Europe",
- "East Asia",
- "Southeast Asia",
- "Japan East",
- "Japan West",
- "Brazil South"
- ],
- "apiVersions": [
- "2016-03-30",
- "2015-06-15",
- "2015-05-01-preview"
- ]
- }
- ],
- "registrationState": "Registered"
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/getvault.json b/azurecompute-arm/src/test/resources/getvault.json
deleted file mode 100644
index 53bee7d..0000000
--- a/azurecompute-arm/src/test/resources/getvault.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "id": "/subscriptions/012e832d-7b27-4c30-9f21-22cdd9159d12/resourceGroups/rg-vaultapilivetest-andrea/providers/Microsoft.KeyVault/vaults/vaultapilivetest-andrea",
- "name": "vaultapilivetest-andrea",
- "type": "Microsoft.KeyVault/vaults",
- "location": "westeurope",
- "tags": {},
- "properties": {
- "sku": {
- "family": "A",
- "name": "Standard"
- },
- "tenantId": "ba85e8cd-8c83-486e-a7e3-0d7666169d34",
- "accessPolicies": [
- {
- "tenantId": "ba85e8cd-8c83-486e-a7e3-0d7666169d34",
- "objectId": "b025a8c0-d7fa-42fd-8e62-d988a3f12791",
- "permissions": {
- "keys": [
- "Get",
- "List",
- "Update",
- "Create",
- "Import",
- "Delete",
- "Recover",
- "Backup",
- "Restore"
- ],
- "secrets": [
- "Get",
- "List",
- "Set",
- "Delete",
- "Recover",
- "Backup",
- "Restore"
- ],
- "certificates": [
- "Get",
- "List",
- "Update",
- "Create",
- "Import",
- "Delete",
- "ManageContacts",
- "ManageIssuers",
- "GetIssuers",
- "ListIssuers",
- "SetIssuers",
- "DeleteIssuers"
- ]
- }
- }
- ],
- "enabledForDeployment": false,
- "enabledForDiskEncryption": false,
- "enabledForTemplateDeployment": false,
- "vaultUri": "https://vaultapilivetest-andrea.vault.azure.net/"
- }
-}
diff --git a/azurecompute-arm/src/test/resources/image.json b/azurecompute-arm/src/test/resources/image.json
deleted file mode 100644
index 0c7b54c..0000000
--- a/azurecompute-arm/src/test/resources/image.json
+++ /dev/null
@@ -1,43 +0,0 @@
-{
- "location": "West US",
- "tags": {
- "key": "value"
- },
- "properties": {
- "sourceVirtualMachine": {
- "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM"
- },
- "storageProfile": {
- "osDisk": {
- "osType": "Windows",
- "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd",
- "snapshot": {
- "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1"
- },
- "managedDisk": {
- "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk1"
- },
- "osState": "generalized",
- "hostCaching": "ReadWrite",
- "storageAccountType": "Standard_LRS",
- "diskSizeGB": 20
- },
- "dataDisks": [
- {
- "lun": "1",
- "blobUri": "https://mystorageaccount.blob.core.windows.net/dataimages/dataimage.vhd",
- "snapshot": {
- "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2"
- },
- "managedDisk": {
- "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk2"
- },
- "hostCaching": "ReadWrite",
- "storageAccountType": "Standard_LRS",
- "diskSizeInGB": 20
- }
- ]
- },
- "provisioningState": "creating"
- }
-}
diff --git a/azurecompute-arm/src/test/resources/isavailablestorageservice.json b/azurecompute-arm/src/test/resources/isavailablestorageservice.json
deleted file mode 100644
index b6f2459..0000000
--- a/azurecompute-arm/src/test/resources/isavailablestorageservice.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "nameAvailable": true
-}
diff --git a/azurecompute-arm/src/test/resources/listdeployments.json b/azurecompute-arm/src/test/resources/listdeployments.json
deleted file mode 100644
index 122500f..0000000
--- a/azurecompute-arm/src/test/resources/listdeployments.json
+++ /dev/null
@@ -1,99 +0,0 @@
-{
- "value": [
- {
- "id": "/subscriptions/123abc12-1234-1234-1234-12345345234/resourceGroups/resourceGroup/providers/Microsoft.Resources/deployments/jcdep1458344383064",
- "name": "jcdep1458344383064",
- "properties": {
- "parameters": {},
- "mode": "Incremental",
- "provisioningState": "Running",
- "timestamp": "2016-04-26T11:48:11.1807222Z",
- "duration": "PT0.950828S",
- "correlationId": "f7876e0f-22ec-413c-a79e-0a718b4789a2",
- "providers": [
- {
- "namespace": "Microsoft.Storage",
- "resourceTypes": [
- {
- "resourceType": "storageAccounts",
- "locations": [
- "northeurope"
- ]
- }
- ]
- },
- {
- "namespace": "Microsoft.Network",
- "resourceTypes": [
- {
- "resourceType": "virtualNetworks",
- "locations": [
- "northeurope"
- ]
- },
- {
- "resourceType": "publicIPAddresses",
- "locations": [
- "northeurope"
- ]
- },
- {
- "resourceType": "networkInterfaces",
- "locations": [
- "northeurope"
- ]
- }
- ]
- },
- {
- "namespace": "Microsoft.Compute",
- "resourceTypes": [
- {
- "resourceType": "virtualMachines",
- "locations": [
- "northeurope"
- ]
- }
- ]
- }
- ],
- "dependencies": [
- {
- "dependsOn": [
- {
- "id": "/subscriptions/123abc12-1234-1234-1234-12345345234/resourceGroups/resourceGroup/providers/Microsoft.Network/publicIPAddresses/jc1461584629971publicip",
- "resourceType": "Microsoft.Network/publicIPAddresses",
- "resourceName": "jc1461584629971publicip"
- },
- {
- "id": "/subscriptions/123abc12-1234-1234-1234-12345345234/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/jc1461584629971virtualnetwork",
- "resourceType": "Microsoft.Network/virtualNetworks",
- "resourceName": "jc1461584629971virtualnetwork"
- }
- ],
- "id": "/subscriptions/123abc12-1234-1234-1234-12345345234/resourceGroups/resourceGroup/providers/Microsoft.Network/networkInterfaces/jc1461584629971nic",
- "resourceType": "Microsoft.Network/networkInterfaces",
- "resourceName": "jc1461584629971nic"
- },
- {
- "dependsOn": [
- {
- "id": "/subscriptions/123abc12-1234-1234-1234-12345345234/resourceGroups/resourceGroup/providers/Microsoft.Storage/storageAccounts/jc1461584629971storage",
- "resourceType": "Microsoft.Storage/storageAccounts",
- "resourceName": "jc1461584629971storage"
- },
- {
- "id": "/subscriptions/123abc12-1234-1234-1234-12345345234/resourceGroups/resourceGroup/providers/Microsoft.Network/networkInterfaces/jc1461584629971nic",
- "resourceType": "Microsoft.Network/networkInterfaces",
- "resourceName": "jc1461584629971nic"
- }
- ],
- "id": "/subscriptions/123abc12-1234-1234-1234-12345345234/resourceGroups/resourceGroup/providers/Microsoft.Compute/virtualMachines/jc1461584629971VirtualMachine",
- "resourceType": "Microsoft.Compute/virtualMachines",
- "resourceName": "jc1461584629971VirtualMachine"
- }
- ]
- }
- }
- ]
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/listdisks.json b/azurecompute-arm/src/test/resources/listdisks.json
deleted file mode 100644
index c84c561..0000000
--- a/azurecompute-arm/src/test/resources/listdisks.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "value": [
- {
- "sku": {
- "name": "Standard_LRS",
- "tier": "Standard"
- },
- "properties": {
- "creationData": {
- "createOption": "Empty"
- },
- "diskSizeGB": 2,
- "timeCreated": "2017-03-01T09:48:27.4526118+00:00",
- "provisioningState": "Succeeded",
- "diskState": "Unattached"
- },
- "type": "Microsoft.Compute/disks",
- "location": "westeurope",
- "id": "/subscriptions/610bba05-d7a7-4567-96af-48ecbd09453b/resourceGroups/rg-diskapilivetest-andrea/providers/Microsoft.Compute/disks/jclouds-646",
- "name": "jclouds-646"
- }
- ]
-}
diff --git a/azurecompute-arm/src/test/resources/listnetworkinterfaces.json b/azurecompute-arm/src/test/resources/listnetworkinterfaces.json
deleted file mode 100644
index de4b1e3..0000000
--- a/azurecompute-arm/src/test/resources/listnetworkinterfaces.json
+++ /dev/null
@@ -1,68 +0,0 @@
-{
- "value": [
- {
- "name": "AnotherNIC",
- "id": "/subscriptions/12345678-2749-4e68-9dcf-123456789abc/resourceGroups/azurearmtesting/providers/Microsoft.Network/networkInterfaces/AnotherNIC",
- "etag": "W/\"e4ed4253-64b6-4184-bfaa-554f470d20c5\"",
- "type": "Microsoft.Network/networkInterfaces",
- "location": "northeurope",
- "properties": {
- "provisioningState": "Succeeded",
- "resourceGuid": "7fcf6704-21c5-4983-bd9f-017e0873f22f",
- "ipConfigurations": [
- {
- "name": "ipconfig1",
- "id": "/subscriptions/12345678-2749-4e68-9dcf-123456789abc/resourceGroups/azurearmtesting/providers/Microsoft.Network/networkInterfaces/AnotherNIC/ipConfigurations/ipconfig1",
- "etag": "W/\"e4ed4253-64b6-4184-bfaa-554f470d20c5\"",
- "properties": {
- "provisioningState": "Succeeded",
- "privateIPAddress": "10.2.1.4",
- "privateIPAllocationMethod": "Dynamic",
- "subnet": {
- "id": "/subscriptions/12345678-2749-4e68-9dcf-123456789abc/resourceGroups/armlivetesting/providers/Microsoft.Network/virtualNetworks/jclouds-virtual-network-live-test/subnets/anothersubnet"
- },
- "primary": true
- }
- }
- ],
- "dnsSettings": {
- "dnsServers": [],
- "appliedDnsServers": []
- },
- "enableIPForwarding": false
- }
- },
- {
- "name": "MyNic",
- "id": "/subscriptions/12345678-2749-4e68-9dcf-123456789abc/resourceGroups/azurearmtesting/providers/Microsoft.Network/networkInterfaces/MyNic",
- "etag": "W/\"a37d25ff-3f62-4ee2-a111-f355beb5ff69\"",
- "type": "Microsoft.Network/networkInterfaces",
- "location": "northeurope",
- "properties": {
- "provisioningState": "Succeeded",
- "resourceGuid": "35908409-a081-4411-86a9-51f9ea99321f",
- "ipConfigurations": [
- {
- "name": "ipconfig1",
- "id": "/subscriptions/12345678-2749-4e68-9dcf-123456789abc/resourceGroups/azurearmtesting/providers/Microsoft.Network/networkInterfaces/MyNic/ipConfigurations/ipconfig1",
- "etag": "W/\"a37d25ff-3f62-4ee2-a111-f355beb5ff69\"",
- "properties": {
- "provisioningState": "Succeeded",
- "privateIPAddress": "10.2.0.100",
- "privateIPAllocationMethod": "Static",
- "subnet": {
- "id": "/subscriptions/12345678-2749-4e68-9dcf-123456789abc/resourceGroups/armlivetesting/providers/Microsoft.Network/virtualNetworks/jclouds-virtual-network-live-test/subnets/default"
- },
- "primary": true
- }
- }
- ],
- "dnsSettings": {
- "dnsServers": [],
- "appliedDnsServers": []
- },
- "enableIPForwarding": false
- }
- }
- ]
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/listsubnetswithinvirtualnetwork.json b/azurecompute-arm/src/test/resources/listsubnetswithinvirtualnetwork.json
deleted file mode 100644
index 8aeef22..0000000
--- a/azurecompute-arm/src/test/resources/listsubnetswithinvirtualnetwork.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "value": [
- {
- "name": "mysubnet",
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/azurearmtesting/providers/Microsoft.Network/virtualNetworks/myvirtualnetwork/subnets/mysubnet",
- "etag": "W/\"bc7e1d77-eec0-4b91-ae80-afc33cf3c867\"",
- "properties": {
- "provisioningState": "Succeeded",
- "addressPrefix": "10.2.0.0/24",
- "ipConfigurations": [
- {
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/azurearmtesting/providers/Microsoft.Network/networkInterfaces/myNic/ipConfigurations/myip1"
- }
- ]
- }
- }
- ]
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/listvirtualnetworks.json b/azurecompute-arm/src/test/resources/listvirtualnetworks.json
deleted file mode 100644
index 38b9b39..0000000
--- a/azurecompute-arm/src/test/resources/listvirtualnetworks.json
+++ /dev/null
@@ -1,79 +0,0 @@
-{
- "value": [
- {
- "name": "mockvirtualnetwork",
- "id": "/subscriptions/6b6748c8-3e69-4e27-9b71-df97a81c0bbc/resourceGroups/azurearmtesting/providers/Microsoft.Network/virtualNetworks/mockvirtualnetwork",
- "etag": "W/\"0dcd223f-670c-49ca-abe7-5978d127c131\"",
- "type": "Microsoft.Network/virtualNetworks",
- "location": "westeurope",
- "tags": {
- "key": "value"
- },
- "properties": {
- "provisioningState": "Succeeded",
- "resourceGuid": "1568c76a-73a4-4a60-8dfb-53b823197ccb",
- "addressSpace": {
- "addressPrefixes": [
- "10.2.0.0/16"
- ]
- },
- "subnets": []
- }
- },
- {
- "name": "anothervirtualnetworks",
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/azurearmtesting/providers/Microsoft.Network/virtualNetworks/anothervirtualnetworks",
- "etag": "W/\"7604d8fe-f3b8-4fd4-ae52-ab503cc29097\"",
- "type": "Microsoft.Network/virtualNetworks",
- "location": "westeurope",
- "tags": {
- "key": "value"
- },
- "properties": {
- "provisioningState": "Succeeded",
- "resourceGuid": "5192bdb3-f6ed-44ad-bf4c-059cff905791",
- "addressSpace": {
- "addressPrefixes": [
- "10.2.0.0/16"
- ]
- },
- "subnets": []
- }
- },
- {
- "name": "myvirtualnetwork",
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/azurearmtesting/providers/Microsoft.Network/virtualNetworks/myvirtualnetwork",
- "etag": "W/\"bc7e1d77-eec0-4b91-ae80-afc33cf3c867\"",
- "type": "Microsoft.Network/virtualNetworks",
- "location": "westeurope",
- "tags": {
- "key": "value"
- },
- "properties": {
- "provisioningState": "Succeeded",
- "resourceGuid": "8da85637-833c-4445-a681-81ca3fb90044",
- "addressSpace": {
- "addressPrefixes": [
- "10.2.0.0/16"
- ]
- },
- "subnets": [
- {
- "name": "mysubnet",
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/azurearmtesting/providers/Microsoft.Network/virtualNetworks/myvirtualnetwork/subnets/mysubnet",
- "etag": "W/\"bc7e1d77-eec0-4b91-ae80-afc33cf3c867\"",
- "properties": {
- "provisioningState": "Succeeded",
- "addressPrefix": "10.2.0.0/24",
- "ipConfigurations": [
- {
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/azurearmtesting/providers/Microsoft.Network/networkInterfaces/myNic/ipConfigurations/myip1"
- }
- ]
- }
- }
- ]
- }
- }
- ]
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/loadbalancercreate.json b/azurecompute-arm/src/test/resources/loadbalancercreate.json
deleted file mode 100644
index b3fa339..0000000
--- a/azurecompute-arm/src/test/resources/loadbalancercreate.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "name": "testLoadBalancer",
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/rg-loadbalancerapilivetest-nacx/providers/Microsoft.Network/loadBalancers/testLoadBalancer",
- "etag": "W/\"406af4e7-b24b-4c00-b42f-b3c4399bf61d\"",
- "type": "Microsoft.Network/loadBalancers",
- "location": "westeurope",
- "properties": {
- "provisioningState": "Succeeded",
- "resourceGuid": "112b7e75-f287-4789-9f6a-9a55a6fbe47c",
- "frontendIPConfigurations": [
- {
- "name": "ipConfigs",
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/rg-loadbalancerapilivetest-nacx/providers/Microsoft.Network/loadBalancers/testLoadBalancer/frontendIPConfigurations/ipConfigs",
- "etag": "W/\"406af4e7-b24b-4c00-b42f-b3c4399bf61d\"",
- "properties": {
- "provisioningState": "Succeeded",
- "privateIPAllocationMethod": "Dynamic"
- }
- }
- ],
- "backendAddressPools": [],
- "loadBalancingRules": [],
- "probes": [],
- "inboundNatRules": [],
- "outboundNatRules": [],
- "inboundNatPools": []
- }
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/loadbalancerget.json b/azurecompute-arm/src/test/resources/loadbalancerget.json
deleted file mode 100644
index ef4e390..0000000
--- a/azurecompute-arm/src/test/resources/loadbalancerget.json
+++ /dev/null
@@ -1,54 +0,0 @@
-{
- "name": "testLoadBalancer",
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/rg-loadbalancerapilivetest-nacx/providers/Microsoft.Network/loadBalancers/testLoadBalancer",
- "etag": "W/\"b2cfb60e-4ada-4546-a336-dd71e574ead6\"",
- "type": "Microsoft.Network/loadBalancers",
- "location": "westeurope",
- "properties": {
- "provisioningState": "Succeeded",
- "resourceGuid": "0d53b121-95cc-47b5-bbc6-0391f5991028",
- "frontendIPConfigurations": [
- {
- "name": "ipConfigs",
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/rg-loadbalancerapilivetest-nacx/providers/Microsoft.Network/loadBalancers/testLoadBalancer/frontendIPConfigurations/ipConfigs",
- "etag": "W/\"b2cfb60e-4ada-4546-a336-dd71e574ead6\"",
- "properties": {
- "provisioningState": "Succeeded",
- "privateIPAllocationMethod": "Dynamic",
- "publicIPAddress": {
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/rg-loadbalancerapilivetest-nacx/providers/Microsoft.Network/publicIPAddresses/Ip4LoadBalancer"
- },
- "loadBalancingRules": [
- {
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/rg-loadbalancerapilivetest-nacx/providers/Microsoft.Network/loadBalancers/testLoadBalancer/loadBalancingRules/lbRule1"
- }
- ]
- }
- }
- ],
- "backendAddressPools": [],
- "loadBalancingRules": [
- {
- "name": "lbRule1",
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/rg-loadbalancerapilivetest-nacx/providers/Microsoft.Network/loadBalancers/testLoadBalancer/loadBalancingRules/lbRule1",
- "etag": "W/\"b2cfb60e-4ada-4546-a336-dd71e574ead6\"",
- "properties": {
- "provisioningState": "Succeeded",
- "frontendIPConfiguration": {
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/rg-loadbalancerapilivetest-nacx/providers/Microsoft.Network/loadBalancers/testLoadBalancer/frontendIPConfigurations/ipConfigs"
- },
- "frontendPort": 80,
- "backendPort": 80,
- "enableFloatingIP": false,
- "idleTimeoutInMinutes": 4,
- "protocol": "Tcp",
- "loadDistribution": "Default"
- }
- }
- ],
- "probes": [],
- "inboundNatRules": [],
- "outboundNatRules": [],
- "inboundNatPools": []
- }
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/loadbalancerlist.json b/azurecompute-arm/src/test/resources/loadbalancerlist.json
deleted file mode 100644
index 8272d39..0000000
--- a/azurecompute-arm/src/test/resources/loadbalancerlist.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "value": [
- {
- "name": "testLoadBalancer",
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/rg-loadbalancerapilivetest-nacx/providers/Microsoft.Network/loadBalancers/testLoadBalancer",
- "etag": "W/\"1107154b-8717-486b-80c1-af99ec62897b\"",
- "type": "Microsoft.Network/loadBalancers",
- "location": "westeurope",
- "properties": {
- "provisioningState": "Succeeded",
- "resourceGuid": "383708b3-8d4e-474c-8908-9c4e311ac0bf",
- "frontendIPConfigurations": [
- {
- "name": "ipConfigs",
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/rg-loadbalancerapilivetest-nacx/providers/Microsoft.Network/loadBalancers/testLoadBalancer/frontendIPConfigurations/ipConfigs",
- "etag": "W/\"1107154b-8717-486b-80c1-af99ec62897b\"",
- "properties": {
- "provisioningState": "Succeeded",
- "privateIPAllocationMethod": "Dynamic",
- "publicIPAddress": {
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/rg-loadbalancerapilivetest-nacx/providers/Microsoft.Network/publicIPAddresses/Ip4LoadBalancer"
- }
- }
- }
- ],
- "backendAddressPools": [],
- "loadBalancingRules": [],
- "probes": [],
- "inboundNatRules": [],
- "outboundNatRules": [],
- "inboundNatPools": []
- }
- }
- ]
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/locations.json b/azurecompute-arm/src/test/resources/locations.json
deleted file mode 100644
index ded0d8b..0000000
--- a/azurecompute-arm/src/test/resources/locations.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{"value": [
- {
- "id":"/subscriptions/SUBSCRIPTIONID/locations/eastasia",
- "name":"eastasia",
- "displayName":"East Asia",
- "longitude":"114.188",
- "latitude":"22.267"
- }
- ]
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/logback-test.xml b/azurecompute-arm/src/test/resources/logback-test.xml
deleted file mode 100644
index b9e9616..0000000
--- a/azurecompute-arm/src/test/resources/logback-test.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0"?>
-<configuration scan="false">
- <appender name="FILE" class="ch.qos.logback.core.FileAppender">
- <file>target/test-data/jclouds.log</file>
- <encoder>
- <Pattern>%d %-5p [%c] [%thread] %m%n</Pattern>
- </encoder>
- </appender>
- <appender name="WIREFILE" class="ch.qos.logback.core.FileAppender">
- <file>target/test-data/jclouds-wire.log</file>
- <encoder>
- <Pattern>%d %-5p [%c] [%thread] %m%n</Pattern>
- </encoder>
- </appender>
- <appender name="COMPUTEFILE" class="ch.qos.logback.core.FileAppender">
- <file>target/test-data/jclouds-compute.log</file>
- <encoder>
- <Pattern>%d %-5p [%c] [%thread] %m%n</Pattern>
- </encoder>
- </appender>
-
- <logger name="org.jclouds">
- <level value="DEBUG" />
- <appender-ref ref="FILE" />
- </logger>
- <logger name="jclouds.compute">
- <level value="DEBUG" />
- <appender-ref ref="COMPUTEFILE" />
- </logger>
- <logger name="jclouds.wire">
- <level value="DEBUG" />
- <appender-ref ref="WIREFILE" />
- </logger>
- <logger name="jclouds.headers">
- <level value="DEBUG" />
- <appender-ref ref="WIREFILE" />
- </logger>
-
- <root>
- <level value="INFO" />
- </root>
-</configuration>
diff --git a/azurecompute-arm/src/test/resources/metricdefinitions.json b/azurecompute-arm/src/test/resources/metricdefinitions.json
deleted file mode 100644
index 3df0a84..0000000
--- a/azurecompute-arm/src/test/resources/metricdefinitions.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "value": [
- {
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/myresourcegroup/providers/Microsoft.Compute/virtualMachines/myvm/providers/microsoft.insights/metricdefinitions/Percentage CPU",
- "resourceId": "/subscriptions/SUBSCRIPTIONID/resourceGroups/myresourcegroup/providers/Microsoft.Compute/virtualMachines/myvm",
- "name": {
- "value": "Percentage CPU",
- "localizedValue": "Percentage CPU"
- },
- "isDimensionRequired": false,
- "unit": "Percent",
- "primaryAggregationType": "Average",
- "metricAvailabilities": [
- {
- "timeGrain": "PT1M",
- "retention": "P30D"
- },
- {
- "timeGrain": "PT1H",
- "retention": "P30D"
- }
- ]
- }
- ]
-}
diff --git a/azurecompute-arm/src/test/resources/metrics.json b/azurecompute-arm/src/test/resources/metrics.json
deleted file mode 100644
index 754e5d1..0000000
--- a/azurecompute-arm/src/test/resources/metrics.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "value": [
- {
- "data": [
- {
- "timeStamp": "2017-06-01T11:14:00Z",
- "average": 0.295
- }
- ],
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/myresourcegroup/providers/Microsoft.Compute/virtualMachines/myvm/providers/Microsoft.Insights/metrics/Percentage CPU",
- "name": {
- "value": "Percentage CPU",
- "localizedValue": "Percentage CPU"
- },
- "type": "Microsoft.Insights/metrics",
- "unit": "Percent"
- }
- ]
-}
diff --git a/azurecompute-arm/src/test/resources/networksecuritygroupcreate.json b/azurecompute-arm/src/test/resources/networksecuritygroupcreate.json
deleted file mode 100644
index b416bcc..0000000
--- a/azurecompute-arm/src/test/resources/networksecuritygroupcreate.json
+++ /dev/null
@@ -1,125 +0,0 @@
-{
- "name": "testNetworkSecurityGroup",
- "id": "/subscriptions/e43b3d9c-f839-48a8-b0fb-691aee6f1e4d/resourceGroups/jims947groupjclouds/providers/Microsoft.Network/networkSecurityGroups/testNetworkSecurityGroup",
- "etag": "W/\"1883271c-c55b-4f5b-a95a-b7415833e0ae\"",
- "type": "Microsoft.Network/networkSecurityGroups",
- "location": "westus",
- "properties": {
- "provisioningState": "Updating",
- "resourceGuid": "028cb30d-f97f-4dbe-9fea-705da1f383ca",
- "securityRules": [{
- "name": "denyallout",
- "id": "/subscriptions/e43b3d9c-f839-48a8-b0fb-691aee6f1e4d/resourceGroups/jims947groupjclouds/providers/Microsoft.Network/networkSecurityGroups/testNetworkSecurityGroup/securityRules/denyallout",
- "etag": "W/\"1883271c-c55b-4f5b-a95a-b7415833e0ae\"",
- "properties": {
- "provisioningState": "Updating",
- "description": "deny all out",
- "protocol": "Tcp",
- "sourcePortRange": "*",
- "destinationPortRange": "*",
- "sourceAddressPrefix": "*",
- "destinationAddressPrefix": "*",
- "access": "Deny",
- "priority": 4095,
- "direction": "Outbound"
- }
- }],
- "defaultSecurityRules": [{
- "name": "AllowVnetInBound",
- "id": "/subscriptions/e43b3d9c-f839-48a8-b0fb-691aee6f1e4d/resourceGroups/jims947groupjclouds/providers/Microsoft.Network/networkSecurityGroups/testNetworkSecurityGroup/defaultSecurityRules/AllowVnetInBound",
- "etag": "W/\"1883271c-c55b-4f5b-a95a-b7415833e0ae\"",
- "properties": {
- "provisioningState": "Updating",
- "description": "Allow inbound traffic from all VMs in VNET",
- "protocol": "*",
- "sourcePortRange": "*",
- "destinationPortRange": "*",
- "sourceAddressPrefix": "VirtualNetwork",
- "destinationAddressPrefix": "VirtualNetwork",
- "access": "Allow",
- "priority": 65000,
- "direction": "Inbound"
- }
- }, {
- "name": "AllowAzureLoadBalancerInBound",
- "id": "/subscriptions/e43b3d9c-f839-48a8-b0fb-691aee6f1e4d/resourceGroups/jims947groupjclouds/providers/Microsoft.Network/networkSecurityGroups/testNetworkSecurityGroup/defaultSecurityRules/AllowAzureLoadBalancerInBound",
- "etag": "W/\"1883271c-c55b-4f5b-a95a-b7415833e0ae\"",
- "properties": {
- "provisioningState": "Updating",
- "description": "Allow inbound traffic from azure load balancer",
- "protocol": "*",
- "sourcePortRange": "*",
- "destinationPortRange": "*",
- "sourceAddressPrefix": "AzureLoadBalancer",
- "destinationAddressPrefix": "*",
- "access": "Allow",
- "priority": 65001,
- "direction": "Inbound"
- }
- }, {
- "name": "DenyAllInBound",
- "id": "/subscriptions/e43b3d9c-f839-48a8-b0fb-691aee6f1e4d/resourceGroups/jims947groupjclouds/providers/Microsoft.Network/networkSecurityGroups/testNetworkSecurityGroup/defaultSecurityRules/DenyAllInBound",
- "etag": "W/\"1883271c-c55b-4f5b-a95a-b7415833e0ae\"",
- "properties": {
- "provisioningState": "Updating",
- "description": "Deny all inbound traffic",
- "protocol": "*",
- "sourcePortRange": "*",
- "destinationPortRange": "*",
- "sourceAddressPrefix": "*",
- "destinationAddressPrefix": "*",
- "access": "Deny",
- "priority": 65500,
- "direction": "Inbound"
- }
- }, {
- "name": "AllowVnetOutBound",
- "id": "/subscriptions/e43b3d9c-f839-48a8-b0fb-691aee6f1e4d/resourceGroups/jims947groupjclouds/providers/Microsoft.Network/networkSecurityGroups/testNetworkSecurityGroup/defaultSecurityRules/AllowVnetOutBound",
- "etag": "W/\"1883271c-c55b-4f5b-a95a-b7415833e0ae\"",
- "properties": {
- "provisioningState": "Updating",
- "description": "Allow outbound traffic from all VMs to all VMs in VNET",
- "protocol": "*",
- "sourcePortRange": "*",
- "destinationPortRange": "*",
- "sourceAddressPrefix": "VirtualNetwork",
- "destinationAddressPrefix": "VirtualNetwork",
- "access": "Allow",
- "priority": 65000,
- "direction": "Outbound"
- }
- }, {
- "name": "AllowInternetOutBound",
- "id": "/subscriptions/e43b3d9c-f839-48a8-b0fb-691aee6f1e4d/resourceGroups/jims947groupjclouds/providers/Microsoft.Network/networkSecurityGroups/testNetworkSecurityGroup/defaultSecurityRules/AllowInternetOutBound",
- "etag": "W/\"1883271c-c55b-4f5b-a95a-b7415833e0ae\"",
- "properties": {
- "provisioningState": "Updating",
- "description": "Allow outbound traffic from all VMs to Internet",
- "protocol": "*",
- "sourcePortRange": "*",
- "destinationPortRange": "*",
- "sourceAddressPrefix": "*",
- "destinationAddressPrefix": "Internet",
- "access": "Allow",
- "priority": 65001,
- "direction": "Outbound"
- }
- }, {
- "name": "DenyAllOutBound",
- "id": "/subscriptions/e43b3d9c-f839-48a8-b0fb-691aee6f1e4d/resourceGroups/jims947groupjclouds/providers/Microsoft.Network/networkSecurityGroups/testNetworkSecurityGroup/defaultSecurityRules/DenyAllOutBound",
- "etag": "W/\"1883271c-c55b-4f5b-a95a-b7415833e0ae\"",
- "properties": {
- "provisioningState": "Updating",
- "description": "Deny all outbound traffic",
- "protocol": "*",
- "sourcePortRange": "*",
- "destinationPortRange": "*",
- "sourceAddressPrefix": "*",
- "destinationAddressPrefix": "*",
- "access": "Deny",
- "priority": 65500,
- "direction": "Outbound"
- }
- }]
- }
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/networksecuritygroupget.json b/azurecompute-arm/src/test/resources/networksecuritygroupget.json
deleted file mode 100644
index 17a2680..0000000
--- a/azurecompute-arm/src/test/resources/networksecuritygroupget.json
+++ /dev/null
@@ -1,125 +0,0 @@
-{
- "name": "testNetworkSecurityGroup",
- "id": "/subscriptions/e43b3d9c-f839-48a8-b0fb-691aee6f1e4d/resourceGroups/jims947groupjclouds/providers/Microsoft.Network/networkSecurityGroups/testNetworkSecurityGroup",
- "etag": "W/\"14e288e4-5d9b-48cf-89c4-b532b59d71de\"",
- "type": "Microsoft.Network/networkSecurityGroups",
- "location": "westus",
- "properties": {
- "provisioningState": "Succeeded",
- "resourceGuid": "028cb30d-f97f-4dbe-9fea-705da1f383ca",
- "securityRules": [{
- "name": "denyallout",
- "id": "/subscriptions/e43b3d9c-f839-48a8-b0fb-691aee6f1e4d/resourceGroups/jims947groupjclouds/providers/Microsoft.Network/networkSecurityGroups/testNetworkSecurityGroup/securityRules/denyallout",
- "etag": "W/\"14e288e4-5d9b-48cf-89c4-b532b59d71de\"",
- "properties": {
- "provisioningState": "Succeeded",
- "description": "deny all out",
- "protocol": "Tcp",
- "sourcePortRange": "*",
- "destinationPortRange": "*",
- "sourceAddressPrefix": "*",
- "destinationAddressPrefix": "*",
- "access": "Deny",
- "priority": 4095,
- "direction": "Outbound"
- }
- }],
- "defaultSecurityRules": [{
- "name": "AllowVnetInBound",
- "id": "/subscriptions/e43b3d9c-f839-48a8-b0fb-691aee6f1e4d/resourceGroups/jims947groupjclouds/providers/Microsoft.Network/networkSecurityGroups/testNetworkSecurityGroup/defaultSecurityRules/AllowVnetInBound",
- "etag": "W/\"14e288e4-5d9b-48cf-89c4-b532b59d71de\"",
- "properties": {
- "provisioningState": "Succeeded",
- "description": "Allow inbound traffic from all VMs in VNET",
- "protocol": "*",
- "sourcePortRange": "*",
- "destinationPortRange": "*",
- "sourceAddressPrefix": "VirtualNetwork",
- "destinationAddressPrefix": "VirtualNetwork",
- "access": "Allow",
- "priority": 65000,
- "direction": "Inbound"
- }
- }, {
- "name": "AllowAzureLoadBalancerInBound",
- "id": "/subscriptions/e43b3d9c-f839-48a8-b0fb-691aee6f1e4d/resourceGroups/jims947groupjclouds/providers/Microsoft.Network/networkSecurityGroups/testNetworkSecurityGroup/defaultSecurityRules/AllowAzureLoadBalancerInBound",
- "etag": "W/\"14e288e4-5d9b-48cf-89c4-b532b59d71de\"",
- "properties": {
- "provisioningState": "Succeeded",
- "description": "Allow inbound traffic from azure load balancer",
- "protocol": "*",
- "sourcePortRange": "*",
- "destinationPortRange": "*",
- "sourceAddressPrefix": "AzureLoadBalancer",
- "destinationAddressPrefix": "*",
- "access": "Allow",
- "priority": 65001,
- "direction": "Inbound"
- }
- }, {
- "name": "DenyAllInBound",
- "id": "/subscriptions/e43b3d9c-f839-48a8-b0fb-691aee6f1e4d/resourceGroups/jims947groupjclouds/providers/Microsoft.Network/networkSecurityGroups/testNetworkSecurityGroup/defaultSecurityRules/DenyAllInBound",
- "etag": "W/\"14e288e4-5d9b-48cf-89c4-b532b59d71de\"",
- "properties": {
- "provisioningState": "Succeeded",
- "description": "Deny all inbound traffic",
- "protocol": "*",
- "sourcePortRange": "*",
- "destinationPortRange": "*",
- "sourceAddressPrefix": "*",
- "destinationAddressPrefix": "*",
- "access": "Deny",
- "priority": 65500,
- "direction": "Inbound"
- }
- }, {
- "name": "AllowVnetOutBound",
- "id": "/subscriptions/e43b3d9c-f839-48a8-b0fb-691aee6f1e4d/resourceGroups/jims947groupjclouds/providers/Microsoft.Network/networkSecurityGroups/testNetworkSecurityGroup/defaultSecurityRules/AllowVnetOutBound",
- "etag": "W/\"14e288e4-5d9b-48cf-89c4-b532b59d71de\"",
- "properties": {
- "provisioningState": "Succeeded",
- "description": "Allow outbound traffic from all VMs to all VMs in VNET",
- "protocol": "*",
- "sourcePortRange": "*",
- "destinationPortRange": "*",
- "sourceAddressPrefix": "VirtualNetwork",
- "destinationAddressPrefix": "VirtualNetwork",
- "access": "Allow",
- "priority": 65000,
- "direction": "Outbound"
- }
- }, {
- "name": "AllowInternetOutBound",
- "id": "/subscriptions/e43b3d9c-f839-48a8-b0fb-691aee6f1e4d/resourceGroups/jims947groupjclouds/providers/Microsoft.Network/networkSecurityGroups/testNetworkSecurityGroup/defaultSecurityRules/AllowInternetOutBound",
- "etag": "W/\"14e288e4-5d9b-48cf-89c4-b532b59d71de\"",
- "properties": {
- "provisioningState": "Succeeded",
- "description": "Allow outbound traffic from all VMs to Internet",
- "protocol": "*",
- "sourcePortRange": "*",
- "destinationPortRange": "*",
- "sourceAddressPrefix": "*",
- "destinationAddressPrefix": "Internet",
- "access": "Allow",
- "priority": 65001,
- "direction": "Outbound"
- }
- }, {
- "name": "DenyAllOutBound",
- "id": "/subscriptions/e43b3d9c-f839-48a8-b0fb-691aee6f1e4d/resourceGroups/jims947groupjclouds/providers/Microsoft.Network/networkSecurityGroups/testNetworkSecurityGroup/defaultSecurityRules/DenyAllOutBound",
- "etag": "W/\"14e288e4-5d9b-48cf-89c4-b532b59d71de\"",
- "properties": {
- "provisioningState": "Succeeded",
- "description": "Deny all outbound traffic",
- "protocol": "*",
- "sourcePortRange": "*",
- "destinationPortRange": "*",
- "sourceAddressPrefix": "*",
- "destinationAddressPrefix": "*",
- "access": "Deny",
- "priority": 65500,
- "direction": "Outbound"
- }
- }]
- }
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/networksecuritygrouplist.json b/azurecompute-arm/src/test/resources/networksecuritygrouplist.json
deleted file mode 100644
index 7beebb0..0000000
--- a/azurecompute-arm/src/test/resources/networksecuritygrouplist.json
+++ /dev/null
@@ -1,127 +0,0 @@
-{
- "value": [{
- "name": "testNetworkSecurityGroup",
- "id": "/subscriptions/e43b3d9c-f839-48a8-b0fb-691aee6f1e4d/resourceGroups/jims947groupjclouds/providers/Microsoft.Network/networkSecurityGroups/testNetworkSecurityGroup",
- "etag": "W/\"14e288e4-5d9b-48cf-89c4-b532b59d71de\"",
- "type": "Microsoft.Network/networkSecurityGroups",
- "location": "westus",
- "properties": {
- "provisioningState": "Succeeded",
- "resourceGuid": "028cb30d-f97f-4dbe-9fea-705da1f383ca",
- "securityRules": [{
- "name": "denyallout",
- "id": "/subscriptions/e43b3d9c-f839-48a8-b0fb-691aee6f1e4d/resourceGroups/jims947groupjclouds/providers/Microsoft.Network/networkSecurityGroups/testNetworkSecurityGroup/securityRules/denyallout",
- "etag": "W/\"14e288e4-5d9b-48cf-89c4-b532b59d71de\"",
- "properties": {
- "provisioningState": "Succeeded",
- "description": "deny all out",
- "protocol": "Tcp",
- "sourcePortRange": "*",
- "destinationPortRange": "*",
- "sourceAddressPrefix": "*",
- "destinationAddressPrefix": "*",
- "access": "Deny",
- "priority": 4095,
- "direction": "Outbound"
- }
- }],
- "defaultSecurityRules": [{
- "name": "AllowVnetInBound",
- "id": "/subscriptions/e43b3d9c-f839-48a8-b0fb-691aee6f1e4d/resourceGroups/jims947groupjclouds/providers/Microsoft.Network/networkSecurityGroups/testNetworkSecurityGroup/defaultSecurityRules/AllowVnetInBound",
- "etag": "W/\"14e288e4-5d9b-48cf-89c4-b532b59d71de\"",
- "properties": {
- "provisioningState": "Succeeded",
- "description": "Allow inbound traffic from all VMs in VNET",
- "protocol": "*",
- "sourcePortRange": "*",
- "destinationPortRange": "*",
- "sourceAddressPrefix": "VirtualNetwork",
- "destinationAddressPrefix": "VirtualNetwork",
- "access": "Allow",
- "priority": 65000,
- "direction": "Inbound"
- }
- }, {
- "name": "AllowAzureLoadBalancerInBound",
- "id": "/subscriptions/e43b3d9c-f839-48a8-b0fb-691aee6f1e4d/resourceGroups/jims947groupjclouds/providers/Microsoft.Network/networkSecurityGroups/testNetworkSecurityGroup/defaultSecurityRules/AllowAzureLoadBalancerInBound",
- "etag": "W/\"14e288e4-5d9b-48cf-89c4-b532b59d71de\"",
- "properties": {
- "provisioningState": "Succeeded",
- "description": "Allow inbound traffic from azure load balancer",
- "protocol": "*",
- "sourcePortRange": "*",
- "destinationPortRange": "*",
- "sourceAddressPrefix": "AzureLoadBalancer",
- "destinationAddressPrefix": "*",
- "access": "Allow",
- "priority": 65001,
- "direction": "Inbound"
- }
- }, {
- "name": "DenyAllInBound",
- "id": "/subscriptions/e43b3d9c-f839-48a8-b0fb-691aee6f1e4d/resourceGroups/jims947groupjclouds/providers/Microsoft.Network/networkSecurityGroups/testNetworkSecurityGroup/defaultSecurityRules/DenyAllInBound",
- "etag": "W/\"14e288e4-5d9b-48cf-89c4-b532b59d71de\"",
- "properties": {
- "provisioningState": "Succeeded",
- "description": "Deny all inbound traffic",
- "protocol": "*",
- "sourcePortRange": "*",
- "destinationPortRange": "*",
- "sourceAddressPrefix": "*",
- "destinationAddressPrefix": "*",
- "access": "Deny",
- "priority": 65500,
- "direction": "Inbound"
- }
- }, {
- "name": "AllowVnetOutBound",
- "id": "/subscriptions/e43b3d9c-f839-48a8-b0fb-691aee6f1e4d/resourceGroups/jims947groupjclouds/providers/Microsoft.Network/networkSecurityGroups/testNetworkSecurityGroup/defaultSecurityRules/AllowVnetOutBound",
- "etag": "W/\"14e288e4-5d9b-48cf-89c4-b532b59d71de\"",
- "properties": {
- "provisioningState": "Succeeded",
- "description": "Allow outbound traffic from all VMs to all VMs in VNET",
- "protocol": "*",
- "sourcePortRange": "*",
- "destinationPortRange": "*",
- "sourceAddressPrefix": "VirtualNetwork",
- "destinationAddressPrefix": "VirtualNetwork",
- "access": "Allow",
- "priority": 65000,
- "direction": "Outbound"
- }
- }, {
- "name": "AllowInternetOutBound",
- "id": "/subscriptions/e43b3d9c-f839-48a8-b0fb-691aee6f1e4d/resourceGroups/jims947groupjclouds/providers/Microsoft.Network/networkSecurityGroups/testNetworkSecurityGroup/defaultSecurityRules/AllowInternetOutBound",
- "etag": "W/\"14e288e4-5d9b-48cf-89c4-b532b59d71de\"",
- "properties": {
- "provisioningState": "Succeeded",
- "description": "Allow outbound traffic from all VMs to Internet",
- "protocol": "*",
- "sourcePortRange": "*",
- "destinationPortRange": "*",
- "sourceAddressPrefix": "*",
- "destinationAddressPrefix": "Internet",
- "access": "Allow",
- "priority": 65001,
- "direction": "Outbound"
- }
- }, {
- "name": "DenyAllOutBound",
- "id": "/subscriptions/e43b3d9c-f839-48a8-b0fb-691aee6f1e4d/resourceGroups/jims947groupjclouds/providers/Microsoft.Network/networkSecurityGroups/testNetworkSecurityGroup/defaultSecurityRules/DenyAllOutBound",
- "etag": "W/\"14e288e4-5d9b-48cf-89c4-b532b59d71de\"",
- "properties": {
- "provisioningState": "Succeeded",
- "description": "Deny all outbound traffic",
- "protocol": "*",
- "sourcePortRange": "*",
- "destinationPortRange": "*",
- "sourceAddressPrefix": "*",
- "destinationAddressPrefix": "*",
- "access": "Deny",
- "priority": 65500,
- "direction": "Outbound"
- }
- }]
- }
- }]
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/networksecurityrulecreate.json b/azurecompute-arm/src/test/resources/networksecurityrulecreate.json
deleted file mode 100644
index c09bf08..0000000
--- a/azurecompute-arm/src/test/resources/networksecurityrulecreate.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "name": "allowalludpin",
- "id": "/subscriptions/e43b3d9c-f839-48a8-b0fb-691aee6f1e4d/resourceGroups/jims859groupjclouds/providers/Microsoft.Network/networkSecurityGroups/testNetworkSecurityGroup/securityRules/allowalludpin",
- "etag": "W/\"d9b6cda9-3873-445d-bc70-cd9c13f87ba7\"",
- "properties": {
- "provisioningState": "Updating",
- "description": "allow all udp in",
- "protocol": "Udp",
- "sourcePortRange": "*",
- "destinationPortRange": "*",
- "sourceAddressPrefix": "*",
- "destinationAddressPrefix": "*",
- "access": "Allow",
- "priority": 4094,
- "direction": "Inbound"
- }
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/networksecurityruleget.json b/azurecompute-arm/src/test/resources/networksecurityruleget.json
deleted file mode 100644
index c09bf08..0000000
--- a/azurecompute-arm/src/test/resources/networksecurityruleget.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "name": "allowalludpin",
- "id": "/subscriptions/e43b3d9c-f839-48a8-b0fb-691aee6f1e4d/resourceGroups/jims859groupjclouds/providers/Microsoft.Network/networkSecurityGroups/testNetworkSecurityGroup/securityRules/allowalludpin",
- "etag": "W/\"d9b6cda9-3873-445d-bc70-cd9c13f87ba7\"",
- "properties": {
- "provisioningState": "Updating",
- "description": "allow all udp in",
- "protocol": "Udp",
- "sourcePortRange": "*",
- "destinationPortRange": "*",
- "sourceAddressPrefix": "*",
- "destinationAddressPrefix": "*",
- "access": "Allow",
- "priority": 4094,
- "direction": "Inbound"
- }
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/networksecurityrulegetdefault.json b/azurecompute-arm/src/test/resources/networksecurityrulegetdefault.json
deleted file mode 100644
index 3330985..0000000
--- a/azurecompute-arm/src/test/resources/networksecurityrulegetdefault.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "name": "AllowVnetInBound",
- "id": "/subscriptions/e43b3d9c-f839-48a8-b0fb-691aee6f1e4d/resourceGroups/jims741groupjclouds/providers/Microsoft.Network/networkSecurityGroups/testNetworkSecurityGroup/defaultSecurityRules/AllowVnetInBound",
- "etag": "W/\"23efab91-398a-4984-a9a7-281af38f6538\"",
- "properties": {
- "provisioningState": "Succeeded",
- "description": "Allow inbound traffic from all VMs in VNET",
- "protocol": "*",
- "sourcePortRange": "*",
- "destinationPortRange": "*",
- "sourceAddressPrefix": "VirtualNetwork",
- "destinationAddressPrefix": "VirtualNetwork",
- "access": "Allow",
- "priority": 65000,
- "direction": "Inbound"
- }
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/networksecurityrulelist.json b/azurecompute-arm/src/test/resources/networksecurityrulelist.json
deleted file mode 100644
index d48fe32..0000000
--- a/azurecompute-arm/src/test/resources/networksecurityrulelist.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "value": [{
- "name": "denyallout",
- "id": "/subscriptions/e43b3d9c-f839-48a8-b0fb-691aee6f1e4d/resourceGroups/jims859groupjclouds/providers/Microsoft.Network/networkSecurityGroups/testNetworkSecurityGroup/securityRules/denyallout",
- "etag": "W/\"409ae6c7-fbe1-4bc4-aadb-c1d8330844d2\"",
- "properties": {
- "provisioningState": "Succeeded",
- "description": "deny all out",
- "protocol": "Tcp",
- "sourcePortRange": "*",
- "destinationPortRange": "*",
- "sourceAddressPrefix": "*",
- "destinationAddressPrefix": "*",
- "access": "Deny",
- "priority": 4095,
- "direction": "Outbound"
- }
- }, {
- "name": "allowalludpin",
- "id": "/subscriptions/e43b3d9c-f839-48a8-b0fb-691aee6f1e4d/resourceGroups/jims859groupjclouds/providers/Microsoft.Network/networkSecurityGroups/testNetworkSecurityGroup/securityRules/allowalludpin",
- "etag": "W/\"409ae6c7-fbe1-4bc4-aadb-c1d8330844d2\"",
- "properties": {
- "provisioningState": "Succeeded",
- "description": "allow all udp in",
- "protocol": "Udp",
- "sourcePortRange": "*",
- "destinationPortRange": "*",
- "sourceAddressPrefix": "*",
- "destinationAddressPrefix": "*",
- "access": "Allow",
- "priority": 4094,
- "direction": "Inbound"
- }
- }]
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/networksecurityrulelistdefault.json b/azurecompute-arm/src/test/resources/networksecurityrulelistdefault.json
deleted file mode 100644
index 245a7db..0000000
--- a/azurecompute-arm/src/test/resources/networksecurityrulelistdefault.json
+++ /dev/null
@@ -1,99 +0,0 @@
-{
- "value": [{
- "name": "AllowVnetInBound",
- "id": "/subscriptions/e43b3d9c-f839-48a8-b0fb-691aee6f1e4d/resourceGroups/jims859groupjclouds/providers/Microsoft.Network/networkSecurityGroups/testNetworkSecurityGroup/defaultSecurityRules/AllowVnetInBound",
- "etag": "W/\"409ae6c7-fbe1-4bc4-aadb-c1d8330844d2\"",
- "properties": {
- "provisioningState": "Succeeded",
- "description": "Allow inbound traffic from all VMs in VNET",
- "protocol": "*",
- "sourcePortRange": "*",
- "destinationPortRange": "*",
- "sourceAddressPrefix": "VirtualNetwork",
- "destinationAddressPrefix": "VirtualNetwork",
- "access": "Allow",
- "priority": 65000,
- "direction": "Inbound"
- }
- }, {
- "name": "AllowAzureLoadBalancerInBound",
- "id": "/subscriptions/e43b3d9c-f839-48a8-b0fb-691aee6f1e4d/resourceGroups/jims859groupjclouds/providers/Microsoft.Network/networkSecurityGroups/testNetworkSecurityGroup/defaultSecurityRules/AllowAzureLoadBalancerInBound",
- "etag": "W/\"409ae6c7-fbe1-4bc4-aadb-c1d8330844d2\"",
- "properties": {
- "provisioningState": "Succeeded",
- "description": "Allow inbound traffic from azure load balancer",
- "protocol": "*",
- "sourcePortRange": "*",
- "destinationPortRange": "*",
- "sourceAddressPrefix": "AzureLoadBalancer",
- "destinationAddressPrefix": "*",
- "access": "Allow",
- "priority": 65001,
- "direction": "Inbound"
- }
- }, {
- "name": "DenyAllInBound",
- "id": "/subscriptions/e43b3d9c-f839-48a8-b0fb-691aee6f1e4d/resourceGroups/jims859groupjclouds/providers/Microsoft.Network/networkSecurityGroups/testNetworkSecurityGroup/defaultSecurityRules/DenyAllInBound",
- "etag": "W/\"409ae6c7-fbe1-4bc4-aadb-c1d8330844d2\"",
- "properties": {
- "provisioningState": "Succeeded",
- "description": "Deny all inbound traffic",
- "protocol": "*",
- "sourcePortRange": "*",
- "destinationPortRange": "*",
- "sourceAddressPrefix": "*",
- "destinationAddressPrefix": "*",
- "access": "Deny",
- "priority": 65500,
- "direction": "Inbound"
- }
- }, {
- "name": "AllowVnetOutBound",
- "id": "/subscriptions/e43b3d9c-f839-48a8-b0fb-691aee6f1e4d/resourceGroups/jims859groupjclouds/providers/Microsoft.Network/networkSecurityGroups/testNetworkSecurityGroup/defaultSecurityRules/AllowVnetOutBound",
- "etag": "W/\"409ae6c7-fbe1-4bc4-aadb-c1d8330844d2\"",
- "properties": {
- "provisioningState": "Succeeded",
- "description": "Allow outbound traffic from all VMs to all VMs in VNET",
- "protocol": "*",
- "sourcePortRange": "*",
- "destinationPortRange": "*",
- "sourceAddressPrefix": "VirtualNetwork",
- "destinationAddressPrefix": "VirtualNetwork",
- "access": "Allow",
- "priority": 65000,
- "direction": "Outbound"
- }
- }, {
- "name": "AllowInternetOutBound",
- "id": "/subscriptions/e43b3d9c-f839-48a8-b0fb-691aee6f1e4d/resourceGroups/jims859groupjclouds/providers/Microsoft.Network/networkSecurityGroups/testNetworkSecurityGroup/defaultSecurityRules/AllowInternetOutBound",
- "etag": "W/\"409ae6c7-fbe1-4bc4-aadb-c1d8330844d2\"",
- "properties": {
- "provisioningState": "Succeeded",
- "description": "Allow outbound traffic from all VMs to Internet",
- "protocol": "*",
- "sourcePortRange": "*",
- "destinationPortRange": "*",
- "sourceAddressPrefix": "*",
- "destinationAddressPrefix": "Internet",
- "access": "Allow",
- "priority": 65001,
- "direction": "Outbound"
- }
- }, {
- "name": "DenyAllOutBound",
- "id": "/subscriptions/e43b3d9c-f839-48a8-b0fb-691aee6f1e4d/resourceGroups/jims859groupjclouds/providers/Microsoft.Network/networkSecurityGroups/testNetworkSecurityGroup/defaultSecurityRules/DenyAllOutBound",
- "etag": "W/\"409ae6c7-fbe1-4bc4-aadb-c1d8330844d2\"",
- "properties": {
- "provisioningState": "Succeeded",
- "description": "Deny all outbound traffic",
- "protocol": "*",
- "sourcePortRange": "*",
- "destinationPortRange": "*",
- "sourceAddressPrefix": "*",
- "destinationAddressPrefix": "*",
- "access": "Deny",
- "priority": 65500,
- "direction": "Outbound"
- }
- }]
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/offers.json b/azurecompute-arm/src/test/resources/offers.json
deleted file mode 100644
index 473c748..0000000
--- a/azurecompute-arm/src/test/resources/offers.json
+++ /dev/null
@@ -1,7 +0,0 @@
-[
- {
- "location": "eastus",
- "name": "WindowsServer",
- "id": "/Subscriptions/c36d97d3-3fea-4561-aa2d-e61168908c5b/Providers/Microsoft.Compute/Locations/eastus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer"
- }
-]
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/publishers.json b/azurecompute-arm/src/test/resources/publishers.json
deleted file mode 100644
index 32d3e84..0000000
--- a/azurecompute-arm/src/test/resources/publishers.json
+++ /dev/null
@@ -1,12 +0,0 @@
-[
- {
- "location": "eastus",
- "name": "MicrosoftVisualStudio",
- "id": "/Subscriptions/c36d97d3-3fea-4561-aa2d-e61168908c5b/Providers/Microsoft.Compute/Locations/eastus/Publishers/MicrosoftVisualStudio"
- },
- {
- "location": "eastus",
- "name": "MicrosoftWindowsServer",
- "id": "/Subscriptions/c36d97d3-3fea-4561-aa2d-e61168908c5b/Providers/Microsoft.Compute/Locations/eastus/Publishers/MicrosoftWindowsServer"
- }
-]
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/resourceDefinition.json b/azurecompute-arm/src/test/resources/resourceDefinition.json
deleted file mode 100644
index 245ce1f..0000000
--- a/azurecompute-arm/src/test/resources/resourceDefinition.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "resources": [
- {
- "name": "[parameters('vnName')]",
- "type": "Microsoft.Compute/virtualMachines",
- "location": "westeurope",
- "apiVersion": "2015-06-15",
- "properties": {
- "hardwareProfile": {
- "vmSize": "[paramters('vmSize')]"
- },
- "storageProfile": {
- "osDisk": {
- "osType":"Windows",
- "name":"testmachine-osDisk.539c38a7-642c-43cc-a20b-89b0f3e56afe.vhd"
- }
- },
- "provisioningState": "0.0"
- }
- }
- ]
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/resourcegroup-resources.json b/azurecompute-arm/src/test/resources/resourcegroup-resources.json
deleted file mode 100644
index cae1a18..0000000
--- a/azurecompute-arm/src/test/resources/resourcegroup-resources.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "value": [
- {
- "id": "/subscriptions/610bba05-d7a7-4567-96af-48ecbd09453b/resourceGroups/test/providers/Microsoft.Compute/virtualMachines/test",
- "name": "test",
- "type": "Microsoft.Compute/virtualMachines",
- "location": "northeurope"
- },
- {
- "id": "/subscriptions/610bba05-d7a7-4567-96af-48ecbd09453b/resourceGroups/test/providers/Microsoft.Network/networkInterfaces/test641",
- "name": "test641",
- "type": "Microsoft.Network/networkInterfaces",
- "location": "northeurope"
- },
- {
- "id": "/subscriptions/610bba05-d7a7-4567-96af-48ecbd09453b/resourceGroups/test/providers/Microsoft.Network/networkSecurityGroups/test-nsg",
- "name": "test-nsg",
- "type": "Microsoft.Network/networkSecurityGroups",
- "location": "northeurope"
- },
- {
- "id": "/subscriptions/610bba05-d7a7-4567-96af-48ecbd09453b/resourceGroups/test/providers/Microsoft.Network/publicIPAddresses/test-ip",
- "name": "test-ip",
- "type": "Microsoft.Network/publicIPAddresses",
- "location": "northeurope"
- },
- {
- "id": "/subscriptions/610bba05-d7a7-4567-96af-48ecbd09453b/resourceGroups/test/providers/Microsoft.Network/virtualNetworks/test-vnet",
- "name": "test-vnet",
- "type": "Microsoft.Network/virtualNetworks",
- "location": "northeurope"
- },
- {
- "id": "/subscriptions/610bba05-d7a7-4567-96af-48ecbd09453b/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/testjclo",
- "name": "testjclo",
- "type": "Microsoft.Storage/storageAccounts",
- "sku": {
- "name": "Premium_LRS",
- "tier": "Premium"
- },
- "kind": "Storage",
- "location": "northeurope",
- "tags": {}
- }
- ]
-}
diff --git a/azurecompute-arm/src/test/resources/resourcegroup.json b/azurecompute-arm/src/test/resources/resourcegroup.json
deleted file mode 100644
index 6ca47cf..0000000
--- a/azurecompute-arm/src/test/resources/resourcegroup.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/jcloudstest",
- "name": "jcloudstest",
- "location": "westus",
- "tags": {
- "tagname1": "tagvalue1"
- },
- "properties": {
- "provisioningState": "Succeeded"
- }
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/resourcegroups.json b/azurecompute-arm/src/test/resources/resourcegroups.json
deleted file mode 100644
index 56c2196..0000000
--- a/azurecompute-arm/src/test/resources/resourcegroups.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "value": [
- {
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/test1",
- "name": "test1",
- "location": "westus",
- "properties": {
- "provisioningState": "Succeeded"
- }
- },
- {
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/test2",
- "name": "test2",
- "location": "eastus",
- "properties": {
- "provisioningState": "Succeeded"
- }
- }
- ],
- "nextLink": "https://management.azure.com/subscriptions/SUBSCRIPTIONID/resourceGroups?api-version=2015-11-01&%24top=2&%24skiptoken=eyJuZXh0UGFydGl0aW9uS2V5IjoiMSE4IVJVTkJNalEtIiwibmV4dFJvd0tleSI6IjEhNjghTURSR04wVkRPRGc0UlRJNE5ERkZSRGcxTXpjMVJURTNOelkyTURBeFJqVmZRVTVRVWtsRFJWUkZVMVF0VjBWVFZGVlQifQ%3d%3d"
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/resourcegroupupdated.json b/azurecompute-arm/src/test/resources/resourcegroupupdated.json
deleted file mode 100644
index 19c366b..0000000
--- a/azurecompute-arm/src/test/resources/resourcegroupupdated.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/jcloudstest",
- "name": "jcloudstest",
- "location": "westus",
- "tags": {},
- "properties": {
- "provisioningState": "Succeeded"
- }
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/serviceprincipals.json b/azurecompute-arm/src/test/resources/serviceprincipals.json
deleted file mode 100644
index cdeefa6..0000000
--- a/azurecompute-arm/src/test/resources/serviceprincipals.json
+++ /dev/null
@@ -1,53 +0,0 @@
-{
- "odata.metadata": "https://graph.windows.net/tenantId/$metadata#directoryObjects/Microsoft.DirectoryServices.ServicePrincipal",
- "value": [
- {
- "odata.type": "Microsoft.DirectoryServices.ServicePrincipal",
- "objectType": "ServicePrincipal",
- "objectId": "objectId",
- "deletionTimestamp": null,
- "accountEnabled": true,
- "addIns": [],
- "alternativeNames": [],
- "appDisplayName": "jclouds",
- "appId": "applicationId",
- "appOwnerTenantId": "tenantId",
- "appRoleAssignmentRequired": false,
- "appRoles": [],
- "displayName": "jclouds",
- "errorUrl": null,
- "homepage": "https://jclouds.apache.org",
- "keyCredentials": [],
- "logoutUrl": null,
- "oauth2Permissions": [
- {
- "adminConsentDescription": "Allow the application to access jclouds on behalf of the signed-in user.",
- "adminConsentDisplayName": "Access jclouds",
- "id": "id",
- "isEnabled": true,
- "type": "User",
- "userConsentDescription": "Allow the application to access jclouds on your behalf.",
- "userConsentDisplayName": "Access jclouds",
- "value": "user_impersonation"
- }
- ],
- "passwordCredentials": [],
- "preferredTokenSigningKeyThumbprint": null,
- "publisherName": "Default Directory",
- "replyUrls": [
- "https://jclouds.apache.org"
- ],
- "samlMetadataUrl": null,
- "servicePrincipalNames": [
- "https://jclouds.onmicrosoft.com/jcloudsid",
- "applicationId"
- ],
- "servicePrincipalType": "Application",
- "tags": [
- "WindowsAzureActiveDirectoryIntegratedApp"
- ],
- "tokenEncryptionKeyId": null
- }
- ]
-}
-
diff --git a/azurecompute-arm/src/test/resources/skus.json b/azurecompute-arm/src/test/resources/skus.json
deleted file mode 100644
index 68c5a81..0000000
--- a/azurecompute-arm/src/test/resources/skus.json
+++ /dev/null
@@ -1,12 +0,0 @@
-[
- {
- "location": "eastus",
- "name": "2008-R2-SP1",
- "id": "/Subscriptions/c36d97d3-3fea-4561-aa2d-e61168908c5b/Providers/Microsoft.Compute/Locations/eastus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2008-R2-SP1"
- },
- {
- "location": "eastus",
- "name": "2012-Datacenter",
- "id": "/Subscriptions/c36d97d3-3fea-4561-aa2d-e61168908c5b/Providers/Microsoft.Compute/Locations/eastus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2012-Datacenter"
- }
-]
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/storageAccounts.json b/azurecompute-arm/src/test/resources/storageAccounts.json
deleted file mode 100644
index f5841df..0000000
--- a/azurecompute-arm/src/test/resources/storageAccounts.json
+++ /dev/null
@@ -1,90 +0,0 @@
-{
- "value": [{
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/resourceGroup/providers/Microsoft.Storage/storageAccounts/TESTSTORAGE",
- "location": "westus",
- "name": "TESTSTORAGE",
- "properties": {
- "accountType": "Standard_RAGRS",
- "creationTime": "2016-02-24T13:04:45.0890883Z",
- "primaryEndpoints": {
- "blob": "https://TESTSTORAGE.blob.core.windows.net/",
- "file": "https://TESTSTORAGE.file.core.windows.net/",
- "queue": "https://TESTSTORAGE.queue.core.windows.net/",
- "table": "https://TESTSTORAGE.table.core.windows.net/"
- },
- "primaryLocation": "westus",
- "provisioningState": "Succeeded",
- "secondaryEndpoints": {
- "blob": "https://TESTSTORAGE-secondary.blob.core.windows.net/",
- "queue": "https://TESTSTORAGE-secondary.queue.core.windows.net/",
- "table": "https://TESTSTORAGE-secondary.table.core.windows.net/"
- },
- "secondaryLocation": "eastus",
- "statusOfPrimary": "available",
- "statusOfSecondary": "available"
- },
- "tags": {
- "key1": "value1",
- "key2": "value2"
- },
- "type": "Microsoft.Storage/storageAccounts"
- }, {
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/resourceGroup/providers/Microsoft.Storage/storageAccounts/TESTSTORAGE2",
- "location": "westus",
- "name": "TESTSTORAGE2",
- "properties": {
- "accountType": "Standard_RAGRS",
- "creationTime": "2016-02-24T13:11:43.8265672Z",
- "primaryEndpoints": {
- "blob": "https://TESTSTORAGE2.blob.core.windows.net/",
- "file": "https://TESTSTORAGE2.file.core.windows.net/",
- "queue": "https://TESTSTORAGE2.queue.core.windows.net/",
- "table": "https://TESTSTORAGE2.table.core.windows.net/"
- },
- "primaryLocation": "westus",
- "provisioningState": "Succeeded",
- "secondaryEndpoints": {
- "blob": "https://TESTSTORAGE2-secondary.blob.core.windows.net/",
- "queue": "https://TESTSTORAGE2-secondary.queue.core.windows.net/",
- "table": "https://TESTSTORAGE2-secondary.table.core.windows.net/"
- },
- "secondaryLocation": "eastus",
- "statusOfPrimary": "available",
- "statusOfSecondary": "available"
- },
- "tags": {
- "key1": "value1",
- "key2": "value2"
- },
- "type": "Microsoft.Storage/storageAccounts"
- }, {
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/resourceGroup/providers/Microsoft.Storage/storageAccounts/TESTSTORAGE3",
- "location": "westus",
- "name": "TESTSTORAGE3",
- "properties": {
- "accountType": "Standard_RAGRS",
- "creationTime": "2016-02-24T14:12:59.5223315Z",
- "primaryEndpoints": {
- "blob": "https://TESTSTORAGE3.blob.core.windows.net/",
- "file": "https://TESTSTORAGE3.file.core.windows.net/",
- "queue": "https://TESTSTORAGE3.queue.core.windows.net/",
- "table": "https://TESTSTORAGE3.table.core.windows.net/"
- },
- "primaryLocation": "westus",
- "provisioningState": "Succeeded",
- "secondaryEndpoints": {
- "blob": "https://TESTSTORAGE3-secondary.blob.core.windows.net/",
- "queue": "https://TESTSTORAGE3-secondary.queue.core.windows.net/",
- "table": "https://TESTSTORAGE3-secondary.table.core.windows.net/"
- },
- "secondaryLocation": "eastus",
- "statusOfPrimary": "available",
- "statusOfSecondary": "available"
- },
- "tags": {
- "key1": "value1",
- "key2": "value2"
- },
- "type": "Microsoft.Storage/storageAccounts"
- }]
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/storageCreateResponse.json b/azurecompute-arm/src/test/resources/storageCreateResponse.json
deleted file mode 100644
index 4fc9301..0000000
--- a/azurecompute-arm/src/test/resources/storageCreateResponse.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "location": "westus",
- "tags": {
- "property_name": "property_value"
- },
- "properties": {
- "accountType": "Premium_LRS"
- }
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/storageaccountkeys.json b/azurecompute-arm/src/test/resources/storageaccountkeys.json
deleted file mode 100644
index 42de106..0000000
--- a/azurecompute-arm/src/test/resources/storageaccountkeys.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "key1": "bndO7lydwDkMo4Y0mFvmfLyi2f9aZY7bwfAVWoJWv4mOVK6E9c/exLnFsSm/NMWgifLCfxC/c6QBTbdEvWUA7w==",
- "key2": "/jMLLT3kKqY4K+cUtJTbh7pCBdvG9EMKJxUvaJJAf6W6aUiZe1A1ulXHcibrqRVA2RJE0oUeXQGXLYJ2l85L7A=="
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/storageaccountupdate.json b/azurecompute-arm/src/test/resources/storageaccountupdate.json
deleted file mode 100644
index dafe560..0000000
--- a/azurecompute-arm/src/test/resources/storageaccountupdate.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "properties": {
- },
- "tags": {
- "another_property_name": "another_property_value"
- }
-}
diff --git a/azurecompute-arm/src/test/resources/storageservices.json b/azurecompute-arm/src/test/resources/storageservices.json
deleted file mode 100644
index b56a67b..0000000
--- a/azurecompute-arm/src/test/resources/storageservices.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/resourceGroup/providers/Microsoft.Storage/storageAccounts/TESTSTORAGE",
- "location": "westus",
- "name": "TESTSTORAGE",
- "properties": {
- "accountType": "Standard_RAGRS",
- "creationTime": "2016-02-24T13:04:45.0890883Z",
- "primaryEndpoints": {
- "blob": "https://TESTSTORAGE.blob.core.windows.net/",
- "file": "https://TESTSTORAGE.file.core.windows.net/",
- "queue": "https://TESTSTORAGE.queue.core.windows.net/",
- "table": "https://TESTSTORAGE.table.core.windows.net/"
- },
- "primaryLocation": "westus",
- "provisioningState": "Succeeded",
- "secondaryEndpoints": {
- "blob": "https://TESTSTORAGE-secondary.blob.core.windows.net/",
- "queue": "https://TESTSTORAGE-secondary.queue.core.windows.net/",
- "table": "https://TESTSTORAGE-secondary.table.core.windows.net/"
- },
- "secondaryLocation": "eastus",
- "statusOfPrimary": "available",
- "statusOfSecondary": "available"
- },
- "tags": {
- "key1": "value1",
- "key2": "value2"
- },
- "type": "Microsoft.Storage/storageAccounts"
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/vaultbackupkey.json b/azurecompute-arm/src/test/resources/vaultbackupkey.json
deleted file mode 100644
index 05a469f..0000000
--- a/azurecompute-arm/src/test/resources/vaultbackupkey.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "value": "JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUppTTJJd1pqZ3dZeTB5Wkdaa0xUUmlPVGt0T0RVeE1TMWpZVGRrTTJKbFlURTVNMkVpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLnVWeGFLX3g3V1kyMzhLTEY0TDNVOXJEYUlWdnpwaEt6ckY3WGtqcVhkOGwzaVMwMXdfdncwLUFpS3JocEVoY3NGaHVkMHREaFV2eXBNS2cyN1UxZlZNRkZoRExxVmxwUk5vdTZnSVZKVThSa3N6anZmU3phaS1hYS0zSzFacHU3eENBaz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yekVoRXdRcUN0M1k2a2xSb05tS2x5LW9rZmtRTWgxWG9xc1dLMUJxSTEyZjl4N1ZOSnFPV0VxWkRNYlNPcmlCb1g4a3prY0VaWHh0YUpDeEVFZkhxZWZkcldiN3RLWldvaXFiei1mSUVCazk2N0s4OHJSQ3V5TnhRR1BXcnNuTEtrTnNVdnhKOWhzckdNZFVoendUX2d2OV9iUllGVXN6ZXdweHA2QXdJNEpac041Z1RScWRvRkhaZnVUb3FIZ1NlODQ4TFUtelRJV245Y3ROWUtWb1Z4VWNEdzBiZHdSdXRUdmk0R2RvY0JiMTlqRXRzeWR5Y1VyclZWVXY1UTc3UjVRVi1tSFFtSTZ1VmRGR0JHUUdiM0Nkakw2YUNRTG5GVEl3U25LalN0N0pSLXAtb3Q4WFFvNDVRR1dGZEJSMkZXT2FmZGZkSkJ4Qno5MExmZjJrczZ4bXhfVmx2b3ptV0JFMi1zV2hLbXFONVRrZ1JnMXNNWFhZTWpBUEsxMENoR2doanVLLWxydndvOWYuYVFLYzIzRDR0TUlkZUhoVklVQ3FqZw"
-}
diff --git a/azurecompute-arm/src/test/resources/vaultbackupsecret.json b/azurecompute-arm/src/test/resources/vaultbackupsecret.json
deleted file mode 100644
index ac51969..0000000
--- a/azurecompute-arm/src/test/resources/vaultbackupsecret.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "value": "KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUppTTJJd1pqZ3dZeTB5Wkdaa0xUUmlPVGt0T0RVeE1TMWpZVGRrTTJKbFlURTVNMkVpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLlFLelA2anZVR0Y5X1M3UU8tRkZDTHIyNGp0RXJuandkQThNZUtsSGE1MmhvS01rNjdiOHQyckZhNTJ6dGR2and1d1I3VWh4RldRLUpuOHk3YlJiNlYtcTlUYl9iV3E5cl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VGwyZS1sY2pwU1E5R29hdlRHSjFCeFp2YWlYZzRNS1FGUjBjRDQzYkxsaXo2Y2NCeEEwZnJTU2dqbUhRNERxdHhjYkFiNFlPTDFlYkFQNFNSQnJwa3hGQW5fc1l6ci1aR0F0R0l3R1JfUHRRbjVLQ05yaXBueDRITVBmS2UtTHg4MzBIWFNxVGV5c0hRbGtuRlRSeFdwLXdNcUxPMlFhTHJnMlUzdnBDekloRmh4dG1tWnpPSE8zZmY2YTAySk9BaDVDek9GcG9oTDFXakl5a1RMd0dNMDZMQ25uNmhGeDVOZEhmVTlqaTdKNGZuT2RkcVh2ZnZ4TDhSN0wtM1d6SThIUVI4TkRHRzl6ZGtHZDUyQVlkNTBqUTZPN29qNUdkZldGMDdQTVY3WWFETjhGc1YwT19wZDM5bFpiUnM0SlV1Y0xWMzBXNGpqVGdselZGeXBaZEFxQXU0d2pWTVd5T1I0X1RSMnh6YW0wemx0ZXc1bm01TUk4NTlZYVhCVE95bkV5T18yRndDR2hzdmxQR2t5SHZuc050NFVya3pjRGswX0JaYUlYYWFNbUhxMUJQUWdiR0d6bUxNV0FXcFY0OUszdnBkN250WHFBZEVyN25VUnVpS2RSckVTYnpEUnAxclh2NExOMUdGNXRnRUFCZFhwYTVQVG9nVDM3cHUwb1BNNW5FZXFDeklRbmtjemMzUVk5SEZwY1J6bWFmbV9fSngxRFd0ak5qR1J0cVM4aHVUcVNKOG5ORl90ZXZsV2dwOU5uZU9KSUZwZkVMMnhYMTc2dnkyQ1FONTBFRzZZWmM4dXZreHFNUmk3OFNjdENEeXQ0WS5Sc3FFM1dad19XclIxRmtQc1RtWW1B"
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/vaultcreate.json b/azurecompute-arm/src/test/resources/vaultcreate.json
deleted file mode 100644
index 604810e..0000000
--- a/azurecompute-arm/src/test/resources/vaultcreate.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "id": "/subscriptions/3fee811e-11bf-4b5c-9c62-a2f28b517724/resourceGroups/rg-vaultapilivetest-jims/providers/Microsoft.KeyVault/vaults/kvvaultapilivetest",
- "name": "kvvaultapilivetest",
- "type": "Microsoft.KeyVault/vaults",
- "location": "westeurope",
- "tags": {},
- "properties": {
- "sku": {
- "family": "A",
- "name": "standard"
- },
- "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
- "accessPolicies": [{
- "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
- "objectId": "5a7f4cb9-ce9d-4b31-87ce-f61083c4b0ea",
- "permissions": {
- "certificates": ["Get", "List", "Update", "Create", "Import", "Delete", "ManageContacts", "ManageIssuers", "GetIssuers", "ListIssuers", "SetIssuers", "DeleteIssuers", "Purge", "Recover"],
- "keys": ["Get", "List", "Update", "Create", "Import", "Delete", "Recover", "Backup", "Restore", "Purge"],
- "secrets": ["Get", "List", "Set", "Delete", "Recover", "Backup", "Restore", "Purge"],
- "storage": []
- }
- }],
- "enabledForDeployment": false,
- "vaultUri": "https://kvvaultapilivetest.vault.azure.net"
- }
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/vaultcreatecertificate.json b/azurecompute-arm/src/test/resources/vaultcreatecertificate.json
deleted file mode 100644
index 15b7aa6..0000000
--- a/azurecompute-arm/src/test/resources/vaultcreatecertificate.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "id": "https://kvvaultapilivetest.vault.azure.net/certificates/myCertificate/pending",
- "issuer": {
- "name": "Self"
- },
- "csr": "MIICszCCAZsCAQAwIzEhMB8GA1UEAxMYbXljZXJ0aWZpY2F0ZS5mb29iYXIuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArrIwtQO60BI1vUkS/Vx0TQ5dBLjWBFfQFUHABJoKXCeloLrHWrWnhaxyj5jvEVGYF5OLBNeHd6PR43bmHKnzq3vhQXUA1sKBRxAJavSM9a+MKBpN39aKvSnqRNdnETE8kwNteIpbmDVMe18UnGtyhRbMKqJ73HpGyyRdiD8nTS9F65SCRQlKALNz0Vi3z52Loo6kRoZPAfcRkDAbbg7JxIuMEEcbrBR0dScR0m2OucYtR3PQ7PUQMXSsLwZmGAu1e/KuqjTNC6XpxRpWSTHf3kS1Q4LjNXde8sk1/5Xovzo/MlVQ7L2tt4pVK79ZkeePbL9ZSKsTc3Thi7G+o8pCewIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBABoDgWVU0DqfhKsujIa4gUHyZKvRWhms0reqb4Ld9GkF4O6TV+TxibBUZRW3SSVvA+po8G7aX+E+si0BfQiwM1PutcK0f5WuYMiEkQ6xaiDhIblrouCYRCTiYmmt2+8iuKAtDNqgqMJjViGXUKcGQgz7UTEJY/LLlgxW2kDyfEJOhGls40AT7tuXAjZ6QPLT9vAdQ8B0L0JNzJ6lJcDe7KattWonjQ4cLZ7xvY0SwUyvabui1UkOFze/EEkLwnJjigvfWkzhoJS7j0Cp3nI08c5zd/rQGq1XNVb9plnjtQP0kwNVQdHVeTug9rqZCyuS3jqwa1prrXkZJyufMmuNSV0=",
- "cancellation_requested": false,
- "status": "inProgress",
- "status_details": "Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.",
- "request_id": "550fcfd2c33440aea6cd354658f91ddb"
-}
diff --git a/azurecompute-arm/src/test/resources/vaultcreatecertificaterequestbody.json b/azurecompute-arm/src/test/resources/vaultcreatecertificaterequestbody.json
deleted file mode 100644
index c85aeb1..0000000
--- a/azurecompute-arm/src/test/resources/vaultcreatecertificaterequestbody.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "policy": {
- "id": "myCertificate",
- "issuer": {
- "name": "Self"
- },
- "key_props": {
- "exportable": false,
- "key_size": 2048,
- "kty": "RSA",
- "reuse_key": false
- },
- "lifetime_actions": [],
- "x509_props": {
- "ekus": [],
- "key_usage": [],
- "subject": "CN\u003dmycertificate.foobar.com",
- "validity_months": 12
- }
- }
-}
diff --git a/azurecompute-arm/src/test/resources/vaultcreatekey.json b/azurecompute-arm/src/test/resources/vaultcreatekey.json
deleted file mode 100644
index 470007a..0000000
--- a/azurecompute-arm/src/test/resources/vaultcreatekey.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "key": {
- "kid": "https://kvvaultapilivetest.vault.azure.net/keys/myKey/f5cfaa4b90a34710a646af83636a5c1b",
- "kty": "RSA",
- "key_ops": ["encrypt", "decrypt", "sign", "verify", "wrapKey", "unwrapKey"],
- "n": "zattdXaoaTAnEDPv38dpgkLSuVp56_7TNczuyBGy3GOF62LgLEId1i7You5R4SGAXJDVDWBVAFIcbw3ppgbn-DgCf4QbAWWREQUOvPNhFvm78Ey6tewofP5jyrCDeSBkjlXC5lRgd8XtVXv0JvNtOU_GbTLMVAGOwPE-0nZWXaD__nkO90AS_2D1tDywcZ7vKix9WjkjYTmY1CEw06-vsQJSYSaaL2M5MmE-S21sgoGZUv7a0jHxDR2rEX3okFoW0sjynz6yxCZtYUmUyDMpWdTIaqKu9ZhfxZPtb6T9E8yAStvma0M5xc70gfOj1LJRK8mMhLmB4lh0POj-2a4fBw",
- "e": "AQAB"
- },
- "attributes": {
- "enabled": true,
- "created": 1509314506,
- "updated": 1509314506,
- "recoveryLevel": "Purgeable"
- }
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/vaultcreatekeyrequestbody.json b/azurecompute-arm/src/test/resources/vaultcreatekeyrequestbody.json
deleted file mode 100644
index bfb19a2..0000000
--- a/azurecompute-arm/src/test/resources/vaultcreatekeyrequestbody.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "attributes": {
- "enabled": true
- },
- "key_size": 2048,
- "kty": "RSA"
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/vaultcreaterequestbody.json b/azurecompute-arm/src/test/resources/vaultcreaterequestbody.json
deleted file mode 100644
index 0b0742d..0000000
--- a/azurecompute-arm/src/test/resources/vaultcreaterequestbody.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "location": "westeurope",
- "properties": {
- "tenantId": "myTenantId",
- "sku": {
- "location": "westeurope",
- "name": "standard",
- "family": "A"
- },
- "accessPolicies": [{
- "objectId": "myIdentityObjectId",
- "tenantId": "myTenantId",
- "permissions": {
- "certificates": ["Get", "List", "Update", "Create", "Import", "Delete", "ManageContacts", "ManageIssuers", "GetIssuers", "ListIssuers", "SetIssuers", "DeleteIssuers", "Purge", "Recover"],
- "keys": ["Get", "List", "Update", "Create", "Import", "Delete", "Recover", "Backup", "Restore", "Purge", "Encrypt", "Decrypt", "Sign", "Verify", "WrapKey", "UnwrapKey"],
- "secrets": ["Get", "List", "Set", "Delete", "Recover", "Backup", "Restore", "Purge"],
- "storage": []
- }
- }]
- }
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/vaultdeletecertificate.json b/azurecompute-arm/src/test/resources/vaultdeletecertificate.json
deleted file mode 100644
index eba51a6..0000000
--- a/azurecompute-arm/src/test/resources/vaultdeletecertificate.json
+++ /dev/null
@@ -1,58 +0,0 @@
-{
- "id": "https://kvvaultapilivetest.vault.azure.net/certificates/myCertificate/b73ba4610dc24dca946f76933f6590dd",
- "kid": "https://kvvaultapilivetest.vault.azure.net/keys/myCertificate/b73ba4610dc24dca946f76933f6590dd",
- "sid": "https://kvvaultapilivetest.vault.azure.net/secrets/myCertificate/b73ba4610dc24dca946f76933f6590dd",
- "x5t": "K7HXO6YIK6xwCX8W1InUKsJV9Rk",
- "cer": "MIIDTDCCAjSgAwIBAgIQVA+XomvgS56ybBWv2MnacjANBgkqhkiG9w0BAQsFADAjMSEwHwYDVQQDExhteWNlcnRpZmljYXRlLmZvb2Jhci5jb20wHhcNMTcxMDMwMDY0NDI3WhcNMTgxMDMwMDY1NDI3WjAjMSEwHwYDVQQDExhteWNlcnRpZmljYXRlLmZvb2Jhci5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCusjC1A7rQEjW9SRL9XHRNDl0EuNYEV9AVQcAEmgpcJ6WgusdataeFrHKPmO8RUZgXk4sE14d3o9HjduYcqfOre+FBdQDWwoFHEAlq9Iz1r4woGk3f1oq9KepE12cRMTyTA214iluYNUx7XxSca3KFFswqonvcekbLJF2IPydNL0XrlIJFCUoAs3PRWLfPnYuijqRGhk8B9xGQMBtuDsnEi4wQRxusFHR1JxHSbY65xi1Hc9Ds9RAxdKwvBmYYC7V78q6qNM0LpenFGlZJMd/eRLVDguM1d17yyTX/lei/Oj8yVVDsva23ilUrv1mR549sv1lIqxNzdOGLsb6jykJ7AgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBRnlX51KtyJ/m/V8I/3il4cAW/HOzAdBgNVHQ4EFgQUZ5V+dSrcif5v1fCP94peHAFvxzswDQYJKoZIhvcNAQELBQADggEBAAbSFuMRMbXyH80iA/jU7vuUCYe0Ra/wTTB1qVHTBuqQ/W8RI01mdqI9+GAPOTyN94XPPYVpSz9ZQ3P0/dhgcsahW5bZQkC0CcUSE5R7JUOKI5Up6n8zZM/unHlC6ZcEpNA/scObPKhQXdZayxgf2/p30bii4CiyS7ADEH92xMnzo1Eu9Dckxh1MRDypfxMY9YIzggksiY78BxoNsRDyxNjeRHVUxAIJ3n9TUv+WG31r7rMOIs6ZPsWc96AzUHHAZREVTEh2kiKKIenbMXn1tCpF6/GJKGfp7rt5ObUoQAlnn7kgAceteKZHEMgRZ4c4EQq+yqBw3hJrz4dOabJcmcU=",
- "attributes": {
- "enabled": true,
- "nbf": 1509345867,
- "exp": 1540882467,
- "created": 1509346467,
- "updated": 1509346472,
- "recoveryLevel": "Purgeable"
- },
- "tags": {
- "selfsigned": "true"
- },
- "policy": {
- "id": "https://kvvaultapilivetest.vault.azure.net/certificates/myCertificate/policy",
- "key_props": {
- "exportable": true,
- "kty": "RSA",
- "key_size": 3072,
- "reuse_key": false
- },
- "secret_props": {
- "contentType": "application/x-pkcs12"
- },
- "x509_props": {
- "subject": "CN=mycertificate.foobar.com",
- "ekus": ["1.3.6.1.5.5.7.3.1", "1.3.6.1.5.5.7.3.2"],
- "key_usage": ["digitalSignature", "keyEncipherment"],
- "validity_months": 12,
- "basic_constraints": {
- "ca": false
- }
- },
- "lifetime_actions": [{
- "trigger": {
- "lifetime_percentage": 80
- },
- "action": {
- "action_type": "AutoRenew"
- }
- }],
- "issuer": {
- "name": "Self"
- },
- "attributes": {
- "enabled": true,
- "created": 1509346452,
- "updated": 1509346474
- }
- },
- "pending": {
- "id": "https://kvvaultapilivetest.vault.azure.net/certificates/myCertificate/pending"
- }
-}
diff --git a/azurecompute-arm/src/test/resources/vaultdeletecertificatecontacts.json b/azurecompute-arm/src/test/resources/vaultdeletecertificatecontacts.json
deleted file mode 100644
index ca89576..0000000
--- a/azurecompute-arm/src/test/resources/vaultdeletecertificatecontacts.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "id": "https://kvvaultapilivetest.vault.azure.net/certificates/contacts",
- "contacts": [{
- "email": "foo@bar.com",
- "name": "Foo bar",
- "phone": "867-5309"
- }]
-}
diff --git a/azurecompute-arm/src/test/resources/vaultdeletecertificateissuer.json b/azurecompute-arm/src/test/resources/vaultdeletecertificateissuer.json
deleted file mode 100644
index 73421fe..0000000
--- a/azurecompute-arm/src/test/resources/vaultdeletecertificateissuer.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "id": "https://kvvaultapilivetest.vault.azure.net/certificates/issuers/globalsign01",
- "provider": "GlobalSign",
- "credentials": {
- "account_id": "imauser"
- },
- "org_details": {
- "zip": 0,
- "admin_details": [{
- "first_name": "Admin",
- "last_name": "Guy",
- "email": "adminguy@certsforme.com",
- "phone": "867-5309"
- }]
- },
- "attributes": {
- "enabled": true,
- "created": 1509346474,
- "updated": 1509346479
- }
-}
diff --git a/azurecompute-arm/src/test/resources/vaultdeletecertificateoperation.json b/azurecompute-arm/src/test/resources/vaultdeletecertificateoperation.json
deleted file mode 100644
index 800f399..0000000
--- a/azurecompute-arm/src/test/resources/vaultdeletecertificateoperation.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "id": "https://kvvaultapilivetest.vault.azure.net/certificates/myTempCertificate/pending",
- "issuer": {
- "name": "Self"
- },
- "csr": "MIIEtzCCAp8CAQAwJzElMCMGA1UEAxMcbXl0ZW1wY2VydGlmaWNhdGUuZm9vYmFyLmNvbTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMmt2TbL1ndbSggTwx2l3k/ZUzt0IGO/FMB/oqpmc5izy2KGi0/uSoEdFA9cSqfctL3FGx2J1cFVTz287cvLB8HB3A4svAoPnKsZmKpXuYbF4fK2wQGXm/iNk+JVq1KL0lfoqW2g52lHDM85XURMn8YCkAGIKeTlOVyEn7EMBuBumcJbszj0g56Ij+VKmxoua/Ja4ONmIGsKdyZRBEuvFQ1GTnJUvCWHwyo1pT0M5EY/VL9ikc283DSvpQcfvNelQgQfWCpTRX1Q7nTUHk14DD4d/Y6OdbjcVuqE0Jdqdw6MXfU2zrkPo/nZBf5GHsUChiaxzVeEafPjWKvqVDzhEYXpmMB5SDAELaQtV6PoX+kxcjAO4K//BQtwneHHVF/Sh+7ke3nNUlSf4Mjn541wS7LdkBDOlTnKdYu+DhfbdkRD4E9LPiDduWDWHZs051uFBecR93JaZmX2b376RORQygDkBRga/MNENoEEnsz4zmoMYCGspZhRXEC9Uts1hzYEtwM1hyLqJlfadX/sct20N4JkhDkM8NG2V43R8jcnKFmzjfv6Yc1tuiQ1GQpYNFPJWh+fakAZkt7IwYsvy1CQg92Yvi3ne9zRTBn00enDpBTWaGCZ84gYYaT7Yfyo7/WRTjinYt6R0+u8l0AmZb0xkgxEACIQoyrg+oWQZI4YrneRAgMBAAGgSzBJBgkqhkiG9w0BCQ4xPDA6MA4GA1UdDwEB/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwCQYDVR0TBAIwADANBgkqhkiG9w0BAQsFAAOCAgEAr8RMKLLpGG31Mq4Dor6Tf11AoiHCLH33MUqblF1VfDiw0++qBZ1dgm0D+uzQph/bZ6jKe/PUWpS1bErfaOt3iaVNOHom8jP/U3kZiYWvc/YHetU03prm1Qb+izNZA97NNeZRsuCXMAkNAHQnXa/rz/zG6BmGXFigh55wglX6aB8PnfKZb7N6RCct8BsKSV8uPpxXzRWPKrv7TA2RKfMifUD/Dzt7FSDuYJ8FGkvQNX012RXb2DqHp8tbZgUSj7iXdoZMZ1jfwlh6P61yhfItbF4SYvtBd9PTWIxP6SkCfDjJ7f0/ofwoV2DvAiwfH7URdQIMC+B8dPCqbjya3Ku+B2fWXXhdG7gJqa1zRY066QTIsHwfwd3WbeLQxCcBUEQUG0u23gj9fDX81fvKsgHtN9Nod5wXsdLtjjpHpJQJlDanII4H3fvDxAOlqSnxxEhjL9uA3YXUERMGGjExXA5kCOqKrdfGT5x4yosuNutylvF8YYn8r+mvMgegtVl8XmKnyP+uESSE2krVVmnSM2gveq7ILxBvanq70LmQVeYQB4AlLtUsxPUPIPiOryDI39KrlqWKdl3/oC7Gx+WbVzXxs37NEwt/tx8E+r1Nq/jRFxP0QlyyUdjpiPXjUpuCdn4y6erpCuahbMP+CZNCNgeEh1v2pNljuaGCIB+VA2Fz/oU=",
- "cancellation_requested": true,
- "status": "inProgress",
- "status_details": "Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.",
- "request_id": "32051e4e4ac947c5b9ad1b6737bee7c0"
-}
diff --git a/azurecompute-arm/src/test/resources/vaultdeletekey.json b/azurecompute-arm/src/test/resources/vaultdeletekey.json
deleted file mode 100644
index 9ca672e..0000000
--- a/azurecompute-arm/src/test/resources/vaultdeletekey.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "key": {
- "kid": "https://kvvaultapilivetest.vault.azure.net/keys/myKey/1374543b3de34500a97d075991ee3893",
- "kty": "RSA",
- "key_ops": ["encrypt", "decrypt", "sign", "verify", "wrapKey", "unwrapKey"],
- "n": "tY2pzXPfU7NFYCWvZB1gJNAetkgJ7Qi75lTVOzVns9KjFFo6e_F9GSETZbAYl5oMwfLtdqQqT5fxzWDk0sYlz09HXvCCoYmbzobd3gJ6-WLAqhtCbBikr5HAIlCzy_UqKT--WhEw8AT_EJFBPIY9xNktqnaNZuRBmjmXinzT02qUmBZRsAdJmaYfG9IZSmToOkb54OytI5TreWN0JvceoQ3GSeFLMC5PUmXP6HmZliOzBBHWnXNq3H7a3qfWV3rxT2QpbrIuz18ZqOVp7o5868kN8knKytVcqEzmdiQUdabkqbrwuh-z_IEre9AqTfw6OjUUmLjs4lyKcpWLYFh8KJuML1ub-8u0VgNGwczUZ7aAld1iwGMsoMmQfMRDOnv-9pqtY-y40ZWpBGXpzFV-IvtKHnqQk_vWqowpE8xwx7yZ74z9XNgS9TmkVpcC-ONbEfNE1sez0Zf-RZ9eOm_7WSxxH6OJYtJI7wotBXYoy1bJaqo7mgHs1IUOFhSE-Evj",
- "e": "AQAB"
- },
- "attributes": {
- "enabled": true,
- "created": 1509335925,
- "updated": 1509335925,
- "recoveryLevel": "Purgeable"
- }
-}
diff --git a/azurecompute-arm/src/test/resources/vaultdeletesecret.json b/azurecompute-arm/src/test/resources/vaultdeletesecret.json
deleted file mode 100644
index bff4c9d..0000000
--- a/azurecompute-arm/src/test/resources/vaultdeletesecret.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "contentType": "aNewSecretKey",
- "id": "https://kvvaultapilivetest.vault.azure.net/secrets/mySecret/8c418537cbc948539ea2ac12c0bfcfb4",
- "attributes": {
- "enabled": true,
- "created": 1509335944,
- "updated": 1509335944,
- "recoveryLevel": "Purgeable"
- }
-}
diff --git a/azurecompute-arm/src/test/resources/vaultget.json b/azurecompute-arm/src/test/resources/vaultget.json
deleted file mode 100644
index 46de8b9..0000000
--- a/azurecompute-arm/src/test/resources/vaultget.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "id": "/subscriptions/3fee811e-11bf-4b5c-9c62-a2f28b517724/resourceGroups/rg-vaultapilivetest-jims/providers/Microsoft.KeyVault/vaults/kvvaultapilivetest",
- "name": "kvvaultapilivetest",
- "type": "Microsoft.KeyVault/vaults",
- "location": "westeurope",
- "tags": {},
- "properties": {
- "sku": {
- "family": "A",
- "name": "standard"
- },
- "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
- "accessPolicies": [{
- "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
- "objectId": "5a7f4cb9-ce9d-4b31-87ce-f61083c4b0ea",
- "permissions": {
- "certificates": ["Get", "List", "Update", "Create", "Import", "Delete", "ManageContacts", "ManageIssuers", "GetIssuers", "ListIssuers", "SetIssuers", "DeleteIssuers", "Purge", "Recover"],
- "keys": ["Get", "List", "Update", "Create", "Import", "Delete", "Recover", "Backup", "Restore", "Purge"],
- "secrets": ["Get", "List", "Set", "Delete", "Recover", "Backup", "Restore", "Purge"],
- "storage": []
- }
- }],
- "enabledForDeployment": false,
- "vaultUri": "https://kvvaultapilivetest.vault.azure.net/"
- }
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/vaultgetcertificate.json b/azurecompute-arm/src/test/resources/vaultgetcertificate.json
deleted file mode 100644
index 31e982f..0000000
--- a/azurecompute-arm/src/test/resources/vaultgetcertificate.json
+++ /dev/null
@@ -1,55 +0,0 @@
-{
- "id": "https://kvvaultapilivetest.vault.azure.net/certificates/myCertificate/b73ba4610dc24dca946f76933f6590dd",
- "kid": "https://kvvaultapilivetest.vault.azure.net/keys/myCertificate/b73ba4610dc24dca946f76933f6590dd",
- "sid": "https://kvvaultapilivetest.vault.azure.net/secrets/myCertificate/b73ba4610dc24dca946f76933f6590dd",
- "x5t": "K7HXO6YIK6xwCX8W1InUKsJV9Rk",
- "cer": "MIIDTDCCAjSgAwIBAgIQVA+XomvgS56ybBWv2MnacjANBgkqh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cU=",
- "attributes": {
- "enabled": true,
- "nbf": 1509345867,
- "exp": 1540882467,
- "created": 1509346467,
- "updated": 1509346467,
- "recoveryLevel": "Purgeable"
- },
- "policy": {
- "id": "https://kvvaultapilivetest.vault.azure.net/certificates/myCertificate/policy",
- "key_props": {
- "exportable": false,
- "kty": "RSA",
- "key_size": 2048,
- "reuse_key": false
- },
- "secret_props": {
- "contentType": "application/x-pkcs12"
- },
- "x509_props": {
- "subject": "CN=mycertificate.foobar.com",
- "ekus": ["1.3.6.1.5.5.7.3.1", "1.3.6.1.5.5.7.3.2"],
- "key_usage": ["digitalSignature", "keyEncipherment"],
- "validity_months": 12,
- "basic_constraints": {
- "ca": false
- }
- },
- "lifetime_actions": [{
- "trigger": {
- "lifetime_percentage": 80
- },
- "action": {
- "action_type": "AutoRenew"
- }
- }],
- "issuer": {
- "name": "Self"
- },
- "attributes": {
- "enabled": true,
- "created": 1509346452,
- "updated": 1509346452
- }
- },
- "pending": {
- "id": "https://kvvaultapilivetest.vault.azure.net/certificates/myCertificate/pending"
- }
-}
diff --git a/azurecompute-arm/src/test/resources/vaultgetcertificatecontacts.json b/azurecompute-arm/src/test/resources/vaultgetcertificatecontacts.json
deleted file mode 100644
index ca89576..0000000
--- a/azurecompute-arm/src/test/resources/vaultgetcertificatecontacts.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "id": "https://kvvaultapilivetest.vault.azure.net/certificates/contacts",
- "contacts": [{
- "email": "foo@bar.com",
- "name": "Foo bar",
- "phone": "867-5309"
- }]
-}
diff --git a/azurecompute-arm/src/test/resources/vaultgetcertificateissuer.json b/azurecompute-arm/src/test/resources/vaultgetcertificateissuer.json
deleted file mode 100644
index dd08fe9..0000000
--- a/azurecompute-arm/src/test/resources/vaultgetcertificateissuer.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "id": "https://kvvaultapilivetest.vault.azure.net/certificates/issuers/globalsign01",
- "provider": "GlobalSign",
- "credentials": {
- "account_id": "imauser"
- },
- "org_details": {
- "zip": 0,
- "admin_details": [{
- "first_name": "Admin",
- "last_name": "Guy",
- "email": "adminguy@certsforme.com",
- "phone": "867-5309"
- }]
- },
- "attributes": {
- "enabled": true,
- "created": 1509346474,
- "updated": 1509346474
- }
-}
diff --git a/azurecompute-arm/src/test/resources/vaultgetcertificateoperation.json b/azurecompute-arm/src/test/resources/vaultgetcertificateoperation.json
deleted file mode 100644
index 15b7aa6..0000000
--- a/azurecompute-arm/src/test/resources/vaultgetcertificateoperation.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "id": "https://kvvaultapilivetest.vault.azure.net/certificates/myCertificate/pending",
- "issuer": {
- "name": "Self"
- },
- "csr": "MIICszCCAZsCAQAwIzEhMB8GA1UEAxMYbXljZXJ0aWZpY2F0ZS5mb29iYXIuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArrIwtQO60BI1vUkS/Vx0TQ5dBLjWBFfQFUHABJoKXCeloLrHWrWnhaxyj5jvEVGYF5OLBNeHd6PR43bmHKnzq3vhQXUA1sKBRxAJavSM9a+MKBpN39aKvSnqRNdnETE8kwNteIpbmDVMe18UnGtyhRbMKqJ73HpGyyRdiD8nTS9F65SCRQlKALNz0Vi3z52Loo6kRoZPAfcRkDAbbg7JxIuMEEcbrBR0dScR0m2OucYtR3PQ7PUQMXSsLwZmGAu1e/KuqjTNC6XpxRpWSTHf3kS1Q4LjNXde8sk1/5Xovzo/MlVQ7L2tt4pVK79ZkeePbL9ZSKsTc3Thi7G+o8pCewIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBABoDgWVU0DqfhKsujIa4gUHyZKvRWhms0reqb4Ld9GkF4O6TV+TxibBUZRW3SSVvA+po8G7aX+E+si0BfQiwM1PutcK0f5WuYMiEkQ6xaiDhIblrouCYRCTiYmmt2+8iuKAtDNqgqMJjViGXUKcGQgz7UTEJY/LLlgxW2kDyfEJOhGls40AT7tuXAjZ6QPLT9vAdQ8B0L0JNzJ6lJcDe7KattWonjQ4cLZ7xvY0SwUyvabui1UkOFze/EEkLwnJjigvfWkzhoJS7j0Cp3nI08c5zd/rQGq1XNVb9plnjtQP0kwNVQdHVeTug9rqZCyuS3jqwa1prrXkZJyufMmuNSV0=",
- "cancellation_requested": false,
- "status": "inProgress",
- "status_details": "Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.",
- "request_id": "550fcfd2c33440aea6cd354658f91ddb"
-}
diff --git a/azurecompute-arm/src/test/resources/vaultgetcertificatepolicy.json b/azurecompute-arm/src/test/resources/vaultgetcertificatepolicy.json
deleted file mode 100644
index 97e126a..0000000
--- a/azurecompute-arm/src/test/resources/vaultgetcertificatepolicy.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "id": "https://kvvaultapilivetest.vault.azure.net/certificates/myCertificate/policy",
- "key_props": {
- "exportable": false,
- "kty": "RSA",
- "key_size": 2048,
- "reuse_key": false
- },
- "secret_props": {
- "contentType": "application/x-pkcs12"
- },
- "x509_props": {
- "subject": "CN=mycertificate.foobar.com",
- "ekus": ["1.3.6.1.5.5.7.3.1", "1.3.6.1.5.5.7.3.2"],
- "key_usage": ["digitalSignature", "keyEncipherment"],
- "validity_months": 12,
- "basic_constraints": {
- "ca": false
- }
- },
- "lifetime_actions": [{
- "trigger": {
- "lifetime_percentage": 80
- },
- "action": {
- "action_type": "AutoRenew"
- }
- }],
- "issuer": {
- "name": "Self"
- },
- "attributes": {
- "enabled": true,
- "created": 1509346452,
- "updated": 1509346452
- }
-}
diff --git a/azurecompute-arm/src/test/resources/vaultgetdeleted.json b/azurecompute-arm/src/test/resources/vaultgetdeleted.json
deleted file mode 100644
index bb3bb2c..0000000
--- a/azurecompute-arm/src/test/resources/vaultgetdeleted.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "id": "/subscriptions/3fee811e-11bf-4b5c-9c62-a2f28b517724/providers/Microsoft.KeyVault/locations/westeurope/deletedVaults/kvvaultapilivetest",
- "name": "kvvaultapilivetest",
- "type": "Microsoft.KeyVault/deletedVaults",
- "properties": {
- "vaultId": "/subscriptions/3fee811e-11bf-4b5c-9c62-a2f28b517724/resourceGroups/rg-vaultapilivetest-jims/providers/Microsoft.KeyVault/vaults/kvvaultapilivetest",
- "location": "westeurope",
- "tags": {},
- "deletionDate": "2017-10-29T22:06:02Z",
- "scheduledPurgeDate": "2018-01-27T22:06:02Z"
- }
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/vaultgetdeletedcertificate.json b/azurecompute-arm/src/test/resources/vaultgetdeletedcertificate.json
deleted file mode 100644
index 73635de..0000000
--- a/azurecompute-arm/src/test/resources/vaultgetdeletedcertificate.json
+++ /dev/null
@@ -1,55 +0,0 @@
-{
- "recoveryId": "https://kvvaultapilivetest.vault.azure.net/deletedcertificates/myRecoverableCertificate",
- "deletedDate": 1509346545,
- "scheduledPurgeDate": 1517122545,
- "id": "https://kvvaultapilivetest.vault.azure.net/certificates/myRecoverableCertificate/42f1b607074a4531b4f14fb4447d4346",
- "kid": "https://kvvaultapilivetest.vault.azure.net/keys/myRecoverableCertificate/42f1b607074a4531b4f14fb4447d4346",
- "sid": "https://kvvaultapilivetest.vault.azure.net/secrets/myRecoverableCertificate/42f1b607074a4531b4f14fb4447d4346",
- "x5t": "-qEnW6P9TdfOOXzbNQNS5ZKveRo",
- "cer": "MIIFNDCCAxygAwIBAgICQ0MwDQYJKoZIhvcNAQELBQAwVjELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExDzANBgNVBAoMBkZvb2JhcjEhMB8GA1UEAwwYRm9vYmFyIEludGVybWVkaWF0ZSBDQSAxMB4XDTE3MTAyODIyNTIxNFoXDTE4MTEwNzIyNTIxNFowUTELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExDz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ORyQSEx/OncDuAKm45ub92By5NpeFVMk+8ibifgzbNJHVnaZUVg8ScdM1A4Db6WAL0SUsYIawrnQ+TENs+6Ekls+wu8G5FAmbtOEV0WOafGvdcnELn5IPXlkvLbiRx5EChG+nF3XrLgn3dBQwP2cGrI/IPRm1XfaaBAkMSkf6St5TX3C40g1CGcNSVoKBYBB2Di+hPXwTHImGggR1JF34ljHCokMoPxmr7lP9pam0dhP/SSpIwxfsvDJylBgUEqTr3tsVDIDfMtJjudK7A7H1HMoqEiqlzRvJIEZ1koOxANFcQ1f9am2PPUNFvfK9IbLQlV8d4k1w6xBAeOVke79lJI9pTTCSVb+PTDniEL79JXjmjQUoKE4zo1u41d+wLu3dEGM27GI7BdLYt6bRsolZvrbey7Nn4c0t4ug4B4GTd1SLLVJns/IRLBrNr1anBJ7u9WFruBUEWwtdxAwSoXdtIIQ==",
- "attributes": {
- "enabled": true,
- "nbf": 1509231134,
- "exp": 1541631134,
- "created": 1509346510,
- "updated": 1509346510,
- "recoveryLevel": "Recoverable+Purgeable"
- },
- "policy": {
- "id": "https://kvvaultapilivetest.vault.azure.net/certificates/myRecoverableCertificate/policy",
- "key_props": {
- "exportable": true,
- "kty": "RSA",
- "key_size": 2048,
- "reuse_key": false
- },
- "secret_props": {
- "contentType": "application/x-pem-file"
- },
- "x509_props": {
- "subject": "CN=testsite.foobar.com, O=Foobar, S=California, C=US",
- "ekus": ["1.3.6.1.5.5.7.3.1"],
- "key_usage": ["digitalSignature", "keyEncipherment"],
- "validity_months": 13,
- "basic_constraints": {
- "ca": false
- }
- },
- "lifetime_actions": [{
- "trigger": {
- "lifetime_percentage": 80
- },
- "action": {
- "action_type": "EmailContacts"
- }
- }],
- "issuer": {
- "name": "Unknown"
- },
- "attributes": {
- "enabled": true,
- "created": 1509346510,
- "updated": 1509346510
- }
- }
-}
diff --git a/azurecompute-arm/src/test/resources/vaultgetdeletedkey.json b/azurecompute-arm/src/test/resources/vaultgetdeletedkey.json
deleted file mode 100644
index 687a1cc..0000000
--- a/azurecompute-arm/src/test/resources/vaultgetdeletedkey.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "recoveryId": "https://kvvaultapilivetest.vault.azure.net/deletedkeys/myRecoverableKey",
- "deletedDate": 1509335960,
- "scheduledPurgeDate": 1517111960,
- "key": {
- "kid": "https://kvvaultapilivetest.vault.azure.net/keys/myRecoverableKey/274f6c69b94b41359a5932226425eb43",
- "kty": "RSA",
- "key_ops": ["encrypt", "decrypt", "sign", "verify", "wrapKey", "unwrapKey"],
- "n": "urhKlXbEGvYetOSH-GLytvSJ5djS0-5SKBtFOlJ2885PE0s_ZbnkRURDm2fImv_RV763HKSUQbEolQNs8I99N-3uCkrDStVZ6MPii9-0U6lrEkX7LrMRNYCfPAaSSZhSjCbsyqX9Y-N_A5Jz9uHNuXvpjQ9N7ojUK7fqqhnJKcJ6l6YsGOhGCD3uei4SL5GzbSAn2auIK51lj77UXjBZaudnNWTiKaCbTAmSmEe13DOJkg82_7Y1eWea3NJn4T2nY8WqRJCp4hzBsPBmFXjE1lgFWcSjm_afiSb0mCUP7v7tSOLR3xUBv9WgMO7p4_ce_--A9ZWP418Uqq0COcHAWQ",
- "e": "AQAB"
- },
- "attributes": {
- "enabled": true,
- "created": 1509335950,
- "updated": 1509335950,
- "recoveryLevel": "Recoverable+Purgeable"
- }
-}
diff --git a/azurecompute-arm/src/test/resources/vaultgetdeletedsecret.json b/azurecompute-arm/src/test/resources/vaultgetdeletedsecret.json
deleted file mode 100644
index cd57373..0000000
--- a/azurecompute-arm/src/test/resources/vaultgetdeletedsecret.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "recoveryId": "https://kvvaultapilivetest.vault.azure.net/deletedsecrets/myRecoverableSecret",
- "deletedDate": 1509335980,
- "scheduledPurgeDate": 1517111980,
- "contentType": "aNewSecretKey",
- "id": "https://kvvaultapilivetest.vault.azure.net/secrets/myRecoverableSecret/d7194ca6b0214d0ba382353109cd7e58",
- "attributes": {
- "enabled": true,
- "created": 1509335958,
- "updated": 1509335958,
- "recoveryLevel": "Recoverable+Purgeable"
- }
-}
diff --git a/azurecompute-arm/src/test/resources/vaultgetkey.json b/azurecompute-arm/src/test/resources/vaultgetkey.json
deleted file mode 100644
index 66fcf42..0000000
--- a/azurecompute-arm/src/test/resources/vaultgetkey.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "key": {
- "kid": "https://kvvaultapilivetest.vault.azure.net/keys/myKey/bd6566ec707e4ad89f4ab9577d9d0bef",
- "kty": "RSA",
- "key_ops": ["encrypt", "decrypt", "sign", "verify", "wrapKey", "unwrapKey"],
- "n": "2ZWsir4hwVxFTQXfWN7Vy1zA33jg1kxUMHmkmEFtVjGDByzmMfEXpnPziNCtYppBtpNT4AJEVQ60aIgSLNrUYBMoeiI2HCf2NM0NTdwYp7wq5tImtbGDASdDXQ1v3Bv3hXGh3CVmN2VLRf0OmoXnZUG_2UZZ05iPXOY6lNFfq8L81v0ZCMiXwFvNVhZ_fzppzhnwuHQf-X6Lnvrd1ocFqF8IFjV3663eumAfZmBLPP6tmiAZYW3G68_G0I2CHLtTPFX05aN51Jn42RITgcs63HFMT_iVW5556YR0BwtqkCXIUgTD714Fipz7EKGqhHsqND7YUSKpiRVQhfoZEckAkQ",
- "e": "AQAB"
- },
- "attributes": {
- "enabled": true,
- "created": 1509335902,
- "updated": 1509335902,
- "recoveryLevel": "Purgeable"
- }
-}
diff --git a/azurecompute-arm/src/test/resources/vaultgetkeyversions.json b/azurecompute-arm/src/test/resources/vaultgetkeyversions.json
deleted file mode 100644
index c534f8f..0000000
--- a/azurecompute-arm/src/test/resources/vaultgetkeyversions.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "value": [{
- "kid": "https://kvvaultapilivetest.vault.azure.net/keys/myKey/1374543b3de34500a97d075991ee3893",
- "attributes": {
- "enabled": true,
- "created": 1509335925,
- "updated": 1509335925,
- "recoveryLevel": "Purgeable"
- }
- }, {
- "kid": "https://kvvaultapilivetest.vault.azure.net/keys/myKey/bd6566ec707e4ad89f4ab9577d9d0bef",
- "attributes": {
- "enabled": true,
- "created": 1509335902,
- "updated": 1509335923,
- "recoveryLevel": "Purgeable"
- },
- "tags": {
- "purpose": "testing"
- }
- }],
- "nextLink": null
-}
diff --git a/azurecompute-arm/src/test/resources/vaultgetsecret.json b/azurecompute-arm/src/test/resources/vaultgetsecret.json
deleted file mode 100644
index 9f1e929..0000000
--- a/azurecompute-arm/src/test/resources/vaultgetsecret.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "value": "-----BEGIN RSA PRIVATE KEY-----\\nMIIEogIBAAKCAQEAvZiOgV6b4EmGiasBskXYnTaRyWzBHBGnWB11BzFN3FGigfWx\\nVvjI7Ox1SHTx+vGsnjbqQPvIP4JnPEsNcWLyHa6tNAcnj/M7BuyIwdD5+Hvs6kOe\\nPuSOJUf8dRjPMUpr6rcUcBmmOwTnKOH4rdpb6jXNnuCIHP+lgXCeRWveZ62TjEB+\\n9aB8W8UHH854FGebiUd/aY0tpCFC7wkWz3KbgmjmY2vSe2U98Yj4+l/IWydIZ7ON\\nLicteEEIGbNM0o2QSYhQBCJSw5RixDpPlrUUB094qgqUOyW0k8PvjibGxxTh0LYy\\nWqWydPF0XaqFRQ6v36UvEiVGwzVsLwsJL/QVtQIDAQABAoIBAEJ6790lE3s9zNMR\\nB3M/UoktzUjXvY7eEdOv4I05GJgcd+MiB6D7c1jAQQ+7Ee5wN5rynolSwBCk5RYb\\nKweLLmKCEXGg4Jp1K0luPzXW1Q/wRE6Qjzh2Y/FmoHtey6f49IZE1AHKvKMNQRDw\\ny4YKfxhM7WC8Un34lkwg9R5aiI3JkOG9/yNkOGrJfQnGUKt+AOAdu6fNYsRLWAPo\\nG3vWSNIgwaG5WL5cKd1gacbGBlc6tLB7+LrZuNrqln5ibTtN6QJvRF9KfOrMSvxy\\nL/xiHRpyzec/jrxJxAIIwFHiw2jbLdxNqDaVPFA6X1Cks4fvY40KymOS8Ecmkgx4\\nC6/ZqLECgYEA38rL8zmbJRRWgrxSoROucaN/9DyvE8Hd97s1zf3I0LIF+GI3JdcN\\nDV5O5VDIgQ7QZ55lOaTqJ0f2fOQZF1UbTU1gBUHVF6j1nv6Xic3OV+ZmhTMbt0Op\\nWxPaKup6dkNEAe/Xg0p308r8xw/psh4/gjL1ICHwycjUlz9FQz8FLGsCgYEA2OHc\\n/F4vAdK04U4w6AyivuJdIsDAks1ikl+3TqgzyesPg+DpKVNSy6DhraDFKdRqWhbK\\nDqigTud8TVk9kmyF3WIb1BDf4IrxlTK08s6Jf25QA/lBlwIst3rejqWwRBY2fJp4\\nO8hU31xNLd8nZq8tKYaP+yvyI6fSC+9ZIgyATl8CgYBtTlYzZG2cvMRMcsNBHaXU\\np3E1z/YLhmNuPqhXBp/xHyK/YOliuBkN8IREiSKFtsCf+8OhViVwLjv8YETJGq6N\\nIT/HEZKNTd86W0uU6UrhsA1e/cmJx6iObbHfyEssPEqZT5ZJ8DN65Oh2KhWRBCks\\n5MrJeQps5ITBowunfr5+JQKBgBln09goPD9tbEzcOPRlzoanw5s3kxdfQcW9up5X\\nK8HibC3ZodZ6cT9zOBx7sbzlqhOlicPP0v+LNE9nPcQyPDgjrvjXhTIrdIMyrmmm\\n8gpgZLUidKF42r4fgYSaOhyvsXBFNAJkxDRp/ox6EIaBzLuJjMIycqnklcFaJ0nK\\nxxjnAoGAU/3jRok74Yn0MY183UCXICf/WxVYzwEi3cyRWVh6gAo2ExNye97rau/B\\nY2woAcVxEN9h1HNirq8Z2AwrZKd/BcBnvulZqECeH5zBQ0W56ADX72r+lzOAxTJa\\nU1AIlNCIkfsQ5CpIoYsVoNEM8P+GyS8B9kaEmk/FVKldRTKJqkI=\\n-----END RSA PRIVATE KEY-----\\n",
- "contentType": "testSecretKey",
- "id": "https://kvvaultapilivetest.vault.azure.net/secrets/mySecret/b936ececbc674f3bb1367ae50d28ada0",
- "attributes": {
- "enabled": true,
- "created": 1509335932,
- "updated": 1509335932,
- "recoveryLevel": "Purgeable"
- }
-}
diff --git a/azurecompute-arm/src/test/resources/vaultgetsecretversions.json b/azurecompute-arm/src/test/resources/vaultgetsecretversions.json
deleted file mode 100644
index c09ca45..0000000
--- a/azurecompute-arm/src/test/resources/vaultgetsecretversions.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "value": [{
- "contentType": "aNewSecretKey",
- "id": "https://kvvaultapilivetest.vault.azure.net/secrets/mySecret/8c418537cbc948539ea2ac12c0bfcfb4",
- "attributes": {
- "enabled": true,
- "created": 1509335944,
- "updated": 1509335944,
- "recoveryLevel": "Purgeable"
- }
- }, {
- "contentType": "testSecretKey",
- "id": "https://kvvaultapilivetest.vault.azure.net/secrets/mySecret/b936ececbc674f3bb1367ae50d28ada0",
- "attributes": {
- "enabled": true,
- "created": 1509335932,
- "updated": 1509335934,
- "recoveryLevel": "Purgeable"
- },
- "tags": {
- "purpose": "testing"
- }
- }],
- "nextLink": null
-}
diff --git a/azurecompute-arm/src/test/resources/vaultimportablecert.txt b/azurecompute-arm/src/test/resources/vaultimportablecert.txt
deleted file mode 100644
index f364c85..0000000
--- a/azurecompute-arm/src/test/resources/vaultimportablecert.txt
+++ /dev/null
@@ -1,58 +0,0 @@
------BEGIN PRIVATE KEY-----
-MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCipTxpnYqipaEm
-1K4vYL6NpcktMdmsUqXk34CMSOEJ6oavMDJIofkrjvPtq8yFHd0vZ2KlcMOssvqh
-4iS14twylWDP44CZxfj5VKF8bpQ9WmzfJF/kwirh3gH00iIzOlkoIphqlt4aAem2
-B7GlBWgCIORWG4OfyKWxDJw9so1ODP5x1W8UcD6hxmHWH0qhg3h2Iw2/BnQP/jdC
-QxKDFX5U0Cqw86vUdJcDoPpCAnptQ/pMMPWo8k7v+0HRPKDoQM7qhSFZAsmcKZK7
-Oe+p4N+Jj9OL6RnAbPGIijg8nbRZdqeZWm16+ZWtC1aSyS+q1JDNxIVjoUNLPnwh
-rX65ZhUT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WNhdGUwHQYD
-VR0OBBYEFNPsyKBhnCjL7pVBLRYK3jaoZ8PfMHIGA1UdIwRrMGmAFAf9rGqvLeJh
-eBNJOHBKTG3Oz32PoU2kSzBJMQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZv
-cm5pYTEPMA0GA1UECgwGRm9vYmFyMRQwEgYDVQQDDAtGb29iYXIgUm9vdIICQkIw
-DgYDVR0PAQH/BAQDAgWgMBMGA1UdJQQMMAoGCCsGAQUFBwMBMA0GCSqGSIb3DQEB
-CwUAA4ICAQA4sFKv4JDZ0+CVjcHL9bkTpk5I2L45xXk3d7GrhBpGveyy8vlb/g7P
-0qyAVo0UnB+eRTtwk6GTsJdzz4FBem+FDq8ZO/N51Rn4ZJQbDg24eGErK4rpbOo5
-OQgKKhTKjjBYwsAsIOkJ1TKQDQ3++Kqw3cWh/vlCWoxGPSMOeU/Iro34IWzSeERE
-MamYo5kIYq2ERCcVSoTcYB87cTYMU+ORyQSEx/OncDuAKm45ub92By5NpeFVMk+8
-ibifgzbNJHVnaZUVg8ScdM1A4Db6WAL0SUsYIawrnQ+TENs+6Ekls+wu8G5FAmbt
-OEV0WOafGvdcnELn5IPXlkvLbiRx5EChG+nF3XrLgn3dBQwP2cGrI/IPRm1XfaaB
-AkMSkf6St5TX3C40g1CGcNSVoKBYBB2Di+hPXwTHImGggR1JF34ljHCokMoPxmr7
-lP9pam0dhP/SSpIwxfsvDJylBgUEqTr3tsVDIDfMtJjudK7A7H1HMoqEiqlzRvJI
-EZ1koOxANFcQ1f9am2PPUNFvfK9IbLQlV8d4k1w6xBAeOVke79lJI9pTTCSVb+PT
-DniEL79JXjmjQUoKE4zo1u41d+wLu3dEGM27GI7BdLYt6bRsolZvrbey7Nn4c0t4
-ug4B4GTd1SLLVJns/IRLBrNr1anBJ7u9WFruBUEWwtdxAwSoXdtIIQ==
------END CERTIFICATE-----
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/vaultimportcertificate.json b/azurecompute-arm/src/test/resources/vaultimportcertificate.json
deleted file mode 100644
index d431070..0000000
--- a/azurecompute-arm/src/test/resources/vaultimportcertificate.json
+++ /dev/null
@@ -1,52 +0,0 @@
-{
- "id": "https://kvvaultapilivetest.vault.azure.net/certificates/myImportableCertificate/f69168f2963e4ac7b68622b2bb2f80d3",
- "kid": "https://kvvaultapilivetest.vault.azure.net/keys/myImportableCertificate/f69168f2963e4ac7b68622b2bb2f80d3",
- "sid": "https://kvvaultapilivetest.vault.azure.net/secrets/myImportableCertificate/f69168f2963e4ac7b68622b2bb2f80d3",
- "x5t": "-qEnW6P9TdfOOXzbNQNS5ZKveRo",
- "cer": "MIIFNDCCAxygAwIBAgICQ0MwDQYJKoZIhvcNAQELBQAwVjELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExDzANBgNVBAoMBkZvb2JhcjEhMB8GA1UEAwwYRm9vYmFyIEludGVybWVkaWF0ZSBDQSAxMB4XDTE3MTAyODIyNTIxNFoXDTE4MTEwNzIyNTIxNFowUTELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExDzANBgNVBAoMBkZvb2JhcjEcMBoGA1UEAwwTdGVzdHNpdGUuZm9vYmFyLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKKlPGmdiqKloSbUri9gvo2lyS0x2axSpeTfgIxI4Qnqhq8wMkih+SuO8+2rzIUd3S9nYqVww6yy+qHiJLXi3DKVYM/jgJnF+PlUoXxulD1abN8kX+TCKuHeAfTSIjM6WSgimGqW3hoB6bYHsaUFaAIg5FYbg5/IpbEMnD2yjU4M/nHVbxRwPqHGYdYfSqGDeHYjDb8GdA/+N0JDEoMVflTQKrDzq9R0lwOg+kICem1D+kww9ajyTu/7QdE8oOhAzuqFIVkCyZwpkrs576ng34mP04vpGcBs8YiKODydtFl2p5labXr5la0LVpLJL6rUkM3EhWOhQ0s+fCGtfrlmFRMCAwEAAaOCAQ8wggELMAkGA1UdEwQCM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attributes": {
- "enabled": true,
- "nbf": 1509231134,
- "exp": 1541631134,
- "created": 1509346469,
- "updated": 1509346469,
- "recoveryLevel": "Purgeable"
- },
- "policy": {
- "id": "https://kvvaultapilivetest.vault.azure.net/certificates/myImportableCertificate/policy",
- "key_props": {
- "exportable": true,
- "kty": "RSA",
- "key_size": 2048,
- "reuse_key": false
- },
- "secret_props": {
- "contentType": "application/x-pem-file"
- },
- "x509_props": {
- "subject": "CN=testsite.foobar.com, O=Foobar, S=California, C=US",
- "ekus": ["1.3.6.1.5.5.7.3.1"],
- "key_usage": ["digitalSignature", "keyEncipherment"],
- "validity_months": 13,
- "basic_constraints": {
- "ca": false
- }
- },
- "lifetime_actions": [{
- "trigger": {
- "lifetime_percentage": 80
- },
- "action": {
- "action_type": "EmailContacts"
- }
- }],
- "issuer": {
- "name": "Unknown"
- },
- "attributes": {
- "enabled": true,
- "created": 1509346469,
- "updated": 1509346469
- }
- }
-}
diff --git a/azurecompute-arm/src/test/resources/vaultimportcertificaterequestbody.json b/azurecompute-arm/src/test/resources/vaultimportcertificaterequestbody.json
deleted file mode 100644
index 2ca39cb..0000000
--- a/azurecompute-arm/src/test/resources/vaultimportcertificaterequestbody.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "policy": {
- "lifetime_actions": [],
- "secret_props": {
- "contentType": "application/x-pem-file"
- }
- },
- "value": "-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCipTxpnYqipaEm\n1K4vYL6NpcktMdmsUqXk34CMSOEJ6oavMDJIofkrjvPtq8yFHd0vZ2KlcMOssvqh\n4iS14twylWDP44CZxfj5VKF8bpQ9WmzfJF/kwirh3gH00iIzOlkoIphqlt4aAem2\nB7GlBWgCIORWG4OfyKWxDJw9so1ODP5x1W8UcD6hxmHWH0qhg3h2Iw2/BnQP/jdC\nQxKDFX5U0Cqw86vUdJcDoPpCAnptQ/pMMPWo8k7v+0HRPKDoQM7qhS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9WFruBUEWwtdxAwSoXdtIIQ\u003d\u003d\n-----END CERTIFICATE-----"
-}
diff --git a/azurecompute-arm/src/test/resources/vaultimportkeyrequestbody.json b/azurecompute-arm/src/test/resources/vaultimportkeyrequestbody.json
deleted file mode 100644
index fe9312e..0000000
--- a/azurecompute-arm/src/test/resources/vaultimportkeyrequestbody.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "Hsm": false,
- "attributes": {
- "enabled": true
- },
- "key": {
- "d": "DjU54mYvHpICXHjc5-JiFqiH8NkUgOG8LL4kwt3DeBp9bP0-5hSJH8vmzwJkeGG9L79EWG4b_bfxgYdeNX7cFFagmWPRFrlxbd64VRYFawZHRJt-2cbzMVI6DL8EK4bu5Ux5qTiV44Jw19hoD9nDzCTfPzSTSGrKD3iLPdnREYaIGDVxcjBv3Tx6rrv3Z2lhHHKhEHb0RRjATcjAVKV9NZhMajJ4l9pqJ3A4IQrCBl95ux6Xm1oXP0i6aR78cjchsCpcMXdP3WMsvHgTlsZT0RZLFHrvkiNHlPiil4G2_eHkwvT__CrcbO6SmI_zCtMmypuHJqcr-Xb7GPJoa64WoQ",
- "dp": "DB9nGuHplY_7Xv5a5UCs5YgxkWPtJFfbIZ1Zr-XHCCY09JIWReOGQG226OhjwixKtOK_OqmAKtMKM9OmKviJRHNbDhbTxumN3u7cL8dftjXpSryiEQlPmWyW94MneI2WNIrvh4wruQuDt8EztgOiDFxwcnUgey8iend7WmZnE7E",
- "dq": "O-bSTUQ4N_UuQezgkF3TDrnBraO67leDGwRbfiE_U0ghQvqh5DA0QSPVzlWDZc9KUitvj8vxsR9o1PW9GS0an17GJEYuetLnkShKK3NWOhBBX6d1yP9rVdH6JhgIJEy_g0Suz7TAFiFc8i7JF8u4QJ05C8bZAMhOLotqftQeVOM",
- "e": "AQAB",
- "key_ops": ["encrypt"],
- "kty": "RSA",
- "n": "33TqqLR3eeUmDtHS89qF3p4MP7Wfqt2Zjj3lZjLjjCGDvwr9cJNlNDiuKboODgUiT4ZdPWbOiMAfDcDzlOxA04DDnEFGAf-kDQiNSe2ZtqC7bnIc8-KSG_qOGQIVaay4Ucr6ovDkykO5Hxn7OU7sJp9TP9H0JH8zMQA6YzijYH9LsupTerrY3U6zyihVEDXXOv08vBHk50BMFJbE9iwFwnxCsU5-UZUZYw87Uu0n4LPFS9BT8tUIvAfnRXIEWCha3KbFWmdZQZlyrFw0buUEf0YN3_Q0auBkdbDR_ES2PbgKTJdkjc_rEeM0TxvOUf7HuUNOhrtAVEN1D5uuxE1WSw",
- "p": "8K33pX90XX6PZGiv26wZm7tfvqlqWFT03nUMvOAytqdxhO2HysiPn4W58OaJd1tY4372Qpiv6enmUeI4MidCie-s-d0_B6A0xfhU5EeeaDN0xDOOl8yN-kaaVj9b4HDR3c91OAwKpDJQIeJVZtxoijxl-SRx3u7Vs_7meeSpOfE",
- "q": "7a5KnUs1pTo72A-JquJvIz4Eu794Yh3ftTk_Et-83aE_FVc6Nk-EhfnwYSNpVmM6UKdrAoy5gsCvZPxrq-eR9pEwU8M5UOlki03vWY_nqDBpJSIqwPvGHUB16zvggsPQUyQBfnN3N8XlDi12n88ltvWwEhn1LQOwMUALEfka9_s",
- "qi": "InfGmkb2jNkPGuNiZ-mU0-ZrOgLza_fLL9ErZ35jUPhGFzdGxJNobklvsNoTd-E2GAU41YkJh24bncMLvJVYxHHA5iF7FBWx1SvpEyKVhhnIcuXGD7N5PbNZzEdmr9C6I7cPVkWO-sUV7zfFukexIcANmsd_oBBGKRoYzP5Tti4"
- }
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/vaultkeybackup.txt b/azurecompute-arm/src/test/resources/vaultkeybackup.txt
deleted file mode 100644
index 7c68c54..0000000
--- a/azurecompute-arm/src/test/resources/vaultkeybackup.txt
+++ /dev/null
@@ -1 +0,0 @@
-JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUppTTJJd1pqZ3dZeTB5Wkdaa0xUUm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RVpIUF9PaGlGWDlzWldTSjBLS1RfVFI4RzFTbWpFcTZUbXhKa1E1RHRnV014OWNwTjJSRlNwcWFyU1V0STJtUWNIM191U0tERjNuY1lhWDl0Vk55ZGpEOFloUkdwWHVQdk4wWHZyejBKTklHLVBWeVlqUUJPdXNvOF9GeV9yX0ctSmVhdVNxMFRpVUhEUVM0Yl96ZDlfQWxMM2wySzZJdzAyQkVhWEhwb2Jpd3pFeEdFeU4weWFVMDRVNjliUEl5TGxIcy1sVVpnMTl5Z3hOR2pzdkxDaktqQ2gzdlhxdDRsMnlZZmFnY0RHSzdWcXpUYzhDWG5wZ1p1bnR3LnRTWm9BN2tNdGItRVJtRWs3d2MyT2c
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/vaultkeydecrypt.json b/azurecompute-arm/src/test/resources/vaultkeydecrypt.json
deleted file mode 100644
index 279b0d5..0000000
--- a/azurecompute-arm/src/test/resources/vaultkeydecrypt.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "kid": "https://kvvaultapilivetest.vault.azure.net/keys/myKey/003a927b194f4f6a9070ebdbdce57c59",
- "value": "R29sZCUyNTIxJTJCR29sZCUyNTIxJTJCR29sZCUyQmZyb20lMkJ0aGUlMkJBbWVyaWNhbiUyQlJpdmVyJTI1MjE"
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/vaultkeydecryptrequestbody.json b/azurecompute-arm/src/test/resources/vaultkeydecryptrequestbody.json
deleted file mode 100644
index 9ac39e3..0000000
--- a/azurecompute-arm/src/test/resources/vaultkeydecryptrequestbody.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "alg": "RSA-OAEP",
- "value": "0_S8pyjjnGRlcbDa-Lt0jYjMXpXrf9Fat3elx-fSOg3dj6mYgEEs6kt79OMD4MFmVyOt6umeWAfdDIkNVnqb5fgyWceveh9wN-37jc5CFgG2PF3XIA6RII-HF2BkBcVa9KcAX3_di4KQE70PXgHf-dlz_RgLOJILeG50wzFeBFCLsjEEPp3itmoaiE6vfDidCRm5At8Vjka0G-N_afwkIijfQZLT0VaXvL39cIJE2QN3HJPZM8YPUlkFlYnY4GIRyRWSBpK_KYuVufzUGtDi6Sh8pUa67ppa7DHVZlixlmnVqI3Oeg6XUvMqbFFqVSrcNbRQDwVGL3cUtK-KB1PfKg"
-}
diff --git a/azurecompute-arm/src/test/resources/vaultkeyencrypt.json b/azurecompute-arm/src/test/resources/vaultkeyencrypt.json
deleted file mode 100644
index 53adb40..0000000
--- a/azurecompute-arm/src/test/resources/vaultkeyencrypt.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "kid": "https://kvvaultapilivetest.vault.azure.net/keys/myKey/003a927b194f4f6a9070ebdbdce57c59",
- "value": "0_S8pyjjnGRlcbDa-Lt0jYjMXpXrf9Fat3elx-fSOg3dj6mYgEEs6kt79OMD4MFmVyOt6umeWAfdDIkNVnqb5fgyWceveh9wN-37jc5CFgG2PF3XIA6RII-HF2BkBcVa9KcAX3_di4KQE70PXgHf-dlz_RgLOJILeG50wzFeBFCLsjEEPp3itmoaiE6vfDidCRm5At8Vjka0G-N_afwkIijfQZLT0VaXvL39cIJE2QN3HJPZM8YPUlkFlYnY4GIRyRWSBpK_KYuVufzUGtDi6Sh8pUa67ppa7DHVZlixlmnVqI3Oeg6XUvMqbFFqVSrcNbRQDwVGL3cUtK-KB1PfKg"
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/vaultkeyencryptrequestbody.json b/azurecompute-arm/src/test/resources/vaultkeyencryptrequestbody.json
deleted file mode 100644
index f246914..0000000
--- a/azurecompute-arm/src/test/resources/vaultkeyencryptrequestbody.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "alg": "RSA-OAEP",
- "value": "R29sZCUyNTIxJTJCR29sZCUyNTIxJTJCR29sZCUyQmZyb20lMkJ0aGUlMkJBbWVyaWNhbiUyQlJpdmVyJTI1MjE"
-}
diff --git a/azurecompute-arm/src/test/resources/vaultkeysign.json b/azurecompute-arm/src/test/resources/vaultkeysign.json
deleted file mode 100644
index b64e05a..0000000
--- a/azurecompute-arm/src/test/resources/vaultkeysign.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "kid": "https://kvvaultapilivetest.vault.azure.net/keys/myKey/003a927b194f4f6a9070ebdbdce57c59",
- "value": "uO0r4P1cB-fKsDZ8cj5ahiNw8Tdsudt5zLCeEKOt29LAlPDpeGx9Q1SOFNaR7JlRYVelxsohdzvydwX8ao6MLnqlpdEj0Xt5Aadp-kN84AXW238gabS1AUyiWILCmdsBFeRU4wTRSxz2qGS_0ztHkaNln32P_9GJC72ZRlgZoVA4C_fowZolUoCWGj4V7fAzcSoiNYipWP0HkFe3xmuz-cSQg3CCAs-MclHHfMeSagLJZZQ9bpl5LIr-Ik89bNtqEqyP7Jb_fCgHajAx2lUFcRZhSIKuCfrLPMl6wzejQ2rQXX-ixEkDa73dYaPIrVW4IL3iC0UfxnfxYffHJ7QCRw"
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/vaultkeysignrequestbody.json b/azurecompute-arm/src/test/resources/vaultkeysignrequestbody.json
deleted file mode 100644
index ea66595..0000000
--- a/azurecompute-arm/src/test/resources/vaultkeysignrequestbody.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "alg": "RS256",
- "value": "FvabKT6qGwpml59iHUJ72DZ4XyJcJ8bgpgFA4_8JFmM"
-}
diff --git a/azurecompute-arm/src/test/resources/vaultkeyunwrap.json b/azurecompute-arm/src/test/resources/vaultkeyunwrap.json
deleted file mode 100644
index 03b6740..0000000
--- a/azurecompute-arm/src/test/resources/vaultkeyunwrap.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "kid": "https://kvvaultapilivetest.vault.azure.net/keys/myKey/003a927b194f4f6a9070ebdbdce57c59",
- "value": "YxzoHR65aFwD2_IOiZ5rD08jMSALA1y7b_yYW0G3hyI"
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/vaultkeyunwraprequestbody.json b/azurecompute-arm/src/test/resources/vaultkeyunwraprequestbody.json
deleted file mode 100644
index b3f4efc..0000000
--- a/azurecompute-arm/src/test/resources/vaultkeyunwraprequestbody.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "alg": "RSA-OAEP",
- "value": "1jcTlu3KJNDBYydhaH9POWOo0tAPGkpsZVizCkHpC3g_9Kg91Q3HKK-rfZynn5W5nVPM-SVFHA3JTankcXX8gx8GycwUh4pMoyil_DV35m2QjyuiTln83OJXw-nMvRXyKdVfF7nyRcs256kW7gthAOsYUVBrfFS7DFFxsXqLNREsA8j85IqIXIm8pAB3C9uvl1I7SQhLvrwZZXXqjeCWMfseVJwWgsQFyyqH2P0f3-xnngV7cvik2k3Elrk3G_2CuJCozIIrANg9zG9Z8DrwSNNm9YooxWkSu0ZeDLOJ0bMdhcPGGm5OvKz3oZqX-39yv5klNlCRbr0q7gqmI0x25w"
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/vaultkeyverify.json b/azurecompute-arm/src/test/resources/vaultkeyverify.json
deleted file mode 100644
index ceca009..0000000
--- a/azurecompute-arm/src/test/resources/vaultkeyverify.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "value": true
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/vaultkeyverifyrequestbody.json b/azurecompute-arm/src/test/resources/vaultkeyverifyrequestbody.json
deleted file mode 100644
index a34a45d..0000000
--- a/azurecompute-arm/src/test/resources/vaultkeyverifyrequestbody.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "alg": "RS256",
- "digest": "FvabKT6qGwpml59iHUJ72DZ4XyJcJ8bgpgFA4_8JFmM",
- "value": "FvabKT6qGwpml59iHUJ72DZ4XyJcJ8bgpgFA4_8JFmM","value":"uO0r4P1cB-fKsDZ8cj5ahiNw8Tdsudt5zLCeEKOt29LAlPDpeGx9Q1SOFNaR7JlRYVelxsohdzvydwX8ao6MLnqlpdEj0Xt5Aadp-kN84AXW238gabS1AUyiWILCmdsBFeRU4wTRSxz2qGS_0ztHkaNln32P_9GJC72ZRlgZoVA4C_fowZolUoCWGj4V7fAzcSoiNYipWP0HkFe3xmuz-cSQg3CCAs-MclHHfMeSagLJZZQ9bpl5LIr-Ik89bNtqEqyP7Jb_fCgHajAx2lUFcRZhSIKuCfrLPMl6wzejQ2rQXX-ixEkDa73dYaPIrVW4IL3iC0UfxnfxYffHJ7QCRw"
-}
diff --git a/azurecompute-arm/src/test/resources/vaultkeywrap.json b/azurecompute-arm/src/test/resources/vaultkeywrap.json
deleted file mode 100644
index bb30400..0000000
--- a/azurecompute-arm/src/test/resources/vaultkeywrap.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "kid": "https://kvvaultapilivetest.vault.azure.net/keys/myKey/003a927b194f4f6a9070ebdbdce57c59",
- "value": "1jcTlu3KJNDBYydhaH9POWOo0tAPGkpsZVizCkHpC3g_9Kg91Q3HKK-rfZynn5W5nVPM-SVFHA3JTankcXX8gx8GycwUh4pMoyil_DV35m2QjyuiTln83OJXw-nMvRXyKdVfF7nyRcs256kW7gthAOsYUVBrfFS7DFFxsXqLNREsA8j85IqIXIm8pAB3C9uvl1I7SQhLvrwZZXXqjeCWMfseVJwWgsQFyyqH2P0f3-xnngV7cvik2k3Elrk3G_2CuJCozIIrANg9zG9Z8DrwSNNm9YooxWkSu0ZeDLOJ0bMdhcPGGm5OvKz3oZqX-39yv5klNlCRbr0q7gqmI0x25w"
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/vaultkeywraprequestbody.json b/azurecompute-arm/src/test/resources/vaultkeywraprequestbody.json
deleted file mode 100644
index 634f37b..0000000
--- a/azurecompute-arm/src/test/resources/vaultkeywraprequestbody.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "alg": "RSA-OAEP",
- "value": "YxzoHR65aFwD2_IOiZ5rD08jMSALA1y7b_yYW0G3hyI"
-}
diff --git a/azurecompute-arm/src/test/resources/vaultlist.json b/azurecompute-arm/src/test/resources/vaultlist.json
deleted file mode 100644
index d8c1421..0000000
--- a/azurecompute-arm/src/test/resources/vaultlist.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "value": [{
- "id": "/subscriptions/3fee811e-11bf-4b5c-9c62-a2f28b517724/resourceGroups/rg-vaultapilivetest-jims/providers/Microsoft.KeyVault/vaults/kvvaultapilivetest",
- "name": "kvvaultapilivetest",
- "type": "Microsoft.KeyVault/vaults",
- "location": "westeurope",
- "tags": {},
- "properties": {
- "sku": {
- "family": "A",
- "name": "standard"
- },
- "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
- "accessPolicies": [{
- "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
- "objectId": "5a7f4cb9-ce9d-4b31-87ce-f61083c4b0ea",
- "permissions": {
- "certificates": ["Get", "List", "Update", "Create", "Import", "Delete", "ManageContacts", "ManageIssuers", "GetIssuers", "ListIssuers", "SetIssuers", "DeleteIssuers", "Purge", "Recover"],
- "keys": ["Get", "List", "Update", "Create", "Import", "Delete", "Recover", "Backup", "Restore", "Purge"],
- "secrets": ["Get", "List", "Set", "Delete", "Recover", "Backup", "Restore", "Purge"],
- "storage": []
- }
- }],
- "enabledForDeployment": false,
- "vaultUri": "https://kvvaultapilivetest.vault.azure.net/"
- }
- }],
- "nextLink": "https://management.azure.com/subscriptions/3fee811e-11bf-4b5c-9c62-a2f28b517724/resourcegroups/rg-vaultapilivetest-jims/providers/Microsoft.KeyVault/vaults?api-version=2016-10-01&$skiptoken=a3Z2YXVsdGFwaWxpdmV0ZXN0"
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/vaultlistcertificateissuers.json b/azurecompute-arm/src/test/resources/vaultlistcertificateissuers.json
deleted file mode 100644
index 0342427..0000000
--- a/azurecompute-arm/src/test/resources/vaultlistcertificateissuers.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "value": [{
- "id": "https://kvvaultapilivetest.vault.azure.net/certificates/issuers/globalsign01",
- "provider": "GlobalSign"
- }],
- "nextLink": null
-}
diff --git a/azurecompute-arm/src/test/resources/vaultlistcertificates.json b/azurecompute-arm/src/test/resources/vaultlistcertificates.json
deleted file mode 100644
index 99e714d..0000000
--- a/azurecompute-arm/src/test/resources/vaultlistcertificates.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "value": [{
- "id": "https://kvvaultapilivetest.vault.azure.net/certificates/myCertificate",
- "x5t": "K7HXO6YIK6xwCX8W1InUKsJV9Rk",
- "attributes": {
- "enabled": true,
- "nbf": 1509345867,
- "exp": 1540882467,
- "created": 1509346467,
- "updated": 1509346472
- },
- "tags": {
- "selfsigned": "true"
- }
- }, {
- "id": "https://kvvaultapilivetest.vault.azure.net/certificates/myImportableCertificate",
- "x5t": "-qEnW6P9TdfOOXzbNQNS5ZKveRo",
- "attributes": {
- "enabled": true,
- "nbf": 1509231134,
- "exp": 1541631134,
- "created": 1509346469,
- "updated": 1509346469
- }
- }],
- "nextLink": null
-}
diff --git a/azurecompute-arm/src/test/resources/vaultlistcertificateversions.json b/azurecompute-arm/src/test/resources/vaultlistcertificateversions.json
deleted file mode 100644
index 0480f2e..0000000
--- a/azurecompute-arm/src/test/resources/vaultlistcertificateversions.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "value": [{
- "id": "https://kvvaultapilivetest.vault.azure.net/certificates/myCertificate/b73ba4610dc24dca946f76933f6590dd",
- "x5t": "K7HXO6YIK6xwCX8W1InUKsJV9Rk",
- "attributes": {
- "enabled": true,
- "nbf": 1509345867,
- "exp": 1540882467,
- "created": 1509346467,
- "updated": 1509346472
- },
- "tags": {
- "selfsigned": "true"
- }
- }],
- "nextLink": null
-}
diff --git a/azurecompute-arm/src/test/resources/vaultlistdeleted.json b/azurecompute-arm/src/test/resources/vaultlistdeleted.json
deleted file mode 100644
index 332785a..0000000
--- a/azurecompute-arm/src/test/resources/vaultlistdeleted.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "value": [{
- "id": "/subscriptions/3fee811e-11bf-4b5c-9c62-a2f28b517724/providers/Microsoft.KeyVault/locations/westeurope/deletedVaults/kvvaultapilivetest",
- "name": "kvvaultapilivetest",
- "type": "Microsoft.KeyVault/deletedVaults",
- "properties": {
- "vaultId": "/subscriptions/3fee811e-11bf-4b5c-9c62-a2f28b517724/resourceGroups/rg-vaultapilivetest-jims/providers/Microsoft.KeyVault/vaults/kvvaultapilivetest",
- "location": "westeurope",
- "tags": {},
- "deletionDate": "2017-10-29T22:06:02Z",
- "scheduledPurgeDate": "2018-01-27T22:06:02Z"
- }
- }],
- "nextLink": "https://management.azure.com/subscriptions/3fee811e-11bf-4b5c-9c62-a2f28b517724/providers/Microsoft.KeyVault/deletedVaults?api-version=2016-10-01&%24skiptoken=HY1db4IwGEb%2fS7PsrpQyUCQxiwts0QkMbDHxjo8Xh%2bUrtLgN438f8fJJzjnPDbXwq%2fZVKyRybujoHZjH4%2fDLQw76VqqXDiFN2qZnaKBVWjqNA2h51xA5ZjIfql5VXSvJSwlgUwqY0qzEZmbleJUvDJwapWFnFl0uDZP0Q3etChgk8at86GRXKu0T%2fpJ0rBUpoAYFxWPI17Sv8HUm5%2fja0OkCUx3r9PlJivmxE9CuuUiOcbJjMY%2ffmZfwA1%2bFe17z0t1Sn50t%2fyLM4LKZgknogZubPkvsQOzeQrdwQ49PMRNT4J3cSN9akfCNaDp9%2bOzh%2fERsg%2b73fw%3d%3d"
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/vaultlistdeletedcertificates.json b/azurecompute-arm/src/test/resources/vaultlistdeletedcertificates.json
deleted file mode 100644
index 4ac53b0..0000000
--- a/azurecompute-arm/src/test/resources/vaultlistdeletedcertificates.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "value": [{
- "recoveryId": "https://kvvaultapilivetest.vault.azure.net/deletedcertificates/myRecoverableCertificate",
- "deletedDate": 1509346545,
- "scheduledPurgeDate": 1517122545,
- "id": "https://kvvaultapilivetest.vault.azure.net/certificates/myRecoverableCertificate",
- "x5t": "-qEnW6P9TdfOOXzbNQNS5ZKveRo",
- "attributes": {
- "enabled": true,
- "nbf": 1509231134,
- "exp": 1541631134,
- "created": 1509346510,
- "updated": 1509346510,
- "recoveryLevel": "Recoverable+Purgeable"
- }
- }],
- "nextLink": null
-}
diff --git a/azurecompute-arm/src/test/resources/vaultlistdeletedkeys.json b/azurecompute-arm/src/test/resources/vaultlistdeletedkeys.json
deleted file mode 100644
index 08dde30..0000000
--- a/azurecompute-arm/src/test/resources/vaultlistdeletedkeys.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "value": [{
- "recoveryId": "https://kvvaultapilivetest.vault.azure.net/deletedkeys/myRecoverableKey",
- "deletedDate": 1509335960,
- "scheduledPurgeDate": 1517111960,
- "kid": "https://kvvaultapilivetest.vault.azure.net/keys/myRecoverableKey",
- "attributes": {
- "enabled": true,
- "created": 1509335950,
- "updated": 1509335950,
- "recoveryLevel": "Recoverable+Purgeable"
- }
- }],
- "nextLink": null
-}
diff --git a/azurecompute-arm/src/test/resources/vaultlistdeletedsecrets.json b/azurecompute-arm/src/test/resources/vaultlistdeletedsecrets.json
deleted file mode 100644
index 1719798..0000000
--- a/azurecompute-arm/src/test/resources/vaultlistdeletedsecrets.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "value": [{
- "recoveryId": "https://kvvaultapilivetest.vault.azure.net/deletedsecrets/myRecoverableSecret",
- "deletedDate": 1509335980,
- "scheduledPurgeDate": 1517111980,
- "contentType": "aNewSecretKey",
- "id": "https://kvvaultapilivetest.vault.azure.net/secrets/myRecoverableSecret",
- "attributes": {
- "enabled": true,
- "created": 1509335958,
- "updated": 1509335958,
- "recoveryLevel": "Recoverable+Purgeable"
- }
- }],
- "nextLink": null
-}
diff --git a/azurecompute-arm/src/test/resources/vaultlistkeys.json b/azurecompute-arm/src/test/resources/vaultlistkeys.json
deleted file mode 100644
index 313dae2..0000000
--- a/azurecompute-arm/src/test/resources/vaultlistkeys.json
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- "value": [{
- "kid": "https://kvvaultapilivetest.vault.azure.net/keys/myCertificate",
- "attributes": {
- "enabled": true,
- "nbf": 1509313915,
- "exp": 1540850515,
- "created": 1509314515,
- "updated": 1509314515,
- "recoveryLevel": "Purgeable"
- },
- "managed": true
- }, {
- "kid": "https://kvvaultapilivetest.vault.azure.net/keys/myImportableCertificate",
- "attributes": {
- "enabled": true,
- "nbf": 1509231134,
- "exp": 1541631134,
- "created": 1509314521,
- "updated": 1509314521,
- "recoveryLevel": "Purgeable"
- },
- "managed": true
- }, {
- "kid": "https://kvvaultapilivetest.vault.azure.net/keys/myImportKey",
- "attributes": {
- "enabled": true,
- "created": 1509314522,
- "updated": 1509314522,
- "recoveryLevel": "Purgeable"
- }
- }, {
- "kid": "https://kvvaultapilivetest.vault.azure.net/keys/myKey",
- "attributes": {
- "enabled": true,
- "created": 1509314506,
- "updated": 1509314506,
- "recoveryLevel": "Purgeable"
- }
- }],
- "nextLink": null
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/vaultlistsecrets.json b/azurecompute-arm/src/test/resources/vaultlistsecrets.json
deleted file mode 100644
index 73063d1..0000000
--- a/azurecompute-arm/src/test/resources/vaultlistsecrets.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "value": [{
- "contentType": "application/x-pkcs12",
- "id": "https://kvvaultapilivetest.vault.azure.net/secrets/myCertificate",
- "managed": true,
- "attributes": {
- "enabled": true,
- "nbf": 1509335314,
- "exp": 1540871914,
- "created": 1509335914,
- "updated": 1509335920,
- "recoveryLevel": "Purgeable"
- },
- "tags": {
- "selfsigned": "true"
- }
- }, {
- "contentType": "application/x-pem-file",
- "id": "https://kvvaultapilivetest.vault.azure.net/secrets/myImportableCertificate",
- "managed": true,
- "attributes": {
- "enabled": true,
- "nbf": 1509231134,
- "exp": 1541631134,
- "created": 1509335917,
- "updated": 1509335917,
- "recoveryLevel": "Purgeable"
- }
- }, {
- "contentType": "testSecretKey",
- "id": "https://kvvaultapilivetest.vault.azure.net/secrets/mySecret",
- "attributes": {
- "enabled": true,
- "created": 1509335932,
- "updated": 1509335932,
- "recoveryLevel": "Purgeable"
- }
- }],
- "nextLink": null
-}
diff --git a/azurecompute-arm/src/test/resources/vaultmergecertificate.json b/azurecompute-arm/src/test/resources/vaultmergecertificate.json
deleted file mode 100644
index 4511b2b..0000000
--- a/azurecompute-arm/src/test/resources/vaultmergecertificate.json
+++ /dev/null
@@ -1,62 +0,0 @@
-{
- "id": "https://jimskv1.vault.azure.net/certificates/jmskv1cert6/d8f385d3741b4b1cba9c002299e892dd",
- "kid": "https://jimskv1.vault.azure.net/keys/jmskv1cert6/d8f385d3741b4b1cba9c002299e892dd",
- "sid": "https://jimskv1.vault.azure.net/secrets/jmskv1cert6/d8f385d3741b4b1cba9c002299e892dd",
- "x5t": "SQix1jyV9XeF2Q8MCecpUr0etk4",
- "cer": "MIIEQTCCAikCAhABMA0GCSqGSIb3DQEBCwUAMF4xCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRYwFAYDVQQKDA1BQ01FIFRlc3QgTHRkMSIwIAYDVQQDDBlBQ01FIFRlc3QgSW50ZXJtZWRpYXRlIENBMB4XDTE3MTEyODIzMDkxMVoXDTE4MTIwODIzMDkxMVowbjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRIwEAYDVQQHEwlBbGxlZ2hhbnkxDTALBgNVBAoTBEFDTUUxFDASBgNVBAsTC0VuZ2luZWVyaW5nMRkwFwYDVQQDExBBQ01FIEZvb2JhciBDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwE0Gu/rJlbkqL0ynSbkCdrM+XP4dis/QNPz819ybXXpIX8HfkmAxrpLmfWh36KlflFYgpuV/J5lnJKlRmPWWOFjizAhq0dBijJUdLf6+QuImDjijd/nkO5SeQApZ4D50imTJL81vs2vwAfcCLwdlf7MNrMIfBsyjRSJh/Phjqib6kcYWcz6I6yTfkcsXcUB1JgR8KnQdVy0gYDu1MacHu2VYuS35HpPcQyXRqR1Ky9qh16+OhheRJw03ghEiPMcKbWS5NRgw/l/itoST2Qd6BzJTHUkJaXHNSO9fNF/fAccqECp0ZfaCSrfZs47EcjCv+N7bvrqfFl4BhB77tb7ZAQIDAQABMA0GCSqGSIb3DQEBCwUAA4ICAQCbpjL5XGC3T6gWU8sxCbS0VBmgamyvSHA8jLkWUXQfPirGFwgdGN7394mYViVU0qe6ZqmnhlhqZ1h6VbkBMVwzp3KlRhuoz/fXlW+TFvEC8Q3F+7oUdHn8w3EMyjKA5EbLzRIYXBizdbfEn8eJynjyWEdOaJpMmy9au/oFSqpmZDcxWW2SKq4j+Pqjhr+Ig4BmTVvwR6iEERPYQI4pv0OxRa7xA6Hb8NF02TyDzV7k02kN9PL/QO2dh9f3U0YY5XlV1HQzQ/BmavudPT1MiuH0CVSlCHE/JetXdJdWZA4HRiwXJn+5K8MgE5i1hjjXN/dLuaY8vItJzyrgxGRtRZoJA8t7B3QJjDECmey2m0K0qjYu7l1jAVFBWaqDdJQLmnKxViuz0MF4uFqgveW6CZEMcdqwZQ2cmZPlmcjneT0veBBh5qCdFNFM9pYDn0wqt5ruK+vqHkqJdMToBPNaBfGX10ADlB8rKW24eve+2c0iVmorJuTPdOqm2L9NKGpf2scvZZU4n/khkGKihrSOLygeLZ6SQc74cRL35FmzJqqKKpZtG9/a91dkJDz2XUiTO5TialaOU9+A1+Xrzj8LGG9JnB0KizF5dOd5mbZTROr3VCexRxyTrtZLpeJK+lYQLkDQ5ixWnd2sikym4hy3+NZ1g6nE+GQpqSALB4YnsFgUdg==",
- "attributes": {
- "enabled": true,
- "nbf": 1511910551,
- "exp": 1544310551,
- "created": 1511911458,
- "updated": 1511911458,
- "recoveryLevel": "Purgeable"
- },
- "policy": {
- "id": "https://jimskv1.vault.azure.net/certificates/jmskv1cert6/policy",
- "key_props": {
- "exportable": true,
- "kty": "RSA",
- "key_size": 2048,
- "reuse_key": true
- },
- "secret_props": {
- "contentType": "application/x-pem-file"
- },
- "x509_props": {
- "subject": "C=US, ST=CA, L=Alleghany, O=ACME, OU=Engineering, CN=ACME Foobar Cert",
- "sans": {
- "emails": [],
- "dns_names": [],
- "upns": []
- },
- "ekus": [
- "1.3.6.1.5.5.7.3.1"
- ],
- "key_usage": [
- "cRLSign",
- "dataEncipherment",
- "digitalSignature",
- "keyAgreement",
- "keyCertSign",
- "keyEncipherment"
- ],
- "validity_months": 24,
- "basic_constraints": {
- "ca": false
- }
- },
- "lifetime_actions": [],
- "issuer": {
- "name": "Unknown"
- },
- "attributes": {
- "enabled": true,
- "created": 1511910301,
- "updated": 1511910301
- }
- },
- "pending": {
- "id": "https://jimskv1.vault.azure.net/certificates/jmskv1cert6/pending"
- }
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/vaultmergecertificaterequestbody.json b/azurecompute-arm/src/test/resources/vaultmergecertificaterequestbody.json
deleted file mode 100644
index 045b0c3..0000000
--- a/azurecompute-arm/src/test/resources/vaultmergecertificaterequestbody.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "attributes": {
- "enabled": true
- },
- "x5c": [
- "MIIFljCCA36gAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwVjELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAoMDUFDTUUgVGVzdCBMdGQxGjAYBgNVBAMMEUFDTUUgVGVzdCBSb290IENBMB4XDTE3MTEyODIwMDA1NVoXDTI3MTEyNjIwMDA1NVowXjELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAoMDUFDTUUgVGVzdCBMdGQxIjAgBgNVBAMMGUFDTUUgVGVzdCBJbnRlcm1lZGlhdGUgQ0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDU1CRXpOEOzNxom8xwA3kYb4kmc3JX8cSuWZKoaPm8KvhsgYOkH+1z4dt2OC/FtSaWJuMZrSTJs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8eJynjyWEdOaJpMmy9au/oFSqpmZDcxWW2SKq4j+Pqjhr+Ig4BmTVvwR6iEERPYQI4pv0OxRa7xA6Hb8NF02TyDzV7k02kN9PL/QO2dh9f3U0YY5XlV1HQzQ/BmavudPT1MiuH0CVSlCHE/JetXdJdWZA4HRiwXJn+5K8MgE5i1hjjXN/dLuaY8vItJzyrgxGRtRZoJA8t7B3QJjDECmey2m0K0qjYu7l1jAVFBWaqDdJQLmnKxViuz0MF4uFqgveW6CZEMcdqwZQ2cmZPlmcjneT0veBBh5qCdFNFM9pYDn0wqt5ruK+vqHkqJdMToBPNaBfGX10ADlB8rKW24eve+2c0iVmorJuTPdOqm2L9NKGpf2scvZZU4n/khkGKihrSOLygeLZ6SQc74cRL35FmzJqqKKpZtG9/a91dkJDz2XUiTO5TialaOU9+A1+Xrzj8LGG9JnB0KizF5dOd5mbZTROr3VCexRxyTrtZLpeJK+lYQLkDQ5ixWnd2sikym4hy3+NZ1g6nE+GQpqSALB4YnsFgUdg=="
- ]
-}
diff --git a/azurecompute-arm/src/test/resources/vaultmergex5c-1.txt b/azurecompute-arm/src/test/resources/vaultmergex5c-1.txt
deleted file mode 100644
index d8ff78d..0000000
--- a/azurecompute-arm/src/test/resources/vaultmergex5c-1.txt
+++ /dev/null
@@ -1 +0,0 @@
-MIIFljCCA36gAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwVjELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAoMDUFDTUUgVGVzdCBMdGQxGjAYBgNVBAMMEUFDTUUgVGVzdCBSb290IENBMB4XDTE3MTEyODIwMDA1NVoXDTI3MTEyNjIwMDA1NVowXjELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAoMDUFDTUUgVGVzdCBMdGQxIjAgBgNVBAMMGUFDTUUgVGVzdCBJbnRlcm1lZGlhdGUgQ0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIK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cXZI4K6WkCl5L/wjEP5XygnfyXJ6nMTSLpxuD7dRpqyitmauavfscGpLwYMArx+5gn2jwlq4TIDWdaKi86Oz8VAg+X0C5qBcAdx6k8pFUSjeD2kvykNbEdxBtkD4dgUn5UDmqB2IfW5UiL04cDBaxijDLbsYvjOE+wiXbESxnZf9bQXdeFSemARIWmE6to0uOmdp+snetB88Nw8EQ6faL9aKGBYPI3+KDy1IdMtyU50dMj7BSogZeBHh+6B/1qqlp3VGm5/PBaoyZJLRgx7VQNYFcPjUk0iLaBK7bqJ1CFkr5YX3/Ypjty4u1BD1LxEG2u60Q6PpLgBGGxqXDH6KpNkH2Z9mdagLL+HfZDf73m+J2PD0puLzVVcvzwPRf3nJyyh7ALnG9gd5gl8ksy6uHBizAOmzO0Ize7B8/1he1dSxZQ7wnHIuZ9HSvTvVHv8ST2l7XkKGaB0+BBHR
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/vaultmergex5c-2.txt b/azurecompute-arm/src/test/resources/vaultmergex5c-2.txt
deleted file mode 100644
index c1f842d..0000000
--- a/azurecompute-arm/src/test/resources/vaultmergex5c-2.txt
+++ /dev/null
@@ -1 +0,0 @@
-MIIFkjCCA3qgAwIBAgIJANPuNc8d4n46MA0GCSqGSIb3DQEBCwUAMFYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRYwFAYDVQQKDA1BQ01FIFRlc3QgTHRkMRowGAYDVQQDDBFBQ01FIFRlc3QgUm9vdCBDQTAeFw0xNzExMjgxOTU3MDJaFw0zNzExMjMxOTU3MDJaMFYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRYwFAYDVQQKDA1BQ01FIFRlc3QgTHRkMRowGAYDVQQDDBFBQ01FIFRlc3QgUm9vdCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAOP2me/TzHq4fGve9X2fdDXQFayCq4XZ/mijLkerAPoka3T7lNfO4FI0jvnPNbrf6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SEwt6meADvO8rcP/ZNK9T0kmDxbQzqpKZ31bt/d0iRBygGaFy2vYgybwo3iPGqPTInv2FaTRvWnHP/NlbdNKFwd876hMM+8m9PcNRcIeM+yFwD0aCJtfqorxdN2nNEioP5X08yVnexO9ywkDcAXQTj4RV9TyGlzZRc+1JM1LkhIgLvI6OAOxmrnXnHW08Vzo3yhK72NtnDukU4UcCAHOao6Vq+MJu2Ngb11WBlZulObcEoccxhpx929xIeOj67ZSLOEopP7z+fesjgABc4HQVQQ0v37eiYvVT3Bzz+TklfL/gEVLAk6AqLcFizs9vND2bTrGDgE8AWEX77lBsLGg92ofPXeXZsHsh43m2fRjAnroXQVsziQ0zJgHcA7OmLlB8mkb8fl3E=
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/vaultmergex5c-3.txt b/azurecompute-arm/src/test/resources/vaultmergex5c-3.txt
deleted file mode 100644
index 5ac2516..0000000
--- a/azurecompute-arm/src/test/resources/vaultmergex5c-3.txt
+++ /dev/null
@@ -1 +0,0 @@
-MIIEQTCCAikCAhABMA0GCSqGSIb3DQEBCwUAMF4xCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRYwFAYDVQQKDA1BQ01FIFRlc3QgTHRkMSIwIAYDVQQDDBlBQ01FIFRlc3QgSW50ZXJtZWRpYXRlIENBMB4XDTE3MTEyODIzMDkxMVoXDTE4MTIwODIzMDkxMVowbjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRIwEAYDVQQHEwlBbGxlZ2hhbnkxDTALBgNVBAoTBEFDTUUxFDASBgNVBAsTC0VuZ2luZWVyaW5nMRkwFwYDVQQDExBBQ01FIEZvb2JhciBDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwE0Gu/rJlbkqL0ynSbkCdrM+XP4dis/QNPz819ybXXpIX8HfkmAxrpLmfWh36KlflFYgpuV/J5lnJKlRmPWWOFjizAhq0dBijJUdLf6+QuImDjijd/nkO5SeQApZ4D50imTJL81vs2vwAfcCLwdlf7MNrMIfBsyjRSJh/Phjqib6kcYWcz6I6yTfkcsXcUB1JgR8KnQdVy0gYDu1MacHu2VYuS35HpPcQyXRqR1Ky9qh16+OhheRJw03ghEiPMcKbWS5NRgw/l/itoST2Qd6BzJTHUkJaXHNSO9fNF/fAccqECp0ZfaCSrfZs47EcjCv+N7bvrqfFl4BhB77tb7ZAQIDAQABMA0GCSqGSIb3DQEBCwUAA4ICAQCbpjL5XGC3T6gWU8sxCbS0VBmgamyvSHA8jLkWUXQfPirGFwgdGN7394mYViVU0qe6ZqmnhlhqZ1h6VbkBMVwzp3KlRhuoz/fXlW+TFvEC8Q3F+7oUdHn8w3EMyjKA5EbLzRIYXBizdbfEn8eJynjyWEdOaJpMmy9au/oFSqpmZDcxWW2SKq4j+Pqjhr+Ig4BmTVvwR6iEERPYQI4pv0OxRa7xA6Hb8NF02TyDzV7k02kN9PL/QO2dh9f3U0YY5XlV1HQzQ/BmavudPT1MiuH0CVSlCHE/JetXdJdWZA4HRiwXJn+5K8MgE5i1hjjXN/dLuaY8vItJzyrgxGRtRZoJA8t7B3QJjDECmey2m0K0qjYu7l1jAVFBWaqDdJQLmnKxViuz0MF4uFqgveW6CZEMcdqwZQ2cmZPlmcjneT0veBBh5qCdFNFM9pYDn0wqt5ruK+vqHkqJdMToBPNaBfGX10ADlB8rKW24eve+2c0iVmorJuTPdOqm2L9NKGpf2scvZZU4n/khkGKihrSOLygeLZ6SQc74cRL35FmzJqqKKpZtG9/a91dkJDz2XUiTO5TialaOU9+A1+Xrzj8LGG9JnB0KizF5dOd5mbZTROr3VCexRxyTrtZLpeJK+lYQLkDQ5ixWnd2sikym4hy3+NZ1g6nE+GQpqSALB4YnsFgUdg==
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/vaultrecoverdeletedcertificate.json b/azurecompute-arm/src/test/resources/vaultrecoverdeletedcertificate.json
deleted file mode 100644
index d75a38a..0000000
--- a/azurecompute-arm/src/test/resources/vaultrecoverdeletedcertificate.json
+++ /dev/null
@@ -1,52 +0,0 @@
-{
- "id": "https://kvvaultapilivetest.vault.azure.net/certificates/myRecoverableCertificate/42f1b607074a4531b4f14fb4447d4346",
- "kid": "https://kvvaultapilivetest.vault.azure.net/keys/myRecoverableCertificate/42f1b607074a4531b4f14fb4447d4346",
- "sid": "https://kvvaultapilivetest.vault.azure.net/secrets/myRecoverableCertificate/42f1b607074a4531b4f14fb4447d4346",
- "x5t": "-qEnW6P9TdfOOXzbNQNS5ZKveRo",
- "cer": "MIIFNDCCAxygAwIBAgICQ0MwDQYJKoZIhvcNAQELBQAwVjELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExDzANBgNVBAoMBkZvb2JhcjEhMB8GA1UEAwwYRm9vYmFyIEludGVybWVkaWF0ZSBDQSAxMB4XDTE3MTAyODIyNTIxNFoXDTE4MTEwNzIyNTIxNFowUTELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExDzANBgNVBAoMBkZvb2JhcjEcMBoGA1UEAwwTdGVzdHNpdGUuZm9vYmFyLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKKlPGmdiqKloSbUri9gvo2lyS0x2axSpeTfgIxI4Qnqhq8wMkih+SuO8+2rzIUd3S9nYqVww6yy+qHiJLXi3DKVYM/jgJnF+PlUoXxulD1abN8kX+TCKuHeAfTSIjM6WSgimGqW3hoB6bYHsaUFaAIg5FYbg5/IpbEMnD2yjU4M/nHVbxRwPqHGYdYfSqGDeHYjDb8GdA/+N0JDEoMVflTQKrDzq9R0lwOg+kICem1D+kww9ajyTu/7QdE8oOhAzuqFIVkCyZwpkrs576ng34mP04vpGcBs8YiKODydtFl2p5labXr5la0LVpLJL6rUkM3EhWOhQ0s+fCGtfrlmFRMCAwEAAaOCAQ8wggELMAkGA1UdEwQCMAAwEQYJYIZIAYb4QgEBBAQDAgZAMDMGCWCGSAGG+EIBDQQmFiRP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- "updated": 1509346510,
- "recoveryLevel": "Recoverable+Purgeable"
- },
- "policy": {
- "id": "https://kvvaultapilivetest.vault.azure.net/certificates/myRecoverableCertificate/policy",
- "key_props": {
- "exportable": true,
- "kty": "RSA",
- "key_size": 2048,
- "reuse_key": false
- },
- "secret_props": {
- "contentType": "application/x-pem-file"
- },
- "x509_props": {
- "subject": "CN=testsite.foobar.com, O=Foobar, S=California, C=US",
- "ekus": ["1.3.6.1.5.5.7.3.1"],
- "key_usage": ["digitalSignature", "keyEncipherment"],
- "validity_months": 13,
- "basic_constraints": {
- "ca": false
- }
- },
- "lifetime_actions": [{
- "trigger": {
- "lifetime_percentage": 80
- },
- "action": {
- "action_type": "EmailContacts"
- }
- }],
- "issuer": {
- "name": "Unknown"
- },
- "attributes": {
- "enabled": true,
- "created": 1509346510,
- "updated": 1509346510
- }
- }
-}
diff --git a/azurecompute-arm/src/test/resources/vaultrecoverdeletedkey.json b/azurecompute-arm/src/test/resources/vaultrecoverdeletedkey.json
deleted file mode 100644
index f9c45a0..0000000
--- a/azurecompute-arm/src/test/resources/vaultrecoverdeletedkey.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "key": {
- "kid": "https://kvvaultapilivetest.vault.azure.net/keys/myRecoverableKey/274f6c69b94b41359a5932226425eb43",
- "kty": "RSA",
- "key_ops": ["encrypt", "decrypt", "sign", "verify", "wrapKey", "unwrapKey"],
- "n": "urhKlXbEGvYetOSH-GLytvSJ5djS0-5SKBtFOlJ2885PE0s_ZbnkRURDm2fImv_RV763HKSUQbEolQNs8I99N-3uCkrDStVZ6MPii9-0U6lrEkX7LrMRNYCfPAaSSZhSjCbsyqX9Y-N_A5Jz9uHNuXvpjQ9N7ojUK7fqqhnJKcJ6l6YsGOhGCD3uei4SL5GzbSAn2auIK51lj77UXjBZaudnNWTiKaCbTAmSmEe13DOJkg82_7Y1eWea3NJn4T2nY8WqRJCp4hzBsPBmFXjE1lgFWcSjm_afiSb0mCUP7v7tSOLR3xUBv9WgMO7p4_ce_--A9ZWP418Uqq0COcHAWQ",
- "e": "AQAB"
- },
- "attributes": {
- "enabled": true,
- "created": 1509335950,
- "updated": 1509335950,
- "recoveryLevel": "Recoverable+Purgeable"
- }
-}
diff --git a/azurecompute-arm/src/test/resources/vaultrecoverdeletedsecret.json b/azurecompute-arm/src/test/resources/vaultrecoverdeletedsecret.json
deleted file mode 100644
index e36c591..0000000
--- a/azurecompute-arm/src/test/resources/vaultrecoverdeletedsecret.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "contentType": "aNewSecretKey",
- "id": "https://kvvaultapilivetest.vault.azure.net/secrets/myRecoverableSecret/d7194ca6b0214d0ba382353109cd7e58",
- "attributes": {
- "enabled": true,
- "created": 1509335958,
- "updated": 1509335958,
- "recoveryLevel": "Recoverable+Purgeable"
- }
-}
diff --git a/azurecompute-arm/src/test/resources/vaultrestorekey.json b/azurecompute-arm/src/test/resources/vaultrestorekey.json
deleted file mode 100644
index 9ca672e..0000000
--- a/azurecompute-arm/src/test/resources/vaultrestorekey.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "key": {
- "kid": "https://kvvaultapilivetest.vault.azure.net/keys/myKey/1374543b3de34500a97d075991ee3893",
- "kty": "RSA",
- "key_ops": ["encrypt", "decrypt", "sign", "verify", "wrapKey", "unwrapKey"],
- "n": "tY2pzXPfU7NFYCWvZB1gJNAetkgJ7Qi75lTVOzVns9KjFFo6e_F9GSETZbAYl5oMwfLtdqQqT5fxzWDk0sYlz09HXvCCoYmbzobd3gJ6-WLAqhtCbBikr5HAIlCzy_UqKT--WhEw8AT_EJFBPIY9xNktqnaNZuRBmjmXinzT02qUmBZRsAdJmaYfG9IZSmToOkb54OytI5TreWN0JvceoQ3GSeFLMC5PUmXP6HmZliOzBBHWnXNq3H7a3qfWV3rxT2QpbrIuz18ZqOVp7o5868kN8knKytVcqEzmdiQUdabkqbrwuh-z_IEre9AqTfw6OjUUmLjs4lyKcpWLYFh8KJuML1ub-8u0VgNGwczUZ7aAld1iwGMsoMmQfMRDOnv-9pqtY-y40ZWpBGXpzFV-IvtKHnqQk_vWqowpE8xwx7yZ74z9XNgS9TmkVpcC-ONbEfNE1sez0Zf-RZ9eOm_7WSxxH6OJYtJI7wotBXYoy1bJaqo7mgHs1IUOFhSE-Evj",
- "e": "AQAB"
- },
- "attributes": {
- "enabled": true,
- "created": 1509335925,
- "updated": 1509335925,
- "recoveryLevel": "Purgeable"
- }
-}
diff --git a/azurecompute-arm/src/test/resources/vaultrestorekeyrequestbody.json b/azurecompute-arm/src/test/resources/vaultrestorekeyrequestbody.json
deleted file mode 100644
index 4fd7296..0000000
--- a/azurecompute-arm/src/test/resources/vaultrestorekeyrequestbody.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "value": "JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUppTTJJd1pqZ3dZeTB5Wkdaa0xUUmlPVGt0T0RVeE1TMWpZVGRrTTJKbFlURTVNMkVpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLk9tXzl6QnhwTEw5a3NCVmNfR1JLUHR5akZ6R1JGV3BBWFVvVm91dmdNQXNEcFo2UUp1QUloRzZJWFB4ZHBOUDNlbEZFc19Ld3RpMlBhRXNEQWM4TEVQVHZvVzlSRmlROHZTY3JiWHlKcFNROXJSS1V5NlQ2SWo3UEpDV3Z6alp5ZlNYbklPNjRYMUtzRThFZWNKRDdudDRhN2tfZkpiSkw4a3paWnhXWFZLZnZwZEQ4c3dobFdOLVhMU0RsWDFORmlYQk5ILVRoU1BDbkNMOHc4RjlpV0o0LWFxeXozc0ozRDAzb3JzTHdKczFBTF9LN1c4eUlUNlprb3Azc20zeGlBb2pYZl92WDdOLXhQMUtKMU1tRlFnQVpaMmNpQWdJc2UzVDdoWFhsa0RaNGJqSXpYa2ZocGg1YlNuUEkzQU5kbDRUaXZkdVlx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DE4djRWX2ZZcGc3QXpNQzNYT2xQLXNiOE5KS2d6RUZOZldseUtHWXhaRkt6R0RhZnBBYjdEYUloWVpmU2Faa3Ftbnh4eHpDbGVrSTk2T2ZnZElsbkgtUEd6dW5Nb2FvcElxN0lPek1rZGVPazBpUFF6VmtDUGxxc0M0LXZ1enFJODZvLTQxbHZGVmhpU20yeEozRHJWQzBXbGpVUjlPVVZ0R2JoNEF3Zm8tb3hMdVFLMW1Ma2pqLW1yNkQ3d3ktNDBrcmdOV1ZLeEpET0Z4UEhnOVBQc09xQlBvbWpwUXpkNUowYWg1RmdvNk9uODJlVmVRZzdHRzkwUjZZbVBSR2dFVFVQUWl0XzRHZGE0U0xnTVZDSktZdGZvZHY2WWQwZ2pSZzJEVW5qZUtOVUp3c1RjSEhyYWs3MXNRaVNfVmRtekZsSm1CNjVhYjFlSE9VQ2I4SmtYalF1XzR3UmZXdnhuc1VmcExWd1VMMGNmNi1YWmp1RVpIUF9PaGlGWDlzWldTSjBLS1RfVFI4RzFTbWpFcTZUbXhKa1E1RHRnV014OWNwTjJSRlNwcWFyU1V0STJtUWNIM191U0tERjNuY1lhWDl0Vk55ZGpEOFloUkdwWHVQdk4wWHZyejBKTklHLVBWeVlqUUJPdXNvOF9GeV9yX0ctSmVhdVNxMFRpVUhEUVM0Yl96ZDlfQWxMM2wySzZJdzAyQkVhWEhwb2Jpd3pFeEdFeU4weWFVMDRVNjliUEl5TGxIcy1sVVpnMTl5Z3hOR2pzdkxDaktqQ2gzdlhxdDRsMnlZZmFnY0RHSzdWcXpUYzhDWG5wZ1p1bnR3LnRTWm9BN2tNdGItRVJtRWs3d2MyT2c"
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/vaultrestoresecret.json b/azurecompute-arm/src/test/resources/vaultrestoresecret.json
deleted file mode 100644
index bff4c9d..0000000
--- a/azurecompute-arm/src/test/resources/vaultrestoresecret.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "contentType": "aNewSecretKey",
- "id": "https://kvvaultapilivetest.vault.azure.net/secrets/mySecret/8c418537cbc948539ea2ac12c0bfcfb4",
- "attributes": {
- "enabled": true,
- "created": 1509335944,
- "updated": 1509335944,
- "recoveryLevel": "Purgeable"
- }
-}
diff --git a/azurecompute-arm/src/test/resources/vaultrestoresecretrequestbody.json b/azurecompute-arm/src/test/resources/vaultrestoresecretrequestbody.json
deleted file mode 100644
index d57bc99..0000000
--- a/azurecompute-arm/src/test/resources/vaultrestoresecretrequestbody.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "value": "KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUppTTJJd1pqZ3dZeTB5Wkdaa0xUUmlPVGt0T0RVeE1TMWpZVGRrTTJKbFlURTVNMkVpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLlFLelA2anZVR0Y5X1M3UU8tRkZDTHIyNGp0RXJuandkQThNZUtsSGE1MmhvS01rNjdiOHQyckZhNTJ6dGR2and1d1I3VWh4RldRLUpuOHk3YlJiNlYtcTlUYl9iV3E5clplUlhpUy1jdUhPak9ONHB1bHd1cVVmQkJOU2V3NlJGUXpOUzRrQks3RmxQSGZpQVRRaUUtLTc1cnZIM0dMTEdDd25KTkxIUDNTR0FtWlR1dXo0bTN6X1owR3RsZUU5XzFZT3pqczU1UmJFNEdOTC0tWDhDWnlRWmVFNGdGRXZ2WmFrYkRXTk5hOWd6SnBUNlNOTm5tcGtpMFZocGxaNGdzWmNmR29xQktZNF8wTS1WTmpIbkZ5QUlySXdsSTNjZkIzWUVCbHJ3X1A1QXhQVFFvNDJNa1pETmNKYjFwaGh0c1phaTNLcWRxT0E0ZEVWNVZWQ1VNZy5fTkN5eTNJSS1VV1VtWDB4UXhTVnNRLjJkbEFpUEpSa3NlenNVTEZocTE3ZmdCWm11XzBBaU5GUWkyTU8zMnlVanpEMjMx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M0SlV1Y0xWMzBXNGpqVGdselZGeXBaZEFxQXU0d2pWTVd5T1I0X1RSMnh6YW0wemx0ZXc1bm01TUk4NTlZYVhCVE95bkV5T18yRndDR2hzdmxQR2t5SHZuc050NFVya3pjRGswX0JaYUlYYWFNbUhxMUJQUWdiR0d6bUxNV0FXcFY0OUszdnBkN250WHFBZEVyN25VUnVpS2RSckVTYnpEUnAxclh2NExOMUdGNXRnRUFCZFhwYTVQVG9nVDM3cHUwb1BNNW5FZXFDeklRbmtjemMzUVk5SEZwY1J6bWFmbV9fSngxRFd0ak5qR1J0cVM4aHVUcVNKOG5ORl90ZXZsV2dwOU5uZU9KSUZwZkVMMnhYMTc2dnkyQ1FONTBFRzZZWmM4dXZreHFNUmk3OFNjdENEeXQ0WS5Sc3FFM1dad19XclIxRmtQc1RtWW1B"
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/vaultsamplesecret.txt b/azurecompute-arm/src/test/resources/vaultsamplesecret.txt
deleted file mode 100644
index d0d159e..0000000
--- a/azurecompute-arm/src/test/resources/vaultsamplesecret.txt
+++ /dev/null
@@ -1,27 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIEogIBAAKCAQEAvZiOgV6b4EmGiasBskXYnTaRyWzBHBGnWB11BzFN3FGigfWx
-VvjI7Ox1SHTx+vGsnjbqQPvIP4JnPEsNcWLyHa6tNAcnj/M7BuyIwdD5+Hvs6kOe
-PuSOJUf8dRjPMUpr6rcUcBmmOwTnKOH4rdpb6jXNnuCIHP+lgXCeRWveZ62TjEB+
-9aB8W8UHH854FGebiUd/aY0tpCFC7wkWz3KbgmjmY2vSe2U98Yj4+l/IWydIZ7ON
-LicteEEIGbNM0o2QSYhQBCJSw5RixDpPlrUUB094qgqUOyW0k8PvjibGxxTh0LYy
-WqWydPF0XaqFRQ6v36UvEiVGwzVsLwsJL/QVtQIDAQABAoIBAEJ6790lE3s9zNMR
-B3M/UoktzUjXvY7eEdOv4I05GJgcd+MiB6D7c1jAQ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2ExNye97rau/B
-Y2woAcVxEN9h1HNirq8Z2AwrZKd/BcBnvulZqECeH5zBQ0W56ADX72r+lzOAxTJa
-U1AIlNCIkfsQ5CpIoYsVoNEM8P+GyS8B9kaEmk/FVKldRTKJqkI=
------END RSA PRIVATE KEY-----
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/vaultsecretbackup.txt b/azurecompute-arm/src/test/resources/vaultsecretbackup.txt
deleted file mode 100644
index 877d28c..0000000
--- a/azurecompute-arm/src/test/resources/vaultsecretbackup.txt
+++ /dev/null
@@ -1 +0,0 @@
-KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUppTTJJd1pqZ3dZeTB5Wkdaa0xUUmlPVGt0T0RVeE1TMWpZVGRrTTJKbFlURTVNMkVpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLlFLelA2anZVR0Y5X1M3UU8tRkZDTHIyNGp0RXJuandkQThNZUtsSGE1MmhvS01rNjdiOHQyckZhNTJ6dGR2and1d1I3VWh4RldRLUpuOHk3YlJiNlYtcTlUYl9iV3E5clplUlhpUy1jdUhPak9ONHB1bHd1cVVmQkJOU2V3NlJGUXpOUzRrQks3RmxQSGZpQVRRaUUtLTc1cnZIM0dMTEdDd25KTkxIUDNTR0FtWlR1dXo0bTN6X1owR3RsZUU5XzFZT3pqczU1UmJFNEdOTC0tWDhDWnlRWmVFNGdGRXZ2WmFrYkRXTk5hOWd6SnBUNlNOTm5tcGtpMFZocGxaNGdzWmNmR29xQktZNF8wTS1WTmpIbkZ5QUlySXdsSTNjZkIzWUVCbHJ3X1A1QXhQVFFvNDJNa1pETmNKYjFwaGh0c1phaTNLcWRxT0E0ZEVWNVZWQ1VNZy5fTkN5eTNJSS1VV1VtWDB4UXhTVnNRLjJkbEFpUEpSa3NlenNVTEZocTE3ZmdCWm11XzBBaU5GUWkyTU8z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wZDM5bFpiUnM0SlV1Y0xWMzBXNGpqVGdselZGeXBaZEFxQXU0d2pWTVd5T1I0X1RSMnh6YW0wemx0ZXc1bm01TUk4NTlZYVhCVE95bkV5T18yRndDR2hzdmxQR2t5SHZuc050NFVya3pjRGswX0JaYUlYYWFNbUhxMUJQUWdiR0d6bUxNV0FXcFY0OUszdnBkN250WHFBZEVyN25VUnVpS2RSckVTYnpEUnAxclh2NExOMUdGNXRnRUFCZFhwYTVQVG9nVDM3cHUwb1BNNW5FZXFDeklRbmtjemMzUVk5SEZwY1J6bWFmbV9fSngxRFd0ak5qR1J0cVM4aHVUcVNKOG5ORl90ZXZsV2dwOU5uZU9KSUZwZkVMMnhYMTc2dnkyQ1FONTBFRzZZWmM4dXZreHFNUmk3OFNjdENEeXQ0WS5Sc3FFM1dad19XclIxRmtQc1RtWW1B
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/vaultsetcertificatecontacts.json b/azurecompute-arm/src/test/resources/vaultsetcertificatecontacts.json
deleted file mode 100644
index ca89576..0000000
--- a/azurecompute-arm/src/test/resources/vaultsetcertificatecontacts.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "id": "https://kvvaultapilivetest.vault.azure.net/certificates/contacts",
- "contacts": [{
- "email": "foo@bar.com",
- "name": "Foo bar",
- "phone": "867-5309"
- }]
-}
diff --git a/azurecompute-arm/src/test/resources/vaultsetcertificatecontactsrequestbody.json b/azurecompute-arm/src/test/resources/vaultsetcertificatecontactsrequestbody.json
deleted file mode 100644
index eefa904..0000000
--- a/azurecompute-arm/src/test/resources/vaultsetcertificatecontactsrequestbody.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "contacts": [{
- "email": "foo@bar.com",
- "name": "Foo bar",
- "phone": "867-5309"
- }]
-}
diff --git a/azurecompute-arm/src/test/resources/vaultsetcertificateissuer.json b/azurecompute-arm/src/test/resources/vaultsetcertificateissuer.json
deleted file mode 100644
index dd08fe9..0000000
--- a/azurecompute-arm/src/test/resources/vaultsetcertificateissuer.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "id": "https://kvvaultapilivetest.vault.azure.net/certificates/issuers/globalsign01",
- "provider": "GlobalSign",
- "credentials": {
- "account_id": "imauser"
- },
- "org_details": {
- "zip": 0,
- "admin_details": [{
- "first_name": "Admin",
- "last_name": "Guy",
- "email": "adminguy@certsforme.com",
- "phone": "867-5309"
- }]
- },
- "attributes": {
- "enabled": true,
- "created": 1509346474,
- "updated": 1509346474
- }
-}
diff --git a/azurecompute-arm/src/test/resources/vaultsetcertificateissuerrequestbody.json b/azurecompute-arm/src/test/resources/vaultsetcertificateissuerrequestbody.json
deleted file mode 100644
index 4d2d25a..0000000
--- a/azurecompute-arm/src/test/resources/vaultsetcertificateissuerrequestbody.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "credentials": {
- "account_id": "imauser",
- "pwd": "This1sMyPa55wurD!"
- },
- "org_details": {
- "admin_details": [{
- "email": "adminguy@certsforme.com",
- "first_name": "Admin",
- "last_name": "Guy",
- "phone": "867-5309"
- }]
- },
- "provider": "GlobalSign"
-}
diff --git a/azurecompute-arm/src/test/resources/vaultsetsecret.json b/azurecompute-arm/src/test/resources/vaultsetsecret.json
deleted file mode 100644
index 9f1e929..0000000
--- a/azurecompute-arm/src/test/resources/vaultsetsecret.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "value": "-----BEGIN RSA PRIVATE KEY-----\\nMIIEogIBAAKCAQEAvZiOgV6b4EmGiasBskXYnTaRyWzBHBGnWB11BzFN3FGigfWx\\nVvjI7Ox1SHTx+vGsnjbqQPvIP4JnPEsNcWLyHa6tNAcnj/M7BuyIwdD5+Hvs6kOe\\nPuSOJUf8dRjPMUpr6rcUcBmmOwTnKOH4rdpb6jXNnuCIHP+lgXCeRWveZ62TjEB+\\n9aB8W8UHH854FGebiUd/aY0tpCFC7wkWz3KbgmjmY2vSe2U98Yj4+l/IWydIZ7ON\\nLicteEEIGbNM0o2QSYhQBCJSw5RixD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hOlicPP0v+LNE9nPcQyPDgjrvjXhTIrdIMyrmmm\\n8gpgZLUidKF42r4fgYSaOhyvsXBFNAJkxDRp/ox6EIaBzLuJjMIycqnklcFaJ0nK\\nxxjnAoGAU/3jRok74Yn0MY183UCXICf/WxVYzwEi3cyRWVh6gAo2ExNye97rau/B\\nY2woAcVxEN9h1HNirq8Z2AwrZKd/BcBnvulZqECeH5zBQ0W56ADX72r+lzOAxTJa\\nU1AIlNCIkfsQ5CpIoYsVoNEM8P+GyS8B9kaEmk/FVKldRTKJqkI=\\n-----END RSA PRIVATE KEY-----\\n",
- "contentType": "testSecretKey",
- "id": "https://kvvaultapilivetest.vault.azure.net/secrets/mySecret/b936ececbc674f3bb1367ae50d28ada0",
- "attributes": {
- "enabled": true,
- "created": 1509335932,
- "updated": 1509335932,
- "recoveryLevel": "Purgeable"
- }
-}
diff --git a/azurecompute-arm/src/test/resources/vaultsetsecretrequestbody.json b/azurecompute-arm/src/test/resources/vaultsetsecretrequestbody.json
deleted file mode 100644
index 52dc431..0000000
--- a/azurecompute-arm/src/test/resources/vaultsetsecretrequestbody.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "attributes": {
- "enabled": true
- },
- "contentType": "testSecretKey",
- "value": "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEAvZiOgV6b4EmGiasBskXYnTaRyWzBHBGnWB11BzFN3FGigfWx\nVvjI7Ox1SHTx+vGsnjbqQPvIP4JnPEsNcWLyHa6tNAcnj/M7BuyIwdD5+Hvs6kOe\nPuSOJUf8dRjPMUpr6rcUcBmmOwTnKOH4rdpb6jXNnuCIHP+lgXCeRWveZ62TjEB+\n9aB8W8UHH854FGebiUd/aY0tpCFC7wkWz3KbgmjmY2vSe2U98Yj4+l/IWydIZ7ON\nLicteEEIGbNM0o2QSYhQBCJSw5RixDpPlrUUB094qgqUOyW0k8PvjibGxxTh0LYy\nWqWydPF0XaqFRQ6v36UvEiVGwzVsLwsJL/QVtQIDAQABAoIBA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J0nK\nxxjnAoGAU/3jRok74Yn0MY183UCXICf/WxVYzwEi3cyRWVh6gAo2ExNye97rau/B\nY2woAcVxEN9h1HNirq8Z2AwrZKd/BcBnvulZqECeH5zBQ0W56ADX72r+lzOAxTJa\nU1AIlNCIkfsQ5CpIoYsVoNEM8P+GyS8B9kaEmk/FVKldRTKJqkI\u003d\n-----END RSA PRIVATE KEY-----"
-}
diff --git a/azurecompute-arm/src/test/resources/vaultupdatecertificate.json b/azurecompute-arm/src/test/resources/vaultupdatecertificate.json
deleted file mode 100644
index 4998d29..0000000
--- a/azurecompute-arm/src/test/resources/vaultupdatecertificate.json
+++ /dev/null
@@ -1,58 +0,0 @@
-{
- "id": "https://kvvaultapilivetest.vault.azure.net/certificates/myCertificate/b73ba4610dc24dca946f76933f6590dd",
- "kid": "https://kvvaultapilivetest.vault.azure.net/keys/myCertificate/b73ba4610dc24dca946f76933f6590dd",
- "sid": "https://kvvaultapilivetest.vault.azure.net/secrets/myCertificate/b73ba4610dc24dca946f76933f6590dd",
- "x5t": "K7HXO6YIK6xwCX8W1InUKsJV9Rk",
- "cer": "MIIDTDCCAjSgAwIBAgIQVA+XomvgS56ybBWv2MnacjANBgkqhkiG9w0BAQsFADAjMSEwHwYDVQQDExhteWNlcnRpZmljYXRlLmZvb2Jhci5jb20wHhcNMTcxMDMwMDY0NDI3WhcNMTgxMDMwMDY1NDI3WjAjMSEwHwYDVQQDExhteWNlcnRpZmljYXRlLmZvb2Jhci5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCusjC1A7rQEjW9SRL9XHRNDl0EuNYEV9AVQcAEmgpcJ6WgusdataeFrHKPmO8RUZgXk4sE14d3o9HjduYcqfOre+FBdQDWwoFHEAlq9Iz1r4woGk3f1oq9KepE12cRMTyTA214iluYNUx7XxSca3KFFswqonvcekbLJF2IPydNL0XrlIJFCUoAs3PRWLfPnYuijqRGhk8B9xGQMBtuDsnEi4wQRxusFHR1JxHSbY65xi1Hc9Ds9RAxdKwvBmYYC7V78q6qNM0LpenFGlZJMd/eRLVDguM1d17yyTX/lei/Oj8yVVDsva23ilUrv1mR549sv1lIqxNzdOGLsb6jykJ7AgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBRnlX51KtyJ/m/V8I/3il4cAW/HOzAdBgNVHQ4EFgQUZ5V+dSrcif5v1fCP94peHAFvxzswDQYJKoZIhvcNAQELBQADggEBAAbSFuMRMbXyH80iA/jU7vuUCYe0Ra/wTTB1qVHTBuqQ/W8RI01mdqI9+GAPOTyN94XPPYVpSz9ZQ3P0/dhgcsahW5bZQkC0CcUSE5R7JUOKI5Up6n8zZM/unHlC6ZcEpNA/scObPKhQXdZayxgf2/p30bii4CiyS7ADEH92xMnzo1Eu9Dckxh1MRDypfxMY9YIzggksiY78BxoNsRDyxNjeRHVUxAIJ3n9TUv+WG31r7rMOIs6ZPsWc96AzUHHAZREVTEh2kiKKIenbMXn1tCpF6/GJKGfp7rt5ObUoQAlnn7kgAceteKZHEMgRZ4c4EQq+yqBw3hJrz4dOabJcmcU=",
- "attributes": {
- "enabled": true,
- "nbf": 1509345867,
- "exp": 1540882467,
- "created": 1509346467,
- "updated": 1509346472,
- "recoveryLevel": "Purgeable"
- },
- "tags": {
- "selfsigned": "true"
- },
- "policy": {
- "id": "https://kvvaultapilivetest.vault.azure.net/certificates/myCertificate/policy",
- "key_props": {
- "exportable": false,
- "kty": "RSA",
- "key_size": 2048,
- "reuse_key": false
- },
- "secret_props": {
- "contentType": "application/x-pkcs12"
- },
- "x509_props": {
- "subject": "CN=mycertificate.foobar.com",
- "ekus": ["1.3.6.1.5.5.7.3.1", "1.3.6.1.5.5.7.3.2"],
- "key_usage": ["digitalSignature", "keyEncipherment"],
- "validity_months": 12,
- "basic_constraints": {
- "ca": false
- }
- },
- "lifetime_actions": [{
- "trigger": {
- "lifetime_percentage": 80
- },
- "action": {
- "action_type": "AutoRenew"
- }
- }],
- "issuer": {
- "name": "Self"
- },
- "attributes": {
- "enabled": true,
- "created": 1509346452,
- "updated": 1509346472
- }
- },
- "pending": {
- "id": "https://kvvaultapilivetest.vault.azure.net/certificates/myCertificate/pending"
- }
-}
diff --git a/azurecompute-arm/src/test/resources/vaultupdatecertificateissuer.json b/azurecompute-arm/src/test/resources/vaultupdatecertificateissuer.json
deleted file mode 100644
index 4960ce5..0000000
--- a/azurecompute-arm/src/test/resources/vaultupdatecertificateissuer.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "id": "https://kvvaultapilivetest.vault.azure.net/certificates/issuers/globalsign01",
- "provider": "GlobalSign",
- "credentials": {
- "account_id": "imauser"
- },
- "org_details": {
- "zip": 0,
- "admin_details": [{
- "first_name": "Admin",
- "last_name": "Guy",
- "email": "adminguy@certsforme.com",
- "phone": "867-5309"
- }]
- },
- "attributes": {
- "enabled": true,
- "created": 1509346474,
- "updated": 1509346654
- }
-}
diff --git a/azurecompute-arm/src/test/resources/vaultupdatecertificateissuerrequestbody.json b/azurecompute-arm/src/test/resources/vaultupdatecertificateissuerrequestbody.json
deleted file mode 100644
index 658610e..0000000
--- a/azurecompute-arm/src/test/resources/vaultupdatecertificateissuerrequestbody.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "credentials": {
- "account_id": "imauser",
- "pwd": "CanHa5P455wuRd!"
- },
- "org_details": {
- "admin_details": [{
- "email": "adminguy@certsforme.com",
- "first_name": "Admin",
- "last_name": "Guy",
- "phone": "867-5309"
- }]
- },
- "provider": "GlobalSign"
-}
diff --git a/azurecompute-arm/src/test/resources/vaultupdatecertificateoperation.json b/azurecompute-arm/src/test/resources/vaultupdatecertificateoperation.json
deleted file mode 100644
index 800f399..0000000
--- a/azurecompute-arm/src/test/resources/vaultupdatecertificateoperation.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "id": "https://kvvaultapilivetest.vault.azure.net/certificates/myTemp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Wvc/YHetU03prm1Qb+izNZA97NNeZRsuCXMAkNAHQnXa/rz/zG6BmGXFigh55wglX6aB8PnfKZb7N6RCct8BsKSV8uPpxXzRWPKrv7TA2RKfMifUD/Dzt7FSDuYJ8FGkvQNX012RXb2DqHp8tbZgUSj7iXdoZMZ1jfwlh6P61yhfItbF4SYvtBd9PTWIxP6SkCfDjJ7f0/ofwoV2DvAiwfH7URdQIMC+B8dPCqbjya3Ku+B2fWXXhdG7gJqa1zRY066QTIsHwfwd3WbeLQxCcBUEQUG0u23gj9fDX81fvKsgHtN9Nod5wXsdLtjjpHpJQJlDanII4H3fvDxAOlqSnxxEhjL9uA3YXUERMGGjExXA5kCOqKrdfGT5x4yosuNutylvF8YYn8r+mvMgegtVl8XmKnyP+uESSE2krVVmnSM2gveq7ILxBvanq70LmQVeYQB4AlLtUsxPUPIPiOryDI39KrlqWKdl3/oC7Gx+WbVzXxs37NEwt/tx8E+r1Nq/jRFxP0QlyyUdjpiPXjUpuCdn4y6erpCuahbMP+CZNCNgeEh1v2pNljuaGCIB+VA2Fz/oU=",
- "cancellation_requested": true,
- "status": "inProgress",
- "status_details": "Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.",
- "request_id": "32051e4e4ac947c5b9ad1b6737bee7c0"
-}
diff --git a/azurecompute-arm/src/test/resources/vaultupdatecertificateoperationrequestbody.json b/azurecompute-arm/src/test/resources/vaultupdatecertificateoperationrequestbody.json
deleted file mode 100644
index 5d370b3..0000000
--- a/azurecompute-arm/src/test/resources/vaultupdatecertificateoperationrequestbody.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "cancellation_requested": true
-}
diff --git a/azurecompute-arm/src/test/resources/vaultupdatecertificatepolicy.json b/azurecompute-arm/src/test/resources/vaultupdatecertificatepolicy.json
deleted file mode 100644
index 97e126a..0000000
--- a/azurecompute-arm/src/test/resources/vaultupdatecertificatepolicy.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "id": "https://kvvaultapilivetest.vault.azure.net/certificates/myCertificate/policy",
- "key_props": {
- "exportable": false,
- "kty": "RSA",
- "key_size": 2048,
- "reuse_key": false
- },
- "secret_props": {
- "contentType": "application/x-pkcs12"
- },
- "x509_props": {
- "subject": "CN=mycertificate.foobar.com",
- "ekus": ["1.3.6.1.5.5.7.3.1", "1.3.6.1.5.5.7.3.2"],
- "key_usage": ["digitalSignature", "keyEncipherment"],
- "validity_months": 12,
- "basic_constraints": {
- "ca": false
- }
- },
- "lifetime_actions": [{
- "trigger": {
- "lifetime_percentage": 80
- },
- "action": {
- "action_type": "AutoRenew"
- }
- }],
- "issuer": {
- "name": "Self"
- },
- "attributes": {
- "enabled": true,
- "created": 1509346452,
- "updated": 1509346452
- }
-}
diff --git a/azurecompute-arm/src/test/resources/vaultupdatecertificatepolicyrequestbody.json b/azurecompute-arm/src/test/resources/vaultupdatecertificatepolicyrequestbody.json
deleted file mode 100644
index 4424614..0000000
--- a/azurecompute-arm/src/test/resources/vaultupdatecertificatepolicyrequestbody.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "key_props": {
- "exportable": true,
- "key_size": 3072,
- "kty": "RSA",
- "reuse_key": false
- }
-}
diff --git a/azurecompute-arm/src/test/resources/vaultupdatecertificaterequestbody.json b/azurecompute-arm/src/test/resources/vaultupdatecertificaterequestbody.json
deleted file mode 100644
index 747f02f..0000000
--- a/azurecompute-arm/src/test/resources/vaultupdatecertificaterequestbody.json
+++ /dev/null
@@ -1 +0,0 @@
-{"policy":{"id":"myCertificate","issuer":{"name":"Self"},"key_props":{"exportable":false,"key_size":2048,"kty":"RSA","reuse_key":false},"lifetime_actions":[],"x509_props":{"ekus":[],"key_usage":[],"subject":"CN=mycertificate.foobar.com","validity_months":12}},"tags":{"selfsigned":"true"}}
diff --git a/azurecompute-arm/src/test/resources/vaultupdatekey.json b/azurecompute-arm/src/test/resources/vaultupdatekey.json
deleted file mode 100644
index cd208a1..0000000
--- a/azurecompute-arm/src/test/resources/vaultupdatekey.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "key": {
- "kid": "https://kvvaultapilivetest.vault.azure.net/keys/myKey/bd6566ec707e4ad89f4ab9577d9d0bef",
- "kty": "RSA",
- "key_ops": ["encrypt", "decrypt", "sign", "verify", "wrapKey", "unwrapKey"],
- "n": "2ZWsir4hwVxFTQXfWN7Vy1zA33jg1kxUMHmkmEFtVjGDByzmMfEXpnPziNCtYppBtpNT4AJEVQ60aIgSLNrUYBMoeiI2HCf2NM0NTdwYp7wq5tImtbGDASdDXQ1v3Bv3hXGh3CVmN2VLRf0OmoXnZUG_2UZZ05iPXOY6lNFfq8L81v0ZCMiXwFvNVhZ_fzppzhnwuHQf-X6Lnvrd1ocFqF8IFjV3663eumAfZmBLPP6tmiAZYW3G68_G0I2CHLtTPFX05aN51Jn42RITgcs63HFMT_iVW5556YR0BwtqkCXIUgTD714Fipz7EKGqhHsqND7YUSKpiRVQhfoZEckAkQ",
- "e": "AQAB"
- },
- "attributes": {
- "enabled": true,
- "created": 1509335902,
- "updated": 1509335923,
- "recoveryLevel": "Purgeable"
- },
- "tags": {
- "purpose": "testing"
- }
-}
diff --git a/azurecompute-arm/src/test/resources/vaultupdatekeyrequestbody.json b/azurecompute-arm/src/test/resources/vaultupdatekeyrequestbody.json
deleted file mode 100644
index 9ce289f..0000000
--- a/azurecompute-arm/src/test/resources/vaultupdatekeyrequestbody.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "tags": {
- "purpose": "testing"
- }
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/vaultupdatekeywithversion.json b/azurecompute-arm/src/test/resources/vaultupdatekeywithversion.json
deleted file mode 100644
index 337b33b..0000000
--- a/azurecompute-arm/src/test/resources/vaultupdatekeywithversion.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "key": {
- "kid": "https://kvvaultapilivetest.vault.azure.net/keys/myKey/bd6566ec707e4ad89f4ab9577d9d0bef",
- "kty": "RSA",
- "key_ops": ["encrypt", "decrypt", "sign", "verify", "wrapKey", "unwrapKey"],
- "n": "2ZWsir4hwVxFTQXfWN7Vy1zA33jg1kxUMHmkmEFtVjGDByzmMfEXpnPziNCtYppBtpNT4AJEVQ60aIgSLNrUYBMoeiI2HCf2NM0NTdwYp7wq5tImtbGDASdDXQ1v3Bv3hXGh3CVmN2VLRf0OmoXnZUG_2UZZ05iPXOY6lNFfq8L81v0ZCMiXwFvNVhZ_fzppzhnwuHQf-X6Lnvrd1ocFqF8IFjV3663eumAfZmBLPP6tmiAZYW3G68_G0I2CHLtTPFX05aN51Jn42RITgcs63HFMT_iVW5556YR0BwtqkCXIUgTD714Fipz7EKGqhHsqND7YUSKpiRVQhfoZEckAkQ",
- "e": "AQAB"
- },
- "attributes": {
- "enabled": true,
- "created": 1509335902,
- "updated": 1509335927,
- "recoveryLevel": "Purgeable"
- },
- "tags": {
- "purpose": "testing again"
- }
-}
diff --git a/azurecompute-arm/src/test/resources/vaultupdatesecret.json b/azurecompute-arm/src/test/resources/vaultupdatesecret.json
deleted file mode 100644
index 3f96107..0000000
--- a/azurecompute-arm/src/test/resources/vaultupdatesecret.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "contentType": "testSecretKey",
- "id": "https://kvvaultapilivetest.vault.azure.net/secrets/mySecret/b936ececbc674f3bb1367ae50d28ada0",
- "attributes": {
- "enabled": true,
- "created": 1509335932,
- "updated": 1509335934,
- "recoveryLevel": "Purgeable"
- },
- "tags": {
- "purpose": "testing"
- }
-}
diff --git a/azurecompute-arm/src/test/resources/vaultupdatesecretrequestbody.json b/azurecompute-arm/src/test/resources/vaultupdatesecretrequestbody.json
deleted file mode 100644
index 06c614f..0000000
--- a/azurecompute-arm/src/test/resources/vaultupdatesecretrequestbody.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "tags": {
- "purpose": "testing"
- }
-}
diff --git a/azurecompute-arm/src/test/resources/vaultupdatesecretwithversion.json b/azurecompute-arm/src/test/resources/vaultupdatesecretwithversion.json
deleted file mode 100644
index e6d8f46..0000000
--- a/azurecompute-arm/src/test/resources/vaultupdatesecretwithversion.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "contentType": "testSecretKey",
- "id": "https://kvvaultapilivetest.vault.azure.net/secrets/mySecret/b936ececbc674f3bb1367ae50d28ada0",
- "attributes": {
- "enabled": true,
- "created": 1509335932,
- "updated": 1509335946,
- "recoveryLevel": "Purgeable"
- },
- "tags": {
- "purpose": "testing again"
- }
-}
diff --git a/azurecompute-arm/src/test/resources/vaultupdatesecretwithversionrequestbody.json b/azurecompute-arm/src/test/resources/vaultupdatesecretwithversionrequestbody.json
deleted file mode 100644
index a9c6db9..0000000
--- a/azurecompute-arm/src/test/resources/vaultupdatesecretwithversionrequestbody.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "tags": {
- "purpose": "testing again"
- }
-}
diff --git a/azurecompute-arm/src/test/resources/versions.json b/azurecompute-arm/src/test/resources/versions.json
deleted file mode 100644
index 48659ed..0000000
--- a/azurecompute-arm/src/test/resources/versions.json
+++ /dev/null
@@ -1,12 +0,0 @@
-[
- {
- "location": "eastus",
- "name": "2.0.20151120",
- "id": "/Subscriptions/c36d97d3-3fea-4561-aa2d-e61168908c5b/Providers/Microsoft.Compute/Locations/eastus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2008-R2-SP1/Versions/2.0.20151120"
- },
- {
- "location": "eastus",
- "name": "2.0.20151214",
- "id": "/Subscriptions/c36d97d3-3fea-4561-aa2d-e61168908c5b/Providers/Microsoft.Compute/Locations/eastus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2008-R2-SP1/Versions/2.0.20151214"
- }
-]
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/virtualmachine.json b/azurecompute-arm/src/test/resources/virtualmachine.json
deleted file mode 100644
index e3e8d6b..0000000
--- a/azurecompute-arm/src/test/resources/virtualmachine.json
+++ /dev/null
@@ -1,107 +0,0 @@
-{
- "properties": {
- "vmId": "27ee085b-d707-xxxx-yyyy-2370e2eb1cc1",
- "licenseType": "Windows_Server",
- "availabilitySet":{
- "id":"/subscriptions/SUBSCRIPTIONID/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/myAVSet"
- },
- "hardwareProfile": {
- "vmSize": "Standard_D1"
- },
- "storageProfile": {
- "imageReference": {
- "publisher": "publisher",
- "offer": "OFFER",
- "sku": "sku",
- "version": "ver",
- "id": "/subscriptions/SUBSCRIPTIONID/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServerEssentials/artifactype/vmimage/offers/OFFER/skus/OFFER/versions/latest"
- },
- "osDisk": {
- "osType": "Windows",
- "name": "windowsmachine",
- "createOption": "FromImage",
- "managedDisk": {
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/osDisk",
- "storageAccountType": "Standard_LRS"
- },
- "caching": "ReadWrite"
- },
- "dataDisks":[
- {
- "name":"mydatadisk1",
- "diskSizeGB":"1",
- "lun": 0,
- "createOption":"Empty",
- "managedDisk": {
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/osDisk",
- "storageAccountType": "Standard_LRS"
- },
- "caching": "ReadWrite"
- }
- ]
- },
- "osProfile": {
- "computerName": "windowsmachine",
- "adminUsername": "azureuser",
- "adminPassword":"password",
- "customData":"",
- "windowsConfiguration": {
- "provisionVMAgent": false,
- "enableAutomaticUpdates": true,
- "winRM": {
- "listeners":[{
- "protocol": "https",
- "certificateUrl": "url-to-certificate"
- }]
- },
- "additionalUnattendContent":[
- {
- "passName":"oobesystem",
- "componentName":"Microsoft-Windows-Shell-Setup",
- "settingName":"FirstLogonCommands",
- "content":"<XML unattend content>"
- }
- ]
- },
- "secrets":[
- {
- "sourceVault": {
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/myresourcegroup1/providers/Microsoft.KeyVault/vaults/myvault1"
- },
- "vaultCertificates": [
- {
- "certificateUrl": "https://myvault1.vault.azure.net/secrets/SECRETNAME/SECRETVERSION",
- "certificateStore": "CERTIFICATESTORENAME"
- }
- ]
- }
- ]
- },
- "networkProfile": {
- "networkInterfaces":[
- {
- "id":"/subscriptions/SUBSCRIPTIONID/resourceGroups/groupname/providers/Microsoft.Network/networkInterfaces/windowsmachine167"
- }
- ]
- },
- "diagnosticsProfile": {
- "bootDiagnostics": {
- "enabled": true,
- "storageUri": "https://groupname2760.blob.core.windows.net/"
- }
- },
- "provisioningState": "Creating"
- },
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/groupname/providers/Microsoft.Compute/virtualMachines/windowsmachine",
- "name": "windowsmachine",
- "type": "Microsoft.Compute/virtualMachines",
- "location": "westus",
- "tags": {
- "foo": "bar"
- },
- "plan": {
- "name": "deadline-slave-7-2",
- "publisher": "thinkboxsoftware",
- "product": "deadline7-2"
- }
-}
diff --git a/azurecompute-arm/src/test/resources/virtualmachineInstance.json b/azurecompute-arm/src/test/resources/virtualmachineInstance.json
deleted file mode 100644
index f73cab6..0000000
--- a/azurecompute-arm/src/test/resources/virtualmachineInstance.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "vmAgent": {
- "vmAgentVersion": "2.7.1198.766",
- "statuses": [
- {
- "code": "ProvisioningState/succeeded",
- "level": "Info",
- "displayStatus": "Ready",
- "message": "GuestAgent is running and accepting new configurations.",
- "time": "2016-05-04T08:42:15+00:00"
- }
- ]
- },
- "disks": [
- {
- "name": "windowsmachine",
- "statuses": [
- {
- "code": "ProvisioningState/succeeded",
- "level": "Info",
- "displayStatus": "Provisioning succeeded",
- "time": "2016-05-04T08:31:45.2525129+00:00"
- }
- ]
- }
- ],
- "statuses": [
- {
- "code": "ProvisioningState/succeeded",
- "level": "Info",
- "displayStatus": "Provisioning succeeded",
- "time": "2016-05-04T08:38:52.4310433+00:00"
- },
- {
- "code": "PowerState/running",
- "level": "Info",
- "displayStatus": "VM running"
- }
- ]
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/virtualmachineimagecreate.json b/azurecompute-arm/src/test/resources/virtualmachineimagecreate.json
deleted file mode 100644
index 865012f..0000000
--- a/azurecompute-arm/src/test/resources/virtualmachineimagecreate.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "type": "Microsoft.Compute/images",
- "location": "canadaeast",
- "id": "/subscriptions/bd81406c-6028-4037-9f03-9a3af4ff725d/resourceGroups/jcloudstest-canadaeast/providers/Microsoft.Compute/images/testVirtualMachineImage",
- "name": "testVirtualMachineImage",
- "properties": {
- "sourceVirtualMachine": {
- "id": "/subscriptions/bd81406c-6028-4037-9f03-9a3af4ff725d/resourceGroups/jcloudstest-canadaeast/providers/Microsoft.Compute/virtualMachines/vm2image"
- },
- "storageProfile": {
- "osDisk": {
- "osType": "Linux",
- "osState": "Generalized",
- "blobUri": "https://jcloudstestcanadaeast982.blob.core.windows.net/vhds/vm2image20170315140332.vhd",
- "caching": "ReadWrite"
- },
- "dataDisks": []
- },
- "provisioningState": "Succeeded"
- }
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/virtualmachineimageget.json b/azurecompute-arm/src/test/resources/virtualmachineimageget.json
deleted file mode 100644
index 865012f..0000000
--- a/azurecompute-arm/src/test/resources/virtualmachineimageget.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "type": "Microsoft.Compute/images",
- "location": "canadaeast",
- "id": "/subscriptions/bd81406c-6028-4037-9f03-9a3af4ff725d/resourceGroups/jcloudstest-canadaeast/providers/Microsoft.Compute/images/testVirtualMachineImage",
- "name": "testVirtualMachineImage",
- "properties": {
- "sourceVirtualMachine": {
- "id": "/subscriptions/bd81406c-6028-4037-9f03-9a3af4ff725d/resourceGroups/jcloudstest-canadaeast/providers/Microsoft.Compute/virtualMachines/vm2image"
- },
- "storageProfile": {
- "osDisk": {
- "osType": "Linux",
- "osState": "Generalized",
- "blobUri": "https://jcloudstestcanadaeast982.blob.core.windows.net/vhds/vm2image20170315140332.vhd",
- "caching": "ReadWrite"
- },
- "dataDisks": []
- },
- "provisioningState": "Succeeded"
- }
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/virtualmachineimagelist.json b/azurecompute-arm/src/test/resources/virtualmachineimagelist.json
deleted file mode 100644
index cf4d3ea..0000000
--- a/azurecompute-arm/src/test/resources/virtualmachineimagelist.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "value": [
- {
- "type": "Microsoft.Compute/images",
- "location": "canadaeast",
- "id": "/subscriptions/bd81406c-6028-4037-9f03-9a3af4ff725d/resourceGroups/jcloudstest-canadaeast/providers/Microsoft.Compute/images/imageFromRest",
- "name": "testVirtualMachineImage",
- "properties": {
- "sourceVirtualMachine": {
- "id": "/subscriptions/bd81406c-6028-4037-9f03-9a3af4ff725d/resourceGroups/jcloudstest-canadaeast/providers/Microsoft.Compute/virtualMachines/vm2image"
- },
- "storageProfile": {
- "osDisk": {
- "osType": "Linux",
- "osState": "Generalized",
- "blobUri": "https://jcloudstestcanadaeast982.blob.core.windows.net/vhds/vm2image20170315140332.vhd",
- "caching": "ReadWrite"
- },
- "dataDisks": []
- },
- "provisioningState": "Succeeded"
- }
- }
- ]
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/virtualmachines.json b/azurecompute-arm/src/test/resources/virtualmachines.json
deleted file mode 100644
index e77e58b..0000000
--- a/azurecompute-arm/src/test/resources/virtualmachines.json
+++ /dev/null
@@ -1,203 +0,0 @@
-{
- "value": [
- {
- "properties": {
- "vmId": "27ee085b-d707-xxxx-yyyy-2370e2eb1cc1",
- "licenseType": "Windows_Server",
- "availabilitySet":{
- "id":"/subscriptions/SUBSCRIPTIONID/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/myAVSet"
- },
- "hardwareProfile": {
- "vmSize": "Standard_D1"
- },
- "storageProfile": {
- "imageReference": {
- "publisher": "publisher",
- "offer": "OFFER",
- "sku": "sku",
- "version": "ver",
- "id": "/subscriptions/SUBSCRIPTIONID/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServerEssentials/artifactype/vmimage/offers/OFFER/skus/OFFER/versions/latest"
- },
- "osDisk": {
- "osType": "Windows",
- "name": "windowsmachine",
- "createOption": "FromImage",
- "managedDisk": {
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/osDisk",
- "storageAccountType": "Standard_LRS"
- },
- "caching": "ReadWrite"
- },
- "dataDisks":[
- {
- "name":"mydatadisk1",
- "diskSizeGB":"1",
- "lun": 0,
- "createOption":"Empty",
- "caching":"ReadWrite",
- "managedDisk": {
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/osDisk",
- "storageAccountType": "Standard_LRS"
- }
- }
- ]
- },
- "osProfile": {
- "computerName": "windowsmachine",
- "adminUsername": "azureuser",
- "adminPassword":"password",
- "customData":"",
- "windowsConfiguration": {
- "provisionVMAgent": false,
- "enableAutomaticUpdates": true,
- "winRM": {
- "listeners":[{
- "protocol": "https",
- "certificateUrl": "url-to-certificate"
- }]
- },
- "additionalUnattendContent":[
- {
- "passName":"oobesystem",
- "componentName":"Microsoft-Windows-Shell-Setup",
- "settingName":"FirstLogonCommands",
- "content":"<XML unattend content>"
- }
- ]
- },
- "secrets":[
- {
- "sourceVault": {
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/myresourcegroup1/providers/Microsoft.KeyVault/vaults/myvault1"
- },
- "vaultCertificates": [
- {
- "certificateUrl": "https://myvault1.vault.azure.net/secrets/SECRETNAME/SECRETVERSION",
- "certificateStore": "CERTIFICATESTORENAME"
- }
- ]
- }
- ]
- },
- "networkProfile": {
- "networkInterfaces": [
- {
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/groupname/providers/Microsoft.Network/networkInterfaces/windowsmachine167"
- }
- ]
- },
- "diagnosticsProfile": {
- "bootDiagnostics": {
- "enabled": true,
- "storageUri": "https://groupname2760.blob.core.windows.net/"
- }
- },
- "provisioningState": "Creating"
- },
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/groupname/providers/Microsoft.Compute/virtualMachines/windowsmachine",
- "name": "windowsmachine",
- "type": "Microsoft.Compute/virtualMachines",
- "location": "westus"
- },
- {
- "properties": {
- "vmId": "27ee085b-d707-xxxx-yyyy-2370e2eb1cc1",
- "licenseType": "Windows_Server",
- "availabilitySet":{
- "id":"/subscriptions/SUBSCRIPTIONID/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/myAVSet"
- },
- "hardwareProfile": {
- "vmSize": "Standard_D1"
- },
- "storageProfile": {
- "imageReference": {
- "publisher": "publisher",
- "offer": "OFFER",
- "sku": "sku",
- "version": "ver",
- "id": "/subscriptions/SUBSCRIPTIONID/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServerEssentials/artifactype/vmimage/offers/OFFER/skus/OFFER/versions/latest"
- },
- "osDisk": {
- "osType": "Windows",
- "name": "windowsmachine",
- "createOption": "FromImage",
- "managedDisk": {
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/osDisk",
- "storageAccountType": "Standard_LRS"
- },
- "vhd": {
- "uri": "https://groupname2760.blob.core.windows.net/vhds/windowsmachine201624102936.vhd"
- },
- "caching": "ReadWrite"
- },
- "dataDisks":[
- {
- "name":"mydatadisk1",
- "diskSizeGB":"1",
- "lun": 0,
- "vhd": {
- "uri" : "http://mystorage1.blob.core.windows.net/vhds/mydatadisk1.vhd"
- },
- "createOption":"Empty"
- }
- ]
- },
- "osProfile": {
- "computerName": "windowsmachine",
- "adminUsername": "azureuser",
- "adminPassword":"password",
- "customData":"",
- "windowsConfiguration": {
- "provisionVMAgent": false,
- "enableAutomaticUpdates": true,
- "winRM": {
- "listeners":[{
- "protocol": "https",
- "certificateUrl": "url-to-certificate"
- }]
- },
- "additionalUnattendContent":[
- {
- "passName":"oobesystem",
- "componentName":"Microsoft-Windows-Shell-Setup",
- "settingName":"FirstLogonCommands",
- "content":"<XML unattend content>"
- }
- ]
- },
- "secrets":[
- {
- "sourceVault": {
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/myresourcegroup1/providers/Microsoft.KeyVault/vaults/myvault1"
- },
- "vaultCertificates": [
- {
- "certificateUrl": "https://myvault1.vault.azure.net/secrets/SECRETNAME/SECRETVERSION",
- "certificateStore": "CERTIFICATESTORENAME"
- }
- ]
- }
- ]
- },
- "networkProfile": {
- "networkInterfaces": [
- {
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/groupname/providers/Microsoft.Network/networkInterfaces/windowsmachine167"
- }
- ]
- },
- "diagnosticsProfile": {
- "bootDiagnostics": {
- "enabled": true,
- "storageUri": "https://groupname2760.blob.core.windows.net/"
- }
- },
- "provisioningState": "Creating"
- },
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/groupname/providers/Microsoft.Compute/virtualMachines/windowsmachine",
- "name": "windowsmachine",
- "type": "Microsoft.Compute/virtualMachines",
- "location": "westus"
- }
- ]
-}
diff --git a/azurecompute-arm/src/test/resources/virtualmachinescalesetget.json b/azurecompute-arm/src/test/resources/virtualmachinescalesetget.json
deleted file mode 100644
index c99eb39..0000000
--- a/azurecompute-arm/src/test/resources/virtualmachinescalesetget.json
+++ /dev/null
@@ -1,64 +0,0 @@
-{
- "sku": {
- "name": "Standard_A1",
- "tier": "Standard",
- "capacity": 4
- },
- "properties": {
- "singlePlacementGroup": true,
- "upgradePolicy": {
- "mode": "Manual"
- },
- "virtualMachineProfile": {
- "osProfile": {
- "computerNamePrefix": "vmmsprefix",
- "adminUsername": "jclouds",
- "linuxConfiguration": {
- "disablePasswordAuthentication": false
- },
- "secrets": []
- },
- "storageProfile": {
- "osDisk": {
- "createOption": "FromImage",
- "caching": "None",
- "managedDisk": {
- "storageAccountType": "Standard_LRS"
- }
- },
- "imageReference": {
- "publisher": "Canonical",
- "offer": "UbuntuServer",
- "sku": "16.04-LTS",
- "version": "latest"
- }
- },
- "networkProfile": {"networkInterfaceConfigurations":[{"name":"nicconfig1","properties":{"primary":true,"enableAcceleratedNetworking":false,"dnsSettings":{"dnsServers":["8.8.8.8"]},"ipConfigurations":[{"name":"ipconfig1","properties":{"publicIPAddressConfiguration":{"name":"pub1","properties":{"idleTimeoutInMinutes":15}},"subnet":{"id":"/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxxx/resourceGroups/jcloud-eastus/providers/Microsoft.Network/virtualNetworks/jclouds-eastus-virtualNetworkName/subnets/jclouds-eastus-subnet"},"privateIPAddressVersion":"IPv4"}}]}}]},
- "extensionProfile": {
- "extensions": [
- {
- "properties": {
- "publisher": "Microsoft.compute",
- "type": "CustomScriptExtension",
- "typeHandlerVersion": "1.1",
- "autoUpgradeMinorVersion": false,
- "settings": {"fileUris":["https://mystorage1.blob.core.windows.net/winvmextekfacnt/SampleCmd_1.cmd"],"commandToExecute":"SampleCmd_1.cmd"}
- },
- "name": "extensionName"
- }
- ]
- }
- },
- "provisioningState": "Creating",
- "overprovision": true,
- "uniqueId": "xxxxx-xxxx-xxxx-xxxx-xxxxxx"
- },
- "type": "Microsoft.Compute/virtualMachineScaleSets",
- "location": "eastus",
- "tags": {
- "test": "test"
- },
- "id": "/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxxx/resourceGroups/jcloud-eastus/providers/Microsoft.Compute/virtualMachineScaleSets/jclouds-vmssname",
- "name": "jclouds-vmssname"
-}
-
diff --git a/azurecompute-arm/src/test/resources/virtualmachinescalesetgetwhen404.json b/azurecompute-arm/src/test/resources/virtualmachinescalesetgetwhen404.json
deleted file mode 100644
index b6fbeaa..0000000
--- a/azurecompute-arm/src/test/resources/virtualmachinescalesetgetwhen404.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "error": {
- "code": "ResourceNotFound",
- "message": "The Resource 'Microsoft.Compute/virtualMachineScaleSets/jclouds-vmssname1' under resource group 'jcloud-eastus' was not found."
- }
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/virtualmachinescalesetlist.json b/azurecompute-arm/src/test/resources/virtualmachinescalesetlist.json
deleted file mode 100644
index b5bd063..0000000
--- a/azurecompute-arm/src/test/resources/virtualmachinescalesetlist.json
+++ /dev/null
@@ -1,93 +0,0 @@
-{
- "value": [{
- "sku": {
- "name": "Standard_A1",
- "tier": "Standard",
- "capacity": 4
- },
- "properties": {
- "singlePlacementGroup": true,
- "upgradePolicy": {
- "mode": "Manual",
- "automaticOSUpgrade": false
- },
- "virtualMachineProfile": {
- "osProfile": {
- "computerNamePrefix": "vmmsprefix",
- "adminUsername": "jclouds",
- "linuxConfiguration": {
- "disablePasswordAuthentication": false
- },
- "secrets": []
- },
- "storageProfile": {
- "osDisk": {
- "createOption": "FromImage",
- "caching": "None",
- "managedDisk": {
- "storageAccountType": "Standard_LRS"
- }
- },
- "imageReference": {
- "publisher": "Canonical",
- "offer": "UbuntuServer",
- "sku": "16.04-LTS",
- "version": "latest"
- }
- },
- "networkProfile": {
- "networkInterfaceConfigurations": [{
- "name": "nicconfig1",
- "properties": {
- "primary": true,
- "enableAcceleratedNetworking": false,
- "dnsSettings": {
- "dnsServers": ["8.8.8.8"]
- },
- "ipConfigurations": [{
- "name": "ipconfig1",
- "properties": {
- "publicIPAddressConfiguration": {
- "name": "pub1",
- "properties": {
- "idleTimeoutInMinutes": 15
- }
- },
- "subnet": {
- "id": "/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxxx/resourceGroups/jcloud-eastus/providers/Microsoft.Network/virtualNetworks/jclouds-eastus-virtualNetworkName/subnets/jclouds-eastus-subnet"
- },
- "privateIPAddressVersion": "IPv4"
- }
- }]
- }
- }]
- },
- "extensionProfile": {
- "extensions": [{
- "properties": {
- "publisher": "Microsoft.compute",
- "type": "CustomScriptExtension",
- "typeHandlerVersion": "1.1",
- "autoUpgradeMinorVersion": false,
- "settings": {
- "fileUris": ["https://mystorage1.blob.core.windows.net/winvmextekfacnt/SampleCmd_1.cmd"],
- "commandToExecute": "SampleCmd_1.cmd"
- }
- },
- "name": "extensionName"
- }]
- }
- },
- "provisioningState": "Failed",
- "overprovision": true,
- "uniqueId": "xxxxx-xxxx-xxxx-xxxx-xxxxxx"
- },
- "type": "Microsoft.Compute/virtualMachineScaleSets",
- "location": "eastus",
- "tags": {
- "test": "test"
- },
- "id": "/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxxx/resourceGroups/jcloud-eastus/providers/Microsoft.Compute/virtualMachineScaleSets/jclouds-vmssname",
- "name": "jclouds-vmssname"
- }]
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/virtualmachinescalesetlistwhen404.json b/azurecompute-arm/src/test/resources/virtualmachinescalesetlistwhen404.json
deleted file mode 100644
index 635083c..0000000
--- a/azurecompute-arm/src/test/resources/virtualmachinescalesetlistwhen404.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "error": {
- "code": "ResourceGroupNotFound",
- "message": "Resource group 'jcloud-eastus1' could not be found."
- }
-}
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/virtualmachinescalesetresponsecreateorupdate.json b/azurecompute-arm/src/test/resources/virtualmachinescalesetresponsecreateorupdate.json
deleted file mode 100644
index 20ecd71..0000000
--- a/azurecompute-arm/src/test/resources/virtualmachinescalesetresponsecreateorupdate.json
+++ /dev/null
@@ -1,103 +0,0 @@
-{
- "location": "eastus",
- "sku": {
- "name": "Standard_A1",
- "tier": "Standard",
- "capacity": 10
- },
- "properties": {
- "singlePlacementGroup": true,
- "overProvision": true,
- "upgradePolicy": {
- "mode": "Manual"
- },
- "virtualMachineProfile": {
- "storageProfile": {
- "imageReference": {
- "publisher": "Canonical",
- "offer": "UbuntuServer",
- "sku": "16.04-LTS",
- "version": "latest"
- },
- "osDisk": {
- "osType": "Windows",
- "createOption": "FromImage",
- "managedDisk": {
- "storageAccountType": "Standard_LRS"
- }
- },
- "dataDisks": [{
- "diskSizeGB": "10",
- "lun": 1,
- "createOption": "Unrecognized",
- "caching": "None",
- "managedDisk": {
- "storageAccountType": "Standard_LRS"
- }
- }
- ]
- },
- "osProfile": {
- "computerNamePrefix": "jclouds-vmssname",
- "adminUsername": "jclouds",
- "adminPassword": "jClouds1!",
- "linuxConfiguration": {
- "disablePasswordAuthentication": "False"
- },
- "secrets": []
- },
- "networkProfile": {
- "networkInterfaceConfigurations": [{
- "name": "nicconfig1",
- "properties": {
- "primary": true,
- "enableAcceleratedNetworking": false,
- "dnsSettings": {
- "dnsServers": ["8.8.8.8"]
- },
- "ipConfigurations": [{
- "name": "ipconfig1",
- "properties": {
- "publicIPAddressConfiguration": {
- "name": "pub1",
- "properties": {
- "idleTimeoutInMinutes": 15
- }
- },
- "subnet": {
- "name": "virtualNetworkName",
- "id": "/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxxx/resourceGroups/jcloud-eastus/providers/Microsoft.Network/virtualNetworks/jclouds-eastus-virtualNetworkName/subnets/jclouds-eastus-subnet",
- "properties": {}
- },
- "privateIPAddressVersion": "IPv4",
- "loadBalancerBackendAddressPools": [],
- "loadBalancerInboundNatPools": []
- }
- }
- ]
- }
- }
- ]
- },
- "extensionProfile": {
- "extensions": [{
- "name": "extensionName",
- "properties": {
- "publisher": "Microsoft.compute",
- "type": "CustomScriptExtension",
- "typeHandlerVersion": "1.1",
- "autoUpgradeMinorVersion": false,
- "settings": {
- "fileUris": ["https://mystorage1.blob.core.windows.net/winvmextekfacnt/SampleCmd_1.cmd"],
- "commandToExecute": "SampleCmd_1.cmd"
- },
- "protectedSettings": {
- "StorageAccountKey": "jclouds-accountkey"
- }
- }
- }
- ]
- }
- }
- }
-}
diff --git a/azurecompute-arm/src/test/resources/virtualnetwork.json b/azurecompute-arm/src/test/resources/virtualnetwork.json
deleted file mode 100644
index 924c79c..0000000
--- a/azurecompute-arm/src/test/resources/virtualnetwork.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "name": "mockvirtualnetwork",
- "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/azurearmtesting/providers/Microsoft.Network/virtualNetworks/mockvirtualnetwork",
- "etag": "W/\"0dcd223f-670c-49ca-abe7-5978d127c131\"",
- "type": "Microsoft.Network/virtualNetworks",
- "location": "northeurope",
- "tags": {
- "tagkey": "tagvalue"
- },
- "properties": {
- "provisioningState": "Succeeded",
- "resourceGuid": "1568c76a-73a4-4a60-8dfb-53b823197ccb",
- "addressSpace": {
- "addressPrefixes": [
- "10.2.0.0/16"
- ]
- },
- "subnets": []
- }
- }
\ No newline at end of file
diff --git a/azurecompute-arm/src/test/resources/vmsizes.json b/azurecompute-arm/src/test/resources/vmsizes.json
deleted file mode 100644
index 19ec780..0000000
--- a/azurecompute-arm/src/test/resources/vmsizes.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "value": [
- {
- "name": "Standard_A0",
- "numberOfCores": 1,
- "osDiskSizeInMB": 1047552,
- "resourceDiskSizeInMB": 20480,
- "memoryInMB": 768,
- "maxDataDiskCount": 1
- },
- {
- "name": "Standard_A1",
- "numberOfCores": 1,
- "osDiskSizeInMB": 1047552,
- "resourceDiskSizeInMB": 71680,
- "memoryInMB": 1792,
- "maxDataDiskCount": 2
- },
- {
- "name": "Standard_A2",
- "numberOfCores": 2,
- "osDiskSizeInMB": 1047552,
- "resourceDiskSizeInMB": 138240,
- "memoryInMB": 3584,
- "maxDataDiskCount": 4
- }
- ]
-}
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index f660072..2904e46 100644
--- a/pom.xml
+++ b/pom.xml
@@ -54,7 +54,6 @@
</repositories>
<modules>
- <module>azurecompute-arm</module>
<module>azurecompute</module>
<module>cdmi</module>
<module>cloudsigma2</module>