diff --git a/doc/api_samples/os-extended-networks/network-create-req.json b/doc/api_samples/os-extended-networks/network-create-req.json deleted file mode 100644 index 18515bd6c494..000000000000 --- a/doc/api_samples/os-extended-networks/network-create-req.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "network": { - "label": "new net 111", - "cidr": "10.20.105.0/24", - "mtu": 9000, - "dhcp_server": "10.20.105.2", - "enable_dhcp": false, - "share_address": true, - "allowed_start": "10.20.105.10", - "allowed_end": "10.20.105.200" - } -} diff --git a/doc/api_samples/os-extended-networks/network-create-resp.json b/doc/api_samples/os-extended-networks/network-create-resp.json deleted file mode 100644 index 4364e50b2d64..000000000000 --- a/doc/api_samples/os-extended-networks/network-create-resp.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "network": { - "bridge": null, - "bridge_interface": null, - "broadcast": "10.20.105.255", - "cidr": "10.20.105.0/24", - "cidr_v6": null, - "created_at": null, - "deleted": null, - "deleted_at": null, - "dhcp_server": "10.20.105.2", - "dhcp_start": "10.20.105.2", - "dns1": null, - "dns2": null, - "enable_dhcp": false, - "gateway": "10.20.105.1", - "gateway_v6": null, - "host": null, - "id": "d7a17c0c-457e-4ab4-a99c-4fa1762f5359", - "injected": null, - "label": "new net 111", - "mtu": 9000, - "multi_host": null, - "netmask": "255.255.255.0", - "netmask_v6": null, - "priority": null, - "project_id": null, - "rxtx_base": null, - "share_address": true, - "updated_at": null, - "vlan": null, - "vpn_private_address": null, - "vpn_public_address": null, - "vpn_public_port": null - } -} \ No newline at end of file diff --git a/doc/api_samples/os-extended-networks/network-show-resp.json b/doc/api_samples/os-extended-networks/network-show-resp.json deleted file mode 100644 index 9741395c639b..000000000000 --- a/doc/api_samples/os-extended-networks/network-show-resp.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "network": { - "bridge": "br100", - "bridge_interface": "eth0", - "broadcast": "10.0.0.7", - "cidr": "10.0.0.0/29", - "cidr_v6": null, - "created_at": "2011-08-15T06:19:19.387525", - "deleted": false, - "deleted_at": null, - "dhcp_server": "10.0.0.1", - "dhcp_start": "10.0.0.3", - "dns1": null, - "dns2": null, - "enable_dhcp": true, - "gateway": "10.0.0.1", - "gateway_v6": null, - "host": "nsokolov-desktop", - "id": "20c8acc0-f747-4d71-a389-46d078ebf047", - "injected": false, - "label": "mynet_0", - "mtu": null, - "multi_host": false, - "netmask": "255.255.255.248", - "netmask_v6": null, - "priority": null, - "project_id": "1234", - "rxtx_base": null, - "share_address": false, - "updated_at": "2011-08-16T09:26:13.048257", - "vlan": 100, - "vpn_private_address": "10.0.0.2", - "vpn_public_address": "127.0.0.1", - "vpn_public_port": 1000 - } -} \ No newline at end of file diff --git a/doc/api_samples/os-extended-networks/networks-list-resp.json b/doc/api_samples/os-extended-networks/networks-list-resp.json deleted file mode 100644 index 49bdad58266d..000000000000 --- a/doc/api_samples/os-extended-networks/networks-list-resp.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "networks": [ - { - "bridge": "br100", - "bridge_interface": "eth0", - "broadcast": "10.0.0.7", - "cidr": "10.0.0.0/29", - "cidr_v6": null, - "created_at": "2011-08-15T06:19:19.387525", - "deleted": false, - "deleted_at": null, - "dhcp_server": "10.0.0.1", - "dhcp_start": "10.0.0.3", - "dns1": null, - "dns2": null, - "enable_dhcp": true, - "gateway": "10.0.0.1", - "gateway_v6": null, - "host": "nsokolov-desktop", - "id": "20c8acc0-f747-4d71-a389-46d078ebf047", - "injected": false, - "label": "mynet_0", - "mtu": null, - "multi_host": false, - "netmask": "255.255.255.248", - "netmask_v6": null, - "priority": null, - "project_id": "1234", - "rxtx_base": null, - "share_address": false, - "updated_at": "2011-08-16T09:26:13.048257", - "vlan": 100, - "vpn_private_address": "10.0.0.2", - "vpn_public_address": "127.0.0.1", - "vpn_public_port": 1000 - }, - { - "bridge": "br101", - "bridge_interface": "eth0", - "broadcast": "10.0.0.15", - "cidr": "10.0.0.10/29", - "cidr_v6": null, - "created_at": "2011-08-15T06:19:19.885495", - "deleted": false, - "deleted_at": null, - "dhcp_server": "10.0.0.9", - "dhcp_start": "10.0.0.11", - "dns1": null, - "dns2": null, - "enable_dhcp": true, - "gateway": "10.0.0.9", - "gateway_v6": null, - "host": null, - "id": "20c8acc0-f747-4d71-a389-46d078ebf000", - "injected": false, - "label": "mynet_1", - "mtu": null, - "multi_host": false, - "netmask": "255.255.255.248", - "netmask_v6": null, - "priority": null, - "project_id": null, - "rxtx_base": null, - "share_address": false, - "updated_at": null, - "vlan": 101, - "vpn_private_address": "10.0.0.10", - "vpn_public_address": null, - "vpn_public_port": 1001 - } - ] -} \ No newline at end of file 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 deleted file mode 100644 index a6487211ee5d..000000000000 --- a/doc/api_samples/os-networks-associate/network-associate-host-req.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "associate_host": "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 deleted file mode 100644 index d6c5419fd17a..000000000000 --- a/doc/api_samples/os-networks-associate/network-disassociate-host-req.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "disassociate_host": null -} \ 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 deleted file mode 100644 index 6c0e46730130..000000000000 --- a/doc/api_samples/os-networks-associate/network-disassociate-project-req.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "disassociate_project": null -} \ 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 deleted file mode 100644 index 66ab7cef0417..000000000000 --- a/doc/api_samples/os-networks-associate/network-disassociate-req.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "disassociate": null -} \ No newline at end of file diff --git a/doc/api_samples/os-networks/network-add-req.json b/doc/api_samples/os-networks/network-add-req.json deleted file mode 100644 index eca9c65b8bc1..000000000000 --- a/doc/api_samples/os-networks/network-add-req.json +++ /dev/null @@ -1 +0,0 @@ -{"id": "1"} \ No newline at end of file diff --git a/doc/api_samples/os-networks/network-create-req.json b/doc/api_samples/os-networks/network-create-req.json deleted file mode 100644 index 422e772345fd..000000000000 --- a/doc/api_samples/os-networks/network-create-req.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "network": { - "label": "new net 111", - "cidr": "10.20.105.0/24" - } -} \ No newline at end of file diff --git a/doc/api_samples/os-networks/network-create-resp.json b/doc/api_samples/os-networks/network-create-resp.json deleted file mode 100644 index 194694a77f7b..000000000000 --- a/doc/api_samples/os-networks/network-create-resp.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "network": { - "bridge": null, - "bridge_interface": null, - "broadcast": "10.20.105.255", - "cidr": "10.20.105.0/24", - "cidr_v6": null, - "created_at": null, - "deleted": null, - "deleted_at": null, - "dhcp_start": "10.20.105.2", - "dns1": null, - "dns2": null, - "gateway": "10.20.105.1", - "gateway_v6": null, - "host": null, - "id": "668687f9-d724-4976-a6f4-a6fd3ad83da3", - "injected": null, - "label": "new net 111", - "multi_host": null, - "netmask": "255.255.255.0", - "netmask_v6": null, - "priority": null, - "project_id": null, - "rxtx_base": null, - "updated_at": null, - "vlan": null, - "vpn_private_address": null, - "vpn_public_address": null, - "vpn_public_port": null - } -} \ No newline at end of file diff --git a/doc/api_samples/os-networks/network-show-resp.json b/doc/api_samples/os-networks/network-show-resp.json deleted file mode 100644 index afe315561fb5..000000000000 --- a/doc/api_samples/os-networks/network-show-resp.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "network": { - "bridge": "br100", - "bridge_interface": "eth0", - "broadcast": "10.0.0.7", - "cidr": "10.0.0.0/29", - "cidr_v6": null, - "created_at": "2011-08-15T06:19:19.387525", - "deleted": false, - "deleted_at": null, - "dhcp_start": "10.0.0.3", - "dns1": null, - "dns2": null, - "gateway": "10.0.0.1", - "gateway_v6": null, - "host": "nsokolov-desktop", - "id": "20c8acc0-f747-4d71-a389-46d078ebf047", - "injected": false, - "label": "mynet_0", - "multi_host": false, - "netmask": "255.255.255.248", - "netmask_v6": null, - "priority": null, - "project_id": "1234", - "rxtx_base": null, - "updated_at": "2011-08-16T09:26:13.048257", - "vlan": 100, - "vpn_private_address": "10.0.0.2", - "vpn_public_address": "127.0.0.1", - "vpn_public_port": 1000 - } -} \ No newline at end of file diff --git a/doc/api_samples/os-networks/networks-disassociate-req.json b/doc/api_samples/os-networks/networks-disassociate-req.json deleted file mode 100644 index 81e17d8095f6..000000000000 --- a/doc/api_samples/os-networks/networks-disassociate-req.json +++ /dev/null @@ -1 +0,0 @@ -{"disassociate": null} \ No newline at end of file diff --git a/doc/api_samples/os-networks/networks-list-resp.json b/doc/api_samples/os-networks/networks-list-resp.json deleted file mode 100644 index 2c11618a4916..000000000000 --- a/doc/api_samples/os-networks/networks-list-resp.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "networks": [ - { - "bridge": "br100", - "bridge_interface": "eth0", - "broadcast": "10.0.0.7", - "cidr": "10.0.0.0/29", - "cidr_v6": null, - "created_at": "2011-08-15T06:19:19.387525", - "deleted": false, - "deleted_at": null, - "dhcp_start": "10.0.0.3", - "dns1": null, - "dns2": null, - "gateway": "10.0.0.1", - "gateway_v6": null, - "host": "nsokolov-desktop", - "id": "20c8acc0-f747-4d71-a389-46d078ebf047", - "injected": false, - "label": "mynet_0", - "multi_host": false, - "netmask": "255.255.255.248", - "netmask_v6": null, - "priority": null, - "project_id": "1234", - "rxtx_base": null, - "updated_at": "2011-08-16T09:26:13.048257", - "vlan": 100, - "vpn_private_address": "10.0.0.2", - "vpn_public_address": "127.0.0.1", - "vpn_public_port": 1000 - }, - { - "bridge": "br101", - "bridge_interface": "eth0", - "broadcast": "10.0.0.15", - "cidr": "10.0.0.10/29", - "cidr_v6": null, - "created_at": "2011-08-15T06:19:19.885495", - "deleted": false, - "deleted_at": null, - "dhcp_start": "10.0.0.11", - "dns1": null, - "dns2": null, - "gateway": "10.0.0.9", - "gateway_v6": null, - "host": null, - "id": "20c8acc0-f747-4d71-a389-46d078ebf000", - "injected": false, - "label": "mynet_1", - "multi_host": false, - "netmask": "255.255.255.248", - "netmask_v6": null, - "priority": null, - "project_id": null, - "rxtx_base": null, - "updated_at": null, - "vlan": 101, - "vpn_private_address": "10.0.0.10", - "vpn_public_address": null, - "vpn_public_port": 1001 - } - ] -} \ No newline at end of file diff --git a/nova/tests/functional/api_samples/os-extended-networks/network-create-req.json.tpl b/nova/tests/functional/api_samples/os-extended-networks/network-create-req.json.tpl deleted file mode 100644 index 18515bd6c494..000000000000 --- a/nova/tests/functional/api_samples/os-extended-networks/network-create-req.json.tpl +++ /dev/null @@ -1,12 +0,0 @@ -{ - "network": { - "label": "new net 111", - "cidr": "10.20.105.0/24", - "mtu": 9000, - "dhcp_server": "10.20.105.2", - "enable_dhcp": false, - "share_address": true, - "allowed_start": "10.20.105.10", - "allowed_end": "10.20.105.200" - } -} diff --git a/nova/tests/functional/api_samples/os-extended-networks/network-create-resp.json.tpl b/nova/tests/functional/api_samples/os-extended-networks/network-create-resp.json.tpl deleted file mode 100644 index 5cf155b13fea..000000000000 --- a/nova/tests/functional/api_samples/os-extended-networks/network-create-resp.json.tpl +++ /dev/null @@ -1,36 +0,0 @@ -{ - "network": { - "bridge": null, - "vpn_public_port": null, - "dhcp_start": "%(ip)s", - "bridge_interface": null, - "updated_at": null, - "id": "%(id)s", - "cidr_v6": null, - "deleted_at": null, - "gateway": "%(ip)s", - "rxtx_base": null, - "label": "new net 111", - "priority": null, - "project_id": null, - "vpn_private_address": null, - "deleted": null, - "vlan": null, - "broadcast": "%(ip)s", - "netmask": "%(ip)s", - "injected": null, - "cidr": "10.20.105.0/24", - "vpn_public_address": null, - "multi_host": null, - "dns2": null, - "created_at": null, - "host": null, - "gateway_v6": null, - "netmask_v6": null, - "dns1": null, - "mtu": 9000, - "dhcp_server": "10.20.105.2", - "enable_dhcp": false, - "share_address": true - } -} diff --git a/nova/tests/functional/api_samples/os-extended-networks/network-show-resp.json.tpl b/nova/tests/functional/api_samples/os-extended-networks/network-show-resp.json.tpl deleted file mode 100644 index ac75fe7fb1ea..000000000000 --- a/nova/tests/functional/api_samples/os-extended-networks/network-show-resp.json.tpl +++ /dev/null @@ -1,37 +0,0 @@ -{ - "network": - { - "bridge": "br100", - "bridge_interface": "eth0", - "broadcast": "%(ip)s", - "cidr": "10.0.0.0/29", - "cidr_v6": null, - "created_at": "%(strtime)s", - "deleted": false, - "deleted_at": null, - "dhcp_start": "%(ip)s", - "dns1": null, - "dns2": null, - "gateway": "%(ip)s", - "gateway_v6": null, - "host": "nsokolov-desktop", - "id": "%(id)s", - "injected": false, - "label": "mynet_0", - "multi_host": false, - "netmask": "%(ip)s", - "netmask_v6": null, - "priority": null, - "project_id": "1234", - "rxtx_base": null, - "updated_at": "%(strtime)s", - "vlan": 100, - "vpn_private_address": "%(ip)s", - "vpn_public_address": "%(ip)s", - "vpn_public_port": 1000, - "mtu": null, - "dhcp_server": "%(ip)s", - "enable_dhcp": true, - "share_address": false - } -} diff --git a/nova/tests/functional/api_samples/os-extended-networks/networks-list-resp.json.tpl b/nova/tests/functional/api_samples/os-extended-networks/networks-list-resp.json.tpl deleted file mode 100644 index ccdd586a0f8b..000000000000 --- a/nova/tests/functional/api_samples/os-extended-networks/networks-list-resp.json.tpl +++ /dev/null @@ -1,72 +0,0 @@ -{ - "networks": [ - { - "bridge": "br100", - "bridge_interface": "eth0", - "broadcast": "%(ip)s", - "cidr": "10.0.0.0/29", - "cidr_v6": null, - "created_at": "%(strtime)s", - "deleted": false, - "deleted_at": null, - "dhcp_start": "%(ip)s", - "dns1": null, - "dns2": null, - "gateway": "%(ip)s", - "gateway_v6": null, - "host": "nsokolov-desktop", - "id": "%(id)s", - "injected": false, - "label": "mynet_0", - "multi_host": false, - "netmask": "%(ip)s", - "netmask_v6": null, - "priority": null, - "project_id": "1234", - "rxtx_base": null, - "updated_at": "%(strtime)s", - "vlan": 100, - "vpn_private_address": "%(ip)s", - "vpn_public_address": "%(ip)s", - "vpn_public_port": 1000, - "mtu": null, - "dhcp_server": "%(ip)s", - "enable_dhcp": true, - "share_address": false - }, - { - "bridge": "br101", - "bridge_interface": "eth0", - "broadcast": "%(ip)s", - "cidr": "10.0.0.10/29", - "cidr_v6": null, - "created_at": "%(strtime)s", - "deleted": false, - "deleted_at": null, - "dhcp_start": "%(ip)s", - "dns1": null, - "dns2": null, - "gateway": "%(ip)s", - "gateway_v6": null, - "host": null, - "id": "%(id)s", - "injected": false, - "label": "mynet_1", - "multi_host": false, - "netmask": "%(ip)s", - "netmask_v6": null, - "priority": null, - "project_id": null, - "rxtx_base": null, - "updated_at": null, - "vlan": 101, - "vpn_private_address": "%(ip)s", - "vpn_public_address": null, - "vpn_public_port": 1001, - "mtu": null, - "dhcp_server": "%(ip)s", - "enable_dhcp": true, - "share_address": false - } - ] -} diff --git a/nova/tests/functional/api_samples/os-networks-associate/network-associate-host-req.json.tpl b/nova/tests/functional/api_samples/os-networks-associate/network-associate-host-req.json.tpl deleted file mode 100644 index 762e8817518e..000000000000 --- a/nova/tests/functional/api_samples/os-networks-associate/network-associate-host-req.json.tpl +++ /dev/null @@ -1,3 +0,0 @@ -{ - "associate_host": "%(host)s" -} diff --git a/nova/tests/functional/api_samples/os-networks-associate/network-disassociate-host-req.json.tpl b/nova/tests/functional/api_samples/os-networks-associate/network-disassociate-host-req.json.tpl deleted file mode 100644 index 46f69b3e8190..000000000000 --- a/nova/tests/functional/api_samples/os-networks-associate/network-disassociate-host-req.json.tpl +++ /dev/null @@ -1,3 +0,0 @@ -{ - "disassociate_host": null -} diff --git a/nova/tests/functional/api_samples/os-networks-associate/network-disassociate-project-req.json.tpl b/nova/tests/functional/api_samples/os-networks-associate/network-disassociate-project-req.json.tpl deleted file mode 100644 index 63b6eb683997..000000000000 --- a/nova/tests/functional/api_samples/os-networks-associate/network-disassociate-project-req.json.tpl +++ /dev/null @@ -1,3 +0,0 @@ -{ - "disassociate_project": null -} diff --git a/nova/tests/functional/api_samples/os-networks-associate/network-disassociate-req.json.tpl b/nova/tests/functional/api_samples/os-networks-associate/network-disassociate-req.json.tpl deleted file mode 100644 index 2e09d15a60a9..000000000000 --- a/nova/tests/functional/api_samples/os-networks-associate/network-disassociate-req.json.tpl +++ /dev/null @@ -1,3 +0,0 @@ -{ - "disassociate": null -} diff --git a/nova/tests/functional/api_samples/os-networks/network-add-req.json.tpl b/nova/tests/functional/api_samples/os-networks/network-add-req.json.tpl deleted file mode 100644 index 6489f6e1b5ad..000000000000 --- a/nova/tests/functional/api_samples/os-networks/network-add-req.json.tpl +++ /dev/null @@ -1 +0,0 @@ -{"id": "1"} diff --git a/nova/tests/functional/api_samples/os-networks/network-create-req.json.tpl b/nova/tests/functional/api_samples/os-networks/network-create-req.json.tpl deleted file mode 100644 index 5e2be031cbd9..000000000000 --- a/nova/tests/functional/api_samples/os-networks/network-create-req.json.tpl +++ /dev/null @@ -1,6 +0,0 @@ -{ - "network": { - "label": "new net 111", - "cidr": "10.20.105.0/24" - } -} diff --git a/nova/tests/functional/api_samples/os-networks/network-create-resp.json.tpl b/nova/tests/functional/api_samples/os-networks/network-create-resp.json.tpl deleted file mode 100644 index e178ab50cb9b..000000000000 --- a/nova/tests/functional/api_samples/os-networks/network-create-resp.json.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{ - "network": { - "bridge": null, - "vpn_public_port": null, - "dhcp_start": "%(ip)s", - "bridge_interface": null, - "updated_at": null, - "id": "%(id)s", - "cidr_v6": null, - "deleted_at": null, - "gateway": "%(ip)s", - "rxtx_base": null, - "label": "new net 111", - "priority": null, - "project_id": null, - "vpn_private_address": null, - "deleted": null, - "vlan": null, - "broadcast": "%(ip)s", - "netmask": "%(ip)s", - "injected": null, - "cidr": "10.20.105.0/24", - "vpn_public_address": null, - "multi_host": null, - "dns2": null, - "created_at": null, - "host": null, - "gateway_v6": null, - "netmask_v6": null, - "dns1": null - } -} diff --git a/nova/tests/functional/api_samples/os-networks/network-show-resp.json.tpl b/nova/tests/functional/api_samples/os-networks/network-show-resp.json.tpl deleted file mode 100644 index 66e7122105de..000000000000 --- a/nova/tests/functional/api_samples/os-networks/network-show-resp.json.tpl +++ /dev/null @@ -1,33 +0,0 @@ -{ - "network": - { - "bridge": "br100", - "bridge_interface": "eth0", - "broadcast": "%(ip)s", - "cidr": "10.0.0.0/29", - "cidr_v6": null, - "created_at": "%(strtime)s", - "deleted": false, - "deleted_at": null, - "dhcp_start": "%(ip)s", - "dns1": null, - "dns2": null, - "gateway": "%(ip)s", - "gateway_v6": null, - "host": "nsokolov-desktop", - "id": "%(id)s", - "injected": false, - "label": "mynet_0", - "multi_host": false, - "netmask": "%(ip)s", - "netmask_v6": null, - "priority": null, - "project_id": "1234", - "rxtx_base": null, - "updated_at": "%(strtime)s", - "vlan": 100, - "vpn_private_address": "%(ip)s", - "vpn_public_address": "%(ip)s", - "vpn_public_port": 1000 - } -} diff --git a/nova/tests/functional/api_samples/os-networks/networks-disassociate-req.json.tpl b/nova/tests/functional/api_samples/os-networks/networks-disassociate-req.json.tpl deleted file mode 100644 index df99b889c408..000000000000 --- a/nova/tests/functional/api_samples/os-networks/networks-disassociate-req.json.tpl +++ /dev/null @@ -1 +0,0 @@ -{"disassociate": null} diff --git a/nova/tests/functional/api_samples/os-networks/networks-list-resp.json.tpl b/nova/tests/functional/api_samples/os-networks/networks-list-resp.json.tpl deleted file mode 100644 index 4e359c6171fd..000000000000 --- a/nova/tests/functional/api_samples/os-networks/networks-list-resp.json.tpl +++ /dev/null @@ -1,64 +0,0 @@ -{ - "networks": [ - { - "bridge": "br100", - "bridge_interface": "eth0", - "broadcast": "%(ip)s", - "cidr": "10.0.0.0/29", - "cidr_v6": null, - "created_at": "%(strtime)s", - "deleted": false, - "deleted_at": null, - "dhcp_start": "%(ip)s", - "dns1": null, - "dns2": null, - "gateway": "%(ip)s", - "gateway_v6": null, - "host": "nsokolov-desktop", - "id": "%(id)s", - "injected": false, - "label": "mynet_0", - "multi_host": false, - "netmask": "%(ip)s", - "netmask_v6": null, - "priority": null, - "project_id": "1234", - "rxtx_base": null, - "updated_at": "%(strtime)s", - "vlan": 100, - "vpn_private_address": "%(ip)s", - "vpn_public_address": "%(ip)s", - "vpn_public_port": 1000 - }, - { - "bridge": "br101", - "bridge_interface": "eth0", - "broadcast": "%(ip)s", - "cidr": "10.0.0.10/29", - "cidr_v6": null, - "created_at": "%(strtime)s", - "deleted": false, - "deleted_at": null, - "dhcp_start": "%(ip)s", - "dns1": null, - "dns2": null, - "gateway": "%(ip)s", - "gateway_v6": null, - "host": null, - "id": "%(id)s", - "injected": false, - "label": "mynet_1", - "multi_host": false, - "netmask": "%(ip)s", - "netmask_v6": null, - "priority": null, - "project_id": null, - "rxtx_base": null, - "updated_at": null, - "vlan": 101, - "vpn_private_address": "%(ip)s", - "vpn_public_address": null, - "vpn_public_port": 1001 - } - ] -} diff --git a/nova/tests/functional/test_api_samples.py b/nova/tests/functional/test_api_samples.py index 7f787a5391d6..bcfdd7098b33 100644 --- a/nova/tests/functional/test_api_samples.py +++ b/nova/tests/functional/test_api_samples.py @@ -50,7 +50,6 @@ from nova import test from nova.tests.functional import api_samples_test_base from nova.tests.functional import integrated_helpers from nova.tests.unit.api.openstack.compute.contrib import test_fping -from nova.tests.unit.api.openstack.compute.contrib import test_networks from nova.tests.unit.api.openstack.compute.contrib import test_services from nova.tests.unit.api.openstack import fakes from nova.tests.unit import fake_network @@ -1514,157 +1513,6 @@ class DiskConfigJsonTest(ServersSampleBase): self._verify_response('image-list-resp', subs, response, 200) -class NetworksJsonTests(ApiSampleTestBaseV2): - ADMIN_API = True - extension_name = ("nova.api.openstack.compute.contrib" - ".os_networks.Os_networks") - - def setUp(self): - super(NetworksJsonTests, self).setUp() - fake_network_api = test_networks.FakeNetworkAPI() - self.stubs.Set(network_api.API, "get_all", - fake_network_api.get_all) - self.stubs.Set(network_api.API, "get", - fake_network_api.get) - self.stubs.Set(network_api.API, "associate", - fake_network_api.associate) - self.stubs.Set(network_api.API, "delete", - fake_network_api.delete) - self.stubs.Set(network_api.API, "create", - fake_network_api.create) - self.stubs.Set(network_api.API, "add_network_to_project", - fake_network_api.add_network_to_project) - - def test_network_list(self): - response = self._do_get('os-networks') - subs = self._get_regexes() - self._verify_response('networks-list-resp', subs, response, 200) - - def test_network_disassociate(self): - uuid = test_networks.FAKE_NETWORKS[0]['uuid'] - response = self._do_post('os-networks/%s/action' % uuid, - 'networks-disassociate-req', {}) - self.assertEqual(response.status_code, 202) - self.assertEqual(response.content, "") - - def test_network_show(self): - uuid = test_networks.FAKE_NETWORKS[0]['uuid'] - response = self._do_get('os-networks/%s' % uuid) - subs = self._get_regexes() - self._verify_response('network-show-resp', subs, response, 200) - - def test_network_create(self): - response = self._do_post("os-networks", - 'network-create-req', {}) - subs = self._get_regexes() - self._verify_response('network-create-resp', subs, response, 200) - - def test_network_add(self): - response = self._do_post("os-networks/add", - 'network-add-req', {}) - self.assertEqual(response.status_code, 202) - self.assertEqual(response.content, "") - - def test_network_delete(self): - response = self._do_delete('os-networks/always_delete') - self.assertEqual(response.status_code, 202) - self.assertEqual(response.content, "") - - -class ExtendedNetworksJsonTests(ApiSampleTestBaseV2): - ADMIN_API = True - extends_name = ("nova.api.openstack.compute.contrib." - "os_networks.Os_networks") - extension_name = ("nova.api.openstack.compute.contrib." - "extended_networks.Extended_networks") - - def setUp(self): - super(ExtendedNetworksJsonTests, self).setUp() - fake_network_api = test_networks.FakeNetworkAPI() - self.stubs.Set(network_api.API, "get_all", - fake_network_api.get_all) - self.stubs.Set(network_api.API, "get", - fake_network_api.get) - self.stubs.Set(network_api.API, "associate", - fake_network_api.associate) - self.stubs.Set(network_api.API, "delete", - fake_network_api.delete) - self.stubs.Set(network_api.API, "create", - fake_network_api.create) - self.stubs.Set(network_api.API, "add_network_to_project", - fake_network_api.add_network_to_project) - - def test_network_list(self): - response = self._do_get('os-networks') - subs = self._get_regexes() - self._verify_response('networks-list-resp', subs, response, 200) - - def test_network_show(self): - uuid = test_networks.FAKE_NETWORKS[0]['uuid'] - response = self._do_get('os-networks/%s' % uuid) - subs = self._get_regexes() - self._verify_response('network-show-resp', subs, response, 200) - - def test_network_create(self): - response = self._do_post("os-networks", - 'network-create-req', {}) - subs = self._get_regexes() - self._verify_response('network-create-resp', subs, response, 200) - - -class NetworksAssociateJsonTests(ApiSampleTestBaseV2): - extension_name = ("nova.api.openstack.compute.contrib" - ".networks_associate.Networks_associate") - - _sentinel = object() - - def _get_flags(self): - f = super(NetworksAssociateJsonTests, self)._get_flags() - f['osapi_compute_extension'] = CONF.osapi_compute_extension[:] - # Networks_associate requires Networks to be update - f['osapi_compute_extension'].append( - 'nova.api.openstack.compute.contrib.os_networks.Os_networks') - return f - - def setUp(self): - super(NetworksAssociateJsonTests, self).setUp() - - def fake_associate(self, context, network_id, - host=NetworksAssociateJsonTests._sentinel, - project=NetworksAssociateJsonTests._sentinel): - return True - - self.stubs.Set(network_api.API, "associate", fake_associate) - - def test_disassociate(self): - response = self._do_post('os-networks/1/action', - 'network-disassociate-req', - {}) - self.assertEqual(response.status_code, 202) - self.assertEqual(response.content, "") - - def test_disassociate_host(self): - response = self._do_post('os-networks/1/action', - 'network-disassociate-host-req', - {}) - self.assertEqual(response.status_code, 202) - self.assertEqual(response.content, "") - - def test_disassociate_project(self): - response = self._do_post('os-networks/1/action', - 'network-disassociate-project-req', - {}) - self.assertEqual(response.status_code, 202) - self.assertEqual(response.content, "") - - def test_associate_host(self): - response = self._do_post('os-networks/1/action', - 'network-associate-host-req', - {"host": "testHost"}) - self.assertEqual(response.status_code, 202) - self.assertEqual(response.content, "") - - class BlockDeviceMappingV2BootJsonTest(ServersSampleBase): extension_name = ('nova.api.openstack.compute.contrib.' 'block_device_mapping_v2_boot.' diff --git a/nova/tests/functional/v3/test_networks.py b/nova/tests/functional/v3/test_networks.py index c3fb3dae0df2..a9345246726a 100644 --- a/nova/tests/functional/v3/test_networks.py +++ b/nova/tests/functional/v3/test_networks.py @@ -13,14 +13,33 @@ # License for the specific language governing permissions and limitations # under the License. +from oslo_config import cfg + from nova.network import api as network_api from nova.tests.functional.v3 import api_sample_base from nova.tests.unit.api.openstack.compute.contrib import test_networks +CONF = cfg.CONF +CONF.import_opt('osapi_compute_extension', + 'nova.api.openstack.compute.extensions') + class NetworksJsonTests(api_sample_base.ApiSampleTestBaseV3): ADMIN_API = True extension_name = "os-networks" + # TODO(gmann): Overriding '_api_version' till all functional tests + # are merged between v2 and v2.1. After that base class variable + # itself can be changed to 'v2' + _api_version = 'v2' + + def _get_flags(self): + f = super(NetworksJsonTests, self)._get_flags() + f['osapi_compute_extension'] = CONF.osapi_compute_extension[:] + f['osapi_compute_extension'].append('nova.api.openstack.compute.' + 'contrib.os_networks.Os_networks') + f['osapi_compute_extension'].append('nova.api.openstack.compute.' + 'contrib.extended_networks.Extended_networks') + return f def setUp(self): super(NetworksJsonTests, self).setUp() diff --git a/nova/tests/functional/v3/test_networks_associate.py b/nova/tests/functional/v3/test_networks_associate.py index e8a09501e396..1012a21894d2 100644 --- a/nova/tests/functional/v3/test_networks_associate.py +++ b/nova/tests/functional/v3/test_networks_associate.py @@ -24,8 +24,13 @@ CONF.import_opt('osapi_compute_extension', class NetworksAssociateJsonTests(api_sample_base.ApiSampleTestBaseV3): + ADMIN_API = True extension_name = "os-networks-associate" extra_extensions_to_load = ["os-networks"] + # TODO(gmann): Overriding '_api_version' till all functional tests + # are merged between v2 and v2.1. After that base class variable + # itself can be changed to 'v2' + _api_version = 'v2' _sentinel = object() @@ -35,6 +40,9 @@ class NetworksAssociateJsonTests(api_sample_base.ApiSampleTestBaseV3): # Networks_associate requires Networks to be update f['osapi_compute_extension'].append( 'nova.api.openstack.compute.contrib.os_networks.Os_networks') + f['osapi_compute_extension'].append( + 'nova.api.openstack.compute.contrib.networks_associate.' + 'Networks_associate') return f def setUp(self):