From 7050f29501b12ee401eea0041179cdd4cf3b8a86 Mon Sep 17 00:00:00 2001 From: Hirofumi Ichihara Date: Thu, 23 Feb 2017 17:22:41 -0500 Subject: [PATCH] api-ref: Fix using examples of API Some example files are lost the link or duplicated. This patch makes example files clear. Change-Id: Iefe4009b39b2b58b26177e0ce03f87d04e0594bd --- api-ref/source/v2/flavors.inc | 12 +++++ api-ref/source/v2/floatingips.inc | 10 +++- api-ref/source/v2/metering.inc | 6 +++ .../flavors/flavor-associate-response.json | 2 +- .../floatingip-update-response.json | 19 ++++---- .../lbaas/loadbalancer-delete-response.json | 8 ---- .../v2/samples/lbaas/pool-list-resp.json | 21 --------- .../network-provider-update-response.json | 23 --------- .../networks-multi-list-response.json | 47 ------------------- .../subnets/subnetpool-create-response.json | 18 +++---- api-ref/source/v2/subnetpools.inc | 6 +++ api-ref/source/v2/trunk.inc | 5 ++ 12 files changed, 58 insertions(+), 119 deletions(-) delete mode 100644 api-ref/source/v2/samples/lbaas/loadbalancer-delete-response.json delete mode 100644 api-ref/source/v2/samples/lbaas/pool-list-resp.json delete mode 100644 api-ref/source/v2/samples/networks/network-provider-update-response.json delete mode 100644 api-ref/source/v2/samples/networks/networks-multi-list-response.json diff --git a/api-ref/source/v2/flavors.inc b/api-ref/source/v2/flavors.inc index 9a00a1931..52ff0a542 100644 --- a/api-ref/source/v2/flavors.inc +++ b/api-ref/source/v2/flavors.inc @@ -133,6 +133,12 @@ Response Parameters - enabled: flavor-enabled - service_profiles: flavor-service_profiles +Response Example +---------------- + +.. literalinclude:: samples/flavors/flavor-create-response.json + :language: javascript + Show flavor details =================== @@ -287,6 +293,12 @@ Response Parameters - service_profile: service_profile - id: id +Response Example +---------------- + +.. literalinclude:: samples/flavors/flavor-associate-response.json + :language: javascript + Disassociate a flavor. ====================== diff --git a/api-ref/source/v2/floatingips.inc b/api-ref/source/v2/floatingips.inc index 9f5661611..f864b9e9d 100644 --- a/api-ref/source/v2/floatingips.inc +++ b/api-ref/source/v2/floatingips.inc @@ -162,6 +162,12 @@ Response Parameters - port_id: floatingip-port_id - id: floatingip-id +Response Example +---------------- + +.. literalinclude:: samples/floatingips/floatingip-create-response.json + :language: javascript + Show floating IP details ======================== @@ -263,7 +269,7 @@ Request Request Example --------------- -.. literalinclude:: samples/floatingips/floatingip-disassociate-request.json +.. literalinclude:: samples/floatingips/floatingip-update-request.json :language: javascript Response Parameters @@ -289,7 +295,7 @@ Response Parameters Response Example ---------------- -.. literalinclude:: samples/floatingips/floatingip-disassociate-response.json +.. literalinclude:: samples/floatingips/floatingip-update-response.json :language: javascript Delete floating IP diff --git a/api-ref/source/v2/metering.inc b/api-ref/source/v2/metering.inc index 0ffe54de0..dde9f0e8b 100644 --- a/api-ref/source/v2/metering.inc +++ b/api-ref/source/v2/metering.inc @@ -94,6 +94,12 @@ Response Parameters - id: metering_label-id - name: name +Response Example +---------------- + +.. literalinclude:: samples/metering/metering-label-create-response.json + :language: javascript + Show metering label details =========================== diff --git a/api-ref/source/v2/samples/flavors/flavor-associate-response.json b/api-ref/source/v2/samples/flavors/flavor-associate-response.json index 29685d7a9..f2e491ab4 100644 --- a/api-ref/source/v2/samples/flavors/flavor-associate-response.json +++ b/api-ref/source/v2/samples/flavors/flavor-associate-response.json @@ -1,5 +1,5 @@ { "service_profile": { - "id": "7fc0581b-4509-49e1-90eb-c953c877fa4c" + "id": "4e5b9191-ffbe-4f7a-b112-2db98232fd32" } } diff --git a/api-ref/source/v2/samples/floatingips/floatingip-update-response.json b/api-ref/source/v2/samples/floatingips/floatingip-update-response.json index 715a625b6..e4689ade8 100644 --- a/api-ref/source/v2/samples/floatingips/floatingip-update-response.json +++ b/api-ref/source/v2/samples/floatingips/floatingip-update-response.json @@ -1,14 +1,17 @@ { "floatingip": { - "floating_network_id": "376da547-b977-4cfe-9cba-275c80debf57", - "router_id": "d23abc8d-2991-4a55-ba98-2aaea84cc72f", + "created_at": "2016-12-21T10:55:50Z", + "description": "floating ip for testing", "fixed_ip_address": "10.0.0.4", "floating_ip_address": "172.24.4.228", - "project_id": "4969c491a3c74ee4af974e6d800c62de", - "tenant_id": "4969c491a3c74ee4af974e6d800c62de", - "status": "ACTIVE", - "port_id": "fc861431-0e6c-4842-a0ed-e2363f9bc3a8", + "floating_network_id": "376da547-b977-4cfe-9cba-275c80debf57", "id": "2f245a7b-796b-4f26-9cf9-9e82d248fda7", - "description": "floating ip for testing" + "port_id": "fc861431-0e6c-4842-a0ed-e2363f9bc3a8", + "project_id": "4969c491a3c74ee4af974e6d800c62de", + "revision_number": 3, + "router_id": "d23abc8d-2991-4a55-ba98-2aaea84cc72f", + "status": "ACTIVE", + "tenant_id": "4969c491a3c74ee4af974e6d800c62de", + "updated_at": "2016-12-22T03:13:49Z" } -} +} \ No newline at end of file diff --git a/api-ref/source/v2/samples/lbaas/loadbalancer-delete-response.json b/api-ref/source/v2/samples/lbaas/loadbalancer-delete-response.json deleted file mode 100644 index 9f8f3439c..000000000 --- a/api-ref/source/v2/samples/lbaas/loadbalancer-delete-response.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "loadbalancer": { - "active_connections": 0, - "total_connections": 0, - "bytes_in": 0, - "bytes_out": 0 - } -} diff --git a/api-ref/source/v2/samples/lbaas/pool-list-resp.json b/api-ref/source/v2/samples/lbaas/pool-list-resp.json deleted file mode 100644 index 4f511bc92..000000000 --- a/api-ref/source/v2/samples/lbaas/pool-list-resp.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "pools": [ - { - "admin_state_up": true, - "description": "simple pool", - "healthmonitor_id": null, - "id": "4c0a0a5f-cf8f-44b7-b912-957daa8ce5e5", - "lb_algorithm": "ROUND_ROBIN", - "listeners": [ - { - "id": "35cb8516-1173-4035-8dae-0dae3453f37f" - } - ], - "members": [], - "name": "pool1", - "protocol": "HTTP", - "project_id": "1a3e005cf9ce40308c900bcb08e5320c", - "tenant_id": "1a3e005cf9ce40308c900bcb08e5320c" - } - ] -} diff --git a/api-ref/source/v2/samples/networks/network-provider-update-response.json b/api-ref/source/v2/samples/networks/network-provider-update-response.json deleted file mode 100644 index a60400b66..000000000 --- a/api-ref/source/v2/samples/networks/network-provider-update-response.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "network": { - "admin_state_up": true, - "availability_zone_hints": [], - "availability_zones": [ - "nova" - ], - "id": "1f370095-98f6-4079-be64-6d3d4a6adcc6", - "mtu": 0, - "name": "sample_network_5_updated", - "port_security_enabled": true, - "project_id": "4fd44f30292945e481c7b8a0c8908869", - "provider:network_type": "local", - "provider:physical_network": null, - "provider:segmentation_id": null, - "router:external": false, - "shared": false, - "status": "ACTIVE", - "subnets": [], - "tenant_id": "4fd44f30292945e481c7b8a0c8908869", - "description": "" - } -} diff --git a/api-ref/source/v2/samples/networks/networks-multi-list-response.json b/api-ref/source/v2/samples/networks/networks-multi-list-response.json deleted file mode 100644 index b37e6d114..000000000 --- a/api-ref/source/v2/samples/networks/networks-multi-list-response.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "networks": [ - { - "status": "ACTIVE", - "subnets": [], - "name": "net1", - "admin_state_up": true, - "project_id": "9bacb3c5d39d41a79512987f338cf177", - "tenant_id": "9bacb3c5d39d41a79512987f338cf177", - "qos_policy_id": "6a8454ade84346f59e8d40665f878b2e", - "segments": [ - { - "provider:segmentation_id": 2, - "provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453", - "provider:network_type": "vlan" - }, - { - "provider:segmentation_id": 0, - "provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453", - "provider:network_type": "stt" - } - ], - "router:external": false, - "shared": false, - "id": "4e8e5957-649f-477b-9e5b-f1f75b21c03c", - "description": "" - }, - { - "status": "ACTIVE", - "subnets": [ - "08eae331-0402-425a-923c-34f7cfe39c1b" - ], - "name": "private", - "provider:physical_network": null, - "router:external": true, - "admin_state_up": true, - "project_id": "26a7980765d0414dbc1fc1f88cdb7e6e", - "tenant_id": "26a7980765d0414dbc1fc1f88cdb7e6e", - "qos_policy_id": "bfdb6c39f71e4d44b1dfbda245c50819", - "provider:network_type": "local", - "shared": true, - "id": "db193ab3-96e3-4cb3-8fc5-05f4296d0324", - "provider:segmentation_id": null, - "description": "" - } - ] -} diff --git a/api-ref/source/v2/samples/subnets/subnetpool-create-response.json b/api-ref/source/v2/samples/subnets/subnetpool-create-response.json index 1470a6258..415354239 100644 --- a/api-ref/source/v2/samples/subnets/subnetpool-create-response.json +++ b/api-ref/source/v2/samples/subnets/subnetpool-create-response.json @@ -1,21 +1,21 @@ { "subnetpool": { - "min_prefixlen": "24", "address_scope_id": null, - "default_prefixlen": "25", - "id": "f49a1319-423a-4ee6-ba54-1d95a4f6cc68", - "max_prefixlen": "30", - "name": "my-subnet-pool", + "default_prefixlen": 25, "default_quota": null, + "description": "", + "id": "f49a1319-423a-4ee6-ba54-1d95a4f6cc68", + "ip_version": 4, "is_default": false, - "project_id": "9fadcee8aa7c40cdb2114fff7d569c08", - "tenant_id": "9fadcee8aa7c40cdb2114fff7d569c08", + "max_prefixlen": 30, + "min_prefixlen": 24, + "name": "my-subnet-pool", "prefixes": [ "10.10.0.0/21", "192.168.0.0/16" ], - "ip_version": 4, + "project_id": "9fadcee8aa7c40cdb2114fff7d569c08", "shared": false, - "description": "" + "tenant_id": "9fadcee8aa7c40cdb2114fff7d569c08" } } diff --git a/api-ref/source/v2/subnetpools.inc b/api-ref/source/v2/subnetpools.inc index 1a77036a0..4e52f0897 100644 --- a/api-ref/source/v2/subnetpools.inc +++ b/api-ref/source/v2/subnetpools.inc @@ -267,3 +267,9 @@ Response Parameters - description: description - is_default: subnetpool_is_default - revision_number: subnetpool_revision_number + +Response Example +---------------- + +.. literalinclude:: samples/subnets/subnetpool-create-response.json + :language: javascript \ No newline at end of file diff --git a/api-ref/source/v2/trunk.inc b/api-ref/source/v2/trunk.inc index 1f78bba3f..ed08981b5 100644 --- a/api-ref/source/v2/trunk.inc +++ b/api-ref/source/v2/trunk.inc @@ -135,6 +135,11 @@ Response Parameters - sub_ports: sub_ports - updated_at: updated_at_resource +Response Example +---------------- + +.. literalinclude:: ../v2/samples/trunks/trunks-create-response.json + :language: javascript Add subports to trunk =====================