Fix exception for port extensions
This patch guards against exceptions when the group-based-policy extension driver is called to augment a port resource, but the port doesn't yet have a binding. Change-Id: I6e220c8f9d919089c570b6e00055e083fd1d856d
This commit is contained in:
parent
8861932c18
commit
39a117ac6b
@ -1362,7 +1362,8 @@ class ApicMechanismDriver(api_plus.MechanismDriver,
|
||||
aim_resources.extend(resources)
|
||||
binding = (port_db.port_bindings[0]
|
||||
if port_db.port_bindings else None)
|
||||
acc_name = self._get_acc_bundle_for_host(aim_ctx, binding.host)
|
||||
acc_name = (self._get_acc_bundle_for_host(aim_ctx, binding.host) if
|
||||
binding else None)
|
||||
if resources and acc_name:
|
||||
acc_bundle = aim_resource.InfraAccBundleGroup(name=acc_name)
|
||||
aim_resources.append(acc_bundle)
|
||||
|
Loading…
Reference in New Issue
Block a user