)]}'
{"neutron/db/db_base_plugin_v2.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"ae65f12a3959225c000474110aedc50f93a2fc6b","unresolved":false,"context_lines":[{"line_number":1477,"context_line":""},{"line_number":1478,"context_line":"        filters \u003d filters or {}"},{"line_number":1479,"context_line":"        fixed_ips \u003d filters.pop(\u0027fixed_ips\u0027, {})"},{"line_number":1480,"context_line":"        vtype \u003d filters.pop(portbindings_def.VIF_TYPE, None)"},{"line_number":1481,"context_line":"        query \u003d model_query.get_collection_query(context, Port,"},{"line_number":1482,"context_line":"                                                 filters\u003dfilters,"},{"line_number":1483,"context_line":"                                                 *args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_2906861d","line":1480,"range":{"start_line":1480,"start_character":8,"end_line":1480,"end_character":13},"updated":"2019-03-29 06:57:12.000000000","message":"nit: from the readability, I prefer to vif_type over vtype as we see many meanings in \"v\".","commit_id":"825cc289bbd62b1c7681db72723c2c3e9519b750"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"343d51d829a5fdb2c3a5e2bdaf75d0f617d56835","unresolved":false,"context_lines":[{"line_number":1477,"context_line":""},{"line_number":1478,"context_line":"        filters \u003d filters or {}"},{"line_number":1479,"context_line":"        fixed_ips \u003d filters.pop(\u0027fixed_ips\u0027, {})"},{"line_number":1480,"context_line":"        vtype \u003d filters.pop(portbindings_def.VIF_TYPE, None)"},{"line_number":1481,"context_line":"        query \u003d model_query.get_collection_query(context, Port,"},{"line_number":1482,"context_line":"                                                 filters\u003dfilters,"},{"line_number":1483,"context_line":"                                                 *args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_93748438","line":1480,"range":{"start_line":1480,"start_character":8,"end_line":1480,"end_character":13},"in_reply_to":"5fc1f717_2906861d","updated":"2019-03-29 14:56:33.000000000","message":"Done","commit_id":"825cc289bbd62b1c7681db72723c2c3e9519b750"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"ae65f12a3959225c000474110aedc50f93a2fc6b","unresolved":false,"context_lines":[{"line_number":1484,"context_line":"        ip_addresses \u003d fixed_ips.get(\u0027ip_address\u0027)"},{"line_number":1485,"context_line":"        subnet_ids \u003d fixed_ips.get(\u0027subnet_id\u0027)"},{"line_number":1486,"context_line":"        if vtype is not None:"},{"line_number":1487,"context_line":"            query \u003d query.filter(Port.port_bindings.any(vtype))"},{"line_number":1488,"context_line":"        if ip_addresses:"},{"line_number":1489,"context_line":"            query \u003d query.filter("},{"line_number":1490,"context_line":"                Port.fixed_ips.any(IPAllocation.ip_address.in_(ip_addresses)))"}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_a9bcb605","line":1487,"range":{"start_line":1487,"start_character":56,"end_line":1487,"end_character":61},"updated":"2019-03-29 06:57:12.000000000","message":"Why don\u0027t we specify a field name like \"vif_type\u003dvtype\"?","commit_id":"825cc289bbd62b1c7681db72723c2c3e9519b750"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"343d51d829a5fdb2c3a5e2bdaf75d0f617d56835","unresolved":false,"context_lines":[{"line_number":1484,"context_line":"        ip_addresses \u003d fixed_ips.get(\u0027ip_address\u0027)"},{"line_number":1485,"context_line":"        subnet_ids \u003d fixed_ips.get(\u0027subnet_id\u0027)"},{"line_number":1486,"context_line":"        if vtype is not None:"},{"line_number":1487,"context_line":"            query \u003d query.filter(Port.port_bindings.any(vtype))"},{"line_number":1488,"context_line":"        if ip_addresses:"},{"line_number":1489,"context_line":"            query \u003d query.filter("},{"line_number":1490,"context_line":"                Port.fixed_ips.any(IPAllocation.ip_address.in_(ip_addresses)))"}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_762d46fc","line":1487,"range":{"start_line":1487,"start_character":56,"end_line":1487,"end_character":61},"in_reply_to":"5fc1f717_a9bcb605","updated":"2019-03-29 14:56:33.000000000","message":"You are right. To be more \"orm-ish\":\n\nml2_models.PortBinding.vif_type.in_([vif_type])","commit_id":"825cc289bbd62b1c7681db72723c2c3e9519b750"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"11e47ab288f9304e19818e4c2d18db7b68743cee","unresolved":false,"context_lines":[{"line_number":1486,"context_line":"        subnet_ids \u003d fixed_ips.get(\u0027subnet_id\u0027)"},{"line_number":1487,"context_line":"        if vif_type is not None:"},{"line_number":1488,"context_line":"            query \u003d query.filter(Port.port_bindings.any("},{"line_number":1489,"context_line":"                ml2_models.PortBinding.vif_type.in_([vif_type])))"},{"line_number":1490,"context_line":"        if ip_addresses:"},{"line_number":1491,"context_line":"            query \u003d query.filter("},{"line_number":1492,"context_line":"                Port.fixed_ips.any(IPAllocation.ip_address.in_(ip_addresses)))"}],"source_content_type":"text/x-python","patch_set":17,"id":"5fc1f717_0acda185","line":1489,"updated":"2019-04-01 04:51:15.000000000","message":"_in() is usually used when we would like to look up entries against a list. In this case, we are looking up entries with a specific value, so there is no need to use in_().","commit_id":"f60f0b26599ffe99bba7708c3ce2317a4e660391"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"0f6874593857d9f2c0ebf6e790eddb50f277e44e","unresolved":false,"context_lines":[{"line_number":1486,"context_line":"        subnet_ids \u003d fixed_ips.get(\u0027subnet_id\u0027)"},{"line_number":1487,"context_line":"        if vif_type is not None:"},{"line_number":1488,"context_line":"            query \u003d query.filter(Port.port_bindings.any("},{"line_number":1489,"context_line":"                ml2_models.PortBinding.vif_type.in_([vif_type])))"},{"line_number":1490,"context_line":"        if ip_addresses:"},{"line_number":1491,"context_line":"            query \u003d query.filter("},{"line_number":1492,"context_line":"                Port.fixed_ips.any(IPAllocation.ip_address.in_(ip_addresses)))"}],"source_content_type":"text/x-python","patch_set":17,"id":"5fc1f717_90030477","line":1489,"in_reply_to":"5fc1f717_0acda185","updated":"2019-04-01 09:19:21.000000000","message":"You are right, looking for an specific value is faster.","commit_id":"f60f0b26599ffe99bba7708c3ce2317a4e660391"}],"neutron/db/segments_db.py":[{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"ba87b9645bae51c7d617f9f84aec7bb7f054c53a","unresolved":false,"context_lines":[{"line_number":65,"context_line":"    with db_api.CONTEXT_WRITER.using(context):"},{"line_number":66,"context_line":"        netseg_obj \u003d network_obj.NetworkSegment.get_object(context,"},{"line_number":67,"context_line":"                                                           id\u003dsegment_id)"},{"line_number":68,"context_line":"        netseg_obj[\u0027segmentation_id\u0027] \u003d updated_segment[\u0027segmentation_id\u0027]"},{"line_number":69,"context_line":"        netseg_obj.update()"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    LOG.info(\"Updated segment %(id)s, parameters updated: %s(updated_segment)\","}],"source_content_type":"text/x-python","patch_set":13,"id":"5fc1f717_a4c73496","line":68,"range":{"start_line":68,"start_character":8,"end_line":68,"end_character":18},"updated":"2019-03-27 02:21:59.000000000","message":"If there is no segment in DB with the \u0027segment_id\u0027, this will be None. Should we check for None and throw an exception?","commit_id":"43c28072854d2d9a702657f973b0f04ebe91ece9"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"980881a40e2d7c2a8d8af00fb55d8504a3a2198a","unresolved":false,"context_lines":[{"line_number":65,"context_line":"    with db_api.CONTEXT_WRITER.using(context):"},{"line_number":66,"context_line":"        netseg_obj \u003d network_obj.NetworkSegment.get_object(context,"},{"line_number":67,"context_line":"                                                           id\u003dsegment_id)"},{"line_number":68,"context_line":"        netseg_obj[\u0027segmentation_id\u0027] \u003d updated_segment[\u0027segmentation_id\u0027]"},{"line_number":69,"context_line":"        netseg_obj.update()"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    LOG.info(\"Updated segment %(id)s, parameters updated: %s(updated_segment)\","}],"source_content_type":"text/x-python","patch_set":13,"id":"5fc1f717_69759763","line":68,"range":{"start_line":68,"start_character":8,"end_line":68,"end_character":18},"in_reply_to":"5fc1f717_a4c73496","updated":"2019-03-27 17:35:54.000000000","message":"You are right. It\u0027s very difficult to hit this problem, because some lines before this function was called, we have retrieved the segments. But this check must be done.","commit_id":"43c28072854d2d9a702657f973b0f04ebe91ece9"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"c13d82670a19a2a2dc30df91f442e41edfc2a0eb","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    with db_api.CONTEXT_WRITER.using(context):"},{"line_number":68,"context_line":"        netseg_obj \u003d network_obj.NetworkSegment.get_object(context,"},{"line_number":69,"context_line":"                                                           id\u003dsegment_id)"},{"line_number":70,"context_line":"        if netseg_obj:"},{"line_number":71,"context_line":"            raise segments_exceptions.SegmentNotFound(segment_id\u003dsegment_id)"},{"line_number":72,"context_line":"        netseg_obj[ml2_api.SEGMENTATION_ID] \u003d segmentation_id"},{"line_number":73,"context_line":"        netseg_obj.update()"}],"source_content_type":"text/x-python","patch_set":15,"id":"5fc1f717_3642753f","line":70,"range":{"start_line":70,"start_character":8,"end_line":70,"end_character":22},"updated":"2019-03-28 15:12:25.000000000","message":"I think it should be the opposite?\n\n  if not netseg_obj:\n      ...","commit_id":"6bce3d6837b1d8ddbf168e119776bb0dde3b1ea7"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"5df3035eed6ebb50c1df00e88735e1272653ab92","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    with db_api.CONTEXT_WRITER.using(context):"},{"line_number":68,"context_line":"        netseg_obj \u003d network_obj.NetworkSegment.get_object(context,"},{"line_number":69,"context_line":"                                                           id\u003dsegment_id)"},{"line_number":70,"context_line":"        if netseg_obj:"},{"line_number":71,"context_line":"            raise segments_exceptions.SegmentNotFound(segment_id\u003dsegment_id)"},{"line_number":72,"context_line":"        netseg_obj[ml2_api.SEGMENTATION_ID] \u003d segmentation_id"},{"line_number":73,"context_line":"        netseg_obj.update()"}],"source_content_type":"text/x-python","patch_set":15,"id":"5fc1f717_d17d3be7","line":70,"range":{"start_line":70,"start_character":8,"end_line":70,"end_character":22},"in_reply_to":"5fc1f717_3642753f","updated":"2019-03-28 16:01:34.000000000","message":"Really... Sometimes I don\u0027t know what I\u0027m doing.\n\nThis is because I didn\u0027t add a unit test for this function, but seems irrelevant.","commit_id":"6bce3d6837b1d8ddbf168e119776bb0dde3b1ea7"}],"neutron/extensions/providernet.py":[{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"a5362b440cf217debbc9ba8402fb06c8ca4b5932","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from neutron._i18n import _"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"def _raise_if_updates_provider_attributes(attrs):"},{"line_number":25,"context_line":"    \"\"\"Raise exception if provider attributes are present."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    This method is used for plugins that do not support"}],"source_content_type":"text/x-python","patch_set":20,"id":"5fc1f717_94d518e8","side":"PARENT","line":24,"range":{"start_line":24,"start_character":4,"end_line":24,"end_character":41},"updated":"2019-04-02 15:13:42.000000000","message":"Can we move this method?\nIt\u0027s has underscore, so it\u0027s supposed to be internalt but afict it\u0027s used in a few places?\nhttp://codesearch.openstack.org/?q\u003d_raise_if_updates_provider_attributes\u0026i\u003dnope\u0026files\u003d\u0026repos\u003d","commit_id":"c70a935ce7adafa527aab05ceabcd2e1b7837c27"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"66ae99629edec6fe75dcec1b23d9303c9079adbf","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from neutron._i18n import _"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"def _raise_if_updates_provider_attributes(attrs):"},{"line_number":25,"context_line":"    \"\"\"Raise exception if provider attributes are present."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    This method is used for plugins that do not support"}],"source_content_type":"text/x-python","patch_set":20,"id":"5fc1f717_3a443d19","side":"PARENT","line":24,"range":{"start_line":24,"start_character":4,"end_line":24,"end_character":41},"in_reply_to":"5fc1f717_1ebaa2e0","updated":"2019-04-03 08:34:32.000000000","message":"Removed in https://review.openstack.org/#/c/649537/ (still under review)","commit_id":"c70a935ce7adafa527aab05ceabcd2e1b7837c27"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"64e87b61d0b13212d99dff85916f799c64da2ce7","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from neutron._i18n import _"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"def _raise_if_updates_provider_attributes(attrs):"},{"line_number":25,"context_line":"    \"\"\"Raise exception if provider attributes are present."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    This method is used for plugins that do not support"}],"source_content_type":"text/x-python","patch_set":20,"id":"5fc1f717_72b96d13","side":"PARENT","line":24,"range":{"start_line":24,"start_character":4,"end_line":24,"end_character":41},"in_reply_to":"5fc1f717_3a443d19","updated":"2019-04-04 12:21:14.000000000","message":"Patch merged, removed -W","commit_id":"c70a935ce7adafa527aab05ceabcd2e1b7837c27"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"4e27133810316063630348662a49c3d679c5b1ec","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from neutron._i18n import _"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"def _raise_if_updates_provider_attributes(attrs):"},{"line_number":25,"context_line":"    \"\"\"Raise exception if provider attributes are present."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    This method is used for plugins that do not support"}],"source_content_type":"text/x-python","patch_set":20,"id":"5fc1f717_1ebaa2e0","side":"PARENT","line":24,"range":{"start_line":24,"start_character":4,"end_line":24,"end_character":41},"in_reply_to":"5fc1f717_94d518e8","updated":"2019-04-02 17:06:29.000000000","message":"What?? Ok, I\u0027ll submit a patch in vmware_nsx to implement this function in this repo. BTW, this shouldn\u0027t have been done.\n\nThanks for the heads up!","commit_id":"c70a935ce7adafa527aab05ceabcd2e1b7837c27"}],"neutron/plugins/ml2/drivers/mech_agent.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"ae65f12a3959225c000474110aedc50f93a2fc6b","unresolved":false,"context_lines":[{"line_number":366,"context_line":""},{"line_number":367,"context_line":"    @staticmethod"},{"line_number":368,"context_line":"    def provider_network_attribute_updates_supported():"},{"line_number":369,"context_line":"        \"\"\"Returns the provider network parameters that can be updated"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"        Possible values: neutron_lib.api.definitions.provider_net.ATTRIBUTES"},{"line_number":372,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_a9a9167c","line":369,"range":{"start_line":369,"start_character":39,"end_line":369,"end_character":51},"updated":"2019-03-29 06:57:12.000000000","message":"-\u003e attributes","commit_id":"825cc289bbd62b1c7681db72723c2c3e9519b750"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"343d51d829a5fdb2c3a5e2bdaf75d0f617d56835","unresolved":false,"context_lines":[{"line_number":366,"context_line":""},{"line_number":367,"context_line":"    @staticmethod"},{"line_number":368,"context_line":"    def provider_network_attribute_updates_supported():"},{"line_number":369,"context_line":"        \"\"\"Returns the provider network parameters that can be updated"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"        Possible values: neutron_lib.api.definitions.provider_net.ATTRIBUTES"},{"line_number":372,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_168082bf","line":369,"range":{"start_line":369,"start_character":39,"end_line":369,"end_character":51},"in_reply_to":"5fc1f717_a9a9167c","updated":"2019-03-29 14:56:33.000000000","message":"Exactly, those are attributes, not parameters (just follow the function name!!).","commit_id":"825cc289bbd62b1c7681db72723c2c3e9519b750"}],"neutron/plugins/ml2/managers.py":[{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"38faa53018c1eae9e3ed2030bea3d22932bfdc66","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        \"\"\""},{"line_number":220,"context_line":"        segmentation_id \u003d net_data.get(provider.SEGMENTATION_ID)"},{"line_number":221,"context_line":"        network_type \u003d segment[api.NETWORK_TYPE]"},{"line_number":222,"context_line":"        if network_type !\u003d \u0027vlan\u0027 or not segmentation_id:"},{"line_number":223,"context_line":"            msg \u003d (_(\u0027Only VLAN type network segments can be updated. Only %s \u0027"},{"line_number":224,"context_line":"                     \u0027field can be updated\u0027) % api.SEGMENTATION_ID)"},{"line_number":225,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9fdfeff1_4ee8a6b2","line":222,"range":{"start_line":222,"start_character":28,"end_line":222,"end_character":32},"updated":"2019-03-02 17:25:12.000000000","message":"We can use this:\nhttps://github.com/openstack/neutron-lib/blob/master/neutron_lib/constants.py#L290","commit_id":"a08b8b1c7d01dd59f8caf5e38833e80c07078f55"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"308ffcbf59e2c596eca9916b39b32e37e36ef244","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        \"\"\""},{"line_number":220,"context_line":"        segmentation_id \u003d net_data.get(provider.SEGMENTATION_ID)"},{"line_number":221,"context_line":"        network_type \u003d segment[api.NETWORK_TYPE]"},{"line_number":222,"context_line":"        if network_type !\u003d \u0027vlan\u0027 or not segmentation_id:"},{"line_number":223,"context_line":"            msg \u003d (_(\u0027Only VLAN type network segments can be updated. Only %s \u0027"},{"line_number":224,"context_line":"                     \u0027field can be updated\u0027) % api.SEGMENTATION_ID)"},{"line_number":225,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5fc1f717_a6f3219e","line":222,"range":{"start_line":222,"start_character":28,"end_line":222,"end_character":32},"in_reply_to":"9fdfeff1_4ee8a6b2","updated":"2019-03-12 11:22:16.000000000","message":"Done","commit_id":"a08b8b1c7d01dd59f8caf5e38833e80c07078f55"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"38faa53018c1eae9e3ed2030bea3d22932bfdc66","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        segmentation_id \u003d net_data.get(provider.SEGMENTATION_ID)"},{"line_number":221,"context_line":"        network_type \u003d segment[api.NETWORK_TYPE]"},{"line_number":222,"context_line":"        if network_type !\u003d \u0027vlan\u0027 or not segmentation_id:"},{"line_number":223,"context_line":"            msg \u003d (_(\u0027Only VLAN type network segments can be updated. Only %s \u0027"},{"line_number":224,"context_line":"                     \u0027field can be updated\u0027) % api.SEGMENTATION_ID)"},{"line_number":225,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"        new_segment \u003d {api.NETWORK_TYPE: segment[api.NETWORK_TYPE],"}],"source_content_type":"text/x-python","patch_set":8,"id":"9fdfeff1_4e01866a","line":224,"range":{"start_line":223,"start_character":70,"end_line":224,"end_character":66},"updated":"2019-03-02 17:25:12.000000000","message":"Seems a little duplicated to that \u0027network segments\u0027.","commit_id":"a08b8b1c7d01dd59f8caf5e38833e80c07078f55"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"308ffcbf59e2c596eca9916b39b32e37e36ef244","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        segmentation_id \u003d net_data.get(provider.SEGMENTATION_ID)"},{"line_number":221,"context_line":"        network_type \u003d segment[api.NETWORK_TYPE]"},{"line_number":222,"context_line":"        if network_type !\u003d \u0027vlan\u0027 or not segmentation_id:"},{"line_number":223,"context_line":"            msg \u003d (_(\u0027Only VLAN type network segments can be updated. Only %s \u0027"},{"line_number":224,"context_line":"                     \u0027field can be updated\u0027) % api.SEGMENTATION_ID)"},{"line_number":225,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"        new_segment \u003d {api.NETWORK_TYPE: segment[api.NETWORK_TYPE],"}],"source_content_type":"text/x-python","patch_set":8,"id":"5fc1f717_06f55583","line":224,"range":{"start_line":223,"start_character":70,"end_line":224,"end_character":66},"in_reply_to":"9fdfeff1_4e01866a","updated":"2019-03-12 11:22:16.000000000","message":"Well, I think I need to rephrase it.\n\nOnly SEGMENTATION_ID field can be updated in VLAN type network segments.","commit_id":"a08b8b1c7d01dd59f8caf5e38833e80c07078f55"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"cfdd5121a3004e97df3cc01826a36b2a730592ee","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        segmentation_id \u003d net_data.get(provider.SEGMENTATION_ID)"},{"line_number":232,"context_line":"        network_type \u003d segment[api.NETWORK_TYPE]"},{"line_number":233,"context_line":"        if network_type !\u003d constants.TYPE_VLAN or not segmentation_id:"},{"line_number":234,"context_line":"            msg \u003d (_(\u0027Only %s field can be updated in VLAN type networks\u0027) %"},{"line_number":235,"context_line":"                   api.SEGMENTATION_ID)"},{"line_number":236,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":237,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"5fc1f717_00dacf76","line":234,"range":{"start_line":234,"start_character":22,"end_line":234,"end_character":50},"updated":"2019-03-26 01:24:16.000000000","message":"Nit: \"%s can only be updated if segmentation_type is vlan\"","commit_id":"fe93780c4f372d546fcb297f1e5856874b134e8a"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"866a7198bf868f31cb395c7cda696eeb222f8f4c","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        segmentation_id \u003d net_data.get(provider.SEGMENTATION_ID)"},{"line_number":232,"context_line":"        network_type \u003d segment[api.NETWORK_TYPE]"},{"line_number":233,"context_line":"        if network_type !\u003d constants.TYPE_VLAN or not segmentation_id:"},{"line_number":234,"context_line":"            msg \u003d (_(\u0027Only %s field can be updated in VLAN type networks\u0027) %"},{"line_number":235,"context_line":"                   api.SEGMENTATION_ID)"},{"line_number":236,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":237,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"5fc1f717_fe44fbb9","line":234,"range":{"start_line":234,"start_character":22,"end_line":234,"end_character":50},"in_reply_to":"5fc1f717_00dacf76","updated":"2019-03-26 15:44:29.000000000","message":"Done","commit_id":"fe93780c4f372d546fcb297f1e5856874b134e8a"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"cfdd5121a3004e97df3cc01826a36b2a730592ee","unresolved":false,"context_lines":[{"line_number":235,"context_line":"                   api.SEGMENTATION_ID)"},{"line_number":236,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"        new_segment \u003d {api.NETWORK_TYPE: segment[api.NETWORK_TYPE],"},{"line_number":239,"context_line":"                       api.PHYSICAL_NETWORK: segment[api.PHYSICAL_NETWORK],"},{"line_number":240,"context_line":"                       api.SEGMENTATION_ID: segmentation_id}"},{"line_number":241,"context_line":"        self.validate_provider_segment(new_segment)"},{"line_number":242,"context_line":"        new_segment \u003d self.reserve_provider_segment(context, new_segment)"},{"line_number":243,"context_line":"        self._add_network_segment(context, network[\u0027id\u0027], new_segment)"},{"line_number":244,"context_line":"        self.release_network_segment(context, segment)"},{"line_number":245,"context_line":"        segments_db.delete_network_segment(context, segment[\u0027id\u0027])"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"    def reserve_network_segment(self, context, segment_data):"},{"line_number":248,"context_line":"        \"\"\"Call type drivers to reserve a network segment.\"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"5fc1f717_a073bb4d","line":245,"range":{"start_line":238,"start_character":0,"end_line":245,"end_character":66},"updated":"2019-03-26 01:24:16.000000000","message":"Here, we change the segmentation ID by simply removing the segment and creating a new one. This doesn\u0027t seem to handle cases where a subnet is associated to a network segment. I think this will cause us to lose track of the subnet-segment association. I think we also need to be sure to re-create any subnet-segment associations.\n\nhttps://github.com/openstack/neutron/blob/45d2aa844ba43cc27a44d09a83724f7ed01f3ab7/neutron/db/models_v2.py#L160","commit_id":"fe93780c4f372d546fcb297f1e5856874b134e8a"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"866a7198bf868f31cb395c7cda696eeb222f8f4c","unresolved":false,"context_lines":[{"line_number":235,"context_line":"                   api.SEGMENTATION_ID)"},{"line_number":236,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"        new_segment \u003d {api.NETWORK_TYPE: segment[api.NETWORK_TYPE],"},{"line_number":239,"context_line":"                       api.PHYSICAL_NETWORK: segment[api.PHYSICAL_NETWORK],"},{"line_number":240,"context_line":"                       api.SEGMENTATION_ID: segmentation_id}"},{"line_number":241,"context_line":"        self.validate_provider_segment(new_segment)"},{"line_number":242,"context_line":"        new_segment \u003d self.reserve_provider_segment(context, new_segment)"},{"line_number":243,"context_line":"        self._add_network_segment(context, network[\u0027id\u0027], new_segment)"},{"line_number":244,"context_line":"        self.release_network_segment(context, segment)"},{"line_number":245,"context_line":"        segments_db.delete_network_segment(context, segment[\u0027id\u0027])"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"    def reserve_network_segment(self, context, segment_data):"},{"line_number":248,"context_line":"        \"\"\"Call type drivers to reserve a network segment.\"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"5fc1f717_5e3c2f2e","line":245,"range":{"start_line":238,"start_character":0,"end_line":245,"end_character":66},"in_reply_to":"5fc1f717_a073bb4d","updated":"2019-03-26 15:44:29.000000000","message":"You are right. Portbinbdings, subnets and segmenthostmappings will be affected. Instead of delete/create I should modify only the segment_id (if possible)","commit_id":"fe93780c4f372d546fcb297f1e5856874b134e8a"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"ba87b9645bae51c7d617f9f84aec7bb7f054c53a","unresolved":false,"context_lines":[{"line_number":234,"context_line":"        segmentation_id \u003d net_data.get(provider.SEGMENTATION_ID)"},{"line_number":235,"context_line":"        network_type \u003d segment[api.NETWORK_TYPE]"},{"line_number":236,"context_line":"        if network_type !\u003d constants.TYPE_VLAN or not segmentation_id:"},{"line_number":237,"context_line":"            msg \u003d (_(\u0027Only %s field can be updated in VLAN type networks\u0027) %"},{"line_number":238,"context_line":"                   api.SEGMENTATION_ID)"},{"line_number":239,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":240,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"5fc1f717_04e888b0","line":237,"range":{"start_line":237,"start_character":22,"end_line":237,"end_character":72},"updated":"2019-03-27 02:21:59.000000000","message":"nit: I think it will be more clear for users if we raise different error message for these two cases: i) network type is not VLAN, ii) network type is VLAN and field is not segment_id.","commit_id":"43c28072854d2d9a702657f973b0f04ebe91ece9"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"980881a40e2d7c2a8d8af00fb55d8504a3a2198a","unresolved":false,"context_lines":[{"line_number":234,"context_line":"        segmentation_id \u003d net_data.get(provider.SEGMENTATION_ID)"},{"line_number":235,"context_line":"        network_type \u003d segment[api.NETWORK_TYPE]"},{"line_number":236,"context_line":"        if network_type !\u003d constants.TYPE_VLAN or not segmentation_id:"},{"line_number":237,"context_line":"            msg \u003d (_(\u0027Only %s field can be updated in VLAN type networks\u0027) %"},{"line_number":238,"context_line":"                   api.SEGMENTATION_ID)"},{"line_number":239,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":240,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"5fc1f717_69fa77bd","line":237,"range":{"start_line":237,"start_character":22,"end_line":237,"end_character":72},"in_reply_to":"5fc1f717_04e888b0","updated":"2019-03-27 17:35:54.000000000","message":"Done","commit_id":"43c28072854d2d9a702657f973b0f04ebe91ece9"}],"neutron/plugins/ml2/plugin.py":[{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"3da27bd211ca7191905177bf95d29b02d95af34c","unresolved":false,"context_lines":[{"line_number":816,"context_line":""},{"line_number":817,"context_line":"        provider_attrs \u003d (set(provider_net.ATTRIBUTES) -"},{"line_number":818,"context_line":"                          {provider_net.SEGMENTATION_ID})"},{"line_number":819,"context_line":"        if any(validators.is_attr_set(net_data.get(a))"},{"line_number":820,"context_line":"               for a in provider_attrs):"},{"line_number":821,"context_line":"            msg \u003d (_(\u0027Plugin does not support updating the following provider \u0027"},{"line_number":822,"context_line":"                     \u0027attributes: %s\u0027) % \u0027, \u0027.join(provider_attrs))"},{"line_number":823,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":824,"context_line":""},{"line_number":825,"context_line":"    def _delete_objects(self, context, resource, objects):"},{"line_number":826,"context_line":"        delete_op \u003d getattr(self, \u0027delete_%s\u0027 % resource)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9fdfeff1_0b4e906e","line":823,"range":{"start_line":819,"start_character":8,"end_line":823,"end_character":53},"updated":"2019-02-12 09:39:56.000000000","message":"This validation should be done based on the list returned by provider_network_attribute_updates_supported, am I wrong?\n\nBut now that is only defined in SimpleAgentMechanismDriverBase, and returns empty list. (Oversimplification risk: it is defined also in LoggerMechanismDriver and returns [])","commit_id":"33e46bfaa4bd23e103f81f850b49bb332d8e41dc"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"71a20323851bf0292b5a2fb410963ead1121c40c","unresolved":false,"context_lines":[{"line_number":816,"context_line":""},{"line_number":817,"context_line":"        provider_attrs \u003d (set(provider_net.ATTRIBUTES) -"},{"line_number":818,"context_line":"                          {provider_net.SEGMENTATION_ID})"},{"line_number":819,"context_line":"        if any(validators.is_attr_set(net_data.get(a))"},{"line_number":820,"context_line":"               for a in provider_attrs):"},{"line_number":821,"context_line":"            msg \u003d (_(\u0027Plugin does not support updating the following provider \u0027"},{"line_number":822,"context_line":"                     \u0027attributes: %s\u0027) % \u0027, \u0027.join(provider_attrs))"},{"line_number":823,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":824,"context_line":""},{"line_number":825,"context_line":"    def _delete_objects(self, context, resource, objects):"},{"line_number":826,"context_line":"        delete_op \u003d getattr(self, \u0027delete_%s\u0027 % resource)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9fdfeff1_f6ee6820","line":823,"range":{"start_line":819,"start_character":8,"end_line":823,"end_character":53},"in_reply_to":"9fdfeff1_0b4e906e","updated":"2019-02-13 20:16:35.000000000","message":"In a nutshell, what I\u0027m doing in _update_segmentation_id is, for every mech driver, check is SEGMENTATION_ID update is supported:\n- If not, I don\u0027t retrieve the VIF types\n- If yes, I append the VIF types of this mech drivers in the allowed VIF types.\n\nWith this VIF type list, I count the number of ports in this network WITHOUT these types:\n- If there are ports attached to a mech driver which doesn\u0027t support SEGMENTATION_ID \"live\" update --\u003e exception.\n- If there are no ports (that means there are no ports, or the ports are not bound or those ports belong to a mech driver which supports \"live\" update) --\u003e continue","commit_id":"33e46bfaa4bd23e103f81f850b49bb332d8e41dc"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"f0e966e7ffe71ebfc35c53713ec8d56f4ed6733a","unresolved":false,"context_lines":[{"line_number":816,"context_line":""},{"line_number":817,"context_line":"        provider_attrs \u003d (set(provider_net.ATTRIBUTES) -"},{"line_number":818,"context_line":"                          {provider_net.SEGMENTATION_ID})"},{"line_number":819,"context_line":"        if any(validators.is_attr_set(net_data.get(a))"},{"line_number":820,"context_line":"               for a in provider_attrs):"},{"line_number":821,"context_line":"            msg \u003d (_(\u0027Plugin does not support updating the following provider \u0027"},{"line_number":822,"context_line":"                     \u0027attributes: %s\u0027) % \u0027, \u0027.join(provider_attrs))"},{"line_number":823,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":824,"context_line":""},{"line_number":825,"context_line":"    def _delete_objects(self, context, resource, objects):"},{"line_number":826,"context_line":"        delete_op \u003d getattr(self, \u0027delete_%s\u0027 % resource)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9fdfeff1_fca78b08","line":823,"range":{"start_line":819,"start_character":8,"end_line":823,"end_character":53},"in_reply_to":"9fdfeff1_583dffc1","updated":"2019-02-21 17:53:25.000000000","message":"1) A network can have ports in several subnets, attached to several mech drivers. By filtering the ports (L795) I know if I can update or not the segmentation ID. If no ports are attached to a mech driver without this support, there is no harm on updating the segmentation ID.\n\n2) If a mech driver does not support any provider attribute update, it will return an empty list. That means L782-783 won\u0027t validate and the mech driver vif types won\u0027t be added to the list \"vif_types\". Remember we are filtering the ports using:\n  filter_obj \u003d obj_utils.NotIn(vif_types)\nThe goal is to find NO port in L795-796\n\n2.1) If a port belongs to a mech driver supporting segmentation ID update, this port won\u0027t be listed --\u003e OK\n2.2) If a port belongs to a mech driver without this support, it will appears in this port_count() call --\u003e Exception.","commit_id":"33e46bfaa4bd23e103f81f850b49bb332d8e41dc"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"5c47dd75a1453d108dc6777dc61f8ac72841f4b9","unresolved":false,"context_lines":[{"line_number":816,"context_line":""},{"line_number":817,"context_line":"        provider_attrs \u003d (set(provider_net.ATTRIBUTES) -"},{"line_number":818,"context_line":"                          {provider_net.SEGMENTATION_ID})"},{"line_number":819,"context_line":"        if any(validators.is_attr_set(net_data.get(a))"},{"line_number":820,"context_line":"               for a in provider_attrs):"},{"line_number":821,"context_line":"            msg \u003d (_(\u0027Plugin does not support updating the following provider \u0027"},{"line_number":822,"context_line":"                     \u0027attributes: %s\u0027) % \u0027, \u0027.join(provider_attrs))"},{"line_number":823,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":824,"context_line":""},{"line_number":825,"context_line":"    def _delete_objects(self, context, resource, objects):"},{"line_number":826,"context_line":"        delete_op \u003d getattr(self, \u0027delete_%s\u0027 % resource)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9fdfeff1_583dffc1","line":823,"range":{"start_line":819,"start_character":8,"end_line":823,"end_character":53},"in_reply_to":"9fdfeff1_f6ee6820","updated":"2019-02-15 07:37:40.000000000","message":"I think I got it.\nMy only notes or questions are the following:\n\n* I would call update_segementation_id only if the mech_driver supports the update of segmentation ids, deciding by the call of provider_network_attribute_updates_supported, and checking if provider_net.SEGMENTATION_ID is in the returned list (now this check is in l783). Perhaps I misunderstood something.\n\n* provider_network_attribute_updates_supported returns empty list now for all cases so the above condition will be evaluated to false anyway.","commit_id":"33e46bfaa4bd23e103f81f850b49bb332d8e41dc"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"fa0e69f0a68f0d66bd3ea5f4f9d39f28c27d364b","unresolved":false,"context_lines":[{"line_number":816,"context_line":""},{"line_number":817,"context_line":"        provider_attrs \u003d (set(provider_net.ATTRIBUTES) -"},{"line_number":818,"context_line":"                          {provider_net.SEGMENTATION_ID})"},{"line_number":819,"context_line":"        if any(validators.is_attr_set(net_data.get(a))"},{"line_number":820,"context_line":"               for a in provider_attrs):"},{"line_number":821,"context_line":"            msg \u003d (_(\u0027Plugin does not support updating the following provider \u0027"},{"line_number":822,"context_line":"                     \u0027attributes: %s\u0027) % \u0027, \u0027.join(provider_attrs))"},{"line_number":823,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":824,"context_line":""},{"line_number":825,"context_line":"    def _delete_objects(self, context, resource, objects):"},{"line_number":826,"context_line":"        delete_op \u003d getattr(self, \u0027delete_%s\u0027 % resource)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9fdfeff1_8c8ba41c","line":823,"range":{"start_line":819,"start_character":8,"end_line":823,"end_character":53},"in_reply_to":"9fdfeff1_fca78b08","updated":"2019-02-22 09:07:53.000000000","message":"thanks, I think I understand this part as well.","commit_id":"33e46bfaa4bd23e103f81f850b49bb332d8e41dc"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"ba87b9645bae51c7d617f9f84aec7bb7f054c53a","unresolved":false,"context_lines":[{"line_number":175,"context_line":"    __filter_validation_support \u003d True"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    # List of supported extensions"},{"line_number":178,"context_line":"    _supported_extension_aliases \u003d [provider_net.ALIAS,"},{"line_number":179,"context_line":"                                    external_net.ALIAS, portbindings.ALIAS,"},{"line_number":180,"context_line":"                                    \"quotas\", \"security-group\","},{"line_number":181,"context_line":"                                    rbac_sg_apidef.ALIAS,"}],"source_content_type":"text/x-python","patch_set":13,"id":"5fc1f717_84ec78bb","line":178,"range":{"start_line":178,"start_character":4,"end_line":178,"end_character":32},"updated":"2019-03-27 02:21:59.000000000","message":"Should we introduce an API extension to indicate this feature?","commit_id":"43c28072854d2d9a702657f973b0f04ebe91ece9"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"980881a40e2d7c2a8d8af00fb55d8504a3a2198a","unresolved":false,"context_lines":[{"line_number":175,"context_line":"    __filter_validation_support \u003d True"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    # List of supported extensions"},{"line_number":178,"context_line":"    _supported_extension_aliases \u003d [provider_net.ALIAS,"},{"line_number":179,"context_line":"                                    external_net.ALIAS, portbindings.ALIAS,"},{"line_number":180,"context_line":"                                    \"quotas\", \"security-group\","},{"line_number":181,"context_line":"                                    rbac_sg_apidef.ALIAS,"}],"source_content_type":"text/x-python","patch_set":13,"id":"5fc1f717_c99febff","line":178,"range":{"start_line":178,"start_character":4,"end_line":178,"end_character":32},"in_reply_to":"5fc1f717_84ec78bb","updated":"2019-03-27 17:35:54.000000000","message":"Currently the API supports this feature. Is the server which blocks it. We don\u0027t need any API change (happily) and even the OSclient supports it.","commit_id":"43c28072854d2d9a702657f973b0f04ebe91ece9"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"ba87b9645bae51c7d617f9f84aec7bb7f054c53a","unresolved":false,"context_lines":[{"line_number":803,"context_line":"            context, [network[\u0027id\u0027]])[network[\u0027id\u0027]]"},{"line_number":804,"context_line":"        if len(segments) \u003e 1:"},{"line_number":805,"context_line":"            msg \u003d _(\u0027Provider attributes can be updated only in single \u0027"},{"line_number":806,"context_line":"                    \u0027provider networks\u0027)"},{"line_number":807,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":808,"context_line":""},{"line_number":809,"context_line":"        vif_types \u003d [portbindings.VIF_TYPE_UNBOUND,"}],"source_content_type":"text/x-python","patch_set":13,"id":"5fc1f717_e4321c5e","line":806,"range":{"start_line":806,"start_character":30,"end_line":806,"end_character":38},"updated":"2019-03-27 02:21:59.000000000","message":"network (no \u0027s\u0027)","commit_id":"43c28072854d2d9a702657f973b0f04ebe91ece9"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"980881a40e2d7c2a8d8af00fb55d8504a3a2198a","unresolved":false,"context_lines":[{"line_number":803,"context_line":"            context, [network[\u0027id\u0027]])[network[\u0027id\u0027]]"},{"line_number":804,"context_line":"        if len(segments) \u003e 1:"},{"line_number":805,"context_line":"            msg \u003d _(\u0027Provider attributes can be updated only in single \u0027"},{"line_number":806,"context_line":"                    \u0027provider networks\u0027)"},{"line_number":807,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":808,"context_line":""},{"line_number":809,"context_line":"        vif_types \u003d [portbindings.VIF_TYPE_UNBOUND,"}],"source_content_type":"text/x-python","patch_set":13,"id":"5fc1f717_09517336","line":806,"range":{"start_line":806,"start_character":30,"end_line":806,"end_character":38},"in_reply_to":"5fc1f717_e4321c5e","updated":"2019-03-27 17:35:54.000000000","message":"Uhmmm I would like another opinion on this hehehe.\n\nI think this phrase is correct because it\u0027s true that those parameters can be updated only in ANY single provider network.","commit_id":"43c28072854d2d9a702657f973b0f04ebe91ece9"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"ae65f12a3959225c000474110aedc50f93a2fc6b","unresolved":false,"context_lines":[{"line_number":802,"context_line":"        segments \u003d segments_db.get_networks_segments("},{"line_number":803,"context_line":"            context, [network[\u0027id\u0027]])[network[\u0027id\u0027]]"},{"line_number":804,"context_line":"        if len(segments) \u003e 1:"},{"line_number":805,"context_line":"            msg \u003d _(\u0027Provider attributes can be updated only in single \u0027"},{"line_number":806,"context_line":"                    \u0027provider networks\u0027)"},{"line_number":807,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":808,"context_line":""},{"line_number":809,"context_line":"        vif_types \u003d [portbindings.VIF_TYPE_UNBOUND,"}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_893bfa99","line":806,"range":{"start_line":805,"start_character":63,"end_line":806,"end_character":38},"updated":"2019-03-29 06:57:12.000000000","message":"\"single provider networks\" is not clear. How about \"provider networks with a single segment\"?","commit_id":"825cc289bbd62b1c7681db72723c2c3e9519b750"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"343d51d829a5fdb2c3a5e2bdaf75d0f617d56835","unresolved":false,"context_lines":[{"line_number":802,"context_line":"        segments \u003d segments_db.get_networks_segments("},{"line_number":803,"context_line":"            context, [network[\u0027id\u0027]])[network[\u0027id\u0027]]"},{"line_number":804,"context_line":"        if len(segments) \u003e 1:"},{"line_number":805,"context_line":"            msg \u003d _(\u0027Provider attributes can be updated only in single \u0027"},{"line_number":806,"context_line":"                    \u0027provider networks\u0027)"},{"line_number":807,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":808,"context_line":""},{"line_number":809,"context_line":"        vif_types \u003d [portbindings.VIF_TYPE_UNBOUND,"}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_365ede76","line":806,"range":{"start_line":805,"start_character":63,"end_line":806,"end_character":38},"in_reply_to":"5fc1f717_893bfa99","updated":"2019-03-29 14:56:33.000000000","message":"That\u0027s better","commit_id":"825cc289bbd62b1c7681db72723c2c3e9519b750"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"ae65f12a3959225c000474110aedc50f93a2fc6b","unresolved":false,"context_lines":[{"line_number":810,"context_line":"                     portbindings.VIF_TYPE_BINDING_FAILED]"},{"line_number":811,"context_line":"        for mech_driver in self.mechanism_manager.ordered_mech_drivers:"},{"line_number":812,"context_line":"            if (provider_net.SEGMENTATION_ID in mech_driver.obj."},{"line_number":813,"context_line":"                    provider_network_attribute_updates_supported()):"},{"line_number":814,"context_line":"                agent_type \u003d mech_driver.obj.agent_type"},{"line_number":815,"context_line":"                agents \u003d self.get_agents(context,"},{"line_number":816,"context_line":"                                         filters\u003d{\u0027agent_type\u0027: [agent_type]})"}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_4999926a","line":813,"range":{"start_line":813,"start_character":20,"end_line":813,"end_character":46},"updated":"2019-03-29 06:57:12.000000000","message":"In other places, \"provider attribute\" is used in the code base, but this is provider_network_attribute. Consistency on naming would be nice.\n\nPersonally I prefer to \"provider network attribute\" particularly in log messages...","commit_id":"825cc289bbd62b1c7681db72723c2c3e9519b750"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"343d51d829a5fdb2c3a5e2bdaf75d0f617d56835","unresolved":false,"context_lines":[{"line_number":810,"context_line":"                     portbindings.VIF_TYPE_BINDING_FAILED]"},{"line_number":811,"context_line":"        for mech_driver in self.mechanism_manager.ordered_mech_drivers:"},{"line_number":812,"context_line":"            if (provider_net.SEGMENTATION_ID in mech_driver.obj."},{"line_number":813,"context_line":"                    provider_network_attribute_updates_supported()):"},{"line_number":814,"context_line":"                agent_type \u003d mech_driver.obj.agent_type"},{"line_number":815,"context_line":"                agents \u003d self.get_agents(context,"},{"line_number":816,"context_line":"                                         filters\u003d{\u0027agent_type\u0027: [agent_type]})"}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_366fbefd","line":813,"range":{"start_line":813,"start_character":20,"end_line":813,"end_character":46},"in_reply_to":"5fc1f717_4999926a","updated":"2019-03-29 14:56:33.000000000","message":"I\u0027ll change the log message.","commit_id":"825cc289bbd62b1c7681db72723c2c3e9519b750"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"ae65f12a3959225c000474110aedc50f93a2fc6b","unresolved":false,"context_lines":[{"line_number":820,"context_line":""},{"line_number":821,"context_line":"        filter_obj \u003d obj_utils.NotIn(vif_types)"},{"line_number":822,"context_line":"        filters \u003d {portbindings.VIF_TYPE:"},{"line_number":823,"context_line":"                   filter_obj.filter(models.PortBinding.vif_type),"},{"line_number":824,"context_line":"                   \u0027network_id\u0027: [network[\u0027id\u0027]]}"},{"line_number":825,"context_line":"        if super(Ml2Plugin, self).get_ports_count(context,"},{"line_number":826,"context_line":"                                                  filters\u003dfilters):"}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_8909badd","line":823,"range":{"start_line":823,"start_character":19,"end_line":823,"end_character":66},"updated":"2019-03-29 06:57:12.000000000","message":"This just constructs sqlalchemy filter. Why do we need to construct a filter using object_utils.\nI think models.PortBindings.vif_type.in_(vif_types) looks enough.","commit_id":"825cc289bbd62b1c7681db72723c2c3e9519b750"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"343d51d829a5fdb2c3a5e2bdaf75d0f617d56835","unresolved":false,"context_lines":[{"line_number":820,"context_line":""},{"line_number":821,"context_line":"        filter_obj \u003d obj_utils.NotIn(vif_types)"},{"line_number":822,"context_line":"        filters \u003d {portbindings.VIF_TYPE:"},{"line_number":823,"context_line":"                   filter_obj.filter(models.PortBinding.vif_type),"},{"line_number":824,"context_line":"                   \u0027network_id\u0027: [network[\u0027id\u0027]]}"},{"line_number":825,"context_line":"        if super(Ml2Plugin, self).get_ports_count(context,"},{"line_number":826,"context_line":"                                                  filters\u003dfilters):"}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_76c0e6e1","line":823,"range":{"start_line":823,"start_character":19,"end_line":823,"end_character":66},"in_reply_to":"5fc1f717_8909badd","updated":"2019-03-29 14:56:33.000000000","message":"But here what I need is just the opposite: those port_bindings with vif_type NOT IN (vif_types). That\u0027s why I\u0027m using this utility function implemented in [1]\n\n[1] https://review.openstack.org/#/c/609847/","commit_id":"825cc289bbd62b1c7681db72723c2c3e9519b750"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"ae65f12a3959225c000474110aedc50f93a2fc6b","unresolved":false,"context_lines":[{"line_number":833,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":834,"context_line":""},{"line_number":835,"context_line":"        self.type_manager.update_network_segment(context, network,"},{"line_number":836,"context_line":"                                                 net_data, segments[0])"},{"line_number":837,"context_line":""},{"line_number":838,"context_line":"    def _update_provider_attributes(self, context, network, net_data):"},{"line_number":839,"context_line":"        \"\"\"Raise exception if provider attributes update are not supported."}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_a9c6f666","line":836,"updated":"2019-03-29 06:57:12.000000000","message":"(note) When reading this method, the method name says \"update\" but almost all logic is for validation. I am surprised a bit. _validate_xxx method sounds better, but it is up to you.","commit_id":"825cc289bbd62b1c7681db72723c2c3e9519b750"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"343d51d829a5fdb2c3a5e2bdaf75d0f617d56835","unresolved":false,"context_lines":[{"line_number":833,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":834,"context_line":""},{"line_number":835,"context_line":"        self.type_manager.update_network_segment(context, network,"},{"line_number":836,"context_line":"                                                 net_data, segments[0])"},{"line_number":837,"context_line":""},{"line_number":838,"context_line":"    def _update_provider_attributes(self, context, network, net_data):"},{"line_number":839,"context_line":"        \"\"\"Raise exception if provider attributes update are not supported."}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_163882ec","line":836,"in_reply_to":"5fc1f717_a9c6f666","updated":"2019-03-29 14:56:33.000000000","message":"Yes, most of the logic is spent on validating the new network segment, but eventually we execute: \n\nself._update_network_segment(context, segment[\u0027id\u0027], segmentation_id)\n\nThis is the key point. I think this name is correct.","commit_id":"825cc289bbd62b1c7681db72723c2c3e9519b750"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"11e47ab288f9304e19818e4c2d18db7b68743cee","unresolved":false,"context_lines":[{"line_number":824,"context_line":"                   \u0027network_id\u0027: [network[\u0027id\u0027]]}"},{"line_number":825,"context_line":"        if super(Ml2Plugin, self).get_ports_count(context,"},{"line_number":826,"context_line":"                                                  filters\u003dfilters):"},{"line_number":827,"context_line":"            msg \u003d (_(\u0027Provider attribute %(attr)s cannot be updated if any \u0027"},{"line_number":828,"context_line":"                     \u0027port in the network has not the following \u0027"},{"line_number":829,"context_line":"                     \u0027%(vif_field)s: %(vif_types)s\u0027) %"},{"line_number":830,"context_line":"                   {\u0027attr\u0027: provider_net.SEGMENTATION_ID,"}],"source_content_type":"text/x-python","patch_set":17,"id":"5fc1f717_2acadd6d","line":827,"range":{"start_line":827,"start_character":22,"end_line":827,"end_character":40},"updated":"2019-04-01 04:51:15.000000000","message":"I still see \"provider attribute\" in several places. Could you check it throughout this file?","commit_id":"f60f0b26599ffe99bba7708c3ce2317a4e660391"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"0f6874593857d9f2c0ebf6e790eddb50f277e44e","unresolved":false,"context_lines":[{"line_number":824,"context_line":"                   \u0027network_id\u0027: [network[\u0027id\u0027]]}"},{"line_number":825,"context_line":"        if super(Ml2Plugin, self).get_ports_count(context,"},{"line_number":826,"context_line":"                                                  filters\u003dfilters):"},{"line_number":827,"context_line":"            msg \u003d (_(\u0027Provider attribute %(attr)s cannot be updated if any \u0027"},{"line_number":828,"context_line":"                     \u0027port in the network has not the following \u0027"},{"line_number":829,"context_line":"                     \u0027%(vif_field)s: %(vif_types)s\u0027) %"},{"line_number":830,"context_line":"                   {\u0027attr\u0027: provider_net.SEGMENTATION_ID,"}],"source_content_type":"text/x-python","patch_set":17,"id":"5fc1f717_9028e4ee","line":827,"range":{"start_line":827,"start_character":22,"end_line":827,"end_character":40},"in_reply_to":"5fc1f717_2acadd6d","updated":"2019-04-01 09:19:21.000000000","message":"Done","commit_id":"f60f0b26599ffe99bba7708c3ce2317a4e660391"}],"neutron/tests/unit/plugins/ml2/test_plugin.py":[{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"104ed3c65bd49cb8de6fd34e593858ccd65962cc","unresolved":false,"context_lines":[{"line_number":476,"context_line":"                mock_get_ports_count.return_value \u003d 0"},{"line_number":477,"context_line":"                net_data \u003d {pnet.SEGMENTATION_ID: 1000}"},{"line_number":478,"context_line":"                plugin._update_segmentation_id(self.context, net[\u0027network\u0027],"},{"line_number":479,"context_line":"                                               net_data)"},{"line_number":480,"context_line":""},{"line_number":481,"context_line":""},{"line_number":482,"context_line":"class TestExternalNetwork(Ml2PluginV2TestCase):"}],"source_content_type":"text/x-python","patch_set":13,"id":"5fc1f717_6fb60541","line":479,"updated":"2019-03-27 03:05:08.000000000","message":"It seems all the test cases above is for the case that provider_network_attribute_updates_supported return empty list. Could we have a test case that verify the case that provider_network_attribute_updates_supported return a non-empty list?","commit_id":"43c28072854d2d9a702657f973b0f04ebe91ece9"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"980881a40e2d7c2a8d8af00fb55d8504a3a2198a","unresolved":false,"context_lines":[{"line_number":476,"context_line":"                mock_get_ports_count.return_value \u003d 0"},{"line_number":477,"context_line":"                net_data \u003d {pnet.SEGMENTATION_ID: 1000}"},{"line_number":478,"context_line":"                plugin._update_segmentation_id(self.context, net[\u0027network\u0027],"},{"line_number":479,"context_line":"                                               net_data)"},{"line_number":480,"context_line":""},{"line_number":481,"context_line":""},{"line_number":482,"context_line":"class TestExternalNetwork(Ml2PluginV2TestCase):"}],"source_content_type":"text/x-python","patch_set":13,"id":"5fc1f717_5d0f3536","line":479,"in_reply_to":"5fc1f717_6fb60541","updated":"2019-03-27 17:35:54.000000000","message":"Actually you are right. I\u0027ll add this condition in this test.","commit_id":"43c28072854d2d9a702657f973b0f04ebe91ece9"}]}
