Incorrect relationship declaration in models.ComputeNodeStat

Bug #1215390 reported by Mikhail Dubov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Mikhail Dubov

Bug Description

db.sqlalchemy.models.ComputeNodeStat.stats field is not properly named: since it is a relation that maps to db.sqlalchemy.models.ComputeNode, it should be named 'compute_node', not 'stats'. Besides, the call to the relationship() method lacks the foreign_keys parameter.

Tags: db
Mikhail Dubov (msdubov)
Changed in nova:
assignee: nobody → Mikhail Dubov (mdubov)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Mark McLoughlin (markmc)
Changed in nova:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/43291
Committed: http://github.com/openstack/nova/commit/52a9137d18369848feb1f496497523098d08ceff
Submitter: Jenkins
Branch: master

commit 52a9137d18369848feb1f496497523098d08ceff
Author: msdubov <email address hidden>
Date: Thu Aug 22 16:57:09 2013 +0400

    Stylistic improvement of models.ComputeNodeStat

    The patch is aimed at improving the readability of models.ComputeNodeStat.

    Here, we rename the 'stats' attribute of the class to 'compute_node' (due to
    the fact that the corresponding relation actually maps to ComputeNode class,
    not to ComputeNodeStat). We also rewrite the relationship() method call to
    make it stylistically conforming with the analogous 'service' relationship
    in the ComputeNode class: we add the 'foreign_keys' parameter, wrap the
    'backref' parameter into a method call and remove the auxiliary 'primary_join'
    variable.

    Change-Id: I2b1f27b4c1d06f364af01fc82d3490fd3bbf4ac0
    Closes-Bug: #1215390

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → icehouse-1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-1 → 2014.1
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.