post_get_test_node returns conductor_affinity attribute that is not exposed in API

Bug #1415934 reported by Vladyslav Drok
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Undecided
Vladyslav Drok

Bug Description

ironic.tests.api.utils.node_post_data function is used to get a dictionary that is POST'ed in tests. It deletes all internal API attributes from node dictionary, but there is an attribute conductor_affinity, that is not present in API node at all (and therefore is not internal). Because of that, it's not filtered from that dictionary and gets POST'ed, and in API node's constructor is silently ignored because of this part of code:

if not hasattr(self, k):
    continue

While tests currently are not failing because of that, I guess it's not a correct behaviour.

Vladyslav Drok (vdrok)
Changed in ironic:
assignee: nobody → Vladyslav Drok (vdrok)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

Fix proposed to branch: master
Review: https://review.openstack.org/151262

Changed in ironic:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/151262
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=d11f3d6d75797a394a8d368b5151e3e6627a4cfd
Submitter: Jenkins
Branch: master

commit d11f3d6d75797a394a8d368b5151e3e6627a4cfd
Author: Vladyslav Drok <email address hidden>
Date: Thu Jan 29 16:24:35 2015 +0200

    Do not POST conductor_affinity in tests

    Currently conductor_affinity is not exposed in API and should not be
    POST'ed in tests.

    Closes-bug: #1415934

    Change-Id: Ica7271472446cec641e8df5114073f1f2e0b1dbf

Changed in ironic:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ironic:
milestone: none → kilo-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ironic:
milestone: kilo-2 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.