Change create method to allocateFromPool

This commit is contained in:
Julien Coste 2013-02-27 15:12:51 +01:00
parent 4bbf8380c7
commit a80f58fabe
4 changed files with 5 additions and 5 deletions

View File

@ -64,7 +64,7 @@ public interface FloatingIPApi {
* Pool to allocate IP address from * Pool to allocate IP address from
* @return a newly created FloatingIP * @return a newly created FloatingIP
*/ */
FloatingIP create(String pool); FloatingIP allocateFromPool(String pool);
/** /**
* Decreate a Floating IP address * Decreate a Floating IP address

View File

@ -98,7 +98,7 @@ public interface FloatingIPAsyncApi {
ListenableFuture<? extends FloatingIP> create(); ListenableFuture<? extends FloatingIP> create();
/** /**
* @see org.jclouds.openstack.nova.v2_0.extensions.FloatingIPApi#create * @see org.jclouds.openstack.nova.v2_0.extensions.FloatingIPApi#allocateFromPool
*/ */
@Named("floatingip:create") @Named("floatingip:create")
@POST @POST
@ -108,7 +108,7 @@ public interface FloatingIPAsyncApi {
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@Fallback(NullOnNotFoundOr404.class) @Fallback(NullOnNotFoundOr404.class)
@Payload("%7B\"pool\":\"{pool}\"%7D") @Payload("%7B\"pool\":\"{pool}\"%7D")
ListenableFuture<? extends FloatingIP> create(@PayloadParam("pool") String pool); ListenableFuture<? extends FloatingIP> allocateFromPool(@PayloadParam("pool") String pool);
/** /**

View File

@ -187,7 +187,7 @@ public class FloatingIPApiExpectTest extends BaseNovaApiExpectTest {
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse, createFloatingIP, responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse, createFloatingIP,
createFloatingIPResponse); createFloatingIPResponse);
assertEquals(apiWhenFloatingIPsExist.getFloatingIPExtensionForZone("az-1.region-a.geo-1").get().create("myPool").toString(), assertEquals(apiWhenFloatingIPsExist.getFloatingIPExtensionForZone("az-1.region-a.geo-1").get().allocateFromPool("myPool").toString(),
new ParseFloatingIPTest().expected().toString()); new ParseFloatingIPTest().expected().toString());
} }
} }

View File

@ -189,7 +189,7 @@ public class FloatingIPAsyncApiExpectTest extends BaseNovaAsyncApiExpectTest {
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse, createFloatingIP, responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse, createFloatingIP,
createFloatingIPResponse); createFloatingIPResponse);
assertEquals(apiWhenFloatingIPsExist.getFloatingIPExtensionForZone("az-1.region-a.geo-1").get().create("myPool") assertEquals(apiWhenFloatingIPsExist.getFloatingIPExtensionForZone("az-1.region-a.geo-1").get().allocateFromPool("myPool")
.get() .get()
.toString(), new ParseFloatingIPTest().expected().toString()); .toString(), new ParseFloatingIPTest().expected().toString());
} }