You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by an...@apache.org on 2013/08/02 23:30:24 UTC
[3/6] Removing OpenStack modules from Labs repo (now in
jclouds-labs-openstack)
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/internal/BaseQuantumApiExpectTest.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/internal/BaseQuantumApiExpectTest.java b/openstack/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/internal/BaseQuantumApiExpectTest.java
deleted file mode 100644
index 7471382..0000000
--- a/openstack/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/internal/BaseQuantumApiExpectTest.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.openstack.quantum.v1_0.internal;
-
-import org.jclouds.openstack.quantum.v1_0.QuantumApi;
-
-/**
- * Base class for writing Quantum Rest Api Expect tests
- *
- * @author Adam Lowe
- */
-public class BaseQuantumApiExpectTest extends BaseQuantumExpectTest<QuantumApi> {
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/internal/BaseQuantumApiLiveTest.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/internal/BaseQuantumApiLiveTest.java b/openstack/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/internal/BaseQuantumApiLiveTest.java
deleted file mode 100644
index 42985fe..0000000
--- a/openstack/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/internal/BaseQuantumApiLiveTest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.openstack.quantum.v1_0.internal;
-
-import java.util.Properties;
-import org.jclouds.apis.BaseApiLiveTest;
-import org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties;
-import org.jclouds.openstack.quantum.v1_0.QuantumApi;
-import org.testng.annotations.Test;
-
-/**
- * Tests behavior of {@code QuantumApi}
- *
- * @author Adam Lowe
- * @author Zack Shoylev
- */
-@Test(groups = "live")
-public class BaseQuantumApiLiveTest extends BaseApiLiveTest<QuantumApi> {
-
- public BaseQuantumApiLiveTest() {
- provider = "openstack-quantum";
- }
-
- @Override
- protected Properties setupProperties() {
- Properties props = super.setupProperties();
- setIfTestSystemPropertyPresent(props, KeystoneProperties.CREDENTIAL_TYPE);
- return props;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/internal/BaseQuantumExpectTest.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/internal/BaseQuantumExpectTest.java b/openstack/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/internal/BaseQuantumExpectTest.java
deleted file mode 100644
index 472d5ca..0000000
--- a/openstack/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/internal/BaseQuantumExpectTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.openstack.quantum.v1_0.internal;
-
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.http.HttpRequest;
-import org.jclouds.http.HttpResponse;
-import org.jclouds.openstack.keystone.v2_0.internal.KeystoneFixture;
-import org.jclouds.rest.internal.BaseRestApiExpectTest;
-
-/**
- * Base class for writing Quantum Expect tests
- *
- * @author Adam Lowe
- */
-public class BaseQuantumExpectTest<T> extends BaseRestApiExpectTest<T> {
- protected HttpRequest keystoneAuthWithUsernameAndPassword;
- protected HttpRequest keystoneAuthWithAccessKeyAndSecretKey;
- protected String authToken;
- protected HttpResponse responseWithKeystoneAccess;
- protected String endpoint = "https://csnode.jclouds.org:9696/v1.0";
-
- public BaseQuantumExpectTest() {
- provider = "openstack-quantum";
- keystoneAuthWithUsernameAndPassword = KeystoneFixture.INSTANCE.initialAuthWithUsernameAndPasswordAndTenantName(identity,
- credential);
- keystoneAuthWithAccessKeyAndSecretKey = KeystoneFixture.INSTANCE.initialAuthWithAccessKeyAndSecretKeyAndTenantName(identity,
- credential);
-
- authToken = KeystoneFixture.INSTANCE.getAuthToken();
- responseWithKeystoneAccess = KeystoneFixture.INSTANCE.responseWithAccess();
- // now, createContext arg will need tenant prefix
- identity = KeystoneFixture.INSTANCE.getTenantName() + ":" + identity;
- }
-
- protected HttpRequest.Builder<?> authenticatedGET() {
- return HttpRequest.builder()
- .method("GET")
- .addHeader("Accept", MediaType.APPLICATION_JSON)
- .addHeader("X-Auth-Token", authToken);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/parse/ParseAttachmentTest.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/parse/ParseAttachmentTest.java b/openstack/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/parse/ParseAttachmentTest.java
deleted file mode 100644
index 92f77c5..0000000
--- a/openstack/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/parse/ParseAttachmentTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.openstack.quantum.v1_0.parse;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.json.BaseItemParserTest;
-import org.jclouds.openstack.quantum.v1_0.domain.Attachment;
-import org.jclouds.rest.annotations.SelectJson;
-import org.testng.annotations.Test;
-
-/**
- *
- * @author Adam Lowe
- */
-@Test(groups = "unit", testName = "ParseAttachmentTest")
-public class ParseAttachmentTest extends BaseItemParserTest<Attachment> {
-
- @Override
- public String resource() {
- return "/attachment.json";
- }
-
- @Override
- @SelectJson("attachment")
- @Consumes(MediaType.APPLICATION_JSON)
- public Attachment expected() {
- return Attachment.builder().id("jclouds-live-test").build();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/parse/ParseNetworkDetailsTest.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/parse/ParseNetworkDetailsTest.java b/openstack/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/parse/ParseNetworkDetailsTest.java
deleted file mode 100644
index 540ed8e..0000000
--- a/openstack/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/parse/ParseNetworkDetailsTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.openstack.quantum.v1_0.parse;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.json.BaseItemParserTest;
-import org.jclouds.openstack.quantum.v1_0.domain.NetworkDetails;
-import org.jclouds.openstack.quantum.v1_0.domain.Port;
-import org.jclouds.rest.annotations.SelectJson;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableSet;
-
-/**
- *
- * @author Adam Lowe
- */
-@Test(groups = "unit", testName = "ParseNetworkDetailsTest")
-public class ParseNetworkDetailsTest extends BaseItemParserTest<NetworkDetails> {
-
- @Override
- public String resource() {
- return "/network_details.json";
- }
-
- @Override
- @SelectJson("network")
- @Consumes(MediaType.APPLICATION_JSON)
- public NetworkDetails expected() {
- return NetworkDetails.builder().name("jclouds-port-test").id("25e3e0f8-f1f0-4850-97a3-8d5393c3385b")
- .ports(ImmutableSet.of(Port.builder().state(Port.State.DOWN).id("908391f6-ef3c-4bc6-acec-46582f9b231d").build())).build();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/parse/ParseNetworkTest.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/parse/ParseNetworkTest.java b/openstack/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/parse/ParseNetworkTest.java
deleted file mode 100644
index 5d9038a..0000000
--- a/openstack/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/parse/ParseNetworkTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.openstack.quantum.v1_0.parse;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.json.BaseItemParserTest;
-import org.jclouds.openstack.quantum.v1_0.domain.Network;
-import org.jclouds.rest.annotations.SelectJson;
-import org.testng.annotations.Test;
-
-/**
- *
- * @author Adam Lowe
- */
-@Test(groups = "unit", testName = "ParseNetworkTest")
-public class ParseNetworkTest extends BaseItemParserTest<Network> {
-
- @Override
- public String resource() {
- return "/network.json";
- }
-
- @Override
- @SelectJson("network")
- @Consumes(MediaType.APPLICATION_JSON)
- public Network expected() {
- return Network.builder().name("jclouds-wibble").id("624312ff-d14b-4ba3-9834-1c78d23d574d").build();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/parse/ParsePortDetailsTest.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/parse/ParsePortDetailsTest.java b/openstack/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/parse/ParsePortDetailsTest.java
deleted file mode 100644
index f072565..0000000
--- a/openstack/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/parse/ParsePortDetailsTest.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.openstack.quantum.v1_0.parse;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.json.BaseItemParserTest;
-import org.jclouds.openstack.quantum.v1_0.domain.Attachment;
-import org.jclouds.openstack.quantum.v1_0.domain.Port;
-import org.jclouds.openstack.quantum.v1_0.domain.PortDetails;
-import org.jclouds.rest.annotations.SelectJson;
-import org.testng.annotations.Test;
-
-/**
- * @author Adam Lowe
- */
-@Test(groups = "unit", testName = "ParsePortDetailsTest")
-public class ParsePortDetailsTest extends BaseItemParserTest<PortDetails> {
-
- @Override
- public String resource() {
- return "/port_details.json";
- }
-
- @Override
- @SelectJson("port")
- @Consumes(MediaType.APPLICATION_JSON)
- public PortDetails expected() {
- return PortDetails.builder().id("0ccbe514-e36b-475b-91c9-208dfd96d3ac").state(Port.State.DOWN)
- .attachment(Attachment.builder().id("jclouds-live-test").build()).build();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/parse/ParsePortTest.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/parse/ParsePortTest.java b/openstack/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/parse/ParsePortTest.java
deleted file mode 100644
index d5d6d1c..0000000
--- a/openstack/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/parse/ParsePortTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.openstack.quantum.v1_0.parse;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.json.BaseItemParserTest;
-import org.jclouds.openstack.quantum.v1_0.domain.Port;
-import org.jclouds.rest.annotations.SelectJson;
-import org.testng.annotations.Test;
-
-/**
- *
- * @author Adam Lowe
- */
-@Test(groups = "unit", testName = "ParsePortTest")
-public class ParsePortTest extends BaseItemParserTest<Port> {
-
- @Override
- public String resource() {
- return "/port.json";
- }
-
- @Override
- @SelectJson("port")
- @Consumes(MediaType.APPLICATION_JSON)
- public Port expected() {
- return Port.builder().id("646c123b-871a-4124-9fa2-a94f04a582df").state(Port.State.DOWN).build();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-quantum/src/test/resources/attachment.json
----------------------------------------------------------------------
diff --git a/openstack/openstack-quantum/src/test/resources/attachment.json b/openstack/openstack-quantum/src/test/resources/attachment.json
deleted file mode 100644
index e135055..0000000
--- a/openstack/openstack-quantum/src/test/resources/attachment.json
+++ /dev/null
@@ -1 +0,0 @@
-{"attachment":{"id":"jclouds-live-test"}}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-quantum/src/test/resources/list_network_refs.json
----------------------------------------------------------------------
diff --git a/openstack/openstack-quantum/src/test/resources/list_network_refs.json b/openstack/openstack-quantum/src/test/resources/list_network_refs.json
deleted file mode 100644
index d6daf8d..0000000
--- a/openstack/openstack-quantum/src/test/resources/list_network_refs.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{"networks": [
- {"id": "16dba3bc-f3fa-4775-afdc-237e12c72f6a"},
- {"id": "1a104cf5-cb18-4d35-9407-2fd2646d9d0b"},
- {"id": "31083ae2-420d-48b2-ac98-9f7a4fd8dbdc"},
- {"id": "49c6d6fa-ff2a-459d-b975-75a8d31c9a89"},
- {"id": "5cb3d6f4-62cb-41c9-b964-ba7d9df79e4e"},
- {"id": "5d51d012-3491-4db7-b1b5-6f254015015d"},
- {"id": "5f9cf7dc-22ca-4097-8e49-1cc8b23faf17"},
- {"id": "6319ecad-6bff-48b2-9b53-02ede8cb7588"},
- {"id": "6ba4c788-661f-49ab-9bf8-5f10cbbb2f57"},
- {"id": "74ed170b-5069-4353-ab38-9719766dc57e"},
- {"id": "b71fcac1-e864-4031-8c5b-edbecd9ece36"},
- {"id": "c7681895-d84d-4650-9ca0-82c72036b855"}
-]}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-quantum/src/test/resources/list_networks.json
----------------------------------------------------------------------
diff --git a/openstack/openstack-quantum/src/test/resources/list_networks.json b/openstack/openstack-quantum/src/test/resources/list_networks.json
deleted file mode 100644
index b5c7839..0000000
--- a/openstack/openstack-quantum/src/test/resources/list_networks.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{"networks": [
- {"name": "jclouds-port-test", "id": "16dba3bc-f3fa-4775-afdc-237e12c72f6a"},
- {"name": "wibble", "id": "1a104cf5-cb18-4d35-9407-2fd2646d9d0b"},
- {"name": "jclouds-test", "id": "31083ae2-420d-48b2-ac98-9f7a4fd8dbdc"},
- {"name": "jclouds-test", "id": "49c6d6fa-ff2a-459d-b975-75a8d31c9a89"},
- {"name": "wibble", "id": "5cb3d6f4-62cb-41c9-b964-ba7d9df79e4e"},
- {"name": "jclouds-port-test", "id": "5d51d012-3491-4db7-b1b5-6f254015015d"},
- {"name": "wibble", "id": "5f9cf7dc-22ca-4097-8e49-1cc8b23faf17"},
- {"name": "jclouds-test", "id": "6319ecad-6bff-48b2-9b53-02ede8cb7588"},
- {"name": "jclouds-port-test", "id": "6ba4c788-661f-49ab-9bf8-5f10cbbb2f57"},
- {"name": "jclouds-test", "id": "74ed170b-5069-4353-ab38-9719766dc57e"},
- {"name": "wibble", "id": "b71fcac1-e864-4031-8c5b-edbecd9ece36"},
- {"name": "jclouds-port-test", "id": "c7681895-d84d-4650-9ca0-82c72036b855"}
-]
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-quantum/src/test/resources/logback.xml
----------------------------------------------------------------------
diff --git a/openstack/openstack-quantum/src/test/resources/logback.xml b/openstack/openstack-quantum/src/test/resources/logback.xml
deleted file mode 100644
index a36c4c6..0000000
--- a/openstack/openstack-quantum/src/test/resources/logback.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0"?>
-<configuration scan="false">
- <appender name="FILE" class="ch.qos.logback.core.FileAppender">
- <file>target/test-data/jclouds.log</file>
-
- <encoder>
- <Pattern>%d %-5p [%c] [%thread] %m%n</Pattern>
- </encoder>
- </appender>
-
- <appender name="WIREFILE" class="ch.qos.logback.core.FileAppender">
- <file>target/test-data/jclouds-wire.log</file>
-
- <encoder>
- <Pattern>%d %-5p [%c] [%thread] %m%n</Pattern>
- </encoder>
- </appender>
-
- <appender name="BLOBSTOREFILE" class="ch.qos.logback.core.FileAppender">
- <file>target/test-data/jclouds-blobstore.log</file>
-
- <encoder>
- <Pattern>%d %-5p [%c] [%thread] %m%n</Pattern>
- </encoder>
- </appender>
-
- <root>
- <level value="warn" />
- </root>
-
- <logger name="org.jclouds">
- <level value="DEBUG" />
- <appender-ref ref="FILE" />
- </logger>
-
- <logger name="jclouds.wire">
- <level value="DEBUG" />
- <appender-ref ref="WIREFILE" />
- </logger>
-
- <logger name="jclouds.headers">
- <level value="DEBUG" />
- <appender-ref ref="WIREFILE" />
- </logger>
-
- <logger name="jclouds.blobstore">
- <level value="DEBUG" />
- <appender-ref ref="BLOBSTOREFILE" />
- </logger>
-
-</configuration>
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-quantum/src/test/resources/network.json
----------------------------------------------------------------------
diff --git a/openstack/openstack-quantum/src/test/resources/network.json b/openstack/openstack-quantum/src/test/resources/network.json
deleted file mode 100644
index fec734d..0000000
--- a/openstack/openstack-quantum/src/test/resources/network.json
+++ /dev/null
@@ -1 +0,0 @@
-{"network": {"name": "jclouds-wibble", "id": "624312ff-d14b-4ba3-9834-1c78d23d574d"}}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-quantum/src/test/resources/network_details.json
----------------------------------------------------------------------
diff --git a/openstack/openstack-quantum/src/test/resources/network_details.json b/openstack/openstack-quantum/src/test/resources/network_details.json
deleted file mode 100644
index 0ee7025..0000000
--- a/openstack/openstack-quantum/src/test/resources/network_details.json
+++ /dev/null
@@ -1 +0,0 @@
-{"network": {"ports": [{"state": "DOWN", "id": "908391f6-ef3c-4bc6-acec-46582f9b231d"}], "name": "jclouds-port-test", "id": "25e3e0f8-f1f0-4850-97a3-8d5393c3385b"}}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-quantum/src/test/resources/port.json
----------------------------------------------------------------------
diff --git a/openstack/openstack-quantum/src/test/resources/port.json b/openstack/openstack-quantum/src/test/resources/port.json
deleted file mode 100644
index 371fcb4..0000000
--- a/openstack/openstack-quantum/src/test/resources/port.json
+++ /dev/null
@@ -1 +0,0 @@
-{"port": {"state": "DOWN", "id": "646c123b-871a-4124-9fa2-a94f04a582df"}}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-quantum/src/test/resources/port_details.json
----------------------------------------------------------------------
diff --git a/openstack/openstack-quantum/src/test/resources/port_details.json b/openstack/openstack-quantum/src/test/resources/port_details.json
deleted file mode 100644
index 5481135..0000000
--- a/openstack/openstack-quantum/src/test/resources/port_details.json
+++ /dev/null
@@ -1 +0,0 @@
-{"port": {"state": "DOWN", "id": "0ccbe514-e36b-475b-91c9-208dfd96d3ac", "attachment": {"id": "jclouds-live-test"}}}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-reddwarf/pom.xml
----------------------------------------------------------------------
diff --git a/openstack/openstack-reddwarf/pom.xml b/openstack/openstack-reddwarf/pom.xml
deleted file mode 100644
index d8de2a6..0000000
--- a/openstack/openstack-reddwarf/pom.xml
+++ /dev/null
@@ -1,124 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.jclouds.labs</groupId>
- <artifactId>jclouds-labs-openstack</artifactId>
- <version>1.6.2-SNAPSHOT</version>
- </parent>
-
- <!-- TODO: when out of labs, switch to org.jclouds.api -->
- <groupId>org.apache.jclouds.labs</groupId>
- <artifactId>openstack-reddwarf</artifactId>
- <name>jclouds openstack-reddwarf api</name>
- <description>jclouds components to access an implementation of OpenStack RedDwarf</description>
- <packaging>bundle</packaging>
-
- <properties>
- <!-- keystone endpoint -->
- <test.openstack-reddwarf.endpoint>http://localhost:5000/v2.0/</test.openstack-reddwarf.endpoint>
- <!-- keystone version -->
- <test.openstack-reddwarf.api-version>1.0</test.openstack-reddwarf.api-version>
- <test.openstack-reddwarf.build-version />
- <test.openstack-reddwarf.identity>FIXME_IDENTITY</test.openstack-reddwarf.identity>
- <test.openstack-reddwarf.credential>FIXME_CREDENTIALS</test.openstack-reddwarf.credential>
- <test.jclouds.keystone.credential-type>passwordCredentials</test.jclouds.keystone.credential-type>
-
- <jclouds.osgi.export>org.jclouds.openstack.reddwarf.v1_0*;version="${project.version}"</jclouds.osgi.export>
- <jclouds.osgi.import>
- org.jclouds.rest.internal;version="${jclouds.version}",
- org.jclouds*;version="${jclouds.version}",
- *
- </jclouds.osgi.import>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.jclouds.api</groupId>
- <artifactId>openstack-keystone</artifactId>
- <version>${jclouds.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.jclouds</groupId>
- <artifactId>jclouds-core</artifactId>
- <version>${jclouds.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.jclouds</groupId>
- <artifactId>jclouds-core</artifactId>
- <version>${jclouds.version}</version>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.jclouds.api</groupId>
- <artifactId>openstack-keystone</artifactId>
- <version>${jclouds.version}</version>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.jclouds.driver</groupId>
- <artifactId>jclouds-slf4j</artifactId>
- <version>${jclouds.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <profiles>
- <profile>
- <id>live</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <executions>
- <execution>
- <id>integration</id>
- <phase>integration-test</phase>
- <goals>
- <goal>test</goal>
- </goals>
- <configuration>
- <systemPropertyVariables>
- <test.openstack-reddwarf.endpoint>${test.openstack-reddwarf.endpoint}</test.openstack-reddwarf.endpoint>
- <test.openstack-reddwarf.api-version>${test.openstack-reddwarf.api-version}</test.openstack-reddwarf.api-version>
- <test.openstack-reddwarf.build-version>${test.openstack-reddwarf.build-version}</test.openstack-reddwarf.build-version>
- <test.openstack-reddwarf.identity>${test.openstack-reddwarf.identity}</test.openstack-reddwarf.identity>
- <test.openstack-reddwarf.credential>${test.openstack-reddwarf.credential}</test.openstack-reddwarf.credential>
- <test.jclouds.keystone.credential-type>${test.jclouds.keystone.credential-type}</test.jclouds.keystone.credential-type>
- </systemPropertyVariables>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
-</project>
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-reddwarf/src/main/java/org/jclouds/openstack/reddwarf/v1/RedDwarfApi.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-reddwarf/src/main/java/org/jclouds/openstack/reddwarf/v1/RedDwarfApi.java b/openstack/openstack-reddwarf/src/main/java/org/jclouds/openstack/reddwarf/v1/RedDwarfApi.java
deleted file mode 100644
index 8ccf18d..0000000
--- a/openstack/openstack-reddwarf/src/main/java/org/jclouds/openstack/reddwarf/v1/RedDwarfApi.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.openstack.reddwarf.v1;
-
-import java.io.Closeable;
-import java.util.Set;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.location.Zone;
-import org.jclouds.location.functions.ZoneToEndpoint;
-import org.jclouds.openstack.keystone.v2_0.domain.Tenant;
-import org.jclouds.openstack.reddwarf.v1.features.FlavorApi;
-import org.jclouds.rest.annotations.Delegate;
-import org.jclouds.rest.annotations.EndpointParam;
-
-import com.google.common.base.Optional;
-import com.google.inject.Provides;
-
-/**
- * Provides access to RedDwarf.
- *
- * @see <a href="http://api.openstack.org/">API Doc</a>
- * @author Zack Shoylev
- */
-public interface RedDwarfApi extends Closeable{
- /**
- * @return the Zone codes configured
- */
- @Provides
- @Zone
- Set<String> getConfiguredZones();
-
- /**
- * Provides access to Flavor features.
- */
- @Delegate
- FlavorApi getFlavorApiForZone(
- @EndpointParam(parser = ZoneToEndpoint.class) @Nullable String zone);
-
- /**
- * Provides the Tenant
- */
- @Provides
- Optional<Tenant> getCurrentTenantId();
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-reddwarf/src/main/java/org/jclouds/openstack/reddwarf/v1/RedDwarfApiMetadata.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-reddwarf/src/main/java/org/jclouds/openstack/reddwarf/v1/RedDwarfApiMetadata.java b/openstack/openstack-reddwarf/src/main/java/org/jclouds/openstack/reddwarf/v1/RedDwarfApiMetadata.java
deleted file mode 100644
index 268aea6..0000000
--- a/openstack/openstack-reddwarf/src/main/java/org/jclouds/openstack/reddwarf/v1/RedDwarfApiMetadata.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.openstack.reddwarf.v1;
-
-import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.CREDENTIAL_TYPE;
-import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.SERVICE_TYPE;
-
-import java.net.URI;
-import java.util.Properties;
-
-import org.jclouds.apis.ApiMetadata;
-import org.jclouds.openstack.keystone.v2_0.config.AuthenticationApiModule;
-import org.jclouds.openstack.keystone.v2_0.config.CredentialTypes;
-import org.jclouds.openstack.keystone.v2_0.config.KeystoneAuthenticationModule;
-import org.jclouds.openstack.keystone.v2_0.config.KeystoneAuthenticationModule.ZoneModule;
-import org.jclouds.openstack.reddwarf.v1.config.RedDwarfHttpApiModule;
-import org.jclouds.openstack.reddwarf.v1.config.RedDwarfParserModule;
-import org.jclouds.openstack.v2_0.ServiceType;
-import org.jclouds.rest.internal.BaseHttpApiMetadata;
-
-import com.google.common.collect.ImmutableSet;
-import com.google.inject.Module;
-
-/**
- * Implementation of {@link ApiMetadata} for RedDwarf API
- *
- * @author Zack Shoylev
- */
-public class RedDwarfApiMetadata extends BaseHttpApiMetadata<RedDwarfApi> {
-
- @Override
- public Builder toBuilder() {
- return new Builder().fromApiMetadata(this);
- }
-
- public RedDwarfApiMetadata() {
- this(new Builder());
- }
-
- protected RedDwarfApiMetadata(Builder builder) {
- super(builder);
- }
-
- public static Properties defaultProperties() {
- Properties properties = BaseHttpApiMetadata.defaultProperties();
- properties.setProperty(SERVICE_TYPE, ServiceType.DATABASE_SERVICE);
- properties.setProperty(CREDENTIAL_TYPE, CredentialTypes.PASSWORD_CREDENTIALS);
- return properties;
- }
-
- public static class Builder extends BaseHttpApiMetadata.Builder<RedDwarfApi, Builder> {
-
- protected Builder() {
- id("openstack-reddwarf")
- .name("OpenStack RedDwarf API")
- .identityName("${tenantName}:${userName} or ${userName}, if your keystone supports a default tenant")
- .credentialName("${password}")
- .endpointName("Keystone base URL ending in /v2.0/")
- .documentation(URI.create("http://api.openstack.org/"))
- .version("1.0")
- .defaultEndpoint("http://localhost:5000/v2.0/")
- .defaultProperties(RedDwarfApiMetadata.defaultProperties())
- .defaultModules(ImmutableSet.<Class<? extends Module>>builder()
- .add(AuthenticationApiModule.class)
- .add(KeystoneAuthenticationModule.class)
- .add(ZoneModule.class)
- .add(RedDwarfParserModule.class)
- .add(RedDwarfHttpApiModule.class)
- .build());
- }
-
- @Override
- public RedDwarfApiMetadata build() {
- return new RedDwarfApiMetadata(this);
- }
-
- @Override
- protected Builder self() {
- return this;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-reddwarf/src/main/java/org/jclouds/openstack/reddwarf/v1/config/RedDwarfHttpApiModule.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-reddwarf/src/main/java/org/jclouds/openstack/reddwarf/v1/config/RedDwarfHttpApiModule.java b/openstack/openstack-reddwarf/src/main/java/org/jclouds/openstack/reddwarf/v1/config/RedDwarfHttpApiModule.java
deleted file mode 100644
index ad63294..0000000
--- a/openstack/openstack-reddwarf/src/main/java/org/jclouds/openstack/reddwarf/v1/config/RedDwarfHttpApiModule.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.openstack.reddwarf.v1.config;
-
-import java.net.URI;
-
-import javax.inject.Singleton;
-
-import org.jclouds.http.HttpErrorHandler;
-import org.jclouds.http.annotation.ClientError;
-import org.jclouds.http.annotation.Redirection;
-import org.jclouds.http.annotation.ServerError;
-import org.jclouds.json.config.GsonModule.DateAdapter;
-import org.jclouds.json.config.GsonModule.Iso8601DateAdapter;
-import org.jclouds.openstack.keystone.v2_0.domain.Access;
-import org.jclouds.openstack.keystone.v2_0.domain.Tenant;
-import org.jclouds.openstack.reddwarf.v1.RedDwarfApi;
-import org.jclouds.openstack.reddwarf.v1.handlers.RedDwarfErrorHandler;
-import org.jclouds.rest.ConfiguresHttpApi;
-import org.jclouds.rest.config.HttpApiModule;
-
-import com.google.common.base.Function;
-import com.google.common.base.Optional;
-import com.google.common.base.Supplier;
-import com.google.common.base.Suppliers;
-import com.google.common.collect.ImmutableMultimap;
-import com.google.common.collect.Multimap;
-import com.google.inject.Provides;
-
-/**
- * Configures the RedDwarf connection.
- *
- * @author Zack Shoylev
- */
-@ConfiguresHttpApi
-public class RedDwarfHttpApiModule extends HttpApiModule<RedDwarfApi> {
-
- @Override
- protected void configure() {
- bind(DateAdapter.class).to(Iso8601DateAdapter.class);
- super.configure();
- }
-
- @Provides
- @Singleton
- public Multimap<URI, URI> aliases() {
- return ImmutableMultimap.<URI, URI>builder().build();
- }
-
- @Override
- protected void bindErrorHandlers() {
- bind(HttpErrorHandler.class).annotatedWith(Redirection.class).to(RedDwarfErrorHandler.class);
- bind(HttpErrorHandler.class).annotatedWith(ClientError.class).to(RedDwarfErrorHandler.class);
- bind(HttpErrorHandler.class).annotatedWith(ServerError.class).to(RedDwarfErrorHandler.class);
- }
-
- @Provides
- Supplier<Optional<Tenant>> supplyTenant(Supplier<Access> access) {
- return Suppliers.compose(GetTenant.INSTANCE, access);
- }
-
- private static enum GetTenant implements Function<Access, Optional<Tenant>> {
- INSTANCE;
- public Optional<Tenant> apply(Access in){
- return in.getToken().getTenant();
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-reddwarf/src/main/java/org/jclouds/openstack/reddwarf/v1/config/RedDwarfParserModule.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-reddwarf/src/main/java/org/jclouds/openstack/reddwarf/v1/config/RedDwarfParserModule.java b/openstack/openstack-reddwarf/src/main/java/org/jclouds/openstack/reddwarf/v1/config/RedDwarfParserModule.java
deleted file mode 100644
index d61f92b..0000000
--- a/openstack/openstack-reddwarf/src/main/java/org/jclouds/openstack/reddwarf/v1/config/RedDwarfParserModule.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.openstack.reddwarf.v1.config;
-
-import org.jclouds.json.config.GsonModule;
-import org.jclouds.json.config.GsonModule.DateAdapter;
-
-import com.google.inject.AbstractModule;
-
-/**
- * @author Everett Toews
- */
-public class RedDwarfParserModule extends AbstractModule {
- @Override
- protected void configure() {
- bind(DateAdapter.class).to(GsonModule.Iso8601DateAdapter.class);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-reddwarf/src/main/java/org/jclouds/openstack/reddwarf/v1/domain/Flavor.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-reddwarf/src/main/java/org/jclouds/openstack/reddwarf/v1/domain/Flavor.java b/openstack/openstack-reddwarf/src/main/java/org/jclouds/openstack/reddwarf/v1/domain/Flavor.java
deleted file mode 100644
index f12fa31..0000000
--- a/openstack/openstack-reddwarf/src/main/java/org/jclouds/openstack/reddwarf/v1/domain/Flavor.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.openstack.reddwarf.v1.domain;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-import java.beans.ConstructorProperties;
-import java.util.List;
-import org.jclouds.openstack.v2_0.domain.Link;
-import com.google.common.base.Objects;
-import com.google.common.base.Objects.ToStringHelper;
-import com.google.common.collect.ImmutableList;
-
-/**
- * An Openstack Reddwarf Flavor.
- *
- * @author Zack Shoylev
- */
-public class Flavor implements Comparable<Flavor>{
-
- private final int id;
- private final String name;
- private final int ram;
- private final List<Link> links;
-
- @ConstructorProperties({
- "id", "name", "ram", "links"
- })
- protected Flavor(int id, String name, int ram, List<Link> links) {
- this.id = id;
- this.name = checkNotNull(name, "name required");
- this.ram = ram;
- this.links = links;
- }
-
- /**
- * @return the id of this flavor
- */
- public int getId() {
- return this.id;
- }
-
- /**
- * @return the name of this flavor
- */
- public String getName() {
- return this.name;
- }
-
- /**
- * @return the RAM amount for this flavor
- */
- public int getRam() {
- return this.ram;
- }
-
- /**
- * @return the flavor links for this flavor. These are used during database instance creation.
- */
- public List<Link> getLinks() {
- return this.links;
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(id);
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) return true;
- if (obj == null || getClass() != obj.getClass()) return false;
- Flavor that = Flavor.class.cast(obj);
- return Objects.equal(this.id, that.id);
- }
-
- protected ToStringHelper string() {
- return Objects.toStringHelper(this)
- .add("id", id).add("name", name).add("ram", ram);
- }
-
- @Override
- public String toString() {
- return string().toString();
- }
-
- @Override
- public int compareTo(Flavor that) {
- if (that == null)
- return 1;
- if (this == that)
- return 0;
- return this.getId() > that.getId() ? +1 : this.getId() < this.getId() ? -1 : 0;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public Builder toBuilder() {
- return new Builder().fromFlavor(this);
- }
-
- public static class Builder {
- protected int id;
- protected String name;
- protected int ram;
- protected List<Link> links;
-
- /**
- * @see Flavor#getId()
- */
- public Builder id(int id) {
- this.id = id;
- return this;
- }
-
- /**
- * @see Flavor#getName()
- */
- public Builder name(String name) {
- this.name = name;
- return this;
- }
-
- /**
- * @see Flavor#getRam()
- */
- public Builder ram(int ram) {
- this.ram = ram;
- return this;
- }
-
- /**
- * @see Flavor#getLinks()
- */
- public Builder links(List<Link> links) {
- this.links = ImmutableList.copyOf(links);
- return this;
- }
-
- public Flavor build() {
- return new Flavor(id, name, ram, links);
- }
-
- public Builder fromFlavor(Flavor in) {
- return this
- .id(in.getId())
- .name(in.getName())
- .ram(in.getRam())
- .links(in.getLinks());
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-reddwarf/src/main/java/org/jclouds/openstack/reddwarf/v1/features/FlavorApi.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-reddwarf/src/main/java/org/jclouds/openstack/reddwarf/v1/features/FlavorApi.java b/openstack/openstack-reddwarf/src/main/java/org/jclouds/openstack/reddwarf/v1/features/FlavorApi.java
deleted file mode 100644
index 1f6d424..0000000
--- a/openstack/openstack-reddwarf/src/main/java/org/jclouds/openstack/reddwarf/v1/features/FlavorApi.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.openstack.reddwarf.v1.features;
-
-import javax.inject.Named;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.Fallbacks.EmptyFluentIterableOnNotFoundOr404;
-import org.jclouds.Fallbacks.NullOnNotFoundOr404;
-import org.jclouds.openstack.keystone.v2_0.filters.AuthenticateRequest;
-import org.jclouds.openstack.reddwarf.v1.domain.Flavor;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.SelectJson;
-import org.jclouds.rest.annotations.SkipEncoding;
-
-import com.google.common.collect.FluentIterable;
-
-/**
- * This API strictly for listing and retrieving Flavor. Flavors cannot be created or deleted.
- * @see org.jclouds.openstack.reddwarf.v1.domain.Flavor
- * Flavor
- *
- * @see <a href="http://sourceforge.net/apps/trac/reddwarf/">api doc</a>
- * @see <a
- * href="https://github.com/reddwarf-nextgen/reddwarf">api
- * src</a>
- *
- * @author Zack Shoylev
- */
-@SkipEncoding({'/', '='})
-@RequestFilters(AuthenticateRequest.class)
-public interface FlavorApi {
- /**
- * Returns a summary list of Flavors.
- *
- * @return The list of Flavors
- */
- @Named("flavor:list")
- @GET
- @Path("/flavors")
- @SelectJson("flavors")
- @Consumes(MediaType.APPLICATION_JSON)
- @Fallback(EmptyFluentIterableOnNotFoundOr404.class)
- FluentIterable<Flavor> list();
-
- /**
- * Returns a Flavor by id
- *
- * @return Flavor
- */
- @Named("flavors:get/{id}")
- @GET
- @Path("/flavors/{id}")
- @SelectJson("flavor")
- @Consumes(MediaType.APPLICATION_JSON)
- @Fallback(NullOnNotFoundOr404.class)
- Flavor get(@PathParam("id") int flavorId);
-
- /**
- * Returns a list of Flavors by Account ID (Tenant Id)
- *
- * @return The list of Flavors for Account/Tenant Id
- */
- @Named("flavors:get/{id}")
- @GET
- @Path("/flavors/{id}")
- @SelectJson("flavors")
- @Consumes(MediaType.APPLICATION_JSON)
- @Fallback(EmptyFluentIterableOnNotFoundOr404.class)
- FluentIterable<Flavor> list(@PathParam("id") String accountId);
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-reddwarf/src/main/java/org/jclouds/openstack/reddwarf/v1/handlers/RedDwarfErrorHandler.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-reddwarf/src/main/java/org/jclouds/openstack/reddwarf/v1/handlers/RedDwarfErrorHandler.java b/openstack/openstack-reddwarf/src/main/java/org/jclouds/openstack/reddwarf/v1/handlers/RedDwarfErrorHandler.java
deleted file mode 100644
index 7628bc5..0000000
--- a/openstack/openstack-reddwarf/src/main/java/org/jclouds/openstack/reddwarf/v1/handlers/RedDwarfErrorHandler.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.openstack.reddwarf.v1.handlers;
-
-import static org.jclouds.http.HttpUtils.closeClientButKeepContentStream;
-
-import javax.inject.Singleton;
-
-import org.jclouds.http.HttpCommand;
-import org.jclouds.http.HttpErrorHandler;
-import org.jclouds.http.HttpResponse;
-import org.jclouds.http.HttpResponseException;
-import org.jclouds.rest.AuthorizationException;
-import org.jclouds.rest.InsufficientResourcesException;
-import org.jclouds.rest.ResourceNotFoundException;
-
-/**
- * This will parse and set an appropriate exception on the command object.
- *
- * @author Zack Shoylev
- *
- */
-@Singleton
-public class RedDwarfErrorHandler implements HttpErrorHandler {
-
- public void handleError(HttpCommand command, HttpResponse response) {
- // it is important to always read fully and close streams
- byte[] data = closeClientButKeepContentStream(response);
- String message = data != null ? new String(data) : null;
-
- Exception exception = message != null ? new HttpResponseException(command, response, message)
- : new HttpResponseException(command, response);
- message = message != null ? message : String.format("%s -> %s", command.getCurrentRequest().getRequestLine(),
- response.getStatusLine());
- switch (response.getStatusCode()) {
- case 400:
- if (message.contains("quota exceeded"))
- exception = new InsufficientResourcesException(message, exception);
- break;
- case 401:
- case 403:
- exception = new AuthorizationException(message, exception);
- break;
- case 404:
- if (!command.getCurrentRequest().getMethod().equals("DELETE")) {
- exception = new ResourceNotFoundException(message, exception);
- }
- break;
- case 413:
- exception = new InsufficientResourcesException(message, exception);
- break;
- }
- command.setException(exception);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-reddwarf/src/main/resources/META-INF/services/org.jclouds.apis.ApiMetadata
----------------------------------------------------------------------
diff --git a/openstack/openstack-reddwarf/src/main/resources/META-INF/services/org.jclouds.apis.ApiMetadata b/openstack/openstack-reddwarf/src/main/resources/META-INF/services/org.jclouds.apis.ApiMetadata
deleted file mode 100644
index 1ec7be5..0000000
--- a/openstack/openstack-reddwarf/src/main/resources/META-INF/services/org.jclouds.apis.ApiMetadata
+++ /dev/null
@@ -1 +0,0 @@
-org.jclouds.openstack.reddwarf.v1.RedDwarfApiMetadata
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-reddwarf/src/test/java/org/jclouds/openstack/reddwarf/v1/domain/FlavorTest.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-reddwarf/src/test/java/org/jclouds/openstack/reddwarf/v1/domain/FlavorTest.java b/openstack/openstack-reddwarf/src/test/java/org/jclouds/openstack/reddwarf/v1/domain/FlavorTest.java
deleted file mode 100644
index 3104440..0000000
--- a/openstack/openstack-reddwarf/src/test/java/org/jclouds/openstack/reddwarf/v1/domain/FlavorTest.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.openstack.reddwarf.v1.domain;
-
-import org.jclouds.http.Uris;
-import org.jclouds.openstack.v2_0.domain.Link;
-import org.jclouds.openstack.v2_0.domain.Link.Relation;
-import org.testng.annotations.Test;
-import com.google.common.collect.ImmutableList;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-
-@Test(groups = "unit", testName = "FlavorTest")
-public class FlavorTest {
- public void testFlavorForId() {
- Flavor flavor1 = forId(1);
- Flavor flavor2 = forId(2);
- assertEquals(flavor1.getId(), 1);
- assertEquals(flavor1.getName(), "small");
- assertFalse(flavor1.equals(flavor2));
- }
-
- /**
- * Creates a dummy Flavor when you need a Flavor with just the flavorId.
- *
- * 1. name = small
- * 2. ram = 512
- * 3. links = self, bookmark
- */
- public static Flavor forId(int flavorId) {
- return Flavor.builder()
- .id(flavorId)
- .name("small")
- .ram(512)
- .links(
- ImmutableList.of(
- Link.create(Relation.SELF, Uris.uriBuilder("http://test1").build() ),
- Link.create(Relation.BOOKMARK, Uris.uriBuilder("http://test2").build() )
- ) ).build();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-reddwarf/src/test/java/org/jclouds/openstack/reddwarf/v1/features/FlavorApiExpectTest.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-reddwarf/src/test/java/org/jclouds/openstack/reddwarf/v1/features/FlavorApiExpectTest.java b/openstack/openstack-reddwarf/src/test/java/org/jclouds/openstack/reddwarf/v1/features/FlavorApiExpectTest.java
deleted file mode 100644
index 502e52a..0000000
--- a/openstack/openstack-reddwarf/src/test/java/org/jclouds/openstack/reddwarf/v1/features/FlavorApiExpectTest.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.openstack.reddwarf.v1.features;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNull;
-import static org.testng.Assert.assertTrue;
-
-import java.net.URI;
-import java.util.Set;
-
-import org.jclouds.http.HttpResponse;
-import org.jclouds.openstack.reddwarf.v1.RedDwarfApi;
-import org.jclouds.openstack.reddwarf.v1.domain.Flavor;
-import org.jclouds.openstack.reddwarf.v1.internal.BaseRedDwarfApiExpectTest;
-import org.testng.annotations.Test;
-
-/**
- * Tests FlavorApi Guice wiring and parsing
- *
- * @author Zack Shoylev
- */
-@Test(groups = "unit", testName = "FlavorApiExpectTest")
-public class FlavorApiExpectTest extends BaseRedDwarfApiExpectTest {
-
- public void testListFlavors() {
- URI endpoint = URI.create("http://172.16.0.1:8776/v1/3456/flavors");
- FlavorApi api = requestsSendResponses(
- keystoneAuthWithUsernameAndPasswordAndTenantName,
- responseWithKeystoneAccess,
- authenticatedGET().endpoint(endpoint).build(),
- HttpResponse.builder().statusCode(200).payload(payloadFromResource("/flavor_list.json")).build()
- ).getFlavorApiForZone("RegionOne");
-
- Set<? extends Flavor> flavors = api.list().toSet();
- assertEquals(flavors.size(),6);
- assertEquals(flavors.iterator().next().getRam(), 512);
- }
-
- public void testListFlavorsFail() {
- URI endpoint = URI.create("http://172.16.0.1:8776/v1/3456/flavors");
- FlavorApi api = requestsSendResponses(
- keystoneAuthWithUsernameAndPasswordAndTenantName,
- responseWithKeystoneAccess,
- authenticatedGET().endpoint(endpoint).build(),
- HttpResponse.builder().statusCode(404).build()
- ).getFlavorApiForZone("RegionOne");
-
- Set<? extends Flavor> flavors = api.list().toSet();
- assertTrue(flavors.isEmpty());
- }
-
- public void testGetFlavor() {
- URI endpoint = URI.create("http://172.16.0.1:8776/v1/3456/flavors/1");
- FlavorApi api = requestsSendResponses(
- keystoneAuthWithUsernameAndPasswordAndTenantName,
- responseWithKeystoneAccess,
- authenticatedGET().endpoint(endpoint).build(),
- HttpResponse.builder().statusCode(200).payload(payloadFromResource("/flavor_get.json")).build()
- ).getFlavorApiForZone("RegionOne");
-
- Flavor flavor = api.get(1);
- assertEquals(flavor.getName(), "512MB Instance");
- assertEquals(flavor.getId(), 1);
- assertEquals(flavor.getRam(), 512);
- assertEquals(flavor.getLinks().size(), 2);
- }
-
- public void testGetFlavorByAccountId() {
- URI endpoint = URI.create("http://172.16.0.1:8776/v1/3456/flavors/40806637803162");
- RedDwarfApi redDwarfApi = requestsSendResponses(
- keystoneAuthWithUsernameAndPasswordAndTenantName,
- responseWithKeystoneAccess,
- authenticatedGET().endpoint(endpoint).build(),
- HttpResponse.builder().statusCode(200).payload(payloadFromResource("/flavor_list.json")).build() );
- FlavorApi api = redDwarfApi.getFlavorApiForZone("RegionOne");
-
- Set<? extends Flavor> flavors = api.list( redDwarfApi.getCurrentTenantId().get().getId() ).toSet();
- Flavor flavor = flavors.iterator().next();
- assertEquals(flavor.getName(), "512MB Instance");
- assertEquals(flavor.getId(), 1);
- assertEquals(flavor.getRam(), 512);
- assertEquals(flavor.getLinks().size(), 2);
- }
-
- public void testGetFlavorFail() {
- URI endpoint = URI.create("http://172.16.0.1:8776/v1/3456/flavors/12312");
- FlavorApi api = requestsSendResponses(
- keystoneAuthWithUsernameAndPasswordAndTenantName,
- responseWithKeystoneAccess,
- authenticatedGET().endpoint(endpoint).build(),
- HttpResponse.builder().statusCode(404).build()
- ).getFlavorApiForZone("RegionOne");
-
- assertNull(api.get(12312));
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-reddwarf/src/test/java/org/jclouds/openstack/reddwarf/v1/features/FlavorApiLiveTest.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-reddwarf/src/test/java/org/jclouds/openstack/reddwarf/v1/features/FlavorApiLiveTest.java b/openstack/openstack-reddwarf/src/test/java/org/jclouds/openstack/reddwarf/v1/features/FlavorApiLiveTest.java
deleted file mode 100644
index 62e0b1c..0000000
--- a/openstack/openstack-reddwarf/src/test/java/org/jclouds/openstack/reddwarf/v1/features/FlavorApiLiveTest.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.openstack.reddwarf.v1.features;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertNull;
-import static org.testng.Assert.assertTrue;
-import org.jclouds.openstack.reddwarf.v1.domain.Flavor;
-import org.jclouds.openstack.reddwarf.v1.internal.BaseRedDwarfApiLiveTest;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-import com.google.common.collect.FluentIterable;
-
-/**
- * @author Zack Shoylev
- */
-@Test(groups = "live", testName = "FlavorApiLiveTest")
-public class FlavorApiLiveTest extends BaseRedDwarfApiLiveTest {
-
- @Override
- @BeforeClass(groups = { "integration", "live" })
- public void setup() {
- super.setup();
- }
-
- private void checkFlavor(Flavor flavor) {
- assertNotNull(flavor.getId(), "Id cannot be null for " + flavor);
- assertNotNull(flavor.getName(), "Name cannot be null for " + flavor);
- }
-
- @Test
- public void testListFlavorsByAccount() {
- for (String zone : api.getConfiguredZones()) {
- FlavorApi flavorApi = api.getFlavorApiForZone(zone);
-
- FluentIterable<Flavor> response = flavorApi.list( api.getCurrentTenantId().get().getId() ); // tenant id, but referred to as account id.
- for (Flavor flavor : response) {
- checkFlavor(flavor);
- }
- }
- }
-
- @Test
- public void testListFlavorsByAccountWhenAccountIdNotFound() {
- for (String zone : api.getConfiguredZones()) {
- FlavorApi flavorApi = api.getFlavorApiForZone(zone);
- assertTrue(flavorApi.list("9999").isEmpty());
- }
- }
-
- @Test
- public void testGetFlavor() {
- for (String zone : api.getConfiguredZones()) {
- FlavorApi flavorApi = api.getFlavorApiForZone(zone);
- for (Flavor flavor : flavorApi.list()) {
- Flavor flavorFromGet = flavorApi.get(flavor.getId());
- assertEquals(flavorFromGet.getId(), flavor.getId());
- assertEquals(flavorFromGet.getRam(), flavor.getRam());
- assertEquals(flavorFromGet.getName(), flavor.getName());
- assertEquals(flavorFromGet.getLinks(), flavor.getLinks());
- }
- }
- }
-
- @Test
- public void testGetFlavorWhenNotFound() {
- for (String zone : api.getConfiguredZones()) {
- FlavorApi flavorApi = api.getFlavorApiForZone(zone);
- assertNull(flavorApi.get(9999));
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-reddwarf/src/test/java/org/jclouds/openstack/reddwarf/v1/internal/BaseRedDwarfApiExpectTest.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-reddwarf/src/test/java/org/jclouds/openstack/reddwarf/v1/internal/BaseRedDwarfApiExpectTest.java b/openstack/openstack-reddwarf/src/test/java/org/jclouds/openstack/reddwarf/v1/internal/BaseRedDwarfApiExpectTest.java
deleted file mode 100644
index a257acb..0000000
--- a/openstack/openstack-reddwarf/src/test/java/org/jclouds/openstack/reddwarf/v1/internal/BaseRedDwarfApiExpectTest.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.openstack.reddwarf.v1.internal;
-
-import org.jclouds.openstack.reddwarf.v1.RedDwarfApi;
-
-/**
- * Base class for writing Flavor Rest Api Expect tests
- *
- * @author Everett Toews
- */
-public class BaseRedDwarfApiExpectTest extends BaseRedDwarfExpectTest<RedDwarfApi> {
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-reddwarf/src/test/java/org/jclouds/openstack/reddwarf/v1/internal/BaseRedDwarfApiLiveTest.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-reddwarf/src/test/java/org/jclouds/openstack/reddwarf/v1/internal/BaseRedDwarfApiLiveTest.java b/openstack/openstack-reddwarf/src/test/java/org/jclouds/openstack/reddwarf/v1/internal/BaseRedDwarfApiLiveTest.java
deleted file mode 100644
index bec1a50..0000000
--- a/openstack/openstack-reddwarf/src/test/java/org/jclouds/openstack/reddwarf/v1/internal/BaseRedDwarfApiLiveTest.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.openstack.reddwarf.v1.internal;
-
-import java.util.Properties;
-
-import org.jclouds.apis.BaseApiLiveTest;
-import org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties;
-import org.jclouds.openstack.reddwarf.v1.RedDwarfApi;
-
-/**
- * Tests behavior of RedDwarfApi
- *
- * @author Zack Shoylev
- */
-public class BaseRedDwarfApiLiveTest extends BaseApiLiveTest<RedDwarfApi> {
-
- public BaseRedDwarfApiLiveTest() {
- provider = "openstack-reddwarf";
- }
-
- @Override
- protected Properties setupProperties() {
- Properties props = super.setupProperties();
- setIfTestSystemPropertyPresent(props, KeystoneProperties.CREDENTIAL_TYPE);
- setIfTestSystemPropertyPresent(props, KeystoneProperties.SERVICE_TYPE);
- return props;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-reddwarf/src/test/java/org/jclouds/openstack/reddwarf/v1/internal/BaseRedDwarfExpectTest.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-reddwarf/src/test/java/org/jclouds/openstack/reddwarf/v1/internal/BaseRedDwarfExpectTest.java b/openstack/openstack-reddwarf/src/test/java/org/jclouds/openstack/reddwarf/v1/internal/BaseRedDwarfExpectTest.java
deleted file mode 100644
index 9ecb07d..0000000
--- a/openstack/openstack-reddwarf/src/test/java/org/jclouds/openstack/reddwarf/v1/internal/BaseRedDwarfExpectTest.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.openstack.reddwarf.v1.internal;
-
-import javax.ws.rs.core.MediaType;
-import org.jclouds.http.HttpRequest;
-import org.jclouds.http.HttpResponse;
-import org.jclouds.openstack.keystone.v2_0.internal.KeystoneFixture;
-import org.jclouds.rest.internal.BaseRestApiExpectTest;
-
-/**
- * Base class for writing Nova Expect tests
- *
- * @author Adrian Cole
- */
-public class BaseRedDwarfExpectTest<T> extends BaseRestApiExpectTest<T> {
- protected HttpRequest keystoneAuthWithUsernameAndPassword;
- protected HttpRequest keystoneAuthWithUsernameAndPasswordAndTenantName;
- protected HttpRequest keystoneAuthWithAccessKeyAndSecretKeyAndTenantName;
- protected String authToken;
- protected HttpResponse responseWithKeystoneAccess;
- protected HttpRequest extensionsOfNovaRequest;
- protected HttpResponse extensionsOfNovaResponse;
- protected HttpResponse unmatchedExtensionsOfNovaResponse;
- protected HttpRequest keystoneAuthWithAccessKeyAndSecretKeyAndTenantId;
- protected String identityWithTenantId;
-
- public BaseRedDwarfExpectTest() {
- provider = "openstack-reddwarf";
- keystoneAuthWithUsernameAndPassword = KeystoneFixture.INSTANCE.initialAuthWithUsernameAndPassword(identity,
- credential);
- keystoneAuthWithUsernameAndPasswordAndTenantName = KeystoneFixture.INSTANCE.initialAuthWithUsernameAndPasswordAndTenantName(identity,
- credential);
- keystoneAuthWithAccessKeyAndSecretKeyAndTenantName = KeystoneFixture.INSTANCE.initialAuthWithAccessKeyAndSecretKeyAndTenantName(identity,
- credential);
- keystoneAuthWithAccessKeyAndSecretKeyAndTenantId = KeystoneFixture.INSTANCE.initialAuthWithAccessKeyAndSecretKeyAndTenantId(identity,
- credential);
-
- authToken = KeystoneFixture.INSTANCE.getAuthToken();
- responseWithKeystoneAccess = KeystoneFixture.INSTANCE.responseWithAccess();
- // now, createContext arg will need tenant prefix
- identityWithTenantId = KeystoneFixture.INSTANCE.getTenantId() + ":" + identity;
- identity = KeystoneFixture.INSTANCE.getTenantName() + ":" + identity;
- }
-
- @Override
- protected HttpRequestComparisonType compareHttpRequestAsType(HttpRequest input) {
- return HttpRequestComparisonType.JSON;
- }
-
- protected HttpRequest.Builder<?> authenticatedGET() {
- return HttpRequest.builder()
- .method("GET")
- .addHeader("Accept", MediaType.APPLICATION_JSON)
- .addHeader("X-Auth-Token", authToken);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-reddwarf/src/test/java/org/jclouds/openstack/reddwarf/v1/parse/ParseFlavorListTest.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-reddwarf/src/test/java/org/jclouds/openstack/reddwarf/v1/parse/ParseFlavorListTest.java b/openstack/openstack-reddwarf/src/test/java/org/jclouds/openstack/reddwarf/v1/parse/ParseFlavorListTest.java
deleted file mode 100644
index 836cc56..0000000
--- a/openstack/openstack-reddwarf/src/test/java/org/jclouds/openstack/reddwarf/v1/parse/ParseFlavorListTest.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.openstack.reddwarf.v1.parse;
-
-import java.util.Set;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.http.Uris;
-import org.jclouds.json.BaseSetParserTest;
-import org.jclouds.openstack.reddwarf.v1.domain.Flavor;
-import org.jclouds.openstack.v2_0.domain.Link;
-import org.jclouds.openstack.v2_0.domain.Link.Relation;
-import org.jclouds.rest.annotations.SelectJson;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableSet;
-
-/**
- *
- * @author Zack Shoylev
- */
-
-@Test(groups = "unit", testName = "ParseFlavorTest")
-public class ParseFlavorListTest extends BaseSetParserTest<Flavor> {
-
- @Override
- public String resource() {
- return "/flavor_list.json";
- }
-
- @Override
- @Consumes(MediaType.APPLICATION_JSON)
- @SelectJson("flavors")
- public Set<Flavor> expected() {
- return ImmutableSet
- .of(Flavor.builder()
- .id(1)
- .name("512MB Instance")
- .ram(512)
- .links(ImmutableList.of(
- Link.create(Relation.SELF, Uris.uriBuilder("https://localhost:8778/v1.0/811050/flavors/1").build() ),
- Link.create(Relation.BOOKMARK, Uris.uriBuilder("https://localhost:8778/flavors/1").build() )
- ))
- .build(),
- Flavor.builder()
- .id(2)
- .name("1GB Instance")
- .ram(1024)
- .links(ImmutableList.of(
- Link.create(Relation.SELF, Uris.uriBuilder("https://localhost:8778/v1.0/811050/flavors/2").build() ),
- Link.create(Relation.BOOKMARK, Uris.uriBuilder("https://localhost:8778/flavors/2").build() )
- ))
- .build(),
- Flavor.builder()
- .id(3)
- .name("2GB Instance")
- .ram(2048)
- .links(ImmutableList.of(
- Link.create(Relation.SELF, Uris.uriBuilder("https://localhost:8778/v1.0/811050/flavors/3").build() ),
- Link.create(Relation.BOOKMARK, Uris.uriBuilder("https://localhost:8778/flavors/3").build() )
- ))
- .build(),
- Flavor.builder()
- .id(4)
- .name("4GB Instance")
- .ram(4096)
- .links(ImmutableList.of(
- Link.create(Relation.SELF, Uris.uriBuilder("https://localhost:8778/v1.0/811050/flavors/4").build() ),
- Link.create(Relation.BOOKMARK, Uris.uriBuilder("https://localhost:8778/flavors/4").build() )
- ))
- .build(),
- Flavor.builder()
- .id(5)
- .name("8GB Instance")
- .ram(8192)
- .links(ImmutableList.of(
- Link.create(Relation.SELF, Uris.uriBuilder("https://localhost:8778/v1.0/811050/flavors/5").build() ),
- Link.create(Relation.BOOKMARK, Uris.uriBuilder("https://localhost:8778/flavors/5").build() )
- ))
- .build(),
- Flavor.builder()
- .id(6)
- .name("16GB Instance")
- .ram(16384)
- .links(ImmutableList.of(
- Link.create(Relation.SELF, Uris.uriBuilder("https://localhost:8778/v1.0/811050/flavors/6").build() ),
- Link.create(Relation.BOOKMARK, Uris.uriBuilder("https://localhost:8778/flavors/6").build() )
- ))
- .build());
- }
-}