From fe53765de0a6262aee573bf3fc708cb92edd38f8 Mon Sep 17 00:00:00 2001 From: Adam Lowe Date: Thu, 31 May 2012 14:19:51 +0100 Subject: [PATCH] openstack-glance: documenting multiple vararg usage --- .../glance/v1_0/options/CreateImageOptions.java | 12 ++++++++++++ .../glance/v1_0/options/ListImageOptions.java | 11 +++++++++++ .../glance/v1_0/options/UpdateImageOptions.java | 10 ++++++++++ 3 files changed, 33 insertions(+) diff --git a/labs/openstack-glance/src/main/java/org/jclouds/openstack/glance/v1_0/options/CreateImageOptions.java b/labs/openstack-glance/src/main/java/org/jclouds/openstack/glance/v1_0/options/CreateImageOptions.java index 112e2b140a..119b469990 100644 --- a/labs/openstack-glance/src/main/java/org/jclouds/openstack/glance/v1_0/options/CreateImageOptions.java +++ b/labs/openstack-glance/src/main/java/org/jclouds/openstack/glance/v1_0/options/CreateImageOptions.java @@ -23,6 +23,18 @@ import org.jclouds.openstack.glance.v1_0.domain.DiskFormat; import org.jclouds.openstack.glance.v1_0.domain.StoreType; /** + * + *

Usage The recommended way to instantiate a CreateImageOptions object is to statically import + * CreateImageOptions.Builder.* and invoke a static creation method for each option as needed: + *

+ * + * import static org.jclouds.openstack.glance.v1_0.options.CreateImageOptions.Builder.* + * + * + * // this will create an image with the name "imageName", minimum required disk of 10GB, etc. + * details = client.create("imageName", minDisk(10), isPublic(true), property("mykey", "somevalue")); + * + * @author Adam Lowe * @see */ diff --git a/labs/openstack-glance/src/main/java/org/jclouds/openstack/glance/v1_0/options/ListImageOptions.java b/labs/openstack-glance/src/main/java/org/jclouds/openstack/glance/v1_0/options/ListImageOptions.java index b095a1cd88..1069547236 100644 --- a/labs/openstack-glance/src/main/java/org/jclouds/openstack/glance/v1_0/options/ListImageOptions.java +++ b/labs/openstack-glance/src/main/java/org/jclouds/openstack/glance/v1_0/options/ListImageOptions.java @@ -28,6 +28,17 @@ import org.jclouds.openstack.glance.v1_0.domain.Image.Status; import org.jclouds.openstack.options.BaseListOptions; /** + *

Usage The recommended way to instantiate a ListImageOptions object is to statically import + * ListImageOptions.Builder.* and invoke a static creation method for each option as needed: + *

+ * + * import static org.jclouds.openstack.glance.v1_0.options.ListImageOptions.Builder.* + * + * + * // this will list the first 10 images with the name "name", minimum required disk of 5GB. + * list = client.list(name("newName"), maxResults(10), minDisk(5)); + * + * * @author Adam Lowe * @see */ diff --git a/labs/openstack-glance/src/main/java/org/jclouds/openstack/glance/v1_0/options/UpdateImageOptions.java b/labs/openstack-glance/src/main/java/org/jclouds/openstack/glance/v1_0/options/UpdateImageOptions.java index 834ae9a7f3..da0e4e9fb8 100644 --- a/labs/openstack-glance/src/main/java/org/jclouds/openstack/glance/v1_0/options/UpdateImageOptions.java +++ b/labs/openstack-glance/src/main/java/org/jclouds/openstack/glance/v1_0/options/UpdateImageOptions.java @@ -26,6 +26,16 @@ import org.jclouds.openstack.glance.v1_0.domain.DiskFormat; import org.jclouds.openstack.glance.v1_0.domain.StoreType; /** + *

Usage The recommended way to instantiate a UpdateImageOptions object is to statically import + * UpdateImageOptions.Builder.* and invoke a static creation method for each option as needed: + *

+ * + * import static org.jclouds.openstack.glance.v1_0.options.UpdateImageOptions.Builder.* + * + * + * // this will adjust the image with id 'id' the name "newName", minimum required disk of 5GB, etc. + * details = client.update(id, name("newName"), minDisk(5), isPublic(true), property("mykey", "somevalue")); + * * @author Adam Lowe * @see */