mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
reappied changes in a new pr (#41228)
This commit is contained in:
parent
063d19048d
commit
5b0bb91c72
12 changed files with 38 additions and 35 deletions
|
@ -95,9 +95,9 @@ import time
|
|||
from ansible.module_utils.azure_rm_common import AzureRMModuleBase
|
||||
|
||||
try:
|
||||
from msrestazure.azure_exceptions import CloudError
|
||||
from msrestazure.azure_operation import AzureOperationPoller
|
||||
from azure.mgmt.rdbms.mysql import MySQLManagementClient
|
||||
from msrestazure.azure_exceptions import CloudError
|
||||
from msrest.polling import LROPoller
|
||||
from msrest.serialization import Model
|
||||
except ImportError:
|
||||
# This is handled in azure_rm_common
|
||||
|
@ -247,7 +247,7 @@ class AzureRMDatabases(AzureRMModuleBase):
|
|||
server_name=self.server_name,
|
||||
database_name=self.name,
|
||||
parameters=self.parameters)
|
||||
if isinstance(response, AzureOperationPoller):
|
||||
if isinstance(response, LROPoller):
|
||||
response = self.get_poller_result(response)
|
||||
|
||||
except CloudError as exc:
|
||||
|
|
|
@ -135,9 +135,9 @@ import time
|
|||
from ansible.module_utils.azure_rm_common import AzureRMModuleBase
|
||||
|
||||
try:
|
||||
from msrestazure.azure_exceptions import CloudError
|
||||
from msrestazure.azure_operation import AzureOperationPoller
|
||||
from azure.mgmt.rdbms.mysql import MySQLManagementClient
|
||||
from msrestazure.azure_exceptions import CloudError
|
||||
from msrest.polling import LROPoller
|
||||
from msrest.serialization import Model
|
||||
except ImportError:
|
||||
# This is handled in azure_rm_common
|
||||
|
@ -314,10 +314,15 @@ class AzureRMServers(AzureRMModuleBase):
|
|||
self.log("Creating / Updating the MySQL Server instance {0}".format(self.name))
|
||||
|
||||
try:
|
||||
response = self.mgmt_client.servers.create_or_update(resource_group_name=self.resource_group,
|
||||
server_name=self.name,
|
||||
parameters=self.parameters)
|
||||
if isinstance(response, AzureOperationPoller):
|
||||
if (self.to_do == Actions.Create):
|
||||
response = self.mgmt_client.servers.create(resource_group_name=self.resource_group,
|
||||
server_name=self.name,
|
||||
parameters=self.parameters)
|
||||
else:
|
||||
response = self.mgmt_client.servers.update(resource_group_name=self.resource_group,
|
||||
server_name=self.name,
|
||||
parameters=self.parameters)
|
||||
if isinstance(response, LROPoller):
|
||||
response = self.get_poller_result(response)
|
||||
|
||||
except CloudError as exc:
|
||||
|
|
|
@ -95,9 +95,9 @@ import time
|
|||
from ansible.module_utils.azure_rm_common import AzureRMModuleBase
|
||||
|
||||
try:
|
||||
from msrestazure.azure_exceptions import CloudError
|
||||
from msrestazure.azure_operation import AzureOperationPoller
|
||||
from azure.mgmt.rdbms.postgresql import PostgreSQLManagementClient
|
||||
from msrestazure.azure_exceptions import CloudError
|
||||
from msrest.polling import LROPoller
|
||||
from msrest.serialization import Model
|
||||
except ImportError:
|
||||
# This is handled in azure_rm_common
|
||||
|
@ -247,7 +247,7 @@ class AzureRMDatabases(AzureRMModuleBase):
|
|||
server_name=self.server_name,
|
||||
database_name=self.name,
|
||||
parameters=self.parameters)
|
||||
if isinstance(response, AzureOperationPoller):
|
||||
if isinstance(response, LROPoller):
|
||||
response = self.get_poller_result(response)
|
||||
|
||||
except CloudError as exc:
|
||||
|
|
|
@ -135,9 +135,9 @@ import time
|
|||
from ansible.module_utils.azure_rm_common import AzureRMModuleBase
|
||||
|
||||
try:
|
||||
from msrestazure.azure_exceptions import CloudError
|
||||
from msrestazure.azure_operation import AzureOperationPoller
|
||||
from azure.mgmt.rdbms.postgresql import PostgreSQLManagementClient
|
||||
from msrestazure.azure_exceptions import CloudError
|
||||
from msrest.polling import LROPoller
|
||||
from msrest.serialization import Model
|
||||
except ImportError:
|
||||
# This is handled in azure_rm_common
|
||||
|
@ -322,7 +322,7 @@ class AzureRMServers(AzureRMModuleBase):
|
|||
response = self.mgmt_client.servers.update(resource_group_name=self.resource_group,
|
||||
server_name=self.name,
|
||||
parameters=self.parameters)
|
||||
if isinstance(response, AzureOperationPoller):
|
||||
if isinstance(response, LROPoller):
|
||||
response = self.get_poller_result(response)
|
||||
|
||||
except CloudError as exc:
|
||||
|
|
|
@ -12,7 +12,7 @@ azure-mgmt-dns==1.2.0
|
|||
azure-mgmt-keyvault==0.40.0
|
||||
azure-mgmt-network==1.7.1
|
||||
azure-mgmt-nspkg==2.0.0
|
||||
azure-mgmt-rdbms==0.2.0rc1
|
||||
azure-mgmt-rdbms==1.2.0
|
||||
azure-mgmt-resource==1.2.2
|
||||
azure-mgmt-sql==0.7.1
|
||||
azure-mgmt-storage==1.5.0
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
resource_group: "{{ resource_group }}"
|
||||
name: mysqlsrv{{ rpfx }}
|
||||
sku:
|
||||
name: MYSQLB50
|
||||
tier: basic
|
||||
name: GP_Gen4_2
|
||||
tier: GeneralPurpose
|
||||
location: westus
|
||||
storage_mb: 51200
|
||||
version: 5.6
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
resource_group: "{{ resource_group }}"
|
||||
name: mysqlsrv{{ rpfx }}
|
||||
sku:
|
||||
name: MYSQLB50
|
||||
tier: basic
|
||||
name: GP_Gen4_2
|
||||
tier: GeneralPurpose
|
||||
location: westus
|
||||
storage_mb: 51200
|
||||
version: 5.6
|
||||
|
@ -28,8 +28,8 @@
|
|||
resource_group: "{{ resource_group }}"
|
||||
name: mysqlsrv{{ rpfx }}
|
||||
sku:
|
||||
name: MYSQLB50
|
||||
tier: basic
|
||||
name: GP_Gen4_2
|
||||
tier: GeneralPurpose
|
||||
location: westus
|
||||
storage_mb: 51200
|
||||
version: 5.6
|
||||
|
@ -48,8 +48,8 @@
|
|||
resource_group: "{{ resource_group }}"
|
||||
name: mysqlsrv{{ rpfx }}
|
||||
sku:
|
||||
name: MYSQLB50
|
||||
tier: basic
|
||||
name: GP_Gen4_2
|
||||
tier: GeneralPurpose
|
||||
location: westus
|
||||
storage_mb: 51200
|
||||
version: 5.6
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
cloud/azure
|
||||
destructive
|
||||
posix/ci/cloud/group2/azure
|
||||
unstable
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
resource_group: "{{ resource_group }}"
|
||||
name: postgresqlsrv{{ rpfx }}
|
||||
sku:
|
||||
name: PGSQLS100
|
||||
tier: basic
|
||||
name: GP_Gen4_2
|
||||
tier: GeneralPurpose
|
||||
location: westus
|
||||
storage_mb: 51200
|
||||
enforce_ssl: True
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
cloud/azure
|
||||
destructive
|
||||
posix/ci/cloud/group2/azure
|
||||
unstable
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
resource_group: "{{ resource_group }}"
|
||||
name: postgresqlsrv{{ rpfx }}
|
||||
sku:
|
||||
name: PGSQLS100
|
||||
tier: basic
|
||||
name: GP_Gen4_2
|
||||
tier: GeneralPurpose
|
||||
location: westus
|
||||
storage_mb: 51200
|
||||
enforce_ssl: True
|
||||
|
@ -27,8 +27,8 @@
|
|||
resource_group: "{{ resource_group }}"
|
||||
name: postgresqlsrv{{ rpfx }}
|
||||
sku:
|
||||
name: PGSQLS100
|
||||
tier: basic
|
||||
name: GP_Gen4_2
|
||||
tier: GeneralPurpose
|
||||
location: westus
|
||||
storage_mb: 51200
|
||||
enforce_ssl: True
|
||||
|
@ -46,8 +46,8 @@
|
|||
resource_group: "{{ resource_group }}"
|
||||
name: postgresqlsrv{{ rpfx }}
|
||||
sku:
|
||||
name: PGSQLS100
|
||||
tier: basic
|
||||
name: GP_Gen4_2
|
||||
tier: GeneralPurpose
|
||||
location: westus
|
||||
storage_mb: 51200
|
||||
enforce_ssl: True
|
||||
|
|
|
@ -12,7 +12,7 @@ azure-mgmt-dns==1.2.0
|
|||
azure-mgmt-keyvault==0.40.0
|
||||
azure-mgmt-network==1.7.1
|
||||
azure-mgmt-nspkg==2.0.0
|
||||
azure-mgmt-rdbms==0.2.0rc1
|
||||
azure-mgmt-rdbms==1.2.0
|
||||
azure-mgmt-resource==1.2.2
|
||||
azure-mgmt-sql==0.7.1
|
||||
azure-mgmt-storage==1.5.0
|
||||
|
|
Loading…
Reference in a new issue