summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZim Kalinowski <zikalino@microsoft.com>2018-06-13 09:42:29 +0200
committerYunge Zhu <37337818+yungezz@users.noreply.github.com>2018-06-13 09:42:29 +0200
commit5b0bb91c72c9ff59013cb42866ad9b6cb5963b90 (patch)
tree231b06bf0a3312e09d91f6a640f9e27c5e127043
parentplugins: Doc improvement (#41378) (diff)
downloadansible-5b0bb91c72c9ff59013cb42866ad9b6cb5963b90.tar.xz
ansible-5b0bb91c72c9ff59013cb42866ad9b6cb5963b90.zip
reappied changes in a new pr (#41228)
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_mysqldatabase.py6
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_mysqlserver.py17
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_postgresqldatabase.py6
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_postgresqlserver.py6
-rw-r--r--packaging/requirements/requirements-azure.txt2
-rw-r--r--test/integration/targets/azure_rm_mysqldatabase/tasks/main.yml4
-rw-r--r--test/integration/targets/azure_rm_mysqlserver/tasks/main.yml12
-rw-r--r--test/integration/targets/azure_rm_postgresqldatabase/aliases1
-rw-r--r--test/integration/targets/azure_rm_postgresqldatabase/tasks/main.yml4
-rw-r--r--test/integration/targets/azure_rm_postgresqlserver/aliases1
-rw-r--r--test/integration/targets/azure_rm_postgresqlserver/tasks/main.yml12
-rw-r--r--test/runner/requirements/integration.cloud.azure.txt2
12 files changed, 38 insertions, 35 deletions
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_mysqldatabase.py b/lib/ansible/modules/cloud/azure/azure_rm_mysqldatabase.py
index f89eb19c5d..dcdb17b904 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_mysqldatabase.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_mysqldatabase.py
@@ -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:
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_mysqlserver.py b/lib/ansible/modules/cloud/azure/azure_rm_mysqlserver.py
index 1c8d63fef7..ea60544ef9 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_mysqlserver.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_mysqlserver.py
@@ -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:
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_postgresqldatabase.py b/lib/ansible/modules/cloud/azure/azure_rm_postgresqldatabase.py
index 58022307cb..6f47904605 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_postgresqldatabase.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_postgresqldatabase.py
@@ -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:
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_postgresqlserver.py b/lib/ansible/modules/cloud/azure/azure_rm_postgresqlserver.py
index f4dde9dcc0..71d3f801b8 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_postgresqlserver.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_postgresqlserver.py
@@ -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:
diff --git a/packaging/requirements/requirements-azure.txt b/packaging/requirements/requirements-azure.txt
index 65fddf0958..2ed4b6a97b 100644
--- a/packaging/requirements/requirements-azure.txt
+++ b/packaging/requirements/requirements-azure.txt
@@ -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
diff --git a/test/integration/targets/azure_rm_mysqldatabase/tasks/main.yml b/test/integration/targets/azure_rm_mysqldatabase/tasks/main.yml
index cebe2796a8..ca6ad1f654 100644
--- a/test/integration/targets/azure_rm_mysqldatabase/tasks/main.yml
+++ b/test/integration/targets/azure_rm_mysqldatabase/tasks/main.yml
@@ -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
diff --git a/test/integration/targets/azure_rm_mysqlserver/tasks/main.yml b/test/integration/targets/azure_rm_mysqlserver/tasks/main.yml
index 05af75bfbd..27f98efb2e 100644
--- a/test/integration/targets/azure_rm_mysqlserver/tasks/main.yml
+++ b/test/integration/targets/azure_rm_mysqlserver/tasks/main.yml
@@ -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
diff --git a/test/integration/targets/azure_rm_postgresqldatabase/aliases b/test/integration/targets/azure_rm_postgresqldatabase/aliases
index 376fb93822..538083df28 100644
--- a/test/integration/targets/azure_rm_postgresqldatabase/aliases
+++ b/test/integration/targets/azure_rm_postgresqldatabase/aliases
@@ -1,4 +1,3 @@
cloud/azure
destructive
posix/ci/cloud/group2/azure
-unstable
diff --git a/test/integration/targets/azure_rm_postgresqldatabase/tasks/main.yml b/test/integration/targets/azure_rm_postgresqldatabase/tasks/main.yml
index e9b1308d04..24e26d1117 100644
--- a/test/integration/targets/azure_rm_postgresqldatabase/tasks/main.yml
+++ b/test/integration/targets/azure_rm_postgresqldatabase/tasks/main.yml
@@ -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
diff --git a/test/integration/targets/azure_rm_postgresqlserver/aliases b/test/integration/targets/azure_rm_postgresqlserver/aliases
index 376fb93822..538083df28 100644
--- a/test/integration/targets/azure_rm_postgresqlserver/aliases
+++ b/test/integration/targets/azure_rm_postgresqlserver/aliases
@@ -1,4 +1,3 @@
cloud/azure
destructive
posix/ci/cloud/group2/azure
-unstable
diff --git a/test/integration/targets/azure_rm_postgresqlserver/tasks/main.yml b/test/integration/targets/azure_rm_postgresqlserver/tasks/main.yml
index bc2706ef81..53a3d2d797 100644
--- a/test/integration/targets/azure_rm_postgresqlserver/tasks/main.yml
+++ b/test/integration/targets/azure_rm_postgresqlserver/tasks/main.yml
@@ -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
diff --git a/test/runner/requirements/integration.cloud.azure.txt b/test/runner/requirements/integration.cloud.azure.txt
index 65fddf0958..2ed4b6a97b 100644
--- a/test/runner/requirements/integration.cloud.azure.txt
+++ b/test/runner/requirements/integration.cloud.azure.txt
@@ -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