You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by na...@apache.org on 2018/10/15 16:25:19 UTC
[03/15] jclouds-labs git commit: Remove deprecated Azure provider
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListCloudServicesHandlerTest.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListCloudServicesHandlerTest.java b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListCloudServicesHandlerTest.java
deleted file mode 100644
index 7f98ca7..0000000
--- a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListCloudServicesHandlerTest.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.xml;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-import java.util.Collections;
-import java.util.List;
-
-import org.jclouds.azurecompute.domain.CloudService;
-import org.jclouds.azurecompute.domain.CloudService.Status;
-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.ImmutableList;
-
-@Test(groups = "unit", testName = "ListHostedServicesHandlerTest")
-public class ListCloudServicesHandlerTest extends BaseHandlerTest {
-
- private static final DateService DATE_SERVICE = new SimpleDateFormatDateService();
-
- public void test() {
- InputStream is = getClass().getResourceAsStream("/hostedservices.xml");
- ListCloudServicesHandler handler = new ListCloudServicesHandler(new CloudServiceHandler(DATE_SERVICE));
- List<CloudService> result = factory.create(handler).parse(is);
-
- assertEquals(result, expected());
- }
-
- public static List<CloudService> expected() {
- return ImmutableList.of( //
- CloudService.create( //
- "neotys", // name
- "West Europe", // location
- null, // affinityGroup
- "neotys", // label
- "Implicitly created cloud service2012-08-06 14:55", // description
- Status.CREATED, // status
- DATE_SERVICE.iso8601SecondsDateParse("2012-08-06T14:55:17Z"), // created
- DATE_SERVICE.iso8601SecondsDateParse("2012-08-06T15:50:34Z"), // lastModified
- Collections.<String, String>emptyMap() // extendedProperties
- ), //
- CloudService.create( //
- "neotys3", // name
- "West Europe", // location
- null, // affinityGroup
- "neotys3", // label
- null, // description
- Status.CREATED, // status
- DATE_SERVICE.iso8601SecondsDateParse("2012-08-07T09:00:02Z"), // created
- DATE_SERVICE.iso8601SecondsDateParse("2012-08-07T09:00:02Z"), // lastModified
- Collections.<String, String>emptyMap() // extendedProperties
- ));
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListDataVirtualHardDisksHandlerTest.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListDataVirtualHardDisksHandlerTest.java b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListDataVirtualHardDisksHandlerTest.java
deleted file mode 100644
index df7968a..0000000
--- a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListDataVirtualHardDisksHandlerTest.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.xml;
-
-import com.google.common.collect.ImmutableList;
-import org.jclouds.azurecompute.domain.DataVirtualHardDisk;
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-import java.io.InputStream;
-import java.net.URI;
-import java.util.List;
-
-import static org.testng.Assert.assertEquals;
-
-@Test(groups = "unit", testName = "ListDataVirtualHardDiskHandlerTest")
-public class ListDataVirtualHardDisksHandlerTest extends BaseHandlerTest {
-
- public void test() {
- InputStream is = getClass().getResourceAsStream("/datavirtualharddisk.xml");
- List<DataVirtualHardDisk> result = factory
- .create(new ListDataVirtualHardDisksHandler(new DataVirtualHardDiskHandler())).parse(is);
- assertEquals(result, expected());
- }
-
- public static List<DataVirtualHardDisk> expected() {
- return ImmutableList.of(
- DataVirtualHardDisk.create(
- DataVirtualHardDisk.Caching.READ_ONLY,
- "testimage1-testimage1-0-20120817095145",
- 10,
- 30,
- URI.create("http://blobs/disks/neotysss/MSFT__Win2K8R2SP1-ABCD-en-us-30GB.vhd"),
- "Standard"
- ),
- DataVirtualHardDisk.create(
- DataVirtualHardDisk.Caching.READ_WRITE,
- "testimage2-testimage2-0-20120817095145",
- 10,
- 30,
- URI.create("http://blobs/disks/neotysss/MSFT__Win2K8R2SP1-ABCD-en-us-30GB.vhd"),
- "Standard"
- )
- );
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListDisksHandlerTest.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListDisksHandlerTest.java b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListDisksHandlerTest.java
deleted file mode 100644
index 8e80cea..0000000
--- a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListDisksHandlerTest.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.xml;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-import java.net.URI;
-import java.util.List;
-
-import org.jclouds.azurecompute.domain.Disk;
-import org.jclouds.azurecompute.domain.Disk.Attachment;
-import org.jclouds.azurecompute.domain.OSImage;
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-
-@Test(groups = "unit", testName = "ListDisksHandlerTest")
-public class ListDisksHandlerTest extends BaseHandlerTest {
-
- public void test() {
- InputStream is = getClass().getResourceAsStream("/disks.xml");
- List<Disk> result = factory.create(new ListDisksHandler(new DiskHandler())).parse(is);
-
- assertEquals(result, expected());
- }
-
- public static List<Disk> expected() {
- return ImmutableList.of( //
- Disk.create( //
- "testimage2-testimage2-0-20120817095145", // name
- "West Europe", // location
- null, // affinityGroup
- null, //description
- OSImage.Type.LINUX, // os
- URI.create("http://blobs/vhds/testimage2-testimage2-2012-08-17.vhd"), // mediaLink
- 30, // logicalSizeInGB
- null, // attachedTo
- "OpenLogic__OpenLogic-CentOS-62-20120531-en-us-30GB.vhd" // sourceImage
- ), Disk.create( //
- "neotysss-neotysss-0-20120824091357", // name
- "West Europe", // location
- null, // affinityGroup
- null, //description
- OSImage.Type.WINDOWS, // os
- URI.create("http://blobs/disks/neotysss/MSFT__Win2K8R2SP1-ABCD-en-us-30GB.vhd"), // mediaLink
- 30, // logicalSizeInGB
- Attachment.create("neotysss", "neotysss", "neotysss"), // attachedTo
- "MSFT__Win2K8R2SP1-ABCD-en-us-30GB.vhd" // sourceImage
- ));
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListLocationsHandlerTest.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListLocationsHandlerTest.java b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListLocationsHandlerTest.java
deleted file mode 100644
index 9196ccd..0000000
--- a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListLocationsHandlerTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS 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.xml;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-import java.util.List;
-
-import org.jclouds.azurecompute.domain.Location;
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-
-@Test(groups = "unit", testName = "ListLocationsHandlerTest")
-public class ListLocationsHandlerTest extends BaseHandlerTest {
-
- public void test() {
- InputStream is = getClass().getResourceAsStream("/locations.xml");
- List<Location> result = factory.create(
- new ListLocationsHandler(new LocationHandler(new ComputeCapabilitiesHandler()))).parse(is);
-
- assertEquals(result, expected());
- }
-
- public static List<Location> expected() {
- List<String> availableServices = ImmutableList.of("Compute", "Storage", "PersistentVMRole");
- return ImmutableList.of(
- Location.create("West US", "West US", availableServices, null),
- Location.create("East US", "East US", availableServices, null),
- Location.create("East Asia", "East Asia", availableServices, null),
- Location.create("Southeast Asia", "Southeast Asia", availableServices, null),
- Location.create("North Europe", "North Europe", availableServices, null),
- Location.create("West Europe", "West Europe", availableServices, null)
- );
- }
-
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListNetworkSecurityGroupsHandlerTest.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListNetworkSecurityGroupsHandlerTest.java b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListNetworkSecurityGroupsHandlerTest.java
deleted file mode 100644
index 30ef02a..0000000
--- a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListNetworkSecurityGroupsHandlerTest.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.xml;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-import java.util.List;
-
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import org.jclouds.azurecompute.domain.NetworkSecurityGroup;
-
-@Test(groups = "unit", testName = "ListNetworkSecurityGroupsHandlerTest")
-public class ListNetworkSecurityGroupsHandlerTest extends BaseHandlerTest {
-
- public void test() {
- final InputStream is = getClass().getResourceAsStream("/networksecuritygroups.xml");
- final List<NetworkSecurityGroup> result = factory.create(
- new ListNetworkSecurityGroupsHandler(new NetworkSecurityGroupHandler())).parse(is);
-
- assertEquals(result, expected());
- }
-
- public static List<NetworkSecurityGroup> expected() {
- return ImmutableList.of(
- NetworkSecurityGroup.create("group1", "sec group 1", "West Europe", null, null),
- NetworkSecurityGroup.create("group2", "sec group 2", "North Europe", null, null));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListOSImagesHandlerTest.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListOSImagesHandlerTest.java b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListOSImagesHandlerTest.java
deleted file mode 100644
index 593da0c..0000000
--- a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListOSImagesHandlerTest.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.xml;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-import java.net.URI;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import org.jclouds.azurecompute.domain.OSImage;
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-
-@Test(groups = "unit", testName = "ListImagesHandlerTest")
-public class ListOSImagesHandlerTest extends BaseHandlerTest {
-
- public void test() {
- InputStream is = getClass().getResourceAsStream("/images.xml");
- List<OSImage> result = factory.create(new ListOSImagesHandler(new OSImageHandler())).parse(is);
-
- assertEquals(result, expected());
- }
-
- public static List<OSImage> expected() {
- return ImmutableList.of( //
- OSImage.create( //
- "CANONICAL__Canonical-Ubuntu-12-04-amd64-server-20120528.1.3-en-us-30GB.vhd", // name
- null, // locations
- null, // affinityGroup
- "Ubuntu Server 12.04 LTS", // label
- "Ubuntu Server 12.04 LTS amd64 20120528 Cloud Image", //description
- "Ubuntu Server 12.04 LTS", // imageFamily
- "Canonical", // category
- OSImage.Type.LINUX, // os
- "Canonical", //publisherName
- null, // mediaLink
- 30, // logicalSizeInGB
- Arrays.asList("http://www.ubuntu.com/project/about-ubuntu/licensing") // eula
- ),
- OSImage.create( //
- "MSFT__Win2K8R2SP1-120612-1520-121206-01-en-us-30GB.vhd", // name
- "North Europe", // locations
- null, // affinityGroup
- "Windows Server 2008 R2 SP1, June 2012", // label
- "Windows Server 2008 R2 is a multi-purpose server.", //description
- "Windows Server 2008 R2 SP1", // imageFamily
- "Microsoft", // category
- OSImage.Type.WINDOWS, // os
- "Microsoft", //publisherName
- URI.create("http://blobs/disks/mydeployment/"
- + "MSFT__Win2K8R2SP1-120612-1520-121206-01-en-us-30GB.vhd"),
- // mediaLink
- 30, // logicalSizeInGB
- Collections.<String>emptyList() // eula
- ),
- OSImage.create( //
- "MSFT__Sql-Server-11EVAL-11.0.2215.0-05152012-en-us-30GB.vhd", // name
- null, // locations
- null, // affinityGroup
- "Microsoft SQL Server 2012 Evaluation Edition", // label
- "SQL Server 2012 Evaluation Edition (64-bit).", //description
- null, // imageFamily
- "Microsoft", // category
- OSImage.Type.WINDOWS, // os
- "Microsoft", //publisherName
- null, // mediaLink
- 30, // logicalSizeInGB
- Arrays.asList("http://go.microsoft.com/fwlink/?LinkID=251820",
- "http://go.microsoft.com/fwlink/?LinkID=131004") // eula
- ),
- OSImage.create( //
- "MSFT__Win2K12RC-Datacenter-201207.02-en.us-30GB.vhd", // name
- null, // locations
- null, // affinityGroup
- "Windows Server 2012 Release Candidate, July 2012", // label
- "Windows Server 2012 incorporates Microsoft's experience building.", //description
- null, // imageFamily
- "Microsoft", // category
- OSImage.Type.WINDOWS, // os
- "Microsoft", //publisherName
- null, // mediaLink
- 30, // logicalSizeInGB
- Collections.<String>emptyList() // eula
- ),
- OSImage.create( //
- "MSFT__Win2K8R2SP1-Datacenter-201207.01-en.us-30GB.vhd", // name
- null, // locations
- null, // affinityGroup
- "Windows Server 2008 R2 SP1, July 2012", // label
- "Windows Server 2008 R2 is a multi-purpose server.", //description
- null, // imageFamily
- "Microsoft", // category
- OSImage.Type.WINDOWS, // os
- "Microsoft", //publisherName
- null, // mediaLink
- 30, // logicalSizeInGB
- Collections.<String>emptyList() // eula
- ),
- OSImage.create( //
- "OpenLogic__OpenLogic-CentOS-62-20120531-en-us-30GB.vhd", // name
- null, // locations
- null, // affinityGroup
- "OpenLogic CentOS 6.2", // label
- "This distribution of Linux is based on CentOS.", //description
- null, // imageFamily
- "OpenLogic", // category
- OSImage.Type.LINUX, // os
- "openLogic", //publisherName
- URI.create("http://blobs/disks/mydeployment/"
- + "OpenLogic__OpenLogic-CentOS-62-20120531-en-us-30GB.vhd"),
- // mediaLink
- 30, //logicalSizeInGB
- Arrays.asList("http://www.openlogic.com/azure/service-agreement/") // eula
- ),
- OSImage.create( //
- "SUSE__openSUSE-12-1-20120603-en-us-30GB.vhd", // name
- null, // locations
- null, // affinityGroup
- "openSUSE 12.1", // label
- "openSUSE is a free and Linux-based operating system!", //description
- null, // imageFamily
- "SUSE", // category
- OSImage.Type.LINUX, // os
- "SUSE", //publisherName
- null, // mediaLink
- 30, // logicalSizeInGB
- Arrays.asList("http://opensuse.org/") // eula
- ),
- OSImage.create( //
- "SUSE__SUSE-Linux-Enterprise-Server-11SP2-20120601-en-us-30GB.vhd", // name
- null, // locations
- null, // affinityGroup
- "SUSE Linux Enterprise Server", // label
- "SUSE Linux Enterprise Server is a highly reliable value.", //description
- null, // imageFamily
- "SUSE", // category
- OSImage.Type.LINUX, // os
- "SUSE", //publisherName
- null, // mediaLink
- 30, // logicalSizeInGB
- Arrays.asList("http://www.novell.com/licensing/eula/") // eula
- ),
- OSImage.create( //
- "0b11de9248dd4d87b18621318e037d37__RightImage-CentOS-6.4-x64-v13.4", // name
- null, // locations
- null, // affinityGroup
- "RightImage-CentOS-6.4-x64-v13.4", // label
- null, //description
- null, // imageFamily
- "RightScale with Linux", // category
- OSImage.Type.LINUX, // os
- "RightScale with Linux",
- null, // mediaLink
- 10, // logicalSizeInGB
- Collections.<String>emptyList() // No EULA, as RightScale stuffed ';' into the field.
- )
- );
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListProfileDefinitionsHandlerTest.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListProfileDefinitionsHandlerTest.java b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListProfileDefinitionsHandlerTest.java
deleted file mode 100644
index c14c2ee..0000000
--- a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListProfileDefinitionsHandlerTest.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS 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.xml;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-import java.util.List;
-
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import java.util.ArrayList;
-import org.jclouds.azurecompute.domain.ProfileDefinition;
-import org.jclouds.azurecompute.domain.ProfileDefinitionEndpoint;
-import org.jclouds.azurecompute.domain.ProfileDefinitionMonitor;
-
-@Test(groups = "unit", testName = "ListProfileDefinitionsHandlerTest")
-public class ListProfileDefinitionsHandlerTest extends BaseHandlerTest {
-
- public void test() {
- final InputStream is = getClass().getResourceAsStream("/listprofiledefinitions.xml");
- final ListProfileDefinitionsHandler handler
- = new ListProfileDefinitionsHandler(new ProfileDefinitionHandler(
- new ProfileDefinitionMonitorHandler(), new ProfileDefinitionEndpointHandler()));
- final List<ProfileDefinition> result = factory.create(handler).parse(is);
- assertEquals(result, expected());
- }
-
- public static List<ProfileDefinition> expected() {
- final ArrayList<ProfileDefinitionMonitor> monitors = new ArrayList<ProfileDefinitionMonitor>();
- monitors.add(ProfileDefinitionMonitor.create(
- 30, 10, 3, ProfileDefinition.Protocol.HTTP, 80, "GET", "/", 200));
-
- final ArrayList<ProfileDefinitionEndpoint> endpoints = new ArrayList<ProfileDefinitionEndpoint>();
- endpoints.add(ProfileDefinitionEndpoint.create("jclouds1.cloudapp.net",
- ProfileDefinition.Status.ENABLED,
- ProfileDefinition.HealthStatus.STOPPED,
- ProfileDefinitionEndpoint.Type.CLOUDSERVICE,
- null,
- 1,
- null));
-
- endpoints.add(ProfileDefinitionEndpoint.create("jclouds2.cloudapp.net",
- ProfileDefinition.Status.ENABLED,
- ProfileDefinition.HealthStatus.STOPPED,
- ProfileDefinitionEndpoint.Type.CLOUDSERVICE,
- null,
- 1,
- null));
-
- return ImmutableList.of(ProfileDefinition.create(300,
- ProfileDefinition.Status.ENABLED,
- "1",
- monitors,
- ProfileDefinition.LBMethod.ROUNDROBIN,
- endpoints,
- ProfileDefinition.HealthStatus.INACTIVE));
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListProfilesHandlerTest.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListProfilesHandlerTest.java b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListProfilesHandlerTest.java
deleted file mode 100644
index e062cd8..0000000
--- a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListProfilesHandlerTest.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.xml;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-import java.util.List;
-
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-
-import org.jclouds.azurecompute.domain.Profile;
-import org.jclouds.azurecompute.domain.ProfileDefinition;
-
-@Test(groups = "unit", testName = "ListProfilesHandlerTest")
-public class ListProfilesHandlerTest extends BaseHandlerTest {
-
- public void test() {
- final InputStream is = getClass().getResourceAsStream("/listprofiles.xml");
- final ListProfilesHandler handler = new ListProfilesHandler(new ProfileHandler());
- final List<Profile> result = factory.create(handler).parse(is);
- assertEquals(result, expected());
- }
-
- public static List<Profile> expected() {
- return ImmutableList.of(
- Profile.create("jclouds.trafficmanager.net",
- "jclouds",
- ProfileDefinition.Status.ENABLED,
- "1",
- ImmutableMap.<String, ProfileDefinition.Status>builder().put("1", ProfileDefinition.Status.ENABLED).build()
- ),
- Profile.create("jclouds2.trafficmanager.net",
- "jclouds2",
- ProfileDefinition.Status.DISABLED,
- null,
- ImmutableMap.<String, ProfileDefinition.Status>builder().build()
- ));
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListReservedIPAddressHandlerTest.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListReservedIPAddressHandlerTest.java b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListReservedIPAddressHandlerTest.java
deleted file mode 100644
index f39ac96..0000000
--- a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListReservedIPAddressHandlerTest.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.xml;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-import java.util.List;
-
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import org.jclouds.azurecompute.domain.ReservedIPAddress;
-
-@Test(groups = "unit", testName = "ListReservedIPAddressHandlerTest")
-public class ListReservedIPAddressHandlerTest extends BaseHandlerTest {
-
- public void test() {
- final InputStream is = getClass().getResourceAsStream("/listreservedipaddress.xml");
- final ListReservedIPAddressHandler handler
- = new ListReservedIPAddressHandler(new ReservedIPAddressHandler());
- final List<ReservedIPAddress> result = factory.create(handler).parse(is);
-
- assertEquals(result, expected());
- }
-
- public static List<ReservedIPAddress> expected() {
- return ImmutableList.of(
- ReservedIPAddress.create(
- "jclouds_ip1",
- "23.101.78.155",
- "582c04d0-b169-4791-a706-f2b2bc36a742",
- null,
- ReservedIPAddress.State.CREATED,
- true,
- "jclouds_s",
- "jclouds_d",
- "West Europe"),
- ReservedIPAddress.create(
- "jclouds_ip2",
- "23.101.69.44",
- "4e00454a-351a-4dae-aabd-c933b60e967c",
- "jclouds ip2 label",
- ReservedIPAddress.State.CREATED,
- null,
- null,
- null,
- "West Europe"));
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListRoleSizesHandlerTest.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListRoleSizesHandlerTest.java b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListRoleSizesHandlerTest.java
deleted file mode 100644
index d65df87..0000000
--- a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListRoleSizesHandlerTest.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS 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.xml;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-import java.util.List;
-
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import org.jclouds.azurecompute.domain.RoleSize;
-
-@Test(groups = "unit", testName = "ListRoleSizesHandlerTest")
-public class ListRoleSizesHandlerTest extends BaseHandlerTest {
-
- public void test() {
- final InputStream is = getClass().getResourceAsStream("/rolesizes.xml");
- final List<RoleSize> result = factory.create(new ListRoleSizesHandler(new RoleSizeHandler())).parse(is);
-
- assertEquals(result, expected());
- }
-
- public static List<RoleSize> expected() {
- return ImmutableList.of(
- RoleSize.create(
- RoleSize.Type.A10,
- "A10 (8 cores, 57344 MB)",
- 8,
- 57344,
- Boolean.TRUE,
- Boolean.TRUE,
- 16,
- 1861268,
- 391828),
- RoleSize.create(
- RoleSize.Type.A11,
- "A11 (16 cores, 114688 MB)",
- 16,
- 114688,
- Boolean.TRUE,
- Boolean.TRUE,
- 16,
- 1861268,
- 391828)
- );
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListServiceCertificatessHandlerTest.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListServiceCertificatessHandlerTest.java b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListServiceCertificatessHandlerTest.java
deleted file mode 100644
index a7e59df..0000000
--- a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListServiceCertificatessHandlerTest.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.xml;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-import java.util.List;
-
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import java.net.URI;
-import org.jclouds.azurecompute.domain.ServiceCertificate;
-
-@Test(groups = "unit", testName = "ListServiceCertificatessHandlerTest")
-public class ListServiceCertificatessHandlerTest extends BaseHandlerTest {
-
- public void test() {
- final InputStream is = getClass().getResourceAsStream("/servicecertificates.xml");
- final ListServiceCertificatesHandler handler
- = new ListServiceCertificatesHandler(new ServiceCertificateHandler());
- final List<ServiceCertificate> result = factory.create(handler).parse(is);
-
- assertEquals(result, expected());
- }
-
- public static List<ServiceCertificate> expected() {
- return ImmutableList.of(
- ServiceCertificate.create(
- URI.create("https://management.core.windows.net/d6769fbe-4649-453f-8435-c07f0cc0709d/services/"
- + "hostedservices/prova/certificates/sha1-8D6ED1395205C57D23E518672903FDAF144EE8AE"),
- "8D6ED1395205C57D23E518672903FDAF144EE8AE",
- "sha1",
- "MIIDyzCCArOgAwIBAgICEAcwDQYJKoZIhvcNAQELBQAwfzELMAkGA1UEBhMCSVQxDjAMBgNVBAgMBUl0YWx5MRAwDgYDVQQ"
- + "HDAdQZXNjYXJhMQ8wDQYDVQQKDAZUaXJhc2ExDDAKBgNVBAsMA0lUQzEPMA0GA1UEAwwGVGlyYXNhMR4wHAYJ"
- + "KoZIhvcNAQkBFg9pbmZvQHRpcmFzYS5uZXQwHhcNMTUwMzA0MTQ1MzQwWhcNMTYwMzAzMTQ1MzQwWjBVMQswC"
- + "QYDVQQGEwJJVDEQMA4GA1UECAwHUGVzY2FyYTEPMA0GA1UECgwGVGlyYXNhMQswCQYDVQQLDAJBTTEWMBQGA1"
- + "UEAwwNYW0udGlyYXNhLm5ldDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMzqTZFbzahmEqp60tx"
- + "g8aUYw4Y7PL44A7rzHVnb5cb01/4VVjNeijmROOL8o5ZEbkNkQly43zjoZcrkw4bpvOz95OP8/NH/ZgyYKR42"
- + "VqcTlxcj/22iq2Ie1XhWsKARmObdnNUcFCsdqXWXBo0bLF+WuUYh4ZoMxFMlP7YYl7WOCCgekE8E9sL02RuLZ"
- + "gq7v2M6fsxhT5rEG81jzUlmY5c/jXZKbUIBaltKtzC3DnBpuk9u+S87WseqTeuhUzF6VvgwmiQ+zeHdr5Hjqx"
- + "rvmq445DPz+2U3PYN1vFoB/6QzjtZVakSfOSZ0YAtFhZFHmR11kJTNMfVQ5k5oIQPtHksCAwEAAaN7MHkwCQY"
- + "DVR0TBAIwADAsBglghkgBhvhCAQ0EHxYdT3BlblNTTCBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUwHQYDVR0OBBYE"
- + "FOIYM6WyNdc4odsThFVtOefT/xg1MB8GA1UdIwQYMBaAFDqheOl4dpXYelhPC/bM+VdN1AXpMA0GCSqGSIb3D"
- + "QEBCwUAA4IBAQB33qLYghIYa2j1ycHBpeZVadsb8xb4AnfnAW9g5dYfZP1eIvmKzOxN3CjpuCRKNI4vyKHiLb"
- + "ucfFDl5zi9BdYwwdduPbYTgE8F8Ilyit3irSRJFk1wHICX0sBPq5ulz39MPZsP2Fmzbrphr9BrRZOc1RJdHnj"
- + "8C7phrfBneGSfwoY+qH5H6/h5A5rS8oDAraeklR2RJK4ztK+yDvp8orRDJQq5LAALQtWDhdW8Qj7WoIbGUeB7"
- + "7aJLluLOgriJLK+kKaGoUuAaKFRJXPyTmtUC17CJUJbapmtDwivILhU/dSdz6+1YXTg0ddNNlug3I6L5VVRnl"
- + "wJJc/hIna1VjQJO"
- ),
- ServiceCertificate.create(
- URI.create("https://management.core.windows.net/d6769fbe-4649-453f-8435-c07f0cc0709d/services/"
- + "hostedservices/prova/certificates/sha1-CCA59C5AA24866BB292F01B81E6A77FAF8FCDC73"),
- "CCA59C5AA24866BB292F01B81E6A77FAF8FCDC73",
- "sha1",
- "MIIDzTCCArWgAwIBAgICEAYwDQYJKoZIhvcNAQELBQAwfzELMAkGA1UEBhMCSVQxDjAMBgNVBAgMBUl0YWx5MRAwDgYDVQ"
- + "QHDAdQZXNjYXJhMQ8wDQYDVQQKDAZUaXJhc2ExDDAKBgNVBAsMA0lUQzEPMA0GA1UEAwwGVGlyYXNhMR4wHAY"
- + "JKoZIhvcNAQkBFg9pbmZvQHRpcmFzYS5uZXQwHhcNMTUwMzA0MTQ1MTI2WhcNMTYwMzAzMTQ1MTI2WjBXMQsw"
- + "CQYDVQQGEwJJVDEQMA4GA1UECAwHUGVzY2FyYTEPMA0GA1UECgwGVGlyYXNhMQwwCgYDVQQLDANJZE0xFzAVB"
- + "gNVBAMMDmlkbS50aXJhc2EubmV0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1G1ejg5eHZzhVc"
- + "a8OOD6pq0fj5VDEYIxG7CGDl4I8N3NE+svIGTYumdKUn1+FFyfgxsPCh7zfoSq0hnelRpBI3w9wfic1856/wN"
- + "z4ZsLQgcrm6wwwVXEfWGKYF1r8pTBzAYqNzQFqypSL9kU/YJfeY8XR3eJ3vQersAiKUQVQqk1H10R2aURqlCF"
- + "s1xc/ta9INNS+SLgWEBmQNnpwHfb7IsIYmPfqvbZsfAJ9KDqIdA5mjPz1elHNLLMi4phGPpbAH7AszZbrRaFt"
- + "bI0o5nAL6tS37f3iEV1L7cWo/am6MGg0PF4T9GRdL8D0gl9BDskMUHD+n8cJOEO2sQVJBKszwIDAQABo3sweT"
- + "AJBgNVHRMEAjAAMCwGCWCGSAGG+EIBDQQfFh1PcGVuU1NMIEdlbmVyYXRlZCBDZXJ0aWZpY2F0ZTAdBgNVHQ4"
- + "EFgQU4GbbmOK+5WNBil8edbwKYHIhCJMwHwYDVR0jBBgwFoAUOqF46Xh2ldh6WE8L9sz5V03UBekwDQYJKoZI"
- + "hvcNAQELBQADggEBAMqr+GoBBf7UPo4dBoQef4OhrNGCcYz6E0B8WID7ZG6KLv6TyTi5iEna/bbc60HisVqUo"
- + "FIMyMa+bHiLNwObNQ/+edklNyPe48OHYX2421x3H//M/n6SpRxP5i1NSlqtcw6WnXzaTHUwV8v+5ctG1QAKrJ"
- + "+nwwDRWzALxPJvw4TDeggRIkzAqIySrN+nRkVNliGlnZEI8NjJdelS/83E02LAxj3sPJp1yS5lWia88eNg6UX"
- + "Y2vQf9CwrXjOz0aOvVOwHJxXBxS0tqv+bg0D5B640WdcZOhgzDxte6DDkiSU+P7nZUW1Bwtk0WD9GKN2+YPg/"
- + "ElLLB5nSEGZSVN6Xfn8="
- ));
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListStorageServiceHandlerTest.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListStorageServiceHandlerTest.java b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListStorageServiceHandlerTest.java
deleted file mode 100644
index 4f9935a..0000000
--- a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListStorageServiceHandlerTest.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.xml;
-
-import static org.testng.Assert.assertEquals;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.List;
-import java.util.Map;
-import org.assertj.core.util.Lists;
-import org.jclouds.azurecompute.domain.StorageService;
-import org.jclouds.date.DateService;
-import org.jclouds.date.internal.SimpleDateFormatDateService;
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-@Test(groups = "unit", testName = "ListStorageServiceHandlerTest")
-public class ListStorageServiceHandlerTest extends BaseHandlerTest {
-
- private static final DateService DATE_SERVICE = new SimpleDateFormatDateService();
-
- public void list() throws MalformedURLException {
- final InputStream input = getClass().getResourceAsStream("/storageservices.xml");
- final List<StorageService> result = factory.create(
- new ListStorageServicesHandler(new StorageServiceHandler(DATE_SERVICE))).
- parse(input);
- assertEquals(result, expected());
- }
-
- public static List<StorageService> expected() throws MalformedURLException {
- final StorageService.StorageServiceProperties props = StorageService.StorageServiceProperties.create(
- null,
- null,
- "West Europe",
- "serviceName",
- StorageService.Status.Created,
- ImmutableList.of(
- new URL("https://serviceName.blob.core.windows.net/"),
- new URL("https://serviceName.queue.core.windows.net/"),
- new URL("https://serviceName.table.core.windows.net/")),
- "West Europe",
- StorageService.RegionStatus.Available,
- null,
- null,
- null,
- DATE_SERVICE.iso8601DateOrSecondsDateParse("2015-03-30T10:15:00Z"),
- Lists.<String>emptyList(),
- Lists.<URL>emptyList(),
- StorageService.AccountType.Standard_LRS);
- final Map<String, String> extProps = ImmutableMap.of(
- "ResourceGroup", "Default-Storage-WestEurope",
- "ResourceLocation", "West Europe");
-
- return ImmutableList.of(StorageService.create(
- new URL("https://management.core.windows.net/subscriptionid/services/storageservices/serviceName"),
- "serviceName",
- props,
- extProps,
- null));
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListVMImagesHandlerTest.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListVMImagesHandlerTest.java b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListVMImagesHandlerTest.java
deleted file mode 100644
index 4befa28..0000000
--- a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListVMImagesHandlerTest.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.xml;
-
-import static org.testng.Assert.assertEquals;
-
-import com.google.common.collect.ImmutableList;
-import org.jclouds.azurecompute.domain.DataVirtualHardDisk;
-import org.jclouds.azurecompute.domain.OSImage;
-import org.jclouds.azurecompute.domain.VMImage;
-import org.jclouds.date.DateService;
-import org.jclouds.date.internal.SimpleDateFormatDateService;
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-import java.io.InputStream;
-import java.net.URI;
-import java.util.List;
-
-@Test(groups = "unit", testName = "ListVMImagesHandlerTest")
-public class ListVMImagesHandlerTest extends BaseHandlerTest {
-
- public void test() {
- InputStream is = getClass().getResourceAsStream("/vmimages.xml");
- List<VMImage> result = factory.create(new ListVMImagesHandler(new VMImageHandler(
- new DataVirtualHardDiskHandler(),
- new OSConfigHandler()
- ))).parse(is);
-
- assertEquals(result, expected());
- }
-
- public static List<VMImage> expected() {
- DateService dateService = new SimpleDateFormatDateService();
- return ImmutableList.of(
- VMImage.create("1acf693f34c74e86a50be61cb631ddfe__ClouderaGolden-202406-699696",
- "CDH 5.1 Evaluation",
- "Public",
- "Single click deployment of CDH 5.1 Evaluation for MR, HDFS and HIVE",
- OSDiskConfig(),
- dataDiskConfig(),
- null,
- null,
- null,
- "East Asia;Southeast Asia;Australia East;Australia Southeast;Brazil South;North Europe",
- null,
- dateService.iso8601DateOrSecondsDateParse("2014-07-05T14:55:17Z"),
- dateService.iso8601DateOrSecondsDateParse("2014-09-06T22:58:11Z"),
- null,
- "CDH 5.1 Evaluation",
- null,
- false,
- "http://www.gnu.org/copyleft/gpl.html",
- null,
- null,
- URI.create("http://www.cloudera.com/content/cloudera/en/privacy-policy.html"),
- dateService.iso8601DateOrSecondsDateParse("2012-07-05T14:55:17Z")
- )
- );
- }
-
- public static VMImage.OSDiskConfiguration OSDiskConfig() {
- return VMImage.OSDiskConfiguration.create("ClouderaGolden-202406-699696-os-2014-10-06",
- VMImage.OSDiskConfiguration.Caching.READ_WRITE,
- VMImage.OSDiskConfiguration.OSState.SPECIALIZED,
- OSImage.Type.LINUX,
- null,
- 30,
- null);
- }
-
- public static List<DataVirtualHardDisk> dataDiskConfig() {
- return ImmutableList.of(
- DataVirtualHardDisk.create(
- DataVirtualHardDisk.Caching.READ_ONLY,
- "testimage1-testimage1-0-20120817095145",
- 10,
- 30,
- URI.create("http://blobs/disks/neotysss/MSFT__Win2K8R2SP1-ABCD-en-us-30GB.vhd"),
- "Standard"
- ),
- DataVirtualHardDisk.create(
- DataVirtualHardDisk.Caching.READ_WRITE,
- "testimage2-testimage2-0-20120817095145",
- 20,
- 30,
- URI.create("http://blobs/disks/neotysss/MSFT__Win2K8R2SP1-ABCD-en-us-30GB.vhd"),
- "Standard"
- )
- );
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListVirtualNetworkSitesHandlerTest.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListVirtualNetworkSitesHandlerTest.java b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListVirtualNetworkSitesHandlerTest.java
deleted file mode 100644
index ecbb663..0000000
--- a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListVirtualNetworkSitesHandlerTest.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.xml;
-
-import static org.testng.Assert.assertEquals;
-import java.io.InputStream;
-import java.util.List;
-
-import org.jclouds.azurecompute.domain.NetworkConfiguration;
-import org.jclouds.azurecompute.domain.NetworkConfiguration.VirtualNetworkSite;
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-
-@Test(groups = "unit", testName = "ListVirtualNetworkSitesHandlerTest")
-public class ListVirtualNetworkSitesHandlerTest extends BaseHandlerTest {
-
- public void test() {
- InputStream is = getClass().getResourceAsStream("/virtualnetworksites.xml");
- List<VirtualNetworkSite> result = factory.create(new ListVirtualNetworkSitesHandler(new VirtualNetworkSiteHandler())).parse(is);
-
- assertEquals(result, expected());
- }
-
- public static List<VirtualNetworkSite> expected() {
- return ImmutableList.of(
- VirtualNetworkSite.create(
- "39d0d14b-fc1d-496f-8928-b5a13a6f4b64",
- "Group Group testDocker",
- "West Europe",
- NetworkConfiguration.AddressSpace.create("10.1.0.0/16"),
- ImmutableList.of(NetworkConfiguration.Subnet.create("Subnet-1", "10.1.0.0/24", null))
- ),
- VirtualNetworkSite.create(
- "12252126-cffc-4fac-8ba4-afa7150a8d4a",
- "Group Group-1 dockertest",
- "West Europe",
- NetworkConfiguration.AddressSpace.create("10.2.0.0/16"),
- ImmutableList.of(NetworkConfiguration.Subnet.create("Subnet-1", "10.2.0.0/24", null))
- )
- );
- }
-
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/test/java/org/jclouds/azurecompute/xml/NetworkConfigurationHandlerTest.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/NetworkConfigurationHandlerTest.java b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/NetworkConfigurationHandlerTest.java
deleted file mode 100644
index b6a7e65..0000000
--- a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/NetworkConfigurationHandlerTest.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.xml;
-
-import static org.testng.Assert.assertEquals;
-import java.io.InputStream;
-
-import org.jclouds.azurecompute.domain.NetworkConfiguration;
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-
-@Test(groups = "unit", testName = "NetworkConfigurationHandlerTest")
-public class NetworkConfigurationHandlerTest extends BaseHandlerTest {
-
- public void test() {
- InputStream is = getClass().getResourceAsStream("/networkconfiguration.xml");
- NetworkConfiguration result = factory.create(new NetworkConfigurationHandler(new VirtualNetworkConfigurationHandler())).parse(is);
-
- assertEquals(result, expected());
- }
-
- public static NetworkConfiguration expected() {
- return NetworkConfiguration.create(
- NetworkConfiguration.VirtualNetworkConfiguration.create(null,
- ImmutableList.of(NetworkConfiguration.VirtualNetworkSite.create(
- null,
- "jclouds-virtual-network",
- "West Europe",
- NetworkConfiguration.AddressSpace.create("10.0.0.0/20"),
- ImmutableList.of(NetworkConfiguration.Subnet.create("jclouds-1", "10.0.0.0/23", null))))
- )
- );
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/test/java/org/jclouds/azurecompute/xml/NetworkSecurityGroupHandlerTest.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/NetworkSecurityGroupHandlerTest.java b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/NetworkSecurityGroupHandlerTest.java
deleted file mode 100644
index ccf6c82..0000000
--- a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/NetworkSecurityGroupHandlerTest.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS 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.xml;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-
-import org.jclouds.azurecompute.domain.NetworkSecurityGroup;
-import org.jclouds.azurecompute.domain.Rule;
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-
-@Test(groups = "unit", testName = "NetworkSecurityGroupHandlerTest")
-public class NetworkSecurityGroupHandlerTest extends BaseHandlerTest {
-
- public void testFull() {
- final InputStream is = getClass().getResourceAsStream("/networksecuritygroupfulldetails.xml");
- final NetworkSecurityGroup result = factory.create(new NetworkSecurityGroupHandler()).parse(is);
- assertEquals(result, expectedFull());
- }
-
- public void test() {
- final InputStream is = getClass().getResourceAsStream("/networksecuritygroup.xml");
- final NetworkSecurityGroup result = factory.create(new NetworkSecurityGroupHandler()).parse(is);
- assertEquals(result, expected());
- }
-
- public void testForSubnet() {
- final InputStream is = getClass().getResourceAsStream("/networksecuritygroupforsubnet.xml");
- final NetworkSecurityGroup result = factory.create(new NetworkSecurityGroupHandler()).parse(is);
- assertEquals(result, expectedForSubnet());
- }
-
- public static NetworkSecurityGroup expected() {
- return NetworkSecurityGroup.create("group1", "sec group 1", "West Europe", null, null);
- }
-
- public static NetworkSecurityGroup expectedForSubnet() {
- return NetworkSecurityGroup.create("group1", null, null, NetworkSecurityGroup.State.CREATED, null);
- }
-
- public static NetworkSecurityGroup expectedFull() {
- return NetworkSecurityGroup.create( //
- "jclouds-NSG", // name
- "jclouds-NSG", // label
- "West Europe", // location
- null, // Network Security Group state
- ImmutableList.of(
- Rule.create("tcp_10-20", // name
- Rule.Type.Inbound, // type
- "100", // priority
- Rule.Action.Allow, // action
- "INTERNET", // sourceAddressPrefix
- "*", // sourcePortRange
- "*", // destinationAddressPrefix
- "10-20", // destinationPortRange
- Rule.Protocol.TCP, // protocol
- "Active", // state
- null // isDefault
- ),
- Rule.create("ALLOW VNET INBOUND", // name
- Rule.Type.Inbound, // type
- "65000", // priority
- Rule.Action.Allow, // action
- "VIRTUAL_NETWORK", // sourceAddressPrefix
- "*", // sourcePortRange
- "VIRTUAL_NETWORK", // destinationAddressPrefix
- "*", // destinationPortRange
- Rule.Protocol.ALL, // protocol
- "Active", // state
- true // isDefault
- ),
- Rule.create("ALLOW VNET OUTBOUND", // name
- Rule.Type.Outbound, // type
- "65000", // priority
- Rule.Action.Allow, // action
- "VIRTUAL_NETWORK", // sourceAddressPrefix
- "*", // sourcePortRange
- "VIRTUAL_NETWORK", // destinationAddressPrefix
- "*", // destinationPortRange
- Rule.Protocol.ALL, // protocol
- "Active", // state
- true // isDefault
- ),
- Rule.create("ALLOW AZURE LOAD BALANCER INBOUND", // name
- Rule.Type.Inbound, // type
- "65001", // priority
- Rule.Action.Allow, // action
- "AZURE_LOADBALANCER", // sourceAddressPrefix
- "*", // sourcePortRange
- "*", // destinationAddressPrefix
- "*", // destinationPortRange
- Rule.Protocol.ALL, // protocol
- "Active", // state
- true // isDefault
- ),
- Rule.create("ALLOW INTERNET OUTBOUND", // name
- Rule.Type.Outbound, // type
- "65001", // priority
- Rule.Action.Allow, // action
- "*", // sourceAddressPrefix
- "*", // sourcePortRange
- "INTERNET", // destinationAddressPrefix
- "*", // destinationPortRange
- Rule.Protocol.ALL, // protocol
- "Active", // state
- true // isDefault
- ),
- Rule.create("DENY ALL OUTBOUND", // name
- Rule.Type.Outbound, // type
- "65500", // priority
- Rule.Action.Deny, // action
- "*", // sourceAddressPrefix
- "*", // sourcePortRange
- "*", // destinationAddressPrefix
- "*", // destinationPortRange
- Rule.Protocol.ALL, // protocol
- "Active", // state
- true // isDefault
- ),
- Rule.create("DENY ALL INBOUND", // name
- Rule.Type.Inbound, // type
- "65500", // priority
- Rule.Action.Deny, // action
- "*", // sourceAddressPrefix
- "*", // sourcePortRange
- "*", // destinationAddressPrefix
- "*", // destinationPortRange
- Rule.Protocol.ALL, // protocol
- "Active", // state
- true // isDefault
- )
- ) // rules
- );
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/test/java/org/jclouds/azurecompute/xml/OperationHandlerTest.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/OperationHandlerTest.java b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/OperationHandlerTest.java
deleted file mode 100644
index 635c5df..0000000
--- a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/OperationHandlerTest.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.xml;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-
-import org.jclouds.azurecompute.domain.Operation;
-import org.jclouds.azurecompute.domain.Operation.Status;
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-@Test(groups = "unit", testName = "OperationHandlerTest")
-public class OperationHandlerTest extends BaseHandlerTest {
-
- public void test() {
- InputStream is = getClass().getResourceAsStream("/operation.xml");
- Operation result = factory.create(new OperationHandler()).parse(is);
-
- assertEquals(result, expected());
- }
-
- public static Operation expected() {
- return Operation.create("request-id", Status.FAILED, 400, ErrorHandlerTest.expected());
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ProfileDefinitionHandlerTest.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ProfileDefinitionHandlerTest.java b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ProfileDefinitionHandlerTest.java
deleted file mode 100644
index 292a46e..0000000
--- a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ProfileDefinitionHandlerTest.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.xml;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-import java.util.ArrayList;
-import org.jclouds.azurecompute.domain.ProfileDefinition;
-import org.jclouds.azurecompute.domain.ProfileDefinition.Status;
-import org.jclouds.azurecompute.domain.ProfileDefinitionEndpoint;
-import org.jclouds.azurecompute.domain.ProfileDefinitionMonitor;
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-@Test(groups = "unit", testName = "ProfileDefinitionHandlerTest")
-public class ProfileDefinitionHandlerTest extends BaseHandlerTest {
-
- public void test() {
- final InputStream is = getClass().getResourceAsStream("/profiledefinition.xml");
- final ProfileDefinition result = factory.create(new ProfileDefinitionHandler(
- new ProfileDefinitionMonitorHandler(), new ProfileDefinitionEndpointHandler())).parse(is);
- assertEquals(result, expected());
- }
-
- public static ProfileDefinition expected() {
- final ArrayList<ProfileDefinitionMonitor> monitors = new ArrayList<ProfileDefinitionMonitor>();
- monitors.add(ProfileDefinitionMonitor.create(
- 30, 10, 3, ProfileDefinition.Protocol.HTTP, 80, "GET", "/", 200));
-
- final ArrayList<ProfileDefinitionEndpoint> endpoints = new ArrayList<ProfileDefinitionEndpoint>();
- endpoints.add(ProfileDefinitionEndpoint.create("jclouds1.cloudapp.net",
- Status.ENABLED,
- ProfileDefinition.HealthStatus.STOPPED,
- ProfileDefinitionEndpoint.Type.CLOUDSERVICE,
- null,
- 1,
- null));
-
- endpoints.add(ProfileDefinitionEndpoint.create("jclouds2.cloudapp.net",
- Status.ENABLED,
- ProfileDefinition.HealthStatus.STOPPED,
- ProfileDefinitionEndpoint.Type.CLOUDSERVICE,
- null,
- 1,
- null));
-
- return ProfileDefinition.create(300,
- Status.ENABLED,
- "1",
- monitors,
- ProfileDefinition.LBMethod.ROUNDROBIN,
- endpoints,
- ProfileDefinition.HealthStatus.INACTIVE
- );
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ProfileHandlerTest.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ProfileHandlerTest.java b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ProfileHandlerTest.java
deleted file mode 100644
index 173534b..0000000
--- a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ProfileHandlerTest.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.xml;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-
-import org.jclouds.azurecompute.domain.Profile;
-import org.jclouds.azurecompute.domain.ProfileDefinition.Status;
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableMap;
-
-@Test(groups = "unit", testName = "ProfileHandlerTest")
-public class ProfileHandlerTest extends BaseHandlerTest {
-
- public void test() {
- final InputStream is = getClass().getResourceAsStream("/profile.xml");
- final Profile result = factory.create(new ProfileHandler()).parse(is);
- assertEquals(result, expected());
- }
-
- public static Profile expected() {
- return Profile.create("jclouds.trafficmanager.net",
- "jclouds",
- Status.ENABLED,
- "1",
- ImmutableMap.<String, Status>builder().put("1", Status.ENABLED).build()
- );
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ReservedIPAddressHandlerTest.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ReservedIPAddressHandlerTest.java b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ReservedIPAddressHandlerTest.java
deleted file mode 100644
index 8758254..0000000
--- a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ReservedIPAddressHandlerTest.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.xml;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-import org.jclouds.azurecompute.domain.ReservedIPAddress;
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-@Test(groups = "unit", testName = "ReservedIPAddressHandlerTest")
-public class ReservedIPAddressHandlerTest extends BaseHandlerTest {
-
- public void test() {
- final InputStream is = getClass().getResourceAsStream("/reservedipaddress.xml");
- final ReservedIPAddress result = factory.create(new ReservedIPAddressHandler()).parse(is);
- assertEquals(result, expected());
- }
-
- public static ReservedIPAddress expected() {
- return ReservedIPAddress.create(
- "jclouds_ip1",
- "23.101.78.155",
- "582c04d0-b169-4791-a706-f2b2bc36a742",
- null,
- ReservedIPAddress.State.CREATED,
- true,
- "jclouds_s",
- "jclouds_d",
- "West Europe");
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/test/java/org/jclouds/azurecompute/xml/RoleHandlerTest.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/RoleHandlerTest.java b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/RoleHandlerTest.java
deleted file mode 100644
index 7b2c5d6..0000000
--- a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/RoleHandlerTest.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.xml;
-
-import static org.testng.Assert.assertEquals;
-import java.io.InputStream;
-import java.net.URI;
-
-import org.jclouds.azurecompute.domain.DataVirtualHardDisk;
-import org.jclouds.azurecompute.domain.OSImage;
-import org.jclouds.azurecompute.domain.Role;
-import org.jclouds.azurecompute.domain.RoleSize;
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-
-@Test(groups = "unit", testName = "RoleHandlerTest")
-public class RoleHandlerTest extends BaseHandlerTest {
-
- public void test() {
- InputStream is = getClass().getResourceAsStream("/role.xml");
- Role result = factory.create(new RoleHandler(new ConfigurationSetHandler(new InputEndpointHandler(), new SubnetNameHandler()),
- new OSVirtualHardDiskHandler(),
- new DataVirtualHardDiskHandler(),
- new ResourceExtensionReferenceHandler(new ResourceExtensionParameterValueHandler()))).parse(is);
-
- assertEquals(result, expected());
- }
-
- public static Role expected() {
- return Role.create(
- "testvnetsg02",
- "PersistentVMRole",
- null,
- null,
- ImmutableList.of(Role.ConfigurationSet.create(
- "NetworkConfiguration",
- ImmutableList.of(
- Role.ConfigurationSet.InputEndpoint.create("PowerShell", "tcp", 5986, 5986, "23.101.193.92", false, null, null, null),
- Role.ConfigurationSet.InputEndpoint.create("Remote Desktop", "tcp", 3389, 59440, "23.101.193.92", false, null, null, null)
- ),
- ImmutableList.of(Role.ConfigurationSet.SubnetName.create("Subnet-1")),
- null,
- ImmutableList.<Role.ConfigurationSet.PublicIP>of(),
- "vnetnsgsg01")
- ),
- ImmutableList.of(
- Role.ResourceExtensionReference.create("BGInfo", "Microsoft.Compute", "BGInfo", "1.*", ImmutableList.<Role.ResourceExtensionReference.ResourceExtensionParameterValue>of(), "Enable")
- ),
- null,
- ImmutableList.<DataVirtualHardDisk>of(),
- Role.OSVirtualHardDisk.create(
- "ReadWrite",
- "testvnetsg02-testvnetsg02-0-201502180825130518",
- null,
- null,
- URI.create("https://portalvhdsxz8nc6chc32j1.blob.core.windows.net/vhds/testvnetsg02-testvnetsg02-2015-02-18.vhd"),
- "a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-R2-201412.01-en.us-127GB.vhd",
- OSImage.Type.WINDOWS),
- RoleSize.Type.SMALL,
- true,
- null
- );
- }
-
- public void test2() {
- InputStream is = getClass().getResourceAsStream("/role2.xml");
- Role result = factory.create(new RoleHandler(new ConfigurationSetHandler(new InputEndpointHandler(), new SubnetNameHandler()),
- new OSVirtualHardDiskHandler(),
- new DataVirtualHardDiskHandler(),
- new ResourceExtensionReferenceHandler(new ResourceExtensionParameterValueHandler()))).parse(is);
-
- assertEquals(result, expected2());
- }
-
- public static Role expected2() {
- return Role.create(
- "test",
- "PersistentVMRole",
- null,
- null,
- ImmutableList.of(Role.ConfigurationSet.create(
- "NetworkConfiguration",
- ImmutableList.of(
- Role.ConfigurationSet.InputEndpoint.create("SSH", "tcp", 22, 22, "168.61.166.228", false, null, null, null)
- ),
- ImmutableList.of(Role.ConfigurationSet.SubnetName.create("Subnet-1")),
- null,
- ImmutableList.<Role.ConfigurationSet.PublicIP>of(),
- null)
- ),
- ImmutableList.<Role.ResourceExtensionReference>of(),
- null,
- ImmutableList.<DataVirtualHardDisk>of(),
- Role.OSVirtualHardDisk.create(
- "ReadWrite",
- "test-1452267291453",
- null,
- null,
- URI.create("test"),
- null,
- OSImage.Type.LINUX),
- RoleSize.Type.BASIC_A1,
- true,
- null
- );
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ServiceCertificateHandlerTest.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ServiceCertificateHandlerTest.java b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ServiceCertificateHandlerTest.java
deleted file mode 100644
index b98b2a3..0000000
--- a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ServiceCertificateHandlerTest.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.xml;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-import org.jclouds.azurecompute.domain.ServiceCertificate;
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-@Test(groups = "unit", testName = "ServiceCertificateHandlerTest")
-public class ServiceCertificateHandlerTest extends BaseHandlerTest {
-
- public void test() {
- final InputStream is = getClass().getResourceAsStream("/servicecertificate.xml");
- final ServiceCertificate result = factory.create(new ServiceCertificateHandler()).parse(is);
- assertEquals(result, expected());
- }
-
- public static ServiceCertificate expected() {
- return ServiceCertificate.create(
- null,
- null,
- null,
- "MIIDyzCCArOgAwIBAgICEAcwDQYJKoZIhvcNAQELBQAwfzELMAkGA1UEBhMCSVQxDjAMBgNVBAgMBUl0YWx5MRAwDgYDVQQHDAdQZXN"
- + "jYXJhMQ8wDQYDVQQKDAZUaXJhc2ExDDAKBgNVBAsMA0lUQzEPMA0GA1UEAwwGVGlyYXNhMR4wHAYJKoZIhvcNAQkBFg9pbmZvQHRp"
- + "cmFzYS5uZXQwHhcNMTUwMzA0MTQ1MzQwWhcNMTYwMzAzMTQ1MzQwWjBVMQswCQYDVQQGEwJJVDEQMA4GA1UECAwHUGVzY2FyYTEPM"
- + "A0GA1UECgwGVGlyYXNhMQswCQYDVQQLDAJBTTEWMBQGA1UEAwwNYW0udGlyYXNhLm5ldDCCASIwDQYJKoZIhvcNAQEBBQADggEPAD"
- + "CCAQoCggEBAMzqTZFbzahmEqp60txg8aUYw4Y7PL44A7rzHVnb5cb01/4VVjNeijmROOL8o5ZEbkNkQly43zjoZcrkw4bpvOz95OP"
- + "8/NH/ZgyYKR42VqcTlxcj/22iq2Ie1XhWsKARmObdnNUcFCsdqXWXBo0bLF+WuUYh4ZoMxFMlP7YYl7WOCCgekE8E9sL02RuLZgq7"
- + "v2M6fsxhT5rEG81jzUlmY5c/jXZKbUIBaltKtzC3DnBpuk9u+S87WseqTeuhUzF6VvgwmiQ+zeHdr5Hjqxrvmq445DPz+2U3PYN1v"
- + "FoB/6QzjtZVakSfOSZ0YAtFhZFHmR11kJTNMfVQ5k5oIQPtHksCAwEAAaN7MHkwCQYDVR0TBAIwADAsBglghkgBhvhCAQ0EHxYdT3"
- + "BlblNTTCBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUwHQYDVR0OBBYEFOIYM6WyNdc4odsThFVtOefT/xg1MB8GA1UdIwQYMBaAFDqheOl"
- + "4dpXYelhPC/bM+VdN1AXpMA0GCSqGSIb3DQEBCwUAA4IBAQB33qLYghIYa2j1ycHBpeZVadsb8xb4AnfnAW9g5dYfZP1eIvmKzOxN"
- + "3CjpuCRKNI4vyKHiLbucfFDl5zi9BdYwwdduPbYTgE8F8Ilyit3irSRJFk1wHICX0sBPq5ulz39MPZsP2Fmzbrphr9BrRZOc1RJdH"
- + "nj8C7phrfBneGSfwoY+qH5H6/h5A5rS8oDAraeklR2RJK4ztK+yDvp8orRDJQq5LAALQtWDhdW8Qj7WoIbGUeB77aJLluLOgriJLK"
- + "+kKaGoUuAaKFRJXPyTmtUC17CJUJbapmtDwivILhU/dSdz6+1YXTg0ddNNlug3I6L5VVRnlwJJc/hIna1VjQJO"
- );
- }
-}