fix minimum client version checking (#35018)
* bump minimum client versions to match requirements file * improve prescriptive error messaging to match current recommendations
This commit is contained in:
parent
ea1361a927
commit
68ccd5fc00
1 changed files with 6 additions and 6 deletions
|
@ -163,17 +163,17 @@ def format_resource_id(val, subscription_id, namespace, types, resource_group):
|
|||
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__: {
|
||||
|
@ -235,7 +235,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
|
||||
|
@ -330,8 +330,8 @@ 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,
|
||||
AZURE_MIN_RELEASE))
|
||||
"`pip install ansible[azure]`".format(client_name, client_version, expected_version,
|
||||
AZURE_MIN_RELEASE))
|
||||
|
||||
def exec_module(self, **kwargs):
|
||||
self.fail("Error: {0} failed to implement exec_module method.".format(self.__class__.__name__))
|
||||
|
|
Loading…
Reference in a new issue