"get_patch_port_action" uses LooseVersion to compare Fuel versions,
but in case Fuel "2014.2-6.0" it works improperly
From LooseVersion standpoint:
2014.2-6.0 is greater(newer) than 2014.2.2-6.1
But in reality:
2014.2-6.0 is smaller(older) than 2014.2.2-6.1
How to reproduce:
On fuel master open python interpreter
>>> from distutils.version import LooseVersion
>>> version = "2014.2-6.0"
>>> if version < LooseVersion('2014.2.2-6.1'):
... print "Works correct for %s" % version
... else:
... print "Works incorrect for %s" % version
...
Works incorrect for 2014.2-6.0
"get_patch_ port_action" uses LooseVersion to compare Fuel versions,
but in case Fuel "2014.2-6.0" it works improperly
From LooseVersion standpoint:
2014.2-6.0 is greater(newer) than 2014.2.2-6.1
But in reality:
2014.2-6.0 is smaller(older) than 2014.2.2-6.1
How to reproduce:
On fuel master open python interpreter
>>> from distutils.version import LooseVersion '2014.2. 2-6.1') :
>>> version = "2014.2-6.0"
>>> if version < LooseVersion(
... print "Works correct for %s" % version
... else:
... print "Works incorrect for %s" % version
...
Works incorrect for 2014.2-6.0