Revision 1d789a97
b/lib/cmdlib.py | ||
---|---|---|
2649 | 2649 |
|
2650 | 2650 |
def ExpandNames(self): |
2651 | 2651 |
if self.op.instances: |
2652 |
self.wanted_names = [] |
|
2653 |
for name in self.op.instances: |
|
2654 |
full_name = _ExpandInstanceName(self.cfg, name) |
|
2655 |
self.wanted_names.append(full_name) |
|
2652 |
self.wanted_names = _GetWantedInstances(self, self.op.instances) |
|
2656 | 2653 |
self.needed_locks = { |
2657 | 2654 |
locking.LEVEL_NODE: [], |
2658 | 2655 |
locking.LEVEL_INSTANCE: self.wanted_names, |
... | ... | |
2664 | 2661 |
locking.LEVEL_NODE: locking.ALL_SET, |
2665 | 2662 |
locking.LEVEL_INSTANCE: locking.ALL_SET, |
2666 | 2663 |
} |
2667 |
self.share_locks = dict(((i, 1) for i in locking.LEVELS))
|
|
2664 |
self.share_locks = dict.fromkeys(locking.LEVELS, 1)
|
|
2668 | 2665 |
|
2669 | 2666 |
def DeclareLocks(self, level): |
2670 | 2667 |
if level == locking.LEVEL_NODE and self.wanted_names is not None: |
Also available in: Unified diff