From d911fcc96f543a65592033ff66bf6da066c854f8 Mon Sep 17 00:00:00 2001 From: Chris Yeoh Date: Mon, 17 Dec 2012 10:40:06 +1030 Subject: [PATCH] Add more association support to network API Adds API support to: - Disassociate only host from network - Disassociate only project from network - Associate network with host (project already supported) New functionality is added to a new extension networks_associate, but the original networks extension is modified to allow networks_associate to extend how it needs to. The original behavior of the networks extension is preserved (no new functionality, nor change in existing behavior) in terms of the API presented. Bumps RPC API version for network RPC server version in order add the associate function which allows to both associate and disassociate a network with a host and or tenant. Has overlap with disassociate and add_network_to_project but these are kept for backwards compatibility DocImpact Implmenents: blueprint apis-for-nova-manage Change-Id: I78fd76e0696d1c872646355ab04d32f051551def --- doc/api_samples/all_extensions/extensions-get-resp.json | 8 ++++++++ doc/api_samples/all_extensions/extensions-get-resp.xml | 3 +++ .../os-networks-associate/network-associate-host-req.json | 3 +++ .../os-networks-associate/network-associate-host-req.xml | 2 ++ .../network-disassociate-host-req.json | 3 +++ .../network-disassociate-host-req.xml | 1 + .../network-disassociate-project-req.json | 3 +++ .../network-disassociate-project-req.xml | 1 + .../os-networks-associate/network-disassociate-req.json | 3 +++ .../os-networks-associate/network-disassociate-req.xml | 1 + 10 files changed, 28 insertions(+) create mode 100644 doc/api_samples/os-networks-associate/network-associate-host-req.json create mode 100644 doc/api_samples/os-networks-associate/network-associate-host-req.xml create mode 100644 doc/api_samples/os-networks-associate/network-disassociate-host-req.json create mode 100644 doc/api_samples/os-networks-associate/network-disassociate-host-req.xml create mode 100644 doc/api_samples/os-networks-associate/network-disassociate-project-req.json create mode 100644 doc/api_samples/os-networks-associate/network-disassociate-project-req.xml create mode 100644 doc/api_samples/os-networks-associate/network-disassociate-req.json create mode 100644 doc/api_samples/os-networks-associate/network-disassociate-req.xml diff --git a/doc/api_samples/all_extensions/extensions-get-resp.json b/doc/api_samples/all_extensions/extensions-get-resp.json index 79211b946..b85fae2de 100644 --- a/doc/api_samples/all_extensions/extensions-get-resp.json +++ b/doc/api_samples/all_extensions/extensions-get-resp.json @@ -296,6 +296,14 @@ "namespace": "http://docs.openstack.org/compute/ext/networks/api/v1.1", "updated": "2011-12-23T00:00:00+00:00" }, + { + "alias": "os-networks-associate", + "description": "Network association support", + "links": [], + "name": "NetworkAssociationSupport", + "namespace": "http://docs.openstack.org/compute/ext/networks_associate/api/v2", + "updated": "2012-11-19T00:00:00+00:00" + }, { "alias": "os-quota-class-sets", "description": "Quota classes management support", diff --git a/doc/api_samples/all_extensions/extensions-get-resp.xml b/doc/api_samples/all_extensions/extensions-get-resp.xml index 6c53c875b..049498fc4 100644 --- a/doc/api_samples/all_extensions/extensions-get-resp.xml +++ b/doc/api_samples/all_extensions/extensions-get-resp.xml @@ -125,6 +125,9 @@ Admin-only Network Management Extension + + Network association support + Quota classes management support diff --git a/doc/api_samples/os-networks-associate/network-associate-host-req.json b/doc/api_samples/os-networks-associate/network-associate-host-req.json new file mode 100644 index 000000000..a6487211e --- /dev/null +++ b/doc/api_samples/os-networks-associate/network-associate-host-req.json @@ -0,0 +1,3 @@ +{ + "associate_host": "testHost" +} \ No newline at end of file diff --git a/doc/api_samples/os-networks-associate/network-associate-host-req.xml b/doc/api_samples/os-networks-associate/network-associate-host-req.xml new file mode 100644 index 000000000..3221be61d --- /dev/null +++ b/doc/api_samples/os-networks-associate/network-associate-host-req.xml @@ -0,0 +1,2 @@ + +testHost \ No newline at end of file diff --git a/doc/api_samples/os-networks-associate/network-disassociate-host-req.json b/doc/api_samples/os-networks-associate/network-disassociate-host-req.json new file mode 100644 index 000000000..d6c5419fd --- /dev/null +++ b/doc/api_samples/os-networks-associate/network-disassociate-host-req.json @@ -0,0 +1,3 @@ +{ + "disassociate_host": null +} \ No newline at end of file diff --git a/doc/api_samples/os-networks-associate/network-disassociate-host-req.xml b/doc/api_samples/os-networks-associate/network-disassociate-host-req.xml new file mode 100644 index 000000000..3c2cc0d84 --- /dev/null +++ b/doc/api_samples/os-networks-associate/network-disassociate-host-req.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/doc/api_samples/os-networks-associate/network-disassociate-project-req.json b/doc/api_samples/os-networks-associate/network-disassociate-project-req.json new file mode 100644 index 000000000..6c0e46730 --- /dev/null +++ b/doc/api_samples/os-networks-associate/network-disassociate-project-req.json @@ -0,0 +1,3 @@ +{ + "disassociate_project": null +} \ No newline at end of file diff --git a/doc/api_samples/os-networks-associate/network-disassociate-project-req.xml b/doc/api_samples/os-networks-associate/network-disassociate-project-req.xml new file mode 100644 index 000000000..be94feb9f --- /dev/null +++ b/doc/api_samples/os-networks-associate/network-disassociate-project-req.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/doc/api_samples/os-networks-associate/network-disassociate-req.json b/doc/api_samples/os-networks-associate/network-disassociate-req.json new file mode 100644 index 000000000..66ab7cef0 --- /dev/null +++ b/doc/api_samples/os-networks-associate/network-disassociate-req.json @@ -0,0 +1,3 @@ +{ + "disassociate": null +} \ No newline at end of file diff --git a/doc/api_samples/os-networks-associate/network-disassociate-req.xml b/doc/api_samples/os-networks-associate/network-disassociate-req.xml new file mode 100644 index 000000000..bcad8e0a8 --- /dev/null +++ b/doc/api_samples/os-networks-associate/network-disassociate-req.xml @@ -0,0 +1 @@ + \ No newline at end of file