)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"336fcc670f5291bf9e1b0076c134d7f31b919a55","unresolved":false,"context_lines":[{"line_number":7,"context_line":"routes-control: port associations (API ext, DB, driver API)"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This change implements the framework part of the bgpvpn-routes-control"},{"line_number":10,"context_line":"extenstion related to port associations:"},{"line_number":11,"context_line":"- API extension definition"},{"line_number":12,"context_line":"- service plugin additions for port associations"},{"line_number":13,"context_line":"- driver hooks for port associations"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":25,"id":"5f4e5783_e8fd5e6e","line":10,"range":{"start_line":10,"start_character":0,"end_line":10,"end_character":10},"updated":"2017-10-13 21:22:14.000000000","message":"extension","commit_id":"f095db577d8fb5ebb875b066e03283ac9e92c75f"}],"networking_bgpvpn/neutron/db/migration/alembic_migrations/versions/queens/expand/9a6664f3b8d4_add_port_association_table.py":[{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"1fae3ee5379304045f96469af3c1cebe0bcca1b0","unresolved":false,"context_lines":[{"line_number":60,"context_line":"                  nullable\u003dFalse),"},{"line_number":61,"context_line":"        sa.Column(\u0027local_pref\u0027, sa.Integer(),"},{"line_number":62,"context_line":"                  autoincrement\u003dFalse, nullable\u003dTrue),"},{"line_number":63,"context_line":"        # an IPv6 prefix can be up to 49 chars (IPv4-mapped IPv6 string"},{"line_number":64,"context_line":"        # representation: up to 45 chars, plus 4 chars for \"/128\" which is the"},{"line_number":65,"context_line":"        # highest/longest possible mask)"},{"line_number":66,"context_line":"        sa.Column(\u0027prefix\u0027, sa.String(49), nullable\u003dTrue),"},{"line_number":67,"context_line":"        sa.Column(\u0027bgpvpn_id\u0027, sa.String(length\u003d36), nullable\u003dTrue),"},{"line_number":68,"context_line":"        sa.ForeignKeyConstraint([\u0027bgpvpn_id\u0027],"},{"line_number":69,"context_line":"                                [\u0027bgpvpns.id\u0027],"},{"line_number":70,"context_line":"                                ondelete\u003d\u0027CASCADE\u0027)"},{"line_number":71,"context_line":"        # NOTE(tmorin): it would be nice to add some CheckConstraint so that"},{"line_number":72,"context_line":"        # prefix and bgpvpn_id are enforced as NULL unless relevant for the"},{"line_number":73,"context_line":"        # type, and non-NULL when relevant for the type"},{"line_number":74,"context_line":"    )"}],"source_content_type":"text/x-python","patch_set":25,"id":"3f4b6375_51ff83aa","line":73,"range":{"start_line":63,"start_character":0,"end_line":73,"end_character":55},"updated":"2017-11-02 10:17:48.000000000","message":"I think I should rather use slqalchemy polymorphism (polymorphic_on etc.)","commit_id":"f095db577d8fb5ebb875b066e03283ac9e92c75f"}],"networking_bgpvpn/neutron/extensions/bgpvpn_routes_control.py":[{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"6ce2b04068ffa5af8c6621ef86a368f5548e4ebe","unresolved":false,"context_lines":[{"line_number":58,"context_line":"                \"(%(bgpvpn_id)s)\")"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"class Bgpvpn_routes_control(api_extensions.ExtensionDescriptor):"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @classmethod"},{"line_number":64,"context_line":"    def get_name(cls):"},{"line_number":65,"context_line":"        return api_def.NAME"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    @classmethod"},{"line_number":68,"context_line":"    def get_alias(cls):"},{"line_number":69,"context_line":"        return api_def.ALIAS"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    @classmethod"},{"line_number":72,"context_line":"    def get_description(cls):"},{"line_number":73,"context_line":"        return api_def.DESCRIPTION"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    @classmethod"},{"line_number":76,"context_line":"    def get_updated(cls):"},{"line_number":77,"context_line":"        return api_def.UPDATED_TIMESTAMP"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    @classmethod"},{"line_number":80,"context_line":"    def get_resources(cls):"}],"source_content_type":"text/x-python","patch_set":14,"id":"bf57530f_88bd4c6a","line":77,"range":{"start_line":61,"start_character":0,"end_line":77,"end_character":40},"updated":"2017-09-21 20:28:57.000000000","message":"We should instead inherit from extensions.APIExtensionDescriptor)","commit_id":"293a4d20ebd6d415489947aac85e49451d84c164"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"1a03cf963f39a29550f5c7b1c0c92b3e2ebee83d","unresolved":false,"context_lines":[{"line_number":54,"context_line":"                \"(%(bgpvpn_id)s)\")"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"class Bgpvpn_routes_control(api_extensions.APIExtensionDescriptor):"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    api_definition \u003d api_def"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"1f485f77_6fef65b0","line":57,"range":{"start_line":57,"start_character":6,"end_line":57,"end_character":27},"updated":"2017-11-14 14:58:26.000000000","message":"Not sure that a good format for a python class name. I prefer \u0027BGPVPNRouteControl\u0027","commit_id":"34b98cae607ebb43ce458dee04d1d902b3f8f800"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"7e3e51139403da4b60ff88a3504ec55936dbbd76","unresolved":false,"context_lines":[{"line_number":54,"context_line":"                \"(%(bgpvpn_id)s)\")"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"class Bgpvpn_routes_control(api_extensions.APIExtensionDescriptor):"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    api_definition \u003d api_def"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"1f485f77_8f50615f","line":57,"range":{"start_line":57,"start_character":6,"end_line":57,"end_character":27},"in_reply_to":"1f485f77_6fef65b0","updated":"2017-11-14 15:02:56.000000000","message":"The name has mandatorily to match the module name:\n\nhttps://github.com/openstack/neutron/blob/master/neutron/api/extensions.py#L433\n\nSo, yes, this is not elegant, but there is no choice... :-/","commit_id":"34b98cae607ebb43ce458dee04d1d902b3f8f800"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"24c1e2fc9f69db95e3d8a432ba949a3ae88a81d8","unresolved":false,"context_lines":[{"line_number":54,"context_line":"                \"(%(bgpvpn_id)s)\")"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"class Bgpvpn_routes_control(api_extensions.APIExtensionDescriptor):"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    api_definition \u003d api_def"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"1f485f77_efbb556f","line":57,"range":{"start_line":57,"start_character":6,"end_line":57,"end_character":27},"in_reply_to":"1f485f77_8f50615f","updated":"2017-11-14 15:07:50.000000000","message":"ok, I missed that","commit_id":"34b98cae607ebb43ce458dee04d1d902b3f8f800"}],"networking_bgpvpn/neutron/services/plugin.py":[{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"46085326562bcea8afd1687bfc37674cee4b8c36","unresolved":false,"context_lines":[{"line_number":38,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"# decorator used to wrap methods of BGPVPNPlugin that are only relevant when"},{"line_number":42,"context_line":"# the bgpvpn-routes-control API extension is supported by the driver"},{"line_number":43,"context_line":"def if_bgpvpn_routes_control_supported(f):"},{"line_number":44,"context_line":"    def wrapped_f(self, *args, **kwargs):"},{"line_number":45,"context_line":"        if (bgpvpn_rc.Bgpvpn_routes_control.get_alias() in"},{"line_number":46,"context_line":"                self.supported_extension_aliases):"},{"line_number":47,"context_line":"            return f(self, *args, **kwargs)"},{"line_number":48,"context_line":"        else:"},{"line_number":49,"context_line":"            LOG.error(\"%s called on BGPVPN service plugin while \""},{"line_number":50,"context_line":"                      \"bgpvpn-routes-control API extension is not \""},{"line_number":51,"context_line":"                      \"supported by driver\", f.__name__)"},{"line_number":52,"context_line":"            msg \u003d _(\u0027Operation not available unless the bgpvpn-routes-control \u0027"},{"line_number":53,"context_line":"                    \u0027API extension is supported by the driver\u0027)"},{"line_number":54,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027bgpvpn\u0027, msg\u003dmsg)"},{"line_number":55,"context_line":"    return wrapped_f"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"class BGPVPNPlugin(bgpvpn.BGPVPNPluginBase,"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f515b1d_2393e0a5","line":55,"range":{"start_line":41,"start_character":0,"end_line":55,"end_character":20},"updated":"2017-09-25 18:57:35.000000000","message":"Is it really necessary to check that? The neutron API framework will not raise bad request error if extension is not supported?","commit_id":"2431bf388ebce7fdb6c0e556022370c8a2378f52"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"3b245980f9676040228e28fa659b1752a379b9ab","unresolved":false,"context_lines":[{"line_number":38,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"# decorator used to wrap methods of BGPVPNPlugin that are only relevant when"},{"line_number":42,"context_line":"# the bgpvpn-routes-control API extension is supported by the driver"},{"line_number":43,"context_line":"def if_bgpvpn_routes_control_supported(f):"},{"line_number":44,"context_line":"    def wrapped_f(self, *args, **kwargs):"},{"line_number":45,"context_line":"        if (bgpvpn_rc.Bgpvpn_routes_control.get_alias() in"},{"line_number":46,"context_line":"                self.supported_extension_aliases):"},{"line_number":47,"context_line":"            return f(self, *args, **kwargs)"},{"line_number":48,"context_line":"        else:"},{"line_number":49,"context_line":"            LOG.error(\"%s called on BGPVPN service plugin while \""},{"line_number":50,"context_line":"                      \"bgpvpn-routes-control API extension is not \""},{"line_number":51,"context_line":"                      \"supported by driver\", f.__name__)"},{"line_number":52,"context_line":"            msg \u003d _(\u0027Operation not available unless the bgpvpn-routes-control \u0027"},{"line_number":53,"context_line":"                    \u0027API extension is supported by the driver\u0027)"},{"line_number":54,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027bgpvpn\u0027, msg\u003dmsg)"},{"line_number":55,"context_line":"    return wrapped_f"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"class BGPVPNPlugin(bgpvpn.BGPVPNPluginBase,"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f515b1d_3e6192aa","line":55,"range":{"start_line":41,"start_character":0,"end_line":55,"end_character":20},"in_reply_to":"7f515b1d_2393e0a5","updated":"2017-09-27 14:03:32.000000000","message":"Agreed, will remove.","commit_id":"2431bf388ebce7fdb6c0e556022370c8a2378f52"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"46085326562bcea8afd1687bfc37674cee4b8c36","unresolved":false,"context_lines":[{"line_number":311,"context_line":"    def update_bgpvpn_port_association(self, context, assoc_id, bgpvpn_id,"},{"line_number":312,"context_line":"                                       port_association):"},{"line_number":313,"context_line":"        port_association \u003d port_association[\u0027port_association\u0027]"},{"line_number":314,"context_line":"        self._validate_port_association_routes_bgpvpn(context,"},{"line_number":315,"context_line":"                                                      port_association,"},{"line_number":316,"context_line":"                                                      bgpvpn_id, assoc_id)"},{"line_number":317,"context_line":"        return self.driver.update_port_assoc(context, assoc_id, bgpvpn_id,"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f515b1d_a3d6b026","line":314,"updated":"2017-09-25 18:57:35.000000000","message":"Valide port like in line 285 ?\nYou could move _validate_port_association_routes_bgpvpn in _validate_port.","commit_id":"2431bf388ebce7fdb6c0e556022370c8a2378f52"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"3b245980f9676040228e28fa659b1752a379b9ab","unresolved":false,"context_lines":[{"line_number":311,"context_line":"    def update_bgpvpn_port_association(self, context, assoc_id, bgpvpn_id,"},{"line_number":312,"context_line":"                                       port_association):"},{"line_number":313,"context_line":"        port_association \u003d port_association[\u0027port_association\u0027]"},{"line_number":314,"context_line":"        self._validate_port_association_routes_bgpvpn(context,"},{"line_number":315,"context_line":"                                                      port_association,"},{"line_number":316,"context_line":"                                                      bgpvpn_id, assoc_id)"},{"line_number":317,"context_line":"        return self.driver.update_port_assoc(context, assoc_id, bgpvpn_id,"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f515b1d_5e69ee88","line":314,"in_reply_to":"7f515b1d_a3d6b026","updated":"2017-09-27 14:03:32.000000000","message":"As discussed on IRC: no need to check read-only port_id on an update.","commit_id":"2431bf388ebce7fdb6c0e556022370c8a2378f52"}],"networking_bgpvpn/neutron/services/service_drivers/driver_api.py":[{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"46085326562bcea8afd1687bfc37674cee4b8c36","unresolved":false,"context_lines":[{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    def delete_router_assoc_postcommit(self, context, router_assoc):"},{"line_number":295,"context_line":"        pass"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":299,"context_line":"class BGPVPNDriverRCBase(BGPVPNDriverBase):"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f515b1d_95abeb87","line":296,"updated":"2017-09-25 18:57:35.000000000","message":"I think you have loop in classes hierarchy. I propose that hierarchy:\n BGPVPNDriverBase -\u003e BGPVPNDriverDBMixin -\u003e BGPVPNDriver\n BGPVPNDriverRCBase -\u003e BGPVPNDriverRCDBMixin -\u003e BGPVPNDriverRC\nThen if a driver needs DB persistance it inherits from BGPVPNDriver and BGPVPNDriverRC.\nIf it does not need DB, it inherits from BGPVPNDriverBase and BGPVPNDriverRCBase","commit_id":"2431bf388ebce7fdb6c0e556022370c8a2378f52"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"3b245980f9676040228e28fa659b1752a379b9ab","unresolved":false,"context_lines":[{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    def delete_router_assoc_postcommit(self, context, router_assoc):"},{"line_number":295,"context_line":"        pass"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":299,"context_line":"class BGPVPNDriverRCBase(BGPVPNDriverBase):"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f515b1d_4c292899","line":296,"in_reply_to":"7f515b1d_95abeb87","updated":"2017-09-27 14:03:32.000000000","message":"I don\u0027t think there are loops, nor multiple inheritance issues that the python MRO can\u0027t solve. But indeed the class hierarchy in this PS is not ideal, with BGPVPNDriverRCDBMixin having to call multiple superclass __init__ methods.\n\nI\u0027m not sure I can directly apply your suggestions though (see comments below).\n\nAlso, there still is one thing that we need: having a class that can be used as a dummy driver that implements the routes-control extension.   If I follow your class hierarchy suggestion, I can add a dummy driver class that will inherit from both BGPVPNDriver and BGPVPNDriverRC .","commit_id":"2431bf388ebce7fdb6c0e556022370c8a2378f52"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"46085326562bcea8afd1687bfc37674cee4b8c36","unresolved":false,"context_lines":[{"line_number":296,"context_line":""},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":299,"context_line":"class BGPVPNDriverRCBase(BGPVPNDriverBase):"},{"line_number":300,"context_line":"    \"\"\"Base class for drivers implementing the bgpvpn-routes-control API ext\"\"\""},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"    def __init__(self, *args):"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f515b1d_d59ba3c6","line":299,"range":{"start_line":299,"start_character":25,"end_line":299,"end_character":41},"updated":"2017-09-25 18:57:35.000000000","message":"Why inherits from base class?","commit_id":"2431bf388ebce7fdb6c0e556022370c8a2378f52"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"3b245980f9676040228e28fa659b1752a379b9ab","unresolved":false,"context_lines":[{"line_number":296,"context_line":""},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":299,"context_line":"class BGPVPNDriverRCBase(BGPVPNDriverBase):"},{"line_number":300,"context_line":"    \"\"\"Base class for drivers implementing the bgpvpn-routes-control API ext\"\"\""},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"    def __init__(self, *args):"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f515b1d_47b3414e","line":299,"range":{"start_line":299,"start_character":25,"end_line":299,"end_character":41},"in_reply_to":"7f515b1d_d59ba3c6","updated":"2017-09-27 14:03:32.000000000","message":"BGPVPNDriverBase is the class defining self.service_plugin, which we use in init\n\nAlso, it\u0027s seems natural, since no driver will implement only the BGPVPN routes-control extension alone.","commit_id":"2431bf388ebce7fdb6c0e556022370c8a2378f52"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"46085326562bcea8afd1687bfc37674cee4b8c36","unresolved":false,"context_lines":[{"line_number":299,"context_line":"class BGPVPNDriverRCBase(BGPVPNDriverBase):"},{"line_number":300,"context_line":"    \"\"\"Base class for drivers implementing the bgpvpn-routes-control API ext\"\"\""},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"    def __init__(self, *args):"},{"line_number":303,"context_line":"        super(BGPVPNDriverRCBase, self).__init__(*args)"},{"line_number":304,"context_line":"        self.service_plugin.supported_extension_aliases.append("},{"line_number":305,"context_line":"            bgpvpn_rc.Bgpvpn_routes_control.get_alias())"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f515b1d_38c1ce81","line":302,"range":{"start_line":302,"start_character":4,"end_line":302,"end_character":30},"updated":"2017-09-25 18:57:35.000000000","message":"Could we append the supported API extension \u0027bgpvpn-routes-control\u0027 to the list \u0027supported_extension_aliases\u0027 here?","commit_id":"2431bf388ebce7fdb6c0e556022370c8a2378f52"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"3b245980f9676040228e28fa659b1752a379b9ab","unresolved":false,"context_lines":[{"line_number":299,"context_line":"class BGPVPNDriverRCBase(BGPVPNDriverBase):"},{"line_number":300,"context_line":"    \"\"\"Base class for drivers implementing the bgpvpn-routes-control API ext\"\"\""},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"    def __init__(self, *args):"},{"line_number":303,"context_line":"        super(BGPVPNDriverRCBase, self).__init__(*args)"},{"line_number":304,"context_line":"        self.service_plugin.supported_extension_aliases.append("},{"line_number":305,"context_line":"            bgpvpn_rc.Bgpvpn_routes_control.get_alias())"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f515b1d_ac789cc3","line":302,"range":{"start_line":302,"start_character":4,"end_line":302,"end_character":30},"in_reply_to":"7f515b1d_38c1ce81","updated":"2017-09-27 14:03:32.000000000","message":"(This is what line 304 is doing)","commit_id":"2431bf388ebce7fdb6c0e556022370c8a2378f52"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"46085326562bcea8afd1687bfc37674cee4b8c36","unresolved":false,"context_lines":[{"line_number":326,"context_line":""},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":329,"context_line":"class BGPVPNDriverRCDBMixin(BGPVPNDriverRCBase, BGPVPNDriverDBMixin):"},{"line_number":330,"context_line":"    \"\"\"BGPVPNDriverDBMixin with DB operations for bgpvpn-route-control\"\"\""},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    def __init__(self, *args):"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f515b1d_d505e3c3","line":329,"range":{"start_line":329,"start_character":48,"end_line":329,"end_character":67},"updated":"2017-09-25 18:57:35.000000000","message":"Why inherits from DB mixin class?","commit_id":"2431bf388ebce7fdb6c0e556022370c8a2378f52"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"3b245980f9676040228e28fa659b1752a379b9ab","unresolved":false,"context_lines":[{"line_number":326,"context_line":""},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":329,"context_line":"class BGPVPNDriverRCDBMixin(BGPVPNDriverRCBase, BGPVPNDriverDBMixin):"},{"line_number":330,"context_line":"    \"\"\"BGPVPNDriverDBMixin with DB operations for bgpvpn-route-control\"\"\""},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    def __init__(self, *args):"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f515b1d_c7597135","line":329,"range":{"start_line":329,"start_character":48,"end_line":329,"end_character":67},"in_reply_to":"7f515b1d_d505e3c3","updated":"2017-09-27 14:03:32.000000000","message":"BGPVPNDriverDBMixin is the class that defines self.bgpvpn_db","commit_id":"2431bf388ebce7fdb6c0e556022370c8a2378f52"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"46085326562bcea8afd1687bfc37674cee4b8c36","unresolved":false,"context_lines":[{"line_number":399,"context_line":"        pass"},{"line_number":400,"context_line":""},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"class BGPVPNDriverRC(BGPVPNDriver, BGPVPNDriverRCDBMixin):"},{"line_number":403,"context_line":"    \"\"\"Base class for a DB driver supporting bgpvpn-routes-control API ex\"\"\""},{"line_number":404,"context_line":""},{"line_number":405,"context_line":"    def create_port_assoc_precommit(self, context, port_assoc):"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f515b1d_b5d6e726","line":402,"range":{"start_line":402,"start_character":21,"end_line":402,"end_character":33},"updated":"2017-09-25 18:57:35.000000000","message":"Why inherit from BGPVPN db driver class?","commit_id":"2431bf388ebce7fdb6c0e556022370c8a2378f52"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"269b8b32995ceaad69781fb04b710385e966e584","unresolved":false,"context_lines":[{"line_number":399,"context_line":"        pass"},{"line_number":400,"context_line":""},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"class BGPVPNDriverRC(BGPVPNDriver, BGPVPNDriverRCDBMixin):"},{"line_number":403,"context_line":"    \"\"\"Base class for a DB driver supporting bgpvpn-routes-control API ex\"\"\""},{"line_number":404,"context_line":""},{"line_number":405,"context_line":"    def create_port_assoc_precommit(self, context, port_assoc):"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f515b1d_f7b99814","line":402,"range":{"start_line":402,"start_character":21,"end_line":402,"end_character":33},"in_reply_to":"7f515b1d_273965a3","updated":"2017-09-28 14:17:46.000000000","message":"I tried to rework the inheritance, and found out why I had added this one: I added it because BGPVPNDriverRC base is supposed to be a non-abstract class, so it needs to implement the abstract methods from BGPVPNDriverRCDBMixin, which are below, but also the abstract methods from BGPVPNDriverDBMixin which are defined in BGPVPNDriver.","commit_id":"2431bf388ebce7fdb6c0e556022370c8a2378f52"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"3b245980f9676040228e28fa659b1752a379b9ab","unresolved":false,"context_lines":[{"line_number":399,"context_line":"        pass"},{"line_number":400,"context_line":""},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"class BGPVPNDriverRC(BGPVPNDriver, BGPVPNDriverRCDBMixin):"},{"line_number":403,"context_line":"    \"\"\"Base class for a DB driver supporting bgpvpn-routes-control API ex\"\"\""},{"line_number":404,"context_line":""},{"line_number":405,"context_line":"    def create_port_assoc_precommit(self, context, port_assoc):"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f515b1d_273965a3","line":402,"range":{"start_line":402,"start_character":21,"end_line":402,"end_character":33},"in_reply_to":"7f515b1d_b5d6e726","updated":"2017-09-27 14:03:32.000000000","message":"Yes, it is not required.\n\nI was a way to have:\n- a class usable as a dummy driver and implementing the routes-control extension (but this can be done differently)\n- allow drivers to inherit only one class to become a \u0027routes-control\u0027 enabled plugin (but this is not required)","commit_id":"2431bf388ebce7fdb6c0e556022370c8a2378f52"}]}
