diff --git a/azure-mgmt-managementgroups/HISTORY.rst b/azure-mgmt-managementgroups/HISTORY.rst index 9f05fb2833bd..b1e57afff914 100644 --- a/azure-mgmt-managementgroups/HISTORY.rst +++ b/azure-mgmt-managementgroups/HISTORY.rst @@ -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) ++++++++++++++++++ diff --git a/azure-mgmt-managementgroups/MANIFEST.in b/azure-mgmt-managementgroups/MANIFEST.in index bb37a2723dae..6ceb27f7a96e 100644 --- a/azure-mgmt-managementgroups/MANIFEST.in +++ b/azure-mgmt-managementgroups/MANIFEST.in @@ -1 +1,4 @@ include *.rst +include azure/__init__.py +include azure/mgmt/__init__.py + diff --git a/azure-mgmt-managementgroups/README.rst b/azure-mgmt-managementgroups/README.rst index 706430e52cfc..62366ad2b4dd 100644 --- a/azure-mgmt-managementgroups/README.rst +++ b/azure-mgmt-managementgroups/README.rst @@ -14,25 +14,6 @@ For the older Azure Service Management (ASM) libraries, see For a more complete set of Azure libraries, see the `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 ===== diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/management_groups_api.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/management_groups_api.py index 46f344c5e711..decd5ff43306 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/management_groups_api.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/management_groups_api.py @@ -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()) @@ -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) @@ -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: @@ -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) @@ -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: @@ -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) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_info.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_info.py index 5444b8975f55..20e8451492b7 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_info.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_info.py @@ -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] @@ -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]'}, } @@ -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) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_info_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_info_py3.py index 8949d968d284..f639fff8f613 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_info_py3.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_info_py3.py @@ -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] @@ -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 @@ -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 diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/entities_operations.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/entities_operations.py index 2b2f7fb8ebd6..7b0f2e6e5b6a 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/entities_operations.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/entities_operations.py @@ -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. @@ -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: @@ -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) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/management_group_subscriptions_operations.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/management_group_subscriptions_operations.py index 1e78f9d5157f..408bfd37de34 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/management_group_subscriptions_operations.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/management_group_subscriptions_operations.py @@ -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: @@ -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) @@ -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: @@ -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) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/management_groups_operations.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/management_groups_operations.py index e9e08d746243..bfffc6c47fe9 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/management_groups_operations.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/management_groups_operations.py @@ -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: @@ -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) @@ -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: @@ -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) @@ -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()) @@ -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) @@ -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()) @@ -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) @@ -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: @@ -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) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/operations.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/operations.py index ac619d5b0b6b..9e7f9a68a123 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/operations.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/operations.py @@ -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: @@ -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) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/version.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/version.py index e0ec669828cb..c995f7836cef 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/version.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/version.py @@ -9,5 +9,4 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.1.0" - +VERSION = "0.2.0"