plugins: Invoke setup_parser_common_args explicitly from setup_parser

This allows to define plugins which do not need have any of common args.

Move setup_parser_common_args into libkas for this as it now becomes a
library function.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
Jan Kiszka
2021-07-10 11:22:34 +02:00
parent 6dd27e7c62
commit 4c975a04f9
6 changed files with 22 additions and 16 deletions

View File

@@ -43,6 +43,7 @@ import sys
from kas.context import create_global_context
from kas.config import Config
from kas.libcmds import Macro, Command
from kas.libkas import setup_parser_common_args
__license__ = 'MIT'
__copyright__ = 'Copyright (c) Siemens AG, 2017-2018'
@@ -62,6 +63,7 @@ class Shell:
Setup the argument parser for the shell plugin
"""
setup_parser_common_args(parser)
parser.add_argument('-k', '--keep-config-unchanged',
help='Skip steps that change the configuration',
action='store_true')