Revision c5a66db3 lib/client/gnt_node.py

b/lib/client/gnt_node.py
324 324
                              remote_node=opts.dst_node,
325 325
                              iallocator=opts.iallocator,
326 326
                              early_release=opts.early_release)
327
  result = SubmitOpCode(op, cl=cl, opts=opts)
327
  result = SubmitOrSend(op, opts, cl=cl)
328 328

  
329 329
  # Keep track of submitted jobs
330 330
  jex = JobExecutor(cl=cl, opts=opts)
......
430 430
                             allow_runtime_changes=opts.allow_runtime_chgs,
431 431
                             ignore_ipolicy=opts.ignore_ipolicy)
432 432

  
433
  result = SubmitOpCode(op, cl=cl, opts=opts)
433
  result = SubmitOrSend(op, opts, cl=cl)
434 434

  
435 435
  # Keep track of submitted jobs
436 436
  jex = JobExecutor(cl=cl, opts=opts)
......
537 537
    return 2
538 538

  
539 539
  op = opcodes.OpNodePowercycle(node_name=node, force=opts.force)
540
  result = SubmitOpCode(op, opts=opts)
540
  result = SubmitOrSend(op, opts)
541 541
  if result:
542 542
    ToStderr(result)
543 543
  return 0
......
799 799
                                     storage_type=storage_type,
800 800
                                     name=volume_name,
801 801
                                     changes=changes)
802
    SubmitOpCode(op, opts=opts)
802
    SubmitOrSend(op, opts)
803 803
  else:
804 804
    ToStderr("No changes to perform, exiting.")
805 805

  
......
822 822
                                   storage_type=storage_type,
823 823
                                   name=volume_name,
824 824
                                   ignore_consistency=opts.ignore_consistency)
825
  SubmitOpCode(op, opts=opts)
825
  SubmitOrSend(op, opts)
826 826

  
827 827

  
828 828
def SetNodeParams(opts, args):
......
888 888
  "evacuate": (
889 889
    EvacuateNode, ARGS_ONE_NODE,
890 890
    [FORCE_OPT, IALLOCATOR_OPT, NEW_SECONDARY_OPT, EARLY_RELEASE_OPT,
891
     PRIORITY_OPT, PRIMARY_ONLY_OPT, SECONDARY_ONLY_OPT],
891
     PRIORITY_OPT, PRIMARY_ONLY_OPT, SECONDARY_ONLY_OPT, SUBMIT_OPT],
892 892
    "[-f] {-I <iallocator> | -n <dst>} [-p | -s] [options...] <node>",
893 893
    "Relocate the primary and/or secondary instances from a node"),
894 894
  "failover": (
......
901 901
    MigrateNode, ARGS_ONE_NODE,
902 902
    [FORCE_OPT, NONLIVE_OPT, MIGRATION_MODE_OPT, DST_NODE_OPT,
903 903
     IALLOCATOR_OPT, PRIORITY_OPT, IGNORE_IPOLICY_OPT,
904
     NORUNTIME_CHGS_OPT],
904
     NORUNTIME_CHGS_OPT, SUBMIT_OPT, PRIORITY_OPT],
905 905
    "[-f] <node>",
906 906
    "Migrate all the primary instance on a node away from it"
907 907
    " (only for instances of type drbd)"),
......
931 931
    "<node_name>", "Alters the parameters of a node"),
932 932
  "powercycle": (
933 933
    PowercycleNode, ARGS_ONE_NODE,
934
    [FORCE_OPT, CONFIRM_OPT, DRY_RUN_OPT, PRIORITY_OPT],
934
    [FORCE_OPT, CONFIRM_OPT, DRY_RUN_OPT, PRIORITY_OPT, SUBMIT_OPT],
935 935
    "<node_name>", "Tries to forcefully powercycle a node"),
936 936
  "power": (
937 937
    PowerNode,
......
960 960
    [ArgNode(min=1, max=1),
961 961
     ArgChoice(min=1, max=1, choices=_MODIFIABLE_STORAGE_TYPES),
962 962
     ArgFile(min=1, max=1)],
963
    [ALLOCATABLE_OPT, DRY_RUN_OPT, PRIORITY_OPT],
963
    [ALLOCATABLE_OPT, DRY_RUN_OPT, PRIORITY_OPT, SUBMIT_OPT],
964 964
    "<node_name> <storage_type> <name>", "Modify storage volume on a node"),
965 965
  "repair-storage": (
966 966
    RepairStorage,
967 967
    [ArgNode(min=1, max=1),
968 968
     ArgChoice(min=1, max=1, choices=_REPAIRABLE_STORAGE_TYPES),
969 969
     ArgFile(min=1, max=1)],
970
    [IGNORE_CONSIST_OPT, DRY_RUN_OPT, PRIORITY_OPT],
970
    [IGNORE_CONSIST_OPT, DRY_RUN_OPT, PRIORITY_OPT, SUBMIT_OPT],
971 971
    "<node_name> <storage_type> <name>",
972 972
    "Repairs a storage volume on a node"),
973 973
  "list-tags": (

Also available in: Unified diff