)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9396,"name":"igordcard","email":"igordcard@gmail.com","username":"igordcard"},"change_message_id":"db4e123ea97159a70cfeb9eb533c2aab408c74e7","unresolved":false,"context_lines":[{"line_number":3,"context_line":"AuthorDate: 2016-11-18 16:37:22 +0000"},{"line_number":4,"context_line":"Commit:     David Shaughnessy \u003cdavid.shaughnessy@intel.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-01-18 14:18:07 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"[WIP]Implement QoS OpenFlowFunction for DSCP"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"OpenFlowFunctions interact with the OpenFlowManager"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5a3905b3_9187c00e","line":6,"updated":"2017-01-19 23:13:37.000000000","message":"Set the topic of this patch to the same as https://review.openstack.org/#/c/323963/, for easy discovery.","commit_id":"bb775ba5990041a8178c310d97a81cc5a543944a"}],"neutron/agent/l2/extensions/qos.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"fbe1d62ccba30bdc0a9c58c5186852648fc58105","unresolved":false,"context_lines":[{"line_number":135,"context_line":""},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"@ovs_flow_manager.register_openflow_function"},{"line_number":138,"context_line":"class QosDscpOpenFlowFunction(ovs_flow_manager.OpenFlowFunction):"},{"line_number":139,"context_line":"    #NOTE(davidsha) This object is placed here so it\u0027s registered"},{"line_number":140,"context_line":"    # in the OpenFlowManager before the qos extension is initialized."},{"line_number":141,"context_line":"    extension \u003d \"QoS\""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_831ddc11","line":138,"range":{"start_line":138,"start_character":0,"end_line":138,"end_character":65},"updated":"2016-11-23 08:55:32.000000000","message":"I know DSCP is only implemented in OVS, but could be implemented in any backend (with DSCP support). This class is designed only for OVS backend implementation and shouldn\u0027t be here, in the L2 extensions driver.\n\nFor example, I don\u0027t agree with having here \"_get_egress_burst_value\" L127; this is an specific backend implementation.","commit_id":"c513a86886e42033b5ba787fe5f56a08060ceafc"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"5c848b0766d711cc9c33ec8d26160a3d4aef21bd","unresolved":false,"context_lines":[{"line_number":135,"context_line":""},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"@ovs_flow_manager.register_openflow_function"},{"line_number":138,"context_line":"class QosDscpOpenFlowFunction(ovs_flow_manager.OpenFlowFunction):"},{"line_number":139,"context_line":"    #NOTE(davidsha) This object is placed here so it\u0027s registered"},{"line_number":140,"context_line":"    # in the OpenFlowManager before the qos extension is initialized."},{"line_number":141,"context_line":"    extension \u003d \"QoS\""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_ce339112","line":138,"range":{"start_line":138,"start_character":0,"end_line":138,"end_character":65},"in_reply_to":"5a74a57a_0cd81953","updated":"2017-01-18 15:18:53.000000000","message":"I know what you mean, David. The problem is defining this class here.\n\nYou should rebase to https://review.openstack.org/#/c/396651. Here you can register all xxxOpenFlowFunctions when the OVS QoS driver is registering itself.","commit_id":"c513a86886e42033b5ba787fe5f56a08060ceafc"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"b60b88fc166d66404d0ad3538cd7ad03ab6cbfd4","unresolved":false,"context_lines":[{"line_number":135,"context_line":""},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"@ovs_flow_manager.register_openflow_function"},{"line_number":138,"context_line":"class QosDscpOpenFlowFunction(ovs_flow_manager.OpenFlowFunction):"},{"line_number":139,"context_line":"    #NOTE(davidsha) This object is placed here so it\u0027s registered"},{"line_number":140,"context_line":"    # in the OpenFlowManager before the qos extension is initialized."},{"line_number":141,"context_line":"    extension \u003d \"QoS\""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_e9490f90","line":138,"range":{"start_line":138,"start_character":0,"end_line":138,"end_character":65},"in_reply_to":"5a74a57a_49aa03d6","updated":"2016-11-23 09:56:05.000000000","message":"Hmm, I wonder how could we workaround that and still use the decorator... ,\n\nDoesn\u0027t it work if you move it to the QoS OVS driver?\n\nMay be we can delay the pipeline generation, when doest that happen?, what does trigger it?","commit_id":"c513a86886e42033b5ba787fe5f56a08060ceafc"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"8d74433eb11efb5ddf2d2ad56c81767a56878cdc","unresolved":false,"context_lines":[{"line_number":135,"context_line":""},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"@ovs_flow_manager.register_openflow_function"},{"line_number":138,"context_line":"class QosDscpOpenFlowFunction(ovs_flow_manager.OpenFlowFunction):"},{"line_number":139,"context_line":"    #NOTE(davidsha) This object is placed here so it\u0027s registered"},{"line_number":140,"context_line":"    # in the OpenFlowManager before the qos extension is initialized."},{"line_number":141,"context_line":"    extension \u003d \"QoS\""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_49aa03d6","line":138,"range":{"start_line":138,"start_character":0,"end_line":138,"end_character":65},"in_reply_to":"5a74a57a_831ddc11","updated":"2016-11-23 09:35:59.000000000","message":"Acknowledged, however just by how the functions are registered to the OpenFlowManager if I place this in the ovs driver it will be loaded after the flow manager has generated the pipeline.","commit_id":"c513a86886e42033b5ba787fe5f56a08060ceafc"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"2e9205b3121e4081fb2ad2c8ac9331fdf7a5c054","unresolved":false,"context_lines":[{"line_number":135,"context_line":""},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"@ovs_flow_manager.register_openflow_function"},{"line_number":138,"context_line":"class QosDscpOpenFlowFunction(ovs_flow_manager.OpenFlowFunction):"},{"line_number":139,"context_line":"    #NOTE(davidsha) This object is placed here so it\u0027s registered"},{"line_number":140,"context_line":"    # in the OpenFlowManager before the qos extension is initialized."},{"line_number":141,"context_line":"    extension \u003d \"QoS\""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_0cd81953","line":138,"range":{"start_line":138,"start_character":0,"end_line":138,"end_character":65},"in_reply_to":"5a74a57a_e9490f90","updated":"2016-11-23 10:04:30.000000000","message":"The pipeline needs to be generated after the extensions have been loaded into the extension manager but before they\u0027re initialized (in case any have OpenFlowTables with default set to drop).\n\nI can\u0027t put the OpenFlowFunction in the OVS driver because the ovs_driver is loaded during initialization :/","commit_id":"c513a86886e42033b5ba787fe5f56a08060ceafc"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"b60b88fc166d66404d0ad3538cd7ad03ab6cbfd4","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    def __init__(self, bridge):"},{"line_number":151,"context_line":"        super(QosDscpOpenFlowFunction, self).__init__()"},{"line_number":152,"context_line":"        self.br_int \u003d bridge"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def install_dscp_rule(self, port, mark):"},{"line_number":155,"context_line":"        port_num \u003d port[\"vif_port\"].ofport"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_495f6372","line":152,"updated":"2016-11-23 09:56:05.000000000","message":"you could create a shortcut here to make 158/159 more readable, ie:\n\nself.dscp_table \u003d self.declares_tables[0]","commit_id":"c513a86886e42033b5ba787fe5f56a08060ceafc"},{"author":{"_account_id":9396,"name":"igordcard","email":"igordcard@gmail.com","username":"igordcard"},"change_message_id":"db4e123ea97159a70cfeb9eb533c2aab408c74e7","unresolved":false,"context_lines":[{"line_number":126,"context_line":""},{"line_number":127,"context_line":"@ovs_flow_manager.register_openflow_function"},{"line_number":128,"context_line":"class QosDscpOpenFlowFunction(ovs_flow_manager.OpenFlowFunction):"},{"line_number":129,"context_line":"    #NOTE(davidsha) This object is placed here so it\u0027s registered"},{"line_number":130,"context_line":"    # in the OpenFlowManager before the qos extension is initialized."},{"line_number":131,"context_line":"    extension \u003d \"QoS\""},{"line_number":132,"context_line":"    name \u003d constants.QOS_EGRESS_DSCP"},{"line_number":133,"context_line":"    bridge \u003d None"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a3905b3_f7be34fe","line":130,"range":{"start_line":129,"start_character":0,"end_line":130,"end_character":69},"updated":"2017-01-19 23:13:37.000000000","message":"Regarding the conversation on the previous patchset. One way the dependency on the OVS flow manager from the QoS L2 agent extension could be avoided, is if the OVS flow manager became a general pipeline for Neutron \"functions\" or at least L2 agent functions. Such functions could then have specific implementations depending on the agent actually running. The location in code where a function would get registered would be different from where the internals of that function would be specified, and the L2 agent extension would no longer depend on OVS explicitly.","commit_id":"bb775ba5990041a8178c310d97a81cc5a543944a"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"71be2fb2469ce6ae94fb6ad22d0eb8e4723bf1d0","unresolved":false,"context_lines":[{"line_number":132,"context_line":"    bridge \u003d None"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    declares_registers \u003d []"},{"line_number":135,"context_line":"    declares_tables \u003d [ovs_flow_manager.OpenFlowTable(\"dscp_table\")]"},{"line_number":136,"context_line":"    needs_registers \u003d []"},{"line_number":137,"context_line":"    needs_functions \u003d []"},{"line_number":138,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"bf091321_71277314","line":135,"range":{"start_line":135,"start_character":54,"end_line":135,"end_character":66},"updated":"2017-06-08 19:12:04.000000000","message":"isn\u0027t \"_table\" a bit redundant, since this is a table ?","commit_id":"ebfca1f96277855dc44b8094fa9bec889f5b676e"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"ba07b6fcecd14b28070f07fd4e91497dc64ab943","unresolved":false,"context_lines":[{"line_number":132,"context_line":"    bridge \u003d None"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    declares_registers \u003d []"},{"line_number":135,"context_line":"    declares_tables \u003d [ovs_flow_manager.OpenFlowTable(\"dscp_table\")]"},{"line_number":136,"context_line":"    needs_registers \u003d []"},{"line_number":137,"context_line":"    needs_functions \u003d []"},{"line_number":138,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7f231b9d_06847b5d","line":135,"range":{"start_line":135,"start_character":54,"end_line":135,"end_character":66},"in_reply_to":"9f0e0f27_636fcdc5","updated":"2017-06-12 15:47:13.000000000","message":"I just thought that, since this code may become a source of inspiration, then opting for a more concise/elegant would be better.","commit_id":"ebfca1f96277855dc44b8094fa9bec889f5b676e"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"9a23a4d124f360ae72c174168576b00bdf14b34f","unresolved":false,"context_lines":[{"line_number":132,"context_line":"    bridge \u003d None"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    declares_registers \u003d []"},{"line_number":135,"context_line":"    declares_tables \u003d [ovs_flow_manager.OpenFlowTable(\"dscp_table\")]"},{"line_number":136,"context_line":"    needs_registers \u003d []"},{"line_number":137,"context_line":"    needs_functions \u003d []"},{"line_number":138,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f0e0f27_636fcdc5","line":135,"range":{"start_line":135,"start_character":54,"end_line":135,"end_character":66},"in_reply_to":"bf091321_71277314","updated":"2017-06-09 15:59:02.000000000","message":"This was just the name of this particular table, They don\u0027t actually bleed above the function, I was just thinking it might be handier to denote what type it was in the name rather than having multiple variables called \u0027dscp\u0027.","commit_id":"ebfca1f96277855dc44b8094fa9bec889f5b676e"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"71be2fb2469ce6ae94fb6ad22d0eb8e4723bf1d0","unresolved":false,"context_lines":[{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def __init__(self, bridge):"},{"line_number":140,"context_line":"        super(QosDscpOpenFlowFunction, self).__init__()"},{"line_number":141,"context_line":"        self.br_int \u003d bridge"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def install_dscp_rule(self, port, mark):"},{"line_number":144,"context_line":"        port_num \u003d port[\"vif_port\"].ofport"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf091321_6ab1ce8f","line":141,"range":{"start_line":141,"start_character":8,"end_line":141,"end_character":28},"updated":"2017-06-08 19:12:04.000000000","message":"Related to the above, it would be nice if this was done once for all openflowfunctions in the mother class.\n\nThis would mean having the OpenFlowManager instantiate the OpenFlowFunction, which I understand is not the case as the code is written now.  \n\nPerhaps we could have:\n- the OpenFlowManager instantiate the OpenFlowFunction, \n- the OpenFlowManager provide a registry to retrieve the instance for a given OpenflowFunction class\n- perhaps, as a helper, provide a way for l2 agent extension to declare which OpenFlowFunction they need and have the corresponding instances be passed to them  (decorator to l2 agent extension)","commit_id":"ebfca1f96277855dc44b8094fa9bec889f5b676e"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"ba07b6fcecd14b28070f07fd4e91497dc64ab943","unresolved":false,"context_lines":[{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def __init__(self, bridge):"},{"line_number":140,"context_line":"        super(QosDscpOpenFlowFunction, self).__init__()"},{"line_number":141,"context_line":"        self.br_int \u003d bridge"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def install_dscp_rule(self, port, mark):"},{"line_number":144,"context_line":"        port_num \u003d port[\"vif_port\"].ofport"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f231b9d_d7f86cc5","line":141,"range":{"start_line":141,"start_character":8,"end_line":141,"end_character":28},"in_reply_to":"9f0e0f27_b64401b9","updated":"2017-06-12 15:47:13.000000000","message":"I in fact made what I think is a better suggestion in the review on the openflowmanager implementation, so this comment can possibly be ignored.\n\nThat said, my suggestion was to have the openflowmanager expose a method that would return the same instance all the time for a given OpenFlowFunction class, and keep the static class design.  Only the way the classes are instantiated would change.\n\nBut giving some thought to the thing, letting the l2 agent extension instantiate the bridge has the benefit of keeping open the possibility of using a different bridge (like sfc does today).  This is why I finally made different suggestions in the other review.","commit_id":"ebfca1f96277855dc44b8094fa9bec889f5b676e"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"9a23a4d124f360ae72c174168576b00bdf14b34f","unresolved":false,"context_lines":[{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def __init__(self, bridge):"},{"line_number":140,"context_line":"        super(QosDscpOpenFlowFunction, self).__init__()"},{"line_number":141,"context_line":"        self.br_int \u003d bridge"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def install_dscp_rule(self, port, mark):"},{"line_number":144,"context_line":"        port_num \u003d port[\"vif_port\"].ofport"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f0e0f27_b64401b9","line":141,"range":{"start_line":141,"start_character":8,"end_line":141,"end_character":28},"in_reply_to":"bf091321_6ab1ce8f","updated":"2017-06-09 15:59:02.000000000","message":"Just to clarify, this would be something along the lines of an extension passing the OpenFlowFunction class to the agent extensions API, It being instantiated and placed in the pipeline before being returned to the extension?\n\nIf I recall correctly, the reason Miguel wanted to have these static class with wrappers was to avoid extensions registering the same functions and dynamically requesting more tables after initialization. The reason being that in certain conditions the extension could exhaust the total number of tables and cause problems.\n\nAt the moment when OpenFlowFunctions are being processed they can request access to other OpenFlowFunctions using the \"needs_functions\" list. However at the moment these are isolated to the individual extensions (which can have multiple functions for different features). But we could add another list for allowed functions or extensions in each function.","commit_id":"ebfca1f96277855dc44b8094fa9bec889f5b676e"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"71be2fb2469ce6ae94fb6ad22d0eb8e4723bf1d0","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        port_num \u003d port[\"vif_port\"].ofport"},{"line_number":145,"context_line":"        dscp_mark \u003d str(mark \u003c\u003c 2)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        table \u003d QosDscpOpenFlowFunction.declares_tables[0].table_num"},{"line_number":148,"context_line":"        next_table \u003d QosDscpOpenFlowFunction.declares_tables[0].next_table"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        actions \u003d (\"mod_nw_tos:%s,resubmit(,%s)\" % (dscp_mark, next_table))"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        self.br_int.add_flow(in_port\u003dport_num, table\u003dtable, priority\u003d10,"},{"line_number":153,"context_line":"                             actions\u003dactions)"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def delete_dscp_rule(self, port):"},{"line_number":156,"context_line":"        port_num \u003d port[\u0027vif_port\u0027].ofport"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf091321_aa3a46e4","line":153,"range":{"start_line":147,"start_character":0,"end_line":153,"end_character":45},"updated":"2017-06-08 19:12:04.000000000","message":"We could perhaps have helpers to shorten the code:\n\n   actions \u003d \"mod_nw_tos:%s,%s\" % (dscp_mark,\n                                   self.next_table_action())\n\n   self.bridge.add_flow(table\u003dself.get_table(\"dscp\"),\n                        in_port\u003dport_num,\n                        priority\u003d10,\n                        actions\u003dactions)\n\nOr, even better (my feeling):\n\n   self.add_flow(table\u003d\"dscp\",\n                 in_port\u003dport_num,\n                 priority\u003d10,\n                 actions\u003d\"mod_nw_tos:%s\" % dscp_mark)\n   # and have the flow manager:\n   # - translate table name into a table id\n   # - add the resubmit to\n   #   next_table, or drop, depending what the default is\n\nVariant, perhaps even better (again, my feeling):\n\n   self.tables[\u0027dscp\u0027].add_flow(in_port\u003dport_num,\n                                priority\u003d10,\n                                actions\u003d\"mod_nw_tos:%s\" % dscp_mark)","commit_id":"ebfca1f96277855dc44b8094fa9bec889f5b676e"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"ba07b6fcecd14b28070f07fd4e91497dc64ab943","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        port_num \u003d port[\"vif_port\"].ofport"},{"line_number":145,"context_line":"        dscp_mark \u003d str(mark \u003c\u003c 2)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        table \u003d QosDscpOpenFlowFunction.declares_tables[0].table_num"},{"line_number":148,"context_line":"        next_table \u003d QosDscpOpenFlowFunction.declares_tables[0].next_table"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        actions \u003d (\"mod_nw_tos:%s,resubmit(,%s)\" % (dscp_mark, next_table))"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        self.br_int.add_flow(in_port\u003dport_num, table\u003dtable, priority\u003d10,"},{"line_number":153,"context_line":"                             actions\u003dactions)"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def delete_dscp_rule(self, port):"},{"line_number":156,"context_line":"        port_num \u003d port[\u0027vif_port\u0027].ofport"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f231b9d_d7218c4f","line":153,"range":{"start_line":147,"start_character":0,"end_line":153,"end_character":45},"in_reply_to":"7f231b9d_b99d1b68","updated":"2017-06-12 15:47:13.000000000","message":"+1","commit_id":"ebfca1f96277855dc44b8094fa9bec889f5b676e"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"9a23a4d124f360ae72c174168576b00bdf14b34f","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        port_num \u003d port[\"vif_port\"].ofport"},{"line_number":145,"context_line":"        dscp_mark \u003d str(mark \u003c\u003c 2)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        table \u003d QosDscpOpenFlowFunction.declares_tables[0].table_num"},{"line_number":148,"context_line":"        next_table \u003d QosDscpOpenFlowFunction.declares_tables[0].next_table"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        actions \u003d (\"mod_nw_tos:%s,resubmit(,%s)\" % (dscp_mark, next_table))"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        self.br_int.add_flow(in_port\u003dport_num, table\u003dtable, priority\u003d10,"},{"line_number":153,"context_line":"                             actions\u003dactions)"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def delete_dscp_rule(self, port):"},{"line_number":156,"context_line":"        port_num \u003d port[\u0027vif_port\u0027].ofport"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f231b9d_b99d1b68","line":153,"range":{"start_line":147,"start_character":0,"end_line":153,"end_character":45},"in_reply_to":"bf091321_aa3a46e4","updated":"2017-06-09 15:59:02.000000000","message":"Agreed, I\u0027ll look into the last example.\nI\u0027d personally like to keep flow manipulation outside of the flow manager, so putting it in the tables makes more sense to me.","commit_id":"ebfca1f96277855dc44b8094fa9bec889f5b676e"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"12f23ed1b32096ff2a7d462af2c8e90d4be5e1a7","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"@ovs_flow_manager.register_openflow_function"},{"line_number":147,"context_line":"class QosDscpOpenFlowFunction(ovs_flow_manager.OpenFlowFunction):"},{"line_number":148,"context_line":"    #NOTE(davidsha) This object is placed here so it\u0027s registered"},{"line_number":149,"context_line":"    # in the OpenFlowManager before the qos extension is initialized."},{"line_number":150,"context_line":"    extension \u003d \"QoS\""},{"line_number":151,"context_line":"    name \u003d ovs_const.QOS_EGRESS_DSCP"}],"source_content_type":"text/x-python","patch_set":5,"id":"1f485f77_4f9d1358","line":148,"updated":"2017-11-10 09:55:52.000000000","message":"nit: missing space after \"#\" probably","commit_id":"4291c12f57c24010481dc1fb119a78bbdef89d8f"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"6bed8a6e0abd3a3ddc451d972627cabc5b6d9ea7","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"@ovs_flow_manager.register_openflow_function"},{"line_number":147,"context_line":"class QosDscpOpenFlowFunction(ovs_flow_manager.OpenFlowFunction):"},{"line_number":148,"context_line":"    #NOTE(davidsha) This object is placed here so it\u0027s registered"},{"line_number":149,"context_line":"    # in the OpenFlowManager before the qos extension is initialized."},{"line_number":150,"context_line":"    extension \u003d \"QoS\""},{"line_number":151,"context_line":"    name \u003d ovs_const.QOS_EGRESS_DSCP"}],"source_content_type":"text/x-python","patch_set":5,"id":"df87a7cf_db1746a3","line":148,"in_reply_to":"1f485f77_4f9d1358","updated":"2017-12-06 09:45:43.000000000","message":"Done","commit_id":"4291c12f57c24010481dc1fb119a78bbdef89d8f"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"12f23ed1b32096ff2a7d462af2c8e90d4be5e1a7","unresolved":false,"context_lines":[{"line_number":146,"context_line":"@ovs_flow_manager.register_openflow_function"},{"line_number":147,"context_line":"class QosDscpOpenFlowFunction(ovs_flow_manager.OpenFlowFunction):"},{"line_number":148,"context_line":"    #NOTE(davidsha) This object is placed here so it\u0027s registered"},{"line_number":149,"context_line":"    # in the OpenFlowManager before the qos extension is initialized."},{"line_number":150,"context_line":"    extension \u003d \"QoS\""},{"line_number":151,"context_line":"    name \u003d ovs_const.QOS_EGRESS_DSCP"},{"line_number":152,"context_line":"    bridge \u003d \"br-int\""}],"source_content_type":"text/x-python","patch_set":5,"id":"1f485f77_0fc83b53","line":149,"updated":"2017-11-10 09:55:52.000000000","message":"so it can\u0027t/shouldn\u0027t be moved to OVS qos extension driver file, right?\nIMHO it would be better to make it there","commit_id":"4291c12f57c24010481dc1fb119a78bbdef89d8f"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"6bed8a6e0abd3a3ddc451d972627cabc5b6d9ea7","unresolved":false,"context_lines":[{"line_number":146,"context_line":"@ovs_flow_manager.register_openflow_function"},{"line_number":147,"context_line":"class QosDscpOpenFlowFunction(ovs_flow_manager.OpenFlowFunction):"},{"line_number":148,"context_line":"    #NOTE(davidsha) This object is placed here so it\u0027s registered"},{"line_number":149,"context_line":"    # in the OpenFlowManager before the qos extension is initialized."},{"line_number":150,"context_line":"    extension \u003d \"QoS\""},{"line_number":151,"context_line":"    name \u003d ovs_const.QOS_EGRESS_DSCP"},{"line_number":152,"context_line":"    bridge \u003d \"br-int\""}],"source_content_type":"text/x-python","patch_set":5,"id":"1f485f77_f326cab7","line":149,"in_reply_to":"1f485f77_0fc83b53","updated":"2017-12-06 09:45:43.000000000","message":"It would, and I\u0027d prefer to put it there, the problem is that file is dynamically pulled in while the l2-extension is being initialised, which is after the openflow manager is assigning tables. We could mess with this a bit by directly importing the driver here and having \"if driver \u003d\u003d openvswitch; use this driver backend; else; search dynamically\".","commit_id":"4291c12f57c24010481dc1fb119a78bbdef89d8f"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"12f23ed1b32096ff2a7d462af2c8e90d4be5e1a7","unresolved":false,"context_lines":[{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def install_dscp_rule(self, port, mark):"},{"line_number":164,"context_line":"        port_num \u003d port[\"vif_port\"].ofport"},{"line_number":165,"context_line":"        dscp_mark \u003d str(mark \u003c\u003c 2)"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"        table \u003d QosDscpOpenFlowFunction.declares_tables[0].table_num"},{"line_number":168,"context_line":"        next_table \u003d QosDscpOpenFlowFunction.declares_tables[0].next_table"}],"source_content_type":"text/x-python","patch_set":5,"id":"1f485f77_cfd6a3f2","line":165,"updated":"2017-11-10 09:55:52.000000000","message":"you missed here explanation why You need to shitf it 2 bits left,\nAlso I\u0027m not sure if this should be here or maybe better would be to left it in ovs qos extension driver","commit_id":"4291c12f57c24010481dc1fb119a78bbdef89d8f"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"6bed8a6e0abd3a3ddc451d972627cabc5b6d9ea7","unresolved":false,"context_lines":[{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def install_dscp_rule(self, port, mark):"},{"line_number":164,"context_line":"        port_num \u003d port[\"vif_port\"].ofport"},{"line_number":165,"context_line":"        dscp_mark \u003d str(mark \u003c\u003c 2)"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"        table \u003d QosDscpOpenFlowFunction.declares_tables[0].table_num"},{"line_number":168,"context_line":"        next_table \u003d QosDscpOpenFlowFunction.declares_tables[0].next_table"}],"source_content_type":"text/x-python","patch_set":5,"id":"1f485f77_7332daf3","line":165,"in_reply_to":"1f485f77_cfd6a3f2","updated":"2017-12-06 09:45:43.000000000","message":"Oops! I\u0027ll add it in.","commit_id":"4291c12f57c24010481dc1fb119a78bbdef89d8f"}],"neutron/plugins/ml2/drivers/openvswitch/agent/extension_drivers/qos_driver.py":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"b60b88fc166d66404d0ad3538cd7ad03ab6cbfd4","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def initialize(self):"},{"line_number":45,"context_line":"        self.br_int \u003d self.agent_api.request_int_br()"},{"line_number":46,"context_line":"        self.dscp_function \u003d qos.QosDscpOpenFlowFunction(self.br_int)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def create_bandwidth_limit(self, port, rule):"},{"line_number":49,"context_line":"        self.update_bandwidth_limit(port, rule)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_2c09552d","line":46,"updated":"2016-11-23 09:56:05.000000000","message":"ohh, beautiful ;)","commit_id":"c513a86886e42033b5ba787fe5f56a08060ceafc"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"2e9205b3121e4081fb2ad2c8ac9331fdf7a5c054","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def initialize(self):"},{"line_number":45,"context_line":"        self.br_int \u003d self.agent_api.request_int_br()"},{"line_number":46,"context_line":"        self.dscp_function \u003d qos.QosDscpOpenFlowFunction(self.br_int)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def create_bandwidth_limit(self, port, rule):"},{"line_number":49,"context_line":"        self.update_bandwidth_limit(port, rule)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_ecb59dd0","line":46,"in_reply_to":"5a74a57a_2c09552d","updated":"2016-11-23 10:04:30.000000000","message":":D","commit_id":"c513a86886e42033b5ba787fe5f56a08060ceafc"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"36ae30f919914c7697a6213116136ed5e4abfa18","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        #source: man ovs-ofctl (/mod_nw_tos)"},{"line_number":111,"context_line":"        mark \u003d str(mark \u003c\u003c 2)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        # reg2 is a metadata field that does not alter packets."},{"line_number":114,"context_line":"        # By loading a value into this field and checking if the value is"},{"line_number":115,"context_line":"        # altered it allows the packet to be resubmitted and go through"},{"line_number":116,"context_line":"        # the flow table again to be identified by other flows."},{"line_number":117,"context_line":"        flows \u003d self.br_int.dump_flows_for(cookie\u003dself.cookie, table\u003d0,"},{"line_number":118,"context_line":"                                           in_port\u003dport, reg2\u003d0)"},{"line_number":119,"context_line":"        if not flows:"},{"line_number":120,"context_line":"            actions \u003d (\"mod_nw_tos:\" + mark + \",load:55-\u003eNXM_NX_REG2[0..5],\" +"},{"line_number":121,"context_line":"                       \"resubmit(,0)\")"},{"line_number":122,"context_line":"            self.br_int.add_flow(in_port\u003dport, table\u003d0, priority\u003d65535,"},{"line_number":123,"context_line":"                                 reg2\u003d0, actions\u003dactions)"},{"line_number":124,"context_line":"        else:"},{"line_number":125,"context_line":"            for flow in flows:"},{"line_number":126,"context_line":"                actions \u003d str(flow).partition(\"actions\u003d\")[2]"},{"line_number":127,"context_line":"                acts \u003d actions.split(\u0027,\u0027)"},{"line_number":128,"context_line":"                # mod_nw_tos \u003d modify type of service header"},{"line_number":129,"context_line":"                # This is the second byte of the IPv4 packet header."},{"line_number":130,"context_line":"                # DSCP makes up the upper 6 bits of this header field."},{"line_number":131,"context_line":"                actions \u003d \"mod_nw_tos:\" + mark + \",\""},{"line_number":132,"context_line":"                actions +\u003d \u0027,\u0027.join([act for act in acts"},{"line_number":133,"context_line":"                                     if \"mod_nw_tos:\" not in act])"},{"line_number":134,"context_line":"                self.br_int.mod_flow(reg2\u003d0, in_port\u003dport, table\u003d0,"},{"line_number":135,"context_line":"                                     actions\u003dactions)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def delete_dscp_marking(self, port):"},{"line_number":138,"context_line":"        dscp_port \u003d self.ports[port[\u0027port_id\u0027]].pop(qos_consts."}],"source_content_type":"text/x-python","patch_set":9,"id":"1f9dbf25_bf1ef409","side":"PARENT","line":135,"range":{"start_line":113,"start_character":0,"end_line":135,"end_character":53},"updated":"2018-03-02 12:14:42.000000000","message":"this behavior isn\u0027t yet reproduce in the new code, is it?","commit_id":"d0b9329eaf2f20df89acca3eba5b657b1e1e94e1"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"cffff7b0968e48c6d8d0e69c40f32495f7aa6fd0","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        #source: man ovs-ofctl (/mod_nw_tos)"},{"line_number":111,"context_line":"        mark \u003d str(mark \u003c\u003c 2)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        # reg2 is a metadata field that does not alter packets."},{"line_number":114,"context_line":"        # By loading a value into this field and checking if the value is"},{"line_number":115,"context_line":"        # altered it allows the packet to be resubmitted and go through"},{"line_number":116,"context_line":"        # the flow table again to be identified by other flows."},{"line_number":117,"context_line":"        flows \u003d self.br_int.dump_flows_for(cookie\u003dself.cookie, table\u003d0,"},{"line_number":118,"context_line":"                                           in_port\u003dport, reg2\u003d0)"},{"line_number":119,"context_line":"        if not flows:"},{"line_number":120,"context_line":"            actions \u003d (\"mod_nw_tos:\" + mark + \",load:55-\u003eNXM_NX_REG2[0..5],\" +"},{"line_number":121,"context_line":"                       \"resubmit(,0)\")"},{"line_number":122,"context_line":"            self.br_int.add_flow(in_port\u003dport, table\u003d0, priority\u003d65535,"},{"line_number":123,"context_line":"                                 reg2\u003d0, actions\u003dactions)"},{"line_number":124,"context_line":"        else:"},{"line_number":125,"context_line":"            for flow in flows:"},{"line_number":126,"context_line":"                actions \u003d str(flow).partition(\"actions\u003d\")[2]"},{"line_number":127,"context_line":"                acts \u003d actions.split(\u0027,\u0027)"},{"line_number":128,"context_line":"                # mod_nw_tos \u003d modify type of service header"},{"line_number":129,"context_line":"                # This is the second byte of the IPv4 packet header."},{"line_number":130,"context_line":"                # DSCP makes up the upper 6 bits of this header field."},{"line_number":131,"context_line":"                actions \u003d \"mod_nw_tos:\" + mark + \",\""},{"line_number":132,"context_line":"                actions +\u003d \u0027,\u0027.join([act for act in acts"},{"line_number":133,"context_line":"                                     if \"mod_nw_tos:\" not in act])"},{"line_number":134,"context_line":"                self.br_int.mod_flow(reg2\u003d0, in_port\u003dport, table\u003d0,"},{"line_number":135,"context_line":"                                     actions\u003dactions)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def delete_dscp_marking(self, port):"},{"line_number":138,"context_line":"        dscp_port \u003d self.ports[port[\u0027port_id\u0027]].pop(qos_consts."}],"source_content_type":"text/x-python","patch_set":9,"id":"1f9dbf25_bf3b5436","side":"PARENT","line":135,"range":{"start_line":113,"start_character":0,"end_line":135,"end_character":53},"in_reply_to":"1f9dbf25_bf1ef409","updated":"2018-03-02 12:30:10.000000000","message":"It is, this code will be redundant when the other QoS features get their own functions.","commit_id":"d0b9329eaf2f20df89acca3eba5b657b1e1e94e1"}],"neutron/plugins/ml2/drivers/openvswitch/agent/extension_drivers/qos_openflow_function.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"d34b8d8c8e46af44e6288ed7fd93ca4f02648d50","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"class QosDscpOpenFlowFunction(ovs_flow_manager.OpenFlowFunction):"},{"line_number":21,"context_line":"    def __init__(self, bridge):"},{"line_number":22,"context_line":"        extension \u003d \"QoS\""},{"line_number":23,"context_line":"        name \u003d ovs_const.QOS_EGRESS_DSCP"},{"line_number":24,"context_line":"        declares_tables \u003d [ovs_flow_manager.OpenFlowTable(\"dscp_table\")]"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"df7087c5_4a3d448d","line":22,"updated":"2018-03-23 09:36:02.000000000","message":"what extension it is? is it some new concept here? or it\u0027s something already existing somewhere?","commit_id":"d22d563ae2a8ecc88098d042e4a85ea801bfc47c"}],"neutron/tests/unit/agent/l2/extensions/test_qos.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"cf32fd13febc70e4e090a27e0caf294c49b33baa","unresolved":false,"context_lines":[{"line_number":427,"context_line":"            self.policy_map.has_policy_changed(TEST_PORT, TEST_POLICY.id))"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":""},{"line_number":430,"context_line":"class QosDscpOpenFlowFunction(ovs_test_base.OVSAgentConfigTestBase):"},{"line_number":431,"context_line":""},{"line_number":432,"context_line":"    def setUp(self):"},{"line_number":433,"context_line":"        super(QosDscpOpenFlowFunction, self).setUp()"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_03a62cc1","line":430,"range":{"start_line":430,"start_character":6,"end_line":430,"end_character":29},"updated":"2016-11-23 08:56:35.000000000","message":"s/QosDscpOpenFlowFunction/QosDscpOpenFlowFunctionTestCase","commit_id":"c513a86886e42033b5ba787fe5f56a08060ceafc"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"8d74433eb11efb5ddf2d2ad56c81767a56878cdc","unresolved":false,"context_lines":[{"line_number":427,"context_line":"            self.policy_map.has_policy_changed(TEST_PORT, TEST_POLICY.id))"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":""},{"line_number":430,"context_line":"class QosDscpOpenFlowFunction(ovs_test_base.OVSAgentConfigTestBase):"},{"line_number":431,"context_line":""},{"line_number":432,"context_line":"    def setUp(self):"},{"line_number":433,"context_line":"        super(QosDscpOpenFlowFunction, self).setUp()"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_297ce771","line":430,"range":{"start_line":430,"start_character":6,"end_line":430,"end_character":29},"in_reply_to":"5a74a57a_03a62cc1","updated":"2016-11-23 09:35:59.000000000","message":"ack, will change this in the next patch set.","commit_id":"c513a86886e42033b5ba787fe5f56a08060ceafc"},{"author":{"_account_id":11347,"name":"Rui Zang","email":"rui.zang@yandex.com","username":"rzang"},"change_message_id":"4960481704bf07834933d3396c8730016154ab46","unresolved":false,"context_lines":[{"line_number":516,"context_line":"    def setUp(self):"},{"line_number":517,"context_line":"        super(QosDscpOpenFlowFunction, self).setUp()"},{"line_number":518,"context_line":"        conn_patcher \u003d mock.patch("},{"line_number":519,"context_line":"            \u0027neutron.agent.ovsdb.native.connection.Connection.start\u0027)"},{"line_number":520,"context_line":"        conn_patcher.start()"},{"line_number":521,"context_line":"        self.addCleanup(conn_patcher.stop)"},{"line_number":522,"context_line":"        self.context \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_eb855d5b","line":519,"updated":"2017-12-07 07:18:42.000000000","message":"py27, py35, maybe this is not the right object to mock. How about mocking \"neutron.agent.ovsdb.impl_idl._connection\" as others do?","commit_id":"466c9f6333510235a8ef865ce70c1ae6a343a587"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"3cd5243c1bb6bcf161c6eaafff113e4728e8c4a5","unresolved":false,"context_lines":[{"line_number":516,"context_line":"    def setUp(self):"},{"line_number":517,"context_line":"        super(QosDscpOpenFlowFunction, self).setUp()"},{"line_number":518,"context_line":"        conn_patcher \u003d mock.patch("},{"line_number":519,"context_line":"            \u0027neutron.agent.ovsdb.native.connection.Connection.start\u0027)"},{"line_number":520,"context_line":"        conn_patcher.start()"},{"line_number":521,"context_line":"        self.addCleanup(conn_patcher.stop)"},{"line_number":522,"context_line":"        self.context \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_3de2aaa1","line":519,"in_reply_to":"df87a7cf_eb855d5b","updated":"2017-12-07 09:55:13.000000000","message":"I think you\u0027re right, I\u0027ll post this as an edit to the patch.","commit_id":"466c9f6333510235a8ef865ce70c1ae6a343a587"}]}
