components/openstack/neutron/files/agent/solaris/interface.py
branchs11u2-sru
changeset 4444 56cbdcda8e5e
parent 4156 4b1def16fe9b
equal deleted inserted replaced
4443:19990f188a99 4444:56cbdcda8e5e
   100         if status == 'used':
   100         if status == 'used':
   101             cmd = ['/usr/sbin/evsadm', 'reset-vport', '-T', tenant_id,
   101             cmd = ['/usr/sbin/evsadm', 'reset-vport', '-T', tenant_id,
   102                    '%s/%s' % (evsname, vportname)]
   102                    '%s/%s' % (evsname, vportname)]
   103             utils.execute(cmd)
   103             utils.execute(cmd)
   104 
   104 
   105         dl.connect_vnic(evs_vport, tenant_id)
       
   106 
       
   107         if not protection:
   105         if not protection:
   108             cmd = ['/usr/sbin/evsadm', 'set-vportprop', '-T', tenant_id,
   106             cmd = ['/usr/sbin/evsadm', 'set-vportprop', '-T', tenant_id,
   109                    '-p', 'protection=none', evs_vport]
   107                    '-p', 'protection=none', evs_vport]
   110             utils.execute(cmd)
   108             utils.execute(cmd)
       
   109 
       
   110         dl.connect_vnic(evs_vport, tenant_id)
   111 
   111 
   112     def unplug(self, device_name, namespace=None, prefix=None):
   112     def unplug(self, device_name, namespace=None, prefix=None):
   113         """Unplug the interface."""
   113         """Unplug the interface."""
   114 
   114 
   115         dl = net_lib.Datalink(device_name)
   115         dl = net_lib.Datalink(device_name)