)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"3e77c072623e0a16ca3e60d9143e042c80cfad34","unresolved":false,"context_lines":[{"line_number":25,"context_line":"APIImpact: port now has data_plane_status attr, set on port update"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Implements: blueprint port-data-plane-status"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"Change-Id: Ic9e1e3ed9e3d4b88a4292114f4cb4192ac4b3502"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3a461143_1918531d","line":28,"updated":"2017-01-26 02:10:31.000000000","message":"Please add Depends-On tag like the following so that we can review during development in neutron-lib.\n\n Depends-On: I04eef902b3310f799b1ce7ea44ed7cf77c74da04","commit_id":"5c3bc4f8ef751b7d59afdfef5a12b51fcabb8d05"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"75ee7f89d83326d0f3af2260b20f59021aae8afd","unresolved":false,"context_lines":[{"line_number":25,"context_line":"APIImpact: port now has data_plane_status attr, set on port update"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Implements: blueprint port-data-plane-status"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"Change-Id: Ic9e1e3ed9e3d4b88a4292114f4cb4192ac4b3502"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"da36d5c6_49578126","line":28,"in_reply_to":"3a461143_1918531d","updated":"2017-03-08 00:31:18.000000000","message":"Done","commit_id":"5c3bc4f8ef751b7d59afdfef5a12b51fcabb8d05"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"e698e5414528b093af8fa208b6adf01ffcb1ef0a","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Carlos Goncalves \u003ccarlos.goncalves@neclab.eu\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-04-07 11:54:35 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"[WIP] Port data plane status extension implementation"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"TODO: release notes"},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"bff0334d_a077a4d4","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":5},"updated":"2017-04-07 22:45:43.000000000","message":"Time to remove this","commit_id":"0ba717ac40ee17f8cf768fd4db9e603e0b27530c"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"dad1e7e97b7a7fa5c39b2ae395d166eb72935490","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Carlos Goncalves \u003ccarlos.goncalves@neclab.eu\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-04-07 11:54:35 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"[WIP] Port data plane status extension implementation"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"TODO: release notes"},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"bff0334d_97ea9da9","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":5},"in_reply_to":"bff0334d_a077a4d4","updated":"2017-04-08 18:22:58.000000000","message":"Done","commit_id":"0ba717ac40ee17f8cf768fd4db9e603e0b27530c"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"e698e5414528b093af8fa208b6adf01ffcb1ef0a","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"[WIP] Port data plane status extension implementation"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"TODO: release notes"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Implements the port data plane status extension. Third parties"},{"line_number":12,"context_line":"can report via Neutron API issues in the underlying data plane"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"bff0334d_807260e2","line":9,"updated":"2017-04-07 22:45:43.000000000","message":"Time to add the release notes","commit_id":"0ba717ac40ee17f8cf768fd4db9e603e0b27530c"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"dad1e7e97b7a7fa5c39b2ae395d166eb72935490","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"[WIP] Port data plane status extension implementation"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"TODO: release notes"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Implements the port data plane status extension. Third parties"},{"line_number":12,"context_line":"can report via Neutron API issues in the underlying data plane"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"bff0334d_d0a14cfa","line":9,"in_reply_to":"bff0334d_807260e2","updated":"2017-04-08 18:22:58.000000000","message":"Done","commit_id":"0ba717ac40ee17f8cf768fd4db9e603e0b27530c"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"e698e5414528b093af8fa208b6adf01ffcb1ef0a","unresolved":false,"context_lines":[{"line_number":17,"context_line":"  - ACTIVE: all is up and running"},{"line_number":18,"context_line":"  - DOWN: no traffic can flow from/to the Neutron port"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Set of attribute available to admin or any user with specific role (default"},{"line_number":21,"context_line":"role: data_plane_integrator)."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"ML2 extension driver loaded on request via configuration:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"bff0334d_802020b2","line":20,"range":{"start_line":20,"start_character":0,"end_line":20,"end_character":16},"updated":"2017-04-07 22:45:43.000000000","message":"Setting attribute","commit_id":"0ba717ac40ee17f8cf768fd4db9e603e0b27530c"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"e698e5414528b093af8fa208b6adf01ffcb1ef0a","unresolved":false,"context_lines":[{"line_number":17,"context_line":"  - ACTIVE: all is up and running"},{"line_number":18,"context_line":"  - DOWN: no traffic can flow from/to the Neutron port"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Set of attribute available to admin or any user with specific role (default"},{"line_number":21,"context_line":"role: data_plane_integrator)."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"ML2 extension driver loaded on request via configuration:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"bff0334d_a00e8438","line":20,"range":{"start_line":20,"start_character":72,"end_line":20,"end_character":75},"updated":"2017-04-07 22:45:43.000000000","message":"We should wrap commit message lines at 72 characters: https://wiki.openstack.org/wiki/GitCommitMessages#Summary_of_Git_commit_message_structure. You have 3 too many","commit_id":"0ba717ac40ee17f8cf768fd4db9e603e0b27530c"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"dad1e7e97b7a7fa5c39b2ae395d166eb72935490","unresolved":false,"context_lines":[{"line_number":17,"context_line":"  - ACTIVE: all is up and running"},{"line_number":18,"context_line":"  - DOWN: no traffic can flow from/to the Neutron port"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Set of attribute available to admin or any user with specific role (default"},{"line_number":21,"context_line":"role: data_plane_integrator)."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"ML2 extension driver loaded on request via configuration:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"bff0334d_77d159fb","line":20,"range":{"start_line":20,"start_character":0,"end_line":20,"end_character":16},"in_reply_to":"bff0334d_802020b2","updated":"2017-04-08 18:22:58.000000000","message":"Done","commit_id":"0ba717ac40ee17f8cf768fd4db9e603e0b27530c"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"dad1e7e97b7a7fa5c39b2ae395d166eb72935490","unresolved":false,"context_lines":[{"line_number":17,"context_line":"  - ACTIVE: all is up and running"},{"line_number":18,"context_line":"  - DOWN: no traffic can flow from/to the Neutron port"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Set of attribute available to admin or any user with specific role (default"},{"line_number":21,"context_line":"role: data_plane_integrator)."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"ML2 extension driver loaded on request via configuration:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"bff0334d_57cc1560","line":20,"range":{"start_line":20,"start_character":72,"end_line":20,"end_character":75},"in_reply_to":"bff0334d_a00e8438","updated":"2017-04-08 18:22:58.000000000","message":"Done","commit_id":"0ba717ac40ee17f8cf768fd4db9e603e0b27530c"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"e698e5414528b093af8fa208b6adf01ffcb1ef0a","unresolved":false,"context_lines":[{"line_number":28,"context_line":"Related-Bug: #1598081"},{"line_number":29,"context_line":"Related-Bug: #1575146"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"DocImpact: users can get status of the underlying port data plane"},{"line_number":32,"context_line":"APIImpact: port now has data_plane_status attr, set on port update"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Implements: blueprint port-data-plane-status"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"bff0334d_db2299a4","line":31,"updated":"2017-04-07 22:45:43.000000000","message":"Maybe we should also note in the DocImpact that admin users can set attribute","commit_id":"0ba717ac40ee17f8cf768fd4db9e603e0b27530c"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"dad1e7e97b7a7fa5c39b2ae395d166eb72935490","unresolved":false,"context_lines":[{"line_number":28,"context_line":"Related-Bug: #1598081"},{"line_number":29,"context_line":"Related-Bug: #1575146"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"DocImpact: users can get status of the underlying port data plane"},{"line_number":32,"context_line":"APIImpact: port now has data_plane_status attr, set on port update"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Implements: blueprint port-data-plane-status"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"bff0334d_f038d0a0","line":31,"in_reply_to":"bff0334d_db2299a4","updated":"2017-04-08 18:22:58.000000000","message":"Done","commit_id":"0ba717ac40ee17f8cf768fd4db9e603e0b27530c"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"0ad9bc96d91287be08d859da114f9708d8b9bc84","unresolved":false,"context_lines":[{"line_number":13,"context_line":"Supported statuses:"},{"line_number":14,"context_line":"  - None: no status being reported; default value"},{"line_number":15,"context_line":"  - ACTIVE: all is up and running"},{"line_number":16,"context_line":"  - DOWN: no traffic can flow from/to the Neutron port"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Setting attribute available to admin or any user with specific role"},{"line_number":19,"context_line":"(default role: data_plane_integrator)."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"bff0334d_b6e480e1","line":16,"updated":"2017-04-09 07:36:00.000000000","message":"sorry for the dumb question but what is the difference between this and the port status?","commit_id":"94834614364773e0532f5f407b4705847c038280"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"b702614f95e42a2439b1982d58d6ea4493fc5189","unresolved":false,"context_lines":[{"line_number":13,"context_line":"Supported statuses:"},{"line_number":14,"context_line":"  - None: no status being reported; default value"},{"line_number":15,"context_line":"  - ACTIVE: all is up and running"},{"line_number":16,"context_line":"  - DOWN: no traffic can flow from/to the Neutron port"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Setting attribute available to admin or any user with specific role"},{"line_number":19,"context_line":"(default role: data_plane_integrator)."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"bff0334d_362cf0aa","line":16,"in_reply_to":"bff0334d_b6e480e1","updated":"2017-04-09 10:35:41.000000000","message":"The data_plane_status represents the status of the underlay data plane. This attribute is to be managed by entities outside of Neutron, while the ‘status’ attribute is managed by Neutron. Both status attributes are independent from one another.\n\nhttps://specs.openstack.org/openstack/neutron-specs/specs/backlog/ocata/port-data-plane-status.html","commit_id":"94834614364773e0532f5f407b4705847c038280"}],"neutron/db/data_plane_status_db.py":[{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"3e77c072623e0a16ca3e60d9143e042c80cfad34","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from neutron.api.v2 import attributes"},{"line_number":16,"context_line":"from neutron.db import db_base_plugin_v2"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from neutron_lib.api.definitions import data_plane_status as dps_lib"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class DataPlaneStatusMixin(object):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a461143_f9c8e776","line":18,"range":{"start_line":15,"start_character":0,"end_line":18,"end_character":68},"updated":"2017-01-26 02:10:31.000000000","message":"There is a rule about import order[1].\n\n[1]: http://docs.openstack.org/developer/hacking/#import-order-template","commit_id":"5c3bc4f8ef751b7d59afdfef5a12b51fcabb8d05"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"75ee7f89d83326d0f3af2260b20f59021aae8afd","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from neutron.api.v2 import attributes"},{"line_number":16,"context_line":"from neutron.db import db_base_plugin_v2"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from neutron_lib.api.definitions import data_plane_status as dps_lib"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class DataPlaneStatusMixin(object):"}],"source_content_type":"text/x-python","patch_set":2,"id":"da36d5c6_c939b1f4","line":18,"range":{"start_line":15,"start_character":0,"end_line":18,"end_character":68},"in_reply_to":"3a461143_f9c8e776","updated":"2017-03-08 00:31:18.000000000","message":"Done","commit_id":"5c3bc4f8ef751b7d59afdfef5a12b51fcabb8d05"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"1a59a057519abafcc1a315c58a725ef0059b1408","unresolved":false,"context_lines":[{"line_number":25,"context_line":"        res[dps_lib.DATA_PLANE_STATUS] \u003d port.data_plane_status"},{"line_number":26,"context_line":"        return res"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    db_base_plugin_v2.NeutronDbPluginV2.register_dict_extend_funcs("},{"line_number":29,"context_line":"        attributes.PORTS, [\u0027_extend_port_data_plane_status\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a430d35_80fb2878","line":28,"updated":"2017-02-08 23:21:18.000000000","message":"If you follow the approach I explain in my comment here https://review.openstack.org/#/c/424340/2/neutron/plugins/ml2/plugin.py@110, you won\u0027t need to register your extend port method like this. The ML@ extension manager handles this for you. And also, _extend_port_data_plane_status in L24 most likely would move to your ML2 extension class","commit_id":"5c3bc4f8ef751b7d59afdfef5a12b51fcabb8d05"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"de4cdfce14be6e926679af47aeeafc64e619d4a5","unresolved":false,"context_lines":[{"line_number":20,"context_line":"class DataPlaneStatusMixin(object):"},{"line_number":21,"context_line":"    \"\"\"Mixin class to add data plane status to a port\"\"\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    def _process_update_port_data_plane_status(self, plugin_context, data,"},{"line_number":24,"context_line":"                                               result):"},{"line_number":25,"context_line":"        if dps_lib.DATA_PLANE_STATUS not in data:"},{"line_number":26,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_1e1c7011","line":23,"updated":"2017-03-09 00:33:43.000000000","message":"If you follow recommendation to https://review.openstack.org/#/c/424340/3/neutron/db/models_v2.py@97, you will need to add code here to add a row to the table where you are going to store the data plane status attribute","commit_id":"35e2aa9e7dc0900e7d6216033a9b2722392a5ff2"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"a4d5de6917eff1021aa1dd42157a8c7cb859ea4a","unresolved":false,"context_lines":[{"line_number":20,"context_line":"class DataPlaneStatusMixin(object):"},{"line_number":21,"context_line":"    \"\"\"Mixin class to add data plane status to a port\"\"\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    def _process_update_port_data_plane_status(self, plugin_context, data,"},{"line_number":24,"context_line":"                                               result):"},{"line_number":25,"context_line":"        if dps_lib.DATA_PLANE_STATUS not in data:"},{"line_number":26,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_f3a8848e","line":23,"in_reply_to":"9a30ddce_1e1c7011","updated":"2017-03-09 23:43:25.000000000","message":"Done","commit_id":"35e2aa9e7dc0900e7d6216033a9b2722392a5ff2"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"de4cdfce14be6e926679af47aeeafc64e619d4a5","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        port_res[dps_lib.DATA_PLANE_STATUS] \u003d port_db.data_plane_status"},{"line_number":32,"context_line":"        return port_res"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    # Register dict extend functions for ports"},{"line_number":35,"context_line":"    db_base_plugin_v2.NeutronDbPluginV2.register_dict_extend_funcs("},{"line_number":36,"context_line":"        \u0027ports\u0027, [\u0027_extend_port_data_plane_status\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_e340e9a7","line":36,"range":{"start_line":34,"start_character":0,"end_line":36,"end_character":52},"updated":"2017-03-09 00:33:43.000000000","message":"The ML2 plugin registers here https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/plugin.py#L591 method _ml2_md_extend_port_dict https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/plugin.py#L600, which is going to have the extension manager call the extend_port_dict of all the ML2 extension registered. So, when the core plugin is ML2, you\u0027ll end up calling _extend_port_data_plane_status (L30 above) twice. So I recommend doing this registration only when the core plugin is not ML2. I am assuming that you left the registration here because you want to make this extension usable by non ML2 plugins","commit_id":"35e2aa9e7dc0900e7d6216033a9b2722392a5ff2"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"a4d5de6917eff1021aa1dd42157a8c7cb859ea4a","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        port_res[dps_lib.DATA_PLANE_STATUS] \u003d port_db.data_plane_status"},{"line_number":32,"context_line":"        return port_res"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    # Register dict extend functions for ports"},{"line_number":35,"context_line":"    db_base_plugin_v2.NeutronDbPluginV2.register_dict_extend_funcs("},{"line_number":36,"context_line":"        \u0027ports\u0027, [\u0027_extend_port_data_plane_status\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_33d05c1f","line":36,"range":{"start_line":34,"start_character":0,"end_line":36,"end_character":52},"in_reply_to":"9a30ddce_e340e9a7","updated":"2017-03-09 23:43:25.000000000","message":"Done","commit_id":"35e2aa9e7dc0900e7d6216033a9b2722392a5ff2"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"a1eb81653290fecccb569fa5f131c24f02a18eac","unresolved":false,"context_lines":[{"line_number":44,"context_line":"            res[dps_lib.DATA_PLANE_STATUS] \u003d dps_val"},{"line_number":45,"context_line":"        else:"},{"line_number":46,"context_line":"            self._process_create_port_data_plane_status(context, data, res)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def _extend_port_data_plane_status(self, port_res, port_db):"},{"line_number":49,"context_line":"        if port_db.get(dps_lib.DATA_PLANE_STATUS):"},{"line_number":50,"context_line":"            port_res[dps_lib.DATA_PLANE_STATUS] \u003d ("}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_3cb37c9a","line":47,"updated":"2017-03-28 22:13:38.000000000","message":"In the previous patchset I suggested not to register this method if the core plugin was ML2. But I think you still want to register it if this mixin is being used by a non ML2 core plugin. It would look like this:\n\nis_ml2_core_plugin \u003d (cfg.CONF.core_plugin \u003d\u003d \u0027ml2\u0027 or \n                      cfg.CONF.core_plugin \u003d\u003d \u0027neutron.plugins.ml2.plugin:Ml2Plugin\u0027)\n\nif not is_ml2_core_plugin:\n    db_base_plugin_v2..NeutronDbPluginV2.register_dict_extend_funcs(\u0027ports\u0027, [\u0027_extend_port_data_plane_status\u0027])\n\nI have never seen something like this in the code base, but why not give it a try. Worst case other reviewers don\u0027t like it and we remove it :-)","commit_id":"afcdd297e249a241fc57ab007d5deab8ed96ece5"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"0fbb20348767c480b1560d2e2ee915cda3fc6c2c","unresolved":false,"context_lines":[{"line_number":44,"context_line":"            res[dps_lib.DATA_PLANE_STATUS] \u003d dps_val"},{"line_number":45,"context_line":"        else:"},{"line_number":46,"context_line":"            self._process_create_port_data_plane_status(context, data, res)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def _extend_port_data_plane_status(self, port_res, port_db):"},{"line_number":49,"context_line":"        if port_db.get(dps_lib.DATA_PLANE_STATUS):"},{"line_number":50,"context_line":"            port_res[dps_lib.DATA_PLANE_STATUS] \u003d ("}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_3bb7ed3c","line":47,"in_reply_to":"ffe62b97_3cb37c9a","updated":"2017-03-29 10:25:11.000000000","message":"I am no longer registering this method in this patchset, or am I? We should strive to make this mixin ML2-agnostic and being possible for non ML2 core plugins to consume it.\n\nMy approach is to leave it to core plugins to call this method. See https://github.com/openstack/neutron/blob/master/neutron/db/portsecurity_db_common.py#L24 and https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/extensions/port_security.py#L65","commit_id":"afcdd297e249a241fc57ab007d5deab8ed96ece5"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"54d1b4064f03f454ab9d6e2c680205b4f7422240","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"        dps_val \u003d data[dps_lib.DATA_PLANE_STATUS]"},{"line_number":28,"context_line":"        obj \u003d dps_obj.PortDataPlaneStatus(context, port_id\u003dres[\u0027id\u0027],"},{"line_number":29,"context_line":"                                         data_plane_status\u003ddps_val)"},{"line_number":30,"context_line":"        obj.create()"},{"line_number":31,"context_line":"        res[dps_lib.DATA_PLANE_STATUS] \u003d dps_val"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"bff0334d_cd1a117c","line":29,"range":{"start_line":29,"start_character":59,"end_line":29,"end_character":66},"updated":"2017-04-06 23:22:03.000000000","message":"See my comment to line 42","commit_id":"8ea051a437f62abfb457be7f1034744855425a08"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"a5698cf616c05afc1365a334f4f2d9c3b27671e8","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"        dps_val \u003d data[dps_lib.DATA_PLANE_STATUS]"},{"line_number":28,"context_line":"        obj \u003d dps_obj.PortDataPlaneStatus(context, port_id\u003dres[\u0027id\u0027],"},{"line_number":29,"context_line":"                                         data_plane_status\u003ddps_val)"},{"line_number":30,"context_line":"        obj.create()"},{"line_number":31,"context_line":"        res[dps_lib.DATA_PLANE_STATUS] \u003d dps_val"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"bff0334d_7a46fd51","line":29,"range":{"start_line":29,"start_character":59,"end_line":29,"end_character":66},"in_reply_to":"bff0334d_cd1a117c","updated":"2017-04-07 11:57:04.000000000","message":"Done","commit_id":"8ea051a437f62abfb457be7f1034744855425a08"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"54d1b4064f03f454ab9d6e2c680205b4f7422240","unresolved":false,"context_lines":[{"line_number":28,"context_line":"        obj \u003d dps_obj.PortDataPlaneStatus(context, port_id\u003dres[\u0027id\u0027],"},{"line_number":29,"context_line":"                                         data_plane_status\u003ddps_val)"},{"line_number":30,"context_line":"        obj.create()"},{"line_number":31,"context_line":"        res[dps_lib.DATA_PLANE_STATUS] \u003d dps_val"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    def _process_update_port_data_plane_status(self, context, data,"},{"line_number":34,"context_line":"                                               res):"}],"source_content_type":"text/x-python","patch_set":5,"id":"bff0334d_6d178553","line":31,"range":{"start_line":31,"start_character":41,"end_line":31,"end_character":48},"updated":"2017-04-06 23:22:03.000000000","message":"See my comment to line 42","commit_id":"8ea051a437f62abfb457be7f1034744855425a08"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"a5698cf616c05afc1365a334f4f2d9c3b27671e8","unresolved":false,"context_lines":[{"line_number":28,"context_line":"        obj \u003d dps_obj.PortDataPlaneStatus(context, port_id\u003dres[\u0027id\u0027],"},{"line_number":29,"context_line":"                                         data_plane_status\u003ddps_val)"},{"line_number":30,"context_line":"        obj.create()"},{"line_number":31,"context_line":"        res[dps_lib.DATA_PLANE_STATUS] \u003d dps_val"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    def _process_update_port_data_plane_status(self, context, data,"},{"line_number":34,"context_line":"                                               res):"}],"source_content_type":"text/x-python","patch_set":5,"id":"bff0334d_9a4b0158","line":31,"range":{"start_line":31,"start_character":41,"end_line":31,"end_character":48},"in_reply_to":"bff0334d_6d178553","updated":"2017-04-07 11:57:04.000000000","message":"Done","commit_id":"8ea051a437f62abfb457be7f1034744855425a08"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"54d1b4064f03f454ab9d6e2c680205b4f7422240","unresolved":false,"context_lines":[{"line_number":39,"context_line":"                                                     port_id\u003dres[\u0027id\u0027])"},{"line_number":40,"context_line":"        if obj:"},{"line_number":41,"context_line":"            dps_val \u003d data[dps_lib.DATA_PLANE_STATUS]"},{"line_number":42,"context_line":"            obj.data_plane_status \u003d dps_val"},{"line_number":43,"context_line":"            obj.update()"},{"line_number":44,"context_line":"            res[dps_lib.DATA_PLANE_STATUS] \u003d dps_val"},{"line_number":45,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"bff0334d_ed8dd5d3","line":42,"range":{"start_line":42,"start_character":36,"end_line":42,"end_character":43},"updated":"2017-04-06 23:22:03.000000000","message":"Nit: I don\u0027t see much value added in dps_val. You could assign directly from data[dps_lib.DATA_PLANE_STATUS]","commit_id":"8ea051a437f62abfb457be7f1034744855425a08"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"a5698cf616c05afc1365a334f4f2d9c3b27671e8","unresolved":false,"context_lines":[{"line_number":39,"context_line":"                                                     port_id\u003dres[\u0027id\u0027])"},{"line_number":40,"context_line":"        if obj:"},{"line_number":41,"context_line":"            dps_val \u003d data[dps_lib.DATA_PLANE_STATUS]"},{"line_number":42,"context_line":"            obj.data_plane_status \u003d dps_val"},{"line_number":43,"context_line":"            obj.update()"},{"line_number":44,"context_line":"            res[dps_lib.DATA_PLANE_STATUS] \u003d dps_val"},{"line_number":45,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"bff0334d_05f43bce","line":42,"range":{"start_line":42,"start_character":36,"end_line":42,"end_character":43},"in_reply_to":"bff0334d_ed8dd5d3","updated":"2017-04-07 11:57:04.000000000","message":"Your nit is my command :-)","commit_id":"8ea051a437f62abfb457be7f1034744855425a08"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"54d1b4064f03f454ab9d6e2c680205b4f7422240","unresolved":false,"context_lines":[{"line_number":41,"context_line":"            dps_val \u003d data[dps_lib.DATA_PLANE_STATUS]"},{"line_number":42,"context_line":"            obj.data_plane_status \u003d dps_val"},{"line_number":43,"context_line":"            obj.update()"},{"line_number":44,"context_line":"            res[dps_lib.DATA_PLANE_STATUS] \u003d dps_val"},{"line_number":45,"context_line":"        else:"},{"line_number":46,"context_line":"            self._process_create_port_data_plane_status(context, data, res)"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"bff0334d_eda6f553","line":44,"range":{"start_line":44,"start_character":45,"end_line":44,"end_character":52},"updated":"2017-04-06 23:22:03.000000000","message":"Ditto","commit_id":"8ea051a437f62abfb457be7f1034744855425a08"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"a5698cf616c05afc1365a334f4f2d9c3b27671e8","unresolved":false,"context_lines":[{"line_number":41,"context_line":"            dps_val \u003d data[dps_lib.DATA_PLANE_STATUS]"},{"line_number":42,"context_line":"            obj.data_plane_status \u003d dps_val"},{"line_number":43,"context_line":"            obj.update()"},{"line_number":44,"context_line":"            res[dps_lib.DATA_PLANE_STATUS] \u003d dps_val"},{"line_number":45,"context_line":"        else:"},{"line_number":46,"context_line":"            self._process_create_port_data_plane_status(context, data, res)"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"bff0334d_da41893b","line":44,"range":{"start_line":44,"start_character":45,"end_line":44,"end_character":52},"in_reply_to":"bff0334d_eda6f553","updated":"2017-04-07 11:57:04.000000000","message":"Done","commit_id":"8ea051a437f62abfb457be7f1034744855425a08"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"54d1b4064f03f454ab9d6e2c680205b4f7422240","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        if port_db.get(dps_lib.DATA_PLANE_STATUS):"},{"line_number":52,"context_line":"            port_res[dps_lib.DATA_PLANE_STATUS] \u003d ("},{"line_number":53,"context_line":"                        port_db[dps_lib.DATA_PLANE_STATUS].data_plane_status)"}],"source_content_type":"text/x-python","patch_set":5,"id":"bff0334d_95840b0e","line":53,"range":{"start_line":53,"start_character":58,"end_line":53,"end_character":76},"updated":"2017-04-06 23:22:03.000000000","message":"Do we need this? Look at https://github.com/openstack/neutron/blob/master/neutron/db/db_base_plugin_common.py#L179","commit_id":"8ea051a437f62abfb457be7f1034744855425a08"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"a5698cf616c05afc1365a334f4f2d9c3b27671e8","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        if port_db.get(dps_lib.DATA_PLANE_STATUS):"},{"line_number":52,"context_line":"            port_res[dps_lib.DATA_PLANE_STATUS] \u003d ("},{"line_number":53,"context_line":"                        port_db[dps_lib.DATA_PLANE_STATUS].data_plane_status)"}],"source_content_type":"text/x-python","patch_set":5,"id":"bff0334d_85d5eb45","line":53,"range":{"start_line":53,"start_character":58,"end_line":53,"end_character":76},"in_reply_to":"bff0334d_95840b0e","updated":"2017-04-07 11:57:04.000000000","message":"I believe we do. Otherwise we get a reference to a neutron.db.models.data_plane_status.PortDataPlaneStatus object.\n\n    reference \u003d u\"\u003cneutron.db.models.data_plane_status.PortDataPlaneStatus[object at 7ff54c054b50] {port_id\u003du\u00276e0e9e16-77b6-4d83-a587-213527dded37\u0027, data_plane_status\u003du\u0027ACTIVE\u0027}\u003e\"\n    actual    \u003d \u0027ACTIVE\u0027\n\n\nSee:\n- https://github.com/openstack/neutron/blob/master/neutron/db/dns_db.py#L70\nhttps://github.com/openstack/neutron/blob/master/neutron/db/portsecurity_db_common.py#L29","commit_id":"8ea051a437f62abfb457be7f1034744855425a08"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"a11787a139488ef91eb0b21a868e92139b356d3b","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    \"\"\"Mixin class to add data plane status to a port\"\"\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    def _process_create_port_data_plane_status(self, context, data, res):"},{"line_number":24,"context_line":"        if dps_lib.DATA_PLANE_STATUS not in data:"},{"line_number":25,"context_line":"            return"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"        obj \u003d dps_obj.PortDataPlaneStatus(context, port_id\u003dres[\u0027id\u0027],"},{"line_number":28,"context_line":"            data_plane_status\u003ddata[dps_lib.DATA_PLANE_STATUS])"}],"source_content_type":"text/x-python","patch_set":8,"id":"bff0334d_293eae8a","line":25,"range":{"start_line":24,"start_character":8,"end_line":25,"end_character":18},"updated":"2017-04-11 03:03:36.000000000","message":"Nit: consider removing these two lines. This method is only called by _process_update_port_data_plane_status (L32), so we know dps_lib.DATA_PLANE_STATUS comes in the request","commit_id":"7f069188be16f08efefa3333639f7da71aef7ad8"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"9b42a74b273a2990e96756d39f243ea4e6888eb3","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    \"\"\"Mixin class to add data plane status to a port\"\"\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    def _process_create_port_data_plane_status(self, context, data, res):"},{"line_number":24,"context_line":"        if dps_lib.DATA_PLANE_STATUS not in data:"},{"line_number":25,"context_line":"            return"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"        obj \u003d dps_obj.PortDataPlaneStatus(context, port_id\u003dres[\u0027id\u0027],"},{"line_number":28,"context_line":"            data_plane_status\u003ddata[dps_lib.DATA_PLANE_STATUS])"}],"source_content_type":"text/x-python","patch_set":8,"id":"bff0334d_e801d207","line":25,"range":{"start_line":24,"start_character":8,"end_line":25,"end_character":18},"in_reply_to":"bff0334d_293eae8a","updated":"2017-04-11 17:47:11.000000000","message":"Done","commit_id":"7f069188be16f08efefa3333639f7da71aef7ad8"}],"neutron/db/migration/alembic_migrations/versions/ocata/expand/804a3c76314c_add_data_plane_status_to_port.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"2902e127685097e7800c88bda7dd6b93f9392081","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"ba2be162_a3591f37","updated":"2017-03-05 16:42:50.000000000","message":"This file needs to be moved to \u0027pike/expand\u0027.","commit_id":"5c3bc4f8ef751b7d59afdfef5a12b51fcabb8d05"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"75ee7f89d83326d0f3af2260b20f59021aae8afd","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"9a30ddce_92f3229e","in_reply_to":"ba2be162_a3591f37","updated":"2017-03-08 00:31:18.000000000","message":"Done","commit_id":"5c3bc4f8ef751b7d59afdfef5a12b51fcabb8d05"}],"neutron/db/migration/alembic_migrations/versions/pike/expand/804a3c76314c_add_data_plane_status_to_port.py":[{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"de4cdfce14be6e926679af47aeeafc64e619d4a5","unresolved":false,"context_lines":[{"line_number":29,"context_line":"import sqlalchemy as sa"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def upgrade():"},{"line_number":33,"context_line":"    op.add_column(\u0027ports\u0027,"},{"line_number":34,"context_line":"                  sa.Column(\u0027data_plane_status\u0027, sa.String(length\u003d16),"},{"line_number":35,"context_line":"                            nullable\u003dTrue))"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_be2444af","line":32,"updated":"2017-03-09 00:33:43.000000000","message":"If you decide to follow recommendation here https://review.openstack.org/#/c/424340/3/neutron/db/models_v2.py@97, you will need to adjust this migration script. Here\u0027s an example you might find useful: https://github.com/openstack/neutron/blob/master/neutron/db/migration/alembic_migrations/versions/mitaka/expand/659bf3d90664_add_attributes_to_support_external_dns_integration.py#L67","commit_id":"35e2aa9e7dc0900e7d6216033a9b2722392a5ff2"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"a4d5de6917eff1021aa1dd42157a8c7cb859ea4a","unresolved":false,"context_lines":[{"line_number":29,"context_line":"import sqlalchemy as sa"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def upgrade():"},{"line_number":33,"context_line":"    op.add_column(\u0027ports\u0027,"},{"line_number":34,"context_line":"                  sa.Column(\u0027data_plane_status\u0027, sa.String(length\u003d16),"},{"line_number":35,"context_line":"                            nullable\u003dTrue))"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_73749435","line":32,"in_reply_to":"9a30ddce_be2444af","updated":"2017-03-09 23:43:25.000000000","message":"Done","commit_id":"35e2aa9e7dc0900e7d6216033a9b2722392a5ff2"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"54d1b4064f03f454ab9d6e2c680205b4f7422240","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def upgrade():"},{"line_number":33,"context_line":"    op.create_table(\u0027portdataplanestatuses\u0027,"},{"line_number":34,"context_line":"                    sa.Column(\u0027port_id\u0027, sa.String(36),"},{"line_number":35,"context_line":"                              sa.ForeignKey(\u0027ports.id\u0027,"},{"line_number":36,"context_line":"                                            ondelete\u003d\"CASCADE\"),"}],"source_content_type":"text/x-python","patch_set":5,"id":"bff0334d_52045c4a","line":33,"updated":"2017-04-06 23:22:03.000000000","message":"The failure you are getting in Jenkins is because the DB model is not synchronized with the migration script:\n\nAssertionError: Models and migration scripts aren\u0027t in sync:\n[ ( \u0027remove_index\u0027,\nIndex(\u0027ix_portdataplanestatuses_port_id\u0027, Column(\u0027port_id\u0027, VARCHAR(length\u003d36), ForeignKey(u\u0027ports.id\u0027), ForeignKey(u\u0027ports.id\u0027), table\u003d\u003cportdataplanestatuses\u003e, primary_key\u003dTrue, nullable\u003dFalse)))]\n\nIt seems to be complaining about the index, which you set to true in L37. My next step would be to set index to True also at https://review.openstack.org/#/c/424340/5/neutron/db/models/data_plane_status.py@27","commit_id":"8ea051a437f62abfb457be7f1034744855425a08"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"a5698cf616c05afc1365a334f4f2d9c3b27671e8","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def upgrade():"},{"line_number":33,"context_line":"    op.create_table(\u0027portdataplanestatuses\u0027,"},{"line_number":34,"context_line":"                    sa.Column(\u0027port_id\u0027, sa.String(36),"},{"line_number":35,"context_line":"                              sa.ForeignKey(\u0027ports.id\u0027,"},{"line_number":36,"context_line":"                                            ondelete\u003d\"CASCADE\"),"}],"source_content_type":"text/x-python","patch_set":5,"id":"bff0334d_2a74ae67","line":33,"in_reply_to":"bff0334d_52045c4a","updated":"2017-04-07 11:57:04.000000000","message":"Done","commit_id":"8ea051a437f62abfb457be7f1034744855425a08"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"0ad9bc96d91287be08d859da114f9708d8b9bc84","unresolved":false,"context_lines":[{"line_number":35,"context_line":"                              sa.ForeignKey(\u0027ports.id\u0027,"},{"line_number":36,"context_line":"                                            ondelete\u003d\"CASCADE\"),"},{"line_number":37,"context_line":"                              primary_key\u003dTrue, index\u003dTrue),"},{"line_number":38,"context_line":"                    sa.Column(\u0027data_plane_status\u0027, sa.String(length\u003d16),"},{"line_number":39,"context_line":"                              nullable\u003dTrue))"}],"source_content_type":"text/x-python","patch_set":7,"id":"bff0334d_76d27802","line":38,"range":{"start_line":38,"start_character":51,"end_line":38,"end_character":71},"updated":"2017-04-09 07:36:00.000000000","message":"Do we want to have a hard set of texts that can be used here - for example ACTIVE, PENDING, UP, DOWN...? Or do we want to leave this up to the admin to decide?","commit_id":"94834614364773e0532f5f407b4705847c038280"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"b702614f95e42a2439b1982d58d6ea4493fc5189","unresolved":false,"context_lines":[{"line_number":35,"context_line":"                              sa.ForeignKey(\u0027ports.id\u0027,"},{"line_number":36,"context_line":"                                            ondelete\u003d\"CASCADE\"),"},{"line_number":37,"context_line":"                              primary_key\u003dTrue, index\u003dTrue),"},{"line_number":38,"context_line":"                    sa.Column(\u0027data_plane_status\u0027, sa.String(length\u003d16),"},{"line_number":39,"context_line":"                              nullable\u003dTrue))"}],"source_content_type":"text/x-python","patch_set":7,"id":"bff0334d_f61b287e","line":38,"range":{"start_line":38,"start_character":51,"end_line":38,"end_character":71},"in_reply_to":"bff0334d_76d27802","updated":"2017-04-09 10:35:41.000000000","message":"Hard set of texts. And for the time being we\u0027re only considering ACTIVE, DOWN and null.","commit_id":"94834614364773e0532f5f407b4705847c038280"}],"neutron/db/models/data_plane_status.py":[{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"54d1b4064f03f454ab9d6e2c680205b4f7422240","unresolved":false,"context_lines":[{"line_number":22,"context_line":"class PortDataPlaneStatus(model_base.BASEV2):"},{"line_number":23,"context_line":"    __tablename__ \u003d \u0027portdataplanestatuses\u0027"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    port_id \u003d sa.Column(sa.String(36),"},{"line_number":26,"context_line":"                        sa.ForeignKey(\u0027ports.id\u0027, ondelete\u003d\"CASCADE\"),"},{"line_number":27,"context_line":"                        primary_key\u003dTrue)"},{"line_number":28,"context_line":"    data_plane_status \u003d sa.Column(sa.String(16), nullable\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":5,"id":"bff0334d_1577db04","line":25,"updated":"2017-04-06 23:22:03.000000000","message":"Please see my comment to https://review.openstack.org/#/c/424340/5/neutron/db/migration/alembic_migrations/versions/pike/expand/804a3c76314c_add_data_plane_status_to_port.py@33","commit_id":"8ea051a437f62abfb457be7f1034744855425a08"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"a5698cf616c05afc1365a334f4f2d9c3b27671e8","unresolved":false,"context_lines":[{"line_number":22,"context_line":"class PortDataPlaneStatus(model_base.BASEV2):"},{"line_number":23,"context_line":"    __tablename__ \u003d \u0027portdataplanestatuses\u0027"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    port_id \u003d sa.Column(sa.String(36),"},{"line_number":26,"context_line":"                        sa.ForeignKey(\u0027ports.id\u0027, ondelete\u003d\"CASCADE\"),"},{"line_number":27,"context_line":"                        primary_key\u003dTrue)"},{"line_number":28,"context_line":"    data_plane_status \u003d sa.Column(sa.String(16), nullable\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":5,"id":"bff0334d_0a6faa92","line":25,"in_reply_to":"bff0334d_1577db04","updated":"2017-04-07 11:57:04.000000000","message":"Done","commit_id":"8ea051a437f62abfb457be7f1034744855425a08"}],"neutron/db/models_v2.py":[{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"de4cdfce14be6e926679af47aeeafc64e619d4a5","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    device_owner \u003d sa.Column(sa.String(db_const.DEVICE_OWNER_FIELD_SIZE),"},{"line_number":95,"context_line":"                             nullable\u003dFalse)"},{"line_number":96,"context_line":"    ip_allocation \u003d sa.Column(sa.String(16))"},{"line_number":97,"context_line":"    data_plane_status \u003d sa.Column(sa.String(16), nullable\u003dTrue)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    __table_args__ \u003d ("},{"line_number":100,"context_line":"        sa.Index("}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_63195988","line":97,"updated":"2017-03-09 00:33:43.000000000","message":"Consider adding this attribute in a separate table. Other extensions that add attributes to port take this approach. Some examples: https://github.com/openstack/neutron/blob/master/neutron/db/models/portbinding.py#L23, https://github.com/openstack/neutron/blob/master/neutron/db/models/allowed_address_pair.py#L20, https://github.com/openstack/neutron/blob/master/neutron/db/models/dns.py#L69","commit_id":"35e2aa9e7dc0900e7d6216033a9b2722392a5ff2"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"a4d5de6917eff1021aa1dd42157a8c7cb859ea4a","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    device_owner \u003d sa.Column(sa.String(db_const.DEVICE_OWNER_FIELD_SIZE),"},{"line_number":95,"context_line":"                             nullable\u003dFalse)"},{"line_number":96,"context_line":"    ip_allocation \u003d sa.Column(sa.String(16))"},{"line_number":97,"context_line":"    data_plane_status \u003d sa.Column(sa.String(16), nullable\u003dTrue)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    __table_args__ \u003d ("},{"line_number":100,"context_line":"        sa.Index("}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_70af4b94","line":97,"in_reply_to":"9a30ddce_63195988","updated":"2017-03-09 23:43:25.000000000","message":"I considered doing so, yes. The reason why I proposed this way was because it would end up being a 1-to-1 mapping.","commit_id":"35e2aa9e7dc0900e7d6216033a9b2722392a5ff2"}],"neutron/extensions/data_plane_status.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"a0f767e04c9d4e9952a4b5b7ae9329939defb2b3","unresolved":false,"context_lines":[{"line_number":45,"context_line":"                            \u0027is_visible\u0027: True,"},{"line_number":46,"context_line":"                            \u0027default\u0027: constants.ATTR_NOT_SPECIFIED,"},{"line_number":47,"context_line":"                            \u0027validate\u0027: {\u0027type:validate_data_plane_status\u0027:"},{"line_number":48,"context_line":"                                         DATA_PLANE_STATUS_SUPPORTED}},"},{"line_number":49,"context_line":"    },"},{"line_number":50,"context_line":"}"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_4525a508","line":48,"updated":"2017-01-24 22:14:28.000000000","message":"The following is required to enable the policy check based on policy.json:\n\n   \u0027enforce_policy\u0027: True","commit_id":"1efe4dd67f8dfd813d3175c8d21d5ffcc069087e"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"b830d896f0d2dc9746802b8e7b72b5b1fee9eb7b","unresolved":false,"context_lines":[{"line_number":45,"context_line":"                            \u0027is_visible\u0027: True,"},{"line_number":46,"context_line":"                            \u0027default\u0027: constants.ATTR_NOT_SPECIFIED,"},{"line_number":47,"context_line":"                            \u0027validate\u0027: {\u0027type:validate_data_plane_status\u0027:"},{"line_number":48,"context_line":"                                         DATA_PLANE_STATUS_SUPPORTED}},"},{"line_number":49,"context_line":"    },"},{"line_number":50,"context_line":"}"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_2045e716","line":48,"in_reply_to":"5a3905b3_4525a508","updated":"2017-01-24 22:18:16.000000000","message":"AH! :-)","commit_id":"1efe4dd67f8dfd813d3175c8d21d5ffcc069087e"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"1db864952767497440e6c4ee33d2ecb7b30a6986","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                                         DATA_PLANE_STATUS_SUPPORTED}},"},{"line_number":49,"context_line":"    },"},{"line_number":50,"context_line":"}"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"class Data_plane_status(extensions.ExtensionDescriptor):"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_7c6b49b7","line":51,"updated":"2017-01-24 08:30:18.000000000","message":"The definition of API extension should be defined in neutron-lib. I encourage you refer to https://review.openstack.org/#/c/353131/","commit_id":"1efe4dd67f8dfd813d3175c8d21d5ffcc069087e"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"b830d896f0d2dc9746802b8e7b72b5b1fee9eb7b","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                                         DATA_PLANE_STATUS_SUPPORTED}},"},{"line_number":49,"context_line":"    },"},{"line_number":50,"context_line":"}"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"class Data_plane_status(extensions.ExtensionDescriptor):"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_050b9d7e","line":51,"in_reply_to":"5a3905b3_7c6b49b7","updated":"2017-01-24 22:18:16.000000000","message":"Thanks for the helpful reference!\n\nPatch under review here: https://review.openstack.org/#/c/424868/","commit_id":"1efe4dd67f8dfd813d3175c8d21d5ffcc069087e"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"a0f767e04c9d4e9952a4b5b7ae9329939defb2b3","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    @classmethod"},{"line_number":60,"context_line":"    def get_alias(cls):"},{"line_number":61,"context_line":"        return \"data_plane_status\""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @classmethod"},{"line_number":64,"context_line":"    def get_description(cls):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_4553e56c","line":61,"updated":"2017-01-24 22:14:28.000000000","message":"Let\u0027s use a hyphen as a delimiter.\nThere is no strict documented rule in neutron, but hyphen is major over underscore as a delimiter of extension alias.","commit_id":"1efe4dd67f8dfd813d3175c8d21d5ffcc069087e"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"b830d896f0d2dc9746802b8e7b72b5b1fee9eb7b","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    @classmethod"},{"line_number":60,"context_line":"    def get_alias(cls):"},{"line_number":61,"context_line":"        return \"data_plane_status\""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @classmethod"},{"line_number":64,"context_line":"    def get_description(cls):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_606e0f98","line":61,"in_reply_to":"5a3905b3_4553e56c","updated":"2017-01-24 22:18:16.000000000","message":"Ok.","commit_id":"1efe4dd67f8dfd813d3175c8d21d5ffcc069087e"}],"neutron/objects/ports.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"0ad9bc96d91287be08d859da114f9708d8b9bc84","unresolved":false,"context_lines":[{"line_number":273,"context_line":"        \u0027security\u0027,"},{"line_number":274,"context_line":"        \u0027security_group_ids\u0027,"},{"line_number":275,"context_line":"    ]"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    fields_need_translation \u003d {"},{"line_number":278,"context_line":"        \u0027binding\u0027: \u0027port_binding\u0027,"},{"line_number":279,"context_line":"        \u0027dhcp_options\u0027: \u0027dhcp_opts\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"bff0334d_56cf7455","line":276,"updated":"2017-04-09 07:36:00.000000000","message":"do we need a obj_make_compatible? method here?","commit_id":"94834614364773e0532f5f407b4705847c038280"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"b702614f95e42a2439b1982d58d6ea4493fc5189","unresolved":false,"context_lines":[{"line_number":273,"context_line":"        \u0027security\u0027,"},{"line_number":274,"context_line":"        \u0027security_group_ids\u0027,"},{"line_number":275,"context_line":"    ]"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    fields_need_translation \u003d {"},{"line_number":278,"context_line":"        \u0027binding\u0027: \u0027port_binding\u0027,"},{"line_number":279,"context_line":"        \u0027dhcp_options\u0027: \u0027dhcp_opts\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"bff0334d_d9d97757","line":276,"in_reply_to":"bff0334d_56cf7455","updated":"2017-04-09 10:35:41.000000000","message":"We do. Thanks!","commit_id":"94834614364773e0532f5f407b4705847c038280"}],"neutron/plugins/ml2/extensions/data_plane_status.py":[{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"54d1b4064f03f454ab9d6e2c680205b4f7422240","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    _supported_extension_alias \u003d \u0027data-plane-status\u0027"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def initialize(self):"},{"line_number":30,"context_line":"        LOG.info(_LI(\"DataPlaneStatusExtensionDriver initialization complete\"))"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    @property"},{"line_number":33,"context_line":"    def extension_alias(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"bff0334d_75bbc771","line":30,"range":{"start_line":30,"start_character":17,"end_line":30,"end_character":20},"updated":"2017-04-06 23:22:03.000000000","message":"We are not translating log messages anymore. Please see the note here: https://docs.openstack.org/developer/oslo.i18n/guidelines.html#log-translation","commit_id":"8ea051a437f62abfb457be7f1034744855425a08"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"a5698cf616c05afc1365a334f4f2d9c3b27671e8","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    _supported_extension_alias \u003d \u0027data-plane-status\u0027"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def initialize(self):"},{"line_number":30,"context_line":"        LOG.info(_LI(\"DataPlaneStatusExtensionDriver initialization complete\"))"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    @property"},{"line_number":33,"context_line":"    def extension_alias(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"bff0334d_0ac1ea80","line":30,"range":{"start_line":30,"start_character":17,"end_line":30,"end_character":20},"in_reply_to":"bff0334d_75bbc771","updated":"2017-04-07 11:57:04.000000000","message":"Done","commit_id":"8ea051a437f62abfb457be7f1034744855425a08"}],"neutron/plugins/ml2/plugin.py":[{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"1a59a057519abafcc1a315c58a725ef0059b1408","unresolved":false,"context_lines":[{"line_number":107,"context_line":"                extradhcpopt_db.ExtraDhcpOptMixin,"},{"line_number":108,"context_line":"                address_scope_db.AddressScopeDbMixin,"},{"line_number":109,"context_line":"                service_type_db.SubnetServiceTypeMixin,"},{"line_number":110,"context_line":"                data_plane_status_db.DataPlaneStatusMixin):"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    \"\"\"Implement the Neutron L2 abstractions using modules."},{"line_number":113,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a430d35_e0e14c2b","line":110,"updated":"2017-02-08 23:21:18.000000000","message":"About a year ago, I implemented an extension to integrate Neutron with an eternal DNS service. This entailed adding an attribute to networks (dns_domain) and another attribute to ports (dns_name). My original approach was to add a mixin to the ML2 plugin. I got very strong feedback not to do that. You can see the comments here: https://review.openstack.org/#/c/212213\n\nI ended up using an ML2 extension. The code has evolved a little since then. You can find the current code here: https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/extensions/dns_integration.py\n\nIt seems to me that if you decide to follow this approach, you would need a process_update_port method (to store the value of data_plane_status in the db) plus extend port dictionary. ML2 extensions are controlled by https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/managers.py#L850.\n\nSince you are early in the development process, I recommend that you give this approach a consideration","commit_id":"5c3bc4f8ef751b7d59afdfef5a12b51fcabb8d05"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"88789a8fc8d4a3c2710f9ee23d5bf0cd9aacd046","unresolved":false,"context_lines":[{"line_number":107,"context_line":"                extradhcpopt_db.ExtraDhcpOptMixin,"},{"line_number":108,"context_line":"                address_scope_db.AddressScopeDbMixin,"},{"line_number":109,"context_line":"                service_type_db.SubnetServiceTypeMixin,"},{"line_number":110,"context_line":"                data_plane_status_db.DataPlaneStatusMixin):"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    \"\"\"Implement the Neutron L2 abstractions using modules."},{"line_number":113,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a430d35_aafd3a0a","line":110,"in_reply_to":"1a430d35_867a60bb","updated":"2017-02-09 17:39:22.000000000","message":"Not necessarily. You could keep your logic in the DataPlaneStatusMixin class in neutron/db/data_plane_status_db and have your ML2 extension class inherit from that mixin. In this scenario, process_update_port method in the ML2 extension class would just call the corresponding method in the mixin that actually performs all the logic. Same for the the dictionary extension method. This way, you don\u0027t add to the long list of mixins in the ML2 plugin but at the same time you have a mixin that can be used by other plugins","commit_id":"5c3bc4f8ef751b7d59afdfef5a12b51fcabb8d05"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"609a31cd5c0023a93afcae99047821c0af7feace","unresolved":false,"context_lines":[{"line_number":107,"context_line":"                extradhcpopt_db.ExtraDhcpOptMixin,"},{"line_number":108,"context_line":"                address_scope_db.AddressScopeDbMixin,"},{"line_number":109,"context_line":"                service_type_db.SubnetServiceTypeMixin,"},{"line_number":110,"context_line":"                data_plane_status_db.DataPlaneStatusMixin):"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    \"\"\"Implement the Neutron L2 abstractions using modules."},{"line_number":113,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa31d9ce_947ee9ac","line":110,"in_reply_to":"1a430d35_aafd3a0a","updated":"2017-02-10 02:14:57.000000000","message":"It make sense","commit_id":"5c3bc4f8ef751b7d59afdfef5a12b51fcabb8d05"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"839cc13ab0bbbc48713321254b5c8e25be2aad43","unresolved":false,"context_lines":[{"line_number":107,"context_line":"                extradhcpopt_db.ExtraDhcpOptMixin,"},{"line_number":108,"context_line":"                address_scope_db.AddressScopeDbMixin,"},{"line_number":109,"context_line":"                service_type_db.SubnetServiceTypeMixin,"},{"line_number":110,"context_line":"                data_plane_status_db.DataPlaneStatusMixin):"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    \"\"\"Implement the Neutron L2 abstractions using modules."},{"line_number":113,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a430d35_867a60bb","line":110,"in_reply_to":"1a430d35_e0e14c2b","updated":"2017-02-09 00:46:14.000000000","message":"I think that ML2 extension is one good solution but it means we cannot get data-plane-status in other core plugin, right?","commit_id":"5c3bc4f8ef751b7d59afdfef5a12b51fcabb8d05"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"75ee7f89d83326d0f3af2260b20f59021aae8afd","unresolved":false,"context_lines":[{"line_number":107,"context_line":"                extradhcpopt_db.ExtraDhcpOptMixin,"},{"line_number":108,"context_line":"                address_scope_db.AddressScopeDbMixin,"},{"line_number":109,"context_line":"                service_type_db.SubnetServiceTypeMixin,"},{"line_number":110,"context_line":"                data_plane_status_db.DataPlaneStatusMixin):"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    \"\"\"Implement the Neutron L2 abstractions using modules."},{"line_number":113,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a30ddce_d204ba7f","line":110,"in_reply_to":"fa31d9ce_947ee9ac","updated":"2017-03-08 00:31:18.000000000","message":"Thanks a lot, Miguel! I tried to address your comments in the patch set 3.","commit_id":"5c3bc4f8ef751b7d59afdfef5a12b51fcabb8d05"}],"neutron/tests/etc/policy.json":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"a0f767e04c9d4e9952a4b5b7ae9329939defb2b3","unresolved":false,"context_lines":[{"line_number":7,"context_line":"    \"admin_owner_or_network_owner\": \"rule:owner or rule:admin_or_network_owner\","},{"line_number":8,"context_line":"    \"admin_only\": \"rule:context_is_admin\","},{"line_number":9,"context_line":"    \"regular_user\": \"\","},{"line_number":10,"context_line":"    \"data_plane_int_only\": \"role:data_plane_integrator\","},{"line_number":11,"context_line":"    \"shared\": \"field:networks:shared\u003dTrue\","},{"line_number":12,"context_line":"    \"shared_subnetpools\": \"field:subnetpools:shared\u003dTrue\","},{"line_number":13,"context_line":"    \"shared_address_scopes\": \"field:address_scopes:shared\u003dTrue\","}],"source_content_type":"application/json","patch_set":1,"id":"5a3905b3_20a967e0","line":10,"updated":"2017-01-24 22:14:28.000000000","message":"Could you add role:admin too?","commit_id":"1efe4dd67f8dfd813d3175c8d21d5ffcc069087e"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"b830d896f0d2dc9746802b8e7b72b5b1fee9eb7b","unresolved":false,"context_lines":[{"line_number":7,"context_line":"    \"admin_owner_or_network_owner\": \"rule:owner or rule:admin_or_network_owner\","},{"line_number":8,"context_line":"    \"admin_only\": \"rule:context_is_admin\","},{"line_number":9,"context_line":"    \"regular_user\": \"\","},{"line_number":10,"context_line":"    \"data_plane_int_only\": \"role:data_plane_integrator\","},{"line_number":11,"context_line":"    \"shared\": \"field:networks:shared\u003dTrue\","},{"line_number":12,"context_line":"    \"shared_subnetpools\": \"field:subnetpools:shared\u003dTrue\","},{"line_number":13,"context_line":"    \"shared_address_scopes\": \"field:address_scopes:shared\u003dTrue\","}],"source_content_type":"application/json","patch_set":1,"id":"5a3905b3_a0ed57f1","line":10,"in_reply_to":"5a3905b3_20a967e0","updated":"2017-01-24 22:18:16.000000000","message":"Ok. I\u0027ll also rename the rule to \"admin_or_data_plane_int\".","commit_id":"1efe4dd67f8dfd813d3175c8d21d5ffcc069087e"}],"neutron/tests/unit/extensions/test_data_plane_status.py":[{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"3e77c072623e0a16ca3e60d9143e042c80cfad34","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from webob import exc as web_exc"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from neutron.db import data_plane_status_db as dps_db"},{"line_number":18,"context_line":"from neutron.db import db_base_plugin_v2"},{"line_number":19,"context_line":"from neutron.extensions import data_plane_status as dps_ext"},{"line_number":20,"context_line":"from neutron.tests import fake_notifier"},{"line_number":21,"context_line":"from neutron.tests.unit.db import test_db_base_plugin_v2"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from neutron_lib.api.definitions import data_plane_status as dps_lib"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class DataPlaneStatusTestExtensionManager(object):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a461143_d9a08b93","line":23,"range":{"start_line":17,"start_character":0,"end_line":23,"end_character":68},"updated":"2017-01-26 02:10:31.000000000","message":"There is a rule about import order[1].\n[1]: http://docs.openstack.org/developer/hacking/#import-order-template","commit_id":"5c3bc4f8ef751b7d59afdfef5a12b51fcabb8d05"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"75ee7f89d83326d0f3af2260b20f59021aae8afd","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from webob import exc as web_exc"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from neutron.db import data_plane_status_db as dps_db"},{"line_number":18,"context_line":"from neutron.db import db_base_plugin_v2"},{"line_number":19,"context_line":"from neutron.extensions import data_plane_status as dps_ext"},{"line_number":20,"context_line":"from neutron.tests import fake_notifier"},{"line_number":21,"context_line":"from neutron.tests.unit.db import test_db_base_plugin_v2"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from neutron_lib.api.definitions import data_plane_status as dps_lib"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class DataPlaneStatusTestExtensionManager(object):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a30ddce_12ff3268","line":23,"range":{"start_line":17,"start_character":0,"end_line":23,"end_character":68},"in_reply_to":"3a461143_d9a08b93","updated":"2017-03-08 00:31:18.000000000","message":"Done","commit_id":"5c3bc4f8ef751b7d59afdfef5a12b51fcabb8d05"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"de4cdfce14be6e926679af47aeeafc64e619d4a5","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    supported_extension_aliases \u003d [\"data-plane-status\"]"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class DataPlaneStatusExtensionTestCase(test_db_base_plugin_v2.TestPortsV2):"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def setUp(self):"},{"line_number":51,"context_line":"        plugin \u003d (\u0027neutron.tests.unit.extensions.test_data_plane_status.\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_be860411","line":48,"range":{"start_line":48,"start_character":39,"end_line":48,"end_character":73},"updated":"2017-03-09 00:33:43.000000000","message":"Since you are implementing your extension as a ML2 extension, I think it would be better if you implement a ML2 test class. Here\u0027s an example: https://github.com/openstack/neutron/blob/master/neutron/tests/unit/plugins/ml2/extensions/test_dns_integration.py#L48","commit_id":"35e2aa9e7dc0900e7d6216033a9b2722392a5ff2"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"a4d5de6917eff1021aa1dd42157a8c7cb859ea4a","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    supported_extension_aliases \u003d [\"data-plane-status\"]"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class DataPlaneStatusExtensionTestCase(test_db_base_plugin_v2.TestPortsV2):"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def setUp(self):"},{"line_number":51,"context_line":"        plugin \u003d (\u0027neutron.tests.unit.extensions.test_data_plane_status.\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_73f01492","line":48,"range":{"start_line":48,"start_character":39,"end_line":48,"end_character":73},"in_reply_to":"9a30ddce_be860411","updated":"2017-03-09 23:43:25.000000000","message":"You\u0027re right. I\u0027m uploading a new patch set taking your comments into account. Please let me know if I\u0027m in a good track addressing your comments. The ML2 ext test class will taken care in a subsequent patch set.","commit_id":"35e2aa9e7dc0900e7d6216033a9b2722392a5ff2"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"a1eb81653290fecccb569fa5f131c24f02a18eac","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    supported_extension_aliases \u003d [\"data-plane-status\"]"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class DataPlaneStatusExtensionTestCase(test_db_base_plugin_v2.TestPortsV2):"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def setUp(self):"},{"line_number":51,"context_line":"        plugin \u003d (\u0027neutron.tests.unit.extensions.test_data_plane_status.\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_770b5d7c","line":48,"updated":"2017-03-28 22:13:38.000000000","message":"In my previous review I suggested to implement this test class as an ML2 test class. I suggested this as an example: https://github.com/openstack/neutron/blob/master/neutron/tests/unit/plugins/ml2/extensions/test_dns_integration.py#L47. You indicated in your response that you were going to it. Are you still planning to do that?","commit_id":"afcdd297e249a241fc57ab007d5deab8ed96ece5"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"0fbb20348767c480b1560d2e2ee915cda3fc6c2c","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    supported_extension_aliases \u003d [\"data-plane-status\"]"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class DataPlaneStatusExtensionTestCase(test_db_base_plugin_v2.TestPortsV2):"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def setUp(self):"},{"line_number":51,"context_line":"        plugin \u003d (\u0027neutron.tests.unit.extensions.test_data_plane_status.\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_f8c06be3","line":48,"in_reply_to":"ffe62b97_770b5d7c","updated":"2017-03-29 10:25:11.000000000","message":"Yes, I am. I just wanted first to make sure I was addressing your previous reviews well wrt code implementation, otherwise I could eventually had to re-do the test class again. Seeing now that I\u0027m on track, I will do it in next patchset.","commit_id":"afcdd297e249a241fc57ab007d5deab8ed96ece5"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"e698e5414528b093af8fa208b6adf01ffcb1ef0a","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def update_port(self, context, id, port):"},{"line_number":50,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":51,"context_line":"            ret_port \u003d super(DataPlaneStatusExtensionTestPlugin, self) \\"},{"line_number":52,"context_line":"                .update_port(context, id, port)"},{"line_number":53,"context_line":"            if dps_lib.DATA_PLANE_STATUS in port[\u0027port\u0027]:"},{"line_number":54,"context_line":"                self._process_update_port_data_plane_status(context,"},{"line_number":55,"context_line":"                                                            port[\u0027port\u0027],"}],"source_content_type":"text/x-python","patch_set":6,"id":"bff0334d_6d463424","line":52,"range":{"start_line":51,"start_character":12,"end_line":52,"end_character":47},"updated":"2017-04-07 22:45:43.000000000","message":"You could get rid of the \\ (https://docs.openstack.org/developer/hacking/#general) by re-arranring this two lines as follows:\n\n    ret_port \u003d super(DataPlaneStatusExtensionTestPlugin,\n                     self).update_port(context, id, port)","commit_id":"0ba717ac40ee17f8cf768fd4db9e603e0b27530c"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"dad1e7e97b7a7fa5c39b2ae395d166eb72935490","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def update_port(self, context, id, port):"},{"line_number":50,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":51,"context_line":"            ret_port \u003d super(DataPlaneStatusExtensionTestPlugin, self) \\"},{"line_number":52,"context_line":"                .update_port(context, id, port)"},{"line_number":53,"context_line":"            if dps_lib.DATA_PLANE_STATUS in port[\u0027port\u0027]:"},{"line_number":54,"context_line":"                self._process_update_port_data_plane_status(context,"},{"line_number":55,"context_line":"                                                            port[\u0027port\u0027],"}],"source_content_type":"text/x-python","patch_set":6,"id":"bff0334d_d7eca52a","line":52,"range":{"start_line":51,"start_character":12,"end_line":52,"end_character":47},"in_reply_to":"bff0334d_6d463424","updated":"2017-04-08 18:22:58.000000000","message":"Done","commit_id":"0ba717ac40ee17f8cf768fd4db9e603e0b27530c"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"e698e5414528b093af8fa208b6adf01ffcb1ef0a","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            self.assertNotEqual(res[\u0027port\u0027][dps_lib.DATA_PLANE_STATUS],"},{"line_number":96,"context_line":"                                constants.ACTIVE)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def test_port_update_with_data_plane_status(self):"},{"line_number":99,"context_line":"        with self.port(name\u003d\u0027port1\u0027) as port:"},{"line_number":100,"context_line":"            res \u003d self._update(attrs.PORTS, port[\u0027port\u0027][\u0027id\u0027],"},{"line_number":101,"context_line":"                               {\u0027port\u0027: {dps_lib.DATA_PLANE_STATUS:"}],"source_content_type":"text/x-python","patch_set":6,"id":"bff0334d_ede004cf","line":98,"updated":"2017-04-07 22:45:43.000000000","message":"What\u0027s the difference between this test case and the one in L73. I would rather have a test case where you update the port with something other than data_plane_status and then check that data_plan_status is the same after creating the port","commit_id":"0ba717ac40ee17f8cf768fd4db9e603e0b27530c"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"dad1e7e97b7a7fa5c39b2ae395d166eb72935490","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            self.assertNotEqual(res[\u0027port\u0027][dps_lib.DATA_PLANE_STATUS],"},{"line_number":96,"context_line":"                                constants.ACTIVE)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def test_port_update_with_data_plane_status(self):"},{"line_number":99,"context_line":"        with self.port(name\u003d\u0027port1\u0027) as port:"},{"line_number":100,"context_line":"            res \u003d self._update(attrs.PORTS, port[\u0027port\u0027][\u0027id\u0027],"},{"line_number":101,"context_line":"                               {\u0027port\u0027: {dps_lib.DATA_PLANE_STATUS:"}],"source_content_type":"text/x-python","patch_set":6,"id":"bff0334d_72604702","line":98,"in_reply_to":"bff0334d_ede004cf","updated":"2017-04-08 18:22:58.000000000","message":"You\u0027re right -- duplicated UT.\n\nOk, although data_plane_status cannot be set on port creation. We\u0027d have to issue two port update requests: create port, update data_plane_status (skip check, covered in L73), update \u0027name\u0027 attr and finally check both attrs.","commit_id":"0ba717ac40ee17f8cf768fd4db9e603e0b27530c"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"09f8ea2ad5a5c5c2a7ed9e9e3a6fe93a84b3bae8","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            res \u003d self._update(attrs.PORTS, port[\u0027port\u0027][\u0027id\u0027],"},{"line_number":101,"context_line":"                               {\u0027port\u0027: {dps_lib.DATA_PLANE_STATUS:"},{"line_number":102,"context_line":"                                         constants.ACTIVE}})"},{"line_number":103,"context_line":"            res \u003d self._update(attrs.PORTS, port[\u0027port\u0027][\u0027id\u0027],"},{"line_number":104,"context_line":"                               {\u0027port\u0027: {\u0027name\u0027: \u0027port2\u0027}})"},{"line_number":105,"context_line":"            self.assertEqual(res[\u0027port\u0027][\u0027name\u0027], \u0027port2\u0027)"},{"line_number":106,"context_line":"            self.assertEqual(res[\u0027port\u0027][dps_lib.DATA_PLANE_STATUS],"}],"source_content_type":"text/x-python","patch_set":7,"id":"bff0334d_b7a7d70b","line":103,"updated":"2017-04-10 02:02:35.000000000","message":"Now it makes sense. Thanks!","commit_id":"94834614364773e0532f5f407b4705847c038280"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"0967b788885994599b5943d0b137049a5dbc03e9","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        return []"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def get_extended_resources(self, version):"},{"line_number":41,"context_line":"        return dps_ext.get_extended_resources(version)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"class DataPlaneStatusExtensionTestPlugin(db_base_plugin_v2.NeutronDbPluginV2,"}],"source_content_type":"text/x-python","patch_set":8,"id":"bff0334d_620babd5","line":41,"range":{"start_line":41,"start_character":15,"end_line":41,"end_character":54},"updated":"2017-04-11 00:00:08.000000000","message":"This cannot be called.\n\n dps_ext.Data_plane_status().get_extended_resources(version)","commit_id":"7f069188be16f08efefa3333639f7da71aef7ad8"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"9b42a74b273a2990e96756d39f243ea4e6888eb3","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        return []"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def get_extended_resources(self, version):"},{"line_number":41,"context_line":"        return dps_ext.get_extended_resources(version)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"class DataPlaneStatusExtensionTestPlugin(db_base_plugin_v2.NeutronDbPluginV2,"}],"source_content_type":"text/x-python","patch_set":8,"id":"bff0334d_5b72c6ae","line":41,"range":{"start_line":41,"start_character":15,"end_line":41,"end_character":54},"in_reply_to":"bff0334d_620babd5","updated":"2017-04-11 17:47:11.000000000","message":"Done","commit_id":"7f069188be16f08efefa3333639f7da71aef7ad8"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"a11787a139488ef91eb0b21a868e92139b356d3b","unresolved":false,"context_lines":[{"line_number":87,"context_line":"            res \u003d self.deserialize(self.fmt, req.get_response(self.api))"},{"line_number":88,"context_line":"            self.assertIsNone(res[\u0027port\u0027][dps_lib.DATA_PLANE_STATUS])"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def test_port_create_ignores_data_plane_status(self):"},{"line_number":91,"context_line":"        kwargs \u003d {dps_lib.DATA_PLANE_STATUS: constants.ACTIVE}"},{"line_number":92,"context_line":"        with self.port(name\u003d\u0027port1\u0027, **kwargs) as port:"},{"line_number":93,"context_line":"            req \u003d self.new_show_request(attrs.PORTS, port[\u0027port\u0027][\u0027id\u0027])"},{"line_number":94,"context_line":"            res \u003d self.deserialize(self.fmt, req.get_response(self.api))"},{"line_number":95,"context_line":"            self.assertNotEqual(res[\u0027port\u0027][dps_lib.DATA_PLANE_STATUS],"},{"line_number":96,"context_line":"                                constants.ACTIVE)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def test_port_update_preserves_data_plane_status(self):"},{"line_number":99,"context_line":"        with self.port(name\u003d\u0027port1\u0027) as port:"}],"source_content_type":"text/x-python","patch_set":8,"id":"bff0334d_7e10e3a8","line":96,"range":{"start_line":90,"start_character":0,"end_line":96,"end_character":49},"updated":"2017-04-11 03:03:36.000000000","message":"In this last review, the name of this test case looked suspicious to me. It doesn\u0027t seem to me that the API is going to ignore dps_lib.DATA_PLANE_STATUS in a port creation. Please look at this method, that is invoked by the API to fill out the default values for arguments you didn\u0027t pass explicitly in  a create operation: https://github.com/openstack/neutron/blob/master/neutron/api/v2/attributes.py#L301. In lines 312 - 315, it raises a ValueError exception if an attribute is passed by the caller that is not allowed for POSTs. That becomes a 400 status code in the API response with the following message: {\"NeutronError\": {\"message\": \"Attribute \\\u0027data_plane_status\\\u0027 not allowed in POST\", \"type\": \"HTTPBadRequest\", \"detail\": \"\"}}.\n\nSo why is your test case passing? It is because of the way you are creating the port. self.port() calls self._make_port() which in turn calls self._create_port(). This latter method is only going to add to the create request what you specify in kwargs if it finds it in the tuple that is built in L385 - 388 here: https://github.com/openstack/neutron/blob/master/neutron/tests/unit/db/test_db_base_plugin_v2.py#L385. Since dps_lib.DATA_PLANE_STATUS is not there, it is not passed in the create request and that is why your test case succeeds. The attribute is not being ignored: it just doesn\u0027t reach the API.\n\nSo I re-wrote your test case as follows: https://gist.github.com/miguellavalle/0837608fd536ef75bf25b7e65af71ef2. I ran it and it passes. I suggest renaming the test case","commit_id":"7f069188be16f08efefa3333639f7da71aef7ad8"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"9b42a74b273a2990e96756d39f243ea4e6888eb3","unresolved":false,"context_lines":[{"line_number":87,"context_line":"            res \u003d self.deserialize(self.fmt, req.get_response(self.api))"},{"line_number":88,"context_line":"            self.assertIsNone(res[\u0027port\u0027][dps_lib.DATA_PLANE_STATUS])"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def test_port_create_ignores_data_plane_status(self):"},{"line_number":91,"context_line":"        kwargs \u003d {dps_lib.DATA_PLANE_STATUS: constants.ACTIVE}"},{"line_number":92,"context_line":"        with self.port(name\u003d\u0027port1\u0027, **kwargs) as port:"},{"line_number":93,"context_line":"            req \u003d self.new_show_request(attrs.PORTS, port[\u0027port\u0027][\u0027id\u0027])"},{"line_number":94,"context_line":"            res \u003d self.deserialize(self.fmt, req.get_response(self.api))"},{"line_number":95,"context_line":"            self.assertNotEqual(res[\u0027port\u0027][dps_lib.DATA_PLANE_STATUS],"},{"line_number":96,"context_line":"                                constants.ACTIVE)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def test_port_update_preserves_data_plane_status(self):"},{"line_number":99,"context_line":"        with self.port(name\u003d\u0027port1\u0027) as port:"}],"source_content_type":"text/x-python","patch_set":8,"id":"bff0334d_880114b2","line":96,"range":{"start_line":90,"start_character":0,"end_line":96,"end_character":49},"in_reply_to":"bff0334d_7e10e3a8","updated":"2017-04-11 17:47:11.000000000","message":"You\u0027re right, again! :)\n_make_port does not pass in arg_list to _create_port. If it did we could do it this way. Instead unexpected args like \u0027data_plane_status\u0027 in this case are silently ignored. Let\u0027s take your proposed test case. Thanks a zillion!","commit_id":"7f069188be16f08efefa3333639f7da71aef7ad8"}],"releasenotes/notes/add-port-data-plane-status-12726c964210b374.yaml":[{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"09f8ea2ad5a5c5c2a7ed9e9e3a6fe93a84b3bae8","unresolved":false,"context_lines":[{"line_number":2,"context_line":"prelude: \u003e"},{"line_number":3,"context_line":"    Add ``data_plane_status`` attribute to port resources."},{"line_number":4,"context_line":"features:"},{"line_number":5,"context_line":"  - The port resource can have a ``data_plane_status`` attribute."},{"line_number":6,"context_line":"    Attribute can take values ``None`` (default), ``ACTIVE`` or ``DOWN``,"},{"line_number":7,"context_line":"    and is readable by users and writable by admins and users granted the"},{"line_number":8,"context_line":"    ``data-plane-integrator`` role."}],"source_content_type":"text/x-yaml","patch_set":7,"id":"bff0334d_b780f747","line":5,"updated":"2017-04-10 02:02:35.000000000","message":"You are assuming that the reader understands the meaning of the data_plane_status attribute. I would start by explaining its meaning and then explain its possible values, like you do here.","commit_id":"94834614364773e0532f5f407b4705847c038280"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"32719fc56a2e257764e1b3329613118700573985","unresolved":false,"context_lines":[{"line_number":2,"context_line":"prelude: \u003e"},{"line_number":3,"context_line":"    Add ``data_plane_status`` attribute to port resources."},{"line_number":4,"context_line":"features:"},{"line_number":5,"context_line":"  - The port resource can have a ``data_plane_status`` attribute."},{"line_number":6,"context_line":"    Attribute can take values ``None`` (default), ``ACTIVE`` or ``DOWN``,"},{"line_number":7,"context_line":"    and is readable by users and writable by admins and users granted the"},{"line_number":8,"context_line":"    ``data-plane-integrator`` role."}],"source_content_type":"text/x-yaml","patch_set":7,"id":"bff0334d_8916ecf0","line":5,"in_reply_to":"bff0334d_b780f747","updated":"2017-04-10 13:10:37.000000000","message":"Done. Also extended the prelude.","commit_id":"94834614364773e0532f5f407b4705847c038280"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"a11787a139488ef91eb0b21a868e92139b356d3b","unresolved":false,"context_lines":[{"line_number":3,"context_line":"    Add ``data_plane_status`` attribute to port resources to represent the"},{"line_number":4,"context_line":"    status of the underlying data plane. This attribute is to be managed by"},{"line_number":5,"context_line":"    entities outside of the Networking service, while the ``status`` attribute"},{"line_number":6,"context_line":"    is managed by Networking service. Both status attributes are independent"},{"line_number":7,"context_line":"    from one another."},{"line_number":8,"context_line":"features:"},{"line_number":9,"context_line":"  - The port resource can have a ``data_plane_status`` attribute."}],"source_content_type":"text/x-yaml","patch_set":8,"id":"bff0334d_fe4993b6","line":6,"range":{"start_line":6,"start_character":18,"end_line":6,"end_character":28},"updated":"2017-04-11 03:03:36.000000000","message":"the Networking","commit_id":"7f069188be16f08efefa3333639f7da71aef7ad8"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"9b42a74b273a2990e96756d39f243ea4e6888eb3","unresolved":false,"context_lines":[{"line_number":3,"context_line":"    Add ``data_plane_status`` attribute to port resources to represent the"},{"line_number":4,"context_line":"    status of the underlying data plane. This attribute is to be managed by"},{"line_number":5,"context_line":"    entities outside of the Networking service, while the ``status`` attribute"},{"line_number":6,"context_line":"    is managed by Networking service. Both status attributes are independent"},{"line_number":7,"context_line":"    from one another."},{"line_number":8,"context_line":"features:"},{"line_number":9,"context_line":"  - The port resource can have a ``data_plane_status`` attribute."}],"source_content_type":"text/x-yaml","patch_set":8,"id":"bff0334d_68ea50d8","line":6,"range":{"start_line":6,"start_character":18,"end_line":6,"end_character":28},"in_reply_to":"bff0334d_fe4993b6","updated":"2017-04-11 17:47:11.000000000","message":"Done","commit_id":"7f069188be16f08efefa3333639f7da71aef7ad8"}]}
