From 1b2c121f133b15d0fe3f6ebdb131ac9998bc4b83 Mon Sep 17 00:00:00 2001 From: Phil Day Date: Thu, 4 Apr 2013 18:00:49 +0100 Subject: Allow a floating IP to be associated to a specific fixed IP The current floating IP API extension only accepts the instance ID and the floating address to be assigned. Where the instance is connected to more than one network the behaviour is to associated the floating IP with the first fixed IP of the instances (and to log a warning) This change introduces a new extension which wehn loaded adds a fixed IP address as an optional parameter, allowing the floating IP to be associated with a specific fixed IP. Without this extension, or without the optional parameters, the API behaviour is unchanged. If specified the fixed IP must be associated with the instance. DocImpact Implements blueprint multi-nic-floating-ip-assignment Change-Id: I9241137ad794cdf7f452ed84e9445f0e11fdd44e --- .../all_extensions/extensions-get-resp.json | 8 ++++++++ doc/api_samples/all_extensions/extensions-get-resp.xml | 3 +++ .../floating-ips-create-nopool-req.json | 0 .../floating-ips-create-nopool-req.xml | 0 .../floating-ips-create-req.json | 3 +++ .../floating-ips-create-req.xml | 2 ++ .../floating-ips-create-resp.json | 9 +++++++++ .../floating-ips-create-resp.xml | 2 ++ .../floating-ips-list-empty-resp.json | 3 +++ .../floating-ips-list-empty-resp.xml | 2 ++ .../floating-ips-list-resp.json | 18 ++++++++++++++++++ .../floating-ips-list-resp.xml | 5 +++++ 12 files changed, 55 insertions(+) create mode 100644 doc/api_samples/os-extended-floating-ips/floating-ips-create-nopool-req.json create mode 100644 doc/api_samples/os-extended-floating-ips/floating-ips-create-nopool-req.xml create mode 100644 doc/api_samples/os-extended-floating-ips/floating-ips-create-req.json create mode 100644 doc/api_samples/os-extended-floating-ips/floating-ips-create-req.xml create mode 100644 doc/api_samples/os-extended-floating-ips/floating-ips-create-resp.json create mode 100644 doc/api_samples/os-extended-floating-ips/floating-ips-create-resp.xml create mode 100644 doc/api_samples/os-extended-floating-ips/floating-ips-list-empty-resp.json create mode 100644 doc/api_samples/os-extended-floating-ips/floating-ips-list-empty-resp.xml create mode 100644 doc/api_samples/os-extended-floating-ips/floating-ips-list-resp.json create mode 100644 doc/api_samples/os-extended-floating-ips/floating-ips-list-resp.xml (limited to 'doc') diff --git a/doc/api_samples/all_extensions/extensions-get-resp.json b/doc/api_samples/all_extensions/extensions-get-resp.json index df8ed83e5..d7c2a646c 100644 --- a/doc/api_samples/all_extensions/extensions-get-resp.json +++ b/doc/api_samples/all_extensions/extensions-get-resp.json @@ -232,6 +232,14 @@ "namespace": "http://docs.openstack.org/compute/ext/evacuate/api/v2", "updated": "2013-01-06T00:00:00+00:00" }, + { + "alias": "os-extended-floating-ips", + "description": "Adds optional fixed_address to the add floating IP command.", + "links": [], + "name": "ExtendedFloatingIps", + "namespace": "http://docs.openstack.org/compute/ext/extended_floating_ips/api/v2", + "updated": "2013-04-19T00:00:00+00:00" + }, { "alias": "os-fixed-ips", "description": "Fixed IPs support.", diff --git a/doc/api_samples/all_extensions/extensions-get-resp.xml b/doc/api_samples/all_extensions/extensions-get-resp.xml index 1ec2010dc..f6213a3a9 100644 --- a/doc/api_samples/all_extensions/extensions-get-resp.xml +++ b/doc/api_samples/all_extensions/extensions-get-resp.xml @@ -103,6 +103,9 @@ Enables server evacuation. + + Adds optional fixed_address to the add floating IP command. + Fixed IPs support. diff --git a/doc/api_samples/os-extended-floating-ips/floating-ips-create-nopool-req.json b/doc/api_samples/os-extended-floating-ips/floating-ips-create-nopool-req.json new file mode 100644 index 000000000..e69de29bb diff --git a/doc/api_samples/os-extended-floating-ips/floating-ips-create-nopool-req.xml b/doc/api_samples/os-extended-floating-ips/floating-ips-create-nopool-req.xml new file mode 100644 index 000000000..e69de29bb diff --git a/doc/api_samples/os-extended-floating-ips/floating-ips-create-req.json b/doc/api_samples/os-extended-floating-ips/floating-ips-create-req.json new file mode 100644 index 000000000..511b009be --- /dev/null +++ b/doc/api_samples/os-extended-floating-ips/floating-ips-create-req.json @@ -0,0 +1,3 @@ +{ + "pool": "nova" +} \ No newline at end of file diff --git a/doc/api_samples/os-extended-floating-ips/floating-ips-create-req.xml b/doc/api_samples/os-extended-floating-ips/floating-ips-create-req.xml new file mode 100644 index 000000000..f77525e74 --- /dev/null +++ b/doc/api_samples/os-extended-floating-ips/floating-ips-create-req.xml @@ -0,0 +1,2 @@ + +nova \ No newline at end of file diff --git a/doc/api_samples/os-extended-floating-ips/floating-ips-create-resp.json b/doc/api_samples/os-extended-floating-ips/floating-ips-create-resp.json new file mode 100644 index 000000000..fe161a7dd --- /dev/null +++ b/doc/api_samples/os-extended-floating-ips/floating-ips-create-resp.json @@ -0,0 +1,9 @@ +{ + "floating_ip": { + "fixed_ip": null, + "id": 1, + "instance_id": null, + "ip": "10.10.10.1", + "pool": "nova" + } +} \ No newline at end of file diff --git a/doc/api_samples/os-extended-floating-ips/floating-ips-create-resp.xml b/doc/api_samples/os-extended-floating-ips/floating-ips-create-resp.xml new file mode 100644 index 000000000..e0f68ef50 --- /dev/null +++ b/doc/api_samples/os-extended-floating-ips/floating-ips-create-resp.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/doc/api_samples/os-extended-floating-ips/floating-ips-list-empty-resp.json b/doc/api_samples/os-extended-floating-ips/floating-ips-list-empty-resp.json new file mode 100644 index 000000000..121dbd084 --- /dev/null +++ b/doc/api_samples/os-extended-floating-ips/floating-ips-list-empty-resp.json @@ -0,0 +1,3 @@ +{ + "floating_ips": [] +} \ No newline at end of file diff --git a/doc/api_samples/os-extended-floating-ips/floating-ips-list-empty-resp.xml b/doc/api_samples/os-extended-floating-ips/floating-ips-list-empty-resp.xml new file mode 100644 index 000000000..da6f0d4ce --- /dev/null +++ b/doc/api_samples/os-extended-floating-ips/floating-ips-list-empty-resp.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/doc/api_samples/os-extended-floating-ips/floating-ips-list-resp.json b/doc/api_samples/os-extended-floating-ips/floating-ips-list-resp.json new file mode 100644 index 000000000..4d58e0676 --- /dev/null +++ b/doc/api_samples/os-extended-floating-ips/floating-ips-list-resp.json @@ -0,0 +1,18 @@ +{ + "floating_ips": [ + { + "fixed_ip": null, + "id": 1, + "instance_id": null, + "ip": "10.10.10.1", + "pool": "nova" + }, + { + "fixed_ip": null, + "id": 2, + "instance_id": null, + "ip": "10.10.10.2", + "pool": "nova" + } + ] +} \ No newline at end of file diff --git a/doc/api_samples/os-extended-floating-ips/floating-ips-list-resp.xml b/doc/api_samples/os-extended-floating-ips/floating-ips-list-resp.xml new file mode 100644 index 000000000..78348be55 --- /dev/null +++ b/doc/api_samples/os-extended-floating-ips/floating-ips-list-resp.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file -- cgit