)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"9893d48987aed9869bcd37ff2ccaf949f579e6fc","unresolved":false,"context_lines":[{"line_number":13,"context_line":"This patch adds the support for updating the VNIC index for the"},{"line_number":14,"context_line":"Neutron port. This is done in two places:"},{"line_number":15,"context_line":"1. When the instance is spawned"},{"line_number":16,"context_line":"2. If and when a port is attaached to a running instance"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"The Neutron support for the extension is:"},{"line_number":19,"context_line":"https://review.openstack.org/#/c/144278"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3a961159_fc68eef5","line":16,"updated":"2015-01-14 18:34:25.000000000","message":"nit: attached.","commit_id":"06b27045ca5a4ecd82ce257a2cc5dae5aa323a5f"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"7b119a7ebe1ee78b14183617f30f2e8bb370585a","unresolved":false,"context_lines":[{"line_number":13,"context_line":"This patch adds the support for updating the VNIC index for the"},{"line_number":14,"context_line":"Neutron port. This is done in two places:"},{"line_number":15,"context_line":"1. When the instance is spawned"},{"line_number":16,"context_line":"2. If and when a port is attaached to a running instance"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"The Neutron support for the extension is:"},{"line_number":19,"context_line":"https://review.openstack.org/#/c/144278"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3a961159_2988616a","line":16,"in_reply_to":"3a961159_fc68eef5","updated":"2015-01-15 08:44:49.000000000","message":"Done","commit_id":"06b27045ca5a4ecd82ce257a2cc5dae5aa323a5f"}],"nova/network/base_api.py":[{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"e548907c44b4f83d254b85dcc0c667cf279c170a","unresolved":false,"context_lines":[{"line_number":343,"context_line":"        \"\"\""},{"line_number":344,"context_line":"        raise NotImplementedError()"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"    def update_instance_vnic_index(self, context, instance, vif, index):"},{"line_number":347,"context_line":"        \"\"\"Update instance vnic index."},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"        When the \u0027VNIC index\u0027 extension is supported this method will update"}],"source_content_type":"text/x-python","patch_set":18,"id":"9a41bdd9_88548454","line":346,"updated":"2015-07-18 08:57:30.000000000","message":"Could you please explain \u0027vnic\u0027 part of the function name? Why is it not \u0027port\u0027, which is a standard name for neutron related network interfaces in this module? Does it mean something other than a neutron port?","commit_id":"b4aca2f8c6e7d04e84daeef1dd3adc3a41f65534"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"9083dee85825162f8c5cd9aeb336ff4819a71212","unresolved":false,"context_lines":[{"line_number":343,"context_line":"        \"\"\""},{"line_number":344,"context_line":"        raise NotImplementedError()"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"    def update_instance_vnic_index(self, context, instance, vif, index):"},{"line_number":347,"context_line":"        \"\"\"Update instance vnic index."},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"        When the \u0027VNIC index\u0027 extension is supported this method will update"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a50d1a3_e3b4a1d2","line":346,"in_reply_to":"9a41bdd9_88548454","updated":"2015-07-19 12:00:18.000000000","message":"This is not for the port it is for the virtual nic on the instance. I will add this to the doctring","commit_id":"b4aca2f8c6e7d04e84daeef1dd3adc3a41f65534"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"e548907c44b4f83d254b85dcc0c667cf279c170a","unresolved":false,"context_lines":[{"line_number":348,"context_line":""},{"line_number":349,"context_line":"        When the \u0027VNIC index\u0027 extension is supported this method will update"},{"line_number":350,"context_line":"        the vnic index of the instance on the port."},{"line_number":351,"context_line":"        \"\"\""},{"line_number":352,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":18,"id":"9a41bdd9_c8b5ac7e","line":351,"updated":"2015-07-18 08:57:30.000000000","message":"Could you add parameters descriptions?","commit_id":"b4aca2f8c6e7d04e84daeef1dd3adc3a41f65534"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"9083dee85825162f8c5cd9aeb336ff4819a71212","unresolved":false,"context_lines":[{"line_number":348,"context_line":""},{"line_number":349,"context_line":"        When the \u0027VNIC index\u0027 extension is supported this method will update"},{"line_number":350,"context_line":"        the vnic index of the instance on the port."},{"line_number":351,"context_line":"        \"\"\""},{"line_number":352,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a50d1a3_83ca7d4e","line":351,"in_reply_to":"9a41bdd9_c8b5ac7e","updated":"2015-07-19 12:00:18.000000000","message":"Done","commit_id":"b4aca2f8c6e7d04e84daeef1dd3adc3a41f65534"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"e05f4faaa79f209e21bd3c804ad5c66a30324fff","unresolved":false,"context_lines":[{"line_number":355,"context_line":"        :param vif: The VIF in question."},{"line_number":356,"context_line":"        :param index: The index on the instance for the VIF."},{"line_number":357,"context_line":"        \"\"\""},{"line_number":358,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a50d1a3_57fa4fbe","line":358,"updated":"2015-07-28 13:30:41.000000000","message":"Thanks for this add, it makes it explicit that this is a pass by default as its optional. I think thats nicer than forcing each API to implement this by raising NotImplementedErrors here.","commit_id":"50595e3bcb54889e4382feab868c5afaed61911e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"7c70dc5822dae720b08bbcf8367512c84e4f02e3","unresolved":false,"context_lines":[{"line_number":355,"context_line":"        :param vif: The VIF in question."},{"line_number":356,"context_line":"        :param index: The index on the instance for the VIF."},{"line_number":357,"context_line":"        \"\"\""},{"line_number":358,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a50d1a3_bad29acf","line":358,"in_reply_to":"3a50d1a3_57fa4fbe","updated":"2015-07-28 15:09:24.000000000","message":"Done","commit_id":"50595e3bcb54889e4382feab868c5afaed61911e"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"7e0315ace535d133b16e08eda025c07578b1548c","unresolved":false,"context_lines":[{"line_number":355,"context_line":"        :param vif: The VIF in question."},{"line_number":356,"context_line":"        :param index: The index on the instance for the VIF."},{"line_number":357,"context_line":"        \"\"\""},{"line_number":358,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a4dcd0f_fa620016","line":358,"in_reply_to":"3a50d1a3_bad29acf","updated":"2015-08-03 16:35:43.000000000","message":"I was saying I like this approach. I didn\u0027t mean go back to what we had before, I think the current patch has gone backwards.","commit_id":"50595e3bcb54889e4382feab868c5afaed61911e"}],"nova/network/neutronv2/api.py":[{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"9893d48987aed9869bcd37ff2ccaf949f579e6fc","unresolved":false,"context_lines":[{"line_number":1566,"context_line":"        \"\"\"Create a private DNS domain with optional nova project.\"\"\""},{"line_number":1567,"context_line":"        raise NotImplementedError()"},{"line_number":1568,"context_line":""},{"line_number":1569,"context_line":"    def update_instance_vif_index(self, context, instance, vif, index):"},{"line_number":1570,"context_line":"        self._refresh_neutron_extensions_cache(context)"},{"line_number":1571,"context_line":"        if \u0027VNIC Index\u0027 in self.extensions:"},{"line_number":1572,"context_line":"            neutron \u003d get_client(context)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_3758cf30","line":1569,"updated":"2015-01-14 18:34:25.000000000","message":"nit: could be helpful to add a docstring here saying this is only for plugins that have the extension VNIC Index exposed.","commit_id":"06b27045ca5a4ecd82ce257a2cc5dae5aa323a5f"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"20a68a5bb6f252271e63f70df1f5dd1ed73d4246","unresolved":false,"context_lines":[{"line_number":1566,"context_line":"        \"\"\"Create a private DNS domain with optional nova project.\"\"\""},{"line_number":1567,"context_line":"        raise NotImplementedError()"},{"line_number":1568,"context_line":""},{"line_number":1569,"context_line":"    def update_instance_vif_index(self, context, instance, vif, index):"},{"line_number":1570,"context_line":"        self._refresh_neutron_extensions_cache(context)"},{"line_number":1571,"context_line":"        if \u0027VNIC Index\u0027 in self.extensions:"},{"line_number":1572,"context_line":"            neutron \u003d get_client(context)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_661c5678","line":1569,"in_reply_to":"3a961159_3758cf30","updated":"2015-01-15 08:44:31.000000000","message":"Done","commit_id":"06b27045ca5a4ecd82ce257a2cc5dae5aa323a5f"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"9893d48987aed9869bcd37ff2ccaf949f579e6fc","unresolved":false,"context_lines":[{"line_number":1568,"context_line":""},{"line_number":1569,"context_line":"    def update_instance_vif_index(self, context, instance, vif, index):"},{"line_number":1570,"context_line":"        self._refresh_neutron_extensions_cache(context)"},{"line_number":1571,"context_line":"        if \u0027VNIC Index\u0027 in self.extensions:"},{"line_number":1572,"context_line":"            neutron \u003d get_client(context)"},{"line_number":1573,"context_line":"            port_req_body \u003d {\u0027port\u0027: {\u0027vnic_index\u0027: index}}"},{"line_number":1574,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_7c7cfeb6","line":1571,"updated":"2015-01-14 18:34:25.000000000","message":"nit: move VNIC Index to neutronv2/constants.py like other extension constants.","commit_id":"06b27045ca5a4ecd82ce257a2cc5dae5aa323a5f"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"20a68a5bb6f252271e63f70df1f5dd1ed73d4246","unresolved":false,"context_lines":[{"line_number":1568,"context_line":""},{"line_number":1569,"context_line":"    def update_instance_vif_index(self, context, instance, vif, index):"},{"line_number":1570,"context_line":"        self._refresh_neutron_extensions_cache(context)"},{"line_number":1571,"context_line":"        if \u0027VNIC Index\u0027 in self.extensions:"},{"line_number":1572,"context_line":"            neutron \u003d get_client(context)"},{"line_number":1573,"context_line":"            port_req_body \u003d {\u0027port\u0027: {\u0027vnic_index\u0027: index}}"},{"line_number":1574,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_a957f1ff","line":1571,"in_reply_to":"3a961159_7c7cfeb6","updated":"2015-01-15 08:44:31.000000000","message":"Done","commit_id":"06b27045ca5a4ecd82ce257a2cc5dae5aa323a5f"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"0fee71fad25a7c82a0b48aa03d0583a9ba4cc7d0","unresolved":false,"context_lines":[{"line_number":1577,"context_line":"            neutron \u003d get_client(context)"},{"line_number":1578,"context_line":"            port_req_body \u003d {\u0027port\u0027: {\u0027vnic_index\u0027: index}}"},{"line_number":1579,"context_line":"            try:"},{"line_number":1580,"context_line":"                neutron.update_port(vif[\u0027id\u0027], port_req_body)"},{"line_number":1581,"context_line":"            except Exception as e:"},{"line_number":1582,"context_line":"                LOG.error(_(\u0027Unable to update instance for port %(id)s. \u0027"},{"line_number":1583,"context_line":"                            \u0027Exception: %(e)s\u0027),"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_e8f63a8f","line":1580,"updated":"2015-01-15 20:08:52.000000000","message":"sorry last question: Is it not possible to couple this with create_port() so we don\u0027t need to make two call to neutron first to create then to update? Or do we need to do it after the port is created for some reason. Sorry you probably have already explained this before.","commit_id":"04fec00bcabd5a75e43e57f30079c59d0caa37c6"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"42a275281c5ba1b51e4f39a690255f484f8c1ad9","unresolved":false,"context_lines":[{"line_number":1577,"context_line":"            neutron \u003d get_client(context)"},{"line_number":1578,"context_line":"            port_req_body \u003d {\u0027port\u0027: {\u0027vnic_index\u0027: index}}"},{"line_number":1579,"context_line":"            try:"},{"line_number":1580,"context_line":"                neutron.update_port(vif[\u0027id\u0027], port_req_body)"},{"line_number":1581,"context_line":"            except Exception as e:"},{"line_number":1582,"context_line":"                LOG.error(_(\u0027Unable to update instance for port %(id)s. \u0027"},{"line_number":1583,"context_line":"                            \u0027Exception: %(e)s\u0027),"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_75be3c01","line":1580,"in_reply_to":"3a961159_e8f63a8f","updated":"2015-01-21 16:22:52.000000000","message":"the original idea was to do this in the create port. the problem is when interfaces are attached after boot. we do not have the vnic index. the vnic does not exist when the port is created. that is only done later in the spawn process.","commit_id":"04fec00bcabd5a75e43e57f30079c59d0caa37c6"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"84275a54f2879bbe57d4d0f6204334451e719cfe","unresolved":false,"context_lines":[{"line_number":1578,"context_line":"            try:"},{"line_number":1579,"context_line":"                neutron.update_port(vif[\u0027id\u0027], port_req_body)"},{"line_number":1580,"context_line":"            except Exception as e:"},{"line_number":1581,"context_line":"                LOG.error(_(\u0027Unable to update instance for port %(id)s. \u0027"},{"line_number":1582,"context_line":"                            \u0027Exception: %(e)s\u0027),"},{"line_number":1583,"context_line":"                          {\u0027id\u0027: vif[\u0027id\u0027], \u0027e\u0027: e},"},{"line_number":1584,"context_line":"                          instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a930d6b_99e588aa","line":1581,"updated":"2015-01-22 10:17:28.000000000","message":"Please use `_LE` for `LOG.error`","commit_id":"f8d0797dae6054f59f5a8c3b545cc735fba61e88"},{"author":{"_account_id":9569,"name":"Sergey Nikitin","email":"nikitinserv@gmail.com","username":"snikitin"},"change_message_id":"fe437b03a4d811c7e7a24af72e27fc428e62249b","unresolved":false,"context_lines":[{"line_number":1589,"context_line":"            try:"},{"line_number":1590,"context_line":"                neutron.update_port(vif[\u0027id\u0027], port_req_body)"},{"line_number":1591,"context_line":"            except Exception as e:"},{"line_number":1592,"context_line":"                LOG.error(_(\u0027Unable to update instance for port %(id)s. \u0027"},{"line_number":1593,"context_line":"                            \u0027Exception: %(e)s\u0027),"},{"line_number":1594,"context_line":"                          {\u0027id\u0027: vif[\u0027id\u0027], \u0027e\u0027: e},"},{"line_number":1595,"context_line":"                          instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_2d8a5bbf","line":1592,"updated":"2015-01-23 15:53:50.000000000","message":"Here should be \n\n LOG.error(_LE(\u0027Unable*******\n\nhttp://docs.openstack.org/developer/oslo.i18n/guidelines.html","commit_id":"6d2a4cc4a2aa60baacdd4d59ae99e3bab5e82541"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"4e5583891b83fe051a93eb386c85ef14c935e57f","unresolved":false,"context_lines":[{"line_number":1695,"context_line":"                        LOG.exception(_LE(\"Unable to update host of port %s\"),"},{"line_number":1696,"context_line":"                                      p[\u0027id\u0027])"},{"line_number":1697,"context_line":""},{"line_number":1698,"context_line":"    def update_instance_vif_index(self, context, instance, vif, index):"},{"line_number":1699,"context_line":"        \"\"\"Update instance VIF index."},{"line_number":1700,"context_line":""},{"line_number":1701,"context_line":"        When the \u0027VNIC index\u0027 extension is supported this method will update"}],"source_content_type":"text/x-python","patch_set":11,"id":"3acd31a7_eb83e0ca","line":1698,"updated":"2015-05-01 23:46:12.000000000","message":"Network API uses \u0027vif\u0027 for Nova network, but \u0027port\u0027 for Neutron. E.g. get_vifs_by_instance vs list_ports. Probably the function should be renamed.","commit_id":"a21ffd439f403acc02deb70f03247ac0b9ecb05d"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"0a703992b93cbea782a17f35be8a71047a173bbc","unresolved":false,"context_lines":[{"line_number":1695,"context_line":"                        LOG.exception(_LE(\"Unable to update host of port %s\"),"},{"line_number":1696,"context_line":"                                      p[\u0027id\u0027])"},{"line_number":1697,"context_line":""},{"line_number":1698,"context_line":"    def update_instance_vif_index(self, context, instance, vif, index):"},{"line_number":1699,"context_line":"        \"\"\"Update instance VIF index."},{"line_number":1700,"context_line":""},{"line_number":1701,"context_line":"        When the \u0027VNIC index\u0027 extension is supported this method will update"}],"source_content_type":"text/x-python","patch_set":11,"id":"3acd31a7_a6b516ef","line":1698,"in_reply_to":"3acd31a7_eb83e0ca","updated":"2015-05-03 08:27:42.000000000","message":"Done","commit_id":"a21ffd439f403acc02deb70f03247ac0b9ecb05d"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a697da62e0e4e6eaea4b76490332f4b1bd0a0d63","unresolved":false,"context_lines":[{"line_number":1796,"context_line":"            port_req_body \u003d {\u0027port\u0027: {\u0027vnic_index\u0027: index}}"},{"line_number":1797,"context_line":"            try:"},{"line_number":1798,"context_line":"                neutron.update_port(vif[\u0027id\u0027], port_req_body)"},{"line_number":1799,"context_line":"            except Exception as e:"},{"line_number":1800,"context_line":"                LOG.error(_LE(\u0027Unable to update instance for port %(id)s. \u0027"},{"line_number":1801,"context_line":"                              \u0027Exception: %(e)s\u0027),"},{"line_number":1802,"context_line":"                          {\u0027id\u0027: vif[\u0027id\u0027], \u0027e\u0027: e},"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a016987_0c012238","line":1799,"updated":"2015-05-22 16:24:49.000000000","message":"Surely we can catch more specific exceptions here right?","commit_id":"89d47667413e877d2fee5b967d033c05c521bb54"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"b191a90d4c1422052867b6749ffb228761addffd","unresolved":false,"context_lines":[{"line_number":1796,"context_line":"            port_req_body \u003d {\u0027port\u0027: {\u0027vnic_index\u0027: index}}"},{"line_number":1797,"context_line":"            try:"},{"line_number":1798,"context_line":"                neutron.update_port(vif[\u0027id\u0027], port_req_body)"},{"line_number":1799,"context_line":"            except Exception as e:"},{"line_number":1800,"context_line":"                LOG.error(_LE(\u0027Unable to update instance for port %(id)s. \u0027"},{"line_number":1801,"context_line":"                              \u0027Exception: %(e)s\u0027),"},{"line_number":1802,"context_line":"                          {\u0027id\u0027: vif[\u0027id\u0027], \u0027e\u0027: e},"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a016987_4aa48149","line":1799,"in_reply_to":"7a016987_0c012238","updated":"2015-05-25 07:40:09.000000000","message":"There are no specific exceptions that we can catch here. Please see above none of the other update_port invocations catch specific exceptions.","commit_id":"89d47667413e877d2fee5b967d033c05c521bb54"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"5a221fed029a83f73520a7a4ba3af7579958ae1a","unresolved":false,"context_lines":[{"line_number":1796,"context_line":"            port_req_body \u003d {\u0027port\u0027: {\u0027vnic_index\u0027: index}}"},{"line_number":1797,"context_line":"            try:"},{"line_number":1798,"context_line":"                neutron.update_port(vif[\u0027id\u0027], port_req_body)"},{"line_number":1799,"context_line":"            except Exception as e:"},{"line_number":1800,"context_line":"                LOG.error(_LE(\u0027Unable to update instance for port %(id)s. \u0027"},{"line_number":1801,"context_line":"                              \u0027Exception: %(e)s\u0027),"},{"line_number":1802,"context_line":"                          {\u0027id\u0027: vif[\u0027id\u0027], \u0027e\u0027: e},"}],"source_content_type":"text/x-python","patch_set":14,"id":"3afb71cf_3073dd4f","line":1799,"updated":"2015-06-05 04:45:12.000000000","message":"Please use a specific exception here, not Exception.","commit_id":"cd634b203ca09ffd85889c65658b1550971927e1"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"6c0c96e2be4f07c2d870b130fc74721c670e2b72","unresolved":false,"context_lines":[{"line_number":1796,"context_line":"            port_req_body \u003d {\u0027port\u0027: {\u0027vnic_index\u0027: index}}"},{"line_number":1797,"context_line":"            try:"},{"line_number":1798,"context_line":"                neutron.update_port(vif[\u0027id\u0027], port_req_body)"},{"line_number":1799,"context_line":"            except Exception as e:"},{"line_number":1800,"context_line":"                LOG.error(_LE(\u0027Unable to update instance for port %(id)s. \u0027"},{"line_number":1801,"context_line":"                              \u0027Exception: %(e)s\u0027),"},{"line_number":1802,"context_line":"                          {\u0027id\u0027: vif[\u0027id\u0027], \u0027e\u0027: e},"}],"source_content_type":"text/x-python","patch_set":14,"id":"3afb71cf_a56d4a34","line":1799,"in_reply_to":"3afb71cf_3073dd4f","updated":"2015-06-05 09:51:26.000000000","message":"Sadly we are unable to do that as there are no specific exceptions that are caught with the port update. Please see the rest of the code above. This is something that we can try and address in another patch for the entire nova/neutron. I will look into that.","commit_id":"cd634b203ca09ffd85889c65658b1550971927e1"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"5a221fed029a83f73520a7a4ba3af7579958ae1a","unresolved":false,"context_lines":[{"line_number":1802,"context_line":"                          {\u0027id\u0027: vif[\u0027id\u0027], \u0027e\u0027: e},"},{"line_number":1803,"context_line":"                          instance\u003dinstance)"},{"line_number":1804,"context_line":"        else:"},{"line_number":1805,"context_line":"            LOG.debug(\u0027Expected extension %s not supported!\u0027,"},{"line_number":1806,"context_line":"                      constants.VNIC_INDEX_EXT)"},{"line_number":1807,"context_line":""},{"line_number":1808,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3afb71cf_d098096d","line":1805,"updated":"2015-06-05 04:45:12.000000000","message":"Perhaps this should be WARN, since this is something that really should be picked up by an operator?","commit_id":"cd634b203ca09ffd85889c65658b1550971927e1"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"6c0c96e2be4f07c2d870b130fc74721c670e2b72","unresolved":false,"context_lines":[{"line_number":1802,"context_line":"                          {\u0027id\u0027: vif[\u0027id\u0027], \u0027e\u0027: e},"},{"line_number":1803,"context_line":"                          instance\u003dinstance)"},{"line_number":1804,"context_line":"        else:"},{"line_number":1805,"context_line":"            LOG.debug(\u0027Expected extension %s not supported!\u0027,"},{"line_number":1806,"context_line":"                      constants.VNIC_INDEX_EXT)"},{"line_number":1807,"context_line":""},{"line_number":1808,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3afb71cf_856a4e19","line":1805,"in_reply_to":"3afb71cf_d098096d","updated":"2015-06-05 09:51:26.000000000","message":"Done","commit_id":"cd634b203ca09ffd85889c65658b1550971927e1"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"982a6f1a8ab1b51b42915210dd367904624b9a7e","unresolved":false,"context_lines":[{"line_number":212,"context_line":"                            region_name\u003dCONF.neutron.region_name)"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"class API(base_api.NetworkAPI):"},{"line_number":216,"context_line":"    \"\"\"API for interacting with the neutron 2.x API.\"\"\""},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"    def __init__(self, skip_policy_check\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a41bdd9_9a05d815","line":215,"updated":"2015-07-17 08:53:27.000000000","message":"Please see:\nhttps://github.com/openstack/nova/blob/master/nova/network/base_api.py#L88\n\nI think you need to update the base_api","commit_id":"26da3b94c162c1ebf742a1a709696d18e45f3377"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"77cd4af07d551ead468a0a9be145c8a244a6b006","unresolved":false,"context_lines":[{"line_number":212,"context_line":"                            region_name\u003dCONF.neutron.region_name)"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"class API(base_api.NetworkAPI):"},{"line_number":216,"context_line":"    \"\"\"API for interacting with the neutron 2.x API.\"\"\""},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"    def __init__(self, skip_policy_check\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a41bdd9_b5c9a17b","line":215,"in_reply_to":"9a41bdd9_9a05d815","updated":"2015-07-18 07:00:51.000000000","message":"Done","commit_id":"26da3b94c162c1ebf742a1a709696d18e45f3377"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"982a6f1a8ab1b51b42915210dd367904624b9a7e","unresolved":false,"context_lines":[{"line_number":1800,"context_line":"            try:"},{"line_number":1801,"context_line":"                neutron.update_port(vif[\u0027id\u0027], port_req_body)"},{"line_number":1802,"context_line":"            except Exception as e:"},{"line_number":1803,"context_line":"                LOG.error(_LE(\u0027Unable to update instance for port %(id)s. \u0027"},{"line_number":1804,"context_line":"                              \u0027Exception: %(e)s\u0027),"},{"line_number":1805,"context_line":"                          {\u0027id\u0027: vif[\u0027id\u0027], \u0027e\u0027: e},"},{"line_number":1806,"context_line":"                          instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a41bdd9_fd6e5e95","line":1803,"updated":"2015-07-17 08:53:27.000000000","message":"What is the impact of the update_port failing? Is it OK to ignore it.\n\nIf we don\u0027t raise the exception here, if feels like this should really just be a warning and not an error log?","commit_id":"26da3b94c162c1ebf742a1a709696d18e45f3377"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"77cd4af07d551ead468a0a9be145c8a244a6b006","unresolved":false,"context_lines":[{"line_number":1800,"context_line":"            try:"},{"line_number":1801,"context_line":"                neutron.update_port(vif[\u0027id\u0027], port_req_body)"},{"line_number":1802,"context_line":"            except Exception as e:"},{"line_number":1803,"context_line":"                LOG.error(_LE(\u0027Unable to update instance for port %(id)s. \u0027"},{"line_number":1804,"context_line":"                              \u0027Exception: %(e)s\u0027),"},{"line_number":1805,"context_line":"                          {\u0027id\u0027: vif[\u0027id\u0027], \u0027e\u0027: e},"},{"line_number":1806,"context_line":"                          instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a41bdd9_75c31958","line":1803,"in_reply_to":"9a41bdd9_fd6e5e95","updated":"2015-07-18 07:00:51.000000000","message":"Done","commit_id":"26da3b94c162c1ebf742a1a709696d18e45f3377"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"982a6f1a8ab1b51b42915210dd367904624b9a7e","unresolved":false,"context_lines":[{"line_number":1805,"context_line":"                          {\u0027id\u0027: vif[\u0027id\u0027], \u0027e\u0027: e},"},{"line_number":1806,"context_line":"                          instance\u003dinstance)"},{"line_number":1807,"context_line":"        else:"},{"line_number":1808,"context_line":"            LOG.warning(_LW(\u0027Expected extension %s not supported!\u0027),"},{"line_number":1809,"context_line":"                        constants.VNIC_INDEX_EXT)"},{"line_number":1810,"context_line":""},{"line_number":1811,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"9a41bdd9_5db98aeb","line":1808,"updated":"2015-07-17 08:53:27.000000000","message":"So when is this extension required, always when using VMware and neutron, I guess?","commit_id":"26da3b94c162c1ebf742a1a709696d18e45f3377"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"77cd4af07d551ead468a0a9be145c8a244a6b006","unresolved":false,"context_lines":[{"line_number":1805,"context_line":"                          {\u0027id\u0027: vif[\u0027id\u0027], \u0027e\u0027: e},"},{"line_number":1806,"context_line":"                          instance\u003dinstance)"},{"line_number":1807,"context_line":"        else:"},{"line_number":1808,"context_line":"            LOG.warning(_LW(\u0027Expected extension %s not supported!\u0027),"},{"line_number":1809,"context_line":"                        constants.VNIC_INDEX_EXT)"},{"line_number":1810,"context_line":""},{"line_number":1811,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"9a41bdd9_b590c14f","line":1808,"in_reply_to":"9a41bdd9_5db98aeb","updated":"2015-07-18 07:00:51.000000000","message":"Yes, at the moment this is only when using VMware and Neutron.\nI do not think that the warning should be here as there are other VMware networking drivers that do not use this. I was asked in a previous review to add this bu I do not think it is necessary and adds in too much noise in the logs.","commit_id":"26da3b94c162c1ebf742a1a709696d18e45f3377"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"74a6ce7a70582330310a6dbf9744809a05269e03","unresolved":false,"context_lines":[{"line_number":1805,"context_line":"                          {\u0027id\u0027: vif[\u0027id\u0027], \u0027e\u0027: e},"},{"line_number":1806,"context_line":"                          instance\u003dinstance)"},{"line_number":1807,"context_line":"        else:"},{"line_number":1808,"context_line":"            LOG.warning(_LW(\u0027Expected extension %s not supported!\u0027),"},{"line_number":1809,"context_line":"                        constants.VNIC_INDEX_EXT)"},{"line_number":1810,"context_line":""},{"line_number":1811,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"3a50d1a3_d3078f7f","line":1808,"in_reply_to":"9a41bdd9_b590c14f","updated":"2015-07-27 12:44:07.000000000","message":"debug might be cool, but yeah, warning seems to high.","commit_id":"26da3b94c162c1ebf742a1a709696d18e45f3377"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d6bb588b72ae9859cbc0997f5cbe95a0567748ac","unresolved":false,"context_lines":[{"line_number":325,"context_line":"                        instance\u003dinstance)"},{"line_number":326,"context_line":"            raise exception.PortInUse(port_id\u003dmac_address)"},{"line_number":327,"context_line":"        except neutron_client_exc.NeutronClientException:"},{"line_number":328,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":329,"context_line":"                LOG.exception(_LE(\u0027Neutron error creating port on network %s\u0027),"},{"line_number":330,"context_line":"                              network_id, instance\u003dinstance)"},{"line_number":331,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"3a50d1a3_e5e96880","line":328,"updated":"2015-07-28 13:28:05.000000000","message":"We generally re-raise exceptions, like here, rather than hide the exceptions. Although on inspection, this file is very inconsistent.","commit_id":"50595e3bcb54889e4382feab868c5afaed61911e"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d6bb588b72ae9859cbc0997f5cbe95a0567748ac","unresolved":false,"context_lines":[{"line_number":928,"context_line":"                    neutron.update_port(p[\u0027id\u0027], port_req_body)"},{"line_number":929,"context_line":"                    return self._get_instance_nw_info(context, instance)"},{"line_number":930,"context_line":"                except Exception as ex:"},{"line_number":931,"context_line":"                    msg \u003d (\"Unable to update port %(portid)s on subnet \""},{"line_number":932,"context_line":"                           \"%(subnet_id)s with failure: %(exception)s\")"},{"line_number":933,"context_line":"                    LOG.debug(msg, {\u0027portid\u0027: p[\u0027id\u0027],"},{"line_number":934,"context_line":"                                    \u0027subnet_id\u0027: subnet[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a50d1a3_05c81421","line":931,"updated":"2015-07-28 13:28:05.000000000","message":"Now this one (and a few others) do hide any exceptions, although I think in most cases they are more clean ups, than real failures, but I could be wrong.","commit_id":"50595e3bcb54889e4382feab868c5afaed61911e"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d6bb588b72ae9859cbc0997f5cbe95a0567748ac","unresolved":false,"context_lines":[{"line_number":1794,"context_line":"        the vnic index of the instance on the port."},{"line_number":1795,"context_line":"        \"\"\""},{"line_number":1796,"context_line":"        self._refresh_neutron_extensions_cache(context)"},{"line_number":1797,"context_line":"        if constants.VNIC_INDEX_EXT in self.extensions:"},{"line_number":1798,"context_line":"            neutron \u003d get_client(context)"},{"line_number":1799,"context_line":"            port_req_body \u003d {\u0027port\u0027: {\u0027vnic_index\u0027: index}}"},{"line_number":1800,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a50d1a3_052d7445","line":1797,"updated":"2015-07-28 13:28:05.000000000","message":"I was really meaning make that warning log into a debug log, but I prefer this approach to the warning log.","commit_id":"50595e3bcb54889e4382feab868c5afaed61911e"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d6bb588b72ae9859cbc0997f5cbe95a0567748ac","unresolved":false,"context_lines":[{"line_number":1799,"context_line":"            port_req_body \u003d {\u0027port\u0027: {\u0027vnic_index\u0027: index}}"},{"line_number":1800,"context_line":"            try:"},{"line_number":1801,"context_line":"                neutron.update_port(vif[\u0027id\u0027], port_req_body)"},{"line_number":1802,"context_line":"            except Exception as e:"},{"line_number":1803,"context_line":"                LOG.warning(_LW(\u0027Unable to update instance for port %(id)s. \u0027"},{"line_number":1804,"context_line":"                                \u0027Exception: %(e)s\u0027),"},{"line_number":1805,"context_line":"                            {\u0027id\u0027: vif[\u0027id\u0027], \u0027e\u0027: e},"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a50d1a3_05325410","line":1802,"updated":"2015-07-28 13:28:05.000000000","message":"I think we should re-raise this exception, so the user is aware of the problem, using excutils.save_and_reraise_exception().\n\nGiven if this fails, the instance is unable to get DHCP, it feels like raising here is the correct call.\n\nBut I can see arguments both ways, and this file is not very consistent. So I don\u0027t want to block on this.","commit_id":"50595e3bcb54889e4382feab868c5afaed61911e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"7c70dc5822dae720b08bbcf8367512c84e4f02e3","unresolved":false,"context_lines":[{"line_number":1799,"context_line":"            port_req_body \u003d {\u0027port\u0027: {\u0027vnic_index\u0027: index}}"},{"line_number":1800,"context_line":"            try:"},{"line_number":1801,"context_line":"                neutron.update_port(vif[\u0027id\u0027], port_req_body)"},{"line_number":1802,"context_line":"            except Exception as e:"},{"line_number":1803,"context_line":"                LOG.warning(_LW(\u0027Unable to update instance for port %(id)s. \u0027"},{"line_number":1804,"context_line":"                                \u0027Exception: %(e)s\u0027),"},{"line_number":1805,"context_line":"                            {\u0027id\u0027: vif[\u0027id\u0027], \u0027e\u0027: e},"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a50d1a3_01efa11e","line":1802,"in_reply_to":"3a50d1a3_05325410","updated":"2015-07-28 15:09:24.000000000","message":"Done","commit_id":"50595e3bcb54889e4382feab868c5afaed61911e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"5950c8a38f854b33f9b40fb74f0a6251f00aa269","unresolved":false,"context_lines":[{"line_number":1805,"context_line":"                neutron.update_port(vif[\u0027id\u0027], port_req_body)"},{"line_number":1806,"context_line":"            except Exception as e:"},{"line_number":1807,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":1808,"context_line":"                    LOG.exception(_LE(\u0027Unable to update instance for port \u0027"},{"line_number":1809,"context_line":"                                      \u0027%(id)s. Exception: %(e)s\u0027),"},{"line_number":1810,"context_line":"                                  {\u0027id\u0027: vif[\u0027id\u0027], \u0027e\u0027: e},"},{"line_number":1811,"context_line":"                                   instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":23,"id":"3a50d1a3_d2bb1074","line":1808,"range":{"start_line":1808,"start_character":56,"end_line":1808,"end_character":64},"updated":"2015-07-31 20:21:14.000000000","message":"Shouldn\u0027t this say \u0027Unable to update vnic index for port\u0027 instead of \u0027instance\u0027? We\u0027re updating the vnic index right?","commit_id":"9d1d021c5907cd3a70d23bad53611ebdc1f03ec9"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"b6819464e7a7c84fa9606acf9cea66a57fee4b0d","unresolved":false,"context_lines":[{"line_number":1805,"context_line":"                neutron.update_port(vif[\u0027id\u0027], port_req_body)"},{"line_number":1806,"context_line":"            except Exception as e:"},{"line_number":1807,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":1808,"context_line":"                    LOG.exception(_LE(\u0027Unable to update instance for port \u0027"},{"line_number":1809,"context_line":"                                      \u0027%(id)s. Exception: %(e)s\u0027),"},{"line_number":1810,"context_line":"                                  {\u0027id\u0027: vif[\u0027id\u0027], \u0027e\u0027: e},"},{"line_number":1811,"context_line":"                                   instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":23,"id":"1a4dcd0f_6eb6323f","line":1808,"range":{"start_line":1808,"start_character":56,"end_line":1808,"end_character":64},"in_reply_to":"1a4dcd0f_1d048613","updated":"2015-08-03 17:49:30.000000000","message":"Done","commit_id":"9d1d021c5907cd3a70d23bad53611ebdc1f03ec9"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"3745bb3611029ff7aaf34c6018a0e5a089182f88","unresolved":false,"context_lines":[{"line_number":1805,"context_line":"                neutron.update_port(vif[\u0027id\u0027], port_req_body)"},{"line_number":1806,"context_line":"            except Exception as e:"},{"line_number":1807,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":1808,"context_line":"                    LOG.exception(_LE(\u0027Unable to update instance for port \u0027"},{"line_number":1809,"context_line":"                                      \u0027%(id)s. Exception: %(e)s\u0027),"},{"line_number":1810,"context_line":"                                  {\u0027id\u0027: vif[\u0027id\u0027], \u0027e\u0027: e},"},{"line_number":1811,"context_line":"                                   instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":23,"id":"1a4dcd0f_1d048613","line":1808,"range":{"start_line":1808,"start_character":56,"end_line":1808,"end_character":64},"in_reply_to":"3a50d1a3_d2bb1074","updated":"2015-08-03 16:38:34.000000000","message":"good spot. +1\n\nSo really, I have a feeling we should not be using LOG.exception, but its locally consistent, so thats probably the correct thing here.","commit_id":"9d1d021c5907cd3a70d23bad53611ebdc1f03ec9"}],"nova/network/neutronv2/constants.py":[{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"4e5583891b83fe051a93eb386c85ef14c935e57f","unresolved":false,"context_lines":[{"line_number":16,"context_line":"QOS_QUEUE \u003d \u0027QoS Queue\u0027"},{"line_number":17,"context_line":"NET_EXTERNAL \u003d \u0027router:external\u0027"},{"line_number":18,"context_line":"PORTBINDING_EXT \u003d \u0027Port Binding\u0027"},{"line_number":19,"context_line":"VNIC_INDEX \u003d \u0027VNIC Index\u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"3acd31a7_2bc8b821","line":19,"updated":"2015-05-01 23:46:12.000000000","message":"Perhaps better is to add EXT suffix as for PORTBINDING_EXT","commit_id":"a21ffd439f403acc02deb70f03247ac0b9ecb05d"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"0a703992b93cbea782a17f35be8a71047a173bbc","unresolved":false,"context_lines":[{"line_number":16,"context_line":"QOS_QUEUE \u003d \u0027QoS Queue\u0027"},{"line_number":17,"context_line":"NET_EXTERNAL \u003d \u0027router:external\u0027"},{"line_number":18,"context_line":"PORTBINDING_EXT \u003d \u0027Port Binding\u0027"},{"line_number":19,"context_line":"VNIC_INDEX \u003d \u0027VNIC Index\u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"3acd31a7_e6a2eead","line":19,"in_reply_to":"3acd31a7_2bc8b821","updated":"2015-05-03 08:27:42.000000000","message":"Done","commit_id":"a21ffd439f403acc02deb70f03247ac0b9ecb05d"}],"nova/tests/unit/network/test_neutronv2.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"5a221fed029a83f73520a7a4ba3af7579958ae1a","unresolved":false,"context_lines":[{"line_number":3176,"context_line":"    def test_update_instance_vnic_index(self, mock_get_client,"},{"line_number":3177,"context_line":"                                        mock_refresh_extensions):"},{"line_number":3178,"context_line":"        api \u003d neutronapi.API()"},{"line_number":3179,"context_line":"        api.extensions \u003d {\u0027VNIC Index\u0027}"},{"line_number":3180,"context_line":"        mock_client \u003d mock_get_client()"},{"line_number":3181,"context_line":"        mock_client.update_port.return_value \u003d \u0027port\u0027"},{"line_number":3182,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3afb71cf_90ca914e","line":3179,"updated":"2015-06-05 04:45:12.000000000","message":"The above is not a dict:\n\n\u003e\u003e\u003e d \u003d {\u0027VNIC Index\u0027}\n\u003e\u003e\u003e d\nset([\u0027VNIC Index\u0027])\n\n\nDid you mean to do that?","commit_id":"cd634b203ca09ffd85889c65658b1550971927e1"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"6c0c96e2be4f07c2d870b130fc74721c670e2b72","unresolved":false,"context_lines":[{"line_number":3176,"context_line":"    def test_update_instance_vnic_index(self, mock_get_client,"},{"line_number":3177,"context_line":"                                        mock_refresh_extensions):"},{"line_number":3178,"context_line":"        api \u003d neutronapi.API()"},{"line_number":3179,"context_line":"        api.extensions \u003d {\u0027VNIC Index\u0027}"},{"line_number":3180,"context_line":"        mock_client \u003d mock_get_client()"},{"line_number":3181,"context_line":"        mock_client.update_port.return_value \u003d \u0027port\u0027"},{"line_number":3182,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3afb71cf_a55e6a43","line":3179,"in_reply_to":"3afb71cf_90ca914e","updated":"2015-06-05 09:51:26.000000000","message":"Yup, my bad. Thanks!","commit_id":"cd634b203ca09ffd85889c65658b1550971927e1"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"982a6f1a8ab1b51b42915210dd367904624b9a7e","unresolved":false,"context_lines":[{"line_number":2810,"context_line":"        self.context \u003d context.RequestContext("},{"line_number":2811,"context_line":"            \u0027fake-user\u0027, \u0027fake-project\u0027,"},{"line_number":2812,"context_line":"            auth_token\u003d\u0027bff4a5a6b9eb4ea2a6efec6eefb77936\u0027)"},{"line_number":2813,"context_line":"        self.instance \u003d {\u0027project_id\u0027: \u00279d049e4b60b64716978ab415e6fbd5c0\u0027,"},{"line_number":2814,"context_line":"                         \u0027uuid\u0027: str(uuid.uuid4()),"},{"line_number":2815,"context_line":"                         \u0027display_name\u0027: \u0027test_instance\u0027,"},{"line_number":2816,"context_line":"                         \u0027availability_zone\u0027: \u0027nova\u0027,"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a41bdd9_9a75d833","line":2813,"updated":"2015-07-17 08:53:27.000000000","message":"Why is that here, could it not just go into the body of the test, and should it not be an object that is created?\n\nNormally I only want to see things in setUp if they are used by all tests in the test class.","commit_id":"26da3b94c162c1ebf742a1a709696d18e45f3377"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"77cd4af07d551ead468a0a9be145c8a244a6b006","unresolved":false,"context_lines":[{"line_number":2810,"context_line":"        self.context \u003d context.RequestContext("},{"line_number":2811,"context_line":"            \u0027fake-user\u0027, \u0027fake-project\u0027,"},{"line_number":2812,"context_line":"            auth_token\u003d\u0027bff4a5a6b9eb4ea2a6efec6eefb77936\u0027)"},{"line_number":2813,"context_line":"        self.instance \u003d {\u0027project_id\u0027: \u00279d049e4b60b64716978ab415e6fbd5c0\u0027,"},{"line_number":2814,"context_line":"                         \u0027uuid\u0027: str(uuid.uuid4()),"},{"line_number":2815,"context_line":"                         \u0027display_name\u0027: \u0027test_instance\u0027,"},{"line_number":2816,"context_line":"                         \u0027availability_zone\u0027: \u0027nova\u0027,"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a41bdd9_15888d21","line":2813,"in_reply_to":"9a41bdd9_9a75d833","updated":"2015-07-18 07:00:51.000000000","message":"Done","commit_id":"26da3b94c162c1ebf742a1a709696d18e45f3377"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"982a6f1a8ab1b51b42915210dd367904624b9a7e","unresolved":false,"context_lines":[{"line_number":2819,"context_line":""},{"line_number":2820,"context_line":"    @mock.patch(\u0027oslo_concurrency.lockutils.lock\u0027)"},{"line_number":2821,"context_line":"    def test_get_instance_nw_info_locks_per_instance(self, mock_lock):"},{"line_number":2822,"context_line":"        instance \u003d objects.Instance(uuid\u003duuid.uuid4())"},{"line_number":2823,"context_line":"        api \u003d neutronapi.API()"},{"line_number":2824,"context_line":"        mock_lock.side_effect \u003d test.TestingException"},{"line_number":2825,"context_line":"        self.assertRaises(test.TestingException,"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a41bdd9_3a9dac59","line":2822,"updated":"2015-07-17 08:53:27.000000000","message":"I think you should copy this pattern here.","commit_id":"26da3b94c162c1ebf742a1a709696d18e45f3377"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"77cd4af07d551ead468a0a9be145c8a244a6b006","unresolved":false,"context_lines":[{"line_number":2819,"context_line":""},{"line_number":2820,"context_line":"    @mock.patch(\u0027oslo_concurrency.lockutils.lock\u0027)"},{"line_number":2821,"context_line":"    def test_get_instance_nw_info_locks_per_instance(self, mock_lock):"},{"line_number":2822,"context_line":"        instance \u003d objects.Instance(uuid\u003duuid.uuid4())"},{"line_number":2823,"context_line":"        api \u003d neutronapi.API()"},{"line_number":2824,"context_line":"        mock_lock.side_effect \u003d test.TestingException"},{"line_number":2825,"context_line":"        self.assertRaises(test.TestingException,"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a41bdd9_7571d943","line":2822,"in_reply_to":"9a41bdd9_3a9dac59","updated":"2015-07-18 07:00:51.000000000","message":"Done","commit_id":"26da3b94c162c1ebf742a1a709696d18e45f3377"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"5950c8a38f854b33f9b40fb74f0a6251f00aa269","unresolved":false,"context_lines":[{"line_number":3236,"context_line":"    def test_update_instance_vnic_index(self, mock_get_client,"},{"line_number":3237,"context_line":"                                        mock_refresh_extensions):"},{"line_number":3238,"context_line":"        api \u003d neutronapi.API()"},{"line_number":3239,"context_line":"        api.extensions \u003d set([\u0027VNIC Index\u0027])"},{"line_number":3240,"context_line":"        mock_client \u003d mock_get_client()"},{"line_number":3241,"context_line":"        mock_client.update_port.return_value \u003d \u0027port\u0027"},{"line_number":3242,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"3a50d1a3_2d71b944","line":3239,"range":{"start_line":3239,"start_character":30,"end_line":3239,"end_character":42},"updated":"2015-07-31 20:21:14.000000000","message":"It would probably be better to use your constants.VNIC_INDEX_EXT here?","commit_id":"9d1d021c5907cd3a70d23bad53611ebdc1f03ec9"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"b6819464e7a7c84fa9606acf9cea66a57fee4b0d","unresolved":false,"context_lines":[{"line_number":3236,"context_line":"    def test_update_instance_vnic_index(self, mock_get_client,"},{"line_number":3237,"context_line":"                                        mock_refresh_extensions):"},{"line_number":3238,"context_line":"        api \u003d neutronapi.API()"},{"line_number":3239,"context_line":"        api.extensions \u003d set([\u0027VNIC Index\u0027])"},{"line_number":3240,"context_line":"        mock_client \u003d mock_get_client()"},{"line_number":3241,"context_line":"        mock_client.update_port.return_value \u003d \u0027port\u0027"},{"line_number":3242,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"1a4dcd0f_ce7bc67a","line":3239,"range":{"start_line":3239,"start_character":30,"end_line":3239,"end_character":42},"in_reply_to":"1a4dcd0f_fa30c009","updated":"2015-08-03 17:49:30.000000000","message":"Done","commit_id":"9d1d021c5907cd3a70d23bad53611ebdc1f03ec9"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"3745bb3611029ff7aaf34c6018a0e5a089182f88","unresolved":false,"context_lines":[{"line_number":3236,"context_line":"    def test_update_instance_vnic_index(self, mock_get_client,"},{"line_number":3237,"context_line":"                                        mock_refresh_extensions):"},{"line_number":3238,"context_line":"        api \u003d neutronapi.API()"},{"line_number":3239,"context_line":"        api.extensions \u003d set([\u0027VNIC Index\u0027])"},{"line_number":3240,"context_line":"        mock_client \u003d mock_get_client()"},{"line_number":3241,"context_line":"        mock_client.update_port.return_value \u003d \u0027port\u0027"},{"line_number":3242,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"1a4dcd0f_fa30c009","line":3239,"range":{"start_line":3239,"start_character":30,"end_line":3239,"end_character":42},"in_reply_to":"3a50d1a3_2d71b944","updated":"2015-08-03 16:38:34.000000000","message":"yeah, its a nit, but +1","commit_id":"9d1d021c5907cd3a70d23bad53611ebdc1f03ec9"}],"nova/tests/unit/virt/vmwareapi/test_vmops.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"982a6f1a8ab1b51b42915210dd367904624b9a7e","unresolved":false,"context_lines":[{"line_number":2066,"context_line":"                              mock_get_network_attach_config_spec,"},{"line_number":2067,"context_line":"                              mock_reconfigure_vm):"},{"line_number":2068,"context_line":"        _network_api \u003d mock.Mock()"},{"line_number":2069,"context_line":"        self._vmops._network_api \u003d _network_api"},{"line_number":2070,"context_line":""},{"line_number":2071,"context_line":"        vif_info \u003d vif.get_vif_dict(self._session, self._cluster,"},{"line_number":2072,"context_line":"                                    \u0027VirtualE1000\u0027,"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a41bdd9_1a59c88e","line":2069,"updated":"2015-07-17 08:53:27.000000000","message":"not totally sure I like this pattern, but on close inspection this is safe, and it is neater than most of the alternatives, so I am cool with it.","commit_id":"26da3b94c162c1ebf742a1a709696d18e45f3377"}],"nova/virt/vmwareapi/vmops.py":[{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"9893d48987aed9869bcd37ff2ccaf949f579e6fc","unresolved":false,"context_lines":[{"line_number":518,"context_line":"                                                   size, vi.ii.adapter_type,"},{"line_number":519,"context_line":"                                                   filename)"},{"line_number":520,"context_line":""},{"line_number":521,"context_line":"    def _update_vnic_index(self, context, instance, network_info):"},{"line_number":522,"context_line":"        if (utils.is_neutron() and network_info and"},{"line_number":523,"context_line":"                hasattr(self._virtapi, \u0027_compute\u0027) and"},{"line_number":524,"context_line":"                hasattr(self._virtapi._compute, \u0027network_api\u0027)):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_5712bb58","line":521,"updated":"2015-01-14 18:34:25.000000000","message":"At first I thought this should go in nova/network/neutronv2/api.py but since this index thing is only needed for nsxv which is only vmware hypervisors i think keeping it here is the right place as well.","commit_id":"06b27045ca5a4ecd82ce257a2cc5dae5aa323a5f"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"20a68a5bb6f252271e63f70df1f5dd1ed73d4246","unresolved":false,"context_lines":[{"line_number":518,"context_line":"                                                   size, vi.ii.adapter_type,"},{"line_number":519,"context_line":"                                                   filename)"},{"line_number":520,"context_line":""},{"line_number":521,"context_line":"    def _update_vnic_index(self, context, instance, network_info):"},{"line_number":522,"context_line":"        if (utils.is_neutron() and network_info and"},{"line_number":523,"context_line":"                hasattr(self._virtapi, \u0027_compute\u0027) and"},{"line_number":524,"context_line":"                hasattr(self._virtapi._compute, \u0027network_api\u0027)):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_6986e966","line":521,"in_reply_to":"3a961159_5712bb58","updated":"2015-01-15 08:44:31.000000000","message":"i originally tried to add this code to the neutron api. but the problem is we are unable to differentiate when ports are assigned by spawning and when they are assigned by attaching.\n\nthis is why we need this code here","commit_id":"06b27045ca5a4ecd82ce257a2cc5dae5aa323a5f"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"9893d48987aed9869bcd37ff2ccaf949f579e6fc","unresolved":false,"context_lines":[{"line_number":612,"context_line":"                    injected_files, admin_password)"},{"line_number":613,"context_line":""},{"line_number":614,"context_line":"        # Update the Neutron VNIC index"},{"line_number":615,"context_line":"        self._update_vnic_index(context, instance, network_info)"},{"line_number":616,"context_line":""},{"line_number":617,"context_line":"        if power_on:"},{"line_number":618,"context_line":"            vm_util.power_on_instance(self._session, instance, vm_ref\u003dvm_ref)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_9cfe0a05","line":615,"updated":"2015-01-14 18:34:25.000000000","message":"Does spawn get called as well when nics are added and removed? It seems like this should go in plug_vifs() but it looks like the vmware driver doesn\u0027t implement this.","commit_id":"06b27045ca5a4ecd82ce257a2cc5dae5aa323a5f"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"20a68a5bb6f252271e63f70df1f5dd1ed73d4246","unresolved":false,"context_lines":[{"line_number":612,"context_line":"                    injected_files, admin_password)"},{"line_number":613,"context_line":""},{"line_number":614,"context_line":"        # Update the Neutron VNIC index"},{"line_number":615,"context_line":"        self._update_vnic_index(context, instance, network_info)"},{"line_number":616,"context_line":""},{"line_number":617,"context_line":"        if power_on:"},{"line_number":618,"context_line":"            vm_util.power_on_instance(self._session, instance, vm_ref\u003dvm_ref)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_699fc9b4","line":615,"in_reply_to":"3a961159_9cfe0a05","updated":"2015-01-15 08:44:31.000000000","message":"plug vifs is not called when interfaces are added. that is only invoked when a host reboots and the vifs need to all be attached to the virtual network. that is not relevant in the scope of the VMware driver","commit_id":"06b27045ca5a4ecd82ce257a2cc5dae5aa323a5f"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"4e5583891b83fe051a93eb386c85ef14c935e57f","unresolved":false,"context_lines":[{"line_number":554,"context_line":"    def _update_vnic_index(self, context, instance, network_info):"},{"line_number":555,"context_line":"        if (utils.is_neutron() and network_info and"},{"line_number":556,"context_line":"                hasattr(self._virtapi, \u0027_compute\u0027) and"},{"line_number":557,"context_line":"                hasattr(self._virtapi._compute, \u0027network_api\u0027)):"},{"line_number":558,"context_line":"            for index, vif in enumerate(network_info):"},{"line_number":559,"context_line":"                self._virtapi._compute.network_api.update_instance_vif_index("},{"line_number":560,"context_line":"                    context, instance, vif, index)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3acd31a7_ab8a88bd","line":557,"updated":"2015-05-01 23:46:12.000000000","message":"Why not to use self.compute_api.network_api? Does self.compute_api differ from self._virtapi._compute? Does a compute API object have a chance not to contain network_api member?","commit_id":"a21ffd439f403acc02deb70f03247ac0b9ecb05d"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a697da62e0e4e6eaea4b76490332f4b1bd0a0d63","unresolved":false,"context_lines":[{"line_number":556,"context_line":"    def _update_vnic_index(self, context, instance, network_info):"},{"line_number":557,"context_line":"        if (utils.is_neutron() and network_info and"},{"line_number":558,"context_line":"                hasattr(self._virtapi, \u0027_compute\u0027) and"},{"line_number":559,"context_line":"                hasattr(self._virtapi._compute, \u0027network_api\u0027)):"},{"line_number":560,"context_line":"            for index, vif in enumerate(network_info):"},{"line_number":561,"context_line":"                self._virtapi._compute.network_api.update_instance_vnic_index("},{"line_number":562,"context_line":"                    context, instance, vif, index)"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a016987_4c14ba4b","line":559,"updated":"2015-05-22 16:24:49.000000000","message":"Do you really need to get the network_api from the compute? Can\u0027t you just instantiate a new one? This feels like its breaking through a layer, which is further evidenced by the fact that it\u0027s super defensive with all the hasattr() stuff.","commit_id":"89d47667413e877d2fee5b967d033c05c521bb54"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"b191a90d4c1422052867b6749ffb228761addffd","unresolved":false,"context_lines":[{"line_number":556,"context_line":"    def _update_vnic_index(self, context, instance, network_info):"},{"line_number":557,"context_line":"        if (utils.is_neutron() and network_info and"},{"line_number":558,"context_line":"                hasattr(self._virtapi, \u0027_compute\u0027) and"},{"line_number":559,"context_line":"                hasattr(self._virtapi._compute, \u0027network_api\u0027)):"},{"line_number":560,"context_line":"            for index, vif in enumerate(network_info):"},{"line_number":561,"context_line":"                self._virtapi._compute.network_api.update_instance_vnic_index("},{"line_number":562,"context_line":"                    context, instance, vif, index)"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a016987_2a66e529","line":559,"in_reply_to":"7a016987_4c14ba4b","updated":"2015-05-25 07:40:09.000000000","message":"Done","commit_id":"89d47667413e877d2fee5b967d033c05c521bb54"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"5a221fed029a83f73520a7a4ba3af7579958ae1a","unresolved":false,"context_lines":[{"line_number":1596,"context_line":"            if self._network_api:"},{"line_number":1597,"context_line":"                context \u003d nova_context.get_admin_context()"},{"line_number":1598,"context_line":"                self._network_api.update_instance_vnic_index("},{"line_number":1599,"context_line":"                    context, instance, vif, port_index)"},{"line_number":1600,"context_line":""},{"line_number":1601,"context_line":"        LOG.debug(\"Reconfigured VM to attach interface\", instance\u003dinstance)"},{"line_number":1602,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3afb71cf_50dbf91b","line":1599,"updated":"2015-06-05 04:45:12.000000000","message":"Is there a corresponding update to *remove* the VNIC index when the interface is *detached* from the instance?","commit_id":"cd634b203ca09ffd85889c65658b1550971927e1"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"6c0c96e2be4f07c2d870b130fc74721c670e2b72","unresolved":false,"context_lines":[{"line_number":1596,"context_line":"            if self._network_api:"},{"line_number":1597,"context_line":"                context \u003d nova_context.get_admin_context()"},{"line_number":1598,"context_line":"                self._network_api.update_instance_vnic_index("},{"line_number":1599,"context_line":"                    context, instance, vif, port_index)"},{"line_number":1600,"context_line":""},{"line_number":1601,"context_line":"        LOG.debug(\"Reconfigured VM to attach interface\", instance\u003dinstance)"},{"line_number":1602,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3afb71cf_f0089e2a","line":1599,"in_reply_to":"3afb71cf_50dbf91b","updated":"2015-06-05 09:51:26.000000000","message":"When the interface is detached the VNIC is removed from the config spec. That update on the VC will purge the VNIC settings in the security groups. In addition to this if this port is used again on another instance then the update will update the port index again.\nHaving said that this will be a usability issue in neutron as someone printing the specific port will see a VINC indiex even that port is not used. I will add this support. Good catch!","commit_id":"cd634b203ca09ffd85889c65658b1550971927e1"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"982a6f1a8ab1b51b42915210dd367904624b9a7e","unresolved":false,"context_lines":[{"line_number":165,"context_line":"        self._datastore_browser_mapping \u003d {}"},{"line_number":166,"context_line":"        self._imagecache \u003d imagecache.ImageCacheManager(self._session,"},{"line_number":167,"context_line":"                                                        self._base_folder)"},{"line_number":168,"context_line":"        if utils.is_neutron():"},{"line_number":169,"context_line":"            self._network_api \u003d network.API()"},{"line_number":170,"context_line":"        else:"},{"line_number":171,"context_line":"            self._network_api \u003d None"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a41bdd9_baf8dc4a","line":168,"updated":"2015-07-17 08:53:27.000000000","message":"I don\u0027t really understand this here, the network API is meant to hide all these differences.\n\nIf you add a NoOp to the nova-network API for your method, would that not achieve the same affect?","commit_id":"26da3b94c162c1ebf742a1a709696d18e45f3377"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"77cd4af07d551ead468a0a9be145c8a244a6b006","unresolved":false,"context_lines":[{"line_number":165,"context_line":"        self._datastore_browser_mapping \u003d {}"},{"line_number":166,"context_line":"        self._imagecache \u003d imagecache.ImageCacheManager(self._session,"},{"line_number":167,"context_line":"                                                        self._base_folder)"},{"line_number":168,"context_line":"        if utils.is_neutron():"},{"line_number":169,"context_line":"            self._network_api \u003d network.API()"},{"line_number":170,"context_line":"        else:"},{"line_number":171,"context_line":"            self._network_api \u003d None"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a41bdd9_f59ba964","line":168,"in_reply_to":"9a41bdd9_baf8dc4a","updated":"2015-07-18 07:00:51.000000000","message":"Done","commit_id":"26da3b94c162c1ebf742a1a709696d18e45f3377"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"982a6f1a8ab1b51b42915210dd367904624b9a7e","unresolved":false,"context_lines":[{"line_number":1626,"context_line":"                raise exception.InterfaceAttachFailed("},{"line_number":1627,"context_line":"                        instance_uuid\u003dinstance.uuid)"},{"line_number":1628,"context_line":""},{"line_number":1629,"context_line":"            if self._network_api:"},{"line_number":1630,"context_line":"                context \u003d nova_context.get_admin_context()"},{"line_number":1631,"context_line":"                self._network_api.update_instance_vnic_index("},{"line_number":1632,"context_line":"                    context, instance, vif, port_index)"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a41bdd9_5a62f017","line":1629,"updated":"2015-07-17 08:53:27.000000000","message":"it seems odd to have this if scattered everywhere, see above comment on the nova-network network api","commit_id":"26da3b94c162c1ebf742a1a709696d18e45f3377"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"77cd4af07d551ead468a0a9be145c8a244a6b006","unresolved":false,"context_lines":[{"line_number":1626,"context_line":"                raise exception.InterfaceAttachFailed("},{"line_number":1627,"context_line":"                        instance_uuid\u003dinstance.uuid)"},{"line_number":1628,"context_line":""},{"line_number":1629,"context_line":"            if self._network_api:"},{"line_number":1630,"context_line":"                context \u003d nova_context.get_admin_context()"},{"line_number":1631,"context_line":"                self._network_api.update_instance_vnic_index("},{"line_number":1632,"context_line":"                    context, instance, vif, port_index)"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a41bdd9_35b911cc","line":1629,"in_reply_to":"9a41bdd9_5a62f017","updated":"2015-07-18 07:00:51.000000000","message":"Done","commit_id":"26da3b94c162c1ebf742a1a709696d18e45f3377"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"982a6f1a8ab1b51b42915210dd367904624b9a7e","unresolved":false,"context_lines":[{"line_number":1657,"context_line":"                        \"VM\") % vif[\u0027address\u0027]"},{"line_number":1658,"context_line":"                raise exception.NotFound(msg)"},{"line_number":1659,"context_line":""},{"line_number":1660,"context_line":"            if self._network_api:"},{"line_number":1661,"context_line":"                context \u003d nova_context.get_admin_context()"},{"line_number":1662,"context_line":"                self._network_api.update_instance_vnic_index("},{"line_number":1663,"context_line":"                    context, instance, vif, None)"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a41bdd9_5a49908d","line":1660,"updated":"2015-07-17 08:53:27.000000000","message":"as above.","commit_id":"26da3b94c162c1ebf742a1a709696d18e45f3377"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"77cd4af07d551ead468a0a9be145c8a244a6b006","unresolved":false,"context_lines":[{"line_number":1657,"context_line":"                        \"VM\") % vif[\u0027address\u0027]"},{"line_number":1658,"context_line":"                raise exception.NotFound(msg)"},{"line_number":1659,"context_line":""},{"line_number":1660,"context_line":"            if self._network_api:"},{"line_number":1661,"context_line":"                context \u003d nova_context.get_admin_context()"},{"line_number":1662,"context_line":"                self._network_api.update_instance_vnic_index("},{"line_number":1663,"context_line":"                    context, instance, vif, None)"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a41bdd9_d5af857b","line":1660,"in_reply_to":"9a41bdd9_5a49908d","updated":"2015-07-18 07:00:51.000000000","message":"Done","commit_id":"26da3b94c162c1ebf742a1a709696d18e45f3377"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"e23e3363f6e56d4c7cde9da6daa5a00aecc1920b","unresolved":false,"context_lines":[{"line_number":1627,"context_line":"                raise exception.InterfaceAttachFailed("},{"line_number":1628,"context_line":"                        instance_uuid\u003dinstance.uuid)"},{"line_number":1629,"context_line":""},{"line_number":1630,"context_line":"            context \u003d nova_context.get_admin_context()"},{"line_number":1631,"context_line":"            try:"},{"line_number":1632,"context_line":"                self._network_api.update_instance_vnic_index("},{"line_number":1633,"context_line":"                    context, instance, vif, port_index)"}],"source_content_type":"text/x-python","patch_set":22,"id":"3a50d1a3_11ffba66","line":1630,"updated":"2015-07-29 13:40:15.000000000","message":"Perhaps i missed a similar question, sorry...\n\nWhy admin context is required here? It is not required for spawn. What the difference?","commit_id":"0fb8d7f2af83880361771ec8c3ba174998128a18"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"7d497358723480fd706ac8d458e5f951d81ec637","unresolved":false,"context_lines":[{"line_number":1627,"context_line":"                raise exception.InterfaceAttachFailed("},{"line_number":1628,"context_line":"                        instance_uuid\u003dinstance.uuid)"},{"line_number":1629,"context_line":""},{"line_number":1630,"context_line":"            context \u003d nova_context.get_admin_context()"},{"line_number":1631,"context_line":"            try:"},{"line_number":1632,"context_line":"                self._network_api.update_instance_vnic_index("},{"line_number":1633,"context_line":"                    context, instance, vif, port_index)"}],"source_content_type":"text/x-python","patch_set":22,"id":"3a50d1a3_77bcee05","line":1630,"in_reply_to":"3a50d1a3_11ffba66","updated":"2015-07-29 13:56:07.000000000","message":"the method does not receive the context so we need one.\n\nThe signature is - def attach_interface(self, instance, image_meta, vif):","commit_id":"0fb8d7f2af83880361771ec8c3ba174998128a18"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"8b4f5581126a0c39311deb79b79f4a0a294f4c28","unresolved":false,"context_lines":[{"line_number":1627,"context_line":"                raise exception.InterfaceAttachFailed("},{"line_number":1628,"context_line":"                        instance_uuid\u003dinstance.uuid)"},{"line_number":1629,"context_line":""},{"line_number":1630,"context_line":"            context \u003d nova_context.get_admin_context()"},{"line_number":1631,"context_line":"            try:"},{"line_number":1632,"context_line":"                self._network_api.update_instance_vnic_index("},{"line_number":1633,"context_line":"                    context, instance, vif, port_index)"}],"source_content_type":"text/x-python","patch_set":22,"id":"3a50d1a3_57cc5234","line":1630,"in_reply_to":"3a50d1a3_77bcee05","updated":"2015-07-29 14:10:43.000000000","message":"uhh, didn\u0027t see it\n\nthank you!","commit_id":"0fb8d7f2af83880361771ec8c3ba174998128a18"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"5950c8a38f854b33f9b40fb74f0a6251f00aa269","unresolved":false,"context_lines":[{"line_number":606,"context_line":"                    self._network_api.update_instance_vnic_index("},{"line_number":607,"context_line":"                        context, instance, vif, index)"},{"line_number":608,"context_line":"                except NotImplementedError:"},{"line_number":609,"context_line":"                    pass"},{"line_number":610,"context_line":""},{"line_number":611,"context_line":"    def spawn(self, context, instance, image_meta, injected_files,"},{"line_number":612,"context_line":"              admin_password, network_info, block_device_info\u003dNone):"}],"source_content_type":"text/x-python","patch_set":23,"id":"3a50d1a3_dfda3817","line":609,"updated":"2015-07-31 20:21:14.000000000","message":"Instead of catching NotImplementedError (and having exceptions be raised abd caught potentially multi times with nova-network) can we instead check utils.is_neutron around calling _update_vnic_index? Is it possible for each vif can be a different driver?","commit_id":"9d1d021c5907cd3a70d23bad53611ebdc1f03ec9"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"b6819464e7a7c84fa9606acf9cea66a57fee4b0d","unresolved":false,"context_lines":[{"line_number":606,"context_line":"                    self._network_api.update_instance_vnic_index("},{"line_number":607,"context_line":"                        context, instance, vif, index)"},{"line_number":608,"context_line":"                except NotImplementedError:"},{"line_number":609,"context_line":"                    pass"},{"line_number":610,"context_line":""},{"line_number":611,"context_line":"    def spawn(self, context, instance, image_meta, injected_files,"},{"line_number":612,"context_line":"              admin_password, network_info, block_device_info\u003dNone):"}],"source_content_type":"text/x-python","patch_set":23,"id":"1a4dcd0f_6e9cf269","line":609,"in_reply_to":"1a4dcd0f_9a5bbc54","updated":"2015-08-03 17:49:30.000000000","message":"Done","commit_id":"9d1d021c5907cd3a70d23bad53611ebdc1f03ec9"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"3745bb3611029ff7aaf34c6018a0e5a089182f88","unresolved":false,"context_lines":[{"line_number":606,"context_line":"                    self._network_api.update_instance_vnic_index("},{"line_number":607,"context_line":"                        context, instance, vif, index)"},{"line_number":608,"context_line":"                except NotImplementedError:"},{"line_number":609,"context_line":"                    pass"},{"line_number":610,"context_line":""},{"line_number":611,"context_line":"    def spawn(self, context, instance, image_meta, injected_files,"},{"line_number":612,"context_line":"              admin_password, network_info, block_device_info\u003dNone):"}],"source_content_type":"text/x-python","patch_set":23,"id":"1a4dcd0f_9a5bbc54","line":609,"in_reply_to":"3a50d1a3_dfda3817","updated":"2015-08-03 16:38:34.000000000","message":"I liked what you had in patchset 20 here:\nhttps://review.openstack.org/#/c/147126/20/nova/network/base_api.py,cm","commit_id":"9d1d021c5907cd3a70d23bad53611ebdc1f03ec9"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"5950c8a38f854b33f9b40fb74f0a6251f00aa269","unresolved":false,"context_lines":[{"line_number":1646,"context_line":"                self._network_api.update_instance_vnic_index("},{"line_number":1647,"context_line":"                    context, instance, vif, port_index)"},{"line_number":1648,"context_line":"            except NotImplementedError:"},{"line_number":1649,"context_line":"                pass"},{"line_number":1650,"context_line":""},{"line_number":1651,"context_line":"        LOG.debug(\"Reconfigured VM to attach interface\", instance\u003dinstance)"},{"line_number":1652,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"3a50d1a3_df48f8ce","line":1649,"updated":"2015-07-31 20:21:14.000000000","message":"Same","commit_id":"9d1d021c5907cd3a70d23bad53611ebdc1f03ec9"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"b6819464e7a7c84fa9606acf9cea66a57fee4b0d","unresolved":false,"context_lines":[{"line_number":1646,"context_line":"                self._network_api.update_instance_vnic_index("},{"line_number":1647,"context_line":"                    context, instance, vif, port_index)"},{"line_number":1648,"context_line":"            except NotImplementedError:"},{"line_number":1649,"context_line":"                pass"},{"line_number":1650,"context_line":""},{"line_number":1651,"context_line":"        LOG.debug(\"Reconfigured VM to attach interface\", instance\u003dinstance)"},{"line_number":1652,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"1a4dcd0f_4e9fb65f","line":1649,"in_reply_to":"3a50d1a3_df48f8ce","updated":"2015-08-03 17:49:30.000000000","message":"Done","commit_id":"9d1d021c5907cd3a70d23bad53611ebdc1f03ec9"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"5950c8a38f854b33f9b40fb74f0a6251f00aa269","unresolved":false,"context_lines":[{"line_number":1679,"context_line":"                self._network_api.update_instance_vnic_index("},{"line_number":1680,"context_line":"                    context, instance, vif, None)"},{"line_number":1681,"context_line":"            except NotImplementedError:"},{"line_number":1682,"context_line":"                pass"},{"line_number":1683,"context_line":""},{"line_number":1684,"context_line":"            client_factory \u003d self._session.vim.client.factory"},{"line_number":1685,"context_line":"            detach_config_spec \u003d vm_util.get_network_detach_config_spec("}],"source_content_type":"text/x-python","patch_set":23,"id":"3a50d1a3_5f0b887d","line":1682,"updated":"2015-07-31 20:21:14.000000000","message":"Same","commit_id":"9d1d021c5907cd3a70d23bad53611ebdc1f03ec9"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"b6819464e7a7c84fa9606acf9cea66a57fee4b0d","unresolved":false,"context_lines":[{"line_number":1679,"context_line":"                self._network_api.update_instance_vnic_index("},{"line_number":1680,"context_line":"                    context, instance, vif, None)"},{"line_number":1681,"context_line":"            except NotImplementedError:"},{"line_number":1682,"context_line":"                pass"},{"line_number":1683,"context_line":""},{"line_number":1684,"context_line":"            client_factory \u003d self._session.vim.client.factory"},{"line_number":1685,"context_line":"            detach_config_spec \u003d vm_util.get_network_detach_config_spec("}],"source_content_type":"text/x-python","patch_set":23,"id":"1a4dcd0f_8e95be41","line":1682,"in_reply_to":"3a50d1a3_5f0b887d","updated":"2015-08-03 17:49:30.000000000","message":"Done","commit_id":"9d1d021c5907cd3a70d23bad53611ebdc1f03ec9"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"5950c8a38f854b33f9b40fb74f0a6251f00aa269","unresolved":false,"context_lines":[{"line_number":1695,"context_line":"                          e, instance\u003dinstance)"},{"line_number":1696,"context_line":"                raise exception.InterfaceDetachFailed("},{"line_number":1697,"context_line":"                        instance_uuid\u003dinstance.uuid)"},{"line_number":1698,"context_line":""},{"line_number":1699,"context_line":"        LOG.debug(\"Reconfigured VM to detach interface\", instance\u003dinstance)"},{"line_number":1700,"context_line":""},{"line_number":1701,"context_line":"    def _use_disk_image_as_full_clone(self, vm_ref, vi):"}],"source_content_type":"text/x-python","patch_set":23,"id":"3a50d1a3_7f0be424","line":1698,"updated":"2015-07-31 20:21:14.000000000","message":"Errant whitespace change","commit_id":"9d1d021c5907cd3a70d23bad53611ebdc1f03ec9"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"b6819464e7a7c84fa9606acf9cea66a57fee4b0d","unresolved":false,"context_lines":[{"line_number":1695,"context_line":"                          e, instance\u003dinstance)"},{"line_number":1696,"context_line":"                raise exception.InterfaceDetachFailed("},{"line_number":1697,"context_line":"                        instance_uuid\u003dinstance.uuid)"},{"line_number":1698,"context_line":""},{"line_number":1699,"context_line":"        LOG.debug(\"Reconfigured VM to detach interface\", instance\u003dinstance)"},{"line_number":1700,"context_line":""},{"line_number":1701,"context_line":"    def _use_disk_image_as_full_clone(self, vm_ref, vi):"}],"source_content_type":"text/x-python","patch_set":23,"id":"1a4dcd0f_ae92fa55","line":1698,"in_reply_to":"3a50d1a3_7f0be424","updated":"2015-08-03 17:49:30.000000000","message":"Done","commit_id":"9d1d021c5907cd3a70d23bad53611ebdc1f03ec9"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"714dd8ba34e29d65f2515d6150233e91f41e2580","unresolved":false,"context_lines":[{"line_number":1638,"context_line":"                raise exception.InterfaceAttachFailed("},{"line_number":1639,"context_line":"                        instance_uuid\u003dinstance.uuid)"},{"line_number":1640,"context_line":""},{"line_number":1641,"context_line":"            context \u003d nova_context.get_admin_context()"},{"line_number":1642,"context_line":"            self._network_api.update_instance_vnic_index("},{"line_number":1643,"context_line":"                context, instance, vif, port_index)"},{"line_number":1644,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"1a4dcd0f_37fe1f6c","line":1641,"updated":"2015-08-04 09:21:09.000000000","message":"part of me wants us to try pass a context all the way down here, but this is a admin operation, its not something a user should be doing, so it should probably get elevated anyways, so maybe its not worth the bother.\n\nWe can deal with that in a follow up patch, lets not block this now.","commit_id":"92bc9abd6a611ec2a81ad2a18980ea0496166ccf"}]}
