← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1488032] Re: "name 'NetworkRBAC' is not defined" Error when quering the db directly using models_v2

 

** Changed in: neutron
       Status: Fix Committed => Fix Released

** Changed in: neutron
    Milestone: None => liberty-3

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1488032

Title:
  "name 'NetworkRBAC' is not defined" Error when quering the db directly
  using models_v2

Status in neutron:
  Fix Released

Bug description:
  If we call db quiries directly with just importing the models_v2
  causing the below failures. Latest RBAC
  changes(https://review.openstack.org/gitweb?p=openstack%2Fneutron.git;a=commitdiff;h=9a8d015052b0a6419e3b2adece8211fec9710c6e)
  affected this

  InvalidRequestError: When initializing mapper Mapper|Network|networks,
  expression 'NetworkRBAC' failed to locate a name ("name 'NetworkRBAC'
  is not defined"). If this is a class name, consider adding this
  relationship() to the <class 'neutron.db.models_v2.Network'> class
  after both dependent classes have been defined.

  
  Instead of forcing the plugin and other modules to import RBAC , import the RBAC directly in models_v2.py

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1488032/+subscriptions


References