Revision fbe9022f
b/lib/cmdlib.py | ||
---|---|---|
4606 | 4606 |
|
4607 | 4607 |
""" |
4608 | 4608 |
_OP_REQP = ["duration", "on_master", "on_nodes"] |
4609 |
REQ_BGL = False |
|
4609 | 4610 |
|
4610 |
def CheckPrereq(self):
|
|
4611 |
"""Check prerequisites.
|
|
4611 |
def ExpandNames(self):
|
|
4612 |
"""Expand names and set required locks.
|
|
4612 | 4613 |
|
4613 |
This checks that we have a good list of nodes and/or the duration |
|
4614 |
is valid. |
|
4614 |
This expands the node list, if any. |
|
4615 | 4615 |
|
4616 | 4616 |
""" |
4617 |
|
|
4617 |
self.needed_locks = {} |
|
4618 | 4618 |
if self.op.on_nodes: |
4619 |
# _GetWantedNodes can be used here, but is not always appropriate to use |
|
4620 |
# this way in ExpandNames. Check LogicalUnit.ExpandNames docstring for |
|
4621 |
# more information. |
|
4619 | 4622 |
self.op.on_nodes = _GetWantedNodes(self, self.op.on_nodes) |
4623 |
self.needed_locks[locking.LEVEL_NODE] = self.op.on_nodes |
|
4624 |
|
|
4625 |
def CheckPrereq(self): |
|
4626 |
"""Check prerequisites. |
|
4627 |
|
|
4628 |
""" |
|
4620 | 4629 |
|
4621 | 4630 |
def Exec(self, feedback_fn): |
4622 | 4631 |
"""Do the actual sleep. |
Also available in: Unified diff