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
f9bbb4786e
commit
2004000625
|
@ -1365,7 +1365,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