When the python client catch a 406 (Not Acceptable) error talking to
an older version of the Ironic server the client will try to negotiate
and fall back to the minimum supported version. Before the code was
determining the minimum version by using the builtin min() method with
strings but the result doesn't always come correct by doing it, e.g:
In [1]: min('1.10', '1.6')
Out[1]: '1.10'
In [2]: min('1.9', '1.6')
Out[2]: '1.6'
This patch fix this problem with the version negotiation.
Reviewed: https:/ /review. openstack. org/202565 /git.openstack. org/cgit/ openstack/ python- ironicclient/ commit/ ?id=c3d38c921e8 47cae02db5785e5 068cff9785ec06
Committed: https:/
Submitter: Jenkins
Branch: master
commit c3d38c921e847ca e02db5785e5068c ff9785ec06
Author: Lucas Alvares Gomes <email address hidden>
Date: Thu Jul 16 14:36:37 2015 +0100
Fix version negotiation
When the python client catch a 406 (Not Acceptable) error talking to
an older version of the Ironic server the client will try to negotiate
and fall back to the minimum supported version. Before the code was
determining the minimum version by using the builtin min() method with
strings but the result doesn't always come correct by doing it, e.g:
In [1]: min('1.10', '1.6')
Out[1]: '1.10'
In [2]: min('1.9', '1.6')
Out[2]: '1.6'
This patch fix this problem with the version negotiation.
Closes-Bug: #1475308 1d18574a7876016 81b235fb57d
Change-Id: I2c756288d9590d