]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Add constants for vhost-user vif
authorSean Mooney <sean.k.mooney@intel.com>
Fri, 10 Jul 2015 14:37:13 +0000 (10:37 -0400)
committerSean Mooney <sean.k.mooney@intel.com>
Fri, 10 Jul 2015 15:16:49 +0000 (11:16 -0400)
This change amends the portbinging extention to include
defintions of the VIF_TYPE_VHOST_USER and its related
VIF_DETAILS attributes

Change-Id: Idda3631b766ea9d7329d3b4beb6eb34a73870684
Closes-Bug: #1473278

neutron/extensions/portbindings.py

index 3c50a4f2f8bc5ef1aeff46052f180231efd232b9..9c59b16c155fe877d1de7f6566e39017fc0084ee 100644 (file)
@@ -47,11 +47,29 @@ CAP_PORT_FILTER = 'port_filter'
 OVS_HYBRID_PLUG = 'ovs_hybrid_plug'
 VIF_DETAILS_VLAN = 'vlan'
 
+# The keys below are used in the VIF_DETAILS attribute to convey
+# information related to the configuration of the vhost-user VIF driver.
+
+# - vhost_user_mode: String value used to declare the mode of a
+#                    vhost-user socket
+VHOST_USER_MODE = 'vhostuser_mode'
+# - server: socket created by hypervisor
+VHOST_USER_MODE_SERVER = 'server'
+# - client: socket created by vswitch
+VHOST_USER_MODE_CLIENT = 'client'
+# - vhostuser_socket String value used to declare the vhostuser socket name
+VHOST_USER_SOCKET = 'vhostuser_socket'
+# - vhost_user_ovs_plug: Boolean used to inform Nova that the ovs plug
+#                        method should be used when binding the
+#                        vhost-user vif.
+VHOST_USER_OVS_PLUG = 'vhostuser_ovs_plug'
+
 VIF_TYPE_UNBOUND = 'unbound'
 VIF_TYPE_BINDING_FAILED = 'binding_failed'
 VIF_TYPE_DISTRIBUTED = 'distributed'
 VIF_TYPE_IOVISOR = 'iovisor'
 VIF_TYPE_OVS = 'ovs'
+VIF_TYPE_VHOST_USER = 'vhostuser'
 VIF_TYPE_IVS = 'ivs'
 VIF_TYPE_DVS = 'dvs'
 VIF_TYPE_BRIDGE = 'bridge'