Skip to content

Commit ae89d8e

Browse files
authored
{Zones} Release bugfix to improve command loading (Azure#8766)
1 parent f4f5a49 commit ae89d8e

39 files changed

+89
-74
lines changed

src/zones/HISTORY.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
Release History
44
===============
55

6+
1.0.0b3
7+
++++++
8+
* Minor bugfixes to improve command loading
9+
610
1.0.0b2
711
++++++
812
* Minor bugfixes to improve command loading
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# --------------------------------------------------------------------------------------------
5+
"""Validators for resource types supported by Zones"""

src/zones/azext_zones/resource_type_validators/microsoft_apimanagement.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from knack.log import get_logger
1111

1212

13+
# pylint: disable=too-few-public-methods
1314
@register_resource_type("microsoft.apimanagement")
1415
class microsoft_apimanagement:
1516
@staticmethod
@@ -33,7 +34,6 @@ def validate(resource):
3334
zones = resource.get("zones") or []
3435
if len(zones) > 1 and resource["sku"]["name"] == "Premium":
3536
return ZoneRedundancyValidationResult.Yes
36-
else:
37-
return ZoneRedundancyValidationResult.No
37+
return ZoneRedundancyValidationResult.No
3838

3939
return ZoneRedundancyValidationResult.Unknown

src/zones/azext_zones/resource_type_validators/microsoft_app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from knack.log import get_logger
1111

1212

13+
# pylint: disable=too-few-public-methods
1314
@register_resource_type("microsoft.app")
1415
class microsoft_app:
1516
@staticmethod
@@ -32,7 +33,6 @@ def validate(resource):
3233
# https://learn.microsoft.com/azure/reliability/reliability-azure-container-apps#availability-zone-support
3334
if resource["properties"].get("zoneRedundant", {}) is True:
3435
return ZoneRedundancyValidationResult.Yes
35-
else:
36-
return ZoneRedundancyValidationResult.No
36+
return ZoneRedundancyValidationResult.No
3737

3838
return ZoneRedundancyValidationResult.Unknown

src/zones/azext_zones/resource_type_validators/microsoft_authorization.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from knack.log import get_logger
1111

1212

13+
# pylint: disable=too-few-public-methods
1314
@register_resource_type("microsoft.authorization")
1415
class microsoft_authorization:
1516
@staticmethod

src/zones/azext_zones/resource_type_validators/microsoft_automation.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from knack.log import get_logger
1111

1212

13+
# pylint: disable=too-few-public-methods
1314
@register_resource_type("microsoft.automation")
1415
class microsoft_automation:
1516
@staticmethod

src/zones/azext_zones/resource_type_validators/microsoft_botservice.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from knack.log import get_logger
1111

1212

13+
# pylint: disable=too-few-public-methods
1314
@register_resource_type("microsoft.botservice")
1415
class microsoft_botservice:
1516
@staticmethod
@@ -32,8 +33,8 @@ def validate(resource):
3233
"Your bot service resource in westeurope may be zone redundant, \
3334
but only if it's configured as a regional (not global) bot. Please check manually."
3435
)
35-
else:
36-
# Bot services cannot be ZR in any other region
37-
return ZoneRedundancyValidationResult.No
36+
return ZoneRedundancyValidationResult.Unknown
37+
# Bot services cannot be ZR in any other region
38+
return ZoneRedundancyValidationResult.No
3839

3940
return ZoneRedundancyValidationResult.Unknown

src/zones/azext_zones/resource_type_validators/microsoft_cache.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from knack.log import get_logger
1111

1212

13+
# pylint: disable=too-few-public-methods
1314
@register_resource_type("microsoft.cache")
1415
class microsoft_cache:
1516
@staticmethod
@@ -27,15 +28,13 @@ def validate(resource):
2728
zones = resource.get("zones") or []
2829
if len(zones) > 1:
2930
return ZoneRedundancyValidationResult.Yes
30-
else:
31-
return ZoneRedundancyValidationResult.No
31+
return ZoneRedundancyValidationResult.No
3232

3333
# Redis Enterprise
3434
if resourceSubType == "redisenterprise":
3535
zones = resource.get("zones") or []
3636
if len(zones) > 1:
3737
return ZoneRedundancyValidationResult.Yes
38-
else:
39-
return ZoneRedundancyValidationResult.No
38+
return ZoneRedundancyValidationResult.No
4039

4140
return ZoneRedundancyValidationResult.Unknown

src/zones/azext_zones/resource_type_validators/microsoft_cdn.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from knack.log import get_logger
1111

1212

13+
# pylint: disable=too-few-public-methods
1314
@register_resource_type("microsoft.cdn")
1415
class microsoft_cdn:
1516
@staticmethod

src/zones/azext_zones/resource_type_validators/microsoft_chaos.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from knack.log import get_logger
1111

1212

13+
# pylint: disable=too-few-public-methods
1314
@register_resource_type("microsoft.chaos")
1415
class microsoft_chaos:
1516
@staticmethod

0 commit comments

Comments
 (0)