From 99ef71c9fbe3141ce0c1ce6ead704b96571f608a Mon Sep 17 00:00:00 2001 From: Fred-sun Date: Fri, 12 Aug 2022 08:21:32 +0800 Subject: [PATCH 1/2] Upgrade azure-mgmt-apimanagement to 3.0.0 --- plugins/modules/azure_rm_apimanagement.py | 1 + plugins/modules/azure_rm_apimanagement_info.py | 1 + plugins/modules/azure_rm_apimanagementservice.py | 1 + plugins/modules/azure_rm_apimanagementservice_info.py | 1 + requirements-azure.txt | 2 +- 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/modules/azure_rm_apimanagement.py b/plugins/modules/azure_rm_apimanagement.py index 221bd44b9..d4efa6af2 100644 --- a/plugins/modules/azure_rm_apimanagement.py +++ b/plugins/modules/azure_rm_apimanagement.py @@ -544,6 +544,7 @@ def exec_module(self, **kwargs): response = None self.mgmt_client = self.get_mgmt_svc_client(GenericRestClient, + is_track2=True, base_url=self._cloud_environment.endpoints.resource_manager) old_response = self.get_resource() diff --git a/plugins/modules/azure_rm_apimanagement_info.py b/plugins/modules/azure_rm_apimanagement_info.py index d223ede2e..14cc1a46d 100644 --- a/plugins/modules/azure_rm_apimanagement_info.py +++ b/plugins/modules/azure_rm_apimanagement_info.py @@ -163,6 +163,7 @@ def exec_module(self, **kwargs): self.body[key] = kwargs[key] self.mgmt_client = self.get_mgmt_svc_client(GenericRestClient, + is_track2=True, base_url=self._cloud_environment.endpoints.resource_manager) if (self.resource_group is not None and diff --git a/plugins/modules/azure_rm_apimanagementservice.py b/plugins/modules/azure_rm_apimanagementservice.py index 0c2860191..25296a7e2 100644 --- a/plugins/modules/azure_rm_apimanagementservice.py +++ b/plugins/modules/azure_rm_apimanagementservice.py @@ -197,6 +197,7 @@ def exec_module(self, **kwargs): response = None self.mgmt_client = self.get_mgmt_svc_client(GenericRestClient, + is_track2=True, base_url=self._cloud_environment.endpoints.resource_manager) resource_group = self.get_resource_group(self.resource_group) diff --git a/plugins/modules/azure_rm_apimanagementservice_info.py b/plugins/modules/azure_rm_apimanagementservice_info.py index 72891fe14..7cf248ff3 100644 --- a/plugins/modules/azure_rm_apimanagementservice_info.py +++ b/plugins/modules/azure_rm_apimanagementservice_info.py @@ -163,6 +163,7 @@ def exec_module(self, **kwargs): setattr(self, key, kwargs[key]) self.mgmt_client = self.get_mgmt_svc_client(GenericRestClient, + is_track2=True, base_url=self._cloud_environment.endpoints.resource_manager) if (self.resource_group is not None and self.name is not None): diff --git a/requirements-azure.txt b/requirements-azure.txt index 61d314d64..b67900148 100644 --- a/requirements-azure.txt +++ b/requirements-azure.txt @@ -4,7 +4,7 @@ xmltodict azure-cli-core==2.34.0 azure-common==1.1.11 azure-identity==1.7.0 -azure-mgmt-apimanagement==0.2.0 +azure-mgmt-apimanagement==3.0.0 azure-mgmt-authorization==0.51.1 azure-mgmt-batch==5.0.1 azure-mgmt-cdn==3.0.0 From f1638107b66da979765aa4154b477241a6e8691f Mon Sep 17 00:00:00 2001 From: Fred-sun Date: Mon, 15 Aug 2022 11:00:20 +0800 Subject: [PATCH 2/2] restore change --- plugins/modules/azure_rm_apimanagement.py | 1 - plugins/modules/azure_rm_apimanagement_info.py | 1 - plugins/modules/azure_rm_apimanagementservice.py | 1 - plugins/modules/azure_rm_apimanagementservice_info.py | 1 - 4 files changed, 4 deletions(-) diff --git a/plugins/modules/azure_rm_apimanagement.py b/plugins/modules/azure_rm_apimanagement.py index d4efa6af2..221bd44b9 100644 --- a/plugins/modules/azure_rm_apimanagement.py +++ b/plugins/modules/azure_rm_apimanagement.py @@ -544,7 +544,6 @@ def exec_module(self, **kwargs): response = None self.mgmt_client = self.get_mgmt_svc_client(GenericRestClient, - is_track2=True, base_url=self._cloud_environment.endpoints.resource_manager) old_response = self.get_resource() diff --git a/plugins/modules/azure_rm_apimanagement_info.py b/plugins/modules/azure_rm_apimanagement_info.py index 14cc1a46d..d223ede2e 100644 --- a/plugins/modules/azure_rm_apimanagement_info.py +++ b/plugins/modules/azure_rm_apimanagement_info.py @@ -163,7 +163,6 @@ def exec_module(self, **kwargs): self.body[key] = kwargs[key] self.mgmt_client = self.get_mgmt_svc_client(GenericRestClient, - is_track2=True, base_url=self._cloud_environment.endpoints.resource_manager) if (self.resource_group is not None and diff --git a/plugins/modules/azure_rm_apimanagementservice.py b/plugins/modules/azure_rm_apimanagementservice.py index 25296a7e2..0c2860191 100644 --- a/plugins/modules/azure_rm_apimanagementservice.py +++ b/plugins/modules/azure_rm_apimanagementservice.py @@ -197,7 +197,6 @@ def exec_module(self, **kwargs): response = None self.mgmt_client = self.get_mgmt_svc_client(GenericRestClient, - is_track2=True, base_url=self._cloud_environment.endpoints.resource_manager) resource_group = self.get_resource_group(self.resource_group) diff --git a/plugins/modules/azure_rm_apimanagementservice_info.py b/plugins/modules/azure_rm_apimanagementservice_info.py index 7cf248ff3..72891fe14 100644 --- a/plugins/modules/azure_rm_apimanagementservice_info.py +++ b/plugins/modules/azure_rm_apimanagementservice_info.py @@ -163,7 +163,6 @@ def exec_module(self, **kwargs): setattr(self, key, kwargs[key]) self.mgmt_client = self.get_mgmt_svc_client(GenericRestClient, - is_track2=True, base_url=self._cloud_environment.endpoints.resource_manager) if (self.resource_group is not None and self.name is not None):