Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove msrestazure dependency in Fleet extension #7941

Merged
merged 4 commits into from
Sep 5, 2024
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
7 changes: 6 additions & 1 deletion src/fleet/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,9 @@ Release History

1.2.1
++++++
* Fixed --vm-size parameter mapping
* Fixed --vm-size parameter mapping

1.2.2
++++++
* Added missing help text
* Removed dependency on msrestazure library
20 changes: 0 additions & 20 deletions src/fleet/azext_fleet/_completers.py

This file was deleted.

2 changes: 1 addition & 1 deletion src/fleet/azext_fleet/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def load_arguments(self, _):

with self.argument_context('fleet create') as c:
c.argument('tags', tags_type)
c.argument('dns_name_prefix', options_list=['--dns-name-prefix', '-p'])
c.argument('dns_name_prefix', options_list=['--dns-name-prefix', '-p'], help='Prefix for host names that are created. If not specified, generate a host name using the managed cluster and resource group names.')
c.argument('enable_private_cluster', action='store_true', help='Whether to create the Fleet hub as a private cluster or not.')
c.argument('enable_vnet_integration', action='store_true', is_preview=True, help='Whether to enable apiserver vnet integration for the Fleet hub or not.')
c.argument('apiserver_subnet_id', validator=validate_apiserver_subnet_id, is_preview=True, help='The subnet to be used when apiserver vnet integration is enabled.')
Expand Down
4 changes: 1 addition & 3 deletions src/fleet/azext_fleet/_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

from azure.cli.core.azclierror import InvalidArgumentValueError
from azure.cli.core.util import CLIError
from azure.mgmt.core.tools import is_valid_resource_id


# https://github.com/Azure/azure-cli/blob/master/doc/authoring_command_modules/authoring_commands.md#supporting-name-or-id-parameters
def validate_member_cluster_id(namespace):
from msrestazure.tools import is_valid_resource_id
if not is_valid_resource_id(namespace.member_cluster_id):
raise InvalidArgumentValueError(
"--member-cluster-id is not a valid Azure resource ID.")
Expand Down Expand Up @@ -48,7 +48,6 @@ def validate_vm_size(namespace):
def _validate_subnet_id(subnet_id, name):
if subnet_id is None or subnet_id == '':
return
from msrestazure.tools import is_valid_resource_id
if not is_valid_resource_id(subnet_id):
raise CLIError(name + " is not a valid Azure resource ID.")

Expand All @@ -57,7 +56,6 @@ def validate_assign_identity(namespace):
if namespace.assign_identity is not None:
if namespace.assign_identity == '':
return
from msrestazure.tools import is_valid_resource_id
if not is_valid_resource_id(namespace.assign_identity):
raise CLIError(
"--assign-identity is not a valid Azure resource ID.")
Expand Down
2 changes: 1 addition & 1 deletion src/fleet/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

# TODO: Confirm this is the right version number you want and it matches your
# HISTORY.rst entry.
VERSION = '1.2.1'
VERSION = '1.2.2'

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