Revision 57d0151e scripts/gnt-instance
b/scripts/gnt-instance | ||
---|---|---|
795 | 795 |
|
796 | 796 |
commands = { |
797 | 797 |
'add': (AddInstance, ARGS_ONE, add_opts, |
798 |
"[opts...] <name>", |
|
799 | 798 |
"Creates and adds a new instance to the cluster"), |
800 | 799 |
'console': (ConnectToInstanceConsole, ARGS_ONE, |
801 | 800 |
[DEBUG_OPT, |
802 | 801 |
make_option("--show-cmd", dest="show_command", |
803 | 802 |
action="store_true", default=False, |
804 | 803 |
help=("Show command instead of executing it"))], |
805 |
"[--show-cmd] <instance>", |
|
806 | 804 |
"Opens a console on the specified instance"), |
807 | 805 |
'failover': (FailoverInstance, ARGS_ONE, |
808 | 806 |
[DEBUG_OPT, FORCE_OPT, |
... | ... | |
811 | 809 |
help="Ignore the consistency of the disks on" |
812 | 810 |
" the secondary"), |
813 | 811 |
], |
814 |
"[-f] <instance>", |
|
815 | 812 |
"Stops the instance and starts it on the backup node, using" |
816 | 813 |
" the remote mirror (only for instances of type drbd)"), |
817 |
'info': (ShowInstanceConfig, ARGS_ANY, [DEBUG_OPT], "[<instance>...]",
|
|
814 |
'info': (ShowInstanceConfig, ARGS_ANY, [DEBUG_OPT], |
|
818 | 815 |
"Show information on the specified instance"), |
819 | 816 |
'list': (ListInstances, ARGS_NONE, |
820 |
[DEBUG_OPT, NOHDR_OPT, SEP_OPT, USEUNITS_OPT, FIELDS_OPT], "",
|
|
817 |
[DEBUG_OPT, NOHDR_OPT, SEP_OPT, USEUNITS_OPT, FIELDS_OPT], |
|
821 | 818 |
"Lists the instances and their status. The available fields are" |
822 | 819 |
" (see the man page for details): status, oper_state, oper_ram," |
823 | 820 |
" name, os, pnode, snodes, admin_state, admin_ram, disk_template," |
... | ... | |
825 | 822 |
" list is (in order): %s." % ", ".join(_LIST_DEF_FIELDS), |
826 | 823 |
), |
827 | 824 |
'reinstall': (ReinstallInstance, ARGS_ONE, [DEBUG_OPT, FORCE_OPT, os_opt], |
828 |
"[-f] <instance>", "Reinstall a stopped instance"),
|
|
825 |
"Reinstall a stopped instance"), |
|
829 | 826 |
'remove': (RemoveInstance, ARGS_ONE, |
830 | 827 |
[DEBUG_OPT, FORCE_OPT, |
831 | 828 |
make_option("--ignore-failures", dest="ignore_failures", |
... | ... | |
834 | 831 |
" if there are failures during the removal" |
835 | 832 |
" process (shutdown, disk removal, etc.)")), |
836 | 833 |
], |
837 |
"[-f] <instance>", "Shuts down the instance and removes it"),
|
|
834 |
"Shuts down the instance and removes it"), |
|
838 | 835 |
'rename': (RenameInstance, ARGS_FIXED(2), |
839 | 836 |
[DEBUG_OPT, |
840 | 837 |
make_option("--no-ip-check", dest="ignore_ip", |
... | ... | |
842 | 839 |
" is alive", |
843 | 840 |
default=False, action="store_true"), |
844 | 841 |
], |
845 |
"<instance> <new_name>", "Rename the instance"),
|
|
842 |
"Rename the instance"), |
|
846 | 843 |
'replace-disks': (ReplaceDisks, ARGS_ONE, |
847 | 844 |
[DEBUG_OPT, |
848 | 845 |
make_option("-n", "--new-secondary", dest="new_secondary", |
... | ... | |
867 | 864 |
" secondary node replacement)", |
868 | 865 |
default=None, type="string"), |
869 | 866 |
], |
870 |
"[-s|-p|-n NODE] <instance>", |
|
871 | 867 |
"Replaces all disks for the instance"), |
872 | 868 |
'modify': (SetInstanceParams, ARGS_ONE, |
873 | 869 |
[DEBUG_OPT, FORCE_OPT, |
... | ... | |
899 | 895 |
"(either one or more of [acdn] or 'default')", |
900 | 896 |
default=None, type="string", metavar="<BOOTORDER>"), |
901 | 897 |
], |
902 |
"<instance>", "Alters the parameters of an instance"),
|
|
898 |
"Alters the parameters of an instance"), |
|
903 | 899 |
'shutdown': (ShutdownInstance, ARGS_ANY, |
904 | 900 |
[DEBUG_OPT, m_node_opt, m_pri_node_opt, m_sec_node_opt, |
905 | 901 |
m_clust_opt, m_inst_opt, m_force_multi], |
906 |
"<instance>", "Stops an instance"),
|
|
902 |
"Stops an instance"), |
|
907 | 903 |
'startup': (StartupInstance, ARGS_ANY, |
908 | 904 |
[DEBUG_OPT, FORCE_OPT, m_force_multi, |
909 | 905 |
make_option("-e", "--extra", dest="extra_args", |
... | ... | |
912 | 908 |
m_node_opt, m_pri_node_opt, m_sec_node_opt, |
913 | 909 |
m_clust_opt, m_inst_opt, |
914 | 910 |
], |
915 |
"<instance>", "Starts an instance"),
|
|
911 |
"Starts an instance"),
|
|
916 | 912 |
|
917 | 913 |
'reboot': (RebootInstance, ARGS_ANY, |
918 | 914 |
[DEBUG_OPT, m_force_multi, |
... | ... | |
929 | 925 |
m_node_opt, m_pri_node_opt, m_sec_node_opt, |
930 | 926 |
m_clust_opt, m_inst_opt, |
931 | 927 |
], |
932 |
"<instance>", "Reboots an instance"),
|
|
928 |
"Reboots an instance"), |
|
933 | 929 |
'activate-disks': (ActivateDisks, ARGS_ONE, [DEBUG_OPT], |
934 |
"<instance>", |
|
935 | 930 |
"Activate an instance's disks"), |
936 | 931 |
'deactivate-disks': (DeactivateDisks, ARGS_ONE, [DEBUG_OPT], |
937 |
"<instance>", |
|
938 | 932 |
"Deactivate an instance's disks"), |
939 | 933 |
'list-tags': (ListTags, ARGS_ONE, [DEBUG_OPT], |
940 |
"<node_name>", "List the tags of the given instance"),
|
|
934 |
"List the tags of the given instance"), |
|
941 | 935 |
'add-tags': (AddTags, ARGS_ATLEAST(1), [DEBUG_OPT, TAG_SRC_OPT], |
942 |
"<node_name> tag...", "Add tags to the given instance"),
|
|
936 |
"Add tags to the given instance"), |
|
943 | 937 |
'remove-tags': (RemoveTags, ARGS_ATLEAST(1), [DEBUG_OPT, TAG_SRC_OPT], |
944 |
"<node_name> tag...", "Remove tags from given instance"),
|
|
938 |
"Remove tags from given instance"), |
|
945 | 939 |
} |
946 | 940 |
|
947 | 941 |
aliases = { |
Also available in: Unified diff