23549840 Unable to create dhcp and l3 vnics with EVS interface driver
authorchaithan.prakash@oracle.com <chaithan.prakash@oracle.com>
Wed, 08 Jun 2016 12:20:02 -0700
changeset 6153 e1758cabe679
parent 6152 10b7069ed65d
child 6154 317d41eedaaa
23549840 Unable to create dhcp and l3 vnics with EVS interface driver
components/openstack/neutron/files/agent/evs_l3_agent.py
components/openstack/neutron/files/agent/solaris/dhcp.py
components/openstack/neutron/files/agent/solaris/interface.py
--- a/components/openstack/neutron/files/agent/evs_l3_agent.py	Wed Jun 08 10:25:10 2016 -0700
+++ b/components/openstack/neutron/files/agent/evs_l3_agent.py	Wed Jun 08 12:20:02 2016 -0700
@@ -104,7 +104,7 @@
         # driver just returns if datalink and IP interface already exists
         self.driver.plug(port['tenant_id'], port['network_id'], port['id'],
                          internal_dlname, port['mac_address'],
-                         vif_type=port['binding:vif_type'])
+                         vif_type=port.get('binding:vif_type'))
         fixed_ips = port['fixed_ips']
         ip_cidrs = common_utils.fixed_ip_cidrs(fixed_ips)
         self.driver.init_l3(internal_dlname, ip_cidrs)
@@ -362,7 +362,7 @@
                          ex_gw_port['id'], external_dlname,
                          ex_gw_port['mac_address'],
                          bridge=self.agent_conf.external_network_bridge,
-                         vif_type=ex_gw_port['binding:vif_type'])
+                         vif_type=ex_gw_port.get('binding:vif_type'))
         ip_cidrs = common_utils.fixed_ip_cidrs(ex_gw_port['fixed_ips'])
         self.driver.init_l3(external_dlname, ip_cidrs)
         for fixed_ip in ex_gw_port['fixed_ips']:
--- a/components/openstack/neutron/files/agent/solaris/dhcp.py	Wed Jun 08 10:25:10 2016 -0700
+++ b/components/openstack/neutron/files/agent/solaris/dhcp.py	Wed Jun 08 12:20:02 2016 -0700
@@ -255,7 +255,7 @@
             self.driver.plug(network.tenant_id, network.id,
                              port.id, interface_name, port.mac_address,
                              network=network,
-                             vif_type=port['binding:vif_type'])
+                             vif_type=getattr(port, 'binding:vif_type', None))
         ip_cidrs = []
         addrconf = False
         for fixed_ip in port.fixed_ips:
--- a/components/openstack/neutron/files/agent/solaris/interface.py	Wed Jun 08 10:25:10 2016 -0700
+++ b/components/openstack/neutron/files/agent/solaris/interface.py	Wed Jun 08 12:20:02 2016 -0700
@@ -120,7 +120,7 @@
 
     def plug(self, tenant_id, network_id, port_id, datalink_name, mac_address,
              network=None, bridge=None, namespace=None, prefix=None,
-             protection=False):
+             protection=False, vif_type=None):
         """Plug in the interface."""
 
         if net_lib.Datalink.datalink_exists(datalink_name):