Fix broken Azure dependencies in 2.6 (#41946)
* fixed requirements * module fix * updated test accordingly * mysql & postgresl fixes * upgraded databases * removed test from ignore.txt * updated mysql & postgresql tests
This commit is contained in:
parent
0f477d1318
commit
701d61531c
13 changed files with 52 additions and 46 deletions
|
@ -50,6 +50,7 @@ options:
|
||||||
choices:
|
choices:
|
||||||
- public
|
- public
|
||||||
- none
|
- none
|
||||||
|
default: 'none'
|
||||||
ports:
|
ports:
|
||||||
description:
|
description:
|
||||||
- List of ports exposed within the container group.
|
- List of ports exposed within the container group.
|
||||||
|
@ -144,6 +145,7 @@ from ansible.module_utils.azure_rm_common import AzureRMModuleBase
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from msrestazure.azure_exceptions import CloudError
|
from msrestazure.azure_exceptions import CloudError
|
||||||
|
from msrestazure.azure_operation import AzureOperationPoller
|
||||||
from azure.mgmt.containerinstance import ContainerInstanceManagementClient
|
from azure.mgmt.containerinstance import ContainerInstanceManagementClient
|
||||||
except ImportError:
|
except ImportError:
|
||||||
# This is handled in azure_rm_common
|
# This is handled in azure_rm_common
|
||||||
|
@ -382,6 +384,9 @@ class AzureRMContainerInstance(AzureRMModuleBase):
|
||||||
container_group_name=self.name,
|
container_group_name=self.name,
|
||||||
container_group=parameters)
|
container_group=parameters)
|
||||||
|
|
||||||
|
if isinstance(response, AzureOperationPoller):
|
||||||
|
response = self.get_poller_result(response)
|
||||||
|
|
||||||
return response.as_dict()
|
return response.as_dict()
|
||||||
|
|
||||||
def delete_containerinstance(self):
|
def delete_containerinstance(self):
|
||||||
|
|
|
@ -96,9 +96,9 @@ import time
|
||||||
from ansible.module_utils.azure_rm_common import AzureRMModuleBase
|
from ansible.module_utils.azure_rm_common import AzureRMModuleBase
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from msrestazure.azure_exceptions import CloudError
|
|
||||||
from msrestazure.azure_operation import AzureOperationPoller
|
|
||||||
from azure.mgmt.rdbms.mysql import MySQLManagementClient
|
from azure.mgmt.rdbms.mysql import MySQLManagementClient
|
||||||
|
from msrestazure.azure_exceptions import CloudError
|
||||||
|
from msrest.polling import LROPoller
|
||||||
from msrest.serialization import Model
|
from msrest.serialization import Model
|
||||||
except ImportError:
|
except ImportError:
|
||||||
# This is handled in azure_rm_common
|
# This is handled in azure_rm_common
|
||||||
|
@ -248,7 +248,7 @@ class AzureRMDatabases(AzureRMModuleBase):
|
||||||
server_name=self.server_name,
|
server_name=self.server_name,
|
||||||
database_name=self.name,
|
database_name=self.name,
|
||||||
parameters=self.parameters)
|
parameters=self.parameters)
|
||||||
if isinstance(response, AzureOperationPoller):
|
if isinstance(response, LROPoller):
|
||||||
response = self.get_poller_result(response)
|
response = self.get_poller_result(response)
|
||||||
|
|
||||||
except CloudError as exc:
|
except CloudError as exc:
|
||||||
|
|
|
@ -137,9 +137,9 @@ import time
|
||||||
from ansible.module_utils.azure_rm_common import AzureRMModuleBase
|
from ansible.module_utils.azure_rm_common import AzureRMModuleBase
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from msrestazure.azure_exceptions import CloudError
|
|
||||||
from msrestazure.azure_operation import AzureOperationPoller
|
|
||||||
from azure.mgmt.rdbms.mysql import MySQLManagementClient
|
from azure.mgmt.rdbms.mysql import MySQLManagementClient
|
||||||
|
from msrestazure.azure_exceptions import CloudError
|
||||||
|
from msrest.polling import LROPoller
|
||||||
from msrest.serialization import Model
|
from msrest.serialization import Model
|
||||||
except ImportError:
|
except ImportError:
|
||||||
# This is handled in azure_rm_common
|
# This is handled in azure_rm_common
|
||||||
|
@ -316,10 +316,15 @@ class AzureRMServers(AzureRMModuleBase):
|
||||||
self.log("Creating / Updating the MySQL Server instance {0}".format(self.name))
|
self.log("Creating / Updating the MySQL Server instance {0}".format(self.name))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
response = self.mgmt_client.servers.create_or_update(resource_group_name=self.resource_group,
|
if (self.to_do == Actions.Create):
|
||||||
server_name=self.name,
|
response = self.mgmt_client.servers.create(resource_group_name=self.resource_group,
|
||||||
parameters=self.parameters)
|
server_name=self.name,
|
||||||
if isinstance(response, AzureOperationPoller):
|
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)
|
response = self.get_poller_result(response)
|
||||||
|
|
||||||
except CloudError as exc:
|
except CloudError as exc:
|
||||||
|
|
|
@ -96,9 +96,9 @@ import time
|
||||||
from ansible.module_utils.azure_rm_common import AzureRMModuleBase
|
from ansible.module_utils.azure_rm_common import AzureRMModuleBase
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from msrestazure.azure_exceptions import CloudError
|
|
||||||
from msrestazure.azure_operation import AzureOperationPoller
|
|
||||||
from azure.mgmt.rdbms.postgresql import PostgreSQLManagementClient
|
from azure.mgmt.rdbms.postgresql import PostgreSQLManagementClient
|
||||||
|
from msrestazure.azure_exceptions import CloudError
|
||||||
|
from msrest.polling import LROPoller
|
||||||
from msrest.serialization import Model
|
from msrest.serialization import Model
|
||||||
except ImportError:
|
except ImportError:
|
||||||
# This is handled in azure_rm_common
|
# This is handled in azure_rm_common
|
||||||
|
@ -248,7 +248,7 @@ class AzureRMDatabases(AzureRMModuleBase):
|
||||||
server_name=self.server_name,
|
server_name=self.server_name,
|
||||||
database_name=self.name,
|
database_name=self.name,
|
||||||
parameters=self.parameters)
|
parameters=self.parameters)
|
||||||
if isinstance(response, AzureOperationPoller):
|
if isinstance(response, LROPoller):
|
||||||
response = self.get_poller_result(response)
|
response = self.get_poller_result(response)
|
||||||
|
|
||||||
except CloudError as exc:
|
except CloudError as exc:
|
||||||
|
|
|
@ -137,9 +137,9 @@ import time
|
||||||
from ansible.module_utils.azure_rm_common import AzureRMModuleBase
|
from ansible.module_utils.azure_rm_common import AzureRMModuleBase
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from msrestazure.azure_exceptions import CloudError
|
|
||||||
from msrestazure.azure_operation import AzureOperationPoller
|
|
||||||
from azure.mgmt.rdbms.postgresql import PostgreSQLManagementClient
|
from azure.mgmt.rdbms.postgresql import PostgreSQLManagementClient
|
||||||
|
from msrestazure.azure_exceptions import CloudError
|
||||||
|
from msrest.polling import LROPoller
|
||||||
from msrest.serialization import Model
|
from msrest.serialization import Model
|
||||||
except ImportError:
|
except ImportError:
|
||||||
# This is handled in azure_rm_common
|
# This is handled in azure_rm_common
|
||||||
|
@ -324,7 +324,7 @@ class AzureRMServers(AzureRMModuleBase):
|
||||||
response = self.mgmt_client.servers.update(resource_group_name=self.resource_group,
|
response = self.mgmt_client.servers.update(resource_group_name=self.resource_group,
|
||||||
server_name=self.name,
|
server_name=self.name,
|
||||||
parameters=self.parameters)
|
parameters=self.parameters)
|
||||||
if isinstance(response, AzureOperationPoller):
|
if isinstance(response, LROPoller):
|
||||||
response = self.get_poller_result(response)
|
response = self.get_poller_result(response)
|
||||||
|
|
||||||
except CloudError as exc:
|
except CloudError as exc:
|
||||||
|
|
|
@ -5,14 +5,14 @@ azure-cli-nspkg==3.0.2
|
||||||
azure-common==1.1.11
|
azure-common==1.1.11
|
||||||
azure-mgmt-batch==4.1.0
|
azure-mgmt-batch==4.1.0
|
||||||
azure-mgmt-compute==2.1.0
|
azure-mgmt-compute==2.1.0
|
||||||
azure-mgmt-containerinstance==0.3.1
|
azure-mgmt-containerinstance==0.4.0
|
||||||
azure-mgmt-containerregistry==2.0.0
|
azure-mgmt-containerregistry==2.0.0
|
||||||
azure-mgmt-containerservice==3.0.1
|
azure-mgmt-containerservice==3.0.1
|
||||||
azure-mgmt-dns==1.2.0
|
azure-mgmt-dns==1.2.0
|
||||||
azure-mgmt-keyvault==0.40.0
|
azure-mgmt-keyvault==0.40.0
|
||||||
azure-mgmt-network==1.7.1
|
azure-mgmt-network==1.7.1
|
||||||
azure-mgmt-nspkg==2.0.0
|
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-resource==1.2.2
|
||||||
azure-mgmt-sql==0.7.1
|
azure-mgmt-sql==0.7.1
|
||||||
azure-mgmt-storage==1.5.0
|
azure-mgmt-storage==1.5.0
|
||||||
|
|
|
@ -14,18 +14,18 @@
|
||||||
ports:
|
ports:
|
||||||
- 80
|
- 80
|
||||||
- 81
|
- 81
|
||||||
- name: mycontainer2
|
|
||||||
image: httpd
|
|
||||||
memory: 1.5
|
|
||||||
register: output
|
register: output
|
||||||
|
|
||||||
|
- debug:
|
||||||
|
var: output
|
||||||
|
|
||||||
- name: Assert the container instance is well created
|
- name: Assert the container instance is well created
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- output.changed
|
- output.changed
|
||||||
- output.provisioning_state == 'Creating'
|
- output.provisioning_state == 'Succeeded'
|
||||||
|
|
||||||
- name: Create sample container instance
|
- name: Create sample container instance -- same parameters
|
||||||
azure_rm_containerinstance:
|
azure_rm_containerinstance:
|
||||||
resource_group: "{{ resource_group }}"
|
resource_group: "{{ resource_group }}"
|
||||||
name: "aci{{ resource_group | hash('md5') | truncate(7, True, '') }}"
|
name: "aci{{ resource_group | hash('md5') | truncate(7, True, '') }}"
|
||||||
|
@ -41,9 +41,6 @@
|
||||||
ports:
|
ports:
|
||||||
- 80
|
- 80
|
||||||
- 81
|
- 81
|
||||||
- name: mycontainer2
|
|
||||||
image: httpd
|
|
||||||
memory: 1.5
|
|
||||||
register: output
|
register: output
|
||||||
|
|
||||||
- name: Assert the container instance is well created
|
- name: Assert the container instance is well created
|
||||||
|
@ -51,7 +48,7 @@
|
||||||
that:
|
that:
|
||||||
- output.changed == False
|
- output.changed == False
|
||||||
|
|
||||||
- name: Create sample container instance
|
- name: Create sample container instance -- force update
|
||||||
azure_rm_containerinstance:
|
azure_rm_containerinstance:
|
||||||
resource_group: "{{ resource_group }}"
|
resource_group: "{{ resource_group }}"
|
||||||
name: "aci{{ resource_group | hash('md5') | truncate(7, True, '') }}"
|
name: "aci{{ resource_group | hash('md5') | truncate(7, True, '') }}"
|
||||||
|
@ -74,7 +71,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- output.changed
|
- output.changed
|
||||||
- output.provisioning_state == 'Creating'
|
- output.provisioning_state == 'Succeeded'
|
||||||
|
|
||||||
- name: Remove container instance
|
- name: Remove container instance
|
||||||
azure_rm_containerinstance:
|
azure_rm_containerinstance:
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
resource_group: "{{ resource_group }}"
|
resource_group: "{{ resource_group }}"
|
||||||
name: mysqlsrv{{ rpfx }}
|
name: mysqlsrv{{ rpfx }}
|
||||||
sku:
|
sku:
|
||||||
name: MYSQLB50
|
name: GP_Gen4_2
|
||||||
tier: basic
|
tier: GeneralPurpose
|
||||||
location: westus
|
location: westus
|
||||||
storage_mb: 51200
|
storage_mb: 51200
|
||||||
version: 5.6
|
version: 5.6
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
resource_group: "{{ resource_group }}"
|
resource_group: "{{ resource_group }}"
|
||||||
name: mysqlsrv{{ rpfx }}
|
name: mysqlsrv{{ rpfx }}
|
||||||
sku:
|
sku:
|
||||||
name: MYSQLB50
|
name: GP_Gen4_2
|
||||||
tier: basic
|
tier: GeneralPurpose
|
||||||
location: westus
|
location: westus
|
||||||
storage_mb: 51200
|
storage_mb: 51200
|
||||||
version: 5.6
|
version: 5.6
|
||||||
|
@ -28,8 +28,8 @@
|
||||||
resource_group: "{{ resource_group }}"
|
resource_group: "{{ resource_group }}"
|
||||||
name: mysqlsrv{{ rpfx }}
|
name: mysqlsrv{{ rpfx }}
|
||||||
sku:
|
sku:
|
||||||
name: MYSQLB50
|
name: GP_Gen4_2
|
||||||
tier: basic
|
tier: GeneralPurpose
|
||||||
location: westus
|
location: westus
|
||||||
storage_mb: 51200
|
storage_mb: 51200
|
||||||
version: 5.6
|
version: 5.6
|
||||||
|
@ -48,8 +48,8 @@
|
||||||
resource_group: "{{ resource_group }}"
|
resource_group: "{{ resource_group }}"
|
||||||
name: mysqlsrv{{ rpfx }}
|
name: mysqlsrv{{ rpfx }}
|
||||||
sku:
|
sku:
|
||||||
name: MYSQLB50
|
name: GP_Gen4_2
|
||||||
tier: basic
|
tier: GeneralPurpose
|
||||||
location: westus
|
location: westus
|
||||||
storage_mb: 51200
|
storage_mb: 51200
|
||||||
version: 5.6
|
version: 5.6
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
resource_group: "{{ resource_group }}"
|
resource_group: "{{ resource_group }}"
|
||||||
name: postgresqlsrv{{ rpfx }}
|
name: postgresqlsrv{{ rpfx }}
|
||||||
sku:
|
sku:
|
||||||
name: PGSQLS100
|
name: GP_Gen4_2
|
||||||
tier: basic
|
tier: GeneralPurpose
|
||||||
location: westus
|
location: westus
|
||||||
storage_mb: 51200
|
storage_mb: 51200
|
||||||
enforce_ssl: True
|
enforce_ssl: True
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
resource_group: "{{ resource_group }}"
|
resource_group: "{{ resource_group }}"
|
||||||
name: postgresqlsrv{{ rpfx }}
|
name: postgresqlsrv{{ rpfx }}
|
||||||
sku:
|
sku:
|
||||||
name: PGSQLS100
|
name: GP_Gen4_2
|
||||||
tier: basic
|
tier: GeneralPurpose
|
||||||
location: westus
|
location: westus
|
||||||
storage_mb: 51200
|
storage_mb: 51200
|
||||||
enforce_ssl: True
|
enforce_ssl: True
|
||||||
|
@ -27,8 +27,8 @@
|
||||||
resource_group: "{{ resource_group }}"
|
resource_group: "{{ resource_group }}"
|
||||||
name: postgresqlsrv{{ rpfx }}
|
name: postgresqlsrv{{ rpfx }}
|
||||||
sku:
|
sku:
|
||||||
name: PGSQLS100
|
name: GP_Gen4_2
|
||||||
tier: basic
|
tier: GeneralPurpose
|
||||||
location: westus
|
location: westus
|
||||||
storage_mb: 51200
|
storage_mb: 51200
|
||||||
enforce_ssl: True
|
enforce_ssl: True
|
||||||
|
@ -46,8 +46,8 @@
|
||||||
resource_group: "{{ resource_group }}"
|
resource_group: "{{ resource_group }}"
|
||||||
name: postgresqlsrv{{ rpfx }}
|
name: postgresqlsrv{{ rpfx }}
|
||||||
sku:
|
sku:
|
||||||
name: PGSQLS100
|
name: GP_Gen4_2
|
||||||
tier: basic
|
tier: GeneralPurpose
|
||||||
location: westus
|
location: westus
|
||||||
storage_mb: 51200
|
storage_mb: 51200
|
||||||
enforce_ssl: True
|
enforce_ssl: True
|
||||||
|
|
|
@ -5,14 +5,14 @@ azure-cli-nspkg==3.0.2
|
||||||
azure-common==1.1.11
|
azure-common==1.1.11
|
||||||
azure-mgmt-batch==4.1.0
|
azure-mgmt-batch==4.1.0
|
||||||
azure-mgmt-compute==2.1.0
|
azure-mgmt-compute==2.1.0
|
||||||
azure-mgmt-containerinstance==0.3.1
|
azure-mgmt-containerinstance==0.4.0
|
||||||
azure-mgmt-containerregistry==2.0.0
|
azure-mgmt-containerregistry==2.0.0
|
||||||
azure-mgmt-containerservice==3.0.1
|
azure-mgmt-containerservice==3.0.1
|
||||||
azure-mgmt-dns==1.2.0
|
azure-mgmt-dns==1.2.0
|
||||||
azure-mgmt-keyvault==0.40.0
|
azure-mgmt-keyvault==0.40.0
|
||||||
azure-mgmt-network==1.7.1
|
azure-mgmt-network==1.7.1
|
||||||
azure-mgmt-nspkg==2.0.0
|
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-resource==1.2.2
|
||||||
azure-mgmt-sql==0.7.1
|
azure-mgmt-sql==0.7.1
|
||||||
azure-mgmt-storage==1.5.0
|
azure-mgmt-storage==1.5.0
|
||||||
|
|
|
@ -145,7 +145,6 @@ lib/ansible/modules/cloud/atomic/atomic_container.py E317
|
||||||
lib/ansible/modules/cloud/atomic/atomic_container.py E326
|
lib/ansible/modules/cloud/atomic/atomic_container.py E326
|
||||||
lib/ansible/modules/cloud/azure/_azure.py E324
|
lib/ansible/modules/cloud/azure/_azure.py E324
|
||||||
lib/ansible/modules/cloud/azure/_azure.py E326
|
lib/ansible/modules/cloud/azure/_azure.py E326
|
||||||
lib/ansible/modules/cloud/azure/azure_rm_containerinstance.py E324
|
|
||||||
lib/ansible/modules/cloud/centurylink/clc_alert_policy.py E317
|
lib/ansible/modules/cloud/centurylink/clc_alert_policy.py E317
|
||||||
lib/ansible/modules/cloud/centurylink/clc_firewall_policy.py E317
|
lib/ansible/modules/cloud/centurylink/clc_firewall_policy.py E317
|
||||||
lib/ansible/modules/cloud/centurylink/clc_firewall_policy.py E324
|
lib/ansible/modules/cloud/centurylink/clc_firewall_policy.py E324
|
||||||
|
|
Loading…
Reference in a new issue