Misnamed object in schema transformer config_db code

Bug #1543654 reported by Martin Millnert
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
Trunk
Fix Committed
Undecided
Unassigned

Bug Description

In schema transformer's config_db.py , https://github.com/Juniper/contrail-controller/blob/c52f504983728c85c08b6e081afce3b2d4e815fb/src/config/schema-transformer/config_db.py#L2006 , there is an object reference to 'rinst_obj', which by looking at the function quite obviously should be 'self.obj' instead.

It entered in commit https://github.com/Juniper/contrail-controller/commit/47346c25f02775eb858587a2a7b8b290d636039c and the error seems to have been there from the start.

We recently upgraded to liberty and was then struck by this.
It is a rather obvious bug.

information type: Proprietary → Public
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/17033
Submitter: Martin Millnert (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/17033
Committed: http://github.org/Juniper/contrail-controller/commit/216b573bb54b7b6d2b6d141a69cb284f9b2bbb29
Submitter: Zuul
Branch: master

commit 216b573bb54b7b6d2b6d141a69cb284f9b2bbb29
Author: Martin Millnert <email address hidden>
Date: Tue Feb 9 17:19:59 2016 +0100

schema-transformer/config_db: Fix obj name bug

In schema-transformer/config_db.py, the method locate_route_target() of
the class RoutingInstanceST has an incorrect object reference to an
undefined object, 'rinst_obj'. It is obvious from the code that it is a
typo and should be 'self.obj' since the Routing Instance object is kept
there, and that line 1953, 1947, 1962 use this reference for the same
function call to add_route_target().

This change corrects this mistake.

We had not hit the code path earlier, but after an upgrade to Liberty,
this code path was for some reason excercised.
Liberty or not, the code path will crash any interpretation attempt by Python.

Change-Id: I336523e3b730999f3b5c0c24aca95e3d083d459c
Closes-Bug: #1543654
Signed-off-by: Martin Millnert <email address hidden>

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.