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 2014/11/27 15:32:17 UTC
[02/24] jclouds-labs git commit: JCLOUDS-785: Leave only Abiquo
skeleton to start coding Abiquo 3 provider
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/1b689dc1/abiquo/src/test/java/org/jclouds/abiquo/monitor/functions/ConversionStatusMonitorTest.java
----------------------------------------------------------------------
diff --git a/abiquo/src/test/java/org/jclouds/abiquo/monitor/functions/ConversionStatusMonitorTest.java b/abiquo/src/test/java/org/jclouds/abiquo/monitor/functions/ConversionStatusMonitorTest.java
deleted file mode 100644
index 55efb73..0000000
--- a/abiquo/src/test/java/org/jclouds/abiquo/monitor/functions/ConversionStatusMonitorTest.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.abiquo.monitor.functions;
-
-import static org.testng.Assert.assertEquals;
-
-import org.easymock.EasyMock;
-import org.jclouds.abiquo.domain.cloud.Conversion;
-import org.jclouds.abiquo.monitor.MonitorStatus;
-import org.jclouds.rest.ApiContext;
-import org.testng.annotations.Test;
-
-import com.abiquo.model.enumerator.ConversionState;
-import com.abiquo.server.core.appslibrary.ConversionDto;
-import com.google.common.base.Function;
-
-/**
- * Unit tests for the {@link ConversionStatusMonitor} function.
- */
-@Test(groups = "unit", testName = "ConversionStatusMonitorTest")
-public class ConversionStatusMonitorTest {
-
- @Test(expectedExceptions = NullPointerException.class)
- public void testInvalidNullArgument() {
- Function<Conversion, MonitorStatus> function = new ConversionStatusMonitor();
- function.apply(null);
- }
-
- public void testReturnDone() {
- ConversionState[] states = { ConversionState.FINISHED };
-
- checkStatesReturn(new MockConversion(), new ConversionStatusMonitor(), states, MonitorStatus.DONE);
- }
-
- public void testReturnFail() {
- ConversionState[] states = { ConversionState.FAILED };
-
- checkStatesReturn(new MockConversion(), new ConversionStatusMonitor(), states, MonitorStatus.FAILED);
- }
-
- public void testReturnContinue() {
- ConversionState[] states = { ConversionState.ENQUEUED };
-
- checkStatesReturn(new MockConversion(), new ConversionStatusMonitor(), states, MonitorStatus.CONTINUE);
-
- checkStatesReturn(new MockConversionFailing(), new ConversionStatusMonitor(), states, MonitorStatus.CONTINUE);
- }
-
- private void checkStatesReturn(final MockConversion task, final Function<Conversion, MonitorStatus> function,
- final ConversionState[] states, final MonitorStatus expectedStatus) {
- for (ConversionState state : states) {
- task.setState(state);
- assertEquals(function.apply(task), expectedStatus);
- }
- }
-
- private static class MockConversion extends Conversion {
- @SuppressWarnings("unchecked")
- public MockConversion() {
- super(EasyMock.createMock(ApiContext.class), new ConversionDto());
- }
-
- @Override
- public void refresh() {
- // Do not perform any API call
- }
-
- public void setState(final ConversionState state) {
- target.setState(state);
- }
- }
-
- private static class MockConversionFailing extends MockConversion {
- @Override
- public void refresh() {
- throw new RuntimeException("This mock class always fails to refresh");
- }
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/1b689dc1/abiquo/src/test/java/org/jclouds/abiquo/monitor/functions/VirtualApplianceDeployMonitorTest.java
----------------------------------------------------------------------
diff --git a/abiquo/src/test/java/org/jclouds/abiquo/monitor/functions/VirtualApplianceDeployMonitorTest.java b/abiquo/src/test/java/org/jclouds/abiquo/monitor/functions/VirtualApplianceDeployMonitorTest.java
deleted file mode 100644
index 318cc26..0000000
--- a/abiquo/src/test/java/org/jclouds/abiquo/monitor/functions/VirtualApplianceDeployMonitorTest.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.abiquo.monitor.functions;
-
-import static org.testng.Assert.assertEquals;
-
-import org.easymock.EasyMock;
-import org.jclouds.abiquo.domain.cloud.VirtualAppliance;
-import org.jclouds.abiquo.monitor.MonitorStatus;
-import org.jclouds.rest.ApiContext;
-import org.testng.annotations.Test;
-
-import com.abiquo.server.core.cloud.VirtualApplianceDto;
-import com.abiquo.server.core.cloud.VirtualApplianceState;
-import com.google.common.base.Function;
-
-/**
- * Unit tests for the {@link VirtualApplianceDeployMonitor} function.
- */
-@Test(groups = "unit", testName = "VirtualApplianceDeployMonitorTest")
-public class VirtualApplianceDeployMonitorTest {
-
- @Test(expectedExceptions = NullPointerException.class)
- public void testInvalidNullArgument() {
- Function<VirtualAppliance, MonitorStatus> function = new VirtualApplianceDeployMonitor();
- function.apply(null);
- }
-
- public void testReturnDone() {
- VirtualApplianceState[] states = { VirtualApplianceState.DEPLOYED };
-
- checkStatesReturn(new MockVirtualAppliance(), new VirtualApplianceDeployMonitor(), states, MonitorStatus.DONE);
- }
-
- public void testReturnFail() {
- VirtualApplianceState[] states = { VirtualApplianceState.NEEDS_SYNC, VirtualApplianceState.UNKNOWN,
- VirtualApplianceState.NOT_DEPLOYED };
-
- checkStatesReturn(new MockVirtualAppliance(), new VirtualApplianceDeployMonitor(), states, MonitorStatus.FAILED);
- }
-
- public void testReturnContinue() {
- VirtualApplianceState[] states = { VirtualApplianceState.LOCKED };
-
- checkStatesReturn(new MockVirtualAppliance(), new VirtualApplianceDeployMonitor(), states, MonitorStatus.CONTINUE);
-
- checkStatesReturn(new MockVirtualApplianceFailing(), new VirtualApplianceDeployMonitor(), states,
- MonitorStatus.CONTINUE);
- }
-
- private void checkStatesReturn(final MockVirtualAppliance vapp,
- final Function<VirtualAppliance, MonitorStatus> function, final VirtualApplianceState[] states,
- final MonitorStatus expectedStatus) {
- for (VirtualApplianceState state : states) {
- vapp.setState(state);
- assertEquals(function.apply(vapp), expectedStatus);
- }
- }
-
- private static class MockVirtualAppliance extends VirtualAppliance {
- private VirtualApplianceState state;
-
- @SuppressWarnings("unchecked")
- public MockVirtualAppliance() {
- super(EasyMock.createMock(ApiContext.class), new VirtualApplianceDto());
- }
-
- @Override
- public VirtualApplianceState getState() {
- return state;
- }
-
- public void setState(final VirtualApplianceState state) {
- this.state = state;
- }
- }
-
- private static class MockVirtualApplianceFailing extends MockVirtualAppliance {
- @Override
- public VirtualApplianceState getState() {
- throw new RuntimeException("This mock class always fails to get the state");
- }
-
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/1b689dc1/abiquo/src/test/java/org/jclouds/abiquo/monitor/functions/VirtualApplianceUndeployMonitorTest.java
----------------------------------------------------------------------
diff --git a/abiquo/src/test/java/org/jclouds/abiquo/monitor/functions/VirtualApplianceUndeployMonitorTest.java b/abiquo/src/test/java/org/jclouds/abiquo/monitor/functions/VirtualApplianceUndeployMonitorTest.java
deleted file mode 100644
index 6de0867..0000000
--- a/abiquo/src/test/java/org/jclouds/abiquo/monitor/functions/VirtualApplianceUndeployMonitorTest.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.abiquo.monitor.functions;
-
-import static org.testng.Assert.assertEquals;
-
-import org.easymock.EasyMock;
-import org.jclouds.abiquo.domain.cloud.VirtualAppliance;
-import org.jclouds.abiquo.monitor.MonitorStatus;
-import org.jclouds.rest.ApiContext;
-import org.testng.annotations.Test;
-
-import com.abiquo.server.core.cloud.VirtualApplianceDto;
-import com.abiquo.server.core.cloud.VirtualApplianceState;
-import com.google.common.base.Function;
-
-/**
- * Unit tests for the {@link VirtualApplianceUndeployMonitor} function.
- */
-@Test(groups = "unit", testName = "VirtualApplianceUndeployMonitorTest")
-public class VirtualApplianceUndeployMonitorTest {
-
- @Test(expectedExceptions = NullPointerException.class)
- public void testInvalidNullArgument() {
- Function<VirtualAppliance, MonitorStatus> function = new VirtualApplianceUndeployMonitor();
- function.apply(null);
- }
-
- public void testReturnDone() {
- VirtualApplianceState[] states = { VirtualApplianceState.NOT_DEPLOYED };
-
- checkStatesReturn(new MockVirtualAppliance(), new VirtualApplianceUndeployMonitor(), states, MonitorStatus.DONE);
- }
-
- public void testReturnFail() {
- VirtualApplianceState[] states = { VirtualApplianceState.DEPLOYED, VirtualApplianceState.NEEDS_SYNC,
- VirtualApplianceState.UNKNOWN };
-
- checkStatesReturn(new MockVirtualAppliance(), new VirtualApplianceUndeployMonitor(), states, MonitorStatus.FAILED);
- }
-
- public void testReturnContinue() {
- VirtualApplianceState[] states = { VirtualApplianceState.LOCKED };
-
- checkStatesReturn(new MockVirtualAppliance(), new VirtualApplianceUndeployMonitor(), states,
- MonitorStatus.CONTINUE);
-
- checkStatesReturn(new MockVirtualApplianceFailing(), new VirtualApplianceUndeployMonitor(), states,
- MonitorStatus.CONTINUE);
- }
-
- private void checkStatesReturn(final MockVirtualAppliance vapp,
- final Function<VirtualAppliance, MonitorStatus> function, final VirtualApplianceState[] states,
- final MonitorStatus expectedStatus) {
- for (VirtualApplianceState state : states) {
- vapp.setState(state);
- assertEquals(function.apply(vapp), expectedStatus);
- }
- }
-
- private static class MockVirtualAppliance extends VirtualAppliance {
- private VirtualApplianceState state;
-
- @SuppressWarnings("unchecked")
- public MockVirtualAppliance() {
- super(EasyMock.createMock(ApiContext.class), new VirtualApplianceDto());
- }
-
- @Override
- public VirtualApplianceState getState() {
- return state;
- }
-
- public void setState(final VirtualApplianceState state) {
- this.state = state;
- }
- }
-
- private static class MockVirtualApplianceFailing extends MockVirtualAppliance {
- @Override
- public VirtualApplianceState getState() {
- throw new RuntimeException("This mock class always fails to get the state");
- }
-
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/1b689dc1/abiquo/src/test/java/org/jclouds/abiquo/monitor/functions/VirtualMachineDeployMonitorTest.java
----------------------------------------------------------------------
diff --git a/abiquo/src/test/java/org/jclouds/abiquo/monitor/functions/VirtualMachineDeployMonitorTest.java b/abiquo/src/test/java/org/jclouds/abiquo/monitor/functions/VirtualMachineDeployMonitorTest.java
deleted file mode 100644
index d4386e9..0000000
--- a/abiquo/src/test/java/org/jclouds/abiquo/monitor/functions/VirtualMachineDeployMonitorTest.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.abiquo.monitor.functions;
-
-import static org.testng.Assert.assertEquals;
-
-import org.easymock.EasyMock;
-import org.jclouds.abiquo.domain.cloud.VirtualMachine;
-import org.jclouds.abiquo.monitor.MonitorStatus;
-import org.jclouds.rest.ApiContext;
-import org.testng.annotations.Test;
-
-import com.abiquo.server.core.cloud.VirtualMachineState;
-import com.abiquo.server.core.cloud.VirtualMachineWithNodeExtendedDto;
-import com.google.common.base.Function;
-
-/**
- * Unit tests for the {@link VirtualMachineDeployMonitor} function.
- */
-@Test(groups = "unit", testName = "VirtualMachineDeployMonitorTest")
-public class VirtualMachineDeployMonitorTest {
- @Test(expectedExceptions = NullPointerException.class)
- public void testInvalidNullArgument() {
- Function<VirtualMachine, MonitorStatus> function = new VirtualMachineDeployMonitor();
- function.apply(null);
- }
-
- public void testReturnDone() {
- VirtualMachineState[] states = { VirtualMachineState.ON };
-
- checkStatesReturn(new MockVirtualMachine(), new VirtualMachineDeployMonitor(), states, MonitorStatus.DONE);
- }
-
- public void testReturnFail() {
- VirtualMachineState[] states = { VirtualMachineState.NOT_ALLOCATED, VirtualMachineState.UNKNOWN };
-
- checkStatesReturn(new MockVirtualMachine(), new VirtualMachineDeployMonitor(), states, MonitorStatus.FAILED);
- }
-
- public void testReturnContinue() {
- VirtualMachineState[] states = { VirtualMachineState.ALLOCATED, VirtualMachineState.CONFIGURED,
- VirtualMachineState.LOCKED, VirtualMachineState.OFF, VirtualMachineState.PAUSED };
-
- checkStatesReturn(new MockVirtualMachine(), new VirtualMachineDeployMonitor(), states, MonitorStatus.CONTINUE);
-
- checkStatesReturn(new MockVirtualMachineFailing(), new VirtualMachineDeployMonitor(), states,
- MonitorStatus.CONTINUE);
- }
-
- private void checkStatesReturn(final MockVirtualMachine vm, final Function<VirtualMachine, MonitorStatus> function,
- final VirtualMachineState[] states, final MonitorStatus expectedStatus) {
- for (VirtualMachineState state : states) {
- vm.setState(state);
- assertEquals(function.apply(vm), expectedStatus);
- }
- }
-
- private static class MockVirtualMachine extends VirtualMachine {
- private VirtualMachineState state;
-
- @SuppressWarnings("unchecked")
- public MockVirtualMachine() {
- super(EasyMock.createMock(ApiContext.class), new VirtualMachineWithNodeExtendedDto());
- }
-
- @Override
- public VirtualMachineState getState() {
- return state;
- }
-
- public void setState(final VirtualMachineState state) {
- this.state = state;
- }
- }
-
- private static class MockVirtualMachineFailing extends MockVirtualMachine {
- @Override
- public VirtualMachineState getState() {
- throw new RuntimeException("This mock class always fails to get the state");
- }
-
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/1b689dc1/abiquo/src/test/java/org/jclouds/abiquo/monitor/functions/VirtualMachineStateMonitorTest.java
----------------------------------------------------------------------
diff --git a/abiquo/src/test/java/org/jclouds/abiquo/monitor/functions/VirtualMachineStateMonitorTest.java b/abiquo/src/test/java/org/jclouds/abiquo/monitor/functions/VirtualMachineStateMonitorTest.java
deleted file mode 100644
index c41cd7c..0000000
--- a/abiquo/src/test/java/org/jclouds/abiquo/monitor/functions/VirtualMachineStateMonitorTest.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.abiquo.monitor.functions;
-
-import static org.testng.Assert.assertEquals;
-
-import org.easymock.EasyMock;
-import org.jclouds.abiquo.domain.cloud.VirtualMachine;
-import org.jclouds.abiquo.monitor.MonitorStatus;
-import org.jclouds.rest.ApiContext;
-import org.testng.annotations.Test;
-
-import com.abiquo.server.core.cloud.VirtualMachineState;
-import com.abiquo.server.core.cloud.VirtualMachineWithNodeExtendedDto;
-import com.google.common.base.Function;
-
-/**
- * Unit tests for the {@link VirtualMachineStateMonitor} function.
- */
-@Test(groups = "unit", testName = "VirtualMachineStateMonitorTest")
-public class VirtualMachineStateMonitorTest {
- @Test(expectedExceptions = NullPointerException.class)
- public void testInvalidNullState() {
- new VirtualMachineStateMonitor(null);
- }
-
- @Test(expectedExceptions = NullPointerException.class)
- public void testInvalidNullArgument() {
- Function<VirtualMachine, MonitorStatus> function = new VirtualMachineStateMonitor(VirtualMachineState.ON);
- function.apply(null);
- }
-
- public void testReturnDone() {
- VirtualMachineState[] states = { VirtualMachineState.ON };
-
- checkStatesReturn(new MockVirtualMachine(), new VirtualMachineStateMonitor(VirtualMachineState.ON), states,
- MonitorStatus.DONE);
- }
-
- public void testReturnContinue() {
- VirtualMachineState[] states = { VirtualMachineState.ALLOCATED, VirtualMachineState.CONFIGURED,
- VirtualMachineState.LOCKED, VirtualMachineState.OFF, VirtualMachineState.PAUSED,
- VirtualMachineState.NOT_ALLOCATED, VirtualMachineState.UNKNOWN };
-
- checkStatesReturn(new MockVirtualMachine(), new VirtualMachineStateMonitor(VirtualMachineState.ON), states,
- MonitorStatus.CONTINUE);
-
- checkStatesReturn(new MockVirtualMachineFailing(), new VirtualMachineStateMonitor(VirtualMachineState.ON),
- states, MonitorStatus.CONTINUE);
- }
-
- private void checkStatesReturn(final MockVirtualMachine vm, final Function<VirtualMachine, MonitorStatus> function,
- final VirtualMachineState[] states, final MonitorStatus expectedStatus) {
- for (VirtualMachineState state : states) {
- vm.setState(state);
- assertEquals(function.apply(vm), expectedStatus);
- }
- }
-
- private static class MockVirtualMachine extends VirtualMachine {
- private VirtualMachineState state;
-
- @SuppressWarnings("unchecked")
- public MockVirtualMachine() {
- super(EasyMock.createMock(ApiContext.class), new VirtualMachineWithNodeExtendedDto());
- }
-
- @Override
- public VirtualMachineState getState() {
- return state;
- }
-
- public void setState(final VirtualMachineState state) {
- this.state = state;
- }
- }
-
- private static class MockVirtualMachineFailing extends MockVirtualMachine {
- @Override
- public VirtualMachineState getState() {
- throw new RuntimeException("This mock class always fails to get the state");
- }
-
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/1b689dc1/abiquo/src/test/java/org/jclouds/abiquo/monitor/functions/VirtualMachineUndeployMonitorTest.java
----------------------------------------------------------------------
diff --git a/abiquo/src/test/java/org/jclouds/abiquo/monitor/functions/VirtualMachineUndeployMonitorTest.java b/abiquo/src/test/java/org/jclouds/abiquo/monitor/functions/VirtualMachineUndeployMonitorTest.java
deleted file mode 100644
index 5163c59..0000000
--- a/abiquo/src/test/java/org/jclouds/abiquo/monitor/functions/VirtualMachineUndeployMonitorTest.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.abiquo.monitor.functions;
-
-import static org.testng.Assert.assertEquals;
-
-import org.easymock.EasyMock;
-import org.jclouds.abiquo.domain.cloud.VirtualMachine;
-import org.jclouds.abiquo.monitor.MonitorStatus;
-import org.jclouds.rest.ApiContext;
-import org.testng.annotations.Test;
-
-import com.abiquo.server.core.cloud.VirtualMachineState;
-import com.abiquo.server.core.cloud.VirtualMachineWithNodeExtendedDto;
-import com.google.common.base.Function;
-
-/**
- * Unit tests for the {@link VirtualMachineUndeployMonitor} function.
- */
-@Test(groups = "unit", testName = "VirtualMachineUndeployMonitorTest")
-public class VirtualMachineUndeployMonitorTest {
-
- @Test(expectedExceptions = NullPointerException.class)
- public void testInvalidNullArgument() {
- Function<VirtualMachine, MonitorStatus> function = new VirtualMachineUndeployMonitor();
- function.apply(null);
- }
-
- public void testReturnDone() {
- VirtualMachineState[] states = { VirtualMachineState.NOT_ALLOCATED };
-
- checkStatesReturn(new MockVirtualMachine(), new VirtualMachineUndeployMonitor(), states, MonitorStatus.DONE);
- }
-
- public void testReturnFail() {
- VirtualMachineState[] states = { VirtualMachineState.ON, VirtualMachineState.CONFIGURED, VirtualMachineState.OFF,
- VirtualMachineState.PAUSED, VirtualMachineState.UNKNOWN };
-
- checkStatesReturn(new MockVirtualMachine(), new VirtualMachineUndeployMonitor(), states, MonitorStatus.FAILED);
- }
-
- public void testReturnContinue() {
- VirtualMachineState[] states = { VirtualMachineState.ALLOCATED, VirtualMachineState.LOCKED };
-
- checkStatesReturn(new MockVirtualMachine(), new VirtualMachineUndeployMonitor(), states, MonitorStatus.CONTINUE);
-
- checkStatesReturn(new MockVirtualMachineFailing(), new VirtualMachineUndeployMonitor(), states,
- MonitorStatus.CONTINUE);
- }
-
- private void checkStatesReturn(final MockVirtualMachine vm, final Function<VirtualMachine, MonitorStatus> function,
- final VirtualMachineState[] states, final MonitorStatus expectedStatus) {
- for (VirtualMachineState state : states) {
- vm.setState(state);
- assertEquals(function.apply(vm), expectedStatus);
- }
- }
-
- private static class MockVirtualMachine extends VirtualMachine {
- private VirtualMachineState state;
-
- @SuppressWarnings("unchecked")
- public MockVirtualMachine() {
- super(EasyMock.createMock(ApiContext.class), new VirtualMachineWithNodeExtendedDto());
- }
-
- @Override
- public VirtualMachineState getState() {
- return state;
- }
-
- public void setState(final VirtualMachineState state) {
- this.state = state;
- }
- }
-
- private static class MockVirtualMachineFailing extends MockVirtualMachine {
- @Override
- public VirtualMachineState getState() {
- throw new RuntimeException("This mock class always fails to get the state");
- }
-
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/1b689dc1/abiquo/src/test/java/org/jclouds/abiquo/monitor/handlers/BlockingEventHandlerTest.java
----------------------------------------------------------------------
diff --git a/abiquo/src/test/java/org/jclouds/abiquo/monitor/handlers/BlockingEventHandlerTest.java b/abiquo/src/test/java/org/jclouds/abiquo/monitor/handlers/BlockingEventHandlerTest.java
deleted file mode 100644
index 52bdccc..0000000
--- a/abiquo/src/test/java/org/jclouds/abiquo/monitor/handlers/BlockingEventHandlerTest.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.abiquo.monitor.handlers;
-
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertNull;
-import static org.testng.Assert.assertTrue;
-
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
-
-import org.jclouds.abiquo.monitor.events.MonitorEvent;
-import org.jclouds.abiquo.monitor.events.MonitorEvent.Type;
-import org.testng.annotations.Test;
-
-/**
- * Unit tests for the {@link BlockingEventHandler} handler.
- */
-@Test(groups = "unit", testName = "BlockingEventHandlerTest")
-public class BlockingEventHandlerTest {
- @Test(expectedExceptions = IllegalArgumentException.class)
- public void testConstructorWithoutObjects() {
- new BlockingEventHandler<Object>();
- }
-
- @Test(expectedExceptions = NullPointerException.class)
- public void testConstructorWithNullObjects() {
- new BlockingEventHandler<Object>((Object[]) null);
- }
-
- @Test(expectedExceptions = IllegalArgumentException.class)
- public void testConstructorWithtEmptyObjects() {
- new BlockingEventHandler<Object>(new Object[] {});
- }
-
- public void testHandles() {
- Object object = new Object();
- BlockingEventHandler<Object> handler = new BlockingEventHandler<Object>(object);
-
- assertTrue(handler.handles(new MonitorEvent<Object>(Type.COMPLETED, object)));
- assertFalse(handler.handles(new MonitorEvent<Object>(Type.COMPLETED, new Object())));
- }
-
- public void testReleaseDoesNothingIfNotLocked() {
- Object object = new Object();
- BlockingEventHandler<Object> handler = new BlockingEventHandler<Object>(object);
- handler.release(object);
- }
-
- public void testRelease() {
- final Object object = new Object();
- final BlockingEventHandler<Object> handler = new BlockingEventHandler<Object>(object);
-
- // Unlock the handler (in a separate thread) after a certain delay
- Executors.newSingleThreadScheduledExecutor().schedule(new Runnable() {
- @Override
- public void run() {
- handler.release(object);
- assertTrue(handler.lockedObjects.isEmpty());
- }
-
- }, 500L, TimeUnit.MILLISECONDS);
-
- handler.lock();
- }
-
- public void testHandle() {
- final Object object = new Object();
- final BlockingEventHandler<Object> handler = new BlockingEventHandler<Object>(object);
-
- // Unlock the handler (in a separate thread) after a certain delay
- Executors.newSingleThreadScheduledExecutor().schedule(new Runnable() {
- @Override
- public void run() {
- handler.handle(new MonitorEvent<Object>(Type.COMPLETED, object));
- assertTrue(handler.lockedObjects.isEmpty());
- }
-
- }, 500L, TimeUnit.MILLISECONDS);
-
- handler.lock();
- }
-
- public void testLockDoesNothingIfNoObjects() {
- Object object = new Object();
- BlockingEventHandler<Object> handler = new BlockingEventHandler<Object>(object);
- handler.lockedObjects.clear();
-
- handler.lock(); // Lock should do nothing
-
- assertNull(handler.completeSignal);
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/1b689dc1/abiquo/src/test/java/org/jclouds/abiquo/monitor/internal/BaseAsyncTaskMonitorTest.java
----------------------------------------------------------------------
diff --git a/abiquo/src/test/java/org/jclouds/abiquo/monitor/internal/BaseAsyncTaskMonitorTest.java b/abiquo/src/test/java/org/jclouds/abiquo/monitor/internal/BaseAsyncTaskMonitorTest.java
deleted file mode 100644
index 5dc1051..0000000
--- a/abiquo/src/test/java/org/jclouds/abiquo/monitor/internal/BaseAsyncTaskMonitorTest.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.abiquo.monitor.internal;
-
-import static org.testng.Assert.assertNotNull;
-
-import org.jclouds.abiquo.internal.BaseInjectionTest;
-import org.jclouds.abiquo.monitor.AsyncTaskMonitor;
-import org.testng.annotations.Test;
-
-/**
- * Unit tests for the {@link BaseAsyncTaskMonitor} class.
- */
-@Test(groups = "unit", testName = "BaseAsyncTaskMonitorTest")
-public class BaseAsyncTaskMonitorTest extends BaseInjectionTest {
-
- public void testAllPropertiesInjected() {
- BaseAsyncTaskMonitor monitor = (BaseAsyncTaskMonitor) injector.getInstance(AsyncTaskMonitor.class);
-
- assertNotNull(monitor.taskMonitor);
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/1b689dc1/abiquo/src/test/java/org/jclouds/abiquo/monitor/internal/BaseVirtualApplianceMonitorTest.java
----------------------------------------------------------------------
diff --git a/abiquo/src/test/java/org/jclouds/abiquo/monitor/internal/BaseVirtualApplianceMonitorTest.java b/abiquo/src/test/java/org/jclouds/abiquo/monitor/internal/BaseVirtualApplianceMonitorTest.java
deleted file mode 100644
index e03f017..0000000
--- a/abiquo/src/test/java/org/jclouds/abiquo/monitor/internal/BaseVirtualApplianceMonitorTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.abiquo.monitor.internal;
-
-import static org.testng.Assert.assertNotNull;
-
-import org.jclouds.abiquo.internal.BaseInjectionTest;
-import org.jclouds.abiquo.monitor.VirtualApplianceMonitor;
-import org.testng.annotations.Test;
-
-/**
- * Unit tests for the {@link BaseVirtualApplianceMonitor} class.
- */
-@Test(groups = "unit", testName = "BaseVirtualApplianceMonitorTest")
-public class BaseVirtualApplianceMonitorTest extends BaseInjectionTest {
-
- public void testAllPropertiesInjected() {
- BaseVirtualApplianceMonitor monitor = (BaseVirtualApplianceMonitor) injector
- .getInstance(VirtualApplianceMonitor.class);
-
- assertNotNull(monitor.deployMonitor);
- assertNotNull(monitor.undeployMonitor);
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/1b689dc1/abiquo/src/test/java/org/jclouds/abiquo/monitor/internal/BaseVirtualMachineMonitorTest.java
----------------------------------------------------------------------
diff --git a/abiquo/src/test/java/org/jclouds/abiquo/monitor/internal/BaseVirtualMachineMonitorTest.java b/abiquo/src/test/java/org/jclouds/abiquo/monitor/internal/BaseVirtualMachineMonitorTest.java
deleted file mode 100644
index cf1d3b2..0000000
--- a/abiquo/src/test/java/org/jclouds/abiquo/monitor/internal/BaseVirtualMachineMonitorTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.abiquo.monitor.internal;
-
-import static org.testng.Assert.assertNotNull;
-
-import org.jclouds.abiquo.internal.BaseInjectionTest;
-import org.jclouds.abiquo.monitor.VirtualMachineMonitor;
-import org.testng.annotations.Test;
-
-/**
- * Unit tests for the {@link BaseVirtualMachineMonitor} class.
- */
-@Test(groups = "unit", testName = "BaseVirtualMachineMonitorTest")
-public class BaseVirtualMachineMonitorTest extends BaseInjectionTest {
-
- public void testAllPropertiesInjected() {
- BaseVirtualMachineMonitor monitor = (BaseVirtualMachineMonitor) injector.getInstance(VirtualMachineMonitor.class);
-
- assertNotNull(monitor.deployMonitor);
- assertNotNull(monitor.undeployMonitor);
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/1b689dc1/abiquo/src/test/java/org/jclouds/abiquo/reference/AbiquoTestConstants.java
----------------------------------------------------------------------
diff --git a/abiquo/src/test/java/org/jclouds/abiquo/reference/AbiquoTestConstants.java b/abiquo/src/test/java/org/jclouds/abiquo/reference/AbiquoTestConstants.java
deleted file mode 100644
index 8de7421..0000000
--- a/abiquo/src/test/java/org/jclouds/abiquo/reference/AbiquoTestConstants.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.abiquo.reference;
-
-/**
- * Configuration constants and properties used in Abiquo tests.
- */
-public final class AbiquoTestConstants {
- /** The prefix for test object names. */
- public static final String PREFIX = "JC-";
-
- private AbiquoTestConstants() {
- throw new AssertionError("intentionally unimplemented");
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/1b689dc1/abiquo/src/test/java/org/jclouds/abiquo/strategy/BaseAbiquoStrategyLiveApiTest.java
----------------------------------------------------------------------
diff --git a/abiquo/src/test/java/org/jclouds/abiquo/strategy/BaseAbiquoStrategyLiveApiTest.java b/abiquo/src/test/java/org/jclouds/abiquo/strategy/BaseAbiquoStrategyLiveApiTest.java
deleted file mode 100644
index 9fa7234..0000000
--- a/abiquo/src/test/java/org/jclouds/abiquo/strategy/BaseAbiquoStrategyLiveApiTest.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.abiquo.strategy;
-
-import org.jclouds.abiquo.internal.BaseAbiquoApiLiveApiTest;
-import org.testng.annotations.BeforeClass;
-
-/**
- * Base class for strategy live tests.
- */
-public abstract class BaseAbiquoStrategyLiveApiTest extends BaseAbiquoApiLiveApiTest {
- @BeforeClass(groups = "api")
- protected abstract void setupStrategy();
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/1b689dc1/abiquo/src/test/java/org/jclouds/abiquo/strategy/cloud/ListAttachedNicsLiveApiTest.java
----------------------------------------------------------------------
diff --git a/abiquo/src/test/java/org/jclouds/abiquo/strategy/cloud/ListAttachedNicsLiveApiTest.java b/abiquo/src/test/java/org/jclouds/abiquo/strategy/cloud/ListAttachedNicsLiveApiTest.java
deleted file mode 100644
index 6c5e01e..0000000
--- a/abiquo/src/test/java/org/jclouds/abiquo/strategy/cloud/ListAttachedNicsLiveApiTest.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.abiquo.strategy.cloud;
-
-import static com.google.common.collect.Iterables.find;
-import static com.google.common.collect.Iterables.getLast;
-import static com.google.common.collect.Iterables.size;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertNull;
-
-import org.jclouds.abiquo.domain.network.ExternalIp;
-import org.jclouds.abiquo.domain.network.Ip;
-import org.jclouds.abiquo.domain.network.PrivateIp;
-import org.jclouds.abiquo.domain.network.PublicIp;
-import org.jclouds.abiquo.domain.network.UnmanagedNetwork;
-import org.jclouds.abiquo.strategy.BaseAbiquoStrategyLiveApiTest;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Predicate;
-import com.google.common.collect.Lists;
-
-/**
- * Live tests for the {@link ListAttachedNics} strategy.
- */
-@Test(groups = "api", testName = "ListAttachedNicsLiveApiTest")
-public class ListAttachedNicsLiveApiTest extends BaseAbiquoStrategyLiveApiTest {
- private ListAttachedNics strategy;
-
- private PrivateIp privateIp;
-
- private ExternalIp externalIp;
-
- private PublicIp publicIp;
-
- @Override
- @BeforeClass(groups = "api")
- protected void setupStrategy() {
- this.strategy = env.context.utils().injector().getInstance(ListAttachedNics.class);
-
- privateIp = getLast(env.privateNetwork.listUnusedIps());
- externalIp = getLast(env.externalNetwork.listUnusedIps());
-
- publicIp = getLast(env.virtualDatacenter.listAvailablePublicIps());
- env.virtualDatacenter.purchasePublicIp(publicIp);
- publicIp = find(env.virtualDatacenter.listPurchasedPublicIps(), new Predicate<PublicIp>() {
- @Override
- public boolean apply(PublicIp input) {
- return input.getIp().equals(publicIp.getIp());
- }
- });
-
- env.virtualMachine.setNics(Lists.<Ip<?, ?>> newArrayList(privateIp, externalIp, publicIp),
- Lists.<UnmanagedNetwork> newArrayList(env.unmanagedNetwork));
- }
-
- @AfterClass(groups = "api")
- protected void tearDownStrategy() {
- env.virtualMachine.setNics(Lists.<Ip<?, ?>> newArrayList(privateIp));
- final String address = publicIp.getIp();
- env.virtualDatacenter.releasePublicIp(publicIp);
- assertNull(find(env.virtualDatacenter.listPurchasedPublicIps(), new Predicate<PublicIp>() {
- @Override
- public boolean apply(PublicIp input) {
- return input.getIp().equals(address);
- }
- }, null));
- }
-
- public void testExecute() {
- Iterable<Ip<?, ?>> vapps = strategy.execute(env.virtualMachine);
- assertNotNull(vapps);
- assertEquals(4, size(vapps));
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/1b689dc1/abiquo/src/test/java/org/jclouds/abiquo/strategy/cloud/ListVirtualAppliancesLiveApiTest.java
----------------------------------------------------------------------
diff --git a/abiquo/src/test/java/org/jclouds/abiquo/strategy/cloud/ListVirtualAppliancesLiveApiTest.java b/abiquo/src/test/java/org/jclouds/abiquo/strategy/cloud/ListVirtualAppliancesLiveApiTest.java
deleted file mode 100644
index 6a6d1ef..0000000
--- a/abiquo/src/test/java/org/jclouds/abiquo/strategy/cloud/ListVirtualAppliancesLiveApiTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.abiquo.strategy.cloud;
-
-import static com.google.common.collect.Iterables.size;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
-
-import org.jclouds.abiquo.domain.cloud.VirtualAppliance;
-import org.jclouds.abiquo.strategy.BaseAbiquoStrategyLiveApiTest;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-/**
- * Live tests for the {@link ListVirtualAppliances} strategy.
- */
-@Test(groups = "api", testName = "ListVirtualAppliancesLiveApiTest")
-public class ListVirtualAppliancesLiveApiTest extends BaseAbiquoStrategyLiveApiTest {
- private ListVirtualAppliances strategy;
-
- @Override
- @BeforeClass(groups = "api")
- protected void setupStrategy() {
- this.strategy = env.context.utils().injector().getInstance(ListVirtualAppliances.class);
- }
-
- public void testExecute() {
- Iterable<VirtualAppliance> vapps = strategy.execute();
- assertNotNull(vapps);
- assertTrue(size(vapps) > 0);
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/1b689dc1/abiquo/src/test/java/org/jclouds/abiquo/strategy/cloud/ListVirtualDatacentersLiveApiTest.java
----------------------------------------------------------------------
diff --git a/abiquo/src/test/java/org/jclouds/abiquo/strategy/cloud/ListVirtualDatacentersLiveApiTest.java b/abiquo/src/test/java/org/jclouds/abiquo/strategy/cloud/ListVirtualDatacentersLiveApiTest.java
deleted file mode 100644
index 75c116b..0000000
--- a/abiquo/src/test/java/org/jclouds/abiquo/strategy/cloud/ListVirtualDatacentersLiveApiTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.abiquo.strategy.cloud;
-
-import static com.google.common.collect.Iterables.size;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
-
-import org.jclouds.abiquo.domain.cloud.VirtualDatacenter;
-import org.jclouds.abiquo.domain.cloud.options.VirtualDatacenterOptions;
-import org.jclouds.abiquo.strategy.BaseAbiquoStrategyLiveApiTest;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-/**
- * Live tests for the {@link ListVirtualDatacenters} strategy.
- */
-@Test(groups = "api", testName = "ListVirtualDatacentersLiveApiTest")
-public class ListVirtualDatacentersLiveApiTest extends BaseAbiquoStrategyLiveApiTest {
- private ListVirtualDatacenters strategy;
-
- @Override
- @BeforeClass(groups = "api")
- protected void setupStrategy() {
- this.strategy = env.context.utils().injector().getInstance(ListVirtualDatacenters.class);
- }
-
- public void testExecute() {
- Iterable<VirtualDatacenter> vdcs = strategy.execute();
- assertNotNull(vdcs);
- assertTrue(size(vdcs) > 0);
- }
-
- public void testExecuteOptionsWithResults() {
- Iterable<VirtualDatacenter> vdcs = strategy.execute(VirtualDatacenterOptions.builder()
- .datacenterId(env.datacenter.getId()).enterpriseId(env.defaultEnterprise.getId()).build());
- assertNotNull(vdcs);
- assertEquals(size(vdcs), 1);
- }
-
- public void testExecuteOptionsWithoutResults() {
- Iterable<VirtualDatacenter> vdcs = strategy.execute(VirtualDatacenterOptions.builder()
- .enterpriseId(env.enterprise.getId()).build());
- assertNotNull(vdcs);
- assertEquals(size(vdcs), 0);
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/1b689dc1/abiquo/src/test/java/org/jclouds/abiquo/strategy/enterprise/ListVirtualMachineTemplatesLiveApiTest.java
----------------------------------------------------------------------
diff --git a/abiquo/src/test/java/org/jclouds/abiquo/strategy/enterprise/ListVirtualMachineTemplatesLiveApiTest.java b/abiquo/src/test/java/org/jclouds/abiquo/strategy/enterprise/ListVirtualMachineTemplatesLiveApiTest.java
deleted file mode 100644
index 3470e7d..0000000
--- a/abiquo/src/test/java/org/jclouds/abiquo/strategy/enterprise/ListVirtualMachineTemplatesLiveApiTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.abiquo.strategy.enterprise;
-
-import static com.google.common.collect.Iterables.size;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
-
-import org.jclouds.abiquo.domain.cloud.VirtualMachineTemplate;
-import org.jclouds.abiquo.strategy.BaseAbiquoStrategyLiveApiTest;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-/**
- * Live tests for the {@link ListVirtualAppliances} strategy.
- */
-@Test(groups = "api", testName = "ListVirtualMachineTemplatesLiveApiTest")
-public class ListVirtualMachineTemplatesLiveApiTest extends BaseAbiquoStrategyLiveApiTest {
- private ListVirtualMachineTemplates strategy;
-
- @Override
- @BeforeClass(groups = "api")
- protected void setupStrategy() {
- this.strategy = env.context.utils().injector().getInstance(ListVirtualMachineTemplates.class);
- }
-
- public void testExecute() {
- Iterable<VirtualMachineTemplate> templates = strategy.execute(env.defaultEnterprise);
- assertNotNull(templates);
- assertTrue(size(templates) > 0);
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/1b689dc1/abiquo/src/test/java/org/jclouds/abiquo/strategy/infrastructure/ListMachinesLiveApiTest.java
----------------------------------------------------------------------
diff --git a/abiquo/src/test/java/org/jclouds/abiquo/strategy/infrastructure/ListMachinesLiveApiTest.java b/abiquo/src/test/java/org/jclouds/abiquo/strategy/infrastructure/ListMachinesLiveApiTest.java
deleted file mode 100644
index b66712d..0000000
--- a/abiquo/src/test/java/org/jclouds/abiquo/strategy/infrastructure/ListMachinesLiveApiTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.abiquo.strategy.infrastructure;
-
-import static com.google.common.collect.Iterables.size;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
-
-import org.jclouds.abiquo.domain.infrastructure.Machine;
-import org.jclouds.abiquo.strategy.BaseAbiquoStrategyLiveApiTest;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-/**
- * Live tests for the {@link ListMachines} strategy.
- */
-@Test(groups = "api", testName = "ListMachinesLiveApiTest")
-public class ListMachinesLiveApiTest extends BaseAbiquoStrategyLiveApiTest {
- private ListMachines strategy;
-
- @Override
- @BeforeClass(groups = "api")
- protected void setupStrategy() {
- this.strategy = env.context.utils().injector().getInstance(ListMachines.class);
- }
-
- public void testExecute() {
- Iterable<Machine> machines = strategy.execute();
- assertNotNull(machines);
- assertTrue(size(machines) > 0);
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/1b689dc1/abiquo/src/test/java/org/jclouds/abiquo/util/Assert.java
----------------------------------------------------------------------
diff --git a/abiquo/src/test/java/org/jclouds/abiquo/util/Assert.java b/abiquo/src/test/java/org/jclouds/abiquo/util/Assert.java
deleted file mode 100644
index 7f0384a..0000000
--- a/abiquo/src/test/java/org/jclouds/abiquo/util/Assert.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.abiquo.util;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-
-import java.io.IOException;
-
-import javax.ws.rs.core.Response.Status;
-
-import org.jclouds.abiquo.domain.exception.AbiquoException;
-import org.jclouds.io.Payload;
-import org.jclouds.xml.XMLParser;
-import org.jclouds.xml.internal.JAXBParser;
-
-import com.abiquo.model.transport.SingleResourceTransportDto;
-import com.abiquo.model.transport.error.ErrorDto;
-
-/**
- * Assertion utilities.
- */
-public class Assert {
- /**
- * Assert that the exception contains the given error.
- *
- * @param exception
- * The exception.
- * @param expectedHttpStatus
- * The expected HTTP status code.
- * @param expectedErrorCode
- * The expected error code.
- */
- public static void assertHasError(final AbiquoException exception, final Status expectedHttpStatus,
- final String expectedErrorCode) {
- assertEquals(exception.getHttpStatus(), expectedHttpStatus);
- ErrorDto error = exception.findError(expectedErrorCode);
- assertNotNull(error);
- }
-
- /**
- * Assert that the given payload matches the given string.
- *
- * @param payload
- * The payload to check.
- * @param expected
- * The expected string.
- * @param entityClass
- * The entity class for the payload.
- * @throws IOException
- * If there is an error during serialization.
- */
- public static void assertPayloadEquals(final Payload payload, final String expected,
- final Class<? extends SingleResourceTransportDto> entityClass) throws IOException {
- // Serialize and deserialize to avoid formatting issues
- XMLParser xml = new JAXBParser("false");
- SingleResourceTransportDto entity = xml.fromXML(expected, entityClass);
- String toMatch = xml.toXML(entity, entityClass);
-
- assertEquals(payload.getRawContent(), toMatch);
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/1b689dc1/abiquo/src/test/java/org/jclouds/abiquo/util/Config.java
----------------------------------------------------------------------
diff --git a/abiquo/src/test/java/org/jclouds/abiquo/util/Config.java b/abiquo/src/test/java/org/jclouds/abiquo/util/Config.java
deleted file mode 100644
index 73470b4..0000000
--- a/abiquo/src/test/java/org/jclouds/abiquo/util/Config.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.abiquo.util;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import java.io.IOException;
-import java.util.Properties;
-
-/**
- * Test configuration.
- */
-public class Config {
- /** The main configuration file. */
- private static final String CONFIG_FILE = "api-live.properties";
-
- /** The configuration properties */
- private Properties config;
-
- /** The singleton configuration instance. */
- private static Config instance;
-
- public Config(final String config) {
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- this.config = new Properties();
-
- try {
- this.config.load(cl.getResourceAsStream(config));
- } catch (IOException ex) {
- throw new RuntimeException("Could not load test configuration file", ex);
- }
- }
-
- public Config(final Properties config) {
- this.config = config;
- }
-
- public static String get(final String property) {
- return get(property, null);
- }
-
- public static String get(final String property, final String defaultValue) {
- if (instance == null) {
- String configFile = System.getProperty("abiquo.live.config", CONFIG_FILE);
- instance = new Config(configFile);
- }
-
- return checkNotNull(instance.config.getProperty(property, defaultValue));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/1b689dc1/abiquo/src/test/resources/api-live.properties
----------------------------------------------------------------------
diff --git a/abiquo/src/test/resources/api-live.properties b/abiquo/src/test/resources/api-live.properties
deleted file mode 100644
index dfaa959..0000000
--- a/abiquo/src/test/resources/api-live.properties
+++ /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.
-#
-#
-
-# Hypervisor configuration
-abiquo.hypervisor.type = ${abiquo.hypervisor.type}
-abiquo.hypervisor.address = ${abiquo.hypervisor.address}
-abiquo.hypervisor.user = ${abiquo.hypervisor.user}
-abiquo.hypervisor.pass = ${abiquo.hypervisor.pass}
-abiquo.hypervisor.vswitch = ${abiquo.hypervisor.vswitch}
-abiquo.hypervisor.datastore = ${abiquo.hypervisor.datastore}
-
-# Storage configuration
-abiquo.storage.type = ${abiquo.storage.type}
-abiquo.storage.address = ${abiquo.storage.address}
-abiquo.storage.pass = ${abiquo.storage.pass}
-abiquo.storage.user = ${abiquo.storage.user}
-abiquo.storage.pool = ${abiquo.storage.pool}
-
-# UCS Rack configuration
-abiquo.ucs.address = ${abiquo.ucs.address}
-abiquo.ucs.port = ${abiquo.ucs.port}
-abiquo.ucs.pass = ${abiquo.ucs.pass}
-abiquo.ucs.user = ${abiquo.ucs.user}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/1b689dc1/abiquo/src/test/resources/filters/filters.properties
----------------------------------------------------------------------
diff --git a/abiquo/src/test/resources/filters/filters.properties b/abiquo/src/test/resources/filters/filters.properties
deleted file mode 100644
index 48f4cab..0000000
--- a/abiquo/src/test/resources/filters/filters.properties
+++ /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.
-#
-#
-
-# Hypervisor configuration
-# This is the Tarantino IT hypervisor.
-# Should be replaced with a dedicated ESX asap!
-
-abiquo.hypervisor.pass=tarantino
-abiquo.hypervisor.address=10.60.1.132
-abiquo.hypervisor.datastore=nfs-ds
-abiquo.hypervisor.type=VMX_04
-#abiquo.hypervisor.address=10.60.20.62
-#abiquo.hypervisor.pass=temporal
-abiquo.hypervisor.user=root
-abiquo.hypervisor.vswitch=vSwitch0
-#abiquo.hypervisor.datastore=datastore1
-
-# Storage configuration
-abiquo.storage.type=LVM
-abiquo.storage.address=10.60.12.177
-#abiquo.storage.user=
-#abiquo.storage.pass=
-abiquo.storage.pool=abiquo
-
-# UCS Rack configuration
-abiquo.ucs.address=10.60.1.45
-abiquo.ucs.port=80
-abiquo.ucs.pass=config
-abiquo.ucs.user=config
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/1b689dc1/abiquo/src/test/resources/license/expired
----------------------------------------------------------------------
diff --git a/abiquo/src/test/resources/license/expired b/abiquo/src/test/resources/license/expired
deleted file mode 100644
index 6e56ec7..0000000
--- a/abiquo/src/test/resources/license/expired
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-R48/Z+e2HzLPtsHHJG/uJeF6Vn2jMseyPYeQQN/WVpYjGGsGNWWTcnbWcXg75Qk2rxDwU9TOiyFPUWOIJ1gUoiqQKLoy6OpN3TNqTHb56WFropU1wwefgoqEL/ZI2AJm+H9aCj6hf3agL8nlpkemBYeYbx1QgJ1g7g3exxmFZHPcLe+KBukkRBHoxB8TlbqupB2lWQ3hUWzMwcb0ayQAA7pt+O3XSZ4eML1fNyzgTLG82nO1SnSHj1dpLb4g3xzjZxt4SZFZ1Dq4X+2TVU4XEVmwO1mQYksYRy3KqtOdmvIA4z0sSDxAXQPds+qncp2jCiuXgyOyencbeSg4duwKBnl/v+dceFIALxsl2Y8wdJrdPibC4I4q1e5fKA8LowT7RRogbRJ8Fhwqw8VURG/MlhOKkb7zMFLR/wzjl1dM1itE3uxyg+Y3bY4K8aWCv0xZIJdRb3s2Cl1bzn6E7bg54UGhIGKxCnsLgXy+GLZTsdhOmxqs0a9HudJEGcDcqRiaa7/OFYfcyyVCxDxg6qS4M5goXMRxI7pMFhxlQvuxoKSOuijrTmXAFxMjQ6TCbYNogh454k+IwpreHDF67ey07rS9KyygyyflvO2bNCP6ng93drsGqY4ZWR4D9AeEPvCytkMNyzO4siWKmjIy8PcwzRYUSbt/6bat7E1RNj3d9/c=
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/1b689dc1/abiquo/src/test/resources/logback-test.xml
----------------------------------------------------------------------
diff --git a/abiquo/src/test/resources/logback-test.xml b/abiquo/src/test/resources/logback-test.xml
deleted file mode 100644
index ebdf6c0..0000000
--- a/abiquo/src/test/resources/logback-test.xml
+++ /dev/null
@@ -1,94 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<configuration>
- <appender name="HEADERSFILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>target/test-data/jclouds-headers.log</file>
- <append>true</append>
- <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
- <level>TRACE</level>
- </filter>
- <encoder>
- <pattern>%date %level [%logger] \(%thread\) %msg%n</pattern>
- </encoder>
- <!-- Rollover at midnight each day -->
- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <fileNamePattern>target/test-data/jclouds-headers.log.%d</fileNamePattern>
- <maxHistory>5</maxHistory>
- </rollingPolicy>
- </appender>
- <appender name="WIREFILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>target/test-data/jclouds-wire.log</file>
- <append>true</append>
- <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
- <level>TRACE</level>
- </filter>
- <encoder>
- <pattern>%date %level [%logger] \(%thread\) %msg%n</pattern>
- </encoder>
- <!-- Rollover at midnight each day -->
- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <fileNamePattern>target/test-data/jclouds-payloads.log.%d</fileNamePattern>
- <maxHistory>5</maxHistory>
- </rollingPolicy>
- </appender>
- <appender name="COMPUTEFILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>target/test-data/jclouds-compute.log</file>
- <append>true</append>
- <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
- <level>TRACE</level>
- </filter>
- <encoder>
- <pattern>%date %level [%logger] \(%thread\) %msg%n</pattern>
- </encoder>
- <!-- Rollover at midnight each day -->
- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <fileNamePattern>target/test-data/jclouds-compute.log.%d</fileNamePattern>
- <maxHistory>5</maxHistory>
- </rollingPolicy>
- </appender>
- <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>target/test-data/jclouds.log</file>
- <append>true</append>
- <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
- <level>TRACE</level>
- </filter>
- <encoder>
- <pattern>%date %level [%logger] \(%thread\) %msg%n</pattern>
- </encoder>
- <!-- Rollover at midnight each day -->
- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <fileNamePattern>target/test-data/jclouds.log.%d</fileNamePattern>
- <maxHistory>5</maxHistory>
- </rollingPolicy>
- </appender>
-
- <!-- ============= -->
- <!-- Limit loggers -->
- <!-- ============= -->
-
- <logger name="org.jclouds">
- <level value="DEBUG" />
- <appender-ref ref="FILE" />
- </logger>
- <logger name="jclouds.headers">
- <level value="DEBUG" />
- <appender-ref ref="HEADERSFILE" />
- <appender-ref ref="WIREFILE" />
- </logger>
- <logger name="jclouds.wire">
- <level value="DEBUG" />
- <appender-ref ref="WIREFILE" />
- </logger>
- <logger name="jclouds.compute">
- <level value="DEBUG" />
- <appender-ref ref="COMPUTEFILE" />
- </logger>
-
- <!-- ===================== -->
- <!-- Setup the root logger -->
- <!-- ===================== -->
-
- <root>
- <level value="WARN" />
- </root>
-
-</configuration>
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/1b689dc1/abiquo/src/test/resources/payloads/all-vms-lastpage.xml
----------------------------------------------------------------------
diff --git a/abiquo/src/test/resources/payloads/all-vms-lastpage.xml b/abiquo/src/test/resources/payloads/all-vms-lastpage.xml
deleted file mode 100644
index 05ae6eb..0000000
--- a/abiquo/src/test/resources/payloads/all-vms-lastpage.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<virtualmachineswithnodeextended>
- <link href="http://localhost/api/cloud/virtualmachines" rel="first" />
- <link href="http://localhost/api/cloud/virtualmachines?startwith=0" rel="previous" />
- <link href="http://localhost/api/cloud/virtualmachines?startwith=2" rel="last" />
- <totalSize>2</totalSize>
- <virtualmachinewithnodeextended>
- <link rel="deploy" href="http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/action/deploy" />
- <link rel="disks" href="http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/storage/disks" />
- <link rel="edit" href="http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1" />
- <link rel="state" href="http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/state" />
- <link rel="reset" href="http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/action/reset" />
- <link rel="tasks" href="http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/tasks" />
- <link rel="undeploy" href="http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/action/undeploy" />
- <link rel="persistent" href="http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/action/persistent" />
- <link rel="virtualappliance" href="http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1" />
- <link rel="virtualmachinetemplate" href="/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/1" />
- <link rel="nics" href="http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/network/nics" />
- <link rel="volumes" href="http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/storage/volumes" />
- <link rel="configurations" href="http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/network/configurations" />
- <cpu>0</cpu>
- <hdInBytes>0</hdInBytes>
- <highDisponibility>0</highDisponibility>
- <id>2</id>
- <idState>0</idState>
- <idType>0</idType>
- <name>VM</name>
- <ram>0</ram>
- <vdrpPort>0</vdrpPort>
- </virtualmachinewithnodeextended>
-</virtualmachineswithnodeextended>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/1b689dc1/abiquo/src/test/resources/payloads/all-vms.xml
----------------------------------------------------------------------
diff --git a/abiquo/src/test/resources/payloads/all-vms.xml b/abiquo/src/test/resources/payloads/all-vms.xml
deleted file mode 100644
index 007fe11..0000000
--- a/abiquo/src/test/resources/payloads/all-vms.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<virtualmachineswithnodeextended>
- <link href="http://localhost/api/cloud/virtualmachines" rel="first" />
- <link href="http://localhost/api/cloud/virtualmachines?startwith=2" rel="next" />
- <link href="http://localhost/api/cloud/virtualmachines?startwith=2" rel="last" />
- <totalSize>2</totalSize>
- <virtualmachinewithnodeextended>
- <link rel="deploy" href="http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/action/deploy" />
- <link rel="disks" href="http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/storage/disks" />
- <link rel="edit" href="http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1" />
- <link rel="state" href="http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/state" />
- <link rel="reset" href="http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/action/reset" />
- <link rel="tasks" href="http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/tasks" />
- <link rel="undeploy" href="http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/action/undeploy" />
- <link rel="persistent" href="http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/action/persistent" />
- <link rel="virtualappliance" href="http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1" />
- <link rel="virtualmachinetemplate" href="/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/1" />
- <link rel="nics" href="http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/network/nics" />
- <link rel="volumes" href="http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/storage/volumes" />
- <link rel="configurations" href="http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/network/configurations" />
- <cpu>0</cpu>
- <hdInBytes>0</hdInBytes>
- <highDisponibility>0</highDisponibility>
- <id>1</id>
- <idState>0</idState>
- <idType>0</idType>
- <name>VM</name>
- <ram>0</ram>
- <vdrpPort>0</vdrpPort>
- </virtualmachinewithnodeextended>
-</virtualmachineswithnodeextended>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/1b689dc1/abiquo/src/test/resources/payloads/available-templates-lastpage.xml
----------------------------------------------------------------------
diff --git a/abiquo/src/test/resources/payloads/available-templates-lastpage.xml b/abiquo/src/test/resources/payloads/available-templates-lastpage.xml
deleted file mode 100644
index 4e8b2f7..0000000
--- a/abiquo/src/test/resources/payloads/available-templates-lastpage.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<virtualMachineTemplates>
- <link href="http://example.com/api/cloud/virtualdatacenters/1/action/templates" rel="first" />
- <link href="http://example.com/api/cloud/virtualdatacenters/1/action/templates?startwith=0" rel="previous" />
- <link href="http://example.com/api/cloud/virtualdatacenters/1/action/templates?startwith=1" rel="last" />
- <totalSize>2</totalSize>
- <virtualMachineTemplate>
- <link href="http://example.com/api/config/categories/1" rel="category" title="Others" type="application/vnd.abiquo.category+xml" />
- <link href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/16/conversions" rel="conversions" type="application/vnd.abiquo.conversions+xml" />
- <link href="http://example.com/api/admin/datacenters/1" rel="datacenter" type="application/vnd.abiquo.datacenter+xml" />
- <link href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1" rel="datacenterrepository" type="application/vnd.abiquo.datacenterrepository+xml" />
- <link href="http://example.com/am/erepos/1/templates/rs.bcn.abiquo.com%253A9000%252Fovf%252F71%252Fdesc.ovf?format=diskFile" rel="diskfile" />
- <link href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/16" rel="edit" title="Abiquo KVM" type="application/vnd.abiquo.virtualmachinetemplate+xml" />
- <link href="http://example.com/api/admin/enterprises/1" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" />
- <link href="http://example.com/am/erepos/1/templates/rs.bcn.abiquo.com%253A9000%252Fovf%252F71%252Fdesc.ovf?format=envelope" rel="ovfdocument" />
- <link href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/16/tasks" rel="tasks" type="application/vnd.abiquo.tasks+xml" />
- <link href="http://example.com/am/erepos/1/templates/rs.bcn.abiquo.com%253A9000%252Fovf%252F71%252Fdesc.ovf" rel="template" />
- <link href="http://rs.bcn.abiquo.com:9000/ovf/71/desc.ovf" rel="templatedefinition" />
- <link href="http://example.com/am/erepos/1/templates/rs.bcn.abiquo.com%253A9000%252Fovf%252F71%252Fdesc.ovf?format=status" rel="templatestatus" />
- <id>16</id>
- <name>Abiquo KVM</name>
- <description />
- <osType>UNRECOGNIZED</osType>
- <osVersion />
- <path>1/rs.bcn.abiquo.com/abiport9000/ovf/71/KVM-Recursion.qcow2</path>
- <diskFormatType>QCOW2_SPARSE</diskFormatType>
- <diskFileSize>320798720</diskFileSize>
- <cpuRequired>1</cpuRequired>
- <ramRequired>1024</ramRequired>
- <hdRequired>4294967296</hdRequired>
- <shared>false</shared>
- <state>DONE</state>
- <costCode>0</costCode>
- <creationDate>2013-01-16T15:06:14+01:00</creationDate>
- <creationUser>SYSTEM</creationUser>
- <chefEnabled>false</chefEnabled>
- <iconUrl>http://rs.bcn.abiquo.com:9000/public/icons/q.png</iconUrl>
- <loginUser>user</loginUser>
- <loginPassword>password</loginPassword>
- <ethernetDriverType>E1000</ethernetDriverType>
- <diskControllerType>SCSI</diskControllerType>
- </virtualMachineTemplate>
-</virtualMachineTemplates>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/1b689dc1/abiquo/src/test/resources/payloads/available-templates-page.xml
----------------------------------------------------------------------
diff --git a/abiquo/src/test/resources/payloads/available-templates-page.xml b/abiquo/src/test/resources/payloads/available-templates-page.xml
deleted file mode 100644
index 886d364..0000000
--- a/abiquo/src/test/resources/payloads/available-templates-page.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<virtualMachineTemplates>
- <link href="http://example.com/api/cloud/virtualdatacenters/1/action/templates" rel="first" />
- <link href="http://example.com/api/cloud/virtualdatacenters/1/action/templates?startwith=1" rel="next" />
- <link href="http://example.com/api/cloud/virtualdatacenters/1/action/templates?startwith=1" rel="last" />
- <totalSize>2</totalSize>
- <virtualMachineTemplate>
- <link href="http://example.com/api/config/categories/1" rel="category" title="Others" type="application/vnd.abiquo.category+xml" />
- <link href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/15/conversions" rel="conversions" type="application/vnd.abiquo.conversions+xml" />
- <link href="http://example.com/api/admin/datacenters/1" rel="datacenter" type="application/vnd.abiquo.datacenter+xml" />
- <link href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1" rel="datacenterrepository" type="application/vnd.abiquo.datacenterrepository+xml" />
- <link href="http://example.com/am/erepos/1/templates/rs.bcn.abiquo.com%253A9000%252Fovf%252F71%252Fdesc.ovf?format=diskFile" rel="diskfile" />
- <link href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/15" rel="edit" title="Abiquo KVM" type="application/vnd.abiquo.virtualmachinetemplate+xml" />
- <link href="http://example.com/api/admin/enterprises/1" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" />
- <link href="http://example.com/am/erepos/1/templates/rs.bcn.abiquo.com%253A9000%252Fovf%252F71%252Fdesc.ovf?format=envelope" rel="ovfdocument" />
- <link href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/15/tasks" rel="tasks" type="application/vnd.abiquo.tasks+xml" />
- <link href="http://example.com/am/erepos/1/templates/rs.bcn.abiquo.com%253A9000%252Fovf%252F71%252Fdesc.ovf" rel="template" />
- <link href="http://rs.bcn.abiquo.com:9000/ovf/71/desc.ovf" rel="templatedefinition" />
- <link href="http://example.com/am/erepos/1/templates/rs.bcn.abiquo.com%253A9000%252Fovf%252F71%252Fdesc.ovf?format=status" rel="templatestatus" />
- <id>15</id>
- <name>Abiquo KVM</name>
- <description />
- <osType>UNRECOGNIZED</osType>
- <osVersion />
- <path>1/rs.bcn.abiquo.com/abiport9000/ovf/71/KVM-Recursion.qcow2</path>
- <diskFormatType>QCOW2_SPARSE</diskFormatType>
- <diskFileSize>320798720</diskFileSize>
- <cpuRequired>1</cpuRequired>
- <ramRequired>1024</ramRequired>
- <hdRequired>4294967296</hdRequired>
- <shared>false</shared>
- <state>DONE</state>
- <costCode>0</costCode>
- <creationDate>2013-01-16T15:06:14+01:00</creationDate>
- <creationUser>SYSTEM</creationUser>
- <chefEnabled>false</chefEnabled>
- <iconUrl>http://rs.bcn.abiquo.com:9000/public/icons/q.png</iconUrl>
- <loginUser>user</loginUser>
- <loginPassword>password</loginPassword>
- <ethernetDriverType>E1000</ethernetDriverType>
- <diskControllerType>SCSI</diskControllerType>
- </virtualMachineTemplate>
-</virtualMachineTemplates>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/1b689dc1/abiquo/src/test/resources/payloads/enterprises-lastpage.xml
----------------------------------------------------------------------
diff --git a/abiquo/src/test/resources/payloads/enterprises-lastpage.xml b/abiquo/src/test/resources/payloads/enterprises-lastpage.xml
deleted file mode 100644
index 77654c9..0000000
--- a/abiquo/src/test/resources/payloads/enterprises-lastpage.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<enterprises>
- <link rel="first" href="http://localhost/api/admin/enterprises" />
- <link rel="previous" href="http://localhost/api/admin/enterprises?startwith=0"/>
- <link rel="last" href="http://localhost/api/admin/enterprises?startwith=1"/>
- <totalSize>2</totalSize>
- <enterprise>
- <link rel="appslib/templateDefinitionLists" type="application/vnd.abiquo.templatedefinitionlists+xml" href="http://localhost/api/admin/enterprises/1/appslib/templateDefinitionLists"/>
- <link rel="appslib/templateDefinitions" type="application/vnd.abiquo.templatedefinitions+xml" href="http://localhost/api/admin/enterprises/1/appslib/templateDefinitions"/>
- <link rel="cloud/virtualdatacenters" type="application/vnd.abiquo.virtualdatacenters+xml" href="http://localhost/api/admin/enterprises/1/action/virtualdatacenters"/>
- <link rel="datacenterrepositories" type="application/vnd.abiquo.datacenterrepositories+xml" href="http://localhost/api/admin/enterprises/1/datacenterrepositories"/>
- <link rel="edit" type="application/vnd.abiquo.enterprise+xml" href="http://localhost/api/admin/enterprises/1"/>
- <link rel="externalnetworks" type="application/vnd.abiquo.vlans+xml" href="http://localhost/api/admin/enterprises/1/action/externalnetworks"/>
- <link rel="ips" href="http://localhost/api/admin/enterprises/1/action/ips"/>
- <link rel="limits" type="application/vnd.abiquo.limits+xml" href="http://localhost/api/admin/enterprises/1/limits"/>
- <link rel="properties" type="application/vnd.abiquo.enterpriseproperties+xml" href="http://localhost/api/admin/enterprises/1/properties"/>
- <link rel="reservedmachines" type="application/vnd.abiquo.machines+xml" href="http://localhost/api/admin/enterprises/1/reservedmachines"/>
- <link rel="users" type="application/vnd.abiquo.users+xml" href="http://localhost/api/admin/enterprises/1/users"/>
- <link rel="virtualappliances" type="application/vnd.abiquo.virtualappliances+xml" href="http://localhost/api/admin/enterprises/1/action/virtualappliances"/>
- <link rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml" href="http://localhost/api/admin/enterprises/1/action/virtualmachines"/>
- <link rel="volumes" type="application/vnd.abiquo.iscsivolumes+xml" href="http://localhost/api/admin/enterprises/1/action/volumes"/>
- <cpuHard>0</cpuHard>
- <cpuSoft>0</cpuSoft>
- <hdHard>0</hdHard>
- <hdSoft>0</hdSoft>
- <publicIpsHard>0</publicIpsHard>
- <publicIpsSoft>0</publicIpsSoft>
- <ramHard>0</ramHard>
- <ramSoft>0</ramSoft>
- <storageHard>0</storageHard>
- <storageSoft>0</storageSoft>
- <vlansHard>0</vlansHard>
- <vlansSoft>0</vlansSoft>
- <id>2</id>
- <isReservationRestricted>false</isReservationRestricted>
- <name>Abiquo</name>
- <repositoryHard>0</repositoryHard>
- <repositorySoft>0</repositorySoft>
- </enterprise>
-</enterprises>
\ No newline at end of file