You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by an...@apache.org on 2014/10/02 23:53:10 UTC
[06/11] JCLOUDS-664 Updating Azure compute provider
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azure-management/src/test/java/org/jclouds/azure/management/features/OSImageApiLiveTest.java
----------------------------------------------------------------------
diff --git a/azure-management/src/test/java/org/jclouds/azure/management/features/OSImageApiLiveTest.java b/azure-management/src/test/java/org/jclouds/azure/management/features/OSImageApiLiveTest.java
deleted file mode 100644
index 355617a..0000000
--- a/azure-management/src/test/java/org/jclouds/azure/management/features/OSImageApiLiveTest.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.azure.management.features;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-import static com.google.common.collect.Iterables.transform;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertNotEquals;
-import static org.testng.Assert.assertTrue;
-
-import java.util.Set;
-
-import org.jclouds.azure.management.domain.Location;
-import org.jclouds.azure.management.domain.OSImage;
-import org.jclouds.azure.management.domain.OSType;
-import org.jclouds.azure.management.internal.BaseAzureManagementApiLiveTest;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Function;
-import com.google.common.collect.ImmutableSet;
-
-@Test(groups = "live", testName = "OSImageApiLiveTest")
-public class OSImageApiLiveTest extends BaseAzureManagementApiLiveTest {
-
- private ImmutableSet<String> locations;
-
- @BeforeClass(groups = { "integration", "live" })
- public void setupContext() {
- super.initializeContext();
-
- locations = ImmutableSet.copyOf(transform(context.getApi().getLocationApi().list(),
- new Function<Location, String>() {
- @Override
- public String apply(Location in) {
- return in.getName();
- }
- }));
- }
-
- @Test
- protected void testList() {
- Set<OSImage> response = api().list();
-
- for (OSImage image : response) {
- checkOSImage(image);
- }
- }
-
- private void checkOSImage(OSImage image) {
- checkNotNull(image.getLabel(), "Label cannot be null for OSImage %s", image);
- checkNotNull(image.getName(), "Name cannot be null for OSImage %s", image.getLabel());
- checkNotNull(image.getOS(), "OS cannot be null for OSImage: %s", image);
- assertNotEquals(image.getOS(), OSType.UNRECOGNIZED, "Status cannot be UNRECOGNIZED for OSImage: " + image);
-
- checkNotNull(image.getCategory(), "While Category can be null for OSImage, its Optional wrapper cannot: %s",
- image);
- if (image.getCategory().isPresent())
- assertNotEquals("", image.getCategory().get().trim(), "Invalid Category: " + image.toString());
-
- checkNotNull(image.getLogicalSizeInGB(),
- "While LogicalSizeInGB can be null for OSImage, its Optional wrapper cannot: %s", image);
-
- if (image.getLogicalSizeInGB().isPresent())
- assertTrue(image.getLogicalSizeInGB().get() > 0,
- "LogicalSizeInGB should be positive, if set" + image.toString());
-
- checkNotNull(image.getMediaLink(), "While MediaLink can be null for OSImage, its Optional wrapper cannot: %s",
- image);
-
- if (image.getMediaLink().isPresent())
- assertTrue(ImmutableSet.of("http", "https").contains(image.getMediaLink().get().getScheme()),
- "MediaLink should be an http(s) url" + image.toString());
-
- checkNotNull(image.getDescription(),
- "While Description can be null for OSImage, its Optional wrapper cannot: %s", image);
-
- checkNotNull(image.getLocation(), "While Location can be null for OSImage, its Optional wrapper cannot: %s",
- image);
- if (image.getLocation().isPresent()) {
- assertTrue(locations.contains(image.getLocation().get()),
- "Location not in " + locations + " :" + image.toString());
- }
-
- checkNotNull(image.getEula(), "While Eula can be null for OSImage, its Optional wrapper cannot: %s",
- image);
- if (image.getEula().isPresent()) {
- assertTrue(ImmutableSet.of("http", "https").contains(image.getEula().get().getScheme()),
- "Eula should be an http(s) url" + image.toString());
- }
-
- checkNotNull(image.getAffinityGroup(),
- "While AffinityGroup can be null for OSImage, its Optional wrapper cannot: %s", image);
- if (image.getAffinityGroup().isPresent()) {
- // TODO: list getAffinityGroups and check if there
- }
- }
-
- protected OSImageApi api() {
- return context.getApi().getOSImageApi();
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azure-management/src/test/java/org/jclouds/azure/management/features/OperationApiExpectTest.java
----------------------------------------------------------------------
diff --git a/azure-management/src/test/java/org/jclouds/azure/management/features/OperationApiExpectTest.java b/azure-management/src/test/java/org/jclouds/azure/management/features/OperationApiExpectTest.java
deleted file mode 100644
index 3989681..0000000
--- a/azure-management/src/test/java/org/jclouds/azure/management/features/OperationApiExpectTest.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.azure.management.features;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNull;
-
-import org.jclouds.azure.management.AzureManagementApi;
-import org.jclouds.azure.management.internal.BaseAzureManagementApiExpectTest;
-import org.jclouds.azure.management.parse.GetOperationTest;
-import org.jclouds.http.HttpRequest;
-import org.jclouds.http.HttpResponse;
-import org.testng.annotations.Test;
-
-@Test(groups = "unit", testName = "OperationApiExpectTest")
-public class OperationApiExpectTest extends BaseAzureManagementApiExpectTest {
- private static final String REQUEST_ID ="request-id";
-
- HttpRequest get = HttpRequest.builder().method("GET")
- .endpoint("https://management.core.windows.net/" + subscriptionId + "/operations/" + REQUEST_ID)
- .addHeader("x-ms-version", "2012-03-01")
- .addHeader("Accept", "application/xml").build();
-
- public void testGetWhenResponseIs2xx() throws Exception {
- HttpResponse getResponse = HttpResponse.builder().statusCode(200)
- .payload(payloadFromResourceWithContentType("/operation.xml", "application")).build();
-
- AzureManagementApi apiWhenExist = requestSendsResponse(get, getResponse);
-
- assertEquals(apiWhenExist.getOperationApi().get(REQUEST_ID).toString(), new GetOperationTest().expected().toString());
- }
-
- public void testGetWhenResponseIs404() throws Exception {
- HttpResponse getResponse = HttpResponse.builder().statusCode(404).build();
-
- AzureManagementApi apiWhenDontExist = requestSendsResponse(get, getResponse);
-
- assertNull(apiWhenDontExist.getOperationApi().get(REQUEST_ID));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azure-management/src/test/java/org/jclouds/azure/management/features/RoleApiExpectTest.java
----------------------------------------------------------------------
diff --git a/azure-management/src/test/java/org/jclouds/azure/management/features/RoleApiExpectTest.java b/azure-management/src/test/java/org/jclouds/azure/management/features/RoleApiExpectTest.java
deleted file mode 100644
index bfb38dd..0000000
--- a/azure-management/src/test/java/org/jclouds/azure/management/features/RoleApiExpectTest.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.azure.management.features;
-
-import org.jclouds.azure.management.AzureManagementApi;
-import org.jclouds.azure.management.domain.DeploymentParams;
-import org.jclouds.azure.management.domain.OSType;
-import org.jclouds.azure.management.domain.RoleSize;
-import org.jclouds.azure.management.internal.BaseAzureManagementApiExpectTest;
-import org.jclouds.http.HttpRequest;
-import org.jclouds.http.HttpResponse;
-import org.testng.annotations.Test;
-
-@Test(groups = "unit", testName = "RoleApiExpectTest")
-public class RoleApiExpectTest extends BaseAzureManagementApiExpectTest {
-
- private static final String DEPLOYMENT_NAME = "mydeployment";
- private static final String IMAGE_NAME = "myImageName";
- private static final String IMAGE_LABEL = "myImageLabel";
-
- HttpRequest add = HttpRequest
- .builder()
- .method("POST")
- .endpoint(
- "https://management.core.windows.net/" + subscriptionId
- + "/services/hostedservices/" + DEPLOYMENT_NAME
- + "/deployments")
- .addHeader("x-ms-version", "2012-03-01")
- .addHeader("Accept", "application/atom+xml")
- .payload(
- payloadFromResourceWithContentType("/deploymentparams.xml",
- "application/atom+xml")).build();
-
- public void testAddWhenResponseIs2xx() throws Exception {
- HttpResponse addResponse = HttpResponse.builder().statusCode(200)
- .addHeader("x-ms-request-id", "fakerequestid").build();
-
- AzureManagementApi apiWhenExist = requestSendsResponse(add, addResponse);
- DeploymentParams params = DeploymentParams
- .builder()
- .osType(OSType.LINUX)
- .name(DEPLOYMENT_NAME)
- .username("username")
- .password("testpwd")
- .size(RoleSize.MEDIUM)
- .sourceImageName(
- "OpenLogic__OpenLogic-CentOS-62-20120531-en-us-30GB.vhd")
- .storageAccount("portalvhds0g7xhnq2x7t21").build();
-
- apiWhenExist.getRoleApi().createDeployment(DEPLOYMENT_NAME, params);
- }
-
- HttpRequest start = HttpRequest
- .builder()
- .method("POST")
- .endpoint(
- "https://management.core.windows.net/" + subscriptionId
- + "/services/hostedservices/" + DEPLOYMENT_NAME
- + "/deployments/" + DEPLOYMENT_NAME
- + "/roleInstances/" + DEPLOYMENT_NAME
- + "/Operations")
- .addHeader("x-ms-version", "2012-03-01")
- .addHeader("Accept", "application/atom+xml")
- .payload(
- payloadFromResourceWithContentType("/startrolepayload.xml",
- "application/atom+xml")).build();
-
- public void testStartWhenResponseIs2xx() throws Exception {
- HttpResponse addResponse = HttpResponse.builder().statusCode(200)
- .addHeader("x-ms-request-id", "fakerequestid").build();
-
- AzureManagementApi apiWhenExist = requestSendsResponse(start,
- addResponse);
-
- apiWhenExist.getRoleApi().startRole(DEPLOYMENT_NAME, DEPLOYMENT_NAME,
- DEPLOYMENT_NAME);
- }
-
- HttpRequest shutdown = HttpRequest
- .builder()
- .method("POST")
- .endpoint(
- "https://management.core.windows.net/" + subscriptionId
- + "/services/hostedservices/" + DEPLOYMENT_NAME
- + "/deployments/" + DEPLOYMENT_NAME
- + "/roleInstances/" + DEPLOYMENT_NAME
- + "/Operations")
- .addHeader("x-ms-version", "2012-03-01")
- .addHeader("Accept", "application/atom+xml")
- .payload(
- payloadFromResourceWithContentType(
- "/shutdownrolepayload.xml", "application/atom+xml"))
- .build();
-
- public void testShutdownWhenResponseIs2xx() throws Exception {
- HttpResponse addResponse = HttpResponse.builder().statusCode(200)
- .addHeader("x-ms-request-id", "fakerequestid").build();
-
- AzureManagementApi apiWhenExist = requestSendsResponse(shutdown,
- addResponse);
-
- apiWhenExist.getRoleApi().shutdownRole(DEPLOYMENT_NAME,
- DEPLOYMENT_NAME, DEPLOYMENT_NAME);
- }
-
- HttpRequest restart = HttpRequest
- .builder()
- .method("POST")
- .endpoint(
- "https://management.core.windows.net/" + subscriptionId
- + "/services/hostedservices/" + DEPLOYMENT_NAME
- + "/deployments/" + DEPLOYMENT_NAME
- + "/roleInstances/" + DEPLOYMENT_NAME
- + "/Operations")
- .addHeader("x-ms-version", "2012-03-01")
- .addHeader("Accept", "application/atom+xml")
- .payload(
- payloadFromResourceWithContentType(
- "/restartrolepayload.xml", "application/atom+xml"))
- .build();
-
- public void testRestartWhenResponseIs2xx() throws Exception {
- HttpResponse addResponse = HttpResponse.builder().statusCode(200)
- .addHeader("x-ms-request-id", "fakerequestid").build();
-
- AzureManagementApi apiWhenExist = requestSendsResponse(restart,
- addResponse);
-
- apiWhenExist.getRoleApi().restartRole(DEPLOYMENT_NAME, DEPLOYMENT_NAME,
- DEPLOYMENT_NAME);
- }
-
- HttpRequest capture = HttpRequest
- .builder()
- .method("POST")
- .endpoint(
- "https://management.core.windows.net/" + subscriptionId
- + "/services/hostedservices/" + DEPLOYMENT_NAME
- + "/deployments/" + DEPLOYMENT_NAME
- + "/roleInstances/" + DEPLOYMENT_NAME
- + "/Operations")
- .addHeader("x-ms-version", "2012-03-01")
- .addHeader("Accept", "application/atom+xml")
- .payload(
- payloadFromResourceWithContentType(
- "/capturerolepayload.xml", "application/atom+xml"))
- .build();
-
- public void testCaptureWhenResponseIs2xx() throws Exception {
- HttpResponse addResponse = HttpResponse.builder().statusCode(200)
- .addHeader("x-ms-request-id", "fakerequestid").build();
-
- AzureManagementApi apiWhenExist = requestSendsResponse(capture,
- addResponse);
-
- apiWhenExist.getRoleApi().captureRole(DEPLOYMENT_NAME, DEPLOYMENT_NAME,
- DEPLOYMENT_NAME, IMAGE_NAME, IMAGE_LABEL);
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azure-management/src/test/java/org/jclouds/azure/management/internal/BaseAzureManagementApiExpectTest.java
----------------------------------------------------------------------
diff --git a/azure-management/src/test/java/org/jclouds/azure/management/internal/BaseAzureManagementApiExpectTest.java b/azure-management/src/test/java/org/jclouds/azure/management/internal/BaseAzureManagementApiExpectTest.java
deleted file mode 100644
index 2300b64..0000000
--- a/azure-management/src/test/java/org/jclouds/azure/management/internal/BaseAzureManagementApiExpectTest.java
+++ /dev/null
@@ -1,23 +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.azure.management.internal;
-
-import org.jclouds.azure.management.AzureManagementApi;
-
-public class BaseAzureManagementApiExpectTest extends BaseAzureManagementExpectTest<AzureManagementApi> {
-
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azure-management/src/test/java/org/jclouds/azure/management/internal/BaseAzureManagementApiLiveTest.java
----------------------------------------------------------------------
diff --git a/azure-management/src/test/java/org/jclouds/azure/management/internal/BaseAzureManagementApiLiveTest.java b/azure-management/src/test/java/org/jclouds/azure/management/internal/BaseAzureManagementApiLiveTest.java
deleted file mode 100644
index c7d2984..0000000
--- a/azure-management/src/test/java/org/jclouds/azure/management/internal/BaseAzureManagementApiLiveTest.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.azure.management.internal;
-
-import java.util.Properties;
-
-import org.jclouds.apis.BaseContextLiveTest;
-import org.jclouds.azure.management.AzureManagementApi;
-import org.jclouds.azure.management.AzureManagementApiMetadata;
-import org.jclouds.azure.management.AzureManagementAsyncApi;
-import org.jclouds.azure.management.config.AzureManagementProperties;
-import org.jclouds.rest.RestContext;
-
-import com.google.common.reflect.TypeToken;
-
-public class BaseAzureManagementApiLiveTest extends
- BaseContextLiveTest<RestContext<AzureManagementApi, AzureManagementAsyncApi>> {
-
- protected String subscriptionId;
-
- public BaseAzureManagementApiLiveTest() {
- provider = "azure-management";
- }
-
- @Override
- protected Properties setupProperties() {
- Properties props = super.setupProperties();
- subscriptionId = setIfTestSystemPropertyPresent(props, AzureManagementProperties.SUBSCRIPTION_ID);
- return props;
- }
-
- @Override
- protected TypeToken<RestContext<AzureManagementApi, AzureManagementAsyncApi>> contextType() {
- return AzureManagementApiMetadata.CONTEXT_TOKEN;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azure-management/src/test/java/org/jclouds/azure/management/internal/BaseAzureManagementAsyncApiExpectTest.java
----------------------------------------------------------------------
diff --git a/azure-management/src/test/java/org/jclouds/azure/management/internal/BaseAzureManagementAsyncApiExpectTest.java b/azure-management/src/test/java/org/jclouds/azure/management/internal/BaseAzureManagementAsyncApiExpectTest.java
deleted file mode 100644
index 1a1f395..0000000
--- a/azure-management/src/test/java/org/jclouds/azure/management/internal/BaseAzureManagementAsyncApiExpectTest.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.azure.management.internal;
-
-import java.util.Properties;
-
-import org.jclouds.azure.management.AzureManagementAsyncApi;
-import org.jclouds.http.HttpRequest;
-import org.jclouds.http.HttpResponse;
-
-import com.google.common.base.Function;
-import com.google.inject.Module;
-
-public class BaseAzureManagementAsyncApiExpectTest extends BaseAzureManagementExpectTest<AzureManagementAsyncApi> {
- public AzureManagementAsyncApi createApi(Function<HttpRequest, HttpResponse> fn, Module module, Properties props) {
- return createInjector(fn, module, props).getInstance(AzureManagementAsyncApi.class);
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azure-management/src/test/java/org/jclouds/azure/management/internal/BaseAzureManagementExpectTest.java
----------------------------------------------------------------------
diff --git a/azure-management/src/test/java/org/jclouds/azure/management/internal/BaseAzureManagementExpectTest.java b/azure-management/src/test/java/org/jclouds/azure/management/internal/BaseAzureManagementExpectTest.java
deleted file mode 100644
index bc40116..0000000
--- a/azure-management/src/test/java/org/jclouds/azure/management/internal/BaseAzureManagementExpectTest.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.azure.management.internal;
-
-import java.util.Properties;
-
-import org.jclouds.azure.management.config.AzureManagementProperties;
-import org.jclouds.azure.management.config.AzureManagementRestClientModule;
-import org.jclouds.rest.ConfiguresRestClient;
-import org.jclouds.rest.internal.BaseRestApiExpectTest;
-
-import com.google.inject.Module;
-
-public class BaseAzureManagementExpectTest<T> extends BaseRestApiExpectTest<T> {
- protected String subscriptionId = "a01234b5c-d6e7-8f9g-h0123-4567i890j1k";
-
- public BaseAzureManagementExpectTest() {
- provider = "azure-management";
- // self-signed dummy cert:
- // keytool -genkey -alias test -keyalg RSA -keysize 1024 -validity 5475 -dname "CN=localhost" -keystore azure-test.p12 -storepass azurepass -storetype pkcs12
- identity = this.getClass().getResource("/azure-test.p12").getFile();
- credential = "azurepass";
- }
-
- @Override
- protected Properties setupProperties() {
- Properties props = super.setupProperties();
- props.put(AzureManagementProperties.SUBSCRIPTION_ID, subscriptionId);
- return props;
- }
-
- @ConfiguresRestClient
- private static final class TestAzureManagementRestClientModule extends AzureManagementRestClientModule {
-
- }
-
- @Override
- protected Module createModule() {
- return new TestAzureManagementRestClientModule();
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azure-management/src/test/java/org/jclouds/azure/management/parse/ErrorTest.java
----------------------------------------------------------------------
diff --git a/azure-management/src/test/java/org/jclouds/azure/management/parse/ErrorTest.java b/azure-management/src/test/java/org/jclouds/azure/management/parse/ErrorTest.java
deleted file mode 100644
index 6de18dc..0000000
--- a/azure-management/src/test/java/org/jclouds/azure/management/parse/ErrorTest.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.azure.management.parse;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-
-import org.jclouds.azure.management.domain.Error;
-import org.jclouds.azure.management.domain.Error.Code;
-import org.jclouds.azure.management.xml.ErrorHandler;
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-// NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
-@Test(groups = "unit", testName = "ErrorTest")
-public class ErrorTest extends BaseHandlerTest {
-
- public void test() {
- InputStream is = getClass().getResourceAsStream("/error.xml");
-
- Error expected = expected();
-
- ErrorHandler handler = injector.getInstance(ErrorHandler.class);
- Error result = factory.create(handler).parse(is);
-
- assertEquals(result.toString(), expected.toString());
-
- }
-
- public Error expected() {
- return Error.builder()
- .rawCode("MissingOrInvalidRequiredQueryParameter")
- .code(Code.MISSING_OR_INVALID_REQUIRED_QUERY_PARAMETER)
- .message("A required query parameter was not specified for this request or was specified incorrectly.")
- .build();
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azure-management/src/test/java/org/jclouds/azure/management/parse/GetDeploymentTest.java
----------------------------------------------------------------------
diff --git a/azure-management/src/test/java/org/jclouds/azure/management/parse/GetDeploymentTest.java b/azure-management/src/test/java/org/jclouds/azure/management/parse/GetDeploymentTest.java
deleted file mode 100644
index 12d10a1..0000000
--- a/azure-management/src/test/java/org/jclouds/azure/management/parse/GetDeploymentTest.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.azure.management.parse;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-import java.net.URI;
-
-import org.jclouds.azure.management.domain.Deployment;
-import org.jclouds.azure.management.domain.DeploymentSlot;
-import org.jclouds.azure.management.domain.DeploymentStatus;
-import org.jclouds.azure.management.domain.InstanceStatus;
-import org.jclouds.azure.management.domain.RoleSize;
-import org.jclouds.azure.management.xml.DeploymentHandler;
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-// NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
-@Test(groups = "unit", testName = "GetDeploymentTest")
-public class GetDeploymentTest extends BaseHandlerTest {
-
- public void test() {
- InputStream is = getClass().getResourceAsStream("/deployment.xml");
-
- Deployment expected = expected();
-
- DeploymentHandler handler = injector.getInstance(DeploymentHandler.class);
- Deployment result = factory.create(handler).parse(is);
-
- assertEquals(result.toString(), expected.toString());
-
- }
-
- public Deployment expected() {
- return Deployment.builder()
- .deploymentName("neotysss")
- .deploymentSlot(DeploymentSlot.PRODUCTION)
- .deploymentStatus(DeploymentStatus.RUNNING)
- .deploymentLabel("neotysss")
- .deploymentURL(URI.create("http://neotysss.cloudapp.net/"))
- .roleName("neotysss")
- .instanceName("neotysss")
- .instanceStatus(InstanceStatus.READY_ROLE)
- .instanceSize(RoleSize.MEDIUM)
- .privateIpAddress("10.59.244.162")
- .publicIpAddress("168.63.27.148")
- .build();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azure-management/src/test/java/org/jclouds/azure/management/parse/GetHostedServiceDetailsTest.java
----------------------------------------------------------------------
diff --git a/azure-management/src/test/java/org/jclouds/azure/management/parse/GetHostedServiceDetailsTest.java b/azure-management/src/test/java/org/jclouds/azure/management/parse/GetHostedServiceDetailsTest.java
deleted file mode 100644
index a6e2dcb..0000000
--- a/azure-management/src/test/java/org/jclouds/azure/management/parse/GetHostedServiceDetailsTest.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.azure.management.parse;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-import java.net.URI;
-
-import org.jclouds.azure.management.domain.DetailedHostedServiceProperties;
-import org.jclouds.azure.management.domain.HostedService;
-import org.jclouds.azure.management.domain.HostedService.Status;
-import org.jclouds.azure.management.domain.HostedServiceWithDetailedProperties;
-import org.jclouds.azure.management.xml.HostedServiceWithDetailedPropertiesHandler;
-import org.jclouds.date.DateService;
-import org.jclouds.date.internal.SimpleDateFormatDateService;
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-// NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
-@Test(groups = "unit", testName = "DetailedHostedServiceProperties")
-public class GetHostedServiceDetailsTest extends BaseHandlerTest {
-
- public void test() {
- InputStream is = getClass().getResourceAsStream("/hostedservice_details.xml");
-
- HostedService expected = expected();
-
- HostedServiceWithDetailedPropertiesHandler handler = injector.getInstance(HostedServiceWithDetailedPropertiesHandler.class);
- HostedServiceWithDetailedProperties result = HostedServiceWithDetailedProperties.class.cast(factory.create(handler).parse(is));
-
- assertEquals(result.toString(), expected.toString());
-
- }
-
- protected final DateService dateService = new SimpleDateFormatDateService();
-
- public HostedServiceWithDetailedProperties expected() {
- return HostedServiceWithDetailedProperties.builder()
- .url(URI.create("https://management.core.windows.net/eb0347c3-68d4-4550-9b39-5e7e0f92f7db/services/hostedservices/neotys"))
- .name("neotys")
- .properties(DetailedHostedServiceProperties.builder()
- .description("Implicitly created hosted service2012-08-06 14:55")
- .location("West Europe")
- .label("neotys")
- .rawStatus("Created")
- .status(Status.CREATED)
- .created(dateService.iso8601SecondsDateParse("2012-08-06T14:55:17Z"))
- .lastModified(dateService.iso8601SecondsDateParse("2012-08-06T15:50:34Z"))
- .build())
- .build();
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azure-management/src/test/java/org/jclouds/azure/management/parse/GetHostedServiceTest.java
----------------------------------------------------------------------
diff --git a/azure-management/src/test/java/org/jclouds/azure/management/parse/GetHostedServiceTest.java b/azure-management/src/test/java/org/jclouds/azure/management/parse/GetHostedServiceTest.java
deleted file mode 100644
index 7469591..0000000
--- a/azure-management/src/test/java/org/jclouds/azure/management/parse/GetHostedServiceTest.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.azure.management.parse;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-import java.net.URI;
-
-import org.jclouds.azure.management.domain.HostedService;
-import org.jclouds.azure.management.domain.HostedServiceProperties;
-import org.jclouds.azure.management.xml.HostedServiceHandler;
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-// NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
-@Test(groups = "unit", testName = "GetHostedServiceTest")
-public class GetHostedServiceTest extends BaseHandlerTest {
-
- public void test() {
- InputStream is = getClass().getResourceAsStream("/hostedservice.xml");
-
- HostedService expected = expected();
-
- HostedServiceHandler handler = injector.getInstance(HostedServiceHandler.class);
- HostedService result = factory.create(handler).parse(is);
-
- assertEquals(result.toString(), expected.toString());
-
- }
-
- public HostedService expected() {
- return HostedService.builder()
- .url(URI.create("https://management.core.windows.net/eb0347c3-68d4-4550-9b39-5e7e0f92f7db/services/hostedservices/neotys"))
- .name("neotys")
- .properties(HostedServiceProperties.builder()
- .description("Implicitly created hosted service2012-08-06 14:55")
- .location("West Europe")
- .label("neotys")
- .build())
- .build();
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azure-management/src/test/java/org/jclouds/azure/management/parse/GetOperationTest.java
----------------------------------------------------------------------
diff --git a/azure-management/src/test/java/org/jclouds/azure/management/parse/GetOperationTest.java b/azure-management/src/test/java/org/jclouds/azure/management/parse/GetOperationTest.java
deleted file mode 100644
index 1b8458e..0000000
--- a/azure-management/src/test/java/org/jclouds/azure/management/parse/GetOperationTest.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.azure.management.parse;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-
-import org.jclouds.azure.management.domain.Error;
-import org.jclouds.azure.management.domain.Error.Code;
-import org.jclouds.azure.management.domain.Operation;
-import org.jclouds.azure.management.domain.Operation.Status;
-import org.jclouds.azure.management.xml.OperationHandler;
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-// NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
-@Test(groups = "unit", testName = "GetOperationTest")
-public class GetOperationTest extends BaseHandlerTest {
-
- public void test() {
- InputStream is = getClass().getResourceAsStream("/operation.xml");
-
- Operation expected = expected();
-
- OperationHandler handler = injector.getInstance(OperationHandler.class);
- Operation result = factory.create(handler).parse(is);
-
- assertEquals(result.toString(), expected.toString());
-
- }
-
- public Operation expected() {
- return Operation.builder()
- .id("request-id")
- .rawStatus("Failed")
- .status(Status.FAILED)
- .httpStatusCode(400)
- .error(Error.builder()
- .rawCode("MissingOrInvalidRequiredQueryParameter")
- .code(Code.MISSING_OR_INVALID_REQUIRED_QUERY_PARAMETER)
- .message("A required query parameter was not specified for this request or was specified incorrectly.")
- .build())
- .build();
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azure-management/src/test/java/org/jclouds/azure/management/parse/ListDisksTest.java
----------------------------------------------------------------------
diff --git a/azure-management/src/test/java/org/jclouds/azure/management/parse/ListDisksTest.java b/azure-management/src/test/java/org/jclouds/azure/management/parse/ListDisksTest.java
deleted file mode 100644
index 814eeed..0000000
--- a/azure-management/src/test/java/org/jclouds/azure/management/parse/ListDisksTest.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.azure.management.parse;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-import java.net.URI;
-import java.util.Set;
-
-import org.jclouds.azure.management.domain.Disk;
-import org.jclouds.azure.management.domain.Disk.Attachment;
-import org.jclouds.azure.management.domain.OSType;
-import org.jclouds.azure.management.xml.ListDisksHandler;
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableSet;
-
-// NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
-@Test(groups = "unit", testName = "ListDisksTest")
-public class ListDisksTest extends BaseHandlerTest {
-
- public void test() {
- InputStream is = getClass().getResourceAsStream("/disks.xml");
-
- Set<Disk> expected = expected();
-
- ListDisksHandler handler = injector.getInstance(ListDisksHandler.class);
- Set<Disk> result = factory.create(handler).parse(is);
-
- assertEquals(result.toString(), expected.toString());
-
- }
-
- public Set<Disk> expected() {
-
- return ImmutableSet.<Disk>builder()
- .add(Disk.builder()
- .os(OSType.LINUX)
- .location("West Europe")
- .logicalSizeInGB(30)
- .mediaLink(URI.create("http://neotysbucket1.blob.core.windows.net/vhds/testimage2-testimage2-2012-08-17.vhd"))
- .name("testimage2-testimage2-0-20120817095145")
- .sourceImage("OpenLogic__OpenLogic-CentOS-62-20120531-en-us-30GB.vhd")
- .build())
- .add(Disk.builder()
- .attachedTo(Attachment.builder().deployment("neotysss").hostedService("neotysss").role("neotysss").build())
- .os(OSType.WINDOWS)
- .location("West Europe")
- .logicalSizeInGB(30)
- .mediaLink(URI.create("http://portalvhds0g7xhnq2x7t21.blob.core.windows.net/disks/neotysss/MSFT__Win2K8R2SP1-120612-1520-121206-01-en-us-30GB.vhd"))
- .name("neotysss-neotysss-0-20120824091357")
- .sourceImage("MSFT__Win2K8R2SP1-120612-1520-121206-01-en-us-30GB.vhd")
- .build())
- .build();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azure-management/src/test/java/org/jclouds/azure/management/parse/ListHostedServicesTest.java
----------------------------------------------------------------------
diff --git a/azure-management/src/test/java/org/jclouds/azure/management/parse/ListHostedServicesTest.java b/azure-management/src/test/java/org/jclouds/azure/management/parse/ListHostedServicesTest.java
deleted file mode 100644
index eb8993d..0000000
--- a/azure-management/src/test/java/org/jclouds/azure/management/parse/ListHostedServicesTest.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.azure.management.parse;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-import java.net.URI;
-import java.util.Set;
-
-import org.jclouds.azure.management.domain.DetailedHostedServiceProperties;
-import org.jclouds.azure.management.domain.HostedService.Status;
-import org.jclouds.azure.management.domain.HostedServiceWithDetailedProperties;
-import org.jclouds.azure.management.xml.ListHostedServicesHandler;
-import org.jclouds.date.DateService;
-import org.jclouds.date.internal.SimpleDateFormatDateService;
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableSet;
-
-// NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
-@Test(groups = "unit", testName = "ListHostedServicesTest")
-public class ListHostedServicesTest extends BaseHandlerTest {
-
- public void test() {
- InputStream is = getClass().getResourceAsStream("/hostedservices.xml");
-
- Set<HostedServiceWithDetailedProperties> expected = expected();
-
- ListHostedServicesHandler handler = injector.getInstance(ListHostedServicesHandler.class);
- Set<HostedServiceWithDetailedProperties> result = factory.create(handler).parse(is);
-
- assertEquals(result.toString(), expected.toString());
-
- }
-
- protected final DateService dateService = new SimpleDateFormatDateService();
-
- public Set<HostedServiceWithDetailedProperties> expected() {
- return ImmutableSet.<HostedServiceWithDetailedProperties>builder()
- .add(HostedServiceWithDetailedProperties.builder()
- .url(URI.create("https://management.core.windows.net/eb0347c3-68d4-4550-9b39-5e7e0f92f7db/services/hostedservices/neotys"))
- .name("neotys")
- .properties(DetailedHostedServiceProperties.builder()
- .description("Implicitly created hosted service2012-08-06 14:55")
- .location("West Europe")
- .label("neotys")
- .rawStatus("Created")
- .status(Status.CREATED)
- .created(dateService.iso8601SecondsDateParse("2012-08-06T14:55:17Z"))
- .lastModified(dateService.iso8601SecondsDateParse("2012-08-06T15:50:34Z"))
- .build())
- .build())
- .add(HostedServiceWithDetailedProperties.builder()
- .url(URI.create("https://management.core.windows.net/eb0347c3-68d4-4550-9b39-5e7e0f92f7db/services/hostedservices/neotys3"))
- .name("neotys3")
- .properties(DetailedHostedServiceProperties.builder()
- .location("West Europe")
- .label("neotys3")
- .rawStatus("Created")
- .status(Status.CREATED)
- .created(dateService.iso8601SecondsDateParse("2012-08-07T09:00:02Z"))
- .lastModified(dateService.iso8601SecondsDateParse("2012-08-07T09:00:02Z"))
- .build())
- .build()).build();
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azure-management/src/test/java/org/jclouds/azure/management/parse/ListLocationsTest.java
----------------------------------------------------------------------
diff --git a/azure-management/src/test/java/org/jclouds/azure/management/parse/ListLocationsTest.java b/azure-management/src/test/java/org/jclouds/azure/management/parse/ListLocationsTest.java
deleted file mode 100644
index 7e26f18..0000000
--- a/azure-management/src/test/java/org/jclouds/azure/management/parse/ListLocationsTest.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.azure.management.parse;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-import java.util.Set;
-
-import org.jclouds.azure.management.domain.Location;
-import org.jclouds.azure.management.xml.ListLocationsHandler;
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableSet;
-
-// NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
-@Test(groups = "unit", testName = "LocationsTest")
-public class ListLocationsTest extends BaseHandlerTest {
-
- public void test() {
- InputStream is = getClass().getResourceAsStream("/locations.xml");
-
- Set<Location> expected = expected();
-
- ListLocationsHandler handler = injector.getInstance(ListLocationsHandler.class);
- Set<Location> result = factory.create(handler).parse(is);
-
- assertEquals(result.toString(), expected.toString());
-
- }
-
- public Set<Location> expected() {
- Set<String> availableServices = ImmutableSet.of("Compute", "Storage","PersistentVMRole");
- return ImmutableSet.<Location>builder()
- .add(Location.builder()
- .name("West US")
- .displayName("West US")
- .availableServices(availableServices)
- .build())
- .add(Location.builder()
- .name("East US")
- .displayName("East US")
- .availableServices(availableServices)
- .build())
- .add(Location.builder()
- .name("East Asia")
- .displayName("East Asia")
- .availableServices(availableServices)
- .build())
- .add(Location.builder()
- .name("Southeast Asia")
- .displayName("Southeast Asia")
- .availableServices(availableServices)
- .build())
- .add(Location.builder()
- .name("North Europe")
- .displayName("North Europe")
- .availableServices(availableServices)
- .build())
- .add(Location.builder()
- .name("West Europe")
- .displayName("West Europe")
- .availableServices(availableServices)
- .build()).build();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azure-management/src/test/java/org/jclouds/azure/management/parse/ListOSImagesTest.java
----------------------------------------------------------------------
diff --git a/azure-management/src/test/java/org/jclouds/azure/management/parse/ListOSImagesTest.java b/azure-management/src/test/java/org/jclouds/azure/management/parse/ListOSImagesTest.java
deleted file mode 100644
index 4b05491..0000000
--- a/azure-management/src/test/java/org/jclouds/azure/management/parse/ListOSImagesTest.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.azure.management.parse;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-import java.net.URI;
-import java.util.Set;
-
-import org.jclouds.azure.management.domain.OSImage;
-import org.jclouds.azure.management.domain.OSType;
-import org.jclouds.azure.management.xml.ListOSImagesHandler;
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableSet;
-
-// NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
-@Test(groups = "unit", testName = "ListOSImagesTest")
-public class ListOSImagesTest extends BaseHandlerTest {
-
- public void test() {
- InputStream is = getClass().getResourceAsStream("/images.xml");
-
- Set<OSImage> expected = expected();
-
- ListOSImagesHandler handler = injector.getInstance(ListOSImagesHandler.class);
- Set<OSImage> result = factory.create(handler).parse(is);
-
- assertEquals(result.toString(), expected.toString());
-
- }
-
- public Set<OSImage> expected() {
- return ImmutableSet.<OSImage>builder()
- .add(OSImage.builder()
- .category("Canonical")
- .label("Ubuntu Server 12.04 LTS")
- .logicalSizeInGB(30)
- .name("CANONICAL__Canonical-Ubuntu-12-04-amd64-server-20120528.1.3-en-us-30GB.vhd")
- .os(OSType.LINUX)
- .eula(URI.create("http://www.ubuntu.com/project/about-ubuntu/licensing"))
- .description("Ubuntu Server 12.04 LTS amd64 20120528 Cloud Image")
- .build())
- .add(OSImage.builder()
- .category("Microsoft")
- .label("Windows Server 2008 R2 SP1, June 2012")
- .logicalSizeInGB(30)
- .name("MSFT__Win2K8R2SP1-120612-1520-121206-01-en-us-30GB.vhd")
- .os(OSType.WINDOWS)
- .description("Windows Server 2008 R2 is a multi-purpose server.")
- .build())
- .add(OSImage.builder()
- .category("Microsoft")
- .label("Microsoft SQL Server 2012 Evaluation Edition")
- .logicalSizeInGB(30)
- .name("MSFT__Sql-Server-11EVAL-11.0.2215.0-05152012-en-us-30GB.vhd")
- .os(OSType.WINDOWS)
- .eula(URI.create("http://go.microsoft.com/fwlink/?LinkID=251820;http://go.microsoft.com/fwlink/?LinkID=131004"))
- .description("SQL Server 2012 Evaluation Edition (64-bit).")
- .build())
- .add(OSImage.builder()
- .category("Microsoft")
- .label("Windows Server 2012 Release Candidate, July 2012")
- .logicalSizeInGB(30)
- .name("MSFT__Win2K12RC-Datacenter-201207.02-en.us-30GB.vhd")
- .os(OSType.WINDOWS)
- .description("Windows Server 2012 incorporates Microsoft's experience building.")
- .build())
- .add(OSImage.builder()
- .category("Microsoft")
- .label("Windows Server 2008 R2 SP1, July 2012")
- .logicalSizeInGB(30)
- .name("MSFT__Win2K8R2SP1-Datacenter-201207.01-en.us-30GB.vhd")
- .os(OSType.WINDOWS)
- .description("Windows Server 2008 R2 is a multi-purpose server.")
- .build())
- .add(OSImage.builder()
- .category("OpenLogic")
- .label("OpenLogic CentOS 6.2")
- .logicalSizeInGB(30)
- .name("OpenLogic__OpenLogic-CentOS-62-20120531-en-us-30GB.vhd")
- .os(OSType.LINUX)
- .eula(URI.create("http://www.openlogic.com/azure/service-agreement/"))
- .description("This distribution of Linux is based on CentOS.")
- .build())
- .add(OSImage.builder()
- .category("SUSE")
- .label("openSUSE 12.1")
- .logicalSizeInGB(30)
- .name("SUSE__openSUSE-12-1-20120603-en-us-30GB.vhd")
- .os(OSType.LINUX)
- .eula(URI.create("http://opensuse.org/"))
- .description("openSUSE is a free and Linux-based operating system!")
- .build())
- .add(OSImage.builder()
- .category("SUSE")
- .label("SUSE Linux Enterprise Server")
- .logicalSizeInGB(30)
- .name("SUSE__SUSE-Linux-Enterprise-Server-11SP2-20120601-en-us-30GB.vhd")
- .os(OSType.LINUX)
- .eula(URI.create("http://www.novell.com/licensing/eula/"))
- .description("SUSE Linux Enterprise Server is a highly reliable value.")
- .build()).build();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azure-management/src/test/resources/azure-test.p12
----------------------------------------------------------------------
diff --git a/azure-management/src/test/resources/azure-test.p12 b/azure-management/src/test/resources/azure-test.p12
deleted file mode 100644
index 5250dd6..0000000
Binary files a/azure-management/src/test/resources/azure-test.p12 and /dev/null differ
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azure-management/src/test/resources/capturerolepayload.xml
----------------------------------------------------------------------
diff --git a/azure-management/src/test/resources/capturerolepayload.xml b/azure-management/src/test/resources/capturerolepayload.xml
deleted file mode 100644
index 9414c52..0000000
--- a/azure-management/src/test/resources/capturerolepayload.xml
+++ /dev/null
@@ -1 +0,0 @@
-<CaptureRoleOperation xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><OperationType>CaptureRoleOperation</OperationType><PostCaptureAction>Delete</PostCaptureAction><TargetImageLabel>myImageLabel</TargetImageLabel><TargetImageName>myImageName</TargetImageName></CaptureRoleOperation>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azure-management/src/test/resources/create_hostedservice_location.xml
----------------------------------------------------------------------
diff --git a/azure-management/src/test/resources/create_hostedservice_location.xml b/azure-management/src/test/resources/create_hostedservice_location.xml
deleted file mode 100644
index 076f562..0000000
--- a/azure-management/src/test/resources/create_hostedservice_location.xml
+++ /dev/null
@@ -1 +0,0 @@
-<CreateHostedService xmlns="http://schemas.microsoft.com/windowsazure"><ServiceName>myservice</ServiceName><Label>c2VydmljZSBtaW5l</Label><Location>West US</Location></CreateHostedService>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azure-management/src/test/resources/create_hostedservice_location_options.xml
----------------------------------------------------------------------
diff --git a/azure-management/src/test/resources/create_hostedservice_location_options.xml b/azure-management/src/test/resources/create_hostedservice_location_options.xml
deleted file mode 100644
index 9f7f8f0..0000000
--- a/azure-management/src/test/resources/create_hostedservice_location_options.xml
+++ /dev/null
@@ -1 +0,0 @@
-<CreateHostedService xmlns="http://schemas.microsoft.com/windowsazure"><ServiceName>myservice</ServiceName><Label>c2VydmljZSBtaW5l</Label><Description>my description</Description><Location>West US</Location><ExtendedProperties><ExtendedProperty><Name>Role</Name><Value>Production</Value></ExtendedProperty></ExtendedProperties></CreateHostedService>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azure-management/src/test/resources/deployment.xml
----------------------------------------------------------------------
diff --git a/azure-management/src/test/resources/deployment.xml b/azure-management/src/test/resources/deployment.xml
deleted file mode 100644
index 94cebc9..0000000
--- a/azure-management/src/test/resources/deployment.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<Deployment xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
- <Name>neotysss</Name>
- <DeploymentSlot>Production</DeploymentSlot>
- <PrivateID>05aa8ec5d8ee4215894431c7db401b31</PrivateID>
- <Status>Running</Status>
- <Label>bmVvdHlzc3M=</Label>
- <Url>http://neotysss.cloudapp.net/</Url>
- <Configuration>PFNlcnZpY2VDb25maWd1cmF0aW9uIHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiIHhtbG5zOnhzZD0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEiIHhtbG5zPSJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL1NlcnZpY2VIb3N0aW5nLzIwMDgvMTAvU2VydmljZUNvbmZpZ3VyYXRpb24iPg0KICA8Um9sZSBuYW1lPSJuZW90eXNzcyI+DQogICAgPEluc3RhbmNlcyBjb3VudD0iMSIgLz4NCiAgPC9Sb2xlPg0KPC9TZXJ2aWNlQ29uZmlndXJhdGlvbj4=</Configuration>
- <RoleInstanceList>
- <RoleInstance>
- <RoleName>neotysss</RoleName>
- <InstanceName>neotysss</InstanceName>
- <InstanceStatus>ReadyRole</InstanceStatus>
- <InstanceUpgradeDomain>0</InstanceUpgradeDomain>
- <InstanceFaultDomain>0</InstanceFaultDomain>
- <InstanceSize>Medium</InstanceSize>
- <InstanceStateDetails/>
- <IpAddress>10.59.244.162</IpAddress>
- <InstanceEndpoints>
- <InstanceEndpoint>
- <Name>SSH</Name>
- <Vip>168.63.27.148</Vip>
- <PublicPort>22</PublicPort>
- <LocalPort>22</LocalPort>
- <Protocol>tcp</Protocol>
- </InstanceEndpoint>
- </InstanceEndpoints>
- <PowerState>Started</PowerState>
- <HostName>neotys</HostName>
- </RoleInstance>
- </RoleInstanceList>
- <UpgradeDomainCount>1</UpgradeDomainCount>
- <RoleList>
- <Role i:type="PersistentVMRole">
- <RoleName>neotysss</RoleName>
- <OsVersion/>
- <RoleType>PersistentVMRole</RoleType>
- <ConfigurationSets>
- <ConfigurationSet i:type="NetworkConfigurationSet">
- <ConfigurationSetType>NetworkConfiguration</ConfigurationSetType>
- <InputEndpoints>
- <InputEndpoint>
- <LocalPort>22</LocalPort>
- <Name>SSH</Name>
- <Port>22</Port>
- <Protocol>tcp</Protocol>
- <Vip>168.63.27.148</Vip>
- </InputEndpoint>
- </InputEndpoints>
- <SubnetNames/>
- </ConfigurationSet>
- </ConfigurationSets>
- <DataVirtualHardDisks/>
- <OSVirtualHardDisk>
- <HostCaching>ReadWrite</HostCaching>
- <DiskName>neotysss-neotysss-0-20120824091357</DiskName>
- <MediaLink>http://portalvhds0g7xhnq2x7t21.blob.core.windows.net/disks/neotysss/MSFT__Win2K8R2SP1-120612-1520-121206-01-en-us-30GB.vhd</MediaLink>
- <SourceImageName>MSFT__Win2K8R2SP1-120612-1520-121206-01-en-us-30GB.vhd</SourceImageName>
- <OS>Windows</OS>
- </OSVirtualHardDisk>
- <RoleSize>Medium</RoleSize>
- </Role>
- </RoleList>
- <SdkVersion/>
- <Locked>false</Locked>
- <RollbackAllowed>false</RollbackAllowed>
- <CreatedTime>2012-08-24T09:13:53Z</CreatedTime>
- <LastModifiedTime>2012-08-27T08:55:13Z</LastModifiedTime>
- <ExtendedProperties/>
-</Deployment>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azure-management/src/test/resources/deploymentparams.xml
----------------------------------------------------------------------
diff --git a/azure-management/src/test/resources/deploymentparams.xml b/azure-management/src/test/resources/deploymentparams.xml
deleted file mode 100644
index fadaff1..0000000
--- a/azure-management/src/test/resources/deploymentparams.xml
+++ /dev/null
@@ -1 +0,0 @@
-<Deployment xmlns="http://schemas.microsoft.com/windowsazure"><Name>mydeployment</Name><DeploymentSlot>Production</DeploymentSlot><Label>mydeployment</Label><RoleList><Role><RoleName>mydeployment</RoleName><RoleType>PersistentVMRole</RoleType><ConfigurationSets><ConfigurationSet><ConfigurationSetType>LinuxProvisioningConfiguration</ConfigurationSetType><HostName>mydeployment</HostName><UserName>username</UserName><UserPassword>testpwd</UserPassword><DisableSshPasswordAuthentication>false</DisableSshPasswordAuthentication><SSH/></ConfigurationSet><ConfigurationSet><ConfigurationSetType>NetworkConfiguration</ConfigurationSetType><InputEndpoints/><SubnetNames/></ConfigurationSet></ConfigurationSets><DataVirtualHardDisks/><OSVirtualHardDisk><HostCaching>ReadWrite</HostCaching><MediaLink>http://portalvhds0g7xhnq2x7t21.blob.core.windows.net/disks/mydeployment/OpenLogic__OpenLogic-CentOS-62-20120531-en-us-30GB.vhd</MediaLink><SourceImageName>OpenLogic__OpenLogic-CentOS-62-20120531-en-us-30
GB.vhd</SourceImageName><OS>Linux</OS></OSVirtualHardDisk><RoleSize>Medium</RoleSize></Role></RoleList></Deployment>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azure-management/src/test/resources/disks.xml
----------------------------------------------------------------------
diff --git a/azure-management/src/test/resources/disks.xml b/azure-management/src/test/resources/disks.xml
deleted file mode 100644
index 9290a9a..0000000
--- a/azure-management/src/test/resources/disks.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<Disks xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
- <Disk>
- <OS>Linux</OS>
- <Location>West Europe</Location>
- <LogicalDiskSizeInGB>30</LogicalDiskSizeInGB>
- <MediaLink>http://neotysbucket1.blob.core.windows.net/vhds/testimage2-testimage2-2012-08-17.vhd</MediaLink>
- <Name>testimage2-testimage2-0-20120817095145</Name>
- <SourceImageName>OpenLogic__OpenLogic-CentOS-62-20120531-en-us-30GB.vhd</SourceImageName>
- </Disk>
- <Disk>
- <AttachedTo>
- <DeploymentName>neotysss</DeploymentName>
- <HostedServiceName>neotysss</HostedServiceName>
- <RoleName>neotysss</RoleName>
- </AttachedTo>
- <OS>Windows</OS>
- <Location>West Europe</Location>
- <LogicalDiskSizeInGB>30</LogicalDiskSizeInGB>
- <MediaLink>http://portalvhds0g7xhnq2x7t21.blob.core.windows.net/disks/neotysss/MSFT__Win2K8R2SP1-120612-1520-121206-01-en-us-30GB.vhd</MediaLink>
- <Name>neotysss-neotysss-0-20120824091357</Name>
- <SourceImageName>MSFT__Win2K8R2SP1-120612-1520-121206-01-en-us-30GB.vhd</SourceImageName>
- </Disk>
-</Disks>
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azure-management/src/test/resources/error.xml
----------------------------------------------------------------------
diff --git a/azure-management/src/test/resources/error.xml b/azure-management/src/test/resources/error.xml
deleted file mode 100644
index a9f9b2f..0000000
--- a/azure-management/src/test/resources/error.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Error>
- <Code>MissingOrInvalidRequiredQueryParameter</Code>
- <Message>A required query parameter was not specified for this request or was specified incorrectly.</Message>
-</Error>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azure-management/src/test/resources/hostedservice.xml
----------------------------------------------------------------------
diff --git a/azure-management/src/test/resources/hostedservice.xml b/azure-management/src/test/resources/hostedservice.xml
deleted file mode 100644
index 625aeb3..0000000
--- a/azure-management/src/test/resources/hostedservice.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<HostedService xmlns="http://schemas.microsoft.com/windowsazure">
- <Url>https://management.core.windows.net/eb0347c3-68d4-4550-9b39-5e7e0f92f7db/services/hostedservices/neotys</Url>
- <ServiceName>neotys</ServiceName>
- <HostedServiceProperties>
- <Description>Implicitly created hosted service2012-08-06 14:55
- </Description>
- <Location>West Europe</Location>
- <Label>bmVvdHlz</Label>
- </HostedServiceProperties>
-</HostedService>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azure-management/src/test/resources/hostedservice_details.xml
----------------------------------------------------------------------
diff --git a/azure-management/src/test/resources/hostedservice_details.xml b/azure-management/src/test/resources/hostedservice_details.xml
deleted file mode 100644
index d730cc7..0000000
--- a/azure-management/src/test/resources/hostedservice_details.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<HostedService xmlns="http://schemas.microsoft.com/windowsazure">
- <Url>https://management.core.windows.net/eb0347c3-68d4-4550-9b39-5e7e0f92f7db/services/hostedservices/neotys</Url>
- <ServiceName>neotys</ServiceName>
- <HostedServiceProperties>
- <Description>Implicitly created hosted service2012-08-06 14:55</Description>
- <Location>West Europe</Location>
- <Label>bmVvdHlz</Label>
- <Status>Created</Status>
- <DateCreated>2012-08-06T14:55:17Z</DateCreated>
- <DateLastModified>2012-08-06T15:50:34Z</DateLastModified>
- <ExtendedProperties />
- </HostedServiceProperties>
-</HostedService>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azure-management/src/test/resources/hostedservices.xml
----------------------------------------------------------------------
diff --git a/azure-management/src/test/resources/hostedservices.xml b/azure-management/src/test/resources/hostedservices.xml
deleted file mode 100644
index 66b7589..0000000
--- a/azure-management/src/test/resources/hostedservices.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<HostedServices xmlns="http://schemas.microsoft.com/windowsazure"
- xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
- <HostedService>
- <Url>https://management.core.windows.net/eb0347c3-68d4-4550-9b39-5e7e0f92f7db/services/hostedservices/neotys</Url>
- <ServiceName>neotys</ServiceName>
- <HostedServiceProperties>
- <Description>Implicitly created hosted service2012-08-06 14:55</Description>
- <Location>West Europe</Location>
- <Label>bmVvdHlz</Label>
- <Status>Created</Status>
- <DateCreated>2012-08-06T14:55:17Z</DateCreated>
- <DateLastModified>2012-08-06T15:50:34Z</DateLastModified>
- <ExtendedProperties />
- </HostedServiceProperties>
- </HostedService>
- <HostedService>
- <Url>https://management.core.windows.net/eb0347c3-68d4-4550-9b39-5e7e0f92f7db/services/hostedservices/neotys3</Url>
- <ServiceName>neotys3</ServiceName>
- <HostedServiceProperties>
- <Description i:nil="true" />
- <Location>West Europe</Location>
- <Label>bmVvdHlzMw==</Label>
- <Status>Created</Status>
- <DateCreated>2012-08-07T09:00:02Z</DateCreated>
- <DateLastModified>2012-08-07T09:00:02Z</DateLastModified>
- <ExtendedProperties />
- </HostedServiceProperties>
- </HostedService>
-</HostedServices>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azure-management/src/test/resources/imageparams.xml
----------------------------------------------------------------------
diff --git a/azure-management/src/test/resources/imageparams.xml b/azure-management/src/test/resources/imageparams.xml
deleted file mode 100644
index d3279ba..0000000
--- a/azure-management/src/test/resources/imageparams.xml
+++ /dev/null
@@ -1 +0,0 @@
-<OSImage xmlns="http://schemas.microsoft.com/windowsazure"><Label>foo</Label><MediaLink>http://example.blob.core.windows.net/disks/mydisk.vhd</MediaLink><Name>myimage</Name><OS>Linux</OS></OSImage>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azure-management/src/test/resources/images.xml
----------------------------------------------------------------------
diff --git a/azure-management/src/test/resources/images.xml b/azure-management/src/test/resources/images.xml
deleted file mode 100644
index aa6efca..0000000
--- a/azure-management/src/test/resources/images.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-<Images xmlns="http://schemas.microsoft.com/windowsazure"
- xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
- <OSImage>
- <Category>Canonical</Category>
- <Label>Ubuntu Server 12.04 LTS</Label>
- <LogicalSizeInGB>30</LogicalSizeInGB>
- <Name>CANONICAL__Canonical-Ubuntu-12-04-amd64-server-20120528.1.3-en-us-30GB.vhd</Name>
- <OS>Linux</OS>
- <Eula>http://www.ubuntu.com/project/about-ubuntu/licensing</Eula>
- <Description>Ubuntu Server 12.04 LTS amd64 20120528 Cloud Image</Description>
- </OSImage>
- <OSImage>
- <Category>Microsoft</Category>
- <Label>Windows Server 2008 R2 SP1, June 2012</Label>
- <LogicalSizeInGB>30</LogicalSizeInGB>
- <Name>MSFT__Win2K8R2SP1-120612-1520-121206-01-en-us-30GB.vhd</Name>
- <OS>Windows</OS>
- <Eula />
- <Description>Windows Server 2008 R2 is a multi-purpose server.</Description>
- </OSImage>
- <OSImage>
- <Category>Microsoft</Category>
- <Label>Microsoft SQL Server 2012 Evaluation Edition</Label>
- <LogicalSizeInGB>30</LogicalSizeInGB>
- <Name>MSFT__Sql-Server-11EVAL-11.0.2215.0-05152012-en-us-30GB.vhd</Name>
- <OS>Windows</OS>
- <Eula>http://go.microsoft.com/fwlink/?LinkID=251820;http://go.microsoft.com/fwlink/?LinkID=131004</Eula>
- <Description>SQL Server 2012 Evaluation Edition (64-bit).</Description>
- </OSImage>
- <OSImage>
- <Category>Microsoft</Category>
- <Label>Windows Server 2012 Release Candidate, July 2012</Label>
- <LogicalSizeInGB>30</LogicalSizeInGB>
- <Name>MSFT__Win2K12RC-Datacenter-201207.02-en.us-30GB.vhd</Name>
- <OS>Windows</OS>
- <Eula />
- <Description>Windows Server 2012 incorporates Microsoft's experience building.</Description>
- </OSImage>
- <OSImage>
- <Category>Microsoft</Category>
- <Label>Windows Server 2008 R2 SP1, July 2012</Label>
- <LogicalSizeInGB>30</LogicalSizeInGB>
- <Name>MSFT__Win2K8R2SP1-Datacenter-201207.01-en.us-30GB.vhd</Name>
- <OS>Windows</OS>
- <Eula />
- <Description>Windows Server 2008 R2 is a multi-purpose server.</Description>
- </OSImage>
- <OSImage>
- <Category>OpenLogic</Category>
- <Label>OpenLogic CentOS 6.2</Label>
- <LogicalSizeInGB>30</LogicalSizeInGB>
- <Name>OpenLogic__OpenLogic-CentOS-62-20120531-en-us-30GB.vhd</Name>
- <OS>Linux</OS>
- <Eula>http://www.openlogic.com/azure/service-agreement/</Eula>
- <Description>This distribution of Linux is based on CentOS.</Description>
- </OSImage>
- <OSImage>
- <Category>SUSE</Category>
- <Label>openSUSE 12.1</Label>
- <LogicalSizeInGB>30</LogicalSizeInGB>
- <Name>SUSE__openSUSE-12-1-20120603-en-us-30GB.vhd</Name>
- <OS>Linux</OS>
- <Eula>http://opensuse.org/</Eula>
- <Description>openSUSE is a free and Linux-based operating system!</Description>
- </OSImage>
- <OSImage>
- <Category>SUSE</Category>
- <Label>SUSE Linux Enterprise Server</Label>
- <LogicalSizeInGB>30</LogicalSizeInGB>
- <Name>SUSE__SUSE-Linux-Enterprise-Server-11SP2-20120601-en-us-30GB.vhd</Name>
- <OS>Linux</OS>
- <Eula>http://www.novell.com/licensing/eula/</Eula>
- <Description>SUSE Linux Enterprise Server is a highly reliable value.</Description>
- </OSImage>
-</Images>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azure-management/src/test/resources/locations.xml
----------------------------------------------------------------------
diff --git a/azure-management/src/test/resources/locations.xml b/azure-management/src/test/resources/locations.xml
deleted file mode 100644
index 1c7dcc8..0000000
--- a/azure-management/src/test/resources/locations.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0"?>
-<Locations xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
- <Location>
- <Name>West US</Name>
- <DisplayName>West US</DisplayName>
- <AvailableServices>
- <AvailableService>Compute</AvailableService>
- <AvailableService>Storage</AvailableService>
- <AvailableService>PersistentVMRole</AvailableService>
- </AvailableServices>
- </Location>
- <Location>
- <Name>East US</Name>
- <DisplayName>East US</DisplayName>
- <AvailableServices>
- <AvailableService>Compute</AvailableService>
- <AvailableService>Storage</AvailableService>
- <AvailableService>PersistentVMRole</AvailableService>
- </AvailableServices>
- </Location>
- <Location>
- <Name>East Asia</Name>
- <DisplayName>East Asia</DisplayName>
- <AvailableServices>
- <AvailableService>Compute</AvailableService>
- <AvailableService>Storage</AvailableService>
- <AvailableService>PersistentVMRole</AvailableService>
- </AvailableServices>
- </Location>
- <Location>
- <Name>Southeast Asia</Name>
- <DisplayName>Southeast Asia</DisplayName>
- <AvailableServices>
- <AvailableService>Compute</AvailableService>
- <AvailableService>Storage</AvailableService>
- <AvailableService>PersistentVMRole</AvailableService>
- </AvailableServices>
- </Location>
- <Location>
- <Name>North Europe</Name>
- <DisplayName>North Europe</DisplayName>
- <AvailableServices>
- <AvailableService>Compute</AvailableService>
- <AvailableService>Storage</AvailableService>
- <AvailableService>PersistentVMRole</AvailableService>
- </AvailableServices>
- </Location>
- <Location>
- <Name>West Europe</Name>
- <DisplayName>West Europe</DisplayName>
- <AvailableServices>
- <AvailableService>Compute</AvailableService>
- <AvailableService>Storage</AvailableService>
- <AvailableService>PersistentVMRole</AvailableService>
- </AvailableServices>
- </Location>
-</Locations>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azure-management/src/test/resources/operation.xml
----------------------------------------------------------------------
diff --git a/azure-management/src/test/resources/operation.xml b/azure-management/src/test/resources/operation.xml
deleted file mode 100644
index 498d1f0..0000000
--- a/azure-management/src/test/resources/operation.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Operation xmlns="http://schemas.microsoft.com/windowsazure">
- <ID>request-id</ID>
- <Status>Failed</Status>
- <HttpStatusCode>400</HttpStatusCode>
- <Error>
- <Code>MissingOrInvalidRequiredQueryParameter</Code>
- <Message>A required query parameter was not specified for this request or was specified incorrectly.</Message>
- </Error>
-</Operation>
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azure-management/src/test/resources/restartrolepayload.xml
----------------------------------------------------------------------
diff --git a/azure-management/src/test/resources/restartrolepayload.xml b/azure-management/src/test/resources/restartrolepayload.xml
deleted file mode 100644
index 4eca508..0000000
--- a/azure-management/src/test/resources/restartrolepayload.xml
+++ /dev/null
@@ -1 +0,0 @@
-<RestartRoleOperation xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><OperationType>RestartRoleOperation</OperationType></RestartRoleOperation>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azure-management/src/test/resources/shutdownrolepayload.xml
----------------------------------------------------------------------
diff --git a/azure-management/src/test/resources/shutdownrolepayload.xml b/azure-management/src/test/resources/shutdownrolepayload.xml
deleted file mode 100644
index 27beee8..0000000
--- a/azure-management/src/test/resources/shutdownrolepayload.xml
+++ /dev/null
@@ -1 +0,0 @@
-<ShutdownRoleOperation xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><OperationType>ShutdownRoleOperation</OperationType></ShutdownRoleOperation>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azure-management/src/test/resources/startrolepayload.xml
----------------------------------------------------------------------
diff --git a/azure-management/src/test/resources/startrolepayload.xml b/azure-management/src/test/resources/startrolepayload.xml
deleted file mode 100644
index 4e82022..0000000
--- a/azure-management/src/test/resources/startrolepayload.xml
+++ /dev/null
@@ -1 +0,0 @@
-<StartRoleOperation xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><OperationType>StartRoleOperation</OperationType></StartRoleOperation>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azurecompute/.gitignore
----------------------------------------------------------------------
diff --git a/azurecompute/.gitignore b/azurecompute/.gitignore
new file mode 100644
index 0000000..8fb7bef
--- /dev/null
+++ b/azurecompute/.gitignore
@@ -0,0 +1,9 @@
+# use glob syntax.
+syntax: glob
+target
+.settings
+.classpath
+.project
+jclouds-azurecompute.iml
+jclouds-azurecompute.ipr
+jclouds-azurecompute.iws
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/6ab58bd2/azurecompute/README.md
----------------------------------------------------------------------
diff --git a/azurecompute/README.md b/azurecompute/README.md
new file mode 100644
index 0000000..022abde
--- /dev/null
+++ b/azurecompute/README.md
@@ -0,0 +1,23 @@
+
+=== Setting up test credentials
+
+Azure requests are signed by via SSL certificate. You need to upload one into your account in order to run tests.
+
+```bash
+# create the certificate request
+mkdir -m 700 $HOME/.jclouds
+openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout $HOME/.jclouds/azure.pem -out $HOME/.jclouds/azure.pem
+# create the p12 file, and note your export password. This will be your test credentials.
+openssl pkcs12 -export -out $HOME/.jclouds/azure.p12 -in $HOME/.jclouds/azure.pem -name "jclouds :: $USER"
+# create a cer file which you upload to the management console to authorize this certificate.
+# https://manage.windowsazure.com/@ignasibarreragmail.onmicrosoft.com#Workspaces/AdminTasks/ListManagementCertificates
+# note you need to press command+shift+. to display hidden directories in a open dialog in osx
+openssl x509 -inform pem -in $HOME/.jclouds/azure.p12 -outform der -out $HOME/.jclouds/azure.cer
+```
+
+Once you do this, you will set the following to run the live tests.
+```bash
+mvn -Plive -Dtest.jclouds.azurecompute.subscription-id=12345678-abcd-dcba-abdc-ba0987654321
+-Dtest.azurecompute.credential=P12_EXPORT_PASSWORD
+-Dtest.azurecompute.identity=$HOME/.jclouds/azure.p12
+```
\ No newline at end of file