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) --- heat-client/pom.xml | 35 +++++++++++----------- .../main/java/com/woorea/openstack/heat/Heat.java | 2 +- .../com/woorea/openstack/heat/StackEvents.java | 30 +++++++++---------- .../java/com/woorea/openstack/heat/HeatTest.java | 2 +- .../openstack/heat/ResourcesResourceTest.java | 2 +- .../woorea/openstack/heat/StackResourceTest.java | 3 +- 6 files changed, 38 insertions(+), 36 deletions(-) (limited to 'heat-client') diff --git a/heat-client/pom.xml b/heat-client/pom.xml index 1393249..ebfc8f8 100644 --- a/heat-client/pom.xml +++ b/heat-client/pom.xml @@ -1,4 +1,5 @@ - + 4.0.0 org.onap.so.libs @@ -10,23 +11,23 @@ OpenStack Heat Client OpenStack Heat Client - - org.onap.so.libs.openstack-java-sdk - openstack-client - ${project.version} - + + org.onap.so.libs.openstack-java-sdk + openstack-client + ${project.version} + - - org.onap.so.libs.openstack-java-sdk - heat-model - ${project.version} - - - junit - junit - 4.12 - test - + + org.onap.so.libs.openstack-java-sdk + heat-model + ${project.version} + + + junit + junit + 4.12 + test + diff --git a/heat-client/src/main/java/com/woorea/openstack/heat/Heat.java b/heat-client/src/main/java/com/woorea/openstack/heat/Heat.java index e12f9f7..76991e1 100644 --- a/heat-client/src/main/java/com/woorea/openstack/heat/Heat.java +++ b/heat-client/src/main/java/com/woorea/openstack/heat/Heat.java @@ -47,7 +47,7 @@ public class Heat extends OpenStackClient { public ResourcesResource getResources() { return resources; } - + public StackEvents getEvents() { return events; } diff --git a/heat-client/src/main/java/com/woorea/openstack/heat/StackEvents.java b/heat-client/src/main/java/com/woorea/openstack/heat/StackEvents.java index ca54d73..cf680b9 100644 --- a/heat-client/src/main/java/com/woorea/openstack/heat/StackEvents.java +++ b/heat-client/src/main/java/com/woorea/openstack/heat/StackEvents.java @@ -25,22 +25,22 @@ import com.woorea.openstack.heat.model.Events; * v1/{tenant_id}/stacks/{stack_name}/{stack_id}/events */ public class StackEvents { - private final OpenStackClient client; + private final OpenStackClient client; - public StackEvents(OpenStackClient client) { - this.client = client; - } + public StackEvents(OpenStackClient client) { + this.client = client; + } - public ListEvents listEvents(String name, String id) { - return new ListEvents(name, id); - } + public ListEvents listEvents(String name, String id) { + return new ListEvents(name, id); + } - /** - * v1/​{tenant_id}​/stacks/​{stack_name}​/resources - */ - public class ListEvents extends OpenStackRequest { - public ListEvents(String name, String id) { - super(client, HttpMethod.GET, "/stacks/" + name + "/" + id + "/events", null, Events.class); - } - } + /** + * v1/​{tenant_id}​/stacks/​{stack_name}​/resources + */ + public class ListEvents extends OpenStackRequest { + public ListEvents(String name, String id) { + super(client, HttpMethod.GET, "/stacks/" + name + "/" + id + "/events", null, Events.class); + } + } } diff --git a/heat-client/src/test/java/com/woorea/openstack/heat/HeatTest.java b/heat-client/src/test/java/com/woorea/openstack/heat/HeatTest.java index 9aff4cc..e0b1134 100644 --- a/heat-client/src/test/java/com/woorea/openstack/heat/HeatTest.java +++ b/heat-client/src/test/java/com/woorea/openstack/heat/HeatTest.java @@ -35,4 +35,4 @@ public class HeatTest { heat.getResources(); } -} \ No newline at end of file +} diff --git a/heat-client/src/test/java/com/woorea/openstack/heat/ResourcesResourceTest.java b/heat-client/src/test/java/com/woorea/openstack/heat/ResourcesResourceTest.java index 380b016..7093c57 100644 --- a/heat-client/src/test/java/com/woorea/openstack/heat/ResourcesResourceTest.java +++ b/heat-client/src/test/java/com/woorea/openstack/heat/ResourcesResourceTest.java @@ -31,4 +31,4 @@ public class ResourcesResourceTest { resourcesResource.listResources("resource"); } -} \ No newline at end of file +} diff --git a/heat-client/src/test/java/com/woorea/openstack/heat/StackResourceTest.java b/heat-client/src/test/java/com/woorea/openstack/heat/StackResourceTest.java index 8831c76..c280132 100644 --- a/heat-client/src/test/java/com/woorea/openstack/heat/StackResourceTest.java +++ b/heat-client/src/test/java/com/woorea/openstack/heat/StackResourceTest.java @@ -27,6 +27,7 @@ import org.junit.Test; public class StackResourceTest { StackResource stackResource = new StackResource(new OpenStackClient("os")); + @Test public void create() throws Exception { stackResource.create(new CreateStackParam()); @@ -52,4 +53,4 @@ public class StackResourceTest { stackResource.deleteByName("test"); } -} \ No newline at end of file +} -- cgit 1.2.3-korg