)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"4ef3e2d785b646f54fe4ebc3930f09cb35ffa81f","unresolved":false,"context_lines":[{"line_number":13,"context_line":" - implement bindings support to OSC plugin"},{"line_number":14,"context_line":" - implement API tests"},{"line_number":15,"context_line":" - implement validators for negative scenarios"},{"line_number":16,"context_line":" - implement ML2 core extension"},{"line_number":17,"context_line":" - implement support for ML2 plugin to handle only active bindings"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Co-Authored-By: Jakub Libosvar \u003clibosvar@redhat.com\u003e"},{"line_number":20,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":27,"id":"df140735_60cd9bb5","line":17,"range":{"start_line":16,"start_character":0,"end_line":17,"end_character":66},"updated":"2017-06-06 08:34:23.000000000","message":"how do you plan to make this service plugin communicate with ML2?","commit_id":"68f2182c3f2512f966b8940904fbe2b4cd3dcb67"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"dc571bbf33b6611d8f505e7879f6194592407a0f","unresolved":false,"context_lines":[{"line_number":13,"context_line":" - implement bindings support to OSC plugin"},{"line_number":14,"context_line":" - implement API tests"},{"line_number":15,"context_line":" - implement validators for negative scenarios"},{"line_number":16,"context_line":" - implement ML2 core extension"},{"line_number":17,"context_line":" - implement support for ML2 plugin to handle only active bindings"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Co-Authored-By: Jakub Libosvar \u003clibosvar@redhat.com\u003e"},{"line_number":20,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":27,"id":"7f231b9d_6b372ce5","line":17,"range":{"start_line":16,"start_character":0,"end_line":17,"end_character":66},"in_reply_to":"df140735_60cd9bb5","updated":"2017-06-14 12:14:05.000000000","message":"The API layer wil be handled by the ML2 core extension. The ML2 plugin  will have code that handles only port binding in ACTIVE state. The state is there no matter whether service plugin is loaded and defaults to ACTIVE. So there won\u0027t be any interaction between service plugin and core plugin.","commit_id":"68f2182c3f2512f966b8940904fbe2b4cd3dcb67"}],"neutron/agent/rpc.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"87dc356cd8c584161409021bbf6b34151369c059","unresolved":false,"context_lines":[{"line_number":241,"context_line":"        mac_addr \u003d str(netaddr.EUI(str(port_obj.mac_address),"},{"line_number":242,"context_line":"                                   dialect\u003dnetaddr.mac_unix_expanded))"},{"line_number":243,"context_line":"        binding \u003d utils.get_port_binding_by_status_and_host("},{"line_number":244,"context_line":"            port_obj.binding, constants.ACTIVE)"},{"line_number":245,"context_line":"        entry \u003d {"},{"line_number":246,"context_line":"            \u0027device\u0027: device,"},{"line_number":247,"context_line":"            \u0027network_id\u0027: port_obj.network_id,"}],"source_content_type":"text/x-python","patch_set":64,"id":"5f7c97a3_ca060a53","line":244,"range":{"start_line":244,"start_character":12,"end_line":244,"end_character":28},"updated":"2018-05-14 20:47:45.000000000","message":"made me wonder why we choose from a single binding. of course it\u0027s not single, it\u0027s a list. I understand we may not easily change it in the model definition, but maybe you could do:\n\nbindings \u003d port_obj.binding  # it\u0027s really a list\nbinding \u003d get_port_binding_by_status_and_host(bindings, ...)","commit_id":"076573cd16d4572c9cff5ae069034c0434340e85"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"5694dcef1da145959278ed17ff861742aa91eeac","unresolved":false,"context_lines":[{"line_number":241,"context_line":"        mac_addr \u003d str(netaddr.EUI(str(port_obj.mac_address),"},{"line_number":242,"context_line":"                                   dialect\u003dnetaddr.mac_unix_expanded))"},{"line_number":243,"context_line":"        binding \u003d utils.get_port_binding_by_status_and_host("},{"line_number":244,"context_line":"            port_obj.binding, constants.ACTIVE)"},{"line_number":245,"context_line":"        entry \u003d {"},{"line_number":246,"context_line":"            \u0027device\u0027: device,"},{"line_number":247,"context_line":"            \u0027network_id\u0027: port_obj.network_id,"}],"source_content_type":"text/x-python","patch_set":64,"id":"5f7c97a3_bb672fb8","line":244,"range":{"start_line":244,"start_character":12,"end_line":244,"end_character":28},"in_reply_to":"5f7c97a3_ca060a53","updated":"2018-06-03 22:17:36.000000000","message":"Taken care of by https://review.openstack.org/#/c/571041, which depends on this patch","commit_id":"076573cd16d4572c9cff5ae069034c0434340e85"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"b87a82f081acb641e4ed9e2cbc3aea114812a7de","unresolved":false,"context_lines":[{"line_number":241,"context_line":"        mac_addr \u003d str(netaddr.EUI(str(port_obj.mac_address),"},{"line_number":242,"context_line":"                                   dialect\u003dnetaddr.mac_unix_expanded))"},{"line_number":243,"context_line":"        binding \u003d utils.get_port_binding_by_status_and_host("},{"line_number":244,"context_line":"            port_obj.binding, constants.ACTIVE)"},{"line_number":245,"context_line":"        entry \u003d {"},{"line_number":246,"context_line":"            \u0027device\u0027: device,"},{"line_number":247,"context_line":"            \u0027network_id\u0027: port_obj.network_id,"}],"source_content_type":"text/x-python","patch_set":73,"id":"5f7c97a3_62c3113b","line":244,"updated":"2018-07-11 19:00:25.000000000","message":"The docstring for this is \"If no binding is found with the specified status and host, None is returned\"...","commit_id":"7897f395ef463967bad0a7fd4fd27ab9ddc3ed7e"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"b76e90cb1ba69804a74d8d9374037565e10c32a2","unresolved":false,"context_lines":[{"line_number":241,"context_line":"        mac_addr \u003d str(netaddr.EUI(str(port_obj.mac_address),"},{"line_number":242,"context_line":"                                   dialect\u003dnetaddr.mac_unix_expanded))"},{"line_number":243,"context_line":"        binding \u003d utils.get_port_binding_by_status_and_host("},{"line_number":244,"context_line":"            port_obj.binding, constants.ACTIVE)"},{"line_number":245,"context_line":"        entry \u003d {"},{"line_number":246,"context_line":"            \u0027device\u0027: device,"},{"line_number":247,"context_line":"            \u0027network_id\u0027: port_obj.network_id,"}],"source_content_type":"text/x-python","patch_set":73,"id":"5f7c97a3_60474e7c","line":244,"in_reply_to":"5f7c97a3_5c2b3fe9","updated":"2018-07-13 23:15:16.000000000","message":"Fixed per conversation at https://review.openstack.org/#/c/414251/73/neutron/plugins/ml2/plugin.py@1586","commit_id":"7897f395ef463967bad0a7fd4fd27ab9ddc3ed7e"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"93f594aaad580467487baa3e7f4b5795637eec7b","unresolved":false,"context_lines":[{"line_number":241,"context_line":"        mac_addr \u003d str(netaddr.EUI(str(port_obj.mac_address),"},{"line_number":242,"context_line":"                                   dialect\u003dnetaddr.mac_unix_expanded))"},{"line_number":243,"context_line":"        binding \u003d utils.get_port_binding_by_status_and_host("},{"line_number":244,"context_line":"            port_obj.binding, constants.ACTIVE)"},{"line_number":245,"context_line":"        entry \u003d {"},{"line_number":246,"context_line":"            \u0027device\u0027: device,"},{"line_number":247,"context_line":"            \u0027network_id\u0027: port_obj.network_id,"}],"source_content_type":"text/x-python","patch_set":73,"id":"5f7c97a3_5c2b3fe9","line":244,"in_reply_to":"5f7c97a3_62c3113b","updated":"2018-07-12 17:41:04.000000000","message":"Please see response to https://review.openstack.org/#/c/414251/73/neutron/plugins/ml2/plugin.py@1586","commit_id":"7897f395ef463967bad0a7fd4fd27ab9ddc3ed7e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"b87a82f081acb641e4ed9e2cbc3aea114812a7de","unresolved":false,"context_lines":[{"line_number":262,"context_line":"                                             \u0027port_security_enabled\u0027, True),"},{"line_number":263,"context_line":"            \u0027qos_policy_id\u0027: port_obj.qos_policy_id,"},{"line_number":264,"context_line":"            \u0027network_qos_policy_id\u0027: net_qos_policy_id,"},{"line_number":265,"context_line":"            \u0027profile\u0027: binding.profile,"},{"line_number":266,"context_line":"            \u0027security_groups\u0027: list(port_obj.security_group_ids)"},{"line_number":267,"context_line":"        }"},{"line_number":268,"context_line":"        LOG.debug(\"Returning: %s\", entry)"}],"source_content_type":"text/x-python","patch_set":73,"id":"5f7c97a3_22bd19b1","line":265,"updated":"2018-07-11 19:00:25.000000000","message":"...so this could throw an AttributeError.  Perhaps:\n\nbinding.profile if binding else None","commit_id":"7897f395ef463967bad0a7fd4fd27ab9ddc3ed7e"}],"neutron/common/constants.py":[{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"18a73124d1b34b935b686b633f1590486f9c7ff7","unresolved":false,"context_lines":[{"line_number":165,"context_line":"PORT_BINDING_STATUS_INACTIVE \u003d \u0027INACTIVE\u0027"},{"line_number":166,"context_line":"PORT_BINDING_STATUSES \u003d (PORT_BINDING_STATUS_ACTIVE,"},{"line_number":167,"context_line":"                         PORT_BINDING_STATUS_INACTIVE)"},{"line_number":168,"context_line":"MAX_BINDING \u003d 2"},{"line_number":169,"context_line":"MIN_BINDING \u003d 1"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a30ddce_55ef6be8","line":168,"range":{"start_line":168,"start_character":0,"end_line":168,"end_character":11},"updated":"2017-03-10 07:54:24.000000000","message":"hmmm, this is only for compute bindings, right? so what about MAX_COMPUTE_BINDING? or similar?","commit_id":"b561ec69438ea815ce8356984bfdd0a4206b3435"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"d6cd568f58ebf64dfa9f0d16eef8733e06b11c29","unresolved":false,"context_lines":[{"line_number":165,"context_line":"PORT_BINDING_STATUS_INACTIVE \u003d \u0027INACTIVE\u0027"},{"line_number":166,"context_line":"PORT_BINDING_STATUSES \u003d (PORT_BINDING_STATUS_ACTIVE,"},{"line_number":167,"context_line":"                         PORT_BINDING_STATUS_INACTIVE)"},{"line_number":168,"context_line":"MAX_BINDING \u003d 2"},{"line_number":169,"context_line":"MIN_BINDING \u003d 1"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a1ced50_c02111b6","line":168,"range":{"start_line":168,"start_character":0,"end_line":168,"end_character":11},"in_reply_to":"9a30ddce_55ef6be8","updated":"2017-03-21 03:14:41.000000000","message":"Done","commit_id":"b561ec69438ea815ce8356984bfdd0a4206b3435"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ffec4ba7a684de61b488d31825f3e3c25028464d","unresolved":false,"context_lines":[{"line_number":232,"context_line":"MIN_COMPUTE_BINDING \u003d 1"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"# Port binding status values"},{"line_number":235,"context_line":"PORT_BINDING_STATUS_ACTIVE \u003d lib_constants.ACTIVE"},{"line_number":236,"context_line":"PORT_BINDING_STATUS_INACTIVE \u003d lib_constants.INACTIVE"}],"source_content_type":"text/x-python","patch_set":57,"id":"bf659307_7e2b6cea","line":235,"updated":"2018-03-27 21:33:47.000000000","message":"why do we need to add those proxies and not just use them from the library?","commit_id":"1a686ead1aa00b9707795c45db348a18645d7ab0"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"3ec46b55b02480cd58190ae7e837722b21e7e185","unresolved":false,"context_lines":[{"line_number":232,"context_line":"MIN_COMPUTE_BINDING \u003d 1"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"# Port binding status values"},{"line_number":235,"context_line":"PORT_BINDING_STATUS_ACTIVE \u003d lib_constants.ACTIVE"},{"line_number":236,"context_line":"PORT_BINDING_STATUS_INACTIVE \u003d lib_constants.INACTIVE"}],"source_content_type":"text/x-python","patch_set":57,"id":"bf659307_ae17e8a3","line":235,"in_reply_to":"bf659307_7e2b6cea","updated":"2018-04-05 04:45:57.000000000","message":"Removed. Using the ones from the library directly","commit_id":"1a686ead1aa00b9707795c45db348a18645d7ab0"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"e886bbfe2cdca34435e4771d74b413f8b8c52f44","unresolved":false,"context_lines":[{"line_number":227,"context_line":""},{"line_number":228,"context_line":"# Max/min values how many bindings to hosts can one port binding have"},{"line_number":229,"context_line":"MAX_COMPUTE_BINDING \u003d 2"},{"line_number":230,"context_line":"MIN_COMPUTE_BINDING \u003d 1"}],"source_content_type":"text/x-python","patch_set":59,"id":"bf659307_41bcafba","line":230,"updated":"2018-04-07 20:40:25.000000000","message":"nitty nit: shouldn\u0027t be MAX/MIN_COMPUTE_BINDINGS ?","commit_id":"85c348508217e763c637ed9d4db36da201b824a1"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"90ff9c599038d74abb33de2cab0bd5fa5bb11e39","unresolved":false,"context_lines":[{"line_number":227,"context_line":""},{"line_number":228,"context_line":"# Max/min values how many bindings to hosts can one port binding have"},{"line_number":229,"context_line":"MAX_COMPUTE_BINDING \u003d 2"},{"line_number":230,"context_line":"MIN_COMPUTE_BINDING \u003d 1"}],"source_content_type":"text/x-python","patch_set":59,"id":"5f7c97a3_3b788828","line":230,"in_reply_to":"bf659307_41bcafba","updated":"2018-05-09 21:57:09.000000000","message":"Done","commit_id":"85c348508217e763c637ed9d4db36da201b824a1"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"87dc356cd8c584161409021bbf6b34151369c059","unresolved":false,"context_lines":[{"line_number":229,"context_line":"IEC_BASE \u003d 1024"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"# Max/min values how many bindings to hosts can one port binding have"},{"line_number":232,"context_line":"MAX_COMPUTE_BINDING \u003d 2"},{"line_number":233,"context_line":"MIN_COMPUTE_BINDING \u003d 1"}],"source_content_type":"text/x-python","patch_set":61,"id":"9f6a8fd7_3272ab7c","line":232,"updated":"2018-05-14 20:47:45.000000000","message":"there was a comment from Slawek that made sense, suggesting that the names here should be MAX|MIN_COMPUTE_BINDING*S*","commit_id":"a59e45da0c35196bd83e03f13a477c2c802db861"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"537155ae677ddb891932ff7d7d4f272b7aab4526","unresolved":false,"context_lines":[{"line_number":229,"context_line":"IEC_BASE \u003d 1024"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"# Max/min values how many bindings to hosts can one port binding have"},{"line_number":232,"context_line":"MAX_COMPUTE_BINDING \u003d 2"},{"line_number":233,"context_line":"MIN_COMPUTE_BINDING \u003d 1"}],"source_content_type":"text/x-python","patch_set":61,"id":"5f7c97a3_65cda92f","line":232,"in_reply_to":"9f6a8fd7_3272ab7c","updated":"2018-05-14 20:48:14.000000000","message":"Disregard, it\u0027s already handled.","commit_id":"a59e45da0c35196bd83e03f13a477c2c802db861"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"87dc356cd8c584161409021bbf6b34151369c059","unresolved":false,"context_lines":[{"line_number":229,"context_line":"IEC_BASE \u003d 1024"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"# Max/min values how many bindings to hosts can one port binding have"},{"line_number":232,"context_line":"MAX_COMPUTE_BINDINGS \u003d 2"},{"line_number":233,"context_line":"MIN_COMPUTE_BINDINGS \u003d 1"}],"source_content_type":"text/x-python","patch_set":64,"id":"5f7c97a3_2a169e56","line":232,"updated":"2018-05-14 20:47:45.000000000","message":"I am actually not sure why we may want to limit that. I understand live migration is always host-to-host so you won\u0027t have more than two, but can\u0027t we imagine a scenario where a component may decide to have more than two backup bindings? (I dunno, maybe you live migrate it to two hosts and then start it wherever it gets quicker? I know the example is probably weird, but I can\u0027t think of a better one, while having this gut feeling the limit is artificial).","commit_id":"076573cd16d4572c9cff5ae069034c0434340e85"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"5694dcef1da145959278ed17ff861742aa91eeac","unresolved":false,"context_lines":[{"line_number":229,"context_line":"IEC_BASE \u003d 1024"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"# Max/min values how many bindings to hosts can one port binding have"},{"line_number":232,"context_line":"MAX_COMPUTE_BINDINGS \u003d 2"},{"line_number":233,"context_line":"MIN_COMPUTE_BINDINGS \u003d 1"}],"source_content_type":"text/x-python","patch_set":64,"id":"5f7c97a3_9b18331f","line":232,"in_reply_to":"5f7c97a3_2a169e56","updated":"2018-06-03 22:17:36.000000000","message":"You raise a great point. I inherited this limit when I took over this patch and afterwards I just forgot to question the assumption. In PS66 I am removing these two constants and the associated code in the plugin, unit tests and exceptions definitions","commit_id":"076573cd16d4572c9cff5ae069034c0434340e85"}],"neutron/common/exceptions.py":[{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"cb34b0748c528bc44818995b536b5b23899c8e20","unresolved":false,"context_lines":[{"line_number":334,"context_line":"    message \u003d _(\"Both tenant_id and project_id passed as filters.\")"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"class PortBoundTpMaximumNumberOfHosts("},{"line_number":338,"context_line":"    e.InUse):"},{"line_number":339,"context_line":"    message \u003d _(\"Port %(port_id)s is already bound to maximum number of host\")"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a30ddce_149275f6","line":337,"range":{"start_line":337,"start_character":15,"end_line":337,"end_character":17},"updated":"2017-03-09 18:52:09.000000000","message":"BoundTo*","commit_id":"b561ec69438ea815ce8356984bfdd0a4206b3435"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"d6cd568f58ebf64dfa9f0d16eef8733e06b11c29","unresolved":false,"context_lines":[{"line_number":334,"context_line":"    message \u003d _(\"Both tenant_id and project_id passed as filters.\")"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"class PortBoundTpMaximumNumberOfHosts("},{"line_number":338,"context_line":"    e.InUse):"},{"line_number":339,"context_line":"    message \u003d _(\"Port %(port_id)s is already bound to maximum number of host\")"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a30ddce_fe713377","line":337,"range":{"start_line":337,"start_character":15,"end_line":337,"end_character":17},"in_reply_to":"9a30ddce_149275f6","updated":"2017-03-21 03:14:41.000000000","message":"Done","commit_id":"b561ec69438ea815ce8356984bfdd0a4206b3435"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"68d414986e4b21fa3cfd3f2264577b5cd72fe12c","unresolved":false,"context_lines":[{"line_number":336,"context_line":""},{"line_number":337,"context_line":"class PortBoundTpMaximumNumberOfHosts("},{"line_number":338,"context_line":"    e.InUse):"},{"line_number":339,"context_line":"    message \u003d _(\"Port %(port_id)s is already bound to maximum number of host\")"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a30ddce_6f383cf0","line":339,"range":{"start_line":339,"start_character":72,"end_line":339,"end_character":77},"updated":"2017-03-09 17:04:44.000000000","message":"hosts","commit_id":"b561ec69438ea815ce8356984bfdd0a4206b3435"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"d6cd568f58ebf64dfa9f0d16eef8733e06b11c29","unresolved":false,"context_lines":[{"line_number":336,"context_line":""},{"line_number":337,"context_line":"class PortBoundTpMaximumNumberOfHosts("},{"line_number":338,"context_line":"    e.InUse):"},{"line_number":339,"context_line":"    message \u003d _(\"Port %(port_id)s is already bound to maximum number of host\")"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a30ddce_3e682b87","line":339,"range":{"start_line":339,"start_character":72,"end_line":339,"end_character":77},"in_reply_to":"9a30ddce_6f383cf0","updated":"2017-03-21 03:14:41.000000000","message":"Done","commit_id":"b561ec69438ea815ce8356984bfdd0a4206b3435"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"457af93877189ac30dc1cb85a6b57f58b776f44f","unresolved":false,"context_lines":[{"line_number":369,"context_line":""},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"class PortBindingAlreadyActive(e.BadRequest):"},{"line_number":372,"context_line":"    message \u003d _(\"Binding for the port $(port_id)s on host %(host)s is already \""},{"line_number":373,"context_line":"                \"active.\")"}],"source_content_type":"text/x-python","patch_set":27,"id":"df140735_67a6c7c3","line":372,"range":{"start_line":372,"start_character":38,"end_line":372,"end_character":39},"updated":"2017-06-06 14:14:58.000000000","message":"s/%\n\nShould make sure there\u0027s a test since that should have caught it.","commit_id":"68f2182c3f2512f966b8940904fbe2b4cd3dcb67"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"db61bd661219d9a31f80f06bf2a90b72c04d90b6","unresolved":false,"context_lines":[{"line_number":369,"context_line":""},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"class PortBindingAlreadyActive(e.BadRequest):"},{"line_number":372,"context_line":"    message \u003d _(\"Binding for the port $(port_id)s on host %(host)s is already \""},{"line_number":373,"context_line":"                \"active.\")"}],"source_content_type":"text/x-python","patch_set":27,"id":"1f1a1f67_0f8b0b6e","line":372,"range":{"start_line":372,"start_character":38,"end_line":372,"end_character":39},"in_reply_to":"7f231b9d_cb576002","updated":"2017-07-17 14:10:11.000000000","message":"Done","commit_id":"68f2182c3f2512f966b8940904fbe2b4cd3dcb67"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"dc571bbf33b6611d8f505e7879f6194592407a0f","unresolved":false,"context_lines":[{"line_number":369,"context_line":""},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"class PortBindingAlreadyActive(e.BadRequest):"},{"line_number":372,"context_line":"    message \u003d _(\"Binding for the port $(port_id)s on host %(host)s is already \""},{"line_number":373,"context_line":"                \"active.\")"}],"source_content_type":"text/x-python","patch_set":27,"id":"7f231b9d_cb576002","line":372,"range":{"start_line":372,"start_character":38,"end_line":372,"end_character":39},"in_reply_to":"df140735_67a6c7c3","updated":"2017-06-14 12:14:05.000000000","message":"Good eye :) Thanks\n\nThere was supposed to be a test (test_activate_already_active) but still if such typo is made, it doesn\u0027t raise any exception that too many params were passed but formats it instead like this:\n\n Binding for the port $(port_id)s on host host1 is already active.\n\nAnd I don\u0027t think we should test comparing strings.\n\nMaybe there is a bug in BadRequest or some parent class. I\u0027ll check that.","commit_id":"68f2182c3f2512f966b8940904fbe2b4cd3dcb67"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"076720a69883376593a5305d063448c8792cd4d7","unresolved":false,"context_lines":[{"line_number":379,"context_line":""},{"line_number":380,"context_line":"class PortBoundToMaximumNumberOfHosts(e.InUse):"},{"line_number":381,"context_line":"    message \u003d _(\"Port %(port_id)s is already bound to maximum number of \""},{"line_number":382,"context_line":"                \"hosts.\")"},{"line_number":383,"context_line":""},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"class PortBindingNotFound(e.NotFound):"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_f4d57944","line":382,"updated":"2018-01-04 00:43:05.000000000","message":"(I wonder if api users may want to see what\u0027s the number is.)","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"cd489a3e2198294ac5714308858a2c4bede46483","unresolved":false,"context_lines":[{"line_number":379,"context_line":""},{"line_number":380,"context_line":"class PortBoundToMaximumNumberOfHosts(e.InUse):"},{"line_number":381,"context_line":"    message \u003d _(\"Port %(port_id)s is already bound to maximum number of \""},{"line_number":382,"context_line":"                \"hosts.\")"},{"line_number":383,"context_line":""},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"class PortBindingNotFound(e.NotFound):"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_9e8171fe","line":382,"in_reply_to":"9f91af0f_f4d57944","updated":"2018-01-07 05:49:58.000000000","message":"Done","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"076720a69883376593a5305d063448c8792cd4d7","unresolved":false,"context_lines":[{"line_number":383,"context_line":""},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"class PortBindingNotFound(e.NotFound):"},{"line_number":386,"context_line":"    message \u003d _(\"Binding for port %(port_id)s for host %(host)s could not be \""},{"line_number":387,"context_line":"                \"found.\")"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":""}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_b4cff1ae","line":386,"updated":"2018-01-04 00:43:05.000000000","message":"here you say \u0027for port\u0027, but below you say \u0027for the port\u0027. I think only one is correct (for the port?)","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"cd489a3e2198294ac5714308858a2c4bede46483","unresolved":false,"context_lines":[{"line_number":383,"context_line":""},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"class PortBindingNotFound(e.NotFound):"},{"line_number":386,"context_line":"    message \u003d _(\"Binding for port %(port_id)s for host %(host)s could not be \""},{"line_number":387,"context_line":"                \"found.\")"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":""}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_7ea10d94","line":386,"in_reply_to":"9f91af0f_b4cff1ae","updated":"2018-01-07 05:49:58.000000000","message":"\u0027for port\u0027 sounds more correct to me. To confirm, I checked across this file and I found in all cases \u0027for network\u0027, \u0027for subnet\u0027, \u0027for port\u0027, \u0027for floating IP\u0027. So I fixed the message in L391 and L396","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"}],"neutron/common/utils.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"54b9598ba37513e4e7c31969f39bcb995aafae67","unresolved":false,"context_lines":[{"line_number":789,"context_line":""},{"line_number":790,"context_line":"def get_port_binding_by_status_and_host(bindings, status, host\u003d\u0027\u0027,"},{"line_number":791,"context_line":"                                        raise_if_not_found\u003dFalse,"},{"line_number":792,"context_line":"                                        port_id\u003dNone):"},{"line_number":793,"context_line":"    \"\"\"Returns from an iterable the binding with the specified status and host."},{"line_number":794,"context_line":""},{"line_number":795,"context_line":"    The input iterable can contain zero or one binding in status ACTIVE"}],"source_content_type":"text/x-python","patch_set":74,"id":"5f7c97a3_b9902e51","line":792,"updated":"2018-07-16 09:55:06.000000000","message":"I wonder if it wouldn\u0027t be better to pass as an argument port_obj always and inside this function extract bindings and port_id (if needed) from it. Then there will be no need to pass port_id only to raise exception and then this port_id will be available always when exception should be raised. Now it might be that function will be called with port_id\u003dNone and raise_if_not_found\u003dTrue which will raise confusing error message.","commit_id":"f7b62a7f29e6b88fdbcc3bff779b39b541d1de47"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"adedfc17716395bfb329783dddcb1d899675f654","unresolved":false,"context_lines":[{"line_number":789,"context_line":""},{"line_number":790,"context_line":"def get_port_binding_by_status_and_host(bindings, status, host\u003d\u0027\u0027,"},{"line_number":791,"context_line":"                                        raise_if_not_found\u003dFalse,"},{"line_number":792,"context_line":"                                        port_id\u003dNone):"},{"line_number":793,"context_line":"    \"\"\"Returns from an iterable the binding with the specified status and host."},{"line_number":794,"context_line":""},{"line_number":795,"context_line":"    The input iterable can contain zero or one binding in status ACTIVE"}],"source_content_type":"text/x-python","patch_set":74,"id":"5f7c97a3_c4309658","line":792,"in_reply_to":"5f7c97a3_b9902e51","updated":"2018-07-16 16:13:13.000000000","message":"1) It might not always be a port object. Sometimes is a sqlalchemy object\n\n2) In all the cases where the function is called with get raise_if_not_found \u003d True, port_id is valid","commit_id":"f7b62a7f29e6b88fdbcc3bff779b39b541d1de47"}],"neutron/db/portbindings_db.py":[{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"98a92f5705e8183394683b36e93e2f17c61db912","unresolved":false,"context_lines":[{"line_number":116,"context_line":""},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"class PortBindingsExtendedMixin(pb_ext.PortBindingExtendedPluginBase):"},{"line_number":119,"context_line":"    \"\"\"Mixin class to add agent extension to db_base_plugin_v2.\"\"\""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    @staticmethod"},{"line_number":122,"context_line":"    def _make_port_binding_dict(binding, fields\u003dNone):"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_f47ed0ad","line":119,"updated":"2017-01-12 00:37:36.000000000","message":"Nit: \"agent extension\" -\u003e \"extended port bindings extensions\"","commit_id":"0ae6a320b0ddd9130ff3528030eba5f00db49126"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"082072214d9f931694e9c335e94424ad82062779","unresolved":false,"context_lines":[{"line_number":116,"context_line":""},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"class PortBindingsExtendedMixin(pb_ext.PortBindingExtendedPluginBase):"},{"line_number":119,"context_line":"    \"\"\"Mixin class to add agent extension to db_base_plugin_v2.\"\"\""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    @staticmethod"},{"line_number":122,"context_line":"    def _make_port_binding_dict(binding, fields\u003dNone):"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a3c09a3_2f4f7a93","line":119,"in_reply_to":"ba5201f7_f47ed0ad","updated":"2017-01-27 16:17:05.000000000","message":"Corrected and moved this into a new file portbinding_extended_plugin.py","commit_id":"0ae6a320b0ddd9130ff3528030eba5f00db49126"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"9b0b3b6e89fe33761afb982b708cb7a78f01744b","unresolved":false,"context_lines":[{"line_number":125,"context_line":"               \u0027profile\u0027: binding[\u0027profile\u0027],"},{"line_number":126,"context_line":"               \u0027vif_type\u0027: binding[\u0027vif_type\u0027],"},{"line_number":127,"context_line":"               \u0027vif_details\u0027: binding[\u0027vif_details\u0027],"},{"line_number":128,"context_line":"               \u0027vnic_type\u0027: binding[\u0027vnic_type\u0027]}"},{"line_number":129,"context_line":"        return db_utils.resource_fields(res, fields)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def get_port_bindings(self, context, port_id, filters\u003dNone, fields\u003dNone,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a3c09a3_d56f7290","line":128,"updated":"2017-01-13 13:11:31.000000000","message":"what about status?","commit_id":"0ae6a320b0ddd9130ff3528030eba5f00db49126"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"082072214d9f931694e9c335e94424ad82062779","unresolved":false,"context_lines":[{"line_number":125,"context_line":"               \u0027profile\u0027: binding[\u0027profile\u0027],"},{"line_number":126,"context_line":"               \u0027vif_type\u0027: binding[\u0027vif_type\u0027],"},{"line_number":127,"context_line":"               \u0027vif_details\u0027: binding[\u0027vif_details\u0027],"},{"line_number":128,"context_line":"               \u0027vnic_type\u0027: binding[\u0027vnic_type\u0027]}"},{"line_number":129,"context_line":"        return db_utils.resource_fields(res, fields)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def get_port_bindings(self, context, port_id, filters\u003dNone, fields\u003dNone,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a3c09a3_0f31de0b","line":128,"in_reply_to":"7a3c09a3_d56f7290","updated":"2017-01-27 16:17:05.000000000","message":"Oops missed it. Thank you :)","commit_id":"0ae6a320b0ddd9130ff3528030eba5f00db49126"}],"neutron/extensions/portbindings_extended.py":[{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"9b0b3b6e89fe33761afb982b708cb7a78f01744b","unresolved":false,"context_lines":[{"line_number":24,"context_line":"BINDINGS \u003d \u0027bindings\u0027"},{"line_number":25,"context_line":"RESOURCE_NAME \u003d \u0027binding\u0027"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"VNIC_NORMAL \u003d \u0027normal\u0027"},{"line_number":28,"context_line":"VNIC_DIRECT \u003d \u0027direct\u0027"},{"line_number":29,"context_line":"VNIC_MACVTAP \u003d \u0027macvtap\u0027"},{"line_number":30,"context_line":"VNIC_BAREMETAL \u003d \u0027baremetal\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a3c09a3_95732ab1","line":27,"updated":"2017-01-13 13:11:31.000000000","message":"Maybe this has been discussed before: Why can\u0027t we reuse the existing constants [1]?\n\n[1] https://github.com/openstack/neutron/blob/master/neutron/extensions/portbindings.py#L99-L103","commit_id":"0ae6a320b0ddd9130ff3528030eba5f00db49126"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"98a92f5705e8183394683b36e93e2f17c61db912","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    \u0027bindings\u0027: {"},{"line_number":37,"context_line":"        \u0027host_id\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":38,"context_line":"                    \u0027is_visible\u0027: True, \u0027primary_key\u0027: True},"},{"line_number":39,"context_line":"        \u0027vif_type\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":40,"context_line":"                     \u0027default\u0027: constants.ATTR_NOT_SPECIFIED,"},{"line_number":41,"context_line":"                     \u0027enforce_policy\u0027: True,"},{"line_number":42,"context_line":"                     \u0027is_visible\u0027: True},"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_15bfceaa","line":39,"range":{"start_line":39,"start_character":21,"end_line":39,"end_character":58},"updated":"2017-01-12 00:37:36.000000000","message":"I think these should be False, since this attribute is an output from the binding process.","commit_id":"0ae6a320b0ddd9130ff3528030eba5f00db49126"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"082072214d9f931694e9c335e94424ad82062779","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    \u0027bindings\u0027: {"},{"line_number":37,"context_line":"        \u0027host_id\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":38,"context_line":"                    \u0027is_visible\u0027: True, \u0027primary_key\u0027: True},"},{"line_number":39,"context_line":"        \u0027vif_type\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":40,"context_line":"                     \u0027default\u0027: constants.ATTR_NOT_SPECIFIED,"},{"line_number":41,"context_line":"                     \u0027enforce_policy\u0027: True,"},{"line_number":42,"context_line":"                     \u0027is_visible\u0027: True},"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a3c09a3_cf06f61f","line":39,"range":{"start_line":39,"start_character":21,"end_line":39,"end_character":58},"in_reply_to":"7a3c09a3_b5af46e2","updated":"2017-01-27 16:17:05.000000000","message":"Done","commit_id":"0ae6a320b0ddd9130ff3528030eba5f00db49126"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"9b0b3b6e89fe33761afb982b708cb7a78f01744b","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    \u0027bindings\u0027: {"},{"line_number":37,"context_line":"        \u0027host_id\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":38,"context_line":"                    \u0027is_visible\u0027: True, \u0027primary_key\u0027: True},"},{"line_number":39,"context_line":"        \u0027vif_type\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":40,"context_line":"                     \u0027default\u0027: constants.ATTR_NOT_SPECIFIED,"},{"line_number":41,"context_line":"                     \u0027enforce_policy\u0027: True,"},{"line_number":42,"context_line":"                     \u0027is_visible\u0027: True},"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a3c09a3_b5af46e2","line":39,"range":{"start_line":39,"start_character":21,"end_line":39,"end_character":58},"in_reply_to":"ba5201f7_15bfceaa","updated":"2017-01-13 13:11:31.000000000","message":"+1","commit_id":"0ae6a320b0ddd9130ff3528030eba5f00db49126"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"082072214d9f931694e9c335e94424ad82062779","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    \u0027bindings\u0027: {"},{"line_number":37,"context_line":"        \u0027host_id\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":38,"context_line":"                    \u0027is_visible\u0027: True, \u0027primary_key\u0027: True},"},{"line_number":39,"context_line":"        \u0027vif_type\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":40,"context_line":"                     \u0027default\u0027: constants.ATTR_NOT_SPECIFIED,"},{"line_number":41,"context_line":"                     \u0027enforce_policy\u0027: True,"},{"line_number":42,"context_line":"                     \u0027is_visible\u0027: True},"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a3c09a3_4f120664","line":39,"range":{"start_line":39,"start_character":21,"end_line":39,"end_character":58},"in_reply_to":"ba5201f7_15bfceaa","updated":"2017-01-27 16:17:05.000000000","message":"Done","commit_id":"0ae6a320b0ddd9130ff3528030eba5f00db49126"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"98a92f5705e8183394683b36e93e2f17c61db912","unresolved":false,"context_lines":[{"line_number":40,"context_line":"                     \u0027default\u0027: constants.ATTR_NOT_SPECIFIED,"},{"line_number":41,"context_line":"                     \u0027enforce_policy\u0027: True,"},{"line_number":42,"context_line":"                     \u0027is_visible\u0027: True},"},{"line_number":43,"context_line":"        \u0027vif_details\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":44,"context_line":"                        \u0027default\u0027: constants.ATTR_NOT_SPECIFIED,"},{"line_number":45,"context_line":"                        \u0027enforce_policy\u0027: True,"},{"line_number":46,"context_line":"                        \u0027is_visible\u0027: True},"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_d5cf0654","line":43,"range":{"start_line":43,"start_character":24,"end_line":43,"end_character":62},"updated":"2017-01-12 00:37:36.000000000","message":"I think these should be False, since this attribute is an output from the binding process.","commit_id":"0ae6a320b0ddd9130ff3528030eba5f00db49126"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"082072214d9f931694e9c335e94424ad82062779","unresolved":false,"context_lines":[{"line_number":40,"context_line":"                     \u0027default\u0027: constants.ATTR_NOT_SPECIFIED,"},{"line_number":41,"context_line":"                     \u0027enforce_policy\u0027: True,"},{"line_number":42,"context_line":"                     \u0027is_visible\u0027: True},"},{"line_number":43,"context_line":"        \u0027vif_details\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":44,"context_line":"                        \u0027default\u0027: constants.ATTR_NOT_SPECIFIED,"},{"line_number":45,"context_line":"                        \u0027enforce_policy\u0027: True,"},{"line_number":46,"context_line":"                        \u0027is_visible\u0027: True},"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a3c09a3_c8e42c0f","line":43,"range":{"start_line":43,"start_character":24,"end_line":43,"end_character":62},"in_reply_to":"ba5201f7_d5cf0654","updated":"2017-01-27 16:17:05.000000000","message":"Done","commit_id":"0ae6a320b0ddd9130ff3528030eba5f00db49126"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"1ec119d98db19136f21cca447f9159cd787ec939","unresolved":false,"context_lines":[{"line_number":87,"context_line":"    @classmethod"},{"line_number":88,"context_line":"    def get_resources(cls):"},{"line_number":89,"context_line":"        \"\"\"Returns Ext Resources.\"\"\""},{"line_number":90,"context_line":"        plugin \u003d directory.get_plugin()"},{"line_number":91,"context_line":"        parent \u003d {\u0027collection_name\u0027: \u0027ports\u0027, \u0027member_name\u0027: \u0027port\u0027}"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        params \u003d SUB_RESOURCE_ATTRIBUTE_MAP.get(BINDINGS)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a3c09a3_e8f1e8ce","line":90,"updated":"2017-01-13 16:48:27.000000000","message":"you will need to pass in a string constant here to get the service plugin instead of the core plugin.","commit_id":"889bd9be29fcb700d213041e9558dfdfe681c5cd"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"701f6c5900b572990f6ae89753310d7d4aebb41d","unresolved":false,"context_lines":[{"line_number":87,"context_line":"    @classmethod"},{"line_number":88,"context_line":"    def get_resources(cls):"},{"line_number":89,"context_line":"        \"\"\"Returns Ext Resources.\"\"\""},{"line_number":90,"context_line":"        plugin \u003d directory.get_plugin()"},{"line_number":91,"context_line":"        parent \u003d {\u0027collection_name\u0027: \u0027ports\u0027, \u0027member_name\u0027: \u0027port\u0027}"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        params \u003d SUB_RESOURCE_ATTRIBUTE_MAP.get(BINDINGS)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a461143_a69fc14e","line":90,"in_reply_to":"7a3c09a3_e8f1e8ce","updated":"2017-01-27 20:46:50.000000000","message":"Done","commit_id":"889bd9be29fcb700d213041e9558dfdfe681c5cd"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"9e0fcd1d05ae8dbf28e290d55b79489525a04003","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from neutron.plugins.common import constants as plugin_constants"},{"line_number":24,"context_line":"from neutron.services import service_base"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"BINDINGS \u003d \u0027bindings\u0027"},{"line_number":27,"context_line":"RESOURCE_NAME \u003d \u0027binding\u0027"},{"line_number":28,"context_line":"EXT_ALIAS \u003d \u0027bindings_extended\u0027"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"VNIC_NORMAL \u003d \u0027normal\u0027"},{"line_number":31,"context_line":"VNIC_DIRECT \u003d \u0027direct\u0027"},{"line_number":32,"context_line":"VNIC_MACVTAP \u003d \u0027macvtap\u0027"},{"line_number":33,"context_line":"VNIC_BAREMETAL \u003d \u0027baremetal\u0027"},{"line_number":34,"context_line":"VNIC_DIRECT_PHYSICAL \u003d \u0027direct-physical\u0027"},{"line_number":35,"context_line":"VNIC_TYPES \u003d [VNIC_NORMAL, VNIC_DIRECT, VNIC_MACVTAP, VNIC_BAREMETAL,"},{"line_number":36,"context_line":"              VNIC_DIRECT_PHYSICAL]"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"da36d5c6_960fbf2d","line":34,"range":{"start_line":26,"start_character":0,"end_line":34,"end_character":40},"updated":"2017-02-28 01:07:39.000000000","message":"most of these are defined in extensions/portbinding.py wouldn\u0027t it make more sense to move common ones to common/constants and avoid redundancy ?","commit_id":"6412276ce32899ef2accbdcd499d4ee6816e73e7"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"2b5880ed87d64b9e7f7a830c97fff7cfc0f417cb","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from neutron.plugins.common import constants as plugin_constants"},{"line_number":24,"context_line":"from neutron.services import service_base"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"BINDINGS \u003d \u0027bindings\u0027"},{"line_number":27,"context_line":"RESOURCE_NAME \u003d \u0027binding\u0027"},{"line_number":28,"context_line":"EXT_ALIAS \u003d \u0027bindings_extended\u0027"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"VNIC_NORMAL \u003d \u0027normal\u0027"},{"line_number":31,"context_line":"VNIC_DIRECT \u003d \u0027direct\u0027"},{"line_number":32,"context_line":"VNIC_MACVTAP \u003d \u0027macvtap\u0027"},{"line_number":33,"context_line":"VNIC_BAREMETAL \u003d \u0027baremetal\u0027"},{"line_number":34,"context_line":"VNIC_DIRECT_PHYSICAL \u003d \u0027direct-physical\u0027"},{"line_number":35,"context_line":"VNIC_TYPES \u003d [VNIC_NORMAL, VNIC_DIRECT, VNIC_MACVTAP, VNIC_BAREMETAL,"},{"line_number":36,"context_line":"              VNIC_DIRECT_PHYSICAL]"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"da36d5c6_6ac3388b","line":34,"range":{"start_line":26,"start_character":0,"end_line":34,"end_character":40},"in_reply_to":"da36d5c6_960fbf2d","updated":"2017-02-28 04:54:11.000000000","message":"@Manjeet: Will address this future patch sets.","commit_id":"6412276ce32899ef2accbdcd499d4ee6816e73e7"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"68d414986e4b21fa3cfd3f2264577b5cd72fe12c","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from neutron.plugins.common import constants as plugin_constants"},{"line_number":24,"context_line":"from neutron.services import service_base"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"BINDINGS \u003d \u0027bindings\u0027"},{"line_number":27,"context_line":"RESOURCE_NAME \u003d \u0027binding\u0027"},{"line_number":28,"context_line":"EXT_ALIAS \u003d \u0027bindings_extended\u0027"},{"line_number":29,"context_line":"ACTIVATE_BINDING \u003d \u0027activate\u0027"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"VNIC_NORMAL \u003d \u0027normal\u0027"},{"line_number":32,"context_line":"VNIC_DIRECT \u003d \u0027direct\u0027"},{"line_number":33,"context_line":"VNIC_MACVTAP \u003d \u0027macvtap\u0027"},{"line_number":34,"context_line":"VNIC_BAREMETAL \u003d \u0027baremetal\u0027"},{"line_number":35,"context_line":"VNIC_DIRECT_PHYSICAL \u003d \u0027direct-physical\u0027"},{"line_number":36,"context_line":"VNIC_TYPES \u003d [VNIC_NORMAL, VNIC_DIRECT, VNIC_MACVTAP, VNIC_BAREMETAL,"},{"line_number":37,"context_line":"              VNIC_DIRECT_PHYSICAL]"},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"9a30ddce_2a19d279","line":35,"range":{"start_line":26,"start_character":0,"end_line":35,"end_character":40},"updated":"2017-03-09 17:04:44.000000000","message":"comment unaddressed from ps17","commit_id":"b561ec69438ea815ce8356984bfdd0a4206b3435"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"18a73124d1b34b935b686b633f1590486f9c7ff7","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from neutron.plugins.common import constants as plugin_constants"},{"line_number":24,"context_line":"from neutron.services import service_base"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"BINDINGS \u003d \u0027bindings\u0027"},{"line_number":27,"context_line":"RESOURCE_NAME \u003d \u0027binding\u0027"},{"line_number":28,"context_line":"EXT_ALIAS \u003d \u0027bindings_extended\u0027"},{"line_number":29,"context_line":"ACTIVATE_BINDING \u003d \u0027activate\u0027"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"VNIC_NORMAL \u003d \u0027normal\u0027"},{"line_number":32,"context_line":"VNIC_DIRECT \u003d \u0027direct\u0027"},{"line_number":33,"context_line":"VNIC_MACVTAP \u003d \u0027macvtap\u0027"},{"line_number":34,"context_line":"VNIC_BAREMETAL \u003d \u0027baremetal\u0027"},{"line_number":35,"context_line":"VNIC_DIRECT_PHYSICAL \u003d \u0027direct-physical\u0027"},{"line_number":36,"context_line":"VNIC_TYPES \u003d [VNIC_NORMAL, VNIC_DIRECT, VNIC_MACVTAP, VNIC_BAREMETAL,"},{"line_number":37,"context_line":"              VNIC_DIRECT_PHYSICAL]"},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"9a30ddce_d56a7bec","line":35,"range":{"start_line":26,"start_character":0,"end_line":35,"end_character":40},"in_reply_to":"9a30ddce_2a19d279","updated":"2017-03-10 07:54:24.000000000","message":"+1","commit_id":"b561ec69438ea815ce8356984bfdd0a4206b3435"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"d6cd568f58ebf64dfa9f0d16eef8733e06b11c29","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from neutron.plugins.common import constants as plugin_constants"},{"line_number":24,"context_line":"from neutron.services import service_base"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"BINDINGS \u003d \u0027bindings\u0027"},{"line_number":27,"context_line":"RESOURCE_NAME \u003d \u0027binding\u0027"},{"line_number":28,"context_line":"EXT_ALIAS \u003d \u0027bindings_extended\u0027"},{"line_number":29,"context_line":"ACTIVATE_BINDING \u003d \u0027activate\u0027"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"VNIC_NORMAL \u003d \u0027normal\u0027"},{"line_number":32,"context_line":"VNIC_DIRECT \u003d \u0027direct\u0027"},{"line_number":33,"context_line":"VNIC_MACVTAP \u003d \u0027macvtap\u0027"},{"line_number":34,"context_line":"VNIC_BAREMETAL \u003d \u0027baremetal\u0027"},{"line_number":35,"context_line":"VNIC_DIRECT_PHYSICAL \u003d \u0027direct-physical\u0027"},{"line_number":36,"context_line":"VNIC_TYPES \u003d [VNIC_NORMAL, VNIC_DIRECT, VNIC_MACVTAP, VNIC_BAREMETAL,"},{"line_number":37,"context_line":"              VNIC_DIRECT_PHYSICAL]"},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"9a30ddce_bed41bbd","line":35,"range":{"start_line":26,"start_character":0,"end_line":35,"end_character":40},"in_reply_to":"9a30ddce_2a19d279","updated":"2017-03-21 03:14:41.000000000","message":"Line 26-27 is specific to this extension so keeping them in this file. Moved the VNIC_TYPES to plugins/common/constants","commit_id":"b561ec69438ea815ce8356984bfdd0a4206b3435"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"d6cd568f58ebf64dfa9f0d16eef8733e06b11c29","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from neutron.plugins.common import constants as plugin_constants"},{"line_number":24,"context_line":"from neutron.services import service_base"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"BINDINGS \u003d \u0027bindings\u0027"},{"line_number":27,"context_line":"RESOURCE_NAME \u003d \u0027binding\u0027"},{"line_number":28,"context_line":"EXT_ALIAS \u003d \u0027bindings_extended\u0027"},{"line_number":29,"context_line":"ACTIVATE_BINDING \u003d \u0027activate\u0027"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"VNIC_NORMAL \u003d \u0027normal\u0027"},{"line_number":32,"context_line":"VNIC_DIRECT \u003d \u0027direct\u0027"},{"line_number":33,"context_line":"VNIC_MACVTAP \u003d \u0027macvtap\u0027"},{"line_number":34,"context_line":"VNIC_BAREMETAL \u003d \u0027baremetal\u0027"},{"line_number":35,"context_line":"VNIC_DIRECT_PHYSICAL \u003d \u0027direct-physical\u0027"},{"line_number":36,"context_line":"VNIC_TYPES \u003d [VNIC_NORMAL, VNIC_DIRECT, VNIC_MACVTAP, VNIC_BAREMETAL,"},{"line_number":37,"context_line":"              VNIC_DIRECT_PHYSICAL]"},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"1a1ced50_002c09aa","line":35,"range":{"start_line":26,"start_character":0,"end_line":35,"end_character":40},"in_reply_to":"9a30ddce_d56a7bec","updated":"2017-03-21 03:14:41.000000000","message":"Done","commit_id":"b561ec69438ea815ce8356984bfdd0a4206b3435"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"3871eef2c67bb447860cb0e9455bb7bacfc55396","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# All rights reserved."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":27,"id":"df140735_0706eb52","line":1,"updated":"2017-06-06 15:24:52.000000000","message":"I think that basically API definition of new extension should be discussed in neutron-lib.","commit_id":"68f2182c3f2512f966b8940904fbe2b4cd3dcb67"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"db61bd661219d9a31f80f06bf2a90b72c04d90b6","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# All rights reserved."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":27,"id":"1f1a1f67_4fe1032a","line":1,"in_reply_to":"7f231b9d_8b25e8c4","updated":"2017-07-17 14:10:11.000000000","message":"I\u0027ll propose this to the lib.","commit_id":"68f2182c3f2512f966b8940904fbe2b4cd3dcb67"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"dc571bbf33b6611d8f505e7879f6194592407a0f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# All rights reserved."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":27,"id":"7f231b9d_8b25e8c4","line":1,"in_reply_to":"df140735_0706eb52","updated":"2017-06-14 12:14:05.000000000","message":"Is there any document describing the steps for new features? If we push it to neutron-lib first, won\u0027t it block the development cause we\u0027ll need to wait for new neutron-lib release?","commit_id":"68f2182c3f2512f966b8940904fbe2b4cd3dcb67"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"3871eef2c67bb447860cb0e9455bb7bacfc55396","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"SUB_RESOURCE_ATTRIBUTE_MAP \u003d {"},{"line_number":35,"context_line":"    \u0027bindings\u0027: {"},{"line_number":36,"context_line":"        \u0027host\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":37,"context_line":"                 \u0027is_visible\u0027: True, \u0027primary_key\u0027: True},"},{"line_number":38,"context_line":"        \u0027vif_type\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"}],"source_content_type":"text/x-python","patch_set":27,"id":"df140735_3ae586dc","line":35,"range":{"start_line":35,"start_character":4,"end_line":35,"end_character":14},"updated":"2017-06-06 15:24:52.000000000","message":"BINDINGS","commit_id":"68f2182c3f2512f966b8940904fbe2b4cd3dcb67"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"dc571bbf33b6611d8f505e7879f6194592407a0f","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"SUB_RESOURCE_ATTRIBUTE_MAP \u003d {"},{"line_number":35,"context_line":"    \u0027bindings\u0027: {"},{"line_number":36,"context_line":"        \u0027host\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":37,"context_line":"                 \u0027is_visible\u0027: True, \u0027primary_key\u0027: True},"},{"line_number":38,"context_line":"        \u0027vif_type\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"}],"source_content_type":"text/x-python","patch_set":27,"id":"7f231b9d_6b204cb1","line":35,"range":{"start_line":35,"start_character":4,"end_line":35,"end_character":14},"in_reply_to":"df140735_3ae586dc","updated":"2017-06-14 12:14:05.000000000","message":"Done","commit_id":"68f2182c3f2512f966b8940904fbe2b4cd3dcb67"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"4ef3e2d785b646f54fe4ebc3930f09cb35ffa81f","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    \"\"\""},{"line_number":75,"context_line":"    @classmethod"},{"line_number":76,"context_line":"    def get_name(cls):"},{"line_number":77,"context_line":"        return \"Port Bindings\""},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    @classmethod"},{"line_number":80,"context_line":"    def get_alias(cls):"}],"source_content_type":"text/x-python","patch_set":27,"id":"df140735_60f47bf1","line":77,"range":{"start_line":77,"start_character":16,"end_line":77,"end_character":29},"updated":"2017-06-06 08:34:23.000000000","message":"looks too confusing with the existing \"Port Binding\".","commit_id":"68f2182c3f2512f966b8940904fbe2b4cd3dcb67"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"3871eef2c67bb447860cb0e9455bb7bacfc55396","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    \"\"\""},{"line_number":75,"context_line":"    @classmethod"},{"line_number":76,"context_line":"    def get_name(cls):"},{"line_number":77,"context_line":"        return \"Port Bindings\""},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    @classmethod"},{"line_number":80,"context_line":"    def get_alias(cls):"}],"source_content_type":"text/x-python","patch_set":27,"id":"df140735_9ab13247","line":77,"range":{"start_line":77,"start_character":16,"end_line":77,"end_character":29},"in_reply_to":"df140735_60f47bf1","updated":"2017-06-06 15:24:52.000000000","message":"+1","commit_id":"68f2182c3f2512f966b8940904fbe2b4cd3dcb67"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"dc571bbf33b6611d8f505e7879f6194592407a0f","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    \"\"\""},{"line_number":75,"context_line":"    @classmethod"},{"line_number":76,"context_line":"    def get_name(cls):"},{"line_number":77,"context_line":"        return \"Port Bindings\""},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    @classmethod"},{"line_number":80,"context_line":"    def get_alias(cls):"}],"source_content_type":"text/x-python","patch_set":27,"id":"7f231b9d_663c01bf","line":77,"range":{"start_line":77,"start_character":16,"end_line":77,"end_character":29},"in_reply_to":"df140735_60f47bf1","updated":"2017-06-14 12:14:05.000000000","message":"Any suggestions? \"Port Bindings Extended\" or is it still too similar?","commit_id":"68f2182c3f2512f966b8940904fbe2b4cd3dcb67"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"3871eef2c67bb447860cb0e9455bb7bacfc55396","unresolved":false,"context_lines":[{"line_number":87,"context_line":"    @classmethod"},{"line_number":88,"context_line":"    def get_updated(cls):"},{"line_number":89,"context_line":"        return \"2016-11-30T10:00:00-00:00\""},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    @classmethod"},{"line_number":92,"context_line":"    def get_resources(cls):"},{"line_number":93,"context_line":"        \"\"\"Returns Ext Resources.\"\"\""}],"source_content_type":"text/x-python","patch_set":27,"id":"df140735_7abe5ed5","line":90,"updated":"2017-06-06 15:24:52.000000000","message":"Just question: This is isolate from port bindings, right? If not so, we need get_required_extensions with \"binding\" of portbindings.","commit_id":"68f2182c3f2512f966b8940904fbe2b4cd3dcb67"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"dc571bbf33b6611d8f505e7879f6194592407a0f","unresolved":false,"context_lines":[{"line_number":87,"context_line":"    @classmethod"},{"line_number":88,"context_line":"    def get_updated(cls):"},{"line_number":89,"context_line":"        return \"2016-11-30T10:00:00-00:00\""},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    @classmethod"},{"line_number":92,"context_line":"    def get_resources(cls):"},{"line_number":93,"context_line":"        \"\"\"Returns Ext Resources.\"\"\""}],"source_content_type":"text/x-python","patch_set":27,"id":"7f231b9d_86dddd71","line":90,"in_reply_to":"df140735_7abe5ed5","updated":"2017-06-14 12:14:05.000000000","message":"I\u0027m frankly not sure why we don\u0027t add all this stuff directly to the existing portbindings extension.","commit_id":"68f2182c3f2512f966b8940904fbe2b4cd3dcb67"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"c907b2ba7ffadbdafd9caecf411c2568d94bdc9b","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"import abc"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from neutron_lib.api.definitions import portbindings_extended as pbe_ext"},{"line_number":18,"context_line":"from neutron_lib.api import extensions as api_extensions"},{"line_number":19,"context_line":"from neutron_lib.plugins import directory"},{"line_number":20,"context_line":"from neutron_lib.services import base as service_base"}],"source_content_type":"text/x-python","patch_set":28,"id":"1f1a1f67_54284a95","line":17,"range":{"start_line":17,"start_character":0,"end_line":17,"end_character":72},"updated":"2017-07-18 16:05:24.000000000","message":"I\u0027d like to suggest that you define API definition here until merge and release of the patch like logging api[1]. It\u0027s easy for us to review parallel.\n\n[1]: https://review.openstack.org/#/c/395504/49/neutron/extensions/logging.py","commit_id":"45b7103de32373e8a138377f088157bcb86e20b0"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"c63fe2afc34a4bea86509b41b5b41f67e57d3e05","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from neutron.api.v2 import base"},{"line_number":25,"context_line":"from neutron.plugins.common import constants as plugin_constants"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"EXT_ALIAS \u003d pbe_ext.ALIAS"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class Portbindings_extended(api_extensions.ExtensionDescriptor):"}],"source_content_type":"text/x-python","patch_set":28,"id":"ff346bd7_1c99736d","line":27,"range":{"start_line":27,"start_character":0,"end_line":27,"end_character":25},"updated":"2017-07-24 15:24:54.000000000","message":"Is this necessary?","commit_id":"45b7103de32373e8a138377f088157bcb86e20b0"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"560745627e0d5e51e8b95bfcdf3e692bdd855fed","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from neutron.api.v2 import base"},{"line_number":25,"context_line":"from neutron.plugins.common import constants as plugin_constants"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"EXT_ALIAS \u003d pbe_ext.ALIAS"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class Portbindings_extended(api_extensions.ExtensionDescriptor):"}],"source_content_type":"text/x-python","patch_set":28,"id":"ff346bd7_ff0d8137","line":27,"range":{"start_line":27,"start_character":0,"end_line":27,"end_character":25},"in_reply_to":"ff346bd7_1c99736d","updated":"2017-07-24 15:39:54.000000000","message":"It\u0027s an implementation detail, neutron code imports this module and has all it needs. But technically it\u0027s not necessary, it\u0027s just to simplify code to not need import from neutron-lib just because of this particular constant.","commit_id":"45b7103de32373e8a138377f088157bcb86e20b0"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"bd463a3b8b482086207465a9dae0df3f79aafa1d","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        plugin \u003d directory.get_plugin(plugin_constants.BINDINGS_EXTENDED)"},{"line_number":57,"context_line":"        parent \u003d {\u0027collection_name\u0027: \u0027ports\u0027, \u0027member_name\u0027: \u0027port\u0027}"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        params \u003d pbe_ext.SUB_RESOURCE_ATTRIBUTE_MAP.get(pbe_ext.BINDINGS)"},{"line_number":60,"context_line":"        exts \u003d []"},{"line_number":61,"context_line":"        controller \u003d base.create_resource("},{"line_number":62,"context_line":"            pbe_ext.BINDINGS,"}],"source_content_type":"text/x-python","patch_set":28,"id":"ff346bd7_d3216dfd","line":59,"range":{"start_line":59,"start_character":56,"end_line":59,"end_character":72},"updated":"2017-07-25 15:54:48.000000000","message":"pbe_ext.COLLECTION_NAME","commit_id":"45b7103de32373e8a138377f088157bcb86e20b0"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"143265a86859b05c946fc7a63fcd3eea26bde011","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        plugin \u003d directory.get_plugin(plugin_constants.BINDINGS_EXTENDED)"},{"line_number":57,"context_line":"        parent \u003d {\u0027collection_name\u0027: \u0027ports\u0027, \u0027member_name\u0027: \u0027port\u0027}"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        params \u003d pbe_ext.SUB_RESOURCE_ATTRIBUTE_MAP.get(pbe_ext.BINDINGS)"},{"line_number":60,"context_line":"        exts \u003d []"},{"line_number":61,"context_line":"        controller \u003d base.create_resource("},{"line_number":62,"context_line":"            pbe_ext.BINDINGS,"}],"source_content_type":"text/x-python","patch_set":28,"id":"ff346bd7_0bf2f570","line":59,"range":{"start_line":59,"start_character":56,"end_line":59,"end_character":72},"in_reply_to":"ff346bd7_d3216dfd","updated":"2017-07-26 14:58:34.000000000","message":":(\n\nparams \u003d pbe_ext.SUB_RESOURCE_ATTRIBUTE_MAP.get(pbe_ext.BINDINGS)\n-\u003e\nparams \u003d pbe_ext.SUB_RESOURCE_ATTRIBUTE_MAP[pbe_ext.COLLECTION_NAME].get(\u0027par\\\nameters\u0027)","commit_id":"45b7103de32373e8a138377f088157bcb86e20b0"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"bd463a3b8b482086207465a9dae0df3f79aafa1d","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        params \u003d pbe_ext.SUB_RESOURCE_ATTRIBUTE_MAP.get(pbe_ext.BINDINGS)"},{"line_number":60,"context_line":"        exts \u003d []"},{"line_number":61,"context_line":"        controller \u003d base.create_resource("},{"line_number":62,"context_line":"            pbe_ext.BINDINGS,"},{"line_number":63,"context_line":"            pbe_ext.BINDING,"},{"line_number":64,"context_line":"            plugin,"},{"line_number":65,"context_line":"            params,"}],"source_content_type":"text/x-python","patch_set":28,"id":"ff346bd7_b31ca9c1","line":62,"range":{"start_line":62,"start_character":12,"end_line":62,"end_character":28},"updated":"2017-07-25 15:54:48.000000000","message":"pbe_ext.COLLECTION_NAME","commit_id":"45b7103de32373e8a138377f088157bcb86e20b0"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"bd463a3b8b482086207465a9dae0df3f79aafa1d","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        exts \u003d []"},{"line_number":61,"context_line":"        controller \u003d base.create_resource("},{"line_number":62,"context_line":"            pbe_ext.BINDINGS,"},{"line_number":63,"context_line":"            pbe_ext.BINDING,"},{"line_number":64,"context_line":"            plugin,"},{"line_number":65,"context_line":"            params,"},{"line_number":66,"context_line":"            member_actions\u003d{"}],"source_content_type":"text/x-python","patch_set":28,"id":"ff346bd7_9379a5fd","line":63,"range":{"start_line":63,"start_character":12,"end_line":63,"end_character":27},"updated":"2017-07-25 15:54:48.000000000","message":"pbe_ext.RESOURCE_NAME","commit_id":"45b7103de32373e8a138377f088157bcb86e20b0"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"bd463a3b8b482086207465a9dae0df3f79aafa1d","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        )"},{"line_number":73,"context_line":"        exts.append("},{"line_number":74,"context_line":"            extensions.ResourceExtension("},{"line_number":75,"context_line":"                pbe_ext.BINDINGS,"},{"line_number":76,"context_line":"                controller,"},{"line_number":77,"context_line":"                parent,"},{"line_number":78,"context_line":"                member_actions\u003d{"}],"source_content_type":"text/x-python","patch_set":28,"id":"ff346bd7_737c01eb","line":75,"range":{"start_line":75,"start_character":16,"end_line":75,"end_character":32},"updated":"2017-07-25 15:54:48.000000000","message":"pbe_ext.COLLECTION_NAME","commit_id":"45b7103de32373e8a138377f088157bcb86e20b0"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"c63fe2afc34a4bea86509b41b5b41f67e57d3e05","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        params \u003d pbe_ext.SUB_RESOURCE_ATTRIBUTE_MAP.get(pbe_ext.BINDINGS)"},{"line_number":60,"context_line":"        exts \u003d []"},{"line_number":61,"context_line":"        controller \u003d base.create_resource("},{"line_number":62,"context_line":"            pbe_ext.BINDINGS,"},{"line_number":63,"context_line":"            pbe_ext.BINDING,"},{"line_number":64,"context_line":"            plugin,"},{"line_number":65,"context_line":"            params,"},{"line_number":66,"context_line":"            member_actions\u003d{"},{"line_number":67,"context_line":"                pbe_ext.ACTIVATE_BINDING: \u0027PUT\u0027,"},{"line_number":68,"context_line":"            },"},{"line_number":69,"context_line":"            parent\u003dparent,"},{"line_number":70,"context_line":"            allow_pagination\u003dTrue,"},{"line_number":71,"context_line":"            allow_sorting\u003dTrue,"},{"line_number":72,"context_line":"        )"},{"line_number":73,"context_line":"        exts.append("},{"line_number":74,"context_line":"            extensions.ResourceExtension("},{"line_number":75,"context_line":"                pbe_ext.BINDINGS,"},{"line_number":76,"context_line":"                controller,"},{"line_number":77,"context_line":"                parent,"},{"line_number":78,"context_line":"                member_actions\u003d{"},{"line_number":79,"context_line":"                    pbe_ext.ACTIVATE_BINDING: \u0027PUT\u0027,"},{"line_number":80,"context_line":"                },"},{"line_number":81,"context_line":"                attr_map\u003dparams,"},{"line_number":82,"context_line":"            ))"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        return exts"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"ff346bd7_5a913e52","line":82,"range":{"start_line":61,"start_character":8,"end_line":82,"end_character":14},"updated":"2017-07-24 15:24:54.000000000","message":"Can we use resource_helper.build_resource_info?","commit_id":"45b7103de32373e8a138377f088157bcb86e20b0"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"560745627e0d5e51e8b95bfcdf3e692bdd855fed","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        params \u003d pbe_ext.SUB_RESOURCE_ATTRIBUTE_MAP.get(pbe_ext.BINDINGS)"},{"line_number":60,"context_line":"        exts \u003d []"},{"line_number":61,"context_line":"        controller \u003d base.create_resource("},{"line_number":62,"context_line":"            pbe_ext.BINDINGS,"},{"line_number":63,"context_line":"            pbe_ext.BINDING,"},{"line_number":64,"context_line":"            plugin,"},{"line_number":65,"context_line":"            params,"},{"line_number":66,"context_line":"            member_actions\u003d{"},{"line_number":67,"context_line":"                pbe_ext.ACTIVATE_BINDING: \u0027PUT\u0027,"},{"line_number":68,"context_line":"            },"},{"line_number":69,"context_line":"            parent\u003dparent,"},{"line_number":70,"context_line":"            allow_pagination\u003dTrue,"},{"line_number":71,"context_line":"            allow_sorting\u003dTrue,"},{"line_number":72,"context_line":"        )"},{"line_number":73,"context_line":"        exts.append("},{"line_number":74,"context_line":"            extensions.ResourceExtension("},{"line_number":75,"context_line":"                pbe_ext.BINDINGS,"},{"line_number":76,"context_line":"                controller,"},{"line_number":77,"context_line":"                parent,"},{"line_number":78,"context_line":"                member_actions\u003d{"},{"line_number":79,"context_line":"                    pbe_ext.ACTIVATE_BINDING: \u0027PUT\u0027,"},{"line_number":80,"context_line":"                },"},{"line_number":81,"context_line":"                attr_map\u003dparams,"},{"line_number":82,"context_line":"            ))"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        return exts"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"ff346bd7_ff26a1b7","line":82,"range":{"start_line":61,"start_character":8,"end_line":82,"end_character":14},"in_reply_to":"ff346bd7_5a913e52","updated":"2017-07-24 15:39:54.000000000","message":"I\u0027ll look at it, thanks :)","commit_id":"45b7103de32373e8a138377f088157bcb86e20b0"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"cd489a3e2198294ac5714308858a2c4bede46483","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        the request (as indicated by the context) as well as any filters."},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        :param context: neutron api request context"},{"line_number":106,"context_line":"        :param port_id: UUID representing the port to fetch."},{"line_number":107,"context_line":"        :param filters: a dictionary with keys that are valid keys for"},{"line_number":108,"context_line":"                        a port as listed in the  :obj:`RESOURCE_ATTRIBUTE_MAP`"},{"line_number":109,"context_line":"                        object in :file:`neutron/api/v2/attributes.py`. Values"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_7e6b4d1d","line":106,"range":{"start_line":106,"start_character":42,"end_line":106,"end_character":59},"updated":"2018-01-07 05:49:58.000000000","message":"Also fixed this","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"076720a69883376593a5305d063448c8792cd4d7","unresolved":false,"context_lines":[{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        :param context: neutron api request context"},{"line_number":106,"context_line":"        :param port_id: UUID representing the port to fetch."},{"line_number":107,"context_line":"        :param filters: a dictionary with keys that are valid keys for"},{"line_number":108,"context_line":"                        a port as listed in the  :obj:`RESOURCE_ATTRIBUTE_MAP`"},{"line_number":109,"context_line":"                        object in :file:`neutron/api/v2/attributes.py`. Values"},{"line_number":110,"context_line":"                        in this dictionary are an iterable containing values"},{"line_number":111,"context_line":"                        that will be used for an exact match comparison for"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_5498e5be","line":108,"range":{"start_line":107,"start_character":67,"end_line":108,"end_character":30},"updated":"2018-01-04 00:43:05.000000000","message":"you mean, for a port binding?","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"cd489a3e2198294ac5714308858a2c4bede46483","unresolved":false,"context_lines":[{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        :param context: neutron api request context"},{"line_number":106,"context_line":"        :param port_id: UUID representing the port to fetch."},{"line_number":107,"context_line":"        :param filters: a dictionary with keys that are valid keys for"},{"line_number":108,"context_line":"                        a port as listed in the  :obj:`RESOURCE_ATTRIBUTE_MAP`"},{"line_number":109,"context_line":"                        object in :file:`neutron/api/v2/attributes.py`. Values"},{"line_number":110,"context_line":"                        in this dictionary are an iterable containing values"},{"line_number":111,"context_line":"                        that will be used for an exact match comparison for"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_de15b99d","line":108,"range":{"start_line":107,"start_character":67,"end_line":108,"end_character":30},"in_reply_to":"9f91af0f_5498e5be","updated":"2018-01-07 05:49:58.000000000","message":"Done","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"076720a69883376593a5305d063448c8792cd4d7","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        :param port_id: UUID representing the port to fetch."},{"line_number":107,"context_line":"        :param filters: a dictionary with keys that are valid keys for"},{"line_number":108,"context_line":"                        a port as listed in the  :obj:`RESOURCE_ATTRIBUTE_MAP`"},{"line_number":109,"context_line":"                        object in :file:`neutron/api/v2/attributes.py`. Values"},{"line_number":110,"context_line":"                        in this dictionary are an iterable containing values"},{"line_number":111,"context_line":"                        that will be used for an exact match comparison for"},{"line_number":112,"context_line":"                        that value.  Each result returned by this function will"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_f4ec992a","line":109,"range":{"start_line":109,"start_character":41,"end_line":109,"end_character":68},"updated":"2018-01-04 00:43:05.000000000","message":"are those really listed in core attributes file and not in extension for bindings?","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"cd489a3e2198294ac5714308858a2c4bede46483","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        :param port_id: UUID representing the port to fetch."},{"line_number":107,"context_line":"        :param filters: a dictionary with keys that are valid keys for"},{"line_number":108,"context_line":"                        a port as listed in the  :obj:`RESOURCE_ATTRIBUTE_MAP`"},{"line_number":109,"context_line":"                        object in :file:`neutron/api/v2/attributes.py`. Values"},{"line_number":110,"context_line":"                        in this dictionary are an iterable containing values"},{"line_number":111,"context_line":"                        that will be used for an exact match comparison for"},{"line_number":112,"context_line":"                        that value.  Each result returned by this function will"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_3eee25b4","line":109,"range":{"start_line":109,"start_character":41,"end_line":109,"end_character":68},"in_reply_to":"9f91af0f_f4ec992a","updated":"2018-01-07 05:49:58.000000000","message":"Done","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"076720a69883376593a5305d063448c8792cd4d7","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        :param filters: a dictionary with keys that are valid keys for"},{"line_number":108,"context_line":"                        a port as listed in the  :obj:`RESOURCE_ATTRIBUTE_MAP`"},{"line_number":109,"context_line":"                        object in :file:`neutron/api/v2/attributes.py`. Values"},{"line_number":110,"context_line":"                        in this dictionary are an iterable containing values"},{"line_number":111,"context_line":"                        that will be used for an exact match comparison for"},{"line_number":112,"context_line":"                        that value.  Each result returned by this function will"},{"line_number":113,"context_line":"                        have matched one of the values for each key in filters."}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_f487b960","line":110,"range":{"start_line":110,"start_character":46,"end_line":110,"end_character":76},"updated":"2018-01-04 00:43:05.000000000","message":"I don\u0027t think that\u0027s always true. It may be an iterable for OR semantics, but it may also be a single value.","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"cd489a3e2198294ac5714308858a2c4bede46483","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        :param filters: a dictionary with keys that are valid keys for"},{"line_number":108,"context_line":"                        a port as listed in the  :obj:`RESOURCE_ATTRIBUTE_MAP`"},{"line_number":109,"context_line":"                        object in :file:`neutron/api/v2/attributes.py`. Values"},{"line_number":110,"context_line":"                        in this dictionary are an iterable containing values"},{"line_number":111,"context_line":"                        that will be used for an exact match comparison for"},{"line_number":112,"context_line":"                        that value.  Each result returned by this function will"},{"line_number":113,"context_line":"                        have matched one of the values for each key in filters."}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_de2cd903","line":110,"range":{"start_line":110,"start_character":46,"end_line":110,"end_character":76},"in_reply_to":"9f91af0f_f487b960","updated":"2018-01-07 05:49:58.000000000","message":"Done.","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"076720a69883376593a5305d063448c8792cd4d7","unresolved":false,"context_lines":[{"line_number":112,"context_line":"                        that value.  Each result returned by this function will"},{"line_number":113,"context_line":"                        have matched one of the values for each key in filters."},{"line_number":114,"context_line":"        :param fields: a list of strings that are valid keys in a"},{"line_number":115,"context_line":"                       port dictionary as listed in the"},{"line_number":116,"context_line":"                       :obj:`RESOURCE_ATTRIBUTE_MAP` object in"},{"line_number":117,"context_line":"                       :file:`neutron/api/v2/attributes.py`. Only these fields"},{"line_number":118,"context_line":"                       will be returned."}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_947e6d69","line":115,"range":{"start_line":115,"start_character":23,"end_line":115,"end_character":38},"updated":"2018-01-04 00:43:05.000000000","message":"you mean port binding dictionary?","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"cd489a3e2198294ac5714308858a2c4bede46483","unresolved":false,"context_lines":[{"line_number":112,"context_line":"                        that value.  Each result returned by this function will"},{"line_number":113,"context_line":"                        have matched one of the values for each key in filters."},{"line_number":114,"context_line":"        :param fields: a list of strings that are valid keys in a"},{"line_number":115,"context_line":"                       port dictionary as listed in the"},{"line_number":116,"context_line":"                       :obj:`RESOURCE_ATTRIBUTE_MAP` object in"},{"line_number":117,"context_line":"                       :file:`neutron/api/v2/attributes.py`. Only these fields"},{"line_number":118,"context_line":"                       will be returned."}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_fe1afdc9","line":115,"range":{"start_line":115,"start_character":23,"end_line":115,"end_character":38},"in_reply_to":"9f91af0f_947e6d69","updated":"2018-01-07 05:49:58.000000000","message":"Done","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"cd489a3e2198294ac5714308858a2c4bede46483","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                        have matched one of the values for each key in filters."},{"line_number":114,"context_line":"        :param fields: a list of strings that are valid keys in a"},{"line_number":115,"context_line":"                       port dictionary as listed in the"},{"line_number":116,"context_line":"                       :obj:`RESOURCE_ATTRIBUTE_MAP` object in"},{"line_number":117,"context_line":"                       :file:`neutron/api/v2/attributes.py`. Only these fields"},{"line_number":118,"context_line":"                       will be returned."},{"line_number":119,"context_line":"        \"\"\""},{"line_number":120,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_fe7f5ddd","line":117,"range":{"start_line":116,"start_character":23,"end_line":117,"end_character":59},"updated":"2018-01-07 05:49:58.000000000","message":"Also fixed this","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"076720a69883376593a5305d063448c8792cd4d7","unresolved":false,"context_lines":[{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        :param context: neutron api request context"},{"line_number":127,"context_line":"        :param host: str representing the host of the binding"},{"line_number":128,"context_line":"        :param port_id: UUID representing the port to fetch."},{"line_number":129,"context_line":"        :param fields: a list of strings that are valid keys in a port"},{"line_number":130,"context_line":"                       dictionary as listed in the"},{"line_number":131,"context_line":"                       :obj:`RESOURCE_ATTRIBUTE_MAP` object in"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_14925d9f","line":128,"range":{"start_line":128,"start_character":46,"end_line":128,"end_character":59},"updated":"2018-01-04 00:43:05.000000000","message":"the port for which to fetch the binding?","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"cd489a3e2198294ac5714308858a2c4bede46483","unresolved":false,"context_lines":[{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        :param context: neutron api request context"},{"line_number":127,"context_line":"        :param host: str representing the host of the binding"},{"line_number":128,"context_line":"        :param port_id: UUID representing the port to fetch."},{"line_number":129,"context_line":"        :param fields: a list of strings that are valid keys in a port"},{"line_number":130,"context_line":"                       dictionary as listed in the"},{"line_number":131,"context_line":"                       :obj:`RESOURCE_ATTRIBUTE_MAP` object in"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_3e1ce5bf","line":128,"range":{"start_line":128,"start_character":46,"end_line":128,"end_character":59},"in_reply_to":"9f91af0f_14925d9f","updated":"2018-01-07 05:49:58.000000000","message":"Fixed this one + the one in L106","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"076720a69883376593a5305d063448c8792cd4d7","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        :param context: neutron api request context"},{"line_number":127,"context_line":"        :param host: str representing the host of the binding"},{"line_number":128,"context_line":"        :param port_id: UUID representing the port to fetch."},{"line_number":129,"context_line":"        :param fields: a list of strings that are valid keys in a port"},{"line_number":130,"context_line":"                       dictionary as listed in the"},{"line_number":131,"context_line":"                       :obj:`RESOURCE_ATTRIBUTE_MAP` object in"},{"line_number":132,"context_line":"                      :file:`neutron/api/v2/attributes.py`. Only these fields"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_348d217b","line":129,"range":{"start_line":129,"start_character":66,"end_line":129,"end_character":70},"updated":"2018-01-04 00:43:05.000000000","message":"port binding?","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"cd489a3e2198294ac5714308858a2c4bede46483","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        :param context: neutron api request context"},{"line_number":127,"context_line":"        :param host: str representing the host of the binding"},{"line_number":128,"context_line":"        :param port_id: UUID representing the port to fetch."},{"line_number":129,"context_line":"        :param fields: a list of strings that are valid keys in a port"},{"line_number":130,"context_line":"                       dictionary as listed in the"},{"line_number":131,"context_line":"                       :obj:`RESOURCE_ATTRIBUTE_MAP` object in"},{"line_number":132,"context_line":"                      :file:`neutron/api/v2/attributes.py`. Only these fields"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_9e8091c1","line":129,"range":{"start_line":129,"start_character":66,"end_line":129,"end_character":70},"in_reply_to":"9f91af0f_348d217b","updated":"2018-01-07 05:49:58.000000000","message":"Done","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"cd489a3e2198294ac5714308858a2c4bede46483","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        :param host: str representing the host of the binding"},{"line_number":128,"context_line":"        :param port_id: UUID representing the port to fetch."},{"line_number":129,"context_line":"        :param fields: a list of strings that are valid keys in a port"},{"line_number":130,"context_line":"                       dictionary as listed in the"},{"line_number":131,"context_line":"                       :obj:`RESOURCE_ATTRIBUTE_MAP` object in"},{"line_number":132,"context_line":"                      :file:`neutron/api/v2/attributes.py`. Only these fields"},{"line_number":133,"context_line":"                       will be returned."},{"line_number":134,"context_line":"        \"\"\""},{"line_number":135,"context_line":"        pass"},{"line_number":136,"context_line":""}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_be8555d1","line":133,"range":{"start_line":130,"start_character":0,"end_line":133,"end_character":40},"updated":"2018-01-07 05:49:58.000000000","message":"Also fixed this","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"076720a69883376593a5305d063448c8792cd4d7","unresolved":false,"context_lines":[{"line_number":138,"context_line":"    def create_port_binding(self, context, port_id, binding):"},{"line_number":139,"context_line":"        \"\"\"Create a port binding."},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        Create a port, which is a connection point of a device (e.g., a VM"},{"line_number":142,"context_line":"        NIC) to attach to a L2 neutron network."},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        :param context: neutron api request context"},{"line_number":145,"context_line":"        :param port_id: UUID representing the port to fetch."}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_b4f611f9","line":142,"range":{"start_line":141,"start_character":8,"end_line":142,"end_character":47},"updated":"2018-01-04 00:43:05.000000000","message":"I don\u0027t think that\u0027s right","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"cd489a3e2198294ac5714308858a2c4bede46483","unresolved":false,"context_lines":[{"line_number":138,"context_line":"    def create_port_binding(self, context, port_id, binding):"},{"line_number":139,"context_line":"        \"\"\"Create a port binding."},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        Create a port, which is a connection point of a device (e.g., a VM"},{"line_number":142,"context_line":"        NIC) to attach to a L2 neutron network."},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        :param context: neutron api request context"},{"line_number":145,"context_line":"        :param port_id: UUID representing the port to fetch."}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_1e7481fd","line":142,"range":{"start_line":141,"start_character":8,"end_line":142,"end_character":47},"in_reply_to":"9f91af0f_b4f611f9","updated":"2018-01-07 05:49:58.000000000","message":"I removed this. L139 is enough","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"cd489a3e2198294ac5714308858a2c4bede46483","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        NIC) to attach to a L2 neutron network."},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        :param context: neutron api request context"},{"line_number":145,"context_line":"        :param port_id: UUID representing the port to fetch."},{"line_number":146,"context_line":"        :param binding: dictionary describing the port, with keys as"},{"line_number":147,"context_line":"                     listed in the"},{"line_number":148,"context_line":"                     :obj:`RESOURCE_ATTRIBUTE_MAP` object in"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_1e4d61c3","line":145,"range":{"start_line":145,"start_character":46,"end_line":145,"end_character":60},"updated":"2018-01-07 05:49:58.000000000","message":"Also fixed this","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"cd489a3e2198294ac5714308858a2c4bede46483","unresolved":false,"context_lines":[{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        :param context: neutron api request context"},{"line_number":145,"context_line":"        :param port_id: UUID representing the port to fetch."},{"line_number":146,"context_line":"        :param binding: dictionary describing the port, with keys as"},{"line_number":147,"context_line":"                     listed in the"},{"line_number":148,"context_line":"                     :obj:`RESOURCE_ATTRIBUTE_MAP` object in"},{"line_number":149,"context_line":"                     :file:`neutron/api/v2/attributes.py`.  All keys will be"},{"line_number":150,"context_line":"                     populated."},{"line_number":151,"context_line":"        \"\"\""},{"line_number":152,"context_line":"        pass"},{"line_number":153,"context_line":""}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_1ee241a1","line":150,"range":{"start_line":146,"start_character":51,"end_line":150,"end_character":31},"updated":"2018-01-07 05:49:58.000000000","message":"Also fixed this","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"cd489a3e2198294ac5714308858a2c4bede46483","unresolved":false,"context_lines":[{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        :param context: neutron api request context"},{"line_number":159,"context_line":"        :param host: str representing the host_id of the binding to update."},{"line_number":160,"context_line":"        :param port_id: UUID representing the port to fetch."},{"line_number":161,"context_line":"        :param binding: dictionary with keys indicating fields to update."},{"line_number":162,"context_line":"                     valid keys are those that have a value of True for"},{"line_number":163,"context_line":"                   \u0027allow_put\u0027 as listed in the :obj:`RESOURCE_ATTRIBUTE_MAP`"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_fef67d63","line":160,"range":{"start_line":160,"start_character":46,"end_line":160,"end_character":60},"updated":"2018-01-07 05:49:58.000000000","message":"Also fixed this","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"cd489a3e2198294ac5714308858a2c4bede46483","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        :param context: neutron api request context"},{"line_number":159,"context_line":"        :param host: str representing the host_id of the binding to update."},{"line_number":160,"context_line":"        :param port_id: UUID representing the port to fetch."},{"line_number":161,"context_line":"        :param binding: dictionary with keys indicating fields to update."},{"line_number":162,"context_line":"                     valid keys are those that have a value of True for"},{"line_number":163,"context_line":"                   \u0027allow_put\u0027 as listed in the :obj:`RESOURCE_ATTRIBUTE_MAP`"},{"line_number":164,"context_line":"                     object in :file:`neutron/api/v2/attributes.py`."},{"line_number":165,"context_line":"        \"\"\""},{"line_number":166,"context_line":"        pass"},{"line_number":167,"context_line":""}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_3ef86547","line":164,"range":{"start_line":161,"start_character":24,"end_line":164,"end_character":68},"updated":"2018-01-07 05:49:58.000000000","message":"Also fixed this","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"cd489a3e2198294ac5714308858a2c4bede46483","unresolved":false,"context_lines":[{"line_number":169,"context_line":"    def activate(self, context, port_id, host):"},{"line_number":170,"context_line":"        \"\"\"Activate a port binding."},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        Activate a compute binding that is inactive and deactivate"},{"line_number":173,"context_line":"        the existing active binding."},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"        :param context: neutron api request context"},{"line_number":176,"context_line":"        :param port_id: UUID representing the port to fetch."}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_fe9bdd14","line":173,"range":{"start_line":172,"start_character":8,"end_line":173,"end_character":36},"updated":"2018-01-07 05:49:58.000000000","message":"Fixed this","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"cd489a3e2198294ac5714308858a2c4bede46483","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        the existing active binding."},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"        :param context: neutron api request context"},{"line_number":176,"context_line":"        :param port_id: UUID representing the port to fetch."},{"line_number":177,"context_line":"        :param host: str representing the host of the binding."},{"line_number":178,"context_line":"        \"\"\""},{"line_number":179,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_bea1d548","line":176,"range":{"start_line":176,"start_character":24,"end_line":176,"end_character":60},"updated":"2018-01-07 05:49:58.000000000","message":"Fixed this","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"cd489a3e2198294ac5714308858a2c4bede46483","unresolved":false,"context_lines":[{"line_number":184,"context_line":""},{"line_number":185,"context_line":"        :param context: neutron api request context"},{"line_number":186,"context_line":"        :param host: str representing the host of the binding to delete,"},{"line_number":187,"context_line":"        :param port_id: UUID representing the port to fetch."},{"line_number":188,"context_line":"        \"\"\""},{"line_number":189,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_5e8a09bf","line":187,"range":{"start_line":187,"start_character":46,"end_line":187,"end_character":60},"updated":"2018-01-07 05:49:58.000000000","message":"Fixed this","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7a3cf9cb8153e0979280879d248a79577a31f583","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":86,"context_line":"class PortBindingExtendedPluginBase(service_base.ServicePluginBase):"},{"line_number":87,"context_line":"    \"\"\"REST API to operate the PortBinding Extended.\"\"\""},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def get_plugin_description(self):"}],"source_content_type":"text/x-python","patch_set":57,"id":"df7087c5_853d8e90","line":86,"range":{"start_line":86,"start_character":6,"end_line":86,"end_character":35},"updated":"2018-03-13 20:02:12.000000000","message":"Doesn\u0027t look like this is used.","commit_id":"1a686ead1aa00b9707795c45db348a18645d7ab0"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"3ec46b55b02480cd58190ae7e837722b21e7e185","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":86,"context_line":"class PortBindingExtendedPluginBase(service_base.ServicePluginBase):"},{"line_number":87,"context_line":"    \"\"\"REST API to operate the PortBinding Extended.\"\"\""},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def get_plugin_description(self):"}],"source_content_type":"text/x-python","patch_set":57,"id":"bf659307_6e86b0de","line":86,"range":{"start_line":86,"start_character":6,"end_line":86,"end_character":35},"in_reply_to":"bf659307_dec0782d","updated":"2018-04-05 04:45:57.000000000","message":"Removed","commit_id":"1a686ead1aa00b9707795c45db348a18645d7ab0"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ffec4ba7a684de61b488d31825f3e3c25028464d","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":86,"context_line":"class PortBindingExtendedPluginBase(service_base.ServicePluginBase):"},{"line_number":87,"context_line":"    \"\"\"REST API to operate the PortBinding Extended.\"\"\""},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def get_plugin_description(self):"}],"source_content_type":"text/x-python","patch_set":57,"id":"bf659307_dec0782d","line":86,"range":{"start_line":86,"start_character":6,"end_line":86,"end_character":35},"in_reply_to":"df7087c5_853d8e90","updated":"2018-03-27 21:33:47.000000000","message":"Indeed the feature will be part of core plugin and so it shouldn\u0027t have the service plugin base class. We may need to have something to define expected interface and make it a parent for ml2 plugin, but we shouldn\u0027t inherit the interface class from service plugin base because the latter provides unneeded methods like add_workers.","commit_id":"1a686ead1aa00b9707795c45db348a18645d7ab0"}],"neutron/extensions/portbindings_extended_lib.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"0c19d9a558ac45fb0c6282064cc8d13ea7e55ae5","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":29,"id":"5f4e5783_3a1be481","updated":"2017-10-12 20:03:54.000000000","message":"Why You need this additional file? Can\u0027t it be all in portbindings_extended.py ?","commit_id":"4ebe4fa0cb21ec5e45a0f5e4cb4ebe0b9e936022"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"3342b50fd3ab4dc0dd23a192435cc80c1ab67499","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":29,"id":"5f4e5783_6f972aee","in_reply_to":"5f4e5783_3a1be481","updated":"2017-10-15 22:34:18.000000000","message":"Please see comment in L16-17","commit_id":"4ebe4fa0cb21ec5e45a0f5e4cb4ebe0b9e936022"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"076720a69883376593a5305d063448c8792cd4d7","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"\"\"\""},{"line_number":16,"context_line":"This module should be deleted once neutron-lib containing"},{"line_number":17,"context_line":"https://review.openstack.org/#/c/484389 change is released."},{"line_number":18,"context_line":"\"\"\""},{"line_number":19,"context_line":""}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_d4d2b55c","line":16,"updated":"2018-01-04 00:43:05.000000000","message":"it\u0027s in 1.10.0+","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"cd489a3e2198294ac5714308858a2c4bede46483","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"\"\"\""},{"line_number":16,"context_line":"This module should be deleted once neutron-lib containing"},{"line_number":17,"context_line":"https://review.openstack.org/#/c/484389 change is released."},{"line_number":18,"context_line":"\"\"\""},{"line_number":19,"context_line":""}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_debff95e","line":16,"in_reply_to":"9f91af0f_d4d2b55c","updated":"2018-01-07 05:49:58.000000000","message":"Removed in the next revision","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"533527014987bb1f2c2c26b0d1040b5dff62d832","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"\"\"\""},{"line_number":16,"context_line":"This module should be deleted once neutron-lib containing"},{"line_number":17,"context_line":"https://review.openstack.org/#/c/484389 change is released."},{"line_number":18,"context_line":"\"\"\""},{"line_number":19,"context_line":""}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_ac752acd","line":16,"in_reply_to":"9f91af0f_debff95e","updated":"2018-01-09 04:20:46.000000000","message":"removed in PS50","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"}],"neutron/objects/ports.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"87dc356cd8c584161409021bbf6b34151369c059","unresolved":false,"context_lines":[{"line_number":272,"context_line":"        \u0027allowed_address_pairs\u0027: obj_fields.ListOfObjectsField("},{"line_number":273,"context_line":"            \u0027AllowedAddressPair\u0027, nullable\u003dTrue"},{"line_number":274,"context_line":"        ),"},{"line_number":275,"context_line":"        \u0027binding\u0027: obj_fields.ListOfObjectsField("},{"line_number":276,"context_line":"            \u0027PortBinding\u0027, nullable\u003dTrue"},{"line_number":277,"context_line":"        ),"},{"line_number":278,"context_line":"        \u0027data_plane_status\u0027: obj_fields.ObjectField("}],"source_content_type":"text/x-python","patch_set":64,"id":"5f7c97a3_c5a59da3","line":275,"updated":"2018-05-14 20:47:45.000000000","message":"this should be renamed too. otherwise if we need to resolve it later, we\u0027ll need to produce yet another RPC version to broadcast to agents, which is a waste.","commit_id":"076573cd16d4572c9cff5ae069034c0434340e85"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"5694dcef1da145959278ed17ff861742aa91eeac","unresolved":false,"context_lines":[{"line_number":272,"context_line":"        \u0027allowed_address_pairs\u0027: obj_fields.ListOfObjectsField("},{"line_number":273,"context_line":"            \u0027AllowedAddressPair\u0027, nullable\u003dTrue"},{"line_number":274,"context_line":"        ),"},{"line_number":275,"context_line":"        \u0027binding\u0027: obj_fields.ListOfObjectsField("},{"line_number":276,"context_line":"            \u0027PortBinding\u0027, nullable\u003dTrue"},{"line_number":277,"context_line":"        ),"},{"line_number":278,"context_line":"        \u0027data_plane_status\u0027: obj_fields.ObjectField("}],"source_content_type":"text/x-python","patch_set":64,"id":"5f7c97a3_5bd05b2c","line":275,"in_reply_to":"5f7c97a3_0af4c7ce","updated":"2018-06-03 22:17:36.000000000","message":"Taken care of in https://review.openstack.org/#/c/571041, which depends on this patch","commit_id":"076573cd16d4572c9cff5ae069034c0434340e85"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"943ac62ff6694dd25e8a3177c8aa94603dd606a4","unresolved":false,"context_lines":[{"line_number":272,"context_line":"        \u0027allowed_address_pairs\u0027: obj_fields.ListOfObjectsField("},{"line_number":273,"context_line":"            \u0027AllowedAddressPair\u0027, nullable\u003dTrue"},{"line_number":274,"context_line":"        ),"},{"line_number":275,"context_line":"        \u0027binding\u0027: obj_fields.ListOfObjectsField("},{"line_number":276,"context_line":"            \u0027PortBinding\u0027, nullable\u003dTrue"},{"line_number":277,"context_line":"        ),"},{"line_number":278,"context_line":"        \u0027data_plane_status\u0027: obj_fields.ObjectField("}],"source_content_type":"text/x-python","patch_set":64,"id":"5f7c97a3_0af4c7ce","line":275,"in_reply_to":"5f7c97a3_55b4d67f","updated":"2018-05-17 08:50:14.000000000","message":"+1","commit_id":"076573cd16d4572c9cff5ae069034c0434340e85"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"ecd7f0ceca8ed4ae06272be4232dfdc8efaaaaa4","unresolved":false,"context_lines":[{"line_number":272,"context_line":"        \u0027allowed_address_pairs\u0027: obj_fields.ListOfObjectsField("},{"line_number":273,"context_line":"            \u0027AllowedAddressPair\u0027, nullable\u003dTrue"},{"line_number":274,"context_line":"        ),"},{"line_number":275,"context_line":"        \u0027binding\u0027: obj_fields.ListOfObjectsField("},{"line_number":276,"context_line":"            \u0027PortBinding\u0027, nullable\u003dTrue"},{"line_number":277,"context_line":"        ),"},{"line_number":278,"context_line":"        \u0027data_plane_status\u0027: obj_fields.ObjectField("}],"source_content_type":"text/x-python","patch_set":64,"id":"5f7c97a3_55b4d67f","line":275,"in_reply_to":"5f7c97a3_c5a59da3","updated":"2018-05-15 07:54:56.000000000","message":"I agree that it could be renamed to \"bindings\" now also","commit_id":"076573cd16d4572c9cff5ae069034c0434340e85"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ee8a09ea15f0fa0c8afbac4bca472ffc74d586ab","unresolved":false,"context_lines":[{"line_number":474,"context_line":"            bindings \u003d primitive.pop(\u0027distributed_bindings\u0027, [])"},{"line_number":475,"context_line":"            primitive[\u0027distributed_binding\u0027] \u003d (bindings[0]"},{"line_number":476,"context_line":"                                                if bindings else None)"},{"line_number":477,"context_line":"        if _target_version \u003c (1, 4):"},{"line_number":478,"context_line":"            if \u0027binding\u0027 in primitive:"},{"line_number":479,"context_line":"                original_binding \u003d primitive[\u0027binding\u0027]"},{"line_number":480,"context_line":"                primitive[\u0027binding\u0027] \u003d None"}],"source_content_type":"text/x-python","patch_set":70,"id":"5f7c97a3_1ed276d0","line":477,"updated":"2018-07-02 15:04:31.000000000","message":"nit: would probably be good to have a comment on the logic in this conversion block; I think the net is, you\u0027re looking for the single active binding to use.","commit_id":"ce0f63e393c3f0cecb9f7e277b00415dcdd76869"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"41bd202161ca9ff7a79443219e29c086d61003f5","unresolved":false,"context_lines":[{"line_number":474,"context_line":"            bindings \u003d primitive.pop(\u0027distributed_bindings\u0027, [])"},{"line_number":475,"context_line":"            primitive[\u0027distributed_binding\u0027] \u003d (bindings[0]"},{"line_number":476,"context_line":"                                                if bindings else None)"},{"line_number":477,"context_line":"        if _target_version \u003c (1, 4):"},{"line_number":478,"context_line":"            if \u0027binding\u0027 in primitive:"},{"line_number":479,"context_line":"                original_binding \u003d primitive[\u0027binding\u0027]"},{"line_number":480,"context_line":"                primitive[\u0027binding\u0027] \u003d None"}],"source_content_type":"text/x-python","patch_set":70,"id":"5f7c97a3_642bd8e9","line":477,"in_reply_to":"5f7c97a3_1ed276d0","updated":"2018-07-02 17:06:40.000000000","message":"Done","commit_id":"ce0f63e393c3f0cecb9f7e277b00415dcdd76869"}],"neutron/plugins/common/constants.py":[{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"4f550b0b0a8de20b3ee63a608ed8fdc4eef0de88","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    \u0027network_ip_availability\u0027: \u0027network-ip-availability\u0027,"},{"line_number":50,"context_line":"    \u0027flavors\u0027: \u0027flavors\u0027,"},{"line_number":51,"context_line":"    \u0027revisions\u0027: \u0027revisions\u0027,"},{"line_number":52,"context_line":"    \u0027bindings\u0027: \u0027bindings_extended\u0027"},{"line_number":53,"context_line":"}"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"# Service operation status constants"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a461143_bed6a8ee","line":52,"updated":"2017-01-31 00:36:15.000000000","message":"the key in this dictionary is a supposed to reference an entry in the entry points section of the setup.cfg.  This is missing and is the main cause of the failures.\n\nhttps://github.com/openstack/neutron/blob/master/setup.cfg#L71-L83\n\nAfter adding that entry (and rerunning python setup.py develop to update), i see other errors that I will comment on in the relevant files.","commit_id":"8cfafefb1a771cf52e50f937e2d7073af8133982"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"81b4f1975af6b5ff0697b133daeb40490342de70","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    \u0027network_ip_availability\u0027: \u0027network-ip-availability\u0027,"},{"line_number":50,"context_line":"    \u0027flavors\u0027: \u0027flavors\u0027,"},{"line_number":51,"context_line":"    \u0027revisions\u0027: \u0027revisions\u0027,"},{"line_number":52,"context_line":"    \u0027bindings\u0027: \u0027bindings_extended\u0027"},{"line_number":53,"context_line":"}"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"# Service operation status constants"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a461143_614d3cc4","line":52,"in_reply_to":"3a461143_bed6a8ee","updated":"2017-02-01 15:36:03.000000000","message":"Added it","commit_id":"8cfafefb1a771cf52e50f937e2d7073af8133982"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"bd463a3b8b482086207465a9dae0df3f79aafa1d","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    \u0027network_ip_availability\u0027: \u0027network-ip-availability\u0027,"},{"line_number":51,"context_line":"    \u0027flavors\u0027: \u0027flavors\u0027,"},{"line_number":52,"context_line":"    \u0027revisions\u0027: \u0027revisions\u0027,"},{"line_number":53,"context_line":"    \u0027bindings\u0027: \u0027bindings-extended\u0027"},{"line_number":54,"context_line":"}"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"# Service operation status constants"}],"source_content_type":"text/x-python","patch_set":28,"id":"ff346bd7_f367d150","line":53,"range":{"start_line":53,"start_character":5,"end_line":53,"end_character":13},"updated":"2017-07-25 15:54:48.000000000","message":"\u0027bindings_extended\u0027: \u0027bindings-extended\u0027","commit_id":"45b7103de32373e8a138377f088157bcb86e20b0"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"c63fe2afc34a4bea86509b41b5b41f67e57d3e05","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    \u0027network_ip_availability\u0027: \u0027network-ip-availability\u0027,"},{"line_number":51,"context_line":"    \u0027flavors\u0027: \u0027flavors\u0027,"},{"line_number":52,"context_line":"    \u0027revisions\u0027: \u0027revisions\u0027,"},{"line_number":53,"context_line":"    \u0027bindings\u0027: \u0027bindings-extended\u0027"},{"line_number":54,"context_line":"}"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"# Service operation status constants"}],"source_content_type":"text/x-python","patch_set":28,"id":"ff346bd7_5a0a5e26","line":53,"range":{"start_line":53,"start_character":4,"end_line":53,"end_character":35},"updated":"2017-07-24 15:24:54.000000000","message":"Is it default service plugin? If so, it means that portbindings is default as well because portbindings_extended requires portbindings.","commit_id":"45b7103de32373e8a138377f088157bcb86e20b0"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"560745627e0d5e51e8b95bfcdf3e692bdd855fed","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    \u0027network_ip_availability\u0027: \u0027network-ip-availability\u0027,"},{"line_number":51,"context_line":"    \u0027flavors\u0027: \u0027flavors\u0027,"},{"line_number":52,"context_line":"    \u0027revisions\u0027: \u0027revisions\u0027,"},{"line_number":53,"context_line":"    \u0027bindings\u0027: \u0027bindings-extended\u0027"},{"line_number":54,"context_line":"}"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"# Service operation status constants"}],"source_content_type":"text/x-python","patch_set":28,"id":"ff346bd7_3fa0a9f4","line":53,"range":{"start_line":53,"start_character":4,"end_line":53,"end_character":35},"in_reply_to":"ff346bd7_5a0a5e26","updated":"2017-07-24 15:39:54.000000000","message":"I\u0027ll have a look whether it makes sense to make portbindings default.","commit_id":"45b7103de32373e8a138377f088157bcb86e20b0"}],"neutron/plugins/common/utils.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"076720a69883376593a5305d063448c8792cd4d7","unresolved":false,"context_lines":[{"line_number":250,"context_line":"    return new_name"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"def get_port_binding_by_status(bindings,"},{"line_number":254,"context_line":"                               status\u003dconstants.PORT_BINDING_STATUS_ACTIVE):"},{"line_number":255,"context_line":"    \"\"\"Return the active binding in a list of port bindings.\"\"\""},{"line_number":256,"context_line":"    if isinstance(bindings, list):"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_59e25e03","line":253,"updated":"2018-01-04 00:43:05.000000000","message":"nit: no unit tests targeting the new function","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"2fa3835a4bcbca8502c7d489fab2ba243b2c92f9","unresolved":false,"context_lines":[{"line_number":250,"context_line":"    return new_name"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"def get_port_binding_by_status(bindings,"},{"line_number":254,"context_line":"                               status\u003dconstants.PORT_BINDING_STATUS_ACTIVE):"},{"line_number":255,"context_line":"    \"\"\"Return the active binding in a list of port bindings.\"\"\""},{"line_number":256,"context_line":"    if isinstance(bindings, list):"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_8c6b86b5","line":253,"in_reply_to":"9f91af0f_59e25e03","updated":"2018-01-08 03:55:34.000000000","message":"I will add unit tests in PS52","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"5135f9f66d513c8e645303892d35b8a89c319027","unresolved":false,"context_lines":[{"line_number":250,"context_line":"    return new_name"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"def get_port_binding_by_status(bindings,"},{"line_number":254,"context_line":"                               status\u003dconstants.PORT_BINDING_STATUS_ACTIVE):"},{"line_number":255,"context_line":"    \"\"\"Return the active binding in a list of port bindings.\"\"\""},{"line_number":256,"context_line":"    if isinstance(bindings, list):"}],"source_content_type":"text/x-python","patch_set":49,"id":"7f96bb07_7f65e4e0","line":253,"in_reply_to":"9f91af0f_8c6b86b5","updated":"2018-01-22 02:51:27.000000000","message":"Unit tests were added and will be uploaded in PS54 after we decide what to do with https://review.openstack.org/#/c/407868/. At this point I cannot push PS54 without rebasing to account for https://review.openstack.org/#/c/407868/","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"076720a69883376593a5305d063448c8792cd4d7","unresolved":false,"context_lines":[{"line_number":252,"context_line":""},{"line_number":253,"context_line":"def get_port_binding_by_status(bindings,"},{"line_number":254,"context_line":"                               status\u003dconstants.PORT_BINDING_STATUS_ACTIVE):"},{"line_number":255,"context_line":"    \"\"\"Return the active binding in a list of port bindings.\"\"\""},{"line_number":256,"context_line":"    if isinstance(bindings, list):"},{"line_number":257,"context_line":"        for binding in bindings:"},{"line_number":258,"context_line":"            if binding[pbe_ext.STATUS] \u003d\u003d status:"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_591d7e0d","line":255,"range":{"start_line":255,"start_character":33,"end_line":255,"end_character":49},"updated":"2018-01-04 00:43:05.000000000","message":"if the docstring assumes that it\u0027s always a list, why do we need to check with isinstance?","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"2fa3835a4bcbca8502c7d489fab2ba243b2c92f9","unresolved":false,"context_lines":[{"line_number":252,"context_line":""},{"line_number":253,"context_line":"def get_port_binding_by_status(bindings,"},{"line_number":254,"context_line":"                               status\u003dconstants.PORT_BINDING_STATUS_ACTIVE):"},{"line_number":255,"context_line":"    \"\"\"Return the active binding in a list of port bindings.\"\"\""},{"line_number":256,"context_line":"    if isinstance(bindings, list):"},{"line_number":257,"context_line":"        for binding in bindings:"},{"line_number":258,"context_line":"            if binding[pbe_ext.STATUS] \u003d\u003d status:"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_cca2eefc","line":255,"range":{"start_line":255,"start_character":33,"end_line":255,"end_character":49},"in_reply_to":"9f91af0f_591d7e0d","updated":"2018-01-08 03:55:34.000000000","message":"I am changing the implementation of this function so there won\u0027t be need to do the isinstance check. Also updating the docstring","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"076720a69883376593a5305d063448c8792cd4d7","unresolved":false,"context_lines":[{"line_number":253,"context_line":"def get_port_binding_by_status(bindings,"},{"line_number":254,"context_line":"                               status\u003dconstants.PORT_BINDING_STATUS_ACTIVE):"},{"line_number":255,"context_line":"    \"\"\"Return the active binding in a list of port bindings.\"\"\""},{"line_number":256,"context_line":"    if isinstance(bindings, list):"},{"line_number":257,"context_line":"        for binding in bindings:"},{"line_number":258,"context_line":"            if binding[pbe_ext.STATUS] \u003d\u003d status:"},{"line_number":259,"context_line":"                return binding"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_79288233","line":256,"range":{"start_line":256,"start_character":28,"end_line":256,"end_character":32},"updated":"2018-01-04 00:43:05.000000000","message":"nit: should probably work with any iterable like set too","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"2fa3835a4bcbca8502c7d489fab2ba243b2c92f9","unresolved":false,"context_lines":[{"line_number":253,"context_line":"def get_port_binding_by_status(bindings,"},{"line_number":254,"context_line":"                               status\u003dconstants.PORT_BINDING_STATUS_ACTIVE):"},{"line_number":255,"context_line":"    \"\"\"Return the active binding in a list of port bindings.\"\"\""},{"line_number":256,"context_line":"    if isinstance(bindings, list):"},{"line_number":257,"context_line":"        for binding in bindings:"},{"line_number":258,"context_line":"            if binding[pbe_ext.STATUS] \u003d\u003d status:"},{"line_number":259,"context_line":"                return binding"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_8e029e3c","line":256,"range":{"start_line":256,"start_character":28,"end_line":256,"end_character":32},"in_reply_to":"9f91af0f_79288233","updated":"2018-01-08 03:55:34.000000000","message":"In this case (and only in this case) https://review.openstack.org/#/c/414251/50/neutron/plugins/ml2/plugin.py@240, port might not have a port_binding attribute. Since both you and Slaweq are concerned about it, I am changing the getattr in https://review.openstack.org/#/c/414251/50/neutron/plugins/ml2/plugin.py@240, so if port doesn\u0027t have a port_binding attribute, [] is passed to this function. In other words, this function will always receive an iterable","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"076720a69883376593a5305d063448c8792cd4d7","unresolved":false,"context_lines":[{"line_number":255,"context_line":"    \"\"\"Return the active binding in a list of port bindings.\"\"\""},{"line_number":256,"context_line":"    if isinstance(bindings, list):"},{"line_number":257,"context_line":"        for binding in bindings:"},{"line_number":258,"context_line":"            if binding[pbe_ext.STATUS] \u003d\u003d status:"},{"line_number":259,"context_line":"                return binding"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_59901e4f","line":258,"updated":"2018-01-04 00:43:05.000000000","message":"what if multiple bindings satisfy the status requirement? should we return a list maybe and allow callers to decide what to do with multiple results? (I believe it\u0027s not possible for ACTIVE but a valid case for other states?)","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"2fa3835a4bcbca8502c7d489fab2ba243b2c92f9","unresolved":false,"context_lines":[{"line_number":255,"context_line":"    \"\"\"Return the active binding in a list of port bindings.\"\"\""},{"line_number":256,"context_line":"    if isinstance(bindings, list):"},{"line_number":257,"context_line":"        for binding in bindings:"},{"line_number":258,"context_line":"            if binding[pbe_ext.STATUS] \u003d\u003d status:"},{"line_number":259,"context_line":"                return binding"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_8c9946c5","line":258,"in_reply_to":"9f91af0f_59901e4f","updated":"2018-01-08 03:55:34.000000000","message":"Returning a list for the inactive bindings brings me to square number 1 in the caller code. Now I have to select (in several places) among several bindings. So I am changing this function to receive a status and an optional host argument. It will always return one binding: the active one, the first inactive one found or the inactive one identified by host","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"be60ff0b664727cd521c390151c3a25dcad51221","unresolved":false,"context_lines":[{"line_number":251,"context_line":""},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"def get_port_binding_by_status(bindings,"},{"line_number":254,"context_line":"                               status\u003dconstants.PORT_BINDING_STATUS_ACTIVE):"},{"line_number":255,"context_line":"    \"\"\"Return the active binding in a list of port bindings.\"\"\""},{"line_number":256,"context_line":"    if isinstance(bindings, list):"},{"line_number":257,"context_line":"        for binding in bindings:"}],"source_content_type":"text/x-python","patch_set":50,"id":"9f91af0f_04d9947d","line":254,"updated":"2018-01-07 09:58:31.000000000","message":"personally I would not set default value for \"status\" here as it is \"most important\" parameter in this function IMO and e.g. in neutron/plugins/ml2/plugin.py when this function is used, status is not gave explicit as attribute which can be little bit confusing for reader of neutron/plugins/ml2/plugin.py because he will have to check definition of it somewhere else","commit_id":"d7d50d961eea0b324ef0ea29ca9cdc0ddc865c00"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"2fa3835a4bcbca8502c7d489fab2ba243b2c92f9","unresolved":false,"context_lines":[{"line_number":251,"context_line":""},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"def get_port_binding_by_status(bindings,"},{"line_number":254,"context_line":"                               status\u003dconstants.PORT_BINDING_STATUS_ACTIVE):"},{"line_number":255,"context_line":"    \"\"\"Return the active binding in a list of port bindings.\"\"\""},{"line_number":256,"context_line":"    if isinstance(bindings, list):"},{"line_number":257,"context_line":"        for binding in bindings:"}],"source_content_type":"text/x-python","patch_set":50,"id":"9f91af0f_eec80a23","line":254,"in_reply_to":"9f91af0f_04d9947d","updated":"2018-01-08 03:55:34.000000000","message":"This is a good point. Done","commit_id":"d7d50d961eea0b324ef0ea29ca9cdc0ddc865c00"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"be60ff0b664727cd521c390151c3a25dcad51221","unresolved":false,"context_lines":[{"line_number":253,"context_line":"def get_port_binding_by_status(bindings,"},{"line_number":254,"context_line":"                               status\u003dconstants.PORT_BINDING_STATUS_ACTIVE):"},{"line_number":255,"context_line":"    \"\"\"Return the active binding in a list of port bindings.\"\"\""},{"line_number":256,"context_line":"    if isinstance(bindings, list):"},{"line_number":257,"context_line":"        for binding in bindings:"},{"line_number":258,"context_line":"            if binding[pbe_ext.STATUS] \u003d\u003d status:"},{"line_number":259,"context_line":"                return binding"}],"source_content_type":"text/x-python","patch_set":50,"id":"9f91af0f_e4ea700d","line":256,"updated":"2018-01-07 09:58:31.000000000","message":"what is this check for? Do You expect that \"bindings\" can sometimes be something else (OVO object?)? If so maybe You should return this binding object instead of returning nothing in such case?","commit_id":"d7d50d961eea0b324ef0ea29ca9cdc0ddc865c00"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"2fa3835a4bcbca8502c7d489fab2ba243b2c92f9","unresolved":false,"context_lines":[{"line_number":253,"context_line":"def get_port_binding_by_status(bindings,"},{"line_number":254,"context_line":"                               status\u003dconstants.PORT_BINDING_STATUS_ACTIVE):"},{"line_number":255,"context_line":"    \"\"\"Return the active binding in a list of port bindings.\"\"\""},{"line_number":256,"context_line":"    if isinstance(bindings, list):"},{"line_number":257,"context_line":"        for binding in bindings:"},{"line_number":258,"context_line":"            if binding[pbe_ext.STATUS] \u003d\u003d status:"},{"line_number":259,"context_line":"                return binding"}],"source_content_type":"text/x-python","patch_set":50,"id":"9f91af0f_4edfb6d5","line":256,"in_reply_to":"9f91af0f_e4ea700d","updated":"2018-01-08 03:55:34.000000000","message":"In this case (and only in this case) https://review.openstack.org/#/c/414251/50/neutron/plugins/ml2/plugin.py@240, port might not have a port_binding attribute. Since both you and Ihar are concerned about it, I am changing the getattr in https://review.openstack.org/#/c/414251/50/neutron/plugins/ml2/plugin.py@240, so if port doesn\u0027t have a port_binding attribute, [] is passed to this function. In other words, this function will always receive an iterable","commit_id":"d7d50d961eea0b324ef0ea29ca9cdc0ddc865c00"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ffec4ba7a684de61b488d31825f3e3c25028464d","unresolved":false,"context_lines":[{"line_number":260,"context_line":"    will be returned. If no binding is found with the specified status and"},{"line_number":261,"context_line":"    host, None is returned"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"    :param bindings: An interable containing port bindings"},{"line_number":264,"context_line":"    :param status: The status of the port binding to return. Possible values"},{"line_number":265,"context_line":"                   are PORT_BINDING_STATUS_ACTIVE or"},{"line_number":266,"context_line":"                   PORT_BINDING_STATUS_INACTIVE as defined in"}],"source_content_type":"text/x-python","patch_set":57,"id":"bf659307_deee38b3","line":263,"range":{"start_line":263,"start_character":24,"end_line":263,"end_character":33},"updated":"2018-03-27 21:33:47.000000000","message":"iterable","commit_id":"1a686ead1aa00b9707795c45db348a18645d7ab0"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"3ec46b55b02480cd58190ae7e837722b21e7e185","unresolved":false,"context_lines":[{"line_number":260,"context_line":"    will be returned. If no binding is found with the specified status and"},{"line_number":261,"context_line":"    host, None is returned"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"    :param bindings: An interable containing port bindings"},{"line_number":264,"context_line":"    :param status: The status of the port binding to return. Possible values"},{"line_number":265,"context_line":"                   are PORT_BINDING_STATUS_ACTIVE or"},{"line_number":266,"context_line":"                   PORT_BINDING_STATUS_INACTIVE as defined in"}],"source_content_type":"text/x-python","patch_set":57,"id":"bf659307_ae65a847","line":263,"range":{"start_line":263,"start_character":24,"end_line":263,"end_character":33},"in_reply_to":"bf659307_deee38b3","updated":"2018-04-05 04:45:57.000000000","message":"Done","commit_id":"1a686ead1aa00b9707795c45db348a18645d7ab0"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ffec4ba7a684de61b488d31825f3e3c25028464d","unresolved":false,"context_lines":[{"line_number":264,"context_line":"    :param status: The status of the port binding to return. Possible values"},{"line_number":265,"context_line":"                   are PORT_BINDING_STATUS_ACTIVE or"},{"line_number":266,"context_line":"                   PORT_BINDING_STATUS_INACTIVE as defined in"},{"line_number":267,"context_line":"                   :file:`neutron/common/constants.py`."},{"line_number":268,"context_line":"    :param host: str representing the host of the binding to return."},{"line_number":269,"context_line":"    \"\"\""},{"line_number":270,"context_line":"    for binding in bindings:"}],"source_content_type":"text/x-python","patch_set":57,"id":"bf659307_1e3a7033","line":267,"range":{"start_line":267,"start_character":25,"end_line":267,"end_character":53},"updated":"2018-03-27 21:33:47.000000000","message":"maybe better to remove those and refer to neutron-lib symbols instead since those are public.","commit_id":"1a686ead1aa00b9707795c45db348a18645d7ab0"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"3ec46b55b02480cd58190ae7e837722b21e7e185","unresolved":false,"context_lines":[{"line_number":264,"context_line":"    :param status: The status of the port binding to return. Possible values"},{"line_number":265,"context_line":"                   are PORT_BINDING_STATUS_ACTIVE or"},{"line_number":266,"context_line":"                   PORT_BINDING_STATUS_INACTIVE as defined in"},{"line_number":267,"context_line":"                   :file:`neutron/common/constants.py`."},{"line_number":268,"context_line":"    :param host: str representing the host of the binding to return."},{"line_number":269,"context_line":"    \"\"\""},{"line_number":270,"context_line":"    for binding in bindings:"}],"source_content_type":"text/x-python","patch_set":57,"id":"bf659307_6e5f9072","line":267,"range":{"start_line":267,"start_character":25,"end_line":267,"end_character":53},"in_reply_to":"bf659307_1e3a7033","updated":"2018-04-05 04:45:57.000000000","message":"Done","commit_id":"1a686ead1aa00b9707795c45db348a18645d7ab0"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"5738436f5ad7992b693f5adb8b4328fbd91adea8","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    \"\"\""},{"line_number":96,"context_line":"    for binding in bindings:"},{"line_number":97,"context_line":"        if binding[pbe_ext.STATUS] \u003d\u003d status:"},{"line_number":98,"context_line":"            if not host:"},{"line_number":99,"context_line":"                return binding"},{"line_number":100,"context_line":"            elif binding[pbe_ext.HOST] \u003d\u003d host:"},{"line_number":101,"context_line":"                return binding"}],"source_content_type":"text/x-python","patch_set":60,"id":"9f6a8fd7_5b6a18b3","line":101,"range":{"start_line":98,"start_character":11,"end_line":101,"end_character":30},"updated":"2018-04-20 00:13:32.000000000","message":"if not host or binding[pbe_ext.HOST]\u003d\u003d host:\n    return binding\n\nsince its returning binding anyway","commit_id":"f90b6e224556e4e5a43e9daf2885b48138e94c7b"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"0404ad840b6d6b03bea767d5a59ddba9d79aefb2","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    \"\"\""},{"line_number":96,"context_line":"    for binding in bindings:"},{"line_number":97,"context_line":"        if binding[pbe_ext.STATUS] \u003d\u003d status:"},{"line_number":98,"context_line":"            if not host:"},{"line_number":99,"context_line":"                return binding"},{"line_number":100,"context_line":"            elif binding[pbe_ext.HOST] \u003d\u003d host:"},{"line_number":101,"context_line":"                return binding"}],"source_content_type":"text/x-python","patch_set":60,"id":"9f6a8fd7_ee5c75ee","line":101,"range":{"start_line":98,"start_character":11,"end_line":101,"end_character":30},"in_reply_to":"9f6a8fd7_5b6a18b3","updated":"2018-04-20 18:47:54.000000000","message":"Thanks Manjeet. Good catch :-). I will address this in PS62 together with other comments from Ihar and Slaweq. PS61 removes Zuul error to enable an OVO patch that needs to be rebased on top of this one","commit_id":"f90b6e224556e4e5a43e9daf2885b48138e94c7b"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"90ff9c599038d74abb33de2cab0bd5fa5bb11e39","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    \"\"\""},{"line_number":96,"context_line":"    for binding in bindings:"},{"line_number":97,"context_line":"        if binding[pbe_ext.STATUS] \u003d\u003d status:"},{"line_number":98,"context_line":"            if not host:"},{"line_number":99,"context_line":"                return binding"},{"line_number":100,"context_line":"            elif binding[pbe_ext.HOST] \u003d\u003d host:"},{"line_number":101,"context_line":"                return binding"}],"source_content_type":"text/x-python","patch_set":60,"id":"5f7c97a3_8ec71846","line":101,"range":{"start_line":98,"start_character":11,"end_line":101,"end_character":30},"in_reply_to":"9f6a8fd7_ee5c75ee","updated":"2018-05-09 21:57:09.000000000","message":"Done","commit_id":"f90b6e224556e4e5a43e9daf2885b48138e94c7b"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"87dc356cd8c584161409021bbf6b34151369c059","unresolved":false,"context_lines":[{"line_number":90,"context_line":"    :param bindings: An iterable containing port bindings"},{"line_number":91,"context_line":"    :param status: The status of the port binding to return. Possible values"},{"line_number":92,"context_line":"                   are ACTIVE or INACTIVE as defined in"},{"line_number":93,"context_line":"                   :file:`neutron-lib/constants.py`."},{"line_number":94,"context_line":"    :param host: str representing the host of the binding to return."},{"line_number":95,"context_line":"    \"\"\""},{"line_number":96,"context_line":"    for binding in bindings:"}],"source_content_type":"text/x-python","patch_set":64,"id":"5f7c97a3_65be09b5","line":93,"range":{"start_line":93,"start_character":26,"end_line":93,"end_character":37},"updated":"2018-05-14 20:47:45.000000000","message":"neutron_lib","commit_id":"076573cd16d4572c9cff5ae069034c0434340e85"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"5694dcef1da145959278ed17ff861742aa91eeac","unresolved":false,"context_lines":[{"line_number":90,"context_line":"    :param bindings: An iterable containing port bindings"},{"line_number":91,"context_line":"    :param status: The status of the port binding to return. Possible values"},{"line_number":92,"context_line":"                   are ACTIVE or INACTIVE as defined in"},{"line_number":93,"context_line":"                   :file:`neutron-lib/constants.py`."},{"line_number":94,"context_line":"    :param host: str representing the host of the binding to return."},{"line_number":95,"context_line":"    \"\"\""},{"line_number":96,"context_line":"    for binding in bindings:"}],"source_content_type":"text/x-python","patch_set":64,"id":"5f7c97a3_7bd5171b","line":93,"range":{"start_line":93,"start_character":26,"end_line":93,"end_character":37},"in_reply_to":"5f7c97a3_65be09b5","updated":"2018-06-03 22:17:36.000000000","message":"Done","commit_id":"076573cd16d4572c9cff5ae069034c0434340e85"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"46fbefd78596f548c550ce735a0a536e164d7037","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    return cfg.CONF.global_physnet_mtu"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"def get_port_binding_by_status_and_host(bindings, status, host\u003d\u0027\u0027):"},{"line_number":81,"context_line":"    \"\"\"Returns from an iterable the binding with the specified status and host."},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    The input iterable can contain zero or one bindings in status ACTIVE"},{"line_number":84,"context_line":"    and zero or many bindings in status INACTIVE. As a consequence, to"},{"line_number":85,"context_line":"    unequivocally retrieve an inactive binding, the caller must specify a non"},{"line_number":86,"context_line":"    empty value for host. If host is the empty string, the first binding"},{"line_number":87,"context_line":"    satisfying the specified status will be returned. If no binding is found"},{"line_number":88,"context_line":"    with the specified status and host, None is returned"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    :param bindings: An iterable containing port bindings"},{"line_number":91,"context_line":"    :param status: The status of the port binding to return. Possible values"},{"line_number":92,"context_line":"                   are ACTIVE or INACTIVE as defined in"},{"line_number":93,"context_line":"                   :file:`neutron_lib/constants.py`."},{"line_number":94,"context_line":"    :param host: str representing the host of the binding to return."},{"line_number":95,"context_line":"    \"\"\""},{"line_number":96,"context_line":"    for binding in bindings:"},{"line_number":97,"context_line":"        if binding[pbe_ext.STATUS] \u003d\u003d status:"},{"line_number":98,"context_line":"            if not host or binding[pbe_ext.HOST] \u003d\u003d host:"},{"line_number":99,"context_line":"                return binding"}],"source_content_type":"text/x-python","patch_set":72,"id":"5f7c97a3_efe9a6aa","line":99,"range":{"start_line":80,"start_character":0,"end_line":99,"end_character":30},"updated":"2018-07-06 14:54:18.000000000","message":"This really needs to go into neutron_lib as all of these plugin utils are already rehomed there. As per [1] this utils module is going to be removed, but if we add get_port_binding_by_status_and_host here we\u0027ll basically have to rehome and reconsume in [1].\n\n\n\n[1] https://review.openstack.org/#/c/565284/","commit_id":"e8bb45a4698953279f1f5f6513ce5563188c27b8"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"dce2f21cdbc31700aebdd1b101fc94f76057a2f0","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    return cfg.CONF.global_physnet_mtu"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"def get_port_binding_by_status_and_host(bindings, status, host\u003d\u0027\u0027):"},{"line_number":81,"context_line":"    \"\"\"Returns from an iterable the binding with the specified status and host."},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    The input iterable can contain zero or one bindings in status ACTIVE"},{"line_number":84,"context_line":"    and zero or many bindings in status INACTIVE. As a consequence, to"},{"line_number":85,"context_line":"    unequivocally retrieve an inactive binding, the caller must specify a non"},{"line_number":86,"context_line":"    empty value for host. If host is the empty string, the first binding"},{"line_number":87,"context_line":"    satisfying the specified status will be returned. If no binding is found"},{"line_number":88,"context_line":"    with the specified status and host, None is returned"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    :param bindings: An iterable containing port bindings"},{"line_number":91,"context_line":"    :param status: The status of the port binding to return. Possible values"},{"line_number":92,"context_line":"                   are ACTIVE or INACTIVE as defined in"},{"line_number":93,"context_line":"                   :file:`neutron_lib/constants.py`."},{"line_number":94,"context_line":"    :param host: str representing the host of the binding to return."},{"line_number":95,"context_line":"    \"\"\""},{"line_number":96,"context_line":"    for binding in bindings:"},{"line_number":97,"context_line":"        if binding[pbe_ext.STATUS] \u003d\u003d status:"},{"line_number":98,"context_line":"            if not host or binding[pbe_ext.HOST] \u003d\u003d host:"},{"line_number":99,"context_line":"                return binding"}],"source_content_type":"text/x-python","patch_set":72,"id":"5f7c97a3_21a00ea5","line":99,"range":{"start_line":80,"start_character":0,"end_line":99,"end_character":30},"in_reply_to":"5f7c97a3_efe9a6aa","updated":"2018-07-06 21:26:07.000000000","message":"Per conversation with boden, this function was rehomed in neutron/common/utils so https://review.openstack.org/#/c/565284/ can be merged","commit_id":"e8bb45a4698953279f1f5f6513ce5563188c27b8"}],"neutron/plugins/ml2/driver_context.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ffec4ba7a684de61b488d31825f3e3c25028464d","unresolved":false,"context_lines":[{"line_number":50,"context_line":"            session.add(self._model_class(**{col: getattr(self, col)"},{"line_number":51,"context_line":"                                             for col in self._cols}))"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def __getitem__(self, item):"},{"line_number":54,"context_line":"        if item not in self._cols:"},{"line_number":55,"context_line":"            raise KeyError(item)"},{"line_number":56,"context_line":"        return getattr(self, item)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"class MechanismDriverContext(object):"}],"source_content_type":"text/x-python","patch_set":57,"id":"bf659307_dc0e4131","line":56,"range":{"start_line":53,"start_character":4,"end_line":56,"end_character":34},"updated":"2018-03-27 21:33:47.000000000","message":"(no action required) is it to not raise AttributeError when we []?","commit_id":"1a686ead1aa00b9707795c45db348a18645d7ab0"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"3ec46b55b02480cd58190ae7e837722b21e7e185","unresolved":false,"context_lines":[{"line_number":50,"context_line":"            session.add(self._model_class(**{col: getattr(self, col)"},{"line_number":51,"context_line":"                                             for col in self._cols}))"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def __getitem__(self, item):"},{"line_number":54,"context_line":"        if item not in self._cols:"},{"line_number":55,"context_line":"            raise KeyError(item)"},{"line_number":56,"context_line":"        return getattr(self, item)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"class MechanismDriverContext(object):"}],"source_content_type":"text/x-python","patch_set":57,"id":"bf659307_a96362b1","line":56,"range":{"start_line":53,"start_character":4,"end_line":56,"end_character":34},"in_reply_to":"bf659307_dc0e4131","updated":"2018-04-05 04:45:57.000000000","message":"++","commit_id":"1a686ead1aa00b9707795c45db348a18645d7ab0"}],"neutron/plugins/ml2/models.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"076720a69883376593a5305d063448c8792cd4d7","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    port \u003d orm.relationship("},{"line_number":58,"context_line":"        models_v2.Port,"},{"line_number":59,"context_line":"        load_on_pending\u003dTrue,"},{"line_number":60,"context_line":"        backref\u003dorm.backref(\"port_binding\","},{"line_number":61,"context_line":"                            lazy\u003d\u0027joined\u0027, uselist\u003dFalse,"},{"line_number":62,"context_line":"                            cascade\u003d\u0027delete\u0027))"},{"line_number":63,"context_line":"    revises_on_change \u003d (\u0027port\u0027, )"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_39d0ba1f","side":"PARENT","line":60,"range":{"start_line":60,"start_character":29,"end_line":60,"end_character":41},"updated":"2018-01-04 00:43:05.000000000","message":"should we rename it to reflect it\u0027s now a list of? or is there a concern about the old name being relied on by some other external code? you still change the type of the relationship to list, so they would need to adopt anyway.","commit_id":"2bfc219e88379443b5f8d404d8f98044e0bc9069"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"2fa3835a4bcbca8502c7d489fab2ba243b2c92f9","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    port \u003d orm.relationship("},{"line_number":58,"context_line":"        models_v2.Port,"},{"line_number":59,"context_line":"        load_on_pending\u003dTrue,"},{"line_number":60,"context_line":"        backref\u003dorm.backref(\"port_binding\","},{"line_number":61,"context_line":"                            lazy\u003d\u0027joined\u0027, uselist\u003dFalse,"},{"line_number":62,"context_line":"                            cascade\u003d\u0027delete\u0027))"},{"line_number":63,"context_line":"    revises_on_change \u003d (\u0027port\u0027, )"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_6ce1622a","side":"PARENT","line":60,"range":{"start_line":60,"start_character":29,"end_line":60,"end_character":41},"in_reply_to":"9f91af0f_39d0ba1f","updated":"2018-01-08 03:55:34.000000000","message":"I agree with you. In fact, I just did that in PS35 https://review.openstack.org/#/c/414251/35/neutron/plugins/ml2/models.py@60 and it triggered a lot of alembic migration issues. Since at the moment I was dealing with other problems introduced by the new code, I decided to leave this issue for later. I will fix it before we merge. For the time being I want to focus on getting the multiple port bindings working. In the mean-time, I will leave a TODO comment","commit_id":"2bfc219e88379443b5f8d404d8f98044e0bc9069"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"be60ff0b664727cd521c390151c3a25dcad51221","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    port \u003d orm.relationship("},{"line_number":58,"context_line":"        models_v2.Port,"},{"line_number":59,"context_line":"        load_on_pending\u003dTrue,"},{"line_number":60,"context_line":"        backref\u003dorm.backref(\"port_binding\","},{"line_number":61,"context_line":"                            lazy\u003d\u0027joined\u0027,"},{"line_number":62,"context_line":"                            cascade\u003d\u0027delete\u0027))"},{"line_number":63,"context_line":"    revises_on_change \u003d (\u0027port\u0027, )"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":50,"id":"9f91af0f_64de606e","line":62,"range":{"start_line":60,"start_character":28,"end_line":62,"end_character":44},"updated":"2018-01-07 09:58:31.000000000","message":"nit: I think that all those 3 lines can be merged into one :)","commit_id":"d7d50d961eea0b324ef0ea29ca9cdc0ddc865c00"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"2fa3835a4bcbca8502c7d489fab2ba243b2c92f9","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    port \u003d orm.relationship("},{"line_number":58,"context_line":"        models_v2.Port,"},{"line_number":59,"context_line":"        load_on_pending\u003dTrue,"},{"line_number":60,"context_line":"        backref\u003dorm.backref(\"port_binding\","},{"line_number":61,"context_line":"                            lazy\u003d\u0027joined\u0027,"},{"line_number":62,"context_line":"                            cascade\u003d\u0027delete\u0027))"},{"line_number":63,"context_line":"    revises_on_change \u003d (\u0027port\u0027, )"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":50,"id":"9f91af0f_ae81a2fd","line":62,"range":{"start_line":60,"start_character":28,"end_line":62,"end_character":44},"in_reply_to":"9f91af0f_64de606e","updated":"2018-01-08 03:55:34.000000000","message":"Wouldn\u0027t that be gratuitous and unrelated to this patch?","commit_id":"d7d50d961eea0b324ef0ea29ca9cdc0ddc865c00"}],"neutron/plugins/ml2/plugin.py":[{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"1ec119d98db19136f21cca447f9159cd787ec939","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                                    \"network_availability_zone\","},{"line_number":135,"context_line":"                                    \"default-subnetpools\","},{"line_number":136,"context_line":"                                    \"subnet-service-types\","},{"line_number":137,"context_line":"                                    \"bindings_extended\"]"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    @property"},{"line_number":140,"context_line":"    def supported_extension_aliases(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a3c09a3_48ee7c23","line":137,"updated":"2017-01-13 16:48:27.000000000","message":"remove this here and move it to the service plugin","commit_id":"889bd9be29fcb700d213041e9558dfdfe681c5cd"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"701f6c5900b572990f6ae89753310d7d4aebb41d","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                                    \"network_availability_zone\","},{"line_number":135,"context_line":"                                    \"default-subnetpools\","},{"line_number":136,"context_line":"                                    \"subnet-service-types\","},{"line_number":137,"context_line":"                                    \"bindings_extended\"]"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    @property"},{"line_number":140,"context_line":"    def supported_extension_aliases(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a461143_30a5c7b4","line":137,"in_reply_to":"7a3c09a3_48ee7c23","updated":"2017-01-27 20:46:50.000000000","message":"Done","commit_id":"889bd9be29fcb700d213041e9558dfdfe681c5cd"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"076720a69883376593a5305d063448c8792cd4d7","unresolved":false,"context_lines":[{"line_number":327,"context_line":"            {port_def.RESOURCE_NAME:"},{"line_number":328,"context_line":"                {\u0027status\u0027: const.PORT_STATUS_DOWN}})"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"    def _process_port_binding(self, mech_context, attrs, allow_changes\u003dTrue):"},{"line_number":331,"context_line":"        plugin_context \u003d mech_context._plugin_context"},{"line_number":332,"context_line":"        binding \u003d mech_context._binding"},{"line_number":333,"context_line":"        port \u003d mech_context.current"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_19e05696","line":330,"range":{"start_line":330,"start_character":55,"end_line":330,"end_character":75},"updated":"2018-01-04 00:43:05.000000000","message":"so what\u0027s the point of calling it with False? triggering validations?","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"533527014987bb1f2c2c26b0d1040b5dff62d832","unresolved":false,"context_lines":[{"line_number":327,"context_line":"            {port_def.RESOURCE_NAME:"},{"line_number":328,"context_line":"                {\u0027status\u0027: const.PORT_STATUS_DOWN}})"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"    def _process_port_binding(self, mech_context, attrs, allow_changes\u003dTrue):"},{"line_number":331,"context_line":"        plugin_context \u003d mech_context._plugin_context"},{"line_number":332,"context_line":"        binding \u003d mech_context._binding"},{"line_number":333,"context_line":"        port \u003d mech_context.current"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_d1b27049","line":330,"range":{"start_line":330,"start_character":55,"end_line":330,"end_character":75},"in_reply_to":"9f91af0f_19e05696","updated":"2018-01-09 04:20:46.000000000","message":"My next step right before you did this review (thanks!) was to refactor code in this method so this argument is not necessary. This refactoring is done in PS52","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"076720a69883376593a5305d063448c8792cd4d7","unresolved":false,"context_lines":[{"line_number":370,"context_line":"                                                  original_host)"},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"            if port[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DVR_INTERFACE:"},{"line_number":373,"context_line":"                binding.vif_type \u003d portbindings.VIF_TYPE_UNBOUND"},{"line_number":374,"context_line":"                binding.vif_details \u003d \u0027\u0027"},{"line_number":375,"context_line":"                db.clear_binding_levels(plugin_context, port_id, original_host)"},{"line_number":376,"context_line":"                mech_context._clear_binding_levels()"},{"line_number":377,"context_line":"                binding.host \u003d \u0027\u0027"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"            self._update_port_dict_binding(port, binding)"},{"line_number":380,"context_line":"            binding.persist_state_to_session(plugin_context.session)"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_1973764f","line":377,"range":{"start_line":373,"start_character":16,"end_line":377,"end_character":33},"updated":"2018-01-04 00:43:05.000000000","message":"this seems the same as _clear_binding_set_port_down, only without setting status to DOWN by calling to super().update_port(). Would it make sense to move the latter out of the helper method and then call it for both code branches?","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"533527014987bb1f2c2c26b0d1040b5dff62d832","unresolved":false,"context_lines":[{"line_number":370,"context_line":"                                                  original_host)"},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"            if port[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DVR_INTERFACE:"},{"line_number":373,"context_line":"                binding.vif_type \u003d portbindings.VIF_TYPE_UNBOUND"},{"line_number":374,"context_line":"                binding.vif_details \u003d \u0027\u0027"},{"line_number":375,"context_line":"                db.clear_binding_levels(plugin_context, port_id, original_host)"},{"line_number":376,"context_line":"                mech_context._clear_binding_levels()"},{"line_number":377,"context_line":"                binding.host \u003d \u0027\u0027"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"            self._update_port_dict_binding(port, binding)"},{"line_number":380,"context_line":"            binding.persist_state_to_session(plugin_context.session)"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_317b9c7b","line":377,"range":{"start_line":373,"start_character":16,"end_line":377,"end_character":33},"in_reply_to":"9f91af0f_1973764f","updated":"2018-01-09 04:20:46.000000000","message":"Done","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"076720a69883376593a5305d063448c8792cd4d7","unresolved":false,"context_lines":[{"line_number":382,"context_line":""},{"line_number":383,"context_line":"    @db_api.retry_db_errors"},{"line_number":384,"context_line":"    def _bind_port_if_needed(self, context, allow_notify\u003dFalse,"},{"line_number":385,"context_line":"                             need_notify\u003dFalse, allow_commit\u003dTrue):"},{"line_number":386,"context_line":"        if not context.network.network_segments:"},{"line_number":387,"context_line":"            LOG.debug(\"Network %s has no segments, skipping binding\","},{"line_number":388,"context_line":"                      context.network.current[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_799f2203","line":385,"updated":"2018-01-04 00:43:05.000000000","message":"what\u0027s the scenario when we don\u0027t want to commit but still want to attempt to bind?","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"533527014987bb1f2c2c26b0d1040b5dff62d832","unresolved":false,"context_lines":[{"line_number":382,"context_line":""},{"line_number":383,"context_line":"    @db_api.retry_db_errors"},{"line_number":384,"context_line":"    def _bind_port_if_needed(self, context, allow_notify\u003dFalse,"},{"line_number":385,"context_line":"                             need_notify\u003dFalse, allow_commit\u003dTrue):"},{"line_number":386,"context_line":"        if not context.network.network_segments:"},{"line_number":387,"context_line":"            LOG.debug(\"Network %s has no segments, skipping binding\","},{"line_number":388,"context_line":"                      context.network.current[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_3aaff17d","line":385,"in_reply_to":"9f91af0f_799f2203","updated":"2018-01-09 04:20:46.000000000","message":"If we simplify _bind_port_if_needed to its essence, it does two things:\n\n1) It generates binding data for the port by calling _attempt_binding, which in turn calls the bind_port method of the configured mechanism drivers until one of them succeeds or all fail\n\n2) With successfully generated binding data by one of the mechanism drivers, we call _commit_port_binding, which again, simplified to its essence, is a port update that \u0027enacts\u0027 or \u0027activates\u0027 the new binding data on the port by updating it, calling the update precommit and update post commit in the mechanism driver and saving the binding data.\n\nWhen an instance is migrated to a new host, per the spec for this work \"For live migration improvements, it is required that Neutron allows port binding on the target compute host during the pre_live_migration stage, without removing the original port binding on the source compute\". And also \"The requirement here is on Nova to update the instance definition before the migration is executed. In the case of libvirt, Nova would update the domain.xml with the target interface definition.\" This won\u0027t be possible if we don\u0027t return actual binding data for the new target host inactive binding while at the same time, keeping the original binding active (associated) with the port, prior to executing the actual migration. In other words, for the target host binding we have to execute step 1 above in the pre_live_migration stage (before the migration is executed) and we will only execute step 2 above \"After instance migration is complete, the target port binding is activated and the source port binding is deactivated, but not deleted.\" So step 2 is executed when the activate method in L2086 below is called by Nova when the migration is complete, while step 1 is executed when Nova calls create_port_binding (L1975) and potentially update_port_binding (L2052) during pre_live_migration","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"076720a69883376593a5305d063448c8792cd4d7","unresolved":false,"context_lines":[{"line_number":1949,"context_line":"    def _validate_compute_port(self, port_db):"},{"line_number":1950,"context_line":"        if not port_db[\u0027device_owner\u0027].startswith("},{"line_number":1951,"context_line":"                const.DEVICE_OWNER_COMPUTE_PREFIX):"},{"line_number":1952,"context_line":"            msg \u003d (\u0027Invalid port %s. Operation only valid on compute \u0027"},{"line_number":1953,"context_line":"                   \u0027ports\u0027 % port_db[\u0027id\u0027])"},{"line_number":1954,"context_line":"            raise exc.BadRequest(resource\u003d\u0027port\u0027, msg\u003dmsg)"},{"line_number":1955,"context_line":""}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_79b88275","line":1952,"updated":"2018-01-04 00:43:05.000000000","message":"since the message is returned to api callers, it should be translated","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"8962eb39821cdc69ef9812a943716a55d2df8f84","unresolved":false,"context_lines":[{"line_number":1949,"context_line":"    def _validate_compute_port(self, port_db):"},{"line_number":1950,"context_line":"        if not port_db[\u0027device_owner\u0027].startswith("},{"line_number":1951,"context_line":"                const.DEVICE_OWNER_COMPUTE_PREFIX):"},{"line_number":1952,"context_line":"            msg \u003d (\u0027Invalid port %s. Operation only valid on compute \u0027"},{"line_number":1953,"context_line":"                   \u0027ports\u0027 % port_db[\u0027id\u0027])"},{"line_number":1954,"context_line":"            raise exc.BadRequest(resource\u003d\u0027port\u0027, msg\u003dmsg)"},{"line_number":1955,"context_line":""}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_8ce866e2","line":1952,"in_reply_to":"9f91af0f_79b88275","updated":"2018-01-08 04:45:55.000000000","message":"Done","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"076720a69883376593a5305d063448c8792cd4d7","unresolved":false,"context_lines":[{"line_number":1972,"context_line":""},{"line_number":1973,"context_line":"    @utils.transaction_guard"},{"line_number":1974,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1975,"context_line":"    def create_port_binding(self, context, port_id, binding):"},{"line_number":1976,"context_line":"        attrs \u003d binding[pbe_ext.RESOURCE_NAME]"},{"line_number":1977,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":1978,"context_line":"            port_db \u003d self._get_port(context, port_id)"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_54c6a59c","line":1975,"updated":"2018-01-04 00:43:05.000000000","message":"All those new entry points will require some api tests and maybe scenarios too in neutron-tempest-plugin before we can merge the change.","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"8962eb39821cdc69ef9812a943716a55d2df8f84","unresolved":false,"context_lines":[{"line_number":1972,"context_line":""},{"line_number":1973,"context_line":"    @utils.transaction_guard"},{"line_number":1974,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1975,"context_line":"    def create_port_binding(self, context, port_id, binding):"},{"line_number":1976,"context_line":"        attrs \u003d binding[pbe_ext.RESOURCE_NAME]"},{"line_number":1977,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":1978,"context_line":"            port_db \u003d self._get_port(context, port_id)"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_ace52a0b","line":1975,"in_reply_to":"9f91af0f_54c6a59c","updated":"2018-01-08 04:45:55.000000000","message":"In fact, I don\u0027t think the scenario should be optional. So yes, I agree","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"076720a69883376593a5305d063448c8792cd4d7","unresolved":false,"context_lines":[{"line_number":1998,"context_line":"            self._process_port_binding(mech_context,"},{"line_number":1999,"context_line":"                                       self._get_port_binding_attrs(attrs),"},{"line_number":2000,"context_line":"                                       allow_changes\u003dis_active_binding)"},{"line_number":2001,"context_line":"            if self._get_binding_for_host(port_id, port_db.port_binding,"},{"line_number":2002,"context_line":"                                          mech_context._binding.host):"},{"line_number":2003,"context_line":"                raise n_exc.PortBindingAlreadyExists("},{"line_number":2004,"context_line":"                    port_id\u003dport_id, host\u003dmech_context._binding.host)"},{"line_number":2005,"context_line":"        bind_context \u003d self._bind_port_if_needed("},{"line_number":2006,"context_line":"            mech_context, allow_commit\u003dis_active_binding)"},{"line_number":2007,"context_line":"        if (bind_context._binding.vif_type \u003d\u003d"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_d9342efe","line":2004,"range":{"start_line":2001,"start_character":12,"end_line":2004,"end_character":69},"updated":"2018-01-04 00:43:05.000000000","message":"would it make sense to validate that before we go with processing binding?","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"8962eb39821cdc69ef9812a943716a55d2df8f84","unresolved":false,"context_lines":[{"line_number":1998,"context_line":"            self._process_port_binding(mech_context,"},{"line_number":1999,"context_line":"                                       self._get_port_binding_attrs(attrs),"},{"line_number":2000,"context_line":"                                       allow_changes\u003dis_active_binding)"},{"line_number":2001,"context_line":"            if self._get_binding_for_host(port_id, port_db.port_binding,"},{"line_number":2002,"context_line":"                                          mech_context._binding.host):"},{"line_number":2003,"context_line":"                raise n_exc.PortBindingAlreadyExists("},{"line_number":2004,"context_line":"                    port_id\u003dport_id, host\u003dmech_context._binding.host)"},{"line_number":2005,"context_line":"        bind_context \u003d self._bind_port_if_needed("},{"line_number":2006,"context_line":"            mech_context, allow_commit\u003dis_active_binding)"},{"line_number":2007,"context_line":"        if (bind_context._binding.vif_type \u003d\u003d"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_6c1c02c1","line":2004,"range":{"start_line":2001,"start_character":12,"end_line":2004,"end_character":69},"in_reply_to":"9f91af0f_d9342efe","updated":"2018-01-08 04:45:55.000000000","message":"Done","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"076720a69883376593a5305d063448c8792cd4d7","unresolved":false,"context_lines":[{"line_number":2003,"context_line":"                raise n_exc.PortBindingAlreadyExists("},{"line_number":2004,"context_line":"                    port_id\u003dport_id, host\u003dmech_context._binding.host)"},{"line_number":2005,"context_line":"        bind_context \u003d self._bind_port_if_needed("},{"line_number":2006,"context_line":"            mech_context, allow_commit\u003dis_active_binding)"},{"line_number":2007,"context_line":"        if (bind_context._binding.vif_type \u003d\u003d"},{"line_number":2008,"context_line":"                portbindings.VIF_TYPE_BINDING_FAILED):"},{"line_number":2009,"context_line":"            raise n_exc.PortBindingError(port_id\u003dport_id,"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_b91a8a7a","line":2006,"range":{"start_line":2006,"start_character":27,"end_line":2006,"end_character":56},"updated":"2018-01-04 00:43:05.000000000","message":"so you don\u0027t allow to commit when the new binding is not active. why do we even try to bind then? presumingly the already active binding is committed no?","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"533527014987bb1f2c2c26b0d1040b5dff62d832","unresolved":false,"context_lines":[{"line_number":2003,"context_line":"                raise n_exc.PortBindingAlreadyExists("},{"line_number":2004,"context_line":"                    port_id\u003dport_id, host\u003dmech_context._binding.host)"},{"line_number":2005,"context_line":"        bind_context \u003d self._bind_port_if_needed("},{"line_number":2006,"context_line":"            mech_context, allow_commit\u003dis_active_binding)"},{"line_number":2007,"context_line":"        if (bind_context._binding.vif_type \u003d\u003d"},{"line_number":2008,"context_line":"                portbindings.VIF_TYPE_BINDING_FAILED):"},{"line_number":2009,"context_line":"            raise n_exc.PortBindingError(port_id\u003dport_id,"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_caa3929d","line":2006,"range":{"start_line":2006,"start_character":27,"end_line":2006,"end_character":56},"in_reply_to":"9f91af0f_b91a8a7a","updated":"2018-01-09 04:20:46.000000000","message":"Please see response to comment in L385","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"076720a69883376593a5305d063448c8792cd4d7","unresolved":false,"context_lines":[{"line_number":2025,"context_line":"                                                              id\u003dport_id))"},{"line_number":2026,"context_line":"        filters \u003d filters or {}"},{"line_number":2027,"context_line":"        pager \u003d base_obj.Pager(sorts, limit, page_reverse, marker)"},{"line_number":2028,"context_line":"        bindings \u003d ports_obj.PortBinding.get_objects("},{"line_number":2029,"context_line":"            context, _pager\u003dpager, port_id\u003dport_id, **filters)"},{"line_number":2030,"context_line":""},{"line_number":2031,"context_line":"        return [self._make_port_binding_dict(binding, fields)"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_94098d2d","line":2028,"updated":"2018-01-04 00:43:05.000000000","message":"at this point it\u0027s not guaranteed that the port is present because we don\u0027t use the same transaction for get_object in line 2024 and here. is it ok that we\u0027ll pass a potentially non existent port_id here and return an empty list instead of e.g. raising an error saying that the port is not present?","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"533527014987bb1f2c2c26b0d1040b5dff62d832","unresolved":false,"context_lines":[{"line_number":2025,"context_line":"                                                              id\u003dport_id))"},{"line_number":2026,"context_line":"        filters \u003d filters or {}"},{"line_number":2027,"context_line":"        pager \u003d base_obj.Pager(sorts, limit, page_reverse, marker)"},{"line_number":2028,"context_line":"        bindings \u003d ports_obj.PortBinding.get_objects("},{"line_number":2029,"context_line":"            context, _pager\u003dpager, port_id\u003dport_id, **filters)"},{"line_number":2030,"context_line":""},{"line_number":2031,"context_line":"        return [self._make_port_binding_dict(binding, fields)"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_4adea211","line":2028,"in_reply_to":"9f91af0f_94098d2d","updated":"2018-01-09 04:20:46.000000000","message":"Yes, I thought about that and concluded it was acceptable to return empty list. Any objections?","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"076720a69883376593a5305d063448c8792cd4d7","unresolved":false,"context_lines":[{"line_number":2058,"context_line":"                                                 port_db.port_binding, host)"},{"line_number":2059,"context_line":"            if not original_binding:"},{"line_number":2060,"context_line":"                raise n_exc.PortBindingNotFound(port_id\u003dport_id, host\u003dhost)"},{"line_number":2061,"context_line":"            is_active_binding \u003d False"},{"line_number":2062,"context_line":"            if original_binding.status \u003d\u003d n_const.PORT_BINDING_STATUS_ACTIVE:"},{"line_number":2063,"context_line":"                is_active_binding \u003d True"},{"line_number":2064,"context_line":"            network \u003d self.get_network(context, port_db[\u0027network_id\u0027])"},{"line_number":2065,"context_line":"            port_dict \u003d self._make_port_dict(port_db)"},{"line_number":2066,"context_line":"            mech_context \u003d driver_context.PortContext(self, context, port_dict,"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_b45a9127","line":2063,"range":{"start_line":2061,"start_character":12,"end_line":2063,"end_character":40},"updated":"2018-01-04 00:43:05.000000000","message":"is_active_binding \u003d (xxx \u003d\u003d yyy)","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"8962eb39821cdc69ef9812a943716a55d2df8f84","unresolved":false,"context_lines":[{"line_number":2058,"context_line":"                                                 port_db.port_binding, host)"},{"line_number":2059,"context_line":"            if not original_binding:"},{"line_number":2060,"context_line":"                raise n_exc.PortBindingNotFound(port_id\u003dport_id, host\u003dhost)"},{"line_number":2061,"context_line":"            is_active_binding \u003d False"},{"line_number":2062,"context_line":"            if original_binding.status \u003d\u003d n_const.PORT_BINDING_STATUS_ACTIVE:"},{"line_number":2063,"context_line":"                is_active_binding \u003d True"},{"line_number":2064,"context_line":"            network \u003d self.get_network(context, port_db[\u0027network_id\u0027])"},{"line_number":2065,"context_line":"            port_dict \u003d self._make_port_dict(port_db)"},{"line_number":2066,"context_line":"            mech_context \u003d driver_context.PortContext(self, context, port_dict,"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_ec5ed274","line":2063,"range":{"start_line":2061,"start_character":12,"end_line":2063,"end_character":40},"in_reply_to":"9f91af0f_b45a9127","updated":"2018-01-08 04:45:55.000000000","message":"Done","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"076720a69883376593a5305d063448c8792cd4d7","unresolved":false,"context_lines":[{"line_number":2091,"context_line":"            self._validate_compute_port(port_db)"},{"line_number":2092,"context_line":"            active_binding \u003d p_utils.get_port_binding_by_status("},{"line_number":2093,"context_line":"                port_db.port_binding)"},{"line_number":2094,"context_line":"            if host \u003d\u003d (active_binding and active_binding.host):"},{"line_number":2095,"context_line":"                raise n_exc.PortBindingAlreadyActive(port_id\u003dport_id,"},{"line_number":2096,"context_line":"                                                     host\u003dhost)"},{"line_number":2097,"context_line":"            inactive_binding \u003d p_utils.get_port_binding_by_status("}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_345f610f","line":2094,"range":{"start_line":2094,"start_character":15,"end_line":2094,"end_character":19},"updated":"2018-01-04 00:43:05.000000000","message":"what if host is None, and there is no active_binding? In this case we weirdly will raise PortBindingAlreadyActive, which is probably incorrect thing to do.","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"c4e259307b09305babbf367b2b26a79e2aa9c0c6","unresolved":false,"context_lines":[{"line_number":2091,"context_line":"            self._validate_compute_port(port_db)"},{"line_number":2092,"context_line":"            active_binding \u003d p_utils.get_port_binding_by_status("},{"line_number":2093,"context_line":"                port_db.port_binding)"},{"line_number":2094,"context_line":"            if host \u003d\u003d (active_binding and active_binding.host):"},{"line_number":2095,"context_line":"                raise n_exc.PortBindingAlreadyActive(port_id\u003dport_id,"},{"line_number":2096,"context_line":"                                                     host\u003dhost)"},{"line_number":2097,"context_line":"            inactive_binding \u003d p_utils.get_port_binding_by_status("}],"source_content_type":"text/x-python","patch_set":49,"id":"7f96bb07_c1e919e6","line":2094,"range":{"start_line":2094,"start_character":15,"end_line":2094,"end_character":19},"in_reply_to":"9f91af0f_2ae9deb5","updated":"2018-01-18 03:38:22.000000000","message":"If the user passes to the API a host \u003d\u003d None, the Pecan API layer catches it here: https://github.com/openstack/neutron/blob/master/neutron/pecan_wsgi/hooks/policy_enforcement.py#L117.  This code calls get_port_binding above, which raises a PortBindingNotFound exception in L2042. So host cannot be None here","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"533527014987bb1f2c2c26b0d1040b5dff62d832","unresolved":false,"context_lines":[{"line_number":2091,"context_line":"            self._validate_compute_port(port_db)"},{"line_number":2092,"context_line":"            active_binding \u003d p_utils.get_port_binding_by_status("},{"line_number":2093,"context_line":"                port_db.port_binding)"},{"line_number":2094,"context_line":"            if host \u003d\u003d (active_binding and active_binding.host):"},{"line_number":2095,"context_line":"                raise n_exc.PortBindingAlreadyActive(port_id\u003dport_id,"},{"line_number":2096,"context_line":"                                                     host\u003dhost)"},{"line_number":2097,"context_line":"            inactive_binding \u003d p_utils.get_port_binding_by_status("}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_2ae9deb5","line":2094,"range":{"start_line":2094,"start_character":15,"end_line":2094,"end_character":19},"in_reply_to":"9f91af0f_345f610f","updated":"2018-01-09 04:20:46.000000000","message":"Will address in PS53","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"076720a69883376593a5305d063448c8792cd4d7","unresolved":false,"context_lines":[{"line_number":2116,"context_line":"                                                      inactive_binding, levels)"},{"line_number":2117,"context_line":"        cur_context, _, try_again \u003d self._commit_port_binding(original_context,"},{"line_number":2118,"context_line":"                                                              bind_context,"},{"line_number":2119,"context_line":"                                                              True, True)"},{"line_number":2120,"context_line":"        if try_again:"},{"line_number":2121,"context_line":"            raise n_exc.PortBindingError(port_id\u003dport_id, host\u003dhost)"},{"line_number":2122,"context_line":"        return self._make_port_binding_dict(cur_context._binding)"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_f49ed9b6","line":2119,"updated":"2018-01-04 00:43:05.000000000","message":"it would help reading the code if you gave kwargs names like need_notify\u003dTrue, try_again\u003dTrue","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"533527014987bb1f2c2c26b0d1040b5dff62d832","unresolved":false,"context_lines":[{"line_number":2116,"context_line":"                                                      inactive_binding, levels)"},{"line_number":2117,"context_line":"        cur_context, _, try_again \u003d self._commit_port_binding(original_context,"},{"line_number":2118,"context_line":"                                                              bind_context,"},{"line_number":2119,"context_line":"                                                              True, True)"},{"line_number":2120,"context_line":"        if try_again:"},{"line_number":2121,"context_line":"            raise n_exc.PortBindingError(port_id\u003dport_id, host\u003dhost)"},{"line_number":2122,"context_line":"        return self._make_port_binding_dict(cur_context._binding)"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_ca3f1223","line":2119,"in_reply_to":"9f91af0f_f49ed9b6","updated":"2018-01-09 04:20:46.000000000","message":"Done","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"076720a69883376593a5305d063448c8792cd4d7","unresolved":false,"context_lines":[{"line_number":2118,"context_line":"                                                              bind_context,"},{"line_number":2119,"context_line":"                                                              True, True)"},{"line_number":2120,"context_line":"        if try_again:"},{"line_number":2121,"context_line":"            raise n_exc.PortBindingError(port_id\u003dport_id, host\u003dhost)"},{"line_number":2122,"context_line":"        return self._make_port_binding_dict(cur_context._binding)"},{"line_number":2123,"context_line":""},{"line_number":2124,"context_line":"    @utils.transaction_guard"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_74aac9d2","line":2121,"updated":"2018-01-04 00:43:05.000000000","message":"hm. if it\u0027s try_again\u003dTrue, shouldn\u0027t we try again to activate it?","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"c4e259307b09305babbf367b2b26a79e2aa9c0c6","unresolved":false,"context_lines":[{"line_number":2118,"context_line":"                                                              bind_context,"},{"line_number":2119,"context_line":"                                                              True, True)"},{"line_number":2120,"context_line":"        if try_again:"},{"line_number":2121,"context_line":"            raise n_exc.PortBindingError(port_id\u003dport_id, host\u003dhost)"},{"line_number":2122,"context_line":"        return self._make_port_binding_dict(cur_context._binding)"},{"line_number":2123,"context_line":""},{"line_number":2124,"context_line":"    @utils.transaction_guard"}],"source_content_type":"text/x-python","patch_set":49,"id":"7f96bb07_21855dcf","line":2121,"in_reply_to":"9f91af0f_4a078283","updated":"2018-01-18 03:38:22.000000000","message":"Done","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"533527014987bb1f2c2c26b0d1040b5dff62d832","unresolved":false,"context_lines":[{"line_number":2118,"context_line":"                                                              bind_context,"},{"line_number":2119,"context_line":"                                                              True, True)"},{"line_number":2120,"context_line":"        if try_again:"},{"line_number":2121,"context_line":"            raise n_exc.PortBindingError(port_id\u003dport_id, host\u003dhost)"},{"line_number":2122,"context_line":"        return self._make_port_binding_dict(cur_context._binding)"},{"line_number":2123,"context_line":""},{"line_number":2124,"context_line":"    @utils.transaction_guard"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f91af0f_4a078283","line":2121,"in_reply_to":"9f91af0f_74aac9d2","updated":"2018-01-09 04:20:46.000000000","message":"Yes, will address in PS53","commit_id":"4ad3d8815d198cb3dd09d51cf6ed37d22ae15acc"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"be60ff0b664727cd521c390151c3a25dcad51221","unresolved":false,"context_lines":[{"line_number":1946,"context_line":"        elif event \u003d\u003d events.AFTER_CREATE or event \u003d\u003d events.AFTER_DELETE:"},{"line_number":1947,"context_line":"            self.mechanism_manager.update_network_postcommit(mech_context)"},{"line_number":1948,"context_line":""},{"line_number":1949,"context_line":"    def _validate_compute_port(self, port_db):"},{"line_number":1950,"context_line":"        if not port_db[\u0027device_owner\u0027].startswith("},{"line_number":1951,"context_line":"                const.DEVICE_OWNER_COMPUTE_PREFIX):"},{"line_number":1952,"context_line":"            msg \u003d (\u0027Invalid port %s. Operation only valid on compute \u0027"}],"source_content_type":"text/x-python","patch_set":50,"id":"9f91af0f_a4da2848","line":1949,"updated":"2018-01-07 09:58:31.000000000","message":"nit: can\u0027t it be static method?  You are not using \"self\" inside it","commit_id":"d7d50d961eea0b324ef0ea29ca9cdc0ddc865c00"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"2fa3835a4bcbca8502c7d489fab2ba243b2c92f9","unresolved":false,"context_lines":[{"line_number":1946,"context_line":"        elif event \u003d\u003d events.AFTER_CREATE or event \u003d\u003d events.AFTER_DELETE:"},{"line_number":1947,"context_line":"            self.mechanism_manager.update_network_postcommit(mech_context)"},{"line_number":1948,"context_line":""},{"line_number":1949,"context_line":"    def _validate_compute_port(self, port_db):"},{"line_number":1950,"context_line":"        if not port_db[\u0027device_owner\u0027].startswith("},{"line_number":1951,"context_line":"                const.DEVICE_OWNER_COMPUTE_PREFIX):"},{"line_number":1952,"context_line":"            msg \u003d (\u0027Invalid port %s. Operation only valid on compute \u0027"}],"source_content_type":"text/x-python","patch_set":50,"id":"9f91af0f_8c4ce642","line":1949,"in_reply_to":"9f91af0f_a4da2848","updated":"2018-01-08 03:55:34.000000000","message":"Done","commit_id":"d7d50d961eea0b324ef0ea29ca9cdc0ddc865c00"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"be60ff0b664727cd521c390151c3a25dcad51221","unresolved":false,"context_lines":[{"line_number":1953,"context_line":"                   \u0027ports\u0027 % port_db[\u0027id\u0027])"},{"line_number":1954,"context_line":"            raise exc.BadRequest(resource\u003d\u0027port\u0027, msg\u003dmsg)"},{"line_number":1955,"context_line":""},{"line_number":1956,"context_line":"    def _make_port_binding_dict(self, binding, fields\u003dNone):"},{"line_number":1957,"context_line":"        res \u003d {key: binding[key] for key in ("},{"line_number":1958,"context_line":"                    pbe_ext.HOST, pbe_ext.VIF_TYPE, pbe_ext.VNIC_TYPE,"},{"line_number":1959,"context_line":"                    pbe_ext.STATUS)}"}],"source_content_type":"text/x-python","patch_set":50,"id":"9f91af0f_e4bd90d8","line":1956,"updated":"2018-01-07 09:58:31.000000000","message":"shouldn\u0027t something like that be inside PortBinding OVO?","commit_id":"d7d50d961eea0b324ef0ea29ca9cdc0ddc865c00"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"2fa3835a4bcbca8502c7d489fab2ba243b2c92f9","unresolved":false,"context_lines":[{"line_number":1953,"context_line":"                   \u0027ports\u0027 % port_db[\u0027id\u0027])"},{"line_number":1954,"context_line":"            raise exc.BadRequest(resource\u003d\u0027port\u0027, msg\u003dmsg)"},{"line_number":1955,"context_line":""},{"line_number":1956,"context_line":"    def _make_port_binding_dict(self, binding, fields\u003dNone):"},{"line_number":1957,"context_line":"        res \u003d {key: binding[key] for key in ("},{"line_number":1958,"context_line":"                    pbe_ext.HOST, pbe_ext.VIF_TYPE, pbe_ext.VNIC_TYPE,"},{"line_number":1959,"context_line":"                    pbe_ext.STATUS)}"}],"source_content_type":"text/x-python","patch_set":50,"id":"9f91af0f_eebfaa5e","line":1956,"in_reply_to":"9f91af0f_e4bd90d8","updated":"2018-01-08 03:55:34.000000000","message":"None of the pre-existing code that I am touching in this plugin that deals with bindings has been converted to OVO. Since I don\u0027t want to be implementing this blueprint and conducting a conversion to OVO, I am going to stick to this. I am using OVOs where they are readily available (like in get_port_binding, get_port_bindings, delete_port_binding) and don\u0027t deviate me from the main goal of this patch which is implement multiple port bindings","commit_id":"d7d50d961eea0b324ef0ea29ca9cdc0ddc865c00"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8c1e954b5c2222eb92581d2028f498b4b8459323","unresolved":false,"context_lines":[{"line_number":2036,"context_line":""},{"line_number":2037,"context_line":"    @utils.transaction_guard"},{"line_number":2038,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2039,"context_line":"    def create_port_binding(self, context, port_id, binding):"},{"line_number":2040,"context_line":"        attrs \u003d binding[pbe_ext.RESOURCE_NAME]"},{"line_number":2041,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":2042,"context_line":"            port_db \u003d self._get_port(context, port_id)"}],"source_content_type":"text/x-python","patch_set":57,"id":"bf659307_8dd6b14f","line":2039,"updated":"2018-03-23 20:23:53.000000000","message":"Where does the policy check on this happen to tell if the context has a user or admin token? I realized that in https://review.openstack.org/#/c/523604/5 which creates port bindings that I wasn\u0027t using an admin token, just the user\u0027s token during the live migration. I guess since it\u0027s a live migration, by default nova policy it\u0027s only allowed for users, so the user token is admin for the live migration, so I guess that\u0027s why things didn\u0027t fail.\n\nBut what happens if a non-admin user makes curl requests directly to the API? Is the policy validated somewhere?","commit_id":"1a686ead1aa00b9707795c45db348a18645d7ab0"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ffec4ba7a684de61b488d31825f3e3c25028464d","unresolved":false,"context_lines":[{"line_number":2036,"context_line":""},{"line_number":2037,"context_line":"    @utils.transaction_guard"},{"line_number":2038,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2039,"context_line":"    def create_port_binding(self, context, port_id, binding):"},{"line_number":2040,"context_line":"        attrs \u003d binding[pbe_ext.RESOURCE_NAME]"},{"line_number":2041,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":2042,"context_line":"            port_db \u003d self._get_port(context, port_id)"}],"source_content_type":"text/x-python","patch_set":57,"id":"bf659307_9cc5295e","line":2039,"in_reply_to":"bf659307_8dd6b14f","updated":"2018-03-27 21:33:47.000000000","message":"Good catch, we have this for old binding api:\n\n    \"create_port:binding:host_id\": \"rule:admin_only\",\n    \"create_port:binding:profile\": \"rule:admin_only\",\n\nbut nothing for the new one in etc/policy.json","commit_id":"1a686ead1aa00b9707795c45db348a18645d7ab0"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"3ec46b55b02480cd58190ae7e837722b21e7e185","unresolved":false,"context_lines":[{"line_number":2036,"context_line":""},{"line_number":2037,"context_line":"    @utils.transaction_guard"},{"line_number":2038,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2039,"context_line":"    def create_port_binding(self, context, port_id, binding):"},{"line_number":2040,"context_line":"        attrs \u003d binding[pbe_ext.RESOURCE_NAME]"},{"line_number":2041,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":2042,"context_line":"            port_db \u003d self._get_port(context, port_id)"}],"source_content_type":"text/x-python","patch_set":57,"id":"bf659307_a9bfe2ce","line":2039,"in_reply_to":"bf659307_9cc5295e","updated":"2018-04-05 04:45:57.000000000","message":"I will take care of this in PS59","commit_id":"1a686ead1aa00b9707795c45db348a18645d7ab0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6a92389872eef42bc8854a0b32d54f25f819f859","unresolved":false,"context_lines":[{"line_number":2116,"context_line":""},{"line_number":2117,"context_line":"    @utils.transaction_guard"},{"line_number":2118,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2119,"context_line":"    def update_port_binding(self, context, host, port_id, binding):"},{"line_number":2120,"context_line":"        attrs \u003d binding[pbe_ext.RESOURCE_NAME]"},{"line_number":2121,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":2122,"context_line":"            port_db \u003d self._get_port(context, port_id)"}],"source_content_type":"text/x-python","patch_set":57,"id":"bf659307_2db76589","line":2119,"range":{"start_line":2119,"start_character":8,"end_line":2119,"end_character":27},"updated":"2018-03-23 20:54:16.000000000","message":"Is this just a generic PUT /ports/{port_id}/host/{host} with a body to update the binding, including it\u0027s status? Like, can I activate a port binding using this method?\n\nOn the nova side, we need to activate port bindings on the destination host in post-live-migration, and I\u0027m trying to determine which API method I use for that, and I assumed it would just be a PUT with changing the \u0027status\u0027 from INACTIVE to ACTIVE. Is that correct? If so, what is the \u0027activate\u0027 method for below?","commit_id":"1a686ead1aa00b9707795c45db348a18645d7ab0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"521ba2c92bd230c7cd712c12c46f3de3e1b6b401","unresolved":false,"context_lines":[{"line_number":2116,"context_line":""},{"line_number":2117,"context_line":"    @utils.transaction_guard"},{"line_number":2118,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2119,"context_line":"    def update_port_binding(self, context, host, port_id, binding):"},{"line_number":2120,"context_line":"        attrs \u003d binding[pbe_ext.RESOURCE_NAME]"},{"line_number":2121,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":2122,"context_line":"            port_db \u003d self._get_port(context, port_id)"}],"source_content_type":"text/x-python","patch_set":57,"id":"bf659307_ad585556","line":2119,"range":{"start_line":2119,"start_character":8,"end_line":2119,"end_character":27},"in_reply_to":"bf659307_2db76589","updated":"2018-03-23 20:56:31.000000000","message":"From the spec, it looks like I can\u0027t change (activate) the status on a port binding via the generic PUT:\n\nhttps://specs.openstack.org/openstack/neutron-specs/specs/backlog/pike/portbinding_information_for_nova.html#update-binding","commit_id":"1a686ead1aa00b9707795c45db348a18645d7ab0"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"3ec46b55b02480cd58190ae7e837722b21e7e185","unresolved":false,"context_lines":[{"line_number":2116,"context_line":""},{"line_number":2117,"context_line":"    @utils.transaction_guard"},{"line_number":2118,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2119,"context_line":"    def update_port_binding(self, context, host, port_id, binding):"},{"line_number":2120,"context_line":"        attrs \u003d binding[pbe_ext.RESOURCE_NAME]"},{"line_number":2121,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":2122,"context_line":"            port_db \u003d self._get_port(context, port_id)"}],"source_content_type":"text/x-python","patch_set":57,"id":"bf659307_c98fb673","line":2119,"range":{"start_line":2119,"start_character":8,"end_line":2119,"end_character":27},"in_reply_to":"bf659307_9c73e94d","updated":"2018-04-05 04:45:57.000000000","message":"Method activate in L2154 implementes the following PUT: PUT /v2.0/ports/{port_id}/bindings/{host_id}/activate","commit_id":"1a686ead1aa00b9707795c45db348a18645d7ab0"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ffec4ba7a684de61b488d31825f3e3c25028464d","unresolved":false,"context_lines":[{"line_number":2116,"context_line":""},{"line_number":2117,"context_line":"    @utils.transaction_guard"},{"line_number":2118,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2119,"context_line":"    def update_port_binding(self, context, host, port_id, binding):"},{"line_number":2120,"context_line":"        attrs \u003d binding[pbe_ext.RESOURCE_NAME]"},{"line_number":2121,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":2122,"context_line":"            port_db \u003d self._get_port(context, port_id)"}],"source_content_type":"text/x-python","patch_set":57,"id":"bf659307_9c73e94d","line":2119,"range":{"start_line":2119,"start_character":8,"end_line":2119,"end_character":27},"in_reply_to":"bf659307_ad585556","updated":"2018-03-27 21:33:47.000000000","message":"Yes, the plan was to use /activate to enable a binding. I am not sure why we haven\u0027t designed it around PUT though.","commit_id":"1a686ead1aa00b9707795c45db348a18645d7ab0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6a92389872eef42bc8854a0b32d54f25f819f859","unresolved":false,"context_lines":[{"line_number":2151,"context_line":""},{"line_number":2152,"context_line":"    @utils.transaction_guard"},{"line_number":2153,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2154,"context_line":"    def activate(self, context, host, request_data):"},{"line_number":2155,"context_line":"        port_id \u003d request_data[\u0027port_id\u0027]"},{"line_number":2156,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":2157,"context_line":"            port_db \u003d self._get_port(context, port_id)"}],"source_content_type":"text/x-python","patch_set":57,"id":"bf659307_edb08d8e","line":2154,"range":{"start_line":2154,"start_character":8,"end_line":2154,"end_character":16},"updated":"2018-03-23 20:54:16.000000000","message":"What is different about this vs update_port_binding above?","commit_id":"1a686ead1aa00b9707795c45db348a18645d7ab0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3cca59328780a3bc9b8c4e1bfbd923f5dc1f92e3","unresolved":false,"context_lines":[{"line_number":2151,"context_line":""},{"line_number":2152,"context_line":"    @utils.transaction_guard"},{"line_number":2153,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2154,"context_line":"    def activate(self, context, host, request_data):"},{"line_number":2155,"context_line":"        port_id \u003d request_data[\u0027port_id\u0027]"},{"line_number":2156,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":2157,"context_line":"            port_db \u003d self._get_port(context, port_id)"}],"source_content_type":"text/x-python","patch_set":57,"id":"bf659307_e2e0e128","line":2154,"range":{"start_line":2154,"start_character":8,"end_line":2154,"end_character":16},"in_reply_to":"bf659307_1c9d9958","updated":"2018-04-01 14:19:31.000000000","message":"In the nova patch that turns on this new flow, this is blowing up when trying to activate the dest host port binding in post-live migration:\n\nhttp://logs.openstack.org/37/522537/17/check/legacy-tempest-dsvm-multinode-live-migration/c5278d6/logs/screen-q-svc.txt.gz?level\u003dTRACE#_Mar_31_16_12_14_191309\n\nactivate failed: No details.: TypeError: activate() got an unexpected keyword argument \u0027port_id\u0027","commit_id":"1a686ead1aa00b9707795c45db348a18645d7ab0"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"826f1615f48b596fcb195c306defa8c4fbad21a9","unresolved":false,"context_lines":[{"line_number":2151,"context_line":""},{"line_number":2152,"context_line":"    @utils.transaction_guard"},{"line_number":2153,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2154,"context_line":"    def activate(self, context, host, request_data):"},{"line_number":2155,"context_line":"        port_id \u003d request_data[\u0027port_id\u0027]"},{"line_number":2156,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":2157,"context_line":"            port_db \u003d self._get_port(context, port_id)"}],"source_content_type":"text/x-python","patch_set":57,"id":"bf659307_8993fe00","line":2154,"range":{"start_line":2154,"start_character":8,"end_line":2154,"end_character":16},"in_reply_to":"bf659307_a9d5a245","updated":"2018-04-05 04:47:50.000000000","message":"The patch that I mention in the previous comment is https://review.openstack.org/#/c/558990. This is the patch that should be deployed for further testing on your part, since it depends on this one","commit_id":"1a686ead1aa00b9707795c45db348a18645d7ab0"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"3ec46b55b02480cd58190ae7e837722b21e7e185","unresolved":false,"context_lines":[{"line_number":2151,"context_line":""},{"line_number":2152,"context_line":"    @utils.transaction_guard"},{"line_number":2153,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2154,"context_line":"    def activate(self, context, host, request_data):"},{"line_number":2155,"context_line":"        port_id \u003d request_data[\u0027port_id\u0027]"},{"line_number":2156,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":2157,"context_line":"            port_db \u003d self._get_port(context, port_id)"}],"source_content_type":"text/x-python","patch_set":57,"id":"bf659307_a9d5a245","line":2154,"range":{"start_line":2154,"start_character":8,"end_line":2154,"end_character":16},"in_reply_to":"bf659307_e2e0e128","updated":"2018-04-05 04:45:57.000000000","message":"Yes, this method should be:\n\ndef activate(self, context, host, port_id):\n\nThere is a bug in Neutron\u0027s testing framework that is incorrectly wiring this specific PUT:\n\nPUT /v2.0/ports/{port_id}/bindings/{host_id}/activate\n\nSo to pass unit tests, I had to define as in L2154. \n\nFixed. After fixing I found another bug in https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/db.py#L214, which I also fixed in this patch: \n\nAfter this latter fix, I tested the whole thing in a 4 nodes test environment (https://github.com/miguellavalle/routednetworksvagrant). I am simulating VIFS with namespaces that I create in different nodes of the test environment using these scripts: http://paste.openstack.org/show/718441/ (rx VIF) and http://paste.openstack.org/show/718442/ (tx VIF). These scripts mimic the VIFs created by the DHCP agent for DNSMASQ. Prior to plugging the VIFs, I have bindings ready for them in their respective hosts. I then communicate from the tx VIF to the rx VIF using \"sudo ip netns exec ns-tx-miguel nc 10.1.0.8 1300\" and \"sudo ip netns exec ns-rx-miguel nc -l -p 1300\" respectively. After this connection test succeeds, I create a new binding for one of the VIFs in a different host, activate this new binding, plug the VIF in the new host and repeat the netcat connection test. At this point I am successful migrating VIFs from OVS to OVS. Next step is to do the same thing moving from OVS to Linuxbridge and vice versa. That will happen over the next few days","commit_id":"1a686ead1aa00b9707795c45db348a18645d7ab0"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ffec4ba7a684de61b488d31825f3e3c25028464d","unresolved":false,"context_lines":[{"line_number":2151,"context_line":""},{"line_number":2152,"context_line":"    @utils.transaction_guard"},{"line_number":2153,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2154,"context_line":"    def activate(self, context, host, request_data):"},{"line_number":2155,"context_line":"        port_id \u003d request_data[\u0027port_id\u0027]"},{"line_number":2156,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":2157,"context_line":"            port_db \u003d self._get_port(context, port_id)"}],"source_content_type":"text/x-python","patch_set":57,"id":"bf659307_1c9d9958","line":2154,"range":{"start_line":2154,"start_character":8,"end_line":2154,"end_character":16},"in_reply_to":"bf659307_ed5e4d44","updated":"2018-03-27 21:33:47.000000000","message":"Yes, it\u0027s /activate.","commit_id":"1a686ead1aa00b9707795c45db348a18645d7ab0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"521ba2c92bd230c7cd712c12c46f3de3e1b6b401","unresolved":false,"context_lines":[{"line_number":2151,"context_line":""},{"line_number":2152,"context_line":"    @utils.transaction_guard"},{"line_number":2153,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2154,"context_line":"    def activate(self, context, host, request_data):"},{"line_number":2155,"context_line":"        port_id \u003d request_data[\u0027port_id\u0027]"},{"line_number":2156,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":2157,"context_line":"            port_db \u003d self._get_port(context, port_id)"}],"source_content_type":"text/x-python","patch_set":57,"id":"bf659307_ed5e4d44","line":2154,"range":{"start_line":2154,"start_character":8,"end_line":2154,"end_character":16},"in_reply_to":"bf659307_edb08d8e","updated":"2018-03-23 20:56:31.000000000","message":"Oh I guess this is:\n\nhttps://specs.openstack.org/openstack/neutron-specs/specs/backlog/pike/portbinding_information_for_nova.html#activating-an-inactive-binding\n\nPUT /v2.0/ports/{port_id}/bindings/{host_id}/activate\n\n?","commit_id":"1a686ead1aa00b9707795c45db348a18645d7ab0"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ffec4ba7a684de61b488d31825f3e3c25028464d","unresolved":false,"context_lines":[{"line_number":2191,"context_line":"                original_context, bind_context, need_notify\u003dTrue,"},{"line_number":2192,"context_line":"                try_again\u003dTrue)"},{"line_number":2193,"context_line":"            if not try_again:"},{"line_number":2194,"context_line":"                self.notifier.port_delete(context, port_id)"},{"line_number":2195,"context_line":"                self._notify_port_updated(cur_context)"},{"line_number":2196,"context_line":"                return self._make_port_binding_dict(cur_context._binding)"},{"line_number":2197,"context_line":"        raise n_exc.PortBindingError(port_id\u003dport_id, host\u003dhost)"}],"source_content_type":"text/x-python","patch_set":57,"id":"bf659307_5ce1d1cf","line":2194,"updated":"2018-03-27 21:33:47.000000000","message":"I probably miss something obvious but why do we notify about port deletion here? We merely failed to bind the port, but the port is still present.","commit_id":"1a686ead1aa00b9707795c45db348a18645d7ab0"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"3ec46b55b02480cd58190ae7e837722b21e7e185","unresolved":false,"context_lines":[{"line_number":2191,"context_line":"                original_context, bind_context, need_notify\u003dTrue,"},{"line_number":2192,"context_line":"                try_again\u003dTrue)"},{"line_number":2193,"context_line":"            if not try_again:"},{"line_number":2194,"context_line":"                self.notifier.port_delete(context, port_id)"},{"line_number":2195,"context_line":"                self._notify_port_updated(cur_context)"},{"line_number":2196,"context_line":"                return self._make_port_binding_dict(cur_context._binding)"},{"line_number":2197,"context_line":"        raise n_exc.PortBindingError(port_id\u003dport_id, host\u003dhost)"}],"source_content_type":"text/x-python","patch_set":57,"id":"bf659307_29467223","line":2194,"in_reply_to":"bf659307_5ce1d1cf","updated":"2018-04-05 04:45:57.000000000","message":"No, here we didn\u0027t fail a binding (failure is handled in L2197 below). We succeeded activating a binding and as a consequence we need to notify the agent with the deactivated binding.","commit_id":"1a686ead1aa00b9707795c45db348a18645d7ab0"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"e886bbfe2cdca34435e4771d74b413f8b8c52f44","unresolved":false,"context_lines":[{"line_number":250,"context_line":"                      port_id)"},{"line_number":251,"context_line":"            return"},{"line_number":252,"context_line":"        if port_binding.vif_type in (portbindings.VIF_TYPE_BINDING_FAILED,"},{"line_number":253,"context_line":"                                     portbindings.VIF_TYPE_UNBOUND):"},{"line_number":254,"context_line":"            # NOTE(kevinbenton): we hit here when a port is created without"},{"line_number":255,"context_line":"            # a host ID and the dhcp agent notifies that its wiring is done"},{"line_number":256,"context_line":"            LOG.debug(\"Port %s cannot update to ACTIVE because it \""}],"source_content_type":"text/x-python","patch_set":59,"id":"bf659307_a1cfcb55","line":253,"updated":"2018-04-07 20:40:25.000000000","message":"so can we have now binding with status ACTIVE which vif_type is UNBOUND or BINDING_FAILED?","commit_id":"85c348508217e763c637ed9d4db36da201b824a1"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"90ff9c599038d74abb33de2cab0bd5fa5bb11e39","unresolved":false,"context_lines":[{"line_number":250,"context_line":"                      port_id)"},{"line_number":251,"context_line":"            return"},{"line_number":252,"context_line":"        if port_binding.vif_type in (portbindings.VIF_TYPE_BINDING_FAILED,"},{"line_number":253,"context_line":"                                     portbindings.VIF_TYPE_UNBOUND):"},{"line_number":254,"context_line":"            # NOTE(kevinbenton): we hit here when a port is created without"},{"line_number":255,"context_line":"            # a host ID and the dhcp agent notifies that its wiring is done"},{"line_number":256,"context_line":"            LOG.debug(\"Port %s cannot update to ACTIVE because it \""}],"source_content_type":"text/x-python","patch_set":59,"id":"5f7c97a3_9bcc3c62","line":253,"in_reply_to":"bf659307_a1cfcb55","updated":"2018-05-09 21:57:09.000000000","message":"Now you can have multiple bindings. Only one of those bindings is ACTIVE and yes, it can be un-bound. That happend even before multiple port bindings. The current binding can be un-bound. That un-bound binding was implicitly ACTIVE. What we are doing now is to make that explicit","commit_id":"85c348508217e763c637ed9d4db36da201b824a1"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"e886bbfe2cdca34435e4771d74b413f8b8c52f44","unresolved":false,"context_lines":[{"line_number":326,"context_line":""},{"line_number":327,"context_line":"    def _clear_port_binding(self, mech_context, binding, port, original_host):"},{"line_number":328,"context_line":"        binding.vif_type \u003d portbindings.VIF_TYPE_UNBOUND"},{"line_number":329,"context_line":"        binding.vif_details \u003d \u0027\u0027"},{"line_number":330,"context_line":"        db.clear_binding_levels(mech_context._plugin_context, port[\u0027id\u0027],"},{"line_number":331,"context_line":"                                original_host)"},{"line_number":332,"context_line":"        mech_context._clear_binding_levels()"}],"source_content_type":"text/x-python","patch_set":59,"id":"bf659307_410a6f8a","line":329,"updated":"2018-04-07 20:40:25.000000000","message":"should we set binding status to INACTIVE when it is UNBOUND? or those are two completely different things not related to each other?","commit_id":"85c348508217e763c637ed9d4db36da201b824a1"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"90ff9c599038d74abb33de2cab0bd5fa5bb11e39","unresolved":false,"context_lines":[{"line_number":326,"context_line":""},{"line_number":327,"context_line":"    def _clear_port_binding(self, mech_context, binding, port, original_host):"},{"line_number":328,"context_line":"        binding.vif_type \u003d portbindings.VIF_TYPE_UNBOUND"},{"line_number":329,"context_line":"        binding.vif_details \u003d \u0027\u0027"},{"line_number":330,"context_line":"        db.clear_binding_levels(mech_context._plugin_context, port[\u0027id\u0027],"},{"line_number":331,"context_line":"                                original_host)"},{"line_number":332,"context_line":"        mech_context._clear_binding_levels()"}],"source_content_type":"text/x-python","patch_set":59,"id":"5f7c97a3_1b2fccf6","line":329,"in_reply_to":"bf659307_410a6f8a","updated":"2018-05-09 21:57:09.000000000","message":"No, see response to L253","commit_id":"85c348508217e763c637ed9d4db36da201b824a1"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"e886bbfe2cdca34435e4771d74b413f8b8c52f44","unresolved":false,"context_lines":[{"line_number":569,"context_line":"                # Update the port\u0027s binding state with our binding"},{"line_number":570,"context_line":"                # results."},{"line_number":571,"context_line":"                if new_binding.status \u003d\u003d const.INACTIVE:"},{"line_number":572,"context_line":"                    cur_context_binding.status \u003d (const.ACTIVE)"},{"line_number":573,"context_line":"                    cur_binding.status \u003d const.INACTIVE"},{"line_number":574,"context_line":"                else:"},{"line_number":575,"context_line":"                    cur_context_binding.vif_type \u003d new_binding.vif_type"}],"source_content_type":"text/x-python","patch_set":59,"id":"bf659307_a1f82b7c","line":572,"range":{"start_line":572,"start_character":49,"end_line":572,"end_character":50},"updated":"2018-04-07 20:40:25.000000000","message":"is this parenthesis needed here?","commit_id":"85c348508217e763c637ed9d4db36da201b824a1"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"90ff9c599038d74abb33de2cab0bd5fa5bb11e39","unresolved":false,"context_lines":[{"line_number":569,"context_line":"                # Update the port\u0027s binding state with our binding"},{"line_number":570,"context_line":"                # results."},{"line_number":571,"context_line":"                if new_binding.status \u003d\u003d const.INACTIVE:"},{"line_number":572,"context_line":"                    cur_context_binding.status \u003d (const.ACTIVE)"},{"line_number":573,"context_line":"                    cur_binding.status \u003d const.INACTIVE"},{"line_number":574,"context_line":"                else:"},{"line_number":575,"context_line":"                    cur_context_binding.vif_type \u003d new_binding.vif_type"}],"source_content_type":"text/x-python","patch_set":59,"id":"5f7c97a3_3bfe4837","line":572,"range":{"start_line":572,"start_character":49,"end_line":572,"end_character":50},"in_reply_to":"bf659307_a1f82b7c","updated":"2018-05-09 21:57:09.000000000","message":"No, removed","commit_id":"85c348508217e763c637ed9d4db36da201b824a1"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"5dddb8c88ff498e91cebcb978d33e8788d974d1d","unresolved":false,"context_lines":[{"line_number":2102,"context_line":"    @utils.transaction_guard"},{"line_number":2103,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2104,"context_line":"    def get_port_binding(self, context, host, port_id, fields\u003dNone):"},{"line_number":2105,"context_line":"        self._validate_compute_port(ports_obj.Port.get_object(context,"},{"line_number":2106,"context_line":"                                                              id\u003dport_id))"},{"line_number":2107,"context_line":"        binding \u003d ports_obj.PortBinding.get_object(context, host\u003dhost,"},{"line_number":2108,"context_line":"                                                   port_id\u003dport_id)"}],"source_content_type":"text/x-python","patch_set":59,"id":"9f6a8fd7_8968491d","line":2105,"updated":"2018-04-21 22:25:27.000000000","message":"get port and confirn it exists before calling validate","commit_id":"85c348508217e763c637ed9d4db36da201b824a1"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"90ff9c599038d74abb33de2cab0bd5fa5bb11e39","unresolved":false,"context_lines":[{"line_number":2102,"context_line":"    @utils.transaction_guard"},{"line_number":2103,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2104,"context_line":"    def get_port_binding(self, context, host, port_id, fields\u003dNone):"},{"line_number":2105,"context_line":"        self._validate_compute_port(ports_obj.Port.get_object(context,"},{"line_number":2106,"context_line":"                                                              id\u003dport_id))"},{"line_number":2107,"context_line":"        binding \u003d ports_obj.PortBinding.get_object(context, host\u003dhost,"},{"line_number":2108,"context_line":"                                                   port_id\u003dport_id)"}],"source_content_type":"text/x-python","patch_set":59,"id":"5f7c97a3_ce5d10ea","line":2105,"in_reply_to":"9f6a8fd7_8968491d","updated":"2018-05-09 21:57:09.000000000","message":"Done","commit_id":"85c348508217e763c637ed9d4db36da201b824a1"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"9b5a1c4fda1b559b6a5d9abdf0fa5beb78bc4f5b","unresolved":false,"context_lines":[{"line_number":2153,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2154,"context_line":"    def activate(self, context, host, port_id):"},{"line_number":2155,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":2156,"context_line":"            if isinstance(port_id, dict):"},{"line_number":2157,"context_line":"                port_id \u003d port_id[\u0027port_id\u0027]"},{"line_number":2158,"context_line":"            port_db \u003d self._get_port(context, port_id)"},{"line_number":2159,"context_line":"            self._validate_compute_port(port_db)"}],"source_content_type":"text/x-python","patch_set":59,"id":"bf659307_e002bd09","line":2156,"updated":"2018-04-05 17:28:32.000000000","message":"when do we get a bare id and not a dict with port_id inside?","commit_id":"85c348508217e763c637ed9d4db36da201b824a1"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"90ff9c599038d74abb33de2cab0bd5fa5bb11e39","unresolved":false,"context_lines":[{"line_number":2153,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2154,"context_line":"    def activate(self, context, host, port_id):"},{"line_number":2155,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":2156,"context_line":"            if isinstance(port_id, dict):"},{"line_number":2157,"context_line":"                port_id \u003d port_id[\u0027port_id\u0027]"},{"line_number":2158,"context_line":"            port_db \u003d self._get_port(context, port_id)"},{"line_number":2159,"context_line":"            self._validate_compute_port(port_db)"}],"source_content_type":"text/x-python","patch_set":59,"id":"5f7c97a3_9bad1c33","line":2156,"in_reply_to":"bf659307_17b7d5da","updated":"2018-05-09 21:57:09.000000000","message":"Please see this bug explaining why this is necessary for the time being: https://bugs.launchpad.net/neutron/+bug/1770267\n\nAdded a TODO to remove this line and the following when th bug is fixed","commit_id":"85c348508217e763c637ed9d4db36da201b824a1"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"e886bbfe2cdca34435e4771d74b413f8b8c52f44","unresolved":false,"context_lines":[{"line_number":2153,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2154,"context_line":"    def activate(self, context, host, port_id):"},{"line_number":2155,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":2156,"context_line":"            if isinstance(port_id, dict):"},{"line_number":2157,"context_line":"                port_id \u003d port_id[\u0027port_id\u0027]"},{"line_number":2158,"context_line":"            port_db \u003d self._get_port(context, port_id)"},{"line_number":2159,"context_line":"            self._validate_compute_port(port_db)"}],"source_content_type":"text/x-python","patch_set":59,"id":"bf659307_17b7d5da","line":2156,"in_reply_to":"bf659307_e002bd09","updated":"2018-04-07 20:40:25.000000000","message":"if it might be (or is always) dict I would name it \"port\" and then do port_id \u003d port[\u0027port_id\u0027]. I know that it\u0027s very small nitty nit but IMHO it would be more readable then \"port_id\" which in fact is dict.","commit_id":"85c348508217e763c637ed9d4db36da201b824a1"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"ecd7f0ceca8ed4ae06272be4232dfdc8efaaaaa4","unresolved":false,"context_lines":[{"line_number":2039,"context_line":"    def create_port_binding(self, context, port_id, binding):"},{"line_number":2040,"context_line":"        attrs \u003d binding[pbe_ext.RESOURCE_NAME]"},{"line_number":2041,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":2042,"context_line":"            port_db \u003d self._get_port(context, port_id)"},{"line_number":2043,"context_line":"            self._validate_compute_port(port_db)"},{"line_number":2044,"context_line":"            if self._get_binding_for_host(port_db.port_binding,"},{"line_number":2045,"context_line":"                                          attrs[pbe_ext.HOST]):"}],"source_content_type":"text/x-python","patch_set":64,"id":"5f7c97a3_b0d218d0","line":2042,"updated":"2018-05-15 07:54:56.000000000","message":"why not OVO object?","commit_id":"076573cd16d4572c9cff5ae069034c0434340e85"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"5694dcef1da145959278ed17ff861742aa91eeac","unresolved":false,"context_lines":[{"line_number":2039,"context_line":"    def create_port_binding(self, context, port_id, binding):"},{"line_number":2040,"context_line":"        attrs \u003d binding[pbe_ext.RESOURCE_NAME]"},{"line_number":2041,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":2042,"context_line":"            port_db \u003d self._get_port(context, port_id)"},{"line_number":2043,"context_line":"            self._validate_compute_port(port_db)"},{"line_number":2044,"context_line":"            if self._get_binding_for_host(port_db.port_binding,"},{"line_number":2045,"context_line":"                                          attrs[pbe_ext.HOST]):"}],"source_content_type":"text/x-python","patch_set":64,"id":"5f7c97a3_dbe30b06","line":2042,"in_reply_to":"5f7c97a3_4126256b","updated":"2018-06-03 22:17:36.000000000","message":"+1","commit_id":"076573cd16d4572c9cff5ae069034c0434340e85"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"943ac62ff6694dd25e8a3177c8aa94603dd606a4","unresolved":false,"context_lines":[{"line_number":2039,"context_line":"    def create_port_binding(self, context, port_id, binding):"},{"line_number":2040,"context_line":"        attrs \u003d binding[pbe_ext.RESOURCE_NAME]"},{"line_number":2041,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":2042,"context_line":"            port_db \u003d self._get_port(context, port_id)"},{"line_number":2043,"context_line":"            self._validate_compute_port(port_db)"},{"line_number":2044,"context_line":"            if self._get_binding_for_host(port_db.port_binding,"},{"line_number":2045,"context_line":"                                          attrs[pbe_ext.HOST]):"}],"source_content_type":"text/x-python","patch_set":64,"id":"5f7c97a3_4126256b","line":2042,"in_reply_to":"5f7c97a3_b0d218d0","updated":"2018-05-17 08:50:14.000000000","message":"I think it is because of Line 2059. If we switch to port OVO, we also need to revise self._make_port_dict() or add a temporary method like self._make_port_dict_obj().","commit_id":"076573cd16d4572c9cff5ae069034c0434340e85"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"ecd7f0ceca8ed4ae06272be4232dfdc8efaaaaa4","unresolved":false,"context_lines":[{"line_number":2088,"context_line":"    def get_port_bindings(self, context, port_id, filters\u003dNone, fields\u003dNone,"},{"line_number":2089,"context_line":"                          sorts\u003dNone, limit\u003dNone, marker\u003dNone,"},{"line_number":2090,"context_line":"                          page_reverse\u003dFalse):"},{"line_number":2091,"context_line":"        port_db \u003d ports_obj.Port.get_object(context, id\u003dport_id)"},{"line_number":2092,"context_line":"        if not port_db:"},{"line_number":2093,"context_line":"            raise exc.PortNotFound(port_id\u003dport_id)"},{"line_number":2094,"context_line":"        self._validate_compute_port(port_db)"}],"source_content_type":"text/x-python","patch_set":64,"id":"5f7c97a3_308cc8d5","line":2091,"range":{"start_line":2091,"start_character":8,"end_line":2091,"end_character":15},"updated":"2018-05-15 07:54:56.000000000","message":"nit: it\u0027s port_object (or just port) instead of port_db, right?","commit_id":"076573cd16d4572c9cff5ae069034c0434340e85"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"943ac62ff6694dd25e8a3177c8aa94603dd606a4","unresolved":false,"context_lines":[{"line_number":2088,"context_line":"    def get_port_bindings(self, context, port_id, filters\u003dNone, fields\u003dNone,"},{"line_number":2089,"context_line":"                          sorts\u003dNone, limit\u003dNone, marker\u003dNone,"},{"line_number":2090,"context_line":"                          page_reverse\u003dFalse):"},{"line_number":2091,"context_line":"        port_db \u003d ports_obj.Port.get_object(context, id\u003dport_id)"},{"line_number":2092,"context_line":"        if not port_db:"},{"line_number":2093,"context_line":"            raise exc.PortNotFound(port_id\u003dport_id)"},{"line_number":2094,"context_line":"        self._validate_compute_port(port_db)"}],"source_content_type":"text/x-python","patch_set":64,"id":"5f7c97a3_c1c79564","line":2091,"range":{"start_line":2091,"start_character":8,"end_line":2091,"end_character":15},"in_reply_to":"5f7c97a3_308cc8d5","updated":"2018-05-17 08:50:14.000000000","message":"agree. we should also probably rename _validate_compute_port(port) too, as we are passing both db and OVO to it.","commit_id":"076573cd16d4572c9cff5ae069034c0434340e85"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"5694dcef1da145959278ed17ff861742aa91eeac","unresolved":false,"context_lines":[{"line_number":2088,"context_line":"    def get_port_bindings(self, context, port_id, filters\u003dNone, fields\u003dNone,"},{"line_number":2089,"context_line":"                          sorts\u003dNone, limit\u003dNone, marker\u003dNone,"},{"line_number":2090,"context_line":"                          page_reverse\u003dFalse):"},{"line_number":2091,"context_line":"        port_db \u003d ports_obj.Port.get_object(context, id\u003dport_id)"},{"line_number":2092,"context_line":"        if not port_db:"},{"line_number":2093,"context_line":"            raise exc.PortNotFound(port_id\u003dport_id)"},{"line_number":2094,"context_line":"        self._validate_compute_port(port_db)"}],"source_content_type":"text/x-python","patch_set":64,"id":"5f7c97a3_5bb93bea","line":2091,"range":{"start_line":2091,"start_character":8,"end_line":2091,"end_character":15},"in_reply_to":"5f7c97a3_c1c79564","updated":"2018-06-03 22:17:36.000000000","message":"Done here an in _validate_compute_port","commit_id":"076573cd16d4572c9cff5ae069034c0434340e85"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"943ac62ff6694dd25e8a3177c8aa94603dd606a4","unresolved":false,"context_lines":[{"line_number":2103,"context_line":"    @utils.transaction_guard"},{"line_number":2104,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2105,"context_line":"    def get_port_binding(self, context, host, port_id, fields\u003dNone):"},{"line_number":2106,"context_line":"        self._validate_compute_port(ports_obj.Port.get_object(context,"},{"line_number":2107,"context_line":"                                                              id\u003dport_id))"},{"line_number":2108,"context_line":"        binding \u003d ports_obj.PortBinding.get_object(context, host\u003dhost,"},{"line_number":2109,"context_line":"                                                   port_id\u003dport_id)"},{"line_number":2110,"context_line":"        if not binding:"}],"source_content_type":"text/x-python","patch_set":64,"id":"5f7c97a3_a1bff9ce","line":2107,"range":{"start_line":2106,"start_character":36,"end_line":2107,"end_character":73},"updated":"2018-05-17 08:50:14.000000000","message":"why don\u0027t we have something like line 2092 here?","commit_id":"076573cd16d4572c9cff5ae069034c0434340e85"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"5694dcef1da145959278ed17ff861742aa91eeac","unresolved":false,"context_lines":[{"line_number":2103,"context_line":"    @utils.transaction_guard"},{"line_number":2104,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2105,"context_line":"    def get_port_binding(self, context, host, port_id, fields\u003dNone):"},{"line_number":2106,"context_line":"        self._validate_compute_port(ports_obj.Port.get_object(context,"},{"line_number":2107,"context_line":"                                                              id\u003dport_id))"},{"line_number":2108,"context_line":"        binding \u003d ports_obj.PortBinding.get_object(context, host\u003dhost,"},{"line_number":2109,"context_line":"                                                   port_id\u003dport_id)"},{"line_number":2110,"context_line":"        if not binding:"}],"source_content_type":"text/x-python","patch_set":64,"id":"5f7c97a3_bbc3af57","line":2107,"range":{"start_line":2106,"start_character":36,"end_line":2107,"end_character":73},"in_reply_to":"5f7c97a3_a1bff9ce","updated":"2018-06-03 22:17:36.000000000","message":"Done","commit_id":"076573cd16d4572c9cff5ae069034c0434340e85"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"26380577cc0f46c548305eaccf6826c41f3056cc","unresolved":false,"context_lines":[{"line_number":2005,"context_line":"        res \u003d {key: binding[key] for key in ("},{"line_number":2006,"context_line":"                    pbe_ext.HOST, pbe_ext.VIF_TYPE, pbe_ext.VNIC_TYPE,"},{"line_number":2007,"context_line":"                    pbe_ext.STATUS)}"},{"line_number":2008,"context_line":"        if isinstance(binding, ports_obj.PortBinding):"},{"line_number":2009,"context_line":"            res[pbe_ext.PROFILE] \u003d binding.profile"},{"line_number":2010,"context_line":"            res[pbe_ext.VIF_DETAILS] \u003d binding.vif_details"},{"line_number":2011,"context_line":"        else:"},{"line_number":2012,"context_line":"            res[pbe_ext.PROFILE] \u003d self._get_profile(binding)"},{"line_number":2013,"context_line":"            res[pbe_ext.VIF_DETAILS] \u003d self._get_vif_details(binding)"},{"line_number":2014,"context_line":"        return db_utils.resource_fields(res, fields)"},{"line_number":2015,"context_line":""},{"line_number":2016,"context_line":"    def _get_port_binding_attrs(self, binding, host\u003dNone):"}],"source_content_type":"text/x-python","patch_set":66,"id":"5f7c97a3_909c2e6b","line":2013,"range":{"start_line":2008,"start_character":8,"end_line":2013,"end_character":69},"updated":"2018-06-19 23:09:42.000000000","message":"I\u0027m seeing some inconsistency in the vif_details (and probably profile) dict when running through this code in the live migration job at the top of the nova series that\u0027s using it. The detailed debug is at the bottom of the comments here:\n\nhttps://review.openstack.org/#/c/522537/30\n\nThis is what I\u0027m seeing in the port\u0027s vif_details on the source host before live migration:\n\n\"details\":{\n         \"port_filter\":true,\n         \"datapath_type\":\"system\",\n         \"ovs_hybrid_plug\":false\n      },\n\nAnd this is the generated vif_details we\u0027re getting from the port binding for the destination host:\n\n\"details\":{\n      \"port_filter\":\"True\",\n      \"datapath_type\":\"system\",\n      \"ovs_hybrid_plug\":\"False\"\n   },\n\nThe port_filter and ovs_hybrid_plug values going from boolean to string are messing up how nova builds the os-vif object for plugging in the host, and we go from a VIFOpenVSwitch object on the source host to a VIFBridge object on the destination host because:\n\nif \"False\": equates to True here:\n\nhttps://github.com/openstack/nova/blob/ecaadf6d6d3c94706fdd1fb24676e3bd2370f9f7/nova/network/os_vif_util.py#L300\n\nhttps://github.com/openstack/nova/blob/ecaadf6d6d3c94706fdd1fb24676e3bd2370f9f7/nova/network/model.py#L459\n\nnova could be smarter and cast the strings to booleans in the is_hybrid_plug_enabled and is_neutron_filtering_enabled methods, but I want to point out that there is a difference in type on these otherwise similar vif_details values between the port resource and the port binding resource, and it seems we should be consistent. It\u0027s already confusing enough that the port has a binding:host_id field and the port binding resource has a \u0027host\u0027 field (not host_id). The inconsistencies make it harder to code things up on the client side (in this case, nova).\n\nThe last time the series of changes was passing was May 14 so something changed between then and now to make the port binding resource vif_details values strings rather than booleans.\n\nhttp://logs.openstack.org/37/522537/28/check/nova-live-migration/c3e50d2/ (the logs are gone now)","commit_id":"957e4f2e4d2e23121821ce4bb95724707e8d93ee"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1ff2acdada2b0603b9dfa5688aedf5a34128a3dc","unresolved":false,"context_lines":[{"line_number":2005,"context_line":"        res \u003d {key: binding[key] for key in ("},{"line_number":2006,"context_line":"                    pbe_ext.HOST, pbe_ext.VIF_TYPE, pbe_ext.VNIC_TYPE,"},{"line_number":2007,"context_line":"                    pbe_ext.STATUS)}"},{"line_number":2008,"context_line":"        if isinstance(binding, ports_obj.PortBinding):"},{"line_number":2009,"context_line":"            res[pbe_ext.PROFILE] \u003d binding.profile"},{"line_number":2010,"context_line":"            res[pbe_ext.VIF_DETAILS] \u003d binding.vif_details"},{"line_number":2011,"context_line":"        else:"},{"line_number":2012,"context_line":"            res[pbe_ext.PROFILE] \u003d self._get_profile(binding)"},{"line_number":2013,"context_line":"            res[pbe_ext.VIF_DETAILS] \u003d self._get_vif_details(binding)"},{"line_number":2014,"context_line":"        return db_utils.resource_fields(res, fields)"},{"line_number":2015,"context_line":""},{"line_number":2016,"context_line":"    def _get_port_binding_attrs(self, binding, host\u003dNone):"}],"source_content_type":"text/x-python","patch_set":66,"id":"5f7c97a3_e384ac0d","line":2013,"range":{"start_line":2008,"start_character":8,"end_line":2013,"end_character":69},"in_reply_to":"5f7c97a3_5018d682","updated":"2018-06-20 12:34:56.000000000","message":"Just an update, with my workaround https://review.openstack.org/#/c/576664/ in place the live migration job passes again, so on the nova side I can go with that for now, but still think it would be in the best interest of the API (and its users) if the vif details values that should be booleans, like port_filter and ovs_hybrid_plug, are booleans instead of strings. If it turns out that they already are and it\u0027s something on the nova side that\u0027s converting them to strings, just let me know and I\u0027ll dig deeper once I\u0027m back on the 25th.","commit_id":"957e4f2e4d2e23121821ce4bb95724707e8d93ee"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"50744aff7f85128bda721bb8c4d7b43747f55a66","unresolved":false,"context_lines":[{"line_number":2005,"context_line":"        res \u003d {key: binding[key] for key in ("},{"line_number":2006,"context_line":"                    pbe_ext.HOST, pbe_ext.VIF_TYPE, pbe_ext.VNIC_TYPE,"},{"line_number":2007,"context_line":"                    pbe_ext.STATUS)}"},{"line_number":2008,"context_line":"        if isinstance(binding, ports_obj.PortBinding):"},{"line_number":2009,"context_line":"            res[pbe_ext.PROFILE] \u003d binding.profile"},{"line_number":2010,"context_line":"            res[pbe_ext.VIF_DETAILS] \u003d binding.vif_details"},{"line_number":2011,"context_line":"        else:"},{"line_number":2012,"context_line":"            res[pbe_ext.PROFILE] \u003d self._get_profile(binding)"},{"line_number":2013,"context_line":"            res[pbe_ext.VIF_DETAILS] \u003d self._get_vif_details(binding)"},{"line_number":2014,"context_line":"        return db_utils.resource_fields(res, fields)"},{"line_number":2015,"context_line":""},{"line_number":2016,"context_line":"    def _get_port_binding_attrs(self, binding, host\u003dNone):"}],"source_content_type":"text/x-python","patch_set":66,"id":"5f7c97a3_5018d682","line":2013,"range":{"start_line":2008,"start_character":8,"end_line":2013,"end_character":69},"in_reply_to":"5f7c97a3_50dbf61f","updated":"2018-06-19 23:38:57.000000000","message":"This is my workaround on the nova side for now:\n\nhttps://review.openstack.org/#/c/576664/","commit_id":"957e4f2e4d2e23121821ce4bb95724707e8d93ee"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a360a985a0316e6c9fd7fdf790566ced67f8cb3d","unresolved":false,"context_lines":[{"line_number":2005,"context_line":"        res \u003d {key: binding[key] for key in ("},{"line_number":2006,"context_line":"                    pbe_ext.HOST, pbe_ext.VIF_TYPE, pbe_ext.VNIC_TYPE,"},{"line_number":2007,"context_line":"                    pbe_ext.STATUS)}"},{"line_number":2008,"context_line":"        if isinstance(binding, ports_obj.PortBinding):"},{"line_number":2009,"context_line":"            res[pbe_ext.PROFILE] \u003d binding.profile"},{"line_number":2010,"context_line":"            res[pbe_ext.VIF_DETAILS] \u003d binding.vif_details"},{"line_number":2011,"context_line":"        else:"},{"line_number":2012,"context_line":"            res[pbe_ext.PROFILE] \u003d self._get_profile(binding)"},{"line_number":2013,"context_line":"            res[pbe_ext.VIF_DETAILS] \u003d self._get_vif_details(binding)"},{"line_number":2014,"context_line":"        return db_utils.resource_fields(res, fields)"},{"line_number":2015,"context_line":""},{"line_number":2016,"context_line":"    def _get_port_binding_attrs(self, binding, host\u003dNone):"}],"source_content_type":"text/x-python","patch_set":66,"id":"5f7c97a3_50dbf61f","line":2013,"range":{"start_line":2008,"start_character":8,"end_line":2013,"end_character":69},"in_reply_to":"5f7c97a3_909c2e6b","updated":"2018-06-19 23:13:05.000000000","message":"Having said this, it looks like when the CI job last passed it would have been May 14 so PS64, and comparing PS66 to PS64 I\u0027m not seeing anything different in this change regarding vif_details.","commit_id":"957e4f2e4d2e23121821ce4bb95724707e8d93ee"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b489217018f55af15403df5c9c68ce5e2d8c3ae1","unresolved":false,"context_lines":[{"line_number":2005,"context_line":"        res \u003d {key: binding[key] for key in ("},{"line_number":2006,"context_line":"                    pbe_ext.HOST, pbe_ext.VIF_TYPE, pbe_ext.VNIC_TYPE,"},{"line_number":2007,"context_line":"                    pbe_ext.STATUS)}"},{"line_number":2008,"context_line":"        if isinstance(binding, ports_obj.PortBinding):"},{"line_number":2009,"context_line":"            res[pbe_ext.PROFILE] \u003d binding.profile"},{"line_number":2010,"context_line":"            res[pbe_ext.VIF_DETAILS] \u003d binding.vif_details"},{"line_number":2011,"context_line":"        else:"},{"line_number":2012,"context_line":"            res[pbe_ext.PROFILE] \u003d self._get_profile(binding)"},{"line_number":2013,"context_line":"            res[pbe_ext.VIF_DETAILS] \u003d self._get_vif_details(binding)"},{"line_number":2014,"context_line":"        return db_utils.resource_fields(res, fields)"},{"line_number":2015,"context_line":""},{"line_number":2016,"context_line":"    def _get_port_binding_attrs(self, binding, host\u003dNone):"}],"source_content_type":"text/x-python","patch_set":66,"id":"5f7c97a3_9950762e","line":2013,"range":{"start_line":2008,"start_character":8,"end_line":2013,"end_character":69},"in_reply_to":"5f7c97a3_e384ac0d","updated":"2018-06-25 15:38:51.000000000","message":"I think I found the problem on the nova side, I\u0027m just not sure why things were passing before.\n\nBut we store the vif_details in this object with a DictOfStringsField:\n\nhttps://review.openstack.org/#/c/515423/28/nova/objects/migrate_data.py@40\n\nWhich will cast all of the values to str() during serialize/deserialize (which happens when nova-conductor sends the object to nova-compute over rpc).\n\nIf I created a specific VIFDetails object or field then I could be specific about the types on the values within the vif_details dict, but I\u0027m not all sure what we actually need in vif_details for plugging besides:\n\nvhostuser_mode\n\nvhostuser_socket\n\ndatapath_type\n\nvhostuser_fp_plug\n\nvhostuser_ovs_plug\n\nvhostuser_vrouter_plug\n\nprofileid\n\nvlan\n\nmacvtap_source\n\nmacvtap_mode\n\nphysical_interface\n\nmac_address\n\novs_hybrid_plug\n\nbridge_name\n\nport_filter\n\nphysical_network\n\nI think I basically just need to make VIFMigrateData.vif_details a Dict field so the values aren\u0027t coerced to a specific type.","commit_id":"957e4f2e4d2e23121821ce4bb95724707e8d93ee"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"b87a82f081acb641e4ed9e2cbc3aea114812a7de","unresolved":false,"context_lines":[{"line_number":1583,"context_line":"                    bound_mech_contexts.append(mech_context)"},{"line_number":1584,"context_line":"            else:"},{"line_number":1585,"context_line":"                levels \u003d db.get_binding_levels(context, id,"},{"line_number":1586,"context_line":"                                               binding.host)"},{"line_number":1587,"context_line":"                kwargs[\u0027bind\u0027] \u003d None"},{"line_number":1588,"context_line":"                kwargs[\u0027levels\u0027] \u003d levels"},{"line_number":1589,"context_line":"                registry.notify(resources.PORT, events.PRECOMMIT_DELETE,"}],"source_content_type":"text/x-python","patch_set":73,"id":"5f7c97a3_226e792c","line":1586,"range":{"start_line":1586,"start_character":47,"end_line":1586,"end_character":54},"updated":"2018-07-11 19:00:25.000000000","message":"I think this can be None as well?  From assignment on L1552","commit_id":"7897f395ef463967bad0a7fd4fd27ab9ddc3ed7e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"0c59ce1ffe52bf3df173b04603f8b79fe02be3be","unresolved":false,"context_lines":[{"line_number":1583,"context_line":"                    bound_mech_contexts.append(mech_context)"},{"line_number":1584,"context_line":"            else:"},{"line_number":1585,"context_line":"                levels \u003d db.get_binding_levels(context, id,"},{"line_number":1586,"context_line":"                                               binding.host)"},{"line_number":1587,"context_line":"                kwargs[\u0027bind\u0027] \u003d None"},{"line_number":1588,"context_line":"                kwargs[\u0027levels\u0027] \u003d levels"},{"line_number":1589,"context_line":"                registry.notify(resources.PORT, events.PRECOMMIT_DELETE,"}],"source_content_type":"text/x-python","patch_set":73,"id":"5f7c97a3_a96ece94","line":1586,"range":{"start_line":1586,"start_character":47,"end_line":1586,"end_character":54},"in_reply_to":"5f7c97a3_016800f2","updated":"2018-07-12 20:45:36.000000000","message":"I\u0027m fine with this based on Miguel\u0027s comment.","commit_id":"7897f395ef463967bad0a7fd4fd27ab9ddc3ed7e"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"93f594aaad580467487baa3e7f4b5795637eec7b","unresolved":false,"context_lines":[{"line_number":1583,"context_line":"                    bound_mech_contexts.append(mech_context)"},{"line_number":1584,"context_line":"            else:"},{"line_number":1585,"context_line":"                levels \u003d db.get_binding_levels(context, id,"},{"line_number":1586,"context_line":"                                               binding.host)"},{"line_number":1587,"context_line":"                kwargs[\u0027bind\u0027] \u003d None"},{"line_number":1588,"context_line":"                kwargs[\u0027levels\u0027] \u003d levels"},{"line_number":1589,"context_line":"                registry.notify(resources.PORT, events.PRECOMMIT_DELETE,"}],"source_content_type":"text/x-python","patch_set":73,"id":"5f7c97a3_016800f2","line":1586,"range":{"start_line":1586,"start_character":47,"end_line":1586,"end_character":54},"in_reply_to":"5f7c97a3_226e792c","updated":"2018-07-12 17:41:04.000000000","message":"If you look at the code before this change (left side of the screen), it made the assumption that it was going to receive a port with and active binding (we know that the binding had to be active because of https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/models.py#L53-L54). Over the long time that this code ran before this change, all the evidence (from our CI jobs passing and our users not filing bugs) indicates that the assumption was valid. After making this change, we have running CI jobs against it for more than 6 months and their results indicate that the assumption is still valid. In fact, in this patch and all the patches that depend on it, the only place where I touch a port\u0027s active binding is in the activate method below (https://review.openstack.org/#/c/414251/73/neutron/plugins/ml2/plugin.py@2195) and it is left with an active binding.\n\nHaving said that, you are right in that strictly speaking get_port_binding_by_status_and_host can return None. We should do something about it, as you correctly point out. Since ports and port bindings are at the very core of what Neutron does, I have tried to avoid making even small logic changes, unless I have to, because you always run the risk of introducing unintended consequences. My proposal is to continue with this method almost as is and continue with the assumption that it will always get an active binding. At the same time, I will change get_port_binding_by_status_and_host as follows:\n\ndef get_port_binding_by_status_and_host(bindings, status, host\u003d\u0027\u0027,\n                                        raise_if_not_found\u003dFalse\n                                        port_id\u003dNone):\n    for binding in bindings:\n        if binding[pb_ext.STATUS] \u003d\u003d status:\n            if not host or binding[pb_ext.HOST] \u003d\u003d host:\n                return binding\n    if raise_if_not_found:\n        raise PortBindingNotFound(port_id, host)\n\nWe would change the call in this method to get_port_binding_by_status_and_host to:\n\n    binding \u003d utils.get_port_binding_by_status_and_host(\n        port_db.port_binding, const.ACTIVE, raise_if_not_found\u003dTrue, \n        port_id\u003did))\n\nSo, in effect, we would be turning the invocation of get_port_binding_by_status_and_host into an assertion that an active binding should be present. If that assertion is ever violated, the results of the failure would inform us as to how to best change the logic in this method","commit_id":"7897f395ef463967bad0a7fd4fd27ab9ddc3ed7e"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"b76e90cb1ba69804a74d8d9374037565e10c32a2","unresolved":false,"context_lines":[{"line_number":1583,"context_line":"                    bound_mech_contexts.append(mech_context)"},{"line_number":1584,"context_line":"            else:"},{"line_number":1585,"context_line":"                levels \u003d db.get_binding_levels(context, id,"},{"line_number":1586,"context_line":"                                               binding.host)"},{"line_number":1587,"context_line":"                kwargs[\u0027bind\u0027] \u003d None"},{"line_number":1588,"context_line":"                kwargs[\u0027levels\u0027] \u003d levels"},{"line_number":1589,"context_line":"                registry.notify(resources.PORT, events.PRECOMMIT_DELETE,"}],"source_content_type":"text/x-python","patch_set":73,"id":"5f7c97a3_001e9abb","line":1586,"range":{"start_line":1586,"start_character":47,"end_line":1586,"end_character":54},"in_reply_to":"5f7c97a3_a96ece94","updated":"2018-07-13 23:15:16.000000000","message":"Fixed call in L1552 above, per this conversation","commit_id":"7897f395ef463967bad0a7fd4fd27ab9ddc3ed7e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"b87a82f081acb641e4ed9e2cbc3aea114812a7de","unresolved":false,"context_lines":[{"line_number":1800,"context_line":"                updated_port \u003d self._make_port_dict(port)"},{"line_number":1801,"context_line":"                binding \u003d utils.get_port_binding_by_status_and_host("},{"line_number":1802,"context_line":"                    port.port_binding, const.ACTIVE)"},{"line_number":1803,"context_line":"                levels \u003d db.get_binding_levels(context, port.id, binding.host)"},{"line_number":1804,"context_line":"                mech_context \u003d driver_context.PortContext("},{"line_number":1805,"context_line":"                    self, context, updated_port, network, binding, levels,"},{"line_number":1806,"context_line":"                    original_port\u003doriginal_port)"}],"source_content_type":"text/x-python","patch_set":73,"id":"5f7c97a3_6236b152","line":1803,"range":{"start_line":1803,"start_character":65,"end_line":1803,"end_character":72},"updated":"2018-07-11 19:00:25.000000000","message":"This could be None as well","commit_id":"7897f395ef463967bad0a7fd4fd27ab9ddc3ed7e"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"93f594aaad580467487baa3e7f4b5795637eec7b","unresolved":false,"context_lines":[{"line_number":1800,"context_line":"                updated_port \u003d self._make_port_dict(port)"},{"line_number":1801,"context_line":"                binding \u003d utils.get_port_binding_by_status_and_host("},{"line_number":1802,"context_line":"                    port.port_binding, const.ACTIVE)"},{"line_number":1803,"context_line":"                levels \u003d db.get_binding_levels(context, port.id, binding.host)"},{"line_number":1804,"context_line":"                mech_context \u003d driver_context.PortContext("},{"line_number":1805,"context_line":"                    self, context, updated_port, network, binding, levels,"},{"line_number":1806,"context_line":"                    original_port\u003doriginal_port)"}],"source_content_type":"text/x-python","patch_set":73,"id":"5f7c97a3_dcf18f98","line":1803,"range":{"start_line":1803,"start_character":65,"end_line":1803,"end_character":72},"in_reply_to":"5f7c97a3_6236b152","updated":"2018-07-12 17:41:04.000000000","message":"Please see response to https://review.openstack.org/#/c/414251/73/neutron/plugins/ml2/plugin.py@1586","commit_id":"7897f395ef463967bad0a7fd4fd27ab9ddc3ed7e"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"b76e90cb1ba69804a74d8d9374037565e10c32a2","unresolved":false,"context_lines":[{"line_number":1800,"context_line":"                updated_port \u003d self._make_port_dict(port)"},{"line_number":1801,"context_line":"                binding \u003d utils.get_port_binding_by_status_and_host("},{"line_number":1802,"context_line":"                    port.port_binding, const.ACTIVE)"},{"line_number":1803,"context_line":"                levels \u003d db.get_binding_levels(context, port.id, binding.host)"},{"line_number":1804,"context_line":"                mech_context \u003d driver_context.PortContext("},{"line_number":1805,"context_line":"                    self, context, updated_port, network, binding, levels,"},{"line_number":1806,"context_line":"                    original_port\u003doriginal_port)"}],"source_content_type":"text/x-python","patch_set":73,"id":"5f7c97a3_004c5ac7","line":1803,"range":{"start_line":1803,"start_character":65,"end_line":1803,"end_character":72},"in_reply_to":"5f7c97a3_dcf18f98","updated":"2018-07-13 23:15:16.000000000","message":"Fixed per conversation at https://review.openstack.org/#/c/414251/73/neutron/plugins/ml2/plugin.py@1586","commit_id":"7897f395ef463967bad0a7fd4fd27ab9ddc3ed7e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fc115ac043abfa4f529d247628386fbb981f8756","unresolved":false,"context_lines":[{"line_number":2008,"context_line":"        res \u003d {key: binding[key] for key in ("},{"line_number":2009,"context_line":"                    pbe_ext.HOST, pbe_ext.VIF_TYPE, pbe_ext.VNIC_TYPE,"},{"line_number":2010,"context_line":"                    pbe_ext.STATUS)}"},{"line_number":2011,"context_line":"        if isinstance(binding, ports_obj.PortBinding):"},{"line_number":2012,"context_line":"            res[pbe_ext.PROFILE] \u003d binding.profile"},{"line_number":2013,"context_line":"            res[pbe_ext.VIF_DETAILS] \u003d binding.vif_details"},{"line_number":2014,"context_line":"        else:"},{"line_number":2015,"context_line":"            res[pbe_ext.PROFILE] \u003d self._get_profile(binding)"},{"line_number":2016,"context_line":"            res[pbe_ext.VIF_DETAILS] \u003d self._get_vif_details(binding)"}],"source_content_type":"text/x-python","patch_set":73,"id":"5f7c97a3_ba17d79d","line":2013,"range":{"start_line":2011,"start_character":8,"end_line":2013,"end_character":58},"updated":"2018-07-13 20:37:45.000000000","message":"Per our IRC conversation, these should be \"or {}\" in case the object field is None so the user gets an empty dict in either ovo or sqla object cases and doesn\u0027t have to deal with None or {} in the response.","commit_id":"7897f395ef463967bad0a7fd4fd27ab9ddc3ed7e"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"9c0f6742c4c8e64e491def80916d3590163dc140","unresolved":false,"context_lines":[{"line_number":2008,"context_line":"        res \u003d {key: binding[key] for key in ("},{"line_number":2009,"context_line":"                    pbe_ext.HOST, pbe_ext.VIF_TYPE, pbe_ext.VNIC_TYPE,"},{"line_number":2010,"context_line":"                    pbe_ext.STATUS)}"},{"line_number":2011,"context_line":"        if isinstance(binding, ports_obj.PortBinding):"},{"line_number":2012,"context_line":"            res[pbe_ext.PROFILE] \u003d binding.profile"},{"line_number":2013,"context_line":"            res[pbe_ext.VIF_DETAILS] \u003d binding.vif_details"},{"line_number":2014,"context_line":"        else:"},{"line_number":2015,"context_line":"            res[pbe_ext.PROFILE] \u003d self._get_profile(binding)"},{"line_number":2016,"context_line":"            res[pbe_ext.VIF_DETAILS] \u003d self._get_vif_details(binding)"}],"source_content_type":"text/x-python","patch_set":73,"id":"5f7c97a3_d4fdc7b2","line":2013,"range":{"start_line":2011,"start_character":8,"end_line":2013,"end_character":58},"in_reply_to":"5f7c97a3_20ccf632","updated":"2018-07-13 23:17:27.000000000","message":"This is also now being checked in the unit tests: https://review.openstack.org/#/c/414251/74/neutron/tests/unit/plugins/ml2/test_port_binding.py@443","commit_id":"7897f395ef463967bad0a7fd4fd27ab9ddc3ed7e"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"b76e90cb1ba69804a74d8d9374037565e10c32a2","unresolved":false,"context_lines":[{"line_number":2008,"context_line":"        res \u003d {key: binding[key] for key in ("},{"line_number":2009,"context_line":"                    pbe_ext.HOST, pbe_ext.VIF_TYPE, pbe_ext.VNIC_TYPE,"},{"line_number":2010,"context_line":"                    pbe_ext.STATUS)}"},{"line_number":2011,"context_line":"        if isinstance(binding, ports_obj.PortBinding):"},{"line_number":2012,"context_line":"            res[pbe_ext.PROFILE] \u003d binding.profile"},{"line_number":2013,"context_line":"            res[pbe_ext.VIF_DETAILS] \u003d binding.vif_details"},{"line_number":2014,"context_line":"        else:"},{"line_number":2015,"context_line":"            res[pbe_ext.PROFILE] \u003d self._get_profile(binding)"},{"line_number":2016,"context_line":"            res[pbe_ext.VIF_DETAILS] \u003d self._get_vif_details(binding)"}],"source_content_type":"text/x-python","patch_set":73,"id":"5f7c97a3_20ccf632","line":2013,"range":{"start_line":2011,"start_character":8,"end_line":2013,"end_character":58},"in_reply_to":"5f7c97a3_ba17d79d","updated":"2018-07-13 23:15:16.000000000","message":"Done","commit_id":"7897f395ef463967bad0a7fd4fd27ab9ddc3ed7e"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"00ec6fb3c718ad127d4ec2c9825bced45728ab27","unresolved":false,"context_lines":[{"line_number":2002,"context_line":"    @staticmethod"},{"line_number":2003,"context_line":"    def _validate_compute_port(port):"},{"line_number":2004,"context_line":"        if not port[\u0027device_owner\u0027].startswith("},{"line_number":2005,"context_line":"                const.DEVICE_OWNER_COMPUTE_PREFIX):"},{"line_number":2006,"context_line":"            msg \u003d _(\u0027Invalid port %s. Operation only valid on compute \u0027"},{"line_number":2007,"context_line":"                    \u0027ports\u0027) % port[\u0027id\u0027]"},{"line_number":2008,"context_line":"            raise exc.BadRequest(resource\u003d\u0027port\u0027, msg\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":74,"id":"5f7c97a3_7dfa7044","line":2005,"range":{"start_line":2005,"start_character":22,"end_line":2005,"end_character":49},"updated":"2018-07-16 21:53:12.000000000","message":"This seems to limit this feature to VMs? Then, how about container/kuryr?\n\nI know the port binding done by container/kuryr would have different device_owner, which make them impossible to leverage this feature.","commit_id":"f7b62a7f29e6b88fdbcc3bff779b39b541d1de47"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"c845584d68dda6e9aa9d5f3c134a88c3c0e6b0eb","unresolved":false,"context_lines":[{"line_number":2002,"context_line":"    @staticmethod"},{"line_number":2003,"context_line":"    def _validate_compute_port(port):"},{"line_number":2004,"context_line":"        if not port[\u0027device_owner\u0027].startswith("},{"line_number":2005,"context_line":"                const.DEVICE_OWNER_COMPUTE_PREFIX):"},{"line_number":2006,"context_line":"            msg \u003d _(\u0027Invalid port %s. Operation only valid on compute \u0027"},{"line_number":2007,"context_line":"                    \u0027ports\u0027) % port[\u0027id\u0027]"},{"line_number":2008,"context_line":"            raise exc.BadRequest(resource\u003d\u0027port\u0027, msg\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":74,"id":"5f7c97a3_45d9da81","line":2005,"range":{"start_line":2005,"start_character":22,"end_line":2005,"end_character":49},"in_reply_to":"5f7c97a3_7dfa7044","updated":"2018-07-16 22:11:24.000000000","message":"The spec was specific for Nova: https://specs.openstack.org/openstack/neutron-specs/specs/backlog/pike/portbinding_information_for_nova.html. Please note the title: \n\n\"Provide Port Binding Information for Nova Live Migration\"\n\nYes, it may be useful beyond Nova, but that hasn\u0027t been specified yet. So I stuck to the approved spec","commit_id":"f7b62a7f29e6b88fdbcc3bff779b39b541d1de47"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"00ec6fb3c718ad127d4ec2c9825bced45728ab27","unresolved":false,"context_lines":[{"line_number":2039,"context_line":"                                       mech_context._binding)"},{"line_number":2040,"context_line":"        mech_context._binding.persist_state_to_session("},{"line_number":2041,"context_line":"            mech_context._plugin_context.session)"},{"line_number":2042,"context_line":""},{"line_number":2043,"context_line":"    @utils.transaction_guard"},{"line_number":2044,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2045,"context_line":"    def create_port_binding(self, context, port_id, binding):"}],"source_content_type":"text/x-python","patch_set":74,"id":"5f7c97a3_1dec9cf2","line":2042,"updated":"2018-07-16 21:53:12.000000000","message":"Perhaps, it worth to create a Mixin class for encapsulating the CRUD of port_binding resource?","commit_id":"f7b62a7f29e6b88fdbcc3bff779b39b541d1de47"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"c845584d68dda6e9aa9d5f3c134a88c3c0e6b0eb","unresolved":false,"context_lines":[{"line_number":2039,"context_line":"                                       mech_context._binding)"},{"line_number":2040,"context_line":"        mech_context._binding.persist_state_to_session("},{"line_number":2041,"context_line":"            mech_context._plugin_context.session)"},{"line_number":2042,"context_line":""},{"line_number":2043,"context_line":"    @utils.transaction_guard"},{"line_number":2044,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2045,"context_line":"    def create_port_binding(self, context, port_id, binding):"}],"source_content_type":"text/x-python","patch_set":74,"id":"5f7c97a3_a5c9ceab","line":2042,"in_reply_to":"5f7c97a3_1dec9cf2","updated":"2018-07-16 22:11:24.000000000","message":"There is been debate in the Neutron community about the abuse of mixins, specifically in the ML2 plugin. That is why I chose this approach","commit_id":"f7b62a7f29e6b88fdbcc3bff779b39b541d1de47"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"00ec6fb3c718ad127d4ec2c9825bced45728ab27","unresolved":false,"context_lines":[{"line_number":2042,"context_line":""},{"line_number":2043,"context_line":"    @utils.transaction_guard"},{"line_number":2044,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2045,"context_line":"    def create_port_binding(self, context, port_id, binding):"},{"line_number":2046,"context_line":"        attrs \u003d binding[pbe_ext.RESOURCE_NAME]"},{"line_number":2047,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":2048,"context_line":"            port_db \u003d self._get_port(context, port_id)"}],"source_content_type":"text/x-python","patch_set":74,"id":"5f7c97a3_fd04407f","line":2045,"range":{"start_line":2045,"start_character":8,"end_line":2045,"end_character":27},"updated":"2018-07-16 21:53:12.000000000","message":"The payload is different from the spec: https://specs.openstack.org/openstack/neutron-specs/specs/ocata/portbinding_information_for_nova.html#create-binding . The spec said the payload is:\n\n  {\n      \"binding\": {\n          \"host_id\": \"target-host_id\"\n      }\n  }\n\nbut the payload worked for me is (the key is \u0027host\u0027 instead of \u0027host_id\u0027):\n\n  {\"binding\": {\"host\": \"target-host_id\"}}","commit_id":"f7b62a7f29e6b88fdbcc3bff779b39b541d1de47"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"98fcbd694677548bbe2f8cb80f5e278da8042095","unresolved":false,"context_lines":[{"line_number":2042,"context_line":""},{"line_number":2043,"context_line":"    @utils.transaction_guard"},{"line_number":2044,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2045,"context_line":"    def create_port_binding(self, context, port_id, binding):"},{"line_number":2046,"context_line":"        attrs \u003d binding[pbe_ext.RESOURCE_NAME]"},{"line_number":2047,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":2048,"context_line":"            port_db \u003d self._get_port(context, port_id)"}],"source_content_type":"text/x-python","patch_set":74,"id":"5f7c97a3_c58baa14","line":2045,"range":{"start_line":2045,"start_character":8,"end_line":2045,"end_character":27},"in_reply_to":"5f7c97a3_853932a3","updated":"2018-07-16 22:21:01.000000000","message":"There are Nova patches already using what we are returning in the responses, which are acceptable to them. So, let\u0027s stick to these payloads","commit_id":"f7b62a7f29e6b88fdbcc3bff779b39b541d1de47"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"c845584d68dda6e9aa9d5f3c134a88c3c0e6b0eb","unresolved":false,"context_lines":[{"line_number":2042,"context_line":""},{"line_number":2043,"context_line":"    @utils.transaction_guard"},{"line_number":2044,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2045,"context_line":"    def create_port_binding(self, context, port_id, binding):"},{"line_number":2046,"context_line":"        attrs \u003d binding[pbe_ext.RESOURCE_NAME]"},{"line_number":2047,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":2048,"context_line":"            port_db \u003d self._get_port(context, port_id)"}],"source_content_type":"text/x-python","patch_set":74,"id":"5f7c97a3_853932a3","line":2045,"range":{"start_line":2045,"start_character":8,"end_line":2045,"end_character":27},"in_reply_to":"5f7c97a3_fd04407f","updated":"2018-07-16 22:11:24.000000000","message":"This was commented at some point in one of the reviews to this patch with Matt. We agreed that \"host\" was ok and since Nova is our key target, I stuck with it","commit_id":"f7b62a7f29e6b88fdbcc3bff779b39b541d1de47"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"00ec6fb3c718ad127d4ec2c9825bced45728ab27","unresolved":false,"context_lines":[{"line_number":2088,"context_line":""},{"line_number":2089,"context_line":"    @utils.transaction_guard"},{"line_number":2090,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2091,"context_line":"    def get_port_bindings(self, context, port_id, filters\u003dNone, fields\u003dNone,"},{"line_number":2092,"context_line":"                          sorts\u003dNone, limit\u003dNone, marker\u003dNone,"},{"line_number":2093,"context_line":"                          page_reverse\u003dFalse):"},{"line_number":2094,"context_line":"        port \u003d ports_obj.Port.get_object(context, id\u003dport_id)"}],"source_content_type":"text/x-python","patch_set":74,"id":"5f7c97a3_5d6f7492","line":2091,"range":{"start_line":2091,"start_character":8,"end_line":2091,"end_character":25},"updated":"2018-07-16 21:53:12.000000000","message":"Nit: the output I got is:\n\n  {\"bindings\": [{\"status\": \"ACTIVE\", \"profile\": {}, \"vif_type\": \"ovs\", \"vif_details\": {\"port_filter\": true, \"datapath_type\": \"system\", \"ovs_hybrid_plug\": true}, \"vnic_type\": \"normal\", \"host\": \"testneutron4\"}]}\n\nwhich is slightly different from the spec: https://specs.openstack.org/openstack/neutron-specs/specs/ocata/portbinding_information_for_nova.html#list-bindings .\n\nIn particular, the \"status\" is \"ACTIVE\" in the actual output, but it is \"active\" in the spec.","commit_id":"f7b62a7f29e6b88fdbcc3bff779b39b541d1de47"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"c845584d68dda6e9aa9d5f3c134a88c3c0e6b0eb","unresolved":false,"context_lines":[{"line_number":2088,"context_line":""},{"line_number":2089,"context_line":"    @utils.transaction_guard"},{"line_number":2090,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2091,"context_line":"    def get_port_bindings(self, context, port_id, filters\u003dNone, fields\u003dNone,"},{"line_number":2092,"context_line":"                          sorts\u003dNone, limit\u003dNone, marker\u003dNone,"},{"line_number":2093,"context_line":"                          page_reverse\u003dFalse):"},{"line_number":2094,"context_line":"        port \u003d ports_obj.Port.get_object(context, id\u003dport_id)"}],"source_content_type":"text/x-python","patch_set":74,"id":"5f7c97a3_c55c0af2","line":2091,"range":{"start_line":2091,"start_character":8,"end_line":2091,"end_character":25},"in_reply_to":"5f7c97a3_5d6f7492","updated":"2018-07-16 22:11:24.000000000","message":"OK","commit_id":"f7b62a7f29e6b88fdbcc3bff779b39b541d1de47"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"98fcbd694677548bbe2f8cb80f5e278da8042095","unresolved":false,"context_lines":[{"line_number":2088,"context_line":""},{"line_number":2089,"context_line":"    @utils.transaction_guard"},{"line_number":2090,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":2091,"context_line":"    def get_port_bindings(self, context, port_id, filters\u003dNone, fields\u003dNone,"},{"line_number":2092,"context_line":"                          sorts\u003dNone, limit\u003dNone, marker\u003dNone,"},{"line_number":2093,"context_line":"                          page_reverse\u003dFalse):"},{"line_number":2094,"context_line":"        port \u003d ports_obj.Port.get_object(context, id\u003dport_id)"}],"source_content_type":"text/x-python","patch_set":74,"id":"5f7c97a3_a596ae3c","line":2091,"range":{"start_line":2091,"start_character":8,"end_line":2091,"end_character":25},"in_reply_to":"5f7c97a3_c55c0af2","updated":"2018-07-16 22:21:01.000000000","message":"There are Nova patches already using what we are returning in the responses, which are acceptable to them. So, let\u0027s stick to these payloads","commit_id":"f7b62a7f29e6b88fdbcc3bff779b39b541d1de47"}],"neutron/services/logapi/common/validators.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"b87a82f081acb641e4ed9e2cbc3aea114812a7de","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    log_plugin \u003d directory.get_plugin(alias\u003dplugin_const.LOG_API)"},{"line_number":97,"context_line":"    drivers \u003d log_plugin.driver_manager.drivers"},{"line_number":98,"context_line":"    port_binding \u003d utils.get_port_binding_by_status_and_host("},{"line_number":99,"context_line":"        port.binding, constants.ACTIVE)"},{"line_number":100,"context_line":"    for driver in drivers:"},{"line_number":101,"context_line":"        vif_type \u003d port_binding.vif_type"},{"line_number":102,"context_line":"        if vif_type not in SKIPPED_VIF_TYPES:"}],"source_content_type":"text/x-python","patch_set":73,"id":"5f7c97a3_a2d049ca","line":99,"updated":"2018-07-11 19:00:25.000000000","message":"if not port_binding:\n    return False\n\n??","commit_id":"7897f395ef463967bad0a7fd4fd27ab9ddc3ed7e"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"93f594aaad580467487baa3e7f4b5795637eec7b","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    log_plugin \u003d directory.get_plugin(alias\u003dplugin_const.LOG_API)"},{"line_number":97,"context_line":"    drivers \u003d log_plugin.driver_manager.drivers"},{"line_number":98,"context_line":"    port_binding \u003d utils.get_port_binding_by_status_and_host("},{"line_number":99,"context_line":"        port.binding, constants.ACTIVE)"},{"line_number":100,"context_line":"    for driver in drivers:"},{"line_number":101,"context_line":"        vif_type \u003d port_binding.vif_type"},{"line_number":102,"context_line":"        if vif_type not in SKIPPED_VIF_TYPES:"}],"source_content_type":"text/x-python","patch_set":73,"id":"5f7c97a3_bc393341","line":99,"in_reply_to":"5f7c97a3_a2d049ca","updated":"2018-07-12 17:41:04.000000000","message":"Please see response to https://review.openstack.org/#/c/414251/73/neutron/plugins/ml2/plugin.py@1586","commit_id":"7897f395ef463967bad0a7fd4fd27ab9ddc3ed7e"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"b76e90cb1ba69804a74d8d9374037565e10c32a2","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    log_plugin \u003d directory.get_plugin(alias\u003dplugin_const.LOG_API)"},{"line_number":97,"context_line":"    drivers \u003d log_plugin.driver_manager.drivers"},{"line_number":98,"context_line":"    port_binding \u003d utils.get_port_binding_by_status_and_host("},{"line_number":99,"context_line":"        port.binding, constants.ACTIVE)"},{"line_number":100,"context_line":"    for driver in drivers:"},{"line_number":101,"context_line":"        vif_type \u003d port_binding.vif_type"},{"line_number":102,"context_line":"        if vif_type not in SKIPPED_VIF_TYPES:"}],"source_content_type":"text/x-python","patch_set":73,"id":"5f7c97a3_001bfa83","line":99,"in_reply_to":"5f7c97a3_bc393341","updated":"2018-07-13 23:15:16.000000000","message":"Fixed per conversation at https://review.openstack.org/#/c/414251/73/neutron/plugins/ml2/plugin.py@1586","commit_id":"7897f395ef463967bad0a7fd4fd27ab9ddc3ed7e"}],"neutron/services/portbindings/plugin.py":[{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"3871eef2c67bb447860cb0e9455bb7bacfc55396","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#"},{"line_number":2,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":3,"context_line":"#    not use this file except in compliance with the License. You may obtain"},{"line_number":4,"context_line":"#    a copy of the License at"}],"source_content_type":"text/x-python","patch_set":27,"id":"df140735_d86692ed","line":1,"updated":"2017-06-06 15:24:52.000000000","message":"We already have \u0027portbindings\u0027 as file name of \u0027binding\u0027 extension. This directory name confuses \u0027binding\u0027 extension with \u0027bindings-extended\u0027 extension. Why not \u0027portbindings_extended\u0027?","commit_id":"68f2182c3f2512f966b8940904fbe2b4cd3dcb67"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"db61bd661219d9a31f80f06bf2a90b72c04d90b6","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#"},{"line_number":2,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":3,"context_line":"#    not use this file except in compliance with the License. You may obtain"},{"line_number":4,"context_line":"#    a copy of the License at"}],"source_content_type":"text/x-python","patch_set":27,"id":"1f1a1f67_2f3927a3","line":1,"in_reply_to":"7f231b9d_a644591c","updated":"2017-07-17 14:10:11.000000000","message":"Done","commit_id":"68f2182c3f2512f966b8940904fbe2b4cd3dcb67"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"dc571bbf33b6611d8f505e7879f6194592407a0f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#"},{"line_number":2,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":3,"context_line":"#    not use this file except in compliance with the License. You may obtain"},{"line_number":4,"context_line":"#    a copy of the License at"}],"source_content_type":"text/x-python","patch_set":27,"id":"7f231b9d_a644591c","line":1,"in_reply_to":"df140735_d86692ed","updated":"2017-06-14 12:14:05.000000000","message":"the original binding extension is implemented in ml2 plugin. This is a service plugin and the name was agreed in the spec.\n\nYeah, I agree the porbindings is confusing with original portbindings. Does anybody have a strong opinion about the name?","commit_id":"68f2182c3f2512f966b8940904fbe2b4cd3dcb67"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"3871eef2c67bb447860cb0e9455bb7bacfc55396","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    return pb_obj.PortBinding.get_object(context, host\u003dhost, port_id\u003dport_id)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"class PortBindingsPlugin(common_db_mixin.CommonDbMixin,"},{"line_number":54,"context_line":"                         pb_ext.PortBindingExtendedPluginBase):"},{"line_number":55,"context_line":"    \"\"\"Implementation of the Neutron PortBinding Extended Plugin.\"\"\""},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"df140735_58ee0222","line":53,"range":{"start_line":53,"start_character":6,"end_line":53,"end_character":24},"updated":"2017-06-06 15:24:52.000000000","message":"This name may confuse too. Why not \u0027PortBindingExtendedPlugin\u0027?","commit_id":"68f2182c3f2512f966b8940904fbe2b4cd3dcb67"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"db61bd661219d9a31f80f06bf2a90b72c04d90b6","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    return pb_obj.PortBinding.get_object(context, host\u003dhost, port_id\u003dport_id)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"class PortBindingsPlugin(common_db_mixin.CommonDbMixin,"},{"line_number":54,"context_line":"                         pb_ext.PortBindingExtendedPluginBase):"},{"line_number":55,"context_line":"    \"\"\"Implementation of the Neutron PortBinding Extended Plugin.\"\"\""},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"1f1a1f67_cf5cf3ee","line":53,"range":{"start_line":53,"start_character":6,"end_line":53,"end_character":24},"in_reply_to":"7f231b9d_8674bd69","updated":"2017-07-17 14:10:11.000000000","message":"Done","commit_id":"68f2182c3f2512f966b8940904fbe2b4cd3dcb67"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"dc571bbf33b6611d8f505e7879f6194592407a0f","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    return pb_obj.PortBinding.get_object(context, host\u003dhost, port_id\u003dport_id)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"class PortBindingsPlugin(common_db_mixin.CommonDbMixin,"},{"line_number":54,"context_line":"                         pb_ext.PortBindingExtendedPluginBase):"},{"line_number":55,"context_line":"    \"\"\"Implementation of the Neutron PortBinding Extended Plugin.\"\"\""},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"7f231b9d_8674bd69","line":53,"range":{"start_line":53,"start_character":6,"end_line":53,"end_character":24},"in_reply_to":"df140735_58ee0222","updated":"2017-06-14 12:14:05.000000000","message":"Maybe we should discuss the naming convention for this feature with broader community. I also find it confusing though this is what spec says.","commit_id":"68f2182c3f2512f966b8940904fbe2b4cd3dcb67"}],"neutron/services/portbindings/portbindings_plugin.py":[{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"4f550b0b0a8de20b3ee63a608ed8fdc4eef0de88","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"class PortBindingsPlugin(common_db_mixin.CommonDbMixin,"},{"line_number":23,"context_line":"                         pb_ext.PortBindingExtendedPluginBase):"},{"line_number":24,"context_line":"    \"\"\"Implementation of the Neutron PortBinding Extended Plugin.\"\"\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a461143_1efc1c71","line":23,"range":{"start_line":23,"start_character":25,"end_line":23,"end_character":61},"updated":"2017-01-31 00:36:15.000000000","message":"this base class defines more abstractmethods than this class implements, so this will fail to instantiate and cuase neutron-server to fail on startup.","commit_id":"8cfafefb1a771cf52e50f937e2d7073af8133982"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"81b4f1975af6b5ff0697b133daeb40490342de70","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"class PortBindingsPlugin(common_db_mixin.CommonDbMixin,"},{"line_number":23,"context_line":"                         pb_ext.PortBindingExtendedPluginBase):"},{"line_number":24,"context_line":"    \"\"\"Implementation of the Neutron PortBinding Extended Plugin.\"\"\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a461143_818f88cb","line":23,"range":{"start_line":23,"start_character":25,"end_line":23,"end_character":61},"in_reply_to":"3a461143_1efc1c71","updated":"2017-02-01 15:36:03.000000000","message":"Commented the other methods at this point will uncomment them one by one after implementing them","commit_id":"8cfafefb1a771cf52e50f937e2d7073af8133982"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"4f550b0b0a8de20b3ee63a608ed8fdc4eef0de88","unresolved":false,"context_lines":[{"line_number":22,"context_line":"class PortBindingsPlugin(common_db_mixin.CommonDbMixin,"},{"line_number":23,"context_line":"                         pb_ext.PortBindingExtendedPluginBase):"},{"line_number":24,"context_line":"    \"\"\"Implementation of the Neutron PortBinding Extended Plugin.\"\"\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    @staticmethod"},{"line_number":27,"context_line":"    def _make_port_binding_dict(binding, fields\u003dNone):"},{"line_number":28,"context_line":"        res \u003d {\u0027port_id\u0027: binding[\u0027port_id\u0027],"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a461143_d4fc34ba","line":25,"updated":"2017-01-31 00:36:15.000000000","message":"you also need to add the class variable:\n\nsupported_extension_aliases \u003d [\"bindings_extended\"]\n\nwhich tells neutron that this service plugin supports that extension.","commit_id":"8cfafefb1a771cf52e50f937e2d7073af8133982"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"81b4f1975af6b5ff0697b133daeb40490342de70","unresolved":false,"context_lines":[{"line_number":22,"context_line":"class PortBindingsPlugin(common_db_mixin.CommonDbMixin,"},{"line_number":23,"context_line":"                         pb_ext.PortBindingExtendedPluginBase):"},{"line_number":24,"context_line":"    \"\"\"Implementation of the Neutron PortBinding Extended Plugin.\"\"\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    @staticmethod"},{"line_number":27,"context_line":"    def _make_port_binding_dict(binding, fields\u003dNone):"},{"line_number":28,"context_line":"        res \u003d {\u0027port_id\u0027: binding[\u0027port_id\u0027],"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a461143_c1bfd05e","line":25,"in_reply_to":"3a461143_d4fc34ba","updated":"2017-02-01 15:36:03.000000000","message":"Done","commit_id":"8cfafefb1a771cf52e50f937e2d7073af8133982"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"9e0fcd1d05ae8dbf28e290d55b79489525a04003","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        if pb_obj.PortBinding.objects_exist(context, port_id\u003dport_id):"},{"line_number":62,"context_line":"            count \u003d pb_obj.PortBinding.count(context, port_id\u003dport_id)"},{"line_number":63,"context_line":"            if count \u003d\u003d constants.MAX_BINDING:"},{"line_number":64,"context_line":"                raise exceptions.MultiplePortBound(port_id\u003dport_id)"},{"line_number":65,"context_line":"            elif count \u003d\u003d constants.MIN_BINDING:"},{"line_number":66,"context_line":"                bindings \u003d self.get_port_bindings(context, port_id)"},{"line_number":67,"context_line":"                if (bindings[0].get(\u0027status\u0027) \u003d\u003d"}],"source_content_type":"text/x-python","patch_set":17,"id":"da36d5c6_7667abea","line":64,"range":{"start_line":64,"start_character":33,"end_line":64,"end_character":51},"updated":"2017-02-28 01:07:39.000000000","message":"this is not very meaningful, multiple port binding can still be done I recommend renaming exception to something like MaximumBindingLimitReached or something similar","commit_id":"6412276ce32899ef2accbdcd499d4ee6816e73e7"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"2b5880ed87d64b9e7f7a830c97fff7cfc0f417cb","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        if pb_obj.PortBinding.objects_exist(context, port_id\u003dport_id):"},{"line_number":62,"context_line":"            count \u003d pb_obj.PortBinding.count(context, port_id\u003dport_id)"},{"line_number":63,"context_line":"            if count \u003d\u003d constants.MAX_BINDING:"},{"line_number":64,"context_line":"                raise exceptions.MultiplePortBound(port_id\u003dport_id)"},{"line_number":65,"context_line":"            elif count \u003d\u003d constants.MIN_BINDING:"},{"line_number":66,"context_line":"                bindings \u003d self.get_port_bindings(context, port_id)"},{"line_number":67,"context_line":"                if (bindings[0].get(\u0027status\u0027) \u003d\u003d"}],"source_content_type":"text/x-python","patch_set":17,"id":"da36d5c6_2a7b007d","line":64,"range":{"start_line":64,"start_character":33,"end_line":64,"end_character":51},"in_reply_to":"da36d5c6_7667abea","updated":"2017-02-28 04:54:11.000000000","message":"Changed it to PortBoundToMaximumNumberOfHosts","commit_id":"6412276ce32899ef2accbdcd499d4ee6816e73e7"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"9e0fcd1d05ae8dbf28e290d55b79489525a04003","unresolved":false,"context_lines":[{"line_number":76,"context_line":"            binding.create()"},{"line_number":77,"context_line":"        return self._make_port_binding_dict(binding)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def _create_port_binding_db(self, context, port_id, binding,"},{"line_number":80,"context_line":"                                status\u003dconstants.PORT_BINDING_STATUS_ACTIVE):"},{"line_number":81,"context_line":"        binding_args \u003d {\u0027port_id\u0027: port_id,"},{"line_number":82,"context_line":"                        \u0027host\u0027: binding[\u0027host\u0027],"}],"source_content_type":"text/x-python","patch_set":17,"id":"da36d5c6_36f29307","line":79,"range":{"start_line":79,"start_character":29,"end_line":79,"end_character":31},"updated":"2017-02-28 01:07:39.000000000","message":"it should be obj as it is preparing object not any db","commit_id":"6412276ce32899ef2accbdcd499d4ee6816e73e7"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"2b5880ed87d64b9e7f7a830c97fff7cfc0f417cb","unresolved":false,"context_lines":[{"line_number":76,"context_line":"            binding.create()"},{"line_number":77,"context_line":"        return self._make_port_binding_dict(binding)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def _create_port_binding_db(self, context, port_id, binding,"},{"line_number":80,"context_line":"                                status\u003dconstants.PORT_BINDING_STATUS_ACTIVE):"},{"line_number":81,"context_line":"        binding_args \u003d {\u0027port_id\u0027: port_id,"},{"line_number":82,"context_line":"                        \u0027host\u0027: binding[\u0027host\u0027],"}],"source_content_type":"text/x-python","patch_set":17,"id":"da36d5c6_8ad94c86","line":79,"range":{"start_line":79,"start_character":29,"end_line":79,"end_character":31},"in_reply_to":"da36d5c6_36f29307","updated":"2017-02-28 04:54:11.000000000","message":"Done","commit_id":"6412276ce32899ef2accbdcd499d4ee6816e73e7"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"68d414986e4b21fa3cfd3f2264577b5cd72fe12c","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        return db_utils.resource_fields(res, fields)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def _get_port_binding(self, context, host, port_id):"},{"line_number":42,"context_line":"        binding \u003d pb_obj.PortBinding.get_object(context, host\u003dhost,"},{"line_number":43,"context_line":"                                                port_id\u003dport_id)"},{"line_number":44,"context_line":"        return binding"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def get_port_bindings(self, context, port_id, filters\u003dNone, fields\u003dNone,"},{"line_number":47,"context_line":"                          sorts\u003dNone, limit\u003dNone, marker\u003dNone,"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a30ddce_6abd8ab6","line":44,"range":{"start_line":42,"start_character":7,"end_line":44,"end_character":22},"updated":"2017-03-09 17:04:44.000000000","message":"or just return pb_obj.PortBinding.get_object(context, host\u003dhost, port_id\u003dport_id)\n\nsince instance binding is not used more than once.","commit_id":"b561ec69438ea815ce8356984bfdd0a4206b3435"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"d6cd568f58ebf64dfa9f0d16eef8733e06b11c29","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        return db_utils.resource_fields(res, fields)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def _get_port_binding(self, context, host, port_id):"},{"line_number":42,"context_line":"        binding \u003d pb_obj.PortBinding.get_object(context, host\u003dhost,"},{"line_number":43,"context_line":"                                                port_id\u003dport_id)"},{"line_number":44,"context_line":"        return binding"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def get_port_bindings(self, context, port_id, filters\u003dNone, fields\u003dNone,"},{"line_number":47,"context_line":"                          sorts\u003dNone, limit\u003dNone, marker\u003dNone,"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a30ddce_7ec383ed","line":44,"range":{"start_line":42,"start_character":7,"end_line":44,"end_character":22},"in_reply_to":"9a30ddce_6abd8ab6","updated":"2017-03-21 03:14:41.000000000","message":"Did it this way because binding is used in update_port_binding method.","commit_id":"b561ec69438ea815ce8356984bfdd0a4206b3435"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"68d414986e4b21fa3cfd3f2264577b5cd72fe12c","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            for binding in bindings"},{"line_number":56,"context_line":"        ]"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def get_port_binding(self, context, host, port_id, fields\u003dNone):"},{"line_number":59,"context_line":"        binding \u003d self._get_port_binding(context, host, port_id)"},{"line_number":60,"context_line":"        return self._make_port_binding_dict(binding, fields)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def create_port_binding(self, context, port_id, binding):"},{"line_number":63,"context_line":"        \"\"\"Create a port binding.\"\"\""}],"source_content_type":"text/x-python","patch_set":20,"id":"9a30ddce_0a808e8a","line":60,"range":{"start_line":58,"start_character":4,"end_line":60,"end_character":59},"updated":"2017-03-09 17:04:44.000000000","message":"why do it need helper to call just a  method ? can\u0027t you consolidate _get_port_binding and get_port_binding ?","commit_id":"b561ec69438ea815ce8356984bfdd0a4206b3435"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"d6cd568f58ebf64dfa9f0d16eef8733e06b11c29","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            for binding in bindings"},{"line_number":56,"context_line":"        ]"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def get_port_binding(self, context, host, port_id, fields\u003dNone):"},{"line_number":59,"context_line":"        binding \u003d self._get_port_binding(context, host, port_id)"},{"line_number":60,"context_line":"        return self._make_port_binding_dict(binding, fields)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def create_port_binding(self, context, port_id, binding):"},{"line_number":63,"context_line":"        \"\"\"Create a port binding.\"\"\""}],"source_content_type":"text/x-python","patch_set":20,"id":"9a30ddce_3e8f4bcd","line":60,"range":{"start_line":58,"start_character":4,"end_line":60,"end_character":59},"in_reply_to":"9a30ddce_0a808e8a","updated":"2017-03-21 03:14:41.000000000","message":"same as above","commit_id":"b561ec69438ea815ce8356984bfdd0a4206b3435"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"18a73124d1b34b935b686b633f1590486f9c7ff7","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        return self._make_port_binding_dict(binding, fields)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def create_port_binding(self, context, port_id, binding):"},{"line_number":63,"context_line":"        \"\"\"Create a port binding.\"\"\""},{"line_number":64,"context_line":"        status \u003d constants.PORT_BINDING_STATUS_ACTIVE"},{"line_number":65,"context_line":"        if pb_obj.PortBinding.objects_exist(context, port_id\u003dport_id):"},{"line_number":66,"context_line":"            count \u003d pb_obj.PortBinding.count(context, port_id\u003dport_id)"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a30ddce_d538bbf0","line":63,"updated":"2017-03-10 07:54:24.000000000","message":"There\u0027s once thing I\u0027m not sure about - shall we check that this API is only usable for compute ports? I\u0027m really not sure  :)","commit_id":"b561ec69438ea815ce8356984bfdd0a4206b3435"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"d6cd568f58ebf64dfa9f0d16eef8733e06b11c29","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        return self._make_port_binding_dict(binding, fields)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def create_port_binding(self, context, port_id, binding):"},{"line_number":63,"context_line":"        \"\"\"Create a port binding.\"\"\""},{"line_number":64,"context_line":"        status \u003d constants.PORT_BINDING_STATUS_ACTIVE"},{"line_number":65,"context_line":"        if pb_obj.PortBinding.objects_exist(context, port_id\u003dport_id):"},{"line_number":66,"context_line":"            count \u003d pb_obj.PortBinding.count(context, port_id\u003dport_id)"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a1ced50_80163953","line":63,"in_reply_to":"9a30ddce_d538bbf0","updated":"2017-03-21 03:14:41.000000000","message":"Andreas: How do we check that this API is usable only for compute ports?","commit_id":"b561ec69438ea815ce8356984bfdd0a4206b3435"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"18a73124d1b34b935b686b633f1590486f9c7ff7","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    def create_port_binding(self, context, port_id, binding):"},{"line_number":63,"context_line":"        \"\"\"Create a port binding.\"\"\""},{"line_number":64,"context_line":"        status \u003d constants.PORT_BINDING_STATUS_ACTIVE"},{"line_number":65,"context_line":"        if pb_obj.PortBinding.objects_exist(context, port_id\u003dport_id):"},{"line_number":66,"context_line":"            count \u003d pb_obj.PortBinding.count(context, port_id\u003dport_id)"},{"line_number":67,"context_line":"            if count \u003d\u003d constants.MAX_BINDING:"},{"line_number":68,"context_line":"                raise exceptions.MultiplePortBound(port_id\u003dport_id)"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a30ddce_f584df0b","line":65,"updated":"2017-03-10 07:54:24.000000000","message":"can\u0027t we optimize line 65-81 like this:\n\n  count \u003d pb_obj.PortBinding.count(context, port_id\u003dport_id)\n  if count \u003d\u003d MAX_BINDING:\n      raise ...\n\n  if count \u003e 0:\n     check status of others\n     status \u003d ...\n  else:\n     status \u003d ACTIVE\n\n  create a new binding","commit_id":"b561ec69438ea815ce8356984bfdd0a4206b3435"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"d6cd568f58ebf64dfa9f0d16eef8733e06b11c29","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    def create_port_binding(self, context, port_id, binding):"},{"line_number":63,"context_line":"        \"\"\"Create a port binding.\"\"\""},{"line_number":64,"context_line":"        status \u003d constants.PORT_BINDING_STATUS_ACTIVE"},{"line_number":65,"context_line":"        if pb_obj.PortBinding.objects_exist(context, port_id\u003dport_id):"},{"line_number":66,"context_line":"            count \u003d pb_obj.PortBinding.count(context, port_id\u003dport_id)"},{"line_number":67,"context_line":"            if count \u003d\u003d constants.MAX_BINDING:"},{"line_number":68,"context_line":"                raise exceptions.MultiplePortBound(port_id\u003dport_id)"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a1ced50_835c83ee","line":65,"in_reply_to":"9a30ddce_f584df0b","updated":"2017-03-21 03:14:41.000000000","message":"Done","commit_id":"b561ec69438ea815ce8356984bfdd0a4206b3435"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"18a73124d1b34b935b686b633f1590486f9c7ff7","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        if pb_obj.PortBinding.objects_exist(context, port_id\u003dport_id):"},{"line_number":66,"context_line":"            count \u003d pb_obj.PortBinding.count(context, port_id\u003dport_id)"},{"line_number":67,"context_line":"            if count \u003d\u003d constants.MAX_BINDING:"},{"line_number":68,"context_line":"                raise exceptions.MultiplePortBound(port_id\u003dport_id)"},{"line_number":69,"context_line":"            elif count \u003d\u003d constants.MIN_BINDING:"},{"line_number":70,"context_line":"                bindings \u003d self.get_port_bindings(context, port_id)"},{"line_number":71,"context_line":"                if (bindings[0].get(\u0027status\u0027) \u003d\u003d"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a30ddce_d5cefb2b","line":68,"range":{"start_line":68,"start_character":33,"end_line":68,"end_character":50},"updated":"2017-03-10 07:54:24.000000000","message":"I guess everything is ok as jenkings +1. But I can\u0027t find this exception (or import alias)","commit_id":"b561ec69438ea815ce8356984bfdd0a4206b3435"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"d6cd568f58ebf64dfa9f0d16eef8733e06b11c29","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        if pb_obj.PortBinding.objects_exist(context, port_id\u003dport_id):"},{"line_number":66,"context_line":"            count \u003d pb_obj.PortBinding.count(context, port_id\u003dport_id)"},{"line_number":67,"context_line":"            if count \u003d\u003d constants.MAX_BINDING:"},{"line_number":68,"context_line":"                raise exceptions.MultiplePortBound(port_id\u003dport_id)"},{"line_number":69,"context_line":"            elif count \u003d\u003d constants.MIN_BINDING:"},{"line_number":70,"context_line":"                bindings \u003d self.get_port_bindings(context, port_id)"},{"line_number":71,"context_line":"                if (bindings[0].get(\u0027status\u0027) \u003d\u003d"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a1ced50_c30f5b2c","line":68,"range":{"start_line":68,"start_character":33,"end_line":68,"end_character":50},"in_reply_to":"9a30ddce_d5cefb2b","updated":"2017-03-21 03:14:41.000000000","message":"Oops...I forgot to change the name. Corrected it now.","commit_id":"b561ec69438ea815ce8356984bfdd0a4206b3435"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"18a73124d1b34b935b686b633f1590486f9c7ff7","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        if bindings:"},{"line_number":105,"context_line":"            for binding in bindings:"},{"line_number":106,"context_line":"                if binding.get(\u0027host\u0027) \u003d\u003d host:"},{"line_number":107,"context_line":"                    binding.status \u003d constants.PORT_BINDING_STATUS_ACTIVE"},{"line_number":108,"context_line":"                    binding.update()"},{"line_number":109,"context_line":"                else:"},{"line_number":110,"context_line":"                    binding.status \u003d constants.PORT_BINDING_STATUS_INACTIVE"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a30ddce_158b33c4","line":107,"updated":"2017-03-10 07:54:24.000000000","message":"you could check if the status is already active and then skip the update. Not sure if this brings any benefit...","commit_id":"b561ec69438ea815ce8356984bfdd0a4206b3435"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"d6cd568f58ebf64dfa9f0d16eef8733e06b11c29","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        if bindings:"},{"line_number":105,"context_line":"            for binding in bindings:"},{"line_number":106,"context_line":"                if binding.get(\u0027host\u0027) \u003d\u003d host:"},{"line_number":107,"context_line":"                    binding.status \u003d constants.PORT_BINDING_STATUS_ACTIVE"},{"line_number":108,"context_line":"                    binding.update()"},{"line_number":109,"context_line":"                else:"},{"line_number":110,"context_line":"                    binding.status \u003d constants.PORT_BINDING_STATUS_INACTIVE"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a1ced50_438c4b35","line":107,"in_reply_to":"9a30ddce_158b33c4","updated":"2017-03-21 03:14:41.000000000","message":"Do you mean put another check whether the status of the given host is active or not and then update accordingly?","commit_id":"b561ec69438ea815ce8356984bfdd0a4206b3435"}],"neutron/services/portbindings_extended/plugin.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"0c19d9a558ac45fb0c6282064cc8d13ea7e55ae5","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    return pb_obj.PortBinding(context, **binding_args)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"def _get_port_binding_obj(context, host, port_id):"},{"line_number":50,"context_line":"    return pb_obj.PortBinding.get_object(context, host\u003dhost, port_id\u003dport_id)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"5f4e5783_1a35c8f7","line":49,"updated":"2017-10-12 20:03:54.000000000","message":"Do You really need this additional function?","commit_id":"4ebe4fa0cb21ec5e45a0f5e4cb4ebe0b9e936022"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"3342b50fd3ab4dc0dd23a192435cc80c1ab67499","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    return pb_obj.PortBinding(context, **binding_args)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"def _get_port_binding_obj(context, host, port_id):"},{"line_number":50,"context_line":"    return pb_obj.PortBinding.get_object(context, host\u003dhost, port_id\u003dport_id)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"5f4e5783_c2f715d3","line":49,"in_reply_to":"5f4e5783_1a35c8f7","updated":"2017-10-15 22:34:18.000000000","message":"Done","commit_id":"4ebe4fa0cb21ec5e45a0f5e4cb4ebe0b9e936022"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"0c19d9a558ac45fb0c6282064cc8d13ea7e55ae5","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        status \u003d constants.PORT_BINDING_STATUS_ACTIVE"},{"line_number":62,"context_line":"        p_b \u003d binding[\u0027binding\u0027]"},{"line_number":63,"context_line":"        count \u003d pb_obj.PortBinding.count(context, port_id\u003dport_id)"},{"line_number":64,"context_line":"        if count \u003d\u003d constants.MAX_COMPUTE_BINDING:"},{"line_number":65,"context_line":"            raise exceptions.PortBoundToMaximumNumberOfHosts(port_id\u003dport_id)"},{"line_number":66,"context_line":"        elif count \u003d\u003d constants.MIN_COMPUTE_BINDING:"},{"line_number":67,"context_line":"            # Host-id is a primary key but we don\u0027t care now to which host is"}],"source_content_type":"text/x-python","patch_set":29,"id":"5f4e5783_fa3b0ce8","line":64,"updated":"2017-10-12 20:03:54.000000000","message":"I know that it shouldn\u0027t happen but isn\u0027t it safer to use here \"\u003e\u003d\" instead of \"\u003d\u003d\" ?","commit_id":"4ebe4fa0cb21ec5e45a0f5e4cb4ebe0b9e936022"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"3342b50fd3ab4dc0dd23a192435cc80c1ab67499","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        status \u003d constants.PORT_BINDING_STATUS_ACTIVE"},{"line_number":62,"context_line":"        p_b \u003d binding[\u0027binding\u0027]"},{"line_number":63,"context_line":"        count \u003d pb_obj.PortBinding.count(context, port_id\u003dport_id)"},{"line_number":64,"context_line":"        if count \u003d\u003d constants.MAX_COMPUTE_BINDING:"},{"line_number":65,"context_line":"            raise exceptions.PortBoundToMaximumNumberOfHosts(port_id\u003dport_id)"},{"line_number":66,"context_line":"        elif count \u003d\u003d constants.MIN_COMPUTE_BINDING:"},{"line_number":67,"context_line":"            # Host-id is a primary key but we don\u0027t care now to which host is"}],"source_content_type":"text/x-python","patch_set":29,"id":"5f4e5783_c2495531","line":64,"in_reply_to":"5f4e5783_fa3b0ce8","updated":"2017-10-15 22:34:18.000000000","message":"Done","commit_id":"4ebe4fa0cb21ec5e45a0f5e4cb4ebe0b9e936022"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"0c19d9a558ac45fb0c6282064cc8d13ea7e55ae5","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        count \u003d pb_obj.PortBinding.count(context, port_id\u003dport_id)"},{"line_number":64,"context_line":"        if count \u003d\u003d constants.MAX_COMPUTE_BINDING:"},{"line_number":65,"context_line":"            raise exceptions.PortBoundToMaximumNumberOfHosts(port_id\u003dport_id)"},{"line_number":66,"context_line":"        elif count \u003d\u003d constants.MIN_COMPUTE_BINDING:"},{"line_number":67,"context_line":"            # Host-id is a primary key but we don\u0027t care now to which host is"},{"line_number":68,"context_line":"            # existing port bound"},{"line_number":69,"context_line":"            active_bindings \u003d ["}],"source_content_type":"text/x-python","patch_set":29,"id":"5f4e5783_da3e10d9","line":66,"updated":"2017-10-12 20:03:54.000000000","message":"and similar question here","commit_id":"4ebe4fa0cb21ec5e45a0f5e4cb4ebe0b9e936022"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"3342b50fd3ab4dc0dd23a192435cc80c1ab67499","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        count \u003d pb_obj.PortBinding.count(context, port_id\u003dport_id)"},{"line_number":64,"context_line":"        if count \u003d\u003d constants.MAX_COMPUTE_BINDING:"},{"line_number":65,"context_line":"            raise exceptions.PortBoundToMaximumNumberOfHosts(port_id\u003dport_id)"},{"line_number":66,"context_line":"        elif count \u003d\u003d constants.MIN_COMPUTE_BINDING:"},{"line_number":67,"context_line":"            # Host-id is a primary key but we don\u0027t care now to which host is"},{"line_number":68,"context_line":"            # existing port bound"},{"line_number":69,"context_line":"            active_bindings \u003d ["}],"source_content_type":"text/x-python","patch_set":29,"id":"5f4e5783_824fdd32","line":66,"in_reply_to":"5f4e5783_da3e10d9","updated":"2017-10-15 22:34:18.000000000","message":"We can change this to just elif count, since what we want to check here is if there are other bindings already and one of them is active","commit_id":"4ebe4fa0cb21ec5e45a0f5e4cb4ebe0b9e936022"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"0c19d9a558ac45fb0c6282064cc8d13ea7e55ae5","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                    context, port_id\u003dport_id)"},{"line_number":72,"context_line":"                if a_binding.status \u003d\u003d constants.PORT_BINDING_STATUS_ACTIVE]"},{"line_number":73,"context_line":"            if active_bindings:"},{"line_number":74,"context_line":"                status \u003d constants.PORT_BINDING_STATUS_INACTIVE"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        binding \u003d _create_port_binding_obj(context, port_id, p_b, status)"},{"line_number":77,"context_line":"        binding.create()"}],"source_content_type":"text/x-python","patch_set":29,"id":"5f4e5783_ba2594c4","line":74,"updated":"2017-10-12 20:03:54.000000000","message":"what in case when count would be between MIN_COMPUTE_BINDING and MAX_COMPUTE_BINDING? I know that it\u0027s currently not possible as it is between 1 and 2 but from reading this code here it looks like it could be possible some day :)","commit_id":"4ebe4fa0cb21ec5e45a0f5e4cb4ebe0b9e936022"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"3342b50fd3ab4dc0dd23a192435cc80c1ab67499","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                    context, port_id\u003dport_id)"},{"line_number":72,"context_line":"                if a_binding.status \u003d\u003d constants.PORT_BINDING_STATUS_ACTIVE]"},{"line_number":73,"context_line":"            if active_bindings:"},{"line_number":74,"context_line":"                status \u003d constants.PORT_BINDING_STATUS_INACTIVE"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        binding \u003d _create_port_binding_obj(context, port_id, p_b, status)"},{"line_number":77,"context_line":"        binding.create()"}],"source_content_type":"text/x-python","patch_set":29,"id":"5f4e5783_6262a1b0","line":74,"in_reply_to":"5f4e5783_ba2594c4","updated":"2017-10-15 22:34:18.000000000","message":"See response to L66. The change proposed there also covers this comment","commit_id":"4ebe4fa0cb21ec5e45a0f5e4cb4ebe0b9e936022"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"0c19d9a558ac45fb0c6282064cc8d13ea7e55ae5","unresolved":false,"context_lines":[{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def get_port_binding(self, context, host, port_id, fields\u003dNone):"},{"line_number":96,"context_line":"        # TODO(jlibosva): Validate compute port is compute port."},{"line_number":97,"context_line":"        binding \u003d _get_port_binding_obj(context, host, port_id)"},{"line_number":98,"context_line":"        if not binding:"},{"line_number":99,"context_line":"            raise exceptions.PortBindingNotFound(port_id\u003dport_id)"},{"line_number":100,"context_line":"        return _make_port_binding_dict(binding, fields)"}],"source_content_type":"text/x-python","patch_set":29,"id":"5f4e5783_9a2098b2","line":97,"updated":"2017-10-12 20:03:54.000000000","message":"In line 89 You are directly calling get_objects() method from PortBinding object.\nHere You are calling helper function. IMHO it\u0027s not necessary as this function is not doing anything \"special\" in fact.","commit_id":"4ebe4fa0cb21ec5e45a0f5e4cb4ebe0b9e936022"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"3342b50fd3ab4dc0dd23a192435cc80c1ab67499","unresolved":false,"context_lines":[{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def get_port_binding(self, context, host, port_id, fields\u003dNone):"},{"line_number":96,"context_line":"        # TODO(jlibosva): Validate compute port is compute port."},{"line_number":97,"context_line":"        binding \u003d _get_port_binding_obj(context, host, port_id)"},{"line_number":98,"context_line":"        if not binding:"},{"line_number":99,"context_line":"            raise exceptions.PortBindingNotFound(port_id\u003dport_id)"},{"line_number":100,"context_line":"        return _make_port_binding_dict(binding, fields)"}],"source_content_type":"text/x-python","patch_set":29,"id":"5f4e5783_a20099ac","line":97,"in_reply_to":"5f4e5783_9a2098b2","updated":"2017-10-15 22:34:18.000000000","message":"Done","commit_id":"4ebe4fa0cb21ec5e45a0f5e4cb4ebe0b9e936022"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"0c19d9a558ac45fb0c6282064cc8d13ea7e55ae5","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    def update_port_binding(self, context, host, port_id, binding):"},{"line_number":103,"context_line":"        # TODO(jlibosva): If binding fails, return 4xx or 5xx"},{"line_number":104,"context_line":"        p_b \u003d binding.get(\"binding\", {})"},{"line_number":105,"context_line":"        binding \u003d _get_port_binding_obj(context, host, port_id)"},{"line_number":106,"context_line":"        binding.update_fields(p_b)"},{"line_number":107,"context_line":"        binding.update()"},{"line_number":108,"context_line":"        return _make_port_binding_dict(binding)"}],"source_content_type":"text/x-python","patch_set":29,"id":"5f4e5783_7a2f1ca1","line":105,"updated":"2017-10-12 20:03:54.000000000","message":"same here, IMHO it\u0027s not necessary to use helper function here","commit_id":"4ebe4fa0cb21ec5e45a0f5e4cb4ebe0b9e936022"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"3342b50fd3ab4dc0dd23a192435cc80c1ab67499","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    def update_port_binding(self, context, host, port_id, binding):"},{"line_number":103,"context_line":"        # TODO(jlibosva): If binding fails, return 4xx or 5xx"},{"line_number":104,"context_line":"        p_b \u003d binding.get(\"binding\", {})"},{"line_number":105,"context_line":"        binding \u003d _get_port_binding_obj(context, host, port_id)"},{"line_number":106,"context_line":"        binding.update_fields(p_b)"},{"line_number":107,"context_line":"        binding.update()"},{"line_number":108,"context_line":"        return _make_port_binding_dict(binding)"}],"source_content_type":"text/x-python","patch_set":29,"id":"5f4e5783_82fd9db2","line":105,"in_reply_to":"5f4e5783_7a2f1ca1","updated":"2017-10-15 22:34:18.000000000","message":"Done","commit_id":"4ebe4fa0cb21ec5e45a0f5e4cb4ebe0b9e936022"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"0c19d9a558ac45fb0c6282064cc8d13ea7e55ae5","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        return _make_port_binding_dict(active_binding)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def delete_port_binding(self, context, host, port_id):"},{"line_number":130,"context_line":"        pb_obj.PortBinding.delete_objects(context, host\u003dhost, port_id\u003dport_id)"}],"source_content_type":"text/x-python","patch_set":29,"id":"5f4e5783_5a2a2090","line":130,"updated":"2017-10-12 20:03:54.000000000","message":"Method name suggests me that only one binding will be deleted but You are calling \"delete_objects\" so can it remove more objects at once? Is it intentional?","commit_id":"4ebe4fa0cb21ec5e45a0f5e4cb4ebe0b9e936022"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"3342b50fd3ab4dc0dd23a192435cc80c1ab67499","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        return _make_port_binding_dict(active_binding)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def delete_port_binding(self, context, host, port_id):"},{"line_number":130,"context_line":"        pb_obj.PortBinding.delete_objects(context, host\u003dhost, port_id\u003dport_id)"}],"source_content_type":"text/x-python","patch_set":29,"id":"5f4e5783_a29c196a","line":130,"in_reply_to":"5f4e5783_5a2a2090","updated":"2017-10-15 22:34:18.000000000","message":"As far as I can tell, there is no delete_object in Neutron OVO. Besides, host is a primary key of PortBinding (https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/models.py#L41) and it is required when the user makes this call (https://specs.openstack.org/openstack/neutron-specs/specs/backlog/pike/portbinding_information_for_nova.html#delete-binding).","commit_id":"4ebe4fa0cb21ec5e45a0f5e4cb4ebe0b9e936022"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"f86a8765ffb0205adad9eec1534817cd00e0ed48","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        return _make_port_binding_dict(active_binding)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def delete_port_binding(self, context, host, port_id):"},{"line_number":130,"context_line":"        pb_obj.PortBinding.delete_objects(context, host\u003dhost, port_id\u003dport_id)"}],"source_content_type":"text/x-python","patch_set":29,"id":"5f4e5783_52318aa2","line":130,"in_reply_to":"5f4e5783_a29c196a","updated":"2017-10-17 07:02:28.000000000","message":"ok, thx for explanation","commit_id":"4ebe4fa0cb21ec5e45a0f5e4cb4ebe0b9e936022"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"45ba50bd9c5a95c4ffceef4d595c7e8fd889efea","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    binding_args \u003d {\u0027port_id\u0027: port_id,"},{"line_number":37,"context_line":"                    \u0027host\u0027: binding[\u0027host\u0027],"},{"line_number":38,"context_line":"                    \u0027vif_type\u0027: portbindings.VIF_TYPE_UNBOUND,"},{"line_number":39,"context_line":"                    \u0027vnic_type\u0027: binding.get("},{"line_number":40,"context_line":"                        \u0027vnic_type\u0027, portbindings.VNIC_NORMAL),"},{"line_number":41,"context_line":"                    \u0027status\u0027: status}"},{"line_number":42,"context_line":"    profile \u003d binding[\u0027profile\u0027]"},{"line_number":43,"context_line":"    if not isinstance(profile, n_consts.Sentinel):"}],"source_content_type":"text/x-python","patch_set":33,"id":"ff82abbf_4e5d0977","line":40,"range":{"start_line":39,"start_character":20,"end_line":40,"end_character":63},"updated":"2017-11-29 23:50:24.000000000","message":"we need unit tests to assert that the vnic type is copied from the orignal binding.\nthis should only be called on a port that has been previously bound so we should never need the vnic_normal default value but we should also assert that it is used if that is the behavior we desire when no vnic type was present itn the binding object that was passed in but i think an excepetion would be more corret.\n\nperhaps we should just use vnic_type:binding[\u0027vnic_type\u0027]\ninstead.","commit_id":"a35e6db4e05d59d33b54cc3821d432cb9f7e6404"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"45ba50bd9c5a95c4ffceef4d595c7e8fd889efea","unresolved":false,"context_lines":[{"line_number":39,"context_line":"                    \u0027vnic_type\u0027: binding.get("},{"line_number":40,"context_line":"                        \u0027vnic_type\u0027, portbindings.VNIC_NORMAL),"},{"line_number":41,"context_line":"                    \u0027status\u0027: status}"},{"line_number":42,"context_line":"    profile \u003d binding[\u0027profile\u0027]"},{"line_number":43,"context_line":"    if not isinstance(profile, n_consts.Sentinel):"},{"line_number":44,"context_line":"        binding_args[\u0027profile\u0027] \u003d binding[\u0027profile\u0027]"},{"line_number":45,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"ff82abbf_4ed2e9d2","line":42,"range":{"start_line":42,"start_character":4,"end_line":42,"end_character":32},"updated":"2017-11-29 23:50:24.000000000","message":"as with vnic_type there are no unit tests to assert that the binding profile is correctly coppied.","commit_id":"a35e6db4e05d59d33b54cc3821d432cb9f7e6404"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"45ba50bd9c5a95c4ffceef4d595c7e8fd889efea","unresolved":false,"context_lines":[{"line_number":41,"context_line":"                    \u0027status\u0027: status}"},{"line_number":42,"context_line":"    profile \u003d binding[\u0027profile\u0027]"},{"line_number":43,"context_line":"    if not isinstance(profile, n_consts.Sentinel):"},{"line_number":44,"context_line":"        binding_args[\u0027profile\u0027] \u003d binding[\u0027profile\u0027]"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    return pb_obj.PortBinding(context, **binding_args)"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"ff82abbf_aefb7544","line":44,"range":{"start_line":44,"start_character":34,"end_line":44,"end_character":52},"updated":"2017-11-29 23:50:24.000000000","message":"why not just use profile here instead of do a string index into a dict again when you have the value already in a local variable.","commit_id":"a35e6db4e05d59d33b54cc3821d432cb9f7e6404"}],"neutron/services/portbindings_extended/portbindings_extended_plugin.py":[{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"1ec119d98db19136f21cca447f9159cd787ec939","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from neutron.objects import ports as pb_obj"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"class PortBindingsExtendedMixin(common_db_mixin.CommonDbMixin,"},{"line_number":23,"context_line":"                                pb_ext.PortBindingExtendedPluginBase):"},{"line_number":24,"context_line":"    \"\"\"Implementation of the Neutron PortBinding Extended Plugin.\"\"\""},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7a3c09a3_28d3f039","line":22,"range":{"start_line":22,"start_character":18,"end_line":22,"end_character":31},"updated":"2017-01-13 16:48:27.000000000","message":"I\u0027d just change this to Plugin.  Also, I\u0027d change the module and package name to portbindings (remove the _extended)","commit_id":"889bd9be29fcb700d213041e9558dfdfe681c5cd"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"701f6c5900b572990f6ae89753310d7d4aebb41d","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from neutron.objects import ports as pb_obj"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"class PortBindingsExtendedMixin(common_db_mixin.CommonDbMixin,"},{"line_number":23,"context_line":"                                pb_ext.PortBindingExtendedPluginBase):"},{"line_number":24,"context_line":"    \"\"\"Implementation of the Neutron PortBinding Extended Plugin.\"\"\""},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a461143_6b5be42e","line":22,"range":{"start_line":22,"start_character":18,"end_line":22,"end_character":31},"in_reply_to":"7a3c09a3_28d3f039","updated":"2017-01-27 20:46:50.000000000","message":"Done","commit_id":"889bd9be29fcb700d213041e9558dfdfe681c5cd"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"1ec119d98db19136f21cca447f9159cd787ec939","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        return ["},{"line_number":45,"context_line":"            self._make_port_binding_dict(binding, fields)"},{"line_number":46,"context_line":"            for binding in bindings"},{"line_number":47,"context_line":"        ]"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a3c09a3_885dc4eb","line":47,"updated":"2017-01-13 16:48:27.000000000","message":"you still need to create @classmethod get_plugin_type so that you can retrieve this plugin from the extension\u0027s get_resources method.","commit_id":"889bd9be29fcb700d213041e9558dfdfe681c5cd"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"701f6c5900b572990f6ae89753310d7d4aebb41d","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        return ["},{"line_number":45,"context_line":"            self._make_port_binding_dict(binding, fields)"},{"line_number":46,"context_line":"            for binding in bindings"},{"line_number":47,"context_line":"        ]"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a461143_86cba552","line":47,"in_reply_to":"7a3c09a3_885dc4eb","updated":"2017-01-27 20:46:50.000000000","message":"Added it in the PortBindingExtendedPluginBase","commit_id":"889bd9be29fcb700d213041e9558dfdfe681c5cd"}],"neutron/services/qos/drivers/manager.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"e886bbfe2cdca34435e4771d74b413f8b8c52f44","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def validate_rule_for_port(self, rule, port):"},{"line_number":139,"context_line":"        port_binding \u003d utils.get_port_binding_by_status_and_host("},{"line_number":140,"context_line":"            port.binding, lib_constants.ACTIVE)"},{"line_number":141,"context_line":"        for driver in self._drivers:"},{"line_number":142,"context_line":"            vif_type \u003d port_binding.vif_type"},{"line_number":143,"context_line":"            if vif_type not in SKIPPED_VIF_TYPES:"}],"source_content_type":"text/x-python","patch_set":59,"id":"bf659307_97cf6556","line":140,"updated":"2018-04-07 20:40:25.000000000","message":"Just a question (probably all will work fine here): imagine the case when we have two bindings:\n\n* active with sr-iov driver\n* inactive with ovs driver\n\nPort has got QoS policy with min bandwidth limit which is supported only by sr-iov driver currently.\nNow user activates ovs binding - will this QoS validation work as it should and will it forbid do activate this new binding or not? Did You check such case?","commit_id":"85c348508217e763c637ed9d4db36da201b824a1"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"90ff9c599038d74abb33de2cab0bd5fa5bb11e39","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def validate_rule_for_port(self, rule, port):"},{"line_number":139,"context_line":"        port_binding \u003d utils.get_port_binding_by_status_and_host("},{"line_number":140,"context_line":"            port.binding, lib_constants.ACTIVE)"},{"line_number":141,"context_line":"        for driver in self._drivers:"},{"line_number":142,"context_line":"            vif_type \u003d port_binding.vif_type"},{"line_number":143,"context_line":"            if vif_type not in SKIPPED_VIF_TYPES:"}],"source_content_type":"text/x-python","patch_set":59,"id":"5f7c97a3_4e17c0ee","line":140,"in_reply_to":"bf659307_97cf6556","updated":"2018-05-09 21:57:09.000000000","message":"We will need to test that. I don\u0027t have an environment with SR-IOV","commit_id":"85c348508217e763c637ed9d4db36da201b824a1"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"b87a82f081acb641e4ed9e2cbc3aea114812a7de","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def validate_rule_for_port(self, rule, port):"},{"line_number":139,"context_line":"        port_binding \u003d utils.get_port_binding_by_status_and_host("},{"line_number":140,"context_line":"            port.binding, lib_constants.ACTIVE)"},{"line_number":141,"context_line":"        for driver in self._drivers:"},{"line_number":142,"context_line":"            vif_type \u003d port_binding.vif_type"},{"line_number":143,"context_line":"            if vif_type not in SKIPPED_VIF_TYPES:"}],"source_content_type":"text/x-python","patch_set":73,"id":"5f7c97a3_c2ea2576","line":140,"updated":"2018-07-11 19:00:25.000000000","message":"Same","commit_id":"7897f395ef463967bad0a7fd4fd27ab9ddc3ed7e"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"b76e90cb1ba69804a74d8d9374037565e10c32a2","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def validate_rule_for_port(self, rule, port):"},{"line_number":139,"context_line":"        port_binding \u003d utils.get_port_binding_by_status_and_host("},{"line_number":140,"context_line":"            port.binding, lib_constants.ACTIVE)"},{"line_number":141,"context_line":"        for driver in self._drivers:"},{"line_number":142,"context_line":"            vif_type \u003d port_binding.vif_type"},{"line_number":143,"context_line":"            if vif_type not in SKIPPED_VIF_TYPES:"}],"source_content_type":"text/x-python","patch_set":73,"id":"5f7c97a3_e0083e2f","line":140,"in_reply_to":"5f7c97a3_3c0f638c","updated":"2018-07-13 23:15:16.000000000","message":"Fixed per conversation at https://review.openstack.org/#/c/414251/73/neutron/plugins/ml2/plugin.py@1586","commit_id":"7897f395ef463967bad0a7fd4fd27ab9ddc3ed7e"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"93f594aaad580467487baa3e7f4b5795637eec7b","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def validate_rule_for_port(self, rule, port):"},{"line_number":139,"context_line":"        port_binding \u003d utils.get_port_binding_by_status_and_host("},{"line_number":140,"context_line":"            port.binding, lib_constants.ACTIVE)"},{"line_number":141,"context_line":"        for driver in self._drivers:"},{"line_number":142,"context_line":"            vif_type \u003d port_binding.vif_type"},{"line_number":143,"context_line":"            if vif_type not in SKIPPED_VIF_TYPES:"}],"source_content_type":"text/x-python","patch_set":73,"id":"5f7c97a3_3c0f638c","line":140,"in_reply_to":"5f7c97a3_c2ea2576","updated":"2018-07-12 17:41:04.000000000","message":"Please see response to https://review.openstack.org/#/c/414251/73/neutron/plugins/ml2/plugin.py@1586","commit_id":"7897f395ef463967bad0a7fd4fd27ab9ddc3ed7e"}],"neutron/tests/contrib/hooks/api_all_extensions":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"86fbe57e6af582f0a036a34d3590d9e5a1cc9700","unresolved":false,"context_lines":[{"line_number":6,"context_line":"NETWORK_API_EXTENSIONS+\u003d\",auto-allocated-topology\""},{"line_number":7,"context_line":"NETWORK_API_EXTENSIONS+\u003d\",availability_zone\""},{"line_number":8,"context_line":"NETWORK_API_EXTENSIONS+\u003d\",binding\""},{"line_number":9,"context_line":"NETWORK_API_EXTENSIONS+\u003d\",binding_extended\""},{"line_number":10,"context_line":"NETWORK_API_EXTENSIONS+\u003d\",default-subnetpools\""},{"line_number":11,"context_line":"NETWORK_API_EXTENSIONS+\u003d\",dhcp_agent_scheduler\""},{"line_number":12,"context_line":"NETWORK_API_EXTENSIONS+\u003d\",dns-integration\""}],"source_content_type":"application/octet-stream","patch_set":66,"id":"5f7c97a3_0464d7b1","line":9,"updated":"2018-06-26 21:47:10.000000000","message":"in neutron/plugins/ml2/plugin.py this was binding-extended","commit_id":"957e4f2e4d2e23121821ce4bb95724707e8d93ee"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"5279436588be4cfdc69e039057df4ea106197f39","unresolved":false,"context_lines":[{"line_number":6,"context_line":"NETWORK_API_EXTENSIONS+\u003d\",auto-allocated-topology\""},{"line_number":7,"context_line":"NETWORK_API_EXTENSIONS+\u003d\",availability_zone\""},{"line_number":8,"context_line":"NETWORK_API_EXTENSIONS+\u003d\",binding\""},{"line_number":9,"context_line":"NETWORK_API_EXTENSIONS+\u003d\",binding_extended\""},{"line_number":10,"context_line":"NETWORK_API_EXTENSIONS+\u003d\",default-subnetpools\""},{"line_number":11,"context_line":"NETWORK_API_EXTENSIONS+\u003d\",dhcp_agent_scheduler\""},{"line_number":12,"context_line":"NETWORK_API_EXTENSIONS+\u003d\",dns-integration\""}],"source_content_type":"application/octet-stream","patch_set":66,"id":"5f7c97a3_1d3b7b39","line":9,"in_reply_to":"5f7c97a3_0464d7b1","updated":"2018-06-29 17:05:15.000000000","message":"Nice catch!. Thanks! Fixed","commit_id":"957e4f2e4d2e23121821ce4bb95724707e8d93ee"}],"neutron/tests/tempest/api/test_portbindings_extended.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"0c19d9a558ac45fb0c6282064cc8d13ea7e55ae5","unresolved":false,"context_lines":[{"line_number":21,"context_line":"CONF \u003d config.CONF"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"def _get_active_inactive_bindings(bindings):"},{"line_number":25,"context_line":"    \"\"\"Get active and inactive binding."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    Based on the provided bindings list active and inactive bindings are"}],"source_content_type":"text/x-python","patch_set":29,"id":"5f4e5783_1a1ee86f","line":24,"updated":"2017-10-12 20:03:54.000000000","message":"This function is used only in one place (or maybe I missed something).\nDo You really need it? Maybe it would be better to move those checkes for active/inactive binding to test_list_bindings()?","commit_id":"4ebe4fa0cb21ec5e45a0f5e4cb4ebe0b9e936022"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"3342b50fd3ab4dc0dd23a192435cc80c1ab67499","unresolved":false,"context_lines":[{"line_number":21,"context_line":"CONF \u003d config.CONF"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"def _get_active_inactive_bindings(bindings):"},{"line_number":25,"context_line":"    \"\"\"Get active and inactive binding."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    Based on the provided bindings list active and inactive bindings are"}],"source_content_type":"text/x-python","patch_set":29,"id":"5f4e5783_bf7aebb6","line":24,"in_reply_to":"5f4e5783_1a1ee86f","updated":"2017-10-15 22:34:18.000000000","message":"We can simplify the checks done in this function and put them in test_list_bindings below","commit_id":"4ebe4fa0cb21ec5e45a0f5e4cb4ebe0b9e936022"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"0c19d9a558ac45fb0c6282064cc8d13ea7e55ae5","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    try:"},{"line_number":47,"context_line":"        inactive_binding \u003d ["},{"line_number":48,"context_line":"            b for b in bindings"},{"line_number":49,"context_line":"            if b[\u0027status\u0027] \u003d\u003d constants.PORT_BINDING_STATUS_INACTIVE]"},{"line_number":50,"context_line":"    except IndexError:"},{"line_number":51,"context_line":"        raise RuntimeError("},{"line_number":52,"context_line":"            \"Didn\u0027t find inactive binding in %s\" % bindings)"}],"source_content_type":"text/x-python","patch_set":29,"id":"5f4e5783_fa142c50","line":49,"updated":"2017-10-12 20:03:54.000000000","message":"You probably missed [0] at the end of this line","commit_id":"4ebe4fa0cb21ec5e45a0f5e4cb4ebe0b9e936022"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"3342b50fd3ab4dc0dd23a192435cc80c1ab67499","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    try:"},{"line_number":47,"context_line":"        inactive_binding \u003d ["},{"line_number":48,"context_line":"            b for b in bindings"},{"line_number":49,"context_line":"            if b[\u0027status\u0027] \u003d\u003d constants.PORT_BINDING_STATUS_INACTIVE]"},{"line_number":50,"context_line":"    except IndexError:"},{"line_number":51,"context_line":"        raise RuntimeError("},{"line_number":52,"context_line":"            \"Didn\u0027t find inactive binding in %s\" % bindings)"}],"source_content_type":"text/x-python","patch_set":29,"id":"5f4e5783_9f4def9b","line":49,"in_reply_to":"5f4e5783_fa142c50","updated":"2017-10-15 22:34:18.000000000","message":"Removed this function so this comment doesn\u0027t apply anymore","commit_id":"4ebe4fa0cb21ec5e45a0f5e4cb4ebe0b9e936022"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"0c19d9a558ac45fb0c6282064cc8d13ea7e55ae5","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        self.assertEqual({}, binding[\u0027profile\u0027])"},{"line_number":101,"context_line":"        self.assertEqual("},{"line_number":102,"context_line":"            constants.PORT_BINDING_STATUS_ACTIVE, binding[\u0027status\u0027])"},{"line_number":103,"context_line":"        self.assertEqual(\u0027ovs\u0027, binding[\u0027vif_type\u0027])"},{"line_number":104,"context_line":"        self.assertEqual(self.active_host, binding[\u0027host\u0027])"},{"line_number":105,"context_line":"        self.assertIn(\u0027vnic_type\u0027, binding)"},{"line_number":106,"context_line":"        self.assertIn(\u0027vif_details\u0027, binding)"}],"source_content_type":"text/x-python","patch_set":29,"id":"5f4e5783_da173051","line":103,"updated":"2017-10-12 20:03:54.000000000","message":"Are You sure it will always be \u0027ovs\u0027? What if on host will be LinuxBridge or SR-IOV agent?","commit_id":"4ebe4fa0cb21ec5e45a0f5e4cb4ebe0b9e936022"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"3342b50fd3ab4dc0dd23a192435cc80c1ab67499","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        self.assertEqual({}, binding[\u0027profile\u0027])"},{"line_number":101,"context_line":"        self.assertEqual("},{"line_number":102,"context_line":"            constants.PORT_BINDING_STATUS_ACTIVE, binding[\u0027status\u0027])"},{"line_number":103,"context_line":"        self.assertEqual(\u0027ovs\u0027, binding[\u0027vif_type\u0027])"},{"line_number":104,"context_line":"        self.assertEqual(self.active_host, binding[\u0027host\u0027])"},{"line_number":105,"context_line":"        self.assertIn(\u0027vnic_type\u0027, binding)"},{"line_number":106,"context_line":"        self.assertIn(\u0027vif_details\u0027, binding)"}],"source_content_type":"text/x-python","patch_set":29,"id":"5f4e5783_ff5d0347","line":103,"in_reply_to":"5f4e5783_da173051","updated":"2017-10-15 22:34:18.000000000","message":"I think you are right. Let\u0027s just check that we get a non-empty string back","commit_id":"4ebe4fa0cb21ec5e45a0f5e4cb4ebe0b9e936022"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"0c19d9a558ac45fb0c6282064cc8d13ea7e55ae5","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        bindings \u003d self.admin_client.list_portbindings("},{"line_number":115,"context_line":"            self.port[\u0027id\u0027])[\u0027bindings\u0027]"},{"line_number":116,"context_line":"        self.assertEqual("},{"line_number":117,"context_line":"            2, len(bindings),"},{"line_number":118,"context_line":"            \"List bindings returned %s bindings instead of 2\" % len(bindings))"},{"line_number":119,"context_line":"        active_binding, inactive_binding \u003d _get_active_inactive_bindings("},{"line_number":120,"context_line":"            bindings)"}],"source_content_type":"text/x-python","patch_set":29,"id":"5f4e5783_ba0eb438","line":117,"updated":"2017-10-12 20:03:54.000000000","message":"Same check is also done in _get_active_inactive_bindings() function","commit_id":"4ebe4fa0cb21ec5e45a0f5e4cb4ebe0b9e936022"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"3342b50fd3ab4dc0dd23a192435cc80c1ab67499","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        bindings \u003d self.admin_client.list_portbindings("},{"line_number":115,"context_line":"            self.port[\u0027id\u0027])[\u0027bindings\u0027]"},{"line_number":116,"context_line":"        self.assertEqual("},{"line_number":117,"context_line":"            2, len(bindings),"},{"line_number":118,"context_line":"            \"List bindings returned %s bindings instead of 2\" % len(bindings))"},{"line_number":119,"context_line":"        active_binding, inactive_binding \u003d _get_active_inactive_bindings("},{"line_number":120,"context_line":"            bindings)"}],"source_content_type":"text/x-python","patch_set":29,"id":"5f4e5783_7f52333d","line":117,"in_reply_to":"5f4e5783_ba0eb438","updated":"2017-10-15 22:34:18.000000000","message":"Removed the function","commit_id":"4ebe4fa0cb21ec5e45a0f5e4cb4ebe0b9e936022"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"0c19d9a558ac45fb0c6282064cc8d13ea7e55ae5","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        self.assertEqual("},{"line_number":117,"context_line":"            2, len(bindings),"},{"line_number":118,"context_line":"            \"List bindings returned %s bindings instead of 2\" % len(bindings))"},{"line_number":119,"context_line":"        active_binding, inactive_binding \u003d _get_active_inactive_bindings("},{"line_number":120,"context_line":"            bindings)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    @decorators.idempotent_id(\u00275100fe3a-6175-4a8d-ac04-0ca205cd16a5\u0027)"}],"source_content_type":"text/x-python","patch_set":29,"id":"5f4e5783_9a09b832","line":119,"updated":"2017-10-12 20:03:54.000000000","message":"You are not using those variables anywhere so You don\u0027t need to assign it IMO","commit_id":"4ebe4fa0cb21ec5e45a0f5e4cb4ebe0b9e936022"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"3342b50fd3ab4dc0dd23a192435cc80c1ab67499","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        self.assertEqual("},{"line_number":117,"context_line":"            2, len(bindings),"},{"line_number":118,"context_line":"            \"List bindings returned %s bindings instead of 2\" % len(bindings))"},{"line_number":119,"context_line":"        active_binding, inactive_binding \u003d _get_active_inactive_bindings("},{"line_number":120,"context_line":"            bindings)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    @decorators.idempotent_id(\u00275100fe3a-6175-4a8d-ac04-0ca205cd16a5\u0027)"}],"source_content_type":"text/x-python","patch_set":29,"id":"5f4e5783_5f43f76c","line":119,"in_reply_to":"5f4e5783_9a09b832","updated":"2017-10-15 22:34:18.000000000","message":"Moved the checks in _get_active_inactive_bindings to this test case","commit_id":"4ebe4fa0cb21ec5e45a0f5e4cb4ebe0b9e936022"}],"neutron/tests/unit/objects/test_ports.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ee8a09ea15f0fa0c8afbac4bca472ffc74d586ab","unresolved":false,"context_lines":[{"line_number":403,"context_line":"        port_data \u003d port_v1_2[\u0027versioned_object.data\u0027]"},{"line_number":404,"context_line":"        self.assertIsNone(port_data[\u0027distributed_binding\u0027])"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"        # now insert a distributed binding"},{"line_number":407,"context_line":"        binding \u003d ports.DistributedPortBinding("},{"line_number":408,"context_line":"            self.context,"},{"line_number":409,"context_line":"            host\u003d\u0027host1\u0027, port_id\u003dport_new.id, status\u003d\u0027ACTIVE\u0027,"}],"source_content_type":"text/x-python","patch_set":70,"id":"5f7c97a3_5e9eae06","line":406,"updated":"2018-07-02 15:04:31.000000000","message":"Wouldn\u0027t this be more interesting if you have \u003e1 binding but only 1 is ACTIVE (only 1 can be ACTIVE) and you assert that\u0027s the one selected? Since the conditional code is based on binding status, you should assert that is in play rather than the code just blindly taking the first binding, for example.","commit_id":"ce0f63e393c3f0cecb9f7e277b00415dcdd76869"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"41bd202161ca9ff7a79443219e29c086d61003f5","unresolved":false,"context_lines":[{"line_number":403,"context_line":"        port_data \u003d port_v1_2[\u0027versioned_object.data\u0027]"},{"line_number":404,"context_line":"        self.assertIsNone(port_data[\u0027distributed_binding\u0027])"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"        # now insert a distributed binding"},{"line_number":407,"context_line":"        binding \u003d ports.DistributedPortBinding("},{"line_number":408,"context_line":"            self.context,"},{"line_number":409,"context_line":"            host\u003d\u0027host1\u0027, port_id\u003dport_new.id, status\u003d\u0027ACTIVE\u0027,"}],"source_content_type":"text/x-python","patch_set":70,"id":"5f7c97a3_277082a4","line":406,"in_reply_to":"5f7c97a3_5e9eae06","updated":"2018-07-02 17:06:40.000000000","message":"This testing applies to DistributedPortBinding, which is the one used for DVR ports: https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/models.py#L101. Patch https://review.openstack.org/#/c/565358 made a port\u0027s ditributed_binding a list and pluralized its name to distributed_bindings. But no functionality was added to really support multiple distributed bindings. So there is at most one active distributed binding. No inactives, though\n\nThe bindings we use to support nova instance migration are PortBinding: https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/models.py#L28. And yes, from the testing perspective, it makes sense to have active and inactive bindings. Please see L429-447 below.\n\nOr am I misunderstanding your comment?","commit_id":"ce0f63e393c3f0cecb9f7e277b00415dcdd76869"}],"neutron/tests/unit/plugins/ml2/test_port_binding.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bffa7f41afc1cb7ab569815c6778d868898bbb1a","unresolved":false,"context_lines":[{"line_number":362,"context_line":"    def _create_port_binding(self, fmt, port_id, host, tenant_id\u003dNone,"},{"line_number":363,"context_line":"                             **kwargs):"},{"line_number":364,"context_line":"        tenant_id \u003d tenant_id or self._tenant_id"},{"line_number":365,"context_line":"        data \u003d {\u0027binding\u0027: {\u0027host\u0027: host, \u0027tenant_id\u0027: tenant_id}}"},{"line_number":366,"context_line":"        if kwargs:"},{"line_number":367,"context_line":"            data[\u0027binding\u0027].update(kwargs)"},{"line_number":368,"context_line":"        binding_resource \u003d \u0027ports/%s/bindings\u0027 % port_id"}],"source_content_type":"text/x-python","patch_set":57,"id":"df7087c5_25c043e1","line":365,"range":{"start_line":365,"start_character":28,"end_line":365,"end_character":40},"updated":"2018-03-13 19:47:10.000000000","message":"This would likely be a big and annoying change to make at this point, but I wanted to point out that the neutron spec said this would be \u0027host_id\u0027:\n\nhttps://specs.openstack.org/openstack/neutron-specs/specs/backlog/pike/portbinding_information_for_nova.html#create-binding\n\nAnd the port has an existing \"binding:host_id\" attribute on it, so it seems like it would be good to be consistent in the port and binding extended APIs, but would understand if people don\u0027t want to go back and update the API definition in neutron-lib. As long as the API reference documentation is correct for whatever is used I\u0027ll be happy (I\u0027m writing the nova client side code for using this API which is how I ran into this).","commit_id":"1a686ead1aa00b9707795c45db348a18645d7ab0"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"3ec46b55b02480cd58190ae7e837722b21e7e185","unresolved":false,"context_lines":[{"line_number":362,"context_line":"    def _create_port_binding(self, fmt, port_id, host, tenant_id\u003dNone,"},{"line_number":363,"context_line":"                             **kwargs):"},{"line_number":364,"context_line":"        tenant_id \u003d tenant_id or self._tenant_id"},{"line_number":365,"context_line":"        data \u003d {\u0027binding\u0027: {\u0027host\u0027: host, \u0027tenant_id\u0027: tenant_id}}"},{"line_number":366,"context_line":"        if kwargs:"},{"line_number":367,"context_line":"            data[\u0027binding\u0027].update(kwargs)"},{"line_number":368,"context_line":"        binding_resource \u003d \u0027ports/%s/bindings\u0027 % port_id"}],"source_content_type":"text/x-python","patch_set":57,"id":"bf659307_e94f1a32","line":365,"range":{"start_line":365,"start_character":28,"end_line":365,"end_character":40},"in_reply_to":"df7087c5_25c043e1","updated":"2018-04-05 04:45:57.000000000","message":"As we agreed a few weeks ago, we will keep it this way","commit_id":"1a686ead1aa00b9707795c45db348a18645d7ab0"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"cce59665060c39db556fe025ab27a040da45b134","unresolved":false,"context_lines":[{"line_number":360,"context_line":""},{"line_number":361,"context_line":"    def _create_port_binding(self, fmt, port_id, host, tenant_id\u003dNone,"},{"line_number":362,"context_line":"                             **kwargs):"},{"line_number":363,"context_line":"        tenant_id \u003d tenant_id or self._tenant_id"},{"line_number":364,"context_line":"        data \u003d {\u0027binding\u0027: {\u0027host\u0027: host, \u0027tenant_id\u0027: tenant_id}}"},{"line_number":365,"context_line":"        if kwargs:"},{"line_number":366,"context_line":"            data[\u0027binding\u0027].update(kwargs)"}],"source_content_type":"text/x-python","patch_set":66,"id":"5f7c97a3_354e5e6e","line":363,"updated":"2018-06-20 10:29:37.000000000","message":"shouldn\u0027t we use project_id where is it possible? I think that tenant_id shouldn\u0027t be used anymore, right?","commit_id":"957e4f2e4d2e23121821ce4bb95724707e8d93ee"}],"neutron/tests/unit/services/portbindings_extended/test_plugin.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"0c19d9a558ac45fb0c6282064cc8d13ea7e55ae5","unresolved":false,"context_lines":[{"line_number":142,"context_line":"#        data \u003d {\u0027binding\u0027: {\u0027host\u0027: \u0027dummy-host2\u0027,"},{"line_number":143,"context_line":"#                            \u0027project_id\u0027: self.project_id}}"},{"line_number":144,"context_line":"#        status, body \u003d self._create_binding(data, resource_id\u003ddhcp_port_id)"},{"line_number":145,"context_line":"#        self.assertEqual(509, status)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def test_get_port_binding(self):"},{"line_number":148,"context_line":"        host \u003d self.active_host"}],"source_content_type":"text/x-python","patch_set":29,"id":"5f4e5783_7a083c2b","line":145,"updated":"2017-10-12 20:03:54.000000000","message":"You can remove or uncomment those above lines :)","commit_id":"4ebe4fa0cb21ec5e45a0f5e4cb4ebe0b9e936022"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"3342b50fd3ab4dc0dd23a192435cc80c1ab67499","unresolved":false,"context_lines":[{"line_number":142,"context_line":"#        data \u003d {\u0027binding\u0027: {\u0027host\u0027: \u0027dummy-host2\u0027,"},{"line_number":143,"context_line":"#                            \u0027project_id\u0027: self.project_id}}"},{"line_number":144,"context_line":"#        status, body \u003d self._create_binding(data, resource_id\u003ddhcp_port_id)"},{"line_number":145,"context_line":"#        self.assertEqual(509, status)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def test_get_port_binding(self):"},{"line_number":148,"context_line":"        host \u003d self.active_host"}],"source_content_type":"text/x-python","patch_set":29,"id":"5f4e5783_bf01cb08","line":145,"in_reply_to":"5f4e5783_7a083c2b","updated":"2017-10-15 22:34:18.000000000","message":"The check tested here has not been implemented in the service plugin yet. I\u0027ll leave this as it is and will uncomment in the next iteration when I add the checking for compute ports in the create operation","commit_id":"4ebe4fa0cb21ec5e45a0f5e4cb4ebe0b9e936022"}],"setup.cfg":[{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"3871eef2c67bb447860cb0e9455bb7bacfc55396","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    timestamp \u003d neutron.services.timestamp.timestamp_plugin:TimeStampPlugin"},{"line_number":83,"context_line":"    trunk \u003d neutron.services.trunk.plugin:TrunkPlugin"},{"line_number":84,"context_line":"    loki \u003d neutron.services.loki.loki_plugin:LokiPlugin"},{"line_number":85,"context_line":"    bindings \u003d neutron.services.portbindings.plugin:PortBindingsPlugin"},{"line_number":86,"context_line":"neutron.ml2.type_drivers \u003d"},{"line_number":87,"context_line":"    flat \u003d neutron.plugins.ml2.drivers.type_flat:FlatTypeDriver"},{"line_number":88,"context_line":"    local \u003d neutron.plugins.ml2.drivers.type_local:LocalTypeDriver"}],"source_content_type":"text/x-ttcn-cfg","patch_set":27,"id":"df140735_fddca8e4","line":85,"range":{"start_line":85,"start_character":4,"end_line":85,"end_character":12},"updated":"2017-06-06 15:24:52.000000000","message":"We have \u0027binding\u0027 extension so the name may confuse users. Why not \u0027bindings_extended\u0027 or \u0027portbindings_ext\u0027 or \u0027portbindings_extended\u0027?","commit_id":"68f2182c3f2512f966b8940904fbe2b4cd3dcb67"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"db61bd661219d9a31f80f06bf2a90b72c04d90b6","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    timestamp \u003d neutron.services.timestamp.timestamp_plugin:TimeStampPlugin"},{"line_number":83,"context_line":"    trunk \u003d neutron.services.trunk.plugin:TrunkPlugin"},{"line_number":84,"context_line":"    loki \u003d neutron.services.loki.loki_plugin:LokiPlugin"},{"line_number":85,"context_line":"    bindings \u003d neutron.services.portbindings.plugin:PortBindingsPlugin"},{"line_number":86,"context_line":"neutron.ml2.type_drivers \u003d"},{"line_number":87,"context_line":"    flat \u003d neutron.plugins.ml2.drivers.type_flat:FlatTypeDriver"},{"line_number":88,"context_line":"    local \u003d neutron.plugins.ml2.drivers.type_local:LocalTypeDriver"}],"source_content_type":"text/x-ttcn-cfg","patch_set":27,"id":"1f1a1f67_ef968f3e","line":85,"range":{"start_line":85,"start_character":4,"end_line":85,"end_character":12},"in_reply_to":"df140735_fddca8e4","updated":"2017-07-17 14:10:11.000000000","message":"Done","commit_id":"68f2182c3f2512f966b8940904fbe2b4cd3dcb67"}]}
