Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR] managementgroups/resource-manager #2934

Merged
merged 7 commits into from
Mar 7, 2019
Merged
8 changes: 8 additions & 0 deletions azure-mgmt-managementgroups/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
Release History
===============

0.2.0 (2019-02-21)
++++++++++++++++++

**Features**

- Model EntityInfo has a new parameter number_of_children
- Model EntityInfo has a new parameter number_of_child_groups

0.1.0 (2018-05-31)
++++++++++++++++++

Expand Down
3 changes: 3 additions & 0 deletions azure-mgmt-managementgroups/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py

19 changes: 0 additions & 19 deletions azure-mgmt-managementgroups/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,6 @@ For the older Azure Service Management (ASM) libraries, see
For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.


Compatibility
=============

**IMPORTANT**: If you have an earlier version of the azure package
(version < 1.0), you should uninstall it before installing this package.

You can check the version using pip:

.. code:: shell

pip freeze

If you see azure==0.11.0 (or any version below 1.0), uninstall it first:

.. code:: shell

pip uninstall azure


Usage
=====

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ def check_name_availability(

# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
Expand All @@ -133,9 +134,8 @@ def check_name_availability(
body_content = self._serialize.body(check_name_availability_request, 'CheckNameAvailabilityRequest')

# Construct and send request
request = self._client.post(url, query_parameters)
response = self._client.send(
request, header_parameters, body_content, stream=False, **operation_config)
request = self._client.post(url, query_parameters, header_parameters, body_content)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
raise models.ErrorResponseException(self._deserialize, response)
Expand Down Expand Up @@ -176,7 +176,7 @@ def start_tenant_backfill(

# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
Expand All @@ -185,8 +185,8 @@ def start_tenant_backfill(
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct and send request
request = self._client.post(url, query_parameters)
response = self._client.send(request, header_parameters, stream=False, **operation_config)
request = self._client.post(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
raise models.ErrorResponseException(self._deserialize, response)
Expand Down Expand Up @@ -227,7 +227,7 @@ def tenant_backfill_status(

# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
Expand All @@ -236,8 +236,8 @@ def tenant_backfill_status(
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct and send request
request = self._client.post(url, query_parameters)
response = self._client.send(request, header_parameters, stream=False, **operation_config)
request = self._client.post(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
raise models.ErrorResponseException(self._deserialize, response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ class EntityInfo(Model):
~azure.mgmt.managementgroups.models.enum
:param number_of_descendants: Number of Descendants.
:type number_of_descendants: int
:param number_of_children: Number of Children. Number of children is the
number of Groups and Subscriptions that are exactly one level underneath
the current Group.
:type number_of_children: int
:param number_of_child_groups: Number of Child Groups. Number of child
groups is the number of Groups that are exactly one level underneath the
current Group.
:type number_of_child_groups: int
:param parent_display_name_chain: The parent display name chain from the
root group to the immediate parent
:type parent_display_name_chain: list[str]
Expand All @@ -67,6 +75,8 @@ class EntityInfo(Model):
'permissions': {'key': 'properties.permissions', 'type': 'str'},
'inherited_permissions': {'key': 'properties.inheritedPermissions', 'type': 'str'},
'number_of_descendants': {'key': 'properties.numberOfDescendants', 'type': 'int'},
'number_of_children': {'key': 'properties.numberOfChildren', 'type': 'int'},
'number_of_child_groups': {'key': 'properties.numberOfChildGroups', 'type': 'int'},
'parent_display_name_chain': {'key': 'properties.parentDisplayNameChain', 'type': '[str]'},
'parent_name_chain': {'key': 'properties.parentNameChain', 'type': '[str]'},
}
Expand All @@ -82,5 +92,7 @@ def __init__(self, **kwargs):
self.permissions = kwargs.get('permissions', None)
self.inherited_permissions = kwargs.get('inherited_permissions', None)
self.number_of_descendants = kwargs.get('number_of_descendants', None)
self.number_of_children = kwargs.get('number_of_children', None)
self.number_of_child_groups = kwargs.get('number_of_child_groups', None)
self.parent_display_name_chain = kwargs.get('parent_display_name_chain', None)
self.parent_name_chain = kwargs.get('parent_name_chain', None)
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ class EntityInfo(Model):
~azure.mgmt.managementgroups.models.enum
:param number_of_descendants: Number of Descendants.
:type number_of_descendants: int
:param number_of_children: Number of Children. Number of children is the
number of Groups and Subscriptions that are exactly one level underneath
the current Group.
:type number_of_children: int
:param number_of_child_groups: Number of Child Groups. Number of child
groups is the number of Groups that are exactly one level underneath the
current Group.
:type number_of_child_groups: int
:param parent_display_name_chain: The parent display name chain from the
root group to the immediate parent
:type parent_display_name_chain: list[str]
Expand All @@ -67,11 +75,13 @@ class EntityInfo(Model):
'permissions': {'key': 'properties.permissions', 'type': 'str'},
'inherited_permissions': {'key': 'properties.inheritedPermissions', 'type': 'str'},
'number_of_descendants': {'key': 'properties.numberOfDescendants', 'type': 'int'},
'number_of_children': {'key': 'properties.numberOfChildren', 'type': 'int'},
'number_of_child_groups': {'key': 'properties.numberOfChildGroups', 'type': 'int'},
'parent_display_name_chain': {'key': 'properties.parentDisplayNameChain', 'type': '[str]'},
'parent_name_chain': {'key': 'properties.parentNameChain', 'type': '[str]'},
}

def __init__(self, *, tenant_id: str=None, display_name: str=None, parent=None, permissions=None, inherited_permissions=None, number_of_descendants: int=None, parent_display_name_chain=None, parent_name_chain=None, **kwargs) -> None:
def __init__(self, *, tenant_id: str=None, display_name: str=None, parent=None, permissions=None, inherited_permissions=None, number_of_descendants: int=None, number_of_children: int=None, number_of_child_groups: int=None, parent_display_name_chain=None, parent_name_chain=None, **kwargs) -> None:
super(EntityInfo, self).__init__(**kwargs)
self.id = None
self.type = None
Expand All @@ -82,5 +92,7 @@ def __init__(self, *, tenant_id: str=None, display_name: str=None, parent=None,
self.permissions = permissions
self.inherited_permissions = inherited_permissions
self.number_of_descendants = number_of_descendants
self.number_of_children = number_of_children
self.number_of_child_groups = number_of_child_groups
self.parent_display_name_chain = parent_display_name_chain
self.parent_name_chain = parent_name_chain
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,13 @@ def list(
$search=ParentAndFirstLevelChildren the API will return the parent and
first level of children that the user has either direct access to or
indirect access via one of their descendants. Possible values include:
'AllowedParents', 'AllowedChildren', 'ParentAndFirstLevelChildren'
'AllowedParents', 'AllowedChildren', 'ParentAndFirstLevelChildren',
'ParentOnly', 'ChildrenOnly'
:type search: str
:param filter: The filter parameter allows you to filter on the the
name or display name fields. You can check for equality on the name
field (e.g. name eq '{entityName}') and you can check for substrings
on either the name or display name fields(e.g. contains(name,
:param filter: The filter parameter allows you to filter on the name
or display name fields. You can check for equality on the name field
(e.g. name eq '{entityName}') and you can check for substrings on
either the name or display name fields(e.g. contains(name,
'{substringToSearch}'), contains(displayName, '{substringToSearch')).
Note that the '{entityName}' and '{substringToSearch}' fields are
checked case insensitively.
Expand Down Expand Up @@ -133,7 +134,7 @@ def internal_paging(next_link=None, raw=False):

# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
Expand All @@ -144,9 +145,8 @@ def internal_paging(next_link=None, raw=False):
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct and send request
request = self._client.post(url, query_parameters)
response = self._client.send(
request, header_parameters, stream=False, **operation_config)
request = self._client.post(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
raise models.ErrorResponseException(self._deserialize, response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ def create(

# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
Expand All @@ -82,8 +81,8 @@ def create(
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct and send request
request = self._client.put(url, query_parameters)
response = self._client.send(request, header_parameters, stream=False, **operation_config)
request = self._client.put(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [204]:
raise models.ErrorResponseException(self._deserialize, response)
Expand Down Expand Up @@ -128,7 +127,6 @@ def delete(

# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
Expand All @@ -139,8 +137,8 @@ def delete(
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct and send request
request = self._client.delete(url, query_parameters)
response = self._client.send(request, header_parameters, stream=False, **operation_config)
request = self._client.delete(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [204]:
raise models.ErrorResponseException(self._deserialize, response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def internal_paging(next_link=None, raw=False):

# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
Expand All @@ -91,9 +91,8 @@ def internal_paging(next_link=None, raw=False):
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct and send request
request = self._client.get(url, query_parameters)
response = self._client.send(
request, header_parameters, stream=False, **operation_config)
request = self._client.get(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
raise models.ErrorResponseException(self._deserialize, response)
Expand Down Expand Up @@ -162,7 +161,7 @@ def get(

# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
Expand All @@ -173,8 +172,8 @@ def get(
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct and send request
request = self._client.get(url, query_parameters)
response = self._client.send(request, header_parameters, stream=False, **operation_config)
request = self._client.get(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
raise models.ErrorResponseException(self._deserialize, response)
Expand Down Expand Up @@ -207,6 +206,7 @@ def _create_or_update_initial(

# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
Expand All @@ -221,9 +221,8 @@ def _create_or_update_initial(
body_content = self._serialize.body(create_management_group_request, 'CreateManagementGroupRequest')

# Construct and send request
request = self._client.put(url, query_parameters)
response = self._client.send(
request, header_parameters, body_content, stream=False, **operation_config)
request = self._client.put(url, query_parameters, header_parameters, body_content)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200, 202]:
raise models.ErrorResponseException(self._deserialize, response)
Expand Down Expand Up @@ -331,6 +330,7 @@ def update(

# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
Expand All @@ -345,9 +345,8 @@ def update(
body_content = self._serialize.body(patch_group_request, 'PatchManagementGroupRequest')

# Construct and send request
request = self._client.patch(url, query_parameters)
response = self._client.send(
request, header_parameters, body_content, stream=False, **operation_config)
request = self._client.patch(url, query_parameters, header_parameters, body_content)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
raise models.ErrorResponseException(self._deserialize, response)
Expand Down Expand Up @@ -380,7 +379,7 @@ def _delete_initial(

# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
Expand All @@ -391,8 +390,8 @@ def _delete_initial(
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct and send request
request = self._client.delete(url, query_parameters)
response = self._client.send(request, header_parameters, stream=False, **operation_config)
request = self._client.delete(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [202, 204]:
raise models.ErrorResponseException(self._deserialize, response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def internal_paging(next_link=None, raw=False):

# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
Expand All @@ -76,9 +76,8 @@ def internal_paging(next_link=None, raw=False):
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct and send request
request = self._client.get(url, query_parameters)
response = self._client.send(
request, header_parameters, stream=False, **operation_config)
request = self._client.get(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
raise models.ErrorResponseException(self._deserialize, response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@
# regenerated.
# --------------------------------------------------------------------------

VERSION = "0.1.0"

VERSION = "0.2.0"