Add the SSH key options
[ganeti-github.git] / lib / cli_opts.py
index ae58ede..9f4d530 100644 (file)
@@ -238,6 +238,8 @@ __all__ = [
   "SPLIT_ISPECS_OPTS",
   "SRC_DIR_OPT",
   "SRC_NODE_OPT",
+  "SSH_KEY_BITS_OPT",
+  "SSH_KEY_TYPE_OPT",
   "STARTUP_PAUSED_OPT",
   "STATIC_OPT",
   "SUBMIT_OPT",
@@ -1594,6 +1596,17 @@ LONG_SLEEP_OPT = cli_option(
     "--long-sleep", default=False, dest="long_sleep",
     help="Allow long shutdowns when backing up instances", action="store_true")
 
+SSH_KEY_TYPE_OPT = \
+    cli_option("--ssh-key-type", default=None,
+               choices=list(constants.SSHK_ALL), dest="ssh_key_type",
+               help="Type of SSH key deployed by Ganeti for cluster actions")
+
+SSH_KEY_BITS_OPT = \
+    cli_option("--ssh-key-bits", default=None,
+               type="int", dest="ssh_key_bits",
+               help="Length of SSH keys generated by Ganeti, in bits")
+
+
 #: Options provided by all commands
 COMMON_OPTS = [DEBUG_OPT, REASON_OPT]