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