diff --git a/lib/ansible/module_utils/azure_rm_common.py b/lib/ansible/module_utils/azure_rm_common.py index 0bb79fd95d..f9761f307b 100644 --- a/lib/ansible/module_utils/azure_rm_common.py +++ b/lib/ansible/module_utils/azure_rm_common.py @@ -57,7 +57,7 @@ AZURE_API_PROFILES = { 'ComputeManagementClient': dict( default_api_version='2018-10-01', resource_skus='2018-10-01', - disks='2018-10-01', + disks='2018-06-01', snapshots='2018-10-01', virtual_machine_run_commands='2018-10-01' ), @@ -204,7 +204,7 @@ AZURE_PKG_VERSIONS = { }, 'ComputeManagementClient': { 'package_name': 'compute', - 'expected_version': '4.3.1' + 'expected_version': '4.4.0' }, 'ContainerInstanceManagementClient': { 'package_name': 'containerinstance', @@ -826,13 +826,13 @@ class AzureRMModuleBase(object): if not self._compute_client: self._compute_client = self.get_mgmt_svc_client(ComputeManagementClient, base_url=self._cloud_environment.endpoints.resource_manager, - api_version='2017-03-30') + api_version='2018-06-01') return self._compute_client @property def compute_models(self): self.log("Getting compute models") - return ComputeManagementClient.models("2017-03-30") + return ComputeManagementClient.models("2018-06-01") @property def dns_client(self): diff --git a/lib/ansible/modules/cloud/azure/azure_rm_managed_disk.py b/lib/ansible/modules/cloud/azure/azure_rm_managed_disk.py index 9ce75c01b7..55fccd55b2 100644 --- a/lib/ansible/modules/cloud/azure/azure_rm_managed_disk.py +++ b/lib/ansible/modules/cloud/azure/azure_rm_managed_disk.py @@ -169,11 +169,11 @@ def managed_disk_to_dict(managed_disk): name=managed_disk.name, location=managed_disk.location, tags=managed_disk.tags, - create_option=create_data.create_option.value.lower(), + create_option=create_data.create_option.lower(), source_uri=create_data.source_uri or create_data.source_resource_id, disk_size_gb=managed_disk.disk_size_gb, - os_type=managed_disk.os_type.value.lower() if managed_disk.os_type else None, - storage_account_type=managed_disk.sku.name.value if managed_disk.sku else None, + os_type=managed_disk.os_type.lower() if managed_disk.os_type else None, + storage_account_type=managed_disk.sku.name if managed_disk.sku else None, managed_by=managed_disk.managed_by ) diff --git a/lib/ansible/modules/cloud/azure/azure_rm_managed_disk_facts.py b/lib/ansible/modules/cloud/azure/azure_rm_managed_disk_facts.py index d3f11dcc76..6b2592a6f2 100644 --- a/lib/ansible/modules/cloud/azure/azure_rm_managed_disk_facts.py +++ b/lib/ansible/modules/cloud/azure/azure_rm_managed_disk_facts.py @@ -129,11 +129,11 @@ def managed_disk_to_dict(managed_disk): name=managed_disk.name, location=managed_disk.location, tags=managed_disk.tags, - create_option=create_data.create_option.value.lower(), + create_option=create_data.create_option.lower(), source_uri=create_data.source_uri or create_data.source_resource_id, disk_size_gb=managed_disk.disk_size_gb, - os_type=managed_disk.os_type.value.lower() if managed_disk.os_type else None, - storage_account_type=managed_disk.sku.name.value if managed_disk.sku else None, + os_type=managed_disk.os_type.lower() if managed_disk.os_type else None, + storage_account_type=managed_disk.sku.name if managed_disk.sku else None, managed_by=managed_disk.managed_by ) diff --git a/packaging/requirements/requirements-azure.txt b/packaging/requirements/requirements-azure.txt index c5d7f9df85..6bcc4ad21d 100644 --- a/packaging/requirements/requirements-azure.txt +++ b/packaging/requirements/requirements-azure.txt @@ -5,7 +5,7 @@ azure-cli-nspkg==3.0.2 azure-common==1.1.11 azure-mgmt-batch==4.1.0 azure-mgmt-cdn==3.0.0 -azure-mgmt-compute==4.3.1 +azure-mgmt-compute==4.4.0 azure-mgmt-containerinstance==0.4.0 azure-mgmt-containerregistry==2.0.0 azure-mgmt-containerservice==4.2.2 diff --git a/test/runner/requirements/integration.cloud.azure.txt b/test/runner/requirements/integration.cloud.azure.txt index c5d7f9df85..6bcc4ad21d 100644 --- a/test/runner/requirements/integration.cloud.azure.txt +++ b/test/runner/requirements/integration.cloud.azure.txt @@ -5,7 +5,7 @@ azure-cli-nspkg==3.0.2 azure-common==1.1.11 azure-mgmt-batch==4.1.0 azure-mgmt-cdn==3.0.0 -azure-mgmt-compute==4.3.1 +azure-mgmt-compute==4.4.0 azure-mgmt-containerinstance==0.4.0 azure-mgmt-containerregistry==2.0.0 azure-mgmt-containerservice==4.2.2