Fix app-update command to remove unnecessary parameters 56/15656/3
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Fri, 16 Jan 2026 08:29:25 +0000 (09:29 +0100)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Thu, 29 Jan 2026 10:56:42 +0000 (11:56 +0100)
Change-Id: I8d65d87faf5881f9eeabc4c64e469d66c4ec4c98
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
osmclient/cli_commands/app.py

index 0a14510..fe8e7aa 100755 (executable)
@@ -229,36 +229,6 @@ def app_edit(ctx, name, newname, description, **kwargs):
 @click.command(name="app-update", short_help="updates an App Instance")
 @utils.require_hostname
 @click.argument("name")
-@click.option("--newname", help="New name for the App Instance")
-@click.option("--description", default="", help="human readable description")
-@click.option(
-    "--oka",
-    default="",
-    help="name or ID of the OKA that the App Instance will be based on",
-)
-@click.option(
-    "--sw-catalog-path",
-    default="",
-    help="folder in the SW catalog (git repo) that the App Instance will be based on",
-)
-@click.option(
-    "--profile",
-    default="",
-    help="name or ID of the profile the App Instance will belong to",
-)
-@click.option(
-    "--profile-type",
-    type=click.Choice(
-        [
-            "infra-controller-profile",
-            "infra-config-profile",
-            "app-profile",
-            "resource-profile",
-        ]
-    ),
-    default="app-profile",
-    help="type of profile. Default: app-profile",
-)
 @click.option(
     "--model",
     default=None,
@@ -278,10 +248,6 @@ def app_edit(ctx, name, newname, description, **kwargs):
 def app_update(
     ctx,
     name,
-    oka,
-    sw_catalog_path,
-    profile,
-    profile_type,
     model,
     params,
     secret_params,
@@ -292,22 +258,6 @@ def app_update(
     """
     logger.debug("")
     app_changes = {}
-    profile_type_mapping = {
-        "infra-controller-profile": "infra_controller_profiles",
-        "infra-config-profile": "infra_config_profiles",
-        "app-profile": "app_profiles",
-        "resource-profile": "resource_profiles",
-    }
-    if oka and sw_catalog_path:
-        raise ClientException(
-            '"--oka" option is incompatible with "--sw-catalog-path" option'
-        )
-    if oka:
-        app_changes["oka"] = get_oka_id(ctx, oka)
-    if sw_catalog_path:
-        app_changes["sw_catalog_path"] = sw_catalog_path
-    app_changes["profile_type"] = profile_type_mapping[profile_type]
-    app_changes["profile"] = get_profile_id(ctx, profile, profile_type)
     if model:
         with open(model, "r", encoding="utf-8") as cf:
             model_data = cf.read()