From b3678168838b474cdf33dca9043899a99818a802 Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Tue, 26 Nov 2013 09:45:35 -0600 Subject: [PATCH] Fix syntax errors in JSON examples Many documentation samples include JSON which is not syntactically valid. This change does not verify that the JSON samples included in project are correct or used, but merely corrects the obviously invalid sections of code. Change-Id: I8539be30d41207befda004017664099471f28ab5 --- v1.0/samples/extensions.json | 6 +-- v1.0/samples/network-get-detail-res.json | 4 +- v1.0/samples/network-post-res.json | 2 +- v1.0/samples/port-get-detail-res.json | 2 +- v1.0/samples/ports-get-detail-res.json | 4 +- v1.0/samples/private.json | 2 +- v1.0/samples/public.json | 2 +- v2.0/samples/extensions.json | 6 +-- v2.0/samples/floatingips-show-res.json | 2 +- v2.0/samples/network-get-detail-res.json | 4 +- v2.0/samples/port-get-detail-res.json | 2 +- v2.0/samples/ports-get-detail-res.json | 4 +- v2.0/samples/ports-get-res-addr-pairs.json | 54 ++++++++++---------- v2.0/samples/ports-get-res-prov.json | 2 +- v2.0/samples/ports-post-req-addr-pairs.json | 2 +- v2.0/samples/ports-show-addr-pair.json | 28 +++++----- v2.0/samples/private.json | 2 +- v2.0/samples/public.json | 2 +- v2.0/samples/subnets-get-detail-res.json | 2 +- v2.0/samples/vpn/ipsecpolicy-create-req.json | 2 +- 20 files changed, 67 insertions(+), 67 deletions(-) diff --git a/v1.0/samples/extensions.json b/v1.0/samples/extensions.json index 4d4ab9e..6fecf0e 100644 --- a/v1.0/samples/extensions.json +++ b/v1.0/samples/extensions.json @@ -5,15 +5,15 @@ "namespace": "http://docs.ciscocloud.com/api/ext/portprofile/v1.0", "alias": "Cisco Port Profile", "updated": "2011-07-23T13:25:27-06:00", - "description": "Portprofile include QoS information", + "description": "Portprofile include QoS information" }, { "name": "Cisco qos", "namespace": "http://docs.ciscocloud.com/api/ext/qos/v1.0", "alias": "Cisco qos", "updated": "2011-07-25T13:25:27-06:00", - "description": "qos include qos_name and qos_desc", - }, + "description": "qos include qos_name and qos_desc" + } ] } diff --git a/v1.0/samples/network-get-detail-res.json b/v1.0/samples/network-get-detail-res.json index 3a50447..15302f5 100644 --- a/v1.0/samples/network-get-detail-res.json +++ b/v1.0/samples/network-get-detail-res.json @@ -2,7 +2,7 @@ "network": { "id": "8bec1293-16bd-4568-ba75-1f58bec0b4c3", - "name": "test_network" + "name": "test_network", "ports": [ { @@ -10,7 +10,7 @@ "state": "DOWN" }, { - "id": b832be00-6553-4f69-af33-acd554e36d08", + "id": "b832be00-6553-4f69-af33-acd554e36d08", "state": "ACTIVE", "attachment": { diff --git a/v1.0/samples/network-post-res.json b/v1.0/samples/network-post-res.json index ca3e72f..b66d4d9 100644 --- a/v1.0/samples/network-post-res.json +++ b/v1.0/samples/network-post-res.json @@ -1,6 +1,6 @@ { "network": { - "id": "158233b0-ca9a-40b4-8614-54a4a99d47d1", + "id": "158233b0-ca9a-40b4-8614-54a4a99d47d1" } } \ No newline at end of file diff --git a/v1.0/samples/port-get-detail-res.json b/v1.0/samples/port-get-detail-res.json index 7afe620..63be6bd 100644 --- a/v1.0/samples/port-get-detail-res.json +++ b/v1.0/samples/port-get-detail-res.json @@ -2,7 +2,7 @@ "port": { "state": "DOWN", - "id": "98017ddc-efc8-4c25-a915-774b2a633855" + "id": "98017ddc-efc8-4c25-a915-774b2a633855", "attachment": { "id": "test_interface_identifier" diff --git a/v1.0/samples/ports-get-detail-res.json b/v1.0/samples/ports-get-detail-res.json index e62d9bd..d76bd5b 100644 --- a/v1.0/samples/ports-get-detail-res.json +++ b/v1.0/samples/ports-get-detail-res.json @@ -2,11 +2,11 @@ "ports": [ { "id": "98017ddc-efc8-4c25-a915-774b2a633855", - "state": "ACTIVE", + "state": "ACTIVE" }, { "id": "b832be00-6553-4f69-af33-acd554e36d08", - "state": "ACTIVE", + "state": "ACTIVE" } ] } \ No newline at end of file diff --git a/v1.0/samples/private.json b/v1.0/samples/private.json index a0d93d3..6719176 100644 --- a/v1.0/samples/private.json +++ b/v1.0/samples/private.json @@ -1,5 +1,5 @@ { - "network" { + "network": { "id" : "private", "ip" : [ {"version" : 4, "addr" : "10.176.42.16"}, diff --git a/v1.0/samples/public.json b/v1.0/samples/public.json index 3f4858a..0509ba7 100644 --- a/v1.0/samples/public.json +++ b/v1.0/samples/public.json @@ -1,5 +1,5 @@ { - "network" { + "network": { "id" : "public", "ip" : [ {"version" : 4, "addr" : "67.23.10.132"}, diff --git a/v2.0/samples/extensions.json b/v2.0/samples/extensions.json index 4d4ab9e..6fecf0e 100644 --- a/v2.0/samples/extensions.json +++ b/v2.0/samples/extensions.json @@ -5,15 +5,15 @@ "namespace": "http://docs.ciscocloud.com/api/ext/portprofile/v1.0", "alias": "Cisco Port Profile", "updated": "2011-07-23T13:25:27-06:00", - "description": "Portprofile include QoS information", + "description": "Portprofile include QoS information" }, { "name": "Cisco qos", "namespace": "http://docs.ciscocloud.com/api/ext/qos/v1.0", "alias": "Cisco qos", "updated": "2011-07-25T13:25:27-06:00", - "description": "qos include qos_name and qos_desc", - }, + "description": "qos include qos_name and qos_desc" + } ] } diff --git a/v2.0/samples/floatingips-show-res.json b/v2.0/samples/floatingips-show-res.json index 218597e..315dcf9 100644 --- a/v2.0/samples/floatingips-show-res.json +++ b/v2.0/samples/floatingips-show-res.json @@ -2,6 +2,6 @@ "floatingip": { "fixed_ip_address": "10.0.0.3", - "floating_ip_address": "172.24.4.228", + "floating_ip_address": "172.24.4.228" } } \ No newline at end of file diff --git a/v2.0/samples/network-get-detail-res.json b/v2.0/samples/network-get-detail-res.json index 3a50447..15302f5 100644 --- a/v2.0/samples/network-get-detail-res.json +++ b/v2.0/samples/network-get-detail-res.json @@ -2,7 +2,7 @@ "network": { "id": "8bec1293-16bd-4568-ba75-1f58bec0b4c3", - "name": "test_network" + "name": "test_network", "ports": [ { @@ -10,7 +10,7 @@ "state": "DOWN" }, { - "id": b832be00-6553-4f69-af33-acd554e36d08", + "id": "b832be00-6553-4f69-af33-acd554e36d08", "state": "ACTIVE", "attachment": { diff --git a/v2.0/samples/port-get-detail-res.json b/v2.0/samples/port-get-detail-res.json index 7afe620..63be6bd 100644 --- a/v2.0/samples/port-get-detail-res.json +++ b/v2.0/samples/port-get-detail-res.json @@ -2,7 +2,7 @@ "port": { "state": "DOWN", - "id": "98017ddc-efc8-4c25-a915-774b2a633855" + "id": "98017ddc-efc8-4c25-a915-774b2a633855", "attachment": { "id": "test_interface_identifier" diff --git a/v2.0/samples/ports-get-detail-res.json b/v2.0/samples/ports-get-detail-res.json index e62d9bd..d76bd5b 100644 --- a/v2.0/samples/ports-get-detail-res.json +++ b/v2.0/samples/ports-get-detail-res.json @@ -2,11 +2,11 @@ "ports": [ { "id": "98017ddc-efc8-4c25-a915-774b2a633855", - "state": "ACTIVE", + "state": "ACTIVE" }, { "id": "b832be00-6553-4f69-af33-acd554e36d08", - "state": "ACTIVE", + "state": "ACTIVE" } ] } \ No newline at end of file diff --git a/v2.0/samples/ports-get-res-addr-pairs.json b/v2.0/samples/ports-get-res-addr-pairs.json index aea4d1c..24d0e98 100644 --- a/v2.0/samples/ports-get-res-addr-pairs.json +++ b/v2.0/samples/ports-get-res-addr-pairs.json @@ -1,33 +1,33 @@ { - 'ports':[ + "ports":[ { - 'admin_state_up': True, - 'allowed_address_pairs': [{'ip_address': '23.23.23.1', - 'mac_address': 'fa:16:3e:c4:cd:3f'}], - 'device_id': '', - 'device_owner': '', - 'fixed_ips': [{'ip_address': '10.0.0.2', - 'subnet_id': 'f4145134-b99b-4b18-9940-47239f071923'}], - 'id': '191f5290-3a5a-40ff-b0cb-cd4b115b400e', - 'mac_address': 'fa:16:3e:c4:cd:3f', - 'name': '', - 'network_id': '327f2a2f-9d70-417f-ac3a-d3155e25cf25', - 'status': 'DOWN', - 'tenant_id': '8462a4d167f84256b7035f4c408c1185' + "admin_state_up": true, + "allowed_address_pairs": [{"ip_address": "23.23.23.1", + "mac_address": "fa:16:3e:c4:cd:3f"}], + "device_id": "", + "device_owner": "", + "fixed_ips": [{"ip_address": "10.0.0.2", + "subnet_id": "f4145134-b99b-4b18-9940-47239f071923"}], + "id": "191f5290-3a5a-40ff-b0cb-cd4b115b400e", + "mac_address": "fa:16:3e:c4:cd:3f", + "name": "", + "network_id": "327f2a2f-9d70-417f-ac3a-d3155e25cf25", + "status": "DOWN", + "tenant_id": "8462a4d167f84256b7035f4c408c1185" }, { - 'admin_state_up': True, - 'allowed_address_pairs': [], - 'device_id': '', - 'device_owner': '', - 'fixed_ips': [{'ip_address': '10.0.0.3', - 'subnet_id': 'f4145134-b99b-4b18-9940-47239f071923'}], - 'id': 'ec2fb9f9-a11b-4791-852d-eb1ab9b27a0e', - 'mac_address': 'fa:16:3e:a9:3e:1a', - 'name': '', - 'network_id': '327f2a2f-9d70-417f-ac3a-d3155e25cf25', - 'status': 'DOWN', - 'tenant_id': '8462a4d167f84256b7035f4c408c1185' - }, + "admin_state_up": true, + "allowed_address_pairs": [], + "device_id": "", + "device_owner": "", + "fixed_ips": [{"ip_address": "10.0.0.3", + "subnet_id": "f4145134-b99b-4b18-9940-47239f071923"}], + "id": "ec2fb9f9-a11b-4791-852d-eb1ab9b27a0e", + "mac_address": "fa:16:3e:a9:3e:1a", + "name": "", + "network_id": "327f2a2f-9d70-417f-ac3a-d3155e25cf25", + "status": "DOWN", + "tenant_id": "8462a4d167f84256b7035f4c408c1185" + } ] } diff --git a/v2.0/samples/ports-get-res-prov.json b/v2.0/samples/ports-get-res-prov.json index 4e72025..4ae31f2 100644 --- a/v2.0/samples/ports-get-res-prov.json +++ b/v2.0/samples/ports-get-res-prov.json @@ -23,6 +23,6 @@ "provider:network_type": "local", "provider:physical_network": null, "provider:segmentation_id": null - }, + } ] } \ No newline at end of file diff --git a/v2.0/samples/ports-post-req-addr-pairs.json b/v2.0/samples/ports-post-req-addr-pairs.json index 3306f7c..e4f976a 100644 --- a/v2.0/samples/ports-post-req-addr-pairs.json +++ b/v2.0/samples/ports-post-req-addr-pairs.json @@ -2,7 +2,7 @@ "port": { "network_id": "3537e809-8bec-4ae4-a5ab-2c6477760195", - "allowed_address_pairs": [{"ip_address": "10.3.3.3"}], + "allowed_address_pairs": [{"ip_address": "10.3.3.3"}] } } diff --git a/v2.0/samples/ports-show-addr-pair.json b/v2.0/samples/ports-show-addr-pair.json index dd0d1ee..b5a1a88 100644 --- a/v2.0/samples/ports-show-addr-pair.json +++ b/v2.0/samples/ports-show-addr-pair.json @@ -1,18 +1,18 @@ { - 'port': + "port": { - 'admin_state_up': True, - 'allowed_address_pairs': [{'ip_address': '23.23.23.1', - 'mac_address': 'fa:16:3e:c4:cd:3f'}], - 'device_id': '', - 'device_owner': '', - 'fixed_ips': [{'ip_address': '10.0.0.2', - 'subnet_id': 'f4145134-b99b-4b18-9940-47239f071923'}], - 'id': '191f5290-3a5a-40ff-b0cb-cd4b115b400e', - 'mac_address': 'fa:16:3e:c4:cd:3f', - 'name': '', - 'network_id': '327f2a2f-9d70-417f-ac3a-d3155e25cf25', - 'status': 'DOWN', - 'tenant_id': '8462a4d167f84256b7035f4c408c1185' + "admin_state_up": true, + "allowed_address_pairs": [{"ip_address": "23.23.23.1", + "mac_address": "fa:16:3e:c4:cd:3f"}], + "device_id": "", + "device_owner": "", + "fixed_ips": [{"ip_address": "10.0.0.2", + "subnet_id": "f4145134-b99b-4b18-9940-47239f071923"}], + "id": "191f5290-3a5a-40ff-b0cb-cd4b115b400e", + "mac_address": "fa:16:3e:c4:cd:3f", + "name": "", + "network_id": "327f2a2f-9d70-417f-ac3a-d3155e25cf25", + "status": "DOWN", + "tenant_id": "8462a4d167f84256b7035f4c408c1185" } } diff --git a/v2.0/samples/private.json b/v2.0/samples/private.json index a0d93d3..6719176 100644 --- a/v2.0/samples/private.json +++ b/v2.0/samples/private.json @@ -1,5 +1,5 @@ { - "network" { + "network": { "id" : "private", "ip" : [ {"version" : 4, "addr" : "10.176.42.16"}, diff --git a/v2.0/samples/public.json b/v2.0/samples/public.json index 3f4858a..0509ba7 100644 --- a/v2.0/samples/public.json +++ b/v2.0/samples/public.json @@ -1,5 +1,5 @@ { - "network" { + "network": { "id" : "public", "ip" : [ {"version" : 4, "addr" : "67.23.10.132"}, diff --git a/v2.0/samples/subnets-get-detail-res.json b/v2.0/samples/subnets-get-detail-res.json index d66231c..1e26b2e 100644 --- a/v2.0/samples/subnets-get-detail-res.json +++ b/v2.0/samples/subnets-get-detail-res.json @@ -13,6 +13,6 @@ content-type: application/json "ip_version": 4, "cidr": "10.10.0.0/24", "id": "4156c7a5-e8c4-4aff-a6e1-8f3c7bc83861", - "enable_dhcp": false, + "enable_dhcp": false } } \ No newline at end of file diff --git a/v2.0/samples/vpn/ipsecpolicy-create-req.json b/v2.0/samples/vpn/ipsecpolicy-create-req.json index aad6601..f7b37db 100644 --- a/v2.0/samples/vpn/ipsecpolicy-create-req.json +++ b/v2.0/samples/vpn/ipsecpolicy-create-req.json @@ -5,7 +5,7 @@ "auth_algorithm": "sha1", "encapsulation_mode": "tunnel", "encryption_algorithm": "aes-128", - "pfs": "group5" + "pfs": "group5", "lifetime": { "units": "seconds", "value": 7200