Akash Gangil 47bb0a8a6c Update CIF creation request body
The CIF API got updated in new v3 builds. Here is what changed:
1.  The information like ip, mac, vlan, host_cif_id which was
intially opaque and just provided as a key value pair inside the
context body, now have explicit properties.

2. The context now contains container_host_vif_id, and vlan_tag as
explicit properties. It still has a key_values array but no information
is needed to be passed in that. That's more reserved for future use
cases.

3. The host_vif_id property name is updated to container_host_vif_id.

4. The vlan_id property name is updated to vlan_tag.

5. The IP and mac address of the port are moved out of the context.
This was previously being duplicated as we pass that information in
address bindings already.

Here is the sample request body.

{
  "resource_type": "LogicalPort",
  "attachment": {
    "attachment_type": "CIF",
    "id": "test-2",
    "context": {
      "vlan_tag": 122,
      "container_host_vif_id": "c6f817a0-4e36-421e-98a6-8a2faed880bc",
      "key_values": [],
      "resource_type": "CifAttachmentContext"
    }
  },
  "admin_state": "UP",
  "logical_switch_id": "<logical-switch-id>",
  "address_bindings": [
    {
      "ip_address": "192.168.1.110",
      "mac_address": "aa:bb:cc:dd:ee:ff"
    }
  ],
}

This patch makes the plugin send the expected request body to the
backend.

Also this patch updates default argument in the create_port and
update_port method from parent_name to parent_vif_id

DocImpact

Change-Id: Icf9109839284df9217877342182df4dce4ca2787
2016-07-27 06:52:22 -07:00
..
2016-07-27 06:52:22 -07:00