[AIM] Validate network segments and port bindings

Validate that network segment types match registered type driver
names. Validate that port binding levels have valid segment IDs and
match registered mechanism driver names. After commiting repair
transaction, attempt to bind any unbound ports.

Change-Id: Ia8b665b95c1d6a50434621c61b8c2708ed5eac48
This commit is contained in:
Robert Kukura
2018-06-18 11:32:16 -04:00
parent 583584cdf7
commit 2bf9bd7751
3 changed files with 139 additions and 3 deletions

View File

@@ -116,6 +116,11 @@ class ValidationManager(object):
print("Rolling back attempted repairs")
self.actual_session.rollback()
# Bind unbound ports outside transaction.
if self.repair and self.result is not api.VALIDATION_FAILED:
print("Binding unbound ports")
self.md.bind_unbound_ports(self)
print("Validation result: %s" % self.result)
return self.result