Add support for vnic type request to be managed by ML2 mechanism drivers

Registered by Irena Berezovsky on 2014-01-20

Support for SR-IOV PCI passthrough networking introduces the need to enhance neutron with support for requesting certain vnic type to be bound on neutron port.
Neutron port can be requested to be realised as virtual nic (OVS, LinuxBridge) , direct pci-passthrough or direct macvtap.
In order to be able to support different vnic types, Modular Layer 2 plugin should be used.
Every ML2 mechanism driver that is capable of port binding, should bind port only if it supports the requested vnic_type.
ML2 mechanism driver has to be able to check the vnic-type and handle vnic-types it supports.
The ML2 mechanism driver may support binding via more than one vif_type , if supports more than one vnic_type.

In order to add support for the above functionaly, the existing port binding extension will be enhanced.
The new attribute 'binding:vnic_type' will be added.
If vnic_rype is not set, and neutron port is not a network port, it should default to 'no_sriov'.

Data Model changes:
-- ML2 PortBinding support will be enhanced in order to persist binding:vnic_type attribute and store it in _ml2_port_bindings table.

APIs:
-- port binding extension should be modified to maintain vnic_type attribute.
   binding:vnic_type will be added with following policy:
    VNIC_TYPE: {'allow_post': True, 'allow_put': True,
                             'default': 'no_sriov',
        'is_visible': True,
        'enforce_policy': True}

    The admin or tenant (port owner) user should be allowed to set this attribute.

CLI changes:
-- neutron client should be enchanced for managing vnic_type via port_binding extension

Horizon Requirements:
-- TBD

Usage Exmaples:
-- vnic_type can be specified for port-create:
     neutron port-create net1 --binding:vnic_type direct

-- default vnic_type (virtual) will be used for:
    neutron port-create net1

Test Cases
-- TBD

More details can be found at:
https://docs.google.com/document/d/1RfxfXBNB0mD_kH9SamwqPI8ZM-jg797ky_Fze7SakRc/edit

Blueprint information

Status:
Complete
Approver:
Mark McClain
Priority:
Medium
Drafter:
Irena Berezovsky
Direction:
Approved
Assignee:
Irena Berezovsky
Definition:
Approved
Series goal:
Accepted for icehouse
Implementation:
Implemented
Milestone target:
milestone icon 2014.1
Started by
Irena Berezovsky on 2014-01-20
Completed by
Robert Kukura on 2014-02-24

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/ml2-request-vnic-type,n,z

Addressed by: https://review.openstack.org/72334
    Add support to request vnic type on port

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.