diff --git a/v2.0/api_samples/network-post-req.json b/v2.0/api_samples/network-post-req.json new file mode 100644 index 0000000..52075f4 --- /dev/null +++ b/v2.0/api_samples/network-post-req.json @@ -0,0 +1,7 @@ +{ + "network": + { + "name": "sample_network", + "admin_state_up": false + } +} \ No newline at end of file diff --git a/v2.0/api_samples/network-post-req.xml b/v2.0/api_samples/network-post-req.xml new file mode 100644 index 0000000..e39bc94 --- /dev/null +++ b/v2.0/api_samples/network-post-req.xml @@ -0,0 +1,3 @@ +<network> + <name>sample_network</name> +</network> diff --git a/v2.0/api_samples/network-post-resp.json b/v2.0/api_samples/network-post-resp.json new file mode 100644 index 0000000..83d5ae2 --- /dev/null +++ b/v2.0/api_samples/network-post-resp.json @@ -0,0 +1,13 @@ +{ + "network":{ + "admin_state_up":true, + "id":"850d3f2c-f0a5-4f8b-b1cf-5836fc0be940", + "name":"sample_network", + "shared":false, + "status":"ACTIVE", + "subnets":[ + + ], + "tenant_id":"f667b69e4d6749749ef3bcba7251d9ce" + } +} diff --git a/v2.0/api_samples/network-post-resp.xml b/v2.0/api_samples/network-post-resp.xml new file mode 100644 index 0000000..4101965 --- /dev/null +++ b/v2.0/api_samples/network-post-resp.xml @@ -0,0 +1,13 @@ +<?xml version='1.0' encoding='UTF-8'?> +<network xmlns="http://openstack.org/quantum/api/v2.0" + xmlns:quantum="http://openstack.org/quantum/api/v2.0" + xmlns:router="http://docs.openstack.org/ext/quantum/router/api/v1.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <status>ACTIVE</status> + <subnets quantum:type="list" /> + <name>sample_network</name> + <tenant_id>4be6b806faa0491eb358018bbe9f0d4e</tenant_id> + <admin_state_up quantum:type="bool">True</admin_state_up> + <shared quantum:type="bool">False</shared> + <id>0657ef52-d3f6-4320-9c26-015a3e9badea</id> +</network> diff --git a/v2.0/api_samples/network-put-update-resp.json b/v2.0/api_samples/network-put-update-resp.json new file mode 100644 index 0000000..f9b1f94 --- /dev/null +++ b/v2.0/api_samples/network-put-update-resp.json @@ -0,0 +1,12 @@ +{ + "network": + { + "status": "ACTIVE", + "subnets": ["e12f0c45-46e3-446a-b207-9474b27687a6"], + "name": "private", + "admin_state_up": true, + "tenant_id": "625887121e364204873d362b553ab171", + "id": "9d83c053-b0a4-4682-ae80-c00df269ce0a", + "shared": false + } +} diff --git a/v2.0/api_samples/network-put-update-resp.xml b/v2.0/api_samples/network-put-update-resp.xml new file mode 100644 index 0000000..3e90de6 --- /dev/null +++ b/v2.0/api_samples/network-put-update-resp.xml @@ -0,0 +1,16 @@ +<?xml version='1.0' encoding='UTF-8'?> +<network xmlns="http://openstack.org/quantum/api/v2.0" xmlns:provider="http://docs.openstack.org/ext/provider/api/v1.0" xmlns:quantum="http://openstack.org/quantum/api/v2.0" xmlns:router="http://docs.openstack.org/ext/quantum/router/api/v1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <status>ACTIVE</status> + <subnets> + <subnet>e12f0c45-46e3-446a-b207-9474b27687a6</subnet> + </subnets> + <name>private</name> + <provider:physical_network xsi:nil="true" /> + <admin_state_up quantum:type="bool">True</admin_state_up> + <tenant_id>625887121e364204873d362b553ab171</tenant_id> + <provider:network_type>local</provider:network_type> + <router:external quantum:type="bool">False</router:external> + <shared quantum:type="bool">False</shared> + <id>9d83c053-b0a4-4682-ae80-c00df269ce0a</id> + <provider:segmentation_id xsi:nil="true" /> +</network> diff --git a/v2.0/api_samples/network-put-update.req.json b/v2.0/api_samples/network-put-update.req.json new file mode 100644 index 0000000..37fe569 --- /dev/null +++ b/v2.0/api_samples/network-put-update.req.json @@ -0,0 +1,6 @@ +{ + "network": + { + "name": "updated_name" + } +} diff --git a/v2.0/api_samples/network-put-update.req.xml b/v2.0/api_samples/network-put-update.req.xml new file mode 100644 index 0000000..d43bdde --- /dev/null +++ b/v2.0/api_samples/network-put-update.req.xml @@ -0,0 +1,3 @@ +<network xmlns="http://openstack.org/quantum/api/v2.0" xmlns:provider="http://docs.openstack.org/ext/provider/api/v1.0" xmlns:quantum="http://openstack.org/quantum/api/v2.0" xmlns:router="http://docs.openstack.org/ext/quantum/router/api/v1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <name>nova2</name> +</network> diff --git a/v2.0/api_samples/networks-create-bulk-resp.json b/v2.0/api_samples/networks-create-bulk-resp.json new file mode 100644 index 0000000..d2136bf --- /dev/null +++ b/v2.0/api_samples/networks-create-bulk-resp.json @@ -0,0 +1,34 @@ +{ + "networks":[ + { + "status":"ACTIVE", + "subnets":[ + + ], + "name":"sample_network_1", + "provider:physical_network":null, + "admin_state_up":false, + "tenant_id":"60cd4f6dbc2f491982a284e7b83b5be3", + "provider:network_type":"local", + "router:external":false, + "shared":false, + "id":"e9330b1f-a2ef-4160-a951-169ee6ab17f5", + "provider:segmentation_id":null + }, + { + "status":"ACTIVE", + "subnets":[ + + ], + "name":"sample_network_2", + "provider:physical_network":null, + "admin_state_up":false, + "tenant_id":"60cd4f6dbc2f491982a284e7b83b5be3", + "provider:network_type":"local", + "router:external":false, + "shared":false, + "id":"cfb5f52c-dfe2-4357-a10d-a225693e2b84", + "provider:segmentation_id":null + } + ] +} \ No newline at end of file diff --git a/v2.0/api_samples/networks-create-bulk-resp.xml b/v2.0/api_samples/networks-create-bulk-resp.xml new file mode 100644 index 0000000..e297861 --- /dev/null +++ b/v2.0/api_samples/networks-create-bulk-resp.xml @@ -0,0 +1,33 @@ +<?xml version='1.0' encoding='UTF-8'?> +<networks xmlns="http://openstack.org/quantum/api/v2.0" + xmlns:provider="http://docs.openstack.org/ext/provider/api/v1.0" + xmlns:quantum="http://openstack.org/quantum/api/v2.0" + xmlns:router="http://docs.openstack.org/ext/neutron/router/api/v1.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <network> + <status>ACTIVE</status> + <subnets quantum:type="list"/> + <name>sample_network_1</name> + <provider:physical_network xsi:nil="true"/> + <admin_state_up quantum:type="bool">True</admin_state_up> + <tenant_id>60cd4f6dbc2f491982a284e7b83b5be3</tenant_id> + <provider:network_type>local</provider:network_type> + <router:external quantum:type="bool">False</router:external> + <shared quantum:type="bool">False</shared> + <id>9eb3ce34-183b-4a75-b08f-d6a3d241e68b</id> + <provider:segmentation_id xsi:nil="true"/> + </network> + <network> + <status>ACTIVE</status> + <subnets quantum:type="list"/> + <name>sample_network_2</name> + <provider:physical_network xsi:nil="true"/> + <admin_state_up quantum:type="bool">True</admin_state_up> + <tenant_id>60cd4f6dbc2f491982a284e7b83b5be3</tenant_id> + <provider:network_type>local</provider:network_type> + <router:external quantum:type="bool">False</router:external> + <shared quantum:type="bool">False</shared> + <id>df679a25-915d-41ed-b5ec-721481ddfd56</id> + <provider:segmentation_id xsi:nil="true"/> + </network> +</networks> diff --git a/v2.0/api_samples/networks-get-detail-resp.json b/v2.0/api_samples/networks-get-detail-resp.json new file mode 100644 index 0000000..f9b1f94 --- /dev/null +++ b/v2.0/api_samples/networks-get-detail-resp.json @@ -0,0 +1,12 @@ +{ + "network": + { + "status": "ACTIVE", + "subnets": ["e12f0c45-46e3-446a-b207-9474b27687a6"], + "name": "private", + "admin_state_up": true, + "tenant_id": "625887121e364204873d362b553ab171", + "id": "9d83c053-b0a4-4682-ae80-c00df269ce0a", + "shared": false + } +} diff --git a/v2.0/api_samples/networks-get-detail-resp.xml b/v2.0/api_samples/networks-get-detail-resp.xml new file mode 100644 index 0000000..3e90de6 --- /dev/null +++ b/v2.0/api_samples/networks-get-detail-resp.xml @@ -0,0 +1,16 @@ +<?xml version='1.0' encoding='UTF-8'?> +<network xmlns="http://openstack.org/quantum/api/v2.0" xmlns:provider="http://docs.openstack.org/ext/provider/api/v1.0" xmlns:quantum="http://openstack.org/quantum/api/v2.0" xmlns:router="http://docs.openstack.org/ext/quantum/router/api/v1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <status>ACTIVE</status> + <subnets> + <subnet>e12f0c45-46e3-446a-b207-9474b27687a6</subnet> + </subnets> + <name>private</name> + <provider:physical_network xsi:nil="true" /> + <admin_state_up quantum:type="bool">True</admin_state_up> + <tenant_id>625887121e364204873d362b553ab171</tenant_id> + <provider:network_type>local</provider:network_type> + <router:external quantum:type="bool">False</router:external> + <shared quantum:type="bool">False</shared> + <id>9d83c053-b0a4-4682-ae80-c00df269ce0a</id> + <provider:segmentation_id xsi:nil="true" /> +</network> diff --git a/v2.0/api_samples/networks-get-resp.json b/v2.0/api_samples/networks-get-resp.json new file mode 100644 index 0000000..c204d4a --- /dev/null +++ b/v2.0/api_samples/networks-get-resp.json @@ -0,0 +1,31 @@ +{ + "networks": [ + { + "status": "ACTIVE", + "subnets": ["a318fcb4-9ff0-4485-b78c-9e6738c21b26"], + "name": "private", + "admin_state_up": true, + "tenant_id": "625887121e364204873d362b553ab171", + "id": "9d83c053-b0a4-4682-ae80-c00df269ce0a", + "shared": false + }, + { + "status": "ACTIVE", + "subnets": ["aca4d43c-c48c-4a2c-9bb6-ba374ef7e135"], + "name": "nova", + "admin_state_up": true, + "tenant_id": "63878e4c5dd649d2a980e37aefddfa87", + "id": "ebda9658-093b-41ba-80ce-0cf8cb8365d4", + "shared": false + }, + { + "status": "ACTIVE", + "subnets": ["e12f0c45-46e3-446a-b207-9474b27687a6"], + "name": "network_3", + "admin_state_up": true, + "tenant_id": "ed680f49ff714162ab3612d7876ffce5", + "id": "afc75773-640e-403c-9fff-62ba98db1f19", + "shared": true + } + ] +} diff --git a/v2.0/api_samples/networks-get-resp.xml b/v2.0/api_samples/networks-get-resp.xml new file mode 100644 index 0000000..14d0f7f --- /dev/null +++ b/v2.0/api_samples/networks-get-resp.xml @@ -0,0 +1,36 @@ +<networks xmlns="http://openstack.org/quantum/api/v2.0" + xmlns:provider="http://docs.openstack.org/ext/provider/api/v1.0" + xmlns:quantum="http://openstack.org/quantum/api/v2.0" + xmlns:router="http://docs.openstack.org/ext/quantum/router/api/v1.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <network> + <status>ACTIVE</status> + <subnets> + <subnet>a318fcb4-9ff0-4485-b78c-9e6738c21b26</subnet> + </subnets> + <name>private</name> + <provider:physical_network xsi:nil="true"/> + <admin_state_up quantum:type="bool">True</admin_state_up> + <tenant_id>625887121e364204873d362b553ab171</tenant_id> + <provider:network_type>local</provider:network_type> + <router:external quantum:type="bool">False</router:external> + <shared quantum:type="bool">False</shared> + <id>9d83c053-b0a4-4682-ae80-c00df269ce0a</id> + <provider:segmentation_id xsi:nil="true"/> + </network> + <network> + <status>ACTIVE</status> + <subnets> + <subnet>aca4d43c-c48c-4a2c-9bb6-ba374ef7e135</subnet> + </subnets> + <name>nova</name> + <provider:physical_network xsi:nil="true"/> + <admin_state_up quantum:type="bool">True</admin_state_up> + <tenant_id>63878e4c5dd649d2a980e37aefddfa87</tenant_id> + <provider:network_type>local</provider:network_type> + <router:external quantum:type="bool">True</router:external> + <shared quantum:type="bool">False</shared> + <id>ebda9658-093b-41ba-80ce-0cf8cb8365d4</id> + <provider:segmentation_id xsi:nil="true"/> + </network> +</networks> diff --git a/v2.0/api_samples/networks-post-create-bulk-req.json b/v2.0/api_samples/networks-post-create-bulk-req.json new file mode 100644 index 0000000..858f505 --- /dev/null +++ b/v2.0/api_samples/networks-post-create-bulk-req.json @@ -0,0 +1,12 @@ +{ + "networks":[ + { + "name":"sample_network_1", + "admin_state_up":false + }, + { + "name":"sample_network_2", + "admin_state_up":false + } + ] +} \ No newline at end of file diff --git a/v2.0/api_samples/networks-post-create-bulk-req.xml b/v2.0/api_samples/networks-post-create-bulk-req.xml new file mode 100644 index 0000000..cfc344f --- /dev/null +++ b/v2.0/api_samples/networks-post-create-bulk-req.xml @@ -0,0 +1,8 @@ +<networks> + <network> + <name>sample_network_1</name> + </network> + <network> + <name>sample_network_2</name> + </network> +</networks> diff --git a/v2.0/api_samples/port-get-resp.json b/v2.0/api_samples/port-get-resp.json new file mode 100644 index 0000000..6e6bf67 --- /dev/null +++ b/v2.0/api_samples/port-get-resp.json @@ -0,0 +1,25 @@ +{ + "port":[ + { + "status":"ACTIVE", + "name":"", + "admin_state_up":true, + "network_id":"ebda9658-093b-41ba-80ce-0cf8cb8365d4", + "tenant_id":"63878e4c5dd649d2a980e37aefddfa87", + "binding:vif_type":"ovs", + "device_owner":"compute:None", + "binding:capabilities":{ + "port_filter":false + }, + "mac_address":"fa:16:3e:b9:ef:05", + "fixed_ips":[ + { + "subnet_id":"aca4d43c-c48c-4a2c-9bb6-ba374ef7e135", + "ip_address":"172.24.4.227" + } + ], + "id":"664ebd1a-facd-4c20-948c-07a784475ab0", + "device_id":"f288bb5f-920d-4276-8345-2c0319c16f58" + } + ] +} \ No newline at end of file diff --git a/v2.0/api_samples/port-get-resp.xml b/v2.0/api_samples/port-get-resp.xml new file mode 100644 index 0000000..2ff1616 --- /dev/null +++ b/v2.0/api_samples/port-get-resp.xml @@ -0,0 +1,25 @@ +<?xml version='1.0' encoding='UTF-8'?> +<port xmlns="http://openstack.org/quantum/api/v2.0" + xmlns:binding="http://docs.openstack.org/ext/binding/api/v1.0" + xmlns:quantum="http://openstack.org/quantum/api/v2.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <status>ACTIVE</status> + <name/> + <admin_state_up quantum:type="bool">True</admin_state_up> + <network_id>ebda9658-093b-41ba-80ce-0cf8cb8365d4</network_id> + <tenant_id>63878e4c5dd649d2a980e37aefddfa87</tenant_id> + <binding:vif_type>ovs</binding:vif_type> + <device_owner>compute:None</device_owner> + <binding:capabilities> + <port_filter quantum:type="bool">False</port_filter> + </binding:capabilities> + <mac_address>fa:16:3e:b9:ef:05</mac_address> + <fixed_ips> + <fixed_ip> + <subnet_id>aca4d43c-c48c-4a2c-9bb6-ba374ef7e135</subnet_id> + <ip_address>172.24.4.227</ip_address> + </fixed_ip> + </fixed_ips> + <id>664ebd1a-facd-4c20-948c-07a784475ab0</id> + <device_id>f288bb5f-920d-4276-8345-2c0319c16f58</device_id> +</port> diff --git a/v2.0/api_samples/port-post-create-req.json b/v2.0/api_samples/port-post-create-req.json new file mode 100644 index 0000000..26c40f2 --- /dev/null +++ b/v2.0/api_samples/port-post-create-req.json @@ -0,0 +1,8 @@ +{ + "port": { + "admin_state_up": true, + "device_id": "d6b4d3a5-c700-476f-b609-1493dd9dadc0", + "name": "port1", + "network_id": "6aeaf34a-c482-4bd3-9dc3-7faf36412f12" + } +} \ No newline at end of file diff --git a/v2.0/api_samples/port_create_or_update_resp.json b/v2.0/api_samples/port_create_or_update_resp.json new file mode 100644 index 0000000..f0e9014 --- /dev/null +++ b/v2.0/api_samples/port_create_or_update_resp.json @@ -0,0 +1,26 @@ +{ + "port":[ + { + "status":"DOWN", + "binding:host_id":null, + "name":"sample_port_1", + "admin_state_up":true, + "network_id":"a3775a7d-9f8b-4148-be81-c84bbd0837ce", + "tenant_id":"60cd4f6dbc2f491982a284e7b83b5be3", + "binding:vif_type":"ovs", + "device_owner":"", + "binding:capabilities":{ + "port_filter":true + }, + "mac_address":"fa:16:3e:2e:7c:8a", + "fixed_ips":[ + + ], + "id":"8fb361d8-bab0-418d-b1b8-7204a230fb06", + "security_groups":[ + "99f465bc-0d7c-4142-8829-7ae0179f2fa8" + ], + "device_id":"" + } + ] +} \ No newline at end of file diff --git a/v2.0/api_samples/port_create_or_update_resp.xml b/v2.0/api_samples/port_create_or_update_resp.xml new file mode 100644 index 0000000..d529505 --- /dev/null +++ b/v2.0/api_samples/port_create_or_update_resp.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<port xmlns="http://openstack.org/quantum/api/v2.0" + xmlns:binding="http://docs.openstack.org/ext/binding/api/v1.0" + xmlns:quantum="http://openstack.org/quantum/api/v2.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <status>DOWN</status> + <binding:host_id xsi:nil="true"/> + <name>test_port_1</name> + <admin_state_up quantum:type="bool">True</admin_state_up> + <network_id>a3775a7d-9f8b-4148-be81-c84bbd0837ce</network_id> + <tenant_id>60cd4f6dbc2f491982a284e7b83b5be3</tenant_id> + <binding:vif_type>ovs</binding:vif_type> + <device_owner/> + <binding:capabilities> + <port_filter quantum:type="bool">True</port_filter> + </binding:capabilities> + <mac_address>fa:16:3e:c9:8d:cf</mac_address> + <fixed_ips quantum:type="list"/> + <id>7f0aa3f1-883a-43b2-8d1b-e85fac52b417</id> + <security_groups> + <security_group>99f465bc-0d7c-4142-8829-7ae0179f2fa8</security_group> + </security_groups> + <device_id/> +</port> diff --git a/v2.0/api_samples/ports-create-bulk-resp.json b/v2.0/api_samples/ports-create-bulk-resp.json new file mode 100644 index 0000000..7780db1 --- /dev/null +++ b/v2.0/api_samples/ports-create-bulk-resp.json @@ -0,0 +1,48 @@ +{ + "ports":[ + { + "status":"DOWN", + "binding:host_id":null, + "name":"sample_port_1", + "admin_state_up":true, + "network_id":"a3775a7d-9f8b-4148-be81-c84bbd0837ce", + "tenant_id":"60cd4f6dbc2f491982a284e7b83b5be3", + "binding:vif_type":"ovs", + "device_owner":"", + "binding:capabilities":{ + "port_filter":true + }, + "mac_address":"fa:16:3e:2e:7c:8a", + "fixed_ips":[ + + ], + "id":"8fb361d8-bab0-418d-b1b8-7204a230fb06", + "security_groups":[ + "99f465bc-0d7c-4142-8829-7ae0179f2fa8" + ], + "device_id":"" + }, + { + "status":"DOWN", + "binding:host_id":null, + "name":"sample_port_2", + "admin_state_up":false, + "network_id":"a3775a7d-9f8b-4148-be81-c84bbd0837ce", + "tenant_id":"60cd4f6dbc2f491982a284e7b83b5be3", + "binding:vif_type":"ovs", + "device_owner":"", + "binding:capabilities":{ + "port_filter":true + }, + "mac_address":"fa:16:3e:0a:4e:13", + "fixed_ips":[ + + ], + "id":"d4c93b0b-f593-424e-a199-d648478a5a3c", + "security_groups":[ + "99f465bc-0d7c-4142-8829-7ae0179f2fa8" + ], + "device_id":"" + } + ] +} \ No newline at end of file diff --git a/v2.0/api_samples/ports-create-bulk-resp.xml b/v2.0/api_samples/ports-create-bulk-resp.xml new file mode 100644 index 0000000..fb62a7b --- /dev/null +++ b/v2.0/api_samples/ports-create-bulk-resp.xml @@ -0,0 +1,46 @@ +<?xml version='1.0' encoding='UTF-8'?> +<ports xmlns="http://openstack.org/quantum/api/v2.0" + xmlns:binding="http://docs.openstack.org/ext/binding/api/v1.0" + xmlns:quantum="http://openstack.org/quantum/api/v2.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <port> + <status>DOWN</status> + <binding:host_id xsi:nil="true"/> + <name>test_port_1</name> + <admin_state_up quantum:type="bool">True</admin_state_up> + <network_id>a3775a7d-9f8b-4148-be81-c84bbd0837ce</network_id> + <tenant_id>60cd4f6dbc2f491982a284e7b83b5be3</tenant_id> + <binding:vif_type>ovs</binding:vif_type> + <device_owner/> + <binding:capabilities> + <port_filter quantum:type="bool">True</port_filter> + </binding:capabilities> + <mac_address>fa:16:3e:c9:8d:cf</mac_address> + <fixed_ips quantum:type="list"/> + <id>7f0aa3f1-883a-43b2-8d1b-e85fac52b417</id> + <security_groups> + <security_group>99f465bc-0d7c-4142-8829-7ae0179f2fa8</security_group> + </security_groups> + <device_id/> + </port> + <port> + <status>DOWN</status> + <binding:host_id xsi:nil="true"/> + <name>test_port_2</name> + <admin_state_up quantum:type="bool">True</admin_state_up> + <network_id>a3775a7d-9f8b-4148-be81-c84bbd0837ce</network_id> + <tenant_id>60cd4f6dbc2f491982a284e7b83b5be3</tenant_id> + <binding:vif_type>ovs</binding:vif_type> + <device_owner/> + <binding:capabilities> + <port_filter quantum:type="bool">True</port_filter> + </binding:capabilities> + <mac_address>fa:16:3e:79:90:81</mac_address> + <fixed_ips quantum:type="list"/> + <id>a4a81484-c1c4-4b2b-95bc-f8c4484241d0</id> + <security_groups> + <security_group>99f465bc-0d7c-4142-8829-7ae0179f2fa8</security_group> + </security_groups> + <device_id/> + </port> +</ports> diff --git a/v2.0/api_samples/ports-get-resp.json b/v2.0/api_samples/ports-get-resp.json new file mode 100644 index 0000000..dc2dde2 --- /dev/null +++ b/v2.0/api_samples/ports-get-resp.json @@ -0,0 +1,88 @@ +{ + "ports":[ + { + "status":"ACTIVE", + "name":"", + "admin_state_up":true, + "network_id":"ebda9658-093b-41ba-80ce-0cf8cb8365d4", + "tenant_id":"63878e4c5dd649d2a980e37aefddfa87", + "binding:vif_type":"ovs", + "device_owner":"compute:None", + "binding:capabilities":{ + "port_filter":false + }, + "mac_address":"fa:16:3e:b9:ef:05", + "fixed_ips":[ + { + "subnet_id":"aca4d43c-c48c-4a2c-9bb6-ba374ef7e135", + "ip_address":"172.24.4.227" + } + ], + "id":"664ebd1a-facd-4c20-948c-07a784475ab0", + "device_id":"f288bb5f-920d-4276-8345-2c0319c16f58" + }, + { + "status":"DOWN", + "name":"", + "admin_state_up":true, + "network_id":"ebda9658-093b-41ba-80ce-0cf8cb8365d4", + "tenant_id":"", + "binding:vif_type":"ovs", + "device_owner":"network:router_gateway", + "binding:capabilities":{ + "port_filter":false + }, + "mac_address":"fa:16:3e:4a:3a:a2", + "fixed_ips":[ + { + "subnet_id":"aca4d43c-c48c-4a2c-9bb6-ba374ef7e135", + "ip_address":"172.24.4.226" + } + ], + "id":"c5ca7017-c390-4ccc-8cd7-333747e57fef", + "device_id":"0dc517bf-9169-4aa6-88b7-569219962881" + }, + { + "status":"ACTIVE", + "name":"", + "admin_state_up":true, + "network_id":"9d83c053-b0a4-4682-ae80-c00df269ce0a", + "tenant_id":"625887121e364204873d362b553ab171", + "binding:vif_type":"ovs", + "device_owner":"network:router_interface", + "binding:capabilities":{ + "port_filter":false + }, + "mac_address":"fa:16:3e:2d:dc:7e", + "fixed_ips":[ + { + "subnet_id":"a318fcb4-9ff0-4485-b78c-9e6738c21b26", + "ip_address":"10.0.0.1" + } + ], + "id":"d7815f5b-a228-47bb-a5e5-f139c4e476f6", + "device_id":"0dc517bf-9169-4aa6-88b7-569219962881" + }, + { + "status":"ACTIVE", + "name":"", + "admin_state_up":true, + "network_id":"9d83c053-b0a4-4682-ae80-c00df269ce0a", + "tenant_id":"625887121e364204873d362b553ab171", + "binding:vif_type":"ovs", + "device_owner":"network:dhcp", + "binding:capabilities":{ + "port_filter":false + }, + "mac_address":"fa:16:3e:73:6d:1c", + "fixed_ips":[ + { + "subnet_id":"a318fcb4-9ff0-4485-b78c-9e6738c21b26", + "ip_address":"10.0.0.2" + } + ], + "id":"f8639521-fab2-4879-94b2-83a47bee8a26", + "device_id":"dhcpe1b8334f-9be9-5e49-aeee-b31e6df6c847-9d83c053-b0a4-4682-ae80-c00df269ce0a" + } + ] +} \ No newline at end of file diff --git a/v2.0/api_samples/ports-get-resp.xml b/v2.0/api_samples/ports-get-resp.xml new file mode 100644 index 0000000..37759d6 --- /dev/null +++ b/v2.0/api_samples/ports-get-resp.xml @@ -0,0 +1,87 @@ +<?xml version='1.0' encoding='UTF-8'?> +<ports xmlns="http://openstack.org/quantum/api/v2.0" xmlns:binding="http://docs.openstack.org/ext/binding/api/v1.0" xmlns:quantum="http://openstack.org/quantum/api/v2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <port> + <status>ACTIVE</status> + <name /> + <admin_state_up quantum:type="bool">True</admin_state_up> + <network_id>ebda9658-093b-41ba-80ce-0cf8cb8365d4</network_id> + <tenant_id>63878e4c5dd649d2a980e37aefddfa87</tenant_id> + <binding:vif_type>ovs</binding:vif_type> + <device_owner>compute:None</device_owner> + <binding:capabilities> + <port_filter quantum:type="bool">False</port_filter> + </binding:capabilities> + <mac_address>fa:16:3e:b9:ef:05</mac_address> + <fixed_ips> + <fixed_ip> + <subnet_id>aca4d43c-c48c-4a2c-9bb6-ba374ef7e135</subnet_id> + <ip_address>172.24.4.227</ip_address> + </fixed_ip> + </fixed_ips> + <id>664ebd1a-facd-4c20-948c-07a784475ab0</id> + <device_id>f288bb5f-920d-4276-8345-2c0319c16f58</device_id> + </port> + <port> + <status>DOWN</status> + <name /> + <admin_state_up quantum:type="bool">True</admin_state_up> + <network_id>ebda9658-093b-41ba-80ce-0cf8cb8365d4</network_id> + <tenant_id /> + <binding:vif_type>ovs</binding:vif_type> + <device_owner>network:router_gateway</device_owner> + <binding:capabilities> + <port_filter quantum:type="bool">False</port_filter> + </binding:capabilities> + <mac_address>fa:16:3e:4a:3a:a2</mac_address> + <fixed_ips> + <fixed_ip> + <subnet_id>aca4d43c-c48c-4a2c-9bb6-ba374ef7e135</subnet_id> + <ip_address>172.24.4.226</ip_address> + </fixed_ip> + </fixed_ips> + <id>c5ca7017-c390-4ccc-8cd7-333747e57fef</id> + <device_id>0dc517bf-9169-4aa6-88b7-569219962881</device_id> + </port> + <port> + <status>ACTIVE</status> + <name /> + <admin_state_up quantum:type="bool">True</admin_state_up> + <network_id>9d83c053-b0a4-4682-ae80-c00df269ce0a</network_id> + <tenant_id>625887121e364204873d362b553ab171</tenant_id> + <binding:vif_type>ovs</binding:vif_type> + <device_owner>network:router_interface</device_owner> + <binding:capabilities> + <port_filter quantum:type="bool">False</port_filter> + </binding:capabilities> + <mac_address>fa:16:3e:2d:dc:7e</mac_address> + <fixed_ip> + <fixed_ip> + <subnet_id>a318fcb4-9ff0-4485-b78c-9e6738c21b26</subnet_id> + <ip_address>10.0.0.1</ip_address> + </fixed_ip> + </fixed_ips> + <id>d7815f5b-a228-47bb-a5e5-f139c4e476f6</id> + <device_id>0dc517bf-9169-4aa6-88b7-569219962881</device_id> + </port> + <port> + <status>ACTIVE</status> + <name /> + <admin_state_up quantum:type="bool">True</admin_state_up> + <network_id>9d83c053-b0a4-4682-ae80-c00df269ce0a</network_id> + <tenant_id>625887121e364204873d362b553ab171</tenant_id> + <binding:vif_type>ovs</binding:vif_type> + <device_owner>network:dhcp</device_owner> + <binding:capabilities> + <port_filter quantum:type="bool">False</port_filter> + </binding:capabilities> + <mac_address>fa:16:3e:73:6d:1c</mac_address> + <fixed_ips> + <fixed_ip> + <subnet_id>a318fcb4-9ff0-4485-b78c-9e6738c21b26</subnet_id> + <ip_address>10.0.0.2</ip_address> + </fixed_ip> + </fixed_ips> + <id>f8639521-fab2-4879-94b2-83a47bee8a26</id> + <device_id>dhcpe1b8334f-9be9-5e49-aeee-b31e6df6c847-9d83c053-b0a4-4682-ae80-c00df269ce0a</device_id> + </port> +</ports> diff --git a/v2.0/api_samples/ports-post-create-bulk-req.json b/v2.0/api_samples/ports-post-create-bulk-req.json new file mode 100644 index 0000000..1430d74 --- /dev/null +++ b/v2.0/api_samples/ports-post-create-bulk-req.json @@ -0,0 +1,14 @@ +{ + "ports":[ + { + "name":"sample_port_1", + "admin_state_up":false, + "network_id":"a3775a7d-9f8b-4148-be81-c84bbd0837ce" + }, + { + "name":"sample_port_2", + "admin_state_up":false, + "network_id":"a3775a7d-9f8b-4148-be81-c84bbd0837ce" + } + ] +} diff --git a/v2.0/api_samples/ports-post-create-bulk-req.xml b/v2.0/api_samples/ports-post-create-bulk-req.xml new file mode 100644 index 0000000..2bda50c --- /dev/null +++ b/v2.0/api_samples/ports-post-create-bulk-req.xml @@ -0,0 +1,10 @@ +<ports> + <port> + <name>test_port_1</name> + <network_id>a3775a7d-9f8b-4148-be81-c84bbd0837ce</network_id> + </port> + <port> + <name>test_port_2</name> + <network_id>a3775a7d-9f8b-4148-be81-c84bbd0837ce</network_id> + </port> +</ports> diff --git a/v2.0/api_samples/quotas-list-res.json b/v2.0/api_samples/quotas-list-res.json new file mode 100644 index 0000000..4e4f15f --- /dev/null +++ b/v2.0/api_samples/quotas-list-res.json @@ -0,0 +1,10 @@ +{ + "quotas": [{ + "subnet": 10, + "network": 10, + "floatingip": 50, + "tenant_id": "b7445f221cda4f4a8ac7db6b218b1339", + "router": 10, + "port": 30 + }] +} \ No newline at end of file diff --git a/v2.0/api_samples/quotas-put-req.json b/v2.0/api_samples/quotas-put-req.json new file mode 100644 index 0000000..c7e298e --- /dev/null +++ b/v2.0/api_samples/quotas-put-req.json @@ -0,0 +1,9 @@ +{ + "quota": { + "subnet": 40, + "router": 50, + "network": 10, + "floatingip": 30, + "port": 30 + } +} \ No newline at end of file diff --git a/v2.0/api_samples/quotas-put-res.json b/v2.0/api_samples/quotas-put-res.json new file mode 100644 index 0000000..38d6b35 --- /dev/null +++ b/v2.0/api_samples/quotas-put-res.json @@ -0,0 +1,9 @@ +{ + "quota": { + "subnet": 40, + "router": 50, + "port": 30, + "network": 10, + "floatingip": 30 + } +} \ No newline at end of file diff --git a/v2.0/api_samples/quotas-show-res.json b/v2.0/api_samples/quotas-show-res.json new file mode 100644 index 0000000..7579982 --- /dev/null +++ b/v2.0/api_samples/quotas-show-res.json @@ -0,0 +1,9 @@ +{ + "quota": { + "subnet": 10, + "router": 10, + "port": 50, + "network": 10, + "floatingip": 50 + } +} \ No newline at end of file diff --git a/v2.0/api_samples/subnet-get-detail-res.json b/v2.0/api_samples/subnet-get-detail-res.json new file mode 100644 index 0000000..63be6bd --- /dev/null +++ b/v2.0/api_samples/subnet-get-detail-res.json @@ -0,0 +1,12 @@ +{ + "port": + { + "state": "DOWN", + "id": "98017ddc-efc8-4c25-a915-774b2a633855", + "attachment": + { + "id": "test_interface_identifier" + } + } +} + diff --git a/v2.0/api_samples/subnet-get-detail-res.xml b/v2.0/api_samples/subnet-get-detail-res.xml new file mode 100644 index 0000000..507f23c --- /dev/null +++ b/v2.0/api_samples/subnet-get-detail-res.xml @@ -0,0 +1,6 @@ +<port + id="98017ddc-efc8-4c25-a915-774b2a633855" + state="DOWN"> + <attachment + id="test_interface_identifier"/> +</port> \ No newline at end of file diff --git a/v2.0/api_samples/subnet-get-res.json b/v2.0/api_samples/subnet-get-res.json new file mode 100644 index 0000000..8ded3d2 --- /dev/null +++ b/v2.0/api_samples/subnet-get-res.json @@ -0,0 +1,8 @@ +{ + "port": + { + "state": "DOWN", + "id": "98017ddc-efc8-4c25-a915-774b2a633855" + } +} + diff --git a/v2.0/api_samples/subnet-get-res.xml b/v2.0/api_samples/subnet-get-res.xml new file mode 100644 index 0000000..622f397 --- /dev/null +++ b/v2.0/api_samples/subnet-get-res.xml @@ -0,0 +1,3 @@ +<port + id="98017ddc-efc8-4c25-a915-774b2a633855" + state="DOWN"/> \ No newline at end of file diff --git a/v2.0/api_samples/subnet-post-req.json b/v2.0/api_samples/subnet-post-req.json new file mode 100644 index 0000000..fa33b66 --- /dev/null +++ b/v2.0/api_samples/subnet-post-req.json @@ -0,0 +1,16 @@ +status: 201, +content-length: 306, +content-type: application/json + +{ + "subnet": { + "name": "", + "network_id": "ed2e3c10-2e43-4297-9006-2863a2d1abbc", + "tenant_id": "c1210485b2424d48804aad5d39c61b8f", + "allocation_pools": [{"start": "10.0.3.20", "end": "10.0.3.150"}], + "gateway_ip": "10.0.3.1", + "ip_version": 4, + "cidr": "10.0.3.0/24", + "id": "9436e561-47bf-436a-b1f1-fe23a926e031", + "enable_dhcp": true} +} \ No newline at end of file diff --git a/v2.0/api_samples/subnet-post-req.xml b/v2.0/api_samples/subnet-post-req.xml new file mode 100644 index 0000000..79f9890 --- /dev/null +++ b/v2.0/api_samples/subnet-post-req.xml @@ -0,0 +1,2 @@ +<port + state="ACTIVE"/> \ No newline at end of file diff --git a/v2.0/api_samples/subnet-post-res.json b/v2.0/api_samples/subnet-post-res.json new file mode 100644 index 0000000..9cec3c5 --- /dev/null +++ b/v2.0/api_samples/subnet-post-res.json @@ -0,0 +1,24 @@ +status: 200 +content-length: 381 +content-type: application/json + +{ + "subnet": { + "allocation_pools": [ + { + "end": "10.0.3.254", + "start": "10.0.3.2" + } + ], + "cidr": "10.0.3.0/24", + "dns_nameservers": [], + "enable_dhcp": true, + "gateway_ip": "10.0.3.1", + "host_routes": [], + "id": "91e47a57-7508-46fe-afc9-fc454e8580e1", + "ip_version": 4, + "name": "sample_subnet", + "network_id": "1a6f6006-9e0b-4f99-984c-96787ae66363", + "tenant_id": "f667b69e4d6749749ef3bcba7251d9ce" + } +} diff --git a/v2.0/api_samples/subnet-post-res.xml b/v2.0/api_samples/subnet-post-res.xml new file mode 100644 index 0000000..c710d9c --- /dev/null +++ b/v2.0/api_samples/subnet-post-res.xml @@ -0,0 +1,2 @@ +<port + id="98017ddc-efc8-4c25-a915-774b2a633855"/> \ No newline at end of file diff --git a/v2.0/api_samples/subnets-create-bulk-resp.json b/v2.0/api_samples/subnets-create-bulk-resp.json new file mode 100644 index 0000000..70086c8 --- /dev/null +++ b/v2.0/api_samples/subnets-create-bulk-resp.json @@ -0,0 +1,28 @@ +{ +"subnets": [ +{ +"name": "sample_subnet_1", +"enable_dhcp": true, +"network_id": "a3775a7d-9f8b-4148-be81-c84bbd0837ce", +"tenant_id": "60cd4f6dbc2f491982a284e7b83b5be3", +"dns_nameservers": [], +"allocation_pools":[{"start": "10.100.0.2", "end": "10.100.255.254"}], +"host_routes": [], +"ip_version": 4, +"gateway_ip": "10.100.0.1", +"cidr": "10.100.0.0/16", +"id": "70ffbaeb-4b43-4605-abe6-4c5bdbb8236b" +}, +{ +"name": "sample_subnet_2", +"enable_dhcp": true, +"network_id": "a3775a7d-9f8b-4148-be81-c84bbd0837ce", +"tenant_id": "60cd4f6dbc2f491982a284e7b83b5be3", +"dns_nameservers": [], +"allocation_pools": [{"start": "172.16.0.2", "end": "172.31.255.254"}], +"host_routes": [], +"ip_version": 4, +"gateway_ip": "172.16.0.1", +"cidr": "172.16.0.0/12", +"id": "d849e3fc-557d-4b27-8f1c-aceca1daa410"}] +} diff --git a/v2.0/api_samples/subnets-create-bulk-resp.xml b/v2.0/api_samples/subnets-create-bulk-resp.xml new file mode 100644 index 0000000..fec5e87 --- /dev/null +++ b/v2.0/api_samples/subnets-create-bulk-resp.xml @@ -0,0 +1,41 @@ +<?xml version='1.0' encoding='UTF-8'?> +<subnets xmlns="http://openstack.org/quantum/api/v2.0" + xmlns:quantum="http://openstack.org/quantum/api/v2.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <subnet> + <name>test_subnet_1</name> + <enable_dhcp quantum:type="bool">True</enable_dhcp> + <network_id>a3775a7d-9f8b-4148-be81-c84bbd0837ce</network_id> + <tenant_id>60cd4f6dbc2f491982a284e7b83b5be3</tenant_id> + <dns_nameservers quantum:type="list" /> + <allocation_pools> + <allocation_pool> + <start>10.0.0.2</start> + <end>10.255.255.254</end> + </allocation_pool> + </allocation_pools> + <host_routes quantum:type="list" /> + <ip_version quantum:type="int">4</ip_version> + <gateway_ip>10.0.0.1</gateway_ip> + <cidr>10.0.0.0/8</cidr> + <id>bd3fd365-fe19-431a-be63-07017a09316c</id> + </subnet> + <subnet> + <name>test_subnet_2</name> + <enable_dhcp quantum:type="bool">True</enable_dhcp> + <network_id>a3775a7d-9f8b-4148-be81-c84bbd0837ce</network_id> + <tenant_id>60cd4f6dbc2f491982a284e7b83b5be3</tenant_id> + <dns_nameservers quantum:type="list" /> + <allocation_pools> + <allocation_pool> + <start>192.168.0.2</start> + <end>192.168.255.254</end> + </allocation_pool> + </allocation_pools> + <host_routes quantum:type="list" /> + <ip_version quantum:type="int">4</ip_version> + <gateway_ip>192.168.0.1</gateway_ip> + <cidr>192.168.0.0/16</cidr> + <id>86e7c838-fb75-402b-9dbf-d68166e3f5fe</id> + </subnet> +</subnets> diff --git a/v2.0/api_samples/subnets-get-detail-res.json b/v2.0/api_samples/subnets-get-detail-res.json new file mode 100644 index 0000000..d66231c --- /dev/null +++ b/v2.0/api_samples/subnets-get-detail-res.json @@ -0,0 +1,18 @@ +status: 200 +content-length: 309 +content-type: application/json + +{ + "subnet": + { + "name": "", + "network_id": "ed2e3c10-2e43-4297-9006-2863a2d1abbc", + "tenant_id": "c1210485b2424d48804aad5d39c61b8f", + "allocation_pools": [{"start": "10.10.0.2", "end": "10.10.0.254"}], + "gateway_ip": "10.10.0.1", + "ip_version": 4, + "cidr": "10.10.0.0/24", + "id": "4156c7a5-e8c4-4aff-a6e1-8f3c7bc83861", + "enable_dhcp": false, + } +} \ No newline at end of file diff --git a/v2.0/api_samples/subnets-get-detail-res.xml b/v2.0/api_samples/subnets-get-detail-res.xml new file mode 100644 index 0000000..ddb7923 --- /dev/null +++ b/v2.0/api_samples/subnets-get-detail-res.xml @@ -0,0 +1,8 @@ +<ports> + <port + id="98017ddc-efc8-4c25-a915-774b2a633855" + state="ACTIVE"/> + <port + id="b832be00-6553-4f69-af33-acd554e36d08" + state="ACTIVE"/> +</ports> \ No newline at end of file diff --git a/v2.0/api_samples/subnets-get-res.json b/v2.0/api_samples/subnets-get-res.json new file mode 100644 index 0000000..02afcea --- /dev/null +++ b/v2.0/api_samples/subnets-get-res.json @@ -0,0 +1,40 @@ +{ + "subnets": [ + { + "allocation_pools": [ + { + "end": "10.0.3.254", + "start": "10.0.3.2" + } + ], + "cidr": "10.0.3.0/24", + "dns_nameservers": [], + "enable_dhcp": true, + "gateway_ip": "10.0.3.1", + "host_routes": [], + "id": "91e47a57-7508-46fe-afc9-fc454e8580e1", + "ip_version": 4, + "name": "", + "network_id": "1a6f6006-9e0b-4f99-984c-96787ae66363", + "tenant_id": "f667b69e4d6749749ef3bcba7251d9ce" + }, + { + "allocation_pools": [ + { + "end": "10.0.2.254", + "start": "10.0.2.2" + } + ], + "cidr": "10.0.2.0/24", + "dns_nameservers": [], + "enable_dhcp": true, + "gateway_ip": "10.0.2.1", + "host_routes": [], + "id": "e3c3620c-9d24-4470-b226-739da2f617c0", + "ip_version": 4, + "name": "", + "network_id": "1a6f6006-9e0b-4f99-984c-96787ae66363", + "tenant_id": "f667b69e4d6749749ef3bcba7251d9ce" + } + ] +} diff --git a/v2.0/api_samples/subnets-get-res.xml b/v2.0/api_samples/subnets-get-res.xml new file mode 100644 index 0000000..1e9e0b3 --- /dev/null +++ b/v2.0/api_samples/subnets-get-res.xml @@ -0,0 +1,6 @@ +<ports> + <port + id="98017ddc-efc8-4c25-a915-774b2a633855"/> + <port + id="b832be00-6553-4f69-af33-acd554e36d08"/> +</ports> \ No newline at end of file diff --git a/v2.0/api_samples/subnets-get-resp.json b/v2.0/api_samples/subnets-get-resp.json new file mode 100644 index 0000000..02afcea --- /dev/null +++ b/v2.0/api_samples/subnets-get-resp.json @@ -0,0 +1,40 @@ +{ + "subnets": [ + { + "allocation_pools": [ + { + "end": "10.0.3.254", + "start": "10.0.3.2" + } + ], + "cidr": "10.0.3.0/24", + "dns_nameservers": [], + "enable_dhcp": true, + "gateway_ip": "10.0.3.1", + "host_routes": [], + "id": "91e47a57-7508-46fe-afc9-fc454e8580e1", + "ip_version": 4, + "name": "", + "network_id": "1a6f6006-9e0b-4f99-984c-96787ae66363", + "tenant_id": "f667b69e4d6749749ef3bcba7251d9ce" + }, + { + "allocation_pools": [ + { + "end": "10.0.2.254", + "start": "10.0.2.2" + } + ], + "cidr": "10.0.2.0/24", + "dns_nameservers": [], + "enable_dhcp": true, + "gateway_ip": "10.0.2.1", + "host_routes": [], + "id": "e3c3620c-9d24-4470-b226-739da2f617c0", + "ip_version": 4, + "name": "", + "network_id": "1a6f6006-9e0b-4f99-984c-96787ae66363", + "tenant_id": "f667b69e4d6749749ef3bcba7251d9ce" + } + ] +} diff --git a/v2.0/api_samples/subnets-post-create-bulk-req.json b/v2.0/api_samples/subnets-post-create-bulk-req.json new file mode 100644 index 0000000..5b3165e --- /dev/null +++ b/v2.0/api_samples/subnets-post-create-bulk-req.json @@ -0,0 +1,14 @@ +{ +"subnets": [ +{"name": "sample_subnet_1", +"network_id": "a3775a7d-9f8b-4148-be81-c84bbd0837ce", +"cidr": "10.100.0.0/16", +"ip_version": 4 +}, +{ +"name": "sample_subnet_2", +"network_id": "a3775a7d-9f8b-4148-be81-c84bbd0837ce", +"cidr": "172.16.0.0/12", +"ip_version": 4 +}] +} diff --git a/v2.0/api_samples/subnets-post-create-bulk-req.xml b/v2.0/api_samples/subnets-post-create-bulk-req.xml new file mode 100644 index 0000000..fb754c0 --- /dev/null +++ b/v2.0/api_samples/subnets-post-create-bulk-req.xml @@ -0,0 +1,14 @@ +<subnets> + <subnet> + <name>test_subnet_1</name> + <network_id>a3775a7d-9f8b-4148-be81-c84bbd0837ce</network_id> + <cidr>10.0.0.0/8</cidr> + <ip_version>4</ip_version> + </subnet> + <subnet> + <name>test_subnet_2</name> + <network_id>a3775a7d-9f8b-4148-be81-c84bbd0837ce</network_id> + <cidr>192.168.0.0/16</cidr> + <ip_version>4</ip_version> + </subnet> +</subnets> diff --git a/v2.0/api_samples/subnets_get_resp.json b/v2.0/api_samples/subnets_get_resp.json new file mode 100644 index 0000000..df67ff9 --- /dev/null +++ b/v2.0/api_samples/subnets_get_resp.json @@ -0,0 +1,29 @@ +status: 200 +content-length: 607 +content-type: application/json + +{ + "subnets": [ + { + "name": "", + "network_id": "ed2e3c10-2e43-4297-9006-2863a2d1abbc", + "tenant_id": "c1210485b2424d48804aad5d39c61b8f", + "allocation_pools": [{"start": "10.10.0.2", "end": "10.10.0.254"}], + "gateway_ip": "10.10.0.1", + "ip_version": 4, + "cidr": "10.10.0.0/24", + "id": "4156c7a5-e8c4-4aff-a6e1-8f3c7bc83861", + "enable_dhcp": true + }, + { + "name": "", + "network_id": "afc75773-640e-403c-9fff-62ba98db1f19", + "tenant_id": "ed680f49ff714162ab3612d7876ffce5", + "allocation_pools": [{"start": "10.0.0.2", "end": "10.0.0.254"}], + "gateway_ip": "10.0.0.1", + "ip_version": 4, + "cidr": "10.0.0.0/24", + "id": "e12f0c45-46e3-446a-b207-9474b27687a6", + "enable_dhcp": true + }] +} \ No newline at end of file diff --git a/v2.0/ch_neutron_api_extensions.xml b/v2.0/ch_neutron_api_extensions.xml new file mode 100644 index 0000000..c1f8c59 --- /dev/null +++ b/v2.0/ch_neutron_api_extensions.xml @@ -0,0 +1,74 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE chapter[ +<!-- Some useful entities borrowed from HTML --> +<!ENTITY ndash "–"> +<!ENTITY mdash "—"> +<!ENTITY hellip "…"> +<!ENTITY plusmn "±"> +<!-- Useful for describing APIs --> +<!ENTITY GET '<command xmlns="http://docbook.org/ns/docbook">GET</command>'> +<!ENTITY PUT '<command xmlns="http://docbook.org/ns/docbook">PUT</command>'> +<!ENTITY POST '<command xmlns="http://docbook.org/ns/docbook">POST</command>'> +<!ENTITY DELETE '<command xmlns="http://docbook.org/ns/docbook">DELETE</command>'> +<!ENTITY CHECK '<inlinemediaobject xmlns="http://docbook.org/ns/docbook"> + <imageobject> + <imagedata fileref="figures/Check_mark_23x20_02.svg" + format="SVG" scale="60"/> +</imageobject> + </inlinemediaobject>'> +<!ENTITY ARROW '<inlinemediaobject xmlns="http://docbook.org/ns/docbook"> + <imageobject> + <imagedata fileref="figures/Arrow_east.svg" + format="SVG" scale="60"/> +</imageobject> + </inlinemediaobject>'> + <!ENTITY APIv2 'Networking API v2.0'> +]> +<chapter xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:m="http://www.w3.org/1998/Math/MathML" + xmlns:html="http://www.w3.org/1999/xhtml" + xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" + xmlns:db="http://docbook.org/ns/docbook" version="5.0" + xml:id="API_extensions"> + <title>API Extensions</title> + <para>The API extensions augment the core API. An API extension + extends one or more of the following components of the core + API:</para> + <itemizedlist> + <listitem> + <para>Resources. An extension defines new object + classes.</para> + </listitem> + <listitem> + <para>Attributes. An extended attribute defines a new + attribute on existing resources. Prefixed by the + extension name.</para> + </listitem> + <listitem> + <para>Actions. An extended action defines a new operation + on an existing resource.</para> + </listitem> + </itemizedlist> + <para>Generic API extensions are not plug-in-specific. For + information about plug-in-specific extensions that are shipped + with OpenStack Networking, see the extension documentation in + the source code tree.</para> + <xi:include href="section_neutron_list-extensions.xml"/> + <xi:include href="section_neutron-provider-ext.xml"/> + <xi:include href="section_neutron_binding_ext_ports.xml"/> + <xi:include href="section_neutron-l3-ext.xml"/> + <xi:include href="section_neutron-extgwmodes-ext.xml"/> + <xi:include href="section_neutron-quotas-ext.xml"/> + <xi:include href="section_neutron-security-groups-ext.xml"/> + <xi:include href="section_neutron-agent-ext.xml"/> + <xi:include href="section_neutron-extraroute-ext.xml"/> + <xi:include href="section_neutron-loadbalancer-ext.xml"/> + <xi:include href="section_neutron-firewall-ext.xml"/> + <xi:include href="section_neutron-scheduler-ext.xml"/> + <xi:include href="section_neutron-vpn-ext.xml"/> + <xi:include href="section_neutron-allowed-address-pair-ext.xml"/> + <xi:include href="section_neutron-extra-dhcp-opt-ext.xml"/> +</chapter> diff --git a/v2.0/ch_neutron_api_operations.xml b/v2.0/ch_neutron_api_operations.xml new file mode 100644 index 0000000..2a8facf --- /dev/null +++ b/v2.0/ch_neutron_api_operations.xml @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE chapter[ +<!-- Some useful entities borrowed from HTML --> +<!ENTITY ndash "–"> +<!ENTITY mdash "—"> +<!ENTITY hellip "…"> +<!ENTITY plusmn "±"> +<!-- Useful for describing APIs --> +<!ENTITY GET '<command xmlns="http://docbook.org/ns/docbook">GET</command>'> +<!ENTITY PUT '<command xmlns="http://docbook.org/ns/docbook">PUT</command>'> +<!ENTITY POST '<command xmlns="http://docbook.org/ns/docbook">POST</command>'> +<!ENTITY DELETE '<command xmlns="http://docbook.org/ns/docbook">DELETE</command>'> +<!ENTITY CHECK '<inlinemediaobject xmlns="http://docbook.org/ns/docbook"> + <imageobject> + <imagedata fileref="figures/Check_mark_23x20_02.svg" + format="SVG" scale="60"/> +</imageobject> + </inlinemediaobject>'> +<!ENTITY ARROW '<inlinemediaobject xmlns="http://docbook.org/ns/docbook"> + <imageobject> + <imagedata fileref="figures/Arrow_east.svg" + format="SVG" scale="60"/> +</imageobject> + </inlinemediaobject>'> + <!ENTITY APIv2 'Networking API v2.0'> +]> +<chapter xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:m="http://www.w3.org/1998/Math/MathML" + xmlns:html="http://www.w3.org/1999/xhtml" + xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" + xmlns:db="http://docbook.org/ns/docbook" version="5.0" + xml:id="API_Operations" role="api-reference"> + <title>API Operations</title> + <para>Provides virtual networking services among devices that are + managed by the OpenStack Compute service. The Networking API + v2.0 combines the API v1.1 functionality with some essential + Internet Protocol Address Management (IPAM) functionality. + Enables users to associate IP address blocks and other network + configuration settings with a neutron network. You can choose + a specific IP address from the block or let neutron choose the + first available IP address.</para> + <section xml:id="networks"> + <title>Networks</title> + <para>Lists, shows information for, creates, updates, and + deletes networks.</para> + <wadl:resources + href="http://git.openstack.org/cgit/openstack/api-site/plain/api-ref/src/wadls/netconn-api/src/os-networks.wadl" + xmlns:wadl="http://wadl.dev.java.net/2009/02"/> + </section> + <section xml:id="subnets"> + <title>Subnets</title> + <para>Lists, shows information for, creates, updates, and + deletes subnet resources.</para> + <wadl:resources + href="http://git.openstack.org/cgit/openstack/api-site/plain/api-ref/src/wadls/netconn-api/src/os-subnets.wadl" + xmlns:wadl="http://wadl.dev.java.net/2009/02"/> + </section> + <section xml:id="ports"> + <title>Ports</title> + <para>Lists, shows information for, creates, updates, and + deletes ports.</para> + <wadl:resources + href="http://git.openstack.org/cgit/openstack/api-site/plain/api-ref/src/wadls/netconn-api/src/os-ports.wadl" + xmlns:wadl="http://wadl.dev.java.net/2009/02"/> + </section> +</chapter> diff --git a/v2.0/ch_neutron_general_info.xml b/v2.0/ch_neutron_general_info.xml new file mode 100644 index 0000000..55edffc --- /dev/null +++ b/v2.0/ch_neutron_general_info.xml @@ -0,0 +1,448 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE chapter[ +<!-- Some useful entities borrowed from HTML --> +<!ENTITY ndash "–"> +<!ENTITY mdash "—"> +<!ENTITY hellip "…"> +<!ENTITY plusmn "±"> +<!-- Useful for describing APIs --> +<!ENTITY GET '<command xmlns="http://docbook.org/ns/docbook">GET</command>'> +<!ENTITY PUT '<command xmlns="http://docbook.org/ns/docbook">PUT</command>'> +<!ENTITY POST '<command xmlns="http://docbook.org/ns/docbook">POST</command>'> +<!ENTITY DELETE '<command xmlns="http://docbook.org/ns/docbook">DELETE</command>'> +<!ENTITY CHECK '<inlinemediaobject xmlns="http://docbook.org/ns/docbook"> + <imageobject> + <imagedata fileref="figures/Check_mark_23x20_02.svg" + format="SVG" scale="60"/> +</imageobject> + </inlinemediaobject>'> +<!ENTITY ARROW '<inlinemediaobject xmlns="http://docbook.org/ns/docbook"> + <imageobject> + <imagedata fileref="figures/Arrow_east.svg" + format="SVG" scale="60"/> +</imageobject> + </inlinemediaobject>'> + <!ENTITY APIv2 'Networking API v2.0'> +]> +<chapter xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:m="http://www.w3.org/1998/Math/MathML" + xmlns:html="http://www.w3.org/1999/xhtml" + xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" + xmlns:db="http://docbook.org/ns/docbook" version="5.0" + xml:id="General_API_Information-d1e436"> + <?dbhtml stop-chunking?> + <title>General API Information</title> + <para>The &APIv2; is a ReSTful HTTP service that uses all aspects + of the HTTP protocol including methods, URIs, media types, + response codes, and so on. Providers can use existing features + of the protocol including caching, persistent connections, and + content compression. For example, providers who employ a + caching layer can respond with a <errorcode>203</errorcode> + code instead of a <errorcode>200</errorcode> code when a + request is served from the cache. Additionally, providers can + offer support for conditional &GET; requests by using ETags, + or they may send a redirect in response to a &GET; request. + Create clients so that these differences are accounted + for.</para> + <section xml:id="Authentication-d1e444"> + <title>Authentication and Authorization</title> + <para>The &APIv2; uses the <link + xlink:href="https://openstack.keystone.org">Keystone + Identity Service</link> as the default authentication + service. When Keystone is enabled, users that submit + requests to the OpenStack Networking service must provide + an authentication token in <emphasis role="bold" + >X-Auth-Token</emphasis> request header. You obtain + the token by authenticating to the Keystone endpoint. For + more information about Keystone, see the <link + xlink:href="http://docs.openstack.org/api/openstack-identity-service/2.0/content/" + ><citetitle>OpenStack Identity Service API v2.0 + Reference</citetitle></link>.</para> + <para>When Keystone is enabled, the + <literal>tenant_id</literal> attribute is not required + in create requests because the tenant ID is derived from + the authentication token.</para> + <para>The default authorization settings allow only + administrative users to create resources on behalf of a + different tenant.</para> + <para>OpenStack Networking uses information received from + Keystone to authorize user requests. OpenStack Networking + handles the following types of authorization policies: <itemizedlist> + <listitem> + <para><emphasis role="bold">Operation-based + policies</emphasis> specify access + criteria for specific operations, possibly + with fine-grained control over specific + attributes.</para> + </listitem> + <listitem> + <para><emphasis role="bold">Resource-based + policies</emphasis> access a specific + resource. Permissions might or might not be + granted depending on the permissions + configured for the resource. Currently + available for only the network + resource.</para> + </listitem> + </itemizedlist></para> + <para>The actual authorization policies enforced in OpenStack + Networking might vary from deployment to + deployment.</para> + </section> + <?hard-pagebreak?> + <section xml:id="Request_Response_Types"> + <title>Request/Response Types</title> + <para>The &APIv2; supports the JSON data serialization + format.</para> + <para>The format for both the request and the response can be + specified by using the <code>Content-Type</code> header, + the <code>Accept</code> header or adding the + <code>.json</code> extension to the request + URI.</para> + <example> + <title>JSON Request with Headers</title> + <literallayout class="monospaced">POST /v1.0/tenants/tenantX/networks HTTP/1.1 +Host 127.0.0.1:9696 +Content-Type application/json +Accept application/json +Content-Length 57</literallayout> + <programlisting language="json"><xi:include href="samples/networks-post-req.json" parse="text"/></programlisting> + </example> + <example> + <title>JSON Response with Headers</title> + <literallayout class="monospaced">HTTP/1.1 201 Created +Content-Type application/json +Content-Length 204</literallayout> + <programlisting language="json"><xi:include href="samples/networks-post-res.json" parse="text"/></programlisting> + </example> + </section> + <section xml:id="filtering"> + <title>Filtering and Column Selection</title> + <para>The &APIv2; supports filtering based on all top level + attributes of a resource. Filters are applicable to all + list requests.</para> + <para>For example, the following request returns all networks + named <literal>foobar</literal>:</para> + <programlisting language="bash" role="gutter: false">GET /v2.0/networks?name=foobar</programlisting> + <para>When you specify multiple filters, the &APIv2; returns + only objects that meet all filtering criteria. The + operation applies an AND condition among the + filters.</para> + <note> + <para>OpenStack Networking does not offer an OR mechanism + for filters.</para> + </note> + <para>Alternatively, you can issue a distinct request for each + filter and build a response set from the received + responses on the client-side.</para> + <para>By default, OpenStack Networking returns all attributes + for any show or list call. The &APIv2; has a mechanism to + limit the set of attributes returned. For example, return + <literal>id</literal>.</para> + <para>You can use the <literal>fields</literal> query + parameter to control the attributes returned from the + &APIv2;.</para> + <para>For example, the following request returns only + <literal>id</literal> and <literal>name</literal> for + each network:</para> + <programlisting language="bash" role="gutter: false">GET /v2.0/networks.json?fields=id&fields=name</programlisting> + </section> + <section xml:id="Async_behaviour"> + <title>Synchronous versus Asynchronous Plug-in + Behavior</title> + <para>The &APIv2; presents a logical model of network + connectivity consisting of networks, ports, and subnets. + It is up to the OpenStack Networking plug-in to + communicate with the underlying infrastructure to ensure + packet forwarding is consistent with the logical model. A + plug-in might perform these operations + asynchronously.</para> + <para>When an API client modifies the logical model by issuing + an HTTP &POST;, &PUT;, or &DELETE; request, the API call + might return before the plug-in modifies underlying + virtual and physical switching devices. However, an API + client is guaranteed that all subsequent API calls + properly reflect the changed logical model.</para> + <para>For example, if a client issues an HTTP &PUT; request to + set the attachment for a port, there is no guarantee that + packets sent by the interface named in the attachment are + forwarded immediately when the HTTP call returns. However, + it is guaranteed that a subsequent HTTP &GET; request to + view the attachment on that port returns the new + attachment value.</para> + <para>You can use the <literal>status</literal> attribute with + the network and port resources to determine whether the + OpenStack Networking plug-in has successfully completed + the configuration of the resource.</para> + </section> + <section xml:id="bulk_create_operations"> + <title>Bulk Create Operations</title> + <para>The &APIv2; enables you to create several objects of the + same type in the same API request. Bulk create operations + use exactly the same API syntax as single create + operations except that you specify a list of objects + rather than a single object in the request body.</para> + <para>Bulk operations are always performed atomically, meaning + that either all or none of the objects in the request body + are created. If a particular plug-in does not support + atomic operations, the &APIv2; emulates the atomic + behavior so that users can expect the same behavior + regardless of the particular plug-in running in the + background.</para> + <para>OpenStack Networking might be deployed without support + for bulk operations and when the client attempts a bulk + create operation, a <errorcode>400</errorcode> + <errortext>Bad Request</errortext> error is + returned.</para> + <!-- <para>For information about how to submit bulk requests to the + &APIv2; see <xref linkend="bulk_create_networks"/>, <xref + linkend="bulK_create_subnets"/>, and <xref + linkend="bulk_create_ports"/>.</para> --> + </section> + <section xml:id="pagination"> + <title>Pagination</title> + <para>To reduce load on the service, list operations will + return a maximum number of items at a time. To navigate + the collection, the parameters limit, marker and + page_reverse can be set in the URI. For example:</para> + <programlisting language="bash">?limit=100&marker=1234&page_reverse=False</programlisting> + <para>The <parameter>marker</parameter> parameter is the ID of + the last item in the previous list. The + <parameter>limit</parameter> parameter sets the page + size. The <parameter>page_reverse</parameter> parameter + sets the page direction. These parameters are optional. If + the client requests a limit beyond the maximum limit + configured by the deployment, the server returns the + maximum limit number of items.</para> + <para>For convenience, list responses contain atom "next" + links and "previous" links. The last page in the list + requested with 'page_reverse=False' will not contain + "next" link, and the last page in the list requested with + 'page_reverse=True' will not contain "previous" link. The + following examples illustrate two pages with three items. + The first page was retrieved through:</para> + <programlisting language="bash">&GET; http://127.0.0.1:9696/v2.0/networks.json?limit=2</programlisting> + <para>Pagination is an optional feature of OpenStack + Networking API, and it might be disabled. If pagination is + disabled, the pagination parameters will be ignored and + return all the items.</para> + <para>If a particular plug-in does not support pagination + operations, and pagination is enabled, the &APIv2; will + emulate the pagination behavior so that users can expect + the same behavior regardless of the particular plug-in + running in the background.</para> + <para>Unfortunately OpenStack Networking does not expose any + mechanism to tell user if pagination is supported by + particular plug-in or enabled.</para> + <example> + <title>Network Collection, First Page: JSON + Request</title> + + <literallayout class="monospaced">GET /v2.0/networks.json?limit=2 HTTP/1.1 +Host: 127.0.0.1:9696 +Content-Type: application/json +Accept: application/json</literallayout> + </example> + <example> + <title>Network Collection, First Page: JSON + Response</title> + <programlisting language="json"><xi:include href="samples/networks-get-first-page-res.json" parse="text"/></programlisting> + </example> + <example> + <title>Network Collection, First Page: XML Request</title> + <literallayout class="monospaced"> +GET /v2.0/networks.xml?limit=2 HTTP/1.1 +Host: 127.0.0.1:9696 +Content-Type: application/xml +Accept: application/xml + </literallayout> + </example> + <example> + <title>Network Collection, First Page: XML + Response</title> + <programlisting language="xml"><xi:include href="samples/networks-get-first-page-res.xml" parse="text"/></programlisting> + </example> + <para>The last page won't show the "next" links</para> + <example> + <title>Network Collection, Last Page: JSON Request</title> + <literallayout class="monospaced"> +GET /v2.0/networks.json?limit=2&marker=71c1e68c-171a-4aa2-aca5-50ea153a3718 HTTP/1.1 +Host: 127.0.0.1:9696 +Content-Type: application/json +Accept: application/json + </literallayout> + </example> + <example> + <title>Network Collection, Last Page: JSON + Response</title> + <programlisting language="json"><xi:include href="samples/networks-get-last-page-res.json" parse="text"/></programlisting> + </example> + <example> + <title>Network Collection, Last Page: XML Request</title> + <literallayout class="monospaced"> +GET /v2.0/networks.xml?limit=2&marker=71c1e68c-171a-4aa2-aca5-50ea153a3718 HTTP/1.1 +Host: 127.0.0.1:9696 +Content-Type: application/xml +Accept: application/xml + </literallayout> + </example> + <example> + <title>Network Collection, Last Page: XML Response</title> + <programlisting language="json"><xi:include href="samples/networks-get-last-page-res.xml" parse="text"/></programlisting> + </example> + </section> + <section xml:id="Sorting"> + <title>Sorting</title> + <para>The results of list operations can be ordered using the + 'sort_key' and 'sort_dir' parameters. Currently sorting + doesn't work with extended attributes of resource. The + 'sort_key' and 'sort_dir' can be repeated, and the number + of 'sort_key' and 'sort_dir' provided must be same. The + sort_dir parameter indicates in which direction to sort. + Acceptable values are 'asc' (ascending) and 'desc' + (descending).</para> + <para>Sorting is optional feature of OpenStack Networking API, + and it might be disabled. If sorting is disabled, the + sorting parameters will be ignored.</para> + <para>If a particular plug-in does not support sorting + operations, and sorting is enabled, the &APIv2; will + emulate the sorting behavior so that users can expect the + same behavior regardless of the particular plug-in running + in the background.</para> + <para>Unfortunately OpenStack Networking does provide a + mechanism to tell users if specific plug-ins support or + have enabled sorting.</para> + </section> + <section xml:id="extensions"> + <title>Extensions</title> + <para>The &APIv2; is extensible.</para> + <para>The purpose of &APIv2; extensions is to:</para> + <itemizedlist> + <listitem> + <para>Introduce new features in the API without + requiring a version change.</para> + </listitem> + <listitem> + <para>Introduce vendor-specific niche + functionality.</para> + </listitem> + <listitem> + <para>Act as a proving ground for experimental + functionalities that might be included in a future + version of the API.</para> + </listitem> + </itemizedlist> + <para>To programmatically determine which extensions are + available, issue a &GET; request on the + <command>v2.0/extensions</command> URI.</para> + <para>To query extensions individually by unique alias, issue + a &GET; request on the + <command>/v2.0/extensions/<replaceable>alias_name</replaceable></command> + URI. Use this method to easily determine if an extension + is available. If the extension is not available, a + <errorcode>404</errorcode> + <errortext>Not Found</errortext> response is + returned.</para> + <para>You can extend existing core API resources with new + actions or extra attributes. Also, you can add new + resources as extensions. Extensions usually have tags that + prevent conflicts with other extensions that define + attributes or resources with the same names, and with core + resources and attributes. Because an extension might not + be supported by all plug-ins, the availability of an + extension varies with deployments and the specific plug-in + in use.</para> + <para>For more information regarding specific extensions, see + <xref linkend="API_extensions"/></para> + </section> + <?hard-pagebreak?> + <section xml:id="faults"> + <title>Faults</title> + <para>The &APIv2; returns an error response if a failure + occurs while processing a request. OpenStack Networking + uses only standard HTTP error codes. + 4<varname>xx</varname> errors indicate problems in the + particular request being sent from the client.</para> + <informaltable rules="all"> + <col width="10%"/> + <col width="20%"/> + <col width="70%"/> + <thead> + <tr> + <th>Error</th> + <th colspan="2">Description</th> + </tr> + </thead> + <tbody> + <tr> + <td rowspan="6">400</td> + <td rowspan="6">Bad Request</td> + <td>Malformed request URI or body</td> + </tr> + <tr> + <td>Requested admin state invalid</td> + </tr> + <tr> + <td>Invalid values entered</td> + </tr> + <tr> + <td>Bulk operations disallowed</td> + </tr> + <tr> + <td>Validation failed</td> + </tr> + <tr> + <td>Method not allowed for request body (such as + trying to update attributes that can be + specified at create-time only)</td> + </tr> + <tr> + <td rowspan="2">404</td> + <td rowspan="2">Not Found</td> + <td>Non existent URI</td> + </tr> + <tr> + <td>Resource not found</td> + </tr> + <tr> + <td rowspan="3">409</td> + <td rowspan="3">Conflict</td> + <td>Port configured on network</td> + </tr> + <tr> + <td>IP allocated on subnet</td> + </tr> + <tr> + <td>Conflicting IP allocation pools for + subnet</td> + </tr> + <tr> + <td>500</td> + <td>Internal server error</td> + <td>Internal OpenStack Networking error</td> + </tr> + <tr> + <td>503</td> + <td>Service unavailable</td> + <td>Failure in Mac address generation</td> + </tr> + </tbody> + </informaltable> + <para>Users submitting requests to the &APIv2; might also + receive the following errors:</para> + <itemizedlist> + <listitem> + <para><errorcode>401</errorcode> Unauthorized - If + invalid credentials are provided.</para> + </listitem> + <listitem> + <para><errorcode>403</errorcode> Forbidden - If the + user cannot access a specific resource or perform + the requested operation.</para> + </listitem> + </itemizedlist> + </section> +</chapter> diff --git a/v2.0/ch_neutron_overview.xml b/v2.0/ch_neutron_overview.xml new file mode 100644 index 0000000..1e06b96 --- /dev/null +++ b/v2.0/ch_neutron_overview.xml @@ -0,0 +1,270 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE chapter[ +<!-- Some useful entities borrowed from HTML --> +<!ENTITY ndash "–"> +<!ENTITY mdash "—"> +<!ENTITY hellip "…"> +<!ENTITY plusmn "±"> +<!-- Useful for describing APIs --> +<!ENTITY GET '<command xmlns="http://docbook.org/ns/docbook">GET</command>'> +<!ENTITY PUT '<command xmlns="http://docbook.org/ns/docbook">PUT</command>'> +<!ENTITY POST '<command xmlns="http://docbook.org/ns/docbook">POST</command>'> +<!ENTITY DELETE '<command xmlns="http://docbook.org/ns/docbook">DELETE</command>'> +<!ENTITY CHECK '<inlinemediaobject xmlns="http://docbook.org/ns/docbook"> + <imageobject> + <imagedata fileref="figures/Check_mark_23x20_02.svg" + format="SVG" scale="60"/> +</imageobject> + </inlinemediaobject>'> +<!ENTITY ARROW '<inlinemediaobject xmlns="http://docbook.org/ns/docbook"> + <imageobject> + <imagedata fileref="figures/Arrow_east.svg" + format="SVG" scale="60"/> +</imageobject> + </inlinemediaobject>'> + <!ENTITY APIv2 'Networking API v2.0'> +]> +<chapter xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:m="http://www.w3.org/1998/Math/MathML" + xmlns:html="http://www.w3.org/1999/xhtml" + xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" + xmlns:db="http://docbook.org/ns/docbook" version="5.0" + xml:id="Overview-d1e71"> + <?dbhtml stop-chunking?> + <title>Overview</title> + <para>The Neutron project provides virtual networking services + among devices that are managed by the <link + xlink:href="http://wiki.openstack.org/OpenStack" + >OpenStack</link> compute service.</para> + <para>The &APIv2; combines the <link + xlink:href="http://docs.openstack.org/api/openstack-network/1.0/content/" + >Quantum API v1.1</link> with some essential Internet + Protocol Address Management (IPAM) capabilities from the <link + xlink:href="http://melange.readthedocs.org/en/latest/apidoc.html" + >Melange API</link>. </para> + <para>These IPAM capabilities enable you to:</para> + <itemizedlist> + <listitem> + <para>Associate IP address blocks and other network + configuration settings required by a network device, + such as a default gateway and dns-servers settings, + with an OpenStack Networking network.</para> + </listitem> + <listitem> + <para>Allocate an IP address from a block and associate it + with a device that is attached to the network through + an OpenStack Networking port.</para> + </listitem> + </itemizedlist> + <para>To do this, the &APIv2; introduces the subnet entity. A + subnet can represent either an IP version 4 or version 6 + address block. Each OpenStack Networking network commonly has + one or more subnets. When you create a port on the network, an + available fixed IP address is allocated to it from one the + designated subnets for each IP version. When you delete the + port, the allocated addresses return to the pool of available + IPs on the subnet. &APIv2; users can choose a specific IP + address from the block or let OpenStack Networking choose the + first available IP address.</para> + <note> + <para>The Quantum API v1.<varname>x</varname> was removed from + the source code tree. To use the Quantum API + v1.<varname>x</varname>, install the Quantum Essex + release.</para> + </note> + <?hard-pagebreak?> + <section xml:id="Glossary"> + <title>Glossary</title> + <informaltable rules="all"> + <thead> + <tr> + <td align="left">Term</td> + <td colspan="4" align="left">Description</td> + </tr> + </thead> + <tbody> + <tr> + <td align="left">CRUD</td> + <td colspan="4">Create, read, update, and delete + (CRUD) are the basic functions of persistent + storage in computer programming.</td> + </tr> + <tr> + <td align="left">entity</td> + <td colspan="4">Any piece of hardware or software + that can connect to the network services + provided by OpenStack Networking. An entity + can use OpenStack Networking services by + implementing a VIF.</td> + </tr> + <tr> + <td align="left">IPAM</td> + <td colspan="4">Internet Protocol Address + Management (IPAM) is a means of planning, + tracking, and managing the Internet Protocol + (IP) address space that is used in a + network.</td> + </tr> + <tr> + <!-- <td align="left" bgcolor="#4F91BD"> --> + <td align="left">layer-2 network</td> + <!-- <td colspan="4" bgcolor="#4F91BD"> --> + <td colspan="4">A virtual Ethernet network that is + managed by the OpenStack Networking service. + Currently, OpenStack Networking manages only + Ethernet networks. </td> + </tr> + <tr> + <td align="left">network</td> + <td colspan="4">An isolated virtual layer-2 + broadcast domain that is typically reserved + for the tenant who created it unless the + network is configured to be shared. Tenants + can create multiple networks until they reach + the thresholds specified by per-tenant + quotas.</td> + </tr> + <tr> + <!-- <td align="left" bgcolor="#4F91BD"> --> + <td align="left">plug-in</td> + <!-- <td colspan="4" bgcolor="#4F91BD"> --> + <td colspan="4">A software component that + implements &APIv2;.</td> + </tr> + <tr> + <td align="left">port</td> + <td colspan="4">A virtual switch port on a logical + network switch. Virtual instances attach their + interfaces into ports. The logical port also + defines the MAC address and the IP addresses + to be assigned to the interfaces plugged into + them. When IP addresses are associated to a + port, this also implies the port is associated + with a subnet, as the IP address was taken + from the allocation pool for a specific + subnet. </td> + </tr> + <tr> + <td align="left">subnet</td> + <td colspan="4">An IP address block that can be + used to assign IP addresses to virtual + instances. Each subnet must have a CIDR and + must be associated with a network. IPs can be + either selected from the whole subnet CIDR or + from allocation pools that can be specified by + the user.</td> + </tr> + <tr> + <td align="left">VM</td> + <td colspan="4">A virtual machine (VM) is a + completely isolated guest operating system + installation within a normal host operating + system.</td> + </tr> + </tbody> + </informaltable> + </section> + <?hard-pagebreak?> + <xi:include href="section_neutron_concepts.xml"/> + <section xml:id="Theory"> + <title>High-Level Task Flow</title> + <para>The high-level task flow for OpenStack Networking + involves creating a network, associating a subnet with + that network, and booting a VM that is attached to the + network. Clean-up includes deleting the VM, deleting any + ports associated with the network, and deleting the + networks. OpenStack Networking deletes any subnets + associated with the deleted network.</para> + <procedure> + <title>To use OpenStack Networking - high-level task + flow</title> + <step> + <title>Create a network</title> + <para>The tenant creates a network.</para> + <para>For example, the tenant creates the + <literal>net1</literal> network. Its ID is + <emphasis role="italic" + >net1_id</emphasis>.</para> + <!-- <para>See <xref linkend="Create_Network"/>.</para> --> + </step> + <step> + <title>Associate a subnet with the network</title> + <para>The tenant associates a subnet with that + network.</para> + <para>For example, the tenant associates the + <literal>10.0.0.0/24</literal> subnet with the + <literal>net1</literal> network.</para> + <!-- <para>See <xref linkend="create_subnet"/>.</para> --> + </step> + <step> + <title>Boot a VM and attach it to the network</title> + <para>The tenant boots a virtual machine (VM) and + specifies a single NIC that connects to the + network.</para> + <para>The following examples use the nova client to + boot a VM.</para> + <para>In the first example, Nova contacts OpenStack + Networking to create the NIC and attach it to the + <literal>net1</literal> network, with the ID + <emphasis role="italic" + >net1_id</emphasis>:</para> + <screen><prompt>$</prompt> <userinput>nova boot <server_name> --image <image> --flavor <flavor> --nic net-id=<net1_id></userinput></screen> + <para>In a second example, you first create the + <literal>port1</literal>, port and then you + boot the VM with a specified port. OpenStack + Networking creates a NIC and attaches it to the + <literal>port1</literal> port, with the ID + <emphasis role="italic" + >port1_id</emphasis>:</para> + <screen><prompt>$</prompt> <userinput>nova boot <server_name> --image <image> --flavor <flavor> --nic port-id=<port1_id></userinput></screen> + <para>OpenStack Networking chooses and assigns an IP + address to the <literal>port1</literal> + port.</para> + <para>For more information about the <command>nova + boot</command> command, enter:</para> + <screen><prompt>$</prompt> <userinput>nova help boot</userinput></screen> + </step> + <step> + <title>Delete the VM</title> + <para>The tenant deletes the VM.</para> + <para>Nova contacts OpenStack Networking and deletes + the <literal>port1</literal> port.</para> + <para>The allocated IP address is returned to the pool + of available IP addresses.</para> + </step> + <step> + <title>Delete any ports</title> + <para>If the tenant created any ports and associated + them with the network, the tenant deletes the + ports.</para> + <!-- <para>See <xref linkend="Delete_Port"/>.</para>--> + </step> + <step> + <title>Delete the network</title> + <para>The tenant deletes the network. This operation + deletes an OpenStack Networking network and its + associated subnets provided that no port is + currently configured on the network.</para> + </step> + </procedure> + </section> + <?hard-pagebreak?> + <section xml:id="plugin"> + <title>Plug-ins</title> + <para>Virtual networking services are implemented through a + plug-in. A plug-in can use different techniques and + technologies to provide isolated virtual networks to + tenants. A plug-in also provides other services, such as + IP address management. Because each plug-in implements all + the operations included in &APIv2;, do not be concerned + about which plug-in is used.</para> + <para>However, some plug-ins might expose additional + capabilities through API extensions, which this document + discusses. For more information about the extensions + exposed by a particular plug-in, see the plug-in + documentation.</para> + </section> +</chapter> diff --git a/v2.0/ch_preface.xml b/v2.0/ch_neutron_preface.xml similarity index 100% rename from v2.0/ch_preface.xml rename to v2.0/ch_neutron_preface.xml diff --git a/v2.0/neutron-api-guide.xml b/v2.0/neutron-api-guide.xml index 03951b4..b28efbc 100644 --- a/v2.0/neutron-api-guide.xml +++ b/v2.0/neutron-api-guide.xml @@ -10,7 +10,6 @@ <!ENTITY PUT '<command xmlns="http://docbook.org/ns/docbook">PUT</command>'> <!ENTITY POST '<command xmlns="http://docbook.org/ns/docbook">POST</command>'> <!ENTITY DELETE '<command xmlns="http://docbook.org/ns/docbook">DELETE</command>'> - <!ENTITY CHECK '<inlinemediaobject xmlns="http://docbook.org/ns/docbook"> <imageobject> <imagedata fileref="figures/Check_mark_23x20_02.svg" @@ -31,10 +30,10 @@ xmlns:svg="http://www.w3.org/2000/svg" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:html="http://www.w3.org/1999/xhtml" + xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" xmlns:db="http://docbook.org/ns/docbook" version="5.0" status="final" xml:id="neutron-api-spec"> <title>OpenStack Networking API v2.0 Reference</title> - <?rax title.font.size="28px" subtitle.font.size="28px"?> <titleabbrev>Networking API Reference</titleabbrev> <info> <author> @@ -64,6 +63,17 @@ </abstract> <revhistory> <!-- ... continue adding more revisions here as you change this document using the markup shown below... --> + <revision> + <date>2013-12-20</date> + <revdescription> + <itemizedlist spacing="compact"> + <listitem> + <para>Updated book to source information + from WADL files.</para> + </listitem> + </itemizedlist> + </revdescription> + </revision> <revision> <date>2013-10-11</date> <revdescription> @@ -129,2587 +139,9 @@ </revision> </revhistory> </info> - <xi:include href="ch_preface.xml"/> - <chapter xml:id="Overview-d1e71"> - <title>Overview</title> - <para>The Neutron project provides virtual networking services - among devices that are managed by the <link - xlink:href="http://wiki.openstack.org/OpenStack" - >OpenStack</link> compute service.</para> - <para>The &APIv2; combines the <link - xlink:href="http://docs.openstack.org/api/openstack-network/1.0/content/" - >Quantum API v1.1</link> with some essential Internet - Protocol Address Management (IPAM) capabilities from the - <link - xlink:href="http://melange.readthedocs.org/en/latest/apidoc.html" - >Melange API</link>.</para> - <para>These IPAM capabilities enable you to:<itemizedlist> - <listitem> - <para>Associate IP address blocks and other - network configuration settings required by a - network device, such as a default gateway and - dns-servers settings, with an OpenStack - Networking network.</para> - </listitem> - <listitem> - <para>Allocate an IP address from a block and - associate it with a device that is attached to - the network through an OpenStack Networking - port.</para> - </listitem> - </itemizedlist>To do this, the &APIv2; introduces the - subnet entity that can represent either an IP version 4 or - version 6 address block. Each OpenStack Networking network - commonly has one or more subnets. When you create a port - on the network, an available fixed IP address is allocated - to it from one the designated subnets for each IP version. - When you delete the port, the allocated addresses return - to the pool of available IPs on the subnet. &APIv2; users - can choose a specific IP address from the block or let - OpenStack Networking choose the first available IP - address.</para> - <note> - <para>The Quantum API v1.<varname>x</varname> was removed - from the source code tree. To use the Quantum API - v1.<varname>x</varname>, install the Quantum Essex - release.</para> - </note> - <?hard-pagebreak?> - <section xml:id="Glossary"> - <title>Glossary</title> - <informaltable rules="all"> - <thead> - <tr> - <td align="left">Term</td> - <td colspan="4" align="left">Description</td> - </tr> - </thead> - <tbody> - <tr> - <td align="left">CRUD</td> - <td colspan="4">Create, read, update, and - delete (CRUD) are the basic functions of - persistent storage in computer - programming.</td> - </tr> - <tr> - <td align="left">entity </td> - <td colspan="4">Any piece of hardware or - software that can connect to the network - services provided by OpenStack Networking. - An entity can use OpenStack Networking - services by implementing a VIF. </td> - </tr> - <tr> - <td align="left">IPAM</td> - <td colspan="4">Internet Protocol Address - Management (IPAM) is a means of planning, - tracking, and managing the Internet - Protocol (IP) address space that is used - in a network.</td> - </tr> - <tr> - <!-- <td align="left" bgcolor="#4F91BD"> --> - <td align="left">layer-2 network </td> - <!-- <td colspan="4" bgcolor="#4F91BD"> --> - <td colspan="4">A virtual Ethernet network - that is managed by the OpenStack - Networking service. Currently, OpenStack - Networking manages only Ethernet networks. - </td> - </tr> - <tr> - <td align="left">network </td> - <td colspan="4">An isolated virtual layer-2 - broadcast domain that is typically - reserved for the tenant who created it - unless the network is configured to be - shared. Tenants can create multiple - networks until they reach the thresholds - specified by per-tenant quotas. </td> - </tr> - <tr> - <!-- <td align="left" bgcolor="#4F91BD"> --> - <td align="left">plug-in </td> - <!-- <td colspan="4" bgcolor="#4F91BD"> --> - <td colspan="4">A software component that - implements &APIv2;. </td> - </tr> - <tr> - <td align="left">port </td> - <td colspan="4">A virtual switch port on a - logical network switch. Virtual instances - attach their interfaces into ports. The - logical port also defines the MAC address - and the IP addresses to be assigned to the - interfaces plugged into them. When IP - addresses are associated to a port, this - also implies the port is associated with a - subnet, as the IP address was taken from - the allocation pool for a specific subnet. - </td> - </tr> - <tr> - <td align="left">subnet</td> - <td colspan="4">An IP address block that can - be used to assign IP addresses to virtual - instances. Each subnet must have a CIDR - and must be associated with a network. IPs - can be either selected from the whole - subnet CIDR or from allocation pools that - can be specified by the user. </td> - </tr> - <tr> - <td align="left">VM</td> - <td colspan="4">A virtual machine (VM) is a - completely isolated guest operating system - installation within a normal host - operating system.</td> - </tr> - </tbody> - </informaltable> - </section> - <?hard-pagebreak?> - <section xml:id="Theory"> - <title>High-Level Task Flow</title> - <para>The high-level task flow for OpenStack Networking - involves creating a network, associating a subnet with - that network, and booting a VM that is attached to the - network. Clean-up includes deleting the VM, deleting - any ports associated with the network, and deleting - the networks. OpenStack Networking deletes any subnets - associated with the deleted network.</para> - <procedure> - <title>To use OpenStack Networking - high-level task - flow</title> - <step> - <title>Create a network</title> - <para>The tenant creates a network.</para> - <para>For example, the tenant creates the - <literal>net1</literal> network. Its ID is - <emphasis role="italic" - >net1_id</emphasis>.</para> - <para>See <xref linkend="Create_Network"/>.</para> - </step> - <step> - <title>Associate a subnet with the network</title> - <para>The tenant associates a subnet with that - network.</para> - <para>For example, the tenant associates the - <literal>10.0.0.0/24</literal> subnet with - the <literal>net1</literal> network.</para> - <para>See <xref linkend="create_subnet"/>.</para> - </step> - <step> - <title>Boot a VM and attach it to the - network</title> - <para>The tenant boots a virtual machine (VM) and - specifies a single NIC that connects to the - network.</para> - <para>The following examples use the nova client - to boot a VM.</para> - <para>In the first example, Nova contacts - OpenStack Networking to create the NIC and - attach it to the <literal>net1</literal> - network, with the ID <emphasis role="italic" - >net1_id</emphasis>:</para> - <screen><prompt>$</prompt> <userinput>nova boot <server_name> --image <image> --flavor <flavor> --nic net-id=<net1_id></userinput></screen> - <para>In a second example, you first create the - <literal>port1</literal>, port and then - you boot the VM with a specified port. - OpenStack Networking creates a NIC and - attaches it to the <literal>port1</literal> - port, with the ID <emphasis role="italic" - >port1_id</emphasis>:</para> - <screen><prompt>$</prompt> <userinput>nova boot <server_name> --image <image> --flavor <flavor> --nic port-id=<port1_id></userinput></screen> - <para>OpenStack Networking chooses and assigns an - IP address to the <literal>port1</literal> - port.</para> - <para>For information about how to create ports, - see <xref linkend="Create_Port"/>.</para> - <para>For more information about the <command>nova - boot</command> command, enter:</para> - <screen><prompt>$</prompt> <userinput>nova help boot</userinput></screen> - </step> - <step> - <title>Delete the VM</title> - <para>The tenant deletes the VM.</para> - <para>Nova contacts OpenStack Networking and - deletes the <literal>port1</literal> - port.</para> - <para>The allocated IP address is returned to the - pool of available IP addresses.</para> - </step> - <step> - <title>Delete any ports</title> - <para>If the tenant created any ports and - associated them with the network, the tenant - deletes the ports.</para> - <para>See <xref linkend="Delete_Port"/>.</para> - </step> - <step> - <title>Delete the network</title> - <para>The tenant deletes the network. This - operation deletes an OpenStack Networking - network and its associated subnets provided - that no port is currently configured on the - network.</para> - <para>See <xref linkend="Delete_Network"/>.</para> - </step> - </procedure> - </section> - <?hard-pagebreak?> - <section xml:id="plugin"> - <title>The Plug-in</title> - <para>Virtual networking services are implemented through - a plug-in. A plug-in can use different techniques and - technologies to provide isolated virtual networks to - tenants. A plug-in also provides other services, such - as IP address management. Because each plug-in - implements all the operations included in &APIv2;, you do - not need to be concerned about which plug-in is used.</para> - <para>However, some plug-ins might expose additional - capabilities through API extensions, which are - discussed in this document. For more information about - the extensions exposed by a particular plug-in, see the - plug-in documentation.</para> - </section> - </chapter> - <chapter xml:id="Concepts-d1e369"> - <?dbhtml stop-chunking?> - <title>Concepts</title> - <para>&APIv2; manages the following entities:<itemizedlist> - <listitem> - <para><emphasis role="bold">Network</emphasis>. An - isolated virtual layer-2 domain. A network can - also be a virtual, or logical, switch. See - <xref linkend="Network"/>.</para> - </listitem> - <listitem> - <para><emphasis role="bold">Subnet</emphasis>. An - IP version 4 or version 6 address block from - which IP addresses that are assigned to VMs on - a specified network are selected. See <xref - linkend="subnet"/>.</para> - </listitem> - <listitem> - <para><emphasis role="bold">Port</emphasis>. A - virtual, or logical, switch port on a - specified network. See <xref linkend="Port" - />.</para> - </listitem> - </itemizedlist></para> - <para>These entities have auto-generated unique identifiers - and support basic create, read, update, and delete (CRUD) - functions with the &POST;, &GET;, &PUT;, and &DELETE; - verbs.</para> - <?hard-pagebreak?> - <section xml:id="Network"> - <title>Network</title> - <para>A network is an isolated virtual layer-2 broadcast - domain that is typically reserved for the tenant who - created it unless the network is configured to be - shared. Tenants can create multiple networks until - they reach the thresholds specified by per-tenant - quotas. See <xref linkend="quotas_ext"/>.</para> - <para>In the &APIv2;, the network is the main entity. - Ports and subnets are always associated with a - network.</para> - <?hard-pagebreak?> - <para>The following table describes the attributes for - network objects.</para> - <table rules="all" width="95%"> - <caption>Network Attributes</caption> - <col width="20%"/> - <col width="10%"/> - <col width="10%"/> - <col width="10%"/> - <col width="15%"/> - <col width="17%"/> - <col width="20%"/> - <thead> - <tr> - <th>Attribute </th> - <th>Type </th> - <th>Required </th> - <th>CRUD<footnote xml:id="crud"> - <para><itemizedlist> - <listitem> - <para><emphasis role="bold" - >C</emphasis>. Use the attribute in - create operations.</para> - </listitem> - <listitem> - <para><emphasis role="bold" - >R</emphasis>. This attribute is - returned in response to show and - list operations.</para> - </listitem> - <listitem> - <para><emphasis role="bold" - >U</emphasis>. You can update the - value of this attribute.</para> - </listitem> - <listitem> - <para><emphasis role="bold" - >D</emphasis>. You can delete the - value of this attribute.</para> - </listitem> - </itemizedlist></para> - </footnote></th> - <th>Default Value </th> - <th>Validation Constraints </th> - <th>Notes</th> - </tr> - </thead> - <tbody> - <tr> - <td>id </td> - <td>uuid-str </td> - <td>N/A </td> - <td>R </td> - <td>generated </td> - <td>N/A </td> - <td>UUID for the network. </td> - </tr> - <tr> - <td>name </td> - <td>String </td> - <td>No </td> - <td>CRU </td> - <td>None </td> - <td>N/A </td> - <td>Human-readable name for the network. Might - not be unique. </td> - </tr> - <tr> - <td>admin_state_up </td> - <td>Bool </td> - <td>No </td> - <td>CRU </td> - <td>true </td> - <td>{true|false}</td> - <td>The administrative state of network. If - false (down), the network does not forward - packets.</td> - </tr> - <tr> - <td>status </td> - <td>String </td> - <td>N/A </td> - <td>R </td> - <td>N/A </td> - <td>N/A </td> - <td><para>Indicates whether network is - currently operational. Possible values - include: <itemizedlist> - <listitem> - <para>ACTIVE</para> - </listitem> - <listitem> - <para>DOWN</para> - </listitem> - <listitem> - <para>BUILD</para> - </listitem> - <listitem> - <para>ERROR</para> - </listitem> - </itemizedlist> - </para><para>Plug-ins might define - additional values.</para></td> - </tr> - <tr> - <td>subnets </td> - <td>list(uuid-str) </td> - <td>No </td> - <td>R </td> - <td>Empty List </td> - <td>N/A </td> - <td>subnets associated with this network. - </td> - </tr> - <tr> - <td>shared </td> - <td>Bool </td> - <td>No </td> - <td>CRU</td> - <td>False</td> - <td>{ True | False } </td> - <td>Specifies whether the network resource can - be accessed by any tenant or not.</td> - </tr> - <tr> - <td>tenant_id </td> - <td>uuid-str </td> - <td>No<footnote xml:id="tenant"> - <para>If OpenStack Networking is not - running with the Keystone Identity - service, the - <literal>tenant_id</literal> - attribute is required.</para> - </footnote> - </td> - <td>CR </td> - <td>N/A </td> - <td>No constraint</td> - <td>Owner of network. Only admin users can - specify a tenant_id other than its own. - </td> - </tr> - </tbody> - </table> - </section> - <?hard-pagebreak?> - <section xml:id="subnet"> - <title>Subnet</title> - <para>A subnet represents an IP address block that can be - used to assign IP addresses to virtual instances. Each - subnet must have a CIDR and must be associated with a - network. IPs can be either selected from the whole - subnet CIDR or from allocation pools that can be - specified by the user.</para> - <para>A subnet can also optionally have a gateway, a list - of dns name servers, and host routes. This information - is pushed to instances whose interfaces are associated - with the subnet.</para> - <?hard-pagebreak?> - <table rules="all" width="95%"> - <caption>Subnet Attributes</caption> - <col width="20%"/> - <col width="10%"/> - <col width="10%"/> - <col width="10%"/> - <col width="15%"/> - <col width="17%"/> - <col width="20%"/> - <thead> - <tr> - <th>Attribute </th> - <th>Type </th> - <th>Required </th> - <th>CRUD<footnote xml:id="crud2"> - <para><itemizedlist> - <listitem> - <para><emphasis role="bold" - >C</emphasis>. Use the attribute in - create operations.</para> - </listitem> - <listitem> - <para><emphasis role="bold" - >R</emphasis>. This attribute is - returned in response to show and - list operations.</para> - </listitem> - <listitem> - <para><emphasis role="bold" - >U</emphasis>. You can update the - value of this attribute.</para> - </listitem> - <listitem> - <para><emphasis role="bold" - >D</emphasis>. You can delete the - value of this attribute.</para> - </listitem> - </itemizedlist></para> - </footnote> - </th> - <th>Default Value </th> - <th>Validation Constraints </th> - <th>Notes</th> - </tr> - </thead> - <tbody> - <tr> - <td>id </td> - <td>uuid-str </td> - <td>N/A </td> - <td>R </td> - <td>generated </td> - <td>N/A </td> - <td>UUID representing the subnet </td> - </tr> - <tr> - <td>network_id </td> - <td>uuid-str </td> - <td>Yes </td> - <td>CR </td> - <td>N/A </td> - <td>network this subnet is associated with. </td> - <td/> - </tr> - <tr> - <td>name </td> - <td>String </td> - <td>No </td> - <td>CRU </td> - <td>None </td> - <td>N/A </td> - <td>Human-readable name for the subnet. Might - not be unique. </td> - </tr> - <tr> - <td>ip_version </td> - <td>int </td> - <td>Yes </td> - <td>CR </td> - <td>4 </td> - <td>{ 4 | 6 } </td> - <td>IP version </td> - </tr> - <tr> - <td>cidr </td> - <td>string </td> - <td>Yes</td> - <td>CR </td> - <td>N/A </td> - <td>valid cidr in the form - <network_address>/<prefix> </td> - <td>cidr representing IP range for this - subnet, based on IP version </td> - </tr> - <tr> - <td>gateway_ip </td> - <td>string </td> - <td>No </td> - <td>CRUD </td> - <td>first address in <emphasis role="italic" - >cidr</emphasis> - </td> - <td>Valid IP address or null</td> - <td>default gateway used by devices in this - subnet </td> - </tr> - <tr> - <td>dns_nameservers </td> - <td>list(str) </td> - <td>No </td> - <td>CRU </td> - <td>Empty list </td> - <td>No constraint </td> - <td>DNS name servers used by hosts in this - subnet. </td> - </tr> - <tr> - <td>allocation_pools </td> - <td>list(dict) </td> - <td>No </td> - <td>CR </td> - <td>Every address in <emphasis role="italic" - >cidr</emphasis>, excluding <emphasis - role="italic">gateway_ip</emphasis> if - configured </td> - <td>start/end of range must be valid ip </td> - <td>Sub-ranges of cidr available for dynamic - allocation to ports [ { "start": - "10.0.0.2", "end": "10.0.0.254"} ] </td> - </tr> - <tr> - <td>host_routes </td> - <td>list(dict) </td> - <td>No </td> - <td>CRU </td> - <td>Empty List </td> - <td> - <emphasis role="italic">[]</emphasis> - </td> - <td>Routes that should be used by devices with - IPs from this subnet (not including local - subnet route). </td> - </tr> - <tr> - <td>enable_dhcp </td> - <td>Bool </td> - <td>No</td> - <td>CRU </td> - <td>True </td> - <td>{ True | False } </td> - <td>Specifies whether DHCP is enabled for this - subnet or not. </td> - </tr> - <tr> - <td>tenant_id </td> - <td>uuid-str </td> - <td>No<footnote xml:id="tenant2"> - <para>If OpenStack Networking is not - running with the Keystone Identity - service, the - <literal>tenant_id</literal> - attribute is required.</para> - </footnote></td> - <td>CR </td> - <td>N/A </td> - <td>No constraint</td> - <td>Owner of network. Only admin users can - specify a tenant_id other than its own. - </td> - </tr> - </tbody> - </table> - </section> - <?hard-pagebreak?> - <section xml:id="Port"> - <title>Port</title> - <para>A port represents a virtual switch port on a logical - network switch. Virtual instances attach their - interfaces into ports. The logical port also defines - the MAC address and the IP address(es) to be assigned - to the interfaces plugged into them. When IP addresses - are associated to a port, this also implies the port - is associated with a subnet, as the IP address was - taken from the allocation pool for a specific - subnet.</para> - <?hard-pagebreak?> - <table rules="all" width="95%"> - <caption>Port Attributes</caption> - <col width="20%"/> - <col width="10%"/> - <col width="10%"/> - <col width="10%"/> - <col width="15%"/> - <col width="17%"/> - <col width="20%"/> - <thead> - <tr> - <th>Attribute </th> - <th>Type </th> - <th>Required </th> - <th>CRUD<footnote xml:id="crud3"> - <para><itemizedlist> - <listitem> - <para><emphasis role="bold" - >C</emphasis>. Use the attribute in - create operations.</para> - </listitem> - <listitem> - <para><emphasis role="bold" - >R</emphasis>. This attribute is - returned in response to show and - list operations.</para> - </listitem> - <listitem> - <para><emphasis role="bold" - >U</emphasis>. You can update the - value of this attribute.</para> - </listitem> - <listitem> - <para><emphasis role="bold" - >D</emphasis>. You can delete the - value of this attribute.</para> - </listitem> - </itemizedlist></para> - </footnote> - </th> - <th>Default Value </th> - <th>Validation Constraints </th> - <th>Notes</th> - </tr> - </thead> - <tbody> - <tr> - <td>id </td> - <td>uuid-str </td> - <td>N/A </td> - <td>R </td> - <td>generated </td> - <td>N/A </td> - <td>UUID for the port.</td> - </tr> - <tr> - <td>network_id </td> - <td>uuid-str </td> - <td>Yes </td> - <td>CR </td> - <td>N/A </td> - <td>existing network identifier </td> - <td>Network that this port is associated with. - </td> - </tr> - <tr> - <td>name </td> - <td>String </td> - <td>No </td> - <td>CRU </td> - <td>None </td> - <td>N/A </td> - <td>Human-readable name for the port. Might - not be unique. </td> - </tr> - <tr> - <td>admin_state_up </td> - <td>bool </td> - <td>No </td> - <td>CRU </td> - <td>true </td> - <td>{true|false}</td> - <td>Administrative state of port. If false - (down), port does not forward packets. - </td> - </tr> - <tr> - <td>status </td> - <td>string </td> - <td>N/A </td> - <td>R </td> - <td>N/A </td> - <td>N/A </td> - <td><para>Indicates whether network is - currently operational. Possible values - include: <itemizedlist> - <listitem> - <para>ACTIVE</para> - </listitem> - <listitem> - <para>DOWN</para> - </listitem> - <listitem> - <para>BUILD</para> - </listitem> - <listitem> - <para>ERROR</para> - </listitem> - </itemizedlist> - </para><para>Plug-ins might define - additional values.</para></td> - </tr> - <tr> - <td>mac_address </td> - <td>string </td> - <td>No </td> - <td>CR </td> - <td>generated </td> - <td>valid MAC in 6-octet form separated by - colons </td> - <td>Mac address to use on this port. </td> - </tr> - <tr> - <td>fixed_ips</td> - <td>list(dict)</td> - <td>No </td> - <td>CRU </td> - <td>automatically allocated from pool </td> - <td>Valid IP address and existing subnet - identifier </td> - <td>Specifies IP addresses for the port thus - associating the port itself with the - subnets where the IP addresses are picked - from </td> - </tr> - <tr> - <td>device_id </td> - <td>str </td> - <td>No </td> - <td>CRUD </td> - <td>None </td> - <td>No constraint </td> - <td>identifies the device (e.g., virtual - server) using this port. </td> - </tr> - <tr> - <td>device_owner </td> - <td>str </td> - <td>No </td> - <td>CRUD </td> - <td>None </td> - <td>No constraint </td> - <td>Identifies the entity (e.g.: dhcp agent) - using this port. </td> - </tr> - <tr> - <td>tenant_id</td> - <td>uuid-str</td> - <td>No<footnote xml:id="tenant3"> - <para>If OpenStack Networking is not - running with the Keystone Identity - service, the - <literal>tenant_id</literal> - attribute is required.</para> - </footnote> - </td> - <td>CR</td> - <td>N/A</td> - <td>No constraint</td> - <td>Owner of port. Only admin users can - specify a tenant_id other than its own. - </td> - </tr> - <tr> - <td>security_groups</td> - <td>list(dict)</td> - <td>No</td> - <td>CRUD</td> - <td>None</td> - <td>Existing security group IDs</td> - <td>Specifies the IDs of any security groups - associated with a port.</td> - </tr> - </tbody> - </table> - </section> - </chapter> - <chapter xml:id="General_API_Information-d1e436"> - <title>General API Information</title> - <para>The &APIv2; is a ReSTful HTTP service that uses all - aspects of the HTTP protocol including methods, URIs, - media types, response codes, and so on. Providers can use - existing features of the protocol including caching, - persistent connections, and content compression. For - example, providers who employ a caching layer can respond - with a <errorcode>203</errorcode> code instead of a - <errorcode>200</errorcode> code when a request is - served from the cache. Additionally, providers can offer - support for conditional &GET; requests by using ETags, or - they may send a redirect in response to a &GET; request. - Create clients so that these differences are accounted - for.</para> - <section xml:id="Authentication-d1e444"> - <title>Authentication and Authorization</title> - <para>The &APIv2; uses the <link - xlink:href="https://openstack.keystone.org" - >Keystone Identity Service</link> as the default - authentication service. When Keystone is enabled, - users that submit requests to the OpenStack Networking - service must provide an authentication token in - <emphasis role="bold">X-Auth-Token</emphasis> - request header. You obtain the token by authenticating - to the Keystone endpoint. For more information about - Keystone, see the <link - xlink:href="http://docs.openstack.org/api/openstack-identity-service/2.0/content/" - ><citetitle>OpenStack Identity Service API v2.0 Reference</citetitle></link>.</para> - <para>When Keystone is enabled, the - <literal>tenant_id</literal> attribute is not - required in create requests because the tenant ID is - derived from the authentication token.</para> - <para>The default authorization settings allow only - administrative users to create resources on behalf of - a different tenant.</para> - <para>OpenStack Networking uses information received from - Keystone to authorize user requests. OpenStack - Networking handles the following types of - authorization policies: <itemizedlist> - <listitem> - <para><emphasis role="bold">Operation-based - policies</emphasis></para> - <para>Specify access criteria for specific - operations, possibly with fine-grained - control over specific attributes.</para> - </listitem> - <listitem> - <para><emphasis role="bold">Resource-based - policies</emphasis></para> - <para>Access a specific resource. Permissions - might or might not be granted depending on - the permissions configured for the - resource. Currently available for only the - network resource.</para> - </listitem> - </itemizedlist></para> - <para>The actual authorization policies enforced in - OpenStack Networking might vary from deployment to - deployment.</para> - </section> - <?hard-pagebreak?> - <section xml:id="Request_Response_Types"> - <title>Request/Response Types</title> - <para>The &APIv2; supports the JSON data serialization - format.</para> - - <para>The format for both the request and the response can - be specified by using the <code>Content-Type</code> - header, the <code>Accept</code> header or adding the - <code>.json</code> extension to the request - URI.</para> - - <example> - <title>JSON Request with Headers</title> - <literallayout class="monospaced">POST /v1.0/tenants/tenantX/networks HTTP/1.1 -Host 127.0.0.1:9696 -Content-Type application/json -Accept application/json -Content-Length 57</literallayout> - <programlisting language="json"><xi:include href="samples/networks-post-req.json" parse="text"/></programlisting> - </example> - <example> - <title>JSON Response with Headers</title> - <literallayout class="monospaced">HTTP/1.1 201 Created -Content-Type application/json -Content-Length 204</literallayout> - <programlisting language="json"><xi:include href="samples/networks-post-res.json" parse="text"/></programlisting> - </example> - </section> - <section xml:id="filtering"> - <title>Filtering and Column Selection</title> - <para>The &APIv2; supports filtering based on all top - level attributes of a resource. Filters are applicable - to all list requests.</para> - <para>For example, the following request returns all - networks named <literal>foobar</literal>:</para> - <programlisting language="bash" role="gutter: false">GET /v2.0/networks?name=foobar</programlisting> - <para>When you specify multiple filters, the &APIv2; - returns only objects that meet all filtering criteria. - The operation applies an AND condition among the - filters.</para> - <note> - <para>OpenStack Networking does not offer an OR - mechanism for filters.</para> - </note> - <para>Alternatively, you can issue a distinct request for - each filter and build a response set from the received - responses on the client-side.</para> - <para>By default, OpenStack Networking returns all - attributes for any show or list call. The &APIv2; has - a mechanism to limit the set of attributes returned. - For example, return <literal>id</literal>.</para> - <para>You can use the <literal>fields</literal> query - parameter to control the attributes returned from the - &APIv2;.</para> - <para>For example, the following request returns only - <literal>id</literal> and <literal>name</literal> - for each network:</para> - <programlisting language="bash" role="gutter: false">GET /v2.0/networks.json?fields=id&fields=name</programlisting> - </section> - <section xml:id="Async_behaviour"> - <title>Synchronous versus Asynchronous Plug-in - Behavior</title> - <para>The &APIv2; presents a logical model of network - connectivity consisting of networks, ports, and - subnets. It is up to the OpenStack Networking plug-in - to communicate with the underlying infrastructure to - ensure packet forwarding is consistent with the - logical model. A plug-in might perform these operations - asynchronously.</para> - <para>When an API client modifies the logical model by - issuing an HTTP &POST;, &PUT;, or &DELETE; request, - the API call might return before the plug-in modifies - underlying virtual and physical switching devices. - However, an API client is guaranteed that all - subsequent API calls properly reflect the changed - logical model.</para> - <para>For example, if a client issues an HTTP &PUT; - request to set the attachment for a port, there is no - guarantee that packets sent by the interface named in - the attachment are forwarded immediately when the HTTP - call returns. However, it is guaranteed that a - subsequent HTTP &GET; request to view the attachment - on that port returns the new attachment value.</para> - <para>You can use the <literal>status</literal> attribute - with the network and port resources to determine - whether the OpenStack Networking plug-in has - successfully completed the configuration of the - resource.</para> - </section> - <section xml:id="bulk_create_operations"> - <title>Bulk Create Operations</title> - <para>The &APIv2; enables you to create several objects of - the same type in the same API request. Bulk create - operations use exactly the same API syntax as single - create operations except that you specify a list of - objects rather than a single object in the request - body.</para> - <para>Bulk operations are always performed atomically, - meaning that either all or none of the objects in the - request body are created. If a particular plug-in does - not support atomic operations, the &APIv2; emulates - the atomic behavior so that users can expect the same - behavior regardless of the particular plug-in running - in the background.</para> - <para>OpenStack Networking might be deployed without - support for bulk operations and when the client - attempts a bulk create operation, a - <errorcode>400</errorcode> - <errortext>Bad Request</errortext> error is - returned.</para> - <para>For information about how to submit bulk requests to - the &APIv2; see <xref linkend="bulk_create_networks" - />, <xref linkend="bulK_create_subnets"/>, and <xref - linkend="bulk_create_ports"/>.</para> - </section> - <section xml:id="pagination"> - <title>Pagination</title> - <para>To reduce load on the service, list operations will - return a maximum number of items at a time. To - navigate the collection, the parameters limit, marker - and page_reverse can be set in the URI. For - example:</para> - <programlisting language="bash">?limit=100&marker=1234&page_reverse=False</programlisting> - <para>The <parameter>marker</parameter> parameter is the - ID of the last item in the previous list. The - <parameter>limit</parameter> parameter sets the - page size. The <parameter>page_reverse</parameter> - parameter sets the page direction. These parameters - are optional. If the client requests a limit beyond - the maximum limit configured by the deployment, the - server returns the maximum limit number of - items.</para> - <para>For convenience, list responses contain atom "next" - links and "previous" links. The last page in the list - requested with 'page_reverse=False' will not contain - "next" link, and the last page in the list requested - with 'page_reverse=True' will not contain "previous" - link. The following examples illustrate two pages with - three items. The first page was retrieved - through:</para> - <programlisting language="bash">&GET; http://127.0.0.1:9696/v2.0/networks.json?limit=2</programlisting> - <para>Pagination is an optional feature of OpenStack - Networking API, and it might be disabled. If - pagination is disabled, the pagination parameters will - be ignored and return all the items.</para> - <para>If a particular plug-in does not support pagination - operations, and pagination is enabled, the &APIv2; - will emulate the pagination behavior so that users can - expect the same behavior regardless of the particular - plug-in running in the background.</para> - <para>Unfortunately OpenStack Networking does not expose - any mechanism to tell user if pagination is supported - by particular plug-in or enabled.</para> - <example> - <title>Network Collection, First Page: JSON - Request</title> - - <literallayout class="monospaced">GET /v2.0/networks.json?limit=2 HTTP/1.1 -Host: 127.0.0.1:9696 -Content-Type: application/json -Accept: application/json</literallayout> - </example> - <example> - <title>Network Collection, First Page: JSON - Response</title> - <programlisting language="json"><xi:include href="samples/networks-get-first-page-res.json" parse="text"/></programlisting> - </example> - <example> - <title>Network Collection, First Page: XML - Request</title> - <literallayout class="monospaced"> -GET /v2.0/networks.xml?limit=2 HTTP/1.1 -Host: 127.0.0.1:9696 -Content-Type: application/xml -Accept: application/xml - </literallayout> - </example> - <example> - <title>Network Collection, First Page: XML - Response</title> - <programlisting language="xml"><xi:include href="samples/networks-get-first-page-res.xml" parse="text"/></programlisting> - </example> - <para>The last page won't show the "next" links</para> - <example> - <title>Network Collection, Last Page: JSON - Request</title> - <literallayout class="monospaced"> -GET /v2.0/networks.json?limit=2&marker=71c1e68c-171a-4aa2-aca5-50ea153a3718 HTTP/1.1 -Host: 127.0.0.1:9696 -Content-Type: application/json -Accept: application/json - </literallayout> - </example> - <example> - <title>Network Collection, Last Page: JSON - Response</title> - <programlisting language="json"><xi:include href="samples/networks-get-last-page-res.json" parse="text"/></programlisting> - </example> - <example> - <title>Network Collection, Last Page: XML - Request</title> - <literallayout class="monospaced"> -GET /v2.0/networks.xml?limit=2&marker=71c1e68c-171a-4aa2-aca5-50ea153a3718 HTTP/1.1 -Host: 127.0.0.1:9696 -Content-Type: application/xml -Accept: application/xml - </literallayout> - </example> - <example> - <title>Network Collection, Last Page: XML - Response</title> - <programlisting language="xml"><xi:include href="samples/networks-get-last-page-res.xml" parse="text"/></programlisting> - </example> - </section> - <section xml:id="Sorting"> - <title>Sorting</title> - <para>The results of list operations can be ordered using - the 'sort_key' and 'sort_dir' parameters. Currently - sorting doesn't work with extended attributes of - resource. The 'sort_key' and 'sort_dir' can be - repeated, and the number of 'sort_key' and 'sort_dir' - provided must be same. The sort_dir parameter - indicates in which direction to sort. Acceptable - values are 'asc' (ascending) and 'desc' - (descending).</para> - <para>Sorting is optional feature of OpenStack Networking - API, and it might be disabled. If sorting is disabled, - the sorting parameters will be ignored.</para> - <para>If a particular plug-in does not support sorting - operations, and sorting is enabled, the &APIv2; will - emulate the sorting behavior so that users can expect - the same behavior regardless of the particular plug-in - running in the background.</para> - <para>Unfortunately OpenStack Networking does provide a - mechanism to tell users if specific plug-ins support or - have enabled sorting.</para> - </section> - <section xml:id="extensions"> - <title>Extensions</title> - <para>The &APIv2; is extensible.</para> - <para>The purpose of &APIv2; extensions is to:</para> - <itemizedlist> - <listitem> - <para>Introduce new features in the API without - requiring a version change.</para> - </listitem> - <listitem> - <para>Introduce vendor-specific niche - functionality.</para> - </listitem> - <listitem> - <para>Act as a proving ground for experimental - functionalities that might be included in a - future version of the API.</para> - </listitem> - </itemizedlist> - <para>To programmatically determine which extensions are - available, issue a &GET; request on the - <command>v2.0/extensions</command> URI.</para> - <para>To query extensions individually by unique alias, - issue a &GET; request on the - <command>/v2.0/extensions/<replaceable>alias_name</replaceable></command> - URI. Use this method to easily determine if an - extension is available. If the extension is not - available, a <errorcode>404</errorcode> - <errortext>Not Found</errortext> response is - returned.</para> - <para>You can extend existing core API resources with new - actions or extra attributes. Also, you can add new - resources as extensions. Extensions usually have tags - that prevent conflicts with other extensions that - define attributes or resources with the same names, - and with core resources and attributes. Because an - extension might not be supported by all plug-ins, the - availability of an extension varies with deployments - and the specific plug-in in use.</para> - <para>For more information regarding specific extensions, - see <xref linkend="API_extensions"/></para> - </section> - <?hard-pagebreak?> - <section xml:id="faults"> - <title>Faults</title> - <para>The &APIv2; returns an error response if a failure - occurs while processing a request. OpenStack - Networking uses only standard HTTP error codes. - 4<varname>xx</varname> errors indicate problems in - the particular request being sent from the - client.</para> - <informaltable rules="all"> - <col width="10%"/> - <col width="20%"/> - <col width="70%"/> - <thead> - <tr> - <th>Error</th> - <th colspan="2">Description</th> - </tr> - </thead> - <tbody> - <tr> - <td rowspan="6">400 </td> - <td rowspan="6">Bad Request</td> - <td>Malformed request URI or body</td> - </tr> - <tr> - <td>Requested admin state invalid</td> - </tr> - <tr> - <td>Invalid values entered</td> - </tr> - <tr> - <td>Bulk operations disallowed</td> - </tr> - <tr> - <td>Validation failed</td> - </tr> - <tr> - <td>Method not allowed for request body (such - as trying to update attributes that can be - specified at create-time only)</td> - </tr> - <tr> - <td rowspan="2">404 </td> - <td rowspan="2">Not Found</td> - <td>Non existent URI</td> - </tr> - <tr> - <td>Resource not found</td> - </tr> - <tr> - <td rowspan="3">409</td> - <td rowspan="3">Conflict</td> - <td>Port configured on network</td> - </tr> - <tr> - <td>IP allocated on subnet</td> - </tr> - <tr> - <td>Conflicting IP allocation pools for - subnet</td> - </tr> - <tr> - <td>500</td> - <td>Internal server error</td> - <td>Internal OpenStack Networking error</td> - </tr> - <tr> - <td>503</td> - <td>Service unavailable</td> - <td>Failure in Mac address generation</td> - </tr> - </tbody> - </informaltable> - <para>Users submitting requests to the &APIv2; might also - receive the following errors:</para> - <itemizedlist> - <listitem> - <para><errorcode>401</errorcode> Unauthorized - If - invalid credentials are provided.</para> - </listitem> - <listitem> - <para><errorcode>403</errorcode> Forbidden - If - the user cannot access a specific resource or - perform the requested operation.</para> - </listitem> - </itemizedlist> - </section> - </chapter> - <chapter xml:id="API_Operations"> - <title>API Operations</title> - <section xml:id="Networks"> - <title>Networks</title> - <para>Use the &APIv2; to manage network resources.</para> - <informaltable rules="all" width="100%"> - <col width="20%"/> - <col width="20%"/> - <col width="60%"/> - <thead> - <tr align="center"> - <td>Verb</td> - <td>URI</td> - <td>Description</td> - </tr> - </thead> - <tbody> - <tr> - <td>&GET;</td> - <td>/networks</td> - <td>Lists networks that the tenant who submits - the request can access.</td> - </tr> - <tr> - <td>&GET;</td> - <td>/networks/<parameter>network_id</parameter></td> - <td>Shows information for a specified - network.</td> - </tr> - <tr> - <td>&POST;</td> - <td>/networks</td> - <td>Creates a network.</td> - </tr> - <tr> - <td>&PUT;</td> - <td>/networks/<parameter>network-id</parameter></td> - <td>Updates a specified network.</td> - </tr> - <tr> - <td>&DELETE;</td> - <td>/networks/<parameter>network-id</parameter></td> - <td>Deletes a specified network and its - associated resources.</td> - </tr> - </tbody> - </informaltable> - <?hard-pagebreak?> - <section xml:id="List_Networks"> - <title>List Networks</title> - <informaltable rules="all" width="100%"> - <col width="20%"/> - <col width="20%"/> - <col width="60%"/> - <thead> - <tr> - <td>Verb</td> - <td>URI</td> - <td>Description</td> - </tr> - </thead> - <tbody> - <tr> - <td>&GET;</td> - <td>/networks</td> - <td>Lists networks that the tenant who - submits the request can access.</td> - </tr> - </tbody> - </informaltable> - <simpara>Normal Response Code: - <returnvalue>200</returnvalue> - </simpara> - <simpara>Error Response Codes: Unauthorized - (<errorcode>401</errorcode>)</simpara> - <para>Lists networks that the tenant who submits the - request can access. The list shows the ID for each - network.</para> - <para>This operation does not require a request body, - unless the OpenStack Networking server is running - without Keystone integration.</para> - <para>This operation returns a response body.</para> - <example> - <title>List Networks: JSON Request</title> - <literallayout class="monospaced">GET /v2.0/networks -Accept: application/json</literallayout> - </example> - <example> - <title>List Networks: JSON Response</title> - <programlisting language="json"><xi:include href="samples/networks-get-resp.json" parse="text"/></programlisting> - </example> - <example> - <title>List Networks: XML Request</title> - <literallayout class="monospaced">GET /v2.0/networks -Accept: application/xml</literallayout> - </example> - <example> - <title>List Networks: XML Response</title> - <programlisting language="xml"><xi:include href="samples/networks-get-resp.xml" parse="text"/></programlisting> - </example> - </section> - <?hard-pagebreak?> - <section xml:id="List_Networks_Detail"> - <title>Show Network</title> - <informaltable rules="all" width="100%"> - <col width="20%"/> - <col width="20%"/> - <col width="60%"/> - <thead> - <tr> - <td>Verb</td> - <td>URI</td> - <td>Description</td> - </tr> - </thead> - <tbody> - <tr> - <td>&GET;</td> - <td>/networks/<parameter>network_id</parameter></td> - <td>Shows information for a specified - network.</td> - </tr> - </tbody> - </informaltable> - <simpara> Normal Response Code: - <returnvalue>200</returnvalue> - </simpara> - <simpara> Error Response Codes: Unauthorized - (<errorcode>401</errorcode>), Not Found - (<errorcode>404</errorcode>)</simpara> - <para>This operation returns the status, subnets, - name, admin state, tenant ID, and ID for the - specified network ID.</para> - <para>This operation does not require a request - body.</para> - <para>This operation returns a response body.</para> - <example> - <title>Show Network: JSON Request</title> - <literallayout class="monospaced">GET /v2.0/networks/afc75773-640e-403c-9fff-62ba98db1f19 -Accept: application/json</literallayout> - </example> - <example> - <title>Show Network: JSON Response</title> - <programlisting language="json"><xi:include href="samples/networks-get-detail-res.json" parse="text"/></programlisting> - </example> - </section> - <?hard-pagebreak?> - <section xml:id="Create_Network"> - <title>Create Network</title> - <informaltable rules="all" width="100%"> - <col width="20%"/> - <col width="20%"/> - <col width="60%"/> - <thead> - <tr> - <td>Verb</td> - <td>URI</td> - <td>Description</td> - </tr> - </thead> - <tbody> - <tr> - <td>&POST;</td> - <td>/networks</td> - <td>Creates a network.</td> - </tr> - </tbody> - </informaltable> - <simpara>Normal Response Code: - <returnvalue>201</returnvalue> - </simpara> - <simpara>Error Response Codes: Bad Request - (<errorcode>400</errorcode>) Unauthorized - (<errorcode>401</errorcode>)</simpara> - <simpara>This operation does not require a request - body. If specified, the body might include one or - more of the following attributes:</simpara> - <itemizedlist> - <listitem> - <para><emphasis role="italic">name</emphasis>: - a string specifying a symbolic name for - the network, which is not required to be - unique;</para> - </listitem> - <listitem> - <para><emphasis role="italic" - >admin_state_up</emphasis>: a bool - value specifying the administrative status - of the network;</para> - </listitem> - <listitem> - <para><emphasis role="italic" - >shared</emphasis>: a bool value - specifying whether this network should be - shared across all tenants or not. Note - that the default policy setting restrict - usage of this attribute to administrative - users only;</para> - </listitem> - <listitem> - <para><emphasis role="italic" - >tenant_id</emphasis>: a uuid - identifying the tenant which will own the - network. Only administrative users can set - the tenant identifier; this cannot be - changed using authorization - policies;</para> - </listitem> - </itemizedlist> - <example> - <title>Create Network: JSON Request</title> - <literallayout class="monospaced">POST v2.0/networks.json -Content-Type: application/json -Accept: application/json</literallayout> - <programlisting language="json"><xi:include href="samples/network-post-req.json" parse="text"/></programlisting> - </example> - <example> - <title>Create Network: JSON Response</title> - <programlisting language="json"><xi:include href="samples/network-post-res.json" parse="text"/></programlisting> - </example> - <section xml:id="bulk_create_networks"> - <title>Bulk Create Networks</title> - <para>This operation enables you to create several - networks in a single request.</para> - <para>This operation requires a request - body.</para> - <para>This operation returns a response - body.</para> - <para>Specify a list of networks in the request - body, as shown in the following - example:</para> - <example> - <title>Bulk Create Networks: JSON Request </title> - <literallayout class="monospaced">POST v2.0/networks.json -Content-Type: application/json -Accept: application/json</literallayout> - <programlisting language="json"><xi:include href="samples/network-post-req-bulk.json" parse="text"/></programlisting> - </example> - <example> - <title>Bulk Create Networks: JSON Response </title> - <literallayout class="monospaced">HTTP/1.1 201 OK -Content-Type: application/json; charset=UTF-8 -</literallayout> - <programlisting language="json"><xi:include href="samples/network-post-res-bulk.json" parse="text"/></programlisting> - </example> - <para>The bulk create operation is always atomic. - Either all or no networks in the request body - are created.</para> - </section> - </section> - <?hard-pagebreak?> - <section xml:id="Update_Network"> - <title>Update Network</title> - <informaltable rules="all" width="100%"> - <col width="20%"/> - <col width="20%"/> - <col width="60%"/> - <thead> - <tr> - <td>Verb</td> - <td>URI</td> - <td>Description</td> - </tr> - </thead> - <tbody> - <tr> - <td>&PUT;</td> - <td>/networks/<parameter>network-id</parameter></td> - <td>Updates a specified network.</td> - </tr> - </tbody> - </informaltable> - <simpara>Normal Response Code: - <returnvalue>200</returnvalue> - </simpara> - <simpara>Error Response Codes: Bad Request - (<errorcode>400</errorcode>) Unauthorized - (<errorcode>401</errorcode>), Forbidden - (<errorcode>403</errorcode>) Not Found - (<errorcode>404</errorcode>) </simpara> - <para>This operation requires a request body. You can - set the following attributes in the request - body:<table rules="all"> - <caption>Update Network Request Body - Attributes</caption> - <col width="25%"/> - <col width="75%"/> - <thead> - <tr> - <th>Attribute</th> - <th>Description</th> - </tr> - </thead> - <tbody> - <tr> - <td>name</td> - <td>The name for the network.</td> - </tr> - <tr> - <td>admin_state_up</td> - <td>Specifies whether the admin state - is up or down. Set to - <literal>true</literal> for up and - <literal>false</literal> for down. - If down, the network does not - forward packets.</td> - </tr> - </tbody> - </table></para> - <para>You cannot update the <literal>status</literal>, - <literal>tenant_id</literal>, or - <literal>id</literal> attributes. If you try - to update these attributes, a - <errorcode>400</errorcode> - <errortext>Bad Request</errortext> error is - returned.</para> - <para>This operation returns a response body.</para> - <note> - <para>Update operations in OpenStack Networking - adopt patch semantics. This implies that the - &APIv2; does not require the user to send the - whole resource to be updated, but just the - attributes that the user wishes to update, as - shown in the following example.</para> - </note> - <example> - <title>Update Network: JSON Request </title> - <literallayout class="monospaced">PUT /v2.0/networks/fc68ea2c-b60b-4b4f-bd82-94ec81110766.json - -Content-Type: application/json -Accept: application/json</literallayout> - <programlisting language="json">{ - "network": - { - "name": "updated_name" - } -}</programlisting> - </example> - <example> - <title>Update Network: JSON Response</title> - <programlisting language="json">status: 200 -content-length: 192 -content-type: application/json - -{ - "network": - { - "status": "ACTIVE", - "subnets": [], - "name": "updated_name", - "admin_state_up": false, - "shared": false, - "tenant_id": "c1210485b2424d48804aad5d39c61b8f", - "id": "fc68ea2c-b60b-4b4f-bd82-94ec81110766" - } -} </programlisting> - </example> - </section> - <section xml:id="Delete_Network"> - <title>Delete Network</title> - <informaltable rules="all" width="100%"> - <col width="20%"/> - <col width="20%"/> - <col width="60%"/> - <thead> - <tr> - <td>Verb</td> - <td>URI</td> - <td>Description</td> - </tr> - </thead> - <tbody> - <tr> - <td>&DELETE;</td> - <td>/networks/<parameter>network-id</parameter></td> - <td>Deletes a specified network and its - associated resources.</td> - </tr> - </tbody> - </informaltable> - <simpara>Normal Response Code: - <returnvalue>204</returnvalue> - </simpara> - <simpara>Error Response Codes: Unauthorized - (<errorcode>401</errorcode>), Not Found - (<errorcode>404</errorcode>), Network In Use - (<errorcode>409</errorcode>) </simpara> - <para>This operation deletes an OpenStack Networking - network and its associated subnets provided that - no port is currently configured on the - network.</para> - <para>If ports are still configured on the network - that you want to delete, a - <errorcode>409</errorcode> - <errortext>Network In Use</errortext> error is - returned.</para> - <para>This operation does not require a request - body.</para> - <para>This operation does not return a response - body.</para> - <example> - <title>Delete Network: JSON Request </title> - <literallayout class="monospaced">DELETE /v2.0/networks/fc68ea2c-b60b-4b4f-bd82-94ec81110766 - -Content-Type: application/json -Accept: application/json</literallayout> - </example> - <example> - <title>Delete Network: JSON Response </title> - <literallayout class="monospaced">status: 204</literallayout> - </example> - </section> - </section> - <section xml:id="Subnets"> - <title>Subnets</title> - <para>Use the &APIv2; to manage subnet resources.</para> - <informaltable rules="all" width="100%"> - <col width="20%"/> - <col width="20%"/> - <col width="60%"/> - <thead> - <tr align="center"> - <td>Verb</td> - <td>URI</td> - <td>Description</td> - </tr> - </thead> - <tbody> - <tr> - <td>&GET;</td> - <td>/subnets</td> - <td>Lists all subnets that are accessible to - the tenant who submits the request.</td> - </tr> - <tr> - <td>&GET;</td> - <td>/subnets/<parameter>subnet_id</parameter></td> - <td>Lists detailed information for the - specified subnet.</td> - </tr> - <tr> - <td>&POST;</td> - <td>/subnets</td> - <td>Creates a subnet on the specified - network.</td> - </tr> - <tr> - <td>&PUT;</td> - <td>/subnets/<parameter>subnet-id</parameter></td> - <td>Updates the specified subnet.</td> - </tr> - <tr> - <td>&DELETE;</td> - <td>/subnets/<parameter>subnet-id</parameter></td> - <td>Removes the specified subnet.</td> - </tr> - </tbody> - </informaltable> - <?hard-pagebreak?> - <section xml:id="list_subnets"> - <title>List Subnets</title> - <informaltable rules="all" width="100%"> - <col width="20%"/> - <col width="20%"/> - <col width="60%"/> - <thead> - <tr> - <td>Verb</td> - <td>URI</td> - <td>Description</td> - </tr> - </thead> - <tbody> - <tr> - <td>&GET;</td> - <td>/subnets</td> - <td>Lists all subnets that are accessible - to the tenant who submits the - request.</td> - </tr> - </tbody> - </informaltable> - <simpara>Normal Response Code: - <returnvalue>200</returnvalue> - </simpara> - <simpara>Error Response Codes: Unauthorized - (<errorcode>401</errorcode>) </simpara> - <para>This operation returns a list of subnets objects - the tenant has access to. Default policy settings - returns exclusively subnets owned by the tenant - submitting the request, unless the request is - submitted by an user with administrative rights. - You can control which attributes are returned by - using the <emphasis role="italic" - >fields</emphasis> query parameter. You can - filter results by using query string parameters. - See <xref linkend="filtering"/>.</para> - <para>This operation does not require a request - body.</para> - <para>This operation returns a response body.</para> - <example> - <title>List Subnets: JSON Request </title> - <literallayout class="monospaced">GET v2.0/subnets.json -Accept: application/json</literallayout> - </example> - <example> - <title>List Subnets: JSON Response</title> - <programlisting language="json"><xi:include href="samples/subnets-get-res.json" parse="text"/></programlisting> - </example> - </section> - <?hard-pagebreak?> - <section xml:id="show_subnet"> - <title>Show Subnet</title> - <informaltable rules="all" width="100%"> - <col width="20%"/> - <col width="20%"/> - <col width="60%"/> - <thead> - <tr> - <td>Verb</td> - <td>URI</td> - <td>Description</td> - </tr> - </thead> - <tbody> - <tr> - <td>&GET;</td> - <td>/subnets/<parameter>subnet-id</parameter></td> - <td>Gets information about a specified - subnet.</td> - </tr> - </tbody> - </informaltable> - <simpara>Normal Response Code: - <returnvalue>200</returnvalue> - </simpara> - <simpara>Error Response Codes: Unauthorized - (<errorcode>401</errorcode>), Not Found - (<errorcode>404</errorcode>) </simpara> - <para>This operation returns data about the subnet - specified in the request URI. You can control - which attributes are returned by using the - <emphasis role="italic">fields</emphasis> - query parameter, as discussed in <xref - linkend="filtering"/>.</para> - <para>This operation does not require a request - body.</para> - <para>This operation returns a response body.</para> - <example> - <title>Show Subnet: JSON Request</title> - <literallayout class="monospaced">GET /v2.0/subnets/4156c7a5-e8c4-4aff-a6e1-8f3c7bc83861 -Accept: application/json</literallayout> - </example> - <example> - <title>Show Subnet: JSON Response</title> - <literallayout class="monospaced">status: 200 -content-length: 309 -content-type: application/json </literallayout> - <programlisting language="json"><xi:include href="samples/subnets-get-detail-res.json" parse="text"/> </programlisting> - </example> - </section> - <?hard-pagebreak?> - <section xml:id="create_subnet"> - <title>Create Subnet</title> - <informaltable rules="all" width="100%"> - <col width="20%"/> - <col width="20%"/> - <col width="60%"/> - <thead> - <tr> - <td>Verb</td> - <td>URI</td> - <td>Description</td> - </tr> - </thead> - <tbody> - <tr> - <td>&POST;</td> - <td>/subnets</td> - <td>Creates a subnet on the specified - network.</td> - </tr> - </tbody> - </informaltable> - <simpara>Normal Response Code: Created - (<returnvalue>201</returnvalue>) </simpara> - <simpara>Error Response Codes: Bad Request - (<errorcode>400</errorcode>), Unauthorized - (<errorcode>401</errorcode>), Forbidden - (<errorcode>403</errorcode>), Not Found - (<errorcode>404</errorcode>), Conflict - (<errorcode>409</errorcode>)</simpara> - <para>This operation creates a new subnet on the - specified network. The network ID, - <parameter>network_id</parameter>, is - required. You must also specify the - <literal>cidr</literal> attribute for the - subnet, in the form: - <programlisting><parameter>network_address</parameter>/<parameter>prefix</parameter></programlisting>The - remaining attributes are optional.</para> - <para>By default, OpenStack Networking creates IP v4 - subnets. To create an IP v6 subnet, you must - specify the value <literal>6</literal> for the - <parameter>ip_version</parameter> attribute in - the request body. OpenStack Networking does not - try to derive the correct IP version from the - provided CIDR. If the parameter for the gateway - address, <parameter>gateway_ip</parameter>, is not - specified, OpenStack Networking allocates an - address from the cidr for the gateway for the - subnet.</para> - <para>To specify a subnet without a gateway, specify - the value <literal>null</literal> for the - <literal>gateway_ip</literal> attribute in the - request body. If allocation pools attribute, - <literal>allocation_pools</literal>, is not - specified, OpenStack Networking automatically - allocates pools for covering all IP addresses in - the CIDR, excluding the address reserved for the - subnet gateway. Otherwise, you can explicitly - specify allocation pools as shown in the following - example.</para> - <para>When <literal>allocation_pools</literal> and - <literal>gateway_ip</literal> are both - specified, it is up to the user ensuring the - gateway ip does not overlap with the specified - allocation pools; otherwise a <literal>409 - Conflict</literal> error will be - returned.</para> - <example> - <title>Create Subnet: JSON Request</title> - <literallayout class="monospaced">POST /v2.0/subnets -Content-Type: application/json -Accept: application/json</literallayout> - <programlisting language="json">{ - "subnet":{ - "network_id":"ed2e3c10-2e43-4297-9006-2863a2d1abbc", - "ip_version":4, - "cidr":"10.0.3.0/24", - "allocation_pools":[ - { - "start":"10.0.3.20", - "end":"10.0.3.150" - } - ] - } -}</programlisting> - </example> - <example> - <title>Create Subnet: JSON Response</title> - <programlisting language="json"><xi:include href="samples/subnet-post-req.json" parse="text"/></programlisting> - </example> - <section xml:id="bulK_create_subnets"> - <title>Bulk Create Subnets</title> - <para>This operation requires a request - body.</para> - <para>This operation returns a response - body.</para> - <para>This operation enables you to create several - subnets in a single request. Specify a list of - subnets in the request body, as shown in the - following example:</para> - <example> - <title>Bulk Create Subnets: JSON Request </title> - <literallayout class="monospaced">POST /v2.0/subnets -Content-Type: application/json -Accept: application/json</literallayout> - <programlisting language="json"><xi:include href="samples/subnet-post-req-bulk.json" parse="text"/></programlisting> - </example> - <example> - <title>Bulk Create Subnets: JSON Response </title> - <literallayout class="monospaced">HTTP/1.1 201 OK -Content-Type: application/json; charset=UTF-8 -</literallayout> - <programlisting language="json"><xi:include href="samples/subnet-post-res-bulk.json" parse="text"/></programlisting> - </example> - <para>The bulk create operation is always atomic. - Either all subnets or no subnets in the - request body are created.</para> - </section> - </section> - <?hard-pagebreak?> - <section xml:id="update_subnet"> - <title>Update Subnet</title> - <informaltable rules="all" width="100%"> - <col width="20%"/> - <col width="20%"/> - <col width="60%"/> - <thead> - <tr> - <td>Verb</td> - <td>URI</td> - <td>Description</td> - </tr> - </thead> - <tbody> - <tr> - <td>&PUT;</td> - <td>/subnets/<parameter>subnet-id</parameter></td> - <td>Updates the specified subnet.</td> - </tr> - </tbody> - </informaltable> - <simpara>Normal Response Code: Ok - (<returnvalue>200</returnvalue>)</simpara> - <simpara>Error Response Codes: Bad Request - (<errorcode>400</errorcode>), Unauthorized - (<errorcode>401</errorcode>), Forbidden - (<errorcode>403</errorcode>), Not Found - (<errorcode>404</errorcode>) </simpara> - <para>This operation updates the specified subnet. - Some attributes, such as IP version - (<parameter>ip_version</parameter>), CIDR - (<parameter>cidr</parameter>), and IP - allocation pools - (<parameter>allocation_pools</parameter>) - cannot be updated. Attempting to update these - attributes results in a <errorcode>400</errorcode> - <errortext>Bad Request</errortext> error.</para> - <para>This operation requires a request body.</para> - <para>This operation returns a response body.</para> - <note> - <para>Update operations in OpenStack Networking - adopt patch semantics. This implies that the - &APIv2; does not require you to send the whole - resource to be updated, but just the - attributes that you wish to update, as shown - in the following example.</para> - </note> - <example> - <title>Update Subnet: JSON Request</title> - <literallayout class="monospaced">PUT /v2.0/subnets/9436e561-47bf-436a-b1f1-fe23a926e031 -Content-Type: application/json -Accept: application/json</literallayout> - <programlisting language="json">{ - "subnet":{ - "gateway_ip":"10.0.3.254", - "name":"new_name" - } -}</programlisting> - </example> - <example> - <title>Update Subnet: JSON Response</title> - <programlisting language="json"><xi:include href="samples/subnet-post-res.json" parse="text"/></programlisting> - </example> - </section> - <?hard-pagebreak?> - <section xml:id="delete_subnet"> - <title>Delete Subnet</title> - <informaltable rules="all" width="100%"> - <col width="20%"/> - <col width="20%"/> - <col width="60%"/> - <thead> - <tr> - <td>Verb</td> - <td>URI</td> - <td>Description</td> - </tr> - </thead> - <tbody> - <tr> - <td>&DELETE;</td> - <td>/subnets/<parameter>subnet-id</parameter></td> - <td>Removes the specified subnet.</td> - </tr> - </tbody> - </informaltable> - <simpara>Normal Response Code: - <returnvalue>204</returnvalue> - </simpara> - <simpara>Error Response Codes: Unauthorized - (<errorcode>401</errorcode>), Not Found - (<errorcode>404</errorcode>), Conflict - (<errorcode>409</errorcode>)</simpara> - <simpara>This operation removes a subnet from a - OpenStack Networking network. The operation fails - if IP addresses from the subnet that you want to - delete are still allocated. </simpara> - <para>This operation does not require a request - body.</para> - <para>This operation does not return a response - body.</para> - <example> - <title>Delete Subnet: JSON Request</title> - <literallayout class="monospaced">DELETE /v2.0/subnets/9436e561-47bf-436a-b1f1-fe23a926e031 -Accept: application/json</literallayout> - </example> - <example> - <title>Delete Subnet: Response </title> - <literallayout class="monospaced">Status: 204</literallayout> - </example> - </section> - </section> - <section xml:id="Ports"> - <title>Ports</title> - <para>Use the &APIv2; to manage port resources.</para> - <informaltable rules="all" width="100%"> - <col width="20%"/> - <col width="20%"/> - <col width="60%"/> - <thead> - <tr align="center"> - <td>Verb</td> - <td>URI</td> - <td>Description</td> - </tr> - </thead> - <tbody> - <tr> - <td>&GET;</td> - <td>/ports</td> - <td>Lists ports to which the tenant has - access.</td> - </tr> - <tr> - <td>&GET;</td> - <td>/ports/<parameter>port_id</parameter></td> - <td>Shows information for a specified - port.</td> - </tr> - <tr> - <td>&POST;</td> - <td>/ports</td> - <td>Creates a port for a specified - network.</td> - </tr> - <tr> - <td>&PUT;</td> - <td>/ports/<parameter>port-id</parameter></td> - <td>Updates a specified port.</td> - </tr> - <tr> - <td>&DELETE;</td> - <td>/ports/<parameter>port-id</parameter></td> - <td>Removes a specified port from an OpenStack - Networking network.</td> - </tr> - </tbody> - </informaltable> - <?hard-pagebreak?> - <section xml:id="List_Ports"> - <title>List Ports</title> - <informaltable rules="all" width="100%"> - <col width="20%"/> - <col width="20%"/> - <col width="60%"/> - <thead> - <tr> - <td>Verb</td> - <td>URI</td> - <td>Description</td> - </tr> - </thead> - <tbody> - <tr> - <td>&GET;</td> - <td>/ports</td> - <td>Lists ports to which the tenant has - access.</td> - </tr> - </tbody> - </informaltable> - <simpara>Normal Response Code: - <returnvalue>200</returnvalue> - </simpara> - <simpara>Error Response Codes: Unauthorized - (<errorcode>401</errorcode>)</simpara> - <para>This operation lists ports to which the tenant - has access. Default policy settings return only - those ports that are owned by the tenant who - submits the request, unless the request is - submitted by an user with administrative - rights.</para> - <para>Users can control which attributes are returned - by using the <parameter>fields</parameter> query - parameter. Additionally, you can filter results by - using query string parameters.</para> - <para>This operation does not require a request - body.</para> - <para>This operation returns a response body. The - response body contains the following - fields:</para> - <para> - <table rules="all"> - <caption>List Ports Response Fields</caption> - <thead> - <tr> - <th>Field</th> - <th>Description</th> - </tr> - </thead> - <tbody> - <tr> - <td>admin_state_up</td> - <td>Administrative state of the - router.</td> - </tr> - <tr> - <td>device_id</td> - <td>The ID of the device that uses - this port. For example, a virtual - server,</td> - </tr> - <tr> - <td>device_owner</td> - <td>The ID of the entity that uses - this port. For example, a dhcp - agent.</td> - </tr> - <tr> - <td>fixed_ips</td> - <td>IP addresses for the port. - Includes the IP address and subnet - ID. </td> - </tr> - <tr> - <td>id</td> - <td>The ID of the port.</td> - </tr> - <tr> - <td>mac_address</td> - <td>The MAC address of the port.</td> - </tr> - <tr> - <td>name</td> - <td>The name of the port.</td> - </tr> - <tr> - <td>network_id</td> - <td>The ID of the attached - network.</td> - </tr> - <tr> - <td>security_groups</td> - <td>The IDs of any attached security - groups.</td> - </tr> - <tr> - <td>status</td> - <td>The status of the port: UP or - DOWN.</td> - </tr> - <tr> - <td>tenant_id</td> - <td>The ID of the tenant who owns the - network. Only administrative users - can specify a tenant_id other than - their own. </td> - </tr> - </tbody> - </table> - </para> - <example> - <title>List Ports: JSON Request</title> - <literallayout class="monospaced">GET /v2.0/ports.json HTTP/1.1 -content-type: application/json -accept: application/json</literallayout> - </example> - <example> - <title>List Ports: JSON Response</title> - <programlisting language="json"><xi:include href="samples/ports-get-res.json" parse="text"/></programlisting> - </example> - </section> - <?hard-pagebreak?> - <section xml:id="Show_port"> - <title>Show Port</title> - <informaltable rules="all" width="100%"> - <col width="20%"/> - <col width="20%"/> - <col width="60%"/> - <thead> - <tr> - <td>Verb</td> - <td>URI</td> - <td>Description</td> - </tr> - </thead> - <tbody> - <tr> - <td>&GET;</td> - <td>/ports/<parameter>port-id</parameter></td> - <td>Shows information for a specified - port.</td> - </tr> - </tbody> - </informaltable> - <simpara>Normal Response Code: - <returnvalue>200</returnvalue> - </simpara> - <simpara>Error Response Codes: Unauthorized - (<errorcode>401</errorcode>), Not Found - (<errorcode>404</errorcode>)</simpara> - <para>This operation returns information for the port - specified in the request URI.</para> - <para>This operation does not require a request - body.</para> - <para>This operation returns a response body.</para> - <example> - <title>Show Port: JSON Request</title> - <programlisting>GET /v2.0/ports/ebe69f1e-bc26-4db5-bed0-c0afb4afe3db.json -accept: application/json</programlisting> - </example> - <example> - <title>Show Port: JSON Response</title> - <programlisting language="json"><xi:include href="samples/port-get-res.json" parse="text"/></programlisting> - </example> - </section> - <?hard-pagebreak?> - <section xml:id="Create_Port"> - <title>Create Port</title> - <informaltable rules="all" width="100%"> - <col width="20%"/> - <col width="20%"/> - <col width="60%"/> - <thead> - <tr> - <td>Verb</td> - <td>URI</td> - <td>Description</td> - </tr> - </thead> - <tbody> - <tr> - <td>&POST;</td> - <td>/ports</td> - <td>Creates a port on a specified - network.</td> - </tr> - </tbody> - </informaltable> - <simpara>Normal Response Code: - <returnvalue>201</returnvalue> - </simpara> - <simpara>Error Response Codes: Bad Request - (<errorcode>400</errorcode>), Unauthorized - (<errorcode>401</errorcode>), Forbidden - (<errorcode>403</errorcode>), Not Found - (<errorcode>404</errorcode>), Conflict - (<errorcode>409</errorcode>), MAC generation - failure (<errorcode>503</errorcode>) </simpara> - <para>This operation creates a new OpenStack - Networking port. You must specify the network - where the port is to created on the - <parameter>network_id</parameter> attribute in - the request body.</para> - <para>If you specify a security group ID, this port is - associated with the security group. You can - associate more than one security group with a - port.</para> - <para>You can also specify the following optional - attributes:</para> - <itemizedlist> - <listitem> - <para>Security groups. Specify one or more - security group IDs.</para> - </listitem> - <listitem> - <para>A symbolic name for the port</para> - </listitem> - <listitem> - <para>MAC address. If you specify an address - that is not valid, a <literal>400 Bad - Request</literal> error is - returned</para> - <para>If the specified MAC address is already - in use, a <literal>409 Conflict</literal> - error is returned.</para> - <para>When the MAC address is not specified, - OpenStack Networking tries to allocate one - for the port being created.</para> - <para>If a failure occurs while generating the - address, a <literal>503 Service - Unavailable</literal> error is - returned.</para> - </listitem> - <listitem> - <para>Administrative state. Set to - <literal>true</literal> for up, and - <literal>false</literal> for down. - </para> - </listitem> - <listitem> - <para>Fixed IPs <itemizedlist> - <listitem> - <para>If you specify just a subnet - ID, OpenStack Networking allocates - an available IP from that subnet to - the port.</para> - </listitem> - <listitem> - <para>If you specify both a subnet - ID and an IP address, OpenStack - Networking tries to allocate the - specified address to the - port.</para> - </listitem> - </itemizedlist></para> - </listitem> - <listitem> - <para>Host routes for the port, in addition to - the host routes defined for the subnets - with which the port is associated.</para> - </listitem> - </itemizedlist> - <para>This operation requires a request body.</para> - <para>This operation returns a response body.</para> - <example> - <title>Create Port: JSON Request</title> - <literallayout class="monospaced">POST /v2.0/ports.json HTTP/1.1 -Content-Length: 158 -content-type: application/json -accept: application/json</literallayout> - <programlisting language="json"><xi:include href="samples/port-post-req.json" parse="text"/></programlisting> - </example> - <example> - <title>Create Port: JSON Response</title> - <programlisting language="json"><xi:include href="samples/port-post-res.json" parse="text"/></programlisting> - </example> - <section xml:id="bulk_create_ports"> - <title>Bulk Create Port</title> - <para>This operation requires a request - body.</para> - <para>This operation returns a response - body.</para> - <para>This operation enables you to create several - ports in a single request. Specify a list of - ports in the request body.</para> - <example> - <title>Bulk Create Ports: JSON Request </title> - <literallayout class="monospaced">POST /v2.0/ports -Content-Type: application/json -Accept: application/json</literallayout> - <programlisting language="json"><xi:include href="samples/port-post-req-bulk.json" parse="text"/></programlisting> - </example> - <example> - <title>Bulk Create Ports: JSON Response </title> - <literallayout class="monospaced">HTTP/1.1 201 OK -Content-Type: application/json; charset=UTF-8 -</literallayout> - <programlisting language="json"><xi:include href="samples/port-post-res-bulk.json" parse="text"/></programlisting> - </example> - <para>The &APIv2; always guarantees the atomic - completion of the bulk operation.</para> - </section> - </section> - <?hard-pagebreak?> - <section xml:id="Update_Port"> - <title>Update Port</title> - <informaltable rules="all" width="100%"> - <col width="20%"/> - <col width="20%"/> - <col width="60%"/> - <thead> - <tr> - <td>Verb</td> - <td>URI</td> - <td>Description</td> - </tr> - </thead> - <tbody> - <tr> - <td>&PUT;</td> - <td>/ports/<parameter>port-id</parameter></td> - <td>Updates a specified port.</td> - </tr> - </tbody> - </informaltable> - <simpara>Normal Response Code: - <returnvalue>200</returnvalue> - </simpara> - <simpara>Error Response Codes: Bad Request - (<errorcode>400</errorcode>), Unauthorized - (<errorcode>401</errorcode>), Forbidden - (<errorcode>403</errorcode>), Not Found - (<errorcode>404</errorcode>), Conflict - (<errorcode>409</errorcode>) </simpara> - <para>You can use this operation to update information - for a port, such as its symbolic name and - associated IPs. When you update IPs for a port, - the previously associated IPs are removed, - returned to the respective subnets allocation - pools, and replaced by the IPs specified in the - body for the update request. Therefore, this - operation replaces the - <parameter>fixed_ip</parameter> attribute when - it is specified in the request body. If the new IP - addresses are not valid, for example, they are - already in use, the operation fails and the - existing IP addresses are not removed from the - port.</para> - <para>When you update security groups for a port and - the operation succeeds, any associated security - groups are removed and replaced by the security - groups specified in the body for the update - request. Therefore, this operation replaces the - security_groups attribute when you specify it in - the request body. However, if the specified - security groups are not valid, the operation fails - and the existing security groups are not removed - from the port.</para> - <para>This operation requires a request body.</para> - <para>This operation returns a response body.</para> - <example> - <title>Update Port: JSON Request</title> - <literallayout class="monospaced">PUT /v2.0/ports/1d8591f4-7b62-428e-857d-e82a15e5a7f1.json HTTP/1.1 -Content-Length: 63 -content-type: application/json -accept: application/json </literallayout> - <programlisting language="json"><xi:include href="samples/port-put-req.json" parse="text"/></programlisting> - </example> - <example> - <title>Update Port: JSON Response</title> - <programlisting language="json"><xi:include href="samples/port-put-res.json" parse="text"/></programlisting> - </example> - </section> - <?hard-pagebreak?> - <section xml:id="Delete_Port"> - <title>Delete Port</title> - <informaltable rules="all" width="100%"> - <col width="20%"/> - <col width="20%"/> - <col width="60%"/> - <thead> - <tr> - <td>Verb</td> - <td>URI</td> - <td>Description</td> - </tr> - </thead> - <tbody> - <tr> - <td>&DELETE;</td> - <td>/ports/<parameter>port-id</parameter></td> - <td>Removes a specified port from an - OpenStack Networking network.</td> - </tr> - </tbody> - </informaltable> - <simpara>Normal Response Code: - <returnvalue>204</returnvalue> - </simpara> - <simpara>Error Response Codes: Unauthorized - (<errorcode>401</errorcode>), Forbidden - (<errorcode>403</errorcode>), Not Found - (<errorcode>404</errorcode>)</simpara> - <para>This operation removes a port from an OpenStack - Networking network. If IP addresses are associated - with the port, they are returned to the respective - subnets allocation pools.</para> - <para>This operation does not require a request - body.</para> - <para>This operation does not return a response - body.</para> - <example> - <title>Delete Port: JSON Request</title> - <literallayout class="monospaced">DELETE /v2.0/ports/ebe69f1e-bc26-4db5-bed0-c0afb4afe3db.json -accept: application/json</literallayout> - </example> - <example> - <title>Delete Port: JSON Response</title> - <literallayout class="monospaced"> status: 204 </literallayout> - </example> - </section> - </section> - </chapter> - <chapter xml:id="API_extensions"> - <title>API Extensions</title> - <para>The API extensions augment the core API. An API - extension extends one or more of the following components - of the core API:</para> - <itemizedlist> - <listitem> - <para>Resources. An extension defines new object - classes.</para> - </listitem> - <listitem> - <para>Attributes. An extended attribute defines a new - attribute on existing resources. Prefixed by the - extension name.</para> - </listitem> - <listitem> - <para>Actions. An extended action defines a new - operation on an existing resource.</para> - </listitem> - </itemizedlist> - <para>Generic API extensions are not plug-in-specific. For - information about plug-in-specific extensions that are - shipped with OpenStack Networking, see the extension - documentation in the source code tree.</para> - <section xml:id="retrieve_extensions"> - <title>List Available Extensions</title> - <para>You can list available extensions through the - <filename role="bold">/v2.0/extensions</filename> - URI.</para> - <note> - <para>You must authenticate these requests just like - any other API request.</para> - </note> - <para>The following example response shows a list of - extensions:</para> - <literallayout class="monospaced">Status Code: 200 OK -Connection: keep-alive -Content-Length: 654 -Content-Type: application/xml; charset=UTF-8 -Date: Wed, 12 Sep 2012 11:32:56 GMT</literallayout> - <programlisting language="xml"><xi:include href="samples/extensionsv2.xml" parse="text"/></programlisting> - <para>Also, you can query for specific extension using the - extension alias. For instance, querying - <literal>/v2.0/extensions/router</literal>, - results in the following response:</para> - <literallayout class="monospaced">Status Code: 200 OK -Connection: keep-alive -Content-Length: 350 -Content-Type: application/xml; charset=UTF-8 -Date: Wed, 12 Sep 2012 11:36:20 GMT</literallayout> - <programlisting language="xml"><xi:include href="samples/extension.xml" parse="text"/></programlisting> - </section> - <xi:include href="section_provider_extended_attrs.xml"/> - <xi:include href="section_binding_ext_ports.xml"/> - <xi:include href="neutron-external-net.xml"/> - <xi:include href="neutron-l3-ext.xml"/> - <xi:include href="neutron-extgwmodes-ext.xml"/> - <xi:include href="neutron-quotas-ext.xml"/> - <xi:include href="neutron-security-groups-ext.xml"/> - <xi:include href="neutron-agent-ext.xml"/> - <xi:include href="neutron-extraroute-ext.xml"/> - <xi:include href="neutron-loadbalancer-ext.xml"/> - <xi:include href="neutron-firewall-ext.xml"/> - <xi:include href="neutron-scheduler-ext.xml"/> - <xi:include href="neutron-vpn-ext.xml"/> - <xi:include href="neutron-allowed-address-pair-ext.xml"/> - <xi:include href="neutron-extra-dhcp-opt-ext.xml"/> - <xi:include href="neutron-metering-ext.xml"/> - </chapter> + <xi:include href="ch_neutron_preface.xml"/> + <xi:include href="ch_neutron_overview.xml"/> + <xi:include href="ch_neutron_general_info.xml"/> + <xi:include href="ch_neutron_api_operations.xml"/> + <xi:include href="ch_neutron_api_extensions.xml"/> </book> diff --git a/v2.0/neutron-extgwmodes-ext.xml b/v2.0/neutron-extgwmodes-ext.xml deleted file mode 100644 index 8adb424..0000000 --- a/v2.0/neutron-extgwmodes-ext.xml +++ /dev/null @@ -1,207 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE section[ -<!-- Some useful entities borrowed from HTML --> -<!ENTITY ndash "–"> -<!ENTITY mdash "—"> -<!ENTITY hellip "…"> -<!ENTITY plusmn "±"> - -<!-- Useful for describing APIs --> -<!ENTITY GET '<command xmlns="http://docbook.org/ns/docbook">GET</command>'> -<!ENTITY PUT '<command xmlns="http://docbook.org/ns/docbook">PUT</command>'> -<!ENTITY POST '<command xmlns="http://docbook.org/ns/docbook">POST</command>'> -<!ENTITY DELETE '<command xmlns="http://docbook.org/ns/docbook">DELETE</command>'> - -<!ENTITY CHECK '<inlinemediaobject xmlns="http://docbook.org/ns/docbook"> - <imageobject> - <imagedata fileref="figures/Check_mark_23x20_02.svg" - format="SVG" scale="60"/> -</imageobject> - </inlinemediaobject>'> - -<!ENTITY ARROW '<inlinemediaobject xmlns="http://docbook.org/ns/docbook"> - <imageobject> - <imagedata fileref="figures/Arrow_east.svg" - format="SVG" scale="60"/> -</imageobject> - </inlinemediaobject>'> -]> -<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:svg="http://www.w3.org/2000/svg" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:db="http://docbook.org/ns/docbook" version="5.0" status="final" xml:id="extgwmodes-ext"> - <title>Configurable external gateway modes extension</title> - <para>By default, when a gateway is attached to a router using the Neutron L3 extension, Network - Address Translation (NAT) is enabled for traffic generated by subnets attached to the - router. With this extension, the user will have the option of choosing whether SNAT - should be enabled or not on a router basis.</para> - <para>This is achieved simply by specifying a boolean attribute, <literal>enable_snat</literal>, - in the <literal>external_gateway_info</literal> attribute of the <literal>router</literal> - resource. </para> - <para>This extension redefines the external_gateway_info attribute as depicted in the following - table. </para> - <table rules="all"> - <caption>external_gateway_info attributes</caption> - <col width="20%"/> - <col width="8%"/> - <col width="10%"/> - <col width="15%"/> - <col width="15%"/> - <col width="32%"/> - <thead> - <tr> - <th>Attribute </th> - <th>Type </th> - <th>Required </th> - <th>Default Value </th> - <th>Validation Constraints </th> - <th>Notes</th> - </tr> - </thead> - <tbody> - <tr> - <td>network_id</td> - <td>UUID</td> - <td>Yes</td> - <td>N/A</td> - <td>Must be a valid uuid representative of an external network.</td> - <td/> - </tr> - <tr> - <td>enable_snat</td> - <td>Boolean</td> - <td>No</td> - <td>True</td> - <td>{True|False}</td> - <td>The default setting is <literal>True</literal> to ensure backward compatibility - for plugins supporting this extension.</td> - </tr> - </tbody> - </table> - <para>SNAT can be enabled or disabled at any time on a Neutron router regardless of the - current status of floating IPs. Floating IPs will continue working even when SNAT is - disabled.</para> - <section xml:id="list_routers_extgwmodes"> - <title>List Routers</title> - <para> - <informaltable rules="all" width="100%"> - <col width="20%"/> - <col width="20%"/> - <col width="60%"/> - <thead> - <tr> - <td>Verb</td> - <td>URI</td> - <td>Description</td> - </tr> - </thead> - <tbody> - <tr> - <td>&GET;</td> - <td>/routers</td> - <td>Retrieve Neutron routers</td> - </tr> - </tbody> - </informaltable> - </para> - <simpara>Success and error response codes are not changed with regards to the operation as - introduced by the L3 API extension.</simpara> - <simpara>When this extension is enabled, this operation will also return the current Source - NAT status for configured routers, as shown in the sample below.</simpara> - <simpara>The response for the <emphasis>show router</emphasis> operation is the same, with - the obvious exception that a single router is returned.</simpara> - <example> - <title>Router list with configurable external gateway modes enabled</title> - <programlisting language="json"><xi:include href="samples/routers-get-enablesnat-res.json" parse="text"/></programlisting> - </example> - </section> - <section xml:id="create_router_extgwmodes"> - <title>Create Router with external gateway</title> - <para> - <informaltable rules="all" width="100%"> - <col width="20%"/> - <col width="20%"/> - <col width="60%"/> - <thead> - <tr> - <td>Verb</td> - <td>URI</td> - <td>Description</td> - </tr> - </thead> - <tbody> - <tr> - <td>&POST;</td> - <td>/routers</td> - <td>Create a new Neutron router</td> - </tr> - </tbody> - </informaltable> - - </para> - <para>Success and error response codes are not changed with regards to the operation as - introduced by the L3 API extension.</para> - <para>Neutron API users can specify whether SNAT should be performed on the network - specifed as the router's external gateway by setting <literal>enable_snat</literal> in - <literal>external_gateway_info</literal> to either <literal>True</literal> or - <literal>False</literal>; the default value is <literal>True</literal>.</para> - <example> - <title>Create router with SNAT disabled</title> - <programlisting><xi:include href="samples/router-create-enablesnat.sample" parse="text"/></programlisting> - </example> - </section> - <section xml:id="update_router_extgwmodes"> - <title>Update Router's external gateway info</title> - <para> - <informaltable rules="all" width="100%"> - <col width="20%"/> - <col width="20%"/> - <col width="60%"/> - <thead> - <tr> - <td>Verb</td> - <td>URI</td> - <td>Description</td> - </tr> - </thead> - <tbody> - <tr> - <td>&PUT;</td> - <td>/routers/<literal>router_id</literal></td> - <td>Create a new Neutron router</td> - </tr> - </tbody> - </informaltable> - </para> - <para>Success and error response codes are not changed with regards to the operation as - introduced by the L3 API extension.</para> - <para>Neutron API users can enable or disable SNAT on a router specifying the - <literal>enable_snat</literal> attribute in the - <literal>external_gateway_info</literal> attribute for the router resource. This - operation can be either used for updating the SNAT status only, the - external network, or both attributes at the same time. In any case, if - the <literal>enable_snat</literal> attribute is not specified, it will default to - <literal>True</literal>. For instance, if the current SNAT status is disabled, and - the router's gateway is updated to a different external network without specifying - <literal>enable_snat</literal>, SNAT will be enabled for the new network.</para> - <para>It is important to note that whenever updating a router's external gateway - information, the <literal>network_id </literal>parameter must be specified always, even - if the final goal is just to enable or disable SNAT for the router on the same - external network.</para> - <para>The rest of this section provides some samples for updating a router's external gateway - info with SNAT mode.</para> - <para> - <example> - <title>Disable SNAT for the current external network</title> - <programlisting><xi:include href="samples/router-update-enablesnat-1.sample" parse="text"/></programlisting> - </example> - <example> - <title>Change external network and enable SNAT</title> - <programlisting><xi:include href="samples/router-update-enablesnat-2.sample" parse="text"/></programlisting> - </example> - <example> - <title>Change external network and keep SNAT disabled</title> - <programlisting><xi:include href="samples/router-update-enablesnat-3.sample" parse="text"/></programlisting> - </example> - </para> - </section> - <?hard-pagebreak?> - -</section> diff --git a/v2.0/neutron-quotas-ext.xml b/v2.0/neutron-quotas-ext.xml deleted file mode 100644 index 82e8167..0000000 --- a/v2.0/neutron-quotas-ext.xml +++ /dev/null @@ -1,262 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE section [ -<!-- Some useful entities borrowed from HTML --> -<!ENTITY ndash "–"> -<!ENTITY mdash "—"> -<!ENTITY hellip "…"> -<!ENTITY plusmn "±"> - -<!-- Useful for describing APIs --> -<!ENTITY GET '<command xmlns="http://docbook.org/ns/docbook">GET</command>'> -<!ENTITY PUT '<command xmlns="http://docbook.org/ns/docbook">PUT</command>'> -<!ENTITY POST '<command xmlns="http://docbook.org/ns/docbook">POST</command>'> -<!ENTITY DELETE '<command xmlns="http://docbook.org/ns/docbook">DELETE</command>'> - -<!ENTITY CHECK '<inlinemediaobject xmlns="http://docbook.org/ns/docbook"> - <imageobject> - <imagedata fileref="figures/Check_mark_23x20_02.svg" - format="SVG" scale="60"/> -</imageobject> - </inlinemediaobject>'> - -<!ENTITY ARROW '<inlinemediaobject xmlns="http://docbook.org/ns/docbook"> - <imageobject> - <imagedata fileref="figures/Arrow_east.svg" - format="SVG" scale="60"/> -</imageobject> - </inlinemediaobject>'> - <!ENTITY APIv2 'Networking API v2.0'> -]> -<section xmlns="http://docbook.org/ns/docbook" - xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:xi="http://www.w3.org/2001/XInclude" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns:m="http://www.w3.org/1998/Math/MathML" - xmlns:html="http://www.w3.org/1999/xhtml" - xmlns:db="http://docbook.org/ns/docbook" version="5.0" - status="final" xml:id="quotas_ext"> - <title>Quotas</title> - <para>The <db:filename>neutron.conf</db:filename> configuration file defines default quota - values that are applied identically to all tenants. This extension enables an admin user to - define quotas values on a per-tenant basis. For example, an admin user can permit tenant A - to create at most X networks, and permit tenant B to create at most Y networks.</para> - <para>If quotas per tenant is needed, you must enable the Quotas - extension. For information, see the <citetitle>OpenStack - Cloud Administrator Guide</citetitle>.</para> - <informaltable rules="all" width="100%"> - <col width="20%"/> - <col width="20%"/> - <col width="60%"/> - <thead> - <tr align="center"> - <td>Verb</td> - <td>URI</td> - <td>Description</td> - </tr> - </thead> - <tbody> - <tr> - <td>&GET;</td> - <td>/quotas</td> - <td>Lists quotas for tenants who have non-default - quota values.</td> - </tr> - <tr> - <td>&GET;</td> - <td>/quotas/<parameter>tenant_id</parameter></td> - <td>Shows quotas for a specified tenant.</td> - </tr> - <tr> - <td>&PUT;</td> - <td>/quotas/<parameter>tenant_id</parameter></td> - <td>Updates quotas for a specified tenant. Use when - non-default quotas are desired.</td> - </tr> - <tr> - <td>&DELETE;</td> - <td>/quotas/<parameter>tenant_id</parameter></td> - <td>Resets quotas to default values for a specified - tenant.</td> - </tr> - </tbody> - </informaltable> - <?hard-pagebreak?> - <section xml:id="List_Quotas"> - <title>List Quotas</title> - <informaltable rules="all" width="100%"> - <col width="20%"/> - <col width="20%"/> - <col width="60%"/> - <thead> - <tr> - <td>Verb</td> - <td>URI</td> - <td>Description</td> - </tr> - </thead> - <tbody> - <tr> - <td>&GET;</td> - <td>/quotas</td> - <td> Lists quotas for tenants who have non-default - quota values.</td> - </tr> - </tbody> - </informaltable> - <simpara>Normal Response Code: <returnvalue>200</returnvalue> - </simpara> - <simpara>Error Response Codes: Unauthorized - (<errorcode>401</errorcode>), Forbidden - (<errorcode>403</errorcode>)</simpara> - <para>This operation does not require a request body. </para> - <para>This operation returns a response body.</para> - <example> - <title>List Quotas: JSON Request</title> - <programlisting>GET /v2.0/quotas HTTP/1.1 -Host: controlnode:9696 -User-Agent: python-neutronclient -Content-Type: application/json -Accept: application/json -X-Auth-Token: c52a1b304fec4ca0ac85dc1741eec6e2</programlisting> - </example> - <example> - <title>List Quotas: JSON Response</title> - <programlisting language="json"><xi:include href="samples/quotas-list-res.json" parse="text"/></programlisting> - </example> - </section> - <?hard-pagebreak?> - <section xml:id="Show_Quotas"> - <title>Show Quotas</title> - <informaltable rules="all" width="100%"> - <col width="20%"/> - <col width="20%"/> - <col width="60%"/> - <thead> - <tr> - <td>Verb</td> - <td>URI</td> - <td>Description</td> - </tr> - </thead> - <tbody> - <tr> - <td>&GET;</td> - <td>/quotas/<parameter>tenant_id</parameter></td> - <td>Shows quotas for a specified tenant.</td> - </tr> - </tbody> - </informaltable> - <simpara>Normal Response Code: <returnvalue>200</returnvalue> - </simpara> - <simpara>Error Response Codes: Unauthorized - (<errorcode>401</errorcode>), Forbidden - (<errorcode>403</errorcode>)</simpara> - <para>This operation returns information for the quotas of the - tenant specified in the request URI. </para> - <para>This operation does not require a request body.</para> - <para>This operation returns a response body.</para> - <example> - <title>Show Quotas: JSON Request</title> - <programlisting>GET /v2.0/quotas/5fcfbc3283a142a5bb6978b549a511ac.json HTTP/1.1 -Host: controlnode:9696 -User-Agent: python-neutronclient -Content-Type: application/json -Accept: application/json -X-Auth-Token: a54d6fdda41341f892150e2aaf648f0d</programlisting> - </example> - <example> - <title>Show Quotas: JSON Response</title> - <programlisting language="json"><xi:include href="samples/quotas-show-res.json" parse="text"/></programlisting> - </example> - </section> - <?hard-pagebreak?> - <section xml:id="Update_Quotas"> - <title>Update Quotas</title> - <informaltable rules="all" width="100%"> - <col width="20%"/> - <col width="20%"/> - <col width="60%"/> - <thead> - <tr> - <td>Verb</td> - <td>URI</td> - <td>Description</td> - </tr> - </thead> - <tbody> - <tr> - <td>&PUT;</td> - <td>/quotas/<parameter>tenant_id</parameter></td> - <td>Updates quotas for a specified tenant. Use - when non-default quotas are desired.</td> - </tr> - </tbody> - </informaltable> - <simpara>Normal Response Code: <returnvalue>200</returnvalue> - </simpara> - <simpara>Error Response Codes: Unauthorized - (<errorcode>401</errorcode>), Forbidden - (<errorcode>403</errorcode>)</simpara> - <para>This operation updates quotas for a given tenant.</para> - <para>This operation requires a request body. The body - contains the resource names and their new quota values. </para> - <para>This operation returns a response body.</para> - <example> - <title>Update Quotas: JSON Request</title> - <programlisting>PUT /v2.0/quotas/5fcfbc3283a142a5bb6978b549a511ac.json HTTP/1.1 -Host: controlnode:9696 -User-Agent: python-neutronclient -Content-Type: application/json -Accept: application/json -X-Auth-Token: 4cbb09e780434b249ff596d6979fd8fc -Content-Length: 88 -<xi:include href="samples/quotas-put-req.json" parse="text"/></programlisting> - </example> - <example> - <title>Update Quotas: JSON Response</title> - <programlisting language="json"><xi:include href="samples/quotas-put-res.json" parse="text"/></programlisting> - </example> - </section> - <?hard-pagebreak?> - <section xml:id="Reset_Quotas"> - <title>Reset Quotas</title> - <informaltable rules="all" width="100%"> - <col width="20%"/> - <col width="20%"/> - <col width="60%"/> - <thead> - <tr> - <td>Verb</td> - <td>URI</td> - <td>Description</td> - </tr> - </thead> - <tbody> - <tr> - <td>&DELETE;</td> - <td>/quotas/<parameter>tenant_id</parameter></td> - <td>Resets quotas to default values for a - specified tenant.</td> - </tr> - </tbody> - </informaltable> - <simpara>Normal Response Code: <returnvalue>204</returnvalue> - </simpara> - <simpara>Error Response Codes: Unauthorized - (<errorcode>401</errorcode>), Forbidden - (<errorcode>403</errorcode>)</simpara> - <para>This operation resets quotas of a given tenant to - default values.</para> - <para>This operation does not require a request body.</para> - <para>This operation does not return a response body.</para> - <example> - <title>Reset Quotas: JSON Request</title> - <programlisting>DELETE /v2.0/quotas/5fcfbc3283a142a5bb6978b549a511ac.json HTTP/1.1 -Host: controlnode:9696 -User-Agent: python-neutronclient -Content-Type: application/json -Accept: application/json -X-Auth-Token: 903857de62274690911c364b60582440</programlisting> - </example> - </section> -</section> diff --git a/v2.0/samples/network-post-req.xml b/v2.0/samples/network-post-req.xml index 6531ee9..e39bc94 100644 --- a/v2.0/samples/network-post-req.xml +++ b/v2.0/samples/network-post-req.xml @@ -1,2 +1,3 @@ -<network - name="test_create_network"/> \ No newline at end of file +<network> + <name>sample_network</name> +</network> diff --git a/v2.0/samples/network-post-resp.json b/v2.0/samples/network-post-resp.json new file mode 100644 index 0000000..1729132 --- /dev/null +++ b/v2.0/samples/network-post-resp.json @@ -0,0 +1,15 @@ +'status': '201' +'content-length': '194' +'content-type': 'application/json; + +{ + "network": { + "admin_state_up": true, + "id": "850d3f2c-f0a5-4f8b-b1cf-5836fc0be940", + "name": "sample_network", + "shared": false, + "status": "ACTIVE", + "subnets": [], + "tenant_id": "f667b69e4d6749749ef3bcba7251d9ce" + } +} diff --git a/v2.0/samples/network-post-resp.xml b/v2.0/samples/network-post-resp.xml new file mode 100644 index 0000000..4101965 --- /dev/null +++ b/v2.0/samples/network-post-resp.xml @@ -0,0 +1,13 @@ +<?xml version='1.0' encoding='UTF-8'?> +<network xmlns="http://openstack.org/quantum/api/v2.0" + xmlns:quantum="http://openstack.org/quantum/api/v2.0" + xmlns:router="http://docs.openstack.org/ext/quantum/router/api/v1.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <status>ACTIVE</status> + <subnets quantum:type="list" /> + <name>sample_network</name> + <tenant_id>4be6b806faa0491eb358018bbe9f0d4e</tenant_id> + <admin_state_up quantum:type="bool">True</admin_state_up> + <shared quantum:type="bool">False</shared> + <id>0657ef52-d3f6-4320-9c26-015a3e9badea</id> +</network> diff --git a/v2.0/samples/network-put-update-resp.json b/v2.0/samples/network-put-update-resp.json new file mode 100644 index 0000000..f9b1f94 --- /dev/null +++ b/v2.0/samples/network-put-update-resp.json @@ -0,0 +1,12 @@ +{ + "network": + { + "status": "ACTIVE", + "subnets": ["e12f0c45-46e3-446a-b207-9474b27687a6"], + "name": "private", + "admin_state_up": true, + "tenant_id": "625887121e364204873d362b553ab171", + "id": "9d83c053-b0a4-4682-ae80-c00df269ce0a", + "shared": false + } +} diff --git a/v2.0/samples/network-put-update-resp.xml b/v2.0/samples/network-put-update-resp.xml new file mode 100644 index 0000000..3e90de6 --- /dev/null +++ b/v2.0/samples/network-put-update-resp.xml @@ -0,0 +1,16 @@ +<?xml version='1.0' encoding='UTF-8'?> +<network xmlns="http://openstack.org/quantum/api/v2.0" xmlns:provider="http://docs.openstack.org/ext/provider/api/v1.0" xmlns:quantum="http://openstack.org/quantum/api/v2.0" xmlns:router="http://docs.openstack.org/ext/quantum/router/api/v1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <status>ACTIVE</status> + <subnets> + <subnet>e12f0c45-46e3-446a-b207-9474b27687a6</subnet> + </subnets> + <name>private</name> + <provider:physical_network xsi:nil="true" /> + <admin_state_up quantum:type="bool">True</admin_state_up> + <tenant_id>625887121e364204873d362b553ab171</tenant_id> + <provider:network_type>local</provider:network_type> + <router:external quantum:type="bool">False</router:external> + <shared quantum:type="bool">False</shared> + <id>9d83c053-b0a4-4682-ae80-c00df269ce0a</id> + <provider:segmentation_id xsi:nil="true" /> +</network> diff --git a/v2.0/samples/network-put-update.req.json b/v2.0/samples/network-put-update.req.json new file mode 100644 index 0000000..37fe569 --- /dev/null +++ b/v2.0/samples/network-put-update.req.json @@ -0,0 +1,6 @@ +{ + "network": + { + "name": "updated_name" + } +} diff --git a/v2.0/samples/network-put-update.req.xml b/v2.0/samples/network-put-update.req.xml new file mode 100644 index 0000000..d43bdde --- /dev/null +++ b/v2.0/samples/network-put-update.req.xml @@ -0,0 +1,3 @@ +<network xmlns="http://openstack.org/quantum/api/v2.0" xmlns:provider="http://docs.openstack.org/ext/provider/api/v1.0" xmlns:quantum="http://openstack.org/quantum/api/v2.0" xmlns:router="http://docs.openstack.org/ext/quantum/router/api/v1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <name>nova2</name> +</network> diff --git a/v2.0/samples/networks-create-bulk-resp.json b/v2.0/samples/networks-create-bulk-resp.json new file mode 100644 index 0000000..7c10808 --- /dev/null +++ b/v2.0/samples/networks-create-bulk-resp.json @@ -0,0 +1,28 @@ +{ +"networks": [ +{ +"status": "ACTIVE", +"subnets": [], +"name": "sample_network_1", +"provider:physical_network": null, +"admin_state_up": false, +"tenant_id": "60cd4f6dbc2f491982a284e7b83b5be3", +"provider:network_type": "local", +"router:external": false, +"shared": false, +"id": "e9330b1f-a2ef-4160-a951-169ee6ab17f5", +"provider:segmentation_id": null +}, +{ +"status": "ACTIVE", +"subnets": [], +"name": "sample_network_2", +"provider:physical_network": null, +"admin_state_up": false, +"tenant_id": "60cd4f6dbc2f491982a284e7b83b5be3", +"provider:network_type": "local", +"router:external": false, +"shared": false, +"id": "cfb5f52c-dfe2-4357-a10d-a225693e2b84", +"provider:segmentation_id": null}] +} diff --git a/v2.0/samples/networks-create-bulk-resp.xml b/v2.0/samples/networks-create-bulk-resp.xml new file mode 100644 index 0000000..93eff7f --- /dev/null +++ b/v2.0/samples/networks-create-bulk-resp.xml @@ -0,0 +1,33 @@ +<?xml version='1.0' encoding='UTF-8'?> +<networks xmlns="http://openstack.org/quantum/api/v2.0" + xmlns:provider="http://docs.openstack.org/ext/provider/api/v1.0" + xmlns:quantum="http://openstack.org/quantum/api/v2.0" + xmlns:router="http://docs.openstack.org/ext/neutron/router/api/v1.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <network> + <status>ACTIVE</status> + <subnets quantum:type="list" /> + <name>sample_network_1</name> + <provider:physical_network xsi:nil="true" /> + <admin_state_up quantum:type="bool">True</admin_state_up> + <tenant_id>60cd4f6dbc2f491982a284e7b83b5be3</tenant_id> + <provider:network_type>local</provider:network_type> + <router:external quantum:type="bool">False</router:external> + <shared quantum:type="bool">False</shared> + <id>9eb3ce34-183b-4a75-b08f-d6a3d241e68b</id> + <provider:segmentation_id xsi:nil="true" /> + </network> + <network> + <status>ACTIVE</status> + <subnets quantum:type="list" /> + <name>sample_network_2</name> + <provider:physical_network xsi:nil="true" /> + <admin_state_up quantum:type="bool">True</admin_state_up> + <tenant_id>60cd4f6dbc2f491982a284e7b83b5be3</tenant_id> + <provider:network_type>local</provider:network_type> + <router:external quantum:type="bool">False</router:external> + <shared quantum:type="bool">False</shared> + <id>df679a25-915d-41ed-b5ec-721481ddfd56</id> + <provider:segmentation_id xsi:nil="true" /> + </network> +</networks> diff --git a/v2.0/samples/networks-get-detail-resp.json b/v2.0/samples/networks-get-detail-resp.json new file mode 100644 index 0000000..f9b1f94 --- /dev/null +++ b/v2.0/samples/networks-get-detail-resp.json @@ -0,0 +1,12 @@ +{ + "network": + { + "status": "ACTIVE", + "subnets": ["e12f0c45-46e3-446a-b207-9474b27687a6"], + "name": "private", + "admin_state_up": true, + "tenant_id": "625887121e364204873d362b553ab171", + "id": "9d83c053-b0a4-4682-ae80-c00df269ce0a", + "shared": false + } +} diff --git a/v2.0/samples/networks-get-detail-resp.xml b/v2.0/samples/networks-get-detail-resp.xml new file mode 100644 index 0000000..3e90de6 --- /dev/null +++ b/v2.0/samples/networks-get-detail-resp.xml @@ -0,0 +1,16 @@ +<?xml version='1.0' encoding='UTF-8'?> +<network xmlns="http://openstack.org/quantum/api/v2.0" xmlns:provider="http://docs.openstack.org/ext/provider/api/v1.0" xmlns:quantum="http://openstack.org/quantum/api/v2.0" xmlns:router="http://docs.openstack.org/ext/quantum/router/api/v1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <status>ACTIVE</status> + <subnets> + <subnet>e12f0c45-46e3-446a-b207-9474b27687a6</subnet> + </subnets> + <name>private</name> + <provider:physical_network xsi:nil="true" /> + <admin_state_up quantum:type="bool">True</admin_state_up> + <tenant_id>625887121e364204873d362b553ab171</tenant_id> + <provider:network_type>local</provider:network_type> + <router:external quantum:type="bool">False</router:external> + <shared quantum:type="bool">False</shared> + <id>9d83c053-b0a4-4682-ae80-c00df269ce0a</id> + <provider:segmentation_id xsi:nil="true" /> +</network> diff --git a/v2.0/samples/networks-get-resp.xml b/v2.0/samples/networks-get-resp.xml index 70d5df4..6c4f7ae 100644 --- a/v2.0/samples/networks-get-resp.xml +++ b/v2.0/samples/networks-get-resp.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <networks xmlns="http://openstack.org/quantum/api/v2.0" + xmlns:provider="http://docs.openstack.org/ext/provider/api/v1.0" xmlns:quantum="http://openstack.org/quantum/api/v2.0" xmlns:router="http://docs.openstack.org/ext/quantum/router/api/v1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> @@ -9,11 +10,14 @@ <subnet>a318fcb4-9ff0-4485-b78c-9e6738c21b26</subnet> </subnets> <name>private</name> + <provider:physical_network xsi:nil="true"/> <admin_state_up quantum:type="bool">True</admin_state_up> <tenant_id>625887121e364204873d362b553ab171</tenant_id> + <provider:network_type>local</provider:network_type> <router:external quantum:type="bool">False</router:external> <shared quantum:type="bool">False</shared> <id>9d83c053-b0a4-4682-ae80-c00df269ce0a</id> + <provider:segmentation_id xsi:nil="true"/> </network> <network> <status>ACTIVE</status> @@ -21,10 +25,13 @@ <subnet>aca4d43c-c48c-4a2c-9bb6-ba374ef7e135</subnet> </subnets> <name>nova</name> + <provider:physical_network xsi:nil="true"/> <admin_state_up quantum:type="bool">True</admin_state_up> <tenant_id>63878e4c5dd649d2a980e37aefddfa87</tenant_id> + <provider:network_type>local</provider:network_type> <router:external quantum:type="bool">True</router:external> <shared quantum:type="bool">False</shared> <id>ebda9658-093b-41ba-80ce-0cf8cb8365d4</id> + <provider:segmentation_id xsi:nil="true"/> </network> </networks> diff --git a/v2.0/samples/networks-post-create-bulk-req.json b/v2.0/samples/networks-post-create-bulk-req.json new file mode 100644 index 0000000..8527240 --- /dev/null +++ b/v2.0/samples/networks-post-create-bulk-req.json @@ -0,0 +1,11 @@ +{ +"networks": [ +{ +"name": "sample_network_1", +"admin_state_up": false +}, +{ +"name": "sample_network_2", +"admin_state_up": false +}] +} diff --git a/v2.0/samples/networks-post-create-bulk-req.xml b/v2.0/samples/networks-post-create-bulk-req.xml new file mode 100644 index 0000000..cfc344f --- /dev/null +++ b/v2.0/samples/networks-post-create-bulk-req.xml @@ -0,0 +1,8 @@ +<networks> + <network> + <name>sample_network_1</name> + </network> + <network> + <name>sample_network_2</name> + </network> +</networks> diff --git a/v2.0/samples/port-post-create-req.json b/v2.0/samples/port-post-create-req.json new file mode 100644 index 0000000..26c40f2 --- /dev/null +++ b/v2.0/samples/port-post-create-req.json @@ -0,0 +1,8 @@ +{ + "port": { + "admin_state_up": true, + "device_id": "d6b4d3a5-c700-476f-b609-1493dd9dadc0", + "name": "port1", + "network_id": "6aeaf34a-c482-4bd3-9dc3-7faf36412f12" + } +} \ No newline at end of file diff --git a/v2.0/samples/ports-create-bulk-resp.json b/v2.0/samples/ports-create-bulk-resp.json new file mode 100644 index 0000000..883d029 --- /dev/null +++ b/v2.0/samples/ports-create-bulk-resp.json @@ -0,0 +1,49 @@ +{ + "ports":[ + { + "status":"DOWN", + "binding:host_id":null, + "name":"sample_port_1", + "admin_state_up":true, + "network_id":"a3775a7d-9f8b-4148-be81-c84bbd0837ce", + "tenant_id":"60cd4f6dbc2f491982a284e7b83b5be3", + "binding:vif_type":"ovs", + "device_owner":"", + "binding:capabilities":{ + "port_filter":true + }, + "mac_address":"fa:16:3e:2e:7c:8a", + "fixed_ips":[ + + ], + "id":"8fb361d8-bab0-418d-b1b8-7204a230fb06", + "security_groups":[ + "99f465bc-0d7c-4142-8829-7ae0179f2fa8" + ], + "device_id":"" + }, + { + "status":"DOWN", + "binding:host_id":null, + "name":"sample_port_2", + "admin_state_up":false, + "network_id":"a3775a7d-9f8b-4148-be81-c84bbd0837ce", + "tenant_id":"60cd4f6dbc2f491982a284e7b83b5be3", + "binding:vif_type":"ovs", + "device_owner":"", + "binding:capabilities":{ + "port_filter":true + }, + "mac_address":"fa:16:3e:0a:4e:13", + "fixed_ips":[ + + ], + "id":"d4c93b0b-f593-424e-a199-d648478a5a3c", + "security_groups":[ + "99f465bc-0d7c-4142-8829-7ae0179f2fa8" + ], + "device_id":"" + } + ] +} + diff --git a/v2.0/samples/ports-create-bulk-resp.xml b/v2.0/samples/ports-create-bulk-resp.xml new file mode 100644 index 0000000..0b806ce --- /dev/null +++ b/v2.0/samples/ports-create-bulk-resp.xml @@ -0,0 +1,46 @@ +<?xml version='1.0' encoding='UTF-8'?> +<ports xmlns="http://openstack.org/quantum/api/v2.0" + xmlns:binding="http://docs.openstack.org/ext/binding/api/v1.0" + xmlns:quantum="http://openstack.org/quantum/api/v2.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <port> + <status>DOWN</status> + <binding:host_id xsi:nil="true" /> + <name>test_port_1</name> + <admin_state_up quantum:type="bool">True</admin_state_up> + <network_id>a3775a7d-9f8b-4148-be81-c84bbd0837ce</network_id> + <tenant_id>60cd4f6dbc2f491982a284e7b83b5be3</tenant_id> + <binding:vif_type>ovs</binding:vif_type> + <device_owner /> + <binding:capabilities> + <port_filter quantum:type="bool">True</port_filter> + </binding:capabilities> + <mac_address>fa:16:3e:c9:8d:cf</mac_address> + <fixed_ips quantum:type="list" /> + <id>7f0aa3f1-883a-43b2-8d1b-e85fac52b417</id> + <security_groups> + <security_group>99f465bc-0d7c-4142-8829-7ae0179f2fa8</security_group> + </security_groups> + <device_id /> + </port> + <port> + <status>DOWN</status> + <binding:host_id xsi:nil="true" /> + <name>test_port_2</name> + <admin_state_up quantum:type="bool">True</admin_state_up> + <network_id>a3775a7d-9f8b-4148-be81-c84bbd0837ce</network_id> + <tenant_id>60cd4f6dbc2f491982a284e7b83b5be3</tenant_id> + <binding:vif_type>ovs</binding:vif_type> + <device_owner /> + <binding:capabilities> + <port_filter quantum:type="bool">True</port_filter> + </binding:capabilities> + <mac_address>fa:16:3e:79:90:81</mac_address> + <fixed_ips quantum:type="list" /> + <id>a4a81484-c1c4-4b2b-95bc-f8c4484241d0</id> + <security_groups> + <security_group>99f465bc-0d7c-4142-8829-7ae0179f2fa8</security_group> + </security_groups> + <device_id /> + </port> +</ports> diff --git a/v2.0/samples/ports-get-resp.json b/v2.0/samples/ports-get-resp.json new file mode 100644 index 0000000..dc2dde2 --- /dev/null +++ b/v2.0/samples/ports-get-resp.json @@ -0,0 +1,88 @@ +{ + "ports":[ + { + "status":"ACTIVE", + "name":"", + "admin_state_up":true, + "network_id":"ebda9658-093b-41ba-80ce-0cf8cb8365d4", + "tenant_id":"63878e4c5dd649d2a980e37aefddfa87", + "binding:vif_type":"ovs", + "device_owner":"compute:None", + "binding:capabilities":{ + "port_filter":false + }, + "mac_address":"fa:16:3e:b9:ef:05", + "fixed_ips":[ + { + "subnet_id":"aca4d43c-c48c-4a2c-9bb6-ba374ef7e135", + "ip_address":"172.24.4.227" + } + ], + "id":"664ebd1a-facd-4c20-948c-07a784475ab0", + "device_id":"f288bb5f-920d-4276-8345-2c0319c16f58" + }, + { + "status":"DOWN", + "name":"", + "admin_state_up":true, + "network_id":"ebda9658-093b-41ba-80ce-0cf8cb8365d4", + "tenant_id":"", + "binding:vif_type":"ovs", + "device_owner":"network:router_gateway", + "binding:capabilities":{ + "port_filter":false + }, + "mac_address":"fa:16:3e:4a:3a:a2", + "fixed_ips":[ + { + "subnet_id":"aca4d43c-c48c-4a2c-9bb6-ba374ef7e135", + "ip_address":"172.24.4.226" + } + ], + "id":"c5ca7017-c390-4ccc-8cd7-333747e57fef", + "device_id":"0dc517bf-9169-4aa6-88b7-569219962881" + }, + { + "status":"ACTIVE", + "name":"", + "admin_state_up":true, + "network_id":"9d83c053-b0a4-4682-ae80-c00df269ce0a", + "tenant_id":"625887121e364204873d362b553ab171", + "binding:vif_type":"ovs", + "device_owner":"network:router_interface", + "binding:capabilities":{ + "port_filter":false + }, + "mac_address":"fa:16:3e:2d:dc:7e", + "fixed_ips":[ + { + "subnet_id":"a318fcb4-9ff0-4485-b78c-9e6738c21b26", + "ip_address":"10.0.0.1" + } + ], + "id":"d7815f5b-a228-47bb-a5e5-f139c4e476f6", + "device_id":"0dc517bf-9169-4aa6-88b7-569219962881" + }, + { + "status":"ACTIVE", + "name":"", + "admin_state_up":true, + "network_id":"9d83c053-b0a4-4682-ae80-c00df269ce0a", + "tenant_id":"625887121e364204873d362b553ab171", + "binding:vif_type":"ovs", + "device_owner":"network:dhcp", + "binding:capabilities":{ + "port_filter":false + }, + "mac_address":"fa:16:3e:73:6d:1c", + "fixed_ips":[ + { + "subnet_id":"a318fcb4-9ff0-4485-b78c-9e6738c21b26", + "ip_address":"10.0.0.2" + } + ], + "id":"f8639521-fab2-4879-94b2-83a47bee8a26", + "device_id":"dhcpe1b8334f-9be9-5e49-aeee-b31e6df6c847-9d83c053-b0a4-4682-ae80-c00df269ce0a" + } + ] +} \ No newline at end of file diff --git a/v2.0/samples/ports-get-resp.xml b/v2.0/samples/ports-get-resp.xml new file mode 100644 index 0000000..37759d6 --- /dev/null +++ b/v2.0/samples/ports-get-resp.xml @@ -0,0 +1,87 @@ +<?xml version='1.0' encoding='UTF-8'?> +<ports xmlns="http://openstack.org/quantum/api/v2.0" xmlns:binding="http://docs.openstack.org/ext/binding/api/v1.0" xmlns:quantum="http://openstack.org/quantum/api/v2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <port> + <status>ACTIVE</status> + <name /> + <admin_state_up quantum:type="bool">True</admin_state_up> + <network_id>ebda9658-093b-41ba-80ce-0cf8cb8365d4</network_id> + <tenant_id>63878e4c5dd649d2a980e37aefddfa87</tenant_id> + <binding:vif_type>ovs</binding:vif_type> + <device_owner>compute:None</device_owner> + <binding:capabilities> + <port_filter quantum:type="bool">False</port_filter> + </binding:capabilities> + <mac_address>fa:16:3e:b9:ef:05</mac_address> + <fixed_ips> + <fixed_ip> + <subnet_id>aca4d43c-c48c-4a2c-9bb6-ba374ef7e135</subnet_id> + <ip_address>172.24.4.227</ip_address> + </fixed_ip> + </fixed_ips> + <id>664ebd1a-facd-4c20-948c-07a784475ab0</id> + <device_id>f288bb5f-920d-4276-8345-2c0319c16f58</device_id> + </port> + <port> + <status>DOWN</status> + <name /> + <admin_state_up quantum:type="bool">True</admin_state_up> + <network_id>ebda9658-093b-41ba-80ce-0cf8cb8365d4</network_id> + <tenant_id /> + <binding:vif_type>ovs</binding:vif_type> + <device_owner>network:router_gateway</device_owner> + <binding:capabilities> + <port_filter quantum:type="bool">False</port_filter> + </binding:capabilities> + <mac_address>fa:16:3e:4a:3a:a2</mac_address> + <fixed_ips> + <fixed_ip> + <subnet_id>aca4d43c-c48c-4a2c-9bb6-ba374ef7e135</subnet_id> + <ip_address>172.24.4.226</ip_address> + </fixed_ip> + </fixed_ips> + <id>c5ca7017-c390-4ccc-8cd7-333747e57fef</id> + <device_id>0dc517bf-9169-4aa6-88b7-569219962881</device_id> + </port> + <port> + <status>ACTIVE</status> + <name /> + <admin_state_up quantum:type="bool">True</admin_state_up> + <network_id>9d83c053-b0a4-4682-ae80-c00df269ce0a</network_id> + <tenant_id>625887121e364204873d362b553ab171</tenant_id> + <binding:vif_type>ovs</binding:vif_type> + <device_owner>network:router_interface</device_owner> + <binding:capabilities> + <port_filter quantum:type="bool">False</port_filter> + </binding:capabilities> + <mac_address>fa:16:3e:2d:dc:7e</mac_address> + <fixed_ip> + <fixed_ip> + <subnet_id>a318fcb4-9ff0-4485-b78c-9e6738c21b26</subnet_id> + <ip_address>10.0.0.1</ip_address> + </fixed_ip> + </fixed_ips> + <id>d7815f5b-a228-47bb-a5e5-f139c4e476f6</id> + <device_id>0dc517bf-9169-4aa6-88b7-569219962881</device_id> + </port> + <port> + <status>ACTIVE</status> + <name /> + <admin_state_up quantum:type="bool">True</admin_state_up> + <network_id>9d83c053-b0a4-4682-ae80-c00df269ce0a</network_id> + <tenant_id>625887121e364204873d362b553ab171</tenant_id> + <binding:vif_type>ovs</binding:vif_type> + <device_owner>network:dhcp</device_owner> + <binding:capabilities> + <port_filter quantum:type="bool">False</port_filter> + </binding:capabilities> + <mac_address>fa:16:3e:73:6d:1c</mac_address> + <fixed_ips> + <fixed_ip> + <subnet_id>a318fcb4-9ff0-4485-b78c-9e6738c21b26</subnet_id> + <ip_address>10.0.0.2</ip_address> + </fixed_ip> + </fixed_ips> + <id>f8639521-fab2-4879-94b2-83a47bee8a26</id> + <device_id>dhcpe1b8334f-9be9-5e49-aeee-b31e6df6c847-9d83c053-b0a4-4682-ae80-c00df269ce0a</device_id> + </port> +</ports> diff --git a/v2.0/samples/ports-post-create-bulk-req.json b/v2.0/samples/ports-post-create-bulk-req.json new file mode 100644 index 0000000..0be6798 --- /dev/null +++ b/v2.0/samples/ports-post-create-bulk-req.json @@ -0,0 +1,14 @@ +{ + "ports":[ + { + "name":"sample_port_1", + "admin_state_up":false, + "network_id":"a3775a7d-9f8b-4148-be81-c84bbd0837ce" + }, + { + "name":"sample_port_2", + "admin_state_up":false, + "network_id":"a3775a7d-9f8b-4148-be81-c84bbd0837ce" + } + ] +} \ No newline at end of file diff --git a/v2.0/samples/ports-post-create-bulk-req.xml b/v2.0/samples/ports-post-create-bulk-req.xml new file mode 100644 index 0000000..7b93e74 --- /dev/null +++ b/v2.0/samples/ports-post-create-bulk-req.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ports> + <port> + <name>test_port_1</name> + <network_id>a3775a7d-9f8b-4148-be81-c84bbd0837ce</network_id> + </port> + <port> + <name>test_port_2</name> + <network_id>a3775a7d-9f8b-4148-be81-c84bbd0837ce</network_id> + </port> +</ports> diff --git a/v2.0/samples/subnets-create-bulk-resp.json b/v2.0/samples/subnets-create-bulk-resp.json new file mode 100644 index 0000000..70086c8 --- /dev/null +++ b/v2.0/samples/subnets-create-bulk-resp.json @@ -0,0 +1,28 @@ +{ +"subnets": [ +{ +"name": "sample_subnet_1", +"enable_dhcp": true, +"network_id": "a3775a7d-9f8b-4148-be81-c84bbd0837ce", +"tenant_id": "60cd4f6dbc2f491982a284e7b83b5be3", +"dns_nameservers": [], +"allocation_pools":[{"start": "10.100.0.2", "end": "10.100.255.254"}], +"host_routes": [], +"ip_version": 4, +"gateway_ip": "10.100.0.1", +"cidr": "10.100.0.0/16", +"id": "70ffbaeb-4b43-4605-abe6-4c5bdbb8236b" +}, +{ +"name": "sample_subnet_2", +"enable_dhcp": true, +"network_id": "a3775a7d-9f8b-4148-be81-c84bbd0837ce", +"tenant_id": "60cd4f6dbc2f491982a284e7b83b5be3", +"dns_nameservers": [], +"allocation_pools": [{"start": "172.16.0.2", "end": "172.31.255.254"}], +"host_routes": [], +"ip_version": 4, +"gateway_ip": "172.16.0.1", +"cidr": "172.16.0.0/12", +"id": "d849e3fc-557d-4b27-8f1c-aceca1daa410"}] +} diff --git a/v2.0/samples/subnets-create-bulk-resp.xml b/v2.0/samples/subnets-create-bulk-resp.xml new file mode 100644 index 0000000..fec5e87 --- /dev/null +++ b/v2.0/samples/subnets-create-bulk-resp.xml @@ -0,0 +1,41 @@ +<?xml version='1.0' encoding='UTF-8'?> +<subnets xmlns="http://openstack.org/quantum/api/v2.0" + xmlns:quantum="http://openstack.org/quantum/api/v2.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <subnet> + <name>test_subnet_1</name> + <enable_dhcp quantum:type="bool">True</enable_dhcp> + <network_id>a3775a7d-9f8b-4148-be81-c84bbd0837ce</network_id> + <tenant_id>60cd4f6dbc2f491982a284e7b83b5be3</tenant_id> + <dns_nameservers quantum:type="list" /> + <allocation_pools> + <allocation_pool> + <start>10.0.0.2</start> + <end>10.255.255.254</end> + </allocation_pool> + </allocation_pools> + <host_routes quantum:type="list" /> + <ip_version quantum:type="int">4</ip_version> + <gateway_ip>10.0.0.1</gateway_ip> + <cidr>10.0.0.0/8</cidr> + <id>bd3fd365-fe19-431a-be63-07017a09316c</id> + </subnet> + <subnet> + <name>test_subnet_2</name> + <enable_dhcp quantum:type="bool">True</enable_dhcp> + <network_id>a3775a7d-9f8b-4148-be81-c84bbd0837ce</network_id> + <tenant_id>60cd4f6dbc2f491982a284e7b83b5be3</tenant_id> + <dns_nameservers quantum:type="list" /> + <allocation_pools> + <allocation_pool> + <start>192.168.0.2</start> + <end>192.168.255.254</end> + </allocation_pool> + </allocation_pools> + <host_routes quantum:type="list" /> + <ip_version quantum:type="int">4</ip_version> + <gateway_ip>192.168.0.1</gateway_ip> + <cidr>192.168.0.0/16</cidr> + <id>86e7c838-fb75-402b-9dbf-d68166e3f5fe</id> + </subnet> +</subnets> diff --git a/v2.0/samples/subnets-get-resp.json b/v2.0/samples/subnets-get-resp.json new file mode 100644 index 0000000..02afcea --- /dev/null +++ b/v2.0/samples/subnets-get-resp.json @@ -0,0 +1,40 @@ +{ + "subnets": [ + { + "allocation_pools": [ + { + "end": "10.0.3.254", + "start": "10.0.3.2" + } + ], + "cidr": "10.0.3.0/24", + "dns_nameservers": [], + "enable_dhcp": true, + "gateway_ip": "10.0.3.1", + "host_routes": [], + "id": "91e47a57-7508-46fe-afc9-fc454e8580e1", + "ip_version": 4, + "name": "", + "network_id": "1a6f6006-9e0b-4f99-984c-96787ae66363", + "tenant_id": "f667b69e4d6749749ef3bcba7251d9ce" + }, + { + "allocation_pools": [ + { + "end": "10.0.2.254", + "start": "10.0.2.2" + } + ], + "cidr": "10.0.2.0/24", + "dns_nameservers": [], + "enable_dhcp": true, + "gateway_ip": "10.0.2.1", + "host_routes": [], + "id": "e3c3620c-9d24-4470-b226-739da2f617c0", + "ip_version": 4, + "name": "", + "network_id": "1a6f6006-9e0b-4f99-984c-96787ae66363", + "tenant_id": "f667b69e4d6749749ef3bcba7251d9ce" + } + ] +} diff --git a/v2.0/samples/subnets-post-create-bulk-req.json b/v2.0/samples/subnets-post-create-bulk-req.json new file mode 100644 index 0000000..5b3165e --- /dev/null +++ b/v2.0/samples/subnets-post-create-bulk-req.json @@ -0,0 +1,14 @@ +{ +"subnets": [ +{"name": "sample_subnet_1", +"network_id": "a3775a7d-9f8b-4148-be81-c84bbd0837ce", +"cidr": "10.100.0.0/16", +"ip_version": 4 +}, +{ +"name": "sample_subnet_2", +"network_id": "a3775a7d-9f8b-4148-be81-c84bbd0837ce", +"cidr": "172.16.0.0/12", +"ip_version": 4 +}] +} diff --git a/v2.0/samples/subnets-post-create-bulk-req.xml b/v2.0/samples/subnets-post-create-bulk-req.xml new file mode 100644 index 0000000..fb754c0 --- /dev/null +++ b/v2.0/samples/subnets-post-create-bulk-req.xml @@ -0,0 +1,14 @@ +<subnets> + <subnet> + <name>test_subnet_1</name> + <network_id>a3775a7d-9f8b-4148-be81-c84bbd0837ce</network_id> + <cidr>10.0.0.0/8</cidr> + <ip_version>4</ip_version> + </subnet> + <subnet> + <name>test_subnet_2</name> + <network_id>a3775a7d-9f8b-4148-be81-c84bbd0837ce</network_id> + <cidr>192.168.0.0/16</cidr> + <ip_version>4</ip_version> + </subnet> +</subnets> diff --git a/v2.0/neutron-agent-ext.xml b/v2.0/section_neutron-agent-ext.xml similarity index 100% rename from v2.0/neutron-agent-ext.xml rename to v2.0/section_neutron-agent-ext.xml diff --git a/v2.0/neutron-allowed-address-pair-ext.xml b/v2.0/section_neutron-allowed-address-pair-ext.xml similarity index 76% rename from v2.0/neutron-allowed-address-pair-ext.xml rename to v2.0/section_neutron-allowed-address-pair-ext.xml index 9bacb77..d953039 100644 --- a/v2.0/neutron-allowed-address-pair-ext.xml +++ b/v2.0/section_neutron-allowed-address-pair-ext.xml @@ -35,17 +35,23 @@ </inlinemediaobject>'> <!ENTITY APIv2 'Networking API v2.0'> ]> -<section xml:id="allowed_address_pair_ext" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"> +<section xml:id="allowed_address_pair_ext" + xmlns="http://docbook.org/ns/docbook" + xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"> <title>The Allowed Address Pair Extension</title> - <para>The Allowed Address Pair extension extends the port attribute to - allow one to specify arbitrary mac_address/ip_address(cidr) pairs - that are allowed to pass through a port regardness of the subnet - associated with the network. </para> + <para>The Allowed Address Pair extension extends the port + attribute to allow one to specify arbitrary + mac_address/ip_address(cidr) pairs that are allowed to pass + through a port regardness of the subnet associated with the + network. </para> <?hard-pagebreak?> <section xml:id="allowed_address_pair_ext_ops"> - <title>Port API operations with allowed address pair extension</title> - <para>This section discusses operations for setting and retrieving the allowed address pair - extension attributes for port objects.</para> + <title>Port API operations with allowed address pair + extension</title> + <para>This section discusses operations for setting and + retrieving the allowed address pair extension attributes + for port objects.</para> <section xml:id="allowed_address_pair_ext_port_list"> <title>List Ports</title> <para> @@ -64,22 +70,25 @@ <tr> <td>&GET;</td> <td>/ports</td> - <td>Returns a list of ports with their allowed address pair - attributes.</td> + <td>Returns a list of ports with their + allowed address pair attributes.</td> </tr> </tbody> </informaltable> </para> <para>Normal Response Code: 200 OK</para> <para>Error Response Codes: 401 Unauthorized</para> - <para>This operation returns, for each port, its allowed address pair attributes as well as - all the attributes normally returned by the list port operation.</para> + <para>This operation returns, for each port, its allowed + address pair attributes as well as all the attributes + normally returned by the list port operation.</para> <example> - <title>List Ports with allowed address pair attributes: JSON Response</title> + <title>List Ports with allowed address pair + attributes: JSON Response</title> <programlisting language="json"><xi:include href="samples/ports-get-res-addr-pairs.json" parse="text"/></programlisting> </example> <example> - <title>List Ports with allowed address pair attributes: XML Response</title> + <title>List Ports with allowed address pair + attributes: XML Response</title> <programlisting language="json"><xi:include href="samples/ports-get-res-addr-pairs.xml" parse="text"/></programlisting> </example> </section> @@ -101,20 +110,24 @@ <tr> <td>&GET;</td> <td>/ports/<parameter>port_id</parameter></td> - <td>Returns details about a specific port, including allowed address - pair attributes.</td> + <td>Returns details about a specific port, + including allowed address pair + attributes.</td> </tr> </tbody> </informaltable> </para> <para>Normal Response Code: 200 OK</para> - <para>Error Response Code: 401 Unauthorized, 404 Not Found</para> + <para>Error Response Code: 401 Unauthorized, 404 Not + Found</para> <example> - <title>Show port with allowed address pair atributes: JSON Response</title> + <title>Show port with allowed address pair attributes: + JSON Response</title> <programlisting language="json"><xi:include href="samples/ports-show-addr-pair.json" parse="text"/></programlisting> </example> <example> - <title>Show port with allowed address pair attributes: XML Response</title> + <title>Show port with allowed address pair attributes: + XML Response</title> <programlisting language="json"><xi:include href="samples/ports-show-addr-pair.xml" parse="text"/></programlisting> </example> </section> @@ -136,17 +149,24 @@ <tr> <td>&POST;</td> <td>/ports</td> - <td>Creates a new port and explicitly specify the allowed address pair attributes.</td> + <td>Creates a new port and explicitly + specify the allowed address pair + attributes.</td> </tr> </tbody> </informaltable> </para> <para>Normal Response Code: 200 OK</para> - <para>Error Response Code: 400 Bad Request, 401 Unauthorized, 403 Forbidden</para> - <para>Bad request is returned if an allowed address pair matches the mac_address and ip_address on port.</para> - <para>Note: If the mac_address field is left out of the body of the request the mac_address assigned to the port will be used.</para> + <para>Error Response Code: 400 Bad Request, 401 + Unauthorized, 403 Forbidden</para> + <para>Bad request is returned if an allowed address pair + matches the mac_address and ip_address on port.</para> + <para>Note: If the mac_address field is left out of the + body of the request the mac_address assigned to the + port will be used.</para> <example> - <title>Create Port with allowed address pair attributes: JSON Request</title> + <title>Create Port with allowed address pair + attributes: JSON Request</title> <programlisting language="json"><xi:include href="samples/ports-post-req-addr-pairs.json" parse="text"/></programlisting> </example> </section> @@ -168,16 +188,18 @@ <tr> <td>&PUT;</td> <td>/ports/<parameter>port_id</parameter></td> - <td>Updates a port, with new allowed address pair values.</td> + <td>Updates a port, with new allowed + address pair values.</td> </tr> </tbody> </informaltable> </para> <para>Normal Response Code: 200 OK</para> - <para>Error Response Code: 400 Bad Request, 401 Unauthorized, 404 Not Found, 403 - Forbidden</para> + <para>Error Response Code: 400 Bad Request, 401 + Unauthorized, 404 Not Found, 403 Forbidden</para> <example> - <title>Update allowed address pair attributes for a port: JSON Request</title> + <title>Update allowed address pair attributes for a + port: JSON Request</title> <programlisting language="json"><xi:include href="samples/ports-put-req-addr-pair.json" parse="text"/></programlisting> </example> </section> diff --git a/v2.0/section_neutron-extgwmodes-ext.xml b/v2.0/section_neutron-extgwmodes-ext.xml new file mode 100644 index 0000000..cc2f7b3 --- /dev/null +++ b/v2.0/section_neutron-extgwmodes-ext.xml @@ -0,0 +1,235 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE section[ +<!-- Some useful entities borrowed from HTML --> +<!ENTITY ndash "–"> +<!ENTITY mdash "—"> +<!ENTITY hellip "…"> +<!ENTITY plusmn "±"> + +<!-- Useful for describing APIs --> +<!ENTITY GET '<command xmlns="http://docbook.org/ns/docbook">GET</command>'> +<!ENTITY PUT '<command xmlns="http://docbook.org/ns/docbook">PUT</command>'> +<!ENTITY POST '<command xmlns="http://docbook.org/ns/docbook">POST</command>'> +<!ENTITY DELETE '<command xmlns="http://docbook.org/ns/docbook">DELETE</command>'> + +<!ENTITY CHECK '<inlinemediaobject xmlns="http://docbook.org/ns/docbook"> + <imageobject> + <imagedata fileref="figures/Check_mark_23x20_02.svg" + format="SVG" scale="60"/> +</imageobject> + </inlinemediaobject>'> + +<!ENTITY ARROW '<inlinemediaobject xmlns="http://docbook.org/ns/docbook"> + <imageobject> + <imagedata fileref="figures/Arrow_east.svg" + format="SVG" scale="60"/> +</imageobject> + </inlinemediaobject>'> +]> +<section xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:m="http://www.w3.org/1998/Math/MathML" + xmlns:html="http://www.w3.org/1999/xhtml" + xmlns:db="http://docbook.org/ns/docbook" version="5.0" + status="final" xml:id="extgwmodes-ext"> + <title>Configurable external gateway modes extension</title> + <para>By default, when a gateway is attached to a router using the + Neutron L3 extension, Network Address Translation (NAT) is + enabled for traffic generated by subnets attached to the + router. With this extension, the user will have the option of + choosing whether SNAT should be enabled or not on a router + basis.</para> + <para>This is achieved simply by specifying a boolean attribute, + <literal>enable_snat</literal>, in the + <literal>external_gateway_info</literal> attribute of the + <literal>router</literal> resource. </para> + <para>This extension redefines the external_gateway_info attribute + as depicted in the following table. </para> + <table rules="all"> + <caption>external_gateway_info attributes</caption> + <col width="20%"/> + <col width="8%"/> + <col width="10%"/> + <col width="15%"/> + <col width="15%"/> + <col width="32%"/> + <thead> + <tr> + <th>Attribute </th> + <th>Type </th> + <th>Required </th> + <th>Default Value </th> + <th>Validation Constraints </th> + <th>Notes</th> + </tr> + </thead> + <tbody> + <tr> + <td>network_id</td> + <td>UUID</td> + <td>Yes</td> + <td>N/A</td> + <td>Must be a valid uuid representative of an external + network.</td> + <td/> + </tr> + <tr> + <td>enable_snat</td> + <td>Boolean</td> + <td>No</td> + <td>True</td> + <td>{True|False}</td> + <td>The default setting is <literal>True</literal> to + ensure backward compatibility for plugins + supporting this extension.</td> + </tr> + </tbody> + </table> + <para>SNAT can be enabled or disabled at any time on a Neutron + router regardless of the current status of floating IPs. + Floating IPs will continue working even when SNAT is + disabled.</para> + <section xml:id="list_routers_extgwmodes"> + <title>List Routers</title> + <para> + <informaltable rules="all" width="100%"> + <col width="20%"/> + <col width="20%"/> + <col width="60%"/> + <thead> + <tr> + <td>Verb</td> + <td>URI</td> + <td>Description</td> + </tr> + </thead> + <tbody> + <tr> + <td>&GET;</td> + <td>/routers</td> + <td>Retrieve Neutron routers</td> + </tr> + </tbody> + </informaltable> + </para> + <simpara>Success and error response codes are not changed with + regards to the operation as introduced by the L3 API + extension.</simpara> + <simpara>When this extension is enabled, this operation will + also return the current Source NAT status for configured + routers, as shown in the sample below.</simpara> + <simpara>The response for the <emphasis>show router</emphasis> + operation is the same, with the obvious exception that a + single router is returned.</simpara> + <example> + <title>Router list with configurable external gateway + modes enabled</title> + <programlisting language="json"><xi:include href="samples/routers-get-enablesnat-res.json" parse="text"/></programlisting> + </example> + </section> + <section xml:id="create_router_extgwmodes"> + <title>Create Router with external gateway</title> + <para> + <informaltable rules="all" width="100%"> + <col width="20%"/> + <col width="20%"/> + <col width="60%"/> + <thead> + <tr> + <td>Verb</td> + <td>URI</td> + <td>Description</td> + </tr> + </thead> + <tbody> + <tr> + <td>&POST;</td> + <td>/routers</td> + <td>Create a new Neutron router</td> + </tr> + </tbody> + </informaltable> + </para> + <para>Success and error response codes are not changed with + regards to the operation as introduced by the L3 API + extension.</para> + <para>Neutron API users can specify whether SNAT should be + performed on the network specified as the router's + external gateway by setting <literal>enable_snat</literal> + in <literal>external_gateway_info</literal> to either + <literal>True</literal> or <literal>False</literal>; + the default value is <literal>True</literal>.</para> + <example> + <title>Create router with SNAT disabled</title> + <programlisting><xi:include href="samples/router-create-enablesnat.sample" parse="text"/></programlisting> + </example> + </section> + <section xml:id="update_router_extgwmodes"> + <title>Update Router's external gateway info</title> + <para> + <informaltable rules="all" width="100%"> + <col width="20%"/> + <col width="20%"/> + <col width="60%"/> + <thead> + <tr> + <td>Verb</td> + <td>URI</td> + <td>Description</td> + </tr> + </thead> + <tbody> + <tr> + <td>&PUT;</td> + <td>/routers/<literal>router_id</literal></td> + <td>Create a new Neutron router</td> + </tr> + </tbody> + </informaltable> + </para> + <para>Success and error response codes are not changed with + regards to the operation as introduced by the L3 API + extension.</para> + <para>Neutron API users can enable or disable SNAT on a router + specifying the <literal>enable_snat</literal> attribute in + the <literal>external_gateway_info</literal> attribute for + the router resource. This operation can be either used for + updating the SNAT status only, the external network, or + both attributes at the same time. In any case, if the + <literal>enable_snat</literal> attribute is not + specified, it will default to <literal>True</literal>. For + instance, if the current SNAT status is disabled, and the + router's gateway is updated to a different external + network without specifying <literal>enable_snat</literal>, + SNAT will be enabled for the new network.</para> + <para>It is important to note that whenever updating a + router's external gateway information, the + <literal>network_id </literal>parameter must be + specified always, even if the final goal is just to enable + or disable SNAT for the router on the same external + network.</para> + <para>The rest of this section provides some samples for + updating a router's external gateway info with SNAT + mode.</para> + <para> + <example> + <title>Disable SNAT for the current external + network</title> + <programlisting><xi:include href="samples/router-update-enablesnat-1.sample" parse="text"/></programlisting> + </example> + <example> + <title>Change external network and enable SNAT</title> + <programlisting><xi:include href="samples/router-update-enablesnat-2.sample" parse="text"/></programlisting> + </example> + <example> + <title>Change external network and keep SNAT + disabled</title> + <programlisting><xi:include href="samples/router-update-enablesnat-3.sample" parse="text"/></programlisting> + </example> + </para> + </section> + <?hard-pagebreak?> + +</section> diff --git a/v2.0/neutron-extra-dhcp-opt-ext.xml b/v2.0/section_neutron-extra-dhcp-opt-ext.xml similarity index 100% rename from v2.0/neutron-extra-dhcp-opt-ext.xml rename to v2.0/section_neutron-extra-dhcp-opt-ext.xml diff --git a/v2.0/neutron-extraroute-ext.xml b/v2.0/section_neutron-extraroute-ext.xml similarity index 100% rename from v2.0/neutron-extraroute-ext.xml rename to v2.0/section_neutron-extraroute-ext.xml diff --git a/v2.0/neutron-firewall-ext.xml b/v2.0/section_neutron-firewall-ext.xml similarity index 100% rename from v2.0/neutron-firewall-ext.xml rename to v2.0/section_neutron-firewall-ext.xml diff --git a/v2.0/neutron-l3-ext.xml b/v2.0/section_neutron-l3-ext.xml similarity index 100% rename from v2.0/neutron-l3-ext.xml rename to v2.0/section_neutron-l3-ext.xml diff --git a/v2.0/neutron-loadbalancer-ext.xml b/v2.0/section_neutron-loadbalancer-ext.xml similarity index 100% rename from v2.0/neutron-loadbalancer-ext.xml rename to v2.0/section_neutron-loadbalancer-ext.xml diff --git a/v2.0/neutron-provider-ext.xml b/v2.0/section_neutron-provider-ext.xml similarity index 51% rename from v2.0/neutron-provider-ext.xml rename to v2.0/section_neutron-provider-ext.xml index 2ec66bd..502ee03 100644 --- a/v2.0/neutron-provider-ext.xml +++ b/v2.0/section_neutron-provider-ext.xml @@ -35,67 +35,98 @@ </inlinemediaobject>'> <!ENTITY APIv2 'Networking API v2.0'> ]> -<section xml:id="provider_ext" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"> +<section xml:id="provider_ext" xmlns="http://docbook.org/ns/docbook" + xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"> <title>The Provider Networks Extension - (<literal>provider</literal>)</title> - <para>The provider networks extension allows OpenStack Networking API users with the appropriate rights, to - specify how an OpenStack Networking network object is mapped to the underlying networking infrastructure. - It also allows users with the appropriate rights to view such attributes when networks are - queried.</para> - <para>To this aim, it extends the <emphasis role="bold">network</emphasis> resource by defining - a set of attributes prependend by the <emphasis role="italic">provider</emphasis> prefix, - which specify these attributes. </para> + (<literal>provider</literal>)</title> + <para>The provider networks extension allows OpenStack Networking + API users with the appropriate rights, to specify how an + OpenStack Networking network object is mapped to the + underlying networking infrastructure. It also allows users + with the appropriate rights to view such attributes when + networks are queried.</para> + <para>To this aim, it extends the <emphasis role="bold" + >network</emphasis> resource by defining a set of + attributes prefixed with the <emphasis role="italic" + >provider</emphasis> prefix, which specify these + attributes.</para> <?hard-pagebreak?> <section xml:id="provider_ext_concepts"> <title>Concepts</title> - <para>The provider networks extension is an attribute extension which adds the following set - of attributes to the <emphasis role="bold">network</emphasis> resource:</para> + <para>The provider networks extension is an attribute + extension which adds the following set of attributes to + the <emphasis role="bold">network</emphasis> + resource:</para> <para> <itemizedlist> <listitem> - <para><emphasis role="italic"> provider:network_type</emphasis> - Specifies the - nature of the physical network mapped to this network resource. Examples are - <literal>flat</literal>, <literal>vlan</literal>, or + <para><emphasis role="italic"> + provider:network_type</emphasis> - + Specifies the nature of the physical network + mapped to this network resource. Examples are + <literal>flat</literal>, + <literal>vlan</literal>, or <literal>gre</literal>.</para> </listitem> <listitem> - <para><emphasis role="italic"> provider:physical_network</emphasis> - Identifies - the physical network on top of which this network object is being - implemented. The OpenStack Networking API does not expose any facility for retrieving the - list of available physical networks. As an example, in the Open vSwitch - plug-in this is a symbolic name which is then mapped to specific bridges on - each compute host through the Open vSwitch plug-in configuration file.</para> + <para><emphasis role="italic"> + provider:physical_network</emphasis> - + Identifies the physical network on top of + which this network object is being + implemented. The OpenStack Networking API does + not expose any facility for retrieving the + list of available physical networks. As an + example, in the Open vSwitch plug-in this is a + symbolic name which is then mapped to specific + bridges on each compute host through the Open + vSwitch plug-in configuration file.</para> </listitem> <listitem> - <para><emphasis role="italic"> provider:segmentation_id</emphasis> - Identifies - an isolated segment on the physical network; the nature of the segment - depends on the segmentation model defined by - <literal>network_type</literal>. For instance, if - <literal>network_type</literal> is <literal>vlan</literal>, then this is - a <literal>vlan</literal> identifier; otherwise, if - <literal>network_type</literal> is <literal>gre</literal>, then this - will be a <literal>gre</literal> key. </para> + <para><emphasis role="italic"> + provider:segmentation_id</emphasis> - + Identifies an isolated segment on the physical + network; the nature of the segment depends on + the segmentation model defined by + <literal>network_type</literal>. For + instance, if <literal>network_type</literal> + is <literal>vlan</literal>, then this is a + <literal>vlan</literal> identifier; + otherwise, if <literal>network_type</literal> + is <literal>gre</literal>, then this will be a + <literal>gre</literal> key.</para> </listitem> </itemizedlist> </para> - <para>The actual semantics of these attributes depend on the technology back end of the - particular plug-in. See the plug-in documentation and the - <citetitle>OpenStack Cloud Administrator Guide</citetitle> to understand which values should be specific for - each of these attributes when OpenStack Networking is deployed with a particular plug-in. The examples - shown in this chapter refer to the Open vSwitch plug-in.</para> - <para>It is also worth noting that the default policy settings allow only users with - administrative rights to specify these parameters in requests, and to see their values - in responses. By default, the provider network extension attributes are completely - hidden from regular tenants. As a rule of thumb, if these attributes are not visible in - a <emphasis role="italic">GET /networks/<network-id></emphasis> operation, this - implies the user submitting the request is not authorized to view or manipulate provider - network attributes.</para> + <para>The actual semantics of these attributes depend on the + technology back end of the particular plug-in. See the + plug-in documentation and the <citetitle>OpenStack Cloud + Administrator Guide</citetitle> to understand which + values should be specific for each of these attributes + when OpenStack Networking is deployed with a particular + plug-in. The examples shown in this chapter refer to the + Open vSwitch plug-in.</para> + <para>It is also worth noting that the default policy settings + allow only users with administrative rights to specify + these parameters in requests, and to see their values in + responses. By default, the provider network extension + attributes are completely hidden from regular tenants. As + a rule of thumb, if these attributes are not visible in a + <emphasis role="italic">GET + /networks/<network-id></emphasis> operation, this + implies the user submitting the request is not authorized + to view or manipulate provider network attributes.</para> </section> <?hard-pagebreak?> <section xml:id="provider_ext_ops"> - <title>Network API operations with provider network extension</title> - <para>This section discusses operations for setting and retrieving the provider networks - extension attributes for network objects.</para> + <title>Network API operations with provider network + extension</title> + <para>This section discusses operations for setting and + retrieving the provider networks extension attributes for + network objects.</para> + <!-- <wadl:resources + href="http://git.openstack.org/cgit/openstack/api-site/plain/api-ref/src/wadls/netconn-api/src/os-networks-provider-ext.wadl" + xmlns:wadl="http://wadl.dev.java.net/2009/02"/> --> <section xml:id="provider_network_list"> <title>List Networks</title> <para> @@ -114,24 +145,28 @@ <tr> <td>&GET;</td> <td>/networks</td> - <td>Returns a list of networks with their provider networks - attributes.</td> + <td>Returns a list of networks with their + provider networks attributes.</td> </tr> </tbody> </informaltable> </para> <para>Normal Response Code: 200 OK</para> <para>Error Response Codes: 401 Unauthorized</para> - <para>This operation returns, for each network, its provider network attributes as well as - all the attributes normally returned by the list networks operation. Please note - that provider networks attribute are returned only if the user is authorized to view - them.</para> + <para>This operation returns, for each network, its + provider network attributes as well as all the + attributes normally returned by the list networks + operation. Provider networks + attribute are returned only if the user is authorized + to view them.</para> <example> - <title>List Networks with provider attributes: JSON Response</title> + <title>List Networks with provider attributes: JSON + Response</title> <programlisting language="json"><xi:include href="samples/networks-get-res-prov.json" parse="text"/></programlisting> </example> <example> - <title>List Networks with provider attributes: XML Response</title> + <title>List Networks with provider attributes: XML + Response</title> <programlisting language="json"><xi:include href="samples/networks-get-res-prov.xml" parse="text"/></programlisting> </example> </section> @@ -153,24 +188,31 @@ <tr> <td>&GET;</td> <td>/networks/<parameter>network_id</parameter></td> - <td>Returns details about a specific network, including provider - networks attributes.</td> + <td>Returns details about a specific + network, including provider networks + attributes.</td> </tr> </tbody> </informaltable> </para> <para>Normal Response Code: 200 OK</para> - <para>Error Response Code: 401 Unauthorized, 404 Not Found</para> - <para>When the provider networks extension is enabled, and the user submitting the - request is authorized to see provider networks mapping, this operation returns, for - the network specified in the request URI, its provider network attributes, as well as - all the attributes normally retuned by the show networks operation.</para> + <para>Error Response Code: 401 Unauthorized, 404 Not + Found</para> + <para>When the provider networks extension is enabled, and + the user submitting the request is authorized to see + provider networks mapping, this operation returns, for + the network specified in the request URI, its provider + network attributes, as well as all the attributes + normally retuned by the show networks + operation.</para> <example> - <title>Show network with provider attributes: JSON Response</title> + <title>Show network with provider attributes: JSON + Response</title> <programlisting language="json"><xi:include href="samples/networks-show-res-prov.json" parse="text"/></programlisting> </example> <example> - <title>Show network with provider attributes: XML Response</title> + <title>Show network with provider attributes: XML + Response</title> <programlisting language="json"><xi:include href="samples/networks-show-res-prov.xml" parse="text"/></programlisting> </example> </section> @@ -192,77 +234,93 @@ <tr> <td>&POST;</td> <td>/networks</td> - <td>Creates a new network and explicitly specify attributes with the - underlying infrastructure using the provider network extension - attributes.</td> + <td>Creates a new network and explicitly + specify attributes with the underlying + infrastructure using the provider + network extension attributes.</td> </tr> </tbody> </informaltable> </para> <para>Normal Response Code: 200 OK</para> - <para>Error Response Code: 400 Bad Request, 401 Unauthorized, 403 Forbidden</para> - <para>When the provider networks extension is enabled, and the user submitting the - request is authorized to set provider networks mapping, this operation allows for - specifying how a new network should be mapped on the underlying network - infrastructure.</para> - <para>If the user submitting the request is not allowed to set provider networks - attributes, a 403 Forbidden response will be returned.</para> - <para>As stated earlier in this chapter, the semantics of the various provider networks - attribute vary with the particular plug-in employed. The following example shows how - to create a network mapped to a specific vlan tag (the example refers to an OpenStack Networking - deployment which uses the Open vSwitch plug-in).</para> + <para>Error Response Code: 400 Bad Request, 401 + Unauthorized, 403 Forbidden</para> + <para>When the provider networks extension is enabled, and + the user submitting the request is authorized to set + provider networks mapping, this operation allows for + specifying how a new network should be mapped on the + underlying network infrastructure.</para> + <para>If the user submitting the request is not allowed to + set provider networks attributes, a 403 Forbidden + response will be returned.</para> + <para>As stated earlier in this chapter, the semantics of + the various provider networks attribute vary with the + particular plug-in employed. The following example + shows how to create a network mapped to a specific + vlan tag (the example refers to an OpenStack + Networking deployment which uses the Open vSwitch + plug-in).</para> <example> - <title>Create Network with provider attributes: JSON Request</title> + <title>Create Network with provider attributes: JSON + Request</title> <programlisting language="json"><xi:include href="samples/networks-post-req-prov.json" parse="text"/></programlisting> </example> <example> - <title>Create Network with provider attributes: XML Request</title> + <title>Create Network with provider attributes: XML + Request</title> <programlisting language="json"><xi:include href="samples/networks-post-req-prov.xml" parse="text"/></programlisting> </example> </section> <section xml:id="provider_network_update"> <title>Update Network</title> - <para> - <informaltable rules="all" width="100%"> - <col width="10%"/> - <col width="30%"/> - <col width="60%"/> - <thead> - <tr> - <td>Verb</td> - <td>URI</td> - <td>Description</td> - </tr> - </thead> - <tbody> - <tr> - <td>&PUT;</td> - <td>/networks/<parameter>network_id</parameter></td> - <td>Updates a network, including its mapping with the underlying - infrastructure using the provider network extension attributes.</td> - </tr> - </tbody> - </informaltable> - </para> + <informaltable rules="all" width="100%"> + <col width="10%"/> + <col width="30%"/> + <col width="60%"/> + <thead> + <tr> + <td>Verb</td> + <td>URI</td> + <td>Description</td> + </tr> + </thead> + <tbody> + <tr> + <td>&PUT;</td> + <td>/networks/<parameter>network_id</parameter></td> + <td>Updates a network, including its mapping + with the underlying infrastructure using + the provider network extension + attributes.</td> + </tr> + </tbody> + </informaltable> <para>Normal Response Code: 200 OK</para> - <para>Error Response Code: 400 Bad Request, 401 Unauthorized, 404 Not Found, 403 - Forbidden</para> - <para>When the provider networks extension is enabled, and the user submitting the - request is authorized to see provider networks mapping, this operation allows for - specifying how an existing network should be mapped on the underlying network - infrastructure. </para> - <para>If the user submitting the request is not allowed to set provider networks - attributes, a 403 Forbidden response will be returned.</para> - <para>As stated earlier in this chapter, the semantics of the various provider networks - attribute vary with the particular plug-in employed. The following example shows how - to update a network in order to map it to a flat network (such as, no vlan tag); the - example refers to an OpenStack Networking deployment that uses the Open vSwitch plug-in.</para> + <para>Error Response Code: 400 Bad Request, 401 + Unauthorized, 404 Not Found, 403 Forbidden</para> + <para>When the provider networks extension is enabled, and + the user submitting the request is authorized to see + provider networks mapping, this operation allows for + specifying how an existing network should be mapped on + the underlying network infrastructure.</para> + <para>If the user submitting the request is not allowed to + set provider networks attributes, a 403 Forbidden + response will be returned.</para> + <para>As stated earlier in this chapter, the semantics of + the various provider networks attribute vary with the + particular plug-in employed. The following example + shows how to update a network in order to map it to a + flat network (such as, no vlan tag); the example + refers to an OpenStack Networking deployment that uses + the Open vSwitch plug-in.</para> <example> - <title>Update provider attributes for a network: JSON Request</title> + <title>Update provider attributes for a network: JSON + Request</title> <programlisting language="json"><xi:include href="samples/networks-put-req-prov.json" parse="text"/></programlisting> </example> <example> - <title>Update provider attributes for a network: XML Request</title> + <title>Update provider attributes for a network: XML + Request</title> <programlisting language="json"><xi:include href="samples/networks-put-req-prov.xml" parse="text"/></programlisting> </example> </section> diff --git a/v2.0/section_neutron-quotas-ext.xml b/v2.0/section_neutron-quotas-ext.xml new file mode 100644 index 0000000..0393698 --- /dev/null +++ b/v2.0/section_neutron-quotas-ext.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE section [ +<!-- Some useful entities borrowed from HTML --> +<!ENTITY ndash "–"> +<!ENTITY mdash "—"> +<!ENTITY hellip "…"> +<!ENTITY plusmn "±"> + +<!-- Useful for describing APIs --> +<!ENTITY GET '<command xmlns="http://docbook.org/ns/docbook">GET</command>'> +<!ENTITY PUT '<command xmlns="http://docbook.org/ns/docbook">PUT</command>'> +<!ENTITY POST '<command xmlns="http://docbook.org/ns/docbook">POST</command>'> +<!ENTITY DELETE '<command xmlns="http://docbook.org/ns/docbook">DELETE</command>'> + +<!ENTITY CHECK '<inlinemediaobject xmlns="http://docbook.org/ns/docbook"> + <imageobject> + <imagedata fileref="figures/Check_mark_23x20_02.svg" + format="SVG" scale="60"/> +</imageobject> + </inlinemediaobject>'> +<!ENTITY ARROW '<inlinemediaobject xmlns="http://docbook.org/ns/docbook"> + <imageobject> + <imagedata fileref="figures/Arrow_east.svg" + format="SVG" scale="60"/> +</imageobject> + </inlinemediaobject>'> + <!ENTITY APIv2 'Networking API v2.0'> +]> +<section xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:m="http://www.w3.org/1998/Math/MathML" + xmlns:html="http://www.w3.org/1999/xhtml" + xmlns:db="http://docbook.org/ns/docbook" version="5.0" + status="final" xml:id="quotas_ext"> + <title>Quotas</title> + <para>The <filename>neutron.conf</filename> configuration file + defines default quota values that are applied to all tenants. + This extension enables an administrative user to define quotas + values on a per-tenant basis. For example, an administrative + user can permit tenant A to create at most X networks and + tenant B to create at most Y networks.</para> + <wadl:resources + href="http://git.openstack.org/cgit/openstack/api-site/plain/api-ref/src/wadls/netconn-api/src/os-quotas.wadl" + xmlns:wadl="http://wadl.dev.java.net/2009/02"/> +</section> diff --git a/v2.0/neutron-scheduler-ext.xml b/v2.0/section_neutron-scheduler-ext.xml similarity index 100% rename from v2.0/neutron-scheduler-ext.xml rename to v2.0/section_neutron-scheduler-ext.xml diff --git a/v2.0/neutron-security-groups-ext.xml b/v2.0/section_neutron-security-groups-ext.xml similarity index 92% rename from v2.0/neutron-security-groups-ext.xml rename to v2.0/section_neutron-security-groups-ext.xml index 9b1a606..2f726fc 100644 --- a/v2.0/neutron-security-groups-ext.xml +++ b/v2.0/section_neutron-security-groups-ext.xml @@ -40,5 +40,5 @@ <title>Security Groups and Rules</title> <para>Creates, modifies, and deletes OpenStack Networking security groups and rules. </para> - <wadl:resources href="wadl/security-groups.wadl"/> + <wadl:resources href="http://git.openstack.org/cgit/openstack/api-site/plain/api-ref/src/wadls/netconn-api/src/security-groups.wadl"/> </section> diff --git a/v2.0/neutron-vpn-ext.xml b/v2.0/section_neutron-vpn-ext.xml similarity index 100% rename from v2.0/neutron-vpn-ext.xml rename to v2.0/section_neutron-vpn-ext.xml diff --git a/v2.0/section_neutron_binding_ext_ports.xml b/v2.0/section_neutron_binding_ext_ports.xml new file mode 100644 index 0000000..ea48cb0 --- /dev/null +++ b/v2.0/section_neutron_binding_ext_ports.xml @@ -0,0 +1,469 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE book[ + <!-- Some useful entities borrowed from HTML --> + <!ENTITY ndash "–"> + <!ENTITY mdash "—"> + <!ENTITY hellip "…"> + <!ENTITY plusmn "±"> + + <!-- Useful for describing APIs --> + <!ENTITY GET '<command xmlns="http://docbook.org/ns/docbook">GET</command>'> + <!ENTITY PUT '<command xmlns="http://docbook.org/ns/docbook">PUT</command>'> + <!ENTITY POST '<command xmlns="http://docbook.org/ns/docbook">POST</command>'> + <!ENTITY DELETE '<command xmlns="http://docbook.org/ns/docbook">DELETE</command>'> + + <!ENTITY CHECK '<inlinemediaobject xmlns="http://docbook.org/ns/docbook"> + <imageobject role="fo"> + <imagedata fileref="figures/Check_mark_23x20_02.svg" + format="SVG" scale="60"/> + </imageobject> + <imageobject role="html"> + <imagedata fileref="../figures/Check_mark_23x20_02.png" + format="PNG" /> + </imageobject> + </inlinemediaobject>'> + + <!ENTITY ARROW '<inlinemediaobject xmlns="http://docbook.org/ns/docbook"> + <imageobject role="fo"> + <imagedata fileref="figures/Arrow_east.svg" + format="SVG" scale="60"/> + </imageobject> + <imageobject role="html"> + <imagedata fileref="../figures/Arrow_east.png" + format="PNG" /> + </imageobject> + </inlinemediaobject>'> + <!ENTITY APIv2 'Networking API v2.0'> +]> +<section xml:id="binding_ext_ports" + xmlns="http://docbook.org/ns/docbook" + xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"> + <title>The <literal>binding</literal> Extended Attributes for + Ports</title> + <para>Use the &APIv2; with the <parameter>binding</parameter> + extended attributes to get information about, create, and + update port objects.</para> + <para>The <parameter>binding</parameter>-prefixed extended + attributes for ports are:</para> + <table rules="all" width="95%"> + <caption><parameter>binding</parameter> Extended Attributes + for Ports</caption> + <col width="30%"/> + <col width="10%"/> + <col width="10%"/> + <col width="10%"/> + <col width="10%"/> + <col width="10%"/> + <col width="20%"/> + <thead> + <tr> + <th>Attribute </th> + <th>Type </th> + <th>Required </th> + <th>CRUD<footnote xml:id="crud_network"> + <para><itemizedlist> + <listitem> + <para><emphasis role="bold" + >C</emphasis>. Use the attribute in + create operations.</para> + </listitem> + <listitem> + <para><emphasis role="bold" + >R</emphasis>. This attribute is + returned in response to show and + list operations.</para> + </listitem> + <listitem> + <para><emphasis role="bold" + >U</emphasis>. You can update the + value of this attribute.</para> + </listitem> + <listitem> + <para><emphasis role="bold" + >D</emphasis>. You can delete the + value of this attribute.</para> + </listitem> + </itemizedlist></para> + </footnote></th> + <th>Default Value</th> + <th>Validation Constraints</th> + <th>Notes</th> + </tr> + </thead> + <tbody> + <tr> + <td><para><parameter>binding:vif_type</parameter></para></td> + <td><para>String</para></td> + <td><para>N/A</para></td> + <td><para>R</para></td> + <td><para>None</para></td> + <td><para>N/A</para></td> + <td><para>Read-only. The vif type for the specified + port.</para> + </td> + </tr> + <tr> + <td> + <para><parameter>binding:host_id</parameter></para></td> + <td><para>uuid-str</para></td> + <td><para>N/A</para></td> + <td><para>CRU</para></td> + <td><para>None</para></td> + <td><para>N/A</para></td> + <td><para>The ID of the host where the port is + allocated. In some cases different + implementations can run on different + hosts.</para> + </td> + </tr> + <tr> + <td> + <para><parameter>binding:profile</parameter></para></td> + <td>list(dict)</td> + <td>N/A</td> + <td>CRU</td> + <td>None</td> + <td>N/A</td> + <td><para>A dictionary that enables the application + running on the specified host to pass and + receive vif port-specific information to the + plug-in.</para> + </td> + </tr> + <tr> + <td> + <para><parameter>binding:capabilities</parameter></para></td> + <td>list(dict)</td> + + <td>N/A</td> + <td>R</td> + <td>None</td> + <td>N/A</td> + <td><para>Read-only. A dictionary that enables the + application to pass information about + functions that &APIv2; provides. Specify the + following value: port_filter : Boolean to + define whether &APIv2; provides port filtering + features such as security group and + anti-MAC/IP spoofing.</para></td> + </tr> + </tbody> + </table> + <!-- <wadl:resources + href="http://git.openstack.org/cgit/openstack/api-site/plain/api-ref/src/wadls/netconn-api/src/os-ports-binding-ext.wadl" + xmlns:wadl="http://wadl.dev.java.net/2009/02"/>--> + <section xml:id="List_Ports_binding"> + <title>List Ports</title> + <informaltable rules="all" width="100%"> + <col width="20%"/> + <col width="20%"/> + <col width="60%"/> + <thead> + <tr> + <td>Verb</td> + <td>URI</td> + <td>Description</td> + </tr> + </thead> + <tbody> + <tr> + <td>&GET;</td> + <td>/ports</td> + <td>Lists ports to which the tenant has access. + The <parameter>binding</parameter> extended + attributes are visible to only administrative + users.</td> + </tr> + </tbody> + </informaltable> + <simpara>Normal Response Code: <returnvalue>200</returnvalue> + </simpara> + <simpara>Error Response Codes: Unauthorized + (<errorcode>401</errorcode>)</simpara> + <para>This operation lists ports to which the tenant has + access.</para> + <para>This operation does not require a request body.</para> + <para>This operation returns a response body.</para> + <para>In addition to any other fields returned in the list + port response, the following + <parameter>binding</parameter>-prefixed fields are + visible to administrative users:</para> + <informaltable rules="all"> + <thead> + <tr> + <th>Field</th> + <th>Description</th> + </tr> + </thead> + <tbody> + <tr> + <td><para><parameter>binding:vif_type</parameter></para></td> + + <td><para>Read-only. The vif type for the + specified port.</para> + </td> + </tr> + <tr> + <td> + <para><parameter>binding:host_id</parameter></para></td> + <td><para>The ID of the host where the port is + allocated. In some cases different + implementations can run on different + hosts.</para> + </td> + </tr> + <tr> + <td> + <para><parameter>binding:profile</parameter></para></td> + <td><para>A dictionary that enables the + application running on the specified host + to pass and receive vif port-specific + information to the plug-in.</para> + </td> + </tr> + <tr> + <td> + <para><parameter>binding:capabilities</parameter></para></td> + <td><para>Read-only. A dictionary that enables the + application to pass information about + functions that &APIv2; provides. Specify + the following value: port_filter : Boolean + to define whether &APIv2; provides port + filtering features such as security group + and anti-MAC/IP spoofing.</para> + </td> + </tr> + </tbody> + </informaltable> + </section> + <?hard-pagebreak?> + <section xml:id="Show_port_binding"> + <title>Show Port</title> + <informaltable rules="all" width="100%"> + <col width="20%"/> + <col width="20%"/> + <col width="60%"/> + <thead> + <tr> + <td>Verb</td> + <td>URI</td> + <td>Description</td> + </tr> + </thead> + <tbody> + <tr> + <td>&GET;</td> + <td>/ports/<parameter>port-id</parameter></td> + <td>Shows information for a specified port. The + <parameter>binding</parameter> extended + attributes are visible to only administrative + users.</td> + </tr> + </tbody> + </informaltable> + <simpara>Normal Response Code: <returnvalue>200</returnvalue> + </simpara> + <simpara>Error Response Codes: Unauthorized + (<errorcode>401</errorcode>), Not Found + (<errorcode>404</errorcode>)</simpara> + <para>This operation returns information for the port + specified in the request URI. </para> + <para>This operation does not require a request body.</para> + <para>This operation returns a response body.</para> + <para>In addition to any fields returned in the show port + response, the following + <parameter>binding</parameter>-prefixed extended + attributes are visible to administrative users:</para> + <informaltable rules="all"> + <thead> + <tr> + <th>Field</th> + <th>Description</th> + </tr> + </thead> + <tbody> + <tr> + <td><para><parameter>binding:vif_type</parameter></para></td> + + <td><para>Read-only. The vif type for the + specified port.</para> + </td> + </tr> + <tr> + <td> + <para><parameter>binding:host_id</parameter></para></td> + <td><para>The ID of the host where the port is + allocated. In some cases different + implementations can run on different + hosts.</para> + </td> + </tr> + <tr> + <td> + <para><parameter>binding:profile</parameter></para></td> + <td><para>A dictionary that enables the + application running on the specified host + to pass and receive vif port-specific + information to the plug-in.</para> + </td> + </tr> + <tr> + <td> + <para><parameter>binding:capabilities</parameter></para></td> + <td><para>Read-only. A dictionary that enables the + application to pass information about + functions that &APIv2; provides. Specify + the following value: port_filter : Boolean + to define whether &APIv2; provides port + filtering features such as security group + and anti-MAC/IP spoofing.</para> + </td> + </tr> + </tbody> + </informaltable> + </section> + + <section xml:id="Create_Port_binding"> + <title>Create Port</title> + <informaltable rules="all" width="100%"> + <col width="20%"/> + <col width="20%"/> + <col width="60%"/> + <thead> + <tr> + <td>Verb</td> + <td>URI</td> + <td>Description</td> + </tr> + </thead> + <tbody> + <tr> + <td>&POST;</td> + <td>/ports</td> + <td>Creates a port on a specified network. Only + administrative users can add the + <parameter>binding</parameter> extended + attributes.</td> + </tr> + </tbody> + </informaltable> + <simpara>Normal Response Code: <returnvalue>201</returnvalue> + </simpara> + <simpara>Error Response Codes: Bad Request + (<errorcode>400</errorcode>), Unauthorized + (<errorcode>401</errorcode>), Forbidden + (<errorcode>403</errorcode>), Not Found + (<errorcode>404</errorcode>), Conflict + (<errorcode>409</errorcode>), MAC generation failure + (<errorcode>503</errorcode>) </simpara> + <para>This operation creates an OpenStack Networking port. You + must specify the network where the port is to created on + the <parameter>network_id</parameter> attribute in the + request body.</para> + <para>This operation requires a request body.</para> + <para>This operation returns a response body.</para> + <para>In addition to any attributes that can be set in a + create port operation, administrative users can also set + the following <parameter>binding</parameter>-prefixed + extended attributes:</para> + <informaltable rules="all"> + <thead> + <tr> + <th>Field</th> + <th>Description</th> + </tr> + </thead> + <tbody> + <tr> + <td> + <para><parameter>binding:host_id</parameter></para></td> + <td><para>The ID of the host where the port is + allocated. In some cases different + implementations can run on different + hosts.</para> + </td> + </tr> + <tr> + <td> + <para><parameter>binding:profile</parameter></para></td> + <td><para>A dictionary that enables the + application running on the specified host + to pass and receive vif port-specific + information to the plug-in.</para> + </td> + </tr> + </tbody> + </informaltable> + </section> + <section xml:id="Update_Port_binding"> + <title>Update Port</title> + <informaltable rules="all" width="100%"> + <col width="20%"/> + <col width="20%"/> + <col width="60%"/> + <thead> + <tr> + <td>Verb</td> + <td>URI</td> + <td>Description</td> + </tr> + </thead> + <tbody> + <tr> + <td>&PUT;</td> + <td>/ports/<parameter>port-id</parameter></td> + <td>Updates a specified port. Only administrative + users can update the + <parameter>binding</parameter> extended + attributes.</td> + </tr> + </tbody> + </informaltable> + <simpara>Normal Response Code: <returnvalue>200</returnvalue> + </simpara> + <simpara>Error Response Codes: Bad Request + (<errorcode>400</errorcode>), Unauthorized + (<errorcode>401</errorcode>), Forbidden + (<errorcode>403</errorcode>), Not Found + (<errorcode>404</errorcode>), Conflict + (<errorcode>409</errorcode>) </simpara> + <para>Use this operation to update information for a + port.</para> + <para>This operation requires a request body.</para> + <para>This operation returns a response body.</para> + <para>In addition to any attributes that can be updated in the + update port operation, administrative users can also + update the following + <parameter>binding</parameter>-prefixed extended + attributes:</para> + <informaltable rules="all"> + <thead> + <tr> + <th>Field</th> + <th>Description</th> + </tr> + </thead> + <tbody> + <tr> + <td> + <para><parameter>binding:host_id</parameter></para></td> + <td><para>The ID of the host where the port is + allocated. In some cases different + implementations can run on different + hosts.</para> + </td> + </tr> + <tr> + <td> + <para><parameter>binding:profile</parameter></para></td> + <td><para>A dictionary that enables the + application running on the specified host + to pass and receive vif port-specific + information to the plug-in.</para> + </td> + </tr> + </tbody> + </informaltable> + </section> +</section> diff --git a/v2.0/section_neutron_concepts.xml b/v2.0/section_neutron_concepts.xml new file mode 100644 index 0000000..022ed63 --- /dev/null +++ b/v2.0/section_neutron_concepts.xml @@ -0,0 +1,594 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE section[ +<!-- Some useful entities borrowed from HTML --> +<!ENTITY ndash "–"> +<!ENTITY mdash "—"> +<!ENTITY hellip "…"> +<!ENTITY plusmn "±"> +<!-- Useful for describing APIs --> +<!ENTITY GET '<command xmlns="http://docbook.org/ns/docbook">GET</command>'> +<!ENTITY PUT '<command xmlns="http://docbook.org/ns/docbook">PUT</command>'> +<!ENTITY POST '<command xmlns="http://docbook.org/ns/docbook">POST</command>'> +<!ENTITY DELETE '<command xmlns="http://docbook.org/ns/docbook">DELETE</command>'> +<!ENTITY CHECK '<inlinemediaobject xmlns="http://docbook.org/ns/docbook"> + <imageobject> + <imagedata fileref="figures/Check_mark_23x20_02.svg" + format="SVG" scale="60"/> +</imageobject> + </inlinemediaobject>'> +<!ENTITY ARROW '<inlinemediaobject xmlns="http://docbook.org/ns/docbook"> + <imageobject> + <imagedata fileref="figures/Arrow_east.svg" + format="SVG" scale="60"/> +</imageobject> + </inlinemediaobject>'> + <!ENTITY APIv2 'Networking API v2.0'> +]> +<section xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:m="http://www.w3.org/1998/Math/MathML" + xmlns:html="http://www.w3.org/1999/xhtml" + xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" + xmlns:db="http://docbook.org/ns/docbook" version="5.0" + xml:id="Concepts-d1e369"> + <?dbhtml stop-chunking?> + <title>Concepts</title> + <para>Use the &APIv2; to manage the following entities:<itemizedlist> + <listitem> + <para><emphasis role="bold">Network</emphasis>. An + isolated virtual layer-2 domain. A network can + also be a virtual, or logical, switch. See <xref + linkend="Network"/>.</para> + </listitem> + <listitem> + <para><emphasis role="bold">Subnet</emphasis>. An IP + version 4 or version 6 address block from which IP + addresses that are assigned to VMs on a specified + network are selected. See <xref linkend="subnet" + />.</para> + </listitem> + <listitem> + <para><emphasis role="bold">Port</emphasis>. A + virtual, or logical, switch port on a specified + network. See <xref linkend="Port"/>.</para> + </listitem> + </itemizedlist></para> + <para>These entities have auto-generated unique identifiers and + support basic create, read, update, and delete (CRUD) + functions with the &POST;, &GET;, &PUT;, and &DELETE; + verbs.</para> + <?hard-pagebreak?> + <section xml:id="Network"> + <title>Network</title> + <para>A network is an isolated virtual layer-2 broadcast + domain that is typically reserved for the tenant who + created it unless you configure the network to be shared. + Tenants can create multiple networks until the thresholds + per-tenant quota is reached.</para> + <para>In the &APIv2;, the network is the main entity. Ports + and subnets are always associated with a network.</para> + <?hard-pagebreak?> + <para>The following table describes the attributes for network + objects:</para> + <table rules="all" width="95%"> + <caption>Network Attributes</caption> + <col width="20%"/> + <col width="10%"/> + <col width="10%"/> + <col width="10%"/> + <col width="15%"/> + <col width="17%"/> + <col width="20%"/> + <thead> + <tr> + <th>Attribute </th> + <th>Type </th> + <th>Required </th> + <th>CRUD<footnote xml:id="crud"> + <para><itemizedlist> + <listitem> + <para><emphasis role="bold" + >C</emphasis>. Use the attribute in + create operations.</para> + </listitem> + <listitem> + <para><emphasis role="bold" + >R</emphasis>. This attribute is + returned in response to show and + list operations.</para> + </listitem> + <listitem> + <para><emphasis role="bold" + >U</emphasis>. You can update the + value of this attribute.</para> + </listitem> + <listitem> + <para><emphasis role="bold" + >D</emphasis>. You can delete the + value of this attribute.</para> + </listitem> + </itemizedlist></para> + </footnote></th> + <th>Default Value </th> + <th>Validation Constraints </th> + <th>Notes</th> + </tr> + </thead> + <tbody> + <tr> + <td>id</td> + <td>uuid-str</td> + <td>N/A</td> + <td>R</td> + <td>generated</td> + <td>N/A</td> + <td>UUID for the network.</td> + </tr> + <tr> + <td>name</td> + <td>String</td> + <td>No</td> + <td>CRU</td> + <td>None</td> + <td>N/A</td> + <td>Human-readable name for the network. Might not + be unique.</td> + </tr> + <tr> + <td>admin_state_up</td> + <td>Bool</td> + <td>No</td> + <td>CRU</td> + <td>true</td> + <td>{true|false}</td> + <td>The administrative state of network. If false + (down), the network does not forward + packets.</td> + </tr> + <tr> + <td>status</td> + <td>String</td> + <td>N/A</td> + <td>R</td> + <td>N/A</td> + <td>N/A</td> + <td><para>Indicates whether network is currently + operational. Possible values include: <itemizedlist> + <listitem> + <para>ACTIVE</para> + </listitem> + <listitem> + <para>DOWN</para> + </listitem> + <listitem> + <para>BUILD</para> + </listitem> + <listitem> + <para>ERROR</para> + </listitem> + </itemizedlist> + </para><para>Plug-ins might define additional + values.</para></td> + </tr> + <tr> + <td>subnets</td> + <td>list(uuid-str)</td> + <td>No</td> + <td>R</td> + <td>Empty List</td> + <td>N/A</td> + <td>subnets associated with this network. </td> + </tr> + <tr> + <td>shared</td> + <td>Bool</td> + <td>No</td> + <td>CRU</td> + <td>False</td> + <td>{ True | False }</td> + <td>Specifies whether the network resource can be + accessed by any tenant or not.</td> + </tr> + <tr> + <td>tenant_id</td> + <td>uuid-str</td> + <td>No<footnote xml:id="tenant"> + <para>If OpenStack Networking is not + running with the Keystone Identity + service, the + <literal>tenant_id</literal> + attribute is required.</para> + </footnote> + </td> + <td>CR</td> + <td>N/A</td> + <td>No constraint</td> + <td>Owner of network. Only admin users can specify + a tenant_id other than its own. </td> + </tr> + </tbody> + </table> + </section> + <?hard-pagebreak?> + <section xml:id="subnet"> + <title>Subnet</title> + <para>A subnet represents an IP address block that can be used + to assign IP addresses to virtual instances. Each subnet + must have a CIDR and must be associated with a network. + IPs can be either selected from the whole subnet CIDR or + from allocation pools that can be specified by the + user.</para> + <para>A subnet can also optionally have a gateway, a list of + dns name servers, and host routes. This information is + pushed to instances whose interfaces are associated with + the subnet.</para> + <?hard-pagebreak?> + <table rules="all" width="95%"> + <caption>Subnet Attributes</caption> + <col width="20%"/> + <col width="10%"/> + <col width="10%"/> + <col width="10%"/> + <col width="15%"/> + <col width="17%"/> + <col width="20%"/> + <thead> + <tr> + <th>Attribute </th> + <th>Type </th> + <th>Required </th> + <th>CRUD<footnote xml:id="crud2"> + <para><itemizedlist> + <listitem> + <para><emphasis role="bold" + >C</emphasis>. Use the attribute in + create operations.</para> + </listitem> + <listitem> + <para><emphasis role="bold" + >R</emphasis>. This attribute is + returned in response to show and + list operations.</para> + </listitem> + <listitem> + <para><emphasis role="bold" + >U</emphasis>. You can update the + value of this attribute.</para> + </listitem> + <listitem> + <para><emphasis role="bold" + >D</emphasis>. You can delete the + value of this attribute.</para> + </listitem> + </itemizedlist></para> + </footnote> + </th> + <th>Default Value </th> + <th>Validation Constraints </th> + <th>Notes</th> + </tr> + </thead> + <tbody> + <tr> + <td>id</td> + <td>uuid-str</td> + <td>N/A</td> + <td>R</td> + <td>generated</td> + <td>N/A</td> + <td>UUID representing the subnet</td> + </tr> + <tr> + <td>network_id</td> + <td>uuid-str</td> + <td>Yes</td> + <td>CR</td> + <td>N/A</td> + <td>network this subnet is associated with.</td> + <td/> + </tr> + <tr> + <td>name</td> + <td>String</td> + <td>No</td> + <td>CRU</td> + <td>None</td> + <td>N/A</td> + <td>Human-readable name for the subnet. Might not + be unique.</td> + </tr> + <tr> + <td>ip_version</td> + <td>int</td> + <td>Yes</td> + <td>CR</td> + <td>4</td> + <td>{ 4 | 6 }</td> + <td>IP version</td> + </tr> + <tr> + <td>cidr</td> + <td>string</td> + <td>Yes</td> + <td>CR</td> + <td>N/A</td> + <td>valid cidr in the form + <network_address>/<prefix></td> + <td>cidr representing IP range for this subnet, + based on IP version</td> + </tr> + <tr> + <td>gateway_ip</td> + <td>string</td> + <td>No</td> + <td>CRUD</td> + <td>first address in <emphasis role="italic" + >cidr</emphasis> + </td> + <td>Valid IP address or null</td> + <td>default gateway used by devices in this + subnet</td> + </tr> + <tr> + <td>dns_nameservers</td> + <td>list(str)</td> + <td>No</td> + <td>CRU</td> + <td>Empty list</td> + <td>No constraint</td> + <td>DNS name servers used by hosts in this + subnet.</td> + </tr> + <tr> + <td>allocation_pools</td> + <td>list(dict)</td> + <td>No</td> + <td>CR</td> + <td>Every address in <emphasis role="italic" + >cidr</emphasis>, excluding <emphasis + role="italic">gateway_ip</emphasis> if + configured</td> + <td>star/end of range must be valid ip</td> + <td>Sub-ranges of cidr available for dynamic + allocation to ports [ { "start": "10.0.0.2", + "end": "10.0.0.254"} ]</td> + </tr> + <tr> + <td>host_routes</td> + <td>list(dict)</td> + <td>No</td> + <td>CRU</td> + <td>Empty List</td> + <td> + <emphasis role="italic">[]</emphasis> + </td> + <td>Routes that should be used by devices with IPs + from this subnet (not including local subnet + route).</td> + </tr> + <tr> + <td>enable_dhcp</td> + <td>Bool</td> + <td>No</td> + <td>CRU</td> + <td>True</td> + <td>{ True | False }</td> + <td>Specifies whether DHCP is enabled for this + subnet or not.</td> + </tr> + <tr> + <td>tenant_id</td> + <td>uuid-str</td> + <td>No<footnote xml:id="tenant2"> + <para>If OpenStack Networking is not + running with the Keystone Identity + service, the + <literal>tenant_id</literal> + attribute is required.</para> + </footnote></td> + <td>CR</td> + <td>N/A</td> + <td>No constraint</td> + <td>Owner of network. Only admin users can specify + a tenant_id other than its own. </td> + </tr> + </tbody> + </table> + </section> + <?hard-pagebreak?> + <section xml:id="Port"> + <title>Port</title> + <para>A port represents a virtual switch port on a logical + network switch. Virtual instances attach their interfaces + into ports. The logical port also defines the MAC address + and the IP address(es) to be assigned to the interfaces + plugged into them. When IP addresses are associated to a + port, this also implies the port is associated with a + subnet, as the IP address was taken from the allocation + pool for a specific subnet.</para> + <?hard-pagebreak?> + <table rules="all" width="95%"> + <caption>Port Attributes</caption> + <col width="20%"/> + <col width="10%"/> + <col width="10%"/> + <col width="10%"/> + <col width="15%"/> + <col width="17%"/> + <col width="20%"/> + <thead> + <tr> + <th>Attribute </th> + <th>Type </th> + <th>Required </th> + <th>CRUD<footnote xml:id="crud3"> + <para><itemizedlist> + <listitem> + <para><emphasis role="bold" + >C</emphasis>. Use the attribute in + create operations.</para> + </listitem> + <listitem> + <para><emphasis role="bold" + >R</emphasis>. This attribute is + returned in response to show and + list operations.</para> + </listitem> + <listitem> + <para><emphasis role="bold" + >U</emphasis>. You can update the + value of this attribute.</para> + </listitem> + <listitem> + <para><emphasis role="bold" + >D</emphasis>. You can delete the + value of this attribute.</para> + </listitem> + </itemizedlist></para> + </footnote> + </th> + <th>Default Value </th> + <th>Validation Constraints </th> + <th>Notes</th> + </tr> + </thead> + <tbody> + <tr> + <td>id</td> + <td>uuid-str</td> + <td>N/A</td> + <td>R</td> + <td>generated</td> + <td>N/A</td> + <td>UUID for the port.</td> + </tr> + <tr> + <td>network_id</td> + <td>uuid-str</td> + <td>Yes</td> + <td>CR</td> + <td>N/A</td> + <td>existing network identifier</td> + <td>Network that this port is associated with. + </td> + </tr> + <tr> + <td>name</td> + <td>String</td> + <td>No</td> + <td>CRU</td> + <td>None</td> + <td>N/A</td> + <td>Human-readable name for the port. Might not be + unique.</td> + </tr> + <tr> + <td>admin_state_up</td> + <td>bool</td> + <td>No</td> + <td>CRU</td> + <td>true</td> + <td>{true|false}</td> + <td>Administrative state of port. If false (down), + port does not forward packets. </td> + </tr> + <tr> + <td>status</td> + <td>string</td> + <td>N/A</td> + <td>R</td> + <td>N/A</td> + <td>N/A</td> + <td><para>Indicates whether network is currently + operational. Possible values include: <itemizedlist> + <listitem> + <para>ACTIVE</para> + </listitem> + <listitem> + <para>DOWN</para> + </listitem> + <listitem> + <para>BUILD</para> + </listitem> + <listitem> + <para>ERROR</para> + </listitem> + </itemizedlist> + </para><para>Plug-ins might define additional + values.</para></td> + </tr> + <tr> + <td>mac_address</td> + <td>string</td> + <td>No</td> + <td>CR</td> + <td>generated</td> + <td>valid MAC in 6-octet form separated by + colons</td> + <td>Mac address to use on this port.</td> + </tr> + <tr> + <td>fixed_ips</td> + <td>list(dict)</td> + <td>No</td> + <td>CRU</td> + <td>automatically allocated from pool</td> + <td>Valid IP address and existing subnet + identifier</td> + <td>Specifies IP addresses for the port thus + associating the port itself with the subnets + where the IP addresses are picked from</td> + </tr> + <tr> + <td>device_id</td> + <td>str</td> + <td>No</td> + <td>CRUD</td> + <td>None</td> + <td>No constraint</td> + <td>identifies the device (e.g., virtual server) + using this port.</td> + </tr> + <tr> + <td>device_owner</td> + <td>str</td> + <td>No</td> + <td>CRUD</td> + <td>None</td> + <td>No constraint</td> + <td>Identifies the entity (e.g.: dhcp agent) using + this port.</td> + </tr> + <tr> + <td>tenant_id</td> + <td>uuid-str</td> + <td>No<footnote xml:id="tenant3"> + <para>If OpenStack Networking is not + running with the Keystone Identity + service, the + <literal>tenant_id</literal> + attribute is required.</para> + </footnote> + </td> + <td>CR</td> + <td>N/A</td> + <td>No constraint</td> + <td>Owner of network. Only admin users can specify + a tenant_id other than its own. </td> + </tr> + <tr> + <td>security_groups</td> + <td>list(dict)</td> + <td>No</td> + <td>CRUD</td> + <td>None</td> + <td>Existing security group IDs</td> + <td>Specifies the IDs of any security groups + associated with a port.</td> + </tr> + </tbody> + </table> + </section> +</section> diff --git a/v2.0/section_neutron_list-extensions.xml b/v2.0/section_neutron_list-extensions.xml new file mode 100644 index 0000000..226f8d2 --- /dev/null +++ b/v2.0/section_neutron_list-extensions.xml @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE section[ +<!-- Some useful entities borrowed from HTML --> +<!ENTITY ndash "–"> +<!ENTITY mdash "—"> +<!ENTITY hellip "…"> +<!ENTITY plusmn "±"> +<!-- Useful for describing APIs --> +<!ENTITY GET '<command xmlns="http://docbook.org/ns/docbook">GET</command>'> +<!ENTITY PUT '<command xmlns="http://docbook.org/ns/docbook">PUT</command>'> +<!ENTITY POST '<command xmlns="http://docbook.org/ns/docbook">POST</command>'> +<!ENTITY DELETE '<command xmlns="http://docbook.org/ns/docbook">DELETE</command>'> +<!ENTITY CHECK '<inlinemediaobject xmlns="http://docbook.org/ns/docbook"> + <imageobject> + <imagedata fileref="figures/Check_mark_23x20_02.svg" + format="SVG" scale="60"/> +</imageobject> + </inlinemediaobject>'> +<!ENTITY ARROW '<inlinemediaobject xmlns="http://docbook.org/ns/docbook"> + <imageobject> + <imagedata fileref="figures/Arrow_east.svg" + format="SVG" scale="60"/> +</imageobject> + </inlinemediaobject>'> + <!ENTITY APIv2 'Networking API v2.0'> +]> +<section xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:m="http://www.w3.org/1998/Math/MathML" + xmlns:html="http://www.w3.org/1999/xhtml" + xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" + xmlns:db="http://docbook.org/ns/docbook" version="5.0" + xml:id="retrieve_extensions"> + <title>List Available Extensions</title> + <para>You can list available extensions through the <filename + role="bold">/v2.0/extensions</filename> URI.</para> + <note> + <para>You must authenticate these requests just like any other + API request.</para> + </note> + <para>The following example response shows a list of + extensions:</para> + <literallayout class="monospaced">Status Code: 200 OK +Connection: keep-alive +Content-Length: 654 +Content-Type: application/xml; charset=UTF-8 +Date: Wed, 12 Sep 2012 11:32:56 GMT</literallayout> + <programlisting language="xml"><xi:include href="samples/extensionsv2.xml" parse="text"/></programlisting> + <para>Also, you can query for specific extension using the + extension alias. For instance, querying + <literal>/v2.0/extensions/router</literal>, results in the + following response:</para> + <literallayout class="monospaced">Status Code: 200 OK +Connection: keep-alive +Content-Length: 350 +Content-Type: application/xml; charset=UTF-8 +Date: Wed, 12 Sep 2012 11:36:20 GMT</literallayout> + <programlisting language="xml"><xi:include href="samples/extension.xml" parse="text"/></programlisting> +</section> diff --git a/v2.0/wadl/os-networks-provider-ext.wadl b/v2.0/wadl/os-networks-provider-ext.wadl new file mode 100644 index 0000000..88c4752 --- /dev/null +++ b/v2.0/wadl/os-networks-provider-ext.wadl @@ -0,0 +1,256 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- (C) 2013 OpenStack Foundation, All Rights Reserved --> + +<!--*******************************************************--> +<!-- Import Common XML Entities --> +<!-- --> +<!-- You can resolve the entites with xmllint --> +<!-- --> +<!-- xmllint -noent os-networks-provider-ext.wadl --> +<!--*******************************************************--> + +<!DOCTYPE application [<!ENTITY % common SYSTEM "common.ent"> +%common;]> +<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:wadl="http://wadl.dev.java.net/2009/02" + xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" + xmlns="http://wadl.dev.java.net/2009/02" + xmlns:common="http://docs.openstack.org/common/api/v1.0" + xmlns:csapi="http://docs.openstack.org/compute/api/v2" + xmlns:atom="http://www.w3.org/2005/Atom" + xsi:schemaLocation="http://docs.openstack.org/compute/api/v1.1 + xsd/api.xsd + http://docs.openstack.org/common/api/v1.0 + xsd/api-common.xsd + http://wadl.dev.java.net/2009/02 + http://www.w3.org/Submission/wadl/wadl.xsd"> + + <!--*******************************************************--> + <!-- All Resources --> + <!--*******************************************************--> + + <resources base="https://neutron.example.com/"> + <resource id="version" type="#VersionDetails" path="v2.0"> + <resource id="Networks" type="#NetworkList" + path="networks"> + <method href="#listNetworks"/> + <param name="name" style="plain" type="xsd:string"> + <doc> + <p xmlns="http://www.w3.org/1999/xhtml">The + network name.</p> + </doc> + </param> + <param name="admin_state_up" style="plain" + type="xsd:bool"> + <doc> + <p xmlns="http://www.w3.org/1999/xhtml" + >Indicates the administrative status of + the network.</p> + </doc> + </param> + <param name="shared" style="plain" type="xsd:bool"> + <doc> + <p xmlns="http://www.w3.org/1999/xhtml" + >Indicates whether this network is shared + across all tenants. By default, only + administrative users can change this + value.</p> + </doc> + </param> + <param name="tenant_id" style="plain" + type="csapi:uuid"> + <doc> + <p xmlns="http://www.w3.org/1999/xhtml">The ID + of the tenant that owns the network. Only + administrative users can set the tenant + ID. You cannot change this value through + authorization policies.</p> + </doc> + </param> + <param name="provider:network_type" style="plain" + type="xsd:string"> + <doc> + <p xmlns="http://www.w3.org/1999/xhtml">The + type of physical network that maps to this + networks resource. Examples are flat, + vlan, and gre.</p> + </doc> + </param> + <param name="provider:physical_network" style="plain" + type="xsd:string"> + <doc> + <p xmlns="http://www.w3.org/1999/xhtml">The + physical network on which this network + object is implemented. The Networking API + v2.0 does not provide a way to list + available physical networks. For example, + the Open vSwitch plug-in configuration + file defines a symbolic name that maps to + specific bridges on each Compute host.</p> + </doc> + </param> + <param name="provider:segmentation_id" style="plain" + type="csapi:uuid"> + <doc> + <p xmlns="http://www.w3.org/1999/xhtml">An + isolated segment on the physical network. + The network_type attribute defines the + segmentation model. For example, if + network_type is vlan, this ID is a vlan + identifier. If network_type is gre, this + ID is a gre key.</p> + </doc> + </param> + <method href="#createNetwork"/> + <resource path="{network_id}"> + <param name="network_id" style="template" + type="csapi:UUID"> + <wadl:doc xmlns="http://www.w3.org/1999/xhtml" + xml:lang="EN" title="Network ID"> + <p>The UUID for the network of interest to + you.</p> + </wadl:doc> + </param> + <method href="#showNetwork"/> + <method href="#updateNetwork"/> + <method href="#deleteNetwork"/> + </resource> + </resource> + </resource> + </resources> + + <!--*******************************************************--> + <!-- All Methods --> + <!--*******************************************************--> + + <method name="GET" id="listNetworks"> + <wadl:doc xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" + title="List Networks"> + <p xmlns="http://www.w3.org/1999/xhtml">Lists networks + that are accessible to the tenant who submits the + request.</p> + </wadl:doc> + <response status="200"> &networkListParameters; + &networkProviderParameters; <representation + mediaType="application/json"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/networks-get-detail-resp.json" + /> + </doc> + </representation> + <representation mediaType="application/xml"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/networks-get-detail-resp.xml" + /> + </doc> + </representation> + </response> + </method> + + <method name="POST" id="createNetwork"> + <wadl:doc xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" + title="Create Network"> + <p xmlns="http://www.w3.org/1999/xhtml">Creates a + network.</p> + </wadl:doc> + <request> &networkCreateParameters; <representation + mediaType="application/json"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/network-post-req.json"/> + </doc> + </representation> + <representation mediaType="application/xml"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/network-post-req.xml"/> + </doc> + </representation> + </request> + <response status="201"> &networkListParameters; + &networkProviderParameters; <representation + mediaType="application/json"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/network-post-resp.json"/> + </doc> + </representation> + <representation mediaType="application/xml"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/network-post-resp.xml"/> + </doc> + </representation> + </response> + </method> + + <method name="GET" id="showNetwork"> + <wadl:doc xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" + title="Show Networks"> + <p xmlns="http://www.w3.org/1999/xhtml">Shows information + for the specified network.</p> + </wadl:doc> + <response status="200"> &networkListParameters; + &networkProviderParameters; <representation + mediaType="application/json"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/networks-get-detail-resp.json" + /> + </doc> + </representation> + <representation mediaType="application/xml"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/networks-get-detail-resp.xml" + /> + </doc> + </representation> + </response> + </method> + <method name="PUT" id="updateNetwork"> + <wadl:doc xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" + title="Update Network"> + <p xmlns="http://www.w3.org/1999/xhtml">Updates the + specified network.</p> + </wadl:doc> + <request> &networkCreateParameters; + &networkProviderParameters; <representation + mediaType="application/json"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/network-put-update.req.json" + /> + </doc> + </representation> + <representation mediaType="application/xml"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/network-put-update.req.xml" + /> + </doc> + </representation> + </request> + <response status="201"> &networkListParameters; + &networkProviderParameters; <representation + mediaType="application/json"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/network-put-update-resp.json" + /> + </doc> + </representation> + <representation mediaType="application/xml"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/network-put-update-resp.xml" + /> + </doc> + </representation> + </response> + </method> +</application> diff --git a/v2.0/wadl/os-networks.wadl b/v2.0/wadl/os-networks.wadl new file mode 100644 index 0000000..1781592 --- /dev/null +++ b/v2.0/wadl/os-networks.wadl @@ -0,0 +1,539 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- (C) 2013 OpenStack Foundation, All Rights Reserved --> + +<!--*******************************************************--> +<!-- Import Common XML Entities --> +<!-- --> +<!-- You can resolve the entites with xmllint --> +<!-- --> +<!-- xmllint -noent os-networks.wadl --> +<!--*******************************************************--> +<!DOCTYPE application [<!ENTITY % common SYSTEM "common.ent"> +%common;]> +<application xmlns="http://wadl.dev.java.net/2009/02" + xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:linkend="http://www.w3.org/1999/linkend" + xmlns:xsd="http://docs.rackspacecloud.com/xsd/v1.0" + xmlns:wadl="http://wadl.dev.java.net/2009/02" + xmlns:csapi="http://docs.openstack.org/compute/api/v1.1"> + + <!--*******************************************************--> + <!-- All Resources --> + <!--*******************************************************--> + <resources base="https://neutron.example.com/"> + <resource id="version" type="#VersionDetails" path="v2/"> + <resource id="tenantID" path="{tenant_id}"> + <param name="tenant_id" style="template" + type="csapi:UUID"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"> + <para>The tenant ID in a multi-tenancy + cloud.</para> + </wadl:doc> + </param> + <resource id="Networks" type="#NetworkList" + path="networks"> + + <method href="#listNetworks"/> + <method href="#createNetwork"/> + <method href="#bulkCreateNetwork"/> + <!-- <resource id="server_detail" path="detail" + type="#DetailServerList"/>--> + <resource path="{network_id}"> + <param name="network_id" style="template" + type="csapi:UUID"> + <wadl:doc + xmlns="http://docbook.org/ns/docbook" + xml:lang="EN" title="Network ID"> + <para>The UUID for the network of + interest to you.</para></wadl:doc> + </param> + <method href="#showNetwork"/> + <method href="#updateNetwork"/> + <method href="#deleteNetwork"/> + </resource> + </resource> + </resource> + </resource> + </resources> + <!-- <resource id="Networks" type="#NetworkList" + path="networks"> + <method href="#listNetworks"/> + &networkCreateParameters; + <method href="#createNetwork"/> + <method href="#bulkCreateNetwork"/> + <resource path="{network_id}"> + <param name="network_id" style="template" + type="csapi:UUID"> + <wadl:doc + xmlns="http://docbook.org/ns/docbook" + xml:lang="EN" title="Network ID"> + <para>The UUID for the network of + interest to you.</para></wadl:doc> + </param> + <method href="#showNetwork"/> + <method href="#updateNetwork"/> + <method href="#deleteNetwork"/> + </resource> + </resource> + </resource> + </resource> + </resources>--> + + <!--*******************************************************--> + <!-- All Methods --> + <!--*******************************************************--> + + <method name="GET" id="listNetworks"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN" + title="List Networks"> + <para role="shortdesc">Lists networks to which the + specified tenant has access.</para> + <para>You can control which attributes are returned by + using the fields query parameter. For information, see + <link + xlink:href="http://docs.openstack.org/api/openstack-network/2.0/content/filtering.html" + >Filtering and Column Selection</link> in the + <citetitle>OpenStack Networking API v2.0 + Reference</citetitle>.</para> + </wadl:doc> + <response status="200"> + <param required="true" name="admin_state_up" style="plain" + type="xsd:bool"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>Indicates whether the + administrative state of the network is up or + down.</para></wadl:doc> + </param> + <param required="true" name="id" style="plain" + type="csapi:uuid"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>The network + ID.</para></wadl:doc> + </param> + <param required="true" name="name" style="plain" + type="xsd:string"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>The network + name.</para></wadl:doc> + </param> + <param required="true" name="shared" style="plain" + type="xsd:bool"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>Indicates whether this network + is shared across all tenants. By default, only + administrative users can change this + value.</para></wadl:doc> + </param> + <param required="true" name="status" style="plain" + type="xsd:string"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>The network + status.</para></wadl:doc> + </param> + <param required="true" name="subnets" style="plain" + type="xsd:dict"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>The associated + subnets.</para></wadl:doc> + </param> + <param required="true" name="tenant_id" style="plain" + type="csapi:uuid"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>The tenant + ID.</para></wadl:doc> + </param> + <representation mediaType="application/json" + element="csapi:network"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/networks-get-resp.json"/> + </doc> + </representation> + <representation mediaType="application/xml" + element="csapi:network"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/networks-get-resp.xml"/> + </doc> + </representation> + </response> &fault401; </method> + <method name="POST" id="createNetwork"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN" + title="Create Network"> + <para role="shortdesc">Creates a network.</para> + </wadl:doc> + <request> + <param required="false" name="admin_state_up" + style="plain" type="xsd:bool"> + <doc + xml:lang="EN"><p xmlns="http://www.w3.org/1999/xhtml">The administrative state of + the network.</p></doc> + </param> + <representation mediaType="application/json" + element="csapi:network"> + + + <!-- <param required="true" name="name" style="plain" + type="xsd:string"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>The network + name.</para></wadl:doc> + </param> + <param required="false" name="shared" style="plain" + type="xsd:bool"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>Admin-only. Indicates whether + this network is shared across all + tenants.</para></wadl:doc> + </param> + <param required="false" name="tenant_id" style="plain" + type="csapi:uuid"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>The ID of the tenant that owns + the network. Only administrative users can + specify a tenant ID other than their own. You + cannot change this value through authorization + policies.</para></wadl:doc> + </param>--> + <wadl:doc + xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"> + <xsdxt:code + href="api_samples/network-post-req.json"/> + </wadl:doc> + </representation> + <representation mediaType="application/xml" + element="csapi:network"> + + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"> + <xsdxt:code + href="api_samples/network-post-req.xml"/> + </wadl:doc> + </representation> + </request> + <response status="201"> + <param required="true" name="admin_state_up" style="plain" + type="xsd:bool"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>Indicates whether the + administrative state of the network is up or + down.</para></wadl:doc> + </param> + <param required="true" name="id" style="plain" + type="csapi:uuid"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>The network + ID.</para></wadl:doc> + </param> + <param required="true" name="name" style="plain" + type="xsd:string"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>The network + name.</para></wadl:doc> + </param> + <param required="true" name="shared" style="plain" + type="xsd:bool"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>Indicates whether this network + is shared across all tenants. By default, only + administrative users can change this + value.</para></wadl:doc> + </param> + <param required="true" name="status" style="plain" + type="xsd:string"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>The network + status.</para></wadl:doc> + </param> + <param required="true" name="subnets" style="plain" + type="xsd:dict"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>The associated + subnets.</para></wadl:doc> + </param> + <param required="true" name="tenant_id" style="plain" + type="csapi:uuid"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>The tenant + ID.</para></wadl:doc> + </param> + <representation mediaType="application/json" + element="csapi:network"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/network-post-resp.json"/> + </doc> + </representation> + <representation mediaType="application/xml" + element="csapi:network"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/network-post-resp.xml"/> + </doc> + </representation> + </response> &fault400; &fault401; </method> + <method name="POST" id="bulkCreateNetwork"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN" + title="Bulk Create Networks"> + <para role="shortdesc">Creates multiple networks in a + single request.</para> + <para>In the request body, specify a list of + networks.</para> + <para>The bulk create operation is always atomic. Either + all or no networks in the request body are + created.</para> + </wadl:doc> + <request> &networkCreateParameters; <representation + mediaType="application/json" element="csapi:network"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/networks-post-create-bulk-req.json" + /> + </doc> + </representation> + <representation mediaType="application/xml" + element="csapi:network"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/networks-post-create-bulk-req.xml" + /> + </doc> + </representation> + </request> + <response status="201"> + <param required="true" name="admin_state_up" style="plain" + type="xsd:bool"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>Indicates whether the + administrative state of the network is up or + down.</para></wadl:doc> + </param> + <param required="true" name="id" style="plain" + type="csapi:uuid"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>The network + ID.</para></wadl:doc> + </param> + <param required="true" name="name" style="plain" + type="xsd:string"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>The network + name.</para></wadl:doc> + </param> + <param required="true" name="shared" style="plain" + type="xsd:bool"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>Indicates whether this network + is shared across all tenants. By default, only + administrative users can change this + value.</para></wadl:doc> + </param> + <param required="true" name="status" style="plain" + type="xsd:string"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>The network + status.</para></wadl:doc> + </param> + <param required="true" name="subnets" style="plain" + type="xsd:dict"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>The associated + subnets.</para></wadl:doc> + </param> + <param required="true" name="tenant_id" style="plain" + type="csapi:uuid"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>The tenant + ID.</para></wadl:doc> + </param> + <representation mediaType="application/json" + element="csapi:network"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/networks-create-bulk-resp.json" + /> + </doc> + </representation> + <representation mediaType="application/xml" + element="csapi:network"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/networks-create-bulk-resp.xml" + /> + </doc> + </representation> + </response> &fault400; &fault401; </method> + <method name="GET" id="showNetwork"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN" + title="Show Network"> + <para role="shortdesc">Shows information for a specified + network.</para> + <para>You can control which attributes are returned by + using the fields query parameter. For information, see + <link + xlink:href="http://docs.openstack.org/api/openstack-network/2.0/content/filtering.html" + >Filtering and Column Selection</link> in the + <citetitle>OpenStack Networking API v2.0 + Reference</citetitle>.</para> + </wadl:doc> + <response status="200"> + <param required="true" name="admin_state_up" style="plain" + type="xsd:bool"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>Indicates whether the + administrative state of the network is up or + down.</para></wadl:doc> + </param> + <param required="true" name="id" style="plain" + type="csapi:uuid"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>The network + ID.</para></wadl:doc> + </param> + <param required="true" name="name" style="plain" + type="xsd:string"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>The network + name.</para></wadl:doc> + </param> + <param required="true" name="shared" style="plain" + type="xsd:bool"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>Indicates whether this network + is shared across all tenants. By default, only + administrative users can change this + value.</para></wadl:doc> + </param> + <param required="true" name="status" style="plain" + type="xsd:string"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>The network + status.</para></wadl:doc> + </param> + <param required="true" name="subnets" style="plain" + type="xsd:dict"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>The associated + subnets.</para></wadl:doc> + </param> + <param required="true" name="tenant_id" style="plain" + type="csapi:uuid"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>The tenant + ID.</para></wadl:doc> + </param> + <representation mediaType="application/json" + element="csapi:network"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/networks-get-detail-resp.json" + /> + </doc> + </representation> + <representation mediaType="application/xml" + element="csapi:network"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/networks-get-detail-resp.xml" + /> + </doc> + </representation> + </response> &fault401; &fault404; </method> + <method name="PUT" id="updateNetwork"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN" + title="Update Network"> + <para role="shortdesc">Updates a specified network.</para> + </wadl:doc> + <request> &networkCreateParameters; <representation + mediaType="application/json" element="csapi:network"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/network-put-update.req.json" + /> + </doc> + </representation> + <representation mediaType="application/xml" + element="csapi:network"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/network-put-update.req.xml" + /> + </doc> + </representation> + </request> + <response status="200"> + <param required="true" name="admin_state_up" style="plain" + type="xsd:bool"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>Indicates whether the + administrative state of the network is up or + down.</para></wadl:doc> + </param> + <param required="true" name="id" style="plain" + type="csapi:uuid"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>The network + ID.</para></wadl:doc> + </param> + <param required="true" name="name" style="plain" + type="xsd:string"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>The network + name.</para></wadl:doc> + </param> + <param required="true" name="shared" style="plain" + type="xsd:bool"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>Indicates whether this network + is shared across all tenants. By default, only + administrative users can change this + value.</para></wadl:doc> + </param> + <param required="true" name="status" style="plain" + type="xsd:string"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>The network + status.</para></wadl:doc> + </param> + <param required="true" name="subnets" style="plain" + type="xsd:dict"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>The associated + subnets.</para></wadl:doc> + </param> + <param required="true" name="tenant_id" style="plain" + type="csapi:uuid"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"><para>The tenant + ID.</para></wadl:doc> + </param> + <representation mediaType="application/json" + element="csapi:network"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/network-put-update-resp.json" + /> + </doc> + </representation> + <representation mediaType="application/xml" + element="csapi:network"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/network-put-update-resp.xml" + /> + </doc> + </representation> + </response> &fault400; &fault401; &fault403; &fault404; </method> + <method name="DELETE" id="deleteNetwork"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN" + title="Delete Network"> + <para role="shortdesc">Deletes a specified network and its + associated resources.</para> + </wadl:doc> + <response status="204"/> &fault401; &fault404; + &fault409conflict; </method> +</application> diff --git a/v2.0/wadl/os-ports-binding-ext.wadl b/v2.0/wadl/os-ports-binding-ext.wadl new file mode 100644 index 0000000..e993bd4 --- /dev/null +++ b/v2.0/wadl/os-ports-binding-ext.wadl @@ -0,0 +1,140 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- (C) 2013 OpenStack Foundation, All Rights Reserved --> + +<!--*******************************************************--> +<!-- Import Common XML Entities --> +<!-- --> +<!-- You can resolve the entites with xmllint --> +<!-- --> +<!-- xmllint -noent os-ports-binding-ext.wadl --> +<!--*******************************************************--> + +<!DOCTYPE application [<!ENTITY % common SYSTEM "common.ent"> +%common;]> +<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:wadl="http://wadl.dev.java.net/2009/02" + xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" + xmlns="http://wadl.dev.java.net/2009/02" + xmlns:common="http://docs.openstack.org/common/api/v1.0" + xmlns:csapi="http://docs.openstack.org/compute/api/v2" + xmlns:atom="http://www.w3.org/2005/Atom" + xsi:schemaLocation="http://docs.openstack.org/compute/api/v1.1 + xsd/api.xsd + http://docs.openstack.org/common/api/v1.0 + xsd/api-common.xsd + http://wadl.dev.java.net/2009/02 + http://www.w3.org/Submission/wadl/wadl.xsd"> + + <!--*******************************************************--> + <!-- All Resources --> + <!--*******************************************************--> + + <resources base="https://neutron.example.com/"> + <resource id="version" type="#VersionDetails" path="v2"> + <resource id="Ports" type="#PortList" path="ports"> + <method href="#listPorts" /> + <method href="#createPort" /> + <resource path="{port_id}"> + <param name="port_id" style="template" type="csapi:UUID"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN" title="Port ID"> + <para>The UUID for the port of interest to you.</para></wadl:doc> + </param> + <method href="#showPort"/> + <method href="#updatePort"/> + </resource> + </resource> + </resource> + </resources> + + <!--*******************************************************--> + <!-- All Methods --> + <!--*******************************************************--> + + <method name="GET" id="listPorts"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN" title="List Ports"> + <para role="shortdesc">Lists ports to which the tenant has access.</para> + </wadl:doc> + <response status="200"> &portListParameters; &portBindingParameters; + <representation mediaType="application/json"> + <doc xml:lang="EN"> + <xsdxt:code href="api_samples/ports-get-resp.json" /> + </doc> + </representation> + <representation mediaType="application/xml"> + <doc xml:lang="EN"> + <xsdxt:code href="api_samples/ports-get-resp.xml" /> + </doc> + </representation> + </response> + </method> + + <method name="POST" id="createPort"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN" title="Create Port"> + <para role="shortdesc">Creates a port on the specified network.</para> + </wadl:doc> + <!-- Need to verify, samples are mixed --> + <request> &portCreateParameters; &portBindingParameters; <representation mediaType="application/json"> + <doc xml:lang="EN"> + <xsdxt:code href="api_samples/port-post-create-req.json" /> + </doc> + </representation> + </request> + <response status="200"> &portListParameters; &portBindingParameters; + <representation mediaType="application/json"> + <doc xml:lang="EN"> + <xsdxt:code href="api_samples/port_create_or_update_resp.json" /> + </doc> + </representation> + <representation mediaType="application/xml"> + <doc xml:lang="EN"> + <xsdxt:code href="api_samples/port_create_or_update_resp.xml" /> + </doc> + </representation> + </response> + </method> + + <method name="GET" id="showPort"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN" title="Show Port"> + <para role="shortdesc">Shows information for the specified port.</para> + </wadl:doc> + <!-- Need to verify, samples are mixed --> + <response status="200"> &portListParameters; &portBindingParameters; + <representation mediaType="application/json"> + <doc xml:lang="EN"> + <xsdxt:code href="api_samples/port-get-resp.json" /> + </doc> + </representation> + <representation mediaType="application/xml"> + <doc xml:lang="EN"> + <xsdxt:code href="api_samples/port-get-resp.xml" /> + </doc> + </representation> + </response> + </method> + <method name="PUT" id="updatePort"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN" title="Update Port"> + <para role="shortdesc">Updates the specified port.</para> + </wadl:doc> + <!-- Need to verify, samples are mixed --> + <request> &portCreateParameters; &portBindingParameters; <representation mediaType="application/json"> + <doc xml:lang="EN"> + <xsdxt:code href="api_samples/port-post-create-req.json" /> + </doc> + </representation> + </request> + <response status="200"> &portListParameters; &portBindingParameters; + <representation mediaType="application/json"> + <doc xml:lang="EN"> + <xsdxt:code href="api_samples/port_create_or_update_resp.json" /> + </doc> + </representation> + <representation mediaType="application/xml"> + <doc xml:lang="EN"> + <xsdxt:code href="api_samples/port_create_or_update_resp.xml" /> + </doc> + </representation> + </response> + </method> +</application> diff --git a/v2.0/wadl/os-ports.wadl b/v2.0/wadl/os-ports.wadl new file mode 100644 index 0000000..b1bc99e --- /dev/null +++ b/v2.0/wadl/os-ports.wadl @@ -0,0 +1,246 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- (C) 2013 OpenStack Foundation, All Rights Reserved --> + +<!--*******************************************************--> +<!-- Import Common XML Entities --> +<!-- --> +<!-- You can resolve the entites with xmllint --> +<!-- --> +<!-- xmllint -noent os-ports.wadl --> +<!--*******************************************************--> + +<!DOCTYPE application [<!ENTITY % common SYSTEM "common.ent"> +%common;]> +<application xmlns="http://wadl.dev.java.net/2009/02" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:linkend="http://www.w3.org/1999/linkend" + xmlns:xref="http://www.w3.org/1999/xref" + xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" + xmlns:xsd="http://docs.rackspacecloud.com/xsd/v1.0" + xmlns:wadl="http://wadl.dev.java.net/2009/02" + xmlns:csapi="http://docs.openstack.org/compute/api/v1.1"> + + <!--*******************************************************--> + <!-- All Resources --> + <!--*******************************************************--> + + <resources base="https://neutron.example.com/"> + <resource id="version" type="#VersionDetails" path="v2/"> + <resource id="tenantID" path="{tenant_id}"> + <param name="tenant_id" style="template" + type="csapi:UUID"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"> + <para>The tenant ID in a multi-tenancy + cloud.</para> + </wadl:doc> + </param> + <resource id="Ports" type="#PortList" path="ports"> + <method href="#listPorts"/> + <method href="#createPort"/> + <method href="#bulkCreatePorts"/> + <resource path="{port_id}"> + <param name="port_id" style="template" + type="csapi:UUID"> + <wadl:doc + xmlns="http://docbook.org/ns/docbook" + xml:lang="EN" title="Port ID"> + <para>The UUID for the port of + interest to you.</para></wadl:doc> + </param> + <method href="#showPort"/> + <method href="#updatePort"/> + <method href="#removePort"/> + </resource> + </resource> + </resource> + </resource> + </resources> + + <!--*******************************************************--> + <!-- All Methods --> + <!--*******************************************************--> + + <method name="GET" id="listPorts"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN" + title="List Ports"> + <para role="shortdesc">Lists ports to which the tenant has + access.</para> + <para>Default policy settings return only those subnets + that are owned by the tenant who submits the request, + unless the request is submitted by an user with + administrative rights. Users can control which + attributes are returned by using the fields query + parameter. Additionally, you can filter results by + using query string parameters. For information, see + <link + xlink:href="http://docs.openstack.org/api/openstack-network/2.0/content/filtering.html" + >Filtering and Column Selection</link> in the + <citetitle>OpenStack Networking API v2.0 + Reference</citetitle>.</para> + </wadl:doc> + <response status="200"> &portListParameters; <representation + mediaType="application/json"> + <doc xml:lang="EN"> + <xsdxt:code href="api_samples/ports-get-resp.json" + /> + </doc> + </representation> + <representation mediaType="application/xml"> + <doc xml:lang="EN"> + <xsdxt:code href="api_samples/ports-get-resp.xml" + /> + </doc> + </representation> + </response> &fault401; </method> + <method name="POST" id="createPort"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN" + title="Create Port"> + <para role="shortdesc">Creates a port on a specified + network.</para> + <para>You must specify the network where the port is to + created in the <code>network_id</code> attribute in + the request body.</para> + </wadl:doc> + <request> &portCreateParameters; <representation + mediaType="application/json"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/port-post-create-req.json"/> + </doc> + </representation> + </request> + <response status="201"> &portListParameters; <representation + mediaType="application/json"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/port_create_or_update_resp.json" + /> + </doc> + </representation> + </response> &fault400; &fault401; &fault403; &fault404; + &fault503macGeneration; &fault503; </method> + <method name="POST" id="bulkCreatePorts"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN" + title="Bulk Create Ports"> + <para role="shortdesc">Creates multiple ports in a single + request. Specify a list of ports in the request + body.</para> + <para>Guarantees the atomic completion of the bulk + operation.</para> + </wadl:doc> + <request> &portCreateParameters; <representation + mediaType="application/json"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/ports-post-create-bulk-req.json" + /> + </doc> + </representation> + <representation mediaType="application/xml"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/ports-post-create-bulk-req.xml" + /> + </doc> + </representation> + </request> + <response status="201"> &portListParameters; <representation + mediaType="application/json"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/ports-create-bulk-resp.json" + /> + </doc> + </representation> + <representation mediaType="application/xml"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/ports-create-bulk-resp.xml" + /> + </doc> + </representation> + </response> &fault400; &fault401; &fault403; &fault404; + &fault409conflict; &fault503macGeneration; </method> + <method name="GET" id="showPort"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN" + title="Show Port"> + <para role="shortdesc">Shows information for a specified + port.</para> + </wadl:doc> + <response status="200"> &portListParameters; <representation + mediaType="application/json"> + <doc xml:lang="EN"> + <xsdxt:code href="api_samples/ports-get-resp.json" + /> + </doc> + </representation> + <representation mediaType="application/xml"> + <doc xml:lang="EN"> + <xsdxt:code href="api_samples/ports-get-resp.xml" + /> + </doc> + </representation> + </response> &fault401; &fault404; </method> + <method name="PUT" id="updatePort"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN" + title="Update Port"> + <para role="shortdesc">Updates a specified port.</para> + <para>You can update information for a port, such as its + symbolic name and associated IPs. When you update IPs + for a port, any previously associated IPs are removed, + returned to the respective subnets allocation pools, + and replaced by the IPs specified in the body for the + update request. Therefore, this operation replaces the + <code>fixed_ip</code> attribute when it is + specified in the request body. If the updated IP + addresses are not valid or are already in use, the + operation fails and the existing IP addresses are not + removed from the port.</para> + <para>When you update security groups for a port and the + operation succeeds, any associated security groups are + removed and replaced by the security groups specified + in the body for the update request. Therefore, this + operation replaces the <code>security_groups</code> + attribute when you specify it in the request body. + However, if the specified security groups are not + valid, the operation fails and the existing security + groups are not removed from the port.</para> + </wadl:doc> + <request> &portCreateParameters; <representation + mediaType="application/json"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/port-post-create-req.json"/> + </doc> + </representation> + </request> + <response status="200"> &portListParameters; <representation + mediaType="application/json"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/port_create_or_update_resp.json" + /> + </doc> + </representation> + <representation mediaType="application/xml"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/port_create_or_update_resp.xml" + /> + </doc> + </representation> + </response> &fault400; &fault401; &fault403; &fault404; + &fault409conflict; </method> + <method name="DELETE" id="removePort"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN" + title="Delete Port"> + <para role="shortdesc">Deletes a specified port.</para> + <para>Any IP addresses that are associated with the port + are returned to the respective subnets allocation + pools.</para> + </wadl:doc> + <response status="204"/> &fault401; &fault403; &fault404; + </method> +</application> diff --git a/v2.0/wadl/os-quotas.wadl b/v2.0/wadl/os-quotas.wadl new file mode 100644 index 0000000..1d2ff57 --- /dev/null +++ b/v2.0/wadl/os-quotas.wadl @@ -0,0 +1,163 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- (C) 2013 OpenStack Foundation, All Rights Reserved --> + +<!--*******************************************************--> +<!-- Import Common XML Entities --> +<!-- --> +<!-- You can resolve the entites with xmllint --> +<!-- --> +<!-- xmllint -noent os-quotas.wadl --> +<!--*******************************************************--> +<!DOCTYPE application [<!ENTITY % common SYSTEM "common.ent"> +%common;]> +<application xmlns:capi="http://docs.openstack.org/common/api/v1.0" + xmlns:html="http://www.w3.org/1999/xhtml" + xmlns:wadl="http://wadl.dev.java.net/2009/02" + xmlns="http://wadl.dev.java.net/2009/02" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:db="http://docbook.org/ns/docbook" + xmlns:csapi="http://docs.openstack.org/netconn/api/v1.0" + xmlns:osapi="http://docs.openstack.org/netconn/api/v1.0" + xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" + xmlns:common="http://docs.openstack.org/common/api/v1.0" + xmlns:atom="http://www.w3.org/2005/Atom" + xsi:schemaLocation="http://docs.openstack.org/netconn/api/v1.0 + xsd/api.xsd + http://docs.openstack.org/common/api/v1.0 + xsd/common.xsd + http://wadl.dev.java.net/2009/02 + http://www.w3.org/Submission/wadl/wadl.xsd + "> + + <!--*******************************************************--> + <!-- All Resources --> + <!--*******************************************************--> + + <resources base="https://neutron.example.com/"> + <resource id="version" type="#VersionDetails" path="v2/"> + <resource id="tenantID" path="{tenant_id}"> + <param name="tenant_id" style="template" + type="csapi:UUID"> + <doc> + <p xmlns="http://www.w3.org/1999/xhtml">The + tenant ID in a multi-tenancy cloud.</p> + </doc> + </param> + <resource id="Quotas" type="#QuotaList" path="quotas"> + + <method href="#listQuotas"/> + <resource path="{quota_id}"> + <param name="quota_id" style="template" type="csapi:UUID"> + <wadl:doc xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" title="Quota ID"> + <p>The UUID for the quota of interest to you.</p></wadl:doc> + </param> + <method href="#showQuota"/> + <method href="#updateQuota"/> + <method href="#resetQuota"/> + </resource> + </resource> + </resource> + </resource> + </resources> + + + <!--*******************************************************--> + <!-- All Methods --> + <!--*******************************************************--> + + <method name="GET" id="listQuotas"> + <wadl:doc xml:lang="EN" + xmlns="http://docbook.org/ns/docbook" title="List Quotas"> + <para role="shortdesc">Lists quotas for tenants who have non-default quota values. + </para> + </wadl:doc> + <response status="200"> + <representation mediaType="application/json"> + <doc xml:lang="EN"> + <xsdxt:code href="api_samples/quotas-list-res.json" /> + </doc> + </representation> + </response> + <response status="401" xmlns="http://wadl.dev.java.net/2009/02"> + <representation mediaType="application/xml" element="csapi:unauthorized"/> + <representation mediaType="application/json"/> + </response> + <response status="403" xmlns="http://wadl.dev.java.net/2009/02"> + <representation mediaType="application/xml" element="csapi:forbidden"/> + <representation mediaType="application/json"/> + </response> + </method> + <method name="GET" id="showQuota"> + <wadl:doc xml:lang="EN" + xmlns="http://docbook.org/ns/docbook" title="Show Quota"> + <para role="shortdesc"> + Shows information for a specified quota. + </para> + </wadl:doc> + <response status="200"> + <representation mediaType="application/json"> + <doc xml:lang="EN"> + <xsdxt:code href="api_samples/quotas-show-res.json" /> + </doc> + </representation> + </response> + <response status="401" xmlns="http://wadl.dev.java.net/2009/02"> + <representation mediaType="application/xml" element="osapi:unauthorized"/> + <representation mediaType="application/json"/> + </response> + <response status="403" xmlns="http://wadl.dev.java.net/2009/02"> + <representation mediaType="application/xml" element="osapi:forbidden"/> + <representation mediaType="application/json"/> + </response> + </method> + + <method name="PUT" id="updateQuota"> + <wadl:doc xml:lang="EN" + xmlns="http://docbook.org/ns/docbook" title="Update Quota"> + <para role="shortdesc"> + Updates quotas for a specified tenant. Use when non-default quotas are desired. + </para> + </wadl:doc> + <request><representation mediaType="application/json"> + <doc xml:lang="EN"> + <xsdxt:code href="api_samples/quotas-put-req.json" /> + </doc> + </representation></request> + <response status="200"> + <representation mediaType="application/json"> + <doc xml:lang="EN"> + <xsdxt:code href="api_samples/quotas-put-res.json" /> + </doc> + </representation> + </response> + <response status="401" xmlns="http://wadl.dev.java.net/2009/02"> + <representation mediaType="application/xml" element="osapi:unauthorized"/> + <representation mediaType="application/json"/> + </response> + <response status="403" xmlns="http://wadl.dev.java.net/2009/02"> + <representation mediaType="application/xml" element="osapi:forbidden"/> + <representation mediaType="application/json"/> + </response> + </method> + + <method name="DELETE" id="resetQuota"> + <wadl:doc xml:lang="EN" + xmlns="http://docbook.org/ns/docbook" title="Reset Quota"> + <para role="shortdesc"> + Resets quotas to default values for a specified tenant. + </para> + </wadl:doc> + <response status="204" /> + <response status="401" xmlns="http://wadl.dev.java.net/2009/02"> + <representation mediaType="application/xml" element="osapi:unauthorized"/> + <representation mediaType="application/json"/> + </response> + <response status="403" xmlns="http://wadl.dev.java.net/2009/02"> + <representation mediaType="application/xml" element="osapi:forbidden"/> + <representation mediaType="application/json"/> + </response> + </method> + +</application> diff --git a/v2.0/wadl/os-subnets.wadl b/v2.0/wadl/os-subnets.wadl new file mode 100644 index 0000000..82965ee --- /dev/null +++ b/v2.0/wadl/os-subnets.wadl @@ -0,0 +1,284 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- (C) 2013 OpenStack Foundation, All Rights Reserved --> +<!--*******************************************************--> +<!-- Import Common XML Entities --> +<!-- --> +<!-- You can resolve the entites with xmllint --> +<!-- --> +<!-- xmllint -noent os-subnets.wadl --> +<!--*******************************************************--> +<!DOCTYPE application [<!ENTITY % common SYSTEM "common.ent"> +%common;]> +<application xmlns="http://wadl.dev.java.net/2009/02" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:linkend="http://www.w3.org/1999/linkend" + xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" + xmlns:xsd="http://docs.rackspacecloud.com/xsd/v1.0" + xmlns:wadl="http://wadl.dev.java.net/2009/02" + xmlns:csapi="http://docs.openstack.org/compute/api/v1.1"> + <!--*******************************************************--> + <!-- All Resources --> + <!--*******************************************************--> + + <resources base="https://neutron.example.com/"> + <resource id="version" type="#VersionDetails" path="v2/"> + <resource id="tenantID" path="{tenant_id}"> + <param name="tenant_id" style="template" + type="csapi:UUID"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" + xml:lang="EN"> + <para>The tenant ID in a multi-tenancy + cloud.</para> + </wadl:doc> + </param> + <resource id="Subnets" type="#SubnetList" + path="subnets"> + <method href="#listSubnets"/> + <method href="#createSubnet"/> + <method href="#bulkCreateSubnet"/> + <resource path="{subnet_id}"> + <param name="subnet_id" style="template" + type="csapi:UUID"> + <wadl:doc + xmlns="http://docbook.org/ns/docbook" + xml:lang="EN" title="Subnet ID"> + <para>The UUID for the subnet of + interest to you.</para> + </wadl:doc> + </param> + <method href="#showSubnet"/> + <method href="#updateSubnet"/> + <method href="#removeSubnet"/> + </resource> + </resource> + </resource> + </resource> + </resources> + + <!--*******************************************************--> + <!-- All Methods --> + <!--*******************************************************--> + + <method name="GET" id="listSubnets"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN" + title="List Subnets"> + <para role="shortdesc">Lists subnets to which the + specified tenant has access.</para> + <para>Default policy settings returns exclusively subnets + owned by the tenant submitting the request, unless the + request is submitted by an user with administrative + rights. You can control which attributes are returned + by using the fields query parameter. You can filter + results by using query string parameters. For + information, see <link + xlink:href="http://docs.openstack.org/api/openstack-network/2.0/content/filtering.html" + >Filtering and Column Selection</link> in the + <citetitle>OpenStack Networking API v2.0 + Reference</citetitle>.</para> + </wadl:doc> + <response status="200"> + <representation mediaType="application/json"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/subnets-get-res.json"/> + </doc> + </representation> + <representation mediaType="application/xml"> + <doc xml:lang="EN"> + <xsdxt:code href="api_samples/subnets-get-res.xml" + /> + </doc> + </representation> + </response> + &fault401; + </method> + <method name="POST" id="createSubnet"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN" + title="Create Subnet"> + <para role="shortdesc">Creates a subnet on a specified + network.</para> + <para>By default, OpenStack Networking creates IP v4 + subnets. To create an IP v6 subnet, you must specify + the value 6 for the <code>ip_version</code> attribute + in the request body. OpenStack Networking does not try + to derive the correct IP version from the provided + CIDR. If the parameter for the gateway address, + <code>gateway_ip</code>, is not specified, + OpenStack Networking allocates an address from the + cidr for the gateway for the subnet.</para> + <para>To specify a subnet without a gateway, specify the + value null for the <code>gateway_ip</code> attribute + in the request body. If allocation pools attribute, + <code>allocation_pools</code>, is not specified, + OpenStack Networking automatically allocates pools for + covering all IP addresses in the CIDR, excluding the + address reserved for the subnet gateway. Otherwise, + you can explicitly specify allocation pools as shown + in the following example.</para> + <para>When <code>allocation_pools</code> and + <code>gateway_ip</code> are both specified, it is + up to the user to ensure that the gateway IP does not + overlap with the specified allocation pools; otherwise + a 409 Conflict error occurs.</para> + </wadl:doc> + <request> &subnetCreateParameters; <representation + mediaType="application/json"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/subnets-post-create-bulk-req.json" + /> + </doc> + </representation> + <representation mediaType="application/xml"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/subnets-post-create-bulk-req.xml" + /> + </doc> + </representation> + </request> + <response status="201"> &subnetListParameters; <representation + mediaType="application/json"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/subnets-create-bulk-resp.json" + /> + </doc> + </representation> + <representation mediaType="application/xml"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/subnets-create-bulk-resp.xml" + /> + </doc> + </representation> + </response> + &fault400; &fault401; &fault403; &fault404; &fault409conflict; + </method> + <method name="POST" id="bulkCreateSubnet"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN" + title="Create Subnet"> + <para role="shortdesc">Creates multiple subnets in a + single request. Specify a list of subnets in the + request body.</para> + <para>The bulk create operation is always atomic. Either + all or no subnets in the request body are + created.</para> + </wadl:doc> + <request> &subnetCreateParameters; <representation + mediaType="application/json"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/subnets-post-create-bulk-req.json" + /> + </doc> + </representation> + <representation mediaType="application/xml"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/subnets-post-create-bulk-req.xml" + /> + </doc> + </representation> + </request> + <response status="201"> &subnetListParameters; <representation + mediaType="application/json"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/subnets-create-bulk-resp.json" + /> + </doc> + </representation> + <representation mediaType="application/xml"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/subnets-create-bulk-resp.xml" + /> + </doc> + </representation> + </response> + &fault400; &fault401; &fault403; &fault404; &fault409conflict; + </method> + <method name="GET" id="showSubnet"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN" + title="Show Subnet"> + <para role="shortdesc">Shows information for a specified + subnet.</para> + <para>You can control which attributes are returned by + using the fields query parameter. For information, see + <link + xlink:href="http://docs.openstack.org/api/openstack-network/2.0/content/filtering.html" + >Filtering and Column Selection</link> in the + <citetitle>OpenStack Networking API v2.0 + Reference</citetitle>.</para> + </wadl:doc> + <response status="201"> &subnetListParameters; <representation + mediaType="application/json"> + <doc xml:lang="EN"> + <xsdxt:code href="api_samples/subnet-get-res.json" + /> + </doc> + </representation> + <representation mediaType="application/xml"> + <doc xml:lang="EN"> + <xsdxt:code href="api_samples/subnet-get-res.xml" + /> + </doc> + </representation> + </response> + &fault401; &fault404; + </method> + + <method name="PUT" id="updateSubnet"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN" + title="Update Subnet"> + <para role="shortdesc">Updates a specified subnet.</para> + <para>Some attributes, such as IP version (ip_version), + CIDR (cidr), and IP allocation pools + (allocation_pools) cannot be updated. Attempting to + update these attributes results in a 400 Bad Request + error.</para> + </wadl:doc> + <request> &subnetCreateParameters; <representation + mediaType="application/json"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/subnet-post-req.json"/> + </doc> + </representation> + <representation mediaType="application/xml"> + <doc xml:lang="EN"> + <xsdxt:code href="api_samples/subnet-post-req.xml" + /> + </doc> + </representation> + </request> + <response status="201"> &subnetListParameters; <representation + mediaType="application/json"> + <doc xml:lang="EN"> + <xsdxt:code + href="api_samples/subnet-post-res.json"/> + </doc> + </representation> + <representation mediaType="application/xml"> + <doc xml:lang="EN"> + <xsdxt:code href="api_samples/subnet-post-res.xml" + /> + </doc> + </representation> + </response> + &fault400; &fault401; &fault403; &fault404; + </method> + + <method name="DELETE" id="removeSubnet"> + <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN" + title="Delete Subnet"> + <para role="shortdesc">Deletes a specified subnet.</para> + <para>The operation fails if subnet IP addresses are still + allocated.</para> + </wadl:doc> + <response status="204"/> + &fault401; &fault404; &fault409conflict; + </method> +</application> diff --git a/v2.0/xsd/actions.xsd b/v2.0/xsd/actions.xsd index 5633438..ccdf849 100644 --- a/v2.0/xsd/actions.xsd +++ b/v2.0/xsd/actions.xsd @@ -1,106 +1,94 @@ <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="../xslt/schema.xsl"?> -<!-- (C) 2011 OpenStack LLC., All Rights Reserved --> +<!-- (C) 2011-2013 OpenStack Foundation, All Rights Reserved --> -<schema - elementFormDefault="qualified" - attributeFormDefault="unqualified" - xmlns="http://www.w3.org/2001/XMLSchema" - xmlns:csapi="http://docs.openstack.org/compute/api/v1.1" - xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://docs.openstack.org/compute/api/v1.1" -> +<schema elementFormDefault="qualified" + attributeFormDefault="unqualified" + xmlns="http://www.w3.org/2001/XMLSchema" + xmlns:csapi="http://docs.openstack.org/compute/api/v1.1" + xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + targetNamespace="http://docs.openstack.org/compute/api/v1.1"> <annotation> - <xsd:appinfo - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> + <xsd:appinfo xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml"> <xsdxt:title>Server Actions</xsdxt:title> - <xsdxt:link rel="index" href="api.xsd" /> + <xsdxt:link rel="index" href="api.xsd"/> </xsd:appinfo> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - This schema file defines actions that can be performed on a + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>This schema file defines actions that can be performed on a cloud server. All cloud server actions are derived from the <a - href="#type_Action" title="See definition of - Action">Action</a> type. - </p> + href="#type_Action" title="See definition of + Action" + >Action</a> type.</p> </xsd:documentation> </annotation> <include schemaLocation="server.xsd"> - <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - Types related to servers. - </p> - </xsd:documentation> - </annotation> + <annotation> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>Types related to servers.</p> + </xsd:documentation> + </annotation> </include> - <element name="reboot" type="csapi:Reboot"> + <element name="reboot" type="csapi:Reboot"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - Performs a HARD or SOFT reboot. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>Performs a HARD or SOFT reboot.</p> </xsd:documentation> <xsd:appinfo> <xsdxt:samples> <xsdxt:sample> - <xsdxt:code type="application/xml" href="../samples/reboot.xml" /> + <xsdxt:code type="application/xml" + href="../samples/reboot.xml"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/json" href="../samples/reboot.json" /> + <xsdxt:code type="application/json" + href="../samples/reboot.json"/> </xsdxt:sample> </xsdxt:samples> </xsd:appinfo> </annotation> </element> - <element name="rebuild" type="csapi:Rebuild"> + <element name="rebuild" type="csapi:Rebuild"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - Rebuilds a server. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>Rebuilds a server.</p> </xsd:documentation> <xsd:appinfo> <xsdxt:samples> <xsdxt:sample> - <xsdxt:code type="application/xml" href="../samples/rebuild.xml" /> + <xsdxt:code type="application/xml" + href="../samples/rebuild.xml"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/json" href="../samples/rebuild.json" /> + <xsdxt:code type="application/json" + href="../samples/rebuild.json"/> </xsdxt:sample> </xsdxt:samples> </xsd:appinfo> </annotation> </element> - <element name="resize" type="csapi:Resize"> + <element name="resize" type="csapi:Resize"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - Resizes a server. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>Resizes a server.</p> </xsd:documentation> <xsd:appinfo> <xsdxt:samples> <xsdxt:sample> - <xsdxt:code type="application/xml" href="../samples/resize.xml" /> + <xsdxt:code type="application/xml" + href="../samples/resize.xml"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/json" href="../samples/resize.json" /> + <xsdxt:code type="application/json" + href="../samples/resize.json"/> </xsdxt:sample> </xsdxt:samples> </xsd:appinfo> @@ -108,20 +96,19 @@ </element> <element name="confirmResize" type="csapi:ConfirmResize"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - Confirms a resize action. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>Confirms a resize action.</p> </xsd:documentation> <xsd:appinfo> <xsdxt:samples> <xsdxt:sample> - <xsdxt:code type="application/xml" href="../samples/confirmresize.xml" /> + <xsdxt:code type="application/xml" + href="../samples/confirmresize.xml"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/json" href="../samples/confirmresize.json" /> + <xsdxt:code type="application/json" + href="../samples/confirmresize.json"/> </xsdxt:sample> </xsdxt:samples> </xsd:appinfo> @@ -129,20 +116,19 @@ </element> <element name="revertResize" type="csapi:RevertResize"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - Reverts a resize action. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>Reverts a resize action.</p> </xsd:documentation> <xsd:appinfo> <xsdxt:samples> <xsdxt:sample> - <xsdxt:code type="application/xml" href="../samples/revertresize.xml" /> + <xsdxt:code type="application/xml" + href="../samples/revertresize.xml"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/json" href="../samples/revertresize.json" /> + <xsdxt:code type="application/json" + href="../samples/revertresize.json"/> </xsdxt:sample> </xsdxt:samples> </xsd:appinfo> @@ -150,20 +136,19 @@ </element> <element name="changePassword" type="csapi:ChangePassword"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - Changes a server's password. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>Changes a server's password.</p> </xsd:documentation> <xsd:appinfo> <xsdxt:samples> <xsdxt:sample> - <xsdxt:code type="application/xml" href="../samples/changepassword.xml" /> + <xsdxt:code type="application/xml" + href="../samples/changepassword.xml"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/json" href="../samples/changepassword.json" /> + <xsdxt:code type="application/json" + href="../samples/changepassword.json"/> </xsdxt:sample> </xsdxt:samples> </xsd:appinfo> @@ -171,38 +156,34 @@ </element> <element name="createImage" type="csapi:CreateImage"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The action creates a new image for the server. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>The action creates a new image for the server.</p> </xsd:documentation> <xsd:appinfo> <xsdxt:samples> <xsdxt:sample> - <xsdxt:code type="application/xml" href="../samples/createimage.xml" /> + <xsdxt:code type="application/xml" + href="../samples/createimage.xml"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/json" href="../samples/createimage.json" /> + <xsdxt:code type="application/json" + href="../samples/createimage.json"/> </xsdxt:sample> </xsdxt:samples> </xsd:appinfo> </annotation> </element> - + <!-- Complex Types --> <complexType abstract="true" name="Action"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - This is the base type for all server actions. It is simply + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>This is the base type for all server actions. It is simply a marker abstract type used to differentiate an Action - element from other elements. - </p> + element from other elements.</p> </xsd:documentation> </annotation> <anyAttribute namespace="##other" processContents="lax"/> @@ -211,18 +192,18 @@ <complexType name="Reboot"> <complexContent> <extension base="csapi:Action"> - <sequence> - <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> - </sequence> - <attribute name="type" type="csapi:RebootType" use="required"> + <sequence> + <any namespace="##other" processContents="lax" minOccurs="0" + maxOccurs="unbounded"/> + </sequence> + <attribute name="type" type="csapi:RebootType" use="required"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The <a href="#type_RebootType" title="See definition - of RebootType">type</a> of reboot to perform. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>The <a href="#type_RebootType" + title="See definition + of RebootType" + >type</a> of reboot to perform.</p> </xsd:documentation> </annotation> </attribute> @@ -233,78 +214,63 @@ <complexType name="Rebuild"> <complexContent> <extension base="csapi:Action"> - <sequence> - <element name="metadata" type="csapi:Metadata" minOccurs="0"> - <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - A collection of meta data items - associated with the server. If not - specified the original server metadata - will be kept. - </p> - </xsd:documentation> - </annotation> - </element> - <element name="personality" type="csapi:Personality" minOccurs="0"> - <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - A collection of small <a - href="#type_File" title="See definition - of file">files</a> used to personalize a - new server instance. Exisiting server - personality files are deleted by the - rebuild process. - </p> - </xsd:documentation> - </annotation> - </element> - <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> - </sequence> - <attribute type="xsd:string" name="name" use="optional"> - <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The name of the server. If not specified the - original server name will be kept. - </p> - </xsd:documentation> - </annotation> - </attribute> - <attribute type="xsd:string" name="adminPass" use="optional"> - <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The server's administration password. - </p> - </xsd:documentation> - </annotation> - </attribute> - <attribute name="imageRef" type="xsd:anyURI" use="required"> - <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - A reference to an image to use for the - rebuild. A local image need contain only an - Image ID. External images must contian a - link that provides the full path to the - image resource. You must supply an image - when rebuilding. - </p> - </xsd:documentation> - </annotation> - </attribute> + <sequence> + <element name="metadata" type="csapi:Metadata" minOccurs="0"> + <annotation> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>A collection of meta data items associated with the + server. If not specified the original server + metadata will be kept.</p> + </xsd:documentation> + </annotation> + </element> + <element name="personality" type="csapi:Personality" + minOccurs="0"> + <annotation> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>A collection of small <a href="#type_File" + title="See definition + of file" + >files</a> used to personalize a new server + instance. Existing server personality files are + deleted by the rebuild process.</p> + </xsd:documentation> + </annotation> + </element> + <any namespace="##other" processContents="lax" minOccurs="0" + maxOccurs="unbounded"/> + </sequence> + <attribute type="xsd:string" name="name" use="optional"> + <annotation> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>The name of the server. If not specified the original + server name will be kept.</p> + </xsd:documentation> + </annotation> + </attribute> + <attribute type="xsd:string" name="adminPass" use="optional"> + <annotation> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>The administration password for the server.</p> + </xsd:documentation> + </annotation> + </attribute> + <attribute name="imageRef" type="xsd:anyURI" use="required"> + <annotation> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>A reference to an image to use for the rebuild. A + local image must contain only an image ID. External + images must contain a link that provides the full path + to the image resource. You must supply an image when + rebuilding.</p> + </xsd:documentation> + </annotation> + </attribute> </extension> </complexContent> </complexType> @@ -312,20 +278,18 @@ <complexType name="Resize"> <complexContent> <extension base="csapi:Action"> - <sequence> - <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> - </sequence> - <attribute name="flavorRef" type="xsd:anyURI" use="required"> - <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - A reference to the flavor to convert to. - </p> - </xsd:documentation> - </annotation> - </attribute> + <sequence> + <any namespace="##other" processContents="lax" minOccurs="0" + maxOccurs="unbounded"/> + </sequence> + <attribute name="flavorRef" type="xsd:anyURI" use="required"> + <annotation> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>A reference to the flavor to convert to.</p> + </xsd:documentation> + </annotation> + </attribute> </extension> </complexContent> </complexType> @@ -333,73 +297,68 @@ <complexType name="ConfirmResize"> <complexContent> <extension base="csapi:Action"> - <sequence> - <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> - </sequence> + <sequence> + <any namespace="##other" processContents="lax" minOccurs="0" + maxOccurs="unbounded"/> + </sequence> </extension> </complexContent> </complexType> <complexType name="RevertResize"> <complexContent> - <extension base="csapi:Action" > - <sequence> - <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> - </sequence> + <extension base="csapi:Action"> + <sequence> + <any namespace="##other" processContents="lax" minOccurs="0" + maxOccurs="unbounded"/> + </sequence> </extension> </complexContent> </complexType> <complexType name="ChangePassword"> <complexContent> - <extension base="csapi:Action" > - <sequence> - <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> - </sequence> - <attribute type="xsd:string" name="adminPass" use="required"> - <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The server's administration password. - </p> - </xsd:documentation> - </annotation> - </attribute> + <extension base="csapi:Action"> + <sequence> + <any namespace="##other" processContents="lax" minOccurs="0" + maxOccurs="unbounded"/> + </sequence> + <attribute type="xsd:string" name="adminPass" use="required"> + <annotation> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>The server's administration password.</p> + </xsd:documentation> + </annotation> + </attribute> </extension> </complexContent> </complexType> <complexType name="CreateImage"> <complexContent> - <extension base="csapi:Action" > - <sequence> - <element name="metadata" type="csapi:Metadata" minOccurs="0"> - <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - A collection of meta data items - associated with the image. - </p> - </xsd:documentation> - </annotation> - </element> - <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> - </sequence> - <attribute type="xsd:string" name="name" use="required"> - <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The name of the image to create. - </p> - </xsd:documentation> - </annotation> - </attribute> + <extension base="csapi:Action"> + <sequence> + <element name="metadata" type="csapi:Metadata" minOccurs="0"> + <annotation> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>A collection of meta data items associated with the + image.</p> + </xsd:documentation> + </annotation> + </element> + <any namespace="##other" processContents="lax" minOccurs="0" + maxOccurs="unbounded"/> + </sequence> + <attribute type="xsd:string" name="name" use="required"> + <annotation> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>The name of the image to create.</p> + </xsd:documentation> + </annotation> + </attribute> </extension> </complexContent> </complexType> @@ -409,31 +368,24 @@ <restriction base="xsd:string"> <enumeration value="HARD"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - A HARD reboot is equivalent to power cycling the server. - The operating system is not allowed to gracefully - shutdown. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>A HARD reboot is equivalent to power cycling the + server. The operating system is not allowed to + gracefully shut down.</p> </xsd:documentation> </annotation> </enumeration> <enumeration value="SOFT"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - With a SOFT reboot, the operating system is signaled to - restart. This allows for a graceful shutdown of all - processes. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>With a SOFT reboot, the operating system is signaled to + restart, which enables a graceful shut down of all + processes.</p> </xsd:documentation> </annotation> </enumeration> </restriction> </simpleType> </schema> - diff --git a/v2.0/xsd/common.xsd b/v2.0/xsd/common.xsd index c157ea5..bd26cef 100644 --- a/v2.0/xsd/common.xsd +++ b/v2.0/xsd/common.xsd @@ -1,71 +1,64 @@ <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="../xslt/schema.xsl"?> -<!-- (C) 2011 OpenStack LLC., All Rights Reserved --> +<!-- (C) 2011-2013 OpenStack Foundation, All Rights Reserved --> -<schema - elementFormDefault="qualified" - attributeFormDefault="unqualified" - xmlns="http://www.w3.org/2001/XMLSchema" - xmlns:csapi="http://docs.openstack.org/compute/api/v1.1" - xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:atom="http://www.w3.org/2005/Atom" - xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" - targetNamespace="http://docs.openstack.org/compute/api/v1.1" -> +<schema elementFormDefault="qualified" + attributeFormDefault="unqualified" + xmlns="http://www.w3.org/2001/XMLSchema" + xmlns:csapi="http://docs.openstack.org/compute/api/v1.1" + xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:atom="http://www.w3.org/2005/Atom" + xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" + targetNamespace="http://docs.openstack.org/compute/api/v1.1"> <annotation> - <xsd:appinfo - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> + <xsd:appinfo xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml"> <xsdxt:title>Common Types</xsdxt:title> - <xsdxt:link rel="index" href="api.xsd" /> + <xsdxt:link rel="index" href="api.xsd"/> </xsd:appinfo> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - This schema file defines common types used by multiple - entities and possibly spanning several types of requests. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> This schema file defines common types used by multiple + entities and possibly spanning several types of requests. </p> </xsd:documentation> </annotation> <!-- Import ATOM specific schema definitions --> - <import vc:minVersion="1.1" namespace="http://www.w3.org/2005/Atom" schemaLocation="atom/atom.xsd" /> + <import vc:minVersion="1.1" namespace="http://www.w3.org/2005/Atom" + schemaLocation="atom/atom.xsd"/> <complexType name="Metadata"> <sequence> - <element name="meta" type="csapi:MetadataItem" minOccurs="0" maxOccurs="1000"> + <element name="meta" type="csapi:MetadataItem" minOccurs="0" + maxOccurs="1000"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - A collection of metadata items. There may be an + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> A collection of metadata items. There may be an absolute limit that imposes additional constraints on - the number of metadata items. - </p> + the number of metadata items. </p> </xsd:documentation> </annotation> </element> - <element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" /> - <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> + <element vc:minVersion="1.1" ref="atom:link" minOccurs="0" + maxOccurs="unbounded"/> + <any namespace="##other" processContents="lax" minOccurs="0" + maxOccurs="unbounded"/> </sequence> <anyAttribute namespace="##other" processContents="lax"/> </complexType> <complexType name="MetadataItem"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - A MetadataItem is simply a name-value pair. The name is + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> A MetadataItem is simply a name-value pair. The name is specified in the key attribute and the <a - href="#type_MetadataValue" title="See definition of - MetadataValue">value</a> is included inline. - </p> + href="#type_MetadataValue" + title="See definition of + MetadataValue" + >value</a> is included inline. </p> <xsdxt:code type="application/xml"> <![CDATA[ <meta xmlns="http://docs.openstack.org/compute/api/v1.0" @@ -76,14 +69,11 @@ </annotation> <simpleContent> <extension base="csapi:MetadataValue"> - <attribute name="key" type="csapi:MetadataKey" use="required"> + <attribute name="key" type="csapi:MetadataKey" use="required"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - A meta data name-value pair. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> A meta data name-value pair. </p> </xsd:documentation> </annotation> </attribute> @@ -95,62 +85,54 @@ <!-- Simple types that span multiple requests --> <simpleType name="Progress"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - An integer between 0 and 100 that denotes the progress of an - operation. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> An integer between 0 and 100 that denotes the progress of + an operation. </p> </xsd:documentation> </annotation> <restriction base="xsd:int"> <minInclusive value="0"/> - <maxInclusive value="100" /> + <maxInclusive value="100"/> </restriction> </simpleType> <simpleType name="UUID"> - <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - A universally unique identifier. - </p> - </xsd:documentation> - </annotation> - <restriction base="xsd:string"> - <length value="36" fixed="true"/> - <pattern value="[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}"/> - </restriction> + <annotation> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> A universally unique identifier. </p> + </xsd:documentation> + </annotation> + <restriction base="xsd:string"> + <length value="36" fixed="true"/> + <pattern + value="[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + /> + </restriction> </simpleType> <simpleType name="ExtendedStatus"> - <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - An extended status must contian a prefix. - </p> - </xsd:documentation> - </annotation> - <restriction base="xsd:string"> - <pattern value="(\w|-)+:\w+"/> - </restriction> + <annotation> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> An extended status must contain a prefix. </p> + </xsd:documentation> + </annotation> + <restriction base="xsd:string"> + <pattern value="(\w|-)+:\w+"/> + </restriction> </simpleType> <simpleType name="MetadataKey"> <restriction base="xsd:string"> - <maxLength value="255" /> + <maxLength value="255"/> </restriction> </simpleType> <simpleType name="MetadataValue"> <restriction base="xsd:string"> - <maxLength value="255" /> + <maxLength value="255"/> </restriction> </simpleType> </schema> - diff --git a/v2.0/xsd/extensions.xsd b/v2.0/xsd/extensions.xsd index ccebe7b..278934a 100644 --- a/v2.0/xsd/extensions.xsd +++ b/v2.0/xsd/extensions.xsd @@ -1,53 +1,51 @@ <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="../xslt/schema.xsl"?> -<!-- (C) 2011 OpenStack LLC., All Rights Reserved --> +<!-- (C) 2011-2013 OpenStack Foundation, All Rights Reserved --> -<xsd:schema elementFormDefault="qualified" attributeFormDefault="unqualified" - targetNamespace="http://docs.openstack.org/common/api/v1.0" - xmlns:ext="http://docs.openstack.org/common/api/v1.0" - xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" - xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" - xmlns:html="http://www.w3.org/1999/xhtml" - xmlns:atom="http://www.w3.org/2005/Atom" - xmlns:xsd="http://www.w3.org/2001/XMLSchema"> +<xsd:schema elementFormDefault="qualified" + attributeFormDefault="unqualified" + targetNamespace="http://docs.openstack.org/common/api/v1.0" + xmlns:ext="http://docs.openstack.org/common/api/v1.0" + xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" + xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" + xmlns:html="http://www.w3.org/1999/xhtml" + xmlns:atom="http://www.w3.org/2005/Atom" + xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:annotation> - <xsd:appinfo - xml:lang="EN" + <xsd:appinfo xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml"> <xsdxt:title>Extensions</xsdxt:title> - <xsdxt:link rel="index" href="api-common.xsd" /> + <xsdxt:link rel="index" href="api-common.xsd"/> </xsd:appinfo> - <xsd:documentation - xml:lang="EN" + <xsd:documentation xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml"> - <p> - This schema file defines types related to API - extensions. - </p> + <p> This schema file defines types related to API + extensions. </p> </xsd:documentation> </xsd:annotation> <!-- Import ATOM specific schema definitions --> - <xsd:import vc:minVersion="1.1" namespace="http://www.w3.org/2005/Atom" schemaLocation="atom/atom.xsd" /> + <xsd:import vc:minVersion="1.1" + namespace="http://www.w3.org/2005/Atom" + schemaLocation="atom/atom.xsd"/> <xsd:element name="extensions" type="ext:Extensions"> <xsd:annotation> - <xsd:documentation - xml:lang="EN" + <xsd:documentation xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml"> - <p> - A list of supported extensions. - </p> + <p> A list of supported extensions. </p> </xsd:documentation> <xsd:appinfo> <xsdxt:samples> <xsdxt:sample> - <xsdxt:code type="application/xml" href="../samples/extensions.xml" /> + <xsdxt:code type="application/xml" + href="../samples/extensions.xml"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/json" href="../samples/extensions.json" /> + <xsdxt:code type="application/json" + href="../samples/extensions.json"/> </xsdxt:sample> </xsdxt:samples> </xsd:appinfo> @@ -55,20 +53,19 @@ </xsd:element> <xsd:element name="extension" type="ext:Extension"> <xsd:annotation> - <xsd:documentation - xml:lang="EN" + <xsd:documentation xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml"> - <p> - Detials about a specific extension. - </p> + <p> Detials about a specific extension. </p> </xsd:documentation> <xsd:appinfo> <xsdxt:samples> <xsdxt:sample> - <xsdxt:code type="application/xml" href="../samples/extension.xml" /> + <xsdxt:code type="application/xml" + href="../samples/extension.xml"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/json" href="../samples/extension.json" /> + <xsdxt:code type="application/json" + href="../samples/extension.json"/> </xsdxt:sample> </xsdxt:samples> </xsd:appinfo> @@ -77,105 +74,91 @@ <xsd:complexType name="Extensions"> <xsd:annotation> - <xsd:documentation - xml:lang="EN" + <xsd:documentation xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml"> - <p> - A list of extensions. - </p> + <p> A list of extensions. </p> </xsd:documentation> </xsd:annotation> <xsd:sequence> - <xsd:element name="extension" type="ext:Extension" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" /> - <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> + <xsd:element name="extension" type="ext:Extension" + minOccurs="0" maxOccurs="unbounded"/> + <xsd:element vc:minVersion="1.1" ref="atom:link" + minOccurs="0" maxOccurs="unbounded"/> + <xsd:any namespace="##other" processContents="lax" + minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> <xsd:anyAttribute namespace="##other" processContents="lax"/> </xsd:complexType> <xsd:complexType name="Extension"> <xsd:annotation> - <xsd:documentation - xml:lang="EN" + <xsd:documentation xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml"> - <p> - Detials about a specific extension. - </p> + <p> Details about a specific extension. </p> </xsd:documentation> </xsd:annotation> <xsd:sequence> - <xsd:element name="description" type="xsd:string" minOccurs="1"> + <xsd:element name="description" type="xsd:string" + minOccurs="1"> <xsd:annotation> - <xsd:documentation - xml:lang="EN" + <xsd:documentation xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml"> - <p> - A short description of what the extension - does. - </p> + <p> A short description of what the extension + does. </p> </xsd:documentation> </xsd:annotation> </xsd:element> - <xsd:element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" /> - <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> + <xsd:element vc:minVersion="1.1" ref="atom:link" + minOccurs="0" maxOccurs="unbounded"/> + <xsd:any namespace="##other" processContents="lax" + minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required"> <xsd:annotation> - <xsd:documentation - xml:lang="EN" + <xsd:documentation xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml"> - <p> - A human reabable extension name. - </p> + <p> A human readable extension name. </p> </xsd:documentation> </xsd:annotation> </xsd:attribute> - <xsd:attribute name="namespace" type="xsd:anyURI" use="required"> + <xsd:attribute name="namespace" type="xsd:anyURI" + use="required"> <xsd:annotation> - <xsd:documentation - xml:lang="EN" + <xsd:documentation xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml"> - <p> - Extension namespace used for XML representations. - </p> + <p> Extension namespace used for XML + representations. </p> </xsd:documentation> </xsd:annotation> </xsd:attribute> <xsd:attribute name="alias" type="ext:Alias" use="required"> <xsd:annotation> - <xsd:documentation - xml:lang="EN" + <xsd:documentation xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml"> - <p> - A vendor prefix alieas used for non-XML - representations. - </p> + <p> A vendor prefix alias used for non-XML + representations. </p> </xsd:documentation> </xsd:annotation> </xsd:attribute> - <xsd:attribute name="updated" type="xsd:dateTime" use="optional"> + <xsd:attribute name="updated" type="xsd:dateTime" + use="optional"> <xsd:annotation> - <xsd:documentation - xml:lang="EN" + <xsd:documentation xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml"> - <p> - The time that the extension was added or - modifided. - </p> + <p> The time that the extension was added or + modified. </p> </xsd:documentation> </xsd:annotation> </xsd:attribute> <xsd:anyAttribute namespace="##other" processContents="lax"/> - <xsd:assert vc:minVersion="1.1" test="atom:link[@rel='describedby']"> + <xsd:assert vc:minVersion="1.1" + test="atom:link[@rel='describedby']"> <xsd:annotation> - <xsd:documentation - xml:lang="EN" + <xsd:documentation xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml"> - <p> - There should be at least one atom link with a - describedby relation. This relation provides - developer info for the extension. - </p> + <p> There should be at least one atom link with a + describedby relation. This relation provides + developer info for the extension. </p> </xsd:documentation> </xsd:annotation> </xsd:assert> @@ -183,21 +166,18 @@ <xsd:simpleType name="Alias"> <xsd:annotation> - <xsd:documentation - xml:lang="EN" + <xsd:documentation xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml"> - <p> - Vendor aliases are used to differentiate + <p> Vendor aliases are used to differentiate extensions in non-XML representations as well as - in HTTP headers and in the URL path. An alias is - made of a vendor prefix, followed be a a dash (-) - followed be a short extension ID. For example: - <code>RAX-PIE</code>. - </p> + in HTTP headers and in the URL path. An alias is + made of a vendor prefix, followed be a dash (-) + followed be a short extension ID. For example: + <code>RAX-PIE</code>. </p> </xsd:documentation> </xsd:annotation> <xsd:restriction base="xsd:string"> - <xsd:pattern value="\w+\-\w+" /> + <xsd:pattern value="\w+\-\w+"/> </xsd:restriction> </xsd:simpleType> </xsd:schema> diff --git a/v2.0/xsd/faults.xsd b/v2.0/xsd/faults.xsd index e37e1e6..30d4b71 100644 --- a/v2.0/xsd/faults.xsd +++ b/v2.0/xsd/faults.xsd @@ -1,230 +1,226 @@ <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="../xslt/schema.xsl"?> -<!-- (C) 2011 OpenStack LLC., All Rights Reserved --> +<!-- (C) 2011-2013 OpenStack Foundation, All Rights Reserved --> -<schema - elementFormDefault="qualified" - attributeFormDefault="unqualified" - xmlns="http://www.w3.org/2001/XMLSchema" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:csapi="http://docs.openstack.org/compute/api/v1.1" - xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" - targetNamespace="http://docs.openstack.org/compute/api/v1.1"> +<schema elementFormDefault="qualified" + attributeFormDefault="unqualified" + xmlns="http://www.w3.org/2001/XMLSchema" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:csapi="http://docs.openstack.org/compute/api/v1.1" + xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" + targetNamespace="http://docs.openstack.org/compute/api/v1.1"> <annotation> - <xsd:appinfo - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> + <xsd:appinfo xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml"> <xsdxt:title>Faults</xsdxt:title> - <xsdxt:link rel="index" href="api.xsd" /> + <xsdxt:link rel="index" href="api.xsd"/> </xsd:appinfo> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - This schema file defines faults that may be raised by the - OpenStack Compute API. These faults are derived from the <a - href="#type_ComputeAPIFault" title="See definition of - ComputeAPIFault">ComputeAPIFault</a>. Most faults extend this - type without adding any additional attributes or elements. - The only exceptions is the <a href="#type_OverLimitAPIFault" - title="See definition of - OverLimitAPIFault">OverLimitAPIFault</a> which adds a - <strong>retryAt</strong> attribute and the <a - href="#type_AsyncAPIFault" title="See definition of - AsyncAPIFault">AsyncAPIFault</a> which adds a - <strong>created</strong> timestamp. Because all faults extend - a standard base type, it should be possible to capture all API - faults with a single <code>catch</code> statement. - </p> - <p> - Faults are associated with a default HTTP status code that - corresponds to the particular fault type. For example an <a - href="#element_itemNotFound" title="see definition of - itemNotFound"><itemNotFound></a> element is associated - with the HTTP status code 404. Some elements, the <a - href="#element_computeFault" title="see definition of - computeFault"><computeFault></a> element for - example, may be associated with multiple status codes. It is - also possible for multiple fault elements to be associated - with the same default code. The examples below showcase the - default status codes for each element type. Note that these - default codes are not part of the formal schema. In practice, - however, an element type will likely be associated with its - corresponding default status code. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>This schema file defines faults that may be raised by the + OpenStack Compute API. These faults are derived from the <a + href="#type_ComputeAPIFault" + title="See definition of + ComputeAPIFault" + >ComputeAPIFault</a>. Most faults extend this type without + adding any additional attributes or elements. The only + exceptions is the <a href="#type_OverLimitAPIFault" + title="See definition of + OverLimitAPIFault" + >OverLimitAPIFault</a> which adds a <strong>retryAt</strong> + attribute and the <a href="#type_AsyncAPIFault" + title="See definition of + AsyncAPIFault" + >AsyncAPIFault</a> which adds a <strong>created</strong> + timestamp. Because all faults extend a standard base type, it + should be possible to capture all API faults with a single + <code>catch</code> statement.</p> + <p>Faults are associated with a default HTTP status code that + corresponds to the particular fault type. For example an <a + href="#element_itemNotFound" + title="see definition of + itemNotFound" + ><itemNotFound></a> element is associated with the + HTTP status code 404. Some elements, the <a + href="#element_computeFault" + title="see definition of + computeFault" + ><computeFault></a> element for example, may be + associated with multiple status codes. It is also possible for + multiple fault elements to be associated with the same default + code. The examples below showcase the default status codes for + each element type. Note that these default codes are not part + of the formal schema. In practice, however, an element type + will likely be associated with its corresponding default + status code.</p> </xsd:documentation> </annotation> <!-- Faults --> - <element name="computeFault" type="csapi:ComputeAPIFault"> + <element name="computeFault" type="csapi:ComputeAPIFault"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - A generic Cloud Servers API fault. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>A generic Cloud Servers API fault.</p> </xsd:documentation> <xsd:appinfo> <xsdxt:samples> <xsdxt:sample> - <xsdxt:code type="application/xml" href="../samples/fault.xml" /> + <xsdxt:code type="application/xml" + href="../samples/fault.xml"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/json" href="../samples/fault.json" /> + <xsdxt:code type="application/json" + href="../samples/fault.json"/> </xsdxt:sample> </xsdxt:samples> </xsd:appinfo> </annotation> </element> - <element name="itemNotFound" type="csapi:ItemNotFoundAPIFault"> + <element name="itemNotFound" type="csapi:ItemNotFoundAPIFault"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The item or resource could not be found. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>The item or resource could not be found.</p> </xsd:documentation> <xsd:appinfo> <xsdxt:samples> <xsdxt:sample> - <xsdxt:code type="application/xml" href="../samples/notfound.xml" /> + <xsdxt:code type="application/xml" + href="../samples/notfound.xml"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/json" href="../samples/notfound.json" /> + <xsdxt:code type="application/json" + href="../samples/notfound.json"/> </xsdxt:sample> </xsdxt:samples> </xsd:appinfo> </annotation> </element> - <element name="buildInProgress" type="csapi:BuildInProgressAPIFault"> + <element name="buildInProgress" type="csapi:BuildInProgressAPIFault"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The operation is not allowed because the corresponding - server is in a build state. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>The operation is not allowed because the corresponding + server is in a build state.</p> </xsd:documentation> <xsd:appinfo> <xsdxt:samples> <xsdxt:sample> - <xsdxt:code type="application/xml" href="../samples/build.xml" /> + <xsdxt:code type="application/xml" + href="../samples/build.xml"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/json" href="../samples/build.json" /> + <xsdxt:code type="application/json" + href="../samples/build.json"/> </xsdxt:sample> </xsdxt:samples> </xsd:appinfo> </annotation> </element> - <element name="serverCapacityUnavailable" type="csapi:ServerCapacityUnavailableAPIFault"> + <element name="serverCapacityUnavailable" + type="csapi:ServerCapacityUnavailableAPIFault"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - There is not enough capacity to honor the request. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>There is not enough capacity to honor the request.</p> </xsd:documentation> <xsd:appinfo> <xsdxt:samples> <xsdxt:sample> - <xsdxt:code type="application/xml" href="../samples/serverCap.xml" /> + <xsdxt:code type="application/xml" + href="../samples/serverCap.xml"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/json" href="../samples/serverCap.json" /> + <xsdxt:code type="application/json" + href="../samples/serverCap.json"/> </xsdxt:sample> </xsdxt:samples> </xsd:appinfo> </annotation> </element> - <element name="backupOrResizeInProgress" type="csapi:BackupOrResizeInProgressAPIFault"> + <element name="backupOrResizeInProgress" + type="csapi:BackupOrResizeInProgressAPIFault"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The operation is not allowed because the corresponding - server is being re-sized or backed up. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>The operation is not allowed because the corresponding + server is being re-sized or backed up.</p> </xsd:documentation> <xsd:appinfo> <xsdxt:samples> <xsdxt:sample> - <xsdxt:code type="application/xml" href="../samples/backupInProgress.xml" /> + <xsdxt:code type="application/xml" + href="../samples/backupInProgress.xml"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/json" href="../samples/backupInProgress.json" /> + <xsdxt:code type="application/json" + href="../samples/backupInProgress.json"/> </xsdxt:sample> </xsdxt:samples> </xsd:appinfo> </annotation> </element> - <element name="resizeNotAllowed" type="csapi:ResizeNotAllowedAPIFault"> + <element name="resizeNotAllowed" + type="csapi:ResizeNotAllowedAPIFault"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The re-size operation is not permitted. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>The re-size operation is not permitted.</p> </xsd:documentation> <xsd:appinfo> <xsdxt:samples> <xsdxt:sample> - <xsdxt:code type="application/xml" href="../samples/resizeNotAllowed.xml" /> + <xsdxt:code type="application/xml" + href="../samples/resizeNotAllowed.xml"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/json" href="../samples/resizeNotAllowed.json" /> + <xsdxt:code type="application/json" + href="../samples/resizeNotAllowed.json"/> </xsdxt:sample> </xsdxt:samples> </xsd:appinfo> </annotation> </element> - <element name="serviceUnavailable" type="csapi:ServiceUnavailableAPIFault"> + <element name="serviceUnavailable" + type="csapi:ServiceUnavailableAPIFault"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The API service is currently unavailable. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>The API service is currently unavailable.</p> </xsd:documentation> <xsd:appinfo> <xsdxt:samples> <xsdxt:sample> - <xsdxt:code type="application/xml" href="../samples/serviceNotAvailable.xml" /> + <xsdxt:code type="application/xml" + href="../samples/serviceNotAvailable.xml"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/json" href="../samples/serviceNotAvailable.json" /> + <xsdxt:code type="application/json" + href="../samples/serviceNotAvailable.json"/> </xsdxt:sample> </xsdxt:samples> </xsd:appinfo> </annotation> </element> - <element name="unauthorized" type="csapi:UnauthorizedAPIFault"> + <element name="unauthorized" type="csapi:UnauthorizedAPIFault"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - Insufficient privileges to honor the request, perhaps an - authentication token needs to be obtained or renewed. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>Insufficient privileges to honor the request, perhaps an + authentication token needs to be obtained or renewed.</p> </xsd:documentation> <xsd:appinfo> <xsdxt:samples> <xsdxt:sample> - <xsdxt:code type="application/xml" href="../samples/unauth.xml" /> + <xsdxt:code type="application/xml" + href="../samples/unauth.xml"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/json" href="../samples/unauth.json" /> + <xsdxt:code type="application/json" + href="../samples/unauth.json"/> </xsdxt:sample> </xsdxt:samples> </xsd:appinfo> @@ -232,130 +228,128 @@ </element> <element name="forbidden" type="csapi:ForbiddenAPIFault"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - Authentication has been validated, however the operation is unauthorized. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>Authentication was validated, however the operation is + unauthorized.</p> </xsd:documentation> <xsd:appinfo> <xsdxt:samples> <xsdxt:sample> - <xsdxt:code type="application/xml" href="../samples/forbidden.xml" /> + <xsdxt:code type="application/xml" + href="../samples/forbidden.xml"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/json" href="../samples/forbidden.json" /> + <xsdxt:code type="application/json" + href="../samples/forbidden.json"/> </xsdxt:sample> </xsdxt:samples> </xsd:appinfo> </annotation> </element> - <element name="overLimit" type="csapi:OverLimitAPIFault"> + <element name="overLimit" type="csapi:OverLimitAPIFault"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - An <a href="limits.xsd#type_AbsoluteLimit" title="See - definition of AbsoluteLimit">absolute</a> or <a - href="limits.xsd#type_RateLimit" title="See definition of - RateLimit">rate</a> limit has been exceeded. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>An <a href="limits.xsd#type_AbsoluteLimit" + title="See + definition of AbsoluteLimit" + >absolute</a> or <a href="limits.xsd#type_RateLimit" + title="See definition of + RateLimit">rate</a> + limit has been exceeded.</p> </xsd:documentation> <xsd:appinfo> <xsdxt:samples> <xsdxt:sample> - <xsdxt:code type="application/xml" href="../samples/overlimit.xml" /> + <xsdxt:code type="application/xml" + href="../samples/overlimit.xml"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/json" href="../samples/overlimit.json" /> + <xsdxt:code type="application/json" + href="../samples/overlimit.json"/> </xsdxt:sample> </xsdxt:samples> </xsd:appinfo> </annotation> </element> - <element name="badRequest" type="csapi:BadRequestAPIFault"> + <element name="badRequest" type="csapi:BadRequestAPIFault"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The request is malformed. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>The request is malformed.</p> </xsd:documentation> <xsd:appinfo> <xsdxt:samples> <xsdxt:sample> - <xsdxt:code type="application/xml" href="../samples/badrequest.xml" /> + <xsdxt:code type="application/xml" + href="../samples/badrequest.xml"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/json" href="../samples/badrequest.json" /> + <xsdxt:code type="application/json" + href="../samples/badrequest.json"/> </xsdxt:sample> </xsdxt:samples> </xsd:appinfo> </annotation> </element> - <element name="badMediaType" type="csapi:BadMediaTypeAPIFault"> + <element name="badMediaType" type="csapi:BadMediaTypeAPIFault"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The Content Type of the request is not supported. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>The Content Type of the request is not supported.</p> </xsd:documentation> <xsd:appinfo> <xsdxt:samples> <xsdxt:sample> - <xsdxt:code type="application/xml" href="../samples/badmediatype.xml" /> + <xsdxt:code type="application/xml" + href="../samples/badmediatype.xml"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/json" href="../samples/badmediatype.json" /> + <xsdxt:code type="application/json" + href="../samples/badmediatype.json"/> </xsdxt:sample> </xsdxt:samples> </xsd:appinfo> </annotation> </element> - <element name="badMethod" type="csapi:BadMethodAPIFault"> + <element name="badMethod" type="csapi:BadMethodAPIFault"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The HTTP method (or <a href="limits.xsd#type_HTTPVerb" - title="See definition of HTTPVerb">verb</a>) is not - supported by the corresponding resource. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>The HTTP method (or <a href="limits.xsd#type_HTTPVerb" + title="See definition of HTTPVerb">verb</a>) is not + supported by the corresponding resource.</p> </xsd:documentation> <xsd:appinfo> <xsdxt:samples> <xsdxt:sample> - <xsdxt:code type="application/xml" href="../samples/badmethod.xml" /> + <xsdxt:code type="application/xml" + href="../samples/badmethod.xml"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/json" href="../samples/badmethod.json" /> + <xsdxt:code type="application/json" + href="../samples/badmethod.json"/> </xsdxt:sample> </xsdxt:samples> </xsd:appinfo> </annotation> </element> - <element name="notImplemented" type="csapi:NotImplementedAPIFault"> + <element name="notImplemented" type="csapi:NotImplementedAPIFault"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The operation is currently not implemented. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>The operation is currently not implemented.</p> </xsd:documentation> <xsd:appinfo> <xsdxt:samples> <xsdxt:sample> - <xsdxt:code type="application/xml" href="../samples/notimplemented.xml" /> + <xsdxt:code type="application/xml" + href="../samples/notimplemented.xml"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/json" href="../samples/notimplemented.json" /> + <xsdxt:code type="application/json" + href="../samples/notimplemented.json"/> </xsdxt:sample> </xsdxt:samples> </xsd:appinfo> @@ -367,39 +361,32 @@ <sequence> <element name="message" type="xsd:string"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - A human readable message that is appropriate for display - to the end user. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>A human readable message that is appropriate for + display to the end user.</p> </xsd:documentation> </annotation> </element> <element name="details" type="xsd:string" minOccurs="0"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The optional <details> element may contain useful - information for tracking down errors (e.g a stack - trace). This information may or may not be appropriate - for display to an end user. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>The optional <details> element may contain useful + information for tracking down errors (such as, a stack + trace). This information might not be appropriate for an + end user.</p> </xsd:documentation> </annotation> </element> - <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> + <any namespace="##other" processContents="lax" minOccurs="0" + maxOccurs="unbounded"/> </sequence> <attribute name="code" type="xsd:int" use="required"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The HTTP status code associated with the current fault. + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>The HTTP status code associated with the current fault. </p> </xsd:documentation> </annotation> @@ -409,72 +396,61 @@ <complexType name="ItemNotFoundAPIFault"> <complexContent> - <extension base="csapi:ComputeAPIFault"> - </extension> + <extension base="csapi:ComputeAPIFault"/> </complexContent> </complexType> <complexType name="BuildInProgressAPIFault"> <complexContent> - <extension base="csapi:ComputeAPIFault"> - </extension> + <extension base="csapi:ComputeAPIFault"/> </complexContent> </complexType> <complexType name="ServerCapacityUnavailableAPIFault"> <complexContent> - <extension base="csapi:ComputeAPIFault"> - </extension> + <extension base="csapi:ComputeAPIFault"/> </complexContent> </complexType> <complexType name="BackupOrResizeInProgressAPIFault"> <complexContent> - <extension base="csapi:ComputeAPIFault"> - </extension> + <extension base="csapi:ComputeAPIFault"/> </complexContent> </complexType> <complexType name="ResizeNotAllowedAPIFault"> <complexContent> - <extension base="csapi:ComputeAPIFault"> - </extension> + <extension base="csapi:ComputeAPIFault"/> </complexContent> </complexType> <complexType name="ServiceUnavailableAPIFault"> <complexContent> - <extension base="csapi:ComputeAPIFault"> - </extension> + <extension base="csapi:ComputeAPIFault"/> </complexContent> </complexType> <complexType name="UnauthorizedAPIFault"> <complexContent> - <extension base="csapi:ComputeAPIFault"> - </extension> + <extension base="csapi:ComputeAPIFault"/> </complexContent> </complexType> <complexType name="ForbiddenAPIFault"> <complexContent> - <extension base="csapi:ComputeAPIFault"> - </extension> + <extension base="csapi:ComputeAPIFault"/> </complexContent> </complexType> <complexType name="OverLimitAPIFault"> <complexContent> <extension base="csapi:ComputeAPIFault"> - <attribute name="retryAt" type="xsd:dateTime" use="optional"> + <attribute name="retryAt" type="xsd:dateTime" use="optional"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - An optional dateTime denoting when an operation should - be retried. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>An optional dateTime denoting when an operation + should be retried.</p> </xsd:documentation> </annotation> </attribute> @@ -485,47 +461,40 @@ <complexType name="AsyncAPIFault"> <complexContent> <extension base="csapi:ComputeAPIFault"> - <attribute name="created" type="xsd:dateTime" use="optional"> - <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - An optional dateTime denoting when the fault - was created. - </p> - </xsd:documentation> - </annotation> - </attribute> + <attribute name="created" type="xsd:dateTime" use="optional"> + <annotation> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p>An optional dateTime denoting when the fault + occurred.</p> + </xsd:documentation> + </annotation> + </attribute> </extension> </complexContent> </complexType> <complexType name="BadRequestAPIFault"> <complexContent> - <extension base="csapi:ComputeAPIFault"> - </extension> + <extension base="csapi:ComputeAPIFault"/> </complexContent> </complexType> <complexType name="BadMediaTypeAPIFault"> <complexContent> - <extension base="csapi:ComputeAPIFault"> - </extension> + <extension base="csapi:ComputeAPIFault"/> </complexContent> </complexType> <complexType name="BadMethodAPIFault"> <complexContent> - <extension base="csapi:ComputeAPIFault"> - </extension> + <extension base="csapi:ComputeAPIFault"/> </complexContent> </complexType> <complexType name="NotImplementedAPIFault"> <complexContent> - <extension base="csapi:ComputeAPIFault"> - </extension> + <extension base="csapi:ComputeAPIFault"/> </complexContent> </complexType> diff --git a/v2.0/xsd/limits.xsd b/v2.0/xsd/limits.xsd index 9dd9b17..e551dd6 100644 --- a/v2.0/xsd/limits.xsd +++ b/v2.0/xsd/limits.xsd @@ -1,58 +1,55 @@ <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="../xslt/schema.xsl"?> -<!-- (C) 2011 OpenStack LLC., All Rights Reserved --> +<!-- (C) 2011-2013 OpenStack Foundation, All Rights Reserved --> -<xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified" - targetNamespace="http://docs.openstack.org/common/api/v1.0" - xmlns:limits="http://docs.openstack.org/common/api/v1.0" - xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" - xmlns:html="http://www.w3.org/1999/xhtml" - xmlns:xs="http://www.w3.org/2001/XMLSchema"> +<xs:schema elementFormDefault="qualified" + attributeFormDefault="unqualified" + targetNamespace="http://docs.openstack.org/common/api/v1.0" + xmlns:limits="http://docs.openstack.org/common/api/v1.0" + xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" + xmlns:html="http://www.w3.org/1999/xhtml" + xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:annotation> - <xs:appinfo - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> + <xs:appinfo xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml"> <xsdxt:title>Limits</xsdxt:title> - <xsdxt:link rel="index" href="api-common.xsd" /> + <xsdxt:link rel="index" href="api-common.xsd"/> </xs:appinfo> - <xs:documentation - xml:lang="EN" + <xs:documentation xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml"> - <p> - This schema file defines types related to - preconfigured limits. Limits are used to manage the - capacity of the API and to prevent abuse. The API - defines two kinds of limits <a href="#type_RateLimit" - title="See definition of a RateLimit">RateLimits</a> - and <a href="#type_AbsoluteLimit" title="See + <p>This schema file defines types related to preconfigured + limits. Limits are used to manage the capacity of the + API and to prevent abuse. The API defines two kinds of + limits <a href="#type_RateLimit" + title="See definition of a RateLimit">rate + limits</a> and <a href="#type_AbsoluteLimit" + title="See definition of an - AbsoluteLimit">AbsoluteLimits</a>. RateLimits are - thresholds that are reset after a certain amount of - time passes. Absolute limits are fixed. - </p> + AbsoluteLimit" + >absolute limits</a>. Rate limits are thresholds + that are reset after a certain amount of time passes. + Absolute limits are fixed.</p> </xs:documentation> </xs:annotation> <!-- Live limit definitions --> <xs:element name="limits" type="limits:Limits"> <xs:annotation> - <xs:documentation - xml:lang="EN" + <xs:documentation xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml"> - <p> - The limits element contains information on both rate and - absolute limits. - </p> + <p>The limits element contains information on both + rate and absolute limits.</p> </xs:documentation> <xs:appinfo> <xsdxt:samples> <xsdxt:sample> - <xsdxt:code type="application/xml" href="../samples/limits.xml" /> + <xsdxt:code type="application/xml" + href="../samples/limits.xml"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/json" href="../samples/limits.json" /> + <xsdxt:code type="application/json" + href="../samples/limits.json"/> </xsdxt:sample> </xsdxt:samples> </xs:appinfo> @@ -63,62 +60,61 @@ <xs:simpleType name="HttpMethod"> <xs:annotation> <xs:documentation> - <html:p> - The HttpMethod simple type defines a string + <html:p>The HttpMethod simple type defines a string enumeration of HTTP method verbs as outlined in <a - href="http://www.ietf.org/rfc/rfc2616.txt">RFC2616</a> - section 9. - </html:p> + href="http://www.ietf.org/rfc/rfc2616.txt" + >RFC2616</a> section 9.</html:p> </xs:documentation> </xs:annotation> - + <xs:restriction base="xs:string"> - <xs:enumeration value="GET" /> - <xs:enumeration value="DELETE" /> - <xs:enumeration value="POST" /> - <xs:enumeration value="PUT" /> - <xs:enumeration value="HEAD" /> - <xs:enumeration value="OPTIONS" /> - <xs:enumeration value="CONNECT" /> - <xs:enumeration value="TRACE" /> - - <xs:enumeration value="ALL" /> + <xs:enumeration value="GET"/> + <xs:enumeration value="DELETE"/> + <xs:enumeration value="POST"/> + <xs:enumeration value="PUT"/> + <xs:enumeration value="HEAD"/> + <xs:enumeration value="OPTIONS"/> + <xs:enumeration value="CONNECT"/> + <xs:enumeration value="TRACE"/> + + <xs:enumeration value="ALL"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="TimeUnit"> <xs:annotation> <xs:documentation> - <html:p> - The TimeUnit simple type defines a string + <html:p>The TimeUnit simple type defines a string enumeration of coarse time units that are be used to define the duration of time that a limited - request will be unavailable for. - </html:p> + request will be unavailable for.</html:p> </xs:documentation> </xs:annotation> - + <xs:restriction base="xs:string"> - <xs:enumeration value="SECOND" /> - <xs:enumeration value="MINUTE" /> - <xs:enumeration value="HOUR" /> - <xs:enumeration value="DAY" /> + <xs:enumeration value="SECOND"/> + <xs:enumeration value="MINUTE"/> + <xs:enumeration value="HOUR"/> + <xs:enumeration value="DAY"/> </xs:restriction> </xs:simpleType> <xs:complexType name="Limits"> <xs:annotation> <xs:documentation> - <html:p> - A Limits type defines a collection of limits + <html:p>A Limits type defines a collection of limits </html:p> </xs:documentation> </xs:annotation> - + <xs:sequence> - <xs:element name="rates" type="limits:RateLimitList" minOccurs="0" maxOccurs="1" /> - <xs:element name="absolute" type="limits:AbsoluteLimitList" minOccurs="0" maxOccurs="1" /> - <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> + <xs:element name="rates" type="limits:RateLimitList" + minOccurs="0" maxOccurs="1"/> + <xs:element name="absolute" + type="limits:AbsoluteLimitList" minOccurs="0" + maxOccurs="1"/> + <xs:any namespace="##other" processContents="lax" + minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:anyAttribute namespace="##other" processContents="lax"/> </xs:complexType> @@ -126,15 +122,16 @@ <xs:complexType name="AbsoluteLimitList"> <xs:annotation> <xs:documentation> - <html:p> - An AbsoluteLimitList type defines a list of absolute limits - </html:p> + <html:p>An AbsoluteLimitList type defines a list of + absolute limits</html:p> </xs:documentation> </xs:annotation> <xs:sequence> - <xs:element name="limit" type="limits:AbsoluteLimit" minOccurs="1" maxOccurs="unbounded" /> - <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> + <xs:element name="limit" type="limits:AbsoluteLimit" + minOccurs="1" maxOccurs="unbounded"/> + <xs:any namespace="##other" processContents="lax" + minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:anyAttribute namespace="##other" processContents="lax"/> </xs:complexType> @@ -142,16 +139,16 @@ <xs:complexType name="RateLimitList"> <xs:annotation> <xs:documentation> - <html:p> - A RateLimitList type defines a list of resource - scoped limit collections. - </html:p> + <html:p>A RateLimitList type defines a list of + resource scoped limit collections.</html:p> </xs:documentation> </xs:annotation> - + <xs:sequence> - <xs:element name="rate" type="limits:ResourceRateLimits" minOccurs="1" maxOccurs="unbounded" /> - <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> + <xs:element name="rate" type="limits:ResourceRateLimits" + minOccurs="1" maxOccurs="unbounded"/> + <xs:any namespace="##other" processContents="lax" + minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:anyAttribute namespace="##other" processContents="lax"/> </xs:complexType> @@ -159,28 +156,26 @@ <xs:complexType name="ResourceRateLimits"> <xs:annotation> <xs:documentation> - <html:p> - A ResourceLimitCollection type represents a - collection of limits that are scoped to a single - resource variant. - </html:p> + <html:p>A ResourceLimitCollection type represents a + collection of limits that are scoped to a single + resource variant.</html:p> </xs:documentation> </xs:annotation> - + <xs:sequence> - <xs:element name="limit" type="limits:RateLimit" minOccurs="1" maxOccurs="unbounded" /> - <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> + <xs:element name="limit" type="limits:RateLimit" + minOccurs="1" maxOccurs="unbounded"/> + <xs:any namespace="##other" processContents="lax" + minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> - + <xs:attribute name="uri" type="xs:string" use="required"> <xs:annotation> <xs:documentation> - <html:p> - The uri of a limit collection is a human + <html:p>The URI of a limit collection is a human readable string version of the regular expression matcher that is used to define the - limit collection resource scope. - </html:p> + limit collection resource scope.</html:p> </xs:documentation> </xs:annotation> </xs:attribute> @@ -188,10 +183,8 @@ <xs:attribute name="regex" type="xs:string" use="required"> <xs:annotation> <xs:documentation> - <html:p> - A collection of limits are scoped to a - resource by a regular expression. - </html:p> + <html:p>A collection of limits are scoped to a + resource by a regular expression.</html:p> </xs:documentation> </xs:annotation> </xs:attribute> @@ -201,9 +194,8 @@ <xs:complexType name="AbsoluteLimit"> <xs:annotation> <xs:documentation> - <html:p> - Absolute limits are predefined fixed limits. We - define each of these limits as a key/value + <html:p>Absolute limits are predefined fixed limits. + We define each of these limits as a key/value pair. Please consult the API Specification for a list of absolute limits used by the system. </html:p> @@ -211,13 +203,13 @@ </xs:annotation> <xs:sequence> - <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> + <xs:any namespace="##other" processContents="lax" + minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="name" type="xs:string" use="required"> <xs:annotation> <xs:documentation> - <html:p> - The name (or key) of the absolute limit. + <html:p>The name (or key) of the absolute limit. </html:p> </xs:documentation> </xs:annotation> @@ -226,12 +218,11 @@ <xs:attribute name="value" type="xs:int" use="required"> <xs:annotation> <xs:documentation> - <html:p> - A value specifying the absolute limit.The name - of the absolute limit determines the unit + <html:p>A value specifying the absolute limit. The + name of the absolute limit determines the unit type. For example, the key maxIPGroups implies - that the value is in terms of IPGroups. - </html:p> + that the value is in terms of + IPGroups.</html:p> </xs:documentation> </xs:annotation> </xs:attribute> @@ -241,25 +232,25 @@ <xs:complexType name="RateLimit"> <xs:annotation> <xs:documentation> - <html:p> - A Rate Limit type defines the maximum number of - requests that can be performed, the time interval - that each limited request will be unavailable for, - and, for convience, the remaining number of - requests remaining. This is done for every - HttpMethod that is rate limited. + <html:p>A Rate Limit type defines the maximum number + of requests that can be performed, the time + interval that each limited request will be + unavailable for, and, for convenience, the + remaining number of requests remaining. This is + done for every HttpMethod that is rate limited. </html:p> </xs:documentation> </xs:annotation> <xs:sequence> - <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> + <xs:any namespace="##other" processContents="lax" + minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> - <xs:attribute name="verb" type="limits:HttpMethod" use="required"> + <xs:attribute name="verb" type="limits:HttpMethod" + use="required"> <xs:annotation> <xs:documentation> - <html:p> - The verb of a Limit represents the HttpMethod - that the Limit is scoped to. + <html:p>The verb of a Limit represents the + HttpMethod that the Limit is scoped to. </html:p> </xs:documentation> </xs:annotation> @@ -268,10 +259,9 @@ <xs:attribute name="value" type="xs:int" use="required"> <xs:annotation> <xs:documentation> - <html:p> - The value of a Limit represents maximum Number - of requests that the rate limit will allow. - </html:p> + <html:p>The value of a Limit represents maximum + Number of requests that the rate limit will + allow.</html:p> </xs:documentation> </xs:annotation> </xs:attribute> @@ -279,34 +269,31 @@ <xs:attribute name="remaining" type="xs:int" use="required"> <xs:annotation> <xs:documentation> - <html:p> - The remaining number of requests that a user - can make against the limited resource before - being denied access. + <html:p>The remaining number of requests that a + user can make against the limited resource + before being denied access.</html:p> + </xs:documentation> + </xs:annotation> + </xs:attribute> + + <xs:attribute name="unit" type="limits:TimeUnit" + use="required"> + <xs:annotation> + <xs:documentation> + <html:p>The unit of a Limit defines the duration + of a limited request's unavailability. </html:p> </xs:documentation> </xs:annotation> </xs:attribute> - <xs:attribute name="unit" type="limits:TimeUnit" use="required"> + <xs:attribute name="next-available" type="xs:dateTime" + use="required"> <xs:annotation> <xs:documentation> - <html:p> - The unit of a Limit defines the duration of a - limited request's unavailability. - </html:p> - </xs:documentation> - </xs:annotation> - </xs:attribute> - - <xs:attribute name="next-available" type="xs:dateTime" use="required"> - <xs:annotation> - <xs:documentation> - <html:p> - The next-available attribute of a Limit tells - the user when a limited request will become - available for consumption. - </html:p> + <html:p>The next-available attribute of a limit + tells the user when a limited request + becomes available for consumption.</html:p> </xs:documentation> </xs:annotation> </xs:attribute> diff --git a/v2.0/xsd/secgr.xsd b/v2.0/xsd/secgr.xsd index 88fa6a0..da8b991 100644 --- a/v2.0/xsd/secgr.xsd +++ b/v2.0/xsd/secgr.xsd @@ -13,8 +13,8 @@ </xsd:appinfo> <xsd:documentation xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml"> - <p> This is the main index XML Schema document for Security Groups API - Schema Types Version 1.0. </p> + <p>This is the main index XML Schema document for Security + Groups API Schema Types Version 1.0.</p> </xsd:documentation> </annotation> @@ -259,7 +259,7 @@ <annotation> <xsd:documentation xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml"> - <p>The hostname attached to the instance.</p> + <p>The host name attached to the instance.</p> </xsd:documentation> </annotation> </attribute> @@ -549,8 +549,8 @@ <annotation> <xsd:documentation xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml"> - <p> A human readable message that is appropriate for - display to the end user. </p> + <p>A human readable message that is appropriate for + display to the end user.</p> </xsd:documentation> </annotation> </element> @@ -558,10 +558,10 @@ <annotation> <xsd:documentation xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml"> - <p> The optional <details> element may contain - useful information for tracking down errors (e.g a stack + <p>The optional <details> element may contain useful + information for tracking down errors (such as, a stack trace). This information may or may not be appropriate - for display to an end user. </p> + for display to an end user.</p> </xsd:documentation> </annotation> </element> @@ -572,8 +572,7 @@ <annotation> <xsd:documentation xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml"> - <p> The HTTP status code associated with the current fault. - </p> + <p>The HTTP status code associated with the current fault.</p> </xsd:documentation> </annotation> </attribute> @@ -582,25 +581,25 @@ <complexType name="BadRequestFault"> <complexContent> - <extension base="secgr:BaseFault"> </extension> + <extension base="secgr:BaseFault"/> </complexContent> </complexType> <complexType name="UnauthorizedFault"> <complexContent> - <extension base="secgr:BaseFault"> </extension> + <extension base="secgr:BaseFault"/> </complexContent> </complexType> <complexType name="ForbiddenFault"> <complexContent> - <extension base="secgr:BaseFault"> </extension> + <extension base="secgr:BaseFault"/> </complexContent> </complexType> <complexType name="BadMethodFault"> <complexContent> - <extension base="secgr:BaseFault"> </extension> + <extension base="secgr:BaseFault"/> </complexContent> </complexType> @@ -611,8 +610,8 @@ <annotation> <xsd:documentation xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml"> - <p> An optional dateTime denoting when an operation - should be retried. </p> + <p>An optional dateTime denoting when an operation + should be retried.</p> </xsd:documentation> </annotation> </attribute> @@ -622,39 +621,38 @@ <complexType name="UnprocessableEntityFault"> <complexContent> - <extension base="secgr:BaseFault"> </extension> + <extension base="secgr:BaseFault"/> </complexContent> </complexType> <complexType name="InstanceFault"> <complexContent> - <extension base="secgr:BaseFault"> </extension> + <extension base="secgr:BaseFault"/> </complexContent> </complexType> <complexType name="NotImplementedFault"> <complexContent> - <extension base="secgr:BaseFault"> </extension> + <extension base="secgr:BaseFault"/> </complexContent> </complexType> <complexType name="ServiceUnavailableFault"> <complexContent> - <extension base="secgr:BaseFault"> </extension> + <extension base="secgr:BaseFault"/> </complexContent> </complexType> <complexType name="ItemNotFoundFault"> <complexContent> - <extension base="secgr:BaseFault"> </extension> + <extension base="secgr:BaseFault"/> </complexContent> </complexType> <complexType name="BadMediaTypeFault"> <complexContent> - <extension base="secgr:BaseFault"> </extension> + <extension base="secgr:BaseFault"/> </complexContent> </complexType> </schema> - diff --git a/v2.0/xsd/server.xsd b/v2.0/xsd/server.xsd index 1c89c8b..089ffef 100644 --- a/v2.0/xsd/server.xsd +++ b/v2.0/xsd/server.xsd @@ -1,105 +1,89 @@ <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="../xslt/schema.xsl"?> -<!-- (C) 2011 OpenStack LLC., All Rights Reserved --> +<!-- (C) 2011-2013 OpenStack Foundation, All Rights Reserved --> -<schema - elementFormDefault="qualified" - attributeFormDefault="unqualified" - xmlns="http://www.w3.org/2001/XMLSchema" - xmlns:csapi="http://docs.openstack.org/compute/api/v1.1" - xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:atom="http://www.w3.org/2005/Atom" - xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" - targetNamespace="http://docs.openstack.org/compute/api/v1.1" -> +<schema elementFormDefault="qualified" + attributeFormDefault="unqualified" + xmlns="http://www.w3.org/2001/XMLSchema" + xmlns:csapi="http://docs.openstack.org/compute/api/v1.1" + xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:atom="http://www.w3.org/2005/Atom" + xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" + targetNamespace="http://docs.openstack.org/compute/api/v1.1"> <annotation> - <xsd:appinfo - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> + <xsd:appinfo xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml"> <xsdxt:title>Servers and Related Types</xsdxt:title> - <xsdxt:link rel="index" href="api.xsd" /> + <xsdxt:link rel="index" href="api.xsd"/> </xsd:appinfo> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - This schema file defines a <a href="#type_Server" - title="Server Type Definition"> Server</a> and all internal + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> This schema file defines a <a href="#type_Server" + title="Server Type Definition"> Server</a> and all internal entities related to servers including <a - href="#type_Addresses" title="Addresses type - definition">Addresses</a> and <a href="#type_File" title="File - type definition">Files</a>. - </p> + href="#type_Addresses" + title="Addresses type + definition">Addresses</a> and + <a href="#type_File" title="File + type definition" + >Files</a>. </p> </xsd:documentation> </annotation> <!-- Import ATOM specific schema definitions --> - <import namespace="http://www.w3.org/2005/Atom" schemaLocation="atom/atom.xsd" /> + <import namespace="http://www.w3.org/2005/Atom" + schemaLocation="atom/atom.xsd"/> <include schemaLocation="common.xsd"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - Common types used by multiple entities and possibly spanning - several types of requests. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> Common types used by multiple entities and possibly + spanning several types of requests. </p> </xsd:documentation> </annotation> </include> <include schemaLocation="image.xsd"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - Types related to images. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> Types related to images. </p> </xsd:documentation> </annotation> </include> <include schemaLocation="flavor.xsd"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - Types related to flavors. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> Types related to flavors. </p> </xsd:documentation> </annotation> </include> <include schemaLocation="faults.xsd"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - All fault types. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> All fault types. </p> </xsd:documentation> </annotation> </include> <element name="server" type="csapi:Server"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The element defines a server. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> The element defines a server. </p> </xsd:documentation> <xsd:appinfo> <xsdxt:samples> <xsdxt:sample> - <xsdxt:code type="application/xml" href="../samples/server.xml" /> + <xsdxt:code type="application/xml" + href="../samples/server.xml"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/json" href="../samples/server.json" /> + <xsdxt:code type="application/json" + href="../samples/server.json"/> </xsdxt:sample> </xsdxt:samples> </xsd:appinfo> @@ -108,20 +92,19 @@ <element name="servers" type="csapi:Servers"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - A collection of servers. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> A collection of servers. </p> </xsd:documentation> <xsd:appinfo> <xsdxt:samples> <xsdxt:sample> - <xsdxt:code type="application/xml" href="../samples/servers.xml" /> + <xsdxt:code type="application/xml" + href="../samples/servers.xml"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/json" href="../samples/servers.json" /> + <xsdxt:code type="application/json" + href="../samples/servers.json"/> </xsdxt:sample> </xsdxt:samples> </xsd:appinfo> @@ -130,361 +113,305 @@ <element name="addresses" type="csapi:Addresses"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The element defines list of addresses by network: (public, - private, ...). - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> The element defines list of addresses by network: (public, + private, ...). </p> </xsd:documentation> <xsd:appinfo> <xsdxt:samples> <xsdxt:sample> - <xsdxt:code type="application/xml" href="../samples/addresses.xml" /> + <xsdxt:code type="application/xml" + href="../samples/addresses.xml"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/json" href="../samples/addresses.json" /> - </xsdxt:sample> - </xsdxt:samples> - </xsd:appinfo> - </annotation> - </element> - - <element name="network" type="csapi:AddressList"> - <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The element defines a list of addresses in a network. - </p> - </xsd:documentation> - <xsd:appinfo> - <xsdxt:samples> - <xsdxt:sample> - <xsdxt:code type="application/xml" href="../samples/public.xml" /> - </xsdxt:sample> - <xsdxt:sample> - <xsdxt:code type="application/json" href="../samples/public.json" /> + <xsdxt:code type="application/json" + href="../samples/addresses.json"/> </xsdxt:sample> </xsdxt:samples> </xsd:appinfo> </annotation> </element> - <element name="ip" type="csapi:Address"> + <element name="network" type="csapi:AddressList"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The element defines an individual IP address. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> The element defines a list of addresses in a network. </p> </xsd:documentation> <xsd:appinfo> <xsdxt:samples> <xsdxt:sample> - <xsdxt:code type="application/xml" href="../samples/address.xml" /> + <xsdxt:code type="application/xml" + href="../samples/public.xml"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/json" href="../samples/address.json" /> + <xsdxt:code type="application/json" + href="../samples/public.json"/> </xsdxt:sample> </xsdxt:samples> </xsd:appinfo> </annotation> </element> - + + <element name="ip" type="csapi:Address"> + <annotation> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> The element defines an individual IP address. </p> + </xsd:documentation> + <xsd:appinfo> + <xsdxt:samples> + <xsdxt:sample> + <xsdxt:code type="application/xml" + href="../samples/address.xml"/> + </xsdxt:sample> + <xsdxt:sample> + <xsdxt:code type="application/json" + href="../samples/address.json"/> + </xsdxt:sample> + </xsdxt:samples> + </xsd:appinfo> + </annotation> + </element> + <!-- Complex Types --> <complexType name="Server"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - A server is a virtual machine instance in the Cloud Servers - system. Note that this complex type defines all elements - and attributes as optional because a server instance may - take many different forms depending on the operation. When - creating a server, for example, the name, imageRef, and - flavorRef attributes are required. In addition, optional - metadata and personality file elements may be specified: - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> A server is a virtual machine instance in the Cloud + Servers system. Note that this complex type defines all + elements and attributes as optional because a server + instance may take many different forms depending on the + operation. When creating a server, for example, the name, + imageRef, and flavorRef attributes are required. In + addition, optional metadata and personality file elements + may be specified: </p> <xsdxt:samples> <xsdxt:sample> - <xsdxt:code type="application/xml" href="../samples/server-post-req.xml" /> + <xsdxt:code type="application/xml" + href="../samples/server-post-req.xml"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/json" href="../samples/server-post-req.json" /> + <xsdxt:code type="application/json" + href="../samples/server-post-req.json"/> </xsdxt:sample> </xsdxt:samples> - <p> - The response to such a crate operation will include the + <p> The response to such a crate operation will include the administration password, host ID, and addresses associated - with the server: - </p> + with the server: </p> <xsdxt:samples> <xsdxt:sample> - <xsdxt:code type="application/xml" href="../samples/server-post-resp.xml" /> + <xsdxt:code type="application/xml" + href="../samples/server-post-resp.xml"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/json" href="../samples/server-post-resp.json" /> + <xsdxt:code type="application/json" + href="../samples/server-post-resp.json"/> </xsdxt:sample> </xsdxt:samples> - <p> - When modifying a server only the name and administration + <p> When modifying a server only the name and administration password should be specified as these are the only - attributes that are modifiable. - </p> + attributes that are modifiable. </p> <xsdxt:samples> <xsdxt:sample> - <xsdxt:code type="application/xml" href="../samples/server-put-req.xml" /> + <xsdxt:code type="application/xml" + href="../samples/server-put-req.xml"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/json" href="../samples/server-put-req.json" /> + <xsdxt:code type="application/json" + href="../samples/server-put-req.json"/> </xsdxt:sample> </xsdxt:samples> </xsd:documentation> </annotation> <sequence> <element name="image" type="csapi:Image" minOccurs="0"> - <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - A reference to an image used to create the - server. External images must contian a link that - provides the full path to the image resource. - </p> - </xsd:documentation> - </annotation> + <annotation> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> A reference to an image used to create the server. + External images must contain a link that provides the + full path to the image resource. </p> + </xsd:documentation> + </annotation> </element> <element name="flavor" type="csapi:Flavor" minOccurs="0"> - <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The current server flavor. This may not contais - all flavor detials but will always contain an - ID, a name, as well as self and bookmark links. - </p> - </xsd:documentation> - </annotation> + <annotation> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> The current server flavor. This may not contains all + flavor details but will always contain an ID, a name, as + well as self and bookmark links. </p> + </xsd:documentation> + </annotation> </element> <element name="metadata" type="csapi:Metadata" minOccurs="0"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - A collection of meta data items associated with the server. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> A collection of meta data items associated with the + server. </p> </xsd:documentation> </annotation> </element> <element ref="csapi:addresses" minOccurs="0"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - A server's public and private address. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> A server's public and private address. </p> </xsd:documentation> </annotation> </element> - <element name="personality" type="csapi:Personality" minOccurs="0"> + <element name="personality" type="csapi:Personality" + minOccurs="0"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - A collection of small <a href="#type_File" title="See - definition of file">files</a> used to personalize a new - server instance. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> A collection of small <a href="#type_File" + title="See + definition of file">files</a> + used to personalize a new server instance. </p> </xsd:documentation> </annotation> </element> <element name="fault" type="csapi:AsyncAPIFault" minOccurs="0"> - <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The detials of a fault that may have occured - while cerating the server or performing a server - action. - </p> - </xsd:documentation> - </annotation> + <annotation> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> The details of a fault that may have occurred while + creating the server or performing a server action. </p> + </xsd:documentation> + </annotation> </element> - <element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" /> - <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> + <element vc:minVersion="1.1" ref="atom:link" minOccurs="0" + maxOccurs="unbounded"/> + <any namespace="##other" processContents="lax" minOccurs="0" + maxOccurs="unbounded"/> </sequence> <attribute type="xsd:string" name="name" use="optional"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The name of the server. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> The name of the server. </p> </xsd:documentation> </annotation> </attribute> <attribute type="xsd:anyURI" name="imageRef" use="optional"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - A reference to an image. This is used exclusevely when - creating a server. Using an image ID here indicates that - the image is locally hosted. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> A reference to an image. This is used exclusively when + creating a server. Using an image ID here indicates that + the image is locally hosted. </p> </xsd:documentation> </annotation> </attribute> <attribute type="xsd:anyURI" name="flavorRef" use="optional"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - A reference to a flavor. This is used exclusevely when - creating a server. Using a flavorRef here indicates that - the flavor is locally hosted. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> A reference to a flavor. This is used exclusively when + creating a server. Using a flavorRef here indicates that + the flavor is locally hosted. </p> </xsd:documentation> </annotation> </attribute> <attribute type="xsd:string" name="accessIPv4" use="optional"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The IPv4 primary IP. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> The IPv4 primary IP. </p> </xsd:documentation> </annotation> </attribute> <attribute type="xsd:string" name="accessIPv6" use="optional"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The IPv6 primary IP. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> The IPv6 primary IP. </p> </xsd:documentation> </annotation> - </attribute> <attribute type="csapi:UUID" name="id" use="optional"> + </attribute> + <attribute type="csapi:UUID" name="id" use="optional"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The ID of the server. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> The ID of the server. </p> </xsd:documentation> </annotation> </attribute> <attribute type="xsd:string" name="adminPass" use="optional"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The server's administration password. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> The server's administration password. </p> </xsd:documentation> </annotation> </attribute> - <attribute type="xsd:string" name="tenantId" use="optional"> + <attribute type="xsd:string" name="tenantId" use="optional"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - A unique ID that identifies the tenant that contains - the server. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> A unique ID that identifies the tenant that contains the + server. </p> </xsd:documentation> </annotation> </attribute> - <attribute type="xsd:string" name="userId" use="optional"> + <attribute type="xsd:string" name="userId" use="optional"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - A unique ID that identifies the user who created - the server. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> A unique ID that identifies the user who created the + server. </p> </xsd:documentation> </annotation> </attribute> - <attribute type="xsd:string" name="hostId" use="optional"> + <attribute type="xsd:string" name="hostId" use="optional"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - A unique ID that identifies the physical host that the VM - is running on. This ID is unique <strong>per - account</strong> and not globally unique. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> A unique ID that identifies the physical host that the + VM is running on. This ID is unique <strong>per + account</strong> and not globally unique. </p> </xsd:documentation> </annotation> </attribute> - <attribute type="csapi:Progress" name="progress" use="optional"> + <attribute type="csapi:Progress" name="progress" use="optional"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The progress of the current server operation. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> The progress of the current server operation. </p> </xsd:documentation> </annotation> </attribute> - <attribute type="csapi:ExtensibleServerStatus" name="status" use="optional"> + <attribute type="csapi:ExtensibleServerStatus" name="status" + use="optional"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The current state (or <a href="#type_ExtensibleServerStatus" - title="See definition of ExtensibleServerStatus">status</a>) of the - server. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> The current state (or <a + href="#type_ExtensibleServerStatus" + title="See definition of ExtensibleServerStatus" + >status</a>) of the server. </p> </xsd:documentation> </annotation> </attribute> <attribute type="xsd:dateTime" name="updated" use="optional"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The time the server was updated. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> The time the server was updated. </p> </xsd:documentation> </annotation> </attribute> <attribute type="xsd:dateTime" name="created" use="optional"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The time the server was created. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> The time the server was created. </p> </xsd:documentation> </annotation> </attribute> @@ -492,216 +419,207 @@ </complexType> <complexType name="ServerWithOnlyIDNameLinks"> - <annotation> - <xsd:documentation - xml:lang="EN" + <annotation> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> The only allowed attribute for this Server type is the + name, ID, and links. This type is used for non-detailed + server lists. </p> + </xsd:documentation> + </annotation> + <complexContent> + <restriction base="csapi:Server"> + <sequence> + <element ref="atom:link" minOccurs="1" maxOccurs="unbounded"/> + <any vc:minVersion="1.1" namespace="##other" + processContents="lax" minOccurs="0" maxOccurs="unbounded" + /> + </sequence> + <attribute type="xsd:string" name="name" use="required"/> + <attribute type="csapi:UUID" name="id" use="required"/> + <attribute type="xsd:string" name="accessIPv4" + use="prohibited"/> + <attribute type="xsd:string" name="accessIPv6" + use="prohibited"/> + <attribute type="xsd:string" name="adminPass" use="prohibited"/> + <attribute type="xsd:string" name="tenantId" use="prohibited"/> + <attribute type="xsd:string" name="userId" use="prohibited"/> + <attribute type="xsd:string" name="hostId" use="prohibited"/> + <attribute type="csapi:Progress" name="progress" + use="prohibited"/> + <attribute type="csapi:ExtensibleServerStatus" name="status" + use="prohibited"/> + <attribute type="xsd:dateTime" name="updated" use="prohibited"/> + <attribute type="xsd:dateTime" name="created" use="prohibited"/> + <anyAttribute namespace="##other" processContents="lax"/> + <assert vc:minVersion="1.1" + test="atom:link[@rel='self']/@href and atom:link[@rel='bookmark']/@href"> + <annotation> + <xsd:documentation xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml"> - <p> - The only allowed attribute for this Server type is - the name, ID, and links. This type is used for - non-detailed server lists. - </p> - </xsd:documentation> - </annotation> - <complexContent> - <restriction base="csapi:Server"> - <sequence> - <element ref="atom:link" minOccurs="1" maxOccurs="unbounded" /> - <any vc:minVersion="1.1" namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> - </sequence> - <attribute type="xsd:string" name="name" use="required"/> - <attribute type="csapi:UUID" name="id" use="required"/> - <attribute type="xsd:string" name="accessIPv4" use="prohibited"/> - <attribute type="xsd:string" name="accessIPv6" use="prohibited" /> - <attribute type="xsd:string" name="adminPass" use="prohibited"/> - <attribute type="xsd:string" name="tenantId" use="prohibited"/> - <attribute type="xsd:string" name="userId" use="prohibited"/> - <attribute type="xsd:string" name="hostId" use="prohibited"/> - <attribute type="csapi:Progress" name="progress" use="prohibited"/> - <attribute type="csapi:ExtensibleServerStatus" name="status" use="prohibited"/> - <attribute type="xsd:dateTime" name="updated" use="prohibited"/> - <attribute type="xsd:dateTime" name="created" use="prohibited"/> - <anyAttribute namespace="##other" processContents="lax"/> - <assert vc:minVersion="1.1" test="atom:link[@rel='self']/@href and atom:link[@rel='bookmark']/@href"> - <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - Here the server <strong>MUST</strong> - contain a name, an ID, a bookmark link, - and a self link. - </p> - </xsd:documentation> - </annotation> - </assert> - </restriction> - </complexContent> + <p> The server <strong>MUST</strong> contain a name, an + ID, a bookmark link, and a self link. </p> + </xsd:documentation> + </annotation> + </assert> + </restriction> + </complexContent> </complexType> <complexType name="ServerForCreate"> - <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - When creating a server the server must contain a - name and a reference to an image and flavor. - </p> - </xsd:documentation> - </annotation> - <complexContent> - <restriction base="csapi:Server"> - <sequence> - <element name="metadata" type="csapi:Metadata" minOccurs="0"> - <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - A collection of meta data items associated with the server. - </p> - </xsd:documentation> - </annotation> - </element> - <element name="personality" type="csapi:Personality" minOccurs="0"> - <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - A collection of small <a href="#type_File" title="See - definition of file">files</a> used to personalize a new - server instance. - </p> - </xsd:documentation> - </annotation> - </element> - <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> - </sequence> - <attribute type="xsd:string" name="name" use="required"/> - <attribute type="xsd:anyURI" name="imageRef" use="required"/> - <attribute type="xsd:anyURI" name="flavorRef" use="required"/> - <attribute type="xsd:string" name="accessIPv4" use="optional"/> - <attribute type="xsd:string" name="accessIPv6" use="optional" /> - <attribute type="xsd:string" name="adminPass" use="optional"/> - <attribute type="csapi:UUID" name="id" use="prohibited"/> - <attribute type="xsd:string" name="tenantId" use="prohibited"/> - <attribute type="xsd:string" name="userId" use="prohibited"/> - <attribute type="xsd:string" name="hostId" use="prohibited"/> - <attribute type="csapi:Progress" name="progress" use="prohibited"/> - <attribute type="csapi:ExtensibleServerStatus" name="status" use="prohibited"/> - <attribute type="xsd:dateTime" name="updated" use="prohibited"/> - <attribute type="xsd:dateTime" name="created" use="prohibited"/> - <anyAttribute namespace="##other" processContents="lax"/> - </restriction> - </complexContent> + <annotation> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> When creating a server the server must contain a name and + a reference to an image and flavor. </p> + </xsd:documentation> + </annotation> + <complexContent> + <restriction base="csapi:Server"> + <sequence> + <element name="metadata" type="csapi:Metadata" minOccurs="0"> + <annotation> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> A collection of meta data items associated with + the server. </p> + </xsd:documentation> + </annotation> + </element> + <element name="personality" type="csapi:Personality" + minOccurs="0"> + <annotation> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> A collection of small <a href="#type_File" + title="See + definition of file" + >files</a> used to personalize a new server + instance. </p> + </xsd:documentation> + </annotation> + </element> + <any namespace="##other" processContents="lax" minOccurs="0" + maxOccurs="unbounded"/> + </sequence> + <attribute type="xsd:string" name="name" use="required"/> + <attribute type="xsd:anyURI" name="imageRef" use="required"/> + <attribute type="xsd:anyURI" name="flavorRef" use="required"/> + <attribute type="xsd:string" name="accessIPv4" use="optional"/> + <attribute type="xsd:string" name="accessIPv6" use="optional"/> + <attribute type="xsd:string" name="adminPass" use="optional"/> + <attribute type="csapi:UUID" name="id" use="prohibited"/> + <attribute type="xsd:string" name="tenantId" use="prohibited"/> + <attribute type="xsd:string" name="userId" use="prohibited"/> + <attribute type="xsd:string" name="hostId" use="prohibited"/> + <attribute type="csapi:Progress" name="progress" + use="prohibited"/> + <attribute type="csapi:ExtensibleServerStatus" name="status" + use="prohibited"/> + <attribute type="xsd:dateTime" name="updated" use="prohibited"/> + <attribute type="xsd:dateTime" name="created" use="prohibited"/> + <anyAttribute namespace="##other" processContents="lax"/> + </restriction> + </complexContent> </complexType> <complexType name="ServerForUpdate"> - <complexContent> - <extension base="csapi:Server"> - <assert vc:minVersion="1.1" test="@name or @accessIPv4 or @accessIPv6 or csapi:metadata"> - <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - When updating a server. The server - <strong>MUST</strong> contain either a - name or metadata or access address. The - other fields are not editabile on a - server update. - </p> - </xsd:documentation> - </annotation> - </assert> - </extension> - </complexContent> + <complexContent> + <extension base="csapi:Server"> + <assert vc:minVersion="1.1" + test="@name or @accessIPv4 or @accessIPv6 or csapi:metadata"> + <annotation> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> When updating a server. The server + <strong>MUST</strong> contain either a name or + metadata or access address. The other fields are not + editable on a server update. </p> + </xsd:documentation> + </annotation> + </assert> + </extension> + </complexContent> </complexType> <complexType name="Servers"> <sequence> - <element name="server" type="csapi:Server" minOccurs="0" maxOccurs="1000"> + <element name="server" type="csapi:Server" minOccurs="0" + maxOccurs="1000"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - A collection of servers. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> A collection of servers. </p> </xsd:documentation> </annotation> </element> - <element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" /> - <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> + <element vc:minVersion="1.1" ref="atom:link" minOccurs="0" + maxOccurs="unbounded"/> + <any namespace="##other" processContents="lax" minOccurs="0" + maxOccurs="unbounded"/> </sequence> <anyAttribute namespace="##other" processContents="lax"/> </complexType> <complexType name="ServersWithOnlyIDsNamesLinks"> - <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - A collection of servers with only IDs, names, and - links. A collection of this type is returned in - non-detailed server list. - </p> - </xsd:documentation> - </annotation> - <complexContent> - <restriction base="csapi:Servers"> - <sequence> - <element name="server" type="csapi:ServerWithOnlyIDNameLinks" minOccurs="0" maxOccurs="1000"> - </element> - <element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" /> - <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> - </sequence> - </restriction> - </complexContent> + <annotation> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> A collection of servers with only IDs, names, and links. A + collection of this type is returned in non-detailed server + list. </p> + </xsd:documentation> + </annotation> + <complexContent> + <restriction base="csapi:Servers"> + <sequence> + <element name="server" + type="csapi:ServerWithOnlyIDNameLinks" minOccurs="0" + maxOccurs="1000"> </element> + <element vc:minVersion="1.1" ref="atom:link" minOccurs="0" + maxOccurs="unbounded"/> + <any namespace="##other" processContents="lax" minOccurs="0" + maxOccurs="unbounded"/> + </sequence> + </restriction> + </complexContent> </complexType> <complexType name="Personality"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - A collection of small <a href="#type_File" title="See - definition of file">files</a> used to personalize a server - instance. + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> A collection of small <a + href="#type_File" title="See + definition of file" + >files</a> used to personalize a server instance. </xsd:documentation> </annotation> <sequence> - <element name="file" type="csapi:File" minOccurs="0" maxOccurs="5"> + <element name="file" type="csapi:File" minOccurs="0" + maxOccurs="5"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - A collection of files. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> A collection of files. </p> </xsd:documentation> </annotation> </element> - <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> + <any namespace="##other" processContents="lax" minOccurs="0" + maxOccurs="unbounded"/> </sequence> <anyAttribute namespace="##other" processContents="lax"/> </complexType> <complexType name="File"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - A file is simply a full path along with base64 file + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> A file is simply a full path along with base64 file content. The name of the file is specified in the path - attribute and the <a href="#type_FileContent" title="See - definition of FileContent">file content</a> is included - inline. - </p> + attribute and the <a href="#type_FileContent" + title="See + definition of FileContent">file + content</a> is included inline. </p> <xsdxt:code type="application/xml"> <![CDATA[ <file xmlns="http://docs.openstack.org/compute/api/v1.0" @@ -719,14 +637,11 @@ </annotation> <simpleContent> <extension base="csapi:FileContent"> - <attribute name="path" type="csapi:FileName" use="required"> + <attribute name="path" type="csapi:FileName" use="required"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - Full file path. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> Full file path. </p> </xsd:documentation> </annotation> </attribute> @@ -737,151 +652,128 @@ <complexType name="Addresses"> <sequence> - <element name="network" type="csapi:AddressList" minOccurs="0" maxOccurs="1000"/> - <element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" /> - <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> + <element name="network" type="csapi:AddressList" minOccurs="0" + maxOccurs="1000"/> + <element vc:minVersion="1.1" ref="atom:link" minOccurs="0" + maxOccurs="unbounded"/> + <any namespace="##other" processContents="lax" minOccurs="0" + maxOccurs="unbounded"/> </sequence> <anyAttribute namespace="##other" processContents="lax"/> </complexType> <complexType name="AddressList"> <sequence> - <element name="ip" type="csapi:Address" minOccurs="0" maxOccurs="1000"> + <element name="ip" type="csapi:Address" minOccurs="0" + maxOccurs="1000"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - A collection of addresses. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> A collection of addresses. </p> </xsd:documentation> </annotation> </element> - <element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" /> - <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> + <element vc:minVersion="1.1" ref="atom:link" minOccurs="0" + maxOccurs="unbounded"/> + <any namespace="##other" processContents="lax" minOccurs="0" + maxOccurs="unbounded"/> </sequence> <attribute type="xsd:string" name="id" use="optional"> - <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - A id of an address list. This is typically a name - used to identify a network. - </p> - </xsd:documentation> - </annotation> + <annotation> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> A id of an address list. This is typically a name used + to identify a network. </p> + </xsd:documentation> + </annotation> </attribute> <anyAttribute namespace="##other" processContents="lax"/> </complexType> <complexType name="Address"> <sequence> - <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> + <any namespace="##other" processContents="lax" minOccurs="0" + maxOccurs="unbounded"/> </sequence> <attribute name="addr" type="xsd:string" use="required"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - An IP address. - </p> - </xsd:documentation> - </annotation> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> An IP address. </p> + </xsd:documentation> + </annotation> </attribute> - <attribute name="version" type="csapi:AddressVersion" use="optional"> + <attribute name="version" type="csapi:AddressVersion" + use="optional"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The IP Address version can be 4 or 6. The version - attribute is optional if it is left off, the type of - address will be determined by from its address - format. If it is specified it <strong>should</strong> - match the address format. - </p> - <p> - The OpenStack compute API will always fill in the - version number as a convinence to the client. - </p> - </xsd:documentation> - </annotation> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> The IP Address version can be 4 or 6. The version + attribute is optional if it is left off, the type of + address is determined from its address format. If it is + specified, it <strong>should</strong> match the address + format. </p> + <p> The OpenStack compute API always fills in the version + number as a convenience to the client. </p> + </xsd:documentation> + </annotation> </attribute> <anyAttribute namespace="##other" processContents="lax"/> </complexType> <!-- Simple Types --> <simpleType name="ExtensibleServerStatus"> - <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - An extensible server status type allows all of the - strings defined in <a href="#type_ServerStatus" - title="See definition of - ServerStatus">ServerStatus</a> or an alias prefixed - status. - </p> - </xsd:documentation> - </annotation> - <union memberTypes="csapi:ServerStatus csapi:ExtendedStatus"/> + <annotation> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> An extensible server status type allows all of the strings + defined in <a href="#type_ServerStatus" + title="See definition of + ServerStatus" + >ServerStatus</a> or an alias prefixed status. </p> + </xsd:documentation> + </annotation> + <union memberTypes="csapi:ServerStatus csapi:ExtendedStatus"/> </simpleType> <simpleType name="ServerStatus"> <restriction base="xsd:string"> <enumeration value="ACTIVE"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The server is ready to use. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> The server is ready to use. </p> </xsd:documentation> </annotation> </enumeration> <enumeration value="SUSPENDED"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The server is in an inactive (suspended) state. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> The server is in an inactive (suspended) state. </p> </xsd:documentation> </annotation> </enumeration> <enumeration value="DELETED"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The server has been deleted. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> The server has been deleted. </p> </xsd:documentation> </annotation> </enumeration> <enumeration value="RESIZE"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The server is being resized. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> The server is being resized. </p> </xsd:documentation> </annotation> </enumeration> <enumeration value="VERIFY_RESIZE"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The server is waiting for the resize operation to be + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> The server is waiting for the resize operation to be confirmed so that the original server may be removed. </p> </xsd:documentation> @@ -889,83 +781,66 @@ </enumeration> <enumeration value="ERROR"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The requested operation failed, the server is in an - error state. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> The requested operation failed, the server is in an + error state. </p> </xsd:documentation> </annotation> </enumeration> <enumeration value="BUILD"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The server is being built. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> The server is being built. </p> </xsd:documentation> </annotation> </enumeration> <enumeration value="PASSWORD"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The server password is being changed. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> The server password is being changed. </p> </xsd:documentation> </annotation> </enumeration> <enumeration value="REBUILD"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The server is being rebuilt. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> The server is being rebuilt. </p> </xsd:documentation> </annotation> </enumeration> <enumeration value="REBOOT"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The server is going through a <a - href="actions.xsd#type_RebootType" title="See definition - of RebootType">SOFT</a> reboot. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> The server is going through a <a + href="actions.xsd#type_RebootType" + title="See definition + of RebootType" + >SOFT</a> reboot. </p> </xsd:documentation> </annotation> </enumeration> <enumeration value="HARD_REBOOT"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The server is going through a <a - href="actions.xsd#type_RebootType" title="See definition - of RebootType">HARD</a> reboot. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> The server is going through a <a + href="actions.xsd#type_RebootType" + title="See definition + of RebootType" + >HARD</a> reboot. </p> </xsd:documentation> </annotation> </enumeration> <enumeration value="UNKNOWN"> <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - The server is in an unknown state. - </p> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> The server is in an unknown state. </p> </xsd:documentation> </annotation> </enumeration> @@ -974,40 +849,34 @@ <simpleType name="FileName"> <restriction base="xsd:string"> - <maxLength value="255" /> + <maxLength value="255"/> </restriction> </simpleType> <simpleType name="FileContent"> <restriction base="xsd:base64Binary"> - <maxLength value="10240" /> + <maxLength value="10240"/> </restriction> </simpleType> <simpleType name="AddressVersion"> - <restriction base="xsd:int"> - <enumeration value="4"> - <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - Denotes IPv4. - </p> - </xsd:documentation> - </annotation> - </enumeration> - <enumeration value="6"> - <annotation> - <xsd:documentation - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> - <p> - Denotes IPv6. - </p> - </xsd:documentation> - </annotation> - </enumeration> - </restriction> + <restriction base="xsd:int"> + <enumeration value="4"> + <annotation> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> Denotes IPv4. </p> + </xsd:documentation> + </annotation> + </enumeration> + <enumeration value="6"> + <annotation> + <xsd:documentation xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> Denotes IPv6. </p> + </xsd:documentation> + </annotation> + </enumeration> + </restriction> </simpleType> </schema> diff --git a/v2.0/xsd/version.xsd b/v2.0/xsd/version.xsd index 90b39aa..39c0257 100644 --- a/v2.0/xsd/version.xsd +++ b/v2.0/xsd/version.xsd @@ -1,55 +1,52 @@ <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="../xslt/schema.xsl"?> -<!-- (C) 2011 OpenStack LLC., All Rights Reserved --> +<!-- (C) 2011-2013 OpenStack Foundation, All Rights Reserved --> + +<xs:schema elementFormDefault="qualified" + attributeFormDefault="unqualified" + targetNamespace="http://docs.openstack.org/common/api/v1.0" + xmlns:vers="http://docs.openstack.org/common/api/v1.0" + xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" + xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" + xmlns:html="http://www.w3.org/1999/xhtml" + xmlns:atom="http://www.w3.org/2005/Atom" + xmlns:xs="http://www.w3.org/2001/XMLSchema"> -<xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified" - targetNamespace="http://docs.openstack.org/common/api/v1.0" - xmlns:vers="http://docs.openstack.org/common/api/v1.0" - xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" - xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" - xmlns:html="http://www.w3.org/1999/xhtml" - xmlns:atom="http://www.w3.org/2005/Atom" - xmlns:xs="http://www.w3.org/2001/XMLSchema"> - <xs:annotation> - <xs:appinfo - xml:lang="EN" - xmlns="http://www.w3.org/1999/xhtml"> + <xs:appinfo xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml"> <xsdxt:title>Version Types</xsdxt:title> - <xsdxt:link rel="index" href="api-common.xsd" /> + <xsdxt:link rel="index" href="api-common.xsd"/> </xs:appinfo> - <xs:documentation - xml:lang="EN" + <xs:documentation xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml"> - <p> - This schema file defines all types related to versioning. - </p> + <p>This schema file defines all types related to + versioning.</p> </xs:documentation> </xs:annotation> <!-- Import ATOM specific schema definitions --> - <xs:import namespace="http://www.w3.org/2005/Atom" schemaLocation="atom/atom.xsd" /> - + <xs:import namespace="http://www.w3.org/2005/Atom" + schemaLocation="atom/atom.xsd"/> + <!-- Multiple choices --> <xs:element name="choices" type="vers:VersionChoiceList"> <xs:annotation> - <xs:documentation - xml:lang="EN" + <xs:documentation xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml"> - <p> - This element is returned when the version of the + <p>This element is returned when the version of the resource cannot be determined. The element - provides a list of choices for the resource. - </p> + provides a list of choices for the resource.</p> </xs:documentation> <xs:appinfo> <xsdxt:samples> <xsdxt:sample> - <xsdxt:code type="application/xml" href="../samples/choices.xml" /> + <xsdxt:code type="application/xml" + href="../samples/choices.xml"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/json" href="../samples/choices.json" /> + <xsdxt:code type="application/json" + href="../samples/choices.json"/> </xsdxt:sample> </xsdxt:samples> </xs:appinfo> @@ -59,35 +56,34 @@ <!-- Versioning --> <xs:element name="versions" type="vers:VersionChoiceList"> <xs:annotation> - <xs:documentation - xml:lang="EN" + <xs:documentation xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml"> - <p> - Provides a list of supported versions. - </p> + <p>Provides a list of supported versions.</p> </xs:documentation> <xs:appinfo> <xsdxt:samples> <xsdxt:sample> - <xsdxt:code type="application/xml" href="../samples/versions.xml" /> + <xsdxt:code type="application/xml" + href="../samples/versions.xml"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/json" href="../samples/versions.json" /> + <xsdxt:code type="application/json" + href="../samples/versions.json"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/atom+xml" href="../samples/versions-atom.xml" /> + <xsdxt:code type="application/atom+xml" + href="../samples/versions-atom.xml"/> </xsdxt:sample> </xsdxt:samples> </xs:appinfo> </xs:annotation> </xs:element> - <xs:element name="version" type="vers:VersionChoice" vc:minVersion="1.0" vc:maxVersion="1.1"> + <xs:element name="version" type="vers:VersionChoice" + vc:minVersion="1.0" vc:maxVersion="1.1"> <xs:annotation> - <xs:documentation - xml:lang="EN" + <xs:documentation xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml"> - <p> - This element provides detailed meta information + <p>This element provides detailed meta information regarding the status of the current API version. This is the XSD 1.0 compatible element definition. </p> @@ -95,29 +91,30 @@ </xs:annotation> </xs:element> - <xs:element name="version" type="vers:VersionChoiceRoot" vc:minVersion="1.1"> + <xs:element name="version_cr" type="vers:VersionChoiceRoot" + vc:minVersion="1.1"> <xs:annotation> - <xs:documentation - xml:lang="EN" + <xs:documentation xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml"> - <p> - This element provides detailed meta information - regarding the status of the current API - version. The description should include a pointer - to both a human readable and a machine processable - description of the API service. - </p> + <p>This element provides detailed meta information + regarding the status of the current API version. + The description should include a pointer to both a + human readable and a machine processable + description of the API service.</p> </xs:documentation> <xs:appinfo> <xsdxt:samples> <xsdxt:sample> - <xsdxt:code type="application/xml" href="../samples/version.xml" /> + <xsdxt:code type="application/xml" + href="../samples/version.xml"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/json" href="../samples/version.json" /> + <xsdxt:code type="application/json" + href="../samples/version.json"/> </xsdxt:sample> <xsdxt:sample> - <xsdxt:code type="application/atom+xml" href="../samples/version-atom.xml" /> + <xsdxt:code type="application/atom+xml" + href="../samples/version-atom.xml"/> </xsdxt:sample> </xsdxt:samples> </xs:appinfo> @@ -128,37 +125,34 @@ <xs:simpleType name="VersionStatus"> <xs:annotation> <xs:documentation> - <html:p> - The VersionStatus type describes a service's operational status. - </html:p> + <html:p>The VersionStatus type describes a service's + operational status.</html:p> </xs:documentation> </xs:annotation> - + <xs:restriction base="xs:string"> <xs:enumeration value="ALPHA"> <xs:annotation> <xs:documentation> - <html:p> - This is a new service the API. Thi API - contract may be set, but the implementaiton - may not be 100% complient with it. Developers - are encouraged to begin testing aganst an - ALPHA version to provide feedback. - </html:p> + <html:p>This is a new service the API. This + API contract may be set, but the + implementation may not be 100% compliant + with it. Developers are encouraged to + begin testing against an ALPHA version to + provide feedback.</html:p> </xs:documentation> </xs:annotation> </xs:enumeration> <xs:enumeration value="BETA"> <xs:annotation> <xs:documentation> - <html:p> - A status of BETA indicates that this + <html:p>A status of BETA indicates that this version is a candidate for the next major release and may feature functionality not - available in the current - version. Developers are encouraged to test - and begin the migration processes to a - BETA version. Note that a BETA version is + available in the current version. + Developers are encouraged to test and + begin the migration processes to a BETA + version. Note that a BETA version is undergoing testing, it has not been officially released, and my not be stable. </html:p> @@ -168,54 +162,49 @@ <xs:enumeration value="CURRENT"> <xs:annotation> <xs:documentation> - <html:p> - The API version is stable and has been + <html:p>The API version is stable and has been tested. Developers are encouraged to develop against this API version. The current released version of the API will - always be marked as CURRENT. - </html:p> + always be marked as CURRENT.</html:p> </xs:documentation> </xs:annotation> </xs:enumeration> <xs:enumeration value="DEPRECATED"> <xs:annotation> <xs:documentation> - <html:p> - A status of DEPRECATED indicates that a - newer version of the API is - available. Application developers are - discouraged from using this version and - should instead develop against the latest - current version of the API. - </html:p> + <html:p>A status of DEPRECATED indicates that + a newer version of the API is available. + Application developers are discouraged + from using this version and should instead + develop against the latest current version + of the API.</html:p> </xs:documentation> </xs:annotation> </xs:enumeration> </xs:restriction> </xs:simpleType> - + <xs:complexType name="VersionChoiceList"> <xs:annotation> <xs:documentation> - <html:p> - A version choice list outlines a collection of - resources at various versions. - </html:p> + <html:p>A version choice list outlines a collection of + resources at various versions.</html:p> </xs:documentation> </xs:annotation> <xs:sequence> - <xs:element name="version" type="vers:VersionChoice" minOccurs="1" maxOccurs="unbounded" /> - <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> + <xs:element name="version" type="vers:VersionChoice" + minOccurs="1" maxOccurs="unbounded"/> + <xs:any namespace="##other" processContents="lax" + minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:anyAttribute namespace="##other" processContents="lax"/> - <xs:assert vc:minVersion="1.1" test="every $v in vers:version satisfies $v/atom:link[@rel='self']"> + <xs:assert vc:minVersion="1.1" + test="every $v in vers:version satisfies $v/atom:link[@rel='self']"> <xs:annotation> <xs:documentation> - <html:p> - In version lists, every single version must - contain at least one self link. - </html:p> + <html:p>In version lists, every single version + must contain at least one self link.</html:p> </xs:documentation> </xs:annotation> </xs:assert> @@ -227,10 +216,9 @@ <xs:assert test="atom:link[@rel='describedby']"> <xs:annotation> <xs:documentation> - <html:p> - When used as a root element, a version choice - must contain at least one describedby link. - </html:p> + <html:p>When used as a root element, a + version choice must contain at least + one describedby link.</html:p> </xs:documentation> </xs:annotation> </xs:assert> @@ -241,40 +229,43 @@ <xs:complexType name="VersionChoice"> <xs:annotation> <xs:documentation> - <html:p> - A version choice contains relevant information + <html:p>A version choice contains relevant information about an available service that a user can then - use to target a specific version of the service. - </html:p> + use to target a specific version of the + service.</html:p> </xs:documentation> </xs:annotation> <xs:sequence> - <xs:element name="media-types" type="vers:MediaTypeList" minOccurs="0" maxOccurs="1" /> - <xs:element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" /> - <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> + <xs:element name="media-types" type="vers:MediaTypeList" + minOccurs="0" maxOccurs="1"/> + <xs:element vc:minVersion="1.1" ref="atom:link" + minOccurs="0" maxOccurs="unbounded"/> + <xs:any namespace="##other" processContents="lax" + minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="id" type="xs:string" use="required"> <xs:annotation> <xs:documentation> - <html:p> - The ID of a version choice represents the service version's unique - identifier. This ID is guaranteed to be unique only among the - service version choices outlined in the VersionChoiceList. - </html:p> + <html:p>The ID of a version choice represents the + service version's unique identifier. This ID + is guaranteed to be unique only among the + service version choices outlined in the + VersionChoiceList.</html:p> </xs:documentation> </xs:annotation> </xs:attribute> - <xs:attribute name="status" type="vers:VersionStatus" use="required"> + <xs:attribute name="status" type="vers:VersionStatus" + use="required"> <xs:annotation> <xs:documentation> - <html:p> - A version choice's status describes the current operational state of - the given service version. The operational status is captured in a - simple type enumeration called VersionStatus. - </html:p> + <html:p>A version choice's status describes the + current operational state of the given service + version. The operational status is captured in + a simple type enumeration called + VersionStatus.</html:p> </xs:documentation> </xs:annotation> </xs:attribute> @@ -282,14 +273,12 @@ <xs:attribute name="updated" type="xs:dateTime" use="optional"> <xs:annotation> <xs:documentation> - <html:p> - A version choice's updated attribute describes - the time when the version was updated. The - time should be updated anytime - <html:strong>anything</html:strong> in the + <html:p>A version choice's updated attribute + describes the time when the version was + updated. The time should be updated anytime + <html:strong>anything</html:strong>in the version has changed: documentation, - extensions, bug fixes. - </html:p> + extensions, bug fixes.</html:p> </xs:documentation> </xs:annotation> </xs:attribute> @@ -299,16 +288,16 @@ <xs:complexType name="MediaTypeList"> <xs:annotation> <xs:documentation> - <html:p> - A MediaTypeList outlines a collection of valid media types for a given - service version. - </html:p> + <html:p>A MediaTypeList outlines a collection of valid + media types for a given service version. </html:p> </xs:documentation> </xs:annotation> - + <xs:sequence> - <xs:element name="media-type" type="vers:MediaType" minOccurs="1" maxOccurs="unbounded" /> - <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> + <xs:element name="media-type" type="vers:MediaType" + minOccurs="1" maxOccurs="unbounded"/> + <xs:any namespace="##other" processContents="lax" + minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:anyAttribute namespace="##other" processContents="lax"/> </xs:complexType> @@ -316,25 +305,24 @@ <xs:complexType name="MediaType"> <xs:annotation> <xs:documentation> - <html:p> - A MediaType describes what content types the service version understands. - </html:p> + <html:p>A MediaType describes what content types the + service version understands.</html:p> </xs:documentation> </xs:annotation> <xs:sequence> - <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> + <xs:any namespace="##other" processContents="lax" + minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> - <xs:attribute name="base" type="xs:string" use="optional" default=""> + <xs:attribute name="base" type="xs:string" use="optional" + default=""> <xs:annotation> <xs:documentation> - <html:p> - The base of a given media type describes the - simple MIME type that then a more complicated - media type can be derived from. These types - are basic and provide no namespace or version - specific data are are only provided as a - convenience. - </html:p> + <html:p>The base of a given media type describes + the simple MIME type that then a more + complicated media type can be derived from. + These types are basic and provide no namespace + or version specific data are only provided as + a convenience.</html:p> </xs:documentation> </xs:annotation> </xs:attribute> @@ -342,11 +330,9 @@ <xs:attribute name="type" type="xs:string" use="required"> <xs:annotation> <xs:documentation> - <html:p> - The type attribute of a MediaType describes - the MIME specific identifier of the media type - in question. - </html:p> + <html:p>The type attribute of a MediaType + describes the MIME specific identifier of the + media type in question.</html:p> </xs:documentation> </xs:annotation> </xs:attribute>