Skip to content

Commit 3d65375

Browse files
Ptnan7Jingnan Xu
and
Jingnan Xu
authored
{Font-Door}Replace all msrestazure with azure.mgmt.core (Azure#8012)
* 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]>
1 parent 316fd95 commit 3d65375

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/front-door/azext_front_door/_validators.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def get_name_or_id_validator(dest, child_type=None, resource_type='Frontdoors',
1212
def _validate_name_or_id(cmd, namespace):
1313

1414
from azure.cli.core.commands.client_factory import get_subscription_id
15-
from msrestazure.tools import is_valid_resource_id, resource_id
15+
from azure.mgmt.core.tools import is_valid_resource_id, resource_id
1616

1717
subscription_id = get_subscription_id(cmd.cli_ctx)
1818
resource_group = namespace.resource_group_name

src/front-door/azext_front_door/custom.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Licensed under the MIT License. See License.txt in the project root for license information.
55
# --------------------------------------------------------------------------------------------
66

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

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

140140
subscription_id = get_subscription_id(cmd.cli_ctx)
141141

@@ -661,6 +661,7 @@ def create_fd_routing_rules(cmd, resource_group_name, front_door_name, item_name
661661
redirect_protocol, custom_host, custom_path,
662662
custom_fragment, custom_query_string)
663663

664+
rule = None
664665
if route_type == 'Forward':
665666
rule = RoutingRule(
666667
name=item_name,

0 commit comments

Comments
 (0)