github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/networking/v2/extensions/networkipavailabilities/testing/fixtures.go (about) 1 package testing 2 3 import ( 4 "github.com/huaweicloud/golangsdk" 5 "github.com/huaweicloud/golangsdk/openstack/networking/v2/extensions/networkipavailabilities" 6 ) 7 8 // NetworkIPAvailabilityListResult represents raw server response from a server to a list call. 9 const NetworkIPAvailabilityListResult = ` 10 { 11 "network_ip_availabilities": [ 12 { 13 "network_id": "080ee064-036d-405a-a307-3bde4a213a1b", 14 "network_name": "private", 15 "project_id": "fb57277ef2f84a0e85b9018ec2dedbf7", 16 "subnet_ip_availability": [ 17 { 18 "cidr": "10.0.0.64/26", 19 "ip_version": 4, 20 "subnet_id": "497ac4d3-0b92-42cf-82de-71302ab2b656", 21 "subnet_name": "second-private-subnet", 22 "total_ips": 61, 23 "used_ips": 12 24 }, 25 { 26 "cidr": "10.0.0.0/26", 27 "ip_version": 4, 28 "subnet_id": "521f47e7-c4fb-452c-b71a-851da38cc571", 29 "subnet_name": "private-subnet", 30 "total_ips": 61, 31 "used_ips": 2 32 } 33 ], 34 "tenant_id": "fb57277ef2f84a0e85b9018ec2dedbf7", 35 "total_ips": 122, 36 "used_ips": 14 37 }, 38 { 39 "network_id": "cf11ab78-2302-49fa-870f-851a08c7afb8", 40 "network_name": "public", 41 "project_id": "424e7cf0243c468ca61732ba45973b3e", 42 "subnet_ip_availability": [ 43 { 44 "cidr": "203.0.113.0/24", 45 "ip_version": 4, 46 "subnet_id": "4afe6e5f-9649-40db-b18f-64c7ead942bd", 47 "subnet_name": "public-subnet", 48 "total_ips": 253, 49 "used_ips": 3 50 } 51 ], 52 "tenant_id": "424e7cf0243c468ca61732ba45973b3e", 53 "total_ips": 253, 54 "used_ips": 3 55 } 56 ] 57 } 58 ` 59 60 // NetworkIPAvailability1 is an expected representation of a first object from the ResourceListResult. 61 var NetworkIPAvailability1 = networkipavailabilities.NetworkIPAvailability{ 62 NetworkID: "080ee064-036d-405a-a307-3bde4a213a1b", 63 NetworkName: "private", 64 ProjectID: "fb57277ef2f84a0e85b9018ec2dedbf7", 65 TenantID: "fb57277ef2f84a0e85b9018ec2dedbf7", 66 TotalIPs: 122, 67 UsedIPs: 14, 68 SubnetIPAvailabilities: []networkipavailabilities.SubnetIPAvailability{ 69 { 70 SubnetID: "497ac4d3-0b92-42cf-82de-71302ab2b656", 71 SubnetName: "second-private-subnet", 72 CIDR: "10.0.0.64/26", 73 IPVersion: int(golangsdk.IPv4), 74 TotalIPs: 61, 75 UsedIPs: 12, 76 }, 77 { 78 SubnetID: "521f47e7-c4fb-452c-b71a-851da38cc571", 79 SubnetName: "private-subnet", 80 CIDR: "10.0.0.0/26", 81 IPVersion: int(golangsdk.IPv4), 82 TotalIPs: 61, 83 UsedIPs: 2, 84 }, 85 }, 86 } 87 88 // NetworkIPAvailability2 is an expected representation of a first object from the ResourceListResult. 89 var NetworkIPAvailability2 = networkipavailabilities.NetworkIPAvailability{ 90 NetworkID: "cf11ab78-2302-49fa-870f-851a08c7afb8", 91 NetworkName: "public", 92 ProjectID: "424e7cf0243c468ca61732ba45973b3e", 93 TenantID: "424e7cf0243c468ca61732ba45973b3e", 94 TotalIPs: 253, 95 UsedIPs: 3, 96 SubnetIPAvailabilities: []networkipavailabilities.SubnetIPAvailability{ 97 { 98 SubnetID: "4afe6e5f-9649-40db-b18f-64c7ead942bd", 99 SubnetName: "public-subnet", 100 CIDR: "203.0.113.0/24", 101 IPVersion: int(golangsdk.IPv4), 102 TotalIPs: 253, 103 UsedIPs: 3, 104 }, 105 }, 106 } 107 108 // NetworkIPAvailabilityGetResult represents raw server response from a server to a get call. 109 const NetworkIPAvailabilityGetResult = ` 110 { 111 "network_ip_availability": { 112 "network_id": "cf11ab78-2302-49fa-870f-851a08c7afb8", 113 "network_name": "public", 114 "project_id": "424e7cf0243c468ca61732ba45973b3e", 115 "subnet_ip_availability": [ 116 { 117 "cidr": "203.0.113.0/24", 118 "ip_version": 4, 119 "subnet_id": "4afe6e5f-9649-40db-b18f-64c7ead942bd", 120 "subnet_name": "public-subnet", 121 "total_ips": 253, 122 "used_ips": 3 123 } 124 ], 125 "tenant_id": "424e7cf0243c468ca61732ba45973b3e", 126 "total_ips": 253, 127 "used_ips": 3 128 } 129 } 130 `