Commit f9faf9c3 authored by René Nussbaumer's avatar René Nussbaumer Committed by Michael Hanselmann
Browse files

cli: Add ArgOs for later use in gnt-os


Signed-off-by: default avatarRené Nussbaumer <rn@google.com>
Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 760570a8
......@@ -458,6 +458,8 @@ class CompletionWriter:
choices = "$(_ganeti_nodes)"
elif isinstance(arg, cli.ArgJobId):
choices = "$(_ganeti_jobs)"
elif isinstance(arg, cli.ArgOs):
choices = "$(_ganeti_os)"
elif isinstance(arg, cli.ArgFile):
choices = ""
compgenargs.append("-f")
......
......@@ -146,6 +146,7 @@ __all__ = [
"ARGS_NONE",
"ARGS_ONE_INSTANCE",
"ARGS_ONE_NODE",
"ARGS_ONE_OS",
"ArgChoice",
"ArgCommand",
"ArgFile",
......@@ -153,6 +154,7 @@ __all__ = [
"ArgInstance",
"ArgJobId",
"ArgNode",
"ArgOs",
"ArgSuggest",
"ArgUnknown",
"OPT_COMPL_INST_ADD_NODES",
......@@ -246,11 +248,18 @@ class ArgHost(_Argument):
"""
class ArgOs(_Argument):
"""OS argument.
"""
ARGS_NONE = []
ARGS_MANY_INSTANCES = [ArgInstance()]
ARGS_MANY_NODES = [ArgNode()]
ARGS_ONE_INSTANCE = [ArgInstance(min=1, max=1)]
ARGS_ONE_NODE = [ArgNode(min=1, max=1)]
ARGS_ONE_OS = [ArgOs(min=1, max=1)]
def _ExtractTagsObject(opts, args):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment