From 489eddfd29c2e7e2a3a1f4de4e396a3e1120e552 Mon Sep 17 00:00:00 2001 From: Qiaoqiao Zhang <55688292+qiaozha@users.noreply.github.com> Date: Mon, 15 Jun 2020 10:17:21 +0800 Subject: [PATCH] release for mgmt security (#12006) Co-authored-by: Azure SDK Bot --- sdk/security/azure-mgmt-security/CHANGELOG.md | 6 ++++ sdk/security/azure-mgmt-security/README.md | 30 +++++++------------ .../_advanced_threat_protection_operations.py | 4 +-- .../operations/_assessments_operations.py | 8 ++--- .../_compliance_results_operations.py | 4 +-- .../operations/_compliances_operations.py | 4 +-- .../_device_security_groups_operations.py | 8 ++--- ...ormation_protection_policies_operations.py | 6 ++-- .../operations/_sub_assessments_operations.py | 6 ++-- .../azure/mgmt/security/version.py | 2 +- sdk/security/azure-mgmt-security/setup.py | 5 +++- 11 files changed, 42 insertions(+), 41 deletions(-) diff --git a/sdk/security/azure-mgmt-security/CHANGELOG.md b/sdk/security/azure-mgmt-security/CHANGELOG.md index e1ba1f50288f..4270790ae3dd 100644 --- a/sdk/security/azure-mgmt-security/CHANGELOG.md +++ b/sdk/security/azure-mgmt-security/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 0.4.1 (2020-06-12) + +**Bugfixes** + + - skip url-encoding for resource id + ## 0.4.0 (2020-06-05) **Features** diff --git a/sdk/security/azure-mgmt-security/README.md b/sdk/security/azure-mgmt-security/README.md index c1b36eada037..1b25cd26adb6 100644 --- a/sdk/security/azure-mgmt-security/README.md +++ b/sdk/security/azure-mgmt-security/README.md @@ -1,29 +1,21 @@ -## Microsoft Azure SDK for Python +# Microsoft Azure SDK for Python This is the Microsoft Azure Security Center Management Client Library. +This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8. +For a more complete view of Azure libraries, see the [Github repo](https://github.com/Azure/azure-sdk-for-python/) -Azure Resource Manager (ARM) is the next generation of management APIs -that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. +# Usage -For the older Azure Service Management (ASM) libraries, see -[azure-servicemanagement-legacy](https://pypi.python.org/pypi/azure-servicemanagement-legacy) -library. +For code examples, see [Security Center Management](https://docs.microsoft.com/python/api/overview/azure/) +on docs.microsoft.com. -For a more complete set of Azure libraries, see the -[azure](https://pypi.python.org/pypi/azure) bundle package. -## Usage +# Provide Feedback -For code examples, see [Security Center -Management](https://docs.microsoft.com/python/api/overview/azure/) on -docs.microsoft.com. - -## Provide Feedback - -If you encounter any bugs or have suggestions, please file an issue in -the [Issues](https://github.com/Azure/azure-sdk-for-python/issues) +If you encounter any bugs or have suggestions, please file an issue in the +[Issues](https://github.com/Azure/azure-sdk-for-python/issues) section of the project. -![image](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-security%2FREADME.png) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-security%2FREADME.png) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_advanced_threat_protection_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_advanced_threat_protection_operations.py index 5ae6a5c943e3..a4366b3c3937 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_advanced_threat_protection_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_advanced_threat_protection_operations.py @@ -62,7 +62,7 @@ def get( # Construct URL url = self.get.metadata['url'] path_format_arguments = { - 'resourceId': self._serialize.url("resource_id", resource_id, 'str'), + 'resourceId': self._serialize.url("resource_id", resource_id, 'str', skip_quote=True), 'settingName': self._serialize.url("self.setting_name", self.setting_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -127,7 +127,7 @@ def create( # Construct URL url = self.create.metadata['url'] path_format_arguments = { - 'resourceId': self._serialize.url("resource_id", resource_id, 'str'), + 'resourceId': self._serialize.url("resource_id", resource_id, 'str', skip_quote=True), 'settingName': self._serialize.url("self.setting_name", self.setting_name, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_assessments_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_assessments_operations.py index d20700d79433..2c4c32bdf45e 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_assessments_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_assessments_operations.py @@ -62,7 +62,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] path_format_arguments = { - 'scope': self._serialize.url("scope", scope, 'str') + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) @@ -134,7 +134,7 @@ def get( # Construct URL url = self.get.metadata['url'] path_format_arguments = { - 'resourceId': self._serialize.url("resource_id", resource_id, 'str'), + 'resourceId': self._serialize.url("resource_id", resource_id, 'str', skip_quote=True), 'assessmentName': self._serialize.url("assessment_name", assessment_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -202,7 +202,7 @@ def create_or_update( # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { - 'resourceId': self._serialize.url("resource_id", resource_id, 'str'), + 'resourceId': self._serialize.url("resource_id", resource_id, 'str', skip_quote=True), 'assessmentName': self._serialize.url("assessment_name", assessment_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -270,7 +270,7 @@ def delete( # Construct URL url = self.delete.metadata['url'] path_format_arguments = { - 'resourceId': self._serialize.url("resource_id", resource_id, 'str'), + 'resourceId': self._serialize.url("resource_id", resource_id, 'str', skip_quote=True), 'assessmentName': self._serialize.url("assessment_name", assessment_name, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_compliance_results_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_compliance_results_operations.py index 9b163bbbb1e0..2a089957edc4 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_compliance_results_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_compliance_results_operations.py @@ -62,7 +62,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] path_format_arguments = { - 'scope': self._serialize.url("scope", scope, 'str') + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) @@ -131,7 +131,7 @@ def get( # Construct URL url = self.get.metadata['url'] path_format_arguments = { - 'resourceId': self._serialize.url("resource_id", resource_id, 'str'), + 'resourceId': self._serialize.url("resource_id", resource_id, 'str', skip_quote=True), 'complianceResultName': self._serialize.url("compliance_result_name", compliance_result_name, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_compliances_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_compliances_operations.py index 90e921623526..25203c530ccb 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_compliances_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_compliances_operations.py @@ -62,7 +62,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] path_format_arguments = { - 'scope': self._serialize.url("scope", scope, 'str') + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) @@ -132,7 +132,7 @@ def get( # Construct URL url = self.get.metadata['url'] path_format_arguments = { - 'scope': self._serialize.url("scope", scope, 'str'), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), 'complianceName': self._serialize.url("compliance_name", compliance_name, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_device_security_groups_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_device_security_groups_operations.py index 581733e3c324..ebf2cb0cc5f5 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_device_security_groups_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_device_security_groups_operations.py @@ -61,7 +61,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] path_format_arguments = { - 'resourceId': self._serialize.url("resource_id", resource_id, 'str') + 'resourceId': self._serialize.url("resource_id", resource_id, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) @@ -132,7 +132,7 @@ def get( # Construct URL url = self.get.metadata['url'] path_format_arguments = { - 'resourceId': self._serialize.url("resource_id", resource_id, 'str'), + 'resourceId': self._serialize.url("resource_id", resource_id, 'str', skip_quote=True), 'deviceSecurityGroupName': self._serialize.url("device_security_group_name", device_security_group_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -198,7 +198,7 @@ def create_or_update( # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { - 'resourceId': self._serialize.url("resource_id", resource_id, 'str'), + 'resourceId': self._serialize.url("resource_id", resource_id, 'str', skip_quote=True), 'deviceSecurityGroupName': self._serialize.url("device_security_group_name", device_security_group_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -265,7 +265,7 @@ def delete( # Construct URL url = self.delete.metadata['url'] path_format_arguments = { - 'resourceId': self._serialize.url("resource_id", resource_id, 'str'), + 'resourceId': self._serialize.url("resource_id", resource_id, 'str', skip_quote=True), 'deviceSecurityGroupName': self._serialize.url("device_security_group_name", device_security_group_name, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_information_protection_policies_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_information_protection_policies_operations.py index 76f6181dd554..8510ac561b07 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_information_protection_policies_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_information_protection_policies_operations.py @@ -63,7 +63,7 @@ def get( # Construct URL url = self.get.metadata['url'] path_format_arguments = { - 'scope': self._serialize.url("scope", scope, 'str'), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), 'informationProtectionPolicyName': self._serialize.url("information_protection_policy_name", information_protection_policy_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -133,7 +133,7 @@ def create_or_update( # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { - 'scope': self._serialize.url("scope", scope, 'str'), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), 'informationProtectionPolicyName': self._serialize.url("information_protection_policy_name", information_protection_policy_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -201,7 +201,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] path_format_arguments = { - 'scope': self._serialize.url("scope", scope, 'str') + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_sub_assessments_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_sub_assessments_operations.py index c73ee21df970..e542ea7e22f3 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_sub_assessments_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_sub_assessments_operations.py @@ -63,7 +63,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_all.metadata['url'] path_format_arguments = { - 'scope': self._serialize.url("scope", scope, 'str') + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) @@ -137,7 +137,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] path_format_arguments = { - 'scope': self._serialize.url("scope", scope, 'str'), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), 'assessmentName': self._serialize.url("assessment_name", assessment_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -212,7 +212,7 @@ def get( # Construct URL url = self.get.metadata['url'] path_format_arguments = { - 'scope': self._serialize.url("scope", scope, 'str'), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), 'assessmentName': self._serialize.url("assessment_name", assessment_name, 'str'), 'subAssessmentName': self._serialize.url("sub_assessment_name", sub_assessment_name, 'str') } diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/version.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/version.py index 85da2c00c1a6..e9983c0d8c01 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/version.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.4.0" +VERSION = "0.4.1" diff --git a/sdk/security/azure-mgmt-security/setup.py b/sdk/security/azure-mgmt-security/setup.py index 92d40c6d820d..2a22fe282f2e 100644 --- a/sdk/security/azure-mgmt-security/setup.py +++ b/sdk/security/azure-mgmt-security/setup.py @@ -36,7 +36,9 @@ pass # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: +with open(os.path.join(package_folder_path, 'version.py') + if os.path.exists(os.path.join(package_folder_path, 'version.py')) + else os.path.join(package_folder_path, '_version.py'), 'r') as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) @@ -67,6 +69,7 @@ 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'License :: OSI Approved :: MIT License', ], zip_safe=False,