Repository: jclouds Updated Branches: refs/heads/1.7.x 0cb2a1563 -> fb373d47b
JCLOUDS-585: Add HP Cloud Block Storage Provider (OpenStack Cinder) Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/fb373d47 Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/fb373d47 Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/fb373d47 Branch: refs/heads/1.7.x Commit: fb373d47bfccef35a68fa905df8f069e56ae3f18 Parents: 0cb2a15 Author: Chris Custine <[email protected]> Authored: Tue Jun 3 02:02:42 2014 -0600 Committer: Jeremy Daggett <[email protected]> Committed: Wed Jul 2 11:10:27 2014 -0700 ---------------------------------------------------------------------- .../features/VolumeAndSnapshotApiLiveTest.java | 3 +- providers/hpcloud-blockstorage/pom.xml | 134 ++++++++ .../HPCloudBlockStorageProviderMetadata.java | 97 ++++++ .../org.jclouds.providers.ProviderMetadata | 1 + ...dBlockStorageProviderMetadataExpectTest.java | 58 ++++ .../HPCloudBlockStorageProviderTest.java | 29 ++ ...lockStorageVolumeAndSnapshotApiLiveTest.java | 27 ++ ...PCloudBlockStorageVolumeTypeApiLiveTest.java | 27 ++ .../src/test/resources/access_hpcloud.json | 325 +++++++++++++++++++ .../src/test/resources/auth_post_req.json | 9 + providers/pom.xml | 1 + 11 files changed, 709 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/jclouds/blob/fb373d47/apis/openstack-cinder/src/test/java/org/jclouds/openstack/cinder/v1/features/VolumeAndSnapshotApiLiveTest.java ---------------------------------------------------------------------- diff --git a/apis/openstack-cinder/src/test/java/org/jclouds/openstack/cinder/v1/features/VolumeAndSnapshotApiLiveTest.java b/apis/openstack-cinder/src/test/java/org/jclouds/openstack/cinder/v1/features/VolumeAndSnapshotApiLiveTest.java index b543352..edcf9c9 100644 --- a/apis/openstack-cinder/src/test/java/org/jclouds/openstack/cinder/v1/features/VolumeAndSnapshotApiLiveTest.java +++ b/apis/openstack-cinder/src/test/java/org/jclouds/openstack/cinder/v1/features/VolumeAndSnapshotApiLiveTest.java @@ -81,8 +81,7 @@ public class VolumeAndSnapshotApiLiveTest extends BaseCinderApiLiveTest { public void testCreateVolume() { CreateVolumeOptions options = CreateVolumeOptions.Builder .name(name) - .description("description of test volume") - .availabilityZone(zone); + .description("description of test volume"); testVolume = volumeApi.create(100, options); assertTrue(VolumePredicates.awaitAvailable(volumeApi).apply(testVolume)); http://git-wip-us.apache.org/repos/asf/jclouds/blob/fb373d47/providers/hpcloud-blockstorage/pom.xml ---------------------------------------------------------------------- diff --git a/providers/hpcloud-blockstorage/pom.xml b/providers/hpcloud-blockstorage/pom.xml new file mode 100644 index 0000000..890ab3b --- /dev/null +++ b/providers/hpcloud-blockstorage/pom.xml @@ -0,0 +1,134 @@ +<?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</groupId> + <artifactId>jclouds-project</artifactId> + <version>1.8.0-SNAPSHOT</version> + <relativePath>../../project/pom.xml</relativePath> + </parent> + <groupId>org.apache.jclouds.provider</groupId> + <artifactId>hpcloud-blockstorage</artifactId> + <name>jclouds HP Cloud Block Storage Provider</name> + <description>OpenStack Cinder implementation for HP Cloud Block Storage</description> + <packaging>bundle</packaging> + + <properties> + <test.hpcloud-blockstorage.endpoint>https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/</test.hpcloud-blockstorage.endpoint> + <test.hpcloud-blockstorage.api-version>1.0</test.hpcloud-blockstorage.api-version> + <test.hpcloud-blockstorage.build-version /> + <test.hpcloud-blockstorage.identity>FIXME</test.hpcloud-blockstorage.identity> + <test.hpcloud-blockstorage.credential>FIXME</test.hpcloud-blockstorage.credential> + <test.hpcloud-blockstorage.template /> + <jclouds.osgi.export>org.jclouds.hpcloud.blockstorage.*;version="${project.version}"</jclouds.osgi.export> + <jclouds.osgi.import> + org.jclouds.compute.internal;version="${project.version}", + org.jclouds.rest.internal;version="${project.version}", + org.jclouds*;version="${project.version}", + * + </jclouds.osgi.import> + </properties> + + <dependencies> + <dependency> + <groupId>org.apache.jclouds</groupId> + <artifactId>jclouds-core</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.jclouds.api</groupId> + <artifactId>openstack-cinder</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.jclouds.api</groupId> + <artifactId>openstack-keystone</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.jclouds</groupId> + <artifactId>jclouds-core</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.jclouds.api</groupId> + <artifactId>openstack-cinder</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.jclouds.api</groupId> + <artifactId>openstack-keystone</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.jclouds.driver</groupId> + <artifactId>jclouds-slf4j</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>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> + <threadCount>1</threadCount> + <systemPropertyVariables> + <test.hpcloud-blockstorage.endpoint>${test.hpcloud-blockstorage.endpoint}</test.hpcloud-blockstorage.endpoint> + <test.hpcloud-blockstorage.api-version>${test.hpcloud-blockstorage.api-version}</test.hpcloud-blockstorage.api-version> + <test.hpcloud-blockstorage.build-version>${test.hpcloud-blockstorage.build-version}</test.hpcloud-blockstorage.build-version> + <test.hpcloud-blockstorage.identity>${test.hpcloud-blockstorage.identity}</test.hpcloud-blockstorage.identity> + <test.hpcloud-blockstorage.credential>${test.hpcloud-blockstorage.credential}</test.hpcloud-blockstorage.credential> + <test.hpcloud-blockstorage.template>${test.hpcloud-blockstorage.template}</test.hpcloud-blockstorage.template> + </systemPropertyVariables> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + </profiles> + +</project> http://git-wip-us.apache.org/repos/asf/jclouds/blob/fb373d47/providers/hpcloud-blockstorage/src/main/java/org/jclouds/hpcloud/blockstorage/HPCloudBlockStorageProviderMetadata.java ---------------------------------------------------------------------- diff --git a/providers/hpcloud-blockstorage/src/main/java/org/jclouds/hpcloud/blockstorage/HPCloudBlockStorageProviderMetadata.java b/providers/hpcloud-blockstorage/src/main/java/org/jclouds/hpcloud/blockstorage/HPCloudBlockStorageProviderMetadata.java new file mode 100644 index 0000000..5889d68 --- /dev/null +++ b/providers/hpcloud-blockstorage/src/main/java/org/jclouds/hpcloud/blockstorage/HPCloudBlockStorageProviderMetadata.java @@ -0,0 +1,97 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.jclouds.hpcloud.blockstorage; + +import org.jclouds.openstack.cinder.v1.CinderApiMetadata; +import org.jclouds.openstack.keystone.v2_0.config.CredentialTypes; +import org.jclouds.openstack.v2_0.ServiceType; +import org.jclouds.providers.ProviderMetadata; +import org.jclouds.providers.internal.BaseProviderMetadata; + +import java.net.URI; +import java.util.Properties; + +import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.REQUIRES_TENANT; +import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.CREDENTIAL_TYPE; +import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.SERVICE_TYPE; + +/** + * Implementation of {@link org.jclouds.types.ProviderMetadata} for HP Cloud Block Storage service. + * + */ +public class HPCloudBlockStorageProviderMetadata extends BaseProviderMetadata { + + public static Builder builder() { + return new Builder(); + } + + @Override + public Builder toBuilder() { + return builder().fromProviderMetadata(this); + } + + public HPCloudBlockStorageProviderMetadata() { + super(builder()); + } + + public HPCloudBlockStorageProviderMetadata(Builder builder) { + super(builder); + } + + public static Properties defaultProperties() { + Properties properties = new Properties(); + properties.setProperty(REQUIRES_TENANT, "true"); + properties.setProperty(CREDENTIAL_TYPE, CredentialTypes.API_ACCESS_KEY_CREDENTIALS); + properties.setProperty(SERVICE_TYPE, ServiceType.BLOCK_STORAGE); + + return properties; + } + + public static class Builder extends BaseProviderMetadata.Builder { + + protected Builder() { + id("hpcloud-blockstorage") + .name("HP Cloud Block Storage") + .apiMetadata(new CinderApiMetadata().toBuilder() + .identityName("${tenantName:accessKey}") + .credentialName("${secret}") + .defaultEndpoint("https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/") + .endpointName("identity service url ending in /v2.0/") + .documentation(URI.create("https://docs.hpcloud.com/api/v13/block-storage/")) + .version("1.0") + .build()) + .homepage(URI.create("https://horizon.hpcloud.com/project/volumes/")) + .console(URI.create("https://horizon.hpcloud.com")) + .linkedServices("hpcloud-compute", "hpcloud-objectstorage") + .iso3166Codes("US-NV", "US-VA") + .endpoint("https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/") + .defaultProperties(HPCloudBlockStorageProviderMetadata.defaultProperties()); + } + + @Override + public HPCloudBlockStorageProviderMetadata build() { + return new HPCloudBlockStorageProviderMetadata(this); + } + + @Override + public Builder fromProviderMetadata(ProviderMetadata in) { + super.fromProviderMetadata(in); + return this; + } + } + +} http://git-wip-us.apache.org/repos/asf/jclouds/blob/fb373d47/providers/hpcloud-blockstorage/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata ---------------------------------------------------------------------- diff --git a/providers/hpcloud-blockstorage/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata b/providers/hpcloud-blockstorage/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata new file mode 100644 index 0000000..4312483 --- /dev/null +++ b/providers/hpcloud-blockstorage/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata @@ -0,0 +1 @@ +org.jclouds.hpcloud.blockstorage.HPCloudBlockStorageProviderMetadata http://git-wip-us.apache.org/repos/asf/jclouds/blob/fb373d47/providers/hpcloud-blockstorage/src/test/java/org/jclouds/hpcloud/blockstorage/HPCloudBlockStorageProviderMetadataExpectTest.java ---------------------------------------------------------------------- diff --git a/providers/hpcloud-blockstorage/src/test/java/org/jclouds/hpcloud/blockstorage/HPCloudBlockStorageProviderMetadataExpectTest.java b/providers/hpcloud-blockstorage/src/test/java/org/jclouds/hpcloud/blockstorage/HPCloudBlockStorageProviderMetadataExpectTest.java new file mode 100644 index 0000000..c8eefd1 --- /dev/null +++ b/providers/hpcloud-blockstorage/src/test/java/org/jclouds/hpcloud/blockstorage/HPCloudBlockStorageProviderMetadataExpectTest.java @@ -0,0 +1,58 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.jclouds.hpcloud.blockstorage; + +import static org.testng.Assert.assertEquals; + +import org.jclouds.http.HttpRequest; +import org.jclouds.http.HttpResponse; +import org.jclouds.openstack.cinder.v1.CinderApi; +import org.jclouds.openstack.cinder.v1.internal.BaseCinderApiExpectTest; +import org.testng.annotations.Test; + +import com.google.common.collect.ImmutableSet; + +@Test(groups = "unit", testName = "HPCloudBlockStorageProviderMetadataExpectTest") +public class HPCloudBlockStorageProviderMetadataExpectTest extends BaseCinderApiExpectTest { + + public HPCloudBlockStorageProviderMetadataExpectTest() { + this.provider = "hpcloud-blockstorage"; + this.identity = "myTenantName:accessKey"; + this.credential = "secretKey"; + } + + public void testCanGetConfiguredZones() { + + HttpRequest authenticate = HttpRequest.builder().method("POST") + .endpoint("https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/tokens") + .addHeader("Accept", "application/json") + .payload(payloadFromResourceWithContentType("/auth_post_req.json", "application/json")) + .build(); + + + HttpResponse authenticationResponse = HttpResponse.builder() + .statusCode(200) + .payload(payloadFromResourceWithContentType("/access_hpcloud.json", "application/json")) + .build(); + + CinderApi whenNovaRegionExists = requestSendsResponse(authenticate, authenticationResponse); + + assertEquals(whenNovaRegionExists.getConfiguredZones(), ImmutableSet.of("region-a.geo-1", "region-b.geo-1")); + + } + +} http://git-wip-us.apache.org/repos/asf/jclouds/blob/fb373d47/providers/hpcloud-blockstorage/src/test/java/org/jclouds/hpcloud/blockstorage/HPCloudBlockStorageProviderTest.java ---------------------------------------------------------------------- diff --git a/providers/hpcloud-blockstorage/src/test/java/org/jclouds/hpcloud/blockstorage/HPCloudBlockStorageProviderTest.java b/providers/hpcloud-blockstorage/src/test/java/org/jclouds/hpcloud/blockstorage/HPCloudBlockStorageProviderTest.java new file mode 100644 index 0000000..4e2ab46 --- /dev/null +++ b/providers/hpcloud-blockstorage/src/test/java/org/jclouds/hpcloud/blockstorage/HPCloudBlockStorageProviderTest.java @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.jclouds.hpcloud.blockstorage; + +import org.jclouds.openstack.cinder.v1.CinderApiMetadata; +import org.jclouds.providers.internal.BaseProviderMetadataTest; +import org.testng.annotations.Test; + +@Test(groups = "unit", testName = "HPCloudBlockStorageProviderTest") +public class HPCloudBlockStorageProviderTest extends BaseProviderMetadataTest { + + public HPCloudBlockStorageProviderTest() { + super(new HPCloudBlockStorageProviderMetadata(), new CinderApiMetadata()); + } +} http://git-wip-us.apache.org/repos/asf/jclouds/blob/fb373d47/providers/hpcloud-blockstorage/src/test/java/org/jclouds/hpcloud/blockstorage/features/HPCloudBlockStorageVolumeAndSnapshotApiLiveTest.java ---------------------------------------------------------------------- diff --git a/providers/hpcloud-blockstorage/src/test/java/org/jclouds/hpcloud/blockstorage/features/HPCloudBlockStorageVolumeAndSnapshotApiLiveTest.java b/providers/hpcloud-blockstorage/src/test/java/org/jclouds/hpcloud/blockstorage/features/HPCloudBlockStorageVolumeAndSnapshotApiLiveTest.java new file mode 100644 index 0000000..40b4d8a --- /dev/null +++ b/providers/hpcloud-blockstorage/src/test/java/org/jclouds/hpcloud/blockstorage/features/HPCloudBlockStorageVolumeAndSnapshotApiLiveTest.java @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.jclouds.hpcloud.blockstorage.features; + +import org.jclouds.openstack.cinder.v1.features.VolumeAndSnapshotApiLiveTest; +import org.testng.annotations.Test; + +@Test(groups = "live", testName = "HPCloudBlockStorageVolumeAndSnapshotApiLiveTest") +public class HPCloudBlockStorageVolumeAndSnapshotApiLiveTest extends VolumeAndSnapshotApiLiveTest { + public HPCloudBlockStorageVolumeAndSnapshotApiLiveTest() { + provider = "hpcloud-blockstorage"; + } +} http://git-wip-us.apache.org/repos/asf/jclouds/blob/fb373d47/providers/hpcloud-blockstorage/src/test/java/org/jclouds/hpcloud/blockstorage/features/HPCloudBlockStorageVolumeTypeApiLiveTest.java ---------------------------------------------------------------------- diff --git a/providers/hpcloud-blockstorage/src/test/java/org/jclouds/hpcloud/blockstorage/features/HPCloudBlockStorageVolumeTypeApiLiveTest.java b/providers/hpcloud-blockstorage/src/test/java/org/jclouds/hpcloud/blockstorage/features/HPCloudBlockStorageVolumeTypeApiLiveTest.java new file mode 100644 index 0000000..4cac864 --- /dev/null +++ b/providers/hpcloud-blockstorage/src/test/java/org/jclouds/hpcloud/blockstorage/features/HPCloudBlockStorageVolumeTypeApiLiveTest.java @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.jclouds.hpcloud.blockstorage.features; + +import org.jclouds.openstack.cinder.v1.features.VolumeTypeApiLiveTest; +import org.testng.annotations.Test; + +@Test(groups = "live", testName = "HPCloudBlockStorageVolumeTypeApiLiveTest") +public class HPCloudBlockStorageVolumeTypeApiLiveTest extends VolumeTypeApiLiveTest { + public HPCloudBlockStorageVolumeTypeApiLiveTest() { + provider = "hpcloud-blockstorage"; + } +} http://git-wip-us.apache.org/repos/asf/jclouds/blob/fb373d47/providers/hpcloud-blockstorage/src/test/resources/access_hpcloud.json ---------------------------------------------------------------------- diff --git a/providers/hpcloud-blockstorage/src/test/resources/access_hpcloud.json b/providers/hpcloud-blockstorage/src/test/resources/access_hpcloud.json new file mode 100644 index 0000000..a0c01c5 --- /dev/null +++ b/providers/hpcloud-blockstorage/src/test/resources/access_hpcloud.json @@ -0,0 +1,325 @@ +{ + "access": { + "token": { + "expires": "2014-04-24T08:52:18.113Z", + "id": "myToken", + "tenant": { + "id": "myTenantId", + "name": "myTenantName" + } + }, + "user": { + "id": "myUserId", + "name": "myUsername", + "otherAttributes": { + "domainStatus": "enabled", + "domainStatusCode": "00" + }, + "roles": [ + { + "id": "00000000004004", + "serviceId": "100", + "name": "domainuser" + }, + { + "id": "00000000004016", + "serviceId": "120", + "name": "netadmin", + "tenantId": "myTenantId" + }, + { + "id": "00000000004014", + "serviceId": "150", + "name": "cdn-admin", + "tenantId": "myTenantId" + }, + { + "id": "00000000004022", + "serviceId": "110", + "name": "Admin", + "tenantId": "myTenantId" + }, + { + "id": "00000000004024", + "serviceId": "140", + "name": "user", + "tenantId": "myTenantId" + }, + { + "id": "00000000004013", + "serviceId": "130", + "name": "block-admin", + "tenantId": "myTenantId" + }, + { + "id": "00000000004025", + "serviceId": "120", + "name": "sysadmin", + "tenantId": "myTenantId" + }, + { + "id": "91643347410087", + "serviceId": "240", + "name": "dns-admin", + "tenantId": "myTenantId" + }, + { + "id": "00000000004003", + "serviceId": "100", + "name": "domainadmin" + }, + { + "id": "10419409370304", + "serviceId": "170", + "name": "net-admin", + "tenantId": "myTenantId" + } + ] + }, + "serviceCatalog": [ + { + "name": "Usage Reporting", + "type": "metering", + "endpoints": [ + { + "publicURL": "", + "region": "region-a.geo-1", + "versionId": "2", + "versionInfo": "https://region-a.geo-1.usage-reporting-internal.hpcloudsvc.com:8777", + "versionList": "https://region-a.geo-1.usage-reporting-internal.hpcloudsvc.com:8777" + }, + { + "publicURL": "", + "region": "region-b.geo-1", + "versionId": "2", + "versionInfo": "https://region-b.geo-1.usage-reporting-internal.hpcloudsvc.com:8777", + "versionList": "https://region-b.geo-1.usage-reporting-internal.hpcloudsvc.com:8777" + } + ] + }, + { + "name": "Networking", + "type": "network", + "endpoints": [ + { + "tenantId": "myTenantId", + "publicURL": "", + "publicURL2": "", + "region": "az-1.region-a.geo-1", + "versionId": "", + "versionInfo": "", + "versionList": "" + }, + { + "tenantId": "myTenantId", + "publicURL": "https://region-a.geo-1.network.hpcloudsvc.com", + "publicURL2": "", + "region": "region-a.geo-1", + "versionId": "2.0", + "versionInfo": "https://region-a.geo-1.network.hpcloudsvc.com", + "versionList": "https://region-a.geo-1.network.hpcloudsvc.com" + }, + { + "tenantId": "myTenantId", + "publicURL": "https://region-b.geo-1.network.hpcloudsvc.com", + "publicURL2": "", + "region": "region-b.geo-1", + "versionId": "2.0", + "versionInfo": "https://region-b.geo-1.network.hpcloudsvc.com", + "versionList": "https://region-b.geo-1.network.hpcloudsvc.com" + } + ] + }, + { + "name": "CDN", + "type": "hpext:cdn", + "endpoints": [ + { + "tenantId": "myTenantId", + "publicURL": "https://region-a.geo-1.cdnmgmt.hpcloudsvc.com/v1.0/myTenantId", + "region": "region-a.geo-1", + "versionId": "1.0", + "versionInfo": "https://region-a.geo-1.cdnmgmt.hpcloudsvc.com/v1.0/", + "versionList": "https://region-a.geo-1.cdnmgmt.hpcloudsvc.com/" + }, + { + "tenantId": "myTenantId", + "publicURL": "https://region-b.geo-1.cdnmgmt.hpcloudsvc.com/v1.0/myTenantId", + "region": "region-b.geo-1", + "versionId": "1.0", + "versionInfo": "https://region-b.geo-1.cdnmgmt.hpcloudsvc.com/v1.0/", + "versionList": "https://region-b.geo-1.cdnmgmt.hpcloudsvc.com/" + } + ] + }, + { + "name": "Object Storage", + "type": "object-store", + "endpoints": [ + { + "tenantId": "myTenantId", + "publicURL": "https://region-a.geo-1.objects.hpcloudsvc.com/v1/myTenantId", + "region": "region-a.geo-1", + "versionId": "1.0", + "versionInfo": "https://region-a.geo-1.objects.hpcloudsvc.com/v1.0/", + "versionList": "https://region-a.geo-1.objects.hpcloudsvc.com" + }, + { + "tenantId": "myTenantId", + "publicURL": "https://region-b.geo-1.objects.hpcloudsvc.com:443/v1/myTenantId", + "region": "region-b.geo-1", + "versionId": "1", + "versionInfo": "https://region-b.geo-1.objects.hpcloudsvc.com:443/v1/", + "versionList": "https://region-b.geo-1.objects.hpcloudsvc.com:443" + } + ] + }, + { + "name": "Identity", + "type": "identity", + "endpoints": [ + { + "publicURL": "https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/", + "region": "region-a.geo-1", + "versionId": "2.0", + "versionInfo": "https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/", + "versionList": "https://region-a.geo-1.identity.hpcloudsvc.com:35357" + }, + { + "publicURL": "https://region-a.geo-1.identity.hpcloudsvc.com:35357/v3/", + "region": "region-a.geo-1", + "versionId": "3.0", + "versionInfo": "https://region-a.geo-1.identity.hpcloudsvc.com:35357/v3/", + "versionList": "https://region-a.geo-1.identity.hpcloudsvc.com:35357" + }, + { + "publicURL": "https://region-b.geo-1.identity.hpcloudsvc.com:35357/v2.0/", + "region": "region-b.geo-1", + "versionId": "2.0", + "versionInfo": "https://region-b.geo-1.identity.hpcloudsvc.com:35357/v2.0/", + "versionList": "https://region-b.geo-1.identity.hpcloudsvc.com:35357" + }, + { + "publicURL": "https://region-b.geo-1.identity.hpcloudsvc.com:35357/v3/", + "region": "region-b.geo-1", + "versionId": "3.0", + "versionInfo": "https://region-b.geo-1.identity.hpcloudsvc.com:35357/v3/", + "versionList": "https://region-b.geo-1.identity.hpcloudsvc.com:35357" + } + ] + }, + { + "name": "Image Management", + "type": "image", + "endpoints": [ + { + "tenantId": "myTenantId", + "publicURL": "https://glance1.uswest.hpcloud.net:9292/v1.0", + "publicURL2": "", + "region": "az-1.region-a.geo-1", + "versionId": "1.0", + "versionInfo": "https://glance1.uswest.hpcloud.net:9292/v1.0/", + "versionList": "https://glance1.uswest.hpcloud.net:9292" + }, + { + "tenantId": "myTenantId", + "publicURL": "https://region-a.geo-1.images.hpcloudsvc.com:443/v1.0", + "publicURL2": "", + "region": "region-a.geo-1", + "versionId": "1.0", + "versionInfo": "https://region-a.geo-1.images.hpcloudsvc.com:443/v1.0", + "versionList": "https://region-a.geo-1.images.hpcloudsvc.com:443" + }, + { + "tenantId": "myTenantId", + "publicURL": "https://region-b.geo-1.images.hpcloudsvc.com:443/v1.0", + "publicURL2": "", + "region": "region-b.geo-1", + "versionId": "1.0", + "versionInfo": "https://region-b.geo-1.images.hpcloudsvc.com:443/v1.0", + "versionList": "https://region-b.geo-1.images.hpcloudsvc.com:443" + } + ] + }, + { + "name": "DNS", + "type": "hpext:dns", + "endpoints": [ + { + "tenantId": "myTenantId", + "publicURL": "https://region-a.geo-1.dns.hpcloudsvc.com/v1/", + "publicURL2": "", + "region": "region-a.geo-1", + "versionId": "1", + "versionInfo": "https://region-a.geo-1.dns.hpcloudsvc.com/v1/", + "versionList": "https://region-a.geo-1.dns.hpcloudsvc.com/" + } + ] + }, + { + "name": "Block Storage", + "type": "volume", + "endpoints": [ + { + "tenantId": "myTenantId", + "publicURL": "https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/myTenantId", + "publicURL2": "", + "region": "az-1.region-a.geo-1", + "versionId": "1.1", + "versionInfo": "https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/", + "versionList": "https://az-1.region-a.geo-1.compute.hpcloudsvc.com" + }, + { + "tenantId": "myTenantId", + "publicURL": "https://region-a.geo-1.block.hpcloudsvc.com/v1/myTenantId", + "publicURL2": "", + "region": "region-a.geo-1", + "versionId": "1.0", + "versionInfo": "https://region-a.geo-1.block.hpcloudsvc.com/v1", + "versionList": "https://region-a.geo-1.block.hpcloudsvc.com" + }, + { + "tenantId": "myTenantId", + "publicURL": "https://region-b.geo-1.block.hpcloudsvc.com/v1/myTenantId", + "publicURL2": "", + "region": "region-b.geo-1", + "versionId": "1.0", + "versionInfo": "https://region-b.geo-1.block.hpcloudsvc.com/v1", + "versionList": "https://region-b.geo-1.block.hpcloudsvc.com" + } + ] + }, + { + "name": "Compute", + "type": "compute", + "endpoints": [ + { + "tenantId": "myTenantId", + "publicURL": "https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/myTenantId", + "publicURL2": "https://az-1.region-a.geo-1.ec2-compute.hpcloudsvc.com/services/Cloud", + "region": "az-1.region-a.geo-1", + "versionId": "1.1", + "versionInfo": "https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/", + "versionList": "https://az-1.region-a.geo-1.compute.hpcloudsvc.com" + }, + { + "tenantId": "myTenantId", + "publicURL": "https://region-a.geo-1.compute.hpcloudsvc.com/v2/myTenantId", + "region": "region-a.geo-1", + "versionId": "2", + "versionInfo": "https://region-a.geo-1.compute.hpcloudsvc.com/v2/", + "versionList": "https://region-a.geo-1.compute.hpcloudsvc.com" + }, + { + "tenantId": "myTenantId", + "publicURL": "https://region-b.geo-1.compute.hpcloudsvc.com/v2/myTenantId", + "region": "region-b.geo-1", + "versionId": "2", + "versionInfo": "https://region-b.geo-1.compute.hpcloudsvc.com/v2/", + "versionList": "https://region-b.geo-1.compute.hpcloudsvc.com" + } + ] + } + ] + } +} http://git-wip-us.apache.org/repos/asf/jclouds/blob/fb373d47/providers/hpcloud-blockstorage/src/test/resources/auth_post_req.json ---------------------------------------------------------------------- diff --git a/providers/hpcloud-blockstorage/src/test/resources/auth_post_req.json b/providers/hpcloud-blockstorage/src/test/resources/auth_post_req.json new file mode 100644 index 0000000..57ef1c7 --- /dev/null +++ b/providers/hpcloud-blockstorage/src/test/resources/auth_post_req.json @@ -0,0 +1,9 @@ +{ + "auth": { + "apiAccessKeyCredentials": { + "accessKey": "accessKey", + "secretKey": "secretKey" + }, + "tenantName": "myTenantName" + } +} http://git-wip-us.apache.org/repos/asf/jclouds/blob/fb373d47/providers/pom.xml ---------------------------------------------------------------------- diff --git a/providers/pom.xml b/providers/pom.xml index c2f55ab..d8e3ed3 100644 --- a/providers/pom.xml +++ b/providers/pom.xml @@ -58,6 +58,7 @@ <module>softlayer</module> <module>ninefold-compute</module> <module>hpcloud-compute</module> + <module>hpcloud-blockstorage</module> <module>hpcloud-objectstorage</module> <module>cloudservers-us</module> <module>cloudservers-uk</module>
