Comment 3 for bug 1381468

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

Reviewed: https://review.openstack.org/128624
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=fdcf358eaeef6edb5c8d2dcc94f906a22882544a
Submitter: Jenkins
Branch: master

commit fdcf358eaeef6edb5c8d2dcc94f906a22882544a
Author: Bartosz Fic <email address hidden>
Date: Mon Nov 17 12:04:59 2014 +0100

    Type conflict in trusted_filter.py using attestation_port default value

    When trusted filter (nova/nova/scheduler/filters/trusted_filter.py)
    in nova scheduler is running with default value of attestation_port:

    default='8443'

    method _do_request() in AttestationService class has this line:

    action_url = "https://%s:%d%s/%s" % (self.host,
    self.port, self.api_url, action_url)

    It is easy to see that default type of attestation_port is string.
    But in action_url self.port is required as integer (%d).
    It leads to conflict.

    This change provides more tests than is required only to cover this bug
    fix. This cases are testing AttestationService _do_request() method
    using different status_codes and different texts returned by mocked
    request method.

    Change-Id: I1ad57b5bd1986360416948fd00dec22456dc29a7
    Closes-Bug: #1381468