Skip to content

Commit

Permalink
Feature accessrule servicetag changes (#7769)
Browse files Browse the repository at this point in the history
* 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

* fixed the flatten issue

* added flatten false

* updated hostory and version

* fixed version

* updated the setup release version

* flatten by aaz tool

* update setup.py with release number: 1.0.0b2

---------

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

##### 1.0.0b2
++++++
No new commands added. Flatten false the properties of the command output.


##### 1.0.0b1
++++++
No new commands added.
Expand Down
6 changes: 2 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 @@ -87,7 +87,7 @@ def post_operations(self):
pass

def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False)
return result

class NetworkSecurityPerimetersCreateOrUpdate(AAZHttpOperation):
Expand Down Expand Up @@ -196,9 +196,7 @@ 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(
flags={"client_flatten": True},
)
_schema_on_200_201.properties = AAZObjectType()
_schema_on_200_201.tags = AAZDictType()
_schema_on_200_201.type = AAZStrType(
flags={"read_only": True},
Expand Down
10 changes: 3 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 @@ -80,7 +80,7 @@ def post_operations(self):
pass

def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True)
result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=False)
next_link = self.deserialize_output(self.ctx.vars.instance.next_link)
return result, next_link

Expand Down Expand Up @@ -181,9 +181,7 @@ def _build_schema_on_200(cls):
)
_element.location = AAZStrType()
_element.name = AAZStrType()
_element.properties = AAZObjectType(
flags={"client_flatten": True},
)
_element.properties = AAZObjectType()
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
Expand Down Expand Up @@ -297,9 +295,7 @@ def _build_schema_on_200(cls):
)
_element.location = AAZStrType()
_element.name = AAZStrType()
_element.properties = AAZObjectType(
flags={"client_flatten": True},
)
_element.properties = AAZObjectType()
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
Expand Down
6 changes: 2 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 @@ -69,7 +69,7 @@ def post_operations(self):
pass

def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False)
return result

class NetworkSecurityPerimetersGet(AAZHttpOperation):
Expand Down Expand Up @@ -158,9 +158,7 @@ def _build_schema_on_200(cls):
)
_schema_on_200.location = AAZStrType()
_schema_on_200.name = AAZStrType()
_schema_on_200.properties = AAZObjectType(
flags={"client_flatten": True},
)
_schema_on_200.properties = AAZObjectType()
_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 @@ -132,7 +132,7 @@ def post_operations(self):
pass

def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False)
return result

class NspAssociationsCreateOrUpdate(AAZHttpOperation):
Expand Down Expand Up @@ -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, typ_kwargs={"flags": {"client_flatten": True}})
_builder.set_prop("properties", AAZObjectType)
_builder.set_prop("tags", AAZDictType, ".tags")

properties = _builder.get(".properties")
Expand Down Expand Up @@ -252,9 +252,7 @@ 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(
flags={"client_flatten": True},
)
_schema_on_200_201.properties = AAZObjectType()
_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 @@ -81,7 +81,7 @@ def post_operations(self):
pass

def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True)
result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=False)
next_link = self.deserialize_output(self.ctx.vars.instance.next_link)
return result, next_link

Expand Down Expand Up @@ -186,9 +186,7 @@ def _build_schema_on_200(cls):
)
_element.location = AAZStrType()
_element.name = AAZStrType()
_element.properties = AAZObjectType(
flags={"client_flatten": True},
)
_element.properties = AAZObjectType()
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def post_operations(self):
pass

def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False)
return result

class NspAssociationsGet(AAZHttpOperation):
Expand Down Expand Up @@ -168,9 +168,7 @@ def _build_schema_on_200(cls):
)
_schema_on_200.location = AAZStrType()
_schema_on_200.name = AAZStrType()
_schema_on_200.properties = AAZObjectType(
flags={"client_flatten": True},
)
_schema_on_200.properties = AAZObjectType()
_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 @@ -159,7 +159,7 @@ def post_instance_update(self, instance):
pass

def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False)
return result

class NspAssociationsGet(AAZHttpOperation):
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, typ_kwargs={"flags": {"client_flatten": True}})
_builder.set_prop("properties", AAZObjectType)
_builder.set_prop("tags", AAZDictType, ".tags")

properties = _builder.get(".properties")
Expand Down Expand Up @@ -415,9 +415,7 @@ def _build_schema_nsp_association_read(cls, _schema):
)
nsp_association_read.location = AAZStrType()
nsp_association_read.name = AAZStrType()
nsp_association_read.properties = AAZObjectType(
flags={"client_flatten": True},
)
nsp_association_read.properties = AAZObjectType()
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 @@ -164,9 +164,7 @@ def _build_schema_on_200(cls):
)
_schema_on_200.location = AAZStrType()
_schema_on_200.name = AAZStrType()
_schema_on_200.properties = AAZObjectType(
flags={"client_flatten": True},
)
_schema_on_200.properties = AAZObjectType()
_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 @@ -109,7 +109,7 @@ def post_operations(self):
pass

def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False)
return result

class NspLinksCreateOrUpdate(AAZHttpOperation):
Expand Down Expand Up @@ -189,7 +189,7 @@ def content(self):
typ=AAZObjectType,
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
_builder.set_prop("properties", AAZObjectType)

properties = _builder.get(".properties")
if properties is not None:
Expand Down Expand Up @@ -235,9 +235,7 @@ def _build_schema_on_200_201(cls):
_schema_on_200_201.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.properties = AAZObjectType(
flags={"client_flatten": True},
)
_schema_on_200_201.properties = AAZObjectType()
_schema_on_200_201.type = AAZStrType(
flags={"read_only": True},
)
Expand Down
6 changes: 2 additions & 4 deletions src/nsp/azext_nsp/aaz/latest/network/perimeter/link/_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def post_operations(self):
pass

def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True)
result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=False)
next_link = self.deserialize_output(self.ctx.vars.instance.next_link)
return result, next_link

Expand Down Expand Up @@ -190,9 +190,7 @@ def _build_schema_on_200(cls):
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"client_flatten": True},
)
_element.properties = AAZObjectType()
_element.type = AAZStrType(
flags={"read_only": True},
)
Expand Down
6 changes: 2 additions & 4 deletions src/nsp/azext_nsp/aaz/latest/network/perimeter/link/_show.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def post_operations(self):
pass

def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False)
return result

class NspLinksGet(AAZHttpOperation):
Expand Down Expand Up @@ -172,9 +172,7 @@ def _build_schema_on_200(cls):
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType(
flags={"client_flatten": True},
)
_schema_on_200.properties = AAZObjectType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def post_instance_update(self, instance):
pass

def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False)
return result

class NspLinksGet(AAZHttpOperation):
Expand Down Expand Up @@ -328,7 +328,7 @@ def _update_instance(self, instance):
value=instance,
typ=AAZObjectType
)
_builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
_builder.set_prop("properties", AAZObjectType)

properties = _builder.get(".properties")
if properties is not None:
Expand Down Expand Up @@ -382,9 +382,7 @@ def _build_schema_nsp_link_read(cls, _schema):
nsp_link_read.name = AAZStrType(
flags={"read_only": True},
)
nsp_link_read.properties = AAZObjectType(
flags={"client_flatten": True},
)
nsp_link_read.properties = AAZObjectType()
nsp_link_read.type = AAZStrType(
flags={"read_only": True},
)
Expand Down
4 changes: 1 addition & 3 deletions src/nsp/azext_nsp/aaz/latest/network/perimeter/link/_wait.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,7 @@ def _build_schema_on_200(cls):
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType(
flags={"client_flatten": True},
)
_schema_on_200.properties = AAZObjectType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def post_operations(self):
pass

def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True)
result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=False)
next_link = self.deserialize_output(self.ctx.vars.instance.next_link)
return result, next_link

Expand Down Expand Up @@ -190,9 +190,7 @@ def _build_schema_on_200(cls):
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"client_flatten": True},
)
_element.properties = AAZObjectType()
_element.type = AAZStrType(
flags={"read_only": True},
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def post_operations(self):
pass

def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False)
return result

class NspLinkReferencesGet(AAZHttpOperation):
Expand Down Expand Up @@ -172,9 +172,7 @@ def _build_schema_on_200(cls):
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType(
flags={"client_flatten": True},
)
_schema_on_200.properties = AAZObjectType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,7 @@ def _build_schema_on_200(cls):
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType(
flags={"client_flatten": True},
)
_schema_on_200.properties = AAZObjectType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def post_operations(self):
pass

def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True)
result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=False)
next_link = self.deserialize_output(self.ctx.vars.instance.next_link)
return result, next_link

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def post_operations(self):
pass

def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False)
return result

class NspProfilesCreateOrUpdate(AAZHttpOperation):
Expand Down Expand Up @@ -205,9 +205,7 @@ 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(
flags={"client_flatten": True},
)
_schema_on_200_201.properties = AAZObjectType()
_schema_on_200_201.tags = AAZDictType()
_schema_on_200_201.type = AAZStrType(
flags={"read_only": True},
Expand Down
Loading

0 comments on commit a9c64b3

Please sign in to comment.