You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by la...@apache.org on 2014/03/31 09:13:57 UTC
[44/52] [partial] Moving jclouds dependencies to accurate parent
directories
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/19c8cdaf/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/SecurityGroupApi.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/SecurityGroupApi.java b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/SecurityGroupApi.java
new file mode 100644
index 0000000..867ccd3
--- /dev/null
+++ b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/SecurityGroupApi.java
@@ -0,0 +1,89 @@
+/*
+ * 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.nova.v2_0.extensions;
+
+import org.jclouds.openstack.nova.v2_0.domain.Ingress;
+import org.jclouds.openstack.nova.v2_0.domain.SecurityGroup;
+import org.jclouds.openstack.nova.v2_0.domain.SecurityGroupRule;
+import org.jclouds.openstack.v2_0.ServiceType;
+import org.jclouds.openstack.v2_0.services.Extension;
+
+import com.google.common.annotations.Beta;
+import com.google.common.collect.FluentIterable;
+
+/**
+ * Provides synchronous access to Security Groups.
+ * <p/>
+ *
+ * @see SecurityGroupAsyncApi
+ * @author Jeremy Daggett
+ */
+@Beta
+@Extension(of = ServiceType.COMPUTE, namespace = ExtensionNamespaces.SECURITY_GROUPS)
+public interface SecurityGroupApi {
+
+ /**
+ * List all Security Groups.
+ *
+ * @return all Security Groups
+ */
+ FluentIterable<? extends SecurityGroup> list();
+
+ /**
+ * Get a specific Security Group
+ *
+ * @return a specific Security Group
+ */
+ SecurityGroup get(String id);
+
+ /**
+ * Create a Security Group
+ *
+ * @return a new Security Group
+ */
+ SecurityGroup createWithDescription(String name, String description);
+
+ /**
+ * Delete a Security Group.
+ *
+ * @return
+ */
+ boolean delete(String id);
+
+ /**
+ * Create a Security Group Rule.
+ *
+ * @return a new Security Group Rule
+ */
+ SecurityGroupRule createRuleAllowingCidrBlock(String parentGroup, Ingress ingress, String sourceCidr);
+
+ /**
+ * Create a Security Group Rule.
+ *
+ * @return a new Security Group Rule
+ */
+ SecurityGroupRule createRuleAllowingSecurityGroupId(String parentGroup, Ingress ingress,
+ String groupId);
+
+ /**
+ * Delete a Security Group Rule.
+ *
+ * @return
+ */
+ Boolean deleteRule(String id);
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/19c8cdaf/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/SecurityGroupAsyncApi.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/SecurityGroupAsyncApi.java b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/SecurityGroupAsyncApi.java
new file mode 100644
index 0000000..5e5a2de
--- /dev/null
+++ b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/SecurityGroupAsyncApi.java
@@ -0,0 +1,152 @@
+/*
+ * 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.nova.v2_0.extensions;
+
+import javax.inject.Named;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+import org.jclouds.Fallbacks.EmptyFluentIterableOnNotFoundOr404;
+import org.jclouds.Fallbacks.FalseOnNotFoundOr404;
+import org.jclouds.Fallbacks.NullOnNotFoundOr404;
+import org.jclouds.openstack.keystone.v2_0.filters.AuthenticateRequest;
+import org.jclouds.openstack.nova.v2_0.binders.BindSecurityGroupRuleToJsonPayload;
+import org.jclouds.openstack.nova.v2_0.domain.Ingress;
+import org.jclouds.openstack.nova.v2_0.domain.SecurityGroup;
+import org.jclouds.openstack.nova.v2_0.domain.SecurityGroupRule;
+import org.jclouds.openstack.v2_0.ServiceType;
+import org.jclouds.openstack.v2_0.services.Extension;
+import org.jclouds.rest.annotations.Fallback;
+import org.jclouds.rest.annotations.MapBinder;
+import org.jclouds.rest.annotations.Payload;
+import org.jclouds.rest.annotations.PayloadParam;
+import org.jclouds.rest.annotations.RequestFilters;
+import org.jclouds.rest.annotations.SelectJson;
+
+import com.google.common.annotations.Beta;
+import com.google.common.collect.FluentIterable;
+import com.google.common.util.concurrent.ListenableFuture;
+
+/**
+ * Provides asynchronous access to Security Groups via the REST API.
+ * <p/>
+ *
+ * @see SecurityGroupApi
+ * @author Jeremy Daggett
+ * @see <a href= "http://docs.openstack.org/api/openstack-compute/2/content/Extensions-d1e1444.html"
+ * />
+ * @see <a href="http://nova.openstack.org/api_ext" />
+ * @see <a href="http://wiki.openstack.org/os-security-groups" />
+ */
+@Beta
+@Extension(of = ServiceType.COMPUTE, namespace = ExtensionNamespaces.SECURITY_GROUPS)
+@RequestFilters(AuthenticateRequest.class)
+public interface SecurityGroupAsyncApi {
+
+ /**
+ * @see SecurityGroupApi#list
+ */
+ @Named("securitygroup:list")
+ @GET
+ @SelectJson("security_groups")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Path("/os-security-groups")
+ @Fallback(EmptyFluentIterableOnNotFoundOr404.class)
+ ListenableFuture<? extends FluentIterable<? extends SecurityGroup>> list();
+
+ /**
+ * @see SecurityGroupApi#get
+ */
+ @Named("securitygroup:get")
+ @GET
+ @Path("/os-security-groups/{id}")
+ @SelectJson("security_group")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Fallback(NullOnNotFoundOr404.class)
+ ListenableFuture<? extends SecurityGroup> get(@PathParam("id") String id);
+
+ /**
+ * @see SecurityGroupApi#createWithDescription
+ */
+ @Named("securitygroup:create")
+ @POST
+ @Path("/os-security-groups")
+ @SelectJson("security_group")
+ @Fallback(NullOnNotFoundOr404.class)
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Produces(MediaType.APPLICATION_JSON)
+ @Payload("%7B\"security_group\":%7B\"name\":\"{name}\",\"description\":\"{description}\"%7D%7D")
+ ListenableFuture<? extends SecurityGroup> createWithDescription(@PayloadParam("name") String name,
+ @PayloadParam("description") String description);
+
+ /**
+ * @see SecurityGroupApi#delete
+ */
+ @Named("securitygroup:delete")
+ @DELETE
+ @Path("/os-security-groups/{id}")
+ @Fallback(FalseOnNotFoundOr404.class)
+ @Consumes(MediaType.APPLICATION_JSON)
+ ListenableFuture<Boolean> delete(@PathParam("id") String id);
+
+ /**
+ * @see SecurityGroupApi#createRuleAllowingCidrBlock
+ */
+ @Named("securitygroup:create")
+ @POST
+ @Path("/os-security-group-rules")
+ @SelectJson("security_group_rule")
+ @Fallback(NullOnNotFoundOr404.class)
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Produces(MediaType.APPLICATION_JSON)
+ @MapBinder(BindSecurityGroupRuleToJsonPayload.class)
+ ListenableFuture<? extends SecurityGroupRule> createRuleAllowingCidrBlock(
+ @PayloadParam("parent_group_id") String parent_group_id, Ingress ip_protocol,
+ @PayloadParam("cidr") String cidr);
+
+ /**
+ * @see SecurityGroupApi#createRuleOnSecurityGroupToCidrBlock
+ */
+ @Named("securitygroup:create")
+ @POST
+ @Path("/os-security-group-rules")
+ @SelectJson("security_group_rule")
+ @Fallback(NullOnNotFoundOr404.class)
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Produces(MediaType.APPLICATION_JSON)
+ @MapBinder(BindSecurityGroupRuleToJsonPayload.class)
+ ListenableFuture<? extends SecurityGroupRule> createRuleAllowingSecurityGroupId(
+ @PayloadParam("parent_group_id") String parent_group_id, Ingress ip_protocol,
+ @PayloadParam("group_id") String group_id);
+
+ /**
+ * @see SecurityGroupApi#deleteRule
+ */
+ @Named("securitygroup:delete")
+ @DELETE
+ @Path("/os-security-group-rules/{security_group_rule_ID}")
+ @Fallback(FalseOnNotFoundOr404.class)
+ @Consumes
+ ListenableFuture<Boolean> deleteRule(@PathParam("security_group_rule_ID") String security_group_rule_ID);
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/19c8cdaf/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/ServerAdminApi.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/ServerAdminApi.java b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/ServerAdminApi.java
new file mode 100644
index 0000000..6ad70c2
--- /dev/null
+++ b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/ServerAdminApi.java
@@ -0,0 +1,120 @@
+/*
+ * 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.nova.v2_0.extensions;
+
+import org.jclouds.openstack.nova.v2_0.domain.BackupType;
+import org.jclouds.openstack.nova.v2_0.options.CreateBackupOfServerOptions;
+import org.jclouds.openstack.v2_0.ServiceType;
+import org.jclouds.openstack.v2_0.services.Extension;
+
+import com.google.common.annotations.Beta;
+
+/**
+ * Provide additional actions for servers:
+ * 'suspend', 'resume', 'migrate', 'lock', 'unlock', 'resetNetwork', 'createBackup', 'pause', 'migrateLive',
+ * 'injectNetworkInfo', 'unpause'
+ *
+ * @author Adam Lowe
+ * @see org.jclouds.openstack.nova.v2_0.extensions.ServerAdminAsyncApi
+ */
+@Beta
+@Extension(of = ServiceType.COMPUTE, namespace = ExtensionNamespaces.ADMIN_ACTIONS)
+public interface ServerAdminApi {
+
+ /**
+ * Suspend a server.
+ *
+ * @param id id of the server
+ */
+ Boolean suspend(String id);
+
+ /**
+ * Resume a server.
+ *
+ * @param id id of the server
+ */
+ Boolean resume(String id);
+
+ /**
+ * Migrate a server.
+ *
+ * @param id id of the server
+ */
+ Boolean migrate(String id);
+
+ /**
+ * Lock a server.
+ *
+ * @param id id of the server
+ */
+ Boolean lock(String id);
+
+ /**
+ * Unlock a server.
+ *
+ * @param id id of the server
+ */
+ Boolean unlock(String id);
+
+ /**
+ * Reset network of a server.
+ *
+ * @param id id of the server
+ */
+ Boolean resetNetwork(String id);
+
+ /**
+ * Create backup of a server.
+ *
+ * @param id id of the server
+ * @param imageName the name of the image to create
+ * @param backupType the type of backup
+ * @param rotation the number of images to retain (0 to simply overwrite)
+ * @param options optional rotation and/or metadata parameters
+ * @return the id of the newly created image
+ */
+ String createBackup(String id, String imageName, BackupType backupType, int rotation, CreateBackupOfServerOptions... options);
+
+ /**
+ * Pause a server.
+ *
+ * @param id id of the server
+ */
+ Boolean pause(String id);
+
+ /**
+ * Unpause a server.
+ *
+ * @param id id of the server
+ */
+ Boolean unpause(String id);
+
+
+ /**
+ * Live migrate a server.
+ *
+ * @param id id of the server
+ */
+ Boolean liveMigrate(String id, String host, boolean blockMigration, boolean diskOverCommit);
+
+ /**
+ * Inject network info into a server.
+ *
+ * @param id id of the server
+ */
+ Boolean injectNetworkInfo(String id);
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/19c8cdaf/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/ServerAdminAsyncApi.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/ServerAdminAsyncApi.java b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/ServerAdminAsyncApi.java
new file mode 100644
index 0000000..1797a9d
--- /dev/null
+++ b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/ServerAdminAsyncApi.java
@@ -0,0 +1,175 @@
+/*
+ * 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.nova.v2_0.extensions;
+
+import javax.inject.Named;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+import org.jclouds.Fallbacks.FalseOnNotFoundOr404;
+import org.jclouds.fallbacks.MapHttp4xxCodesToExceptions;
+import org.jclouds.openstack.keystone.v2_0.filters.AuthenticateRequest;
+import org.jclouds.openstack.nova.v2_0.domain.BackupType;
+import org.jclouds.openstack.nova.v2_0.functions.ParseImageIdFromLocationHeader;
+import org.jclouds.openstack.nova.v2_0.options.CreateBackupOfServerOptions;
+import org.jclouds.openstack.v2_0.ServiceType;
+import org.jclouds.openstack.v2_0.services.Extension;
+import org.jclouds.rest.annotations.Fallback;
+import org.jclouds.rest.annotations.Payload;
+import org.jclouds.rest.annotations.PayloadParam;
+import org.jclouds.rest.annotations.RequestFilters;
+import org.jclouds.rest.annotations.ResponseParser;
+import org.jclouds.rest.annotations.WrapWith;
+
+import com.google.common.annotations.Beta;
+import com.google.common.util.concurrent.ListenableFuture;
+
+/**
+ * Provide access to Admin Server Actions via REST API
+ *
+ * @author Adam Lowe
+ * @see org.jclouds.openstack.nova.v2_0.extensions.ServerAdminApi
+ */
+@Beta
+@Extension(of = ServiceType.COMPUTE, namespace = ExtensionNamespaces.ADMIN_ACTIONS)
+@RequestFilters(AuthenticateRequest.class)
+@Path("/servers/{id}/action")
+public interface ServerAdminAsyncApi {
+
+ /**
+ * @see ServerAdminApi#suspend(String)
+ */
+ @Named("serveradmin:suspend")
+ @POST
+ @Produces(MediaType.APPLICATION_JSON)
+ @Payload("{\"suspend\":null}")
+ @Fallback(FalseOnNotFoundOr404.class)
+ ListenableFuture<Boolean> suspend(@PathParam("id") String id);
+
+ /**
+ * @see ServerAdminApi#resume(String)
+ */
+ @Named("serveradmin:resume")
+ @POST
+ @Produces(MediaType.APPLICATION_JSON)
+ @Payload("{\"resume\":null}")
+ @Fallback(FalseOnNotFoundOr404.class)
+ ListenableFuture<Boolean> resume(@PathParam("id") String id);
+
+ /**
+ * @see ServerAdminApi#migrate(String)
+ */
+ @Named("serveradmin:migrate")
+ @POST
+ @Produces(MediaType.APPLICATION_JSON)
+ @Payload("{\"migrate\":null}")
+ @Fallback(FalseOnNotFoundOr404.class)
+ ListenableFuture<Boolean> migrate(@PathParam("id") String id);
+
+ /**
+ * @see ServerAdminApi#lock(String)
+ */
+ @Named("serveradmin:lock")
+ @POST
+ @Produces(MediaType.APPLICATION_JSON)
+ @Payload("{\"lock\":null}")
+ @Fallback(FalseOnNotFoundOr404.class)
+ ListenableFuture<Boolean> lock(@PathParam("id") String id);
+
+ /**
+ * @see ServerAdminApi#unlock(String)
+ */
+ @Named("serveradmin:unlock")
+ @POST
+ @Produces(MediaType.APPLICATION_JSON)
+ @Payload("{\"unlock\":null}")
+ @Fallback(FalseOnNotFoundOr404.class)
+ ListenableFuture<Boolean> unlock(@PathParam("id") String id);
+
+ /**
+ * @see ServerAdminApi#resetNetwork(String)
+ */
+ @Named("serveradmin:resetnetwork")
+ @POST
+ @Produces(MediaType.APPLICATION_JSON)
+ @Payload("{\"resetNetwork\":null}")
+ @Fallback(FalseOnNotFoundOr404.class)
+ ListenableFuture<Boolean> resetNetwork(@PathParam("id") String id);
+
+ /**
+ * @see ServerAdminApi#createBackup
+ */
+ @Named("serveradmin:createbackup")
+ @POST
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Produces(MediaType.APPLICATION_JSON)
+ @WrapWith("createBackup")
+ @Fallback(MapHttp4xxCodesToExceptions.class)
+ @ResponseParser(ParseImageIdFromLocationHeader.class)
+ ListenableFuture<String> createBackup(@PathParam("id") String id,
+ @PayloadParam("name") String imageName,
+ @PayloadParam("backup_type") BackupType backupType,
+ @PayloadParam("rotation") int rotation,
+ CreateBackupOfServerOptions... options);
+
+ /**
+ * @see ServerAdminApi#pause(String)
+ */
+ @Named("serveradmin:pause")
+ @POST
+ @Produces(MediaType.APPLICATION_JSON)
+ @Payload("{\"pause\":null}")
+ @Fallback(FalseOnNotFoundOr404.class)
+ ListenableFuture<Boolean> pause(@PathParam("id") String id);
+
+ /**
+ * @see ServerAdminApi#unpause(String)
+ */
+ @Named("serveradmin:unpause")
+ @POST
+ @Produces(MediaType.APPLICATION_JSON)
+ @Payload("{\"unpause\":null}")
+ @Fallback(FalseOnNotFoundOr404.class)
+ ListenableFuture<Boolean> unpause(@PathParam("id") String id);
+
+ /**
+ * @see ServerAdminApi#injectNetworkInfo(String)
+ */
+ @Named("serveradmin:injectnetwork")
+ @POST
+ @Produces(MediaType.APPLICATION_JSON)
+ @Payload("{\"injectNetworkInfo\":null}")
+ @Fallback(FalseOnNotFoundOr404.class)
+ ListenableFuture<Boolean> injectNetworkInfo(@PathParam("id") String id);
+
+ /**
+ * @see ServerAdminApi#liveMigrate(String)
+ */
+ @Named("serveradmin:livemigrate")
+ @POST
+ @Produces(MediaType.APPLICATION_JSON)
+ @Fallback(FalseOnNotFoundOr404.class)
+ @WrapWith("os-migrateLive")
+ ListenableFuture<Boolean> liveMigrate(@PathParam("id") String id,
+ @PayloadParam("host") String host,
+ @PayloadParam("block_migration") boolean blockMigration,
+ @PayloadParam("disk_over_commit") boolean diskOverCommit);
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/19c8cdaf/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/ServerWithSecurityGroupsApi.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/ServerWithSecurityGroupsApi.java b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/ServerWithSecurityGroupsApi.java
new file mode 100644
index 0000000..f9c91ae
--- /dev/null
+++ b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/ServerWithSecurityGroupsApi.java
@@ -0,0 +1,49 @@
+/*
+ * 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.nova.v2_0.extensions;
+
+import org.jclouds.openstack.nova.v2_0.domain.ServerWithSecurityGroups;
+import org.jclouds.openstack.v2_0.ServiceType;
+import org.jclouds.openstack.v2_0.services.Extension;
+
+import com.google.common.annotations.Beta;
+
+/**
+ * Provides synchronous access to Server details including security group, referred to as the CREATESERVEREXT extension
+ * in the nova documentation
+ * <p/>
+ * NOTE: the equivalent to listServersInDetail() isn't available at the other end, so not extending ServerApi at this
+ * time.
+ *
+ * @author Adam Lowe
+ * @see org.jclouds.openstack.nova.v2_0.features.ServerApi
+ * @see ServerWithSecurityGroupsAsyncApi
+ * @see <a href="http://nova.openstack.org/api/nova.api.openstack.compute.contrib.createserverext.html"/>
+ */
+@Beta
+@Extension(of = ServiceType.COMPUTE, namespace = ExtensionNamespaces.CREATESERVEREXT)
+public interface ServerWithSecurityGroupsApi {
+
+ /**
+ * Retrieve details of the specified server, including security groups
+ *
+ * @param id id of the server
+ * @return server or null if not found
+ */
+ ServerWithSecurityGroups get(String id);
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/19c8cdaf/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/ServerWithSecurityGroupsAsyncApi.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/ServerWithSecurityGroupsAsyncApi.java b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/ServerWithSecurityGroupsAsyncApi.java
new file mode 100644
index 0000000..069d39b
--- /dev/null
+++ b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/ServerWithSecurityGroupsAsyncApi.java
@@ -0,0 +1,62 @@
+/*
+ * 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.nova.v2_0.extensions;
+
+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.NullOnNotFoundOr404;
+import org.jclouds.openstack.keystone.v2_0.filters.AuthenticateRequest;
+import org.jclouds.openstack.nova.v2_0.domain.ServerWithSecurityGroups;
+import org.jclouds.openstack.v2_0.ServiceType;
+import org.jclouds.openstack.v2_0.services.Extension;
+import org.jclouds.rest.annotations.Fallback;
+import org.jclouds.rest.annotations.RequestFilters;
+import org.jclouds.rest.annotations.SelectJson;
+
+import com.google.common.annotations.Beta;
+import com.google.common.util.concurrent.ListenableFuture;
+
+/**
+ * Provides synchronous access to Servers with Security Groups.
+ *
+ * @author Adam Lowe
+ * @see org.jclouds.openstack.nova.v2_0.features.ServerAsyncApi
+ * @see ServerWithSecurityGroupsApi
+ * @see <a href="http://nova.openstack.org/api/nova.api.openstack.compute.contrib.createserverext.html"/>
+ */
+@Beta
+@Extension(of = ServiceType.COMPUTE, namespace = ExtensionNamespaces.CREATESERVEREXT)
+@RequestFilters(AuthenticateRequest.class)
+public interface ServerWithSecurityGroupsAsyncApi {
+
+ /**
+ * @see ServerWithSecurityGroupsApi#get(String)
+ */
+ @Named("server:get")
+ @GET
+ @SelectJson("server")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Path("/os-create-server-ext/{id}")
+ @Fallback(NullOnNotFoundOr404.class)
+ ListenableFuture<? extends ServerWithSecurityGroups> get(@PathParam("id") String id);
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/19c8cdaf/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/SimpleTenantUsageApi.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/SimpleTenantUsageApi.java b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/SimpleTenantUsageApi.java
new file mode 100644
index 0000000..08a1852
--- /dev/null
+++ b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/SimpleTenantUsageApi.java
@@ -0,0 +1,50 @@
+/*
+ * 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.nova.v2_0.extensions;
+
+import org.jclouds.openstack.nova.v2_0.domain.SimpleTenantUsage;
+import org.jclouds.openstack.v2_0.ServiceType;
+import org.jclouds.openstack.v2_0.services.Extension;
+
+import com.google.common.annotations.Beta;
+import com.google.common.collect.FluentIterable;
+
+/**
+ * Provides asynchronous access to Simple Tenant Usage via the REST API.
+ * <p/>
+ *
+ * @author Adam Lowe
+ * @see SimpleTenantUsageAsyncApi
+ */
+@Beta
+@Extension(of = ServiceType.COMPUTE, namespace = ExtensionNamespaces.SIMPLE_TENANT_USAGE)
+public interface SimpleTenantUsageApi {
+
+ /**
+ * Retrieve tenant_usage for all tenants
+ *
+ * @return the set of TenantUsage reports
+ */
+ FluentIterable<? extends SimpleTenantUsage> list();
+
+ /**
+ * Retrieve tenant_usage for a specified tenant
+ *
+ * @return the requested tenant usage
+ */
+ SimpleTenantUsage get(String tenantId);
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/19c8cdaf/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/SimpleTenantUsageAsyncApi.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/SimpleTenantUsageAsyncApi.java b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/SimpleTenantUsageAsyncApi.java
new file mode 100644
index 0000000..550d404
--- /dev/null
+++ b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/SimpleTenantUsageAsyncApi.java
@@ -0,0 +1,77 @@
+/*
+ * 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.nova.v2_0.extensions;
+
+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.nova.v2_0.domain.SimpleTenantUsage;
+import org.jclouds.openstack.v2_0.ServiceType;
+import org.jclouds.openstack.v2_0.services.Extension;
+import org.jclouds.rest.annotations.Fallback;
+import org.jclouds.rest.annotations.RequestFilters;
+import org.jclouds.rest.annotations.SelectJson;
+
+import com.google.common.annotations.Beta;
+import com.google.common.collect.FluentIterable;
+import com.google.common.util.concurrent.ListenableFuture;
+
+/**
+ * Provides asynchronous access to Simple Tenant Usage via the REST API.
+ * <p/>
+ *
+ * @author Adam Lowe
+ * @see SimpleTenantUsageApi
+ * @see <a href= "http://docs.openstack.org/api/openstack-compute/2/content/Extensions-d1e1444.html" />
+ * @see <a href="http://nova.openstack.org/api_ext" />
+ * @see <a href="http://nova.openstack.org/api/nova.api.openstack.compute.contrib.simple_tenant_usage.html" />
+ */
+@Beta
+@Extension(of = ServiceType.COMPUTE, namespace = ExtensionNamespaces.SIMPLE_TENANT_USAGE)
+@RequestFilters(AuthenticateRequest.class)
+public interface SimpleTenantUsageAsyncApi {
+
+ /**
+ * @see SimpleTenantUsageApi#list()
+ */
+ @Named("tenantusage:list")
+ @GET
+ @Path("/os-simple-tenant-usage")
+ @SelectJson("tenant_usages")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Fallback(EmptyFluentIterableOnNotFoundOr404.class)
+ ListenableFuture<? extends FluentIterable<? extends SimpleTenantUsage>> list();
+
+ /**
+ * @see SimpleTenantUsageApi#get(String)
+ */
+ @Named("tenantusage:get")
+ @GET
+ @Path("/os-simple-tenant-usage/{id}")
+ @SelectJson("tenant_usage")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Fallback(NullOnNotFoundOr404.class)
+ ListenableFuture<? extends SimpleTenantUsage> get(@PathParam("id") String tenantId);
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/19c8cdaf/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VirtualInterfaceApi.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VirtualInterfaceApi.java b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VirtualInterfaceApi.java
new file mode 100644
index 0000000..daf089f
--- /dev/null
+++ b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VirtualInterfaceApi.java
@@ -0,0 +1,43 @@
+/*
+ * 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.nova.v2_0.extensions;
+
+import org.jclouds.openstack.nova.v2_0.domain.VirtualInterface;
+import org.jclouds.openstack.v2_0.ServiceType;
+import org.jclouds.openstack.v2_0.services.Extension;
+
+import com.google.common.annotations.Beta;
+import com.google.common.collect.FluentIterable;
+
+/**
+ * Provides synchronous access to Virtual Interface features (VIFs).
+ *
+ * @see VirtualInterfaceAsyncApi
+ * @author Adam Lowe
+ */
+@Beta
+@Extension(of = ServiceType.COMPUTE, namespace = ExtensionNamespaces.VIRTUAL_INTERFACES)
+public interface VirtualInterfaceApi {
+
+ /**
+ * Returns the list of Virtual Interfaces for a given instance.
+ *
+ * @return the list of snapshots
+ */
+ FluentIterable<? extends VirtualInterface> listOnServer(String serverId);
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/19c8cdaf/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VirtualInterfaceAsyncApi.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VirtualInterfaceAsyncApi.java b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VirtualInterfaceAsyncApi.java
new file mode 100644
index 0000000..c23228c
--- /dev/null
+++ b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VirtualInterfaceAsyncApi.java
@@ -0,0 +1,59 @@
+/*
+ * 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.nova.v2_0.extensions;
+
+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.openstack.keystone.v2_0.filters.AuthenticateRequest;
+import org.jclouds.openstack.nova.v2_0.domain.VirtualInterface;
+import org.jclouds.openstack.v2_0.ServiceType;
+import org.jclouds.openstack.v2_0.services.Extension;
+import org.jclouds.rest.annotations.Fallback;
+import org.jclouds.rest.annotations.RequestFilters;
+import org.jclouds.rest.annotations.SelectJson;
+
+import com.google.common.annotations.Beta;
+import com.google.common.collect.FluentIterable;
+import com.google.common.util.concurrent.ListenableFuture;
+
+/**
+ * Provides asynchronous access to Virtual Interface features (VIFs).
+ *
+ * @see VirtualInterfaceApi
+ * @author Adam Lowe
+ */
+@Beta
+@Extension(of = ServiceType.COMPUTE, namespace = ExtensionNamespaces.VIRTUAL_INTERFACES)
+@RequestFilters(AuthenticateRequest.class)
+public interface VirtualInterfaceAsyncApi {
+ /**
+ * @see VirtualInterfaceApi#listOnServer(String)
+ */
+ @Named("virtualinterface:list")
+ @GET
+ @SelectJson("virtual_interfaces")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Path("/servers/{server_id}/os-virtual-interfaces")
+ @Fallback(EmptyFluentIterableOnNotFoundOr404.class)
+ ListenableFuture<? extends FluentIterable<? extends VirtualInterface>> listOnServer(@PathParam("server_id") String serverId);
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/19c8cdaf/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeApi.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeApi.java b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeApi.java
new file mode 100644
index 0000000..f9ab865
--- /dev/null
+++ b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeApi.java
@@ -0,0 +1,147 @@
+/*
+ * 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.nova.v2_0.extensions;
+
+import org.jclouds.openstack.nova.v2_0.domain.Volume;
+import org.jclouds.openstack.nova.v2_0.domain.VolumeAttachment;
+import org.jclouds.openstack.nova.v2_0.domain.VolumeSnapshot;
+import org.jclouds.openstack.nova.v2_0.options.CreateVolumeOptions;
+import org.jclouds.openstack.nova.v2_0.options.CreateVolumeSnapshotOptions;
+import org.jclouds.openstack.v2_0.ServiceType;
+import org.jclouds.openstack.v2_0.services.Extension;
+
+import com.google.common.annotations.Beta;
+import com.google.common.collect.FluentIterable;
+
+/**
+ * Provides synchronous access to Volumes.
+ * <p/>
+ *
+ * @see VolumeAsyncApi
+ * @see org.jclouds.openstack.nova.v2_0.extensions.VolumeAsyncApi
+ * @author Adam Lowe
+ */
+@Beta
+@Extension(of = ServiceType.COMPUTE, namespace = ExtensionNamespaces.VOLUMES)
+public interface VolumeApi {
+ /**
+ * Returns a summary list of snapshots.
+ *
+ * @return the list of snapshots
+ */
+ FluentIterable<? extends Volume> list();
+
+ /**
+ * Returns a detailed list of volumes.
+ *
+ * @return the list of volumes.
+ */
+ FluentIterable<? extends Volume> listInDetail();
+
+ /**
+ * Return data about the given volume.
+ *
+ * @return details of a specific snapshot.
+ */
+ Volume get(String volumeId);
+
+ /**
+ * Creates a new Snapshot
+ *
+ * @return the new Snapshot
+ */
+ Volume create(int sizeGB, CreateVolumeOptions... options);
+
+ /**
+ * Delete a snapshot.
+ *
+ * @return true if successful
+ */
+ boolean delete(String volumeId);
+
+ /**
+ * List volume attachments for a given instance.
+ *
+ * @return all Floating IPs
+ * @deprecated To be removed in jclouds 1.7
+ * @see VolumeAttachmentApi#listAttachmentsOnServer(String)
+ */
+ @Deprecated FluentIterable<? extends VolumeAttachment> listAttachmentsOnServer(String serverId);
+
+ /**
+ * Get a specific attached volume.
+ *
+ * @return data about the given volume attachment.
+ * @deprecated To be removed in jclouds 1.7
+ * @see VolumeAttachmentApi#getAttachmentForVolumeOnServer(String, String)
+ */
+ @Deprecated VolumeAttachment getAttachmentForVolumeOnServer(String volumeId, String serverId);
+
+ /**
+ * Attach a volume to an instance
+ *
+ * @return data about the new volume attachment
+ * @deprecated To be removed in jclouds 1.7
+ * @see VolumeAttachmentApi#attachVolumeToServerAsDevice(String, String, String)
+ */
+ @Deprecated VolumeAttachment attachVolumeToServerAsDevice(String volumeId, String serverId, String device);
+
+ /**
+ * Detach a Volume from an instance.
+ *
+ * @return true if successful
+ * @deprecated To be removed in jclouds 1.7
+ * @see VolumeAttachmentApi#detachVolumeFromServer(String, String)
+ */
+ @Deprecated Boolean detachVolumeFromServer(String server_id, String volumeId);
+
+ /**
+ * Returns a summary list of snapshots.
+ *
+ * @return the list of snapshots
+ */
+ FluentIterable<? extends VolumeSnapshot> listSnapshots();
+
+ /**
+ * Returns a summary list of snapshots.
+ *
+ * @return the list of snapshots
+ */
+ FluentIterable<? extends VolumeSnapshot> listSnapshotsInDetail();
+
+ /**
+ * Return data about the given snapshot.
+ *
+ * @return details of a specific snapshot.
+ */
+ VolumeSnapshot getSnapshot(String snapshotId);
+
+ /**
+ * Creates a new Snapshot
+ *
+ * @return the new Snapshot
+ */
+ VolumeSnapshot createSnapshot(String volumeId, CreateVolumeSnapshotOptions... options);
+
+ /**
+ * Delete a snapshot.
+ *
+ * @return true if successful
+ */
+ boolean deleteSnapshot(String snapshotId);
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/19c8cdaf/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAsyncApi.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAsyncApi.java b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAsyncApi.java
new file mode 100644
index 0000000..0e84604
--- /dev/null
+++ b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAsyncApi.java
@@ -0,0 +1,254 @@
+/*
+ * 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.nova.v2_0.extensions;
+
+import javax.inject.Named;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+import org.jclouds.Fallbacks.EmptyFluentIterableOnNotFoundOr404;
+import org.jclouds.Fallbacks.FalseOnNotFoundOr404;
+import org.jclouds.Fallbacks.NullOnNotFoundOr404;
+import org.jclouds.openstack.keystone.v2_0.filters.AuthenticateRequest;
+import org.jclouds.openstack.nova.v2_0.domain.Volume;
+import org.jclouds.openstack.nova.v2_0.domain.VolumeAttachment;
+import org.jclouds.openstack.nova.v2_0.domain.VolumeSnapshot;
+import org.jclouds.openstack.nova.v2_0.options.CreateVolumeOptions;
+import org.jclouds.openstack.nova.v2_0.options.CreateVolumeSnapshotOptions;
+import org.jclouds.openstack.v2_0.ServiceType;
+import org.jclouds.openstack.v2_0.services.Extension;
+import org.jclouds.rest.annotations.Fallback;
+import org.jclouds.rest.annotations.MapBinder;
+import org.jclouds.rest.annotations.PayloadParam;
+import org.jclouds.rest.annotations.RequestFilters;
+import org.jclouds.rest.annotations.SelectJson;
+import org.jclouds.rest.annotations.WrapWith;
+
+import com.google.common.annotations.Beta;
+import com.google.common.collect.FluentIterable;
+import com.google.common.util.concurrent.ListenableFuture;
+
+/**
+ * Provides synchronous access to Volumes.
+ * <p/>
+ *
+ * @see org.jclouds.openstack.nova.v2_0.extensions.VolumeAsyncApi
+ * @author Adam Lowe
+ */
+@Beta
+@Extension(of = ServiceType.COMPUTE, namespace = ExtensionNamespaces.VOLUMES)
+@RequestFilters(AuthenticateRequest.class)
+public interface VolumeAsyncApi {
+ /**
+ * Returns a summary list of volumes.
+ *
+ * @return the list of volumes
+ */
+ @Named("volume:list")
+ @GET
+ @Path("/os-volumes")
+ @SelectJson("volumes")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Fallback(EmptyFluentIterableOnNotFoundOr404.class)
+ ListenableFuture<? extends FluentIterable<? extends Volume>> list();
+
+ /**
+ * Returns a detailed list of volumes.
+ *
+ * @return the list of volumes.
+ */
+ @Named("volume:list")
+ @GET
+ @Path("/os-volumes/detail")
+ @SelectJson("volumes")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Fallback(EmptyFluentIterableOnNotFoundOr404.class)
+ ListenableFuture<? extends FluentIterable<? extends Volume>> listInDetail();
+
+ /**
+ * Return data about the given volume.
+ *
+ * @return details of a specific volume.
+ */
+ @Named("volume:get")
+ @GET
+ @Path("/os-volumes/{id}")
+ @SelectJson("volume")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Fallback(NullOnNotFoundOr404.class)
+ ListenableFuture<? extends Volume> get(@PathParam("id") String volumeId);
+
+ /**
+ * Creates a new volume
+ *
+ * @return the new Snapshot
+ */
+ @Named("volume:create")
+ @POST
+ @Path("/os-volumes")
+ @SelectJson("volume")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Produces(MediaType.APPLICATION_JSON)
+ @MapBinder(CreateVolumeOptions.class)
+ ListenableFuture<? extends Volume> create(@PayloadParam("size") int sizeGB, CreateVolumeOptions... options);
+
+ /**
+ * Delete a volume.
+ *
+ * @return true if successful
+ */
+ @Named("volume:delete")
+ @DELETE
+ @Path("/os-volumes/{id}")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Fallback(FalseOnNotFoundOr404.class)
+ ListenableFuture<Boolean> delete(@PathParam("id") String volumeId);
+
+ /**
+ * List volume attachments for a given instance.
+ *
+ * @return all Floating IPs
+ * @deprecated To be removed in jclouds 1.7
+ * @see VolumeAttachmentApi#listAttachmentsOnServer(String)
+ */
+ @Named("volume:listattachments")
+ @GET
+ @Path("/servers/{server_id}/os-volume_attachments")
+ @SelectJson("volumeAttachments")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Fallback(EmptyFluentIterableOnNotFoundOr404.class)
+ @Deprecated ListenableFuture<? extends FluentIterable<? extends VolumeAttachment>> listAttachmentsOnServer(@PathParam("server_id") String serverId);
+
+ /**
+ * Get a specific attached volume.
+ *
+ * @return data about the given volume attachment.
+ * @deprecated To be removed in jclouds 1.7
+ * @see VolumeAttachmentApi#getAttachmentForVolumeOnServer(String, String)
+ */
+ @Named("volume:getattachments")
+ @GET
+ @Path("/servers/{server_id}/os-volume_attachments/{id}")
+ @SelectJson("volumeAttachment")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Fallback(NullOnNotFoundOr404.class)
+ @Deprecated ListenableFuture<? extends VolumeAttachment> getAttachmentForVolumeOnServer(@PathParam("id") String volumeId,
+ @PathParam("server_id") String serverId);
+
+ /**
+ * Attach a volume to an instance
+ *
+ * @return the new Attachment
+ * @deprecated To be removed in jclouds 1.7
+ * @see VolumeAttachmentApi#attachVolumeToServerAsDevice(String, String, String)
+ */
+ @Named("volume:attach")
+ @POST
+ @Path("/servers/{server_id}/os-volume_attachments")
+ @SelectJson("volumeAttachment")
+ @Produces(MediaType.APPLICATION_JSON)
+ @Consumes(MediaType.APPLICATION_JSON)
+ @WrapWith("volumeAttachment")
+ @Deprecated ListenableFuture<? extends VolumeAttachment> attachVolumeToServerAsDevice(@PayloadParam("volumeId") String volumeId,
+ @PathParam("server_id") String serverId, @PayloadParam("device") String device);
+
+ /**
+ * Detach a Volume from an instance.
+ *
+ * @return true if successful
+ * @deprecated To be removed in jclouds 1.7
+ * @see VolumeAttachmentApi#detachVolumeFromServer(String, String)
+ */
+ @Named("volume:detach")
+ @DELETE
+ @Path("/servers/{server_id}/os-volume_attachments/{id}")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Fallback(FalseOnNotFoundOr404.class)
+ @Deprecated ListenableFuture<Boolean> detachVolumeFromServer(@PathParam("id") String volumeId, @PathParam("server_id") String serverId);
+
+ /**
+ * Returns a summary list of snapshots.
+ *
+ * @return the list of snapshots
+ */
+ @Named("volume:listsnapshots")
+ @GET
+ @Path("/os-snapshots")
+ @SelectJson("snapshots")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Fallback(EmptyFluentIterableOnNotFoundOr404.class)
+ ListenableFuture<? extends FluentIterable<? extends VolumeSnapshot>> listSnapshots();
+
+ /**
+ * Returns a summary list of snapshots.
+ *
+ * @return the list of snapshots
+ */
+ @Named("volume:listsnapshot")
+ @GET
+ @Path("/os-snapshots/detail")
+ @SelectJson("snapshots")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Fallback(EmptyFluentIterableOnNotFoundOr404.class)
+ ListenableFuture<? extends FluentIterable<? extends VolumeSnapshot>> listSnapshotsInDetail();
+
+ /**
+ * Return data about the given snapshot.
+ *
+ * @return details of a specific snapshot.
+ */
+ @Named("volume:getsnapshot")
+ @GET
+ @Path("/os-snapshots/{id}")
+ @SelectJson("snapshot")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Fallback(NullOnNotFoundOr404.class)
+ ListenableFuture<? extends VolumeSnapshot> getSnapshot(@PathParam("id") String snapshotId);
+
+ /**
+ * Creates a new Snapshot
+ *
+ * @return the new Snapshot
+ */
+ @Named("volume:createsnapshot")
+ @POST
+ @Path("/os-snapshots")
+ @SelectJson("snapshot")
+ @Produces(MediaType.APPLICATION_JSON)
+ @Consumes(MediaType.APPLICATION_JSON)
+ @MapBinder(CreateVolumeSnapshotOptions.class)
+ ListenableFuture<? extends VolumeSnapshot> createSnapshot(@PayloadParam("volume_id") String volumeId, CreateVolumeSnapshotOptions... options);
+
+ /**
+ * Delete a snapshot.
+ *
+ * @return true if successful
+ */
+ @Named("volume:deletesnapshot")
+ @DELETE
+ @Path("/os-snapshots/{id}")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Fallback(FalseOnNotFoundOr404.class)
+ ListenableFuture<Boolean> deleteSnapshot(@PathParam("id") String snapshotId);
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/19c8cdaf/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentApi.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentApi.java b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentApi.java
new file mode 100644
index 0000000..273815e
--- /dev/null
+++ b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentApi.java
@@ -0,0 +1,87 @@
+/*
+ * 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.nova.v2_0.extensions;
+
+import org.jclouds.openstack.nova.v2_0.domain.VolumeAttachment;
+import org.jclouds.openstack.v2_0.ServiceType;
+import org.jclouds.openstack.v2_0.services.Extension;
+
+import com.google.common.annotations.Beta;
+import com.google.common.collect.FluentIterable;
+
+/**
+ * Provides synchronous access to Volume Attachments.
+ *
+ * This API strictly handles attaching Volumes to Servers. To create and manage Volumes you need to use one of the
+ * following APIs:
+ *
+ * 1. The Cinder API
+ * If your OpenStack deployment is Folsom or later and it supports the Cinder block storage service, use this API.
+ * @see org.jclouds.openstack.cinder.v1.features.VolumeApi
+ *
+ * 2. The nova-volume API
+ * If your OpenStack deployment is Essex or earlier and it supports the nova-volume extension, use this API.
+ * @see org.jclouds.openstack.nova.v2_0.extensions.VolumeApi
+ *
+ * @see VolumeAttachmentAsyncApi
+ * @author Everett Toews
+ */
+@Beta
+@Extension(of = ServiceType.COMPUTE, namespace = ExtensionNamespaces.VOLUMES)
+public interface VolumeAttachmentApi {
+ /**
+ * List Volume Attachments for a given Server.
+ *
+ * @param serverId The ID of the Server
+ * @return All VolumeAttachments for the Server
+ */
+ FluentIterable<? extends VolumeAttachment> listAttachmentsOnServer(String serverId);
+
+ /**
+ * Get a specific Volume Attachment for a Volume and Server.
+ *
+ * @param volumeId The ID of the Volume
+ * @param serverId The ID of the Server
+ * @return The Volume Attachment.
+ */
+ VolumeAttachment getAttachmentForVolumeOnServer(String volumeId, String serverId);
+
+ /**
+ * Attach a Volume to a Server.
+ *
+ * Note: If you are using KVM as your hypervisor then the actual device name in the Server will be different than
+ * the one specified. When the Server sees a new device, it picks the next available name (which in most cases is
+ * /dev/vdc) and the disk shows up there on the Server.
+ *
+ * @param serverId The ID of the Server
+ * @param volumeId The ID of the Volume
+ * @param device The name of the device this Volume will be identified as in the Server (e.g. /dev/vdc)
+ * @return The Volume Attachment.
+ */
+ VolumeAttachment attachVolumeToServerAsDevice(String volumeId, String serverId, String device);
+
+ /**
+ * Detach a Volume from a server.
+ *
+ * Note: Make sure you've unmounted the volume first. Failure to do so could result in failure or data loss.
+ *
+ * @param volumeId The ID of the Volume
+ * @param serverId The ID of the Server
+ * @return true if successful
+ */
+ boolean detachVolumeFromServer(String volumeId, String serverId);
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/19c8cdaf/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentAsyncApi.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentAsyncApi.java b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentAsyncApi.java
new file mode 100644
index 0000000..7aa5763
--- /dev/null
+++ b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentAsyncApi.java
@@ -0,0 +1,107 @@
+/*
+ * 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.nova.v2_0.extensions;
+
+import javax.inject.Named;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+import org.jclouds.Fallbacks.EmptyFluentIterableOnNotFoundOr404;
+import org.jclouds.Fallbacks.FalseOnNotFoundOr404;
+import org.jclouds.Fallbacks.NullOnNotFoundOr404;
+import org.jclouds.openstack.keystone.v2_0.filters.AuthenticateRequest;
+import org.jclouds.openstack.nova.v2_0.domain.VolumeAttachment;
+import org.jclouds.openstack.v2_0.ServiceType;
+import org.jclouds.openstack.v2_0.services.Extension;
+import org.jclouds.rest.annotations.Fallback;
+import org.jclouds.rest.annotations.PayloadParam;
+import org.jclouds.rest.annotations.RequestFilters;
+import org.jclouds.rest.annotations.SelectJson;
+import org.jclouds.rest.annotations.WrapWith;
+
+import com.google.common.annotations.Beta;
+import com.google.common.collect.FluentIterable;
+import com.google.common.util.concurrent.ListenableFuture;
+
+/**
+ * Provides asynchronous access to Volume Attachments .
+ *
+ * @see VolumeAttachmentApi
+ * @author Everett Toews
+ */
+@Beta
+@Extension(of = ServiceType.COMPUTE, namespace = ExtensionNamespaces.VOLUMES)
+@RequestFilters(AuthenticateRequest.class)
+public interface VolumeAttachmentAsyncApi {
+ /**
+ * @see VolumeAttachmentApi#listAttachmentsOnServer(String)
+ */
+ @Named("volumeattachment:list")
+ @GET
+ @Path("/servers/{server_id}/os-volume_attachments")
+ @SelectJson("volumeAttachments")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Fallback(EmptyFluentIterableOnNotFoundOr404.class)
+ ListenableFuture<? extends FluentIterable<? extends VolumeAttachment>> listAttachmentsOnServer(
+ @PathParam("server_id") String serverId);
+
+ /**
+ * @see VolumeAttachmentApi#getAttachmentForVolumeOnServer(String, String)
+ */
+ @Named("volumeattachment:get")
+ @GET
+ @Path("/servers/{server_id}/os-volume_attachments/{id}")
+ @SelectJson("volumeAttachment")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Fallback(NullOnNotFoundOr404.class)
+ ListenableFuture<? extends VolumeAttachment> getAttachmentForVolumeOnServer(
+ @PathParam("id") String volumeId,
+ @PathParam("server_id") String serverId);
+
+ /**
+ * @see VolumeAttachmentApi#attachVolumeToServerAsDevice(String, String, String)
+ */
+ @Named("volumeattachment:attach")
+ @POST
+ @Path("/servers/{server_id}/os-volume_attachments")
+ @SelectJson("volumeAttachment")
+ @Produces(MediaType.APPLICATION_JSON)
+ @Consumes(MediaType.APPLICATION_JSON)
+ @WrapWith("volumeAttachment")
+ ListenableFuture<? extends VolumeAttachment> attachVolumeToServerAsDevice(
+ @PayloadParam("volumeId") String volumeId,
+ @PathParam("server_id") String serverId,
+ @PayloadParam("device") String device);
+
+ /**
+ * @see VolumeAttachmentApi#detachVolumeFromServer(String, String)
+ */
+ @Named("volumeattachment:detach")
+ @DELETE
+ @Path("/servers/{server_id}/os-volume_attachments/{id}")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Fallback(FalseOnNotFoundOr404.class)
+ ListenableFuture<Boolean> detachVolumeFromServer(
+ @PathParam("id") String volumeId,
+ @PathParam("server_id") String serverId);
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/19c8cdaf/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeTypeApi.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeTypeApi.java b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeTypeApi.java
new file mode 100644
index 0000000..be0e5cc
--- /dev/null
+++ b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeTypeApi.java
@@ -0,0 +1,101 @@
+/*
+ * 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.nova.v2_0.extensions;
+
+import java.util.Map;
+import org.jclouds.openstack.nova.v2_0.domain.VolumeType;
+import org.jclouds.openstack.nova.v2_0.options.CreateVolumeTypeOptions;
+import org.jclouds.openstack.v2_0.ServiceType;
+import org.jclouds.openstack.v2_0.services.Extension;
+
+import com.google.common.annotations.Beta;
+import com.google.common.collect.FluentIterable;
+
+/**
+ * Provides synchronous access to Volume Type features
+ *
+ * @author Adam Lowe
+ * @see VolumeApi
+ * @see VolumeTypeAsyncApi
+ * @see <a href="http://nova.openstack.org/api/nova.api.openstack.compute.contrib.volumetypes.html"/>
+ * @see <a href="https://blueprints.launchpad.net/nova/+spec/volume-type"/>
+ */
+@Beta
+@Extension(of = ServiceType.COMPUTE, namespace = ExtensionNamespaces.VOLUME_TYPES)
+public interface VolumeTypeApi {
+
+ /**
+ * @return set of all volume types
+ */
+ FluentIterable<? extends VolumeType> list();
+
+ /**
+ * @param id the id of the volume type to retrieve
+ * @return the requested volume type
+ */
+ VolumeType get(String id);
+
+ /**
+ * Creates a new volume type
+ *
+ * @param name the name of the new volume type
+ * @param options optional settings for the new volume type
+ * @return the new volume type
+ */
+ VolumeType create(String name, CreateVolumeTypeOptions... options);
+
+ /**
+ * Deletes a volume type
+ */
+ boolean delete(String id);
+
+ /**
+ * @param id the id of the volume type
+ * @return the set of extra metadata for the flavor
+ */
+ Map<String, String> getExtraSpecs(String id);
+
+ /**
+ * Creates or updates the extra metadata for a given flavor
+ */
+ boolean updateExtraSpecs(String id, Map<String, String> specs);
+
+ /**
+ * Retrieve a single extra spec value
+ *
+ * @param id the id of the volume type
+ * @param key the key of the extra spec item to retrieve
+ */
+ String getExtraSpec(String id, String key);
+
+ /**
+ * Creates or updates a single extra spec value
+ *
+ * @param id the id of the volume type
+ * @param key the extra spec key (when creating ensure this does not include whitespace or other difficult characters)
+ * @param value the new value to store associate with the key
+ */
+ boolean updateExtraSpec(String id, String key, String value);
+
+ /**
+ * Deletes an existing extra spec
+ *
+ * @param id the id of the volume type
+ * @param key the key of the extra spec to delete
+ */
+ boolean deleteExtraSpec(String id, String key);
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/19c8cdaf/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeTypeAsyncApi.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeTypeAsyncApi.java b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeTypeAsyncApi.java
new file mode 100644
index 0000000..4312258
--- /dev/null
+++ b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeTypeAsyncApi.java
@@ -0,0 +1,161 @@
+/*
+ * 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.nova.v2_0.extensions;
+
+import java.util.Map;
+
+import javax.inject.Named;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+import org.jclouds.Fallbacks.EmptyFluentIterableOnNotFoundOr404;
+import org.jclouds.Fallbacks.EmptyMapOnNotFoundOr404;
+import org.jclouds.Fallbacks.FalseOnNotFoundOr404;
+import org.jclouds.Fallbacks.NullOnNotFoundOr404;
+import org.jclouds.openstack.keystone.v2_0.filters.AuthenticateRequest;
+import org.jclouds.openstack.nova.v2_0.domain.VolumeType;
+import org.jclouds.openstack.nova.v2_0.options.CreateVolumeTypeOptions;
+import org.jclouds.openstack.v2_0.ServiceType;
+import org.jclouds.openstack.v2_0.services.Extension;
+import org.jclouds.rest.annotations.Fallback;
+import org.jclouds.rest.annotations.MapBinder;
+import org.jclouds.rest.annotations.Payload;
+import org.jclouds.rest.annotations.PayloadParam;
+import org.jclouds.rest.annotations.RequestFilters;
+import org.jclouds.rest.annotations.SelectJson;
+import org.jclouds.rest.annotations.Unwrap;
+import org.jclouds.rest.annotations.WrapWith;
+import org.jclouds.rest.binders.BindToJsonPayload;
+
+import com.google.common.annotations.Beta;
+import com.google.common.collect.FluentIterable;
+import com.google.common.util.concurrent.ListenableFuture;
+
+/**
+ * Provides asynchronous access to Volume Type features
+ *
+ * @author Adam Lowe
+ * @see VolumeTypeApi
+ */
+@Beta
+@Extension(of = ServiceType.COMPUTE, namespace = ExtensionNamespaces.VOLUME_TYPES)
+@RequestFilters(AuthenticateRequest.class)
+@Path("/os-volume-types")
+@Consumes(MediaType.APPLICATION_JSON)
+public interface VolumeTypeAsyncApi {
+
+ /**
+ * @see VolumeTypeApi#list
+ */
+ @Named("volumetype:list")
+ @GET
+ @SelectJson("volume_types")
+ @Fallback(EmptyFluentIterableOnNotFoundOr404.class)
+ ListenableFuture<? extends FluentIterable<? extends VolumeType>> list();
+
+
+ /**
+ * @see VolumeTypeApi#get
+ */
+ @Named("volumetype:get")
+ @GET
+ @Path("/{id}")
+ @SelectJson("volume_type")
+ @Fallback(NullOnNotFoundOr404.class)
+ ListenableFuture<? extends VolumeType> get(@PathParam("id") String id);
+
+ /**
+ * @see VolumeTypeApi#create
+ */
+ @Named("volumetype:create")
+ @POST
+ @SelectJson("volume_type")
+ @Produces(MediaType.APPLICATION_JSON)
+ @WrapWith("volume_type")
+ ListenableFuture<? extends VolumeType> create(@PayloadParam("name") String name, CreateVolumeTypeOptions... options);
+
+ /**
+ * @see VolumeTypeApi#delete
+ */
+ @Named("volumetype:delete")
+ @DELETE
+ @Path("/{id}")
+ @Fallback(FalseOnNotFoundOr404.class)
+ ListenableFuture<Boolean> delete(@PathParam("id") String id);
+
+ /**
+ * @see VolumeTypeApi#getExtraSpecs(String)
+ */
+ @Named("volumetype:getextraspecs")
+ @GET
+ @SelectJson("extra_specs")
+ @Path("/{id}/extra_specs")
+ @Fallback(EmptyMapOnNotFoundOr404.class)
+ ListenableFuture<Map<String, String>> getExtraSpecs(@PathParam("id") String id);
+
+ /**
+ * @see VolumeTypeApi#updateExtraSpecs(String, java.util.Map)
+ */
+ @Named("volumetype:udpateextraspecs")
+ @POST
+ @Path("/{id}/extra_specs")
+ @Produces(MediaType.APPLICATION_JSON)
+ @Fallback(FalseOnNotFoundOr404.class)
+ @MapBinder(BindToJsonPayload.class)
+ ListenableFuture<Boolean> updateExtraSpecs(@PathParam("id") String id, @PayloadParam("extra_specs") Map<String, String> specs);
+
+ /**
+ * @see VolumeTypeApi#getExtraSpec(String, String)
+ */
+ @Named("volumetype:getextraspec")
+ @GET
+ @Path("/{id}/extra_specs/{key}")
+ @Unwrap
+ @Fallback(NullOnNotFoundOr404.class)
+ ListenableFuture<String> getExtraSpec(@PathParam("id") String id, @PathParam("key") String key);
+
+ /**
+ * @see VolumeTypeApi#updateExtraSpec(String, String, String)
+ */
+ @Named("volumetype:updateextraspec")
+ @PUT
+ @Path("/{id}/extra_specs/{key}")
+ @Produces(MediaType.APPLICATION_JSON)
+ @Payload("%7B\"{key}\":\"{value}\"%7D")
+ @Fallback(FalseOnNotFoundOr404.class)
+ ListenableFuture<Boolean> updateExtraSpec(@PathParam("id") String id,
+ @PathParam("key") @PayloadParam("key") String key,
+ @PayloadParam("value") String value);
+
+ /**
+ * @see VolumeTypeApi#deleteExtraSpec(String, String)
+ */
+ @Named("volumetype:deleteextraspec")
+ @DELETE
+ @Path("/{id}/extra_specs/{key}")
+ @Fallback(FalseOnNotFoundOr404.class)
+ ListenableFuture<Boolean> deleteExtraSpec(@PathParam("id") String id,
+ @PathParam("key") String key);
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/19c8cdaf/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/features/FlavorApi.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/features/FlavorApi.java b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/features/FlavorApi.java
new file mode 100644
index 0000000..7924120
--- /dev/null
+++ b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/features/FlavorApi.java
@@ -0,0 +1,78 @@
+/*
+ * 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.nova.v2_0.features;
+
+import org.jclouds.collect.PagedIterable;
+import org.jclouds.openstack.v2_0.domain.PaginatedCollection;
+import org.jclouds.openstack.nova.v2_0.domain.Flavor;
+import org.jclouds.openstack.v2_0.domain.Resource;
+import org.jclouds.openstack.v2_0.options.PaginationOptions;
+
+/**
+ * Provides asynchronous access to Flavors via their REST API.
+ * <p/>
+ *
+ * @see FlavorAsyncApi
+ * @see <a href=
+ * "http://docs.openstack.org/api/openstack-compute/2/content/List_Flavors-d1e4188.html"
+ * />
+ * @author Jeremy Daggett, Ilja Bobkevic
+ */
+public interface FlavorApi {
+
+ /**
+ * List all flavors (IDs, names, links)
+ *
+ * @return all flavors (IDs, names, links)
+ */
+ PagedIterable<? extends Resource> list();
+
+ PaginatedCollection<? extends Resource> list(PaginationOptions options);
+
+ /**
+ * List all flavors (all details)
+ *
+ * @return all flavors (all details)
+ */
+ PagedIterable<? extends Flavor> listInDetail();
+
+ PaginatedCollection<? extends Flavor> listInDetail(PaginationOptions options);
+
+ /**
+ * List details of the specified flavor
+ *
+ * @param id
+ * id of the flavor
+ * @return flavor or null if not found
+ */
+ Flavor get(String id);
+
+ /**
+ * Create flavor according to the provided object
+ *
+ * @param flavor - flavor object
+ * @return newly created flavor
+ */
+ Flavor create(Flavor flavor);
+
+ /**
+ * Delete flavor with a given id
+ *
+ * @param id - flavor id
+ */
+ void delete(String id);
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/19c8cdaf/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/features/FlavorAsyncApi.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/features/FlavorAsyncApi.java b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/features/FlavorAsyncApi.java
new file mode 100644
index 0000000..7c1552e
--- /dev/null
+++ b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/features/FlavorAsyncApi.java
@@ -0,0 +1,144 @@
+/*
+ * 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.nova.v2_0.features;
+
+import javax.inject.Named;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+import org.jclouds.Fallbacks.EmptyPagedIterableOnNotFoundOr404;
+import org.jclouds.Fallbacks.NullOnNotFoundOr404;
+import org.jclouds.Fallbacks.VoidOnNotFoundOr404;
+import org.jclouds.collect.PagedIterable;
+import org.jclouds.openstack.keystone.v2_0.KeystoneFallbacks.EmptyPaginatedCollectionOnNotFoundOr404;
+import org.jclouds.openstack.v2_0.domain.PaginatedCollection;
+import org.jclouds.openstack.keystone.v2_0.filters.AuthenticateRequest;
+import org.jclouds.openstack.nova.v2_0.domain.Flavor;
+import org.jclouds.openstack.nova.v2_0.functions.internal.ParseFlavorDetails;
+import org.jclouds.openstack.nova.v2_0.functions.internal.ParseFlavors;
+import org.jclouds.openstack.v2_0.domain.Resource;
+import org.jclouds.openstack.v2_0.options.PaginationOptions;
+import org.jclouds.rest.annotations.Fallback;
+import org.jclouds.rest.annotations.RequestFilters;
+import org.jclouds.rest.annotations.ResponseParser;
+import org.jclouds.rest.annotations.SelectJson;
+import org.jclouds.rest.annotations.Transform;
+import org.jclouds.rest.annotations.Unwrap;
+import org.jclouds.rest.annotations.WrapWith;
+
+import com.google.common.util.concurrent.ListenableFuture;
+
+/**
+ * Provides asynchronous access to Flavors via their REST API.
+ * <p/>
+ *
+ * @see FlavorApi
+ * @see <a href=
+ * "http://docs.openstack.org/api/openstack-compute/2/content/List_Flavors-d1e4188.html"
+ * >docs</a>
+ * @author Jeremy Daggett TODO: Need a ListFlavorOptions class minDisk=minDiskInGB&
+ * minRam=minRamInMB& marker=markerID&limit=int
+ * @author Ilja Bobkevic
+ */
+@RequestFilters(AuthenticateRequest.class)
+public interface FlavorAsyncApi {
+
+ /**
+ * @see FlavorApi#list()
+ */
+ @Named("flavor:list")
+ @GET
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Path("/flavors")
+ @RequestFilters(AuthenticateRequest.class)
+ @ResponseParser(ParseFlavors.class)
+ @Transform(ParseFlavors.ToPagedIterable.class)
+ @Fallback(EmptyPagedIterableOnNotFoundOr404.class)
+ ListenableFuture<? extends PagedIterable<? extends Resource>> list();
+
+ /** @see FlavorApi#list(PaginationOptions) */
+ @Named("flavor:list")
+ @GET
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Path("/flavors")
+ @RequestFilters(AuthenticateRequest.class)
+ @ResponseParser(ParseFlavors.class)
+ @Fallback(EmptyPaginatedCollectionOnNotFoundOr404.class)
+ ListenableFuture<? extends PaginatedCollection<? extends Resource>> list(PaginationOptions options);
+
+ /**
+ * @see FlavorApi#listInDetail()
+ */
+ @Named("flavor:list")
+ @GET
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Path("/flavors/detail")
+ @RequestFilters(AuthenticateRequest.class)
+ @ResponseParser(ParseFlavorDetails.class)
+ @Transform(ParseFlavorDetails.ToPagedIterable.class)
+ @Fallback(EmptyPagedIterableOnNotFoundOr404.class)
+ ListenableFuture<? extends PagedIterable<? extends Flavor>> listInDetail();
+
+ /** @see FlavorApi#listInDetail(PaginationOptions) */
+ @Named("flavor:list")
+ @GET
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Path("/flavors/detail")
+ @RequestFilters(AuthenticateRequest.class)
+ @ResponseParser(ParseFlavorDetails.class)
+ @Fallback(EmptyPaginatedCollectionOnNotFoundOr404.class)
+ ListenableFuture<? extends PaginatedCollection<? extends Flavor>> listInDetail(PaginationOptions options);
+
+ /**
+ * @see FlavorApi#get
+ */
+ @Named("flavor:get")
+ @GET
+ @SelectJson("flavor")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Path("/flavors/{id}")
+ @Fallback(NullOnNotFoundOr404.class)
+ ListenableFuture<? extends Flavor> get(@PathParam("id") String id);
+
+
+ /**
+ * @see FlavorApi#create
+ */
+ @Named("flavor:create")
+ @POST
+ @Unwrap
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Produces(MediaType.APPLICATION_JSON)
+ @Path("/flavors")
+ ListenableFuture<? extends Flavor> create(@WrapWith("flavor") Flavor flavor);
+
+ /**
+ * @see FlavorApi#delete
+ */
+ @Named("flavor:delete")
+ @DELETE
+ @Consumes
+ @Path("/flavors/{id}")
+ @Fallback(VoidOnNotFoundOr404.class)
+ ListenableFuture<Void> delete(@PathParam("id") String id);
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/19c8cdaf/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/features/ImageApi.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/features/ImageApi.java b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/features/ImageApi.java
new file mode 100644
index 0000000..cc7f468
--- /dev/null
+++ b/dependencies/jclouds/apis/openstack-nova/1.7.1-stratos/src/main/java/org/jclouds/openstack/nova/v2_0/features/ImageApi.java
@@ -0,0 +1,142 @@
+/*
+ * 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.nova.v2_0.features;
+
+import java.util.Map;
+import org.jclouds.collect.PagedIterable;
+import org.jclouds.javax.annotation.Nullable;
+import org.jclouds.openstack.v2_0.domain.PaginatedCollection;
+import org.jclouds.openstack.nova.v2_0.domain.Image;
+import org.jclouds.openstack.v2_0.domain.Resource;
+import org.jclouds.openstack.v2_0.options.PaginationOptions;
+
+/**
+ * Provides synchronous access to Images.
+ * <p/>
+ *
+ * @see ImageAsyncApi
+ * @see <a href=
+ * "http://docs.openstack.org/api/openstack-compute/1.1/content/Servers-d1e2073.html"
+ * />
+ * @author Adrian Cole
+ */
+public interface ImageApi {
+
+ /**
+ * List all images (IDs, names, links)
+ *
+ * @return all images (IDs, names, links)
+ */
+ PagedIterable<? extends Resource> list();
+
+ PaginatedCollection<? extends Resource> list(PaginationOptions options);
+
+ /**
+ * List all images (all details)
+ *
+ * @return all images (all details)
+ */
+ PagedIterable<? extends Image> listInDetail();
+
+ PaginatedCollection<? extends Image> listInDetail(PaginationOptions options);
+
+ /**
+ * List details of the specified image
+ *
+ * @param id
+ * id of the server
+ * @return server or null if not found
+ */
+ Image get(String id);
+
+ /**
+ * Delete the specified image
+ *
+ * @param id
+ * id of the image
+ * @return server or null if not found
+ */
+ void delete(String id);
+
+ /**
+ * List all metadata for an image.
+ *
+ * @param id
+ * id of the image
+ * @return the metadata as a Map<String, String>
+ */
+ Map<String, String> getMetadata(String id);
+
+ /**
+ * Sets the metadata for an image.
+ *
+ * @param id
+ * id of the image
+ * @param metadata
+ * a Map containing the metadata
+ * @return the metadata as a Map<String, String>
+ */
+ Map<String, String> setMetadata(String id, Map<String, String> metadata);
+
+ /**
+ * Update the metadata for a server.
+ *
+ * @param id
+ * id of the image
+ * @param metadata
+ * a Map containing the metadata
+ * @return the metadata as a Map<String, String>
+ */
+ Map<String, String> updateMetadata(String id, Map<String, String> metadata);
+
+ /**
+ * Update the metadata for an image.
+ *
+ * @param id
+ * id of the image
+ * @param metadata
+ * a Map containing the metadata
+ * @return the value or null if not present
+ */
+ @Nullable
+ String getMetadata(String id, String key);
+
+
+ /**
+ * Set a metadata item for an image.
+ *
+ * @param id
+ * id of the image
+ * @param key
+ * the name of the metadata item
+ * @param value
+ * the value of the metadata item
+ * @return the value you updated
+ */
+ String updateMetadata(String id, String key, String value);
+
+ /**
+ * Delete a metadata item from an image.
+ *
+ * @param id
+ * id of the image
+ * @param key
+ * the name of the metadata item
+ */
+ void deleteMetadata(String id, String key);
+
+}