Updated service types for OpenStack/Rackspace services

This commit is contained in:
Jeremy Daggett 2014-04-10 08:35:04 -07:00
parent f1a0370bd0
commit b112e8069e
6 changed files with 58 additions and 29 deletions

View File

@ -66,8 +66,8 @@ public class KeystoneApiMetadata extends BaseRestApiMetadata {
public static Properties defaultProperties() { public static Properties defaultProperties() {
Properties properties = BaseRestApiMetadata.defaultProperties(); Properties properties = BaseRestApiMetadata.defaultProperties();
properties.setProperty(CREDENTIAL_TYPE, CredentialTypes.PASSWORD_CREDENTIALS);
properties.setProperty(SERVICE_TYPE, ServiceType.IDENTITY); properties.setProperty(SERVICE_TYPE, ServiceType.IDENTITY);
properties.setProperty(CREDENTIAL_TYPE, CredentialTypes.PASSWORD_CREDENTIALS);
return properties; return properties;
} }

View File

@ -22,47 +22,51 @@ package org.jclouds.openstack.v2_0;
* (presumably useful) operations. * (presumably useful) operations.
* *
* @author Adrian Cole * @author Adrian Cole
* @see <a href="http://docs.openstack.org/api/openstack-typeentity-service/2.0/content/Identity-Service-Concepts-e1362.html" * @author Jeremy Daggett
* />
*/ */
public interface ServiceType { public interface ServiceType {
/** /**
* Object Storage (Swift) * Object Storage (Swift)
*/ */
public static final String OBJECT_STORE = "object-store"; String OBJECT_STORE = "object-store";
/** /**
* Compute (Nova) * Compute (Nova)
*/ */
public static final String COMPUTE = "compute"; String COMPUTE = "compute";
/** /**
* Image Service (Glance) * Image Service (Glance)
*/ */
public static final String IMAGE = "image"; String IMAGE = "image";
/** /**
* Identity Service (Keystone) * Identity Service (Keystone)
*/ */
public static final String IDENTITY = "identity"; String IDENTITY = "identity";
/** /**
* Network Service (Neutron) * Network Service (Neutron)
*/ */
public static final String NETWORK = "network"; String NETWORK = "network";
/** /**
* Block Storage (Cinder) * Block Storage (Cinder)
*/ */
public static final String BLOCK_STORAGE = "volume"; String BLOCK_STORAGE = "volume";
/** /**
* Database Service (Trove) * Database Service (Trove)
*/ */
public static final String DATABASE_SERVICE = "databases"; String DATABASE = "database";
/** /**
* Queues Service (Marconi) * Queues Service (Marconi)
*/ */
public static final String QUEUES = "queuing"; String QUEUES = "queuing";
/**
* Orchestration Service (Heat)
*/
String ORCHESTRATION = "orchestration";
} }

View File

@ -33,7 +33,7 @@ import javax.ws.rs.core.MediaType;
import static org.jclouds.openstack.v2_0.ServiceType.BLOCK_STORAGE; import static org.jclouds.openstack.v2_0.ServiceType.BLOCK_STORAGE;
import static org.jclouds.openstack.v2_0.ServiceType.COMPUTE; import static org.jclouds.openstack.v2_0.ServiceType.COMPUTE;
import static org.jclouds.openstack.v2_0.ServiceType.DATABASE_SERVICE; import static org.jclouds.openstack.v2_0.ServiceType.DATABASE;
import static org.jclouds.openstack.v2_0.ServiceType.IDENTITY; import static org.jclouds.openstack.v2_0.ServiceType.IDENTITY;
import static org.jclouds.openstack.v2_0.ServiceType.IMAGE; import static org.jclouds.openstack.v2_0.ServiceType.IMAGE;
import static org.jclouds.openstack.v2_0.ServiceType.NETWORK; import static org.jclouds.openstack.v2_0.ServiceType.NETWORK;
@ -132,7 +132,7 @@ public class ParseAccessTest extends BaseItemParserTest<Access> {
.internalURL("http://10.0.2.15:8776/v1/50cdb4c60374463198695d9f798fa34d") .internalURL("http://10.0.2.15:8776/v1/50cdb4c60374463198695d9f798fa34d")
.adminURL("http://10.0.2.15:8776/v1/50cdb4c60374463198695d9f798fa34d") .adminURL("http://10.0.2.15:8776/v1/50cdb4c60374463198695d9f798fa34d")
.region("RegionOne").build()).build()) .region("RegionOne").build()).build())
.service(Service.builder().name("reddwarf").type(DATABASE_SERVICE) .service(Service.builder().name("trove").type(DATABASE)
.endpoint(Endpoint.builder() .endpoint(Endpoint.builder()
.publicURL("http://172.16.0.1:8776/v1/3456") .publicURL("http://172.16.0.1:8776/v1/3456")
.tenantId("123123") .tenantId("123123")

View File

@ -155,8 +155,8 @@
"endpoints_links": [] "endpoints_links": []
}, },
{ {
"type": "databases", "type": "database",
"name": "reddwarf", "name": "trove",
"endpoints": [ "endpoints": [
{ {
"publicURL": "http://172.16.0.1:8776/v1/3456", "publicURL": "http://172.16.0.1:8776/v1/3456",

View File

@ -35,7 +35,7 @@ import com.google.common.collect.ImmutableSet;
import com.google.inject.Module; import com.google.inject.Module;
/** /**
* Implementation of {@link ApiMetadata} for Trove API * Implementation of {@link org.jclouds.apis.ApiMetadata} for the OpenStack Trove v1 API.
* *
* @author Zack Shoylev * @author Zack Shoylev
*/ */
@ -56,7 +56,7 @@ public class TroveApiMetadata extends BaseHttpApiMetadata<TroveApi> {
public static Properties defaultProperties() { public static Properties defaultProperties() {
Properties properties = BaseHttpApiMetadata.defaultProperties(); Properties properties = BaseHttpApiMetadata.defaultProperties();
properties.setProperty(SERVICE_TYPE, ServiceType.DATABASE_SERVICE); properties.setProperty(SERVICE_TYPE, ServiceType.DATABASE);
properties.setProperty(CREDENTIAL_TYPE, CredentialTypes.PASSWORD_CREDENTIALS); properties.setProperty(CREDENTIAL_TYPE, CredentialTypes.PASSWORD_CREDENTIALS);
return properties; return properties;
} }

View File

@ -26,20 +26,45 @@ public interface ServiceType {
/** /**
* Cloud Load Balancers * Cloud Load Balancers
*/ */
public static final String LOAD_BALANCERS = "rax:load-balancer"; String LOAD_BALANCERS = "rax:load-balancer";
/** /**
* Cloud DNS * Cloud DNS
*/ */
public static final String DNS = "rax:dns"; String DNS = "rax:dns";
/** /**
* Cloud Queues * Cloud Queues
*/ */
public static final String QUEUES = "rax:queues"; String QUEUES = "rax:queues";
/** /**
* Cloud Files CDN * Cloud Files CDN
*/ */
public static final String OBJECT_CDN = "rax:object-cdn"; String OBJECT_CDN = "rax:object-cdn";
/**
* Auto Scale
*/
String AUTO_SCALE = "rax:autoscale";
/**
* Cloud Backup
*/
String BACKUP = "rax:backup";
/**
* Cloud Databases
*/
String DATABASES = "rax:database";
/**
* Cloud Monitoring
*/
String MONITORING = "rax:monitor";
/**
* Cloud Big Data
*/
String BIG_DATA = "rax:bigdata";
} }