Set constraints for cmd2 depends on python version
This patch sets contraints for cmd2 library when installing
openstack virtualenv based on python version as cmd2 > 0.9.0
is not compatible with python2.
Change-Id: Ic1cb345a234c6b6fee94fbb3380b18f7d9dc7122
Related-Prod: PROD-20356
diff --git a/src/com/mirantis/mk/Openstack.groovy b/src/com/mirantis/mk/Openstack.groovy
index 85f014f..eedfbd8 100644
--- a/src/com/mirantis/mk/Openstack.groovy
+++ b/src/com/mirantis/mk/Openstack.groovy
@@ -47,6 +47,13 @@
def openstack_latest_packages = [
//XXX: hack to fix https://bugs.launchpad.net/ubuntu/+source/python-pip/+bug/1635463
'cliff==2.8',
+ // NOTE(vsaienko): cmd2 is dependency for cliff, since we don't using upper-contstraints
+ // we have to pin cmd2 < 0.9.0 as later versions are not compatible with python2.
+ // TODO(vsaienko): use upper-constraints here, as in requirements we set only lowest library
+ // versions.
+ 'cmd2<0.9.0;python_version=="2.7"',
+ 'cmd2>=0.9.1;python_version=="3.4"',
+ 'cmd2>=0.9.1;python_version=="3.5"',
'python-openstackclient',
'python-heatclient',
'docutils'