Skip to content

Commit

Permalink
{azure-firewall} Remove ADAL dependencies (Azure#8230)
Browse files Browse the repository at this point in the history
* remove msrest utils

* update version
  • Loading branch information
cxznmhdcxz authored Nov 5, 2024
1 parent 27d49e3 commit 340ec15
Show file tree
Hide file tree
Showing 8 changed files with 62,964 additions and 44,395 deletions.
5 changes: 5 additions & 0 deletions src/azure-firewall/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Release History
===============

1.2.1
++++++
* Remove ADAL dependencies

1.2.0
++++++
* `network firewall policy rule-collection-group collection rule add/update"`: Add parameter `--http-headers-to-insert`
Expand Down
4 changes: 2 additions & 2 deletions src/azure-firewall/azext_firewall/_exception_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@


def exception_handler(ex):
from msrestazure.azure_exceptions import CloudError
if isinstance(ex, CloudError):
from azure.core.exceptions import HttpResponseError
if isinstance(ex, HttpResponseError):
text = getattr(ex.response, 'text', '')
if len(ex.args) == 1 and isinstance(ex.args[0], str):
ex.args = tuple([ex.args[0] + text])
Expand Down
14 changes: 7 additions & 7 deletions src/azure-firewall/azext_firewall/_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def validate_application_rule_protocols(namespace):


def validate_ip_groups(cmd, namespace):
from msrestazure.tools import is_valid_resource_id, resource_id
from azure.mgmt.core.tools import is_valid_resource_id, resource_id

def _validate_name_or_id(ip_group, subscription):
# determine if public_ip_address is name or ID
Expand All @@ -46,7 +46,7 @@ def _validate_name_or_id(ip_group, subscription):
def get_public_ip_validator():
""" Retrieves a validator for public IP address. Accepting all defaults will perform a check
for an existing name or ID with no ARM-required -type parameter. """
from msrestazure.tools import is_valid_resource_id, resource_id
from azure.mgmt.core.tools import is_valid_resource_id, resource_id

def simple_validator(cmd, namespace):
if namespace.public_ip_address:
Expand All @@ -72,7 +72,7 @@ def _validate_name_or_id(public_ip):


def get_subnet_validator():
from msrestazure.tools import is_valid_resource_id, resource_id
from azure.mgmt.core.tools import is_valid_resource_id, resource_id

def simple_validator(cmd, namespace):
if namespace.virtual_network_name is None:
Expand All @@ -96,7 +96,7 @@ def simple_validator(cmd, namespace):


def get_management_subnet_validator():
from msrestazure.tools import is_valid_resource_id, resource_id
from azure.mgmt.core.tools import is_valid_resource_id, resource_id
from knack.util import CLIError

def simple_validator(cmd, namespace):
Expand Down Expand Up @@ -130,7 +130,7 @@ def simple_validator(cmd, namespace):
def get_management_public_ip_validator():
""" Retrieves a validator for public IP address. Accepting all defaults will perform a check
for an existing name or ID with no ARM-required -type parameter. """
from msrestazure.tools import is_valid_resource_id, resource_id
from azure.mgmt.core.tools import is_valid_resource_id, resource_id

def simple_validator(cmd, namespace):
if namespace.management_public_ip_address:
Expand All @@ -156,7 +156,7 @@ def _validate_name_or_id(public_ip):


def validate_firewall_policy(cmd, namespace):
from msrestazure.tools import is_valid_resource_id, resource_id
from azure.mgmt.core.tools import is_valid_resource_id, resource_id

if hasattr(namespace, 'base_policy') and namespace.base_policy is not None:
if not is_valid_resource_id(namespace.base_policy):
Expand All @@ -178,7 +178,7 @@ def validate_firewall_policy(cmd, namespace):


def validate_virtual_hub(cmd, namespace):
from msrestazure.tools import is_valid_resource_id, resource_id
from azure.mgmt.core.tools import is_valid_resource_id, resource_id

if hasattr(namespace, 'virtual_hub') and namespace.virtual_hub is not None:

Expand Down
2 changes: 1 addition & 1 deletion src/azure-firewall/azext_firewall/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from azure.cli.core.util import sdk_no_wait
from azure.cli.core.azclierror import UserFault, ServiceError, ValidationError, ArgumentUsageError
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
from ._client_factory import network_client_factory
from .aaz.latest.network.firewall import Create as _AzureFirewallCreate, Update as _AzureFirewallUpdate, \
Show as _AzureFirewallShow
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/azure-firewall/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from codecs import open
from setuptools import setup, find_packages

VERSION = "1.2.0"
VERSION = "1.2.1"

CLASSIFIERS = [
'Development Status :: 4 - Beta',
Expand Down

0 comments on commit 340ec15

Please sign in to comment.