github.com/gophercloud/gophercloud@v1.14.1/openstack/networking/v2/extensions/bgpvpns/testing/fixture.go (about) 1 package testing 2 3 import "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/bgpvpns" 4 5 const ListBGPVPNsResult = ` 6 { 7 "bgpvpns": [ 8 { 9 "export_targets": [ 10 "64512:1666" 11 ], 12 "name": "", 13 "routers": [], 14 "route_distinguishers": [ 15 "64512:1777", 16 "64512:1888", 17 "64512:1999" 18 ], 19 "tenant_id": "b7549121395844bea941bb92feb3fad9", 20 "project_id": "b7549121395844bea941bb92feb3fad9", 21 "import_targets": [ 22 "64512:1555" 23 ], 24 "route_targets": [ 25 "64512:1444" 26 ], 27 "type": "l3", 28 "id": "0f9d472a-908f-40f5-8574-b4e8a63ccbf0", 29 "networks": [], 30 "local_pref": null, 31 "vni": 1000 32 } 33 ] 34 } 35 ` 36 37 var BGPVPN = bgpvpns.BGPVPN{ 38 ID: "0f9d472a-908f-40f5-8574-b4e8a63ccbf0", 39 Name: "", 40 RouteDistinguishers: []string{"64512:1777", "64512:1888", "64512:1999"}, 41 RouteTargets: []string{"64512:1444"}, 42 ImportTargets: []string{"64512:1555"}, 43 ExportTargets: []string{"64512:1666"}, 44 LocalPref: nil, 45 VNI: 1000, 46 TenantID: "b7549121395844bea941bb92feb3fad9", 47 ProjectID: "b7549121395844bea941bb92feb3fad9", 48 Type: "l3", 49 Routers: []string{}, 50 Networks: []string{}, 51 } 52 53 const GetBGPVPNResult = ` 54 { 55 "bgpvpn": { 56 "id": "460ac411-3dfb-45bb-8116-ed1a7233d143", 57 "name": "foo", 58 "route_targets": ["64512:1444"], 59 "export_targets": [], 60 "import_targets": [], 61 "type": "l3", 62 "tenant_id": "f94ea398564d49dfb0d542f086c68ce7", 63 "project_id": "f94ea398564d49dfb0d542f086c68ce7", 64 "routers": [], 65 "route_distinguishers": [], 66 "networks": [ 67 "a4f2b8df-cb42-4893-a333-d0b5c36ade17" 68 ], 69 "local_pref": null, 70 "vni": 1000 71 } 72 } 73 ` 74 75 var GetBGPVPN = bgpvpns.BGPVPN{ 76 ID: "460ac411-3dfb-45bb-8116-ed1a7233d143", 77 Name: "foo", 78 RouteDistinguishers: []string{}, 79 RouteTargets: []string{"64512:1444"}, 80 ImportTargets: []string{}, 81 ExportTargets: []string{}, 82 LocalPref: nil, 83 VNI: 1000, 84 TenantID: "f94ea398564d49dfb0d542f086c68ce7", 85 ProjectID: "f94ea398564d49dfb0d542f086c68ce7", 86 Type: "l3", 87 Routers: []string{}, 88 Networks: []string{"a4f2b8df-cb42-4893-a333-d0b5c36ade17"}, 89 } 90 91 const CreateRequest = ` 92 { 93 "bgpvpn": { 94 "tenant_id": "b7549121395844bea941bb92feb3fad9", 95 "route_targets": ["64512:1444"], 96 "import_targets": ["64512:1555"], 97 "export_targets": ["64512:1666"], 98 "route_distinguishers": ["64512:1777", "64512:1888", "64512:1999"], 99 "type": "l3", 100 "vni": 1000 101 } 102 } 103 ` 104 105 const CreateResponse = ` 106 { 107 "bgpvpn": { 108 "export_targets": [ 109 "64512:1666" 110 ], 111 "name": "", 112 "routers": [], 113 "route_distinguishers": [ 114 "64512:1777", 115 "64512:1888", 116 "64512:1999" 117 ], 118 "tenant_id": "b7549121395844bea941bb92feb3fad9", 119 "project_id": "b7549121395844bea941bb92feb3fad9", 120 "import_targets": [ 121 "64512:1555" 122 ], 123 "route_targets": [ 124 "64512:1444" 125 ], 126 "type": "l3", 127 "id": "0f9d472a-908f-40f5-8574-b4e8a63ccbf0", 128 "networks": [], 129 "local_pref": null, 130 "vni": 1000 131 } 132 } 133 ` 134 135 var CreateBGPVPN = bgpvpns.BGPVPN{ 136 ID: "0f9d472a-908f-40f5-8574-b4e8a63ccbf0", 137 RouteDistinguishers: []string{ 138 "64512:1777", 139 "64512:1888", 140 "64512:1999", 141 }, 142 RouteTargets: []string{"64512:1444"}, 143 ImportTargets: []string{"64512:1555"}, 144 ExportTargets: []string{"64512:1666"}, 145 LocalPref: nil, 146 VNI: 1000, 147 TenantID: "b7549121395844bea941bb92feb3fad9", 148 ProjectID: "b7549121395844bea941bb92feb3fad9", 149 Type: "l3", 150 Routers: []string{}, 151 Networks: []string{}, 152 } 153 154 const UpdateBGPVPNRequest = ` 155 { 156 "bgpvpn": { 157 "name": "foo", 158 "route_targets": ["64512:1444"], 159 "export_targets": [], 160 "import_targets": [] 161 } 162 } 163 ` 164 165 const UpdateBGPVPNResponse = ` 166 { 167 "bgpvpn": { 168 "export_targets": [], 169 "name": "foo", 170 "routers": [], 171 "route_distinguishers": [ 172 "12345:1234" 173 ], 174 "tenant_id": "b7549121395844bea941bb92feb3fad9", 175 "import_targets": [], 176 "route_targets": ["64512:1444"], 177 "type": "l3", 178 "id": "4d627abf-06dd-45ab-920b-8e61422bb984", 179 "networks": [], 180 "local_pref": null, 181 "vni": 1000 182 } 183 } 184 ` 185 186 const ListNetworkAssociationsResult = ` 187 { 188 "network_associations": [ 189 { 190 "id": "73238ca1-e05d-4c7a-b4d4-70407b4b8730", 191 "network_id": "8c5d88dc-60ac-4b02-a65a-36b65888ddcd", 192 "tenant_id": "b7549121395844bea941bb92feb3fad9", 193 "project_id": "b7549121395844bea941bb92feb3fad9" 194 } 195 ] 196 } 197 ` 198 199 var NetworkAssociation = bgpvpns.NetworkAssociation{ 200 ID: "73238ca1-e05d-4c7a-b4d4-70407b4b8730", 201 NetworkID: "8c5d88dc-60ac-4b02-a65a-36b65888ddcd", 202 TenantID: "b7549121395844bea941bb92feb3fad9", 203 ProjectID: "b7549121395844bea941bb92feb3fad9", 204 } 205 206 const GetNetworkAssociationResult = ` 207 { 208 "network_association": { 209 "id": "73238ca1-e05d-4c7a-b4d4-70407b4b8730", 210 "network_id": "8c5d88dc-60ac-4b02-a65a-36b65888ddcd", 211 "tenant_id": "b7549121395844bea941bb92feb3fad9", 212 "project_id": "b7549121395844bea941bb92feb3fad9" 213 } 214 } 215 ` 216 217 var GetNetworkAssociation = bgpvpns.NetworkAssociation{ 218 ID: "73238ca1-e05d-4c7a-b4d4-70407b4b8730", 219 NetworkID: "8c5d88dc-60ac-4b02-a65a-36b65888ddcd", 220 TenantID: "b7549121395844bea941bb92feb3fad9", 221 ProjectID: "b7549121395844bea941bb92feb3fad9", 222 } 223 224 const CreateNetworkAssociationRequest = ` 225 { 226 "network_association": { 227 "network_id": "8c5d88dc-60ac-4b02-a65a-36b65888ddcd" 228 } 229 } 230 ` 231 const CreateNetworkAssociationResponse = ` 232 { 233 "network_association": { 234 "network_id": "8c5d88dc-60ac-4b02-a65a-36b65888ddcd", 235 "tenant_id": "b7549121395844bea941bb92feb3fad9", 236 "project_id": "b7549121395844bea941bb92feb3fad9", 237 "id": "73238ca1-e05d-4c7a-b4d4-70407b4b8730" 238 } 239 } 240 ` 241 242 var CreateNetworkAssociation = bgpvpns.NetworkAssociation{ 243 ID: "73238ca1-e05d-4c7a-b4d4-70407b4b8730", 244 NetworkID: "8c5d88dc-60ac-4b02-a65a-36b65888ddcd", 245 TenantID: "b7549121395844bea941bb92feb3fad9", 246 ProjectID: "b7549121395844bea941bb92feb3fad9", 247 } 248 249 const ListRouterAssociationsResult = ` 250 { 251 "router_associations": [ 252 { 253 "id": "73238ca1-e05d-4c7a-b4d4-70407b4b8730", 254 "router_id": "8c5d88dc-60ac-4b02-a65a-36b65888ddcd", 255 "tenant_id": "b7549121395844bea941bb92feb3fad9", 256 "project_id": "b7549121395844bea941bb92feb3fad9" 257 } 258 ] 259 } 260 ` 261 262 var RouterAssociation = bgpvpns.RouterAssociation{ 263 ID: "73238ca1-e05d-4c7a-b4d4-70407b4b8730", 264 RouterID: "8c5d88dc-60ac-4b02-a65a-36b65888ddcd", 265 TenantID: "b7549121395844bea941bb92feb3fad9", 266 ProjectID: "b7549121395844bea941bb92feb3fad9", 267 } 268 269 const GetRouterAssociationResult = ` 270 { 271 "router_association": { 272 "id": "73238ca1-e05d-4c7a-b4d4-70407b4b8730", 273 "router_id": "8c5d88dc-60ac-4b02-a65a-36b65888ddcd", 274 "tenant_id": "b7549121395844bea941bb92feb3fad9", 275 "project_id": "b7549121395844bea941bb92feb3fad9" 276 } 277 } 278 ` 279 280 var GetRouterAssociation = bgpvpns.RouterAssociation{ 281 ID: "73238ca1-e05d-4c7a-b4d4-70407b4b8730", 282 RouterID: "8c5d88dc-60ac-4b02-a65a-36b65888ddcd", 283 TenantID: "b7549121395844bea941bb92feb3fad9", 284 ProjectID: "b7549121395844bea941bb92feb3fad9", 285 } 286 287 const CreateRouterAssociationRequest = ` 288 { 289 "router_association": { 290 "router_id": "8c5d88dc-60ac-4b02-a65a-36b65888ddcd" 291 } 292 } 293 ` 294 const CreateRouterAssociationResponse = ` 295 { 296 "router_association": { 297 "router_id": "8c5d88dc-60ac-4b02-a65a-36b65888ddcd", 298 "tenant_id": "b7549121395844bea941bb92feb3fad9", 299 "project_id": "b7549121395844bea941bb92feb3fad9", 300 "id": "73238ca1-e05d-4c7a-b4d4-70407b4b8730", 301 "advertise_extra_routes": true 302 } 303 } 304 ` 305 306 var CreateRouterAssociation = bgpvpns.RouterAssociation{ 307 ID: "73238ca1-e05d-4c7a-b4d4-70407b4b8730", 308 RouterID: "8c5d88dc-60ac-4b02-a65a-36b65888ddcd", 309 TenantID: "b7549121395844bea941bb92feb3fad9", 310 ProjectID: "b7549121395844bea941bb92feb3fad9", 311 AdvertiseExtraRoutes: true, 312 } 313 314 const UpdateRouterAssociationRequest = ` 315 { 316 "router_association": { 317 "advertise_extra_routes": false 318 } 319 } 320 ` 321 const UpdateRouterAssociationResponse = ` 322 { 323 "router_association": { 324 "router_id": "8c5d88dc-60ac-4b02-a65a-36b65888ddcd", 325 "tenant_id": "b7549121395844bea941bb92feb3fad9", 326 "project_id": "b7549121395844bea941bb92feb3fad9", 327 "id": "73238ca1-e05d-4c7a-b4d4-70407b4b8730" 328 } 329 } 330 ` 331 332 var UpdateRouterAssociation = bgpvpns.RouterAssociation{ 333 ID: "73238ca1-e05d-4c7a-b4d4-70407b4b8730", 334 RouterID: "8c5d88dc-60ac-4b02-a65a-36b65888ddcd", 335 TenantID: "b7549121395844bea941bb92feb3fad9", 336 ProjectID: "b7549121395844bea941bb92feb3fad9", 337 AdvertiseExtraRoutes: false, 338 } 339 340 const ListPortAssociationsResult = ` 341 { 342 "port_associations": [ 343 { 344 "id": "73238ca1-e05d-4c7a-b4d4-70407b4b8730", 345 "port_id": "8c5d88dc-60ac-4b02-a65a-36b65888ddcd", 346 "tenant_id": "b7549121395844bea941bb92feb3fad9", 347 "project_id": "b7549121395844bea941bb92feb3fad9", 348 "advertise_fixed_ips": true 349 } 350 ] 351 } 352 ` 353 354 var PortAssociation = bgpvpns.PortAssociation{ 355 ID: "73238ca1-e05d-4c7a-b4d4-70407b4b8730", 356 PortID: "8c5d88dc-60ac-4b02-a65a-36b65888ddcd", 357 TenantID: "b7549121395844bea941bb92feb3fad9", 358 ProjectID: "b7549121395844bea941bb92feb3fad9", 359 AdvertiseFixedIPs: true, 360 } 361 362 const GetPortAssociationResult = ` 363 { 364 "port_association": { 365 "id": "73238ca1-e05d-4c7a-b4d4-70407b4b8730", 366 "port_id": "8c5d88dc-60ac-4b02-a65a-36b65888ddcd", 367 "tenant_id": "b7549121395844bea941bb92feb3fad9", 368 "project_id": "b7549121395844bea941bb92feb3fad9", 369 "advertise_fixed_ips": true 370 } 371 } 372 ` 373 374 var GetPortAssociation = bgpvpns.PortAssociation{ 375 ID: "73238ca1-e05d-4c7a-b4d4-70407b4b8730", 376 PortID: "8c5d88dc-60ac-4b02-a65a-36b65888ddcd", 377 TenantID: "b7549121395844bea941bb92feb3fad9", 378 ProjectID: "b7549121395844bea941bb92feb3fad9", 379 AdvertiseFixedIPs: true, 380 } 381 382 const CreatePortAssociationRequest = ` 383 { 384 "port_association": { 385 "port_id": "8c5d88dc-60ac-4b02-a65a-36b65888ddcd" 386 } 387 } 388 ` 389 const CreatePortAssociationResponse = ` 390 { 391 "port_association": { 392 "port_id": "8c5d88dc-60ac-4b02-a65a-36b65888ddcd", 393 "tenant_id": "b7549121395844bea941bb92feb3fad9", 394 "project_id": "b7549121395844bea941bb92feb3fad9", 395 "id": "73238ca1-e05d-4c7a-b4d4-70407b4b8730", 396 "advertise_fixed_ips": true 397 } 398 } 399 ` 400 401 var CreatePortAssociation = bgpvpns.PortAssociation{ 402 ID: "73238ca1-e05d-4c7a-b4d4-70407b4b8730", 403 PortID: "8c5d88dc-60ac-4b02-a65a-36b65888ddcd", 404 TenantID: "b7549121395844bea941bb92feb3fad9", 405 ProjectID: "b7549121395844bea941bb92feb3fad9", 406 AdvertiseFixedIPs: true, 407 } 408 409 const UpdatePortAssociationRequest = ` 410 { 411 "port_association": { 412 "advertise_fixed_ips": false 413 } 414 } 415 ` 416 const UpdatePortAssociationResponse = ` 417 { 418 "port_association": { 419 "port_id": "8c5d88dc-60ac-4b02-a65a-36b65888ddcd", 420 "tenant_id": "b7549121395844bea941bb92feb3fad9", 421 "project_id": "b7549121395844bea941bb92feb3fad9", 422 "id": "73238ca1-e05d-4c7a-b4d4-70407b4b8730", 423 "advertise_fixed_ips": false 424 } 425 } 426 ` 427 428 var UpdatePortAssociation = bgpvpns.PortAssociation{ 429 ID: "73238ca1-e05d-4c7a-b4d4-70407b4b8730", 430 PortID: "8c5d88dc-60ac-4b02-a65a-36b65888ddcd", 431 TenantID: "b7549121395844bea941bb92feb3fad9", 432 ProjectID: "b7549121395844bea941bb92feb3fad9", 433 AdvertiseFixedIPs: false, 434 }