diff options
author | Smokowski, Steve (ss835w) <ss835w@us.att.com> | 2019-05-02 09:42:55 -0400 |
---|---|---|
committer | Smokowski, Steve (ss835w) <ss835w@us.att.com> | 2019-05-07 10:02:17 -0400 |
commit | 3f9a0c3183480d150089c0d5a6e507c877f7d121 (patch) | |
tree | b3db04cbe2cef23f81503177a50edc5360ffa486 /glance-client/src | |
parent | e153f0adfbed711ce1e215748594a4d04fd1edaf (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 'glance-client/src')
-rw-r--r-- | glance-client/src/main/java/com/woorea/openstack/glance/ImagesResource.java | 21 | ||||
-rw-r--r-- | glance-client/src/main/java/com/woorea/openstack/glance/SharedImagesResource.java | 4 |
2 files changed, 12 insertions, 13 deletions
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<ImageDownload> { 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<ImageMember> 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); } } } |