Skip to content

Commit 4f8ec32

Browse files
authored
{Network} az network application-gateway waf-policy: Remove local validation of rule set versions (#31935)
1 parent ad0bacc commit 4f8ec32

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

src/azure-cli/azure/cli/command_modules/network/_params.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
from azure.cli.command_modules.network._actions import (
3636
TrustedClientCertificateCreate,
3737
SslProfilesCreate, AddMappingRequest, WAFRulesCreate)
38-
from azure.cli.command_modules.network.custom import RULESET_VERSION
3938

4039

4140
# pylint: disable=too-many-locals, too-many-branches, too-many-statements
@@ -230,7 +229,6 @@ def load_arguments(self, _):
230229
help='The type of the web application firewall rule set.')
231230
c.argument('rule_set_version',
232231
options_list='--version',
233-
arg_type=get_enum_type(RULESET_VERSION.values()),
234232
help='The version of the web application firewall rule set type. '
235233
'0.1, 1.0, and 1.1 are used for Microsoft_BotManagerRuleSet.')
236234

src/azure-cli/azure/cli/command_modules/network/custom.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@
139139
RecordSetCAADelete as DNSRecordSetCAADelete, RecordSetCNAMEDelete as DNSRecordSetCNAMEDelete)
140140

141141
logger = get_logger(__name__)
142-
RULESET_VERSION = {"0.1": "0.1", "1.0": "1.0", "1.1": "1.1", "2.1": "2.1", "2.2.9": "2.2.9", "3.0": "3.0", "3.1": "3.1", "3.2": "3.2"}
143142

144143
remove_basic_option_msg = "It's recommended to create with `%s`. " \
145144
"Please be aware that Basic option will be removed in the future."
@@ -1948,8 +1947,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
19481947
options=["--version"],
19491948
help="Version of the web application firewall rule set type. "
19501949
"0.1, 1.0, and 1.1 are used for Microsoft_BotManagerRuleSet",
1951-
default="2.1",
1952-
enum=RULESET_VERSION
1950+
default="2.1"
19531951
)
19541952
return args_schema
19551953

0 commit comments

Comments
 (0)