Revision 069dcc86 lib/cmdlib.py
b/lib/cmdlib.py | ||
---|---|---|
2091 | 2091 |
"""Logical unit for querying instances. |
2092 | 2092 |
|
2093 | 2093 |
""" |
2094 |
_OP_REQP = ["output_fields"] |
|
2094 |
_OP_REQP = ["output_fields", "names"]
|
|
2095 | 2095 |
|
2096 | 2096 |
def CheckPrereq(self): |
2097 | 2097 |
"""Check prerequisites. |
... | ... | |
2107 | 2107 |
dynamic=self.dynamic_fields, |
2108 | 2108 |
selected=self.op.output_fields) |
2109 | 2109 |
|
2110 |
self.wanted = _GetWantedInstances(self, self.op.names) |
|
2111 |
|
|
2110 | 2112 |
def Exec(self, feedback_fn): |
2111 | 2113 |
"""Computes the list of nodes and their attributes. |
2112 | 2114 |
|
2113 | 2115 |
""" |
2114 |
instance_names = utils.NiceSort(self.cfg.GetInstanceList())
|
|
2116 |
instance_names = self.wanted
|
|
2115 | 2117 |
instance_list = [self.cfg.GetInstanceInfo(iname) for iname |
2116 | 2118 |
in instance_names] |
2117 | 2119 |
|
Also available in: Unified diff