summaryrefslogtreecommitdiffstats
path: root/cinder-client
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 /cinder-client
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 'cinder-client')
-rwxr-xr-xcinder-client/pom.xml46
-rwxr-xr-xcinder-client/src/main/java/com/woorea/openstack/cinder/Cinder.java4
-rwxr-xr-xcinder-client/src/main/java/com/woorea/openstack/cinder/LimitsExtension.java4
-rwxr-xr-xcinder-client/src/main/java/com/woorea/openstack/cinder/SchedulerStatsExtension.java8
-rwxr-xr-xcinder-client/src/main/java/com/woorea/openstack/cinder/SnapshotsExtension.java21
-rwxr-xr-xcinder-client/src/main/java/com/woorea/openstack/cinder/VolumeTypesExtension.java4
-rwxr-xr-xcinder-client/src/main/java/com/woorea/openstack/cinder/VolumesExtension.java35
7 files changed, 63 insertions, 59 deletions
diff --git a/cinder-client/pom.xml b/cinder-client/pom.xml
index 47978ac..61f5959 100755
--- a/cinder-client/pom.xml
+++ b/cinder-client/pom.xml
@@ -1,26 +1,26 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.onap.so.libs</groupId>
- <artifactId>openstack-java-sdk</artifactId>
- <version>1.4.0-SNAPSHOT</version>
- </parent>
- <artifactId>cinder-client</artifactId>
- <name>OpenStack Cinder Client</name>
- <description>OpenStack Cinder Client</description>
- <dependencies>
- <dependency>
- <groupId>org.onap.so.libs.openstack-java-sdk</groupId>
- <artifactId>openstack-client</artifactId>
- <version>${project.version}</version>
- </dependency>
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.onap.so.libs</groupId>
+ <artifactId>openstack-java-sdk</artifactId>
+ <version>1.4.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>cinder-client</artifactId>
+ <name>OpenStack Cinder Client</name>
+ <description>OpenStack Cinder Client</description>
+ <dependencies>
+ <dependency>
+ <groupId>org.onap.so.libs.openstack-java-sdk</groupId>
+ <artifactId>openstack-client</artifactId>
+ <version>${project.version}</version>
+ </dependency>
- <dependency>
- <groupId>org.onap.so.libs.openstack-java-sdk</groupId>
- <artifactId>cinder-model</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
- <groupId>org.onap.so.libs.openstack-java-sdk</groupId>
+ <dependency>
+ <groupId>org.onap.so.libs.openstack-java-sdk</groupId>
+ <artifactId>cinder-model</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+ <groupId>org.onap.so.libs.openstack-java-sdk</groupId>
</project> \ No newline at end of file
diff --git a/cinder-client/src/main/java/com/woorea/openstack/cinder/Cinder.java b/cinder-client/src/main/java/com/woorea/openstack/cinder/Cinder.java
index ca65d3f..beb1570 100755
--- a/cinder-client/src/main/java/com/woorea/openstack/cinder/Cinder.java
+++ b/cinder-client/src/main/java/com/woorea/openstack/cinder/Cinder.java
@@ -1,4 +1,5 @@
-/* ============LICENSE_START=======================================================
+/*-
+ * ============LICENSE_START=======================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -13,6 +14,7 @@
* ============LICENSE_END=========================================================
*/
+
package com.woorea.openstack.cinder;
import com.woorea.openstack.base.client.OpenStackClient;
diff --git a/cinder-client/src/main/java/com/woorea/openstack/cinder/LimitsExtension.java b/cinder-client/src/main/java/com/woorea/openstack/cinder/LimitsExtension.java
index 32c05d7..58256c1 100755
--- a/cinder-client/src/main/java/com/woorea/openstack/cinder/LimitsExtension.java
+++ b/cinder-client/src/main/java/com/woorea/openstack/cinder/LimitsExtension.java
@@ -1,4 +1,5 @@
-/* ============LICENSE_START=======================================================
+/*-
+ * ============LICENSE_START=======================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -12,6 +13,7 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
+
package com.woorea.openstack.cinder;
import com.woorea.openstack.base.client.HttpMethod;
diff --git a/cinder-client/src/main/java/com/woorea/openstack/cinder/SchedulerStatsExtension.java b/cinder-client/src/main/java/com/woorea/openstack/cinder/SchedulerStatsExtension.java
index 09ad3ac..36ea91d 100755
--- a/cinder-client/src/main/java/com/woorea/openstack/cinder/SchedulerStatsExtension.java
+++ b/cinder-client/src/main/java/com/woorea/openstack/cinder/SchedulerStatsExtension.java
@@ -1,4 +1,5 @@
-/* ============LICENSE_START=======================================================
+/*-
+ * ============LICENSE_START=======================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -12,6 +13,7 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
+
package com.woorea.openstack.cinder;
import com.woorea.openstack.base.client.HttpMethod;
@@ -37,7 +39,9 @@ public class SchedulerStatsExtension {
public class List extends OpenStackRequest<Pools> {
public List(boolean detail) {
- super(CLIENT, HttpMethod.GET, (new StringBuilder("/scheduler-stats/get_pools")).append(detail ? "?detail=True":""), null, Pools.class);
+ super(CLIENT, HttpMethod.GET,
+ (new StringBuilder("/scheduler-stats/get_pools")).append(detail ? "?detail=True" : ""), null,
+ Pools.class);
}
}
diff --git a/cinder-client/src/main/java/com/woorea/openstack/cinder/SnapshotsExtension.java b/cinder-client/src/main/java/com/woorea/openstack/cinder/SnapshotsExtension.java
index d01bdc9..a7b0cb8 100755
--- a/cinder-client/src/main/java/com/woorea/openstack/cinder/SnapshotsExtension.java
+++ b/cinder-client/src/main/java/com/woorea/openstack/cinder/SnapshotsExtension.java
@@ -1,4 +1,5 @@
-/* ============LICENSE_START=======================================================
+/*-
+ * ============LICENSE_START=======================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -12,6 +13,7 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
+
package com.woorea.openstack.cinder;
import com.woorea.openstack.base.client.Entity;
@@ -95,8 +97,8 @@ public class SnapshotsExtension {
public class Update extends OpenStackRequest<Void> {
public Update(String id, SnapshotForUpdate snapshot) {
- super(CLIENT, HttpMethod.PUT, new StringBuilder("/snapshots/").append(id).toString(),
- Entity.json(snapshot), Void.class);
+ super(CLIENT, HttpMethod.PUT, new StringBuilder("/snapshots/").append(id).toString(), Entity.json(snapshot),
+ Void.class);
}
}
@@ -104,11 +106,8 @@ public class SnapshotsExtension {
public class ShowMetadata extends OpenStackRequest<Metadata> {
public ShowMetadata(String id) {
- super(CLIENT,
- HttpMethod.GET,
- new StringBuilder("/snapshots/").append(id).append("/metadata").toString(),
- null,
- Metadata.class);
+ super(CLIENT, HttpMethod.GET, new StringBuilder("/snapshots/").append(id).append("/metadata").toString(),
+ null, Metadata.class);
}
}
@@ -116,9 +115,9 @@ public class SnapshotsExtension {
public class UpdateMetadata extends OpenStackRequest<Void> {
public UpdateMetadata(String snapshotId, Metadata metadata) {
- super(CLIENT, HttpMethod.PUT, new StringBuilder("/snapshots/").append(snapshotId)
- .append("/metadata")
- .toString(), Entity.json(metadata), Void.class);
+ super(CLIENT, HttpMethod.PUT,
+ new StringBuilder("/snapshots/").append(snapshotId).append("/metadata").toString(),
+ Entity.json(metadata), Void.class);
}
}
diff --git a/cinder-client/src/main/java/com/woorea/openstack/cinder/VolumeTypesExtension.java b/cinder-client/src/main/java/com/woorea/openstack/cinder/VolumeTypesExtension.java
index ded5768..7514771 100755
--- a/cinder-client/src/main/java/com/woorea/openstack/cinder/VolumeTypesExtension.java
+++ b/cinder-client/src/main/java/com/woorea/openstack/cinder/VolumeTypesExtension.java
@@ -1,4 +1,5 @@
-/* ============LICENSE_START=======================================================
+/*-
+ * ============LICENSE_START=======================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -12,6 +13,7 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
+
package com.woorea.openstack.cinder;
import com.woorea.openstack.base.client.Entity;
diff --git a/cinder-client/src/main/java/com/woorea/openstack/cinder/VolumesExtension.java b/cinder-client/src/main/java/com/woorea/openstack/cinder/VolumesExtension.java
index 3e6bf97..e8026ef 100755
--- a/cinder-client/src/main/java/com/woorea/openstack/cinder/VolumesExtension.java
+++ b/cinder-client/src/main/java/com/woorea/openstack/cinder/VolumesExtension.java
@@ -1,4 +1,5 @@
-/* ============LICENSE_START=======================================================
+/*-
+ * ============LICENSE_START=======================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -12,6 +13,7 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
+
package com.woorea.openstack.cinder;
import com.woorea.openstack.base.client.Entity;
@@ -82,8 +84,7 @@ public class VolumesExtension {
public class List extends OpenStackRequest<Volumes> {
public List(boolean detail) {
- super(CLIENT, HttpMethod.GET, detail ? "/volumes/detail"
- : "/volumes", null, Volumes.class);
+ super(CLIENT, HttpMethod.GET, detail ? "/volumes/detail" : "/volumes", null, Volumes.class);
}
}
@@ -91,8 +92,7 @@ public class VolumesExtension {
public class Create extends OpenStackRequest<Volume> {
public Create(VolumeForCreate volume) {
- super(CLIENT, HttpMethod.POST, "/volumes", Entity.json(volume),
- Volume.class);
+ super(CLIENT, HttpMethod.POST, "/volumes", Entity.json(volume), Volume.class);
}
}
@@ -102,8 +102,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").toString(),
+ super(CLIENT, HttpMethod.POST,
+ new StringBuilder("/volumes/").append(volumeForImageCreate.getVolumeId() + "/action").toString(),
Entity.json(volumeForImageCreate), Void.class);
}
@@ -112,8 +112,7 @@ public class VolumesExtension {
public class Show extends OpenStackRequest<Volume> {
public Show(String id) {
- super(CLIENT, HttpMethod.GET, new StringBuilder("/volumes/")
- .append(id).toString(), null, Volume.class);
+ super(CLIENT, HttpMethod.GET, new StringBuilder("/volumes/").append(id).toString(), null, Volume.class);
}
}
@@ -121,9 +120,8 @@ public class VolumesExtension {
public class ShowMetadata extends OpenStackRequest<Metadata> {
public ShowMetadata(String id) {
- super(CLIENT, HttpMethod.GET, new StringBuilder("/volumes/")
- .append(id).append("/metadata").toString(), null,
- Metadata.class);
+ super(CLIENT, HttpMethod.GET, new StringBuilder("/volumes/").append(id).append("/metadata").toString(),
+ null, Metadata.class);
}
}
@@ -131,8 +129,7 @@ public class VolumesExtension {
public class Delete extends OpenStackRequest<Void> {
public Delete(String id) {
- super(CLIENT, HttpMethod.DELETE, new StringBuilder("/volumes/")
- .append(id).toString(), null, Void.class);
+ super(CLIENT, HttpMethod.DELETE, new StringBuilder("/volumes/").append(id).toString(), null, Void.class);
}
}
@@ -140,8 +137,8 @@ public class VolumesExtension {
public class Update extends OpenStackRequest<Void> {
public Update(String id, VolumeForUpdate volume) {
- super(CLIENT, HttpMethod.PUT, new StringBuilder("/volumes/").append(id).toString(),
- Entity.json(volume), Void.class);
+ super(CLIENT, HttpMethod.PUT, new StringBuilder("/volumes/").append(id).toString(), Entity.json(volume),
+ Void.class);
}
}
@@ -158,8 +155,7 @@ public class VolumesExtension {
public class InitializeConnection extends OpenStackRequest<ConnectionInfo> {
public InitializeConnection(String id, ConnectionForInitialize connectionForInitialize) {
- super(CLIENT, HttpMethod.POST, new StringBuilder("/volumes/")
- .append(id).append("/action").toString(),
+ super(CLIENT, HttpMethod.POST, new StringBuilder("/volumes/").append(id).append("/action").toString(),
Entity.json(connectionForInitialize), ConnectionInfo.class);
}
@@ -168,8 +164,7 @@ public class VolumesExtension {
public class TerminateConnection extends OpenStackRequest<Void> {
public TerminateConnection(String id, ConnectionForTerminate connectionForTerminate) {
- super(CLIENT, HttpMethod.POST, new StringBuilder("/volumes/")
- .append(id).append("/action").toString(),
+ super(CLIENT, HttpMethod.POST, new StringBuilder("/volumes/").append(id).append("/action").toString(),
Entity.json(connectionForTerminate), Void.class);
}