Revision 5eacbcae lib/cmdlib/misc.py
b/lib/cmdlib/misc.py | ||
---|---|---|
31 | 31 |
from ganeti import qlang |
32 | 32 |
from ganeti import query |
33 | 33 |
from ganeti import utils |
34 |
from ganeti.cmdlib.base import NoHooksLU, _QueryBase
|
|
35 |
from ganeti.cmdlib.common import _GetWantedNodes, _SupportsOob
|
|
34 |
from ganeti.cmdlib.base import NoHooksLU, QueryBase |
|
35 |
from ganeti.cmdlib.common import GetWantedNodes, SupportsOob
|
|
36 | 36 |
|
37 | 37 |
|
38 | 38 |
class LUOobCommand(NoHooksLU): |
... | ... | |
47 | 47 |
|
48 | 48 |
""" |
49 | 49 |
if self.op.node_names: |
50 |
self.op.node_names = _GetWantedNodes(self, self.op.node_names)
|
|
50 |
self.op.node_names = GetWantedNodes(self, self.op.node_names) |
|
51 | 51 |
lock_names = self.op.node_names |
52 | 52 |
else: |
53 | 53 |
lock_names = locking.ALL_SET |
... | ... | |
81 | 81 |
if (self.op.command in self._SKIP_MASTER and |
82 | 82 |
self.master_node in self.op.node_names): |
83 | 83 |
master_node_obj = self.cfg.GetNodeInfo(self.master_node) |
84 |
master_oob_handler = _SupportsOob(self.cfg, master_node_obj)
|
|
84 |
master_oob_handler = SupportsOob(self.cfg, master_node_obj) |
|
85 | 85 |
|
86 | 86 |
if master_oob_handler: |
87 | 87 |
additional_text = ("run '%s %s %s' if you want to operate on the" |
... | ... | |
128 | 128 |
node_entry = [(constants.RS_NORMAL, node.name)] |
129 | 129 |
ret.append(node_entry) |
130 | 130 |
|
131 |
oob_program = _SupportsOob(self.cfg, node)
|
|
131 |
oob_program = SupportsOob(self.cfg, node) |
|
132 | 132 |
|
133 | 133 |
if not oob_program: |
134 | 134 |
node_entry.append((constants.RS_UNAVAIL, None)) |
... | ... | |
221 | 221 |
utils.CommaJoin(errs)) |
222 | 222 |
|
223 | 223 |
|
224 |
class _ExtStorageQuery(_QueryBase):
|
|
224 |
class ExtStorageQuery(QueryBase):
|
|
225 | 225 |
FIELDS = query.EXTSTORAGE_FIELDS |
226 | 226 |
|
227 | 227 |
def ExpandNames(self, lu): |
... | ... | |
364 | 364 |
REQ_BGL = False |
365 | 365 |
|
366 | 366 |
def CheckArguments(self): |
367 |
self.eq = _ExtStorageQuery(qlang.MakeSimpleFilter("name", self.op.names),
|
|
367 |
self.eq = ExtStorageQuery(qlang.MakeSimpleFilter("name", self.op.names), |
|
368 | 368 |
self.op.output_fields, False) |
369 | 369 |
|
370 | 370 |
def ExpandNames(self): |
... | ... | |
382 | 382 |
|
383 | 383 |
def ExpandNames(self): |
384 | 384 |
if self.op.nodes: |
385 |
self.op.nodes = _GetWantedNodes(self, self.op.nodes)
|
|
385 |
self.op.nodes = GetWantedNodes(self, self.op.nodes) |
|
386 | 386 |
|
387 | 387 |
self.needed_locks = { |
388 | 388 |
locking.LEVEL_NODE: self.op.nodes, |
Also available in: Unified diff