)]}'
{"neutron/db/vpn/vpn_db.py":[{"author":{"_account_id":162,"name":"Bob Melander","email":"bob.melander@gmail.com","username":"bob-melander"},"change_message_id":"63c6bb6f4bee001b45c6c48b109b6ec543bde3b5","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        This is purely for UTs that create a VPNPluginDb object and then"},{"line_number":182,"context_line":"        call its methods, instead of creating a VPNDriverPlugin, which"},{"line_number":183,"context_line":"        will have a service driver associated that will provide a"},{"line_number":184,"context_line":"        validator object."},{"line_number":185,"context_line":"        \"\"\""},{"line_number":186,"context_line":"        return vpn_validator.VpnReferenceValidator()"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_e5b35c4b","line":184,"updated":"2014-06-24 09:20:29.000000000","message":"If so, then could you not just add the method in the setup of those unit tests instead of adding this method here?","commit_id":"770568182c69f42cf8f2a8263fa3a711343e4dd4"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"c2d2dc06a91d25f0d13efeb51234935185f4474e","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        This is purely for UTs that create a VPNPluginDb object and then"},{"line_number":182,"context_line":"        call its methods, instead of creating a VPNDriverPlugin, which"},{"line_number":183,"context_line":"        will have a service driver associated that will provide a"},{"line_number":184,"context_line":"        validator object."},{"line_number":185,"context_line":"        \"\"\""},{"line_number":186,"context_line":"        return vpn_validator.VpnReferenceValidator()"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_50f687fa","line":184,"in_reply_to":"1ae5cdf2_e5b35c4b","updated":"2014-06-24 12:01:59.000000000","message":"It needs to be here. The intent here is that there would be plugin classes that inherits from this class and overrides this method (e.g. IPsecVPNDriver will use the VPnReferenceValidator, CiscoCsrIPsecVPNDriver will use CiscoCsrVpnValidator). However, for some of the UTs, they directly create a VPNPluginDb object to test the database methods. Therefore, we need to have an implementation for this method (rather than raise NotImplementedError).\n\nI\u0027ll try to reword this so it is clearer.","commit_id":"770568182c69f42cf8f2a8263fa3a711343e4dd4"}],"neutron/db/vpn/vpn_validator.py":[{"author":{"_account_id":162,"name":"Bob Melander","email":"bob.melander@gmail.com","username":"bob-melander"},"change_message_id":"63c6bb6f4bee001b45c6c48b109b6ec543bde3b5","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from neutron.plugins.common import constants"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class VpnReferenceValidator(object):"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    \"\"\"Baseline validation routines for VPN resources.\"\"\""},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_c5f90050","line":23,"updated":"2014-06-24 09:20:29.000000000","message":"Have you thought about having common validation base even across l3 services? \n\nPerhaps the overlap would be too little to justify that. I\u0027m not sure myself. The router check is something that would be useful for any service that gets inserted via router.","commit_id":"770568182c69f42cf8f2a8263fa3a711343e4dd4"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"c2d2dc06a91d25f0d13efeb51234935185f4474e","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from neutron.plugins.common import constants"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class VpnReferenceValidator(object):"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    \"\"\"Baseline validation routines for VPN resources.\"\"\""},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_90456f17","line":23,"in_reply_to":"1ae5cdf2_c5f90050","updated":"2014-06-24 12:01:59.000000000","message":"Not yet. My intent was to have VPN specific validation here, but there is nothing that would prevent us from extracting out common validation later on, if it makes sense.","commit_id":"770568182c69f42cf8f2a8263fa3a711343e4dd4"},{"author":{"_account_id":162,"name":"Bob Melander","email":"bob.melander@gmail.com","username":"bob-melander"},"change_message_id":"63c6bb6f4bee001b45c6c48b109b6ec543bde3b5","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class VpnReferenceValidator(object):"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    \"\"\"Baseline validation routines for VPN resources.\"\"\""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    IP_MIN_MTU \u003d {4: 68, 6: 1280}"},{"line_number":28,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_c5c5805d","line":25,"updated":"2014-06-24 09:20:29.000000000","message":"If this is the *baseline* validation should it contain that ipsec specific validation? Or would that perhaps be better placed in a derived ipsec VPN specific class?","commit_id":"770568182c69f42cf8f2a8263fa3a711343e4dd4"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"c2d2dc06a91d25f0d13efeb51234935185f4474e","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class VpnReferenceValidator(object):"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    \"\"\"Baseline validation routines for VPN resources.\"\"\""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    IP_MIN_MTU \u003d {4: 68, 6: 1280}"},{"line_number":28,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_10d6bf27","line":25,"in_reply_to":"1ae5cdf2_c5c5805d","updated":"2014-06-24 12:01:59.000000000","message":"Currently, the \"reference\" implementation for VPN is for the IPsec site-to-site connection use case. Later, as other use cases are considered, they can be added here or, if it makes sense, broken into a hierarchy.","commit_id":"770568182c69f42cf8f2a8263fa3a711343e4dd4"},{"author":{"_account_id":162,"name":"Bob Melander","email":"bob.melander@gmail.com","username":"bob-melander"},"change_message_id":"63c6bb6f4bee001b45c6c48b109b6ec543bde3b5","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        self._core_plugin \u003d None"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    @property"},{"line_number":34,"context_line":"    def l3_plugin(self):"},{"line_number":35,"context_line":"        if self._l3_plugin is None:"},{"line_number":36,"context_line":"            self._l3_plugin \u003d manager.NeutronManager.get_service_plugins().get("},{"line_number":37,"context_line":"                constants.L3_ROUTER_NAT)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_faebf7d9","line":34,"updated":"2014-06-24 09:20:29.000000000","message":"An alternative, to avoid the if check since it will be true only once, could be to skip initializing in __init__() and then here do:\n\ntry:\n    return self._l3_plugin\nexcept AttributeError:\n    self._l3_plugin \u003d manager.NeutronManager.get_service_plugins().get(\n        constants.L3_ROUTER_NAT)\n    return self._l3_plugin","commit_id":"770568182c69f42cf8f2a8263fa3a711343e4dd4"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"c2d2dc06a91d25f0d13efeb51234935185f4474e","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        self._core_plugin \u003d None"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    @property"},{"line_number":34,"context_line":"    def l3_plugin(self):"},{"line_number":35,"context_line":"        if self._l3_plugin is None:"},{"line_number":36,"context_line":"            self._l3_plugin \u003d manager.NeutronManager.get_service_plugins().get("},{"line_number":37,"context_line":"                constants.L3_ROUTER_NAT)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_f09eb368","line":34,"in_reply_to":"1ae5cdf2_faebf7d9","updated":"2014-06-24 12:01:59.000000000","message":"Good idea. Will do.","commit_id":"770568182c69f42cf8f2a8263fa3a711343e4dd4"},{"author":{"_account_id":162,"name":"Bob Melander","email":"bob.melander@gmail.com","username":"bob-melander"},"change_message_id":"63c6bb6f4bee001b45c6c48b109b6ec543bde3b5","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        return self._l3_plugin"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    @property"},{"line_number":41,"context_line":"    def core_plugin(self):"},{"line_number":42,"context_line":"        if self._core_plugin is None:"},{"line_number":43,"context_line":"            self._core_plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":44,"context_line":"        return self._core_plugin"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_7aae079a","line":41,"updated":"2014-06-24 09:20:29.000000000","message":"Same comment as above.","commit_id":"770568182c69f42cf8f2a8263fa3a711343e4dd4"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"c2d2dc06a91d25f0d13efeb51234935185f4474e","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        return self._l3_plugin"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    @property"},{"line_number":41,"context_line":"    def core_plugin(self):"},{"line_number":42,"context_line":"        if self._core_plugin is None:"},{"line_number":43,"context_line":"            self._core_plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":44,"context_line":"        return self._core_plugin"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_10a4ffb7","line":41,"in_reply_to":"1ae5cdf2_7aae079a","updated":"2014-06-24 12:01:59.000000000","message":"Done","commit_id":"770568182c69f42cf8f2a8263fa3a711343e4dd4"}],"neutron/services/vpn/service_drivers/ipsec.py":[{"author":{"_account_id":162,"name":"Bob Melander","email":"bob.melander@gmail.com","username":"bob-melander"},"change_message_id":"63c6bb6f4bee001b45c6c48b109b6ec543bde3b5","unresolved":false,"context_lines":[{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def __init__(self, service_plugin):"},{"line_number":77,"context_line":"        super(IPsecVPNDriver, self).__init__("},{"line_number":78,"context_line":"            service_plugin, vpn_validator.VpnReferenceValidator())"},{"line_number":79,"context_line":"        self.callbacks \u003d IPsecVpnDriverCallBack(self)"},{"line_number":80,"context_line":"        self.conn \u003d rpc_compat.create_connection(new\u003dTrue)"},{"line_number":81,"context_line":"        self.conn.create_consumer("}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_05dbe821","line":78,"updated":"2014-06-24 09:20:29.000000000","message":"Maybe give validator a name indicating it\u0027s a validator for ipsec VPN?","commit_id":"770568182c69f42cf8f2a8263fa3a711343e4dd4"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"c2d2dc06a91d25f0d13efeb51234935185f4474e","unresolved":false,"context_lines":[{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def __init__(self, service_plugin):"},{"line_number":77,"context_line":"        super(IPsecVPNDriver, self).__init__("},{"line_number":78,"context_line":"            service_plugin, vpn_validator.VpnReferenceValidator())"},{"line_number":79,"context_line":"        self.callbacks \u003d IPsecVpnDriverCallBack(self)"},{"line_number":80,"context_line":"        self.conn \u003d rpc_compat.create_connection(new\u003dTrue)"},{"line_number":81,"context_line":"        self.conn.create_consumer("}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_d0d537e6","line":78,"in_reply_to":"1ae5cdf2_05dbe821","updated":"2014-06-24 12:01:59.000000000","message":"Will see what other reviewers\u0027 comment. Currently, I was thinking of keeping the validator class generic to represent the reference implementation of validation for all cases (with ability to specialize later, if needed)","commit_id":"770568182c69f42cf8f2a8263fa3a711343e4dd4"}],"neutron/tests/unit/db/vpn/test_db_vpnaas.py":[{"author":{"_account_id":162,"name":"Bob Melander","email":"bob.melander@gmail.com","username":"bob-melander"},"change_message_id":"63c6bb6f4bee001b45c6c48b109b6ec543bde3b5","unresolved":false,"context_lines":[{"line_number":927,"context_line":"                                     router\u003drouter):"},{"line_number":928,"context_line":"                    self._delete(\u0027routers\u0027, router[\u0027router\u0027][\u0027id\u0027],"},{"line_number":929,"context_line":"                                 expected_code\u003dwebob.exc.HTTPConflict.code)"},{"line_number":930,"context_line":""},{"line_number":931,"context_line":"    def test_update_vpnservice(self):"},{"line_number":932,"context_line":"        \"\"\"Test case to update a vpnservice.\"\"\""},{"line_number":933,"context_line":"        name \u003d \u0027new_vpnservice1\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_c5ef40b0","side":"PARENT","line":930,"updated":"2014-06-24 09:20:29.000000000","message":"Why remove these tests?","commit_id":"551d5a476e8c7a7b95490e8fcb50b51d3db82081"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"c2d2dc06a91d25f0d13efeb51234935185f4474e","unresolved":false,"context_lines":[{"line_number":927,"context_line":"                                     router\u003drouter):"},{"line_number":928,"context_line":"                    self._delete(\u0027routers\u0027, router[\u0027router\u0027][\u0027id\u0027],"},{"line_number":929,"context_line":"                                 expected_code\u003dwebob.exc.HTTPConflict.code)"},{"line_number":930,"context_line":""},{"line_number":931,"context_line":"    def test_update_vpnservice(self):"},{"line_number":932,"context_line":"        \"\"\"Test case to update a vpnservice.\"\"\""},{"line_number":933,"context_line":"        name \u003d \u0027new_vpnservice1\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_70ff0336","side":"PARENT","line":930,"in_reply_to":"1ae5cdf2_c5ef40b0","updated":"2014-06-24 12:01:59.000000000","message":"These tests are for the validation logic. They do so, by doing database operations and check for (at a high level) errors. I removed them and replaced/extended with low level tests that directly test the validation methods, one set in the test for the reference service driver and another set for the Cisco service driver, which has different validation logic. See test_ipsec.py and test_cisco_ipsec.py.","commit_id":"551d5a476e8c7a7b95490e8fcb50b51d3db82081"}]}
