)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e501fafe90a3e08dbad845739f6bad0bbbfc0e02","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"- better use of _L* helpers"},{"line_number":13,"context_line":"- dynamically import python-ironicclient when the driver is initialized,"},{"line_number":14,"context_line":"  so that Nova does not need to add it to requirements.txt"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: Iee1481632e9927766776c7d35264e8cf4c469c8a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"baada198_9f1da565","line":14,"updated":"2014-07-22 14:48:11.000000000","message":"mention removal of \u0027pxe_bootfile_name\u0027 and \u0027instance_type_extra_specs\u0027 config options?","commit_id":"bbd44bd3b382a0e642e3047a11de59c55e7a5f49"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"397a16d05ec2068bfdfbf02a1032fa4b888fc873","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"- better use of _L* helpers"},{"line_number":13,"context_line":"- dynamically import python-ironicclient when the driver is initialized,"},{"line_number":14,"context_line":"  so that Nova does not need to add it to requirements.txt"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: Iee1481632e9927766776c7d35264e8cf4c469c8a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"baada198_27be4f01","line":14,"in_reply_to":"baada198_9f1da565","updated":"2014-07-22 15:05:54.000000000","message":"Done","commit_id":"bbd44bd3b382a0e642e3047a11de59c55e7a5f49"}],"ironic/nova/virt/ironic/client_wrapper.py":[{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"435fc596a0cf2e77bac4863b046ade976b3efca4","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        global ironic_exception"},{"line_number":43,"context_line":"        if not ironic_client:"},{"line_number":44,"context_line":"            try:"},{"line_number":45,"context_line":"                ironicclient \u003d __import__(\u0027ironicclient\u0027)"},{"line_number":46,"context_line":"                ironic_exception \u003d ironicclient.exc"},{"line_number":47,"context_line":"                ironic_client \u003d ironicclient.client"},{"line_number":48,"context_line":"            except ImportError as e:"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_ab8e4c25","line":45,"updated":"2014-07-18 04:16:22.000000000","message":"I don\u0027t love this name being so close to ironic_client. Perhaps \"ic\" or \"imported\"?","commit_id":"fda4f902c81a796b85397ea433d18cb2e43e151d"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"2fbbfd8e87f9dc92af77525fdb9d92ab571eb829","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        global ironic_exception"},{"line_number":43,"context_line":"        if not ironic_client:"},{"line_number":44,"context_line":"            try:"},{"line_number":45,"context_line":"                ironicclient \u003d __import__(\u0027ironicclient\u0027)"},{"line_number":46,"context_line":"                ironic_exception \u003d ironicclient.exc"},{"line_number":47,"context_line":"                ironic_client \u003d ironicclient.client"},{"line_number":48,"context_line":"            except ImportError as e:"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_4983f8a8","line":45,"in_reply_to":"baada198_ab8e4c25","updated":"2014-07-18 07:25:27.000000000","message":"Thanks Mikal for the review!\n\nDone.","commit_id":"fda4f902c81a796b85397ea433d18cb2e43e151d"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"435fc596a0cf2e77bac4863b046ade976b3efca4","unresolved":false,"context_lines":[{"line_number":47,"context_line":"                ironic_client \u003d ironicclient.client"},{"line_number":48,"context_line":"            except ImportError as e:"},{"line_number":49,"context_line":"                LOG.error(_LE(\u0027Could not find ironicclient: you need to \u0027"},{"line_number":50,"context_line":"                \u0027install python-ironicclient\u0027))"},{"line_number":51,"context_line":"                raise e"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def _get_client(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_8b70a841","line":50,"updated":"2014-07-18 04:16:22.000000000","message":"The indent of this line could move to the right, but its a nit.","commit_id":"fda4f902c81a796b85397ea433d18cb2e43e151d"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"2fbbfd8e87f9dc92af77525fdb9d92ab571eb829","unresolved":false,"context_lines":[{"line_number":47,"context_line":"                ironic_client \u003d ironicclient.client"},{"line_number":48,"context_line":"            except ImportError as e:"},{"line_number":49,"context_line":"                LOG.error(_LE(\u0027Could not find ironicclient: you need to \u0027"},{"line_number":50,"context_line":"                \u0027install python-ironicclient\u0027))"},{"line_number":51,"context_line":"                raise e"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def _get_client(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_09b90079","line":50,"in_reply_to":"baada198_8b70a841","updated":"2014-07-18 07:25:27.000000000","message":"Done","commit_id":"fda4f902c81a796b85397ea433d18cb2e43e151d"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"435fc596a0cf2e77bac4863b046ade976b3efca4","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            cli \u003d ironic_client.get_client(CONF.ironic.api_version, **kwargs)"},{"line_number":70,"context_line":"        except Exception as e:"},{"line_number":71,"context_line":"            if isinstance(e, ironic_exception.Unauthorized):"},{"line_number":72,"context_line":"                msg \u003d (_(\"Unable to authenticate Ironic client.\"))"},{"line_number":73,"context_line":"                LOG.error(msg)"},{"line_number":74,"context_line":"                raise exception.NovaException(msg)"},{"line_number":75,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_2ba23c9a","line":72,"updated":"2014-07-18 04:16:22.000000000","message":"msg should use _LE here.","commit_id":"fda4f902c81a796b85397ea433d18cb2e43e151d"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"2fbbfd8e87f9dc92af77525fdb9d92ab571eb829","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            cli \u003d ironic_client.get_client(CONF.ironic.api_version, **kwargs)"},{"line_number":70,"context_line":"        except Exception as e:"},{"line_number":71,"context_line":"            if isinstance(e, ironic_exception.Unauthorized):"},{"line_number":72,"context_line":"                msg \u003d (_(\"Unable to authenticate Ironic client.\"))"},{"line_number":73,"context_line":"                LOG.error(msg)"},{"line_number":74,"context_line":"                raise exception.NovaException(msg)"},{"line_number":75,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_e96ccc0a","line":72,"in_reply_to":"baada198_2ba23c9a","updated":"2014-07-18 07:25:27.000000000","message":"Done","commit_id":"fda4f902c81a796b85397ea433d18cb2e43e151d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"92a33fb8c6b84c39f86c18fe5290fb8e8a89fdff","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from ironic.nova.virt.ironic import utils"},{"line_number":21,"context_line":"from nova import exception"},{"line_number":22,"context_line":"from nova.openstack.common.gettextutils import _, _LE"},{"line_number":23,"context_line":"from nova.openstack.common import log as logging"},{"line_number":24,"context_line":"from oslo.config import cfg"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_ac3eff88","line":22,"updated":"2014-07-21 22:17:55.000000000","message":"looks like nova is using nova.i18n. And it looks like they like to do it in separate lines, so \n    from nova.i18n import _\n    from nova.i18n import _LE","commit_id":"9ca912cccb419527bb79adc833f8da6838b14b3d"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"ed749f2e673b72f6abd9db38945ff98fec0df968","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from ironic.nova.virt.ironic import utils"},{"line_number":21,"context_line":"from nova import exception"},{"line_number":22,"context_line":"from nova.openstack.common.gettextutils import _, _LE"},{"line_number":23,"context_line":"from nova.openstack.common import log as logging"},{"line_number":24,"context_line":"from oslo.config import cfg"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_6c8043c0","line":22,"in_reply_to":"baada198_ac3eff88","updated":"2014-07-22 09:33:49.000000000","message":"As discussed in the driver.py, I\u0027ll leave this as is until the merge into Nova","commit_id":"9ca912cccb419527bb79adc833f8da6838b14b3d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"92a33fb8c6b84c39f86c18fe5290fb8e8a89fdff","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"        Initialise IronicClientWrapper by loading ironicclient"},{"line_number":38,"context_line":"        dynamically so that ironicclient is not a dependency for"},{"line_number":39,"context_line":"        Nova.\"\"\""},{"line_number":40,"context_line":"        global ironic_client, ironic_exception"},{"line_number":41,"context_line":"        ironic_client, ironic_exception \u003d utils.import_ironicclient()"},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_4cfba3bd","line":39,"updated":"2014-07-21 22:17:55.000000000","message":"I thought that the \u0027\u0027\"\"\u0027 at the end of a docstring has to be on its own line. Did that change?","commit_id":"9ca912cccb419527bb79adc833f8da6838b14b3d"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"ed749f2e673b72f6abd9db38945ff98fec0df968","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"        Initialise IronicClientWrapper by loading ironicclient"},{"line_number":38,"context_line":"        dynamically so that ironicclient is not a dependency for"},{"line_number":39,"context_line":"        Nova.\"\"\""},{"line_number":40,"context_line":"        global ironic_client, ironic_exception"},{"line_number":41,"context_line":"        ironic_client, ironic_exception \u003d utils.import_ironicclient()"},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_4f5458fd","line":39,"in_reply_to":"baada198_4cfba3bd","updated":"2014-07-22 09:33:49.000000000","message":"Done","commit_id":"9ca912cccb419527bb79adc833f8da6838b14b3d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"92a33fb8c6b84c39f86c18fe5290fb8e8a89fdff","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        Initialise IronicClientWrapper by loading ironicclient"},{"line_number":38,"context_line":"        dynamically so that ironicclient is not a dependency for"},{"line_number":39,"context_line":"        Nova.\"\"\""},{"line_number":40,"context_line":"        global ironic_client, ironic_exception"},{"line_number":41,"context_line":"        ironic_client, ironic_exception \u003d utils.import_ironicclient()"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def _get_client(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_2ce2ef9f","line":40,"updated":"2014-07-21 22:17:55.000000000","message":"I\u0027m trying to figure out why you need this line. I give up. Why?","commit_id":"9ca912cccb419527bb79adc833f8da6838b14b3d"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"ed749f2e673b72f6abd9db38945ff98fec0df968","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        Initialise IronicClientWrapper by loading ironicclient"},{"line_number":38,"context_line":"        dynamically so that ironicclient is not a dependency for"},{"line_number":39,"context_line":"        Nova.\"\"\""},{"line_number":40,"context_line":"        global ironic_client, ironic_exception"},{"line_number":41,"context_line":"        ironic_client, ironic_exception \u003d utils.import_ironicclient()"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def _get_client(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_0fd4201e","line":40,"in_reply_to":"baada198_2ce2ef9f","updated":"2014-07-22 09:33:49.000000000","message":"...because we want ironic_client and ironic exception to appear the same as if we had done:\n\nfrom ironicclient import client as ironic_client\nfrom ironicclient import exc as ironic_exception\n\nA previous review comment from nova requested that ironicclient not be a dependency for nova, and this is how I\u0027ve worked around it.  I didn\u0027t want to write self.ironic_client below, but maintain the same calling convention.\n\nThoughts?","commit_id":"9ca912cccb419527bb79adc833f8da6838b14b3d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"92a33fb8c6b84c39f86c18fe5290fb8e8a89fdff","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            try:"},{"line_number":97,"context_line":"                return self._multi_getattr(client, method)(*args, **kwargs)"},{"line_number":98,"context_line":"            except retry_excs:"},{"line_number":99,"context_line":"                msg \u003d (_(\"Error contacting Ironic server for \u0027%(method)s\u0027. \""},{"line_number":100,"context_line":"                         \"Attempt %(attempt)d of %(total)d\")"},{"line_number":101,"context_line":"                       % {\u0027method\u0027: method,"},{"line_number":102,"context_line":"                          \u0027attempt\u0027: attempt,"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_8c4e9b94","line":99,"updated":"2014-07-21 22:17:55.000000000","message":"Do we want to change all the logging to use the _LX() stuff? this is a good one cuz it is _LE or _LW or _ depending on where it is used ;)","commit_id":"9ca912cccb419527bb79adc833f8da6838b14b3d"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"ed749f2e673b72f6abd9db38945ff98fec0df968","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            try:"},{"line_number":97,"context_line":"                return self._multi_getattr(client, method)(*args, **kwargs)"},{"line_number":98,"context_line":"            except retry_excs:"},{"line_number":99,"context_line":"                msg \u003d (_(\"Error contacting Ironic server for \u0027%(method)s\u0027. \""},{"line_number":100,"context_line":"                         \"Attempt %(attempt)d of %(total)d\")"},{"line_number":101,"context_line":"                       % {\u0027method\u0027: method,"},{"line_number":102,"context_line":"                          \u0027attempt\u0027: attempt,"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_3b9763ed","line":99,"in_reply_to":"baada198_8c4e9b94","updated":"2014-07-22 09:33:49.000000000","message":"I didn\u0027t want to necessarily address the change in logging, unless directed to by Nova reviewers, since it\u0027s really an unrelated change.\n\nSince this one msg is used in log warning and error cases, along with the exception, I\u0027m leaning towards leaving it at _().\n\nThis is a interesting case, f\u0027sure :)","commit_id":"9ca912cccb419527bb79adc833f8da6838b14b3d"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"1b7ca31569c104a23c681611623b722254b4a799","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        try:"},{"line_number":60,"context_line":"            cli \u003d ironic_client.get_client(CONF.ironic.api_version, **kwargs)"},{"line_number":61,"context_line":"        except ironic_exception.Unauthorized:"},{"line_number":62,"context_line":"                msg \u003d _LE(\"Unable to authenticate Ironic client.\")"},{"line_number":63,"context_line":"                LOG.error(msg)"},{"line_number":64,"context_line":"                raise exception.NovaException(msg)"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_33aa1872","line":62,"updated":"2014-07-22 13:33:28.000000000","message":"nit: redundant indent introduced","commit_id":"ca0416662f713d55675030891d9fda36c120e043"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"e2643b6d789610ab7c5eb57fb5fc7928cb530d01","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        try:"},{"line_number":60,"context_line":"            cli \u003d ironic_client.get_client(CONF.ironic.api_version, **kwargs)"},{"line_number":61,"context_line":"        except ironic_exception.Unauthorized:"},{"line_number":62,"context_line":"                msg \u003d _LE(\"Unable to authenticate Ironic client.\")"},{"line_number":63,"context_line":"                LOG.error(msg)"},{"line_number":64,"context_line":"                raise exception.NovaException(msg)"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_d9e3bd04","line":62,"in_reply_to":"baada198_33aa1872","updated":"2014-07-22 14:11:27.000000000","message":"Fixing the indent.\n\nAlso, _LE shouldn\u0027t be used here, as per\nhttp://docs.openstack.org/developer/oslo.i18n/guidelines.html#examples","commit_id":"ca0416662f713d55675030891d9fda36c120e043"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d084246486906dd5a3089bb9cb201b8c324ba13f","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from ironic.nova.virt.ironic import utils"},{"line_number":21,"context_line":"from nova import exception"},{"line_number":22,"context_line":"from nova.openstack.common.gettextutils import _, _LE"},{"line_number":23,"context_line":"from nova.openstack.common import log as logging"},{"line_number":24,"context_line":"from oslo.config import cfg"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_65be7fb0","line":22,"updated":"2014-07-22 15:30:52.000000000","message":"_LE unused in this file","commit_id":"8b6d1a5e2732998afabbdf2f609218a956f7d169"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"8746c9edd6afaa3668046936865b855554a407d0","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from ironic.nova.virt.ironic import utils"},{"line_number":21,"context_line":"from nova import exception"},{"line_number":22,"context_line":"from nova.openstack.common.gettextutils import _, _LE"},{"line_number":23,"context_line":"from nova.openstack.common import log as logging"},{"line_number":24,"context_line":"from oslo.config import cfg"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_45908996","line":22,"in_reply_to":"baada198_65be7fb0","updated":"2014-07-22 22:37:31.000000000","message":"Done","commit_id":"8b6d1a5e2732998afabbdf2f609218a956f7d169"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"19096c68baabe3bcd4a24975782d8da7fd64280c","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from oslo.config import cfg"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"ironic \u003d None"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":29,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_e7d269d0","line":26,"updated":"2014-07-23 09:04:23.000000000","message":"I saw ur comment about import utils, but I don\u0027t think we were using that correctly on the previous patch-sets, what about? \n\n ironic \u003d importutils.try_import(\u0027ironicclient\u0027)                                       \n if ironic:                                                                      \n     from ironicclient import client as ironic_client\n     from ironicclient import exc as ironic_exception\n\nWe do similar things for drivers in Ironic, take a look at the seamicro, ilo or pyghmi driver in our tree.","commit_id":"504d816013d5b453fe645c68320e8ba9cf08318f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"75bb37df61b2f18a71a68fbf0997e34a321e508d","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from oslo.config import cfg"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"ironic \u003d None"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":29,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_1dfb2c49","line":26,"in_reply_to":"baada198_e7d269d0","updated":"2014-07-23 09:48:54.000000000","message":"+1","commit_id":"504d816013d5b453fe645c68320e8ba9cf08318f"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"ffe2bb827122b5391b58427c58384c523122c949","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        global ironic"},{"line_number":44,"context_line":"        if ironic is None:"},{"line_number":45,"context_line":"            ironic \u003d importutils.import_module(\u0027ironicclient\u0027)"},{"line_number":46,"context_line":"            # NOTE(deva): work around a lack of symbols in the current version. "},{"line_number":47,"context_line":"            if ironic.__dict__.get(\u0027exc\u0027) is None:"},{"line_number":48,"context_line":"                ironic.exc \u003d importutils.import_module(\u0027ironicclient.exc\u0027)"},{"line_number":49,"context_line":"                ironic.client \u003d importutils.import_module("}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_26937801","line":46,"updated":"2014-07-23 14:19:00.000000000","message":"pep8 W291 trailing whitespace","commit_id":"689dc76d83bfd7a527d7500acad28a101083dbc6"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"ffe2bb827122b5391b58427c58384c523122c949","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        if ironic is None:"},{"line_number":45,"context_line":"            ironic \u003d importutils.import_module(\u0027ironicclient\u0027)"},{"line_number":46,"context_line":"            # NOTE(deva): work around a lack of symbols in the current version. "},{"line_number":47,"context_line":"            if ironic.__dict__.get(\u0027exc\u0027) is None:"},{"line_number":48,"context_line":"                ironic.exc \u003d importutils.import_module(\u0027ironicclient.exc\u0027)"},{"line_number":49,"context_line":"                ironic.client \u003d importutils.import_module("},{"line_number":50,"context_line":"                                                    \u0027ironicclient.client\u0027)"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_a6adc834","line":47,"updated":"2014-07-23 14:19:00.000000000","message":"Cosmetic suggestion:\n\n if not hasattr(ironic, \u0027exc\u0027):\n    ...","commit_id":"689dc76d83bfd7a527d7500acad28a101083dbc6"}],"ironic/nova/virt/ironic/driver.py":[{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"435fc596a0cf2e77bac4863b046ade976b3efca4","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        return power_state.NOSTATE"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"def _import_ironic_exception():"},{"line_number":113,"context_line":"    \"\"\"Import ironicclient.exc dynamically."},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    Import ironicclient dynamically to get access to ironicclient.exc,"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_6bc35438","line":112,"updated":"2014-07-18 04:16:22.000000000","message":"I do like this being a helper. Perhaps pull it out into a util file and then call it from the client wrapper as well?","commit_id":"fda4f902c81a796b85397ea433d18cb2e43e151d"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"2fbbfd8e87f9dc92af77525fdb9d92ab571eb829","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        return power_state.NOSTATE"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"def _import_ironic_exception():"},{"line_number":113,"context_line":"    \"\"\"Import ironicclient.exc dynamically."},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    Import ironicclient dynamically to get access to ironicclient.exc,"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_3fd512b7","line":112,"in_reply_to":"baada198_6bc35438","updated":"2014-07-18 07:25:27.000000000","message":"I\u0027ve pulled this out to a new \u0027utils\u0027 module","commit_id":"fda4f902c81a796b85397ea433d18cb2e43e151d"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"435fc596a0cf2e77bac4863b046ade976b3efca4","unresolved":false,"context_lines":[{"line_number":118,"context_line":"    global ironic_exception"},{"line_number":119,"context_line":"    if not ironic_exception:"},{"line_number":120,"context_line":"        try:"},{"line_number":121,"context_line":"            ironic_exception \u003d __import__(\u0027ironicclient\u0027).exc"},{"line_number":122,"context_line":"        except ImportError as e:"},{"line_number":123,"context_line":"            LOG.error(_LE(\u0027Could not find ironicclient: you need to \u0027"},{"line_number":124,"context_line":"                \u0027install python-ironicclient\u0027))"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_8ba7c8a6","line":121,"updated":"2014-07-18 04:16:22.000000000","message":"I feel a bit like this should setup ironic_client if its not already setup as well.","commit_id":"fda4f902c81a796b85397ea433d18cb2e43e151d"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"2fbbfd8e87f9dc92af77525fdb9d92ab571eb829","unresolved":false,"context_lines":[{"line_number":118,"context_line":"    global ironic_exception"},{"line_number":119,"context_line":"    if not ironic_exception:"},{"line_number":120,"context_line":"        try:"},{"line_number":121,"context_line":"            ironic_exception \u003d __import__(\u0027ironicclient\u0027).exc"},{"line_number":122,"context_line":"        except ImportError as e:"},{"line_number":123,"context_line":"            LOG.error(_LE(\u0027Could not find ironicclient: you need to \u0027"},{"line_number":124,"context_line":"                \u0027install python-ironicclient\u0027))"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_8900b003","line":121,"in_reply_to":"baada198_8ba7c8a6","updated":"2014-07-18 07:25:27.000000000","message":"ironic_client is not used in this file, only ironic_exception, but since we\u0027re going to a utils model, it\u0027ll get covered.","commit_id":"fda4f902c81a796b85397ea433d18cb2e43e151d"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"435fc596a0cf2e77bac4863b046ade976b3efca4","unresolved":false,"context_lines":[{"line_number":121,"context_line":"            ironic_exception \u003d __import__(\u0027ironicclient\u0027).exc"},{"line_number":122,"context_line":"        except ImportError as e:"},{"line_number":123,"context_line":"            LOG.error(_LE(\u0027Could not find ironicclient: you need to \u0027"},{"line_number":124,"context_line":"                \u0027install python-ironicclient\u0027))"},{"line_number":125,"context_line":"            raise e"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_cbb8e0c9","line":124,"updated":"2014-07-18 04:16:22.000000000","message":"Indent.","commit_id":"fda4f902c81a796b85397ea433d18cb2e43e151d"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"2fbbfd8e87f9dc92af77525fdb9d92ab571eb829","unresolved":false,"context_lines":[{"line_number":121,"context_line":"            ironic_exception \u003d __import__(\u0027ironicclient\u0027).exc"},{"line_number":122,"context_line":"        except ImportError as e:"},{"line_number":123,"context_line":"            LOG.error(_LE(\u0027Could not find ironicclient: you need to \u0027"},{"line_number":124,"context_line":"                \u0027install python-ironicclient\u0027))"},{"line_number":125,"context_line":"            raise e"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_e425d15c","line":124,"in_reply_to":"baada198_cbb8e0c9","updated":"2014-07-18 07:25:27.000000000","message":"Done","commit_id":"fda4f902c81a796b85397ea433d18cb2e43e151d"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"435fc596a0cf2e77bac4863b046ade976b3efca4","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        return icli.call(\"node.get_by_instance_uuid\", instance[\u0027uuid\u0027])"},{"line_number":142,"context_line":"    except Exception as e:"},{"line_number":143,"context_line":"        if isinstance(e, ironic_exception.NotFound):"},{"line_number":144,"context_line":"            raise exception.InstanceNotFound(instance_id\u003dinstance[\u0027uuid\u0027])"},{"line_number":145,"context_line":"        else:"},{"line_number":146,"context_line":"            raise e"},{"line_number":147,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_0bead8ab","line":144,"updated":"2014-07-18 04:16:22.000000000","message":"Why the isinstance here instead of catching the more specific exception above?","commit_id":"fda4f902c81a796b85397ea433d18cb2e43e151d"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"2fbbfd8e87f9dc92af77525fdb9d92ab571eb829","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        return icli.call(\"node.get_by_instance_uuid\", instance[\u0027uuid\u0027])"},{"line_number":142,"context_line":"    except Exception as e:"},{"line_number":143,"context_line":"        if isinstance(e, ironic_exception.NotFound):"},{"line_number":144,"context_line":"            raise exception.InstanceNotFound(instance_id\u003dinstance[\u0027uuid\u0027])"},{"line_number":145,"context_line":"        else:"},{"line_number":146,"context_line":"            raise e"},{"line_number":147,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_641c616b","line":144,"in_reply_to":"baada198_0bead8ab","updated":"2014-07-18 07:25:27.000000000","message":"Thanks, I\u0027ve changed the code.\n\n(Back story:Testing was showing that I couldn\u0027t except on a variable, when in fact the problem was a corrupted tox env.  Mea culpa)","commit_id":"fda4f902c81a796b85397ea433d18cb2e43e151d"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"435fc596a0cf2e77bac4863b046ade976b3efca4","unresolved":false,"context_lines":[{"line_number":298,"context_line":"        try:"},{"line_number":299,"context_line":"            icli.call(\u0027node.update\u0027, node.uuid, patch)"},{"line_number":300,"context_line":"        except Exception as e:"},{"line_number":301,"context_line":"            if isinstance(e, ironic_exception.BadRequest):"},{"line_number":302,"context_line":"                msg \u003d (_(\"Failed to add deploy parameters on node %(node)s \""},{"line_number":303,"context_line":"                         \"when provisioning the instance %(instance)s\")"},{"line_number":304,"context_line":"                       % {\u0027node\u0027: node.uuid, \u0027instance\u0027: instance[\u0027uuid\u0027]})"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_6bda7418","line":301,"updated":"2014-07-18 04:16:22.000000000","message":"Ditto","commit_id":"fda4f902c81a796b85397ea433d18cb2e43e151d"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"2fbbfd8e87f9dc92af77525fdb9d92ab571eb829","unresolved":false,"context_lines":[{"line_number":298,"context_line":"        try:"},{"line_number":299,"context_line":"            icli.call(\u0027node.update\u0027, node.uuid, patch)"},{"line_number":300,"context_line":"        except Exception as e:"},{"line_number":301,"context_line":"            if isinstance(e, ironic_exception.BadRequest):"},{"line_number":302,"context_line":"                msg \u003d (_(\"Failed to add deploy parameters on node %(node)s \""},{"line_number":303,"context_line":"                         \"when provisioning the instance %(instance)s\")"},{"line_number":304,"context_line":"                       % {\u0027node\u0027: node.uuid, \u0027instance\u0027: instance[\u0027uuid\u0027]})"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_e48231c7","line":301,"in_reply_to":"baada198_6bda7418","updated":"2014-07-18 07:25:27.000000000","message":"Done","commit_id":"fda4f902c81a796b85397ea433d18cb2e43e151d"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"435fc596a0cf2e77bac4863b046ade976b3efca4","unresolved":false,"context_lines":[{"line_number":321,"context_line":"        try:"},{"line_number":322,"context_line":"            icli.call(\u0027node.update\u0027, node.uuid, patch)"},{"line_number":323,"context_line":"        except Exception as e:"},{"line_number":324,"context_line":"            if isinstance(e, ironic_exception.BadRequest):"},{"line_number":325,"context_line":"                msg \u003d (_(\"Failed clean up the parameters on node %(node)s \""},{"line_number":326,"context_line":"                         \"when unprovisioning the instance %(instance)s\")"},{"line_number":327,"context_line":"                       % {\u0027node\u0027: node.uuid, \u0027instance\u0027: instance[\u0027uuid\u0027]})"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_2bf79c8d","line":324,"updated":"2014-07-18 04:16:22.000000000","message":"Ditto","commit_id":"fda4f902c81a796b85397ea433d18cb2e43e151d"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"2fbbfd8e87f9dc92af77525fdb9d92ab571eb829","unresolved":false,"context_lines":[{"line_number":321,"context_line":"        try:"},{"line_number":322,"context_line":"            icli.call(\u0027node.update\u0027, node.uuid, patch)"},{"line_number":323,"context_line":"        except Exception as e:"},{"line_number":324,"context_line":"            if isinstance(e, ironic_exception.BadRequest):"},{"line_number":325,"context_line":"                msg \u003d (_(\"Failed clean up the parameters on node %(node)s \""},{"line_number":326,"context_line":"                         \"when unprovisioning the instance %(instance)s\")"},{"line_number":327,"context_line":"                       % {\u0027node\u0027: node.uuid, \u0027instance\u0027: instance[\u0027uuid\u0027]})"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_841a55c4","line":324,"in_reply_to":"baada198_2bf79c8d","updated":"2014-07-18 07:25:27.000000000","message":"Done","commit_id":"fda4f902c81a796b85397ea433d18cb2e43e151d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"92a33fb8c6b84c39f86c18fe5290fb8e8a89fdff","unresolved":false,"context_lines":[{"line_number":35,"context_line":"from nova.objects import flavor as flavor_obj"},{"line_number":36,"context_line":"from nova.objects import instance as instance_obj"},{"line_number":37,"context_line":"from nova.openstack.common import excutils"},{"line_number":38,"context_line":"from nova.openstack.common.gettextutils import _, _LE, _LW"},{"line_number":39,"context_line":"from nova.openstack.common import jsonutils"},{"line_number":40,"context_line":"from nova.openstack.common import log as logging"},{"line_number":41,"context_line":"from nova.openstack.common import loopingcall"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_0c852bac","line":38,"updated":"2014-07-21 22:17:55.000000000","message":"ditto about nova.i18n.","commit_id":"9ca912cccb419527bb79adc833f8da6838b14b3d"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"ed749f2e673b72f6abd9db38945ff98fec0df968","unresolved":false,"context_lines":[{"line_number":35,"context_line":"from nova.objects import flavor as flavor_obj"},{"line_number":36,"context_line":"from nova.objects import instance as instance_obj"},{"line_number":37,"context_line":"from nova.openstack.common import excutils"},{"line_number":38,"context_line":"from nova.openstack.common.gettextutils import _, _LE, _LW"},{"line_number":39,"context_line":"from nova.openstack.common import jsonutils"},{"line_number":40,"context_line":"from nova.openstack.common import log as logging"},{"line_number":41,"context_line":"from nova.openstack.common import loopingcall"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_5b0fb739","line":38,"in_reply_to":"baada198_0c852bac","updated":"2014-07-22 09:33:49.000000000","message":"As mentioned elsewhere - deferred","commit_id":"9ca912cccb419527bb79adc833f8da6838b14b3d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"92a33fb8c6b84c39f86c18fe5290fb8e8a89fdff","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    try:"},{"line_number":106,"context_line":"        return _POWER_STATE_MAP[state]"},{"line_number":107,"context_line":"    except KeyError:"},{"line_number":108,"context_line":"        LOG.warning(_LW(\"Power state %s not found.\") % state)"},{"line_number":109,"context_line":"        return power_state.NOSTATE"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_8f03ed0b","line":108,"updated":"2014-07-21 22:17:55.000000000","message":"Don\u0027t know if nova is fussy about using interpolation or not. Should we change to use \u0027,\u0027 instead of \u0027%\u0027?","commit_id":"9ca912cccb419527bb79adc833f8da6838b14b3d"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"ed749f2e673b72f6abd9db38945ff98fec0df968","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    try:"},{"line_number":106,"context_line":"        return _POWER_STATE_MAP[state]"},{"line_number":107,"context_line":"    except KeyError:"},{"line_number":108,"context_line":"        LOG.warning(_LW(\"Power state %s not found.\") % state)"},{"line_number":109,"context_line":"        return power_state.NOSTATE"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_1e5d2d7d","line":108,"in_reply_to":"baada198_8f03ed0b","updated":"2014-07-22 09:33:49.000000000","message":"\u0027something about unrelated change\u0027 :-)\n\nI think I\u0027ve caught them all.","commit_id":"9ca912cccb419527bb79adc833f8da6838b14b3d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"92a33fb8c6b84c39f86c18fe5290fb8e8a89fdff","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    \"\"\""},{"line_number":123,"context_line":"    global ironic_client"},{"line_number":124,"context_line":"    global ironic_exception"},{"line_number":125,"context_line":"    ironic_client, ironic_exception \u003d utils.import_ironicclient()"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_2f1ae16e","line":124,"updated":"2014-07-21 22:17:55.000000000","message":"Why do we need this?","commit_id":"9ca912cccb419527bb79adc833f8da6838b14b3d"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"ed749f2e673b72f6abd9db38945ff98fec0df968","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    \"\"\""},{"line_number":123,"context_line":"    global ironic_client"},{"line_number":124,"context_line":"    global ironic_exception"},{"line_number":125,"context_line":"    ironic_client, ironic_exception \u003d utils.import_ironicclient()"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_feb7991f","line":124,"in_reply_to":"baada198_2f1ae16e","updated":"2014-07-22 09:33:49.000000000","message":"As mentioned in the client_wrapper, this is to replace the import statements that were originally in this file to bring in ironicclient and present these imports as global scope.","commit_id":"9ca912cccb419527bb79adc833f8da6838b14b3d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"92a33fb8c6b84c39f86c18fe5290fb8e8a89fdff","unresolved":false,"context_lines":[{"line_number":159,"context_line":"        super(IronicDriver, self).__init__(virtapi)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        global ironic_client"},{"line_number":162,"context_line":"        global ironic_exception"},{"line_number":163,"context_line":"        ironic_client, ironic_exception \u003d utils.import_ironicclient()"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        self.firewall_driver \u003d firewall.load_driver(default\u003d_FIREWALL_DRIVER)"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_8f2a0d7c","line":162,"updated":"2014-07-21 22:17:55.000000000","message":"ditto.","commit_id":"9ca912cccb419527bb79adc833f8da6838b14b3d"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"ed749f2e673b72f6abd9db38945ff98fec0df968","unresolved":false,"context_lines":[{"line_number":159,"context_line":"        super(IronicDriver, self).__init__(virtapi)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        global ironic_client"},{"line_number":162,"context_line":"        global ironic_exception"},{"line_number":163,"context_line":"        ironic_client, ironic_exception \u003d utils.import_ironicclient()"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        self.firewall_driver \u003d firewall.load_driver(default\u003d_FIREWALL_DRIVER)"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_7e438913","line":162,"in_reply_to":"baada198_8f2a0d7c","updated":"2014-07-22 09:33:49.000000000","message":"ditto :)\n\nThe reason we need both is not to assume anything about the calling pattern of classes and methods in this file.  No matter which order they are invoked, we want the first invocation to __import__(\u0027ironicclient\u0027) via the utils.import_ironicclient() function.","commit_id":"9ca912cccb419527bb79adc833f8da6838b14b3d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"92a33fb8c6b84c39f86c18fe5290fb8e8a89fdff","unresolved":false,"context_lines":[{"line_number":304,"context_line":"        try:"},{"line_number":305,"context_line":"            icli.call(\u0027node.update\u0027, node.uuid, patch)"},{"line_number":306,"context_line":"        except ironic_exception.BadRequest:"},{"line_number":307,"context_line":"            msg \u003d (_LE(\"Failed clean up the parameters on node %(node)s \""},{"line_number":308,"context_line":"                       \"when unprovisioning the instance %(instance)s\")"},{"line_number":309,"context_line":"                   % {\u0027node\u0027: node.uuid, \u0027instance\u0027: instance[\u0027uuid\u0027]})"},{"line_number":310,"context_line":"            LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_8fedad27","line":307,"updated":"2014-07-21 22:17:55.000000000","message":"\u0027Failed to clean up ...\u0027?","commit_id":"9ca912cccb419527bb79adc833f8da6838b14b3d"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"ed749f2e673b72f6abd9db38945ff98fec0df968","unresolved":false,"context_lines":[{"line_number":304,"context_line":"        try:"},{"line_number":305,"context_line":"            icli.call(\u0027node.update\u0027, node.uuid, patch)"},{"line_number":306,"context_line":"        except ironic_exception.BadRequest:"},{"line_number":307,"context_line":"            msg \u003d (_LE(\"Failed clean up the parameters on node %(node)s \""},{"line_number":308,"context_line":"                       \"when unprovisioning the instance %(instance)s\")"},{"line_number":309,"context_line":"                   % {\u0027node\u0027: node.uuid, \u0027instance\u0027: instance[\u0027uuid\u0027]})"},{"line_number":310,"context_line":"            LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_deed75f2","line":307,"in_reply_to":"baada198_8fedad27","updated":"2014-07-22 09:33:49.000000000","message":"Done","commit_id":"9ca912cccb419527bb79adc833f8da6838b14b3d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"92a33fb8c6b84c39f86c18fe5290fb8e8a89fdff","unresolved":false,"context_lines":[{"line_number":550,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":551,"context_line":"                LOG.error(_LE(\"Error preparing deploy for instance \""},{"line_number":552,"context_line":"                              \"%(instance)s on baremetal node %(node)s.\")"},{"line_number":553,"context_line":"                          % {\u0027instance\u0027: instance[\u0027uuid\u0027],"},{"line_number":554,"context_line":"                             \u0027node\u0027: node_uuid})"},{"line_number":555,"context_line":"                self._cleanup_deploy(node, instance, network_info)"},{"line_number":556,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_0fc0bd7a","line":553,"updated":"2014-07-21 22:17:55.000000000","message":"use \u0027,\u0027 instead of \u0027%\u0027? Looks like there are other places too -- if you feel like searching/fixing.","commit_id":"9ca912cccb419527bb79adc833f8da6838b14b3d"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"ed749f2e673b72f6abd9db38945ff98fec0df968","unresolved":false,"context_lines":[{"line_number":550,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":551,"context_line":"                LOG.error(_LE(\"Error preparing deploy for instance \""},{"line_number":552,"context_line":"                              \"%(instance)s on baremetal node %(node)s.\")"},{"line_number":553,"context_line":"                          % {\u0027instance\u0027: instance[\u0027uuid\u0027],"},{"line_number":554,"context_line":"                             \u0027node\u0027: node_uuid})"},{"line_number":555,"context_line":"                self._cleanup_deploy(node, instance, network_info)"},{"line_number":556,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_de4ad5ac","line":553,"in_reply_to":"baada198_0fc0bd7a","updated":"2014-07-22 09:33:49.000000000","message":"Done","commit_id":"9ca912cccb419527bb79adc833f8da6838b14b3d"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"e2643b6d789610ab7c5eb57fb5fc7928cb530d01","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    cfg.StrOpt(\u0027client_log_level\u0027,"},{"line_number":63,"context_line":"               help\u003d\u0027Log level override for ironicclient. Set this in \u0027"},{"line_number":64,"context_line":"                    \u0027order to override the global \"default_log_levels\", \u0027"},{"line_number":65,"context_line":"                    \u0027\"verbose\", and \"debug\" settings.\u0027),"},{"line_number":66,"context_line":"    cfg.StrOpt(\u0027pxe_bootfile_name\u0027,"},{"line_number":67,"context_line":"               help\u003d\u0027This gets passed to Neutron as the bootfile dhcp \u0027"},{"line_number":68,"context_line":"               \u0027parameter when the dhcp_options_enabled is set.\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_f944011b","line":65,"updated":"2014-07-22 14:11:27.000000000","message":"removing this per Dan Smith\u0027s comments","commit_id":"ca0416662f713d55675030891d9fda36c120e043"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"e2643b6d789610ab7c5eb57fb5fc7928cb530d01","unresolved":false,"context_lines":[{"line_number":68,"context_line":"               \u0027parameter when the dhcp_options_enabled is set.\u0027,"},{"line_number":69,"context_line":"               default\u003d\u0027pxelinux.0\u0027),"},{"line_number":70,"context_line":"    cfg.StrOpt(\u0027admin_tenant_name\u0027,"},{"line_number":71,"context_line":"               help\u003d\u0027Ironic keystone tenant name.\u0027),"},{"line_number":72,"context_line":"    cfg.ListOpt(\u0027instance_type_extra_specs\u0027,"},{"line_number":73,"context_line":"                default\u003d[],"},{"line_number":74,"context_line":"                help\u003d\u0027A list of additional capabilities corresponding to \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_195295de","line":71,"updated":"2014-07-22 14:11:27.000000000","message":"and this","commit_id":"ca0416662f713d55675030891d9fda36c120e043"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"e2643b6d789610ab7c5eb57fb5fc7928cb530d01","unresolved":false,"context_lines":[{"line_number":122,"context_line":"    \"\"\""},{"line_number":123,"context_line":"    global ironic_client"},{"line_number":124,"context_line":"    global ironic_exception"},{"line_number":125,"context_line":"    ironic_client, ironic_exception \u003d utils.import_ironicclient()"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    try:"},{"line_number":128,"context_line":"        return icli.call(\"node.get_by_instance_uuid\", instance[\u0027uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_998065c1","line":125,"updated":"2014-07-22 14:11:27.000000000","message":"We only access ironic_exception within this function, and it should already have been imported","commit_id":"ca0416662f713d55675030891d9fda36c120e043"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"9f936ebad86b964c91c3f618567e0fb4c33e09c3","unresolved":false,"context_lines":[{"line_number":122,"context_line":"    \"\"\""},{"line_number":123,"context_line":"    global ironic_client"},{"line_number":124,"context_line":"    global ironic_exception"},{"line_number":125,"context_line":"    ironic_client, ironic_exception \u003d utils.import_ironicclient()"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    try:"},{"line_number":128,"context_line":"        return icli.call(\"node.get_by_instance_uuid\", instance[\u0027uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_8ab3a2eb","line":125,"in_reply_to":"baada198_67a4c74b","updated":"2014-07-22 15:17:04.000000000","message":"D\u0027oh. Thx.","commit_id":"ca0416662f713d55675030891d9fda36c120e043"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"b4280a303f65383d5d35529154bb91eeb7ec31e6","unresolved":false,"context_lines":[{"line_number":122,"context_line":"    \"\"\""},{"line_number":123,"context_line":"    global ironic_client"},{"line_number":124,"context_line":"    global ironic_exception"},{"line_number":125,"context_line":"    ironic_client, ironic_exception \u003d utils.import_ironicclient()"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    try:"},{"line_number":128,"context_line":"        return icli.call(\"node.get_by_instance_uuid\", instance[\u0027uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_67a4c74b","line":125,"in_reply_to":"baada198_71ec85bc","updated":"2014-07-22 15:10:54.000000000","message":"This requires being passed an active ironic_client object -- see the \"icli\" parameter.","commit_id":"ca0416662f713d55675030891d9fda36c120e043"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"5923a0c79076e3db3d62b2664676e75004aba9d5","unresolved":false,"context_lines":[{"line_number":122,"context_line":"    \"\"\""},{"line_number":123,"context_line":"    global ironic_client"},{"line_number":124,"context_line":"    global ironic_exception"},{"line_number":125,"context_line":"    ironic_client, ironic_exception \u003d utils.import_ironicclient()"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    try:"},{"line_number":128,"context_line":"        return icli.call(\"node.get_by_instance_uuid\", instance[\u0027uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_71ec85bc","line":125,"in_reply_to":"baada198_998065c1","updated":"2014-07-22 14:47:05.000000000","message":"How do you know that it would have been already imported since this is outside the class where it is imported. It could be called first?","commit_id":"ca0416662f713d55675030891d9fda36c120e043"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"1b7ca31569c104a23c681611623b722254b4a799","unresolved":false,"context_lines":[{"line_number":333,"context_line":""},{"line_number":334,"context_line":"        if node.provision_state \u003d\u003d ironic_states.DEPLOYFAIL:"},{"line_number":335,"context_line":"            # ironic failed to deploy"},{"line_number":336,"context_line":"            msg \u003d (_(\"Failed to provision instance %(inst)s: %(reason)s\"),"},{"line_number":337,"context_line":"                    {\u0027inst\u0027: instance[\u0027uuid\u0027], \u0027reason\u0027: node.last_error})"},{"line_number":338,"context_line":"            raise exception.InstanceDeployFailure(msg)"},{"line_number":339,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_93b844c9","line":336,"updated":"2014-07-22 13:33:28.000000000","message":"why _LE is not used here?","commit_id":"ca0416662f713d55675030891d9fda36c120e043"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"e2643b6d789610ab7c5eb57fb5fc7928cb530d01","unresolved":false,"context_lines":[{"line_number":333,"context_line":""},{"line_number":334,"context_line":"        if node.provision_state \u003d\u003d ironic_states.DEPLOYFAIL:"},{"line_number":335,"context_line":"            # ironic failed to deploy"},{"line_number":336,"context_line":"            msg \u003d (_(\"Failed to provision instance %(inst)s: %(reason)s\"),"},{"line_number":337,"context_line":"                    {\u0027inst\u0027: instance[\u0027uuid\u0027], \u0027reason\u0027: node.last_error})"},{"line_number":338,"context_line":"            raise exception.InstanceDeployFailure(msg)"},{"line_number":339,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_b9cc49bd","line":336,"in_reply_to":"baada198_93b844c9","updated":"2014-07-22 14:11:27.000000000","message":"The i18n guidelines are to not use the _L* helpers for exceptions.\n\nhttp://docs.openstack.org/developer/oslo.i18n/guidelines.html#examples","commit_id":"ca0416662f713d55675030891d9fda36c120e043"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"1b7ca31569c104a23c681611623b722254b4a799","unresolved":false,"context_lines":[{"line_number":514,"context_line":"        if not node_uuid:"},{"line_number":515,"context_line":"            raise exception.NovaException("},{"line_number":516,"context_line":"                _(\"Ironic node uuid not supplied to \""},{"line_number":517,"context_line":"                  \"driver for instance %s.\"), instance[\u0027uuid\u0027])"},{"line_number":518,"context_line":""},{"line_number":519,"context_line":"        icli \u003d client_wrapper.IronicClientWrapper()"},{"line_number":520,"context_line":"        node \u003d icli.call(\"node.get\", node_uuid)"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_d3b2bce4","line":517,"updated":"2014-07-22 13:33:28.000000000","message":"...and here?","commit_id":"ca0416662f713d55675030891d9fda36c120e043"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"e2643b6d789610ab7c5eb57fb5fc7928cb530d01","unresolved":false,"context_lines":[{"line_number":514,"context_line":"        if not node_uuid:"},{"line_number":515,"context_line":"            raise exception.NovaException("},{"line_number":516,"context_line":"                _(\"Ironic node uuid not supplied to \""},{"line_number":517,"context_line":"                  \"driver for instance %s.\"), instance[\u0027uuid\u0027])"},{"line_number":518,"context_line":""},{"line_number":519,"context_line":"        icli \u003d client_wrapper.IronicClientWrapper()"},{"line_number":520,"context_line":"        node \u003d icli.call(\"node.get\", node_uuid)"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_595b2df9","line":517,"in_reply_to":"baada198_d3b2bce4","updated":"2014-07-22 14:11:27.000000000","message":"ditto","commit_id":"ca0416662f713d55675030891d9fda36c120e043"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d084246486906dd5a3089bb9cb201b8c324ba13f","unresolved":false,"context_lines":[{"line_number":110,"context_line":"    contains stale data (eg, a delete on an instance that\u0027s already gone)."},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    \"\"\""},{"line_number":113,"context_line":"    global ironic_exception"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    try:"},{"line_number":116,"context_line":"        return icli.call(\"node.get_by_instance_uuid\", instance[\u0027uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_e537ef4b","line":113,"updated":"2014-07-22 15:30:52.000000000","message":"nit: redundant, though may be helpful for a reader","commit_id":"8b6d1a5e2732998afabbdf2f609218a956f7d169"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"8746c9edd6afaa3668046936865b855554a407d0","unresolved":false,"context_lines":[{"line_number":110,"context_line":"    contains stale data (eg, a delete on an instance that\u0027s already gone)."},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    \"\"\""},{"line_number":113,"context_line":"    global ironic_exception"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    try:"},{"line_number":116,"context_line":"        return icli.call(\"node.get_by_instance_uuid\", instance[\u0027uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_25dab579","line":113,"in_reply_to":"baada198_e537ef4b","updated":"2014-07-22 22:37:31.000000000","message":"I think having this assists","commit_id":"8b6d1a5e2732998afabbdf2f609218a956f7d169"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"8746c9edd6afaa3668046936865b855554a407d0","unresolved":false,"context_lines":[{"line_number":271,"context_line":"        except ironic_exception.BadRequest:"},{"line_number":272,"context_line":"            msg \u003d (_LE(\"Failed to add deploy parameters on node %(node)s \""},{"line_number":273,"context_line":"                       \"when provisioning the instance %(instance)s\"),"},{"line_number":274,"context_line":"                      {\u0027node\u0027: node.uuid, \u0027instance\u0027: instance[\u0027uuid\u0027]})"},{"line_number":275,"context_line":"            LOG.error(msg)"},{"line_number":276,"context_line":"            raise exception.InstanceDeployFailure(msg)"},{"line_number":277,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_468170c2","line":274,"updated":"2014-07-22 22:37:31.000000000","message":"Fixed this exception too","commit_id":"8b6d1a5e2732998afabbdf2f609218a956f7d169"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d084246486906dd5a3089bb9cb201b8c324ba13f","unresolved":false,"context_lines":[{"line_number":291,"context_line":"            msg \u003d (_LE(\"Failed to clean up the parameters on node %(node)s \""},{"line_number":292,"context_line":"                       \"when unprovisioning the instance %(instance)s\"),"},{"line_number":293,"context_line":"                      {\u0027node\u0027: node.uuid, \u0027instance\u0027: instance[\u0027uuid\u0027]})"},{"line_number":294,"context_line":"            LOG.error(msg)"},{"line_number":295,"context_line":"            reason \u003d (_(\"Fail to clean up node %s parameters\"), node.uuid)"},{"line_number":296,"context_line":"            raise exception.InstanceTerminationFailure(reason\u003dreason)"},{"line_number":297,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_45909bed","line":294,"updated":"2014-07-22 15:30:52.000000000","message":"LOG.error(*msg)\n\notherwise you\u0027re passing a tuple instead of 2 arguments","commit_id":"8b6d1a5e2732998afabbdf2f609218a956f7d169"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"8746c9edd6afaa3668046936865b855554a407d0","unresolved":false,"context_lines":[{"line_number":291,"context_line":"            msg \u003d (_LE(\"Failed to clean up the parameters on node %(node)s \""},{"line_number":292,"context_line":"                       \"when unprovisioning the instance %(instance)s\"),"},{"line_number":293,"context_line":"                      {\u0027node\u0027: node.uuid, \u0027instance\u0027: instance[\u0027uuid\u0027]})"},{"line_number":294,"context_line":"            LOG.error(msg)"},{"line_number":295,"context_line":"            reason \u003d (_(\"Fail to clean up node %s parameters\"), node.uuid)"},{"line_number":296,"context_line":"            raise exception.InstanceTerminationFailure(reason\u003dreason)"},{"line_number":297,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_05e051f9","line":294,"in_reply_to":"baada198_45909bed","updated":"2014-07-22 22:37:31.000000000","message":"Done","commit_id":"8b6d1a5e2732998afabbdf2f609218a956f7d169"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d084246486906dd5a3089bb9cb201b8c324ba13f","unresolved":false,"context_lines":[{"line_number":292,"context_line":"                       \"when unprovisioning the instance %(instance)s\"),"},{"line_number":293,"context_line":"                      {\u0027node\u0027: node.uuid, \u0027instance\u0027: instance[\u0027uuid\u0027]})"},{"line_number":294,"context_line":"            LOG.error(msg)"},{"line_number":295,"context_line":"            reason \u003d (_(\"Fail to clean up node %s parameters\"), node.uuid)"},{"line_number":296,"context_line":"            raise exception.InstanceTerminationFailure(reason\u003dreason)"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        self._unplug_vifs(node, instance, network_info)"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_65df5fd7","line":295,"updated":"2014-07-22 15:30:52.000000000","message":"this should not be changed, it\u0027s not logging","commit_id":"8b6d1a5e2732998afabbdf2f609218a956f7d169"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"8746c9edd6afaa3668046936865b855554a407d0","unresolved":false,"context_lines":[{"line_number":292,"context_line":"                       \"when unprovisioning the instance %(instance)s\"),"},{"line_number":293,"context_line":"                      {\u0027node\u0027: node.uuid, \u0027instance\u0027: instance[\u0027uuid\u0027]})"},{"line_number":294,"context_line":"            LOG.error(msg)"},{"line_number":295,"context_line":"            reason \u003d (_(\"Fail to clean up node %s parameters\"), node.uuid)"},{"line_number":296,"context_line":"            raise exception.InstanceTerminationFailure(reason\u003dreason)"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        self._unplug_vifs(node, instance, network_info)"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_25e4750d","line":295,"in_reply_to":"baada198_65df5fd7","updated":"2014-07-22 22:37:31.000000000","message":"Done","commit_id":"8b6d1a5e2732998afabbdf2f609218a956f7d169"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d084246486906dd5a3089bb9cb201b8c324ba13f","unresolved":false,"context_lines":[{"line_number":318,"context_line":"        if node.provision_state \u003d\u003d ironic_states.DEPLOYFAIL:"},{"line_number":319,"context_line":"            # ironic failed to deploy"},{"line_number":320,"context_line":"            msg \u003d (_(\"Failed to provision instance %(inst)s: %(reason)s\"),"},{"line_number":321,"context_line":"                    {\u0027inst\u0027: instance[\u0027uuid\u0027], \u0027reason\u0027: node.last_error})"},{"line_number":322,"context_line":"            raise exception.InstanceDeployFailure(msg)"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"        _log_ironic_polling(\u0027become ACTIVE\u0027, node, instance)"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_c56aebec","line":321,"updated":"2014-07-22 15:30:52.000000000","message":"ditto","commit_id":"8b6d1a5e2732998afabbdf2f609218a956f7d169"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"8746c9edd6afaa3668046936865b855554a407d0","unresolved":false,"context_lines":[{"line_number":318,"context_line":"        if node.provision_state \u003d\u003d ironic_states.DEPLOYFAIL:"},{"line_number":319,"context_line":"            # ironic failed to deploy"},{"line_number":320,"context_line":"            msg \u003d (_(\"Failed to provision instance %(inst)s: %(reason)s\"),"},{"line_number":321,"context_line":"                    {\u0027inst\u0027: instance[\u0027uuid\u0027], \u0027reason\u0027: node.last_error})"},{"line_number":322,"context_line":"            raise exception.InstanceDeployFailure(msg)"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"        _log_ironic_polling(\u0027become ACTIVE\u0027, node, instance)"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_45c88975","line":321,"in_reply_to":"baada198_c56aebec","updated":"2014-07-22 22:37:31.000000000","message":"Done","commit_id":"8b6d1a5e2732998afabbdf2f609218a956f7d169"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d084246486906dd5a3089bb9cb201b8c324ba13f","unresolved":false,"context_lines":[{"line_number":498,"context_line":"        if not node_uuid:"},{"line_number":499,"context_line":"            raise exception.NovaException("},{"line_number":500,"context_line":"                _(\"Ironic node uuid not supplied to \""},{"line_number":501,"context_line":"                  \"driver for instance %s.\"), instance[\u0027uuid\u0027])"},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"        icli \u003d client_wrapper.IronicClientWrapper()"},{"line_number":504,"context_line":"        node \u003d icli.call(\"node.get\", node_uuid)"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_852e33aa","line":501,"updated":"2014-07-22 15:30:52.000000000","message":"IIRC this only works for logging","commit_id":"8b6d1a5e2732998afabbdf2f609218a956f7d169"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"8746c9edd6afaa3668046936865b855554a407d0","unresolved":false,"context_lines":[{"line_number":498,"context_line":"        if not node_uuid:"},{"line_number":499,"context_line":"            raise exception.NovaException("},{"line_number":500,"context_line":"                _(\"Ironic node uuid not supplied to \""},{"line_number":501,"context_line":"                  \"driver for instance %s.\"), instance[\u0027uuid\u0027])"},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"        icli \u003d client_wrapper.IronicClientWrapper()"},{"line_number":504,"context_line":"        node \u003d icli.call(\"node.get\", node_uuid)"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_e6dfe4d4","line":501,"in_reply_to":"baada198_852e33aa","updated":"2014-07-22 22:37:31.000000000","message":"Done","commit_id":"8b6d1a5e2732998afabbdf2f609218a956f7d169"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d084246486906dd5a3089bb9cb201b8c324ba13f","unresolved":false,"context_lines":[{"line_number":548,"context_line":"            msg \u003d (_LE(\"Failed to request Ironic to provision instance \""},{"line_number":549,"context_line":"                       \"%(inst)s: %(reason)s\"), {\u0027inst\u0027: instance[\u0027uuid\u0027],"},{"line_number":550,"context_line":"                                                 \u0027reason\u0027: str(e)})"},{"line_number":551,"context_line":"            LOG.error(msg)"},{"line_number":552,"context_line":"            self._cleanup_deploy(node, instance, network_info)"},{"line_number":553,"context_line":"            raise exception.InstanceDeployFailure(msg)"},{"line_number":554,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_452c1bad","line":551,"updated":"2014-07-22 15:30:52.000000000","message":"ditto about tuple","commit_id":"8b6d1a5e2732998afabbdf2f609218a956f7d169"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"8746c9edd6afaa3668046936865b855554a407d0","unresolved":false,"context_lines":[{"line_number":548,"context_line":"            msg \u003d (_LE(\"Failed to request Ironic to provision instance \""},{"line_number":549,"context_line":"                       \"%(inst)s: %(reason)s\"), {\u0027inst\u0027: instance[\u0027uuid\u0027],"},{"line_number":550,"context_line":"                                                 \u0027reason\u0027: str(e)})"},{"line_number":551,"context_line":"            LOG.error(msg)"},{"line_number":552,"context_line":"            self._cleanup_deploy(node, instance, network_info)"},{"line_number":553,"context_line":"            raise exception.InstanceDeployFailure(msg)"},{"line_number":554,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_65466dc2","line":551,"in_reply_to":"baada198_452c1bad","updated":"2014-07-22 22:37:31.000000000","message":"Done","commit_id":"8b6d1a5e2732998afabbdf2f609218a956f7d169"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d084246486906dd5a3089bb9cb201b8c324ba13f","unresolved":false,"context_lines":[{"line_number":594,"context_line":"                           \"Provision state still \u0027%(state)s\u0027.\"),"},{"line_number":595,"context_line":"                          {\u0027state\u0027: node.provision_state,"},{"line_number":596,"context_line":"                           \u0027node\u0027: node.uuid})"},{"line_number":597,"context_line":"                LOG.error(msg)"},{"line_number":598,"context_line":"                raise exception.NovaException(msg)"},{"line_number":599,"context_line":"            else:"},{"line_number":600,"context_line":"                data[\u0027tries\u0027] +\u003d 1"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_c50f4b38","line":597,"updated":"2014-07-22 15:30:52.000000000","message":"ditto about tuple","commit_id":"8b6d1a5e2732998afabbdf2f609218a956f7d169"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"8746c9edd6afaa3668046936865b855554a407d0","unresolved":false,"context_lines":[{"line_number":594,"context_line":"                           \"Provision state still \u0027%(state)s\u0027.\"),"},{"line_number":595,"context_line":"                          {\u0027state\u0027: node.provision_state,"},{"line_number":596,"context_line":"                           \u0027node\u0027: node.uuid})"},{"line_number":597,"context_line":"                LOG.error(msg)"},{"line_number":598,"context_line":"                raise exception.NovaException(msg)"},{"line_number":599,"context_line":"            else:"},{"line_number":600,"context_line":"                data[\u0027tries\u0027] +\u003d 1"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_651d8dbe","line":597,"in_reply_to":"baada198_c50f4b38","updated":"2014-07-22 22:37:31.000000000","message":"Done","commit_id":"8b6d1a5e2732998afabbdf2f609218a956f7d169"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d084246486906dd5a3089bb9cb201b8c324ba13f","unresolved":false,"context_lines":[{"line_number":890,"context_line":"                ironic_exception.BadRequest) as e:     # Maintenance"},{"line_number":891,"context_line":"            msg \u003d (_(\"Failed to request Ironic to rebuild instance \""},{"line_number":892,"context_line":"                     \"%(inst)s: %(reason)s\"), {\u0027inst\u0027: instance[\u0027uuid\u0027],"},{"line_number":893,"context_line":"                                               \u0027reason\u0027: str(e)})"},{"line_number":894,"context_line":"            raise exception.InstanceDeployFailure(msg)"},{"line_number":895,"context_line":""},{"line_number":896,"context_line":"        # Although the target provision state is REBUILD, it will actually go"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_c006591c","line":893,"updated":"2014-07-22 15:30:52.000000000","message":"ditto about exceptions vs logging","commit_id":"8b6d1a5e2732998afabbdf2f609218a956f7d169"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"8746c9edd6afaa3668046936865b855554a407d0","unresolved":false,"context_lines":[{"line_number":890,"context_line":"                ironic_exception.BadRequest) as e:     # Maintenance"},{"line_number":891,"context_line":"            msg \u003d (_(\"Failed to request Ironic to rebuild instance \""},{"line_number":892,"context_line":"                     \"%(inst)s: %(reason)s\"), {\u0027inst\u0027: instance[\u0027uuid\u0027],"},{"line_number":893,"context_line":"                                               \u0027reason\u0027: str(e)})"},{"line_number":894,"context_line":"            raise exception.InstanceDeployFailure(msg)"},{"line_number":895,"context_line":""},{"line_number":896,"context_line":"        # Although the target provision state is REBUILD, it will actually go"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_e5cefd2c","line":893,"in_reply_to":"baada198_c006591c","updated":"2014-07-22 22:37:31.000000000","message":"Done","commit_id":"8b6d1a5e2732998afabbdf2f609218a956f7d169"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"07af35ca73452259b2248aacc25e4452287b5cdf","unresolved":false,"context_lines":[{"line_number":35,"context_line":"from nova.objects import instance as instance_obj"},{"line_number":36,"context_line":"from nova.openstack.common import excutils"},{"line_number":37,"context_line":"from nova.openstack.common.gettextutils import _, _LE, _LW"},{"line_number":38,"context_line":"from nova.openstack.common.importutils import import_module"},{"line_number":39,"context_line":"from nova.openstack.common import jsonutils"},{"line_number":40,"context_line":"from nova.openstack.common import log as logging"},{"line_number":41,"context_line":"from nova.openstack.common import loopingcall"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_1585d858","line":38,"updated":"2014-07-23 02:54:34.000000000","message":"\"import_module\" is a method, so I think this is going to fail Nova\u0027s pep8 check. It should be:\n\n  from nova.openstack.common import importutils","commit_id":"56a309e89c4d664bc4967c41a8e3a4cfaea8d2b2"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"19096c68baabe3bcd4a24975782d8da7fd64280c","unresolved":false,"context_lines":[{"line_number":42,"context_line":"from nova.virt import firewall"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"ironic \u003d None"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_67de59dc","line":45,"updated":"2014-07-23 09:04:23.000000000","message":"ditto about try_import","commit_id":"504d816013d5b453fe645c68320e8ba9cf08318f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"75bb37df61b2f18a71a68fbf0997e34a321e508d","unresolved":false,"context_lines":[{"line_number":267,"context_line":"            icli.call(\u0027node.update\u0027, node.uuid, patch)"},{"line_number":268,"context_line":"        except ironic.exc.BadRequest:"},{"line_number":269,"context_line":"            msg \u003d (_(\"Failed to add deploy parameters on node %(node)s \""},{"line_number":270,"context_line":"                       \"when provisioning the instance %(instance)s\")"},{"line_number":271,"context_line":"                   % {\u0027node\u0027: node.uuid, \u0027instance\u0027: instance[\u0027uuid\u0027]})"},{"line_number":272,"context_line":"            LOG.error(msg)"},{"line_number":273,"context_line":"            raise exception.InstanceDeployFailure(msg)"}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_7d934800","line":270,"updated":"2014-07-23 09:48:54.000000000","message":"nit: redundant indent introduced","commit_id":"504d816013d5b453fe645c68320e8ba9cf08318f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"75bb37df61b2f18a71a68fbf0997e34a321e508d","unresolved":false,"context_lines":[{"line_number":288,"context_line":"            LOG.error(_LE(\"Failed to clean up the parameters on node %(node)s \""},{"line_number":289,"context_line":"                          \"when unprovisioning the instance %(instance)s\"),"},{"line_number":290,"context_line":"                         {\u0027node\u0027: node.uuid, \u0027instance\u0027: instance[\u0027uuid\u0027]})"},{"line_number":291,"context_line":"            reason \u003d (_(\"Fail to clean up node %s parameters\") % node.uuid)"},{"line_number":292,"context_line":"            raise exception.InstanceTerminationFailure(reason\u003dreason)"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"        self._unplug_vifs(node, instance, network_info)"}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_bd9de00c","line":291,"updated":"2014-07-23 09:48:54.000000000","message":"nit: redundant brackets","commit_id":"504d816013d5b453fe645c68320e8ba9cf08318f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"75bb37df61b2f18a71a68fbf0997e34a321e508d","unresolved":false,"context_lines":[{"line_number":543,"context_line":"                ironic.exc.BadRequest) as e:     # Maintenance"},{"line_number":544,"context_line":"            msg \u003d (_LE(\"Failed to request Ironic to provision instance \""},{"line_number":545,"context_line":"                       \"%(inst)s: %(reason)s\") % {\u0027inst\u0027: instance[\u0027uuid\u0027],"},{"line_number":546,"context_line":"                                                  \u0027reason\u0027: str(e)})"},{"line_number":547,"context_line":"            LOG.error(msg)"},{"line_number":548,"context_line":"            self._cleanup_deploy(node, instance, network_info)"},{"line_number":549,"context_line":"            raise exception.InstanceDeployFailure(msg)"}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_fdad9833","line":546,"updated":"2014-07-23 09:48:54.000000000","message":"this msg is used for exception on #549, so it should not used _LE","commit_id":"504d816013d5b453fe645c68320e8ba9cf08318f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"56fe59b2257e1af0ba8b1d0b0ec5dc5d0dcba543","unresolved":false,"context_lines":[{"line_number":273,"context_line":"            icli.call(\u0027node.update\u0027, node.uuid, patch)"},{"line_number":274,"context_line":"        except ironic.exc.BadRequest:"},{"line_number":275,"context_line":"            msg \u003d (_(\"Failed to add deploy parameters on node %(node)s \""},{"line_number":276,"context_line":"                       \"when provisioning the instance %(instance)s\")"},{"line_number":277,"context_line":"                   % {\u0027node\u0027: node.uuid, \u0027instance\u0027: instance[\u0027uuid\u0027]})"},{"line_number":278,"context_line":"            LOG.error(msg)"},{"line_number":279,"context_line":"            raise exception.InstanceDeployFailure(msg)"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_ac3e89b7","line":276,"updated":"2014-07-23 14:44:30.000000000","message":"nit: wrong indentation","commit_id":"ec5c3bb493e35908465be67a7aa92db1454a5bac"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"56fe59b2257e1af0ba8b1d0b0ec5dc5d0dcba543","unresolved":false,"context_lines":[{"line_number":549,"context_line":"                ironic.exc.BadRequest) as e:     # Maintenance"},{"line_number":550,"context_line":"            msg \u003d (_LE(\"Failed to request Ironic to provision instance \""},{"line_number":551,"context_line":"                       \"%(inst)s: %(reason)s\") % {\u0027inst\u0027: instance[\u0027uuid\u0027],"},{"line_number":552,"context_line":"                                                  \u0027reason\u0027: str(e)})"},{"line_number":553,"context_line":"            LOG.error(msg)"},{"line_number":554,"context_line":"            self._cleanup_deploy(node, instance, network_info)"},{"line_number":555,"context_line":"            raise exception.InstanceDeployFailure(msg)"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_cc32ddf2","line":552,"updated":"2014-07-23 14:44:30.000000000","message":"_LE is used here, while on #555 msg is passed to the exception","commit_id":"ec5c3bb493e35908465be67a7aa92db1454a5bac"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e2c1ae073001d8d1a6b14d390ba2e4e42acf1852","unresolved":false,"context_lines":[{"line_number":104,"context_line":"def _validate_instance_and_node(icli, instance):"},{"line_number":105,"context_line":"    \"\"\"Get and validate a node\u0027s uuid out of a manager instance dict."},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    The compute manager is meant to know the node uuid, so missing uuid"},{"line_number":108,"context_line":"    a significant issue - it may mean we\u0027ve been passed someone elses data."},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    Check with the Ironic service that this node is still associated with"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_bc130200","line":107,"updated":"2014-07-24 02:42:50.000000000","message":"I don\u0027t know how picky nova reviewers are. \u0027missing uuid\u0027 -\u003e \u0027missing uuid is\u0027","commit_id":"8689a38a2c1cf1fb89a7a1ad0bf5e3b02baff0fb"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"763d65f3c30d896754b7b18e60e1b3482df56868","unresolved":false,"context_lines":[{"line_number":104,"context_line":"def _validate_instance_and_node(icli, instance):"},{"line_number":105,"context_line":"    \"\"\"Get and validate a node\u0027s uuid out of a manager instance dict."},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    The compute manager is meant to know the node uuid, so missing uuid"},{"line_number":108,"context_line":"    a significant issue - it may mean we\u0027ve been passed someone elses data."},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    Check with the Ironic service that this node is still associated with"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_8dc7ea64","line":107,"in_reply_to":"baada198_bc130200","updated":"2014-07-24 05:05:37.000000000","message":"Done","commit_id":"8689a38a2c1cf1fb89a7a1ad0bf5e3b02baff0fb"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e2c1ae073001d8d1a6b14d390ba2e4e42acf1852","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    \"\"\"Get and validate a node\u0027s uuid out of a manager instance dict."},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    The compute manager is meant to know the node uuid, so missing uuid"},{"line_number":108,"context_line":"    a significant issue - it may mean we\u0027ve been passed someone elses data."},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    Check with the Ironic service that this node is still associated with"},{"line_number":111,"context_line":"    this instance. This catches situations where Nova\u0027s instance dict"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_1cdcee45","line":108,"updated":"2014-07-24 02:42:50.000000000","message":"nit: elses -\u003e else\u0027s","commit_id":"8689a38a2c1cf1fb89a7a1ad0bf5e3b02baff0fb"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"763d65f3c30d896754b7b18e60e1b3482df56868","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    \"\"\"Get and validate a node\u0027s uuid out of a manager instance dict."},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    The compute manager is meant to know the node uuid, so missing uuid"},{"line_number":108,"context_line":"    a significant issue - it may mean we\u0027ve been passed someone elses data."},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    Check with the Ironic service that this node is still associated with"},{"line_number":111,"context_line":"    this instance. This catches situations where Nova\u0027s instance dict"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_adc66e66","line":108,"in_reply_to":"baada198_1cdcee45","updated":"2014-07-24 05:05:37.000000000","message":"Done","commit_id":"8689a38a2c1cf1fb89a7a1ad0bf5e3b02baff0fb"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e2c1ae073001d8d1a6b14d390ba2e4e42acf1852","unresolved":false,"context_lines":[{"line_number":110,"context_line":"    Check with the Ironic service that this node is still associated with"},{"line_number":111,"context_line":"    this instance. This catches situations where Nova\u0027s instance dict"},{"line_number":112,"context_line":"    contains stale data (eg, a delete on an instance that\u0027s already gone)."},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    \"\"\""},{"line_number":115,"context_line":"    try:"},{"line_number":116,"context_line":"        return icli.call(\"node.get_by_instance_uuid\", instance[\u0027uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_fc13bab4","line":113,"updated":"2014-07-24 02:42:50.000000000","message":"Probably too late for me to be commenting about this, but this docstring confuses me. It looks like all it does is return the node associated with the instance. Where/what is the \u0027validate\u0027 part?  (I know Michael, it has nothing to do with your changes.)","commit_id":"8689a38a2c1cf1fb89a7a1ad0bf5e3b02baff0fb"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"452cac1980cf152bb100ef55ca756b5a3371c766","unresolved":false,"context_lines":[{"line_number":110,"context_line":"    Check with the Ironic service that this node is still associated with"},{"line_number":111,"context_line":"    this instance. This catches situations where Nova\u0027s instance dict"},{"line_number":112,"context_line":"    contains stale data (eg, a delete on an instance that\u0027s already gone)."},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    \"\"\""},{"line_number":115,"context_line":"    try:"},{"line_number":116,"context_line":"        return icli.call(\"node.get_by_instance_uuid\", instance[\u0027uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_c4b7edd5","line":113,"in_reply_to":"baada198_6d93765c","updated":"2014-07-24 13:38:48.000000000","message":"What does the compute manager (nova\u0027s?) have to do with this? All this does is get (from ironic) the node associated with the instance.\n\nIf \u0027validate\u0027 \u003d\u003d check if instance has uuid, I guess it does that cuz if instance[\u0027uuid\u0027] doesn\u0027t exist or is None, an exception will be raised. Anyway, this isn\u0027t the point of the patch so I\u0027ll go away.","commit_id":"8689a38a2c1cf1fb89a7a1ad0bf5e3b02baff0fb"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"763d65f3c30d896754b7b18e60e1b3482df56868","unresolved":false,"context_lines":[{"line_number":110,"context_line":"    Check with the Ironic service that this node is still associated with"},{"line_number":111,"context_line":"    this instance. This catches situations where Nova\u0027s instance dict"},{"line_number":112,"context_line":"    contains stale data (eg, a delete on an instance that\u0027s already gone)."},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    \"\"\""},{"line_number":115,"context_line":"    try:"},{"line_number":116,"context_line":"        return icli.call(\"node.get_by_instance_uuid\", instance[\u0027uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_6d93765c","line":113,"in_reply_to":"baada198_fc13bab4","updated":"2014-07-24 05:05:37.000000000","message":"So by validation it is verifying that the instance has a uuid and the compute manager knows about it.  That\u0027s all I\u0027ve got :)","commit_id":"8689a38a2c1cf1fb89a7a1ad0bf5e3b02baff0fb"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e2c1ae073001d8d1a6b14d390ba2e4e42acf1852","unresolved":false,"context_lines":[{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    def _node_resources_unavailable(self, node_obj):"},{"line_number":171,"context_line":"        \"\"\"Determines whether the node\u0027s resources should be presented"},{"line_number":172,"context_line":"        to Nova for use based on the current power and maintenance state."},{"line_number":173,"context_line":"        \"\"\""},{"line_number":174,"context_line":"        bad_states \u003d [ironic_states.ERROR, ironic_states.NOSTATE]"},{"line_number":175,"context_line":"        return (node_obj.maintenance or"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_fc61fa38","line":172,"updated":"2014-07-24 02:42:50.000000000","message":"At some point, I thought that if a docstring was more than 1 line long, the first line had to be a sentence that perhaps ended in a period. Followed by a blank line, then verbiage. Don\u0027t know if that was a pep8 thingy or not or if it has been relaxed.","commit_id":"8689a38a2c1cf1fb89a7a1ad0bf5e3b02baff0fb"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"763d65f3c30d896754b7b18e60e1b3482df56868","unresolved":false,"context_lines":[{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    def _node_resources_unavailable(self, node_obj):"},{"line_number":171,"context_line":"        \"\"\"Determines whether the node\u0027s resources should be presented"},{"line_number":172,"context_line":"        to Nova for use based on the current power and maintenance state."},{"line_number":173,"context_line":"        \"\"\""},{"line_number":174,"context_line":"        bad_states \u003d [ironic_states.ERROR, ironic_states.NOSTATE]"},{"line_number":175,"context_line":"        return (node_obj.maintenance or"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_8d9c4a5d","line":172,"in_reply_to":"baada198_fc61fa38","updated":"2014-07-24 05:05:37.000000000","message":"Done","commit_id":"8689a38a2c1cf1fb89a7a1ad0bf5e3b02baff0fb"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e2c1ae073001d8d1a6b14d390ba2e4e42acf1852","unresolved":false,"context_lines":[{"line_number":544,"context_line":"        try:"},{"line_number":545,"context_line":"            icli.call(\"node.set_provision_state\", node_uuid,"},{"line_number":546,"context_line":"                      ironic_states.ACTIVE)"},{"line_number":547,"context_line":"        except (exception.NovaException,               # Retry failed"},{"line_number":548,"context_line":"                ironic.exc.InternalServerError,  # Validations"},{"line_number":549,"context_line":"                ironic.exc.BadRequest) as e:     # Maintenance"},{"line_number":550,"context_line":"            msg \u003d (_(\"Failed to request Ironic to provision instance \""}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_fc057a79","line":547,"updated":"2014-07-24 02:42:50.000000000","message":"nit: before, the comments were aligned, now this \u0027# Retry failed\u0027 is not aligned with the two below it.","commit_id":"8689a38a2c1cf1fb89a7a1ad0bf5e3b02baff0fb"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"763d65f3c30d896754b7b18e60e1b3482df56868","unresolved":false,"context_lines":[{"line_number":544,"context_line":"        try:"},{"line_number":545,"context_line":"            icli.call(\"node.set_provision_state\", node_uuid,"},{"line_number":546,"context_line":"                      ironic_states.ACTIVE)"},{"line_number":547,"context_line":"        except (exception.NovaException,               # Retry failed"},{"line_number":548,"context_line":"                ironic.exc.InternalServerError,  # Validations"},{"line_number":549,"context_line":"                ironic.exc.BadRequest) as e:     # Maintenance"},{"line_number":550,"context_line":"            msg \u003d (_(\"Failed to request Ironic to provision instance \""}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_0db83ac6","line":547,"in_reply_to":"baada198_fc057a79","updated":"2014-07-24 05:05:37.000000000","message":"Done","commit_id":"8689a38a2c1cf1fb89a7a1ad0bf5e3b02baff0fb"}],"ironic/nova/virt/ironic/utils.py":[{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"dcf039d5563ef1c9eb2d9c8df4312e61d25a87f7","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def import_ironicclient(ironic_client, ironic_exception):"},{"line_number":28,"context_line":"    \"\"\"Import the ironicclient if it is available, and update a reference"},{"line_number":29,"context_line":"    to the client module, and the exception module appropriately.\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_90cc1637","line":26,"updated":"2014-07-20 22:14:52.000000000","message":"Shouldn\u0027t the global variables ironic_client and ironic_exception be here? Then the users of this method don\u0027t need to declare them to be global, they just use the return values of the method below.","commit_id":"6d316c6d0593ed76a9262ebb203efd84da044a5b"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"ce3ca9c7840de50b9e79dc9c8575ff937aadd59e","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def import_ironicclient(ironic_client, ironic_exception):"},{"line_number":28,"context_line":"    \"\"\"Import the ironicclient if it is available, and update a reference"},{"line_number":29,"context_line":"    to the client module, and the exception module appropriately.\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_7d7e7ae5","line":26,"in_reply_to":"baada198_90cc1637","updated":"2014-07-21 03:13:18.000000000","message":"Good idea - I\u0027ve reworked this a little.  I\u0027ve kept the global, but it\u0027s clearer now.","commit_id":"6d316c6d0593ed76a9262ebb203efd84da044a5b"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"92a33fb8c6b84c39f86c18fe5290fb8e8a89fdff","unresolved":false,"context_lines":[{"line_number":18,"context_line":"\"\"\""},{"line_number":19,"context_line":"Utility functions for the Nova Ironic driver."},{"line_number":20,"context_line":"\"\"\""},{"line_number":21,"context_line":"from nova.openstack.common.gettextutils import _LE"},{"line_number":22,"context_line":"from nova.openstack.common import log as logging"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_4e855aab","line":21,"updated":"2014-07-21 22:17:55.000000000","message":"looks like nova is using nova.i18n. Ie, \u0027from nova.i18n import _LE\u0027.","commit_id":"9ca912cccb419527bb79adc833f8da6838b14b3d"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"ed749f2e673b72f6abd9db38945ff98fec0df968","unresolved":false,"context_lines":[{"line_number":18,"context_line":"\"\"\""},{"line_number":19,"context_line":"Utility functions for the Nova Ironic driver."},{"line_number":20,"context_line":"\"\"\""},{"line_number":21,"context_line":"from nova.openstack.common.gettextutils import _LE"},{"line_number":22,"context_line":"from nova.openstack.common import log as logging"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_fedeb9d9","line":21,"in_reply_to":"baada198_4e855aab","updated":"2014-07-22 09:33:49.000000000","message":"We don\u0027t have nova.i18n in our tree, so I\u0027ll leave this as is, and on the merge back into nova, change it out for nova.i18n","commit_id":"9ca912cccb419527bb79adc833f8da6838b14b3d"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"1b7ca31569c104a23c681611623b722254b4a799","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# coding\u003dutf-8"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Copyright 2014 Rackspace Hosting"},{"line_number":4,"context_line":"# All Rights Reserved."},{"line_number":5,"context_line":"#"},{"line_number":6,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_f3226001","line":3,"updated":"2014-07-22 13:33:28.000000000","message":"Btw, what is the current policy for adding copyrights and coding lines to new files? I thought we add neither.","commit_id":"ca0416662f713d55675030891d9fda36c120e043"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"1b7ca31569c104a23c681611623b722254b4a799","unresolved":false,"context_lines":[{"line_number":30,"context_line":"def import_ironicclient():"},{"line_number":31,"context_line":"    \"\"\"Import the ironicclient module if it hasn\u0027t been and it\u0027s available.\"\"\""},{"line_number":32,"context_line":"    global ironic_client"},{"line_number":33,"context_line":"    global ironic_exception"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    if not ironic_client:"},{"line_number":36,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_33ef78b3","line":33,"updated":"2014-07-22 13:33:28.000000000","message":"I am not sure you need caches here, as import also caches modules in sys.modules","commit_id":"ca0416662f713d55675030891d9fda36c120e043"}]}
