Commit b87a9c5f authored by Christos Stavrakakis's avatar Christos Stavrakakis Committed by Helga Velroyen

Add Disks and NICs to _AllUUIDObjects

Since disks and NICs have UUIDs, they must be considered
to _AllUUIDObjects.
Signed-off-by: default avatarChristos Stavrakakis <cstavr@grnet.gr>
Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
Reviewed-by: default avatarHelga Velroyen <helgav@google.com>
parent fcbd025c
......@@ -445,6 +445,24 @@ class ConfigWriter:
lvnames.update(lv_list)
return lvnames
def _AllDisks(self):
"""Compute the list of all Disks.
"""
disks = []
for instance in self._config_data.instances.values():
disks.extend(instance.disks)
return disks
def _AllNICs(self):
"""Compute the list of all NICs.
"""
nics = []
for instance in self._config_data.instances.values():
nics.extend(instance.nics)
return nics
def _AllIDs(self, include_temporary):
"""Compute the list of all UUIDs and names we have.
......@@ -2038,6 +2056,8 @@ class ConfigWriter:
self._config_data.nodes.values() +
self._config_data.nodegroups.values() +
self._config_data.networks.values() +
self._AllDisks() +
self._AllNICs() +
[self._config_data.cluster])
def _OpenConfig(self, accept_foreign):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment