summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Davis <mrd@redhat.com>2018-01-17 14:10:17 -0800
committerToshio Kuratomi <a.badger@gmail.com>2018-01-17 15:12:55 -0800
commit84dab220bfb1dbffc04a0bdff4ae2c094034491b (patch)
tree8f0b60df5857cbc00f362b8f0947211518f3bd11
parent949e2f06e532cd6a50197f54b87dd8f25921a147 (diff)
downloadansible-84dab220bfb1dbffc04a0bdff4ae2c094034491b.tar.gz
fix minimum client version checking
* bump minimum client versions to match requirements file * improve prescriptive error messaging to match current recommendations (cherry-pick of #35018)
-rw-r--r--CHANGELOG.md4
-rw-r--r--lib/ansible/module_utils/azure_rm_common.py10
2 files changed, 8 insertions, 6 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a42e762e42..36b92f27b1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -70,7 +70,9 @@ Ansible Changes By Release
* Fix failure message "got multiple values for keyword argument id" in the
azure_rm_securitygroup module (caused by changes to the azure python API):
https://github.com/ansible/ansible/pull/34810
-
+* Bump Azure storage client minimum to 1.5.0 to fix deserialization issues. This will break Azure Stack
+ until it receives storage API version 2017-10-01 or changes are made to support multiple versions.
+ (https://github.com/ansible/ansible/pull/34442)
<a id="2.4.2"></a>
diff --git a/lib/ansible/module_utils/azure_rm_common.py b/lib/ansible/module_utils/azure_rm_common.py
index d5fb4c9a34..370cbf5fb9 100644
--- a/lib/ansible/module_utils/azure_rm_common.py
+++ b/lib/ansible/module_utils/azure_rm_common.py
@@ -141,17 +141,17 @@ def azure_id_to_dict(id):
AZURE_PKG_VERSIONS = {
StorageManagementClient.__name__: {
'package_name': 'storage',
- 'expected_version': '1.0.0',
+ 'expected_version': '1.5.0',
'installed_version': storage_client_version
},
ComputeManagementClient.__name__: {
'package_name': 'compute',
- 'expected_version': '1.0.0',
+ 'expected_version': '2.0.0',
'installed_version': compute_client_version
},
NetworkManagementClient.__name__: {
'package_name': 'network',
- 'expected_version': '1.0.0',
+ 'expected_version': '1.3.0',
'installed_version': network_client_version
},
ResourceManagementClient.__name__: {
@@ -209,7 +209,7 @@ class AzureRMModuleBase(object):
"- {0}".format(HAS_MSRESTAZURE_EXC))
if not HAS_AZURE:
- self.fail("Do you have azure>={1} installed? Try `pip install 'azure>={1}' --upgrade`"
+ self.fail("Do you have azure>={1} installed? Try `pip install ansible[azure] --upgrade`"
"- {0}".format(HAS_AZURE_EXC, AZURE_MIN_RELEASE))
self._cloud_environment = None
@@ -295,7 +295,7 @@ class AzureRMModuleBase(object):
expected_version = package_version.get('expected_version')
if Version(client_version) < Version(expected_version):
self.fail("Installed {0} client version is {1}. The supported version is {2}. Try "
- "`pip install azure>={3} --upgrade`".format(client_name, client_version, expected_version,
+ "`pip install ansible[azure]`".format(client_name, client_version, expected_version,
AZURE_MIN_RELEASE))
def exec_module(self, **kwargs):