Revision e7b61bb0 scripts/gnt-node
b/scripts/gnt-node | ||
---|---|---|
571 | 571 |
changes = {} |
572 | 572 |
|
573 | 573 |
if opts.allocatable is not None: |
574 |
changes[constants.SF_ALLOCATABLE] = (opts.allocatable == "yes")
|
|
574 |
changes[constants.SF_ALLOCATABLE] = opts.allocatable
|
|
575 | 575 |
|
576 | 576 |
if changes: |
577 | 577 |
op = opcodes.OpModifyNodeStorage(node_name=node_name, |
... | ... | |
618 | 618 |
ToStderr("Please give at least one of the parameters.") |
619 | 619 |
return 1 |
620 | 620 |
|
621 |
if opts.master_candidate is not None: |
|
622 |
candidate = opts.master_candidate == 'yes' |
|
623 |
else: |
|
624 |
candidate = None |
|
625 |
if opts.offline is not None: |
|
626 |
offline = opts.offline == 'yes' |
|
627 |
else: |
|
628 |
offline = None |
|
629 |
|
|
630 |
if opts.drained is not None: |
|
631 |
drained = opts.drained == 'yes' |
|
632 |
else: |
|
633 |
drained = None |
|
634 | 621 |
op = opcodes.OpSetNodeParams(node_name=args[0], |
635 |
master_candidate=candidate, |
|
636 |
offline=offline, |
|
637 |
drained=drained, |
|
622 |
master_candidate=opts.master_candidate,
|
|
623 |
offline=opts.offline,
|
|
624 |
drained=opts.drained,
|
|
638 | 625 |
force=opts.force, |
639 | 626 |
auto_promote=opts.auto_promote) |
640 | 627 |
|
Also available in: Unified diff