From 273de4977c86762899eaedf989641bb7cb1a532d Mon Sep 17 00:00:00 2001 From: Mike Arnold Date: Sat, 10 Mar 2012 07:16:18 -0600 Subject: [PATCH 1/5] creating live test for HP Cloud specific keypair client --- .../HPCloudComputeKeyPairClientLiveTest.java | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 labs/hpcloud-compute/src/test/java/org/jclouds/hpcloud/compute/features/HPCloudComputeKeyPairClientLiveTest.java diff --git a/labs/hpcloud-compute/src/test/java/org/jclouds/hpcloud/compute/features/HPCloudComputeKeyPairClientLiveTest.java b/labs/hpcloud-compute/src/test/java/org/jclouds/hpcloud/compute/features/HPCloudComputeKeyPairClientLiveTest.java new file mode 100644 index 0000000000..f7982fe934 --- /dev/null +++ b/labs/hpcloud-compute/src/test/java/org/jclouds/hpcloud/compute/features/HPCloudComputeKeyPairClientLiveTest.java @@ -0,0 +1,34 @@ +/** + * Licensed to jclouds, Inc. (jclouds) under one or more + * contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. jclouds licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.jclouds.hpcloud.compute.features; + +import org.jclouds.openstack.nova.v1_1.features.KeyPairClientLiveTest; +import org.testng.annotations.Test; + +/** + * + * @author Michael Arnold + */ +@Test(groups = "live", testName = "HPCloudComputeKeyPairClientLiveTest") +public class HPCloudComputeKeyPairClientLiveTest extends KeyPairClientLiveTest { + public HPCloudComputeKeyPairClientLiveTest() { + provider = "hpcloud-compute"; + } + +} From 49532fde7d8c08d9fe9f51cf554061170250274f Mon Sep 17 00:00:00 2001 From: Mike Arnold Date: Mon, 12 Mar 2012 12:56:13 -0500 Subject: [PATCH 2/5] adding live test for SecurityGroupClient --- .../features/SecurityGroupClientLiveTest.java | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 labs/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/features/SecurityGroupClientLiveTest.java diff --git a/labs/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/features/SecurityGroupClientLiveTest.java b/labs/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/features/SecurityGroupClientLiveTest.java new file mode 100644 index 0000000000..fb9d829f27 --- /dev/null +++ b/labs/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/features/SecurityGroupClientLiveTest.java @@ -0,0 +1,88 @@ +/** + * Licensed to jclouds, Inc. (jclouds) under one or more + * contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. jclouds licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.jclouds.openstack.nova.v1_1.features; + +import org.jclouds.openstack.nova.v1_1.domain.SecurityGroup; +import org.jclouds.openstack.nova.v1_1.domain.SecurityGroupRule; +import org.jclouds.openstack.nova.v1_1.internal.BaseNovaClientLiveTest; +import org.testng.annotations.Test; + +import java.util.Set; + +import static org.testng.Assert.assertNotNull; + +/** + * Tests behavior of {@code SecurityGroupClient} + * + * @author Michael Arnold + */ +@Test(groups = "live", testName = "SecurityGroupClientLiveTest") +public class SecurityGroupClientLiveTest extends BaseNovaClientLiveTest { + + public static final String SECURITY_GROUP_NAME = "testsg"; + + public void listSecurityGroups() throws Exception { + for (String regionId : context.getApi().getConfiguredRegions()) { + SecurityGroupClient client = context.getApi().getSecurityGroupClientForRegion(regionId); + Set securityGroupsList = client.listSecurityGroups(); + assertNotNull(securityGroupsList); + } + } + + public void createGetAndDeleteSecurityGroup() throws Exception { + for(String regionId : context.getApi().getConfiguredRegions()) { + SecurityGroupClient client = context.getApi().getSecurityGroupClientForRegion(regionId); + SecurityGroup securityGroup = null; + String id; + try { + securityGroup = client.createSecurityGroup(SECURITY_GROUP_NAME, "test security group"); + assertNotNull(securityGroup); + id = securityGroup.getId(); + SecurityGroup theGroup = client.getSecurityGroup(id); + assertNotNull(theGroup); + } finally { + if (securityGroup != null) { + client.deleteSecurityGroup(securityGroup.getId()); + } + } + } + } + + public void createAndDeleteSecurityGroupRule() throws Exception { + for(String regionId : context.getApi().getConfiguredRegions()) { + SecurityGroupClient client = context.getApi().getSecurityGroupClientForRegion(regionId); + SecurityGroup securityGroup = null; + + try { + securityGroup = client.createSecurityGroup(SECURITY_GROUP_NAME, "test security group"); + assertNotNull(securityGroup); + + SecurityGroupRule rule = client.createSecurityGroupRule( + "tcp", "443", "443", "0.0.0.0/0", "", securityGroup.getId()); + assertNotNull(rule); + + } finally { + if (securityGroup != null) { + client.deleteSecurityGroup(securityGroup.getId()); + } + } + } + + } +} From 6db648740b1d5449764c68042ddd64ce70472500 Mon Sep 17 00:00:00 2001 From: Mike Arnold Date: Mon, 12 Mar 2012 16:22:54 -0500 Subject: [PATCH 3/5] adding more key pair client expect-style tests --- .../features/KeyPairClientExpectTest.java | 103 +++++++++++++++++- .../nova/v1_1/parse/ParseKeyPairTest.java | 65 +++++++++++ 2 files changed, 165 insertions(+), 3 deletions(-) create mode 100644 labs/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/parse/ParseKeyPairTest.java diff --git a/labs/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/features/KeyPairClientExpectTest.java b/labs/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/features/KeyPairClientExpectTest.java index 4cf4f04aff..9aec691625 100644 --- a/labs/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/features/KeyPairClientExpectTest.java +++ b/labs/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/features/KeyPairClientExpectTest.java @@ -25,6 +25,7 @@ import org.jclouds.http.HttpResponse; import org.jclouds.openstack.nova.v1_1.NovaClient; import org.jclouds.openstack.nova.v1_1.internal.BaseNovaRestClientExpectTest; import org.jclouds.openstack.nova.v1_1.parse.ParseKeyPairListTest; +import org.jclouds.openstack.nova.v1_1.parse.ParseKeyPairTest; import org.testng.annotations.Test; import java.net.URI; @@ -55,15 +56,111 @@ public class KeyPairClientExpectTest extends BaseNovaRestClientExpectTest { HttpResponse listKeyPairsResponse = HttpResponse.builder().statusCode(200) .payload(payloadFromResource("/keypair_list.json")).build(); - NovaClient clientWhenFloatingIPsExist = requestsSendResponses( + NovaClient clientWhenServersExist = requestsSendResponses( keystoneAuthWithAccessKeyAndSecretKey, responseWithKeystoneAccess, listKeyPairs, listKeyPairsResponse); - assertEquals(clientWhenFloatingIPsExist.getConfiguredRegions(), + assertEquals(clientWhenServersExist.getConfiguredRegions(), ImmutableSet.of("North")); - assertEquals(clientWhenFloatingIPsExist.getKeyPairClientForRegion("North") + assertEquals(clientWhenServersExist.getKeyPairClientForRegion("North") .listKeyPairs().toString(), new ParseKeyPairListTest().expected() .toString()); } + + public void testListKeyPairsWhenResponseIs404() throws Exception { + HttpRequest listKeyPairs = HttpRequest + .builder() + .method("GET") + .endpoint( + URI.create("https://compute.north.host/v1.1/3456/os-keypairs")) + .headers( + ImmutableMultimap. builder() + .put("Accept", "application/json") + .put("X-Auth-Token", authToken).build()).build(); + + HttpResponse listKeyPairsResponse = HttpResponse.builder().statusCode(404) + .build(); + + NovaClient clientWhenNoServersExist = requestsSendResponses( + keystoneAuthWithAccessKeyAndSecretKey, responseWithKeystoneAccess, + listKeyPairs, listKeyPairsResponse); + + assertTrue(clientWhenNoServersExist.getKeyPairClientForRegion("North") + .listKeyPairs().isEmpty()); + + } + + public void testCreateKeyPair() throws Exception { + HttpRequest createKeyPair = HttpRequest + .builder() + .method("POST") + .endpoint( + URI.create("https://compute.north.host/v1.1/3456/os-keypairs")) + .headers( + ImmutableMultimap. builder() + .put("Accept", "application/json") + .put("X-Auth-Token", authToken).build()) + .payload(payloadFromStringWithContentType("{\"keypair\":{\"name\":\"testkeypair\"}}", + "application/json")).build(); + + HttpResponse createKeyPairResponse = HttpResponse.builder().statusCode(200) + .payload(payloadFromResource("/keypair_created.json")).build(); + + NovaClient clientWhenServersExist = requestsSendResponses( + keystoneAuthWithAccessKeyAndSecretKey, responseWithKeystoneAccess, + createKeyPair, createKeyPairResponse); + + assertEquals(clientWhenServersExist.getKeyPairClientForRegion("North") + .createKeyPair("testkeypair").toString(), + new ParseKeyPairTest().expected().toString()); + + } + + public void testCreateKeyPairWithPublicKey() throws Exception { + HttpRequest createKeyPair = HttpRequest + .builder() + .method("POST") + .endpoint( + URI.create("https://compute.north.host/v1.1/3456/os-keypairs")) + .headers( + ImmutableMultimap. builder() + .put("Accept", "application/json") + .put("X-Auth-Token", authToken).build()) + .payload(payloadFromStringWithContentType("{\"keypair\":{\"name\":\"testkeypair\",\"public_key\":\"ssh-rsa AAAXB3NzaC1yc2EAAAADAQABAAAAgQDFNyGjgs6c9akgmZ2ou/fJf7Pdrc23hC95/gM/33OrG4GZABACE4DTioa/PGN+7rHv9YUavUCtXrWayhGniKq/wCuI5fo5TO4AmDNv7/sCGHIHFumADSIoLx0vFhGJIetXEWxL9r0lfFC7//6yZM2W3KcGjbMtlPXqBT9K9PzdyQ== nova@nv-aw2az1-api0001\n\"}}", + "application/json")).build(); + + HttpResponse createKeyPairResponse = HttpResponse.builder().statusCode(200) + .payload(payloadFromResource("/keypair_created.json")).build(); + + NovaClient clientWhenServersExist = requestsSendResponses( + keystoneAuthWithAccessKeyAndSecretKey, responseWithKeystoneAccess, + createKeyPair, createKeyPairResponse); + + assertEquals(clientWhenServersExist.getKeyPairClientForRegion("North") + .createKeyPairWithPublicKey("testkeypair", "ssh-rsa AAAXB3NzaC1yc2EAAAADAQABAAAAgQDFNyGjgs6c9akgmZ2ou/fJf7Pdrc23hC95/gM/33OrG4GZABACE4DTioa/PGN+7rHv9YUavUCtXrWayhGniKq/wCuI5fo5TO4AmDNv7/sCGHIHFumADSIoLx0vFhGJIetXEWxL9r0lfFC7//6yZM2W3KcGjbMtlPXqBT9K9PzdyQ== nova@nv-aw2az1-api0001\n") + .toString(), + new ParseKeyPairTest().expected().toString()); + } + + public void testDeleteKeyPair() throws Exception { + HttpRequest deleteKeyPair = HttpRequest + .builder() + .method("DELETE") + .endpoint( + URI.create("https://compute.north.host/v1.1/3456/os-keypairs/testkeypair")) + .headers( + ImmutableMultimap. builder() + .put("Accept", "*/*") + .put("X-Auth-Token", authToken).build()).build(); + + + HttpResponse deleteKeyPairResponse = HttpResponse.builder().statusCode(202).build(); + + NovaClient clientWhenServersExist = requestsSendResponses( + keystoneAuthWithAccessKeyAndSecretKey, responseWithKeystoneAccess, + deleteKeyPair, deleteKeyPairResponse); + + assertTrue(clientWhenServersExist.getKeyPairClientForRegion("North").deleteKeyPair("testkeypair")); + } } diff --git a/labs/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/parse/ParseKeyPairTest.java b/labs/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/parse/ParseKeyPairTest.java new file mode 100644 index 0000000000..c90284c595 --- /dev/null +++ b/labs/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/parse/ParseKeyPairTest.java @@ -0,0 +1,65 @@ +/** + * Licensed to jclouds, Inc. (jclouds) under one or more + * contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. jclouds licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.jclouds.openstack.nova.v1_1.parse; + +import com.google.inject.Guice; +import com.google.inject.Injector; +import org.jclouds.json.BaseItemParserTest; +import org.jclouds.json.BaseParserTest; +import org.jclouds.json.config.GsonModule; +import org.jclouds.openstack.nova.v1_1.config.NovaParserModule; +import org.jclouds.openstack.nova.v1_1.domain.KeyPair; +import org.jclouds.rest.annotations.SelectJson; +import org.testng.annotations.Test; + +import javax.ws.rs.Consumes; +import javax.ws.rs.core.MediaType; +import java.util.HashMap; +import java.util.Map; + +/** + * + * @author Michael Arnold + */ +@Test(groups = "unit", testName = "ParseKeyPairTest") +public class ParseKeyPairTest extends BaseItemParserTest { + + @Override + public String resource() { + return "/keypair_created.json"; + } + + @Override + @Consumes(MediaType.APPLICATION_JSON) + public KeyPair expected() { + return KeyPair + .builder() + .publicKey("ssh-rsa AAAXB3NzaC1yc2EAAAADAQABAAAAgQDFNyGjgs6c9akgmZ2ou/fJf7Pdrc23hC95/gM/33OrG4GZABACE4DTioa/PGN+7rHv9YUavUCtXrWayhGniKq/wCuI5fo5TO4AmDNv7/sCGHIHFumADSIoLx0vFhGJIetXEWxL9r0lfFC7//6yZM2W3KcGjbMtlPXqBT9K9PzdyQ== nova@nv-aw2az1-api0001\n") + .privateKey("-----BEGIN RSA PRIVATE KEY-----\nMIICXQIAAAKBgQDFNyGjgs6c9akgmZ2ou/fJf7Pdrc23hC95/gM/33OrG4GZABAC\nE4DTioa/PGN+7rHv9YUavUCtXrWayhGniKq/wCuI5fo5TO4AmDNv7/sCGHIHFumA\nDSIoLx0vFhGJIetXEWxL9r0lfFC7//6yZM2W3KcGjbMtlPXqBT9K9PzdyQIDAQAB\nAoGAW8Ww+KbpQK8smcgCTr/RqcmsSI8VeL2hXjJvDq0L5WbyYuFdkanDvCztUVZn\nsmyfDtwAqZXB4Ct/dN1tY7m8QpdyRaKRW4Q+hghGCAQpsG7rYDdvwdEyvMaW5RA4\ntucQyajMNyQ/tozU3wMx/v8A7RvGcE9tqoG0WK1C3kBu95UCQQDrOd+joYDkvccz\nFIVu5gNPMXEh3fGGzDxk225UlvESquYLzfz4TfmuUjH4Z1BL3wRiwfJsrrjFkm33\njIidDE8PAkEA1qHjxuaIS1yz/rfzErmcOVNlbFHMP4ihjGTTvh1ZctXlNeLwzENQ\nEDaQV3IpUY1KQR6rxcWb5AXgfF9D9PYFpwJBANucAqGAbRgh3lJgPFtXP4u2O0tF\nLPOOxmvbOdybt6KYD4LB5AXmts77SlACFMNhCXUyYaT6UuOSXDyb5gfJsB0CQQC3\nFaGXKU9Z+doQjhlq/6mjvN/nZl80Uvh7Kgb1RVPoAU1kihGeLE0/h0vZTCiyyDNv\nGRqtucMg32J+tUTi0HpBAkAwHiCZMHMeJWHUwIwlRQY/dnR86FWobRl98ViF2rCL\nDHkDVOeIser3Q6zSqU5/m99lX6an5g8pAh/R5LqnOQZC\n-----END RSA PRIVATE KEY-----\n") + .name("testkeypair") + .userId("65649731189278") + .fingerprint("d2:1f:c9:2b:d8:90:77:5f:15:64:27:e3:9f:77:1d:e4") + .build(); + } + + + protected Injector injector() { + return Guice.createInjector(new NovaParserModule(), new GsonModule()); + } +} From 80604e98e62c451cb21924c3ed0ee57456c94adf Mon Sep 17 00:00:00 2001 From: Mike Arnold Date: Mon, 12 Mar 2012 16:42:01 -0500 Subject: [PATCH 4/5] fixing and moving tests after upstream merge --- .../nova/v1_1/features/SecurityGroupClientLiveTest.java | 1 + .../jclouds/openstack/nova/v1_1/parse/ParseKeyPairTest.java | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/labs/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/features/SecurityGroupClientLiveTest.java b/labs/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/features/SecurityGroupClientLiveTest.java index fb9d829f27..c19187915d 100644 --- a/labs/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/features/SecurityGroupClientLiveTest.java +++ b/labs/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/features/SecurityGroupClientLiveTest.java @@ -20,6 +20,7 @@ package org.jclouds.openstack.nova.v1_1.features; import org.jclouds.openstack.nova.v1_1.domain.SecurityGroup; import org.jclouds.openstack.nova.v1_1.domain.SecurityGroupRule; +import org.jclouds.openstack.nova.v1_1.extensions.SecurityGroupClient; import org.jclouds.openstack.nova.v1_1.internal.BaseNovaClientLiveTest; import org.testng.annotations.Test; diff --git a/labs/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/parse/ParseKeyPairTest.java b/labs/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/parse/ParseKeyPairTest.java index c90284c595..9901ba5f2d 100644 --- a/labs/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/parse/ParseKeyPairTest.java +++ b/labs/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/parse/ParseKeyPairTest.java @@ -30,8 +30,6 @@ import org.testng.annotations.Test; import javax.ws.rs.Consumes; import javax.ws.rs.core.MediaType; -import java.util.HashMap; -import java.util.Map; /** * @@ -46,6 +44,7 @@ public class ParseKeyPairTest extends BaseItemParserTest { } @Override + @SelectJson("keypair") @Consumes(MediaType.APPLICATION_JSON) public KeyPair expected() { return KeyPair From 822bdfc240792f22a56e2401cf3067348b69411b Mon Sep 17 00:00:00 2001 From: Mike Arnold Date: Mon, 12 Mar 2012 16:43:54 -0500 Subject: [PATCH 5/5] moving a couple more tests after upstream merge --- .../SecurityGroupClientExpectTest.java | 30 +++++++++++++++++++ .../SecurityGroupClientLiveTest.java | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 labs/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/extensions/SecurityGroupClientExpectTest.java rename labs/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/{features => extensions}/SecurityGroupClientLiveTest.java (98%) diff --git a/labs/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/extensions/SecurityGroupClientExpectTest.java b/labs/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/extensions/SecurityGroupClientExpectTest.java new file mode 100644 index 0000000000..dc738036a4 --- /dev/null +++ b/labs/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/extensions/SecurityGroupClientExpectTest.java @@ -0,0 +1,30 @@ +/** + * Licensed to jclouds, Inc. (jclouds) under one or more + * contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. jclouds licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.jclouds.openstack.nova.v1_1.extensions; + +import org.testng.annotations.Test; + +/** + * Tests annotation parsing of {@code SecurityGroupAsyncClient} + * + * @author Michael Arnold + */ +@Test(groups = "unit", testName = "SecurityGroupClientExpectTest") +public class SecurityGroupClientExpectTest { +} diff --git a/labs/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/features/SecurityGroupClientLiveTest.java b/labs/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/extensions/SecurityGroupClientLiveTest.java similarity index 98% rename from labs/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/features/SecurityGroupClientLiveTest.java rename to labs/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/extensions/SecurityGroupClientLiveTest.java index c19187915d..b11627b5c3 100644 --- a/labs/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/features/SecurityGroupClientLiveTest.java +++ b/labs/openstack-nova/src/test/java/org/jclouds/openstack/nova/v1_1/extensions/SecurityGroupClientLiveTest.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.jclouds.openstack.nova.v1_1.features; +package org.jclouds.openstack.nova.v1_1.extensions; import org.jclouds.openstack.nova.v1_1.domain.SecurityGroup; import org.jclouds.openstack.nova.v1_1.domain.SecurityGroupRule;