Skip to content

Commit

Permalink
updated to 2023-08-01-preview swagger changes . perimeter access rule… (
Browse files Browse the repository at this point in the history
#7738)

* updated to 2023-08-01-preview swagger changes . perimeter access rule changes for servicetag based rule.

* removed the updated commands for perimeter and profile and updated history

* removed NSP based rule example

* fixed message

* fixed servicetag example

* update test recordings

* update api version

* fixed failing tests

* added tests for service tag

* updated version , 0.4.0 from 0.3.0 as new apiversion added

* isExperimental to isPreview

* updated release version

* updated version to 1.0.0b1

* text formatting in hostory file

---------

Co-authored-by: Bhupesh Bhatt <[email protected]>
  • Loading branch information
bhupeshbhatt1985 and bhupeshbhattmicrosoft committed Jul 1, 2024
1 parent 59bc2c3 commit f4a98e7
Show file tree
Hide file tree
Showing 41 changed files with 937 additions and 693 deletions.
8 changes: 8 additions & 0 deletions src/nsp/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ Release History
===============
===============

##### 1.0.0b1
++++++
No new commands added.
Commands for new api version 2023-08-01-preview added.

Existing commands updated:
* perimeter profile access-rule: create, show, update (added servicetag based rules).

##### 0.3.0
++++++
No new commands added or updated.
Expand Down
4 changes: 4 additions & 0 deletions src/nsp/azext_nsp/aaz/latest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

10 changes: 6 additions & 4 deletions src/nsp/azext_nsp/aaz/latest/network/perimeter/_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class Create(AAZCommand):
"""

_aaz_info = {
"version": "2023-07-01-preview",
"version": "2023-08-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}", "2023-07-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}", "2023-08-01-preview"],
]
}

Expand Down Expand Up @@ -138,7 +138,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-07-01-preview",
"api-version", "2023-08-01-preview",
required=True,
),
}
Expand Down Expand Up @@ -196,7 +196,9 @@ def _build_schema_on_200_201(cls):
)
_schema_on_200_201.location = AAZStrType()
_schema_on_200_201.name = AAZStrType()
_schema_on_200_201.properties = AAZObjectType()
_schema_on_200_201.properties = AAZObjectType(
flags={"client_flatten": True},
)
_schema_on_200_201.tags = AAZDictType()
_schema_on_200_201.type = AAZStrType(
flags={"read_only": True},
Expand Down
6 changes: 3 additions & 3 deletions src/nsp/azext_nsp/aaz/latest/network/perimeter/_delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ class Delete(AAZCommand):
"""

_aaz_info = {
"version": "2023-07-01-preview",
"version": "2023-08-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}", "2023-07-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}", "2023-08-01-preview"],
]
}

Expand Down Expand Up @@ -119,7 +119,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-07-01-preview",
"api-version", "2023-08-01-preview",
required=True,
),
}
Expand Down
18 changes: 11 additions & 7 deletions src/nsp/azext_nsp/aaz/latest/network/perimeter/_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ class List(AAZCommand):
"""

_aaz_info = {
"version": "2023-07-01-preview",
"version": "2023-08-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/providers/microsoft.network/networksecurityperimeters", "2023-07-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters", "2023-07-01-preview"],
["mgmt-plane", "/subscriptions/{}/providers/microsoft.network/networksecurityperimeters", "2023-08-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters", "2023-08-01-preview"],
]
}

Expand Down Expand Up @@ -134,7 +134,7 @@ def query_parameters(self):
"$top", self.ctx.args.top,
),
**self.serialize_query_param(
"api-version", "2023-07-01-preview",
"api-version", "2023-08-01-preview",
required=True,
),
}
Expand Down Expand Up @@ -181,7 +181,9 @@ def _build_schema_on_200(cls):
)
_element.location = AAZStrType()
_element.name = AAZStrType()
_element.properties = AAZObjectType()
_element.properties = AAZObjectType(
flags={"client_flatten": True},
)
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
Expand Down Expand Up @@ -248,7 +250,7 @@ def query_parameters(self):
"$top", self.ctx.args.top,
),
**self.serialize_query_param(
"api-version", "2023-07-01-preview",
"api-version", "2023-08-01-preview",
required=True,
),
}
Expand Down Expand Up @@ -295,7 +297,9 @@ def _build_schema_on_200(cls):
)
_element.location = AAZStrType()
_element.name = AAZStrType()
_element.properties = AAZObjectType()
_element.properties = AAZObjectType(
flags={"client_flatten": True},
)
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
Expand Down
10 changes: 6 additions & 4 deletions src/nsp/azext_nsp/aaz/latest/network/perimeter/_show.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class Show(AAZCommand):
"""

_aaz_info = {
"version": "2023-07-01-preview",
"version": "2023-08-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}", "2023-07-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}", "2023-08-01-preview"],
]
}

Expand Down Expand Up @@ -120,7 +120,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-07-01-preview",
"api-version", "2023-08-01-preview",
required=True,
),
}
Expand Down Expand Up @@ -158,7 +158,9 @@ def _build_schema_on_200(cls):
)
_schema_on_200.location = AAZStrType()
_schema_on_200.name = AAZStrType()
_schema_on_200.properties = AAZObjectType()
_schema_on_200.properties = AAZObjectType(
flags={"client_flatten": True},
)
_schema_on_200.tags = AAZDictType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class Create(AAZCommand):
"""

_aaz_info = {
"version": "2023-07-01-preview",
"version": "2023-08-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}/resourceassociations/{}", "2023-07-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}/resourceassociations/{}", "2023-08-01-preview"],
]
}

Expand Down Expand Up @@ -187,7 +187,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-07-01-preview",
"api-version", "2023-08-01-preview",
required=True,
),
}
Expand All @@ -214,7 +214,7 @@ def content(self):
)
_builder.set_prop("location", AAZStrType, ".location")
_builder.set_prop("name", AAZStrType, ".association_name")
_builder.set_prop("properties", AAZObjectType)
_builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
_builder.set_prop("tags", AAZDictType, ".tags")

properties = _builder.get(".properties")
Expand Down Expand Up @@ -252,7 +252,9 @@ def _build_schema_on_200_201(cls):
)
_schema_on_200_201.location = AAZStrType()
_schema_on_200_201.name = AAZStrType()
_schema_on_200_201.properties = AAZObjectType()
_schema_on_200_201.properties = AAZObjectType(
flags={"client_flatten": True},
)
_schema_on_200_201.tags = AAZDictType()
_schema_on_200_201.type = AAZStrType(
flags={"read_only": True},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ class Delete(AAZCommand):
"""

_aaz_info = {
"version": "2023-07-01-preview",
"version": "2023-08-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}/resourceassociations/{}", "2023-07-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}/resourceassociations/{}", "2023-08-01-preview"],
]
}

Expand Down Expand Up @@ -153,7 +153,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-07-01-preview",
"api-version", "2023-08-01-preview",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class List(AAZCommand):
"""

_aaz_info = {
"version": "2023-07-01-preview",
"version": "2023-08-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}/resourceassociations", "2023-07-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}/resourceassociations", "2023-08-01-preview"],
]
}

Expand Down Expand Up @@ -139,7 +139,7 @@ def query_parameters(self):
"$top", self.ctx.args.top,
),
**self.serialize_query_param(
"api-version", "2023-07-01-preview",
"api-version", "2023-08-01-preview",
required=True,
),
}
Expand Down Expand Up @@ -186,7 +186,9 @@ def _build_schema_on_200(cls):
)
_element.location = AAZStrType()
_element.name = AAZStrType()
_element.properties = AAZObjectType()
_element.properties = AAZObjectType(
flags={"client_flatten": True},
)
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class Show(AAZCommand):
"""

_aaz_info = {
"version": "2023-07-01-preview",
"version": "2023-08-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}/resourceassociations/{}", "2023-07-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}/resourceassociations/{}", "2023-08-01-preview"],
]
}

Expand Down Expand Up @@ -130,7 +130,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-07-01-preview",
"api-version", "2023-08-01-preview",
required=True,
),
}
Expand Down Expand Up @@ -168,7 +168,9 @@ def _build_schema_on_200(cls):
)
_schema_on_200.location = AAZStrType()
_schema_on_200.name = AAZStrType()
_schema_on_200.properties = AAZObjectType()
_schema_on_200.properties = AAZObjectType(
flags={"client_flatten": True},
)
_schema_on_200.tags = AAZDictType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class Update(AAZCommand):
"""

_aaz_info = {
"version": "2023-07-01-preview",
"version": "2023-08-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}/resourceassociations/{}", "2023-07-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}/resourceassociations/{}", "2023-08-01-preview"],
]
}

Expand Down Expand Up @@ -214,7 +214,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-07-01-preview",
"api-version", "2023-08-01-preview",
required=True,
),
}
Expand Down Expand Up @@ -301,7 +301,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-07-01-preview",
"api-version", "2023-08-01-preview",
required=True,
),
}
Expand Down Expand Up @@ -361,7 +361,7 @@ def _update_instance(self, instance):
)
_builder.set_prop("location", AAZStrType, ".location")
_builder.set_prop("name", AAZStrType, ".association_name")
_builder.set_prop("properties", AAZObjectType)
_builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
_builder.set_prop("tags", AAZDictType, ".tags")

properties = _builder.get(".properties")
Expand Down Expand Up @@ -415,7 +415,9 @@ def _build_schema_nsp_association_read(cls, _schema):
)
nsp_association_read.location = AAZStrType()
nsp_association_read.name = AAZStrType()
nsp_association_read.properties = AAZObjectType()
nsp_association_read.properties = AAZObjectType(
flags={"client_flatten": True},
)
nsp_association_read.tags = AAZDictType()
nsp_association_read.type = AAZStrType(
flags={"read_only": True},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Wait(AAZWaitCommand):

_aaz_info = {
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}/resourceassociations/{}", "2023-07-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}/resourceassociations/{}", "2023-08-01-preview"],
]
}

Expand Down Expand Up @@ -126,7 +126,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-07-01-preview",
"api-version", "2023-08-01-preview",
required=True,
),
}
Expand Down Expand Up @@ -164,7 +164,9 @@ def _build_schema_on_200(cls):
)
_schema_on_200.location = AAZStrType()
_schema_on_200.name = AAZStrType()
_schema_on_200.properties = AAZObjectType()
_schema_on_200.properties = AAZObjectType(
flags={"client_flatten": True},
)
_schema_on_200.tags = AAZDictType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
Expand Down
Loading

0 comments on commit f4a98e7

Please sign in to comment.