summaryrefslogtreecommitdiffstats
path: root/nova-client/src/main/java
diff options
context:
space:
mode:
authorSmokowski, Steve (ss835w) <ss835w@us.att.com>2019-05-02 09:42:55 -0400
committerSmokowski, Steve (ss835w) <ss835w@us.att.com>2019-05-07 10:02:17 -0400
commit3f9a0c3183480d150089c0d5a6e507c877f7d121 (patch)
treeb3db04cbe2cef23f81503177a50edc5360ffa486 /nova-client/src/main/java
parente153f0adfbed711ce1e215748594a4d04fd1edaf (diff)
Enhance Openstack Client
Update Openstack Client to support additional fields Updat all formatting issues Issue-ID: SO-1844 Change-Id: I1369e0c18cc25274db8df7e12855a020b8da38da Signed-off-by: Smokowski, Steve (ss835w) <ss835w@us.att.com>
Diffstat (limited to 'nova-client/src/main/java')
-rw-r--r--nova-client/src/main/java/com/woorea/openstack/nova/api/ImagesResource.java3
-rw-r--r--nova-client/src/main/java/com/woorea/openstack/nova/api/ServersResource.java83
-rw-r--r--nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/AggregatesExtension.java80
-rw-r--r--nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/CloudpipesExtension.java2
-rw-r--r--nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/CredentialsExtension.java11
-rw-r--r--nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/FloatingIpDnsExtension.java11
-rw-r--r--nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/FloatingIpPoolsExtension.java2
-rw-r--r--nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/FloatingIpsExtension.java11
-rw-r--r--nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/HostsExtension.java2
-rw-r--r--nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/HypervisorsExtension.java2
-rw-r--r--nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/KeyPairsExtension.java5
-rw-r--r--nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/NetworksExtension.java12
-rw-r--r--nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/SecurityGroupsExtension.java69
-rw-r--r--nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/SnapshotsExtension.java9
-rw-r--r--nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/VolumesExtension.java23
15 files changed, 148 insertions, 177 deletions
diff --git a/nova-client/src/main/java/com/woorea/openstack/nova/api/ImagesResource.java b/nova-client/src/main/java/com/woorea/openstack/nova/api/ImagesResource.java
index cca80e6..16145b5 100644
--- a/nova-client/src/main/java/com/woorea/openstack/nova/api/ImagesResource.java
+++ b/nova-client/src/main/java/com/woorea/openstack/nova/api/ImagesResource.java
@@ -81,8 +81,7 @@ public class ImagesResource {
public class ShowMetadata extends OpenStackRequest<Metadata> {
public ShowMetadata(String id) {
- super(client, HttpMethod.GET, "/images/" + id + "/metadata", null,
- Metadata.class);
+ super(client, HttpMethod.GET, "/images/" + id + "/metadata", null, Metadata.class);
}
}
diff --git a/nova-client/src/main/java/com/woorea/openstack/nova/api/ServersResource.java b/nova-client/src/main/java/com/woorea/openstack/nova/api/ServersResource.java
index c5ff796..5bdd2bb 100644
--- a/nova-client/src/main/java/com/woorea/openstack/nova/api/ServersResource.java
+++ b/nova-client/src/main/java/com/woorea/openstack/nova/api/ServersResource.java
@@ -123,7 +123,7 @@ public class ServersResource {
public ShowMetadata(String id) {
super(client, HttpMethod.GET, new StringBuilder(SERVERS).append(id).append("/metadata"), null,
- Metadata.class);
+ Metadata.class);
}
}
@@ -131,7 +131,7 @@ public class ServersResource {
public CreateOrUpdateMetadata(String id, Metadata metadata) {
super(client, HttpMethod.POST, new StringBuilder(SERVERS).append(id).append("/metadata"),
- Entity.json(metadata), Metadata.class);
+ Entity.json(metadata), Metadata.class);
}
}
@@ -139,7 +139,7 @@ public class ServersResource {
public ReplaceMetadata(String id, Metadata metadata) {
super(client, HttpMethod.PUT, new StringBuilder(SERVERS).append(id).append("/metadata"),
- Entity.json(metadata), Metadata.class);
+ Entity.json(metadata), Metadata.class);
}
}
@@ -147,7 +147,7 @@ public class ServersResource {
public DeleteMetadata(String id, String key) {
super(client, HttpMethod.DELETE, new StringBuilder(SERVERS).append(id).append("/metadata/").append(key),
- null, Void.class);
+ null, Void.class);
}
}
@@ -162,8 +162,7 @@ public class ServersResource {
public class ShowServerAddresses extends OpenStackRequest<Addresses> {
public ShowServerAddresses(String id) {
- super(client, HttpMethod.GET, new StringBuilder(SERVERS).append(id).append("/ips"), null,
- Addresses.class);
+ super(client, HttpMethod.GET, new StringBuilder(SERVERS).append(id).append("/ips"), null, Addresses.class);
}
}
@@ -186,8 +185,7 @@ public class ServersResource {
public abstract class Action<T> extends OpenStackRequest<T> {
public Action(String id, Entity<?> entity, Class<T> returnType) {
- super(client, HttpMethod.POST, new StringBuilder(SERVERS).append(id).append(ACTION), entity,
- returnType);
+ super(client, HttpMethod.POST, new StringBuilder(SERVERS).append(id).append(ACTION), entity, returnType);
}
}
@@ -294,7 +292,7 @@ public class ServersResource {
public StartServer(String id) {
super(client, HttpMethod.POST, new StringBuilder(SERVERS).append(id).append(ACTION),
- Entity.json(new Start()), Void.class);
+ Entity.json(new Start()), Void.class);
}
}
@@ -306,7 +304,7 @@ public class ServersResource {
public StopServer(String id) {
super(client, HttpMethod.POST, new StringBuilder(SERVERS).append(id).append(ACTION),
- Entity.json(new Stop()), Void.class);
+ Entity.json(new Stop()), Void.class);
}
}
@@ -325,8 +323,8 @@ public class ServersResource {
private String id;
public GetVncConsoleServer(String id, GetVncConsole action) {
- super(client, HttpMethod.POST, new StringBuilder(SERVERS).append(id).append(ACTION),
- Entity.json(action), VncConsole.class);
+ super(client, HttpMethod.POST, new StringBuilder(SERVERS).append(id).append(ACTION), Entity.json(action),
+ VncConsole.class);
}
}
@@ -338,8 +336,8 @@ public class ServersResource {
public class GetConsoleOutputServer extends OpenStackRequest<ConsoleOutput> {
public GetConsoleOutputServer(String id, GetConsoleOutput action) {
- super(client, HttpMethod.POST, new StringBuilder(SERVERS).append(id).append(ACTION),
- Entity.json(action), ConsoleOutput.class);
+ super(client, HttpMethod.POST, new StringBuilder(SERVERS).append(id).append(ACTION), Entity.json(action),
+ ConsoleOutput.class);
}
}
@@ -352,7 +350,7 @@ public class ServersResource {
public PauseServer(String id) {
super(client, HttpMethod.POST, new StringBuilder(SERVERS).append(id).append(ACTION),
- Entity.json(new Pause()), Void.class);
+ Entity.json(new Pause()), Void.class);
}
}
@@ -360,7 +358,7 @@ public class ServersResource {
public UnpauseServer(String id) {
super(client, HttpMethod.POST, new StringBuilder(SERVERS).append(id).append(ACTION),
- Entity.json(new Unpause()), Void.class);
+ Entity.json(new Unpause()), Void.class);
}
}
@@ -372,7 +370,7 @@ public class ServersResource {
public LockServer(String id) {
super(client, HttpMethod.POST, new StringBuilder(SERVERS).append(id).append(ACTION),
- Entity.json(new Lock()), Void.class);
+ Entity.json(new Lock()), Void.class);
}
}
@@ -384,7 +382,7 @@ public class ServersResource {
public UnlockServer(String id) {
super(client, HttpMethod.POST, new StringBuilder(SERVERS).append(id).append(ACTION),
- Entity.json(new Unlock()), Void.class);
+ Entity.json(new Unlock()), Void.class);
}
}
@@ -392,7 +390,7 @@ public class ServersResource {
public SuspendServer(String id) {
super(client, HttpMethod.POST, new StringBuilder(SERVERS).append(id).append(ACTION),
- Entity.json(new Suspend()), Void.class);
+ Entity.json(new Suspend()), Void.class);
}
}
@@ -400,15 +398,15 @@ public class ServersResource {
public ResumeServer(String id) {
super(client, HttpMethod.POST, new StringBuilder(SERVERS).append(id).append(ACTION),
- Entity.json(new Resume()), Void.class);
+ Entity.json(new Resume()), Void.class);
}
}
public class CreateBackupServer extends OpenStackRequest<Void> {
public CreateBackupServer(String id, CreateBackup action) {
- super(client, HttpMethod.POST, new StringBuilder(SERVERS).append(id).append(ACTION),
- Entity.json(action), Void.class);
+ super(client, HttpMethod.POST, new StringBuilder(SERVERS).append(id).append(ACTION), Entity.json(action),
+ Void.class);
}
}
@@ -443,8 +441,8 @@ public class ServersResource {
public class RescueServer extends OpenStackRequest<Void> {
public RescueServer(String id, Rescue action) {
- super(client, HttpMethod.POST, new StringBuilder(SERVERS).append(id).append(ACTION),
- Entity.json(action), Void.class);
+ super(client, HttpMethod.POST, new StringBuilder(SERVERS).append(id).append(ACTION), Entity.json(action),
+ Void.class);
}
}
@@ -452,7 +450,7 @@ public class ServersResource {
public UnrescueServer(String id) {
super(client, HttpMethod.POST, new StringBuilder(SERVERS).append(id).append(ACTION),
- Entity.json(new Unrescue()), Void.class);
+ Entity.json(new Unrescue()), Void.class);
}
}
@@ -468,38 +466,37 @@ public class ServersResource {
public class AssociateFloatingIp extends OpenStackRequest<Void> {
public AssociateFloatingIp(String id, com.woorea.openstack.nova.model.ServerAction.AssociateFloatingIp action) {
- super(client, HttpMethod.POST, new StringBuilder(SERVERS).append(id).append(ACTION),
- Entity.json(action), Void.class);
+ super(client, HttpMethod.POST, new StringBuilder(SERVERS).append(id).append(ACTION), Entity.json(action),
+ Void.class);
}
}
public class DisassociateFloatingIp extends OpenStackRequest<Void> {
public DisassociateFloatingIp(String id,
- com.woorea.openstack.nova.model.ServerAction.DisassociateFloatingIp action) {
- super(client, HttpMethod.POST, new StringBuilder(SERVERS).append(id).append(ACTION),
- Entity.json(action), Void.class);
+ com.woorea.openstack.nova.model.ServerAction.DisassociateFloatingIp action) {
+ super(client, HttpMethod.POST, new StringBuilder(SERVERS).append(id).append(ACTION), Entity.json(action),
+ Void.class);
}
}
public AssociateFloatingIp associateFloatingIp(String serverId, String floatingIpAddress) {
- com.woorea.openstack.nova.model.ServerAction.AssociateFloatingIp action = new com.woorea.openstack.nova.model.ServerAction.AssociateFloatingIp(
- floatingIpAddress);
+ com.woorea.openstack.nova.model.ServerAction.AssociateFloatingIp action =
+ new com.woorea.openstack.nova.model.ServerAction.AssociateFloatingIp(floatingIpAddress);
return new AssociateFloatingIp(serverId, action);
}
public DisassociateFloatingIp disassociateFloatingIp(String serverId, String floatingIpAddress) {
- com.woorea.openstack.nova.model.ServerAction.DisassociateFloatingIp action = new com.woorea.openstack.nova.model.ServerAction.DisassociateFloatingIp(
- floatingIpAddress);
+ com.woorea.openstack.nova.model.ServerAction.DisassociateFloatingIp action =
+ new com.woorea.openstack.nova.model.ServerAction.DisassociateFloatingIp(floatingIpAddress);
return new DisassociateFloatingIp(serverId, action);
}
public class AttachVolume extends OpenStackRequest<Void> {
public AttachVolume(String serverId, final VolumeAttachment volumeAttachment) {
- super(client, HttpMethod.POST,
- new StringBuilder(SERVERS).append(serverId).append("/os-volume_attachments"),
- Entity.json(volumeAttachment), Void.class);
+ super(client, HttpMethod.POST, new StringBuilder(SERVERS).append(serverId).append("/os-volume_attachments"),
+ Entity.json(volumeAttachment), Void.class);
}
}
@@ -507,25 +504,23 @@ public class ServersResource {
public DetachVolume(String serverId, String volumeId) {
super(client, HttpMethod.DELETE,
- new StringBuilder(SERVERS).append(serverId).append("/os-volume_attachments/").append(volumeId),
- null, Void.class);
+ new StringBuilder(SERVERS).append(serverId).append("/os-volume_attachments/").append(volumeId),
+ null, Void.class);
}
}
public class ListVolumeAttachments extends OpenStackRequest<VolumeAttachments> {
public ListVolumeAttachments(String serverId) {
- super(client, HttpMethod.GET,
- new StringBuilder(SERVERS).append(serverId).append("/os-volume_attachments"), null,
- VolumeAttachments.class);
+ super(client, HttpMethod.GET, new StringBuilder(SERVERS).append(serverId).append("/os-volume_attachments"),
+ null, VolumeAttachments.class);
}
}
public class ShowVolumeAttachment extends OpenStackRequest<VolumeAttachment> {
public ShowVolumeAttachment(String serverId, String volumeAttachmentId) {
- super(client, HttpMethod.GET,
- new StringBuilder(SERVERS).append(serverId).append("/os-volume_attachments/")
+ super(client, HttpMethod.GET, new StringBuilder(SERVERS).append(serverId).append("/os-volume_attachments/")
.append(volumeAttachmentId), null, VolumeAttachment.class);
}
}
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 0a23d8b..3977344 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
@@ -39,13 +39,11 @@ public class AggregatesExtension {
return new ShowAggregate(id);
}
- public UpdateAggregateMetadata updateAggregateMetadata(String id,
- String name, String availabilityZone) {
+ public UpdateAggregateMetadata updateAggregateMetadata(String id, String name, String availabilityZone) {
return new UpdateAggregateMetadata(id, name, availabilityZone);
}
- public CreateAggregate createAggregate(String aggregateName,
- String availabilityZoneName) {
+ public CreateAggregate createAggregate(String aggregateName, String availabilityZoneName) {
return new CreateAggregate(aggregateName, availabilityZoneName);
}
@@ -61,17 +59,14 @@ public class AggregatesExtension {
return new RemoveHost(hostId, aggregateId);
}
- public SetMetadata setMetadata(String aggregateId,
- String key, String value) {
+ 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);
+ super(CLIENT, HttpMethod.GET, "/os-aggregates", null, HostAggregates.class);
}
}
@@ -79,27 +74,17 @@ public class AggregatesExtension {
public class ShowAggregate extends OpenStackRequest<HostAggregate> {
public ShowAggregate(String id) {
- super(CLIENT, HttpMethod.GET,
- new StringBuffer("/os-aggregates/").append(id),
- null,
- HostAggregate.class);
+ 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 +
- "\" }}"),
+ 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);
}
@@ -108,18 +93,11 @@ public class AggregatesExtension {
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 +
- "\" }}"),
+ 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);
}
@@ -128,22 +106,15 @@ public class AggregatesExtension {
public class DeleteAggregate extends OpenStackRequest<Void> {
public DeleteAggregate(String id) {
- super(CLIENT, HttpMethod.DELETE,
- new StringBuffer("/os-aggregates/").append(id),
- null,
- null);
+ 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);
+ super(CLIENT, HttpMethod.POST, new StringBuffer("/os-aggregates/").append(aggregateId).append("/action"),
+ Entity.json("{\"add_host\": {\"host\": \"" + hostId + "\" }}"), HostAggregate.class);
}
}
@@ -151,12 +122,8 @@ public class AggregatesExtension {
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);
+ super(CLIENT, HttpMethod.POST, new StringBuffer("/os-aggregates/").append(aggregateId).append("/action"),
+ Entity.json("{\"remove_host\": {\"host\": \"" + hostId + "\" }}"), HostAggregate.class);
}
}
@@ -164,11 +131,8 @@ public class AggregatesExtension {
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 + "\" }}}"),
+ 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 d176bb1..768f73b 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
@@ -62,4 +62,4 @@ public class CloudpipesExtension {
-} \ No newline at end of file
+}
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 6950827..2ebbd08 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,13 +23,13 @@ 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);
}
@@ -41,7 +41,8 @@ public class CredentialsExtension {
public class Create extends OpenStackRequest<Certificate> {
public Create(String id) {
- super(CLIENT, HttpMethod.GET, new StringBuffer("/os-certificates").append(id).toString(), null, Certificate.class);
+ super(CLIENT, HttpMethod.GET, new StringBuffer("/os-certificates").append(id).toString(), null,
+ Certificate.class);
}
}
@@ -54,6 +55,6 @@ public class CredentialsExtension {
}
-
+
}
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 8442e3d..15f7eba 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
@@ -65,7 +65,8 @@ public class FloatingIpDnsExtension {
public CreateDomain(FloatingIpDomain floatingIpDomain) {
- super(CLIENT, HttpMethod.POST, "/os-floating-ip-dns", Entity.json(floatingIpDomain), FloatingIpDomain.class);
+ super(CLIENT, HttpMethod.POST, "/os-floating-ip-dns", Entity.json(floatingIpDomain),
+ FloatingIpDomain.class);
}
@@ -74,7 +75,8 @@ public class FloatingIpDnsExtension {
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);
+ super(CLIENT, HttpMethod.GET, new StringBuffer("/os-floating-ip-dns/").append(id).toString(), null,
+ FloatingIpDomain.class);
}
}
@@ -95,11 +97,12 @@ public class FloatingIpDnsExtension {
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);
+ 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 c6325d4..62fbf59 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
@@ -44,4 +44,4 @@ 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 d1ae7f4..716266c 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
@@ -18,8 +18,6 @@ package com.woorea.openstack.nova.api.extensions;
import java.util.HashMap;
import java.util.Map;
-
-
import com.woorea.openstack.base.client.Entity;
import com.woorea.openstack.base.client.HttpMethod;
import com.woorea.openstack.base.client.OpenStackClient;
@@ -54,7 +52,8 @@ public class FloatingIpsExtension {
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);
+ super(CLIENT, HttpMethod.DELETE, new StringBuffer("/os-floating-ips/").append(id).toString(), null,
+ Void.class);
}
}
@@ -64,11 +63,11 @@ public class FloatingIpsExtension {
}
public Allocate allocate(String pool) {
- Entity<?> entity=null;
- if(pool!=null) {
+ Entity<?> entity = null;
+ if (pool != null) {
Map<String, String> body = new HashMap<>();
body.put("pool", pool);
- entity=Entity.json(body);
+ entity = Entity.json(body);
}
return new Allocate(entity);
}
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 b9c6db4..c042a12 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
@@ -57,4 +57,4 @@ public class HostsExtension {
-} \ No newline at end of file
+}
diff --git a/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/HypervisorsExtension.java b/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/HypervisorsExtension.java
index 8331f1f..b092b0c 100644
--- a/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/HypervisorsExtension.java
+++ b/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/HypervisorsExtension.java
@@ -18,4 +18,4 @@ package com.woorea.openstack.nova.api.extensions;
public interface HypervisorsExtension {
-} \ No newline at end of file
+}
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 4ebbe21..41fca78 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
@@ -65,7 +65,8 @@ public class KeyPairsExtension {
public Delete(String name) {
- super(CLIENT, HttpMethod.DELETE, new StringBuilder("/os-keypairs/").append(name).toString(), null, Void.class);
+ super(CLIENT, HttpMethod.DELETE, new StringBuilder("/os-keypairs/").append(name).toString(), null,
+ Void.class);
}
}
@@ -78,4 +79,4 @@ 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 d920a06..21f9212 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
@@ -71,7 +71,8 @@ public class NetworksExtension {
public class Show extends OpenStackRequest<Network> {
public Show(String id) {
- super(CLIENT, HttpMethod.GET, new StringBuilder("/os-networks/").append(id).toString(), null, Network.class);
+ super(CLIENT, HttpMethod.GET, new StringBuilder("/os-networks/").append(id).toString(), null,
+ Network.class);
}
}
@@ -79,8 +80,8 @@ public class NetworksExtension {
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);
- ;
+ super(CLIENT, HttpMethod.POST, new StringBuilder("/os-networks/").append(id).toString(),
+ Entity.json("{\"action\":\"disassociate\"}"), Void.class);;
}
}
@@ -88,11 +89,12 @@ public class NetworksExtension {
public class Delete extends OpenStackRequest<Void> {
public Delete(String id) {
- super(CLIENT, HttpMethod.DELETE, new StringBuilder("/os-networks/").append(id).toString(), null, Void.class);
+ super(CLIENT, HttpMethod.DELETE, new StringBuilder("/os-networks/").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/SecurityGroupsExtension.java b/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/SecurityGroupsExtension.java
index fb9bdc4..5971db6 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
@@ -47,7 +47,8 @@ public class SecurityGroupsExtension {
private SecurityGroupForCreate securityGroupForCreate;
public Create(SecurityGroupForCreate securityGroupForCreate) {
- super(CLIENT, HttpMethod.POST, "/os-security-groups", Entity.json(securityGroupForCreate), SecurityGroup.class);
+ super(CLIENT, HttpMethod.POST, "/os-security-groups", Entity.json(securityGroupForCreate),
+ SecurityGroup.class);
this.securityGroupForCreate = securityGroupForCreate;
}
@@ -61,10 +62,13 @@ public class SecurityGroupsExtension {
*/
@Deprecated
public Show(Integer id) {
- super(CLIENT, HttpMethod.GET, new StringBuilder("/os-security-groups/").append(id).toString(), null, SecurityGroup.class);
+ 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);
+ super(CLIENT, HttpMethod.GET, new StringBuilder("/os-security-groups/").append(id).toString(), null,
+ SecurityGroup.class);
}
}
@@ -78,10 +82,13 @@ public class SecurityGroupsExtension {
*/
@Deprecated
public Delete(Integer id) {
- super(CLIENT, HttpMethod.DELETE, new StringBuilder("/os-security-groups/").append(String.valueOf(id)).toString(), null, Void.class);
+ 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);
+ super(CLIENT, HttpMethod.DELETE, new StringBuilder("/os-security-groups/").append(id).toString(), null,
+ Void.class);
}
}
@@ -91,7 +98,8 @@ public class SecurityGroupsExtension {
private SecurityGroupRuleForCreate securityGroupRuleForCreate;
public CreateRule(SecurityGroupRuleForCreate securityGroupRuleForCreate) {
- super(CLIENT, HttpMethod.POST, "/os-security-group-rules", Entity.json(securityGroupRuleForCreate), SecurityGroup.Rule.class);
+ super(CLIENT, HttpMethod.POST, "/os-security-group-rules", Entity.json(securityGroupRuleForCreate),
+ SecurityGroup.Rule.class);
this.securityGroupRuleForCreate = securityGroupRuleForCreate;
}
}
@@ -105,11 +113,15 @@ public class SecurityGroupsExtension {
*/
@Deprecated
public DeleteRule(Integer id) {
- super(CLIENT, HttpMethod.DELETE, new StringBuilder("/os-security-group-rules/").append(String.valueOf(id)).toString(), null, Void.class);
+ 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);
+ super(CLIENT, HttpMethod.DELETE,
+ new StringBuilder("/os-security-group-rules/").append(String.valueOf(id)).toString(), null,
+ Void.class);
}
}
@@ -117,8 +129,7 @@ public class SecurityGroupsExtension {
return new List();
}
- public Create createSecurityGroup(String name,
- String description) {
+ public Create createSecurityGroup(String name, String description) {
return new Create(new SecurityGroupForCreate(name, description));
}
@@ -133,6 +144,7 @@ public class SecurityGroupsExtension {
public Show showSecurityGroup(String id) {
return new Show(id);
}
+
public Delete deleteSecurityGroup(Integer id) {
return new Delete(String.valueOf(id));
}
@@ -152,13 +164,13 @@ public class SecurityGroupsExtension {
* @deprecated Use {@link #createSecurityGroupRule(String, String, Integer, Integer, String)}
*/
@Deprecated
- public CreateRule createSecurityGroupRule(
- Integer parentSecurityGroupId, String ipProtocol, Integer fromPort,
+ public CreateRule createSecurityGroupRule(Integer parentSecurityGroupId, String ipProtocol, Integer fromPort,
Integer toPort, String cidr) {
- SecurityGroupRuleForCreate securityGroupRuleForCreate = new SecurityGroupRuleForCreate(
- parentSecurityGroupId, ipProtocol, fromPort, toPort, cidr);
+ SecurityGroupRuleForCreate securityGroupRuleForCreate =
+ new SecurityGroupRuleForCreate(parentSecurityGroupId, ipProtocol, fromPort, toPort, cidr);
return new CreateRule(securityGroupRuleForCreate);
}
+
/**
*
* @param parentSecurityGroupId
@@ -170,36 +182,33 @@ public class SecurityGroupsExtension {
* @deprecated Use {@link #createSecurityGroupRule(String, String, String, Integer, Integer)}
*/
@Deprecated
- public CreateRule createSecurityGroupRule(
- Integer parentSecurityGroupId, String ipProtocol, Integer fromPort,
+ public CreateRule createSecurityGroupRule(Integer parentSecurityGroupId, String ipProtocol, Integer fromPort,
Integer toPort, Integer sourceGroupId) {
- SecurityGroupRuleForCreate securityGroupRuleForCreate = new SecurityGroupRuleForCreate(
- parentSecurityGroupId, ipProtocol, fromPort, toPort,
- sourceGroupId);
+ SecurityGroupRuleForCreate securityGroupRuleForCreate =
+ new SecurityGroupRuleForCreate(parentSecurityGroupId, ipProtocol, fromPort, toPort, sourceGroupId);
return new CreateRule(securityGroupRuleForCreate);
}
- public CreateRule createSecurityGroupRule(
- String parentSecurityGroupId, String ipProtocol, Integer fromPort,
+ public CreateRule createSecurityGroupRule(String parentSecurityGroupId, String ipProtocol, Integer fromPort,
Integer toPort, String cidr) {
- SecurityGroupRuleForCreate securityGroupRuleForCreate = new SecurityGroupRuleForCreate(
- parentSecurityGroupId, ipProtocol, fromPort, toPort, 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
- );
+ 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));
}
-} \ No newline at end of file
+}
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 252e55b..dd54e44 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
@@ -77,7 +77,8 @@ public class SnapshotsExtension {
public class Show extends OpenStackRequest<Snapshot> {
public Show(String id) {
- super(CLIENT, HttpMethod.GET, new StringBuilder("/os-snapshots/").append(id).toString(), null, Snapshot.class);
+ super(CLIENT, HttpMethod.GET, new StringBuilder("/os-snapshots/").append(id).toString(), null,
+ Snapshot.class);
}
}
@@ -85,7 +86,8 @@ public class SnapshotsExtension {
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);
+ super(CLIENT, HttpMethod.GET, new StringBuilder("/os-snapshots/").append(id).append("/metadata").toString(),
+ null, Metadata.class);
}
}
@@ -93,7 +95,8 @@ public class SnapshotsExtension {
public class Delete extends OpenStackRequest<Void> {
public Delete(String id) {
- super(CLIENT, HttpMethod.DELETE, new StringBuilder("/os-snapshots/").append(id).toString(), null, Void.class);
+ 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 f154b5f..9cc243e 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
@@ -61,8 +61,7 @@ public class VolumesExtension {
public class List extends OpenStackRequest<Volumes> {
public List(boolean detail) {
- super(CLIENT, HttpMethod.GET, detail ? "/os-volumes/detail"
- : "/os-volumes", null, Volumes.class);
+ super(CLIENT, HttpMethod.GET, detail ? "/os-volumes/detail" : "/os-volumes", null, Volumes.class);
}
}
@@ -72,8 +71,7 @@ public class VolumesExtension {
public Create(VolumeForCreate volume) {
- super(CLIENT, HttpMethod.POST, "/os-volumes", Entity.json(volume),
- Volume.class);
+ super(CLIENT, HttpMethod.POST, "/os-volumes", Entity.json(volume), Volume.class);
}
@@ -84,8 +82,8 @@ public class VolumesExtension {
public class UploadToImage extends OpenStackRequest<Void> {
public UploadToImage(VolumeForImageCreate volumeForImageCreate) {
- super(CLIENT, HttpMethod.POST, new StringBuilder("/volumes/")
- .append(volumeForImageCreate.getVolumeId() + "/action"),
+ super(CLIENT, HttpMethod.POST,
+ new StringBuilder("/volumes/").append(volumeForImageCreate.getVolumeId() + "/action"),
Entity.json(volumeForImageCreate), Void.class);
}
@@ -94,8 +92,7 @@ public class VolumesExtension {
public class Show extends OpenStackRequest<Volume> {
public Show(String id) {
- super(CLIENT, HttpMethod.GET, new StringBuilder("/os-volumes/")
- .append(id).toString(), null, Volume.class);
+ super(CLIENT, HttpMethod.GET, new StringBuilder("/os-volumes/").append(id).toString(), null, Volume.class);
}
}
@@ -103,9 +100,8 @@ public class VolumesExtension {
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);
+ super(CLIENT, HttpMethod.GET, new StringBuilder("/os-volumes/").append(id).append("/metadata").toString(),
+ null, Metadata.class);
}
}
@@ -113,10 +109,9 @@ public class VolumesExtension {
public class Delete extends OpenStackRequest<Void> {
public Delete(String id) {
- super(CLIENT, HttpMethod.DELETE, new StringBuilder("/os-volumes/")
- .append(id).toString(), null, Void.class);
+ super(CLIENT, HttpMethod.DELETE, new StringBuilder("/os-volumes/").append(id).toString(), null, Void.class);
}
}
-} \ No newline at end of file
+}