Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/vme/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@ Release History
1.0.0b3
++++++
* Update 'az vme list --output table' to show correct versions.
* Wait for the bundle feature flag to fully propagate after enabling it.
* Wait for the bundle feature flag to fully propagate after enabling it.

1.0.0b4
++++++
* Add '--force' to 'az vme uninstall' to force delete extension.
4 changes: 4 additions & 0 deletions src/vme/azext_vme/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ def load_arguments(self, _):
help='Extension types to be uninstalled.',
arg_type=get_enum_type(IncludedExtensionTypes),
)
c.argument(
'force',
help='Specify whether to force delete the extension from the cluster.',
)

with self.argument_context('vme list') as c:
c.argument(
Expand Down
6 changes: 4 additions & 2 deletions src/vme/azext_vme/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ def uninstall_vme(
cmd,
resource_group_name: str,
cluster_name: str,
include_extension_types: list[str]):
include_extension_types: list[str],
force=False):
Copy link

Copilot AI Jun 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parameter 'force' lacks a type annotation. Annotate it as 'force: bool = False' for clarity and consistency with other parameters.

Suggested change
force=False):
force: bool = False):

Copilot uses AI. Check for mistakes.
if 'all' in include_extension_types:
include_extension_types = consts.BundleExtensionTypes
subscription_id = get_subscription_id(cmd.cli_ctx)
Expand All @@ -108,8 +109,9 @@ def uninstall_vme(
"connectedClusters",
"--name",
consts.BundleExtensionTypeNames[extension_type],
"--force",
"--yes"]
if force:
command.append("--force")
utils.call_subprocess_raise_output(command)
print(f"Uninstalled extension {extension_type} successfully.")
if len(include_extension_types) > 1:
Expand Down
2 changes: 1 addition & 1 deletion src/vme/azext_vme/tests/latest/test_vme_scenario.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,5 @@ def test_vme_live(self, resource_group, resource_group_location):

captured_output = io.StringIO()
with redirect_stdout(captured_output):
self.cmd("vme uninstall -g {rg} -c {cluster_name} --include all")
self.cmd("vme uninstall -g {rg} -c {cluster_name} --include all --force")
self.assertIn("All extensions uninstalled successfully.", captured_output.getvalue())
2 changes: 1 addition & 1 deletion src/vme/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from setuptools import setup, find_packages

# HISTORY.rst entry.
VERSION = '1.0.0b3'
VERSION = '1.0.0b4'

# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
Expand Down
Loading