Comment 2 for bug 1475308

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-ironicclient (master)

Reviewed: https://review.openstack.org/202565
Committed: https://git.openstack.org/cgit/openstack/python-ironicclient/commit/?id=c3d38c921e847cae02db5785e5068cff9785ec06
Submitter: Jenkins
Branch: master

commit c3d38c921e847cae02db5785e5068cff9785ec06
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
    Change-Id: I2c756288d9590d1d18574a787601681b235fb57d