Revision 922610c9
b/lib/config.py | ||
---|---|---|
1572 | 1572 |
for node_name in nodes) |
1573 | 1573 |
|
1574 | 1574 |
@locking.ssynchronized(_config_lock, shared=1) |
1575 |
def GetInstanceNetworks(self, instance_name): |
|
1576 |
"""Returns set of network UUIDs for instance's nics. |
|
1577 |
|
|
1578 |
@rtype: frozenset |
|
1579 |
|
|
1580 |
""" |
|
1581 |
instance = self._UnlockedGetInstanceInfo(instance_name) |
|
1582 |
if not instance: |
|
1583 |
raise errors.ConfigurationError("Unknown instance '%s'" % instance_name) |
|
1584 |
|
|
1585 |
networks = set() |
|
1586 |
for nic in instance.nics: |
|
1587 |
if nic.network: |
|
1588 |
networks.add(nic.network) |
|
1589 |
|
|
1590 |
return frozenset(networks) |
|
1591 |
|
|
1592 |
@locking.ssynchronized(_config_lock, shared=1) |
|
1575 | 1593 |
def GetMultiInstanceInfo(self, instances): |
1576 | 1594 |
"""Get the configuration of multiple instances. |
1577 | 1595 |
|
Also available in: Unified diff