diff options
Diffstat (limited to 'nova-client')
5 files changed, 57 insertions, 58 deletions
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 f2a6bd6..8442e3d 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,33 +25,33 @@ 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> { public ListDomains() { @@ -62,44 +62,44 @@ public class FloatingIpDnsExtension { 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); } - + } - + 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; + + } - + } - + 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); } - + } - - - -} + + + +}
\ No newline at end of file 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 d574ef6..c6325d4 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,13 +23,13 @@ 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(); } @@ -42,6 +42,6 @@ public class FloatingIpPoolsExtension { } - -} + +}
\ No newline at end of file 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 4b39b2e..d1ae7f4 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,13 +28,13 @@ 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> { public List() { @@ -44,40 +44,39 @@ public class FloatingIpsExtension { } 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 List list() { return new List(); } - + public Allocate allocate(String pool) { Entity<?> entity=null; if(pool!=null) { - Map<String, String> body = new HashMap<String, String>(); + Map<String, String> body = new HashMap<>(); 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/KeyPairsExtension.java b/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/KeyPairsExtension.java index a8a39b6..4ebbe21 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,13 +25,13 @@ 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(); } @@ -62,7 +62,7 @@ public class KeyPairsExtension { public class Delete extends OpenStackRequest<Void> { - private String name; + public Delete(String name) { super(CLIENT, HttpMethod.DELETE, new StringBuilder("/os-keypairs/").append(name).toString(), null, Void.class); @@ -77,5 +77,5 @@ public class KeyPairsExtension { } } - -} + +}
\ No newline at end of file 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 7570254..d920a06 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,13 +25,13 @@ 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(); } @@ -93,6 +93,6 @@ public class NetworksExtension { } - -} + +}
\ No newline at end of file |