)]}'
{"neutron/db/loadbalancer/loadbalancer_dbv2.py":[{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"c99dbee340656d94c11a0022ed2e54e614bdb2ab","unresolved":false,"context_lines":[{"line_number":498,"context_line":"    def delete_loadbalancer(self, context, id):"},{"line_number":499,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":500,"context_line":"            lb_db \u003d self._get_resource(context, LoadBalancer, id)"},{"line_number":501,"context_line":"            if lb_db.listeners or len(lb_db.listeners) \u003e 0:"},{"line_number":502,"context_line":"                raise loadbalancerv2.LoadBalancerInUse("},{"line_number":503,"context_line":"                    listener_id\u003dlb_db.listener[0].id)"},{"line_number":504,"context_line":"            context.session.delete(lb_db)"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_13f53050","line":501,"updated":"2014-07-15 13:33:28.000000000","message":"Isnt \u0027if lb_db.listeners\u0027 good enough here?","commit_id":"aee21593787de6ec1787acc0f1509beaf3e75c0a"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"1685e2242ebcaf0a8a0655c2764b232032018bcc","unresolved":false,"context_lines":[{"line_number":498,"context_line":"    def delete_loadbalancer(self, context, id):"},{"line_number":499,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":500,"context_line":"            lb_db \u003d self._get_resource(context, LoadBalancer, id)"},{"line_number":501,"context_line":"            if lb_db.listeners or len(lb_db.listeners) \u003e 0:"},{"line_number":502,"context_line":"                raise loadbalancerv2.LoadBalancerInUse("},{"line_number":503,"context_line":"                    listener_id\u003dlb_db.listener[0].id)"},{"line_number":504,"context_line":"            context.session.delete(lb_db)"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_d91d7d12","line":501,"in_reply_to":"baada198_13f53050","updated":"2014-07-16 04:37:50.000000000","message":"Actually len(lb_db.listeners) \u003e 0 is good enough because sqlalchemy will always be a list but I added the none check just to be safe.","commit_id":"aee21593787de6ec1787acc0f1509beaf3e75c0a"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"3286ac8481911519a49581587e3e70be5a9d85b5","unresolved":false,"context_lines":[{"line_number":498,"context_line":"    def delete_loadbalancer(self, context, id):"},{"line_number":499,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":500,"context_line":"            lb_db \u003d self._get_resource(context, LoadBalancer, id)"},{"line_number":501,"context_line":"            if lb_db.listeners or len(lb_db.listeners) \u003e 0:"},{"line_number":502,"context_line":"                raise loadbalancerv2.LoadBalancerInUse("},{"line_number":503,"context_line":"                    listener_id\u003dlb_db.listener[0].id)"},{"line_number":504,"context_line":"            context.session.delete(lb_db)"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_10e26a01","line":501,"in_reply_to":"baada198_13f53050","updated":"2014-07-16 01:26:40.000000000","message":"Is it possible / common for ld_db.listeners to be set to a non-null zero-length string? (ie. \u0027\u0027)? If so, then Brandon\u0027s logic here makes sense.","commit_id":"aee21593787de6ec1787acc0f1509beaf3e75c0a"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"6ed7736fa5960b77dbafa293c4429c5435dcf5cc","unresolved":false,"context_lines":[{"line_number":498,"context_line":"    def delete_loadbalancer(self, context, id):"},{"line_number":499,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":500,"context_line":"            lb_db \u003d self._get_resource(context, LoadBalancer, id)"},{"line_number":501,"context_line":"            if lb_db.listeners or len(lb_db.listeners) \u003e 0:"},{"line_number":502,"context_line":"                raise loadbalancerv2.LoadBalancerInUse("},{"line_number":503,"context_line":"                    listener_id\u003dlb_db.listener[0].id)"},{"line_number":504,"context_line":"            context.session.delete(lb_db)"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_c6ed75b9","line":501,"in_reply_to":"baada198_b48b591d","updated":"2014-07-16 20:15:12.000000000","message":"Ah, one of those little things you never realize. I\u0027ll have to add that in in the next change I make. Thanks.","commit_id":"aee21593787de6ec1787acc0f1509beaf3e75c0a"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"f169c375114c4608b507b006b551e03d2b2638c0","unresolved":false,"context_lines":[{"line_number":498,"context_line":"    def delete_loadbalancer(self, context, id):"},{"line_number":499,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":500,"context_line":"            lb_db \u003d self._get_resource(context, LoadBalancer, id)"},{"line_number":501,"context_line":"            if lb_db.listeners or len(lb_db.listeners) \u003e 0:"},{"line_number":502,"context_line":"                raise loadbalancerv2.LoadBalancerInUse("},{"line_number":503,"context_line":"                    listener_id\u003dlb_db.listener[0].id)"},{"line_number":504,"context_line":"            context.session.delete(lb_db)"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_b48b591d","line":501,"in_reply_to":"baada198_d91d7d12","updated":"2014-07-16 13:49:04.000000000","message":"Code:\n----------------\nl \u003d None\nif l:\n    print \"yes\"\nelse:\n    print \"no\"\n\nll \u003d []\nif ll:\n    print \"yes\"\nelse:\n    print \"no\"\n\nlll \u003d [\u0027hi\u0027]\nif lll:\n    print \"yes\"\nelse:\n    print \"no\"\n-----------------\nThis code will print\nno\nno\nyes\nThis is because python see None list and Empty list as \u0027False\u0027\n\nSo checking:\nif list:\n    do something\n\nwill cover the None and the Empty list","commit_id":"aee21593787de6ec1787acc0f1509beaf3e75c0a"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"c99dbee340656d94c11a0022ed2e54e614bdb2ab","unresolved":false,"context_lines":[{"line_number":507,"context_line":"    def get_loadbalancers(self, context, filters\u003dNone, fields\u003dNone):"},{"line_number":508,"context_line":"        return self._get_resources(context, LoadBalancer, filters\u003dfilters)"},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"    def get_loadbalancer(self, context, id, fields\u003dNone):"},{"line_number":511,"context_line":"        lb \u003d self._get_resource(context, LoadBalancer, id)"},{"line_number":512,"context_line":"        return lb"},{"line_number":513,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_138c50d6","line":510,"updated":"2014-07-15 13:33:28.000000000","message":"fields is not used in the method body","commit_id":"aee21593787de6ec1787acc0f1509beaf3e75c0a"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"1685e2242ebcaf0a8a0655c2764b232032018bcc","unresolved":false,"context_lines":[{"line_number":507,"context_line":"    def get_loadbalancers(self, context, filters\u003dNone, fields\u003dNone):"},{"line_number":508,"context_line":"        return self._get_resources(context, LoadBalancer, filters\u003dfilters)"},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"    def get_loadbalancer(self, context, id, fields\u003dNone):"},{"line_number":511,"context_line":"        lb \u003d self._get_resource(context, LoadBalancer, id)"},{"line_number":512,"context_line":"        return lb"},{"line_number":513,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_598ded29","line":510,"in_reply_to":"baada198_10c98a79","updated":"2014-07-16 04:37:50.000000000","message":"Long story as to why these remained, but I think I can remove them now that the methods are in the plugin as well.","commit_id":"aee21593787de6ec1787acc0f1509beaf3e75c0a"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"3286ac8481911519a49581587e3e70be5a9d85b5","unresolved":false,"context_lines":[{"line_number":507,"context_line":"    def get_loadbalancers(self, context, filters\u003dNone, fields\u003dNone):"},{"line_number":508,"context_line":"        return self._get_resources(context, LoadBalancer, filters\u003dfilters)"},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"    def get_loadbalancer(self, context, id, fields\u003dNone):"},{"line_number":511,"context_line":"        lb \u003d self._get_resource(context, LoadBalancer, id)"},{"line_number":512,"context_line":"        return lb"},{"line_number":513,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_10c98a79","line":510,"in_reply_to":"baada198_138c50d6","updated":"2014-07-16 01:26:40.000000000","message":"+1 to Avishay here. (Also to his other notes about this below).","commit_id":"aee21593787de6ec1787acc0f1509beaf3e75c0a"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"c99dbee340656d94c11a0022ed2e54e614bdb2ab","unresolved":false,"context_lines":[{"line_number":581,"context_line":"        return None"},{"line_number":582,"context_line":""},{"line_number":583,"context_line":"    def get_listeners(self, context, filters\u003dNone, fields\u003dNone):"},{"line_number":584,"context_line":"        return self._get_resources(context, Listener, filters\u003dfilters)"},{"line_number":585,"context_line":""},{"line_number":586,"context_line":"    def get_listener(self, context, id, fields\u003dNone):"},{"line_number":587,"context_line":"        listener \u003d self._get_resource(context, Listener, id)"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_b3b1e490","line":584,"updated":"2014-07-15 13:33:28.000000000","message":"fields not in use","commit_id":"aee21593787de6ec1787acc0f1509beaf3e75c0a"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"c99dbee340656d94c11a0022ed2e54e614bdb2ab","unresolved":false,"context_lines":[{"line_number":584,"context_line":"        return self._get_resources(context, Listener, filters\u003dfilters)"},{"line_number":585,"context_line":""},{"line_number":586,"context_line":"    def get_listener(self, context, id, fields\u003dNone):"},{"line_number":587,"context_line":"        listener \u003d self._get_resource(context, Listener, id)"},{"line_number":588,"context_line":"        return listener"},{"line_number":589,"context_line":""},{"line_number":590,"context_line":"    def _check_session_persistence_info(self, info):"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_13a37043","line":587,"updated":"2014-07-15 13:33:28.000000000","message":"fields not in use","commit_id":"aee21593787de6ec1787acc0f1509beaf3e75c0a"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"c99dbee340656d94c11a0022ed2e54e614bdb2ab","unresolved":false,"context_lines":[{"line_number":700,"context_line":"            context.session.delete(pool_db)"},{"line_number":701,"context_line":""},{"line_number":702,"context_line":"    def get_pools(self, context, filters\u003dNone, fields\u003dNone):"},{"line_number":703,"context_line":"        return self._get_resources(context, PoolV2, filters\u003dfilters)"},{"line_number":704,"context_line":""},{"line_number":705,"context_line":"    def get_pool(self, context, id, fields\u003dNone):"},{"line_number":706,"context_line":"        pool \u003d self._get_resource(context, PoolV2, id)"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_9345c070","line":703,"updated":"2014-07-15 13:33:28.000000000","message":"fields not in use","commit_id":"aee21593787de6ec1787acc0f1509beaf3e75c0a"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"c99dbee340656d94c11a0022ed2e54e614bdb2ab","unresolved":false,"context_lines":[{"line_number":703,"context_line":"        return self._get_resources(context, PoolV2, filters\u003dfilters)"},{"line_number":704,"context_line":""},{"line_number":705,"context_line":"    def get_pool(self, context, id, fields\u003dNone):"},{"line_number":706,"context_line":"        pool \u003d self._get_resource(context, PoolV2, id)"},{"line_number":707,"context_line":"        return pool"},{"line_number":708,"context_line":""},{"line_number":709,"context_line":"    def create_pool_member(self, context, member, pool_id):"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_b35f2440","line":706,"updated":"2014-07-15 13:33:28.000000000","message":"fields not in use","commit_id":"aee21593787de6ec1787acc0f1509beaf3e75c0a"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"c99dbee340656d94c11a0022ed2e54e614bdb2ab","unresolved":false,"context_lines":[{"line_number":714,"context_line":""},{"line_number":715,"context_line":"                #set status based on if member\u0027s pool is part of a"},{"line_number":716,"context_line":"                #load balancer"},{"line_number":717,"context_line":"                member[\u0027status\u0027] \u003d constants.ACTIVE"},{"line_number":718,"context_line":"                if pool_db.listener and pool_db.listener.loadbalancer:"},{"line_number":719,"context_line":"                    member[\u0027status\u0027] \u003d constants.PENDING_CREATE"},{"line_number":720,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_25390ba4","line":717,"updated":"2014-07-15 13:33:28.000000000","message":"if pool_db.listener and pool_db.listener.loadbalancer:\n    member[\u0027status\u0027] \u003d constants.PENDING_CREATE\nelse:\n    member[\u0027status\u0027] \u003d constants.ACTIVE","commit_id":"aee21593787de6ec1787acc0f1509beaf3e75c0a"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"3286ac8481911519a49581587e3e70be5a9d85b5","unresolved":false,"context_lines":[{"line_number":714,"context_line":""},{"line_number":715,"context_line":"                #set status based on if member\u0027s pool is part of a"},{"line_number":716,"context_line":"                #load balancer"},{"line_number":717,"context_line":"                member[\u0027status\u0027] \u003d constants.ACTIVE"},{"line_number":718,"context_line":"                if pool_db.listener and pool_db.listener.loadbalancer:"},{"line_number":719,"context_line":"                    member[\u0027status\u0027] \u003d constants.PENDING_CREATE"},{"line_number":720,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_d00f1287","line":717,"in_reply_to":"baada198_25390ba4","updated":"2014-07-16 01:26:40.000000000","message":"Avishay-- I think you have the logic backward there. Shouldn\u0027t the member\u0027s status be set to constants.ACTIVE if the pool is part of a load balancer?","commit_id":"aee21593787de6ec1787acc0f1509beaf3e75c0a"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"f169c375114c4608b507b006b551e03d2b2638c0","unresolved":false,"context_lines":[{"line_number":714,"context_line":""},{"line_number":715,"context_line":"                #set status based on if member\u0027s pool is part of a"},{"line_number":716,"context_line":"                #load balancer"},{"line_number":717,"context_line":"                member[\u0027status\u0027] \u003d constants.ACTIVE"},{"line_number":718,"context_line":"                if pool_db.listener and pool_db.listener.loadbalancer:"},{"line_number":719,"context_line":"                    member[\u0027status\u0027] \u003d constants.PENDING_CREATE"},{"line_number":720,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_14524568","line":717,"in_reply_to":"baada198_998065f9","updated":"2014-07-16 13:49:04.000000000","message":"My point of view here is software engineering.\nIn line #717 you do:\nx \u003d y\n2 lines later you check a condition and do\nx \u003d z\nSo all I am asking is to check the condition and decide before you do any assignment to x","commit_id":"aee21593787de6ec1787acc0f1509beaf3e75c0a"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"1685e2242ebcaf0a8a0655c2764b232032018bcc","unresolved":false,"context_lines":[{"line_number":714,"context_line":""},{"line_number":715,"context_line":"                #set status based on if member\u0027s pool is part of a"},{"line_number":716,"context_line":"                #load balancer"},{"line_number":717,"context_line":"                member[\u0027status\u0027] \u003d constants.ACTIVE"},{"line_number":718,"context_line":"                if pool_db.listener and pool_db.listener.loadbalancer:"},{"line_number":719,"context_line":"                    member[\u0027status\u0027] \u003d constants.PENDING_CREATE"},{"line_number":720,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_998065f9","line":717,"in_reply_to":"baada198_d00f1287","updated":"2014-07-16 04:37:50.000000000","message":"Actually, I added a DEFERRED status for entities not linked to a load balancer.  The status is set after this code is called in the plugin so this code should just set the status to PENDING_CREATE and not do the check for loadbalancer since that is done in the plugin.","commit_id":"aee21593787de6ec1787acc0f1509beaf3e75c0a"},{"author":{"_account_id":8446,"name":"Evgeny Fedoruk","email":"evgenyf@radware.com","username":"evgenyfedoruk"},"change_message_id":"bc14e9b7db555d826c158ea27be9b1758b8d940c","unresolved":false,"context_lines":[{"line_number":308,"context_line":"    default_pool_id \u003d sa.Column(sa.String(36), sa.ForeignKey(\"lbaas_pools.id\"),"},{"line_number":309,"context_line":"                                unique\u003dTrue)"},{"line_number":310,"context_line":"    loadbalancer_id \u003d sa.Column(sa.String(36), sa.ForeignKey("},{"line_number":311,"context_line":"        \"lbaas_loadbalancers.id\"))"},{"line_number":312,"context_line":"    protocol \u003d sa.Column(sa.String(36))"},{"line_number":313,"context_line":"    protocol_port \u003d sa.Column(sa.Integer)"},{"line_number":314,"context_line":"    connection_limit \u003d sa.Column(sa.Integer, nullable\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_4a2098b0","line":311,"updated":"2014-07-16 14:44:06.000000000","message":"Is the protocol defined as just a string and not enum on purpose?","commit_id":"8eae049e534f8ee4f9d84635600a5f785f7f9016"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"ecd725b4a85768d78027d8032bcbdfb72f1f088d","unresolved":false,"context_lines":[{"line_number":308,"context_line":"    default_pool_id \u003d sa.Column(sa.String(36), sa.ForeignKey(\"lbaas_pools.id\"),"},{"line_number":309,"context_line":"                                unique\u003dTrue)"},{"line_number":310,"context_line":"    loadbalancer_id \u003d sa.Column(sa.String(36), sa.ForeignKey("},{"line_number":311,"context_line":"        \"lbaas_loadbalancers.id\"))"},{"line_number":312,"context_line":"    protocol \u003d sa.Column(sa.String(36))"},{"line_number":313,"context_line":"    protocol_port \u003d sa.Column(sa.Integer)"},{"line_number":314,"context_line":"    connection_limit \u003d sa.Column(sa.Integer, nullable\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_e677d906","line":311,"in_reply_to":"baada198_4a2098b0","updated":"2014-07-16 20:15:49.000000000","message":"Done","commit_id":"8eae049e534f8ee4f9d84635600a5f785f7f9016"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"802e948c4e6fa90ba8ce6e0d604d6ed0909d4ed2","unresolved":false,"context_lines":[{"line_number":711,"context_line":"        try:"},{"line_number":712,"context_line":"            with context.session.begin(subtransactions\u003dTrue):"},{"line_number":713,"context_line":"                # check pool exists"},{"line_number":714,"context_line":"                self._get_resource(context, PoolV2, pool_id)"},{"line_number":715,"context_line":""},{"line_number":716,"context_line":"                member[\u0027status\u0027] \u003d constants.PENDING_CREATE"},{"line_number":717,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_9b874412","line":714,"updated":"2014-07-17 06:59:27.000000000","message":"If you want to make sure the existence of entity in DB, I think you should have a \u0027boolean\u0027 method named \u0027entity exists\u0027. In my eyes the current usage of _get_resource is an abuse of the method","commit_id":"8eae049e534f8ee4f9d84635600a5f785f7f9016"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"5dc0492a9231b4a3b51f969e498d0c1d41789120","unresolved":false,"context_lines":[{"line_number":711,"context_line":"        try:"},{"line_number":712,"context_line":"            with context.session.begin(subtransactions\u003dTrue):"},{"line_number":713,"context_line":"                # check pool exists"},{"line_number":714,"context_line":"                self._get_resource(context, PoolV2, pool_id)"},{"line_number":715,"context_line":""},{"line_number":716,"context_line":"                member[\u0027status\u0027] \u003d constants.PENDING_CREATE"},{"line_number":717,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_e3115db0","line":714,"in_reply_to":"baada198_9b874412","updated":"2014-07-17 17:26:48.000000000","message":"You\u0027re right, the code should be able to comment itself in this instance. Will fix in future change.","commit_id":"8eae049e534f8ee4f9d84635600a5f785f7f9016"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"802e948c4e6fa90ba8ce6e0d604d6ed0909d4ed2","unresolved":false,"context_lines":[{"line_number":734,"context_line":""},{"line_number":735,"context_line":"    def update_pool_member(self, context, id, member, pool_id):"},{"line_number":736,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":737,"context_line":"            self._get_resource(context, PoolV2, pool_id)"},{"line_number":738,"context_line":"            member_db \u003d self._get_resource(context, MemberV2, id)"},{"line_number":739,"context_line":"            if member_db:"},{"line_number":740,"context_line":"                member_db.update(member)"}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_1ba2549a","line":737,"updated":"2014-07-17 06:59:27.000000000","message":"see comment above","commit_id":"8eae049e534f8ee4f9d84635600a5f785f7f9016"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"5dc0492a9231b4a3b51f969e498d0c1d41789120","unresolved":false,"context_lines":[{"line_number":734,"context_line":""},{"line_number":735,"context_line":"    def update_pool_member(self, context, id, member, pool_id):"},{"line_number":736,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":737,"context_line":"            self._get_resource(context, PoolV2, pool_id)"},{"line_number":738,"context_line":"            member_db \u003d self._get_resource(context, MemberV2, id)"},{"line_number":739,"context_line":"            if member_db:"},{"line_number":740,"context_line":"                member_db.update(member)"}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_43a2094c","line":737,"in_reply_to":"baada198_1ba2549a","updated":"2014-07-17 17:26:48.000000000","message":"Will fix in future change.","commit_id":"8eae049e534f8ee4f9d84635600a5f785f7f9016"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"802e948c4e6fa90ba8ce6e0d604d6ed0909d4ed2","unresolved":false,"context_lines":[{"line_number":735,"context_line":"    def update_pool_member(self, context, id, member, pool_id):"},{"line_number":736,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":737,"context_line":"            self._get_resource(context, PoolV2, pool_id)"},{"line_number":738,"context_line":"            member_db \u003d self._get_resource(context, MemberV2, id)"},{"line_number":739,"context_line":"            if member_db:"},{"line_number":740,"context_line":"                member_db.update(member)"},{"line_number":741,"context_line":"        return member_db"}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_9bb584d2","line":738,"updated":"2014-07-17 06:59:27.000000000","message":"As far as I understand _get_resource will never return None.\nIt will return the entity or throw an exception.\nTherefore there is no point for\n\nif member_db:","commit_id":"8eae049e534f8ee4f9d84635600a5f785f7f9016"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"5dc0492a9231b4a3b51f969e498d0c1d41789120","unresolved":false,"context_lines":[{"line_number":735,"context_line":"    def update_pool_member(self, context, id, member, pool_id):"},{"line_number":736,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":737,"context_line":"            self._get_resource(context, PoolV2, pool_id)"},{"line_number":738,"context_line":"            member_db \u003d self._get_resource(context, MemberV2, id)"},{"line_number":739,"context_line":"            if member_db:"},{"line_number":740,"context_line":"                member_db.update(member)"},{"line_number":741,"context_line":"        return member_db"}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_83d501b9","line":738,"in_reply_to":"baada198_9bb584d2","updated":"2014-07-17 17:26:48.000000000","message":"Will fix in future change.","commit_id":"8eae049e534f8ee4f9d84635600a5f785f7f9016"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"fb60c5ba81a73fd8be6908e2916b8e5a215cf881","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#"},{"line_number":2,"context_line":"# Copyright 2013 OpenStack Foundation.  All rights reserved"},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_2a8348aa","line":1,"updated":"2014-07-17 05:14:47.000000000","message":"Since this module contains models it must be imported in neutron/db/migration/models/head.py, please. This is a new requirement since the DB healing was merged.","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"0054cbd63a840f317ec8fa37d7ae734b75a9266b","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#"},{"line_number":2,"context_line":"# Copyright 2013 OpenStack Foundation.  All rights reserved"},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_06857f58","line":1,"in_reply_to":"baada198_2a8348aa","updated":"2014-07-17 19:55:46.000000000","message":"Done","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"7e0e67d6eac81418b22054408e1f80e907fd2343","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#"},{"line_number":2,"context_line":"# Copyright 2013 OpenStack Foundation.  All rights reserved"},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":5,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_8cf545ef","line":2,"updated":"2014-07-17 11:40:27.000000000","message":"2014","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"0054cbd63a840f317ec8fa37d7ae734b75a9266b","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#"},{"line_number":2,"context_line":"# Copyright 2013 OpenStack Foundation.  All rights reserved"},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":5,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_46f697fa","line":2,"in_reply_to":"baada198_8cf545ef","updated":"2014-07-17 19:55:46.000000000","message":"Done","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"20a79edb39f53322f8525252a75ceae6f5b412ea","unresolved":false,"context_lines":[{"line_number":159,"context_line":"    admin_state_up \u003d sa.Column(sa.Boolean(), nullable\u003dFalse)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    def to_dict(self, pool\u003dFalse):"},{"line_number":162,"context_line":"        hm_dict \u003d {\u0027id\u0027: self.id,"},{"line_number":163,"context_line":"                   \u0027tenant_id\u0027: self.tenant_id,"},{"line_number":164,"context_line":"                   \u0027type\u0027: self.type,"},{"line_number":165,"context_line":"                   \u0027delay\u0027: self.delay,"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_d2ad0fec","line":162,"updated":"2014-07-17 12:57:34.000000000","message":"I think we should avoid the direct copy of the attributes from the object to the dict. I can see no point in doing it.\nHere is a generic code that is able to this task for every SQLAlchemy based class.\n\ndef row2dict(row, exclude\u003d[]):\n    d \u003d {}\n    for column in row.__table__.columns:\n        if column.name not in exclude:\n            d[column.name] \u003d getattr(row, column.name)\n    return d\n\nThis code can be used in every \u0027to_dict\u0027 function we are using.","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"0054cbd63a840f317ec8fa37d7ae734b75a9266b","unresolved":false,"context_lines":[{"line_number":159,"context_line":"    admin_state_up \u003d sa.Column(sa.Boolean(), nullable\u003dFalse)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    def to_dict(self, pool\u003dFalse):"},{"line_number":162,"context_line":"        hm_dict \u003d {\u0027id\u0027: self.id,"},{"line_number":163,"context_line":"                   \u0027tenant_id\u0027: self.tenant_id,"},{"line_number":164,"context_line":"                   \u0027type\u0027: self.type,"},{"line_number":165,"context_line":"                   \u0027delay\u0027: self.delay,"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_12a4d5b7","line":162,"in_reply_to":"baada198_d2ad0fec","updated":"2014-07-17 19:55:46.000000000","message":"Ah thanks.  I meant to revisit this to get a good way to do it, but you did it for me.  Nice to know you can easily get the columns from the instance.  Do you think putting this method in the NeutronBase model would be beneficial so that every Model in Neutron would get this method?","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"5004baaaddc99cf11296d3cd960d43d5ea4c6186","unresolved":false,"context_lines":[{"line_number":232,"context_line":"            pool_dict[\u0027session_persistence\u0027] \u003d \\"},{"line_number":233,"context_line":"                self.sessionpersistence.to_dict()"},{"line_number":234,"context_line":"        else:"},{"line_number":235,"context_line":"            pool_dict[\u0027session_persistence\u0027] \u003d None"},{"line_number":236,"context_line":"        return pool_dict"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_a124d20e","line":235,"updated":"2014-07-17 11:16:17.000000000","message":"what is the point of this line?","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"0054cbd63a840f317ec8fa37d7ae734b75a9266b","unresolved":false,"context_lines":[{"line_number":232,"context_line":"            pool_dict[\u0027session_persistence\u0027] \u003d \\"},{"line_number":233,"context_line":"                self.sessionpersistence.to_dict()"},{"line_number":234,"context_line":"        else:"},{"line_number":235,"context_line":"            pool_dict[\u0027session_persistence\u0027] \u003d None"},{"line_number":236,"context_line":"        return pool_dict"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_c61aa7c5","line":235,"in_reply_to":"baada198_a124d20e","updated":"2014-07-17 19:55:46.000000000","message":"Done","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"7e0e67d6eac81418b22054408e1f80e907fd2343","unresolved":false,"context_lines":[{"line_number":248,"context_line":"    vip_subnet_id \u003d sa.Column(sa.String(36))"},{"line_number":249,"context_line":"    vip_port_id \u003d sa.Column(sa.String(36), sa.ForeignKey(\u0027ports.id\u0027))"},{"line_number":250,"context_line":"    vip_address \u003d sa.Column(sa.String(36))"},{"line_number":251,"context_line":"    status \u003d sa.Column(sa.String(16))"},{"line_number":252,"context_line":"    admin_state_up \u003d sa.Column(sa.Boolean(), nullable\u003dFalse)"},{"line_number":253,"context_line":"    vip_port \u003d orm.relationship(models_v2.Port)"},{"line_number":254,"context_line":"    stats \u003d orm.relationship("}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_879b5e65","line":251,"updated":"2014-07-17 11:40:27.000000000","message":"In migration you add nullable\u003dFalse for the  status and vip_subnet_id columns, please add this to the model or remove from migrations.","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"0054cbd63a840f317ec8fa37d7ae734b75a9266b","unresolved":false,"context_lines":[{"line_number":248,"context_line":"    vip_subnet_id \u003d sa.Column(sa.String(36))"},{"line_number":249,"context_line":"    vip_port_id \u003d sa.Column(sa.String(36), sa.ForeignKey(\u0027ports.id\u0027))"},{"line_number":250,"context_line":"    vip_address \u003d sa.Column(sa.String(36))"},{"line_number":251,"context_line":"    status \u003d sa.Column(sa.String(16))"},{"line_number":252,"context_line":"    admin_state_up \u003d sa.Column(sa.Boolean(), nullable\u003dFalse)"},{"line_number":253,"context_line":"    vip_port \u003d orm.relationship(models_v2.Port)"},{"line_number":254,"context_line":"    stats \u003d orm.relationship("}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_e6116bb0","line":251,"in_reply_to":"baada198_879b5e65","updated":"2014-07-17 19:55:46.000000000","message":"Done","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"7e0e67d6eac81418b22054408e1f80e907fd2343","unresolved":false,"context_lines":[{"line_number":313,"context_line":"    default_pool \u003d orm.relationship("},{"line_number":314,"context_line":"        PoolV2, backref\u003dorm.backref(\"listener\", uselist\u003dFalse))"},{"line_number":315,"context_line":"    loadbalancer \u003d orm.relationship("},{"line_number":316,"context_line":"        LoadBalancer, backref\u003dorm.backref(\"listeners\"))"},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"    def to_dict(self, loadbalancer\u003dFalse, default_pool\u003dFalse):"},{"line_number":319,"context_line":"        listener_dict \u003d {\u0027id\u0027: self.id,"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_a7cce28b","line":316,"updated":"2014-07-17 11:40:27.000000000","message":"In migration you add nullable\u003dFalse for the  protocol and protocol_port columns, please add this to the model or remove from migrations.","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"0054cbd63a840f317ec8fa37d7ae734b75a9266b","unresolved":false,"context_lines":[{"line_number":313,"context_line":"    default_pool \u003d orm.relationship("},{"line_number":314,"context_line":"        PoolV2, backref\u003dorm.backref(\"listener\", uselist\u003dFalse))"},{"line_number":315,"context_line":"    loadbalancer \u003d orm.relationship("},{"line_number":316,"context_line":"        LoadBalancer, backref\u003dorm.backref(\"listeners\"))"},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"    def to_dict(self, loadbalancer\u003dFalse, default_pool\u003dFalse):"},{"line_number":319,"context_line":"        listener_dict \u003d {\u0027id\u0027: self.id,"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_e65fab73","line":316,"in_reply_to":"baada198_a7cce28b","updated":"2014-07-17 19:55:46.000000000","message":"Done","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"5004baaaddc99cf11296d3cd960d43d5ea4c6186","unresolved":false,"context_lines":[{"line_number":402,"context_line":"                lb_db.vip_address \u003d fixed_ip[\u0027ip_address\u0027]"},{"line_number":403,"context_line":"                break"},{"line_number":404,"context_line":""},{"line_number":405,"context_line":"    def _create_loadbalancer_stats(self, context, loadbalancer_id, data\u003dNone):"},{"line_number":406,"context_line":"        # This is internal method to add load balancer statistics.  It won\u0027t"},{"line_number":407,"context_line":"        # be exposed to API"},{"line_number":408,"context_line":"        data \u003d data or {}"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_619e3a09","line":405,"updated":"2014-07-17 11:16:17.000000000","message":"why not\n  def _create_loadbalancer_stats(self, context, loadbalancer_id, data\u003d{}):\n\nand remove the line\n\ndata \u003d data or {}","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"0054cbd63a840f317ec8fa37d7ae734b75a9266b","unresolved":false,"context_lines":[{"line_number":402,"context_line":"                lb_db.vip_address \u003d fixed_ip[\u0027ip_address\u0027]"},{"line_number":403,"context_line":"                break"},{"line_number":404,"context_line":""},{"line_number":405,"context_line":"    def _create_loadbalancer_stats(self, context, loadbalancer_id, data\u003dNone):"},{"line_number":406,"context_line":"        # This is internal method to add load balancer statistics.  It won\u0027t"},{"line_number":407,"context_line":"        # be exposed to API"},{"line_number":408,"context_line":"        data \u003d data or {}"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_46ebf777","line":405,"in_reply_to":"baada198_619e3a09","updated":"2014-07-17 19:55:46.000000000","message":"Python\u0027s mutable default arguments.  Even though this method will likely only be called once and data is read-only in the method I\u0027ve always just avoided setting defaults to mutable data structures.","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"5004baaaddc99cf11296d3cd960d43d5ea4c6186","unresolved":false,"context_lines":[{"line_number":430,"context_line":"            context.session.delete(stats)"},{"line_number":431,"context_line":""},{"line_number":432,"context_line":"    def assert_modification_allowed(self, obj):"},{"line_number":433,"context_line":"        status \u003d getattr(obj, \u0027status\u0027, None)"},{"line_number":434,"context_line":"        id \u003d getattr(obj, \u0027id\u0027, None)"},{"line_number":435,"context_line":""},{"line_number":436,"context_line":"        if status in [constants.PENDING_DELETE, constants.PENDING_UPDATE,"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_ac7a0923","line":433,"updated":"2014-07-17 11:16:17.000000000","message":"The code is looking for 2 attributes of \u0027obj\u0027. The \u0027id\u0027 and \u0027status\u0027\nEach one of them can have the value None.\nHowever the code is not checking if the value is None.\n\nCan None be a valid value for id and status? Or you wanna raise an exception when the value is None?","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"0054cbd63a840f317ec8fa37d7ae734b75a9266b","unresolved":false,"context_lines":[{"line_number":430,"context_line":"            context.session.delete(stats)"},{"line_number":431,"context_line":""},{"line_number":432,"context_line":"    def assert_modification_allowed(self, obj):"},{"line_number":433,"context_line":"        status \u003d getattr(obj, \u0027status\u0027, None)"},{"line_number":434,"context_line":"        id \u003d getattr(obj, \u0027id\u0027, None)"},{"line_number":435,"context_line":""},{"line_number":436,"context_line":"        if status in [constants.PENDING_DELETE, constants.PENDING_UPDATE,"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_f9282c87","line":433,"in_reply_to":"baada198_ac7a0923","updated":"2014-07-17 19:55:46.000000000","message":"No its so an AttributeError exception is not raised if for whatever reason the object passed in does not have those attrs.  This should never happen, so perhaps that is a reason to remove the None argument.  It\u0027ll catch if something unexpected does happen.","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"bdf6a6b14d0f13ef8f7608097f8c0271ca30cde9","unresolved":false,"context_lines":[{"line_number":504,"context_line":"        return self._get_resources(context, LoadBalancer, filters\u003dfilters)"},{"line_number":505,"context_line":""},{"line_number":506,"context_line":"    def get_loadbalancer(self, context, id):"},{"line_number":507,"context_line":"        lb \u003d self._get_resource(context, LoadBalancer, id)"},{"line_number":508,"context_line":"        return lb"},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"    def create_listener(self, context, listener):"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_d2e0bafa","line":507,"updated":"2014-07-17 10:11:30.000000000","message":"return self._get_resource(context, LoadBalancer, id)\nno need for the varaible \u0027lb\u0027","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"0054cbd63a840f317ec8fa37d7ae734b75a9266b","unresolved":false,"context_lines":[{"line_number":504,"context_line":"        return self._get_resources(context, LoadBalancer, filters\u003dfilters)"},{"line_number":505,"context_line":""},{"line_number":506,"context_line":"    def get_loadbalancer(self, context, id):"},{"line_number":507,"context_line":"        lb \u003d self._get_resource(context, LoadBalancer, id)"},{"line_number":508,"context_line":"        return lb"},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"    def create_listener(self, context, listener):"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_392384a8","line":507,"in_reply_to":"baada198_d2e0bafa","updated":"2014-07-17 19:55:46.000000000","message":"Done","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"bdf6a6b14d0f13ef8f7608097f8c0271ca30cde9","unresolved":false,"context_lines":[{"line_number":580,"context_line":"        return self._get_resources(context, Listener, filters\u003dfilters)"},{"line_number":581,"context_line":""},{"line_number":582,"context_line":"    def get_listener(self, context, id):"},{"line_number":583,"context_line":"        listener \u003d self._get_resource(context, Listener, id)"},{"line_number":584,"context_line":"        return listener"},{"line_number":585,"context_line":""},{"line_number":586,"context_line":"    def _check_session_persistence_info(self, info):"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_12c23253","line":583,"updated":"2014-07-17 10:11:30.000000000","message":"return self._get_resource(context, Listener, id)\nno need for listner var","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"0054cbd63a840f317ec8fa37d7ae734b75a9266b","unresolved":false,"context_lines":[{"line_number":580,"context_line":"        return self._get_resources(context, Listener, filters\u003dfilters)"},{"line_number":581,"context_line":""},{"line_number":582,"context_line":"    def get_listener(self, context, id):"},{"line_number":583,"context_line":"        listener \u003d self._get_resource(context, Listener, id)"},{"line_number":584,"context_line":"        return listener"},{"line_number":585,"context_line":""},{"line_number":586,"context_line":"    def _check_session_persistence_info(self, info):"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_593918d7","line":583,"in_reply_to":"baada198_12c23253","updated":"2014-07-17 19:55:46.000000000","message":"Done","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"bdf6a6b14d0f13ef8f7608097f8c0271ca30cde9","unresolved":false,"context_lines":[{"line_number":731,"context_line":"    def update_pool_member(self, context, id, member, pool_id):"},{"line_number":732,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":733,"context_line":"            self._get_resource(context, PoolV2, pool_id)"},{"line_number":734,"context_line":"            member_db \u003d self._get_resource(context, MemberV2, id)"},{"line_number":735,"context_line":"            if member_db:"},{"line_number":736,"context_line":"                member_db.update(member)"},{"line_number":737,"context_line":"        return member_db"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_06be74ae","line":734,"updated":"2014-07-17 10:11:30.000000000","message":"See my comments in patch #9","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"0054cbd63a840f317ec8fa37d7ae734b75a9266b","unresolved":false,"context_lines":[{"line_number":731,"context_line":"    def update_pool_member(self, context, id, member, pool_id):"},{"line_number":732,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":733,"context_line":"            self._get_resource(context, PoolV2, pool_id)"},{"line_number":734,"context_line":"            member_db \u003d self._get_resource(context, MemberV2, id)"},{"line_number":735,"context_line":"            if member_db:"},{"line_number":736,"context_line":"                member_db.update(member)"},{"line_number":737,"context_line":"        return member_db"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_2db41ef1","line":734,"in_reply_to":"baada198_06be74ae","updated":"2014-07-17 19:55:46.000000000","message":"Done","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"5004baaaddc99cf11296d3cd960d43d5ea4c6186","unresolved":false,"context_lines":[{"line_number":751,"context_line":"    def get_pool_member(self, context, id, pool_id, filters\u003dNone):"},{"line_number":752,"context_line":"        member \u003d self._get_resource(context, MemberV2, id)"},{"line_number":753,"context_line":"        if member.pool_id !\u003d pool_id:"},{"line_number":754,"context_line":"            raise loadbalancerv2.PoolNotFound(pool_id\u003dpool_id)"},{"line_number":755,"context_line":"        return member"},{"line_number":756,"context_line":""},{"line_number":757,"context_line":"    def delete_member(self, context, id):"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_870b5e23","line":754,"updated":"2014-07-17 11:16:17.000000000","message":"I am not sure that this is the right exception.\nThis exception should be raised when a Pool with a specific id can not be found in DB. This is not the case here.","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"0054cbd63a840f317ec8fa37d7ae734b75a9266b","unresolved":false,"context_lines":[{"line_number":751,"context_line":"    def get_pool_member(self, context, id, pool_id, filters\u003dNone):"},{"line_number":752,"context_line":"        member \u003d self._get_resource(context, MemberV2, id)"},{"line_number":753,"context_line":"        if member.pool_id !\u003d pool_id:"},{"line_number":754,"context_line":"            raise loadbalancerv2.PoolNotFound(pool_id\u003dpool_id)"},{"line_number":755,"context_line":"        return member"},{"line_number":756,"context_line":""},{"line_number":757,"context_line":"    def delete_member(self, context, id):"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_3720eb9a","line":754,"in_reply_to":"baada198_870b5e23","updated":"2014-07-17 19:55:46.000000000","message":"I\u0027ve changed it to MemberNotFoundForPool exception","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"5004baaaddc99cf11296d3cd960d43d5ea4c6186","unresolved":false,"context_lines":[{"line_number":762,"context_line":"    def create_healthmonitor(self, context, healthmonitor):"},{"line_number":763,"context_line":"        tenant_id \u003d self._get_tenant_id_for_create(context, healthmonitor)"},{"line_number":764,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":765,"context_line":"            healthmonitor[\u0027status\u0027] \u003d constants.PENDING_CREATE"},{"line_number":766,"context_line":"            hm_db_entry \u003d HealthMonitorV2("},{"line_number":767,"context_line":"                id\u003duuidutils.generate_uuid(),"},{"line_number":768,"context_line":"                tenant_id\u003dtenant_id,"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_8cd385d4","line":765,"updated":"2014-07-17 11:16:17.000000000","message":"remove the line\n\nhealthmonitor[\u0027status\u0027] \u003d constants.PENDING_CREATE","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"0054cbd63a840f317ec8fa37d7ae734b75a9266b","unresolved":false,"context_lines":[{"line_number":762,"context_line":"    def create_healthmonitor(self, context, healthmonitor):"},{"line_number":763,"context_line":"        tenant_id \u003d self._get_tenant_id_for_create(context, healthmonitor)"},{"line_number":764,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":765,"context_line":"            healthmonitor[\u0027status\u0027] \u003d constants.PENDING_CREATE"},{"line_number":766,"context_line":"            hm_db_entry \u003d HealthMonitorV2("},{"line_number":767,"context_line":"                id\u003duuidutils.generate_uuid(),"},{"line_number":768,"context_line":"                tenant_id\u003dtenant_id,"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_8dc8ca76","line":765,"in_reply_to":"baada198_8cd385d4","updated":"2014-07-17 19:55:46.000000000","message":"Done","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"5004baaaddc99cf11296d3cd960d43d5ea4c6186","unresolved":false,"context_lines":[{"line_number":774,"context_line":"                expected_codes\u003dhealthmonitor[\u0027expected_codes\u0027],"},{"line_number":775,"context_line":"                admin_state_up\u003dhealthmonitor[\u0027admin_state_up\u0027],"},{"line_number":776,"context_line":"                max_retries\u003dhealthmonitor[\u0027max_retries\u0027],"},{"line_number":777,"context_line":"                status\u003dhealthmonitor[\u0027status\u0027])"},{"line_number":778,"context_line":"            context.session.add(hm_db_entry)"},{"line_number":779,"context_line":"        return hm_db_entry"},{"line_number":780,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_4cf08d66","line":777,"updated":"2014-07-17 11:16:17.000000000","message":"status \u003d constants.PENDING_CREATE","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"0054cbd63a840f317ec8fa37d7ae734b75a9266b","unresolved":false,"context_lines":[{"line_number":774,"context_line":"                expected_codes\u003dhealthmonitor[\u0027expected_codes\u0027],"},{"line_number":775,"context_line":"                admin_state_up\u003dhealthmonitor[\u0027admin_state_up\u0027],"},{"line_number":776,"context_line":"                max_retries\u003dhealthmonitor[\u0027max_retries\u0027],"},{"line_number":777,"context_line":"                status\u003dhealthmonitor[\u0027status\u0027])"},{"line_number":778,"context_line":"            context.session.add(hm_db_entry)"},{"line_number":779,"context_line":"        return hm_db_entry"},{"line_number":780,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_adc74e63","line":777,"in_reply_to":"baada198_4cf08d66","updated":"2014-07-17 19:55:46.000000000","message":"Done","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"bdf6a6b14d0f13ef8f7608097f8c0271ca30cde9","unresolved":false,"context_lines":[{"line_number":794,"context_line":"        return self._get_resource(context, HealthMonitorV2, id)"},{"line_number":795,"context_line":""},{"line_number":796,"context_line":"    def get_healthmonitors(self, context, filters\u003dNone):"},{"line_number":797,"context_line":"        hms \u003d self._get_resources(context, HealthMonitorV2, filters\u003dfilters)"},{"line_number":798,"context_line":"        return hms"},{"line_number":799,"context_line":""},{"line_number":800,"context_line":"    def update_loadbalancer_stats(self, context, loadbalancer_id, stats_data):"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_86e9a4b9","line":797,"updated":"2014-07-17 10:11:30.000000000","message":"return self._get_resources(context, HealthMonitorV2, filters\u003dfilters)","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"0054cbd63a840f317ec8fa37d7ae734b75a9266b","unresolved":false,"context_lines":[{"line_number":794,"context_line":"        return self._get_resource(context, HealthMonitorV2, id)"},{"line_number":795,"context_line":""},{"line_number":796,"context_line":"    def get_healthmonitors(self, context, filters\u003dNone):"},{"line_number":797,"context_line":"        hms \u003d self._get_resources(context, HealthMonitorV2, filters\u003dfilters)"},{"line_number":798,"context_line":"        return hms"},{"line_number":799,"context_line":""},{"line_number":800,"context_line":"    def update_loadbalancer_stats(self, context, loadbalancer_id, stats_data):"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_99e65043","line":797,"in_reply_to":"baada198_86e9a4b9","updated":"2014-07-17 19:55:46.000000000","message":"Done","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"71b93873211d0af2b9e177fd7f59b1dbcb102475","unresolved":false,"context_lines":[{"line_number":281,"context_line":""},{"line_number":282,"context_line":"    def to_dict(self, loadbalancer\u003dFalse, default_pool\u003dFalse):"},{"line_number":283,"context_line":"        listener_dict \u003d {\u0027id\u0027: self.id,"},{"line_number":284,"context_line":"                         \u0027name\u0027: self.name,"},{"line_number":285,"context_line":"                         \u0027description\u0027: self.description,"},{"line_number":286,"context_line":"                         \u0027tenant_id\u0027: self.tenant_id,"},{"line_number":287,"context_line":"                         \u0027loadbalancer_id\u0027: self.loadbalancer_id,"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_d9dec13d","line":284,"updated":"2014-07-20 14:02:33.000000000","message":"Why not using the super class to_dict ?","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"dcc71a0195fb64bfc9a9b461f6c832a90bb94676","unresolved":false,"context_lines":[{"line_number":281,"context_line":""},{"line_number":282,"context_line":"    def to_dict(self, loadbalancer\u003dFalse, default_pool\u003dFalse):"},{"line_number":283,"context_line":"        listener_dict \u003d {\u0027id\u0027: self.id,"},{"line_number":284,"context_line":"                         \u0027name\u0027: self.name,"},{"line_number":285,"context_line":"                         \u0027description\u0027: self.description,"},{"line_number":286,"context_line":"                         \u0027tenant_id\u0027: self.tenant_id,"},{"line_number":287,"context_line":"                         \u0027loadbalancer_id\u0027: self.loadbalancer_id,"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_1fa0198f","line":284,"in_reply_to":"baada198_d9dec13d","updated":"2014-07-20 15:47:57.000000000","message":"Whoops, must have missed that.","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"71b93873211d0af2b9e177fd7f59b1dbcb102475","unresolved":false,"context_lines":[{"line_number":323,"context_line":"                resource \u003d self._get_by_id(context, model, id)"},{"line_number":324,"context_line":"        except exc.NoResultFound:"},{"line_number":325,"context_line":"            with excutils.save_and_reraise_exception(reraise\u003dFalse) as ctx:"},{"line_number":326,"context_line":"                if issubclass(model, LoadBalancer):"},{"line_number":327,"context_line":"                    raise loadbalancerv2.LoadBalancerNotFound(lb_id\u003did)"},{"line_number":328,"context_line":"                if issubclass(model, Listener):"},{"line_number":329,"context_line":"                    raise loadbalancerv2.ListenerNotFound(listener_id\u003did)"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_d9ffa164","line":326,"updated":"2014-07-20 14:02:33.000000000","message":"I cant see the added value of throwing entity specific \"NotFound\" exception. \"XNotFound\", \"YNotFound\", etc\nIsnt \"EntityNotFound\" good enough?","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"dcc71a0195fb64bfc9a9b461f6c832a90bb94676","unresolved":false,"context_lines":[{"line_number":323,"context_line":"                resource \u003d self._get_by_id(context, model, id)"},{"line_number":324,"context_line":"        except exc.NoResultFound:"},{"line_number":325,"context_line":"            with excutils.save_and_reraise_exception(reraise\u003dFalse) as ctx:"},{"line_number":326,"context_line":"                if issubclass(model, LoadBalancer):"},{"line_number":327,"context_line":"                    raise loadbalancerv2.LoadBalancerNotFound(lb_id\u003did)"},{"line_number":328,"context_line":"                if issubclass(model, Listener):"},{"line_number":329,"context_line":"                    raise loadbalancerv2.ListenerNotFound(listener_id\u003did)"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_3fa95d7c","line":326,"in_reply_to":"baada198_d9ffa164","updated":"2014-07-20 15:47:57.000000000","message":"I assumed it wasn\u0027t since v1 did this.  I do kind of agree with you but I think the reason it was done in the first place was just for the more explicit error message for the user.","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"71b93873211d0af2b9e177fd7f59b1dbcb102475","unresolved":false,"context_lines":[{"line_number":336,"context_line":"                ctx.reraise \u003d True"},{"line_number":337,"context_line":"        return resource"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"    def _resource_exists(self, context, model, id):"},{"line_number":340,"context_line":"        try:"},{"line_number":341,"context_line":"            self._get_by_id(context, model, id)"},{"line_number":342,"context_line":"        except exc.NoResultFound:"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_792bf5ea","line":339,"updated":"2014-07-20 14:02:33.000000000","message":"+1\nHowever it maybe that \u0027exists\u0027 is what we are looking for.\nHave a look here:\nhttp://docs.sqlalchemy.org/en/rel_0_9/orm/query.html#sqlalchemy.orm.query.Query.exists","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"dcc71a0195fb64bfc9a9b461f6c832a90bb94676","unresolved":false,"context_lines":[{"line_number":336,"context_line":"                ctx.reraise \u003d True"},{"line_number":337,"context_line":"        return resource"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"    def _resource_exists(self, context, model, id):"},{"line_number":340,"context_line":"        try:"},{"line_number":341,"context_line":"            self._get_by_id(context, model, id)"},{"line_number":342,"context_line":"        except exc.NoResultFound:"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_3f731d17","line":339,"in_reply_to":"baada198_792bf5ea","updated":"2014-07-20 15:47:57.000000000","message":"I would actually prefer having an exists method that uses the sqlalchemy exists, but since all of neutron basically does what this method does (they actually just call the _get_resource method and catch the exception like what I did before) I\u0027d rather be consistent.","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"71b93873211d0af2b9e177fd7f59b1dbcb102475","unresolved":false,"context_lines":[{"line_number":402,"context_line":""},{"line_number":403,"context_line":"    def assert_modification_allowed(self, obj):"},{"line_number":404,"context_line":"        status \u003d getattr(obj, \u0027status\u0027, None)"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"        if status in [constants.PENDING_DELETE, constants.PENDING_UPDATE,"},{"line_number":407,"context_line":"                      constants.PENDING_CREATE]:"},{"line_number":408,"context_line":"            id \u003d getattr(obj, \u0027id\u0027, None)"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_39025d0c","line":405,"updated":"2014-07-20 14:02:33.000000000","message":"remove empty line","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"71b93873211d0af2b9e177fd7f59b1dbcb102475","unresolved":false,"context_lines":[{"line_number":408,"context_line":"            id \u003d getattr(obj, \u0027id\u0027, None)"},{"line_number":409,"context_line":"            raise loadbalancerv2.StateInvalid(id\u003did, state\u003dstatus)"},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"    def test_and_set_status(self, context, model, id, status):"},{"line_number":412,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":413,"context_line":"            model_db \u003d self._get_resource(context, model, id, for_update\u003dTrue)"},{"line_number":414,"context_line":"            self.assert_modification_allowed(model_db)"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_9c8d1734","line":411,"updated":"2014-07-20 14:02:33.000000000","message":"can you please explain the diffrence between \u0027test_and_set_status\u0027 and \u0027update_status\u0027 ?","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"dcc71a0195fb64bfc9a9b461f6c832a90bb94676","unresolved":false,"context_lines":[{"line_number":408,"context_line":"            id \u003d getattr(obj, \u0027id\u0027, None)"},{"line_number":409,"context_line":"            raise loadbalancerv2.StateInvalid(id\u003did, state\u003dstatus)"},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"    def test_and_set_status(self, context, model, id, status):"},{"line_number":412,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":413,"context_line":"            model_db \u003d self._get_resource(context, model, id, for_update\u003dTrue)"},{"line_number":414,"context_line":"            self.assert_modification_allowed(model_db)"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_ffc9a55a","line":411,"in_reply_to":"baada198_9c8d1734","updated":"2014-07-20 15:47:57.000000000","message":"well I suppose the only difference is the select for update lock in test_and_set_status.  I know what you\u0027re going to say next, update_status can just have a keyward argument of for_update and default it to false.  Will do this next update.","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"e0bc8ee553c965ec013acb9b02b6284e39c4a4a9","unresolved":false,"context_lines":[{"line_number":408,"context_line":"            id \u003d getattr(obj, \u0027id\u0027, None)"},{"line_number":409,"context_line":"            raise loadbalancerv2.StateInvalid(id\u003did, state\u003dstatus)"},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"    def test_and_set_status(self, context, model, id, status):"},{"line_number":412,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":413,"context_line":"            model_db \u003d self._get_resource(context, model, id, for_update\u003dTrue)"},{"line_number":414,"context_line":"            self.assert_modification_allowed(model_db)"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_30c0aa2a","line":411,"in_reply_to":"baada198_ffc9a55a","updated":"2014-07-20 21:48:10.000000000","message":"nevermind, it also does do a check for the any statuses that shouldn\u0027t allow further modification.  Hence the test in \"test_and_set_status\".  I\u0027d rather just keep it since it is just different enough to warrant its existence and use.  update_status just blindly updates the status.","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"71b93873211d0af2b9e177fd7f59b1dbcb102475","unresolved":false,"context_lines":[{"line_number":457,"context_line":"    def update_loadbalancer(self, context, id, loadbalancer):"},{"line_number":458,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":459,"context_line":"            lb_db \u003d self._get_resource(context, LoadBalancer, id)"},{"line_number":460,"context_line":""},{"line_number":461,"context_line":"            lb_db.update(loadbalancer)"},{"line_number":462,"context_line":""},{"line_number":463,"context_line":"        return lb_db"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_dc0a2f1f","line":460,"updated":"2014-07-20 14:02:33.000000000","message":"any reason for empty line[s]?","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"dcc71a0195fb64bfc9a9b461f6c832a90bb94676","unresolved":false,"context_lines":[{"line_number":457,"context_line":"    def update_loadbalancer(self, context, id, loadbalancer):"},{"line_number":458,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":459,"context_line":"            lb_db \u003d self._get_resource(context, LoadBalancer, id)"},{"line_number":460,"context_line":""},{"line_number":461,"context_line":"            lb_db.update(loadbalancer)"},{"line_number":462,"context_line":""},{"line_number":463,"context_line":"        return lb_db"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_3fc07d2a","line":460,"in_reply_to":"baada198_dc0a2f1f","updated":"2014-07-20 15:47:57.000000000","message":"No reason. Just good old fashioned blindness.  Will fix in next update.","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"71b93873211d0af2b9e177fd7f59b1dbcb102475","unresolved":false,"context_lines":[{"line_number":502,"context_line":""},{"line_number":503,"context_line":"                listener_db_entry \u003d Listener("},{"line_number":504,"context_line":"                    id\u003duuidutils.generate_uuid(),"},{"line_number":505,"context_line":"                    tenant_id\u003dtenant_id,"},{"line_number":506,"context_line":"                    name\u003dlistener[\u0027name\u0027],"},{"line_number":507,"context_line":"                    description\u003dlistener[\u0027description\u0027],"},{"line_number":508,"context_line":"                    loadbalancer_id\u003dlistener[\u0027loadbalancer_id\u0027],"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_1c3747e4","line":505,"updated":"2014-07-20 14:02:33.000000000","message":"Here we should have a \u0027mirror\u0027 function of the \u0027to_dict\u0027.\nWe have a dict and we  want to populate the SQLAlchemy object.\nAgain - I think it should be in the base Neutron model\n\nsomething like\n\n\ndef from_dict(model, attributes_dict, must_have_attributes\u003dNone, defaults \u003d None):\n    must_have_attributes \u003d must_have_attributes or []\n    defaults \u003d defaults or {}\n    for column in model.__table__.columns:\n        if column.name in must_have_attributes:\n            setattr(model, column.name, attributes_dict[column.name])\n        else:\n            default \u003d defaults.get(column.name)\n            setattr(model, column.name,attributes_dict.get(column.name,default))","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"dcc71a0195fb64bfc9a9b461f6c832a90bb94676","unresolved":false,"context_lines":[{"line_number":502,"context_line":""},{"line_number":503,"context_line":"                listener_db_entry \u003d Listener("},{"line_number":504,"context_line":"                    id\u003duuidutils.generate_uuid(),"},{"line_number":505,"context_line":"                    tenant_id\u003dtenant_id,"},{"line_number":506,"context_line":"                    name\u003dlistener[\u0027name\u0027],"},{"line_number":507,"context_line":"                    description\u003dlistener[\u0027description\u0027],"},{"line_number":508,"context_line":"                    loadbalancer_id\u003dlistener[\u0027loadbalancer_id\u0027],"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_9f098997","line":505,"in_reply_to":"baada198_1c3747e4","updated":"2014-07-20 15:47:57.000000000","message":"I like this.  What about a classmethod that does the same thing but returns an instance of cls?","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"82fea2ce55cd8f93430e828252cf05469ea8274a","unresolved":false,"context_lines":[{"line_number":502,"context_line":""},{"line_number":503,"context_line":"                listener_db_entry \u003d Listener("},{"line_number":504,"context_line":"                    id\u003duuidutils.generate_uuid(),"},{"line_number":505,"context_line":"                    tenant_id\u003dtenant_id,"},{"line_number":506,"context_line":"                    name\u003dlistener[\u0027name\u0027],"},{"line_number":507,"context_line":"                    description\u003dlistener[\u0027description\u0027],"},{"line_number":508,"context_line":"                    loadbalancer_id\u003dlistener[\u0027loadbalancer_id\u0027],"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_908df633","line":505,"in_reply_to":"baada198_9f098997","updated":"2014-07-20 21:40:11.000000000","message":"Actually, I take that back.  Since validation and defaults are already set at the extension layer, I think it\u0027s probably just better to do Listener(**listener), which basically would be a from_dict methd.  It is safe to assume that all these keys exist because that is what the extension layer is for.","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"71b93873211d0af2b9e177fd7f59b1dbcb102475","unresolved":false,"context_lines":[{"line_number":613,"context_line":"            pool[\u0027status\u0027] \u003d constants.PENDING_CREATE"},{"line_number":614,"context_line":"            if pool[\u0027healthmonitor_id\u0027] \u003d\u003d attributes.ATTR_NOT_SPECIFIED:"},{"line_number":615,"context_line":"                pool[\u0027healthmonitor_id\u0027] \u003d None"},{"line_number":616,"context_line":"            if pool[\u0027healthmonitor_id\u0027] is not None:"},{"line_number":617,"context_line":"                self._get_resource(context, HealthMonitorV2,"},{"line_number":618,"context_line":"                                   pool[\u0027healthmonitor_id\u0027])"},{"line_number":619,"context_line":"                filters \u003d {\u0027healthmonitor_id\u0027: [pool[\u0027healthmonitor_id\u0027]]}"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_bccd7b32","line":616,"updated":"2014-07-20 14:02:33.000000000","message":"The line below is good enough\n\nif pool[\u0027healthmonitor_id\u0027]:","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"dcc71a0195fb64bfc9a9b461f6c832a90bb94676","unresolved":false,"context_lines":[{"line_number":613,"context_line":"            pool[\u0027status\u0027] \u003d constants.PENDING_CREATE"},{"line_number":614,"context_line":"            if pool[\u0027healthmonitor_id\u0027] \u003d\u003d attributes.ATTR_NOT_SPECIFIED:"},{"line_number":615,"context_line":"                pool[\u0027healthmonitor_id\u0027] \u003d None"},{"line_number":616,"context_line":"            if pool[\u0027healthmonitor_id\u0027] is not None:"},{"line_number":617,"context_line":"                self._get_resource(context, HealthMonitorV2,"},{"line_number":618,"context_line":"                                   pool[\u0027healthmonitor_id\u0027])"},{"line_number":619,"context_line":"                filters \u003d {\u0027healthmonitor_id\u0027: [pool[\u0027healthmonitor_id\u0027]]}"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_1ff57982","line":616,"in_reply_to":"baada198_bccd7b32","updated":"2014-07-20 15:47:57.000000000","message":"yep","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"71b93873211d0af2b9e177fd7f59b1dbcb102475","unresolved":false,"context_lines":[{"line_number":614,"context_line":"            if pool[\u0027healthmonitor_id\u0027] \u003d\u003d attributes.ATTR_NOT_SPECIFIED:"},{"line_number":615,"context_line":"                pool[\u0027healthmonitor_id\u0027] \u003d None"},{"line_number":616,"context_line":"            if pool[\u0027healthmonitor_id\u0027] is not None:"},{"line_number":617,"context_line":"                self._get_resource(context, HealthMonitorV2,"},{"line_number":618,"context_line":"                                   pool[\u0027healthmonitor_id\u0027])"},{"line_number":619,"context_line":"                filters \u003d {\u0027healthmonitor_id\u0027: [pool[\u0027healthmonitor_id\u0027]]}"},{"line_number":620,"context_line":"                hmpool \u003d self._get_resources(context,"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_7cee838c","line":617,"updated":"2014-07-20 14:02:33.000000000","message":"Why do you call\n\n self._get_resource(...)\n\nif it is for validation - use the exists method please","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"dcc71a0195fb64bfc9a9b461f6c832a90bb94676","unresolved":false,"context_lines":[{"line_number":614,"context_line":"            if pool[\u0027healthmonitor_id\u0027] \u003d\u003d attributes.ATTR_NOT_SPECIFIED:"},{"line_number":615,"context_line":"                pool[\u0027healthmonitor_id\u0027] \u003d None"},{"line_number":616,"context_line":"            if pool[\u0027healthmonitor_id\u0027] is not None:"},{"line_number":617,"context_line":"                self._get_resource(context, HealthMonitorV2,"},{"line_number":618,"context_line":"                                   pool[\u0027healthmonitor_id\u0027])"},{"line_number":619,"context_line":"                filters \u003d {\u0027healthmonitor_id\u0027: [pool[\u0027healthmonitor_id\u0027]]}"},{"line_number":620,"context_line":"                hmpool \u003d self._get_resources(context,"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_5feb71a3","line":617,"in_reply_to":"baada198_7cee838c","updated":"2014-07-20 15:47:57.000000000","message":"missed this one.","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"71b93873211d0af2b9e177fd7f59b1dbcb102475","unresolved":false,"context_lines":[{"line_number":623,"context_line":"                if hmpool:"},{"line_number":624,"context_line":"                    raise loadbalancerv2.HealthMonitorInUse(monitor_id\u003did)"},{"line_number":625,"context_line":""},{"line_number":626,"context_line":"            pool_db \u003d PoolV2(id\u003duuidutils.generate_uuid(),"},{"line_number":627,"context_line":"                             tenant_id\u003dtenant_id,"},{"line_number":628,"context_line":"                             name\u003dpool[\u0027name\u0027],"},{"line_number":629,"context_line":"                             description\u003dpool[\u0027description\u0027],"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_5c2d3f8e","line":626,"updated":"2014-07-20 14:02:33.000000000","message":"from_dict","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"71b93873211d0af2b9e177fd7f59b1dbcb102475","unresolved":false,"context_lines":[{"line_number":679,"context_line":""},{"line_number":680,"context_line":"                member[\u0027status\u0027] \u003d constants.PENDING_CREATE"},{"line_number":681,"context_line":""},{"line_number":682,"context_line":"                member_db \u003d MemberV2("},{"line_number":683,"context_line":"                    id\u003duuidutils.generate_uuid(),"},{"line_number":684,"context_line":"                    tenant_id\u003dtenant_id,"},{"line_number":685,"context_line":"                    pool_id\u003dpool_id,"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_bc53bb14","line":682,"updated":"2014-07-20 14:02:33.000000000","message":"from_dict","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"71b93873211d0af2b9e177fd7f59b1dbcb102475","unresolved":false,"context_lines":[{"line_number":685,"context_line":"                    pool_id\u003dpool_id,"},{"line_number":686,"context_line":"                    address\u003dmember[\u0027address\u0027],"},{"line_number":687,"context_line":"                    protocol_port\u003dmember[\u0027protocol_port\u0027],"},{"line_number":688,"context_line":"                    weight\u003dmember.get(\u0027weight\u0027) or 1,"},{"line_number":689,"context_line":"                    admin_state_up\u003dmember.get(\u0027admin_state_up\u0027),"},{"line_number":690,"context_line":"                    subnet_id\u003dmember.get(\u0027subnet_id\u0027),"},{"line_number":691,"context_line":"                    status\u003dmember[\u0027status\u0027])"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_fc40d336","line":688,"updated":"2014-07-20 14:02:33.000000000","message":"member.get(\u0027weight\u0027,1)","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"dcc71a0195fb64bfc9a9b461f6c832a90bb94676","unresolved":false,"context_lines":[{"line_number":685,"context_line":"                    pool_id\u003dpool_id,"},{"line_number":686,"context_line":"                    address\u003dmember[\u0027address\u0027],"},{"line_number":687,"context_line":"                    protocol_port\u003dmember[\u0027protocol_port\u0027],"},{"line_number":688,"context_line":"                    weight\u003dmember.get(\u0027weight\u0027) or 1,"},{"line_number":689,"context_line":"                    admin_state_up\u003dmember.get(\u0027admin_state_up\u0027),"},{"line_number":690,"context_line":"                    subnet_id\u003dmember.get(\u0027subnet_id\u0027),"},{"line_number":691,"context_line":"                    status\u003dmember[\u0027status\u0027])"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_bf31ed5a","line":688,"in_reply_to":"baada198_fc40d336","updated":"2014-07-20 15:47:57.000000000","message":"actually, i shouldn\u0027t even default it here because the extension defaults it.  but yes that is the right way to do it.  don\u0027t know why i missed that.","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"71b93873211d0af2b9e177fd7f59b1dbcb102475","unresolved":false,"context_lines":[{"line_number":701,"context_line":"            if not self._resource_exists(context, PoolV2, pool_id):"},{"line_number":702,"context_line":"                raise loadbalancerv2.MemberNotFoundForPool(pool_id\u003dpool_id,"},{"line_number":703,"context_line":"                                                           member_id\u003did)"},{"line_number":704,"context_line":"            member_db \u003d self._get_resource(context, MemberV2, id)"},{"line_number":705,"context_line":"            if member_db:"},{"line_number":706,"context_line":"                member_db.update(member)"},{"line_number":707,"context_line":"        return member_db"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_9ca6f7bf","line":704,"updated":"2014-07-20 14:02:33.000000000","message":"I dont think member_db can be None - so there is no point in\n\u0027if member_db:\u0027","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"dcc71a0195fb64bfc9a9b461f6c832a90bb94676","unresolved":false,"context_lines":[{"line_number":701,"context_line":"            if not self._resource_exists(context, PoolV2, pool_id):"},{"line_number":702,"context_line":"                raise loadbalancerv2.MemberNotFoundForPool(pool_id\u003dpool_id,"},{"line_number":703,"context_line":"                                                           member_id\u003did)"},{"line_number":704,"context_line":"            member_db \u003d self._get_resource(context, MemberV2, id)"},{"line_number":705,"context_line":"            if member_db:"},{"line_number":706,"context_line":"                member_db.update(member)"},{"line_number":707,"context_line":"        return member_db"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_7f12f5b4","line":704,"in_reply_to":"baada198_9ca6f7bf","updated":"2014-07-20 15:47:57.000000000","message":"Well it can be with parallel or concurrent instances of the API.  However, I think I\u0027m going to resolve that another way because that issue will cause havoc with some drivers.","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"71b93873211d0af2b9e177fd7f59b1dbcb102475","unresolved":false,"context_lines":[{"line_number":739,"context_line":"            hm_db_entry \u003d HealthMonitorV2("},{"line_number":740,"context_line":"                id\u003duuidutils.generate_uuid(),"},{"line_number":741,"context_line":"                tenant_id\u003dtenant_id,"},{"line_number":742,"context_line":"                type\u003dhealthmonitor[\u0027type\u0027],"},{"line_number":743,"context_line":"                delay\u003dhealthmonitor[\u0027delay\u0027],"},{"line_number":744,"context_line":"                timeout\u003dhealthmonitor[\u0027timeout\u0027],"},{"line_number":745,"context_line":"                http_method\u003dhealthmonitor[\u0027http_method\u0027],"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_7cd04353","line":742,"updated":"2014-07-20 14:02:33.000000000","message":"from_dict","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"71b93873211d0af2b9e177fd7f59b1dbcb102475","unresolved":false,"context_lines":[{"line_number":753,"context_line":""},{"line_number":754,"context_line":"    def update_healthmonitor(self, context, id, healthmonitor):"},{"line_number":755,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":756,"context_line":"            hm_db \u003d self._get_resource(context, HealthMonitorV2, id)"},{"line_number":757,"context_line":"            hm_db.update(healthmonitor)"},{"line_number":758,"context_line":"        return hm_db"},{"line_number":759,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_fc945345","line":756,"updated":"2014-07-20 14:02:33.000000000","message":"Since you want to update the hm, dont you want to call _get_resource with for_update\u003dTrue","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"dcc71a0195fb64bfc9a9b461f6c832a90bb94676","unresolved":false,"context_lines":[{"line_number":753,"context_line":""},{"line_number":754,"context_line":"    def update_healthmonitor(self, context, id, healthmonitor):"},{"line_number":755,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":756,"context_line":"            hm_db \u003d self._get_resource(context, HealthMonitorV2, id)"},{"line_number":757,"context_line":"            hm_db.update(healthmonitor)"},{"line_number":758,"context_line":"        return hm_db"},{"line_number":759,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_df0dc190","line":756,"in_reply_to":"baada198_fc945345","updated":"2014-07-20 15:47:57.000000000","message":"In this case, since the plugin calls test_and_set_status before this, the status is now PENDING_UPDATE.  test_and_set_status will prevent any subsequent update calls from getting here if the status is PENDING_UPDATE.  So I shouldn\u0027t have to do the for_update.","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"71b93873211d0af2b9e177fd7f59b1dbcb102475","unresolved":false,"context_lines":[{"line_number":761,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":762,"context_line":"            hm_db_entry \u003d self._get_resource(context, HealthMonitorV2, id)"},{"line_number":763,"context_line":"            context.session.delete(hm_db_entry)"},{"line_number":764,"context_line":"        return None"},{"line_number":765,"context_line":""},{"line_number":766,"context_line":"    def get_healthmonitor(self, context, id):"},{"line_number":767,"context_line":"        return self._get_resource(context, HealthMonitorV2, id)"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_1c92e756","line":764,"updated":"2014-07-20 14:02:33.000000000","message":"Why we need the line\n\n\u0027return None\u0027","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"dcc71a0195fb64bfc9a9b461f6c832a90bb94676","unresolved":false,"context_lines":[{"line_number":761,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":762,"context_line":"            hm_db_entry \u003d self._get_resource(context, HealthMonitorV2, id)"},{"line_number":763,"context_line":"            context.session.delete(hm_db_entry)"},{"line_number":764,"context_line":"        return None"},{"line_number":765,"context_line":""},{"line_number":766,"context_line":"    def get_healthmonitor(self, context, id):"},{"line_number":767,"context_line":"        return self._get_resource(context, HealthMonitorV2, id)"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_1f23b905","line":764,"in_reply_to":"baada198_1c92e756","updated":"2014-07-20 15:47:57.000000000","message":"because I am an idiot :(","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"265c715d0fc035adb86ef5bcff6353414c7b96fa","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        if listener and self.listener:"},{"line_number":211,"context_line":"            pool_dict[\u0027listener\u0027] \u003d self.listener.to_dict(loadbalancer\u003dTrue)"},{"line_number":212,"context_line":"        if sessionpersistence and self.sessionpersistence:"},{"line_number":213,"context_line":"            pool_dict[\u0027session_persistence\u0027] \u003d \\"},{"line_number":214,"context_line":"                self.sessionpersistence.to_dict()"},{"line_number":215,"context_line":"        return pool_dict"},{"line_number":216,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_403f9087","line":213,"updated":"2014-07-23 03:52:59.000000000","message":"\"It is prefered to wrap long lines in parentheses and not a backslash for line continuation.\"","commit_id":"eedad358ef20d0228158510b4f3230786aefdffa"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"4a04e7c78c27af89c2131912f4576bb61818d5e3","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        if listener and self.listener:"},{"line_number":211,"context_line":"            pool_dict[\u0027listener\u0027] \u003d self.listener.to_dict(loadbalancer\u003dTrue)"},{"line_number":212,"context_line":"        if sessionpersistence and self.sessionpersistence:"},{"line_number":213,"context_line":"            pool_dict[\u0027session_persistence\u0027] \u003d \\"},{"line_number":214,"context_line":"                self.sessionpersistence.to_dict()"},{"line_number":215,"context_line":"        return pool_dict"},{"line_number":216,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_80236805","line":213,"in_reply_to":"baada198_403f9087","updated":"2014-07-23 04:00:15.000000000","message":"I know but I thought it would be silly to have a ( instead of a \\ by itself and then have to close it on the next line.  But changing it now.","commit_id":"eedad358ef20d0228158510b4f3230786aefdffa"},{"author":{"_account_id":7590,"name":"Pattabi Ayyasami","email":"pattabi@brocade.com","username":"pattabibrocade.com"},"change_message_id":"229cba758d4a868bf9a5d1ebc100a6622c05ac72","unresolved":false,"context_lines":[{"line_number":466,"context_line":"            lb_db \u003d self._get_resource(context, LoadBalancer, id)"},{"line_number":467,"context_line":"            if lb_db.listeners:"},{"line_number":468,"context_line":"                raise loadbalancerv2.LoadBalancerInUse("},{"line_number":469,"context_line":"                    listener_id\u003dlb_db.listener[0].id)"},{"line_number":470,"context_line":"            context.session.delete(lb_db)"},{"line_number":471,"context_line":"            context.session.delete(lb_db.vip_port)"},{"line_number":472,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_29bd2fd8","line":469,"updated":"2014-07-22 23:16:31.000000000","message":"Should be lb_db.listeners[0]","commit_id":"eedad358ef20d0228158510b4f3230786aefdffa"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"d67cfdbedd1520cc1229aa6ffc23d18e77916ade","unresolved":false,"context_lines":[{"line_number":466,"context_line":"            lb_db \u003d self._get_resource(context, LoadBalancer, id)"},{"line_number":467,"context_line":"            if lb_db.listeners:"},{"line_number":468,"context_line":"                raise loadbalancerv2.LoadBalancerInUse("},{"line_number":469,"context_line":"                    listener_id\u003dlb_db.listener[0].id)"},{"line_number":470,"context_line":"            context.session.delete(lb_db)"},{"line_number":471,"context_line":"            context.session.delete(lb_db.vip_port)"},{"line_number":472,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_2f636f42","line":469,"in_reply_to":"baada198_29bd2fd8","updated":"2014-07-23 01:05:21.000000000","message":"oh great catch!","commit_id":"eedad358ef20d0228158510b4f3230786aefdffa"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"d18352d790f14e6e0e836f4b9db169fa6c32020b","unresolved":false,"context_lines":[{"line_number":458,"context_line":""},{"line_number":459,"context_line":"    def update_loadbalancer(self, context, id, loadbalancer):"},{"line_number":460,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":461,"context_line":"            lb_db \u003d self._get_resource(context, LoadBalancer, id)"},{"line_number":462,"context_line":"            lb_db.update(loadbalancer)"},{"line_number":463,"context_line":"        return lb_db"},{"line_number":464,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_b2c7c645","line":461,"updated":"2014-07-23 12:57:11.000000000","message":"if you want to update the \u0027lb_db\u0027, why dont you call _get_resource with for_update\u003dTrue ? (or maybe I dont understand the flag \u0027for_update\u0027 ..)","commit_id":"94c0f34dacfbd3058466b1fedf72dbdceca845a6"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"fe4167f57aa3e0fa5ba102d88d10b61170e24948","unresolved":false,"context_lines":[{"line_number":458,"context_line":""},{"line_number":459,"context_line":"    def update_loadbalancer(self, context, id, loadbalancer):"},{"line_number":460,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":461,"context_line":"            lb_db \u003d self._get_resource(context, LoadBalancer, id)"},{"line_number":462,"context_line":"            lb_db.update(loadbalancer)"},{"line_number":463,"context_line":"        return lb_db"},{"line_number":464,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_198ed279","line":461,"in_reply_to":"baada198_b2c7c645","updated":"2014-07-24 03:27:58.000000000","message":"for_update is to use \"SELECT FOR UPDATE\", newer versions of sqlalchemy have this flag but the version used in neutron does not yet.  At least last time I checked.","commit_id":"94c0f34dacfbd3058466b1fedf72dbdceca845a6"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"d18352d790f14e6e0e836f4b9db169fa6c32020b","unresolved":false,"context_lines":[{"line_number":485,"context_line":""},{"line_number":486,"context_line":"                #Check for unspecified loadbalancer_id and listener_id and"},{"line_number":487,"context_line":"                #set to None"},{"line_number":488,"context_line":"                if (listener.get(\u0027loadbalancer_id\u0027) \u003d\u003d"},{"line_number":489,"context_line":"                        attributes.ATTR_NOT_SPECIFIED):"},{"line_number":490,"context_line":"                    listener[\u0027loadbalancer_id\u0027] \u003d None"},{"line_number":491,"context_line":"                if (listener.get(\u0027default_pool_id\u0027) \u003d\u003d"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_32165659","line":488,"updated":"2014-07-23 12:57:11.000000000","message":"for id in [\u0027loadbalancer_id\u0027, \u0027default_pool_id\u0027]:\n    if listener.get(id) \u003d\u003d attributes.ATTR_NOT_SPECIFIED:\n        listener[id] \u003d None","commit_id":"94c0f34dacfbd3058466b1fedf72dbdceca845a6"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"fe4167f57aa3e0fa5ba102d88d10b61170e24948","unresolved":false,"context_lines":[{"line_number":485,"context_line":""},{"line_number":486,"context_line":"                #Check for unspecified loadbalancer_id and listener_id and"},{"line_number":487,"context_line":"                #set to None"},{"line_number":488,"context_line":"                if (listener.get(\u0027loadbalancer_id\u0027) \u003d\u003d"},{"line_number":489,"context_line":"                        attributes.ATTR_NOT_SPECIFIED):"},{"line_number":490,"context_line":"                    listener[\u0027loadbalancer_id\u0027] \u003d None"},{"line_number":491,"context_line":"                if (listener.get(\u0027default_pool_id\u0027) \u003d\u003d"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_3798eb69","line":488,"in_reply_to":"baada198_32165659","updated":"2014-07-24 03:27:58.000000000","message":"Done","commit_id":"94c0f34dacfbd3058466b1fedf72dbdceca845a6"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"d18352d790f14e6e0e836f4b9db169fa6c32020b","unresolved":false,"context_lines":[{"line_number":519,"context_line":"                listener.get(\u0027loadbalancer_id\u0027) !\u003d"},{"line_number":520,"context_line":"                    attributes.ATTR_NOT_SPECIFIED):"},{"line_number":521,"context_line":"                raise loadbalancerv2.LoadBalancerIDImmutable()"},{"line_number":522,"context_line":"            if (listener.get(\u0027loadbalancer_id\u0027) \u003d\u003d"},{"line_number":523,"context_line":"                    attributes.ATTR_NOT_SPECIFIED):"},{"line_number":524,"context_line":"                listener[\u0027loadbalancer_id\u0027] \u003d None"},{"line_number":525,"context_line":"            if (listener.get(\u0027default_pool_id\u0027) \u003d\u003d"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_f548485e","line":522,"updated":"2014-07-23 12:57:11.000000000","message":"for id in [\u0027loadbalancer_id\u0027, \u0027default_pool_id\u0027]:\n    if listener.get(id) \u003d\u003d attributes.ATTR_NOT_SPECIFIED:\n        listener[id] \u003d None","commit_id":"94c0f34dacfbd3058466b1fedf72dbdceca845a6"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"b4dd0414e92e2481f4ceab1c05374e76ae798b04","unresolved":false,"context_lines":[{"line_number":519,"context_line":"                listener.get(\u0027loadbalancer_id\u0027) !\u003d"},{"line_number":520,"context_line":"                    attributes.ATTR_NOT_SPECIFIED):"},{"line_number":521,"context_line":"                raise loadbalancerv2.LoadBalancerIDImmutable()"},{"line_number":522,"context_line":"            if (listener.get(\u0027loadbalancer_id\u0027) \u003d\u003d"},{"line_number":523,"context_line":"                    attributes.ATTR_NOT_SPECIFIED):"},{"line_number":524,"context_line":"                listener[\u0027loadbalancer_id\u0027] \u003d None"},{"line_number":525,"context_line":"            if (listener.get(\u0027default_pool_id\u0027) \u003d\u003d"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_9757f726","line":522,"in_reply_to":"baada198_f548485e","updated":"2014-07-24 21:20:22.000000000","message":"Actually I don\u0027t even need to have this check in here since those values won\u0027t get defaulted on update.","commit_id":"94c0f34dacfbd3058466b1fedf72dbdceca845a6"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"fe4167f57aa3e0fa5ba102d88d10b61170e24948","unresolved":false,"context_lines":[{"line_number":519,"context_line":"                listener.get(\u0027loadbalancer_id\u0027) !\u003d"},{"line_number":520,"context_line":"                    attributes.ATTR_NOT_SPECIFIED):"},{"line_number":521,"context_line":"                raise loadbalancerv2.LoadBalancerIDImmutable()"},{"line_number":522,"context_line":"            if (listener.get(\u0027loadbalancer_id\u0027) \u003d\u003d"},{"line_number":523,"context_line":"                    attributes.ATTR_NOT_SPECIFIED):"},{"line_number":524,"context_line":"                listener[\u0027loadbalancer_id\u0027] \u003d None"},{"line_number":525,"context_line":"            if (listener.get(\u0027default_pool_id\u0027) \u003d\u003d"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_579b9f65","line":522,"in_reply_to":"baada198_f548485e","updated":"2014-07-24 03:27:58.000000000","message":"Done","commit_id":"94c0f34dacfbd3058466b1fedf72dbdceca845a6"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"d18352d790f14e6e0e836f4b9db169fa6c32020b","unresolved":false,"context_lines":[{"line_number":533,"context_line":"        listener_db_entry \u003d self._get_resource(context, Listener, id)"},{"line_number":534,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":535,"context_line":"            context.session.delete(listener_db_entry)"},{"line_number":536,"context_line":"        return None"},{"line_number":537,"context_line":""},{"line_number":538,"context_line":"    def get_listeners(self, context, filters\u003dNone):"},{"line_number":539,"context_line":"        return self._get_resources(context, Listener, filters\u003dfilters)"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_bb75e898","line":536,"updated":"2014-07-23 12:57:11.000000000","message":"remove: \n\nreturn None","commit_id":"94c0f34dacfbd3058466b1fedf72dbdceca845a6"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"fe4167f57aa3e0fa5ba102d88d10b61170e24948","unresolved":false,"context_lines":[{"line_number":533,"context_line":"        listener_db_entry \u003d self._get_resource(context, Listener, id)"},{"line_number":534,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":535,"context_line":"            context.session.delete(listener_db_entry)"},{"line_number":536,"context_line":"        return None"},{"line_number":537,"context_line":""},{"line_number":538,"context_line":"    def get_listeners(self, context, filters\u003dNone):"},{"line_number":539,"context_line":"        return self._get_resources(context, Listener, filters\u003dfilters)"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_979c575d","line":536,"in_reply_to":"baada198_bb75e898","updated":"2014-07-24 03:27:58.000000000","message":"how did these get in there?","commit_id":"94c0f34dacfbd3058466b1fedf72dbdceca845a6"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"d18352d790f14e6e0e836f4b9db169fa6c32020b","unresolved":false,"context_lines":[{"line_number":546,"context_line":""},{"line_number":547,"context_line":"        :param info: Session persistence info"},{"line_number":548,"context_line":"        \"\"\""},{"line_number":549,"context_line":"        if info[\u0027type\u0027] \u003d\u003d \u0027APP_COOKIE\u0027:"},{"line_number":550,"context_line":"            if not info.get(\u0027cookie_name\u0027):"},{"line_number":551,"context_line":"                raise ValueError(_(\"\u0027cookie_name\u0027 should be specified for this\""},{"line_number":552,"context_line":"                                   \" type of session persistence.\"))"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_5b74cc35","line":549,"updated":"2014-07-23 12:57:11.000000000","message":"1) Please Use the constants defined in SUPPORTED_SP_TYPES (SESSION_PERSISTENCE_APP_COOKIE)\n2) If the REST engine could support \u0027entity level validation\u0027, this code should be part of the Pool validation in the REST layer. Since  there is no support (yet?) , I am asking you to add a comment telling that one day we should move this logic to the REST layer (or even open a bug in order to document it)","commit_id":"94c0f34dacfbd3058466b1fedf72dbdceca845a6"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"fe4167f57aa3e0fa5ba102d88d10b61170e24948","unresolved":false,"context_lines":[{"line_number":546,"context_line":""},{"line_number":547,"context_line":"        :param info: Session persistence info"},{"line_number":548,"context_line":"        \"\"\""},{"line_number":549,"context_line":"        if info[\u0027type\u0027] \u003d\u003d \u0027APP_COOKIE\u0027:"},{"line_number":550,"context_line":"            if not info.get(\u0027cookie_name\u0027):"},{"line_number":551,"context_line":"                raise ValueError(_(\"\u0027cookie_name\u0027 should be specified for this\""},{"line_number":552,"context_line":"                                   \" type of session persistence.\"))"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_d7bdefb2","line":549,"in_reply_to":"baada198_5b74cc35","updated":"2014-07-24 03:27:58.000000000","message":"Good catch on this.  About the comment, i can certainly do that. Mark has mentioned that they are going to overhaul the extension loading code so that would be a good time to add that requirement in (among many many others).  Who knows when that will happen though because that is quite a large undertaking.","commit_id":"94c0f34dacfbd3058466b1fedf72dbdceca845a6"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"d18352d790f14e6e0e836f4b9db169fa6c32020b","unresolved":false,"context_lines":[{"line_number":558,"context_line":"    def _create_session_persistence_db(self, session_info, pool_id):"},{"line_number":559,"context_line":"        self._check_session_persistence_info(session_info)"},{"line_number":560,"context_line":"        session_info[\u0027pool_id\u0027] \u003d pool_id"},{"line_number":561,"context_line":"        sp_db \u003d SessionPersistenceV2(**session_info)"},{"line_number":562,"context_line":"        return sp_db"},{"line_number":563,"context_line":""},{"line_number":564,"context_line":"    def _update_pool_session_persistence(self, context, pool_id, info):"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_1b6b3420","line":561,"updated":"2014-07-23 12:57:11.000000000","message":"return SessionPersistenceV2(**session_info)","commit_id":"94c0f34dacfbd3058466b1fedf72dbdceca845a6"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"fe4167f57aa3e0fa5ba102d88d10b61170e24948","unresolved":false,"context_lines":[{"line_number":558,"context_line":"    def _create_session_persistence_db(self, session_info, pool_id):"},{"line_number":559,"context_line":"        self._check_session_persistence_info(session_info)"},{"line_number":560,"context_line":"        session_info[\u0027pool_id\u0027] \u003d pool_id"},{"line_number":561,"context_line":"        sp_db \u003d SessionPersistenceV2(**session_info)"},{"line_number":562,"context_line":"        return sp_db"},{"line_number":563,"context_line":""},{"line_number":564,"context_line":"    def _update_pool_session_persistence(self, context, pool_id, info):"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_f7dbd31e","line":561,"in_reply_to":"baada198_1b6b3420","updated":"2014-07-24 03:27:58.000000000","message":"Done","commit_id":"94c0f34dacfbd3058466b1fedf72dbdceca845a6"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"d18352d790f14e6e0e836f4b9db169fa6c32020b","unresolved":false,"context_lines":[{"line_number":579,"context_line":"            if sesspersist_db:"},{"line_number":580,"context_line":"                sesspersist_db.update(info)"},{"line_number":581,"context_line":"            else:"},{"line_number":582,"context_line":"                sesspersist_db \u003d SessionPersistenceV2("},{"line_number":583,"context_line":"                    type\u003dinfo[\u0027type\u0027],"},{"line_number":584,"context_line":"                    cookie_name\u003dinfo[\u0027cookie_name\u0027],"},{"line_number":585,"context_line":"                    pool_id\u003dpool_id)"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_561bc172","line":582,"updated":"2014-07-23 12:57:11.000000000","message":"Consistency:\nsesspersist_db \u003dSessionPersistenceV2(**info)","commit_id":"94c0f34dacfbd3058466b1fedf72dbdceca845a6"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"fe4167f57aa3e0fa5ba102d88d10b61170e24948","unresolved":false,"context_lines":[{"line_number":579,"context_line":"            if sesspersist_db:"},{"line_number":580,"context_line":"                sesspersist_db.update(info)"},{"line_number":581,"context_line":"            else:"},{"line_number":582,"context_line":"                sesspersist_db \u003d SessionPersistenceV2("},{"line_number":583,"context_line":"                    type\u003dinfo[\u0027type\u0027],"},{"line_number":584,"context_line":"                    cookie_name\u003dinfo[\u0027cookie_name\u0027],"},{"line_number":585,"context_line":"                    pool_id\u003dpool_id)"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_17df670d","line":582,"in_reply_to":"baada198_561bc172","updated":"2014-07-24 03:27:58.000000000","message":"Done","commit_id":"94c0f34dacfbd3058466b1fedf72dbdceca845a6"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"d18352d790f14e6e0e836f4b9db169fa6c32020b","unresolved":false,"context_lines":[{"line_number":609,"context_line":"                hmpool \u003d self._get_resources(context,"},{"line_number":610,"context_line":"                                             PoolV2,"},{"line_number":611,"context_line":"                                             filters\u003dfilters)"},{"line_number":612,"context_line":"                if hmpool:"},{"line_number":613,"context_line":"                    raise loadbalancerv2.HealthMonitorInUse(monitor_id\u003did)"},{"line_number":614,"context_line":""},{"line_number":615,"context_line":"            session_info \u003d pool.pop(\u0027session_persistence\u0027)"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_5b04cc17","line":612,"updated":"2014-07-23 12:57:11.000000000","message":"Please explain how \u0027hmpool\u0027 can be None","commit_id":"94c0f34dacfbd3058466b1fedf72dbdceca845a6"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"b4dd0414e92e2481f4ceab1c05374e76ae798b04","unresolved":false,"context_lines":[{"line_number":609,"context_line":"                hmpool \u003d self._get_resources(context,"},{"line_number":610,"context_line":"                                             PoolV2,"},{"line_number":611,"context_line":"                                             filters\u003dfilters)"},{"line_number":612,"context_line":"                if hmpool:"},{"line_number":613,"context_line":"                    raise loadbalancerv2.HealthMonitorInUse(monitor_id\u003did)"},{"line_number":614,"context_line":""},{"line_number":615,"context_line":"            session_info \u003d pool.pop(\u0027session_persistence\u0027)"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_52cc8dbb","line":612,"in_reply_to":"baada198_37e62be9","updated":"2014-07-24 21:20:22.000000000","message":"Actually, this check is to make sure hmpool is not empty.  We decided to keep healthmonitors unique across pools for simplicity right now.  This can easily be changed later.  This ensures that a healthmonitor cannot exist on more than one pool.","commit_id":"94c0f34dacfbd3058466b1fedf72dbdceca845a6"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"fe4167f57aa3e0fa5ba102d88d10b61170e24948","unresolved":false,"context_lines":[{"line_number":609,"context_line":"                hmpool \u003d self._get_resources(context,"},{"line_number":610,"context_line":"                                             PoolV2,"},{"line_number":611,"context_line":"                                             filters\u003dfilters)"},{"line_number":612,"context_line":"                if hmpool:"},{"line_number":613,"context_line":"                    raise loadbalancerv2.HealthMonitorInUse(monitor_id\u003did)"},{"line_number":614,"context_line":""},{"line_number":615,"context_line":"            session_info \u003d pool.pop(\u0027session_persistence\u0027)"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_37e62be9","line":612,"in_reply_to":"baada198_5b04cc17","updated":"2014-07-24 03:27:58.000000000","message":"Done","commit_id":"94c0f34dacfbd3058466b1fedf72dbdceca845a6"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"d18352d790f14e6e0e836f4b9db169fa6c32020b","unresolved":false,"context_lines":[{"line_number":616,"context_line":"            pool_db \u003d PoolV2(**pool)"},{"line_number":617,"context_line":""},{"line_number":618,"context_line":"            if session_info:"},{"line_number":619,"context_line":"                s_p \u003d self._create_session_persistence_db(session_info,"},{"line_number":620,"context_line":"                                                          pool_db.id)"},{"line_number":621,"context_line":"                pool_db.sessionpersistence \u003d s_p"},{"line_number":622,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_1694e98a","line":619,"updated":"2014-07-23 12:57:11.000000000","message":"why we need s_p?","commit_id":"94c0f34dacfbd3058466b1fedf72dbdceca845a6"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"fe4167f57aa3e0fa5ba102d88d10b61170e24948","unresolved":false,"context_lines":[{"line_number":616,"context_line":"            pool_db \u003d PoolV2(**pool)"},{"line_number":617,"context_line":""},{"line_number":618,"context_line":"            if session_info:"},{"line_number":619,"context_line":"                s_p \u003d self._create_session_persistence_db(session_info,"},{"line_number":620,"context_line":"                                                          pool_db.id)"},{"line_number":621,"context_line":"                pool_db.sessionpersistence \u003d s_p"},{"line_number":622,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_17068785","line":619,"in_reply_to":"baada198_1694e98a","updated":"2014-07-24 03:27:58.000000000","message":"I think this is fine and it keeps line 621 from becoming two lines.","commit_id":"94c0f34dacfbd3058466b1fedf72dbdceca845a6"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"d18352d790f14e6e0e836f4b9db169fa6c32020b","unresolved":false,"context_lines":[{"line_number":630,"context_line":"                                             pool[\u0027healthmonitor_id\u0027]):"},{"line_number":631,"context_line":"                    raise loadbalancerv2.HealthMonitorNotFound("},{"line_number":632,"context_line":"                        monitor_id\u003dpool[\u0027healthmonitor_id\u0027])"},{"line_number":633,"context_line":"            sp \u003d pool.pop(\u0027session_persistence\u0027, None)"},{"line_number":634,"context_line":"            if sp:"},{"line_number":635,"context_line":"                self._update_pool_session_persistence(context, id, sp)"},{"line_number":636,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_92cba2a3","line":633,"updated":"2014-07-23 12:57:11.000000000","message":"Why it is importnat to pop the sp from the pool?\nDo you think it will cause a problem in the SQLAlchemy layer?","commit_id":"94c0f34dacfbd3058466b1fedf72dbdceca845a6"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"fe4167f57aa3e0fa5ba102d88d10b61170e24948","unresolved":false,"context_lines":[{"line_number":630,"context_line":"                                             pool[\u0027healthmonitor_id\u0027]):"},{"line_number":631,"context_line":"                    raise loadbalancerv2.HealthMonitorNotFound("},{"line_number":632,"context_line":"                        monitor_id\u003dpool[\u0027healthmonitor_id\u0027])"},{"line_number":633,"context_line":"            sp \u003d pool.pop(\u0027session_persistence\u0027, None)"},{"line_number":634,"context_line":"            if sp:"},{"line_number":635,"context_line":"                self._update_pool_session_persistence(context, id, sp)"},{"line_number":636,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_172da7fd","line":633,"in_reply_to":"baada198_92cba2a3","updated":"2014-07-24 03:27:58.000000000","message":"I don\u0027t know.  I probably blindly copied this logic from the v1 code.  I don\u0027t think its too big of a deal though.","commit_id":"94c0f34dacfbd3058466b1fedf72dbdceca845a6"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"d18352d790f14e6e0e836f4b9db169fa6c32020b","unresolved":false,"context_lines":[{"line_number":663,"context_line":"                self._load_id_and_tenant_id(context, member)"},{"line_number":664,"context_line":"                member[\u0027pool_id\u0027] \u003d pool_id"},{"line_number":665,"context_line":"                member[\u0027status\u0027] \u003d constants.PENDING_CREATE"},{"line_number":666,"context_line":""},{"line_number":667,"context_line":"                member_db \u003d MemberV2(**member)"},{"line_number":668,"context_line":"                context.session.add(member_db)"},{"line_number":669,"context_line":"        except exception.DBDuplicateEntry:"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_d6aef180","line":666,"updated":"2014-07-23 12:57:11.000000000","message":"A general comment about empty lines.\nAs far as I understand you should try to avoid them (unless you have a good reason to have them)","commit_id":"94c0f34dacfbd3058466b1fedf72dbdceca845a6"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"fe4167f57aa3e0fa5ba102d88d10b61170e24948","unresolved":false,"context_lines":[{"line_number":663,"context_line":"                self._load_id_and_tenant_id(context, member)"},{"line_number":664,"context_line":"                member[\u0027pool_id\u0027] \u003d pool_id"},{"line_number":665,"context_line":"                member[\u0027status\u0027] \u003d constants.PENDING_CREATE"},{"line_number":666,"context_line":""},{"line_number":667,"context_line":"                member_db \u003d MemberV2(**member)"},{"line_number":668,"context_line":"                context.session.add(member_db)"},{"line_number":669,"context_line":"        except exception.DBDuplicateEntry:"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_d7708f0a","line":666,"in_reply_to":"baada198_d6aef180","updated":"2014-07-24 03:27:58.000000000","message":"I think empty lines are a good way to group logical sections.  This is separating logic of assigning new values.  However, I will remove them since it is inconsistent with the rest of the code on when it is used, and that is definitely something I need to work on.","commit_id":"94c0f34dacfbd3058466b1fedf72dbdceca845a6"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"a86b122178ecef51785499d6a2d73a0971d21da7","unresolved":false,"context_lines":[{"line_number":447,"context_line":"            context.session.add(lb_db)"},{"line_number":448,"context_line":"            context.session.flush()"},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"            self._create_port_for_load_balancer(context, lb_db, vip_address)"},{"line_number":451,"context_line":""},{"line_number":452,"context_line":"            lb_db.stats \u003d self._create_loadbalancer_stats("},{"line_number":453,"context_line":"                context, lb_db.id)"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_e84bf45c","line":450,"updated":"2014-07-24 05:33:54.000000000","message":"this part needs to be refactored in some way: port creation need to be moved outside the transaction, see this patch for the reference: https://review.openstack.org/#/c/108945/\n\nPort creation usually includes rpc notification so it causes eventlet to yield to a different greenthread which then causes various issues with db access.","commit_id":"73743d0dd64504ee275ea3515295f024f7575def"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"80897d7561f1061d50813976ac587a1d55fa7093","unresolved":false,"context_lines":[{"line_number":447,"context_line":"            context.session.add(lb_db)"},{"line_number":448,"context_line":"            context.session.flush()"},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"            self._create_port_for_load_balancer(context, lb_db, vip_address)"},{"line_number":451,"context_line":""},{"line_number":452,"context_line":"            lb_db.stats \u003d self._create_loadbalancer_stats("},{"line_number":453,"context_line":"                context, lb_db.id)"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_7df5c1c9","line":450,"in_reply_to":"baada198_e84bf45c","updated":"2014-07-24 21:15:56.000000000","message":"Ah, good to know.  Thanks for this update.","commit_id":"73743d0dd64504ee275ea3515295f024f7575def"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"a86b122178ecef51785499d6a2d73a0971d21da7","unresolved":false,"context_lines":[{"line_number":468,"context_line":"                raise loadbalancerv2.LoadBalancerInUse("},{"line_number":469,"context_line":"                    listener_id\u003dlb_db.listeners[0].id)"},{"line_number":470,"context_line":"            context.session.delete(lb_db)"},{"line_number":471,"context_line":"            context.session.delete(lb_db.vip_port)"},{"line_number":472,"context_line":""},{"line_number":473,"context_line":"    def get_loadbalancers(self, context, filters\u003dNone):"},{"line_number":474,"context_line":"        return self._get_resources(context, LoadBalancer, filters\u003dfilters)"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_a849fc61","line":471,"updated":"2014-07-24 05:33:54.000000000","message":"i\u0027m not sure that is so simple. Should not it be port_delete()? If so, that also should be done outside the transaction","commit_id":"73743d0dd64504ee275ea3515295f024f7575def"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"80897d7561f1061d50813976ac587a1d55fa7093","unresolved":false,"context_lines":[{"line_number":468,"context_line":"                raise loadbalancerv2.LoadBalancerInUse("},{"line_number":469,"context_line":"                    listener_id\u003dlb_db.listeners[0].id)"},{"line_number":470,"context_line":"            context.session.delete(lb_db)"},{"line_number":471,"context_line":"            context.session.delete(lb_db.vip_port)"},{"line_number":472,"context_line":""},{"line_number":473,"context_line":"    def get_loadbalancers(self, context, filters\u003dNone):"},{"line_number":474,"context_line":"        return self._get_resources(context, LoadBalancer, filters\u003dfilters)"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_7d36a1e8","line":471,"in_reply_to":"baada198_a849fc61","updated":"2014-07-24 21:15:56.000000000","message":"yikes.  thanks for catching this.  must have been a late night at the end of long day when I did this.","commit_id":"73743d0dd64504ee275ea3515295f024f7575def"},{"author":{"_account_id":7590,"name":"Pattabi Ayyasami","email":"pattabi@brocade.com","username":"pattabibrocade.com"},"change_message_id":"0769b1b26b99015aecadc4d88c8009d8341086d1","unresolved":false,"context_lines":[{"line_number":512,"context_line":"                raise loadbalancerv2.LoadBalancerIDImmutable()"},{"line_number":513,"context_line":""},{"line_number":514,"context_line":"            listener_db.update(listener)"},{"line_number":515,"context_line":"        return listener_db"},{"line_number":516,"context_line":""},{"line_number":517,"context_line":"    def delete_listener(self, context, id):"},{"line_number":518,"context_line":"        listener_db_entry \u003d self._get_resource(context, Listener, id)"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_a9f47b55","line":515,"updated":"2014-07-24 23:07:43.000000000","message":"Question: Any specifc reason why the db object is retured as is instead of wrapping it in a dictionary (similar to version 1).\r\n\r\nIn update APIs in the plugin code, old and new value is passed to the driver. However, the old and new objects happens to be the same object.\r\nOne option is to convert the db object to a dictionary in the plugin update_xxx methods and pass the dictionary to the driver API.  Any thoughts ?","commit_id":"73743d0dd64504ee275ea3515295f024f7575def"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"654d284499a9320662c59fcaf588f91d47b2a3d3","unresolved":false,"context_lines":[{"line_number":512,"context_line":"                raise loadbalancerv2.LoadBalancerIDImmutable()"},{"line_number":513,"context_line":""},{"line_number":514,"context_line":"            listener_db.update(listener)"},{"line_number":515,"context_line":"        return listener_db"},{"line_number":516,"context_line":""},{"line_number":517,"context_line":"    def delete_listener(self, context, id):"},{"line_number":518,"context_line":"        listener_db_entry \u003d self._get_resource(context, Listener, id)"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_b78e8dcf","line":515,"in_reply_to":"baada198_a9f47b55","updated":"2014-07-25 03:52:30.000000000","message":"I replied to this in the plugin code.","commit_id":"73743d0dd64504ee275ea3515295f024f7575def"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"5ada3ece79227aa9f8a287db7d4b2aecc7ca1b08","unresolved":false,"context_lines":[{"line_number":530,"context_line":""},{"line_number":531,"context_line":"        :param info: Session persistence info"},{"line_number":532,"context_line":"        \"\"\""},{"line_number":533,"context_line":"        if info[\u0027type\u0027] \u003d\u003d \u0027APP_COOKIE\u0027:"},{"line_number":534,"context_line":"            if not info.get(\u0027cookie_name\u0027):"},{"line_number":535,"context_line":"                raise ValueError(_(\"\u0027cookie_name\u0027 should be specified for this\""},{"line_number":536,"context_line":"                                   \" type of session persistence.\"))"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_3122b4a3","line":533,"updated":"2014-07-24 06:45:53.000000000","message":"See the comment in patch #25","commit_id":"73743d0dd64504ee275ea3515295f024f7575def"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"80897d7561f1061d50813976ac587a1d55fa7093","unresolved":false,"context_lines":[{"line_number":530,"context_line":""},{"line_number":531,"context_line":"        :param info: Session persistence info"},{"line_number":532,"context_line":"        \"\"\""},{"line_number":533,"context_line":"        if info[\u0027type\u0027] \u003d\u003d \u0027APP_COOKIE\u0027:"},{"line_number":534,"context_line":"            if not info.get(\u0027cookie_name\u0027):"},{"line_number":535,"context_line":"                raise ValueError(_(\"\u0027cookie_name\u0027 should be specified for this\""},{"line_number":536,"context_line":"                                   \" type of session persistence.\"))"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_a0fe50ad","line":533,"in_reply_to":"baada198_3122b4a3","updated":"2014-07-24 21:15:56.000000000","message":"whoops, git stash fail.","commit_id":"73743d0dd64504ee275ea3515295f024f7575def"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"5ada3ece79227aa9f8a287db7d4b2aecc7ca1b08","unresolved":false,"context_lines":[{"line_number":589,"context_line":"                hmpool \u003d self._get_resources(context,"},{"line_number":590,"context_line":"                                             PoolV2,"},{"line_number":591,"context_line":"                                             filters\u003dfilters)"},{"line_number":592,"context_line":"                if hmpool:"},{"line_number":593,"context_line":"                    raise loadbalancerv2.HealthMonitorInUse(monitor_id\u003did)"},{"line_number":594,"context_line":""},{"line_number":595,"context_line":"            session_info \u003d pool.pop(\u0027session_persistence\u0027)"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_713a6cc5","line":592,"updated":"2014-07-24 06:45:53.000000000","message":"See the comment in patch #25","commit_id":"73743d0dd64504ee275ea3515295f024f7575def"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"80897d7561f1061d50813976ac587a1d55fa7093","unresolved":false,"context_lines":[{"line_number":589,"context_line":"                hmpool \u003d self._get_resources(context,"},{"line_number":590,"context_line":"                                             PoolV2,"},{"line_number":591,"context_line":"                                             filters\u003dfilters)"},{"line_number":592,"context_line":"                if hmpool:"},{"line_number":593,"context_line":"                    raise loadbalancerv2.HealthMonitorInUse(monitor_id\u003did)"},{"line_number":594,"context_line":""},{"line_number":595,"context_line":"            session_info \u003d pool.pop(\u0027session_persistence\u0027)"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_7dcdc15c","line":592,"in_reply_to":"baada198_713a6cc5","updated":"2014-07-24 21:15:56.000000000","message":"I replied back on this one and it is a valid check.  I do need to rename to a plural version because it is a list.","commit_id":"73743d0dd64504ee275ea3515295f024f7575def"},{"author":{"_account_id":7590,"name":"Pattabi Ayyasami","email":"pattabi@brocade.com","username":"pattabibrocade.com"},"change_message_id":"0769b1b26b99015aecadc4d88c8009d8341086d1","unresolved":false,"context_lines":[{"line_number":723,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":724,"context_line":"            loadbalancer \u003d self._get_resource(context, LoadBalancer,"},{"line_number":725,"context_line":"                                              loadbalancer_id)"},{"line_number":726,"context_line":"        return loadbalancer.stats"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_a918fbcd","line":726,"updated":"2014-07-24 23:07:43.000000000","message":"As I understand, a pool can be associated to only one listener. However, via API, 2 listeners can be updated/created with the same pool id. Code should check for this scenario and raise appropriate exception. Currently, DB exception hapeens and the error is not propagated properly.\r\n\r\nSimilar for the health monitor also","commit_id":"73743d0dd64504ee275ea3515295f024f7575def"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"654d284499a9320662c59fcaf588f91d47b2a3d3","unresolved":false,"context_lines":[{"line_number":723,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":724,"context_line":"            loadbalancer \u003d self._get_resource(context, LoadBalancer,"},{"line_number":725,"context_line":"                                              loadbalancer_id)"},{"line_number":726,"context_line":"        return loadbalancer.stats"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_f7bba572","line":726,"in_reply_to":"baada198_a918fbcd","updated":"2014-07-25 03:52:30.000000000","message":"Will add this check in soon.","commit_id":"73743d0dd64504ee275ea3515295f024f7575def"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"8b0ceb9c7e9064bb48cc2ea610cc0058a38d3c8f","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                                 sa.ForeignKey(\"lbaas_healthmonitors.id\"),"},{"line_number":187,"context_line":"                                 unique\u003dTrue,"},{"line_number":188,"context_line":"                                 nullable\u003dTrue)"},{"line_number":189,"context_line":"    protocol \u003d sa.Column(sa.Enum(*lb_const.SUPPORTED_PROTOCOLS,"},{"line_number":190,"context_line":"                                 name\u003d\"lb_protocols\"),"},{"line_number":191,"context_line":"                         nullable\u003dFalse)"},{"line_number":192,"context_line":"    lb_algorithm \u003d sa.Column(sa.Enum(*lb_const.SUPPORTED_LB_ALGORITHMS,"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_38b505d0","line":189,"updated":"2014-07-25 10:30:05.000000000","message":"Please, pay attention that SUPPORTED_PROTOCOLS \u003d [ \u0027TCP\u0027, \u0027HTTPS\u0027, \u0027HTTP\u0027, \u0027TERMINATED-HTTPS\u0027], but in migration this type is set lb_protocols to [\u0027TCP\u0027, \u0027HTTPS\u0027, \u0027HTTP\u0027].","commit_id":"74b47eae5013d56322970f167eabee666ad0920b"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"fa1c2239cbbd3727f7a55d5ca435087db654e9b7","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                                 sa.ForeignKey(\"lbaas_healthmonitors.id\"),"},{"line_number":187,"context_line":"                                 unique\u003dTrue,"},{"line_number":188,"context_line":"                                 nullable\u003dTrue)"},{"line_number":189,"context_line":"    protocol \u003d sa.Column(sa.Enum(*lb_const.SUPPORTED_PROTOCOLS,"},{"line_number":190,"context_line":"                                 name\u003d\"lb_protocols\"),"},{"line_number":191,"context_line":"                         nullable\u003dFalse)"},{"line_number":192,"context_line":"    lb_algorithm \u003d sa.Column(sa.Enum(*lb_const.SUPPORTED_LB_ALGORITHMS,"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_392a67e7","line":189,"in_reply_to":"baada198_38b505d0","updated":"2014-07-25 13:29:24.000000000","message":"I do not believe this is the case.  You might be comparing with the tls termination review.  If I\u0027m wrong let me know, but I cannot find this anywhere.","commit_id":"74b47eae5013d56322970f167eabee666ad0920b"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"422a7d54869842f5c4932d9ead936854128a8ae3","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                                 sa.ForeignKey(\"lbaas_healthmonitors.id\"),"},{"line_number":187,"context_line":"                                 unique\u003dTrue,"},{"line_number":188,"context_line":"                                 nullable\u003dTrue)"},{"line_number":189,"context_line":"    protocol \u003d sa.Column(sa.Enum(*lb_const.SUPPORTED_PROTOCOLS,"},{"line_number":190,"context_line":"                                 name\u003d\"lb_protocols\"),"},{"line_number":191,"context_line":"                         nullable\u003dFalse)"},{"line_number":192,"context_line":"    lb_algorithm \u003d sa.Column(sa.Enum(*lb_const.SUPPORTED_LB_ALGORITHMS,"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_7aca0aa1","line":189,"in_reply_to":"baada198_392a67e7","updated":"2014-07-25 14:21:56.000000000","message":"I\u0027m sorry I was checking this one https://review.openstack.org/109035. No problem with your change.","commit_id":"74b47eae5013d56322970f167eabee666ad0920b"},{"author":{"_account_id":9461,"name":"Vijay Kumar Venkatachalam","email":"vijay.venkatachalam@citrix.com","username":"vijayvenkatachalam"},"change_message_id":"caa39c2d954d9889c23b8ce41ed85bbff1e8f284","unresolved":false,"context_lines":[{"line_number":559,"context_line":"                protocol \u003d listener.get(\u0027protocol\u0027) or listener_db.protocol"},{"line_number":560,"context_line":"                if pool.protocol !\u003d protocol:"},{"line_number":561,"context_line":"                    raise loadbalancerv2.ListenerPoolProtocolMismatch("},{"line_number":562,"context_line":"                        listener_proto\u003dprotocol,"},{"line_number":563,"context_line":"                        pool_proto\u003dpool.protocol)"},{"line_number":564,"context_line":"                filters \u003d {\u0027default_pool_id\u0027: [pool_id]}"},{"line_number":565,"context_line":"                listenerpools \u003d self._get_resources(context,"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_3ad41246","line":562,"updated":"2014-07-25 15:53:58.000000000","message":"In  SSL termination case, listener will have protocol TERMINATED_HTTPS and pool will have protocol HTTP","commit_id":"74b47eae5013d56322970f167eabee666ad0920b"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"21adc6df3a624a99806937ce3a67393b3590bc55","unresolved":false,"context_lines":[{"line_number":559,"context_line":"                protocol \u003d listener.get(\u0027protocol\u0027) or listener_db.protocol"},{"line_number":560,"context_line":"                if pool.protocol !\u003d protocol:"},{"line_number":561,"context_line":"                    raise loadbalancerv2.ListenerPoolProtocolMismatch("},{"line_number":562,"context_line":"                        listener_proto\u003dprotocol,"},{"line_number":563,"context_line":"                        pool_proto\u003dpool.protocol)"},{"line_number":564,"context_line":"                filters \u003d {\u0027default_pool_id\u0027: [pool_id]}"},{"line_number":565,"context_line":"                listenerpools \u003d self._get_resources(context,"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_accaa29d","line":562,"in_reply_to":"baada198_3ad41246","updated":"2014-07-25 22:10:10.000000000","message":"Yes, and that change will need to change this.  This follows along with v1\u0027s exception so I kept it.  I think a good place to change it will be in the TLS termination code.","commit_id":"74b47eae5013d56322970f167eabee666ad0920b"},{"author":{"_account_id":9461,"name":"Vijay Kumar Venkatachalam","email":"vijay.venkatachalam@citrix.com","username":"vijayvenkatachalam"},"change_message_id":"c36d35d507ef56f06037636ac2f769b5a9ccd13e","unresolved":false,"context_lines":[{"line_number":559,"context_line":"                protocol \u003d listener.get(\u0027protocol\u0027) or listener_db.protocol"},{"line_number":560,"context_line":"                if pool.protocol !\u003d protocol:"},{"line_number":561,"context_line":"                    raise loadbalancerv2.ListenerPoolProtocolMismatch("},{"line_number":562,"context_line":"                        listener_proto\u003dprotocol,"},{"line_number":563,"context_line":"                        pool_proto\u003dpool.protocol)"},{"line_number":564,"context_line":"                filters \u003d {\u0027default_pool_id\u0027: [pool_id]}"},{"line_number":565,"context_line":"                listenerpools \u003d self._get_resources(context,"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_49ce3c84","line":562,"in_reply_to":"baada198_accaa29d","updated":"2014-07-28 07:50:26.000000000","message":"Makes sense.","commit_id":"74b47eae5013d56322970f167eabee666ad0920b"},{"author":{"_account_id":9461,"name":"Vijay Kumar Venkatachalam","email":"vijay.venkatachalam@citrix.com","username":"vijayvenkatachalam"},"change_message_id":"caa39c2d954d9889c23b8ce41ed85bbff1e8f284","unresolved":false,"context_lines":[{"line_number":567,"context_line":"                                                    filters\u003dfilters)"},{"line_number":568,"context_line":"                if listenerpools:"},{"line_number":569,"context_line":"                    raise loadbalancerv2.PoolInUse(pool_id\u003dpool_id)"},{"line_number":570,"context_line":""},{"line_number":571,"context_line":"            listener_db.update(listener)"},{"line_number":572,"context_line":"        context.session.refresh(listener_db)"},{"line_number":573,"context_line":"        return listener_db"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_1a810e4d","line":570,"updated":"2014-07-25 15:53:58.000000000","message":"Does this mean, one pool cannot be used in many listeners? That will defeat the usecase where one pool should have both HTTP/HTTPS listeneres.","commit_id":"74b47eae5013d56322970f167eabee666ad0920b"},{"author":{"_account_id":9461,"name":"Vijay Kumar Venkatachalam","email":"vijay.venkatachalam@citrix.com","username":"vijayvenkatachalam"},"change_message_id":"c36d35d507ef56f06037636ac2f769b5a9ccd13e","unresolved":false,"context_lines":[{"line_number":567,"context_line":"                                                    filters\u003dfilters)"},{"line_number":568,"context_line":"                if listenerpools:"},{"line_number":569,"context_line":"                    raise loadbalancerv2.PoolInUse(pool_id\u003dpool_id)"},{"line_number":570,"context_line":""},{"line_number":571,"context_line":"            listener_db.update(listener)"},{"line_number":572,"context_line":"        context.session.refresh(listener_db)"},{"line_number":573,"context_line":"        return listener_db"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_49955c3e","line":570,"in_reply_to":"baada198_0c71ce44","updated":"2014-07-28 07:50:26.000000000","message":"If that was the conscious decision, I agree.","commit_id":"74b47eae5013d56322970f167eabee666ad0920b"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"21adc6df3a624a99806937ce3a67393b3590bc55","unresolved":false,"context_lines":[{"line_number":567,"context_line":"                                                    filters\u003dfilters)"},{"line_number":568,"context_line":"                if listenerpools:"},{"line_number":569,"context_line":"                    raise loadbalancerv2.PoolInUse(pool_id\u003dpool_id)"},{"line_number":570,"context_line":""},{"line_number":571,"context_line":"            listener_db.update(listener)"},{"line_number":572,"context_line":"        context.session.refresh(listener_db)"},{"line_number":573,"context_line":"        return listener_db"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_0c71ce44","line":570,"in_reply_to":"baada198_1a810e4d","updated":"2014-07-25 22:10:10.000000000","message":"For not it does.  We wanted to keep it simple for now because the prospect of sharing entities across and the status management needs more attention than what this huge refactor can give to it.  In the meantime, a user can just create a duplicate pool.  It\u0027s not ideal, and not what we want in the end but for the reason stated above I believe it is the lesser of the two evils.","commit_id":"74b47eae5013d56322970f167eabee666ad0920b"},{"author":{"_account_id":9461,"name":"Vijay Kumar Venkatachalam","email":"vijay.venkatachalam@citrix.com","username":"vijayvenkatachalam"},"change_message_id":"caa39c2d954d9889c23b8ce41ed85bbff1e8f284","unresolved":false,"context_lines":[{"line_number":589,"context_line":"        :param info: Session persistence info"},{"line_number":590,"context_line":"        \"\"\""},{"line_number":591,"context_line":"        if info[\u0027type\u0027] \u003d\u003d lb_const.SESSION_PERSISTENCE_APP_COOKIE:"},{"line_number":592,"context_line":"            if not info.get(\u0027cookie_name\u0027):"},{"line_number":593,"context_line":"                raise ValueError(_(\"\u0027cookie_name\u0027 should be specified for this\""},{"line_number":594,"context_line":"                                   \" type of session persistence.\"))"},{"line_number":595,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_70b4e9f0","line":592,"updated":"2014-07-25 15:53:58.000000000","message":"How does this work? NetScaler generates a cookie name, not sure about others. Should  this parameter be manadatory?","commit_id":"74b47eae5013d56322970f167eabee666ad0920b"},{"author":{"_account_id":9461,"name":"Vijay Kumar Venkatachalam","email":"vijay.venkatachalam@citrix.com","username":"vijayvenkatachalam"},"change_message_id":"c36d35d507ef56f06037636ac2f769b5a9ccd13e","unresolved":false,"context_lines":[{"line_number":589,"context_line":"        :param info: Session persistence info"},{"line_number":590,"context_line":"        \"\"\""},{"line_number":591,"context_line":"        if info[\u0027type\u0027] \u003d\u003d lb_const.SESSION_PERSISTENCE_APP_COOKIE:"},{"line_number":592,"context_line":"            if not info.get(\u0027cookie_name\u0027):"},{"line_number":593,"context_line":"                raise ValueError(_(\"\u0027cookie_name\u0027 should be specified for this\""},{"line_number":594,"context_line":"                                   \" type of session persistence.\"))"},{"line_number":595,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_2999086d","line":592,"in_reply_to":"baada198_07ed27b8","updated":"2014-07-28 07:50:26.000000000","message":"NetScaler used to ignore this param when deploying in some of its revisions.","commit_id":"74b47eae5013d56322970f167eabee666ad0920b"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"21adc6df3a624a99806937ce3a67393b3590bc55","unresolved":false,"context_lines":[{"line_number":589,"context_line":"        :param info: Session persistence info"},{"line_number":590,"context_line":"        \"\"\""},{"line_number":591,"context_line":"        if info[\u0027type\u0027] \u003d\u003d lb_const.SESSION_PERSISTENCE_APP_COOKIE:"},{"line_number":592,"context_line":"            if not info.get(\u0027cookie_name\u0027):"},{"line_number":593,"context_line":"                raise ValueError(_(\"\u0027cookie_name\u0027 should be specified for this\""},{"line_number":594,"context_line":"                                   \" type of session persistence.\"))"},{"line_number":595,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_07ed27b8","line":592,"in_reply_to":"baada198_70b4e9f0","updated":"2014-07-25 22:10:10.000000000","message":"Well this exact check was in v1.  To remain as consistent with v1 as possible I kept it in.  Does the v1 netscaler driver not have an issue with this in the v1 API?","commit_id":"74b47eae5013d56322970f167eabee666ad0920b"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"7cabed26e7a6196004949aab836dcc9f0ca869bd","unresolved":false,"context_lines":[{"line_number":66,"context_line":"class LoadBalancerStatistics(model_base.BASEV2):"},{"line_number":67,"context_line":"    \"\"\"Represents load balancer statistics.\"\"\""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    NAME \u003d \u0027loadbalancer_stats\u0027"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    @declarative.declared_attr"},{"line_number":72,"context_line":"    def __tablename__(cls):"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_d017599b","line":69,"updated":"2014-07-27 08:43:28.000000000","message":"What is wrong with\nx.__class__.__name__ for getting  the class name of x?\nThis comments applies to the other \u0027NAME\u0027 declarations","commit_id":"730b5570efd09cf1826bd69c493c0b674e6221a0"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"3efebc2a3374d7ec3b32f4505dc0ecdbcfe988f5","unresolved":false,"context_lines":[{"line_number":66,"context_line":"class LoadBalancerStatistics(model_base.BASEV2):"},{"line_number":67,"context_line":"    \"\"\"Represents load balancer statistics.\"\"\""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    NAME \u003d \u0027loadbalancer_stats\u0027"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    @declarative.declared_attr"},{"line_number":72,"context_line":"    def __tablename__(cls):"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_dc4cd241","line":69,"in_reply_to":"baada198_d017599b","updated":"2014-07-27 18:13:40.000000000","message":"Don\u0027t want the user to see PoolV2, MemberV2, etc.  Plus they will only know the entities as \"loadbalancer\", not \"LoadBalancer\", etc.  .lower() would solve that but the V2 issue remains.  Checking for V2 at the end of the string and stripping wouldn\u0027t solve for all.","commit_id":"730b5570efd09cf1826bd69c493c0b674e6221a0"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"e81df5ed1227c2b56c492fc5fef86ede648102d0","unresolved":false,"context_lines":[{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    name \u003d sa.Column(sa.String(255))"},{"line_number":242,"context_line":"    description \u003d sa.Column(sa.String(255))"},{"line_number":243,"context_line":"    vip_subnet_id \u003d sa.Column(sa.String(36), nullable\u003dFalse)"},{"line_number":244,"context_line":"    vip_port_id \u003d sa.Column(sa.String(36), sa.ForeignKey(\u0027ports.id\u0027))"},{"line_number":245,"context_line":"    vip_address \u003d sa.Column(sa.String(36))"},{"line_number":246,"context_line":"    status \u003d sa.Column(sa.String(16), nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_bf0546c3","line":243,"updated":"2014-07-28 08:41:29.000000000","message":"why do we need to persist the fields: \u0027vip_subnet_id\u0027 and \u0027vip_address\u0027?\nThe Neutron Port containts those attributes.","commit_id":"730b5570efd09cf1826bd69c493c0b674e6221a0"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"6903a4fda6e7baa4b29173f1f9b06c040f2fcf49","unresolved":false,"context_lines":[{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    name \u003d sa.Column(sa.String(255))"},{"line_number":242,"context_line":"    description \u003d sa.Column(sa.String(255))"},{"line_number":243,"context_line":"    vip_subnet_id \u003d sa.Column(sa.String(36), nullable\u003dFalse)"},{"line_number":244,"context_line":"    vip_port_id \u003d sa.Column(sa.String(36), sa.ForeignKey(\u0027ports.id\u0027))"},{"line_number":245,"context_line":"    vip_address \u003d sa.Column(sa.String(36))"},{"line_number":246,"context_line":"    status \u003d sa.Column(sa.String(16), nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_f3e1abfc","line":243,"in_reply_to":"baada198_614f888c","updated":"2014-07-28 14:53:00.000000000","message":"Hi\nI dont think that driver developers should be aware to the source of the entities they get as input. The entities should be treated as pure DTO\u0027s and I beleive we want to serve the driver with pure DTO\u0027s in the future.\nThe current Loadblancer \u0027DTO\u0027 is confusing and make the plugin-driver contract unclear.","commit_id":"730b5570efd09cf1826bd69c493c0b674e6221a0"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"088514da18fa5f193afe3218060d1dbcb707209f","unresolved":false,"context_lines":[{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    name \u003d sa.Column(sa.String(255))"},{"line_number":242,"context_line":"    description \u003d sa.Column(sa.String(255))"},{"line_number":243,"context_line":"    vip_subnet_id \u003d sa.Column(sa.String(36), nullable\u003dFalse)"},{"line_number":244,"context_line":"    vip_port_id \u003d sa.Column(sa.String(36), sa.ForeignKey(\u0027ports.id\u0027))"},{"line_number":245,"context_line":"    vip_address \u003d sa.Column(sa.String(36))"},{"line_number":246,"context_line":"    status \u003d sa.Column(sa.String(16), nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_e61f2e58","line":243,"in_reply_to":"baada198_b27e5419","updated":"2014-07-28 14:10:35.000000000","message":"OK.\nIn that case I think that the reference to the Port (\u0027vip_port\u0027) should be removed. If we keep this reference the consumer code of the LoadBalancer can get the \u0027vip_address\u0027 in 2 ways:\n1) lb.vip_address\n2) lb.vip_port.address\n\nthis is confusing.","commit_id":"730b5570efd09cf1826bd69c493c0b674e6221a0"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"cdfc78b1907f4e6e671ee9cd0dbaeccef60c7627","unresolved":false,"context_lines":[{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    name \u003d sa.Column(sa.String(255))"},{"line_number":242,"context_line":"    description \u003d sa.Column(sa.String(255))"},{"line_number":243,"context_line":"    vip_subnet_id \u003d sa.Column(sa.String(36), nullable\u003dFalse)"},{"line_number":244,"context_line":"    vip_port_id \u003d sa.Column(sa.String(36), sa.ForeignKey(\u0027ports.id\u0027))"},{"line_number":245,"context_line":"    vip_address \u003d sa.Column(sa.String(36))"},{"line_number":246,"context_line":"    status \u003d sa.Column(sa.String(16), nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_b27e5419","line":243,"in_reply_to":"baada198_bf0546c3","updated":"2014-07-28 12:40:41.000000000","message":"Two reasons:\n1) Looking forward to lbaas being outside neutron, any reliance on the neutron db becomes a REST call, which is slow.\n2) We\u0027re trying to refactor the object model and interface, and carrying forward address is what was done in v1.  Refinements to the code that don\u0027t affect the interface/model relationships, IMO, should be postponed to a later review, as this review is already hard enough to get fully tested and merged, without making changes to pre-existing things like the address being stored (i.e. it\u0027s feature creep to start changing things like that at this point.)","commit_id":"730b5570efd09cf1826bd69c493c0b674e6221a0"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"7c61d1c529b9bf8361b592f13397bc6e7283b82a","unresolved":false,"context_lines":[{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    name \u003d sa.Column(sa.String(255))"},{"line_number":242,"context_line":"    description \u003d sa.Column(sa.String(255))"},{"line_number":243,"context_line":"    vip_subnet_id \u003d sa.Column(sa.String(36), nullable\u003dFalse)"},{"line_number":244,"context_line":"    vip_port_id \u003d sa.Column(sa.String(36), sa.ForeignKey(\u0027ports.id\u0027))"},{"line_number":245,"context_line":"    vip_address \u003d sa.Column(sa.String(36))"},{"line_number":246,"context_line":"    status \u003d sa.Column(sa.String(16), nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_614f888c","line":243,"in_reply_to":"baada198_e61f2e58","updated":"2014-07-28 14:41:17.000000000","message":"Hi Avishay.  IMO, I like both.  While I can certainly understand the desire the single source information, I think it\u0027s fairly well understood that in any ORM the toplevel attributes are cheaper to get, while the sub-objects will be more expensive but get deeper info.  That, combined with a desire to not change things from v1 that don\u0027t *need* changing at this point, has me leaning in the other direction.","commit_id":"730b5570efd09cf1826bd69c493c0b674e6221a0"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"1751e512217d8f9041d68d6cf3afe9e6e8ed4663","unresolved":false,"context_lines":[{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    name \u003d sa.Column(sa.String(255))"},{"line_number":242,"context_line":"    description \u003d sa.Column(sa.String(255))"},{"line_number":243,"context_line":"    vip_subnet_id \u003d sa.Column(sa.String(36), nullable\u003dFalse)"},{"line_number":244,"context_line":"    vip_port_id \u003d sa.Column(sa.String(36), sa.ForeignKey(\u0027ports.id\u0027))"},{"line_number":245,"context_line":"    vip_address \u003d sa.Column(sa.String(36))"},{"line_number":246,"context_line":"    status \u003d sa.Column(sa.String(16), nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_d24e56c1","line":243,"in_reply_to":"baada198_f3e1abfc","updated":"2014-07-28 20:04:42.000000000","message":"I see your point, but I think this comes down to a matter of style or opinion.\nI brought this up In the midcyle meetup and I believe everyone agreed with storing these two values to preserve the user\u0027s inputs.  Including Kyle and Mark.  \nAlso, there is the issue of if a user adds an ip to the port created for the VIP, which one is shown as the actual vip_address to the user if we don\u0027t store it?  There is definitely a rabbit hole to this argument on both sides though.\nIf it is a huge issue with core reviewers who know both sides of the argument, then obviously it should be changed.\nIt\u0027s also something that can be changed in a bug fix if it becomes an issue.","commit_id":"730b5570efd09cf1826bd69c493c0b674e6221a0"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"d8681f3e1bfd5b355998c5ba1deb12894aa673cc","unresolved":false,"context_lines":[{"line_number":258,"context_line":"        lazy\u003d\"joined\","},{"line_number":259,"context_line":"        primaryjoin\u003d\"LoadBalancer.id\u003d\u003dProviderResourceAssociation.resource_id\","},{"line_number":260,"context_line":"        foreign_keys\u003d[st_db.ProviderResourceAssociation.resource_id],"},{"line_number":261,"context_line":"        #this is only for old API backwards compatibility because when a load"},{"line_number":262,"context_line":"        #balancer is deleted the pool ID should be the same as the load"},{"line_number":263,"context_line":"        #balancer ID and should not be cleared out in this table"},{"line_number":264,"context_line":"        viewonly\u003dTrue"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_a82c394b","line":261,"updated":"2014-07-28 02:07:28.000000000","message":"Surprised these are not caught by pep8. Please check the whole patch set for these: \"Each line of a block comment starts with a # and a single space (unless it is indented text inside the comment).\" Same applies to inline comments.\n\nhttp://legacy.python.org/dev/peps/pep-0008/#comments","commit_id":"730b5570efd09cf1826bd69c493c0b674e6221a0"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"7cabed26e7a6196004949aab836dcc9f0ca869bd","unresolved":false,"context_lines":[{"line_number":342,"context_line":"            else:"},{"line_number":343,"context_line":"                resource \u003d self._get_by_id(context, model, id)"},{"line_number":344,"context_line":"        except exc.NoResultFound:"},{"line_number":345,"context_line":"            with excutils.save_and_reraise_exception(reraise\u003dFalse) as ctx:"},{"line_number":346,"context_line":"                if issubclass(model, (LoadBalancer, Listener, PoolV2, MemberV2,"},{"line_number":347,"context_line":"                                      HealthMonitorV2, LoadBalancerStatistics,"},{"line_number":348,"context_line":"                                      SessionPersistenceV2)):"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_b04ae5aa","line":345,"updated":"2014-07-27 08:43:28.000000000","message":"with excutils.save_and_reraise_exception(reraise\u003dFalse) as ctx:\n    raise loadbalancerv2.EntityNotFound(name\u003dmodel.__class__.__name__, id\u003did)\n    ctx.reraise \u003d True\n\nI dont see any reason to do the \u0027issubclass\u0027 - see my comment about the NAME","commit_id":"730b5570efd09cf1826bd69c493c0b674e6221a0"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"3efebc2a3374d7ec3b32f4505dc0ecdbcfe988f5","unresolved":false,"context_lines":[{"line_number":342,"context_line":"            else:"},{"line_number":343,"context_line":"                resource \u003d self._get_by_id(context, model, id)"},{"line_number":344,"context_line":"        except exc.NoResultFound:"},{"line_number":345,"context_line":"            with excutils.save_and_reraise_exception(reraise\u003dFalse) as ctx:"},{"line_number":346,"context_line":"                if issubclass(model, (LoadBalancer, Listener, PoolV2, MemberV2,"},{"line_number":347,"context_line":"                                      HealthMonitorV2, LoadBalancerStatistics,"},{"line_number":348,"context_line":"                                      SessionPersistenceV2)):"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_5ca52201","line":345,"in_reply_to":"baada198_b04ae5aa","updated":"2014-07-27 18:13:40.000000000","message":"The reason is that the user will see PoolV2 and MemberV2 and HealthMonitorV2.  I don\u0027t think this is good for them to see as it might cause confusion.","commit_id":"730b5570efd09cf1826bd69c493c0b674e6221a0"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"7cabed26e7a6196004949aab836dcc9f0ca869bd","unresolved":false,"context_lines":[{"line_number":647,"context_line":"                hmpools \u003d self._get_resources(context,"},{"line_number":648,"context_line":"                                              PoolV2,"},{"line_number":649,"context_line":"                                              filters\u003dfilters)"},{"line_number":650,"context_line":"                if hmpools:"},{"line_number":651,"context_line":"                    raise loadbalancerv2.HealthMonitorInUse(monitor_id\u003dhm_id)"},{"line_number":652,"context_line":""},{"line_number":653,"context_line":"            session_info \u003d pool.pop(\u0027session_persistence\u0027)"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_d045999b","line":650,"updated":"2014-07-27 08:43:28.000000000","message":"can hmpools be None?","commit_id":"730b5570efd09cf1826bd69c493c0b674e6221a0"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"3efebc2a3374d7ec3b32f4505dc0ecdbcfe988f5","unresolved":false,"context_lines":[{"line_number":647,"context_line":"                hmpools \u003d self._get_resources(context,"},{"line_number":648,"context_line":"                                              PoolV2,"},{"line_number":649,"context_line":"                                              filters\u003dfilters)"},{"line_number":650,"context_line":"                if hmpools:"},{"line_number":651,"context_line":"                    raise loadbalancerv2.HealthMonitorInUse(monitor_id\u003dhm_id)"},{"line_number":652,"context_line":""},{"line_number":653,"context_line":"            session_info \u003d pool.pop(\u0027session_persistence\u0027)"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_7c966695","line":650,"in_reply_to":"baada198_d045999b","updated":"2014-07-27 18:13:40.000000000","message":"I answered this back in PS #25.  Its a check to see if hmpools is not an empty list.  And yes it can be empty.","commit_id":"730b5570efd09cf1826bd69c493c0b674e6221a0"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"7cabed26e7a6196004949aab836dcc9f0ca869bd","unresolved":false,"context_lines":[{"line_number":677,"context_line":"                hmpools \u003d self._get_resources(context,"},{"line_number":678,"context_line":"                                              PoolV2,"},{"line_number":679,"context_line":"                                              filters\u003dfilters)"},{"line_number":680,"context_line":"                if hmpools:"},{"line_number":681,"context_line":"                    raise loadbalancerv2.HealthMonitorInUse(monitor_id\u003dhm_id)"},{"line_number":682,"context_line":""},{"line_number":683,"context_line":"            sp \u003d pool.pop(\u0027session_persistence\u0027, None)"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_f0c7fd0f","line":680,"updated":"2014-07-27 08:43:28.000000000","message":"can hmpools be None?","commit_id":"730b5570efd09cf1826bd69c493c0b674e6221a0"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"7cabed26e7a6196004949aab836dcc9f0ca869bd","unresolved":false,"context_lines":[{"line_number":678,"context_line":"                                              PoolV2,"},{"line_number":679,"context_line":"                                              filters\u003dfilters)"},{"line_number":680,"context_line":"                if hmpools:"},{"line_number":681,"context_line":"                    raise loadbalancerv2.HealthMonitorInUse(monitor_id\u003dhm_id)"},{"line_number":682,"context_line":""},{"line_number":683,"context_line":"            sp \u003d pool.pop(\u0027session_persistence\u0027, None)"},{"line_number":684,"context_line":"            if sp:"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_90fde13d","line":681,"updated":"2014-07-27 08:43:28.000000000","message":"Please use a generic \u0027EntityInUseException\u0027 - that should be good enough (I have posted this topic in ML)","commit_id":"730b5570efd09cf1826bd69c493c0b674e6221a0"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"3efebc2a3374d7ec3b32f4505dc0ecdbcfe988f5","unresolved":false,"context_lines":[{"line_number":678,"context_line":"                                              PoolV2,"},{"line_number":679,"context_line":"                                              filters\u003dfilters)"},{"line_number":680,"context_line":"                if hmpools:"},{"line_number":681,"context_line":"                    raise loadbalancerv2.HealthMonitorInUse(monitor_id\u003dhm_id)"},{"line_number":682,"context_line":""},{"line_number":683,"context_line":"            sp \u003d pool.pop(\u0027session_persistence\u0027, None)"},{"line_number":684,"context_line":"            if sp:"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_dcb05242","line":681,"in_reply_to":"baada198_90fde13d","updated":"2014-07-27 18:13:40.000000000","message":"I will change this if another PS is required.","commit_id":"730b5570efd09cf1826bd69c493c0b674e6221a0"},{"author":{"_account_id":8446,"name":"Evgeny Fedoruk","email":"evgenyf@radware.com","username":"evgenyfedoruk"},"change_message_id":"dace131f2fd8b1a808e7784ca3c95d003500da22","unresolved":false,"context_lines":[{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    def to_dict(self, pool\u003dFalse):"},{"line_number":162,"context_line":"        hm_dict \u003d super(HealthMonitorV2, self).to_dict()"},{"line_number":163,"context_line":"        if pool and self.pool:"},{"line_number":164,"context_line":"            hm_dict[\u0027pool\u0027] \u003d self.pool.to_dict(listener\u003dTrue,"},{"line_number":165,"context_line":"                                                members\u003dTrue,"},{"line_number":166,"context_line":"                                                sessionpersistence\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":37,"id":"baada198_d373eeb1","line":163,"updated":"2014-08-03 09:57:55.000000000","message":"does self.pool exist?","commit_id":"42f7e8851516c74f5e62fbfed7683a72c92f9c13"},{"author":{"_account_id":8446,"name":"Evgeny Fedoruk","email":"evgenyf@radware.com","username":"evgenyfedoruk"},"change_message_id":"5072c15d7dd0a2ede1fd97278ef209f603c4657d","unresolved":false,"context_lines":[{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    def to_dict(self, pool\u003dFalse):"},{"line_number":162,"context_line":"        hm_dict \u003d super(HealthMonitorV2, self).to_dict()"},{"line_number":163,"context_line":"        if pool and self.pool:"},{"line_number":164,"context_line":"            hm_dict[\u0027pool\u0027] \u003d self.pool.to_dict(listener\u003dTrue,"},{"line_number":165,"context_line":"                                                members\u003dTrue,"},{"line_number":166,"context_line":"                                                sessionpersistence\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":37,"id":"baada198_36dc1845","line":163,"in_reply_to":"baada198_d373eeb1","updated":"2014-08-03 13:30:02.000000000","message":"Ignore it please","commit_id":"42f7e8851516c74f5e62fbfed7683a72c92f9c13"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"3c979089f5b628488c6479b53d8071186f6beecd","unresolved":false,"context_lines":[{"line_number":600,"context_line":"                                   \" type of session persistence.\"))"},{"line_number":601,"context_line":"        else:"},{"line_number":602,"context_line":"            if \u0027cookie_name\u0027 in info:"},{"line_number":603,"context_line":"                raise ValueError(_(\"\u0027cookie_name\u0027 is not allowed for this type\""},{"line_number":604,"context_line":"                                   \" of session persistence\"))"},{"line_number":605,"context_line":""},{"line_number":606,"context_line":"    def _create_session_persistence_db(self, session_info, pool_id):"}],"source_content_type":"text/x-python","patch_set":37,"id":"baada198_59129f58","line":603,"updated":"2014-08-03 14:47:34.000000000","message":"What is the type we deal with?\n\nraise ValueError(_(\"\u0027cookie_name\u0027 is not allowed for this type\"\t\n                                   \" of session persistence %s\") ,info[\u0027type\u0027])","commit_id":"42f7e8851516c74f5e62fbfed7683a72c92f9c13"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"22cb54b14f4c35a1d63a95a691d025312e936ed0","unresolved":false,"context_lines":[{"line_number":600,"context_line":"                                   \" type of session persistence.\"))"},{"line_number":601,"context_line":"        else:"},{"line_number":602,"context_line":"            if \u0027cookie_name\u0027 in info:"},{"line_number":603,"context_line":"                raise ValueError(_(\"\u0027cookie_name\u0027 is not allowed for this type\""},{"line_number":604,"context_line":"                                   \" of session persistence\"))"},{"line_number":605,"context_line":""},{"line_number":606,"context_line":"    def _create_session_persistence_db(self, session_info, pool_id):"}],"source_content_type":"text/x-python","patch_set":37,"id":"baada198_e2056579","line":603,"in_reply_to":"baada198_59129f58","updated":"2014-08-12 00:29:00.000000000","message":"Done","commit_id":"42f7e8851516c74f5e62fbfed7683a72c92f9c13"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"3c979089f5b628488c6479b53d8071186f6beecd","unresolved":false,"context_lines":[{"line_number":606,"context_line":"    def _create_session_persistence_db(self, session_info, pool_id):"},{"line_number":607,"context_line":"        self._check_session_persistence_info(session_info)"},{"line_number":608,"context_line":"        session_info[\u0027pool_id\u0027] \u003d pool_id"},{"line_number":609,"context_line":"        sp_db \u003d SessionPersistenceV2(**session_info)"},{"line_number":610,"context_line":"        return sp_db"},{"line_number":611,"context_line":""},{"line_number":612,"context_line":"    def _update_pool_session_persistence(self, context, pool_id, info):"}],"source_content_type":"text/x-python","patch_set":37,"id":"baada198_1905870f","line":609,"updated":"2014-08-03 14:47:34.000000000","message":"return SessionPersistenceV2(**session_info)","commit_id":"42f7e8851516c74f5e62fbfed7683a72c92f9c13"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"22cb54b14f4c35a1d63a95a691d025312e936ed0","unresolved":false,"context_lines":[{"line_number":606,"context_line":"    def _create_session_persistence_db(self, session_info, pool_id):"},{"line_number":607,"context_line":"        self._check_session_persistence_info(session_info)"},{"line_number":608,"context_line":"        session_info[\u0027pool_id\u0027] \u003d pool_id"},{"line_number":609,"context_line":"        sp_db \u003d SessionPersistenceV2(**session_info)"},{"line_number":610,"context_line":"        return sp_db"},{"line_number":611,"context_line":""},{"line_number":612,"context_line":"    def _update_pool_session_persistence(self, context, pool_id, info):"}],"source_content_type":"text/x-python","patch_set":37,"id":"baada198_02f97981","line":609,"in_reply_to":"baada198_1905870f","updated":"2014-08-12 00:29:00.000000000","message":"Done","commit_id":"42f7e8851516c74f5e62fbfed7683a72c92f9c13"}],"neutron/db/migration/alembic_migrations/versions/b30ae52b12b_lbaas_version_2_api.py":[{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"a928de7f855dac61778e69d04038c91930450651","unresolved":false,"context_lines":[{"line_number":28,"context_line":"# Change to [\u0027*\u0027] if this migration applies to all plugins"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"migration_for_plugins \u003d ["},{"line_number":31,"context_line":"    \u0027neutron.services.loadbalancer.plugin.LoadBalancerPluginv2\u0027,"},{"line_number":32,"context_line":"]"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"from alembic import op"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_c9da1679","line":31,"updated":"2014-07-15 22:06:38.000000000","message":"Please change this to \u0027*\u0027. (The database healing patch has merged so now migrations are unconditional.)","commit_id":"aee21593787de6ec1787acc0f1509beaf3e75c0a"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"1685e2242ebcaf0a8a0655c2764b232032018bcc","unresolved":false,"context_lines":[{"line_number":28,"context_line":"# Change to [\u0027*\u0027] if this migration applies to all plugins"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"migration_for_plugins \u003d ["},{"line_number":31,"context_line":"    \u0027neutron.services.loadbalancer.plugin.LoadBalancerPluginv2\u0027,"},{"line_number":32,"context_line":"]"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"from alembic import op"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_79cab11b","line":31,"in_reply_to":"baada198_c9da1679","updated":"2014-07-16 04:37:50.000000000","message":"Done","commit_id":"aee21593787de6ec1787acc0f1509beaf3e75c0a"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"7b59224cd055c646f31eb7acaf2b0c386142cd19","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        sa.Column(u\u0027tenant_id\u0027, sa.String(255), nullable\u003dTrue),"},{"line_number":48,"context_line":"        sa.Column(u\u0027id\u0027, sa.String(36), nullable\u003dFalse),"},{"line_number":49,"context_line":"        sa.Column(u\u0027type\u0027,"},{"line_number":50,"context_line":"                  sa.Enum(u\u0027PING\u0027,"},{"line_number":51,"context_line":"                          u\u0027TCP\u0027,"},{"line_number":52,"context_line":"                          u\u0027HTTP\u0027,"},{"line_number":53,"context_line":"                          u\u0027HTTPS\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_af697426","line":50,"updated":"2014-07-15 15:19:02.000000000","message":"The Set (PING,TCP,HTTP,HTTPS) is  declared 3 times in the code. 1) REST validation 2) SQLAlchemy class declaration 3) here.\nWhy not to declare it once and consume it anywhere?","commit_id":"aee21593787de6ec1787acc0f1509beaf3e75c0a"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"d654ace5e0a4377c74fac94cb2fc3fb6cc377b63","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                          u\u0027TCP\u0027,"},{"line_number":52,"context_line":"                          u\u0027HTTP\u0027,"},{"line_number":53,"context_line":"                          u\u0027HTTPS\u0027,"},{"line_number":54,"context_line":"                          name\u003du\u0027healthmonitors_type\u0027),"},{"line_number":55,"context_line":"                  nullable\u003dFalse),"},{"line_number":56,"context_line":"        sa.Column(u\u0027delay\u0027, sa.Integer(), nullable\u003dFalse),"},{"line_number":57,"context_line":"        sa.Column(u\u0027timeout\u0027, sa.Integer(), nullable\u003dFalse),"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_c1692abf","line":54,"updated":"2014-07-15 12:09:41.000000000","message":"For PostgreSQL Enums should be dropped in downgrade after dropping table.  Like this https://review.openstack.org/#/c/53112/15/neutron/db/migration/alembic_migrations/versions/f489cf14a79c_lbaas_havana.py","commit_id":"aee21593787de6ec1787acc0f1509beaf3e75c0a"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"1685e2242ebcaf0a8a0655c2764b232032018bcc","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                          u\u0027TCP\u0027,"},{"line_number":52,"context_line":"                          u\u0027HTTP\u0027,"},{"line_number":53,"context_line":"                          u\u0027HTTPS\u0027,"},{"line_number":54,"context_line":"                          name\u003du\u0027healthmonitors_type\u0027),"},{"line_number":55,"context_line":"                  nullable\u003dFalse),"},{"line_number":56,"context_line":"        sa.Column(u\u0027delay\u0027, sa.Integer(), nullable\u003dFalse),"},{"line_number":57,"context_line":"        sa.Column(u\u0027timeout\u0027, sa.Integer(), nullable\u003dFalse),"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_d9ad7d34","line":54,"in_reply_to":"baada198_c1692abf","updated":"2014-07-16 04:37:50.000000000","message":"Done","commit_id":"aee21593787de6ec1787acc0f1509beaf3e75c0a"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"7e0e67d6eac81418b22054408e1f80e907fd2343","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        u\u0027lbaas_members\u0027,"},{"line_number":97,"context_line":"        sa.Column(u\u0027tenant_id\u0027, sa.String(255), nullable\u003dTrue),"},{"line_number":98,"context_line":"        sa.Column(u\u0027id\u0027, sa.String(36), nullable\u003dFalse),"},{"line_number":99,"context_line":"        sa.Column(u\u0027pool_id\u0027, sa.String(255), nullable\u003dFalse),"},{"line_number":100,"context_line":"        sa.Column(u\u0027subnet_id\u0027, sa.String(36), nullable\u003dTrue),"},{"line_number":101,"context_line":"        sa.Column(u\u0027address\u0027, sa.String(255), nullable\u003dFalse),"},{"line_number":102,"context_line":"        sa.Column(u\u0027protocol_port\u0027, sa.Integer(), nullable\u003dFalse),"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_272a92e7","line":99,"updated":"2014-07-17 11:40:27.000000000","message":"In models address has sa.String(36)","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"0054cbd63a840f317ec8fa37d7ae734b75a9266b","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        u\u0027lbaas_members\u0027,"},{"line_number":97,"context_line":"        sa.Column(u\u0027tenant_id\u0027, sa.String(255), nullable\u003dTrue),"},{"line_number":98,"context_line":"        sa.Column(u\u0027id\u0027, sa.String(36), nullable\u003dFalse),"},{"line_number":99,"context_line":"        sa.Column(u\u0027pool_id\u0027, sa.String(255), nullable\u003dFalse),"},{"line_number":100,"context_line":"        sa.Column(u\u0027subnet_id\u0027, sa.String(36), nullable\u003dTrue),"},{"line_number":101,"context_line":"        sa.Column(u\u0027address\u0027, sa.String(255), nullable\u003dFalse),"},{"line_number":102,"context_line":"        sa.Column(u\u0027protocol_port\u0027, sa.Integer(), nullable\u003dFalse),"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_6d945644","line":99,"in_reply_to":"baada198_272a92e7","updated":"2014-07-17 19:55:46.000000000","message":"Done","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"7e0e67d6eac81418b22054408e1f80e907fd2343","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        sa.Column(u\u0027id\u0027, sa.String(36), nullable\u003dFalse),"},{"line_number":99,"context_line":"        sa.Column(u\u0027pool_id\u0027, sa.String(255), nullable\u003dFalse),"},{"line_number":100,"context_line":"        sa.Column(u\u0027subnet_id\u0027, sa.String(36), nullable\u003dTrue),"},{"line_number":101,"context_line":"        sa.Column(u\u0027address\u0027, sa.String(255), nullable\u003dFalse),"},{"line_number":102,"context_line":"        sa.Column(u\u0027protocol_port\u0027, sa.Integer(), nullable\u003dFalse),"},{"line_number":103,"context_line":"        sa.Column(u\u0027weight\u0027, sa.Integer(), nullable\u003dTrue),"},{"line_number":104,"context_line":"        sa.Column(u\u0027status\u0027, sa.String(16), nullable\u003dFalse),"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_4706a686","line":101,"updated":"2014-07-17 11:40:27.000000000","message":"In models address has sa.String(64)","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"0054cbd63a840f317ec8fa37d7ae734b75a9266b","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        sa.Column(u\u0027id\u0027, sa.String(36), nullable\u003dFalse),"},{"line_number":99,"context_line":"        sa.Column(u\u0027pool_id\u0027, sa.String(255), nullable\u003dFalse),"},{"line_number":100,"context_line":"        sa.Column(u\u0027subnet_id\u0027, sa.String(36), nullable\u003dTrue),"},{"line_number":101,"context_line":"        sa.Column(u\u0027address\u0027, sa.String(255), nullable\u003dFalse),"},{"line_number":102,"context_line":"        sa.Column(u\u0027protocol_port\u0027, sa.Integer(), nullable\u003dFalse),"},{"line_number":103,"context_line":"        sa.Column(u\u0027weight\u0027, sa.Integer(), nullable\u003dTrue),"},{"line_number":104,"context_line":"        sa.Column(u\u0027status\u0027, sa.String(16), nullable\u003dFalse),"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_8d8fea2d","line":101,"in_reply_to":"baada198_4706a686","updated":"2014-07-17 19:55:46.000000000","message":"Done","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"7e0e67d6eac81418b22054408e1f80e907fd2343","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        sa.Column(u\u0027subnet_id\u0027, sa.String(36), nullable\u003dTrue),"},{"line_number":101,"context_line":"        sa.Column(u\u0027address\u0027, sa.String(255), nullable\u003dFalse),"},{"line_number":102,"context_line":"        sa.Column(u\u0027protocol_port\u0027, sa.Integer(), nullable\u003dFalse),"},{"line_number":103,"context_line":"        sa.Column(u\u0027weight\u0027, sa.Integer(), nullable\u003dTrue),"},{"line_number":104,"context_line":"        sa.Column(u\u0027status\u0027, sa.String(16), nullable\u003dFalse),"},{"line_number":105,"context_line":"        sa.Column(u\u0027admin_state_up\u0027, sa.Boolean(), nullable\u003dFalse),"},{"line_number":106,"context_line":"        sa.PrimaryKeyConstraint(u\u0027id\u0027),"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_e7d97a23","line":103,"updated":"2014-07-17 11:40:27.000000000","message":"In models nullable for this column set to False,","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"0054cbd63a840f317ec8fa37d7ae734b75a9266b","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        sa.Column(u\u0027subnet_id\u0027, sa.String(36), nullable\u003dTrue),"},{"line_number":101,"context_line":"        sa.Column(u\u0027address\u0027, sa.String(255), nullable\u003dFalse),"},{"line_number":102,"context_line":"        sa.Column(u\u0027protocol_port\u0027, sa.Integer(), nullable\u003dFalse),"},{"line_number":103,"context_line":"        sa.Column(u\u0027weight\u0027, sa.Integer(), nullable\u003dTrue),"},{"line_number":104,"context_line":"        sa.Column(u\u0027status\u0027, sa.String(16), nullable\u003dFalse),"},{"line_number":105,"context_line":"        sa.Column(u\u0027admin_state_up\u0027, sa.Boolean(), nullable\u003dFalse),"},{"line_number":106,"context_line":"        sa.PrimaryKeyConstraint(u\u0027id\u0027),"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_ad9e6e61","line":103,"in_reply_to":"baada198_e7d97a23","updated":"2014-07-17 19:55:46.000000000","message":"Done","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"7e0e67d6eac81418b22054408e1f80e907fd2343","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        sa.PrimaryKeyConstraint(u\u0027id\u0027),"},{"line_number":107,"context_line":"        sa.ForeignKeyConstraint([u\u0027pool_id\u0027], [u\u0027lbaas_pools.id\u0027]),"},{"line_number":108,"context_line":"        sa.UniqueConstraint(u\u0027pool_id\u0027, u\u0027address\u0027, u\u0027protocol_port\u0027,"},{"line_number":109,"context_line":"                            name\u003du\u0027pool_address_port_v2\u0027)"},{"line_number":110,"context_line":"    )"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    op.create_table("}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_4714e69e","line":109,"updated":"2014-07-17 11:40:27.000000000","message":"In models name of UniqueConstraint set as uniq_member0pool_id0address0port2","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"0054cbd63a840f317ec8fa37d7ae734b75a9266b","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        sa.PrimaryKeyConstraint(u\u0027id\u0027),"},{"line_number":107,"context_line":"        sa.ForeignKeyConstraint([u\u0027pool_id\u0027], [u\u0027lbaas_pools.id\u0027]),"},{"line_number":108,"context_line":"        sa.UniqueConstraint(u\u0027pool_id\u0027, u\u0027address\u0027, u\u0027protocol_port\u0027,"},{"line_number":109,"context_line":"                            name\u003du\u0027pool_address_port_v2\u0027)"},{"line_number":110,"context_line":"    )"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    op.create_table("}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_8d760a3e","line":109,"in_reply_to":"baada198_4714e69e","updated":"2014-07-17 19:55:46.000000000","message":"Done","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"7e0e67d6eac81418b22054408e1f80e907fd2343","unresolved":false,"context_lines":[{"line_number":142,"context_line":"                                [u\u0027lbaas_pools.id\u0027]),"},{"line_number":143,"context_line":"        sa.UniqueConstraint(u\u0027default_pool_id\u0027),"},{"line_number":144,"context_line":"        sa.UniqueConstraint(u\u0027loadbalancer_id\u0027, u\u0027protocol_port\u0027,"},{"line_number":145,"context_line":"                            name\u003du\u0027loadbalancer_listener_port\u0027),"},{"line_number":146,"context_line":"        sa.PrimaryKeyConstraint(u\u0027id\u0027)"},{"line_number":147,"context_line":"    )"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_e71edaba","line":145,"updated":"2014-07-17 11:40:27.000000000","message":"In models name of UniqueConstraint set as uniq_listener0loadbalancer_id00port","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"0054cbd63a840f317ec8fa37d7ae734b75a9266b","unresolved":false,"context_lines":[{"line_number":142,"context_line":"                                [u\u0027lbaas_pools.id\u0027]),"},{"line_number":143,"context_line":"        sa.UniqueConstraint(u\u0027default_pool_id\u0027),"},{"line_number":144,"context_line":"        sa.UniqueConstraint(u\u0027loadbalancer_id\u0027, u\u0027protocol_port\u0027,"},{"line_number":145,"context_line":"                            name\u003du\u0027loadbalancer_listener_port\u0027),"},{"line_number":146,"context_line":"        sa.PrimaryKeyConstraint(u\u0027id\u0027)"},{"line_number":147,"context_line":"    )"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_6dc9b659","line":145,"in_reply_to":"baada198_e71edaba","updated":"2014-07-17 19:55:46.000000000","message":"Done","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"7e0e67d6eac81418b22054408e1f80e907fd2343","unresolved":false,"context_lines":[{"line_number":147,"context_line":"    )"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    op.create_table("},{"line_number":150,"context_line":"        u\u0027lbaas_loadbalancer_agent_bindings\u0027,"},{"line_number":151,"context_line":"        sa.Column(u\u0027loadbalancer_id\u0027, sa.String(36), nullable\u003dFalse),"},{"line_number":152,"context_line":"        sa.Column(u\u0027agent_id\u0027, sa.String(36), nullable\u003dFalse),"},{"line_number":153,"context_line":"        sa.ForeignKeyConstraint([u\u0027agent_id\u0027],"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_07a4ae49","line":150,"updated":"2014-07-17 11:40:27.000000000","message":"I didn\u0027t find model for this table, where is it?","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"0054cbd63a840f317ec8fa37d7ae734b75a9266b","unresolved":false,"context_lines":[{"line_number":147,"context_line":"    )"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    op.create_table("},{"line_number":150,"context_line":"        u\u0027lbaas_loadbalancer_agent_bindings\u0027,"},{"line_number":151,"context_line":"        sa.Column(u\u0027loadbalancer_id\u0027, sa.String(36), nullable\u003dFalse),"},{"line_number":152,"context_line":"        sa.Column(u\u0027agent_id\u0027, sa.String(36), nullable\u003dFalse),"},{"line_number":153,"context_line":"        sa.ForeignKeyConstraint([u\u0027agent_id\u0027],"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_cdd562e6","line":150,"in_reply_to":"baada198_07a4ae49","updated":"2014-07-17 19:55:46.000000000","message":"Good point the agent refactor was originally intended to go in but is being left out until later. thanks.","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"b15b97026c7a6e942527cc74c5005d8e25925034","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        u\u0027lbaas_members\u0027,"},{"line_number":97,"context_line":"        sa.Column(u\u0027tenant_id\u0027, sa.String(255), nullable\u003dTrue),"},{"line_number":98,"context_line":"        sa.Column(u\u0027id\u0027, sa.String(36), nullable\u003dFalse),"},{"line_number":99,"context_line":"        sa.Column(u\u0027pool_id\u0027, sa.String(255), nullable\u003dFalse),"},{"line_number":100,"context_line":"        sa.Column(u\u0027subnet_id\u0027, sa.String(36), nullable\u003dTrue),"},{"line_number":101,"context_line":"        sa.Column(u\u0027address\u0027, sa.String(255), nullable\u003dFalse),"},{"line_number":102,"context_line":"        sa.Column(u\u0027protocol_port\u0027, sa.Integer(), nullable\u003dFalse),"}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_ae008867","line":99,"updated":"2014-07-22 12:18:58.000000000","message":"It is set String(length\u003d36) in models.","commit_id":"eedad358ef20d0228158510b4f3230786aefdffa"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"f76989ba59643e2ed21ec5fb4c00c9c1635769fb","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        u\u0027lbaas_members\u0027,"},{"line_number":97,"context_line":"        sa.Column(u\u0027tenant_id\u0027, sa.String(255), nullable\u003dTrue),"},{"line_number":98,"context_line":"        sa.Column(u\u0027id\u0027, sa.String(36), nullable\u003dFalse),"},{"line_number":99,"context_line":"        sa.Column(u\u0027pool_id\u0027, sa.String(255), nullable\u003dFalse),"},{"line_number":100,"context_line":"        sa.Column(u\u0027subnet_id\u0027, sa.String(36), nullable\u003dTrue),"},{"line_number":101,"context_line":"        sa.Column(u\u0027address\u0027, sa.String(255), nullable\u003dFalse),"},{"line_number":102,"context_line":"        sa.Column(u\u0027protocol_port\u0027, sa.Integer(), nullable\u003dFalse),"}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_f1b89577","line":99,"in_reply_to":"baada198_ae008867","updated":"2014-07-22 14:49:09.000000000","message":"Good catch!","commit_id":"eedad358ef20d0228158510b4f3230786aefdffa"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"b15b97026c7a6e942527cc74c5005d8e25925034","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        sa.Column(u\u0027id\u0027, sa.String(36), nullable\u003dFalse),"},{"line_number":99,"context_line":"        sa.Column(u\u0027pool_id\u0027, sa.String(255), nullable\u003dFalse),"},{"line_number":100,"context_line":"        sa.Column(u\u0027subnet_id\u0027, sa.String(36), nullable\u003dTrue),"},{"line_number":101,"context_line":"        sa.Column(u\u0027address\u0027, sa.String(255), nullable\u003dFalse),"},{"line_number":102,"context_line":"        sa.Column(u\u0027protocol_port\u0027, sa.Integer(), nullable\u003dFalse),"},{"line_number":103,"context_line":"        sa.Column(u\u0027weight\u0027, sa.Integer(), nullable\u003dTrue),"},{"line_number":104,"context_line":"        sa.Column(u\u0027status\u0027, sa.String(16), nullable\u003dFalse),"}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_ee38c03d","line":101,"updated":"2014-07-22 12:18:58.000000000","message":"It is set String(length\u003d64) in models.","commit_id":"eedad358ef20d0228158510b4f3230786aefdffa"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"f76989ba59643e2ed21ec5fb4c00c9c1635769fb","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        sa.Column(u\u0027id\u0027, sa.String(36), nullable\u003dFalse),"},{"line_number":99,"context_line":"        sa.Column(u\u0027pool_id\u0027, sa.String(255), nullable\u003dFalse),"},{"line_number":100,"context_line":"        sa.Column(u\u0027subnet_id\u0027, sa.String(36), nullable\u003dTrue),"},{"line_number":101,"context_line":"        sa.Column(u\u0027address\u0027, sa.String(255), nullable\u003dFalse),"},{"line_number":102,"context_line":"        sa.Column(u\u0027protocol_port\u0027, sa.Integer(), nullable\u003dFalse),"},{"line_number":103,"context_line":"        sa.Column(u\u0027weight\u0027, sa.Integer(), nullable\u003dTrue),"},{"line_number":104,"context_line":"        sa.Column(u\u0027status\u0027, sa.String(16), nullable\u003dFalse),"}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_11ad0933","line":101,"in_reply_to":"baada198_ee38c03d","updated":"2014-07-22 14:49:09.000000000","message":"Good catch!","commit_id":"eedad358ef20d0228158510b4f3230786aefdffa"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"152b893693609b4a6d4b8bdfd47f993a8aca502d","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"lb_protocols \u003d sa.Enum(\"HTTP\", \"HTTPS\", \"TCP\", name\u003d\"lb_protocols\")"},{"line_number":41,"context_line":"sesssionpersistences_type \u003d sa.Enum(\"SOURCE_IP\", \"HTTP_COOKIE\", \"APP_COOKIE\","},{"line_number":42,"context_line":"                                    name\u003d\"sesssionpersistences_type\")"},{"line_number":43,"context_line":"lb_algorithms \u003d sa.Enum(\"ROUND_ROBIN\", \"LEAST_CONNECTIONS\", \"SOURCE_IP\","},{"line_number":44,"context_line":"                        name\u003d\"lb_algorithm\")"},{"line_number":45,"context_line":"healthmonitors_type \u003d sa.Enum(\"PING\", \"TCP\", \"HTTP\", \"HTTPS\","}],"source_content_type":"text/x-python","patch_set":31,"id":"baada198_ad8ce481","line":42,"updated":"2014-07-30 07:51:33.000000000","message":"Pay attention that \u0027sesssionpersistences_type\u0027 is the name that is already used in 54c2c487e913_lbaas. So as the others. Suggest to add v2 to their names.","commit_id":"bfdde9a4791dff153720639158f40a45a65f7162"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"d7bc6f950c8e7419cd33a2f180c029785fc9be0a","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"lb_protocols \u003d sa.Enum(\"HTTP\", \"HTTPS\", \"TCP\", name\u003d\"lb_protocols\")"},{"line_number":41,"context_line":"sesssionpersistences_type \u003d sa.Enum(\"SOURCE_IP\", \"HTTP_COOKIE\", \"APP_COOKIE\","},{"line_number":42,"context_line":"                                    name\u003d\"sesssionpersistences_type\")"},{"line_number":43,"context_line":"lb_algorithms \u003d sa.Enum(\"ROUND_ROBIN\", \"LEAST_CONNECTIONS\", \"SOURCE_IP\","},{"line_number":44,"context_line":"                        name\u003d\"lb_algorithm\")"},{"line_number":45,"context_line":"healthmonitors_type \u003d sa.Enum(\"PING\", \"TCP\", \"HTTP\", \"HTTPS\","}],"source_content_type":"text/x-python","patch_set":31,"id":"baada198_23b411f0","line":42,"in_reply_to":"baada198_ad8ce481","updated":"2014-08-01 04:50:01.000000000","message":"Done","commit_id":"bfdde9a4791dff153720639158f40a45a65f7162"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"2feda11aca5daf695574cce4574c62bd3bcf8568","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"lb_protocols \u003d sa.Enum(\"HTTP\", \"HTTPS\", \"TCP\", name\u003d\"lb_protocols\")"},{"line_number":41,"context_line":"sesssionpersistences_type \u003d sa.Enum(\"SOURCE_IP\", \"HTTP_COOKIE\", \"APP_COOKIE\","},{"line_number":42,"context_line":"                                    name\u003d\"sesssionpersistences_type\")"},{"line_number":43,"context_line":"lb_algorithms \u003d sa.Enum(\"ROUND_ROBIN\", \"LEAST_CONNECTIONS\", \"SOURCE_IP\","},{"line_number":44,"context_line":"                        name\u003d\"lb_algorithm\")"},{"line_number":45,"context_line":"healthmonitors_type \u003d sa.Enum(\"PING\", \"TCP\", \"HTTP\", \"HTTPS\","}],"source_content_type":"text/x-python","patch_set":31,"id":"baada198_f44d8a72","line":42,"in_reply_to":"baada198_ad8ce481","updated":"2014-07-31 13:58:09.000000000","message":"Sorry Ann, didn\u0027t see these because of the review dependency issues that are going on.  I\u0027ll fix these on the next PS.","commit_id":"bfdde9a4791dff153720639158f40a45a65f7162"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"152b893693609b4a6d4b8bdfd47f993a8aca502d","unresolved":false,"context_lines":[{"line_number":161,"context_line":""},{"line_number":162,"context_line":"def downgrade(active_plugins\u003dNone, options\u003dNone):"},{"line_number":163,"context_line":"    if not migration.should_run(active_plugins, migration_for_plugins):"},{"line_number":164,"context_line":"        return"},{"line_number":165,"context_line":"    op.drop_table(u\u0027lbaas_loadbalancer_statistics\u0027)"},{"line_number":166,"context_line":"    op.drop_table(u\u0027lbaas_listeners\u0027)"},{"line_number":167,"context_line":"    op.drop_table(u\u0027lbaas_loadbalancers\u0027)"}],"source_content_type":"text/x-python","patch_set":31,"id":"baada198_cdb75820","line":164,"updated":"2014-07-30 07:51:33.000000000","message":"Pay attention for may comment about types name. As it is now downgrade fails for PostgreSQL http://paste.openstack.org/show/89110/","commit_id":"bfdde9a4791dff153720639158f40a45a65f7162"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"5f04e2bcb0b7583fb2749c2989e41d2b1b932369","unresolved":false,"context_lines":[{"line_number":161,"context_line":""},{"line_number":162,"context_line":"def downgrade(active_plugins\u003dNone, options\u003dNone):"},{"line_number":163,"context_line":"    if not migration.should_run(active_plugins, migration_for_plugins):"},{"line_number":164,"context_line":"        return"},{"line_number":165,"context_line":"    op.drop_table(u\u0027lbaas_loadbalancer_statistics\u0027)"},{"line_number":166,"context_line":"    op.drop_table(u\u0027lbaas_listeners\u0027)"},{"line_number":167,"context_line":"    op.drop_table(u\u0027lbaas_loadbalancers\u0027)"}],"source_content_type":"text/x-python","patch_set":31,"id":"baada198_d4b326ea","line":164,"in_reply_to":"baada198_147afe76","updated":"2014-07-31 14:03:23.000000000","message":"Yes, enums names. Also, lbaas_listeners and lbaas_pools use the same enum \u0027lb_protocols\u0027, and this cause some problems in this change https://review.openstack.org/109035","commit_id":"bfdde9a4791dff153720639158f40a45a65f7162"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"2feda11aca5daf695574cce4574c62bd3bcf8568","unresolved":false,"context_lines":[{"line_number":161,"context_line":""},{"line_number":162,"context_line":"def downgrade(active_plugins\u003dNone, options\u003dNone):"},{"line_number":163,"context_line":"    if not migration.should_run(active_plugins, migration_for_plugins):"},{"line_number":164,"context_line":"        return"},{"line_number":165,"context_line":"    op.drop_table(u\u0027lbaas_loadbalancer_statistics\u0027)"},{"line_number":166,"context_line":"    op.drop_table(u\u0027lbaas_listeners\u0027)"},{"line_number":167,"context_line":"    op.drop_table(u\u0027lbaas_loadbalancers\u0027)"}],"source_content_type":"text/x-python","patch_set":31,"id":"baada198_147afe76","line":164,"in_reply_to":"baada198_cdb75820","updated":"2014-07-31 13:58:09.000000000","message":"Do you mean the enums?","commit_id":"bfdde9a4791dff153720639158f40a45a65f7162"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"d7bc6f950c8e7419cd33a2f180c029785fc9be0a","unresolved":false,"context_lines":[{"line_number":161,"context_line":""},{"line_number":162,"context_line":"def downgrade(active_plugins\u003dNone, options\u003dNone):"},{"line_number":163,"context_line":"    if not migration.should_run(active_plugins, migration_for_plugins):"},{"line_number":164,"context_line":"        return"},{"line_number":165,"context_line":"    op.drop_table(u\u0027lbaas_loadbalancer_statistics\u0027)"},{"line_number":166,"context_line":"    op.drop_table(u\u0027lbaas_listeners\u0027)"},{"line_number":167,"context_line":"    op.drop_table(u\u0027lbaas_loadbalancers\u0027)"}],"source_content_type":"text/x-python","patch_set":31,"id":"baada198_63c9a978","line":164,"in_reply_to":"baada198_d4b326ea","updated":"2014-08-01 04:50:01.000000000","message":"Done","commit_id":"bfdde9a4791dff153720639158f40a45a65f7162"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"152b893693609b4a6d4b8bdfd47f993a8aca502d","unresolved":false,"context_lines":[{"line_number":169,"context_line":"    op.drop_table(u\u0027lbaas_sessionpersistences\u0027)"},{"line_number":170,"context_line":"    sesssionpersistences_type.drop(op.get_bind(), checkfirst\u003dFalse)"},{"line_number":171,"context_line":"    op.drop_table(u\u0027lbaas_pools\u0027)"},{"line_number":172,"context_line":"    lb_protocols.drop(op.get_bind(), checkfirst\u003dFalse)"},{"line_number":173,"context_line":"    op.drop_table(u\u0027lbaas_healthmonitors\u0027)"},{"line_number":174,"context_line":"    healthmonitors_type.drop(op.get_bind(), checkfirst\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":31,"id":"baada198_adba2409","line":172,"updated":"2014-07-30 07:51:33.000000000","message":"lb_algorithms should be also deleted there.","commit_id":"bfdde9a4791dff153720639158f40a45a65f7162"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"d7bc6f950c8e7419cd33a2f180c029785fc9be0a","unresolved":false,"context_lines":[{"line_number":169,"context_line":"    op.drop_table(u\u0027lbaas_sessionpersistences\u0027)"},{"line_number":170,"context_line":"    sesssionpersistences_type.drop(op.get_bind(), checkfirst\u003dFalse)"},{"line_number":171,"context_line":"    op.drop_table(u\u0027lbaas_pools\u0027)"},{"line_number":172,"context_line":"    lb_protocols.drop(op.get_bind(), checkfirst\u003dFalse)"},{"line_number":173,"context_line":"    op.drop_table(u\u0027lbaas_healthmonitors\u0027)"},{"line_number":174,"context_line":"    healthmonitors_type.drop(op.get_bind(), checkfirst\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":31,"id":"baada198_a3bf41c9","line":172,"in_reply_to":"baada198_adba2409","updated":"2014-08-01 04:50:01.000000000","message":"Done","commit_id":"bfdde9a4791dff153720639158f40a45a65f7162"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"2feda11aca5daf695574cce4574c62bd3bcf8568","unresolved":false,"context_lines":[{"line_number":169,"context_line":"    op.drop_table(u\u0027lbaas_sessionpersistences\u0027)"},{"line_number":170,"context_line":"    sesssionpersistences_type.drop(op.get_bind(), checkfirst\u003dFalse)"},{"line_number":171,"context_line":"    op.drop_table(u\u0027lbaas_pools\u0027)"},{"line_number":172,"context_line":"    lb_protocols.drop(op.get_bind(), checkfirst\u003dFalse)"},{"line_number":173,"context_line":"    op.drop_table(u\u0027lbaas_healthmonitors\u0027)"},{"line_number":174,"context_line":"    healthmonitors_type.drop(op.get_bind(), checkfirst\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":31,"id":"baada198_9469ae8e","line":172,"in_reply_to":"baada198_adba2409","updated":"2014-07-31 13:58:09.000000000","message":"will do.","commit_id":"bfdde9a4791dff153720639158f40a45a65f7162"}],"neutron/extensions/loadbalancer.py":[{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"d8681f3e1bfd5b355998c5ba1deb12894aa673cc","unresolved":false,"context_lines":[{"line_number":176,"context_line":"                        \u0027is_visible\u0027: True, \u0027default\u0027: \u0027\u0027},"},{"line_number":177,"context_line":"        \u0027subnet_id\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: False,"},{"line_number":178,"context_line":"                      \u0027validate\u0027: {\u0027type:uuid\u0027: None},"},{"line_number":179,"context_line":"                      #Only doing this because of new API"},{"line_number":180,"context_line":"                      #This should be validated in plugin that it is"},{"line_number":181,"context_line":"                      #a required attribute"},{"line_number":182,"context_line":"                      \u0027default\u0027: attr.ATTR_NOT_SPECIFIED,"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_481b9d1b","line":179,"updated":"2014-07-28 02:07:28.000000000","message":"Missing space. Please check the rest of this and other files in the patch set.","commit_id":"730b5570efd09cf1826bd69c493c0b674e6221a0"}],"neutron/plugins/common/constants.py":[{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"d8681f3e1bfd5b355998c5ba1deb12894aa673cc","unresolved":false,"context_lines":[{"line_number":58,"context_line":"PENDING_DELETE \u003d \"PENDING_DELETE\""},{"line_number":59,"context_line":"INACTIVE \u003d \"INACTIVE\""},{"line_number":60,"context_line":"ERROR \u003d \"ERROR\""},{"line_number":61,"context_line":"#Status if an entity is not linked to a load balancer"},{"line_number":62,"context_line":"DEFERRED \u003d \"DEFERRED\""},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"ACTIVE_PENDING_STATUSES \u003d ("}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_c82fad3c","line":61,"updated":"2014-07-28 02:07:28.000000000","message":"missing space after #.","commit_id":"730b5570efd09cf1826bd69c493c0b674e6221a0"}],"neutron/services/loadbalancer/drivers/logging_noop/driver.py":[{"author":{"_account_id":9461,"name":"Vijay Kumar Venkatachalam","email":"vijay.venkatachalam@citrix.com","username":"vijayvenkatachalam"},"change_message_id":"bb7e8fe31cefda5a58e10b0b3d237a0cfc131b2e","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            # defer listener and its children"},{"line_number":104,"context_line":"            self.driver.plugin.defer_listener(context, new_listener)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        if not new_listener.default_pool and old_listener.default_pool:"},{"line_number":107,"context_line":"            # if listener\u0027s pool has been detached then defer the pool"},{"line_number":108,"context_line":"            # and its children"},{"line_number":109,"context_line":"            self.driver.plugin.defer_pool(context, old_listener.default_pool)"}],"source_content_type":"text/x-python","patch_set":37,"id":"baada198_f2677eb6","line":106,"updated":"2014-08-07 03:03:14.000000000","message":"If listeners pool gets modified the older pool and its children have to be DEFERRED while  new pool and its children have to be ACTIVATED.","commit_id":"42f7e8851516c74f5e62fbfed7683a72c92f9c13"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"a86df8958d194f93e0569eecc2066cd1cf4d40dc","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            # defer listener and its children"},{"line_number":104,"context_line":"            self.driver.plugin.defer_listener(context, new_listener)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        if not new_listener.default_pool and old_listener.default_pool:"},{"line_number":107,"context_line":"            # if listener\u0027s pool has been detached then defer the pool"},{"line_number":108,"context_line":"            # and its children"},{"line_number":109,"context_line":"            self.driver.plugin.defer_pool(context, old_listener.default_pool)"}],"source_content_type":"text/x-python","patch_set":37,"id":"baada198_32ead677","line":106,"in_reply_to":"baada198_f2677eb6","updated":"2014-08-07 03:15:01.000000000","message":"Well this would be correct if the API allowed a listener\u0027s pool to be changed from one pool to the other in one call.  However, to keep it simple at first we decided to only allow the listener\u0027s pool to be changed to None in one call and then to another pool in another.","commit_id":"42f7e8851516c74f5e62fbfed7683a72c92f9c13"},{"author":{"_account_id":9461,"name":"Vijay Kumar Venkatachalam","email":"vijay.venkatachalam@citrix.com","username":"vijayvenkatachalam"},"change_message_id":"bb7e8fe31cefda5a58e10b0b3d237a0cfc131b2e","unresolved":false,"context_lines":[{"line_number":117,"context_line":""},{"line_number":118,"context_line":"class LoggingNoopPoolManager(LoggingNoopCommonManager,"},{"line_number":119,"context_line":"                             driver_base.BasePoolManager):"},{"line_number":120,"context_line":"    def create(self, context, pool):"},{"line_number":121,"context_line":"        super(LoggingNoopPoolManager, self).create(context, pool)"},{"line_number":122,"context_line":"        # This shouldn\u0027t be called since a pool cannot be created and linked"},{"line_number":123,"context_line":"        # to a loadbalancer at the same time"}],"source_content_type":"text/x-python","patch_set":37,"id":"baada198_32b656fd","line":120,"updated":"2014-08-07 03:03:14.000000000","message":"Would prefer to raise an \u0027Invalid\u0027 exception","commit_id":"42f7e8851516c74f5e62fbfed7683a72c92f9c13"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"a86df8958d194f93e0569eecc2066cd1cf4d40dc","unresolved":false,"context_lines":[{"line_number":117,"context_line":""},{"line_number":118,"context_line":"class LoggingNoopPoolManager(LoggingNoopCommonManager,"},{"line_number":119,"context_line":"                             driver_base.BasePoolManager):"},{"line_number":120,"context_line":"    def create(self, context, pool):"},{"line_number":121,"context_line":"        super(LoggingNoopPoolManager, self).create(context, pool)"},{"line_number":122,"context_line":"        # This shouldn\u0027t be called since a pool cannot be created and linked"},{"line_number":123,"context_line":"        # to a loadbalancer at the same time"}],"source_content_type":"text/x-python","patch_set":37,"id":"baada198_d2f8ba4d","line":120,"in_reply_to":"baada198_32b656fd","updated":"2014-08-07 03:15:01.000000000","message":"I don\u0027t think an exception would be great, a pass would be better than an exception in my opinion.  Then again, I can see your argument as well.","commit_id":"42f7e8851516c74f5e62fbfed7683a72c92f9c13"}],"neutron/services/loadbalancer/plugin.py":[{"author":{"_account_id":11255,"name":"Dustin Lundquist","username":"dustin.lundquist","inactive":true},"change_message_id":"6769010d9eaacb9547e97f5db30bc22d35097fbe","unresolved":false,"context_lines":[{"line_number":682,"context_line":"            self.update_status(context, ldbv2.MemberV2, id, constants.DEFERRED)"},{"line_number":683,"context_line":""},{"line_number":684,"context_line":"        return updated_member.to_dict()"},{"line_number":685,"context_line":""},{"line_number":686,"context_line":"    def delete_pool_member(self, context, id, pool_id, body\u003dNone):"},{"line_number":687,"context_line":"        #TODO(do we want to set the status of the pool as well?)"},{"line_number":688,"context_line":"        self.test_and_set_status(context, ldbv2.MemberV2, id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_685e0447","line":685,"updated":"2014-07-10 20:48:38.000000000","message":"Do we also need a _delete_db_loadbalancer(self, context, id) method here?","commit_id":"fab1baaef785595a5ecd267ec0cf2adb4b4b0bb0"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"c99dbee340656d94c11a0022ed2e54e614bdb2ab","unresolved":false,"context_lines":[{"line_number":397,"context_line":"        if provider in self.drivers:"},{"line_number":398,"context_line":"            return self.drivers[provider]"},{"line_number":399,"context_line":"        # raise if not associated (should never be reached)"},{"line_number":400,"context_line":"        raise n_exc.Invalid(_(\"Error retrieving driver for provider %s\") %"},{"line_number":401,"context_line":"                            provider)"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"    def _get_driver_for_loadbalancer(self, context, loadbalancer_id):"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_cd36bbe6","line":400,"updated":"2014-07-15 13:33:28.000000000","message":"Add the drivers dict to the exception message - it is an important information in case something is wrong.","commit_id":"aee21593787de6ec1787acc0f1509beaf3e75c0a"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"1685e2242ebcaf0a8a0655c2764b232032018bcc","unresolved":false,"context_lines":[{"line_number":397,"context_line":"        if provider in self.drivers:"},{"line_number":398,"context_line":"            return self.drivers[provider]"},{"line_number":399,"context_line":"        # raise if not associated (should never be reached)"},{"line_number":400,"context_line":"        raise n_exc.Invalid(_(\"Error retrieving driver for provider %s\") %"},{"line_number":401,"context_line":"                            provider)"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"    def _get_driver_for_loadbalancer(self, context, loadbalancer_id):"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_b970c9dd","line":400,"in_reply_to":"baada198_cd36bbe6","updated":"2014-07-16 04:37:50.000000000","message":"Done","commit_id":"aee21593787de6ec1787acc0f1509beaf3e75c0a"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"eafd4405a8ca92c0d62ba481c566fc804afb9b49","unresolved":false,"context_lines":[{"line_number":394,"context_line":"            raise SystemExit(1)"},{"line_number":395,"context_line":""},{"line_number":396,"context_line":"    def _get_driver_for_provider(self, provider):"},{"line_number":397,"context_line":"        if provider in self.drivers:"},{"line_number":398,"context_line":"            return self.drivers[provider]"},{"line_number":399,"context_line":"        # raise if not associated (should never be reached)"},{"line_number":400,"context_line":"        raise n_exc.Invalid(_(\"Error retrieving driver for provider %s\") %"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_41ebf611","line":397,"updated":"2014-07-17 10:30:41.000000000","message":"driver \u003d self.drivers.get(provider)\nif  driver:\n    return driver\nraise..","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"0054cbd63a840f317ec8fa37d7ae734b75a9266b","unresolved":false,"context_lines":[{"line_number":394,"context_line":"            raise SystemExit(1)"},{"line_number":395,"context_line":""},{"line_number":396,"context_line":"    def _get_driver_for_provider(self, provider):"},{"line_number":397,"context_line":"        if provider in self.drivers:"},{"line_number":398,"context_line":"            return self.drivers[provider]"},{"line_number":399,"context_line":"        # raise if not associated (should never be reached)"},{"line_number":400,"context_line":"        raise n_exc.Invalid(_(\"Error retrieving driver for provider %s\") %"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_cdec82be","line":397,"in_reply_to":"baada198_41ebf611","updated":"2014-07-17 19:55:46.000000000","message":"Done","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"eafd4405a8ca92c0d62ba481c566fc804afb9b49","unresolved":false,"context_lines":[{"line_number":423,"context_line":"                    service_type\u003dconstants.LOADBALANCER)"},{"line_number":424,"context_line":"            return self.default_provider"},{"line_number":425,"context_line":""},{"line_number":426,"context_line":"    def _call_driver_operation(self, context, driver_method, db_entity,"},{"line_number":427,"context_line":"                               old_db_entity\u003dNone):"},{"line_number":428,"context_line":"        try:"},{"line_number":429,"context_line":"            if old_db_entity:"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_061af4c5","line":426,"updated":"2014-07-17 10:30:41.000000000","message":"Can you please explain the added value of this method? Why calling the driver directly is not good enough?","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"0054cbd63a840f317ec8fa37d7ae734b75a9266b","unresolved":false,"context_lines":[{"line_number":423,"context_line":"                    service_type\u003dconstants.LOADBALANCER)"},{"line_number":424,"context_line":"            return self.default_provider"},{"line_number":425,"context_line":""},{"line_number":426,"context_line":"    def _call_driver_operation(self, context, driver_method, db_entity,"},{"line_number":427,"context_line":"                               old_db_entity\u003dNone):"},{"line_number":428,"context_line":"        try:"},{"line_number":429,"context_line":"            if old_db_entity:"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_0d667a29","line":426,"in_reply_to":"baada198_061af4c5","updated":"2014-07-17 19:55:46.000000000","message":"When I originally created it, it did more common things.  Now it automatically sets the entity to ERROR if there is an exception.  I\u0027ve debated going back to calling it directly in the methods simply because it looks better, but it would still have to be wrapped in try except blocks.  I still think its code reuse value is enough to warrant its existence.","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"eafd4405a8ca92c0d62ba481c566fc804afb9b49","unresolved":false,"context_lines":[{"line_number":490,"context_line":"    def get_loadbalancers(self, context, filters\u003dNone, fields\u003dNone):"},{"line_number":491,"context_line":"        loadbalancers \u003d super(LoadBalancerPluginv2, self).get_loadbalancers("},{"line_number":492,"context_line":"            context, filters\u003dfilters)"},{"line_number":493,"context_line":"        lb_dicts \u003d [self._fields(lb.to_dict(), fields) for lb in loadbalancers]"},{"line_number":494,"context_line":"        return lb_dicts"},{"line_number":495,"context_line":""},{"line_number":496,"context_line":"    def create_listener(self, context, listener):"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_a65ce84d","line":493,"updated":"2014-07-17 10:30:41.000000000","message":"return [self._fields(lb.to_dict(), fields) for lb in loadbalancers]","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"0054cbd63a840f317ec8fa37d7ae734b75a9266b","unresolved":false,"context_lines":[{"line_number":490,"context_line":"    def get_loadbalancers(self, context, filters\u003dNone, fields\u003dNone):"},{"line_number":491,"context_line":"        loadbalancers \u003d super(LoadBalancerPluginv2, self).get_loadbalancers("},{"line_number":492,"context_line":"            context, filters\u003dfilters)"},{"line_number":493,"context_line":"        lb_dicts \u003d [self._fields(lb.to_dict(), fields) for lb in loadbalancers]"},{"line_number":494,"context_line":"        return lb_dicts"},{"line_number":495,"context_line":""},{"line_number":496,"context_line":"    def create_listener(self, context, listener):"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_886278d7","line":493,"in_reply_to":"baada198_a65ce84d","updated":"2014-07-17 19:55:46.000000000","message":"Done","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"eafd4405a8ca92c0d62ba481c566fc804afb9b49","unresolved":false,"context_lines":[{"line_number":727,"context_line":""},{"line_number":728,"context_line":"    def create_healthmonitor(self, context, healthmonitor):"},{"line_number":729,"context_line":"        healthmonitor \u003d healthmonitor.get(\u0027healthmonitor\u0027)"},{"line_number":730,"context_line":"        db_hm \u003d super(LoadBalancerPluginv2, self).create_healthmonitor("},{"line_number":731,"context_line":"            context, healthmonitor)"},{"line_number":732,"context_line":""},{"line_number":733,"context_line":"        #no need to call driver since on create it cannot be linked to a load"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_26bb7876","line":730,"updated":"2014-07-17 10:30:41.000000000","message":"We can save an extra call to the DB layer.\nThe current calls are: \n1) create health_monitor\n2) set the status of the entity that was created in call #1\n\nAny reason not to do it in one call?","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"0054cbd63a840f317ec8fa37d7ae734b75a9266b","unresolved":false,"context_lines":[{"line_number":727,"context_line":""},{"line_number":728,"context_line":"    def create_healthmonitor(self, context, healthmonitor):"},{"line_number":729,"context_line":"        healthmonitor \u003d healthmonitor.get(\u0027healthmonitor\u0027)"},{"line_number":730,"context_line":"        db_hm \u003d super(LoadBalancerPluginv2, self).create_healthmonitor("},{"line_number":731,"context_line":"            context, healthmonitor)"},{"line_number":732,"context_line":""},{"line_number":733,"context_line":"        #no need to call driver since on create it cannot be linked to a load"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_cd000205","line":730,"in_reply_to":"baada198_26bb7876","updated":"2014-07-17 19:55:46.000000000","message":"I know and I originally had it that way but I might be over thinking it, but wanted to keep all the methods consistent with how it creates and sets statuses.  I\u0027m not terribly tied to it though.  I do get the advantage of one less db call.","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"eafd4405a8ca92c0d62ba481c566fc804afb9b49","unresolved":false,"context_lines":[{"line_number":789,"context_line":"    def get_healthmonitors(self, context, filters\u003dNone, fields\u003dNone):"},{"line_number":790,"context_line":"        healthmonitors \u003d super(LoadBalancerPluginv2, self).get_healthmonitors("},{"line_number":791,"context_line":"            context, filters\u003dfilters)"},{"line_number":792,"context_line":"        hm_dicts \u003d [self._fields(healthmonitor.to_dict(), fields)"},{"line_number":793,"context_line":"                    for healthmonitor in healthmonitors]"},{"line_number":794,"context_line":"        return hm_dicts"},{"line_number":795,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_c670fcdc","line":792,"updated":"2014-07-17 10:30:41.000000000","message":"return [self._fields(healthmonitor.to_dict(), fields)\n                    for healthmonitor in healthmonitors]","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"0054cbd63a840f317ec8fa37d7ae734b75a9266b","unresolved":false,"context_lines":[{"line_number":789,"context_line":"    def get_healthmonitors(self, context, filters\u003dNone, fields\u003dNone):"},{"line_number":790,"context_line":"        healthmonitors \u003d super(LoadBalancerPluginv2, self).get_healthmonitors("},{"line_number":791,"context_line":"            context, filters\u003dfilters)"},{"line_number":792,"context_line":"        hm_dicts \u003d [self._fields(healthmonitor.to_dict(), fields)"},{"line_number":793,"context_line":"                    for healthmonitor in healthmonitors]"},{"line_number":794,"context_line":"        return hm_dicts"},{"line_number":795,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_c85c701c","line":792,"in_reply_to":"baada198_c670fcdc","updated":"2014-07-17 19:55:46.000000000","message":"Done","commit_id":"5c90271b5626551738de44d0783d97b1b951299f"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"385385ac9242afefe6744b8272ad01619d9ded79","unresolved":false,"context_lines":[{"line_number":563,"context_line":"    def get_listeners(self, context, filters\u003dNone, fields\u003dNone):"},{"line_number":564,"context_line":"        listeners \u003d super(LoadBalancerPluginv2, self).get_listeners("},{"line_number":565,"context_line":"            context, filters\u003dfilters)"},{"line_number":566,"context_line":"        listener_dicts \u003d [self._fields(listener.to_dict(), fields)"},{"line_number":567,"context_line":"                          for listener in listeners]"},{"line_number":568,"context_line":"        return listener_dicts"},{"line_number":569,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_bc69fbf9","line":566,"updated":"2014-07-20 14:24:14.000000000","message":"return  [self._fields(listener.to_dict(), fields)\n                          for listener in listeners]","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"dcc71a0195fb64bfc9a9b461f6c832a90bb94676","unresolved":false,"context_lines":[{"line_number":563,"context_line":"    def get_listeners(self, context, filters\u003dNone, fields\u003dNone):"},{"line_number":564,"context_line":"        listeners \u003d super(LoadBalancerPluginv2, self).get_listeners("},{"line_number":565,"context_line":"            context, filters\u003dfilters)"},{"line_number":566,"context_line":"        listener_dicts \u003d [self._fields(listener.to_dict(), fields)"},{"line_number":567,"context_line":"                          for listener in listeners]"},{"line_number":568,"context_line":"        return listener_dicts"},{"line_number":569,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_5f70d107","line":566,"in_reply_to":"baada198_bc69fbf9","updated":"2014-07-20 15:47:57.000000000","message":"how did I miss this?","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"385385ac9242afefe6744b8272ad01619d9ded79","unresolved":false,"context_lines":[{"line_number":708,"context_line":"    def get_pool_members(self, context, pool_id, filters\u003dNone, fields\u003dNone):"},{"line_number":709,"context_line":"        members \u003d super(LoadBalancerPluginv2, self).get_pool_members("},{"line_number":710,"context_line":"            context, pool_id, filters\u003dfilters)"},{"line_number":711,"context_line":"        member_dict \u003d [self._fields(member.to_dict(), fields)"},{"line_number":712,"context_line":"                       for member in members]"},{"line_number":713,"context_line":"        return member_dict"},{"line_number":714,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_dc6eafff","line":711,"updated":"2014-07-20 14:24:14.000000000","message":"return [self._fields(member.to_dict(), fields)\n                       for member in members]","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"dcc71a0195fb64bfc9a9b461f6c832a90bb94676","unresolved":false,"context_lines":[{"line_number":708,"context_line":"    def get_pool_members(self, context, pool_id, filters\u003dNone, fields\u003dNone):"},{"line_number":709,"context_line":"        members \u003d super(LoadBalancerPluginv2, self).get_pool_members("},{"line_number":710,"context_line":"            context, pool_id, filters\u003dfilters)"},{"line_number":711,"context_line":"        member_dict \u003d [self._fields(member.to_dict(), fields)"},{"line_number":712,"context_line":"                       for member in members]"},{"line_number":713,"context_line":"        return member_dict"},{"line_number":714,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_7f603535","line":711,"in_reply_to":"baada198_dc6eafff","updated":"2014-07-20 15:47:57.000000000","message":"and this one.","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"385385ac9242afefe6744b8272ad01619d9ded79","unresolved":false,"context_lines":[{"line_number":770,"context_line":""},{"line_number":771,"context_line":"        #if healthmonitor is associated with a load balancer then send to"},{"line_number":772,"context_line":"        #driver, if not just delete from the database"},{"line_number":773,"context_line":"        if (db_hm.pool and db_hm.pool.listener and"},{"line_number":774,"context_line":"                db_hm.pool.listener.loadbalancer):"},{"line_number":775,"context_line":"            driver \u003d self._get_driver_for_loadbalancer("},{"line_number":776,"context_line":"                context, db_hm.pool.listener.loadbalancer_id)"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_9c4fd791","line":773,"updated":"2014-07-20 14:24:14.000000000","message":"since we ask quite often the question \"is the SQLAlchemy model attached to LoadBalancer\", I think it makes sense to implement a boolean method in the DB layer \"attached_to_loadbalancer\".\nEach of the relevant entities will do the object graph navigation and will return a result.\nOnce we have this you can remove the comments you have in the code because code wil be self explanatory.","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"dcc71a0195fb64bfc9a9b461f6c832a90bb94676","unresolved":false,"context_lines":[{"line_number":770,"context_line":""},{"line_number":771,"context_line":"        #if healthmonitor is associated with a load balancer then send to"},{"line_number":772,"context_line":"        #driver, if not just delete from the database"},{"line_number":773,"context_line":"        if (db_hm.pool and db_hm.pool.listener and"},{"line_number":774,"context_line":"                db_hm.pool.listener.loadbalancer):"},{"line_number":775,"context_line":"            driver \u003d self._get_driver_for_loadbalancer("},{"line_number":776,"context_line":"                context, db_hm.pool.listener.loadbalancer_id)"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_df5b0184","line":773,"in_reply_to":"baada198_9c4fd791","updated":"2014-07-20 15:47:57.000000000","message":"You\u0027re right and I was thinking about doing that but just didn\u0027t get to it.","commit_id":"bc654de2c02020f0f36646e17da700ab106cf819"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"265c715d0fc035adb86ef5bcff6353414c7b96fa","unresolved":false,"context_lines":[{"line_number":794,"context_line":"    def validate_provider(self, provider):"},{"line_number":795,"context_line":"        if provider not in self.drivers:"},{"line_number":796,"context_line":"            raise pconf.ServiceProviderNotFound("},{"line_number":797,"context_line":"                provider\u003dprovider, service_type\u003dconstants.LOADBALANCERV2)"}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_60ead4ad","line":797,"updated":"2014-07-23 03:52:59.000000000","message":"Are the *_pool_health_monitor methods present in v1 not needed in the v2 class?","commit_id":"eedad358ef20d0228158510b4f3230786aefdffa"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"4a04e7c78c27af89c2131912f4576bb61818d5e3","unresolved":false,"context_lines":[{"line_number":794,"context_line":"    def validate_provider(self, provider):"},{"line_number":795,"context_line":"        if provider not in self.drivers:"},{"line_number":796,"context_line":"            raise pconf.ServiceProviderNotFound("},{"line_number":797,"context_line":"                provider\u003dprovider, service_type\u003dconstants.LOADBALANCERV2)"}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_608654dd","line":797,"in_reply_to":"baada198_60ead4ad","updated":"2014-07-23 04:00:15.000000000","message":"no because those were for association of many to many, we\u0027ve changed that to a many to one association, so that is unneeded now.","commit_id":"eedad358ef20d0228158510b4f3230786aefdffa"},{"author":{"_account_id":7590,"name":"Pattabi Ayyasami","email":"pattabi@brocade.com","username":"pattabibrocade.com"},"change_message_id":"ab8d5900ea049e9aac9fddecacec374791118a5f","unresolved":false,"context_lines":[{"line_number":517,"context_line":""},{"line_number":518,"context_line":"        try:"},{"line_number":519,"context_line":"            listener_db \u003d super(LoadBalancerPluginv2, self).update_listener("},{"line_number":520,"context_line":"                context, id, listener)"},{"line_number":521,"context_line":"        except loadbalancerv2.LoadBalancerIDImmutable as exc:"},{"line_number":522,"context_line":"            self.update_status(context, ldbv2.Listener, id, constants.ACTIVE)"},{"line_number":523,"context_line":"            raise exc"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_c917ef52","line":520,"updated":"2014-07-24 23:14:22.000000000","message":"old_listener and listner_db objects seem to have the same content after update_listener on the plugin db is called. \r\n\r\ndoes it make sense to convert the db object to dict and pass the dict to the driver APIs ? \r\n\r\nfor example, old_listener.to_dict(loadbalancer\u003dTrue)\r\n\r\nsame comment for all the update apis","commit_id":"73743d0dd64504ee275ea3515295f024f7575def"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"654d284499a9320662c59fcaf588f91d47b2a3d3","unresolved":false,"context_lines":[{"line_number":517,"context_line":""},{"line_number":518,"context_line":"        try:"},{"line_number":519,"context_line":"            listener_db \u003d super(LoadBalancerPluginv2, self).update_listener("},{"line_number":520,"context_line":"                context, id, listener)"},{"line_number":521,"context_line":"        except loadbalancerv2.LoadBalancerIDImmutable as exc:"},{"line_number":522,"context_line":"            self.update_status(context, ldbv2.Listener, id, constants.ACTIVE)"},{"line_number":523,"context_line":"            raise exc"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_77015538","line":520,"in_reply_to":"baada198_c917ef52","updated":"2014-07-25 03:52:30.000000000","message":"You\u0027re right.  I\u0027ve suspected this was happening but haven\u0027t had time to fully investigate.  This is because sqlalchemy continually updates the model isntances until the session is closed.  Expunging it causes the relationships to break, even with eager loading.  We don\u0027t want to pass dictionaries around because there\u0027s no reference to what is in them, like a class holds.  I\u0027ve always hated the idea of passing sqlalchemy models around because I figured something like this would happen, so I was going to add classes to map the models to that keep the data static.  That might be something I have to do now.","commit_id":"73743d0dd64504ee275ea3515295f024f7575def"},{"author":{"_account_id":9461,"name":"Vijay Kumar Venkatachalam","email":"vijay.venkatachalam@citrix.com","username":"vijayvenkatachalam"},"change_message_id":"caa39c2d954d9889c23b8ce41ed85bbff1e8f284","unresolved":false,"context_lines":[{"line_number":562,"context_line":"        if listener_db.attached_to_loadbalancer():"},{"line_number":563,"context_line":"            driver \u003d self._get_driver_for_loadbalancer("},{"line_number":564,"context_line":"                context, listener_db.loadbalancer_id)"},{"line_number":565,"context_line":"            self._call_driver_operation("},{"line_number":566,"context_line":"                context, driver.listener.delete, listener_db)"},{"line_number":567,"context_line":"        else:"},{"line_number":568,"context_line":"            super(LoadBalancerPluginv2, self).delete_listener(context, id)"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_767862f8","line":565,"updated":"2014-07-25 15:53:58.000000000","message":"shouldnt there be call to delete listener from db here? or is it deleted later on? I don\u0027t see a code that calls _delete_db_listener","commit_id":"74b47eae5013d56322970f167eabee666ad0920b"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"21adc6df3a624a99806937ce3a67393b3590bc55","unresolved":false,"context_lines":[{"line_number":562,"context_line":"        if listener_db.attached_to_loadbalancer():"},{"line_number":563,"context_line":"            driver \u003d self._get_driver_for_loadbalancer("},{"line_number":564,"context_line":"                context, listener_db.loadbalancer_id)"},{"line_number":565,"context_line":"            self._call_driver_operation("},{"line_number":566,"context_line":"                context, driver.listener.delete, listener_db)"},{"line_number":567,"context_line":"        else:"},{"line_number":568,"context_line":"            super(LoadBalancerPluginv2, self).delete_listener(context, id)"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_e72113fd","line":565,"in_reply_to":"baada198_767862f8","updated":"2014-07-25 22:10:10.000000000","message":"I\u0027ve definitely given thought about this and the only hurdle for doing this is the agent based drivers, or any driver that requires asynchronous calls to fully complete a task.  In v1, the _db_delete_\u003centity\u003e calls were called by the driver after they finished the complete task.\n\nI do think it\u0027d be cleaner to have the db_delete be called in the plugin, but that doesn\u0027t work for every driver.  We can check to see if the driver is a subclass of the AgentDriverBase, but I don\u0027t know if any other drivers have the same requirements.  So I\u0027ve kept the same model as v1 in the interest of leaving that discussion later for it to get the attention it greatly deservers.","commit_id":"74b47eae5013d56322970f167eabee666ad0920b"},{"author":{"_account_id":9461,"name":"Vijay Kumar Venkatachalam","email":"vijay.venkatachalam@citrix.com","username":"vijayvenkatachalam"},"change_message_id":"c36d35d507ef56f06037636ac2f769b5a9ccd13e","unresolved":false,"context_lines":[{"line_number":562,"context_line":"        if listener_db.attached_to_loadbalancer():"},{"line_number":563,"context_line":"            driver \u003d self._get_driver_for_loadbalancer("},{"line_number":564,"context_line":"                context, listener_db.loadbalancer_id)"},{"line_number":565,"context_line":"            self._call_driver_operation("},{"line_number":566,"context_line":"                context, driver.listener.delete, listener_db)"},{"line_number":567,"context_line":"        else:"},{"line_number":568,"context_line":"            super(LoadBalancerPluginv2, self).delete_listener(context, id)"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_691b001c","line":565,"in_reply_to":"baada198_e72113fd","updated":"2014-07-28 07:50:26.000000000","message":"Tricky! Can the workflow (db_delete) be based on the return value from the driver function? return value expected could be \"DELETED\" or \"DELAYED\"","commit_id":"74b47eae5013d56322970f167eabee666ad0920b"},{"author":{"_account_id":9461,"name":"Vijay Kumar Venkatachalam","email":"vijay.venkatachalam@citrix.com","username":"vijayvenkatachalam"},"change_message_id":"caa39c2d954d9889c23b8ce41ed85bbff1e8f284","unresolved":false,"context_lines":[{"line_number":565,"context_line":"            self._call_driver_operation("},{"line_number":566,"context_line":"                context, driver.listener.delete, listener_db)"},{"line_number":567,"context_line":"        else:"},{"line_number":568,"context_line":"            super(LoadBalancerPluginv2, self).delete_listener(context, id)"},{"line_number":569,"context_line":""},{"line_number":570,"context_line":"    def get_listener(self, context, id, fields\u003dNone):"},{"line_number":571,"context_line":"        listener_db \u003d super(LoadBalancerPluginv2, self).get_listener("}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_568b5ebf","line":568,"updated":"2014-07-25 15:53:58.000000000","message":"could have called _delete_db_listener here?","commit_id":"74b47eae5013d56322970f167eabee666ad0920b"},{"author":{"_account_id":9461,"name":"Vijay Kumar Venkatachalam","email":"vijay.venkatachalam@citrix.com","username":"vijayvenkatachalam"},"change_message_id":"c36d35d507ef56f06037636ac2f769b5a9ccd13e","unresolved":false,"context_lines":[{"line_number":565,"context_line":"            self._call_driver_operation("},{"line_number":566,"context_line":"                context, driver.listener.delete, listener_db)"},{"line_number":567,"context_line":"        else:"},{"line_number":568,"context_line":"            super(LoadBalancerPluginv2, self).delete_listener(context, id)"},{"line_number":569,"context_line":""},{"line_number":570,"context_line":"    def get_listener(self, context, id, fields\u003dNone):"},{"line_number":571,"context_line":"        listener_db \u003d super(LoadBalancerPluginv2, self).get_listener("}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_29dd8841","line":568,"in_reply_to":"baada198_07f7e75a","updated":"2014-07-28 07:50:26.000000000","message":"Yes. I agree. Better organization would have been good. But I am OK with whatever you have done here.","commit_id":"74b47eae5013d56322970f167eabee666ad0920b"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"21adc6df3a624a99806937ce3a67393b3590bc55","unresolved":false,"context_lines":[{"line_number":565,"context_line":"            self._call_driver_operation("},{"line_number":566,"context_line":"                context, driver.listener.delete, listener_db)"},{"line_number":567,"context_line":"        else:"},{"line_number":568,"context_line":"            super(LoadBalancerPluginv2, self).delete_listener(context, id)"},{"line_number":569,"context_line":""},{"line_number":570,"context_line":"    def get_listener(self, context, id, fields\u003dNone):"},{"line_number":571,"context_line":"        listener_db \u003d super(LoadBalancerPluginv2, self).get_listener("}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_07f7e75a","line":568,"in_reply_to":"baada198_568b5ebf","updated":"2014-07-25 22:10:10.000000000","message":"You\u0027re right, but I\u0027m not so sure its worth doing.  That method is mainly a hook for the driver so it can do the cleanup.  I do wish the db was a composite of this class and not a super class, which would make the db calls much more explicit and callable from outside the plugin without having to make these accessor methods, but I didn\u0027t want to boil the ocean.","commit_id":"74b47eae5013d56322970f167eabee666ad0920b"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"98547c27d0f1a314a3433d05d7a7866344bdcb4f","unresolved":false,"context_lines":[{"line_number":396,"context_line":"            raise SystemExit(1)"},{"line_number":397,"context_line":""},{"line_number":398,"context_line":"    def _get_driver_for_provider(self, provider):"},{"line_number":399,"context_line":"        if provider in self.drivers:"},{"line_number":400,"context_line":"            return self.drivers[provider]"},{"line_number":401,"context_line":"        # raise if not associated (should never be reached)"},{"line_number":402,"context_line":"        raise n_exc.Invalid(_(\"Error retrieving driver for provider %s\") %"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_8b95b641","line":399,"updated":"2014-07-27 10:24:59.000000000","message":"Consistency: in this method you verify the existence of provider in self.drivers. You raise an exception if its not there.\nIn the method \u0027_get_driver_for_loadbalancer\u0027, you do not verify the existence of provider and you catch KeyError.\nPlease try to do it in 1 way only","commit_id":"730b5570efd09cf1826bd69c493c0b674e6221a0"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"3efebc2a3374d7ec3b32f4505dc0ecdbcfe988f5","unresolved":false,"context_lines":[{"line_number":396,"context_line":"            raise SystemExit(1)"},{"line_number":397,"context_line":""},{"line_number":398,"context_line":"    def _get_driver_for_provider(self, provider):"},{"line_number":399,"context_line":"        if provider in self.drivers:"},{"line_number":400,"context_line":"            return self.drivers[provider]"},{"line_number":401,"context_line":"        # raise if not associated (should never be reached)"},{"line_number":402,"context_line":"        raise n_exc.Invalid(_(\"Error retrieving driver for provider %s\") %"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_3cc78e99","line":399,"in_reply_to":"baada198_8b95b641","updated":"2014-07-27 18:13:40.000000000","message":"Will change in next PS.","commit_id":"730b5570efd09cf1826bd69c493c0b674e6221a0"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"98547c27d0f1a314a3433d05d7a7866344bdcb4f","unresolved":false,"context_lines":[{"line_number":428,"context_line":"    def _call_driver_operation(self, context, driver_method, db_entity,"},{"line_number":429,"context_line":"                               old_db_entity\u003dNone):"},{"line_number":430,"context_line":"        try:"},{"line_number":431,"context_line":"            LOG.info(_(\"Calling driver manager method\"))"},{"line_number":432,"context_line":"            if old_db_entity:"},{"line_number":433,"context_line":"                driver_method(context, old_db_entity, db_entity)"},{"line_number":434,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_4bdabe4b","line":431,"updated":"2014-07-27 10:24:59.000000000","message":"If you want to keep this log message, I think you better add the method name you call, etc. Else - remove the log message","commit_id":"730b5570efd09cf1826bd69c493c0b674e6221a0"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"3efebc2a3374d7ec3b32f4505dc0ecdbcfe988f5","unresolved":false,"context_lines":[{"line_number":428,"context_line":"    def _call_driver_operation(self, context, driver_method, db_entity,"},{"line_number":429,"context_line":"                               old_db_entity\u003dNone):"},{"line_number":430,"context_line":"        try:"},{"line_number":431,"context_line":"            LOG.info(_(\"Calling driver manager method\"))"},{"line_number":432,"context_line":"            if old_db_entity:"},{"line_number":433,"context_line":"                driver_method(context, old_db_entity, db_entity)"},{"line_number":434,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_dcde9269","line":431,"in_reply_to":"baada198_4bdabe4b","updated":"2014-07-27 18:13:40.000000000","message":"I thought I had added this in but must have missed it.  I\u0027ll add it in on the next PS.  Even if it doesn\u0027t have the method name it\u0027s still good to know in the logs when the driver is being called.  However, I agree it should have the method name.","commit_id":"730b5570efd09cf1826bd69c493c0b674e6221a0"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"ed49dd5cf0ac566db0a0a59408b21e82958982a0","unresolved":false,"context_lines":[{"line_number":428,"context_line":"    def _call_driver_operation(self, context, driver_method, db_entity,"},{"line_number":429,"context_line":"                               old_db_entity\u003dNone):"},{"line_number":430,"context_line":"        try:"},{"line_number":431,"context_line":"            LOG.info(_(\"Calling driver manager method\"))"},{"line_number":432,"context_line":"            if old_db_entity:"},{"line_number":433,"context_line":"                driver_method(context, old_db_entity, db_entity)"},{"line_number":434,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_f2b43a37","line":431,"in_reply_to":"baada198_5f350ad9","updated":"2014-07-28 19:56:31.000000000","message":"yes it should be.","commit_id":"730b5570efd09cf1826bd69c493c0b674e6221a0"},{"author":{"_account_id":9461,"name":"Vijay Kumar Venkatachalam","email":"vijay.venkatachalam@citrix.com","username":"vijayvenkatachalam"},"change_message_id":"d097506010cb4207aa826688b204118b4fba799f","unresolved":false,"context_lines":[{"line_number":428,"context_line":"    def _call_driver_operation(self, context, driver_method, db_entity,"},{"line_number":429,"context_line":"                               old_db_entity\u003dNone):"},{"line_number":430,"context_line":"        try:"},{"line_number":431,"context_line":"            LOG.info(_(\"Calling driver manager method\"))"},{"line_number":432,"context_line":"            if old_db_entity:"},{"line_number":433,"context_line":"                driver_method(context, old_db_entity, db_entity)"},{"line_number":434,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_5f350ad9","line":431,"in_reply_to":"baada198_dcde9269","updated":"2014-07-28 08:38:28.000000000","message":"It will be good to know the manager as well. Is that possible?","commit_id":"730b5570efd09cf1826bd69c493c0b674e6221a0"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"07a7740881d5c7a549c2e6fc8dcea896b1fe0bfc","unresolved":false,"context_lines":[{"line_number":486,"context_line":"    def _delete_db_loadbalancer(self, context, id):"},{"line_number":487,"context_line":"        super(LoadBalancerPluginv2, self).delete_loadbalancer(context, id)"},{"line_number":488,"context_line":""},{"line_number":489,"context_line":"    def delete_loadbalancer(self, context, id, body\u003dNone):"},{"line_number":490,"context_line":"        old_lb \u003d super(LoadBalancerPluginv2, self).get_loadbalancer("},{"line_number":491,"context_line":"            context, id)"},{"line_number":492,"context_line":"        if old_lb.listeners:"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_8e59322b","line":489,"updated":"2014-07-28 11:05:16.000000000","message":"Why does the function has a \"body\" parameter?\nThe v1 signatures do not have it.\nIt is not used anywhere in the code.\nditto for the rest of the delete functions","commit_id":"730b5570efd09cf1826bd69c493c0b674e6221a0"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"96a90a6c8c5c2962df4f519439b02f88bc869db2","unresolved":false,"context_lines":[{"line_number":486,"context_line":"    def _delete_db_loadbalancer(self, context, id):"},{"line_number":487,"context_line":"        super(LoadBalancerPluginv2, self).delete_loadbalancer(context, id)"},{"line_number":488,"context_line":""},{"line_number":489,"context_line":"    def delete_loadbalancer(self, context, id, body\u003dNone):"},{"line_number":490,"context_line":"        old_lb \u003d super(LoadBalancerPluginv2, self).get_loadbalancer("},{"line_number":491,"context_line":"            context, id)"},{"line_number":492,"context_line":"        if old_lb.listeners:"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_c0081983","line":489,"in_reply_to":"baada198_0245cbb3","updated":"2014-07-29 17:04:32.000000000","message":"Nope.  I think people were just fine with it throwing an unknown error.","commit_id":"730b5570efd09cf1826bd69c493c0b674e6221a0"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"81d551533ce9c4bfcf1606d0a2379ced1b7b5b7f","unresolved":false,"context_lines":[{"line_number":486,"context_line":"    def _delete_db_loadbalancer(self, context, id):"},{"line_number":487,"context_line":"        super(LoadBalancerPluginv2, self).delete_loadbalancer(context, id)"},{"line_number":488,"context_line":""},{"line_number":489,"context_line":"    def delete_loadbalancer(self, context, id, body\u003dNone):"},{"line_number":490,"context_line":"        old_lb \u003d super(LoadBalancerPluginv2, self).get_loadbalancer("},{"line_number":491,"context_line":"            context, id)"},{"line_number":492,"context_line":"        if old_lb.listeners:"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_0245cbb3","line":489,"in_reply_to":"baada198_124c4e3e","updated":"2014-07-29 08:33:52.000000000","message":"As far as I understand this is bug in the REST engine (correct me if I am wrong). Please dont try to hide this bug, put a comment in the code pointing to a bug describing the issue.\nWhy we did not have this \u0027body\u0027 in v1 - it is a regression, right?","commit_id":"730b5570efd09cf1826bd69c493c0b674e6221a0"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"ed49dd5cf0ac566db0a0a59408b21e82958982a0","unresolved":false,"context_lines":[{"line_number":486,"context_line":"    def _delete_db_loadbalancer(self, context, id):"},{"line_number":487,"context_line":"        super(LoadBalancerPluginv2, self).delete_loadbalancer(context, id)"},{"line_number":488,"context_line":""},{"line_number":489,"context_line":"    def delete_loadbalancer(self, context, id, body\u003dNone):"},{"line_number":490,"context_line":"        old_lb \u003d super(LoadBalancerPluginv2, self).get_loadbalancer("},{"line_number":491,"context_line":"            context, id)"},{"line_number":492,"context_line":"        if old_lb.listeners:"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_124c4e3e","line":489,"in_reply_to":"baada198_8e59322b","updated":"2014-07-28 19:56:31.000000000","message":"so the reason that this is here is if a user actually puts a body into the DELETE request, this method will attempt to be called with this body kwarg.  If the method does not have it, the API will throw a 500 without a specific reason.  Whereas, accepting the body and doing nothing with it seems to me to be the best choice.","commit_id":"730b5570efd09cf1826bd69c493c0b674e6221a0"},{"author":{"_account_id":6447,"name":"Avishay Balderman","email":"avishayb@radware.com","username":"avishayb"},"change_message_id":"6e198cd8252f604f08cd5c7b55ce93b867a99125","unresolved":false,"context_lines":[{"line_number":589,"context_line":"        pool.pop(\u0027lb_method\u0027, None)"},{"line_number":590,"context_line":"        pool.pop(\u0027provider\u0027, None)"},{"line_number":591,"context_line":"        pool.pop(\u0027subnet_id\u0027, None)"},{"line_number":592,"context_line":"        pool.pop(\u0027health_monitors\u0027, None)"},{"line_number":593,"context_line":"        if (\u0027lb_algorithm\u0027 not in pool or"},{"line_number":594,"context_line":"                pool[\u0027lb_algorithm\u0027] \u003d\u003d attrs.ATTR_NOT_SPECIFIED):"},{"line_number":595,"context_line":"            raise loadbalancerv2.RequiredAttributeNotSpecified("}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_8ebf72c9","line":592,"updated":"2014-07-28 12:17:13.000000000","message":"I think that the 4 lines above \"pop\" should be removed.\nAll the v1 pool attributes are not supposed to be accepted here.\nMoreover, the PoolV2 will automaticvaly discard them as it does not have them in the database.","commit_id":"730b5570efd09cf1826bd69c493c0b674e6221a0"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"ed49dd5cf0ac566db0a0a59408b21e82958982a0","unresolved":false,"context_lines":[{"line_number":589,"context_line":"        pool.pop(\u0027lb_method\u0027, None)"},{"line_number":590,"context_line":"        pool.pop(\u0027provider\u0027, None)"},{"line_number":591,"context_line":"        pool.pop(\u0027subnet_id\u0027, None)"},{"line_number":592,"context_line":"        pool.pop(\u0027health_monitors\u0027, None)"},{"line_number":593,"context_line":"        if (\u0027lb_algorithm\u0027 not in pool or"},{"line_number":594,"context_line":"                pool[\u0027lb_algorithm\u0027] \u003d\u003d attrs.ATTR_NOT_SPECIFIED):"},{"line_number":595,"context_line":"            raise loadbalancerv2.RequiredAttributeNotSpecified("}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_32d31239","line":592,"in_reply_to":"baada198_8ebf72c9","updated":"2014-07-28 19:56:31.000000000","message":"yes they are not supposed to be accepted, but they will automatically be put in by the neutron API by the time it passes it to this method.  since I\u0027m using the ** notation to create the PoolV2 it will error on unexpected keyword argument.","commit_id":"730b5570efd09cf1826bd69c493c0b674e6221a0"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"1848cc56c95064789a462c2aa48676f625abe8e5","unresolved":false,"context_lines":[{"line_number":443,"context_line":"            exc_type, exc_message, tb \u003d sys.exc_info()"},{"line_number":444,"context_line":"            trace \u003d \u0027\u0027.join(traceback.format_tb(tb))"},{"line_number":445,"context_line":"            message \u003d \u0027\\n\u0027.join([exc_type, exc_message, trace])"},{"line_number":446,"context_line":"            LOG.error(_(\"There was an error in the driver: \\n%s\") % message)"},{"line_number":447,"context_line":"            raise loadbalancerv2.DriverError()"},{"line_number":448,"context_line":""},{"line_number":449,"context_line":"    def _duplicate_context(self, context):"}],"source_content_type":"text/x-python","patch_set":36,"id":"baada198_e093e8fd","line":446,"updated":"2014-08-01 08:46:25.000000000","message":"Change LOG.error to LOG.exception and lines 443-445 can be eliminated.","commit_id":"36e97d6ef13cce87d6d733e7d206e3729762169e"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"9d59369c0996d8d69d655dcddcb4d87e20cea276","unresolved":false,"context_lines":[{"line_number":443,"context_line":"            exc_type, exc_message, tb \u003d sys.exc_info()"},{"line_number":444,"context_line":"            trace \u003d \u0027\u0027.join(traceback.format_tb(tb))"},{"line_number":445,"context_line":"            message \u003d \u0027\\n\u0027.join([exc_type, exc_message, trace])"},{"line_number":446,"context_line":"            LOG.error(_(\"There was an error in the driver: \\n%s\") % message)"},{"line_number":447,"context_line":"            raise loadbalancerv2.DriverError()"},{"line_number":448,"context_line":""},{"line_number":449,"context_line":"    def _duplicate_context(self, context):"}],"source_content_type":"text/x-python","patch_set":36,"id":"baada198_cd060d21","line":446,"in_reply_to":"baada198_e093e8fd","updated":"2014-08-07 03:15:13.000000000","message":"Ah thank you.  I knew there had to be an easier way to do that.\nDone.","commit_id":"36e97d6ef13cce87d6d733e7d206e3729762169e"}]}
