Skip to content

Commit

Permalink
[patch] Fix argChecker
Browse files Browse the repository at this point in the history
  • Loading branch information
Rawa Resul committed Jan 17, 2025
1 parent f9f853b commit 23f048d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions python/src/mas/cli/install/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1026,6 +1026,7 @@ def nonInteractiveMode(self) -> None:
else:
self.setParam("sls_action", "install")
else:
self.setParam("sls_namespace", "ibm-sls")
self.setParam("sls_action", "gencfg")
elif key == "license_file":
if value is not None and value != "":
Expand Down
4 changes: 2 additions & 2 deletions python/src/mas/cli/install/argChecker.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ def verifySLSArgs(parser, args):
if any(v is not None for v in group_1) and any(v is not None for v in group_2):
parser.error("Cannot combine [--sls-namespace, --license-file] with [--sls-url, --sls-registration-key, --sls-certificates].")

if not all(v is not None for v in group_2):
parser.error("--sls-url, --sls-registration-key and --sls-certificates are required.")
if not all(v is not None for v in group_2) and any(v is not None for v in group_2):
parser.error("When providing any of --sls-url, --sls-registration-key and --sls-certificates, all three are required.")
1 change: 0 additions & 1 deletion python/src/mas/cli/install/argParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,6 @@ def isValidDir(parser, arg) -> str:
"--sls-namespace",
required=False,
help="Set namespace for new SLS install or point to existing instance",
default="ibm-sls"
)
slsArgGroup.add_argument(
"--sls-url",
Expand Down

0 comments on commit 23f048d

Please sign in to comment.