Skip to content

Commit

Permalink
{Font-Door}Replace all msrestazure with azure.mgmt.core (Azure#8012)
Browse files Browse the repository at this point in the history
* replace all msrestazure with azure.mgmt.core

* disable too-many-positional-arguments warning

* disable line 701 pylint

* add space

* trim

* disable line 701

* fix  used-before-assignmenta

---------

Co-authored-by: Jingnan Xu <[email protected]>
  • Loading branch information
Ptnan7 and Jingnan Xu authored Sep 24, 2024
1 parent 316fd95 commit 3d65375
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/front-door/azext_front_door/_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def get_name_or_id_validator(dest, child_type=None, resource_type='Frontdoors',
def _validate_name_or_id(cmd, namespace):

from azure.cli.core.commands.client_factory import get_subscription_id
from msrestazure.tools import is_valid_resource_id, resource_id
from azure.mgmt.core.tools import is_valid_resource_id, resource_id

subscription_id = get_subscription_id(cmd.cli_ctx)
resource_group = namespace.resource_group_name
Expand Down
5 changes: 3 additions & 2 deletions src/front-door/azext_front_door/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------

# pylint: disable=too-many-lines disable=line-too-long useless-object-inheritance condition-evals-to-constant
# pylint: disable=too-many-lines line-too-long useless-object-inheritance condition-evals-to-constant too-many-positional-arguments

import sys
from azure.cli.core.commands import cached_get, cached_put
Expand Down Expand Up @@ -135,7 +135,7 @@ def delete_func(cmd, resource_group_name, resource_name, item_name, no_wait=Fals
# region Frontdoor
def _front_door_subresource_id(cmd, resource_group, front_door_name, child_type, child_name):
from azure.cli.core.commands.client_factory import get_subscription_id
from msrestazure.tools import resource_id
from azure.mgmt.core.tools import resource_id

subscription_id = get_subscription_id(cmd.cli_ctx)

Expand Down Expand Up @@ -661,6 +661,7 @@ def create_fd_routing_rules(cmd, resource_group_name, front_door_name, item_name
redirect_protocol, custom_host, custom_path,
custom_fragment, custom_query_string)

rule = None
if route_type == 'Forward':
rule = RoutingRule(
name=item_name,
Expand Down

0 comments on commit 3d65375

Please sign in to comment.