1
0
Fork 0
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:
Zim Kalinowski 2018-06-13 15:42:29 +08:00 committed by Yunge Zhu
parent 063d19048d
commit 5b0bb91c72
12 changed files with 38 additions and 35 deletions

View file

@ -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:

View file

@ -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:

View file

@ -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:

View file

@ -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:

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -1,4 +1,3 @@
cloud/azure
destructive
posix/ci/cloud/group2/azure
unstable

View file

@ -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

View file

@ -1,4 +1,3 @@
cloud/azure
destructive
posix/ci/cloud/group2/azure
unstable

View file

@ -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

View file

@ -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