jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignasi Barrera <notificati...@github.com>
Subject Re: [jclouds] adding attache detach interface to nova api (#697)
Date Mon, 02 Mar 2015 14:40:34 GMT
> +        InterfaceApi api = requestsSendResponses(
> +                keystoneAuthWithUsernameAndPasswordAndTenantName,
> +                responseWithKeystoneAccess,
> +                authenticatedGET().endpoint(endpoint)
> +                        .method("POST")
> +                        .payload(payloadFromStringWithContentType(
> +                                "{\"interfaceAttachment\":{\"net_id\":\"1017d1c5-963b-4ae3-b40f-2e8266287249\"}}",
"application/json")).
> +                        build(),
> +                HttpResponse.builder().statusCode(200).message("HTTP/1.1 200").payload(payloadFromResource("/interface_attachment.json")).build()
> +        ).getInterfaceApiForZone("az-1.region-a.geo-1").get();
> +
> +        InterfaceAttachment i = api.attachInterface("a01ea7e8107f48a3b9f04e12b01771b6",
AttachInterfaceOptions.Builder.netId("1017d1c5-963b-4ae3-b40f-2e8266287249"));
> +        assertEquals(api.attachInterface("a01ea7e8107f48a3b9f04e12b01771b6", AttachInterfaceOptions.Builder.netId("1017d1c5-963b-4ae3-b40f-2e8266287249")).toString(),
> +                new ParseInterfaceAttachmentTest().expected().toString());
> +    }
> +

Add the missing test for the detach interface method.

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