summaryrefslogtreecommitdiffstats
path: root/nova-client/src/main/java/com/woorea
diff options
context:
space:
mode:
authorseshukm <seshu.kumar.m@huawei.com>2018-07-25 18:26:18 +0800
committerseshukm <seshu.kumar.m@huawei.com>2018-07-25 18:26:18 +0800
commit740b4d010990734eced5ca97938bc6b6d5124721 (patch)
treef51bc977d9a3753d3a45e130ee2fe77e946c801b /nova-client/src/main/java/com/woorea
parentce3d8addd91c0828fefbcd13544b148351cbb59d (diff)
Issues of nova CLIENT
Issue-ID: SO-729 Change-Id: I3e3c79cf8431605755472b4ece51430c3d772814 Signed-off-by: seshukm <seshu.kumar.m@huawei.com>
Diffstat (limited to 'nova-client/src/main/java/com/woorea')
-rw-r--r--nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/AggregatesExtension.java296
-rw-r--r--nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/CloudpipesExtension.java62
-rw-r--r--nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/CredentialsExtension.java48
-rw-r--r--nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/FloatingIpDnsExtension.java140
-rw-r--r--nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/FloatingIpPoolsExtension.java40
-rw-r--r--nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/FloatingIpsExtension.java92
-rw-r--r--nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/HostsExtension.java66
-rw-r--r--nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/KeyPairsExtension.java78
-rw-r--r--nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/NetworksExtension.java96
-rw-r--r--nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/SecurityGroupsExtension.java348
-rw-r--r--nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/SnapshotsExtension.java130
-rw-r--r--nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/VolumesExtension.java126
12 files changed, 761 insertions, 761 deletions
diff --git a/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/AggregatesExtension.java b/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/AggregatesExtension.java
index df3816e..b73ec97 100644
--- a/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/AggregatesExtension.java
+++ b/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/AggregatesExtension.java
@@ -27,153 +27,153 @@ import com.woorea.openstack.nova.model.HostAggregate;
import com.woorea.openstack.nova.model.HostAggregates;
public class AggregatesExtension {
-
- private final OpenStackClient CLIENT;
-
- public AggregatesExtension(OpenStackClient client) {
- CLIENT = client;
- }
-
- public List list() {
- return new List();
- }
-
- public ShowAggregate showAggregate(String id) {
- return new ShowAggregate(id);
- }
-
- public UpdateAggregateMetadata updateAggregateMetadata(String id,
- String name, String availabilityZone) {
- return new UpdateAggregateMetadata(id, name, availabilityZone);
- }
-
- public CreateAggregate createAggregate(String aggregateName,
- String availabilityZoneName) {
- return new CreateAggregate(aggregateName, availabilityZoneName);
- }
-
- public DeleteAggregate deleteAggregate(String id) {
- return new DeleteAggregate(id);
- }
-
- public AddHost addHost(String aggregateId, String hostId) {
- return new AddHost(aggregateId, hostId);
- }
-
- public RemoveHost removeHost(String aggregateId, String hostId) {
- return new RemoveHost(hostId, aggregateId);
- }
-
- public SetMetadata setMetadata(String aggregateId,
- String key, String value) {
- return new SetMetadata(aggregateId, key, value);
- }
-
- public class List extends OpenStackRequest<HostAggregates> {
-
- public List() {
- super(CLIENT, HttpMethod.GET, "/os-aggregates",
- null,
- HostAggregates.class);
- }
-
- }
-
- public class ShowAggregate extends OpenStackRequest<HostAggregate> {
-
- public ShowAggregate(String id) {
- super(CLIENT, HttpMethod.GET,
- new StringBuffer("/os-aggregates/").append(id),
- null,
- HostAggregate.class);
- }
-
- }
-
- public class UpdateAggregateMetadata extends OpenStackRequest<HostAggregate> {
- public UpdateAggregateMetadata(String id,
- String name, String availabilityZone) {
- super(CLIENT, HttpMethod.PUT,
- new StringBuffer("/os-aggregates/").append(id),
- availabilityZone == null ?
- Entity.json("{\"aggregate\": {\"name\": \"" + name + "\" }}")
- :
- Entity.json("{\"aggregate\": {\"name\": \"" +
- name +
- "\", \"availability_zone\": \"" +
- availabilityZone +
- "\" }}"),
- HostAggregate.class);
- }
-
- }
-
- public class CreateAggregate extends OpenStackRequest<HostAggregate> {
-
- public CreateAggregate(String name, String availabilityZone) {
- super(CLIENT, HttpMethod.POST,
- new StringBuffer("/os-aggregates"),
- availabilityZone == null ?
- Entity.json("{\"aggregate\": {\"name\": \"" +
- name +
- "\", \"availability_zone\": null }}")
- :
- Entity.json("{\"aggregate\": {\"name\": \"" +
- name +
- "\", \"availability_zone\": \"" +
- availabilityZone +
- "\" }}"),
- HostAggregate.class);
- }
-
- }
-
- public class DeleteAggregate extends OpenStackRequest<Void> {
-
- public DeleteAggregate(String id) {
- super(CLIENT, HttpMethod.DELETE,
- new StringBuffer("/os-aggregates/").append(id),
- null,
- null);
- }
- }
-
- public class AddHost extends OpenStackRequest<HostAggregate> {
-
- public AddHost(String aggregateId, String hostId) {
- super(CLIENT, HttpMethod.POST,
- new StringBuffer("/os-aggregates/")
- .append(aggregateId).append("/action"),
- Entity.json("{\"add_host\": {\"host\": \"" +
- hostId + "\" }}"),
- HostAggregate.class);
- }
-
- }
-
- public class RemoveHost extends OpenStackRequest<HostAggregate> {
-
- public RemoveHost(String hostId, String aggregateId) {
- super(CLIENT, HttpMethod.POST,
- new StringBuffer("/os-aggregates/")
- .append(aggregateId).append("/action"),
- Entity.json("{\"remove_host\": {\"host\": \"" +
- hostId + "\" }}"),
- HostAggregate.class);
- }
-
- }
-
- public class SetMetadata extends OpenStackRequest<HostAggregate> {
-
- public SetMetadata(String aggregateId, String key, String value) {
- super(CLIENT, HttpMethod.POST,
- new StringBuffer("/os-aggregates/")
- .append(aggregateId).append("/action"),
- Entity.json("{\"set_metadata\": {\"metadata\": { \"" +
- key + "\": \"" + value + "\" }}}"),
- HostAggregate.class);
- }
- }
+
+ private final OpenStackClient CLIENT;
+
+ public AggregatesExtension(OpenStackClient client) {
+ CLIENT = client;
+ }
+
+ public List list() {
+ return new List();
+ }
+
+ public ShowAggregate showAggregate(String id) {
+ return new ShowAggregate(id);
+ }
+
+ public UpdateAggregateMetadata updateAggregateMetadata(String id,
+ String name, String availabilityZone) {
+ return new UpdateAggregateMetadata(id, name, availabilityZone);
+ }
+
+ public CreateAggregate createAggregate(String aggregateName,
+ String availabilityZoneName) {
+ return new CreateAggregate(aggregateName, availabilityZoneName);
+ }
+
+ public DeleteAggregate deleteAggregate(String id) {
+ return new DeleteAggregate(id);
+ }
+
+ public AddHost addHost(String aggregateId, String hostId) {
+ return new AddHost(aggregateId, hostId);
+ }
+
+ public RemoveHost removeHost(String aggregateId, String hostId) {
+ return new RemoveHost(hostId, aggregateId);
+ }
+
+ public SetMetadata setMetadata(String aggregateId,
+ String key, String value) {
+ return new SetMetadata(aggregateId, key, value);
+ }
+
+ public class List extends OpenStackRequest<HostAggregates> {
+
+ public List() {
+ super(CLIENT, HttpMethod.GET, "/os-aggregates",
+ null,
+ HostAggregates.class);
+ }
+
+ }
+
+ public class ShowAggregate extends OpenStackRequest<HostAggregate> {
+
+ public ShowAggregate(String id) {
+ super(CLIENT, HttpMethod.GET,
+ new StringBuffer("/os-aggregates/").append(id),
+ null,
+ HostAggregate.class);
+ }
+
+ }
+
+ public class UpdateAggregateMetadata extends OpenStackRequest<HostAggregate> {
+ public UpdateAggregateMetadata(String id,
+ String name, String availabilityZone) {
+ super(CLIENT, HttpMethod.PUT,
+ new StringBuffer("/os-aggregates/").append(id),
+ availabilityZone == null ?
+ Entity.json("{\"aggregate\": {\"name\": \"" + name + "\" }}")
+ :
+ Entity.json("{\"aggregate\": {\"name\": \"" +
+ name +
+ "\", \"availability_zone\": \"" +
+ availabilityZone +
+ "\" }}"),
+ HostAggregate.class);
+ }
+
+ }
+
+ public class CreateAggregate extends OpenStackRequest<HostAggregate> {
+
+ public CreateAggregate(String name, String availabilityZone) {
+ super(CLIENT, HttpMethod.POST,
+ new StringBuffer("/os-aggregates"),
+ availabilityZone == null ?
+ Entity.json("{\"aggregate\": {\"name\": \"" +
+ name +
+ "\", \"availability_zone\": null }}")
+ :
+ Entity.json("{\"aggregate\": {\"name\": \"" +
+ name +
+ "\", \"availability_zone\": \"" +
+ availabilityZone +
+ "\" }}"),
+ HostAggregate.class);
+ }
+
+ }
+
+ public class DeleteAggregate extends OpenStackRequest<Void> {
+
+ public DeleteAggregate(String id) {
+ super(CLIENT, HttpMethod.DELETE,
+ new StringBuffer("/os-aggregates/").append(id),
+ null,
+ null);
+ }
+ }
+
+ public class AddHost extends OpenStackRequest<HostAggregate> {
+
+ public AddHost(String aggregateId, String hostId) {
+ super(CLIENT, HttpMethod.POST,
+ new StringBuffer("/os-aggregates/")
+ .append(aggregateId).append("/action"),
+ Entity.json("{\"add_host\": {\"host\": \"" +
+ hostId + "\" }}"),
+ HostAggregate.class);
+ }
+
+ }
+
+ public class RemoveHost extends OpenStackRequest<HostAggregate> {
+
+ public RemoveHost(String hostId, String aggregateId) {
+ super(CLIENT, HttpMethod.POST,
+ new StringBuffer("/os-aggregates/")
+ .append(aggregateId).append("/action"),
+ Entity.json("{\"remove_host\": {\"host\": \"" +
+ hostId + "\" }}"),
+ HostAggregate.class);
+ }
+
+ }
+
+ public class SetMetadata extends OpenStackRequest<HostAggregate> {
+
+ public SetMetadata(String aggregateId, String key, String value) {
+ super(CLIENT, HttpMethod.POST,
+ new StringBuffer("/os-aggregates/")
+ .append(aggregateId).append("/action"),
+ Entity.json("{\"set_metadata\": {\"metadata\": { \"" +
+ key + "\": \"" + value + "\" }}}"),
+ HostAggregate.class);
+ }
+ }
}
diff --git a/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/CloudpipesExtension.java b/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/CloudpipesExtension.java
index 9187507..d957382 100644
--- a/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/CloudpipesExtension.java
+++ b/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/CloudpipesExtension.java
@@ -25,41 +25,41 @@ import com.woorea.openstack.nova.model.Cloudpipe;
import com.woorea.openstack.nova.model.Cloudpipes;
public class CloudpipesExtension {
-
- private final OpenStackClient CLIENT;
-
- public CloudpipesExtension(OpenStackClient client) {
- CLIENT = client;
- }
-
- public List list() {
- return new List();
- }
-
- public Create create(Cloudpipe cloudpipe) {
- return new Create(cloudpipe);
- }
-
- public class List extends OpenStackRequest<Cloudpipes> {
+
+ private final OpenStackClient CLIENT;
+
+ public CloudpipesExtension(OpenStackClient client) {
+ CLIENT = client;
+ }
+
+ public List list() {
+ return new List();
+ }
+
+ public Create create(Cloudpipe cloudpipe) {
+ return new Create(cloudpipe);
+ }
+
+ public class List extends OpenStackRequest<Cloudpipes> {
-
- public List() {
- super(CLIENT, HttpMethod.GET, "/os-cloudpipes", null, Cloudpipes.class);
- }
+
+ public List() {
+ super(CLIENT, HttpMethod.GET, "/os-cloudpipes", null, Cloudpipes.class);
+ }
- }
+ }
- public class Create extends OpenStackRequest<Cloudpipe> {
+ public class Create extends OpenStackRequest<Cloudpipe> {
- private Cloudpipe cloudpipe;
-
- public Create(Cloudpipe cloudpipe) {
- super(CLIENT, HttpMethod.POST, "/os-cloudpipes", Entity.json(cloudpipe), Cloudpipe.class);
- this.cloudpipe = cloudpipe;
- }
+ private Cloudpipe cloudpipe;
+
+ public Create(Cloudpipe cloudpipe) {
+ super(CLIENT, HttpMethod.POST, "/os-cloudpipes", Entity.json(cloudpipe), Cloudpipe.class);
+ this.cloudpipe = cloudpipe;
+ }
- }
+ }
-
-
+
+
}
diff --git a/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/CredentialsExtension.java b/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/CredentialsExtension.java
index 207028a..6950827 100644
--- a/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/CredentialsExtension.java
+++ b/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/CredentialsExtension.java
@@ -23,37 +23,37 @@ import com.woorea.openstack.base.client.OpenStackRequest;
import com.woorea.openstack.nova.model.Certificate;
public class CredentialsExtension {
-
- private final OpenStackClient CLIENT;
-
- public CredentialsExtension(OpenStackClient client) {
- CLIENT = client;
- }
-
- public Create createCertificate(String id) {
- return new Create(id);
- }
+
+ private final OpenStackClient CLIENT;
+
+ public CredentialsExtension(OpenStackClient client) {
+ CLIENT = client;
+ }
+
+ public Create createCertificate(String id) {
+ return new Create(id);
+ }
- public Show showCertificate(String id) {
- return new Show();
- }
+ public Show showCertificate(String id) {
+ return new Show();
+ }
- public class Create extends OpenStackRequest<Certificate> {
+ public class Create extends OpenStackRequest<Certificate> {
- public Create(String id) {
- super(CLIENT, HttpMethod.GET, new StringBuffer("/os-certificates").append(id).toString(), null, Certificate.class);
- }
+ public Create(String id) {
+ super(CLIENT, HttpMethod.GET, new StringBuffer("/os-certificates").append(id).toString(), null, Certificate.class);
+ }
- }
+ }
- public class Show extends OpenStackRequest<Certificate> {
+ public class Show extends OpenStackRequest<Certificate> {
- public Show() {
- super(CLIENT, HttpMethod.GET, "/os-certificates", null, Certificate.class);
- }
+ public Show() {
+ super(CLIENT, HttpMethod.GET, "/os-certificates", null, Certificate.class);
+ }
- }
+ }
-
+
}
diff --git a/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/FloatingIpDnsExtension.java b/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/FloatingIpDnsExtension.java
index 05d9cbc..f2a6bd6 100644
--- a/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/FloatingIpDnsExtension.java
+++ b/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/FloatingIpDnsExtension.java
@@ -25,81 +25,81 @@ import com.woorea.openstack.nova.model.FloatingIpDomain;
import com.woorea.openstack.nova.model.FloatingIpDomains;
public class FloatingIpDnsExtension {
-
- private final OpenStackClient CLIENT;
-
- public FloatingIpDnsExtension(OpenStackClient client) {
- CLIENT = client;
- }
-
- public ListDomains listFloatingIpDomains() {
- return new ListDomains();
- }
-
- public CreateDomain create(FloatingIpDomain floatingIpDomain) {
- return new CreateDomain(floatingIpDomain);
- }
-
- public ShowDomain show(String id) {
- return new ShowDomain(id);
- }
-
- public UpdateDomain update(FloatingIpDomain floatingIpDomain) {
- return new UpdateDomain(floatingIpDomain);
- }
-
- public DeleteDomain delete(String id) {
- return new DeleteDomain(id);
- }
-
- public class ListDomains extends OpenStackRequest<FloatingIpDomains> {
+
+ private final OpenStackClient CLIENT;
+
+ public FloatingIpDnsExtension(OpenStackClient client) {
+ CLIENT = client;
+ }
+
+ public ListDomains listFloatingIpDomains() {
+ return new ListDomains();
+ }
+
+ public CreateDomain create(FloatingIpDomain floatingIpDomain) {
+ return new CreateDomain(floatingIpDomain);
+ }
+
+ public ShowDomain show(String id) {
+ return new ShowDomain(id);
+ }
+
+ public UpdateDomain update(FloatingIpDomain floatingIpDomain) {
+ return new UpdateDomain(floatingIpDomain);
+ }
+
+ public DeleteDomain delete(String id) {
+ return new DeleteDomain(id);
+ }
+
+ public class ListDomains extends OpenStackRequest<FloatingIpDomains> {
- public ListDomains() {
- super(CLIENT, HttpMethod.GET, "/os-floating-ip-dns", null, FloatingIpDomains.class);
- }
+ public ListDomains() {
+ super(CLIENT, HttpMethod.GET, "/os-floating-ip-dns", null, FloatingIpDomains.class);
+ }
- }
+ }
- public class CreateDomain extends OpenStackRequest<FloatingIpDomain> {
+ public class CreateDomain extends OpenStackRequest<FloatingIpDomain> {
- private FloatingIpDomain floatingIpDomain;
-
- public CreateDomain(FloatingIpDomain floatingIpDomain) {
- super(CLIENT, HttpMethod.POST, "/os-floating-ip-dns", Entity.json(floatingIpDomain), FloatingIpDomain.class);
- this.floatingIpDomain = floatingIpDomain;
- }
-
- }
-
- public class ShowDomain extends OpenStackRequest<FloatingIpDomain> {
-
- public ShowDomain(String id) {
- super(CLIENT, HttpMethod.GET, new StringBuffer("/os-floating-ip-dns/").append(id).toString(), null, FloatingIpDomain.class);
- }
-
- }
+ private FloatingIpDomain floatingIpDomain;
+
+ public CreateDomain(FloatingIpDomain floatingIpDomain) {
+ super(CLIENT, HttpMethod.POST, "/os-floating-ip-dns", Entity.json(floatingIpDomain), FloatingIpDomain.class);
+ this.floatingIpDomain = floatingIpDomain;
+ }
+
+ }
+
+ public class ShowDomain extends OpenStackRequest<FloatingIpDomain> {
+
+ public ShowDomain(String id) {
+ super(CLIENT, HttpMethod.GET, new StringBuffer("/os-floating-ip-dns/").append(id).toString(), null, FloatingIpDomain.class);
+ }
+
+ }
-
- public static class UpdateDomain extends OpenStackRequest<FloatingIpDomain> {
+
+ public static class UpdateDomain extends OpenStackRequest<FloatingIpDomain> {
- private FloatingIpDomain floatingIpDomain;
-
- public UpdateDomain(FloatingIpDomain floatingIpDomain) {
- //super(CLIENT, HttpMethod.PUT, new StringBuffer("/os-floating-ip-dns/").append(id).toString(), Entity.json(floatingIpDomain), FloatingIpDomain.class);
- this.floatingIpDomain = floatingIpDomain;
- }
-
- }
+ private FloatingIpDomain floatingIpDomain;
+
+ public UpdateDomain(FloatingIpDomain floatingIpDomain) {
+ //super(CLIENT, HttpMethod.PUT, new StringBuffer("/os-floating-ip-dns/").append(id).toString(), Entity.json(floatingIpDomain), FloatingIpDomain.class);
+ this.floatingIpDomain = floatingIpDomain;
+ }
+
+ }
-
- public class DeleteDomain extends OpenStackRequest<Void> {
-
- public DeleteDomain(String id) {
- super(CLIENT, HttpMethod.DELETE, new StringBuffer("/os-floating-ip-dns/").append(id).toString(), null, Void.class);
- }
-
- }
-
-
-
+
+ public class DeleteDomain extends OpenStackRequest<Void> {
+
+ public DeleteDomain(String id) {
+ super(CLIENT, HttpMethod.DELETE, new StringBuffer("/os-floating-ip-dns/").append(id).toString(), null, Void.class);
+ }
+
+ }
+
+
+
}
diff --git a/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/FloatingIpPoolsExtension.java b/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/FloatingIpPoolsExtension.java
index 44a14a4..d574ef6 100644
--- a/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/FloatingIpPoolsExtension.java
+++ b/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/FloatingIpPoolsExtension.java
@@ -23,25 +23,25 @@ import com.woorea.openstack.base.client.OpenStackRequest;
import com.woorea.openstack.nova.model.FloatingIpPools;
public class FloatingIpPoolsExtension {
-
- private final OpenStackClient CLIENT;
-
- public FloatingIpPoolsExtension(OpenStackClient client) {
- CLIENT = client;
- }
-
- public List list() {
- return new List();
- }
-
- public class List extends OpenStackRequest<FloatingIpPools> {
-
- public List() {
- super(CLIENT, HttpMethod.GET, "/os-floating-ip-pools", null, FloatingIpPools.class);
- }
-
- }
-
-
+
+ private final OpenStackClient CLIENT;
+
+ public FloatingIpPoolsExtension(OpenStackClient client) {
+ CLIENT = client;
+ }
+
+ public List list() {
+ return new List();
+ }
+
+ public class List extends OpenStackRequest<FloatingIpPools> {
+
+ public List() {
+ super(CLIENT, HttpMethod.GET, "/os-floating-ip-pools", null, FloatingIpPools.class);
+ }
+
+ }
+
+
}
diff --git a/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/FloatingIpsExtension.java b/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/FloatingIpsExtension.java
index be8aaac..4b39b2e 100644
--- a/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/FloatingIpsExtension.java
+++ b/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/FloatingIpsExtension.java
@@ -28,56 +28,56 @@ import com.woorea.openstack.nova.model.FloatingIp;
import com.woorea.openstack.nova.model.FloatingIps;
public class FloatingIpsExtension {
-
- private final OpenStackClient CLIENT;
-
- public FloatingIpsExtension(OpenStackClient client) {
- CLIENT = client;
- }
-
- public class List extends OpenStackRequest<FloatingIps> {
+
+ private final OpenStackClient CLIENT;
+
+ public FloatingIpsExtension(OpenStackClient client) {
+ CLIENT = client;
+ }
+
+ public class List extends OpenStackRequest<FloatingIps> {
- public List() {
- super(CLIENT, HttpMethod.GET, "/os-floating-ips", null, FloatingIps.class);
- }
+ public List() {
+ super(CLIENT, HttpMethod.GET, "/os-floating-ips", null, FloatingIps.class);
+ }
- }
+ }
- public class Allocate extends OpenStackRequest<FloatingIp> {
-
- public Allocate(Entity<?> entity) {
- super(CLIENT, HttpMethod.POST, "/os-floating-ips", entity, FloatingIp.class);
- }
+ public class Allocate extends OpenStackRequest<FloatingIp> {
+
+ public Allocate(Entity<?> entity) {
+ super(CLIENT, HttpMethod.POST, "/os-floating-ips", entity, FloatingIp.class);
+ }
- }
-
- public class Deallocate extends OpenStackRequest<Void> {
-
- public Deallocate(String id) {
- super(CLIENT, HttpMethod.DELETE, new StringBuffer("/os-floating-ips/").append(id).toString(), null, Void.class);
- }
-
- }
+ }
+
+ public class Deallocate extends OpenStackRequest<Void> {
+
+ public Deallocate(String id) {
+ super(CLIENT, HttpMethod.DELETE, new StringBuffer("/os-floating-ips/").append(id).toString(), null, Void.class);
+ }
+
+ }
- public List list() {
- return new List();
- }
-
- public Allocate allocate(String pool) {
- Entity<?> entity=null;
- if(pool!=null) {
- Map<String, String> body = new HashMap<String, String>();
- body.put("pool", pool);
- entity=Entity.json(body);
- }
- return new Allocate(entity);
- }
-
- public Deallocate deallocate(String id) {
- return new Deallocate(id);
- }
-
-
-
+ public List list() {
+ return new List();
+ }
+
+ public Allocate allocate(String pool) {
+ Entity<?> entity=null;
+ if(pool!=null) {
+ Map<String, String> body = new HashMap<String, String>();
+ body.put("pool", pool);
+ entity=Entity.json(body);
+ }
+ return new Allocate(entity);
+ }
+
+ public Deallocate deallocate(String id) {
+ return new Deallocate(id);
+ }
+
+
+
}
diff --git a/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/HostsExtension.java b/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/HostsExtension.java
index 8c8908c..f5a0693 100644
--- a/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/HostsExtension.java
+++ b/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/HostsExtension.java
@@ -24,37 +24,37 @@ import com.woorea.openstack.nova.model.Host;
import com.woorea.openstack.nova.model.Hosts;
public class HostsExtension {
-
- private final OpenStackClient CLIENT;
-
- public HostsExtension(OpenStackClient client) {
- CLIENT = client;
- }
-
- public List list() {
- return new List();
- }
-
- public Show show(String id) {
- return new Show(id);
- }
-
- public class List extends OpenStackRequest<Hosts> {
-
- public List() {
- super(CLIENT, HttpMethod.GET, "/os-hosts", null, Hosts.class);
- }
-
- }
-
- public class Show extends OpenStackRequest<Host> {
-
- public Show(String id) {
- super(CLIENT, HttpMethod.GET, new StringBuffer("/os-hosts/").append(id).toString(), null, Host.class);
- }
-
- }
-
-
-
+
+ private final OpenStackClient CLIENT;
+
+ public HostsExtension(OpenStackClient client) {
+ CLIENT = client;
+ }
+
+ public List list() {
+ return new List();
+ }
+
+ public Show show(String id) {
+ return new Show(id);
+ }
+
+ public class List extends OpenStackRequest<Hosts> {
+
+ public List() {
+ super(CLIENT, HttpMethod.GET, "/os-hosts", null, Hosts.class);
+ }
+
+ }
+
+ public class Show extends OpenStackRequest<Host> {
+
+ public Show(String id) {
+ super(CLIENT, HttpMethod.GET, new StringBuffer("/os-hosts/").append(id).toString(), null, Host.class);
+ }
+
+ }
+
+
+
}
diff --git a/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/KeyPairsExtension.java b/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/KeyPairsExtension.java
index bfd7a52..a8a39b6 100644
--- a/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/KeyPairsExtension.java
+++ b/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/KeyPairsExtension.java
@@ -25,57 +25,57 @@ import com.woorea.openstack.nova.model.KeyPair;
import com.woorea.openstack.nova.model.KeyPairs;
public class KeyPairsExtension {
-
- private final OpenStackClient CLIENT;
-
- public KeyPairsExtension(OpenStackClient client) {
- CLIENT = client;
- }
-
- public List list() {
- return new List();
- }
+
+ private final OpenStackClient CLIENT;
+
+ public KeyPairsExtension(OpenStackClient client) {
+ CLIENT = client;
+ }
+
+ public List list() {
+ return new List();
+ }
- public Create create(String name, String publicKey) {
- KeyPair keyPairForCreate = new KeyPair(name, publicKey);
- return new Create(keyPairForCreate);
- }
+ public Create create(String name, String publicKey) {
+ KeyPair keyPairForCreate = new KeyPair(name, publicKey);
+ return new Create(keyPairForCreate);
+ }
- public Create create(String name) {
- return create(name, null);
- }
+ public Create create(String name) {
+ return create(name, null);
+ }
- public Delete delete(String name) {
- return new Delete(name);
- }
+ public Delete delete(String name) {
+ return new Delete(name);
+ }
- public class Create extends OpenStackRequest<KeyPair> {
+ public class Create extends OpenStackRequest<KeyPair> {
- private KeyPair keyPairForCreate;
+ private KeyPair keyPairForCreate;
- public Create(KeyPair keyPairForCreate) {
- super(CLIENT, HttpMethod.POST, "/os-keypairs", Entity.json(keyPairForCreate), KeyPair.class);
- this.keyPairForCreate = keyPairForCreate;
- }
+ public Create(KeyPair keyPairForCreate) {
+ super(CLIENT, HttpMethod.POST, "/os-keypairs", Entity.json(keyPairForCreate), KeyPair.class);
+ this.keyPairForCreate = keyPairForCreate;
+ }
- }
+ }
- public class Delete extends OpenStackRequest<Void> {
+ public class Delete extends OpenStackRequest<Void> {
- private String name;
+ private String name;
- public Delete(String name) {
- super(CLIENT, HttpMethod.DELETE, new StringBuilder("/os-keypairs/").append(name).toString(), null, Void.class);
- }
+ public Delete(String name) {
+ super(CLIENT, HttpMethod.DELETE, new StringBuilder("/os-keypairs/").append(name).toString(), null, Void.class);
+ }
- }
+ }
- public class List extends OpenStackRequest<KeyPairs> {
+ public class List extends OpenStackRequest<KeyPairs> {
- public List() {
- super(CLIENT, HttpMethod.GET, "/os-keypairs", null, KeyPairs.class);
- }
+ public List() {
+ super(CLIENT, HttpMethod.GET, "/os-keypairs", null, KeyPairs.class);
+ }
- }
-
+ }
+
}
diff --git a/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/NetworksExtension.java b/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/NetworksExtension.java
index 1fc7c1d..7570254 100644
--- a/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/NetworksExtension.java
+++ b/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/NetworksExtension.java
@@ -25,74 +25,74 @@ import com.woorea.openstack.nova.model.Network;
import com.woorea.openstack.nova.model.Networks;
public class NetworksExtension {
-
- private final OpenStackClient CLIENT;
-
- public NetworksExtension(OpenStackClient client) {
- CLIENT = client;
- }
-
- public List list() {
- return new List();
- }
+
+ private final OpenStackClient CLIENT;
+
+ public NetworksExtension(OpenStackClient client) {
+ CLIENT = client;
+ }
+
+ public List list() {
+ return new List();
+ }
- public Show show(String id) {
- return new Show(id);
- }
+ public Show show(String id) {
+ return new Show(id);
+ }
- public Delete delete(String id) {
- return new Delete(id);
- }
+ public Delete delete(String id) {
+ return new Delete(id);
+ }
- public Disassociate disassociate(String id) {
- return new Disassociate(id);
- }
+ public Disassociate disassociate(String id) {
+ return new Disassociate(id);
+ }
- public class List extends OpenStackRequest<Networks> {
+ public class List extends OpenStackRequest<Networks> {
- public List() {
- super(CLIENT, HttpMethod.GET, "/os-networks", null, Networks.class);
- }
+ public List() {
+ super(CLIENT, HttpMethod.GET, "/os-networks", null, Networks.class);
+ }
- }
+ }
- public class Create extends OpenStackRequest<Network> {
+ public class Create extends OpenStackRequest<Network> {
- private Network network;
+ private Network network;
- public Create(Network network) {
- super(CLIENT, HttpMethod.POST, "/os-networks", Entity.json(network), Network.class);
- this.network = network;
- }
+ public Create(Network network) {
+ super(CLIENT, HttpMethod.POST, "/os-networks", Entity.json(network), Network.class);
+ this.network = network;
+ }
- }
+ }
- public class Show extends OpenStackRequest<Network> {
+ public class Show extends OpenStackRequest<Network> {
- public Show(String id) {
- super(CLIENT, HttpMethod.GET, new StringBuilder("/os-networks/").append(id).toString(), null, Network.class);
- }
+ public Show(String id) {
+ super(CLIENT, HttpMethod.GET, new StringBuilder("/os-networks/").append(id).toString(), null, Network.class);
+ }
- }
+ }
- public class Disassociate extends OpenStackRequest<Void> {
+ public class Disassociate extends OpenStackRequest<Void> {
- public Disassociate(String id) {
- super(CLIENT, HttpMethod.POST, new StringBuilder("/os-networks/").append(id).toString(), Entity.json("{\"action\":\"disassociate\"}"), Void.class);
- ;
- }
+ public Disassociate(String id) {
+ super(CLIENT, HttpMethod.POST, new StringBuilder("/os-networks/").append(id).toString(), Entity.json("{\"action\":\"disassociate\"}"), Void.class);
+ ;
+ }
- }
+ }
- public class Delete extends OpenStackRequest<Void> {
+ public class Delete extends OpenStackRequest<Void> {
- public Delete(String id) {
- super(CLIENT, HttpMethod.DELETE, new StringBuilder("/os-networks/").append(id).toString(), null, Void.class);
- }
+ public Delete(String id) {
+ super(CLIENT, HttpMethod.DELETE, new StringBuilder("/os-networks/").append(id).toString(), null, Void.class);
+ }
- }
+ }
-
+
}
diff --git a/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/SecurityGroupsExtension.java b/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/SecurityGroupsExtension.java
index ebfea43..bcfc96c 100644
--- a/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/SecurityGroupsExtension.java
+++ b/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/SecurityGroupsExtension.java
@@ -27,179 +27,179 @@ import com.woorea.openstack.nova.model.SecurityGroupRuleForCreate;
import com.woorea.openstack.nova.model.SecurityGroups;
public class SecurityGroupsExtension {
-
- private final OpenStackClient CLIENT;
-
- public SecurityGroupsExtension(OpenStackClient client) {
- CLIENT = client;
- }
-
- public class List extends OpenStackRequest<SecurityGroups> {
-
- public List() {
- super(CLIENT, HttpMethod.GET, "/os-security-groups", null, SecurityGroups.class);
- }
-
- }
-
- public class Create extends OpenStackRequest<SecurityGroup> {
-
- private SecurityGroupForCreate securityGroupForCreate;
-
- public Create(SecurityGroupForCreate securityGroupForCreate) {
- super(CLIENT, HttpMethod.POST, "/os-security-groups", Entity.json(securityGroupForCreate), SecurityGroup.class);
- this.securityGroupForCreate = securityGroupForCreate;
- }
-
- }
-
- public class Show extends OpenStackRequest<SecurityGroup> {
-
- /**
- * @deprecated
- * @param id
- */
- @Deprecated
- public Show(Integer id) {
- super(CLIENT, HttpMethod.GET, new StringBuilder("/os-security-groups/").append(id).toString(), null, SecurityGroup.class);
- }
- public Show(String id) {
- super(CLIENT, HttpMethod.GET, new StringBuilder("/os-security-groups/").append(id).toString(), null, SecurityGroup.class);
- }
-
- }
-
- public class Delete extends OpenStackRequest<Void> {
-
- /**
- *
- * @param id
- * @deprecated
- */
- @Deprecated
- public Delete(Integer id) {
- super(CLIENT, HttpMethod.DELETE, new StringBuilder("/os-security-groups/").append(String.valueOf(id)).toString(), null, Void.class);
- }
- public Delete(String id) {
- super(CLIENT, HttpMethod.DELETE, new StringBuilder("/os-security-groups/").append(id).toString(), null, Void.class);
- }
-
- }
-
- public class CreateRule extends OpenStackRequest<SecurityGroup.Rule> {
-
- private SecurityGroupRuleForCreate securityGroupRuleForCreate;
-
- public CreateRule(SecurityGroupRuleForCreate securityGroupRuleForCreate) {
- super(CLIENT, HttpMethod.POST, "/os-security-group-rules", Entity.json(securityGroupRuleForCreate), SecurityGroup.Rule.class);
- this.securityGroupRuleForCreate = securityGroupRuleForCreate;
- }
- }
-
- public class DeleteRule extends OpenStackRequest<Void> {
-
- /**
- *
- * @param id
- * @deprecated
- */
- @Deprecated
- public DeleteRule(Integer id) {
- super(CLIENT, HttpMethod.DELETE, new StringBuilder("/os-security-group-rules/").append(String.valueOf(id)).toString(), null, Void.class);
- }
-
- public DeleteRule(String id) {
- super(CLIENT, HttpMethod.DELETE, new StringBuilder("/os-security-group-rules/").append(String.valueOf(id)).toString(), null, Void.class);
- }
- }
-
- public List listSecurityGroups() {
- return new List();
- }
-
- public Create createSecurityGroup(String name,
- String description) {
- return new Create(new SecurityGroupForCreate(name, description));
- }
-
- public Create createSecurityGroup(String name) {
- return createSecurityGroup(name, null);
- }
-
- public Show showSecurityGroup(Integer id) {
- return new Show(String.valueOf(id));
- }
-
- public Show showSecurityGroup(String id) {
- return new Show(id);
- }
- public Delete deleteSecurityGroup(Integer id) {
- return new Delete(String.valueOf(id));
- }
-
- public Delete deleteSecurityGroup(String id) {
- return new Delete(id);
- }
-
- /**
- *
- * @param parentSecurityGroupId
- * @param ipProtocol
- * @param fromPort
- * @param toPort
- * @param cidr
- * @return
- * @deprecated Use {@link #createSecurityGroupRule(String, String, Integer, Integer, String)}
- */
- @Deprecated
- public CreateRule createSecurityGroupRule(
- Integer parentSecurityGroupId, String ipProtocol, Integer fromPort,
- Integer toPort, String cidr) {
- SecurityGroupRuleForCreate securityGroupRuleForCreate = new SecurityGroupRuleForCreate(
- parentSecurityGroupId, ipProtocol, fromPort, toPort, cidr);
- return new CreateRule(securityGroupRuleForCreate);
- }
- /**
- *
- * @param parentSecurityGroupId
- * @param ipProtocol
- * @param fromPort
- * @param toPort
- * @param cidr
- * @return
- * @deprecated Use {@link #createSecurityGroupRule(String, String, String, Integer, Integer)}
- */
- @Deprecated
- public CreateRule createSecurityGroupRule(
- Integer parentSecurityGroupId, String ipProtocol, Integer fromPort,
- Integer toPort, Integer sourceGroupId) {
- SecurityGroupRuleForCreate securityGroupRuleForCreate = new SecurityGroupRuleForCreate(
- parentSecurityGroupId, ipProtocol, fromPort, toPort,
- sourceGroupId);
- return new CreateRule(securityGroupRuleForCreate);
- }
-
- public CreateRule createSecurityGroupRule(
- String parentSecurityGroupId, String ipProtocol, Integer fromPort,
- Integer toPort, String cidr) {
- SecurityGroupRuleForCreate securityGroupRuleForCreate = new SecurityGroupRuleForCreate(
- parentSecurityGroupId, ipProtocol, fromPort, toPort, cidr);
- return new CreateRule(securityGroupRuleForCreate);
- }
-
- public CreateRule createSecurityGroupRule(
- String parentSecurityGroupId,String sourceGroupId,String ipProtocol, Integer fromPort,
- Integer toPort) {
- SecurityGroupRuleForCreate securityGroupRuleForCreate = new SecurityGroupRuleForCreate(
- parentSecurityGroupId, sourceGroupId,ipProtocol, fromPort, toPort
- );
- return new CreateRule(securityGroupRuleForCreate);
- }
- public DeleteRule deleteSecurityGroupRule(String id) {
- return new DeleteRule(id);
- }
- public DeleteRule deleteSecurityGroupRule(Integer id) {
- return new DeleteRule(String.valueOf(id));
- }
+
+ private final OpenStackClient CLIENT;
+
+ public SecurityGroupsExtension(OpenStackClient client) {
+ CLIENT = client;
+ }
+
+ public class List extends OpenStackRequest<SecurityGroups> {
+
+ public List() {
+ super(CLIENT, HttpMethod.GET, "/os-security-groups", null, SecurityGroups.class);
+ }
+
+ }
+
+ public class Create extends OpenStackRequest<SecurityGroup> {
+
+ private SecurityGroupForCreate securityGroupForCreate;
+
+ public Create(SecurityGroupForCreate securityGroupForCreate) {
+ super(CLIENT, HttpMethod.POST, "/os-security-groups", Entity.json(securityGroupForCreate), SecurityGroup.class);
+ this.securityGroupForCreate = securityGroupForCreate;
+ }
+
+ }
+
+ public class Show extends OpenStackRequest<SecurityGroup> {
+
+ /**
+ * @deprecated
+ * @param id
+ */
+ @Deprecated
+ public Show(Integer id) {
+ super(CLIENT, HttpMethod.GET, new StringBuilder("/os-security-groups/").append(id).toString(), null, SecurityGroup.class);
+ }
+ public Show(String id) {
+ super(CLIENT, HttpMethod.GET, new StringBuilder("/os-security-groups/").append(id).toString(), null, SecurityGroup.class);
+ }
+
+ }
+
+ public class Delete extends OpenStackRequest<Void> {
+
+ /**
+ *
+ * @param id
+ * @deprecated
+ */
+ @Deprecated
+ public Delete(Integer id) {
+ super(CLIENT, HttpMethod.DELETE, new StringBuilder("/os-security-groups/").append(String.valueOf(id)).toString(), null, Void.class);
+ }
+ public Delete(String id) {
+ super(CLIENT, HttpMethod.DELETE, new StringBuilder("/os-security-groups/").append(id).toString(), null, Void.class);
+ }
+
+ }
+
+ public class CreateRule extends OpenStackRequest<SecurityGroup.Rule> {
+
+ private SecurityGroupRuleForCreate securityGroupRuleForCreate;
+
+ public CreateRule(SecurityGroupRuleForCreate securityGroupRuleForCreate) {
+ super(CLIENT, HttpMethod.POST, "/os-security-group-rules", Entity.json(securityGroupRuleForCreate), SecurityGroup.Rule.class);
+ this.securityGroupRuleForCreate = securityGroupRuleForCreate;
+ }
+ }
+
+ public class DeleteRule extends OpenStackRequest<Void> {
+
+ /**
+ *
+ * @param id
+ * @deprecated
+ */
+ @Deprecated
+ public DeleteRule(Integer id) {
+ super(CLIENT, HttpMethod.DELETE, new StringBuilder("/os-security-group-rules/").append(String.valueOf(id)).toString(), null, Void.class);
+ }
+
+ public DeleteRule(String id) {
+ super(CLIENT, HttpMethod.DELETE, new StringBuilder("/os-security-group-rules/").append(String.valueOf(id)).toString(), null, Void.class);
+ }
+ }
+
+ public List listSecurityGroups() {
+ return new List();
+ }
+
+ public Create createSecurityGroup(String name,
+ String description) {
+ return new Create(new SecurityGroupForCreate(name, description));
+ }
+
+ public Create createSecurityGroup(String name) {
+ return createSecurityGroup(name, null);
+ }
+
+ public Show showSecurityGroup(Integer id) {
+ return new Show(String.valueOf(id));
+ }
+
+ public Show showSecurityGroup(String id) {
+ return new Show(id);
+ }
+ public Delete deleteSecurityGroup(Integer id) {
+ return new Delete(String.valueOf(id));
+ }
+
+ public Delete deleteSecurityGroup(String id) {
+ return new Delete(id);
+ }
+
+ /**
+ *
+ * @param parentSecurityGroupId
+ * @param ipProtocol
+ * @param fromPort
+ * @param toPort
+ * @param cidr
+ * @return
+ * @deprecated Use {@link #createSecurityGroupRule(String, String, Integer, Integer, String)}
+ */
+ @Deprecated
+ public CreateRule createSecurityGroupRule(
+ Integer parentSecurityGroupId, String ipProtocol, Integer fromPort,
+ Integer toPort, String cidr) {
+ SecurityGroupRuleForCreate securityGroupRuleForCreate = new SecurityGroupRuleForCreate(
+ parentSecurityGroupId, ipProtocol, fromPort, toPort, cidr);
+ return new CreateRule(securityGroupRuleForCreate);
+ }
+ /**
+ *
+ * @param parentSecurityGroupId
+ * @param ipProtocol
+ * @param fromPort
+ * @param toPort
+ * @param cidr
+ * @return
+ * @deprecated Use {@link #createSecurityGroupRule(String, String, String, Integer, Integer)}
+ */
+ @Deprecated
+ public CreateRule createSecurityGroupRule(
+ Integer parentSecurityGroupId, String ipProtocol, Integer fromPort,
+ Integer toPort, Integer sourceGroupId) {
+ SecurityGroupRuleForCreate securityGroupRuleForCreate = new SecurityGroupRuleForCreate(
+ parentSecurityGroupId, ipProtocol, fromPort, toPort,
+ sourceGroupId);
+ return new CreateRule(securityGroupRuleForCreate);
+ }
+
+ public CreateRule createSecurityGroupRule(
+ String parentSecurityGroupId, String ipProtocol, Integer fromPort,
+ Integer toPort, String cidr) {
+ SecurityGroupRuleForCreate securityGroupRuleForCreate = new SecurityGroupRuleForCreate(
+ parentSecurityGroupId, ipProtocol, fromPort, toPort, cidr);
+ return new CreateRule(securityGroupRuleForCreate);
+ }
+
+ public CreateRule createSecurityGroupRule(
+ String parentSecurityGroupId,String sourceGroupId,String ipProtocol, Integer fromPort,
+ Integer toPort) {
+ SecurityGroupRuleForCreate securityGroupRuleForCreate = new SecurityGroupRuleForCreate(
+ parentSecurityGroupId, sourceGroupId,ipProtocol, fromPort, toPort
+ );
+ return new CreateRule(securityGroupRuleForCreate);
+ }
+ public DeleteRule deleteSecurityGroupRule(String id) {
+ return new DeleteRule(id);
+ }
+ public DeleteRule deleteSecurityGroupRule(Integer id) {
+ return new DeleteRule(String.valueOf(id));
+ }
}
diff --git a/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/SnapshotsExtension.java b/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/SnapshotsExtension.java
index 765e4aa..1afba7e 100644
--- a/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/SnapshotsExtension.java
+++ b/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/SnapshotsExtension.java
@@ -27,76 +27,76 @@ import com.woorea.openstack.nova.model.SnapshotForCreate;
import com.woorea.openstack.nova.model.Snapshots;
public class SnapshotsExtension {
-
- private final OpenStackClient CLIENT;
-
- public SnapshotsExtension(OpenStackClient client) {
- CLIENT = client;
- }
-
- public List list(boolean detail) {
- return new List(detail);
- }
-
- public Create create(SnapshotForCreate snapshotForCreate) {
- return new Create(snapshotForCreate);
- }
-
- public Show show(String id) {
- return new Show(id);
- }
-
- public ShowMetadata showMetadata(String id) {
- return new ShowMetadata(id);
- }
+
+ private final OpenStackClient CLIENT;
+
+ public SnapshotsExtension(OpenStackClient client) {
+ CLIENT = client;
+ }
+
+ public List list(boolean detail) {
+ return new List(detail);
+ }
+
+ public Create create(SnapshotForCreate snapshotForCreate) {
+ return new Create(snapshotForCreate);
+ }
+
+ public Show show(String id) {
+ return new Show(id);
+ }
+
+ public ShowMetadata showMetadata(String id) {
+ return new ShowMetadata(id);
+ }
-
- public Delete delete(String id) {
- return new Delete(id);
- }
+
+ public Delete delete(String id) {
+ return new Delete(id);
+ }
- public class List extends OpenStackRequest<Snapshots> {
-
- public List(boolean detail) {
- super(CLIENT, HttpMethod.GET, detail ? "/os-snapshots/detail" : "/os-snapshots", null, Snapshots.class);
- }
+ public class List extends OpenStackRequest<Snapshots> {
+
+ public List(boolean detail) {
+ super(CLIENT, HttpMethod.GET, detail ? "/os-snapshots/detail" : "/os-snapshots", null, Snapshots.class);
+ }
- }
-
- public class Create extends OpenStackRequest<SnapshotForCreate> {
+ }
+
+ public class Create extends OpenStackRequest<SnapshotForCreate> {
- private SnapshotForCreate snapshotForCreate;
-
- public Create(SnapshotForCreate snapshotForCreate) {
- super(CLIENT, HttpMethod.POST, "/os-snapshots", Entity.json(snapshotForCreate), SnapshotForCreate.class);
- this.snapshotForCreate = snapshotForCreate;
- }
-
- }
-
- public class Show extends OpenStackRequest<Snapshot> {
-
- public Show(String id) {
- super(CLIENT, HttpMethod.GET, new StringBuilder("/os-snapshots/").append(id).toString(), null, Snapshot.class);
- }
+ private SnapshotForCreate snapshotForCreate;
+
+ public Create(SnapshotForCreate snapshotForCreate) {
+ super(CLIENT, HttpMethod.POST, "/os-snapshots", Entity.json(snapshotForCreate), SnapshotForCreate.class);
+ this.snapshotForCreate = snapshotForCreate;
+ }
+
+ }
+
+ public class Show extends OpenStackRequest<Snapshot> {
+
+ public Show(String id) {
+ super(CLIENT, HttpMethod.GET, new StringBuilder("/os-snapshots/").append(id).toString(), null, Snapshot.class);
+ }
- }
-
- public class ShowMetadata extends OpenStackRequest<Metadata> {
-
- public ShowMetadata(String id) {
- super(CLIENT, HttpMethod.GET, new StringBuilder("/os-snapshots/").append(id).append("/metadata").toString(), null, Metadata.class);
- }
+ }
+
+ public class ShowMetadata extends OpenStackRequest<Metadata> {
+
+ public ShowMetadata(String id) {
+ super(CLIENT, HttpMethod.GET, new StringBuilder("/os-snapshots/").append(id).append("/metadata").toString(), null, Metadata.class);
+ }
- }
-
- public class Delete extends OpenStackRequest<Void> {
-
- public Delete(String id) {
- super(CLIENT, HttpMethod.DELETE, new StringBuilder("/os-snapshots/").append(id).toString(), null, Void.class);
- }
-
- }
-
+ }
+
+ public class Delete extends OpenStackRequest<Void> {
+
+ public Delete(String id) {
+ super(CLIENT, HttpMethod.DELETE, new StringBuilder("/os-snapshots/").append(id).toString(), null, Void.class);
+ }
+
+ }
+
}
diff --git a/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/VolumesExtension.java b/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/VolumesExtension.java
index b2a4303..b46983f 100644
--- a/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/VolumesExtension.java
+++ b/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/VolumesExtension.java
@@ -28,95 +28,95 @@ import com.woorea.openstack.nova.model.Volumes;
public class VolumesExtension {
- private final OpenStackClient CLIENT;
+ private final OpenStackClient CLIENT;
- public VolumesExtension(OpenStackClient client) {
- CLIENT = client;
- }
+ public VolumesExtension(OpenStackClient client) {
+ CLIENT = client;
+ }
- public List list(boolean detail) {
- return new List(detail);
- }
+ public List list(boolean detail) {
+ return new List(detail);
+ }
- public Create create(VolumeForCreate volume) {
- return new Create(volume);
- }
+ public Create create(VolumeForCreate volume) {
+ return new Create(volume);
+ }
- public UploadToImage uploadToImage(VolumeForImageCreate volumeForImage) {
- return new UploadToImage(volumeForImage);
- }
+ public UploadToImage uploadToImage(VolumeForImageCreate volumeForImage) {
+ return new UploadToImage(volumeForImage);
+ }
- public Show show(String id) {
- return new Show(id);
- }
+ public Show show(String id) {
+ return new Show(id);
+ }
- public ShowMetadata showMetadata(String id) {
- return new ShowMetadata(id);
- }
+ public ShowMetadata showMetadata(String id) {
+ return new ShowMetadata(id);
+ }
- public Delete delete(String id) {
- return new Delete(id);
- }
+ public Delete delete(String id) {
+ return new Delete(id);
+ }
- public class List extends OpenStackRequest<Volumes> {
+ public class List extends OpenStackRequest<Volumes> {
- public List(boolean detail) {
- super(CLIENT, HttpMethod.GET, detail ? "/os-volumes/detail"
- : "/os-volumes", null, Volumes.class);
- }
+ public List(boolean detail) {
+ super(CLIENT, HttpMethod.GET, detail ? "/os-volumes/detail"
+ : "/os-volumes", null, Volumes.class);
+ }
- }
+ }
- public class Create extends OpenStackRequest<Volume> {
+ public class Create extends OpenStackRequest<Volume> {
- // private Volume volume;
+ // private Volume volume;
- public Create(VolumeForCreate volume) {
- super(CLIENT, HttpMethod.POST, "/os-volumes", Entity.json(volume),
- Volume.class);
- // this.volume = volume;
- }
+ public Create(VolumeForCreate volume) {
+ super(CLIENT, HttpMethod.POST, "/os-volumes", Entity.json(volume),
+ Volume.class);
+ // this.volume = volume;
+ }
- }
+ }
- // Upload volume to image service as image
+ // Upload volume to image service as image
- public class UploadToImage extends OpenStackRequest<Void> {
+ public class UploadToImage extends OpenStackRequest<Void> {
- public UploadToImage(VolumeForImageCreate volumeForImageCreate) {
- super(CLIENT, HttpMethod.POST, new StringBuilder("/volumes/")
- .append(volumeForImageCreate.getVolumeId() + "/action"),
- Entity.json(volumeForImageCreate), Void.class);
- }
+ public UploadToImage(VolumeForImageCreate volumeForImageCreate) {
+ super(CLIENT, HttpMethod.POST, new StringBuilder("/volumes/")
+ .append(volumeForImageCreate.getVolumeId() + "/action"),
+ Entity.json(volumeForImageCreate), Void.class);
+ }
- }
+ }
- public class Show extends OpenStackRequest<Volume> {
+ public class Show extends OpenStackRequest<Volume> {
- public Show(String id) {
- super(CLIENT, HttpMethod.GET, new StringBuilder("/os-volumes/")
- .append(id).toString(), null, Volume.class);
- }
+ public Show(String id) {
+ super(CLIENT, HttpMethod.GET, new StringBuilder("/os-volumes/")
+ .append(id).toString(), null, Volume.class);
+ }
- }
+ }
- public class ShowMetadata extends OpenStackRequest<Metadata> {
+ public class ShowMetadata extends OpenStackRequest<Metadata> {
- public ShowMetadata(String id) {
- super(CLIENT, HttpMethod.GET, new StringBuilder("/os-volumes/")
- .append(id).append("/metadata").toString(), null,
- Metadata.class);
- }
+ public ShowMetadata(String id) {
+ super(CLIENT, HttpMethod.GET, new StringBuilder("/os-volumes/")
+ .append(id).append("/metadata").toString(), null,
+ Metadata.class);
+ }
- }
+ }
- public class Delete extends OpenStackRequest<Void> {
+ public class Delete extends OpenStackRequest<Void> {
- public Delete(String id) {
- super(CLIENT, HttpMethod.DELETE, new StringBuilder("/os-volumes/")
- .append(id).toString(), null, Void.class);
- }
+ public Delete(String id) {
+ super(CLIENT, HttpMethod.DELETE, new StringBuilder("/os-volumes/")
+ .append(id).toString(), null, Void.class);
+ }
- }
+ }
}