github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/networking/v2/extensions/subnetpools/testing/fixtures.go (about) 1 package testing 2 3 import ( 4 "time" 5 6 "github.com/huaweicloud/golangsdk/openstack/networking/v2/extensions/subnetpools" 7 ) 8 9 const SubnetPoolsListResult = ` 10 { 11 "subnetpools": [ 12 { 13 "address_scope_id": null, 14 "created_at": "2017-12-28T07:21:41Z", 15 "default_prefixlen": "8", 16 "default_quota": null, 17 "description": "IPv4", 18 "id": "d43a57fe-3390-4608-b437-b1307b0adb40", 19 "ip_version": 4, 20 "is_default": false, 21 "max_prefixlen": "32", 22 "min_prefixlen": "8", 23 "name": "MyPoolIpv4", 24 "prefixes": [ 25 "10.10.10.0/24", 26 "10.11.11.0/24" 27 ], 28 "project_id": "1e2b9857295a4a3e841809ef492812c5", 29 "revision_number": 1, 30 "shared": false, 31 "tenant_id": "1e2b9857295a4a3e841809ef492812c5", 32 "updated_at": "2017-12-28T07:21:41Z" 33 }, 34 { 35 "address_scope_id": "0bc38e22-be49-4e67-969e-fec3f36508bd", 36 "created_at": "2017-12-28T07:21:34Z", 37 "default_prefixlen": "64", 38 "default_quota": null, 39 "description": "IPv6", 40 "id": "832cb7f3-59fe-40cf-8f64-8350ffc03272", 41 "ip_version": 6, 42 "is_default": true, 43 "max_prefixlen": "128", 44 "min_prefixlen": "64", 45 "name": "MyPoolIpv6", 46 "prefixes": [ 47 "fdf7:b13d:dead:beef::/64", 48 "fd65:86cc:a334:39b7::/64" 49 ], 50 "project_id": "1e2b9857295a4a3e841809ef492812c5", 51 "revision_number": 1, 52 "shared": false, 53 "tenant_id": "1e2b9857295a4a3e841809ef492812c5", 54 "updated_at": "2017-12-28T07:21:34Z" 55 }, 56 { 57 "address_scope_id": null, 58 "created_at": "2017-12-28T07:21:27Z", 59 "default_prefixlen": "64", 60 "default_quota": 4, 61 "description": "PublicPool", 62 "id": "2fe18ae6-58c2-4a85-8bfb-566d6426749b", 63 "ip_version": 6, 64 "is_default": false, 65 "max_prefixlen": "128", 66 "min_prefixlen": "64", 67 "name": "PublicIPv6", 68 "prefixes": [ 69 "2001:db8::a3/64" 70 ], 71 "project_id": "ceb366d50ad54fe39717df3af60f9945", 72 "revision_number": 1, 73 "shared": true, 74 "tenant_id": "ceb366d50ad54fe39717df3af60f9945", 75 "updated_at": "2017-12-28T07:21:27Z" 76 } 77 ] 78 } 79 ` 80 81 var SubnetPool1 = subnetpools.SubnetPool{ 82 AddressScopeID: "", 83 CreatedAt: time.Date(2017, 12, 28, 7, 21, 41, 0, time.UTC), 84 DefaultPrefixLen: 8, 85 DefaultQuota: 0, 86 Description: "IPv4", 87 ID: "d43a57fe-3390-4608-b437-b1307b0adb40", 88 IPversion: 4, 89 IsDefault: false, 90 MaxPrefixLen: 32, 91 MinPrefixLen: 8, 92 Name: "MyPoolIpv4", 93 Prefixes: []string{ 94 "10.10.10.0/24", 95 "10.11.11.0/24", 96 }, 97 ProjectID: "1e2b9857295a4a3e841809ef492812c5", 98 TenantID: "1e2b9857295a4a3e841809ef492812c5", 99 RevisionNumber: 1, 100 Shared: false, 101 UpdatedAt: time.Date(2017, 12, 28, 7, 21, 41, 0, time.UTC), 102 } 103 104 var SubnetPool2 = subnetpools.SubnetPool{ 105 AddressScopeID: "0bc38e22-be49-4e67-969e-fec3f36508bd", 106 CreatedAt: time.Date(2017, 12, 28, 7, 21, 34, 0, time.UTC), 107 DefaultPrefixLen: 64, 108 DefaultQuota: 0, 109 Description: "IPv6", 110 ID: "832cb7f3-59fe-40cf-8f64-8350ffc03272", 111 IPversion: 6, 112 IsDefault: true, 113 MaxPrefixLen: 128, 114 MinPrefixLen: 64, 115 Name: "MyPoolIpv6", 116 Prefixes: []string{ 117 "fdf7:b13d:dead:beef::/64", 118 "fd65:86cc:a334:39b7::/64", 119 }, 120 ProjectID: "1e2b9857295a4a3e841809ef492812c5", 121 TenantID: "1e2b9857295a4a3e841809ef492812c5", 122 RevisionNumber: 1, 123 Shared: false, 124 UpdatedAt: time.Date(2017, 12, 28, 7, 21, 34, 0, time.UTC), 125 } 126 127 var SubnetPool3 = subnetpools.SubnetPool{ 128 AddressScopeID: "", 129 CreatedAt: time.Date(2017, 12, 28, 7, 21, 27, 0, time.UTC), 130 DefaultPrefixLen: 64, 131 DefaultQuota: 4, 132 Description: "PublicPool", 133 ID: "2fe18ae6-58c2-4a85-8bfb-566d6426749b", 134 IPversion: 6, 135 IsDefault: false, 136 MaxPrefixLen: 128, 137 MinPrefixLen: 64, 138 Name: "PublicIPv6", 139 Prefixes: []string{ 140 "2001:db8::a3/64", 141 }, 142 ProjectID: "ceb366d50ad54fe39717df3af60f9945", 143 TenantID: "ceb366d50ad54fe39717df3af60f9945", 144 RevisionNumber: 1, 145 Shared: true, 146 UpdatedAt: time.Date(2017, 12, 28, 7, 21, 27, 0, time.UTC), 147 } 148 149 const SubnetPoolGetResult = ` 150 { 151 "subnetpool": { 152 "min_prefixlen": "64", 153 "address_scope_id": null, 154 "default_prefixlen": "64", 155 "id": "0a738452-8057-4ad3-89c2-92f6a74afa76", 156 "max_prefixlen": "128", 157 "name": "my-ipv6-pool", 158 "default_quota": 2, 159 "is_default": true, 160 "project_id": "1e2b9857295a4a3e841809ef492812c5", 161 "tenant_id": "1e2b9857295a4a3e841809ef492812c5", 162 "created_at": "2018-01-01T00:00:01Z", 163 "prefixes": [ 164 "2001:db8::a3/64" 165 ], 166 "updated_at": "2018-01-01T00:10:10Z", 167 "ip_version": 6, 168 "shared": false, 169 "description": "ipv6 prefixes", 170 "revision_number": 2 171 } 172 } 173 ` 174 175 const SubnetPoolCreateRequest = ` 176 { 177 "subnetpool": { 178 "name": "my_ipv4_pool", 179 "prefixes": [ 180 "10.10.0.0/16", 181 "10.11.11.0/24" 182 ], 183 "address_scope_id": "3d4e2e2a-552b-42ad-a16d-820bbf3edaf3", 184 "min_prefixlen": 25, 185 "max_prefixlen": 30, 186 "description": "ipv4 prefixes" 187 } 188 } 189 ` 190 191 const SubnetPoolCreateResult = ` 192 { 193 "subnetpool": { 194 "address_scope_id": "3d4e2e2a-552b-42ad-a16d-820bbf3edaf3", 195 "created_at": "2018-01-01T00:00:15Z", 196 "default_prefixlen": "25", 197 "default_quota": null, 198 "description": "ipv4 prefixes", 199 "id": "55b5999c-c2fe-42cd-bce0-961a551b80f5", 200 "ip_version": 4, 201 "is_default": false, 202 "max_prefixlen": "30", 203 "min_prefixlen": "25", 204 "name": "my_ipv4_pool", 205 "prefixes": [ 206 "10.10.0.0/16", 207 "10.11.11.0/24" 208 ], 209 "project_id": "1e2b9857295a4a3e841809ef492812c5", 210 "revision_number": 1, 211 "shared": false, 212 "tenant_id": "1e2b9857295a4a3e841809ef492812c5", 213 "updated_at": "2018-01-01T00:00:15Z" 214 } 215 } 216 ` 217 218 const SubnetPoolUpdateRequest = ` 219 { 220 "subnetpool": { 221 "name": "new_subnetpool_name", 222 "prefixes": [ 223 "10.11.12.0/24", 224 "10.24.0.0/16" 225 ], 226 "max_prefixlen": 16, 227 "address_scope_id": "", 228 "default_quota": 0, 229 "description": "" 230 } 231 } 232 ` 233 234 const SubnetPoolUpdateResponse = ` 235 { 236 "subnetpool": { 237 "address_scope_id": null, 238 "created_at": "2018-01-03T07:21:34Z", 239 "default_prefixlen": 8, 240 "default_quota": null, 241 "description": null, 242 "id": "099546ca-788d-41e5-a76d-17d8cd282d3e", 243 "ip_version": 4, 244 "is_default": true, 245 "max_prefixlen": 16, 246 "min_prefixlen": 8, 247 "name": "new_subnetpool_name", 248 "prefixes": [ 249 "10.8.0.0/16", 250 "10.11.12.0/24", 251 "10.24.0.0/16" 252 ], 253 "revision_number": 2, 254 "shared": false, 255 "tenant_id": "1e2b9857295a4a3e841809ef492812c5", 256 "updated_at": "2018-01-05T09:56:56Z" 257 } 258 } 259 `