Revision 3fa93523 lib/cmdlib.py
b/lib/cmdlib.py | ||
---|---|---|
1457 | 1457 |
all_info = self.cfg.GetAllNodesInfo() |
1458 | 1458 |
if self.do_locking: |
1459 | 1459 |
nodenames = self.acquired_locks[locking.LEVEL_NODE] |
1460 |
elif self.wanted != locking.ALL_SET: |
|
1461 |
nodenames = self.wanted |
|
1462 |
missing = set(nodenames).difference(all_info.keys()) |
|
1463 |
if missing: |
|
1464 |
raise self.OpExecError( |
|
1465 |
"Some nodes were removed before retrieving their data: %s" % missing) |
|
1460 | 1466 |
else: |
1461 | 1467 |
nodenames = all_info.keys() |
1462 | 1468 |
nodelist = [all_info[name] for name in nodenames] |
... | ... | |
2606 | 2612 |
all_info = self.cfg.GetAllInstancesInfo() |
2607 | 2613 |
if self.do_locking: |
2608 | 2614 |
instance_names = self.acquired_locks[locking.LEVEL_INSTANCE] |
2615 |
elif self.wanted != locking.ALL_SET: |
|
2616 |
instance_names = self.wanted |
|
2617 |
missing = set(instance_names).difference(all_info.keys()) |
|
2618 |
if missing: |
|
2619 |
raise self.OpExecError( |
|
2620 |
"Some instances were removed before retrieving their data: %s" |
|
2621 |
% missing) |
|
2609 | 2622 |
else: |
2610 | 2623 |
instance_names = all_info.keys() |
2611 | 2624 |
instance_list = [all_info[iname] for iname in instance_names] |
Also available in: Unified diff