File tree Expand file tree Collapse file tree
nova-client/src/main/java/org/openstack/nova/api/extensions Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99
1010import org .openstack .nova .NovaCommand ;
1111import org .openstack .nova .model .FloatingIps ;
12+ import org .openstack .nova .model .FloatingIp ;
1213
1314public class FloatingIpsExtension {
1415
@@ -21,7 +22,7 @@ public FloatingIps execute(WebTarget target) {
2122
2223 }
2324
24- public static class AllocateFloatingIp implements NovaCommand <Void > {
25+ public static class AllocateFloatingIp implements NovaCommand <FloatingIp > {
2526
2627 private Map <String , String > body ;
2728
@@ -33,9 +34,8 @@ public AllocateFloatingIp(String pool) {
3334 }
3435
3536 @ Override
36- public Void execute (WebTarget target ) {
37- target .path ("os-floating-ips" ).request (MediaType .APPLICATION_JSON ).post (Entity .json (body ));
38- return null ;
37+ public FloatingIp execute (WebTarget target ) {
38+ return target .path ("os-floating-ips" ).request (MediaType .APPLICATION_JSON ).post (Entity .json (body )).readEntity (FloatingIp .class );
3939 }
4040
4141 }
You can’t perform that action at this time.
0 commit comments