Merge "Log the ports we bind in flat"
This commit is contained in:
commit
7a8ee2d131
@ -55,6 +55,7 @@ class FlatNetwork(common.NeutronVIFPortIDMixin,
|
|||||||
|
|
||||||
def _bind_flat_ports(self, task):
|
def _bind_flat_ports(self, task):
|
||||||
LOG.debug("Binding flat network ports")
|
LOG.debug("Binding flat network ports")
|
||||||
|
bound_ports = []
|
||||||
for port_like_obj in task.ports + task.portgroups:
|
for port_like_obj in task.ports + task.portgroups:
|
||||||
vif_port_id = (
|
vif_port_id = (
|
||||||
port_like_obj.internal_info.get(common.TENANT_VIF_KEY)
|
port_like_obj.internal_info.get(common.TENANT_VIF_KEY)
|
||||||
@ -68,12 +69,15 @@ class FlatNetwork(common.NeutronVIFPortIDMixin,
|
|||||||
try:
|
try:
|
||||||
neutron.update_neutron_port(task.context,
|
neutron.update_neutron_port(task.context,
|
||||||
vif_port_id, port_attrs)
|
vif_port_id, port_attrs)
|
||||||
|
bound_ports.append(vif_port_id)
|
||||||
except openstack_exc.OpenStackCloudException as e:
|
except openstack_exc.OpenStackCloudException as e:
|
||||||
msg = (_('Unable to set binding:host_id for '
|
msg = (_('Unable to set binding:host_id for '
|
||||||
'neutron port %(port_id)s. Error: '
|
'neutron port %(port_id)s. Error: '
|
||||||
'%(err)s') % {'port_id': vif_port_id, 'err': e})
|
'%(err)s') % {'port_id': vif_port_id, 'err': e})
|
||||||
LOG.exception(msg)
|
LOG.exception(msg)
|
||||||
raise exception.NetworkError(msg)
|
raise exception.NetworkError(msg)
|
||||||
|
LOG.debug("Finished binding flat network ports, attached: %s",
|
||||||
|
' '.join(bound_ports))
|
||||||
|
|
||||||
def _unbind_flat_ports(self, task):
|
def _unbind_flat_ports(self, task):
|
||||||
node = task.node
|
node = task.node
|
||||||
|
Loading…
x
Reference in New Issue
Block a user