github.com/vnpaycloud-console/gophercloud/v2@v2.0.5/openstack/networking/v2/ports/testing/fixtures.go (about)

     1  package testing
     2  
     3  const ListResponse = `
     4  {
     5      "ports": [
     6          {
     7              "status": "ACTIVE",
     8              "binding:host_id": "devstack",
     9              "name": "",
    10              "admin_state_up": true,
    11              "network_id": "70c1db1f-b701-45bd-96e0-a313ee3430b3",
    12              "tenant_id": "",
    13              "device_owner": "network:router_gateway",
    14              "mac_address": "fa:16:3e:58:42:ed",
    15              "binding:vnic_type": "normal",
    16              "fixed_ips": [
    17                  {
    18                      "subnet_id": "008ba151-0b8c-4a67-98b5-0d2b87666062",
    19                      "ip_address": "172.24.4.2"
    20                  }
    21              ],
    22              "id": "d80b1a3b-4fc1-49f3-952e-1e2ab7081d8b",
    23              "security_groups": [],
    24              "dns_name": "test-port",
    25              "dns_assignment": [
    26                {
    27                  "hostname": "test-port",
    28                  "ip_address": "172.24.4.2",
    29                  "fqdn": "test-port.openstack.local."
    30                }
    31              ],
    32              "device_id": "9ae135f4-b6e0-4dad-9e91-3c223e385824",
    33              "port_security_enabled": false,
    34              "created_at": "2019-06-30T04:15:37",
    35              "updated_at": "2019-06-30T05:18:49"
    36          }
    37      ]
    38  }
    39  `
    40  
    41  const GetResponse = `
    42  {
    43      "port": {
    44          "status": "ACTIVE",
    45          "binding:host_id": "devstack",
    46          "name": "",
    47          "allowed_address_pairs": [],
    48          "admin_state_up": true,
    49          "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
    50          "tenant_id": "7e02058126cc4950b75f9970368ba177",
    51          "extra_dhcp_opts": [],
    52          "binding:vif_details": {
    53              "port_filter": true,
    54              "ovs_hybrid_plug": true
    55           },
    56          "binding:vif_type": "ovs",
    57          "device_owner": "network:router_interface",
    58          "port_security_enabled": false,
    59          "mac_address": "fa:16:3e:23:fd:d7",
    60          "binding:profile": {},
    61          "binding:vnic_type": "normal",
    62          "fixed_ips": [
    63              {
    64                  "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
    65                  "ip_address": "10.0.0.1"
    66              }
    67          ],
    68          "id": "46d4bfb9-b26e-41f3-bd2e-e6dcc1ccedb2",
    69          "security_groups": [],
    70          "dns_name": "test-port",
    71          "dns_assignment": [
    72            {
    73              "hostname": "test-port",
    74              "ip_address": "172.24.4.2",
    75              "fqdn": "test-port.openstack.local."
    76            }
    77          ],
    78          "device_id": "5e3898d7-11be-483e-9732-b2f5eccd2b2e",
    79          "created_at": "2019-06-30T04:15:37Z",
    80          "updated_at": "2019-06-30T05:18:49Z"
    81      }
    82  }
    83  `
    84  
    85  const CreateRequest = `
    86  {
    87      "port": {
    88          "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
    89          "name": "private-port",
    90          "admin_state_up": true,
    91          "fixed_ips": [
    92              {
    93                  "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
    94                  "ip_address": "10.0.0.2"
    95              }
    96          ],
    97          "security_groups": ["foo"],
    98          "allowed_address_pairs": [
    99            {
   100              "ip_address": "10.0.0.4",
   101              "mac_address": "fa:16:3e:c9:cb:f0"
   102            }
   103          ]
   104      }
   105  }
   106  `
   107  
   108  const CreateResponse = `
   109  {
   110      "port": {
   111          "status": "DOWN",
   112          "name": "private-port",
   113          "admin_state_up": true,
   114          "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
   115          "tenant_id": "d6700c0c9ffa4f1cb322cd4a1f3906fa",
   116          "device_owner": "",
   117          "mac_address": "fa:16:3e:c9:cb:f0",
   118          "fixed_ips": [
   119              {
   120                  "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
   121                  "ip_address": "10.0.0.2"
   122              }
   123          ],
   124          "id": "65c0ee9f-d634-4522-8954-51021b570b0d",
   125          "security_groups": [
   126              "f0ac4394-7e4a-4409-9701-ba8be283dbc3"
   127          ],
   128          "allowed_address_pairs": [
   129            {
   130              "ip_address": "10.0.0.4",
   131              "mac_address": "fa:16:3e:c9:cb:f0"
   132            }
   133          ],
   134          "device_id": ""
   135      }
   136  }
   137  `
   138  
   139  const CreateOmitSecurityGroupsRequest = `
   140  {
   141      "port": {
   142          "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
   143          "name": "private-port",
   144          "admin_state_up": true,
   145          "fixed_ips": [
   146            {
   147              "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
   148              "ip_address": "10.0.0.2"
   149            }
   150          ],
   151          "allowed_address_pairs": [
   152            {
   153              "ip_address": "10.0.0.4",
   154              "mac_address": "fa:16:3e:c9:cb:f0"
   155            }
   156          ]
   157      }
   158  }
   159  `
   160  
   161  const CreateWithNoSecurityGroupsRequest = `
   162  {
   163      "port": {
   164          "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
   165          "name": "private-port",
   166          "admin_state_up": true,
   167          "fixed_ips": [
   168            {
   169              "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
   170              "ip_address": "10.0.0.2"
   171            }
   172          ],
   173          "security_groups": [],
   174          "allowed_address_pairs": [
   175            {
   176              "ip_address": "10.0.0.4",
   177              "mac_address": "fa:16:3e:c9:cb:f0"
   178            }
   179          ]
   180      }
   181  }
   182  `
   183  
   184  const CreateWithNoSecurityGroupsResponse = `
   185  {
   186      "port": {
   187          "status": "DOWN",
   188          "name": "private-port",
   189          "admin_state_up": true,
   190          "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
   191          "tenant_id": "d6700c0c9ffa4f1cb322cd4a1f3906fa",
   192          "device_owner": "",
   193          "mac_address": "fa:16:3e:c9:cb:f0",
   194          "fixed_ips": [
   195              {
   196                  "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
   197                  "ip_address": "10.0.0.2"
   198              }
   199          ],
   200          "id": "65c0ee9f-d634-4522-8954-51021b570b0d",
   201          "allowed_address_pairs": [
   202            {
   203              "ip_address": "10.0.0.4",
   204              "mac_address": "fa:16:3e:c9:cb:f0"
   205            }
   206          ],
   207          "device_id": ""
   208      }
   209  }
   210  `
   211  
   212  const CreateOmitSecurityGroupsResponse = `
   213  {
   214      "port": {
   215          "status": "DOWN",
   216          "name": "private-port",
   217          "admin_state_up": true,
   218          "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
   219          "tenant_id": "d6700c0c9ffa4f1cb322cd4a1f3906fa",
   220          "device_owner": "",
   221          "mac_address": "fa:16:3e:c9:cb:f0",
   222          "fixed_ips": [
   223              {
   224                  "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
   225                  "ip_address": "10.0.0.2"
   226              }
   227          ],
   228          "id": "65c0ee9f-d634-4522-8954-51021b570b0d",
   229          "security_groups": [
   230              "f0ac4394-7e4a-4409-9701-ba8be283dbc3"
   231          ],
   232          "allowed_address_pairs": [
   233            {
   234              "ip_address": "10.0.0.4",
   235              "mac_address": "fa:16:3e:c9:cb:f0"
   236            }
   237          ],
   238          "device_id": ""
   239      }
   240  }
   241  `
   242  
   243  const CreatePropagateUplinkStatusRequest = `
   244  {
   245      "port": {
   246          "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
   247          "name": "private-port",
   248          "admin_state_up": true,
   249          "fixed_ips": [
   250              {
   251                  "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
   252                  "ip_address": "10.0.0.2"
   253              }
   254          ],
   255          "propagate_uplink_status": true
   256      }
   257  }
   258  `
   259  
   260  const CreatePropagateUplinkStatusResponse = `
   261  {
   262      "port": {
   263          "status": "DOWN",
   264          "name": "private-port",
   265          "admin_state_up": true,
   266          "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
   267          "tenant_id": "d6700c0c9ffa4f1cb322cd4a1f3906fa",
   268          "device_owner": "",
   269          "mac_address": "fa:16:3e:c9:cb:f0",
   270          "fixed_ips": [
   271              {
   272                  "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
   273                  "ip_address": "10.0.0.2"
   274              }
   275          ],
   276          "id": "65c0ee9f-d634-4522-8954-51021b570b0d",
   277          "propagate_uplink_status": true,
   278          "device_id": ""
   279      }
   280  }
   281  `
   282  
   283  const CreateValueSpecRequest = `
   284  {
   285      "port": {
   286          "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
   287          "name": "private-port",
   288          "admin_state_up": true,
   289          "fixed_ips": [
   290              {
   291                  "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
   292                  "ip_address": "10.0.0.2"
   293              }
   294          ],
   295          "security_groups": ["foo"],
   296          "allowed_address_pairs": [
   297            {
   298              "ip_address": "10.0.0.4",
   299              "mac_address": "fa:16:3e:c9:cb:f0"
   300            }
   301          ],
   302          "test": "value"
   303      }
   304  }
   305  `
   306  
   307  const CreateValueSpecResponse = `
   308  {
   309      "port": {
   310          "status": "DOWN",
   311          "name": "private-port",
   312          "admin_state_up": true,
   313          "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
   314          "tenant_id": "d6700c0c9ffa4f1cb322cd4a1f3906fa",
   315          "device_owner": "",
   316          "mac_address": "fa:16:3e:c9:cb:f0",
   317          "fixed_ips": [
   318              {
   319                  "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
   320                  "ip_address": "10.0.0.2"
   321              }
   322          ],
   323          "id": "65c0ee9f-d634-4522-8954-51021b570b0d",
   324          "security_groups": [
   325              "f0ac4394-7e4a-4409-9701-ba8be283dbc3"
   326          ],
   327          "allowed_address_pairs": [
   328            {
   329              "ip_address": "10.0.0.4",
   330              "mac_address": "fa:16:3e:c9:cb:f0"
   331            }
   332          ],
   333          "device_id": ""
   334      }
   335  }
   336  `
   337  
   338  const CreatePortSecurityRequest = `
   339  {
   340      "port": {
   341          "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
   342          "name": "private-port",
   343          "admin_state_up": true,
   344          "fixed_ips": [
   345              {
   346                  "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
   347                  "ip_address": "10.0.0.2"
   348              }
   349          ],
   350          "security_groups": ["foo"],
   351          "allowed_address_pairs": [
   352            {
   353              "ip_address": "10.0.0.4",
   354              "mac_address": "fa:16:3e:c9:cb:f0"
   355            }
   356          ],
   357          "port_security_enabled": false
   358      }
   359  }
   360  `
   361  
   362  const CreatePortSecurityResponse = `
   363  {
   364      "port": {
   365          "status": "DOWN",
   366          "name": "private-port",
   367          "admin_state_up": true,
   368          "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
   369          "tenant_id": "d6700c0c9ffa4f1cb322cd4a1f3906fa",
   370          "device_owner": "",
   371          "mac_address": "fa:16:3e:c9:cb:f0",
   372          "fixed_ips": [
   373              {
   374                  "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
   375                  "ip_address": "10.0.0.2"
   376              }
   377          ],
   378          "id": "65c0ee9f-d634-4522-8954-51021b570b0d",
   379          "security_groups": [
   380              "f0ac4394-7e4a-4409-9701-ba8be283dbc3"
   381          ],
   382          "allowed_address_pairs": [
   383            {
   384              "ip_address": "10.0.0.4",
   385              "mac_address": "fa:16:3e:c9:cb:f0"
   386            }
   387          ],
   388          "device_id": "",
   389          "port_security_enabled": false
   390      }
   391  }
   392  `
   393  
   394  const UpdateRequest = `
   395  {
   396      "port": {
   397          "name": "new_port_name",
   398          "fixed_ips": [
   399              {
   400                  "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
   401                  "ip_address": "10.0.0.3"
   402              }
   403          ],
   404          "allowed_address_pairs": [
   405            {
   406              "ip_address": "10.0.0.4",
   407              "mac_address": "fa:16:3e:c9:cb:f0"
   408            }
   409          ],
   410          "security_groups": [
   411              "f0ac4394-7e4a-4409-9701-ba8be283dbc3"
   412          ]
   413      }
   414  }
   415  `
   416  
   417  const UpdateResponse = `
   418  {
   419      "port": {
   420          "status": "DOWN",
   421          "name": "new_port_name",
   422          "admin_state_up": true,
   423          "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
   424          "tenant_id": "d6700c0c9ffa4f1cb322cd4a1f3906fa",
   425          "device_owner": "",
   426          "mac_address": "fa:16:3e:c9:cb:f0",
   427          "fixed_ips": [
   428              {
   429                  "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
   430                  "ip_address": "10.0.0.3"
   431              }
   432          ],
   433          "allowed_address_pairs": [
   434            {
   435              "ip_address": "10.0.0.4",
   436              "mac_address": "fa:16:3e:c9:cb:f0"
   437            }
   438          ],
   439          "id": "65c0ee9f-d634-4522-8954-51021b570b0d",
   440          "security_groups": [
   441              "f0ac4394-7e4a-4409-9701-ba8be283dbc3"
   442          ],
   443          "device_id": ""
   444      }
   445  }
   446  `
   447  
   448  const UpdateOmitSecurityGroupsRequest = `
   449  {
   450    "port": {
   451        "name": "new_port_name",
   452        "fixed_ips": [
   453            {
   454              "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
   455              "ip_address": "10.0.0.3"
   456            }
   457          ],
   458          "allowed_address_pairs": [
   459            {
   460              "ip_address": "10.0.0.4",
   461              "mac_address": "fa:16:3e:c9:cb:f0"
   462            }
   463          ]
   464      }
   465  }
   466  `
   467  
   468  const UpdateOmitSecurityGroupsResponse = `
   469  {
   470      "port": {
   471          "status": "DOWN",
   472          "name": "new_port_name",
   473          "admin_state_up": true,
   474          "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
   475          "tenant_id": "d6700c0c9ffa4f1cb322cd4a1f3906fa",
   476          "device_owner": "",
   477          "mac_address": "fa:16:3e:c9:cb:f0",
   478          "fixed_ips": [
   479              {
   480                  "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
   481                  "ip_address": "10.0.0.3"
   482              }
   483          ],
   484          "allowed_address_pairs": [
   485            {
   486              "ip_address": "10.0.0.4",
   487              "mac_address": "fa:16:3e:c9:cb:f0"
   488            }
   489          ],
   490          "id": "65c0ee9f-d634-4522-8954-51021b570b0d",
   491          "security_groups": [
   492              "f0ac4394-7e4a-4409-9701-ba8be283dbc3"
   493          ],
   494          "device_id": ""
   495      }
   496  }
   497  `
   498  
   499  const UpdatePropagateUplinkStatusRequest = `
   500  {
   501      "port": {
   502          "propagate_uplink_status": true
   503      }
   504  }
   505  `
   506  
   507  const UpdatePropagateUplinkStatusResponse = `
   508  {
   509      "port": {
   510          "status": "DOWN",
   511          "name": "new_port_name",
   512          "admin_state_up": true,
   513          "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
   514          "tenant_id": "d6700c0c9ffa4f1cb322cd4a1f3906fa",
   515          "device_owner": "",
   516          "mac_address": "fa:16:3e:c9:cb:f0",
   517          "fixed_ips": [
   518              {
   519                  "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
   520                  "ip_address": "10.0.0.3"
   521              }
   522          ],
   523          "allowed_address_pairs": [
   524            {
   525              "ip_address": "10.0.0.4",
   526              "mac_address": "fa:16:3e:c9:cb:f0"
   527            }
   528          ],
   529          "id": "65c0ee9f-d634-4522-8954-51021b570b0d",
   530          "security_groups": [
   531              "f0ac4394-7e4a-4409-9701-ba8be283dbc3"
   532          ],
   533          "propagate_uplink_status": true,
   534          "device_id": ""
   535      }
   536  }
   537  `
   538  
   539  const UpdateValueSpecsRequest = `
   540  {
   541      "port": {
   542          "test": "update"
   543      }
   544  }
   545  `
   546  
   547  const UpdateValueSpecsResponse = `
   548  {
   549      "port": {
   550          "status": "DOWN",
   551          "name": "new_port_name",
   552          "admin_state_up": true,
   553          "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
   554          "tenant_id": "d6700c0c9ffa4f1cb322cd4a1f3906fa",
   555          "device_owner": "",
   556          "mac_address": "fa:16:3e:c9:cb:f0",
   557          "fixed_ips": [
   558              {
   559                  "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
   560                  "ip_address": "10.0.0.3"
   561              }
   562          ],
   563          "allowed_address_pairs": [
   564            {
   565              "ip_address": "10.0.0.4",
   566              "mac_address": "fa:16:3e:c9:cb:f0"
   567            }
   568          ],
   569          "id": "65c0ee9f-d634-4522-8954-51021b570b0d",
   570          "security_groups": [
   571              "f0ac4394-7e4a-4409-9701-ba8be283dbc3"
   572          ],
   573          "device_id": ""
   574      }
   575  }
   576  `
   577  
   578  const UpdatePortSecurityRequest = `
   579  {
   580      "port": {
   581          "port_security_enabled": false
   582      }
   583  }
   584  `
   585  
   586  const UpdatePortSecurityResponse = `
   587  {
   588      "port": {
   589          "status": "DOWN",
   590          "name": "private-port",
   591          "admin_state_up": true,
   592          "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
   593          "tenant_id": "d6700c0c9ffa4f1cb322cd4a1f3906fa",
   594          "device_owner": "",
   595          "mac_address": "fa:16:3e:c9:cb:f0",
   596          "fixed_ips": [
   597              {
   598                  "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
   599                  "ip_address": "10.0.0.2"
   600              }
   601          ],
   602          "id": "65c0ee9f-d634-4522-8954-51021b570b0d",
   603          "security_groups": [
   604              "f0ac4394-7e4a-4409-9701-ba8be283dbc3"
   605          ],
   606          "allowed_address_pairs": [
   607            {
   608              "ip_address": "10.0.0.4",
   609              "mac_address": "fa:16:3e:c9:cb:f0"
   610            }
   611          ],
   612          "device_id": "",
   613          "port_security_enabled": false
   614      }
   615  }
   616  `
   617  
   618  const RemoveSecurityGroupRequest = `
   619  {
   620      "port": {
   621        "name": "new_port_name",
   622        "fixed_ips": [
   623          {
   624            "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
   625            "ip_address": "10.0.0.3"
   626          }
   627        ],
   628        "allowed_address_pairs": [
   629          {
   630            "ip_address": "10.0.0.4",
   631            "mac_address": "fa:16:3e:c9:cb:f0"
   632          }
   633        ],
   634        "security_groups": []
   635      }
   636  }
   637  `
   638  
   639  const RemoveSecurityGroupResponse = `
   640  {
   641      "port": {
   642          "status": "DOWN",
   643          "name": "new_port_name",
   644          "admin_state_up": true,
   645          "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
   646          "tenant_id": "d6700c0c9ffa4f1cb322cd4a1f3906fa",
   647          "device_owner": "",
   648          "mac_address": "fa:16:3e:c9:cb:f0",
   649          "fixed_ips": [
   650              {
   651                  "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
   652                  "ip_address": "10.0.0.3"
   653              }
   654          ],
   655          "allowed_address_pairs": [
   656            {
   657              "ip_address": "10.0.0.4",
   658              "mac_address": "fa:16:3e:c9:cb:f0"
   659            }
   660          ],
   661          "id": "65c0ee9f-d634-4522-8954-51021b570b0d",
   662          "device_id": ""
   663      }
   664  }
   665  `
   666  
   667  const RemoveAllowedAddressPairsRequest = `
   668  {
   669      "port": {
   670        "name": "new_port_name",
   671        "fixed_ips": [
   672          {
   673            "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
   674            "ip_address": "10.0.0.3"
   675          }
   676        ],
   677        "allowed_address_pairs": [],
   678        "security_groups": [
   679          "f0ac4394-7e4a-4409-9701-ba8be283dbc3"
   680        ]
   681      }
   682  }
   683  `
   684  
   685  const RemoveAllowedAddressPairsResponse = `
   686  {
   687      "port": {
   688          "status": "DOWN",
   689          "name": "new_port_name",
   690          "admin_state_up": true,
   691          "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
   692          "tenant_id": "d6700c0c9ffa4f1cb322cd4a1f3906fa",
   693          "device_owner": "",
   694          "mac_address": "fa:16:3e:c9:cb:f0",
   695          "fixed_ips": [
   696              {
   697                  "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
   698                  "ip_address": "10.0.0.3"
   699              }
   700          ],
   701          "id": "65c0ee9f-d634-4522-8954-51021b570b0d",
   702          "security_groups": [
   703              "f0ac4394-7e4a-4409-9701-ba8be283dbc3"
   704          ],
   705          "device_id": ""
   706      }
   707  }
   708  `
   709  
   710  const DontUpdateAllowedAddressPairsRequest = `
   711  {
   712      "port": {
   713          "name": "new_port_name",
   714          "fixed_ips": [
   715            {
   716              "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
   717              "ip_address": "10.0.0.3"
   718            }
   719          ],
   720          "security_groups": [
   721              "f0ac4394-7e4a-4409-9701-ba8be283dbc3"
   722          ]
   723      }
   724  }
   725  `
   726  
   727  const DontUpdateAllowedAddressPairsResponse = `
   728  {
   729      "port": {
   730          "status": "DOWN",
   731          "name": "new_port_name",
   732          "admin_state_up": true,
   733          "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
   734          "tenant_id": "d6700c0c9ffa4f1cb322cd4a1f3906fa",
   735          "device_owner": "",
   736          "mac_address": "fa:16:3e:c9:cb:f0",
   737          "fixed_ips": [
   738              {
   739                  "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
   740                  "ip_address": "10.0.0.3"
   741              }
   742          ],
   743          "allowed_address_pairs": [
   744            {
   745              "ip_address": "10.0.0.4",
   746              "mac_address": "fa:16:3e:c9:cb:f0"
   747            }
   748          ],
   749          "id": "65c0ee9f-d634-4522-8954-51021b570b0d",
   750          "security_groups": [
   751              "f0ac4394-7e4a-4409-9701-ba8be283dbc3"
   752          ],
   753          "device_id": ""
   754      }
   755  }
   756  `
   757  
   758  // GetWithExtraDHCPOptsResponse represents a raw port response with extra
   759  // DHCP options.
   760  const GetWithExtraDHCPOptsResponse = `
   761  {
   762      "port": {
   763          "status": "ACTIVE",
   764          "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
   765          "tenant_id": "d6700c0c9ffa4f1cb322cd4a1f3906fa",
   766          "extra_dhcp_opts": [
   767              {
   768                  "opt_name": "option1",
   769                  "opt_value": "value1",
   770                  "ip_version": 4
   771              },
   772              {
   773                  "opt_name": "option2",
   774                  "opt_value": "value2",
   775                  "ip_version": 4
   776              }
   777          ],
   778          "admin_state_up": true,
   779          "name": "port-with-extra-dhcp-opts",
   780          "device_owner": "",
   781          "mac_address": "fa:16:3e:c9:cb:f0",
   782          "fixed_ips": [
   783              {
   784                  "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
   785                  "ip_address": "10.0.0.4"
   786              }
   787          ],
   788          "id": "65c0ee9f-d634-4522-8954-51021b570b0d",
   789          "device_id": ""
   790      }
   791  }
   792  `
   793  
   794  // CreateWithExtraDHCPOptsRequest represents a raw port creation request
   795  // with extra DHCP options.
   796  const CreateWithExtraDHCPOptsRequest = `
   797  {
   798      "port": {
   799          "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
   800          "name": "port-with-extra-dhcp-opts",
   801          "admin_state_up": true,
   802          "fixed_ips": [
   803              {
   804                  "ip_address": "10.0.0.2",
   805                  "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2"
   806              }
   807          ],
   808          "extra_dhcp_opts": [
   809              {
   810                  "opt_name": "option1",
   811                  "opt_value": "value1"
   812              }
   813          ]
   814      }
   815  }
   816  `
   817  
   818  // CreateWithExtraDHCPOptsResponse represents a raw port creation response
   819  // with extra DHCP options.
   820  const CreateWithExtraDHCPOptsResponse = `
   821  {
   822      "port": {
   823          "status": "DOWN",
   824          "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
   825          "tenant_id": "d6700c0c9ffa4f1cb322cd4a1f3906fa",
   826          "extra_dhcp_opts": [
   827              {
   828                  "opt_name": "option1",
   829                  "opt_value": "value1",
   830                  "ip_version": 4
   831              }
   832          ],
   833          "admin_state_up": true,
   834          "name": "port-with-extra-dhcp-opts",
   835          "device_owner": "",
   836          "mac_address": "fa:16:3e:c9:cb:f0",
   837          "fixed_ips": [
   838              {
   839                  "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
   840                  "ip_address": "10.0.0.2"
   841              }
   842          ],
   843          "id": "65c0ee9f-d634-4522-8954-51021b570b0d",
   844          "device_id": ""
   845      }
   846  }
   847  `
   848  
   849  // UpdateWithExtraDHCPOptsRequest represents a raw port update request with
   850  // extra DHCP options.
   851  const UpdateWithExtraDHCPOptsRequest = `
   852  {
   853      "port": {
   854          "name": "updated-port-with-dhcp-opts",
   855          "fixed_ips": [
   856              {
   857                  "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
   858                  "ip_address": "10.0.0.3"
   859              }
   860          ],
   861          "extra_dhcp_opts": [
   862              {
   863                  "opt_name": "option1",
   864                  "opt_value": null
   865              },
   866              {
   867                  "opt_name": "option2",
   868                  "opt_value": "value2"
   869              }
   870          ]
   871      }
   872  }
   873  `
   874  
   875  // UpdateWithExtraDHCPOptsResponse represents a raw port update response with
   876  // extra DHCP options.
   877  const UpdateWithExtraDHCPOptsResponse = `
   878  {
   879      "port": {
   880          "status": "DOWN",
   881          "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
   882          "tenant_id": "d6700c0c9ffa4f1cb322cd4a1f3906fa",
   883          "extra_dhcp_opts": [
   884              {
   885                  "opt_name": "option2",
   886                  "opt_value": "value2",
   887                  "ip_version": 4
   888              }
   889          ],
   890          "admin_state_up": true,
   891          "name": "updated-port-with-dhcp-opts",
   892          "device_owner": "",
   893          "mac_address": "fa:16:3e:c9:cb:f0",
   894          "fixed_ips": [
   895              {
   896                  "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
   897                  "ip_address": "10.0.0.3"
   898              }
   899          ],
   900          "id": "65c0ee9f-d634-4522-8954-51021b570b0d",
   901          "device_id": ""
   902      }
   903  }
   904  `