Revision 63ac47cc
b/lib/cmdlib.py | ||
---|---|---|
8219 | 8219 |
REQ_BGL = False |
8220 | 8220 |
|
8221 | 8221 |
def CheckArguments(self): |
8222 |
if self.op.remote_node is not None and self.op.iallocator is not None: |
|
8223 |
raise errors.OpPrereqError("Give either the iallocator or the new" |
|
8224 |
" secondary, not both", errors.ECODE_INVAL) |
|
8222 |
_CheckIAllocatorOrNode(self, "iallocator", "remote_node") |
|
8225 | 8223 |
|
8226 | 8224 |
def ExpandNames(self): |
8227 | 8225 |
self.op.nodes = _GetWantedNodes(self, self.op.nodes) |
b/scripts/gnt-node | ||
---|---|---|
253 | 253 |
dst_node = opts.dst_node |
254 | 254 |
iallocator = opts.iallocator |
255 | 255 |
|
256 |
cnt = [dst_node, iallocator].count(None) |
|
257 |
if cnt != 1: |
|
258 |
raise errors.OpPrereqError("One and only one of the -n and -I" |
|
259 |
" options must be passed", errors.ECODE_INVAL) |
|
260 |
|
|
261 | 256 |
op = opcodes.OpNodeEvacuationStrategy(nodes=args, |
262 | 257 |
iallocator=iallocator, |
263 | 258 |
remote_node=dst_node) |
Also available in: Unified diff