github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/networking/v2/extensions/external/testing/fixtures.go (about) 1 package testing 2 3 // These fixtures are here instead of in the underlying networks package 4 // because all network tests (including extensions) would have to 5 // implement the NetworkExternalExt extention for create/update tests 6 // to pass. 7 8 const CreateRequest = ` 9 { 10 "network": { 11 "name": "private", 12 "admin_state_up": true, 13 "router:external": false 14 } 15 }` 16 17 const CreateResponse = ` 18 { 19 "network": { 20 "status": "ACTIVE", 21 "subnets": ["08eae331-0402-425a-923c-34f7cfe39c1b"], 22 "name": "private", 23 "admin_state_up": true, 24 "tenant_id": "26a7980765d0414dbc1fc1f88cdb7e6e", 25 "shared": false, 26 "id": "db193ab3-96e3-4cb3-8fc5-05f4296d0324", 27 "provider:segmentation_id": 9876543210, 28 "provider:physical_network": null, 29 "provider:network_type": "local", 30 "router:external": false 31 } 32 }` 33 34 const UpdateRequest = ` 35 { 36 "network": { 37 "name": "new_network_name", 38 "admin_state_up": false, 39 "shared": true, 40 "router:external": false 41 } 42 }` 43 44 const UpdateResponse = ` 45 { 46 "network": { 47 "status": "ACTIVE", 48 "subnets": [], 49 "name": "new_network_name", 50 "admin_state_up": false, 51 "tenant_id": "4fd44f30292945e481c7b8a0c8908869", 52 "shared": true, 53 "id": "4e8e5957-649f-477b-9e5b-f1f75b21c03c", 54 "provider:segmentation_id": 1234567890, 55 "provider:physical_network": null, 56 "provider:network_type": "local", 57 "router:external": false 58 } 59 }` 60 61 const ExpectedListOpts = "?id=d32019d3-bc6e-4319-9c1d-6722fc136a22&router%3Aexternal=true"