You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by Jeremy Daggett <no...@github.com> on 2015/02/11 16:43:35 UTC

[jclouds] Nova Attach Interface Extension API (#679)

This PR integrates #497 that implements the Nova compute attach interfaces extension.

/cc @zack-shoylev 
You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds/pull/679

-- Commit Summary --

  * Implemented Nova compute attach interfaces extension.

-- File Changes --

    M apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/NovaApi.java (8)
    M apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/config/NovaHttpApiModule.java (2)
    A apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/domain/FixedIP.java (136)
    A apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/domain/InterfaceAttachment.java (173)
    A apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/domain/PortState.java (57)
    A apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/AttachInterfaceApi.java (115)
    M apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/ExtensionNamespaces.java (5)
    A apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/AttachInterfaceApiExpectTest.java (89)
    A apis/openstack-nova/src/test/resources/attach_interface_details.json (14)
    A apis/openstack-nova/src/test/resources/attach_interfaces_list.json (16)
    M apis/openstack-nova/src/test/resources/extension_list_full.json (20)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/679.patch
https://github.com/jclouds/jclouds/pull/679.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/679

Re: [jclouds] Nova Attach Interface Extension API (#679)

Posted by Ignasi Barrera <no...@github.com>.
> +            .method("GET")
> +            .endpoint(
> +                  "https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v2/3456/servers/instance-1/os-interface/ce531f90-199f-48c0-816c-13e38010b442")
> +            .addHeader("Accept", "application/json").addHeader("X-Auth-Token", authToken).build();
> +
> +      HttpResponse listResponse = HttpResponse.builder().statusCode(200)
> +            .payload(payloadFromResource("/attach_interface_details.json")).build();
> +
> +      NovaApi novaApi = requestsSendResponses(keystoneAuthWithUsernameAndPasswordAndTenantName,
> +            responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse, list, listResponse);
> +
> +      InterfaceAttachment interfaceAttachment = novaApi.getAttachInterfaceApi("az-1.region-a.geo-1").get()
> +            .get("instance-1", "ce531f90-199f-48c0-816c-13e38010b442");
> +
> +      assertEquals(interfaceAttachment, testInterfaceAttachment());
> +   }

Add also tests for the get and list fallbacks, a test for the create method, and the tests for the delete method and its fallback.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/679/files#r24775827

Re: [jclouds] Nova Attach Interface Extension API (#679)

Posted by Ignasi Barrera <no...@github.com>.
I'm a bit late to the party :) Just a comment about the missing tests. Also there should be a live test for each new API method, right?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/679#issuecomment-74572327

Re: [jclouds] Nova Attach Interface Extension API (#679)

Posted by Jeremy Daggett <no...@github.com>.
Reopened #679.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/679#event-234105917

Re: [jclouds] Nova Attach Interface Extension API (#679)

Posted by Jeremy Daggett <no...@github.com>.
Pushed to **master** a356ca9 and 59fc232

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/679#issuecomment-73927744

Re: [jclouds] Nova Attach Interface Extension API (#679)

Posted by Jeremy Daggett <no...@github.com>.
Closed #679.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/679#event-234102036

Re: [jclouds] Nova Attach Interface Extension API (#679)

Posted by Jeremy Daggett <no...@github.com>.
Closed #679.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/679#event-234124144