jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zack Shoylev <notificati...@github.com>
Subject Re: [jclouds-labs-openstack] Adds support for Floating IP (#135)
Date Thu, 28 Aug 2014 00:13:33 GMT
> +      MockWebServer server = mockOpenStackServer();
> +      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json"))));
> +      server.enqueue(addCommonHeaders(
> +            new MockResponse().setResponseCode(404)));
> +
> +      try {
> +         NeutronApi neutronApi = api(server.getUrl("/").toString(), "openstack-neutron",
overrides);
> +         FloatingIPApi api = neutronApi.getFloatingIPApi("RegionOne").get();
> +
> +         FloatingIP.CreateOptions createFip = FloatingIP.createOptions("376da547-b977-4cfe-9cba-275c80debf57")
> +               .portId("ce705c24-c1ef-408a-bda3-7bbd946164ab")
> +               .build();
> +
> +         FloatingIP floatingIP = api.create(createFip);
> +
> +         /*

If it throws an exception, the test will fail, as it should in that situation.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/135/files#r16813743
Mime
View raw message