From 3f9a0c3183480d150089c0d5a6e507c877f7d121 Mon Sep 17 00:00:00 2001 From: "Smokowski, Steve (ss835w)" Date: Thu, 2 May 2019 09:42:55 -0400 Subject: 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) --- .../com/woorea/openstack/glance/ImagesResource.java | 21 ++++++++++----------- .../openstack/glance/SharedImagesResource.java | 4 ++-- 2 files changed, 12 insertions(+), 13 deletions(-) (limited to 'glance-client/src/main/java') diff --git a/glance-client/src/main/java/com/woorea/openstack/glance/ImagesResource.java b/glance-client/src/main/java/com/woorea/openstack/glance/ImagesResource.java index 2dc1b9c..a34980d 100644 --- a/glance-client/src/main/java/com/woorea/openstack/glance/ImagesResource.java +++ b/glance-client/src/main/java/com/woorea/openstack/glance/ImagesResource.java @@ -112,7 +112,7 @@ public class ImagesResource { public Update(String id, Image image) { super(client, HttpMethod.PUT, new StringBuilder(IMAGES).append(id).toString(), Entity.json(image), - Image.class); + Image.class); } } @@ -140,7 +140,7 @@ public class ImagesResource { public Upload(String id, ImageUpload imageUpload) { super(client, HttpMethod.PUT, new StringBuilder(IMAGES).append(id).toString(), - Entity.stream(imageUpload.getInputStream()), Image.class); + Entity.stream(imageUpload.getInputStream()), Image.class); } public Upload(ImageUpload imageUpload) { @@ -150,7 +150,7 @@ public class ImagesResource { header(entry.getKey(), entry.getValue()); } - //file,s3,swift + // file,s3,swift header("x-image-meta-store", imageUpload.getStore()); } } @@ -158,8 +158,7 @@ public class ImagesResource { public class Download extends OpenStackRequest { public Download(String id) { - super(client, HttpMethod.GET, new StringBuilder(IMAGES).append(id).toString(), null, - ImageDownload.class); + super(client, HttpMethod.GET, new StringBuilder(IMAGES).append(id).toString(), null, ImageDownload.class); header("Accept", "application/octet-stream"); } @@ -178,7 +177,7 @@ public class ImagesResource { public ListMembers(String id) { super(client, HttpMethod.GET, new StringBuilder(IMAGES).append(id).append(MEMBERS).toString(), null, - ImageMembers.class); + ImageMembers.class); } } @@ -186,7 +185,7 @@ public class ImagesResource { public ReplaceMembers(String id, Collection members) { super(client, HttpMethod.PUT, new StringBuilder(IMAGES).append(id).append(MEMBERS).toString(), - Entity.json(new Memberships(members)), Void.class); + Entity.json(new Memberships(members)), Void.class); } } @@ -194,8 +193,8 @@ public class ImagesResource { public AddMember(String id, String tenantId) { super(client, HttpMethod.PUT, - new StringBuilder(IMAGES).append(id).append(MEMBERS).append(tenantId).toString(), null, - ImageMember.class); + new StringBuilder(IMAGES).append(id).append(MEMBERS).append(tenantId).toString(), null, + ImageMember.class); } } @@ -203,8 +202,8 @@ public class ImagesResource { public RemoveMember(String id, String tenantId) { super(client, HttpMethod.DELETE, - new StringBuilder(IMAGES).append(id).append("/members/").append(tenantId).toString(), null, - Void.class); + new StringBuilder(IMAGES).append(id).append("/members/").append(tenantId).toString(), null, + Void.class); } } diff --git a/glance-client/src/main/java/com/woorea/openstack/glance/SharedImagesResource.java b/glance-client/src/main/java/com/woorea/openstack/glance/SharedImagesResource.java index b17aae2..da9aabc 100644 --- a/glance-client/src/main/java/com/woorea/openstack/glance/SharedImagesResource.java +++ b/glance-client/src/main/java/com/woorea/openstack/glance/SharedImagesResource.java @@ -38,8 +38,8 @@ public class SharedImagesResource { public List(String tenantId, boolean detail) { super(client, HttpMethod.GET, - new StringBuffer(detail ? "/shared-images/detail" : "/shared-images/").append(tenantId).toString(), - null, SharedImages.class); + new StringBuffer(detail ? "/shared-images/detail" : "/shared-images/").append(tenantId).toString(), + null, SharedImages.class); } } } -- cgit 1.2.3-korg