http://git-wip-us.apache.org/repos/asf/stratos/blob/897edde8/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/route_get.json ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/route_get.json b/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/route_get.json deleted file mode 100644 index be544f2..0000000 --- a/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/route_get.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - - "kind": "compute#route", - "selfLink": "https://www.googleapis.com/compute/v1/projects/myproject/global/routes/default-route-c99ebfbed0e1f375", - "id": "7241926205630356071", - "creationTimestamp": "2013-07-08T14:40:38.502-07:00", - "name": "default-route-c99ebfbed0e1f375", - "description": "Default route to the virtual network.", - "network": "https://www.googleapis.com/compute/v1/projects/myproject/global/networks/default", - "destRange": "10.240.0.0/16", - "priority": 1000, - "nextHopNetwork": "https://www.googleapis.com/compute/v1/projects/myproject/global/networks/default", - "tags": [ "fooTag", "barTag" ] -} \ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/897edde8/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/route_insert.json ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/route_insert.json b/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/route_insert.json deleted file mode 100644 index 68fff7d..0000000 --- a/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/route_insert.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"default-route-c99ebfbed0e1f375","description":"Default route to the virtual network.","network":"https://www.googleapis.com/compute/v1/projects/myproject/global/networks/default","destRange":"10.240.0.0/16","priority":1000,"nextHopNetwork":"https://www.googleapis.com/compute/v1/projects/myproject/global/networks/default","tags":["fooTag","barTag"]} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/897edde8/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/route_list.json ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/route_list.json b/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/route_list.json deleted file mode 100644 index 5126ff1..0000000 --- a/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/route_list.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "kind": "compute#routeList", - "selfLink": "https://www.googleapis.com/compute/v1/projects/myproject/global/routes", - "id": "projects/myproject/global/routes", - "items": [ - { - - "kind": "compute#route", - "selfLink": "https://www.googleapis.com/compute/v1/projects/myproject/global/routes/default-route-c99ebfbed0e1f375", - "id": "7241926205630356071", - "creationTimestamp": "2013-07-08T14:40:38.502-07:00", - "name": "default-route-c99ebfbed0e1f375", - "description": "Default route to the virtual network.", - "network": "https://www.googleapis.com/compute/v1/projects/myproject/global/networks/default", - "destRange": "10.240.0.0/16", - "priority": 1000, - "nextHopNetwork": "https://www.googleapis.com/compute/v1/projects/myproject/global/networks/default", - "tags": [ "fooTag", "barTag" ] - }, - { - - "kind": "compute#route", - "selfLink": "https://www.googleapis.com/compute/v1/projects/myproject/global/routes/default-route-fc92a41ecb5a8d17", - "id": "507025480040058551", - "creationTimestamp": "2013-07-08T14:40:38.502-07:00", - "name": "default-route-fc92a41ecb5a8d17", - "description": "Default route to the Internet.", - "network": "https://www.googleapis.com/compute/v1/projects/myproject/global/networks/default", - "destRange": "0.0.0.0/0", - "priority": 1000, - "nextHopGateway": "https://www.googleapis.com/compute/v1/projects/myproject/global/gateways/default-internet-gateway" - } - ] -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/897edde8/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/snapshot_get.json ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/snapshot_get.json b/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/snapshot_get.json deleted file mode 100644 index 3ba287f..0000000 --- a/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/snapshot_get.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - - "kind": "compute#snapshot", - "selfLink": "https://www.googleapis.com/compute/v1/projects/myproject/global/snapshots/test-snap", - "id": "9734455566806191190", - "creationTimestamp": "2013-07-26T12:54:23.173-07:00", - "status": "READY", - "diskSizeGb": "10", - "sourceDisk": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-a/disks/testimage1", - "name": "test-snap", - "description": "", - "sourceDiskId": "8243603669926824540" -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/897edde8/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/snapshot_list.json ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/snapshot_list.json b/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/snapshot_list.json deleted file mode 100644 index 431460f..0000000 --- a/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/snapshot_list.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "kind": "compute#snapshotList", - "selfLink": "https://www.googleapis.com/compute/v1/projects/myproject/global/snapshots", - "id": "projects/myproject/global/snapshots", - "items": [ - { - - "kind": "compute#snapshot", - "selfLink": "https://www.googleapis.com/compute/v1/projects/myproject/global/snapshots/test-snap", - "id": "9734455566806191190", - "creationTimestamp": "2013-07-26T12:54:23.173-07:00", - "status": "READY", - "diskSizeGb": "10", - "sourceDisk": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-a/disks/testimage1", - "name": "test-snap", - "description": "", - "sourceDiskId": "8243603669926824540" - }, - { - - "kind": "compute#snapshot", - "selfLink": "https://www.googleapis.com/compute/v1/projects/myproject/global/snapshots/test-snap2", - "id": "13895715048576107883", - "creationTimestamp": "2013-07-26T12:57:01.927-07:00", - "status": "READY", - "diskSizeGb": "10", - "sourceDisk": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-a/disks/testimage1", - "name": "test-snap2", - "description": "", - "sourceDiskId": "8243603669926824540" - } - ] -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/897edde8/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/tag_insert.json ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/tag_insert.json b/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/tag_insert.json deleted file mode 100644 index 61ade71..0000000 --- a/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/tag_insert.json +++ /dev/null @@ -1 +0,0 @@ -{"items":["aTag"],"fingerprint":"abcd"} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/897edde8/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/testpk.pem ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/testpk.pem b/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/testpk.pem deleted file mode 100644 index 1443074..0000000 --- a/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/testpk.pem +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICXgIBAAKBgQCwqwzakEPP+U9vx9JCuMHebFIVQZ4Sjaj2RU9dJ6YT2s3u7dC6 -/0fGM5xm4fXmSHqyGC6PC8weQSkxnSpbU+R4jMWPM8ML4TIr5wP0avbg+wy3+WWI -of0MN7YHkCfqpaaiKiMw7niK1y07YvxJN8LX1xLpE7aXgIpn6L/qtJdHnQIDAQAB -AoGBAIAHlcsW3W3smPrC7sdXqXeNPHcXFH0RmC7Qz9EMmLiuyqqqQagitFsYr/GH -M3Ltd611BNi5jfUm97ly0m1ZAKp/nkTMVhfKfRIVsBDHtjQHcUOR9tr0LslptmaN -TG0bovbUohe5KwOqMK4YOjUQbInChVBrf7VrNQtv8e0eShdpAkEA3lzLP9QYfP1i -C4iYXqS7cgMDrs3qujC7PoyB54maen+Uvgyau1ZJpKMzXYkORPcYk+b71bl9jF80 -U+7LDnJjPwJBAMtksvL1V8DC5DYL43497JW4KBN4YZ3K7YWx/9gkvc3Q9VdXiUGu -6WKjmcbmsPI/jFdeO71uy934N8qEXLJcyiMCQQCTNKcxWD3l8PCJZiJI9ZFKBwjX -Hmb4X+51mBsfpw7nbbKQplOBFbynC4ujrmoN6e8RaubpNGUTGqvPrNQsejmNAkEA -lUDEAH4BczaQ+QgoXI9ceVG2NvNzzrMHMcC5Ggd8MPhR0VIvKsAMC5I6WjcXSe1Q -Mxy3gf84Ix7u8fHHhCuLOQJAQRhrlXiQUk4cJumNhjza5/+KtaV4FPbEQi+qcWE6 -tGoHPEBfbXyUdcUD4ae8X1W0yri0BuyVNaOCpGCBRIhPZA== ------END RSA PRIVATE KEY----- http://git-wip-us.apache.org/repos/asf/stratos/blob/897edde8/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/tokenResponse.json ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/tokenResponse.json b/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/tokenResponse.json deleted file mode 100644 index 6717a55..0000000 --- a/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/tokenResponse.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "access_token" : "1/8xbJqaOZXSUZbHLl5EOtu1pxz3fmmetKx9W8CV4t79M", - "token_type" : "Bearer", - "expires_in" : 3600 -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/897edde8/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/zone_get.json ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/zone_get.json b/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/zone_get.json deleted file mode 100644 index 50cb375..0000000 --- a/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/zone_get.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "kind": "compute#zone", - "id": "13020128040171887099", - "creationTimestamp": "2012-10-19T16:42:54.131", - "selfLink": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-a", - "name": "us-central1-a", - "description": "us-central1-a", - "status": "DOWN", - "maintenanceWindows": [ - { - "name": "2012-11-10-planned-outage", - "description": "maintenance zone", - "beginTime": "2012-11-10T20:00:00.000", - "endTime": "2012-12-02T20:00:00.000" - } - ] -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/897edde8/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/zone_list.json ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/zone_list.json b/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/zone_list.json deleted file mode 100644 index ee4e17b..0000000 --- a/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/zone_list.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "kind": "compute#zoneList", - "id": "projects/myproject/zones", - "selfLink": "https://www.googleapis.com/compute/v1/projects/myproject/zones", - "items": [ - { - "kind": "compute#zone", - "id": "13020128040171887099", - "creationTimestamp": "2012-10-19T16:42:54.131", - "selfLink": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-a", - "name": "us-central1-a", - "description": "us-central1-a", - "status": "DOWN", - "maintenanceWindows": [ - { - "name": "2012-11-10-planned-outage", - "description": "maintenance zone", - "beginTime": "2012-11-10T20:00:00.000", - "endTime": "2012-12-02T20:00:00.000" - } - ] - }, - { - "kind": "compute#zone", - "id": "13024414164050619686", - "creationTimestamp": "2012-10-24T20:13:19.271", - "selfLink": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-b", - "name": "us-central1-b", - "description": "us-central1-b", - "status": "UP", - "maintenanceWindows": [ - { - "name": "2013-02-17-planned-outage", - "description": "maintenance zone", - "beginTime": "2013-02-17T08:00:00.000", - "endTime": "2013-03-03T08:00:00.000" - } - ] - } - ] -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/897edde8/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/zone_list_short.json ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/zone_list_short.json b/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/zone_list_short.json deleted file mode 100644 index 711af99..0000000 --- a/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/zone_list_short.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "kind": "compute#zoneList", - "id": "projects/myproject/zones", - "selfLink": "https://www.googleapis.com/compute/v1/projects/myproject/zones", - "items": [ - { - "kind": "compute#zone", - "id": "13020128040171887099", - "creationTimestamp": "2012-10-19T16:42:54.131", - "selfLink": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-a", - "name": "us-central1-a", - "description": "us-central1-a", - "status": "DOWN", - "maintenanceWindows": [ - { - "name": "2012-11-10-planned-outage", - "description": "maintenance zone", - "beginTime": "2012-11-10T20:00:00.000", - "endTime": "2012-12-02T20:00:00.000" - } - ] - } - ] -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/897edde8/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/zone_operation.json ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/zone_operation.json b/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/zone_operation.json deleted file mode 100644 index c0c5b56..0000000 --- a/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/zone_operation.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "kind": "compute#operation", - "id": "13053095055850848306", - "selfLink": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-a/operations/operation-1354084865060-4cf88735faeb8-bbbb12cb", - "name": "operation-1354084865060-4cf88735faeb8-bbbb12cb", - "targetLink": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-a/instances/instance-api-live-test-instance", - "targetId": "13053094017547040099", - "status": "DONE", - "user": "[email protected]", - "progress": 100, - "insertTime": "2012-11-28T06:41:05.060", - "startTime": "2012-11-28T06:41:05.142", - "endTime": "2012-11-28T06:41:06.142", - "operationType": "insert", - "zone": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-a" -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/897edde8/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/zone_operation_error.json ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/zone_operation_error.json b/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/zone_operation_error.json deleted file mode 100644 index d6d054a..0000000 --- a/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/zone_operation_error.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "kind": "compute#operation", - "id": "13053095055850848306", - "selfLink": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-a/operations/operation-1354084865060-4cf88735faeb8-bbbb12cb", - "name": "operation-1354084865060-4cf88735faeb8-bbbb12cb", - "targetLink": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-a/instances/instance-api-live-test-instance", - "targetId": "13053094017547040099", - "status": "DONE", - "user": "[email protected]", - "progress": 100, - "insertTime": "2012-11-28T06:41:05.060", - "startTime": "2012-11-28T06:41:05.142", - "httpErrorStatusCode": 400, - "httpErrorMessage": "BAD REQUEST", - "error": { - "errors": [ - { - "code": "RESOURCE_ALREADY_EXISTS", - "message": "The resource 'projects/myproject/zones/us-central1-a/instances/instance-api-live-test-instance' already exists" - } - ] - }, - "operationType": "insert", - "zone": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-a" -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/897edde8/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/zone_operation_list.json ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/zone_operation_list.json b/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/zone_operation_list.json deleted file mode 100644 index 77f1656..0000000 --- a/dependencies/jclouds/apis/gce/1.8.1-stratos/src/test/resources/zone_operation_list.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "kind": "compute#operationList", - "id": "projects/myproject/zones/us-central1-a/operations", - "selfLink": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-a/operations", - "items": [ - { - "kind": "compute#operation", - "id": "13053095055850848306", - "selfLink": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-a/operations/operation-1354084865060-4cf88735faeb8-bbbb12cb", - "name": "operation-1354084865060-4cf88735faeb8-bbbb12cb", - "targetLink": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-a/instances/instance-api-live-test-instance", - "targetId": "13053094017547040099", - "status": "DONE", - "user": "[email protected]", - "progress": 100, - "insertTime": "2012-11-28T06:41:05.060", - "startTime": "2012-11-28T06:41:05.142", - "endTime": "2012-11-28T06:41:06.142", - "operationType": "insert", - "zone": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-a" - } - ] -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/897edde8/dependencies/jclouds/apis/gce/README.md ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/gce/README.md b/dependencies/jclouds/apis/gce/README.md deleted file mode 100644 index feadecc..0000000 --- a/dependencies/jclouds/apis/gce/README.md +++ /dev/null @@ -1,87 +0,0 @@ -Why oauth & google-compute-engine forked? -========================================= - -This code in Stratos is copied from Jclouds GCE [1] -The jclouds GCE code has 2 directories oauth & google-compute-engine -In Stratos, these two directories are mered into one. - -[1] https://github.com/jclouds/jclouds-labs-google/tree/jclouds-labs-google-1.8.1 - -Custom changes -============== - -1) rawDisk can be null for user created private images, hence changing the validation - - -diff --git a/home/rajkumar/workspace/apache/jclouds-labs/jclouds-labs-google-jclouds-labs-google-1.8.1/google-compute-engine/src/main/java/org -index 9ee7ea9..424aaa1 100644 ---- a/home/rajkumar/workspace/apache/jclouds-labs/jclouds-labs-google-jclouds-labs-google-1.8.1/google-compute-engine/src/main/java/org/jcloud -+++ b/dependencies/jclouds/apis/gce/1.8.1-stratos/src/main/java/org/jclouds/googlecomputeengine/domain/Image.java -@@ -49,7 +49,8 @@ public final class Image extends Resource { - String sourceType, RawDisk rawDisk, Deprecated deprecated) { - super(Kind.IMAGE, id, creationTimestamp, selfLink, name, description); - this.sourceType = checkNotNull(sourceType, "sourceType of %s", name); -- this.rawDisk = checkNotNull(rawDisk, "rawDisk of %s", name); -+ // rawDisk may be null for user created private images -+ this.rawDisk = rawDisk; // checkNotNull(rawDisk, "rawDisk of %s", name); - this.deprecated = fromNullable(deprecated); - } - -2) merging google-compute-engine/pom.xml and oauth/pom.xml - -diff --git a/home/rajkumar/workspace/apache/jclouds-labs/jclouds-labs-google-jclouds-labs-google-1.8.1/google-compute-engine/pom.xml b/dependencies/jclouds/apis/gce/1.8.1-stratos/pom.xml -index c1231f1..34f8bc7 100644 ---- a/home/rajkumar/workspace/apache/jclouds-labs/jclouds-labs-google-jclouds-labs-google-1.8.1/google-compute-engine/pom.xml -+++ b/dependencies/jclouds/apis/gce/1.8.1-stratos/pom.xml -@@ -26,12 +26,15 @@ - </parent> - - <!-- TODO: when out of labs, switch to org.jclouds.provider --> -- <groupId>org.apache.jclouds.labs</groupId> -- <artifactId>google-compute-engine</artifactId> -+ <groupId>org.apache.stratos</groupId> -+ <artifactId>gce</artifactId> -+ <version>1.8.1-stratos</version> - <name>jclouds Google Compute Engine provider</name> - <description>jclouds components to access GoogleCompute</description> -+ <packaging>bundle</packaging> - - <properties> -+ <jclouds.version>1.8.1</jclouds.version> - <test.google-compute-engine.identity>Email associated with the Google API client_id - </test.google-compute-engine.identity> - <test.google-compute-engine.credential>Private key (PKCS12 file) associated with the Google API client_id -@@ -39,6 +42,13 @@ - <test.google-compute-engine.api-version>v1</test.google-compute-engine.api-version> - <test.google-compute-engine.build-version /> - <test.google-compute-engine.template>imageId=debian-7-wheezy-v20131120,locationId=us-central1-a,minRam=2048</test.google-compute-engine.template> -+ <jclouds.osgi.export>org.jclouds.googlecomputeengine*;version="${project.version}"</jclouds.osgi.export> -+ <jclouds.osgi.import> -+ org.jclouds.compute.internal;version="${jclouds.version}", -+ org.jclouds.rest.internal;version="${jclouds.version}", -+ org.jclouds*;version="${jclouds.version}", -+ * -+ </jclouds.osgi.import> - </properties> - - <dependencies> -@@ -48,19 +58,6 @@ - <version>${jclouds.version}</version> - </dependency> - <dependency> -- <groupId>org.apache.jclouds.labs</groupId> -- <artifactId>oauth</artifactId> -- <version>${project.version}</version> -- <type>jar</type> -- </dependency> -- <dependency> -- <groupId>org.apache.jclouds.labs</groupId> -- <artifactId>oauth</artifactId> -- <version>${project.version}</version> -- <type>test-jar</type> -- <scope>test</scope> -- </dependency> -- <dependency> - <groupId>org.apache.jclouds</groupId> - <artifactId>jclouds-compute</artifactId> - <version>${jclouds.version}</version> http://git-wip-us.apache.org/repos/asf/stratos/blob/897edde8/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/README.md ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/README.md b/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/README.md deleted file mode 100644 index b3a1c1a..0000000 --- a/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/README.md +++ /dev/null @@ -1,7 +0,0 @@ -OpenStack Neutron -================= - -Neutron is a virtual network service for Openstack. - -Production ready? -Yes http://git-wip-us.apache.org/repos/asf/stratos/blob/897edde8/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/pom.xml ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/pom.xml b/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/pom.xml deleted file mode 100644 index 675323a..0000000 --- a/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/pom.xml +++ /dev/null @@ -1,161 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF 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. - ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.jclouds</groupId> - <artifactId>jclouds-project</artifactId> - <version>1.8.1</version> - </parent> - - <!-- TODO: when out of labs, switch to org.jclouds.api --> - <groupId>org.apache.stratos</groupId> - <artifactId>openstack-neutron</artifactId> - <version>1.8.1-stratosv1</version> - <name>jclouds openstack-neutron api</name> - <description>jclouds components to access an implementation of OpenStack Neutron</description> - <packaging>bundle</packaging> - - <properties> - <jclouds.version>1.8.1</jclouds.version> - <!-- keystone endpoint --> - <test.openstack-neutron.endpoint>http://localhost:5000/v2.0/</test.openstack-neutron.endpoint> - <!-- keystone version --> - <test.openstack-neutron.api-version>2.0</test.openstack-neutron.api-version> - <test.openstack-neutron.build-version/> - <test.openstack-neutron.identity>FIXME_IDENTITY</test.openstack-neutron.identity> - <test.openstack-neutron.credential>FIXME_CREDENTIALS</test.openstack-neutron.credential> - <test.jclouds.keystone.credential-type>passwordCredentials</test.jclouds.keystone.credential-type> - <jclouds.osgi.export>org.jclouds.openstack.neutron.v2*;version="${project.version}"</jclouds.osgi.export> - <jclouds.osgi.import>org.jclouds*;version="${jclouds.version}",*</jclouds.osgi.import> - </properties> - - <repositories> - <repository> - <id>apache-snapshots</id> - <url>https://repository.apache.org/content/repositories/snapshots</url> - <releases> - <enabled>false</enabled> - </releases> - <snapshots> - <enabled>true</enabled> - </snapshots> - </repository> - </repositories> - - <!-- For modernizer, which depends on jclouds-resources snapshot. --> - <pluginRepositories> - <pluginRepository> - <id>apache-snapshots</id> - <url>https://repository.apache.org/content/repositories/snapshots</url> - <releases> - <enabled>false</enabled> - </releases> - <snapshots> - <enabled>true</enabled> - </snapshots> - </pluginRepository> - </pluginRepositories> - - <dependencies> - <dependency> - <groupId>org.apache.jclouds.api</groupId> - <artifactId>openstack-keystone</artifactId> - <version>${jclouds.version}</version> - </dependency> - <dependency> - <groupId>org.apache.jclouds</groupId> - <artifactId>jclouds-core</artifactId> - <version>${jclouds.version}</version> - </dependency> - <dependency> - <groupId>org.apache.jclouds</groupId> - <artifactId>jclouds-core</artifactId> - <version>${jclouds.version}</version> - <type>test-jar</type> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.apache.jclouds.api</groupId> - <artifactId>openstack-keystone</artifactId> - <version>${jclouds.version}</version> - <type>test-jar</type> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.apache.jclouds.driver</groupId> - <artifactId>jclouds-slf4j</artifactId> - <version>${jclouds.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>ch.qos.logback</groupId> - <artifactId>logback-classic</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.squareup.okhttp</groupId> - <artifactId>mockwebserver</artifactId> - <scope>test</scope> - </dependency> - </dependencies> - - <profiles> - <profile> - <id>live</id> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <executions> - <execution> - <id>integration</id> - <phase>integration-test</phase> - <goals> - <goal>test</goal> - </goals> - <configuration> - <systemPropertyVariables> - <test.openstack-neutron.endpoint>${test.openstack-neutron.endpoint} - </test.openstack-neutron.endpoint> - <test.openstack-neutron.api-version>${test.openstack-neutron.api-version} - </test.openstack-neutron.api-version> - <test.openstack-neutron.build-version>${test.openstack-neutron.build-version} - </test.openstack-neutron.build-version> - <test.openstack-neutron.identity>${test.openstack-neutron.identity} - </test.openstack-neutron.identity> - <test.openstack-neutron.credential>${test.openstack-neutron.credential} - </test.openstack-neutron.credential> - <test.jclouds.keystone.credential-type> - ${test.jclouds.keystone.credential-type} - </test.jclouds.keystone.credential-type> - </systemPropertyVariables> - <parallel>classes</parallel> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - </profiles> -</project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/897edde8/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/NeutronApi.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/NeutronApi.java b/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/NeutronApi.java deleted file mode 100644 index 983fe94..0000000 --- a/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/NeutronApi.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF 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.neutron.v2; - -import java.io.Closeable; -import java.util.Set; - -import javax.ws.rs.Path; - -import org.jclouds.Constants; -import org.jclouds.location.Region; -import org.jclouds.location.functions.RegionToEndpoint; -import org.jclouds.openstack.neutron.v2.extensions.FloatingIPApi; -import org.jclouds.openstack.neutron.v2.extensions.RouterApi; -import org.jclouds.openstack.neutron.v2.extensions.SecurityGroupApi; -import org.jclouds.openstack.neutron.v2.extensions.lbaas.v1.LBaaSApi; -import org.jclouds.openstack.neutron.v2.features.NetworkApi; -import org.jclouds.openstack.neutron.v2.features.PortApi; -import org.jclouds.openstack.neutron.v2.features.SubnetApi; -import org.jclouds.openstack.v2_0.features.ExtensionApi; -import org.jclouds.rest.annotations.Delegate; -import org.jclouds.rest.annotations.EndpointParam; - -import com.google.common.base.Optional; -import com.google.inject.Provides; - -/** - * Provides access to the OpenStack Networking (Neutron) v2 API. - */ -@Path("{" + Constants.PROPERTY_API_VERSION + "}") -public interface NeutronApi extends Closeable { - /** - * @return the Region codes configured - */ - @Provides - @Region - Set<String> getConfiguredRegions(); - - /** - * Provides access to Extension features. - */ - @Delegate - ExtensionApi getExtensionApi(@EndpointParam(parser = RegionToEndpoint.class) String region); - - /** - * Provides access to Network features. - */ - @Delegate - NetworkApi getNetworkApi(@EndpointParam(parser = RegionToEndpoint.class) String region); - - /** - * Provides access to Subnet features. - */ - @Delegate - SubnetApi getSubnetApi(@EndpointParam(parser = RegionToEndpoint.class) String region); - - /** - * Provides access to Port features. - */ - @Delegate - PortApi getPortApi(@EndpointParam(parser = RegionToEndpoint.class) String region); - - /** - * Provides access to Router features. - * - * <h3>NOTE</h3> - * This API is an extension that may or may not be present in your OpenStack cloud. Use the Optional return type - * to determine if it is present. - */ - @Delegate - Optional<RouterApi> getRouterApi(@EndpointParam(parser = RegionToEndpoint.class) String region); - - /** - * Provides access to Floating IP features. - * - * <h3>NOTE</h3> - * This API is an extension that may or may not be present in your OpenStack cloud. Use the Optional return type - * to determine if it is present. - */ - @Delegate - Optional<FloatingIPApi> getFloatingIPApi(@EndpointParam(parser = RegionToEndpoint.class) String region); - - /** - * Provides access to SecurityGroup features. - * - * <h3>NOTE</h3> - * This API is an extension that may or may not be present in your OpenStack cloud. Use the Optional return type - * to determine if it is present. - */ - @Delegate - Optional<SecurityGroupApi> getSecurityGroupApi(@EndpointParam(parser = RegionToEndpoint.class) String region); - - /** - * Provides access to LBaaS features. - * - * <h3>NOTE</h3> - * This API is an extension that may or may not be present in your OpenStack cloud. Use the Optional return type - * to determine if it is present. - */ - @Delegate - Optional<LBaaSApi> getLBaaSApi(@EndpointParam(parser = RegionToEndpoint.class) String region); -} http://git-wip-us.apache.org/repos/asf/stratos/blob/897edde8/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/NeutronApiMetadata.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/NeutronApiMetadata.java b/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/NeutronApiMetadata.java deleted file mode 100644 index 043bed8..0000000 --- a/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/NeutronApiMetadata.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF 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.neutron.v2; - -import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.CREDENTIAL_TYPE; -import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.SERVICE_TYPE; - -import java.net.URI; -import java.util.Properties; - -import org.jclouds.apis.ApiMetadata; -import org.jclouds.openstack.keystone.v2_0.config.AuthenticationApiModule; -import org.jclouds.openstack.keystone.v2_0.config.CredentialTypes; -import org.jclouds.openstack.keystone.v2_0.config.KeystoneAuthenticationModule; -import org.jclouds.openstack.keystone.v2_0.config.KeystoneAuthenticationModule.RegionModule; -import org.jclouds.openstack.neutron.v2.config.NeutronHttpApiModule; -import org.jclouds.openstack.v2_0.ServiceType; -import org.jclouds.rest.internal.BaseHttpApiMetadata; - -import com.google.common.collect.ImmutableSet; -import com.google.inject.Module; - -/** - * Implementation of {@link org.jclouds.apis.ApiMetadata} for Neutron 2.0 API - * - */ -public class NeutronApiMetadata extends BaseHttpApiMetadata<NeutronApi> { - - @Override - public Builder toBuilder() { - return new Builder().fromApiMetadata(this); - } - - public NeutronApiMetadata() { - this(new Builder()); - } - - protected NeutronApiMetadata(Builder builder) { - super(builder); - } - - public static Properties defaultProperties() { - Properties properties = BaseHttpApiMetadata.defaultProperties(); - properties.setProperty(SERVICE_TYPE, ServiceType.NETWORK); - properties.setProperty(CREDENTIAL_TYPE, CredentialTypes.PASSWORD_CREDENTIALS); - return properties; - } - - public static class Builder extends BaseHttpApiMetadata.Builder<NeutronApi, Builder> { - - protected Builder() { - super(NeutronApi.class); - id("openstack-neutron") - .name("OpenStack Neutron API") - .identityName("${tenantName}:${userName} or ${userName}, if your keystone supports a default tenant") - .credentialName("${password}") - .endpointName("Neutron base url ending in /v2.0/") - .documentation(URI.create("http://docs.openstack.org/api/openstack-network/2.0/content/")) - .version("v2.0") - .defaultEndpoint("http://localhost:5000/v2.0/") - .defaultProperties(NeutronApiMetadata.defaultProperties()) - .defaultModules(ImmutableSet.<Class<? extends Module>>builder() - .add(AuthenticationApiModule.class) - .add(KeystoneAuthenticationModule.class) - .add(RegionModule.class) - .add(NeutronHttpApiModule.class).build()); - } - - @Override - public NeutronApiMetadata build() { - return new NeutronApiMetadata(this); - } - - @Override - public Builder fromApiMetadata(ApiMetadata in) { - super.fromApiMetadata(in); - return this; - } - - @Override - protected Builder self() { - return this; - } - } - -} http://git-wip-us.apache.org/repos/asf/stratos/blob/897edde8/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/config/NeutronHttpApiModule.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/config/NeutronHttpApiModule.java b/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/config/NeutronHttpApiModule.java deleted file mode 100644 index 90c59f2..0000000 --- a/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/config/NeutronHttpApiModule.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF 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.neutron.v2.config; - -import com.google.common.cache.CacheBuilder; -import com.google.common.cache.CacheLoader; -import com.google.common.cache.LoadingCache; -import com.google.common.collect.ImmutableMultimap; -import com.google.common.collect.Multimap; -import com.google.inject.Provides; -import org.jclouds.http.HttpErrorHandler; -import org.jclouds.http.annotation.ClientError; -import org.jclouds.http.annotation.Redirection; -import org.jclouds.http.annotation.ServerError; -import org.jclouds.json.config.GsonModule.DateAdapter; -import org.jclouds.json.config.GsonModule.Iso8601DateAdapter; -import org.jclouds.openstack.neutron.v2.NeutronApi; -import org.jclouds.openstack.neutron.v2.handlers.NeutronErrorHandler; -import org.jclouds.openstack.v2_0.domain.Extension; -import org.jclouds.openstack.v2_0.functions.PresentWhenExtensionAnnotationNamespaceEqualsAnyNamespaceInExtensionsSet; -import org.jclouds.openstack.neutron.v2.extensions.ExtensionNamespaces; -import org.jclouds.rest.ConfiguresHttpApi; -import org.jclouds.rest.config.HttpApiModule; -import org.jclouds.rest.functions.ImplicitOptionalConverter; - -import javax.inject.Provider; -import javax.inject.Singleton; -import java.net.URI; -import java.util.Set; -import java.util.concurrent.TimeUnit; - -/** - * Configures the Neutron connection. - * - */ -@ConfiguresHttpApi -public class NeutronHttpApiModule extends HttpApiModule<NeutronApi> { - - @Override - protected void configure() { - bind(DateAdapter.class).to(Iso8601DateAdapter.class); - bind(ImplicitOptionalConverter.class).to(PresentWhenExtensionAnnotationNamespaceEqualsAnyNamespaceInExtensionsSet.class); - super.configure(); - } - - @Provides - @Singleton - public Multimap<URI, URI> aliases() { - return ImmutableMultimap.<URI, URI>builder() - .put(URI.create(ExtensionNamespaces.L3_ROUTER), - URI.create("http://docs.openstack.org/ext/neutron/router/api/v1.0")) - .put(URI.create(ExtensionNamespaces.SECURITY_GROUPS), - URI.create("http://docs.openstack.org/ext/securitygroups/api/v2.0")) - .put(URI.create(ExtensionNamespaces.LBAAS), - URI.create("http://docs.openstack.org/networking/ext/lbaas/api/v1.0")) - .build(); - } - - @Provides - @Singleton - public LoadingCache<String, Set<? extends Extension>> provideExtensionsByRegion(final Provider<NeutronApi> neutronApi) { - return CacheBuilder.newBuilder().expireAfterWrite(23, TimeUnit.HOURS) - .build(new CacheLoader<String, Set<? extends Extension>>() { - @Override - public Set<? extends Extension> load(String key) throws Exception { - return neutronApi.get().getExtensionApi(key).list(); - } - }); - } - - @Override - protected void bindErrorHandlers() { - bind(HttpErrorHandler.class).annotatedWith(Redirection.class).to(NeutronErrorHandler.class); - bind(HttpErrorHandler.class).annotatedWith(ClientError.class).to(NeutronErrorHandler.class); - bind(HttpErrorHandler.class).annotatedWith(ServerError.class).to(NeutronErrorHandler.class); - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/897edde8/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/domain/AddressPair.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/domain/AddressPair.java b/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/domain/AddressPair.java deleted file mode 100644 index e2d888c..0000000 --- a/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/domain/AddressPair.java +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF 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.neutron.v2.domain; - -import static com.google.common.base.Preconditions.checkNotNull; - -import java.beans.ConstructorProperties; - -import javax.inject.Named; - -import org.jclouds.javax.annotation.Nullable; - -import com.google.common.base.Objects; - -/** - * Contains a mapping between a MAC address and an IP address. - */ -public class AddressPair { - - @Named("mac_address") - private String macAddress; - @Named("ip_address") - private String ipAddress; - - @ConstructorProperties({"mac_address", "ip_address"}) - protected AddressPair(String macAddress, String ipAddress) { - checkNotNull(macAddress, "mac address should not be null"); - checkNotNull(ipAddress, "ip should not be null"); - this.macAddress = macAddress; - this.ipAddress = ipAddress; - } - - /** - * Copy constructor - * @param addressPair - */ - private AddressPair(AddressPair addressPair) { - this(addressPair.getMacAddress(), addressPair.getIpAddress()); - } - - /** - * Default constructor - */ - private AddressPair() {} - - /** - * @return the macAddress of the AddressPair - */ - @Nullable - public String getMacAddress() { - return macAddress; - } - - /** - * @return the ipAddress of the AddressPair - */ - @Nullable - public String getIpAddress() { - return ipAddress; - } - - @Override - public int hashCode() { - return Objects.hashCode(macAddress, ipAddress); - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null || getClass() != obj.getClass()) - return false; - AddressPair that = AddressPair.class.cast(obj); - return Objects.equal(this.macAddress, that.macAddress) && Objects.equal(this.ipAddress, that.ipAddress); - } - - protected Objects.ToStringHelper string() { - return Objects.toStringHelper(this).add("macAddress", macAddress).add("ipAddress", ipAddress); - } - - @Override - public String toString() { - return string().toString(); - } - - /** - * Returns a builder, but requires the user to specify any parameters required when creating a resource. - * In this case, both parameters are required. - * @return the Builder for AddressPair - */ - public static Builder builder(String macAddress, String ipAddress) { - return new Builder(macAddress, ipAddress); - } - - /** - * Gets a Builder configured as this object. - */ - public Builder toBuilder() { - return new Builder().fromAddressPair(this); - } - - public static class Builder { - // Keep track of the builder's state. - private AddressPair addressPair; - - /** - * No-parameters constructor used when updating. - * */ - private Builder() { - addressPair = new AddressPair(); - } - - /** - * Required parameters constructor used when creating. - * @param macAddress - * @param ipAddress - */ - private Builder(String macAddress, String ipAddress) { - addressPair = new AddressPair(); - addressPair.macAddress = macAddress; - addressPair.ipAddress = ipAddress; - } - - /** - * Provide the macAddress to the AddressPair's Builder. - * - * @return the Builder. - * @see AddressPair#getMacAddress() - */ - public Builder macAddress(String macAddress) { - addressPair.macAddress = macAddress; - return this; - } - - /** - * Provide the ipAddress to the AddressPair's Builder. - * - * @return the Builder. - * @see AddressPair#getIpAddress() - */ - public Builder ipAddress(String ipAddress) { - addressPair.ipAddress = ipAddress; - return this; - } - - /** - * @return a AddressPair constructed with this Builder. - */ - public AddressPair build() { - // Use the copy constructor to copy the builder's state (config) object and pass back to the user. - // Immutability is preserved, and fields are defined only once. - return new AddressPair(addressPair); - } - - /** - * @return a Builder from another AddressPair. - */ - public Builder fromAddressPair(AddressPair in) { - return this.macAddress(in.getMacAddress()).ipAddress(in.getIpAddress()); - } - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/897edde8/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/domain/AllocationPool.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/domain/AllocationPool.java b/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/domain/AllocationPool.java deleted file mode 100644 index 6d20999..0000000 --- a/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/domain/AllocationPool.java +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF 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.neutron.v2.domain; - -import java.beans.ConstructorProperties; - -import org.jclouds.javax.annotation.Nullable; - -import com.google.common.base.Objects; - -/** - * A Neutron Subnet Allocation Pool - * Contains a start and an end IP address describing the pool. - * - * @see <a - * href="http://docs.openstack.org/api/openstack-network/2.0/content/Subnets.html">api - * doc</a> - */ -public class AllocationPool { - - protected final String start; - protected final String end; - - @ConstructorProperties({"start", "end"}) - protected AllocationPool(String start, String end) { - this.start = start; - this.end = end; - } - - /** - * @return the start of the AllocationPool - */ - @Nullable - public String getStart() { - return start; - } - - /** - * @return the end of the AllocationPool - */ - @Nullable - public String getEnd() { - return end; - } - - @Override - public int hashCode() { - return Objects.hashCode(start, end); - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null || getClass() != obj.getClass()) - return false; - AllocationPool that = AllocationPool.class.cast(obj); - return Objects.equal(this.start, that.start) && Objects.equal(this.end, that.end); - } - - protected Objects.ToStringHelper string() { - return Objects.toStringHelper(this).add("start", start).add("end", end); - } - - @Override - public String toString() { - return string().toString(); - } - - /** - * @return the Builder for AllocationPool - */ - public static Builder builder() { - return new Builder(); - } - - /** - * Gets a Builder configured as this object. - */ - public Builder toBuilder() { - return new Builder().fromAllocationPool(this); - } - - public static class Builder { - protected String start; - protected String end; - - /** - * Provide the start to the AllocationPool's Builder. - * - * @return the Builder. - * @see AllocationPool#getStart() - */ - public Builder start(String start) { - this.start = start; - return this; - } - - /** - * Provide the end to the AllocationPool's Builder. - * - * @return the Builder. - * @see AllocationPool#getEnd() - */ - public Builder end(String end) { - this.end = end; - return this; - } - - /** - * @return a AllocationPool constructed with this Builder. - */ - public AllocationPool build() { - return new AllocationPool(start, end); - } - - /** - * @return a Builder from another AllocationPool. - */ - public Builder fromAllocationPool(AllocationPool in) { - return this.start(in.getStart()).end(in.getEnd()); - } - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/897edde8/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/domain/ExternalGatewayInfo.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/domain/ExternalGatewayInfo.java b/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/domain/ExternalGatewayInfo.java deleted file mode 100644 index 4dd6505..0000000 --- a/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/domain/ExternalGatewayInfo.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF 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.neutron.v2.domain; - -import com.google.common.base.Objects; -import org.jclouds.javax.annotation.Nullable; - -import javax.inject.Named; -import java.beans.ConstructorProperties; - -/** - * Information on the external gateway for the router - */ -public class ExternalGatewayInfo { - - @Named("network_id") - protected final String networkId; - @Named("enable_snat") - protected final Boolean enableSnat; - - @ConstructorProperties({"network_id", "enable_snat"}) - protected ExternalGatewayInfo(String networkId, Boolean enableSnat) { - this.networkId = networkId; - this.enableSnat = enableSnat; - } - - /** - * @return the networkId of the ExternalGatewayInfo - */ - @Nullable - public String getNetworkId() { - return networkId; - } - - /** - * @return the enableSnat status of the ExternalGatewayInfo - */ - @Nullable - public Boolean getEnableSnat() { - return enableSnat; - } - - @Override - public int hashCode() { - return Objects.hashCode(networkId, enableSnat); - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - if (o == null || getClass() != o.getClass()) - return false; - - ExternalGatewayInfo that = (ExternalGatewayInfo) o; - - return Objects.equal(this.networkId, that.networkId) && - Objects.equal(this.enableSnat, that.enableSnat); - } - - /** - * @return the Builder for ExternalGatewayInfo - */ - public static Builder builder() { - return new Builder(); - } - - /** - * Gets a Builder configured as this object. - */ - public Builder toBuilder() { - return new Builder().fromExternalGatewayInfo(this); - } - - @Override - public String toString() { - return Objects.toStringHelper(this) - .add("networkId", networkId) - .add("enableSnat", enableSnat) - .toString(); - } - - public static class Builder { - protected String networkId; - protected Boolean enableSnat; - - /** - * Provide the networkId to the ExternalGatewayInfo's Builder. - * - * @return the Builder. - * @see ExternalGatewayInfo#getNetworkId() - */ - public Builder networkId(String networkId) { - this.networkId = networkId; - return this; - } - - /** - * Provide the enableSnat status to the ExternalGatewayInfo's Builder. - * - * @return the Builder. - * @see ExternalGatewayInfo#getEnableSnat() - */ - public Builder enableSnat(Boolean enableSnat) { - this.enableSnat = enableSnat; - return this; - } - - /** - * @return a ExternalGatewayInfo constructed with this Builder. - */ - public ExternalGatewayInfo build() { - return new ExternalGatewayInfo(networkId, enableSnat); - } - - /** - * @return a Builder from another ExternalGatewayInfo. - */ - public Builder fromExternalGatewayInfo(ExternalGatewayInfo in) { - return this.networkId(in.getNetworkId()).enableSnat(in.getEnableSnat()); - } - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/897edde8/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/domain/ExtraDhcpOption.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/domain/ExtraDhcpOption.java b/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/domain/ExtraDhcpOption.java deleted file mode 100644 index 89060f7..0000000 --- a/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/domain/ExtraDhcpOption.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF 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.neutron.v2.domain; - -import com.google.common.base.Objects; -import org.jclouds.javax.annotation.Nullable; - -import javax.inject.Named; -import java.beans.ConstructorProperties; - -/** - * This is used to provide additional DHCP-related options to Subnet. This is - * based on a neutron extension. - * For example PXE boot options to DHCP clients can be specified (e.g. tftp-server, - * server-ip-address, bootfile-name) - * - * @see <a - * href="http://docs.openstack.org/api/openstack-network/2.0/content/Subnets.html">api - * doc</a> - */ -public class ExtraDhcpOption { - - protected final String id; - @Named("opt_name") - protected final String optionName; - @Named("opt_value") - protected final String optionValue; - - @ConstructorProperties({"id", "opt_name", "opt_value"}) - protected ExtraDhcpOption(String id, String optionName, String optionValue) { - this.id = id; - this.optionName = optionName; - this.optionValue = optionValue; - } - - /** - * @return the id of the ExtraDhcpOption - */ - @Nullable - public String getId() { - return id; - } - - /** - * @return the optionName of the ExtraDhcpOption - */ - @Nullable - public String getOptionName() { - return optionName; - } - - /** - * @return the optionValue of the ExtraDhcpOption - */ - @Nullable - public String getOptionValue() { - return optionValue; - } - - @Override - public int hashCode() { - return Objects.hashCode(id, optionName, optionValue); - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null || getClass() != obj.getClass()) - return false; - ExtraDhcpOption that = ExtraDhcpOption.class.cast(obj); - return Objects.equal(this.id, that.id) && Objects.equal(this.optionName, that.optionName) - && Objects.equal(this.optionValue, that.optionValue); - } - - protected Objects.ToStringHelper string() { - return Objects.toStringHelper(this).add("id", id).add("optionName", optionName).add("optionValue", optionValue); - } - - @Override - public String toString() { - return string().toString(); - } - - /** - * @return the Builder for ExtraDhcpOption - */ - public static Builder builder() { - return new Builder(); - } - - /** - * Gets a Builder configured as this object. - */ - public Builder toBuilder() { - return new Builder().fromExtraDhcpOption(this); - } - - public static class Builder { - protected String id; - protected String optionName; - protected String optionValue; - - /** - * Provide the id to the ExtraDhcpOption's Builder. - * - * @return the Builder. - * @see ExtraDhcpOption#getId() - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Provide the optionName to the ExtraDhcpOption's Builder. - * - * @return the Builder. - * @see ExtraDhcpOption#getOptionName() - */ - public Builder optionName(String optionName) { - this.optionName = optionName; - return this; - } - - /** - * Provide the optionValue to the ExtraDhcpOption's Builder. - * - * @return the Builder. - * @see ExtraDhcpOption#getOptionValue() - */ - public Builder optionValue(String optionValue) { - this.optionValue = optionValue; - return this; - } - - /** - * @return a ExtraDhcpOption constructed with this Builder. - */ - public ExtraDhcpOption build() { - return new ExtraDhcpOption(id, optionName, optionValue); - } - - /** - * @return a Builder from another ExtraDhcpOption. - */ - public Builder fromExtraDhcpOption(ExtraDhcpOption in) { - return this.id(in.getId()).optionName(in.getOptionName()).optionValue(in.getOptionValue()); - } - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/897edde8/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/domain/FloatingIP.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/domain/FloatingIP.java b/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/domain/FloatingIP.java deleted file mode 100644 index fa5a8b5..0000000 --- a/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/domain/FloatingIP.java +++ /dev/null @@ -1,315 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF 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.neutron.v2.domain; - -import java.beans.ConstructorProperties; -import javax.inject.Named; - -import org.jclouds.javax.annotation.Nullable; -import com.google.common.base.Objects; - -/** - * A Neutron Floating IP - * - */ -public class FloatingIP { - - private String id; - @Named("router_id") - private String routerId; - @Named("tenant_id") - private String tenantId; - // Only mandatory attribute when creating - @Named("floating_network_id") - private String floatingNetworkId; - @Named("fixed_ip_address") - private String fixedIpAddress; - @Named("floating_ip_address") - private String floatingIpAddress; - @Named("port_id") - private String portId; - - /** - * Deserialization constructor - */ - @ConstructorProperties({"id", "router_id", "tenant_id", "floating_network_id", "fixed_ip_address", - "floating_ip_address", "port_id"}) - private FloatingIP(String id, String routerId, String tenantId, String floatingNetworkId, String fixedIpAddress, - String floatingIpAddress, String portId) { - this.id = id; - this.routerId = routerId; - this.tenantId = tenantId; - this.floatingNetworkId = floatingNetworkId; - this.fixedIpAddress = fixedIpAddress; - this.floatingIpAddress = floatingIpAddress; - this.portId = portId; - } - - private FloatingIP() {} - - /** - * @param floatingIP The floating IP to copy from - */ - private FloatingIP(FloatingIP floatingIP) { - this(floatingIP.id, floatingIP.routerId, floatingIP.tenantId, floatingIP.floatingNetworkId, - floatingIP.fixedIpAddress, floatingIP.floatingIpAddress, floatingIP.portId); - } - - /** - * @return the id of the floating IP - */ - @Nullable - public String getId() { - return id; - } - - /** - * @return the router id of this floating IP - */ - @Nullable - public String getRouterId() { - return routerId; - } - - /** - * @return the tenant id of the Floating IP - */ - @Nullable - public String getTenantId() { - return tenantId; - } - - /** - * @return the floating network id for this floating IP - */ - @Nullable - public String getFloatingNetworkId() { - return floatingNetworkId; - } - - /** - * @return the fixed IP address for this floating IP - */ - @Nullable - public String getFixedIpAddress() { - return fixedIpAddress; - } - - /** - * @return the floating IP address for this floating IP - */ - @Nullable - public String getFloatingIpAddress() { - return floatingIpAddress; - } - - /** - * @return the port id for this floating IP - */ - @Nullable - public String getPortId() { - return portId; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - if (o == null || getClass() != o.getClass()) - return false; - - FloatingIP that = (FloatingIP) o; - - return Objects.equal(this.id, that.id) && - Objects.equal(this.routerId, that.routerId) && - Objects.equal(this.tenantId, that.tenantId) && - Objects.equal(this.floatingNetworkId, that.floatingNetworkId) && - Objects.equal(this.fixedIpAddress, that.fixedIpAddress) && - Objects.equal(this.floatingIpAddress, that.floatingIpAddress) && - Objects.equal(this.portId, that.portId); - } - - @Override - public int hashCode() { - return Objects.hashCode(id, routerId, tenantId, floatingNetworkId, fixedIpAddress, floatingIpAddress, - portId); - } - - @Override - public String toString() { - return Objects.toStringHelper(this) - .add("id", id) - .add("routerId", routerId) - .add("tenantId", tenantId) - .add("floatingNetworkId", floatingNetworkId) - .add("fixedIpAddress", fixedIpAddress) - .add("floatingIpAddress", floatingIpAddress) - .add("portId", portId) - .toString(); - } - - /** - * @return the Builder for creating a new floating IP - */ - public static CreateBuilder createBuilder(String floatingNetworkId) { - return new CreateBuilder(floatingNetworkId); - } - - /** - * @return the Builder for updating a floating IP - */ - public static UpdateBuilder updateBuilder() { - return new UpdateBuilder(); - } - - private abstract static class Builder<ParameterizedBuilderType> { - protected FloatingIP floatingIP; - - /** - * No-parameters constructor. - * */ - private Builder() { - floatingIP = new FloatingIP(); - } - - protected abstract ParameterizedBuilderType self(); - - /** - * Provide the tenantId for this Floating IP. Admin-only. - * When keystone is enabled, it is not mandatory to specify tenant_id for resources in create requests, as the - * tenant identifier will be derived from the Authentication token. Please note that the default authorization - * settings only allow administrative users to create resources on behalf of a different tenant. - * - * @return the Builder. - * @see FloatingIP#getTenantId() - */ - public ParameterizedBuilderType tenantId(String tenantId) { - floatingIP.tenantId = tenantId; - return self(); - } - - /** - * Provides the floating network id for this Floating IP. - * Mandatory when creating a floating IP. - * Floating IPs can only be created on external networks. If the network specified by floating_network_id is not - * external (for example, router:external=false), a 400 error is returned. - * - * @return the Builder. - * @see FloatingIP#getFloatingNetworkId() () - */ - public ParameterizedBuilderType floatingNetworkId(String floatingNetworkId) { - floatingIP.floatingNetworkId = floatingNetworkId; - return self(); - } - - /** - * Provides the fixed ip address for this Floating IP. - * As an OpenStack Networking port might be associated with multiple IP addresses, the particular IP address to - * associate with the floating IP can be specified using the fixed_ip_address request body parameter. The default - * logic of this operation is to associate the floating IP with a single IP address configured on a port; hence, - * if a port has multiple IP addresses, it is mandatory to specify the fixed_ip_address attribute. If an invalid - * IP address is specified in fixed_ip_address a 400 error will be returned. - * - * @return the Builder. - * @see FloatingIP#getFixedIpAddress() - */ - public ParameterizedBuilderType fixedIpAddress(String fixedIpAddress) { - floatingIP.fixedIpAddress = fixedIpAddress; - return self(); - } - - /** - * Provides the port id for this Floating IP. - * Users can associate the floating IP with an internal port using the port_id attribute in the request body. - * If an invalid port identifier is specified, a 404 error will be returned. The internal OpenStack Networking - * port associated with the Floating IP must have at least an IP address configured, otherwise a 400 error will - * be returned. - * - * @return the Builder. - * @see FloatingIP#getPortId() - */ - public ParameterizedBuilderType portId(String portId) { - floatingIP.portId = portId; - return self(); - } - } - - public static class CreateBuilder extends Builder<CreateBuilder> { - /** - * Supply required properties for creating a Builder - */ - private CreateBuilder(String floatingNetworkId) { - floatingIP.floatingNetworkId = floatingNetworkId; - } - - /** - * @return a CreateFloatingIP constructed with this Builder. - */ - public CreateFloatingIP build() { - return new CreateFloatingIP(floatingIP); - } - - protected CreateBuilder self() { - return this; - } - } - - public static class UpdateBuilder extends Builder<UpdateBuilder> { - /** - * Supply required properties for updating a Builder - */ - private UpdateBuilder() { - } - - /** - * Provide the floating ip address for this Floating IP. - * An address for the floating ip will be automatically allocated, unless the floating_ip_address attribute is - * specified in the request body. If the requested floating IP address does not fall in the external network's - * subnet range, a 400 error will be returned. If the requested floating IP address is already in use, a 409 - * error code will be returned. - * - * @return the Builder. - * @see FloatingIP#getFloatingIpAddress() - */ - public UpdateBuilder floatingIpAddress(String floatingIpAddress) { - floatingIP.floatingIpAddress = floatingIpAddress; - return this; - } - - /** - * @return a UpdateFloatingIP constructed with this Builder. - */ - public UpdateFloatingIP build() { - return new UpdateFloatingIP(floatingIP); - } - - protected UpdateBuilder self() { - return this; - } - } - - public static class CreateFloatingIP extends FloatingIP { - private CreateFloatingIP(FloatingIP floatingIP) { - super(floatingIP); - } - } - public static class UpdateFloatingIP extends FloatingIP { - private UpdateFloatingIP(FloatingIP floatingIP) { - super(floatingIP); - } - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/897edde8/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/domain/FloatingIPs.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/domain/FloatingIPs.java b/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/domain/FloatingIPs.java deleted file mode 100644 index 8befa3e..0000000 --- a/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/domain/FloatingIPs.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF 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.neutron.v2.domain; - -import java.beans.ConstructorProperties; - -import org.jclouds.openstack.v2_0.domain.Link; -import org.jclouds.openstack.v2_0.domain.PaginatedCollection; - -import com.google.common.collect.ImmutableSet; - -/** - * A collection of Floating IPs - */ -public class FloatingIPs extends PaginatedCollection<FloatingIP> { - public static final FloatingIPs EMPTY = new FloatingIPs(ImmutableSet.<FloatingIP> of(), ImmutableSet.<Link> of()); - - @ConstructorProperties({"floatingips", "floatingips_links"}) - protected FloatingIPs(Iterable<FloatingIP> floatingIPs, Iterable<Link> floatingIPsLinks) { - super(floatingIPs, floatingIPsLinks); - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/897edde8/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/domain/HostRoute.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/domain/HostRoute.java b/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/domain/HostRoute.java deleted file mode 100644 index 6ff0ddc..0000000 --- a/dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/domain/HostRoute.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF 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.neutron.v2.domain; - -import java.beans.ConstructorProperties; - -import javax.inject.Named; - -import org.jclouds.javax.annotation.Nullable; - -import com.google.common.base.Objects; -import com.google.common.base.Objects.ToStringHelper; - -/** - * A Neutron Subnet Host Route - * - * @see <a href="http://docs.openstack.org/api/openstack-network/2.0/content/Subnets.html">api doc</a> - */ -public class HostRoute { - - @Named("destination") - private final String destinationCidr; - @Named("nexthop") - private final String nextHop; - - @ConstructorProperties({"destination", "nexthop"}) - protected HostRoute(String destinationCidr, String nextHop) { - this.destinationCidr = destinationCidr; - this.nextHop = nextHop; - } - - /** - * @return the destination CIDR for this route. - */ - @Nullable - public String getDestinationCidr() { - return destinationCidr; - } - - /** - * @return the IP of the next hop to forward traffic to. - */ - @Nullable - public String getNextHop() { - return nextHop; - } - - @Override - public int hashCode() { - return Objects.hashCode(destinationCidr, nextHop); - } - - @Override - public boolean equals(Object obj) { - if (this == obj) return true; - if (obj == null || getClass() != obj.getClass()) return false; - HostRoute that = HostRoute.class.cast(obj); - return Objects.equal(this.destinationCidr, that.destinationCidr) && Objects.equal(this.nextHop, that.nextHop); - } - - protected ToStringHelper string() { - return Objects.toStringHelper(this) - .add("destinationCidr", destinationCidr).add("nextHop", nextHop); - } - - @Override - public String toString() { - return string().toString(); - } - - public static Builder builder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder().fromHostRoute(this); - } - - public static class Builder { - protected String destinationCidr; - protected String nextHop; - - /** - * This should be a valid CIDR. - * @see HostRoute#getDestinationCidr() - */ - public Builder destinationCidr(String destinationCidr) { - this.destinationCidr = destinationCidr; - return this; - } - - /** - * This should be a valid IP address. - * @see HostRoute#getNextHop() - */ - public Builder nextHop(String nextHop) { - this.nextHop = nextHop; - return this; - } - - public HostRoute build() { - return new HostRoute(destinationCidr, nextHop); - } - - public Builder fromHostRoute(HostRoute in) { - return this.destinationCidr(in.getDestinationCidr()).nextHop(in.getNextHop()); - } - } -}
