)]}'
{"neutron/plugins/ml2/plugin.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"337f8a87df25c951237d2cabd2426e14485cd949","unresolved":false,"context_lines":[{"line_number":26,"context_line":"from oslo_utils import excutils"},{"line_number":27,"context_line":"from oslo_utils import importutils"},{"line_number":28,"context_line":"from oslo_utils import uuidutils"},{"line_number":29,"context_line":"from sqlalchemy import inspect"},{"line_number":30,"context_line":"from sqlalchemy.orm import exc as sa_exc"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"from neutron._i18n import _, _LE, _LI, _LW"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a430d35_6b68a2bb","line":29,"range":{"start_line":29,"start_character":0,"end_line":29,"end_character":30},"updated":"2017-02-03 16:40:30.000000000","message":"Shouldn\u0027t we import the whole module, instead of a class/function?","commit_id":"663cf3d3bd80280975749baeea66415423e5068c"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"eef9685f0804231a5e00e93a1d4f381810d5f8a1","unresolved":false,"context_lines":[{"line_number":26,"context_line":"from oslo_utils import excutils"},{"line_number":27,"context_line":"from oslo_utils import importutils"},{"line_number":28,"context_line":"from oslo_utils import uuidutils"},{"line_number":29,"context_line":"from sqlalchemy import inspect"},{"line_number":30,"context_line":"from sqlalchemy.orm import exc as sa_exc"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"from neutron._i18n import _, _LE, _LI, _LW"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a430d35_62fef76c","line":29,"updated":"2017-02-03 23:05:00.000000000","message":"Yep","commit_id":"663cf3d3bd80280975749baeea66415423e5068c"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"337f8a87df25c951237d2cabd2426e14485cd949","unresolved":false,"context_lines":[{"line_number":593,"context_line":"               attributes.SUBNETS, [\u0027_ml2_md_extend_subnet_dict\u0027])"},{"line_number":594,"context_line":""},{"line_number":595,"context_line":"    def _ml2_md_extend_network_dict(self, result, netdb):"},{"line_number":596,"context_line":"        session \u003d inspect(netdb).session"},{"line_number":597,"context_line":"        self.extension_manager.extend_network_dict(session, netdb, result)"},{"line_number":598,"context_line":""},{"line_number":599,"context_line":"    def _ml2_md_extend_port_dict(self, result, portdb):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a430d35_0b7e3ee4","line":596,"range":{"start_line":596,"start_character":18,"end_line":596,"end_character":40},"updated":"2017-02-03 16:40:30.000000000","message":"Correct me if I\u0027m wrong, but netdb is the model object and doesn\u0027t have any context.","commit_id":"663cf3d3bd80280975749baeea66415423e5068c"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"eef9685f0804231a5e00e93a1d4f381810d5f8a1","unresolved":false,"context_lines":[{"line_number":593,"context_line":"               attributes.SUBNETS, [\u0027_ml2_md_extend_subnet_dict\u0027])"},{"line_number":594,"context_line":""},{"line_number":595,"context_line":"    def _ml2_md_extend_network_dict(self, result, netdb):"},{"line_number":596,"context_line":"        session \u003d inspect(netdb).session"},{"line_number":597,"context_line":"        self.extension_manager.extend_network_dict(session, netdb, result)"},{"line_number":598,"context_line":""},{"line_number":599,"context_line":"    def _ml2_md_extend_port_dict(self, result, portdb):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a430d35_8203e372","line":596,"updated":"2017-02-03 23:05:00.000000000","message":"Yes, all of these objects passed into these functions are attached to a session. As we move to the new engine facade, retrieving a new reader context could cause queries to a completely different server.","commit_id":"663cf3d3bd80280975749baeea66415423e5068c"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"429de36b9e0ab55599c9206277a78b6441e3d27a","unresolved":false,"context_lines":[{"line_number":593,"context_line":"               attributes.SUBNETS, [\u0027_ml2_md_extend_subnet_dict\u0027])"},{"line_number":594,"context_line":""},{"line_number":595,"context_line":"    def _ml2_md_extend_network_dict(self, result, netdb):"},{"line_number":596,"context_line":"        session \u003d inspect(netdb).session"},{"line_number":597,"context_line":"        self.extension_manager.extend_network_dict(session, netdb, result)"},{"line_number":598,"context_line":""},{"line_number":599,"context_line":"    def _ml2_md_extend_port_dict(self, result, portdb):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a430d35_83e8527e","line":596,"range":{"start_line":596,"start_character":18,"end_line":596,"end_character":40},"in_reply_to":"1a430d35_0b7e3ee4","updated":"2017-02-03 19:00:21.000000000","message":"netdb is not the model object. It is the instance of the model object that you created or read from the db for the network being processed. It does have a session and that session is the same as the session in the requests context. I just ran one of the dns integration unit tests with pdb, adding breakpoints in the ml2 plugin at create_network and _ml2_md_extend_network_dict. You can see the result here: http://paste.openstack.org/show/597605/. As you can see, the session in create_network and _ml2_md_extend_network_dict are the same, which is what Kevin proposes to do","commit_id":"663cf3d3bd80280975749baeea66415423e5068c"}]}
