)]}'
{"nova/tests/unit/virt/powervm/test_driver.py":[{"author":{"_account_id":8190,"name":"Drew Thorstensen (thorst)","email":"thorst@us.ibm.com","username":"thorst"},"change_message_id":"cf27e2a8313541a4a438934b40de7d59806b2e4a","unresolved":false,"context_lines":[{"line_number":264,"context_line":"        except Exception as exc:"},{"line_number":265,"context_line":"            exc_str \u003d six.text_type(exc)"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"        self.assertIsNotNone(exc_str, \u0027Expected Not Found Exception\u0027)"},{"line_number":268,"context_line":"        self.assertEqual(exc_str, \u0027Unable to open console since \u0027"},{"line_number":269,"context_line":"                         \u0027virtual machine Fake Instance does not exist.\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"da36d5c6_89bb3975","line":269,"range":{"start_line":267,"start_character":0,"end_line":269,"end_character":73},"updated":"2017-02-17 19:46:31.000000000","message":"I\u0027m not a huge fan of checking the strings in the exception.\n\nAny other way we can raise a specific exception type?  Maybe a check that makes sure that the message contains the display name?","commit_id":"de22e932d313a3baa84d65a91b672bd898255e84"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"5cf1d7445ec7ae4efc444199a513b3e0f43d1434","unresolved":false,"context_lines":[{"line_number":264,"context_line":"        except Exception as exc:"},{"line_number":265,"context_line":"            exc_str \u003d six.text_type(exc)"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"        self.assertIsNotNone(exc_str, \u0027Expected Not Found Exception\u0027)"},{"line_number":268,"context_line":"        self.assertEqual(exc_str, \u0027Unable to open console since \u0027"},{"line_number":269,"context_line":"                         \u0027virtual machine Fake Instance does not exist.\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"da36d5c6_4cf14fcd","line":269,"range":{"start_line":267,"start_character":0,"end_line":269,"end_character":73},"in_reply_to":"da36d5c6_89bb3975","updated":"2017-02-17 20:11:39.000000000","message":"Ew, yeah.  Looking at the other drivers, InstanceNotFound is a perfectly acceptable exception for this method to raise.  I also don\u0027t like the fact that we\u0027re using ConsoleTypeUnavailable - and then overwriting its message.  Will fix.","commit_id":"de22e932d313a3baa84d65a91b672bd898255e84"}],"nova/virt/powervm/driver.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"8e28531022a7e892c9dee69b995e157354759bc4","unresolved":false,"context_lines":[{"line_number":25,"context_line":"from pypowervm.tasks import storage as pvm_stor"},{"line_number":26,"context_line":"from pypowervm.tasks import vterm as pvm_vterm"},{"line_number":27,"context_line":"from pypowervm.wrappers import managed_system as pvm_ms"},{"line_number":28,"context_line":"import re"},{"line_number":29,"context_line":"import six"},{"line_number":30,"context_line":"from taskflow import engines as tf_eng"},{"line_number":31,"context_line":"from taskflow.patterns import linear_flow as tf_lf"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5201f7_e9ae2b97","line":29,"range":{"start_line":28,"start_character":0,"end_line":29,"end_character":10},"updated":"2017-01-03 20:32:40.000000000","message":"Separate stdlib imports","commit_id":"a6fb5e6ee09f564a64674fd538a8c41f24aec7cf"},{"author":{"_account_id":10347,"name":"Wang Qing wu","email":"wqw2700@sina.com","username":"cody"},"change_message_id":"33c25660764bd03415962e827486b0585eb99e8d","unresolved":false,"context_lines":[{"line_number":25,"context_line":"from pypowervm.tasks import storage as pvm_stor"},{"line_number":26,"context_line":"from pypowervm.tasks import vterm as pvm_vterm"},{"line_number":27,"context_line":"from pypowervm.wrappers import managed_system as pvm_ms"},{"line_number":28,"context_line":"import re"},{"line_number":29,"context_line":"import six"},{"line_number":30,"context_line":"from taskflow import engines as tf_eng"},{"line_number":31,"context_line":"from taskflow.patterns import linear_flow as tf_lf"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5201f7_8071cde2","line":29,"range":{"start_line":28,"start_character":0,"end_line":29,"end_character":10},"in_reply_to":"ba5201f7_e9ae2b97","updated":"2017-01-04 15:45:52.000000000","message":"Done","commit_id":"a6fb5e6ee09f564a64674fd538a8c41f24aec7cf"},{"author":{"_account_id":8190,"name":"Drew Thorstensen (thorst)","email":"thorst@us.ibm.com","username":"thorst"},"change_message_id":"56bd6295b4d848b1444fe5769cef7d3e798b47ae","unresolved":false,"context_lines":[{"line_number":313,"context_line":"                    raise exc.InstanceNotFound(instance_id\u003dinstance.uuid)"},{"line_number":314,"context_line":"            # Otherwise wrapper the error in an exception that can be handled"},{"line_number":315,"context_line":"            raise exc.InternalError("},{"line_number":316,"context_line":"                err\u003d_(\"Unable to open console.  Error is: %s\") % err)"},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"        # Note that the VNC viewer will wrap the internal_access_path with"},{"line_number":319,"context_line":"        # the HTTP content."}],"source_content_type":"text/x-python","patch_set":19,"id":"ba2be162_bc3af996","line":316,"updated":"2017-03-06 17:19:57.000000000","message":"Maybe add \u0027VNC\u0027 console.  To identify, as spice is another console type.","commit_id":"0f6115a03ff9aac04e489d6d84abf856308be4b9"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"f84debac9fb1ebc867eb029ec7eb668d1fe00b07","unresolved":false,"context_lines":[{"line_number":313,"context_line":"                    raise exc.InstanceNotFound(instance_id\u003dinstance.uuid)"},{"line_number":314,"context_line":"            # Otherwise wrapper the error in an exception that can be handled"},{"line_number":315,"context_line":"            raise exc.InternalError("},{"line_number":316,"context_line":"                err\u003d_(\"Unable to open console.  Error is: %s\") % err)"},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"        # Note that the VNC viewer will wrap the internal_access_path with"},{"line_number":319,"context_line":"        # the HTTP content."}],"source_content_type":"text/x-python","patch_set":19,"id":"1a1ced50_fab3f197","line":316,"in_reply_to":"ba2be162_bc3af996","updated":"2017-03-21 18:42:13.000000000","message":"Done","commit_id":"0f6115a03ff9aac04e489d6d84abf856308be4b9"},{"author":{"_account_id":17814,"name":"fengzhr","email":"fengzhr@awcloud.com","username":"space"},"change_message_id":"147c3874152594f1b5052eb6960cd64f2adaad6f","unresolved":false,"context_lines":[{"line_number":283,"context_line":"                    raise exc.InstanceNotFound(instance_id\u003dinstance.uuid)"},{"line_number":284,"context_line":"            # Otherwise wrapper the error in an exception that can be handled"},{"line_number":285,"context_line":"            raise exc.InternalError("},{"line_number":286,"context_line":"                err\u003d_(\"Unable to open VNC console.  Error is: %s\") % err)"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"        # Note that the VNC viewer will wrap the internal_access_path with"},{"line_number":289,"context_line":"        # the HTTP content."}],"source_content_type":"text/x-python","patch_set":26,"id":"ffe62b97_bd61783c","line":286,"range":{"start_line":286,"start_character":51,"end_line":286,"end_character":52},"updated":"2017-03-24 03:02:24.000000000","message":"A little advice:remove a space.","commit_id":"248325fa673758e7ec0654210371df050c30ffca"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"f8ed2363f5c5909810da15a780fcd756a5f2d6ab","unresolved":false,"context_lines":[{"line_number":283,"context_line":"                    raise exc.InstanceNotFound(instance_id\u003dinstance.uuid)"},{"line_number":284,"context_line":"            # Otherwise wrapper the error in an exception that can be handled"},{"line_number":285,"context_line":"            raise exc.InternalError("},{"line_number":286,"context_line":"                err\u003d_(\"Unable to open VNC console.  Error is: %s\") % err)"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"        # Note that the VNC viewer will wrap the internal_access_path with"},{"line_number":289,"context_line":"        # the HTTP content."}],"source_content_type":"text/x-python","patch_set":26,"id":"ffe62b97_a5d5c1bb","line":286,"range":{"start_line":286,"start_character":51,"end_line":286,"end_character":52},"in_reply_to":"ffe62b97_bd61783c","updated":"2017-03-24 15:22:17.000000000","message":"Ah, the how-many-spaces-after-a-period debate.\n\nThe conventions/rules dictating a single space after a period were based on typesetting with proportional fonts.  Two spaces came from typewriters, which used fixed-width fonts.  As programmers, the use fixed-width fonts is a reasonable argument for defying a rule made for books, articles, etc.  This message shows up in two places: when you\u0027re reading the code; and in the log file when the exception is raised - both fixed-width scenarios.\n\nNow, whereas I will dig in my heels for misplaced apostrophes, and never accept that \"irregardless\" is a word, or that \"affect\" and \"effect\" are interchangeable, I\u0027m not stuck on this one.  However, I would have to \"fix\" about fifty instances in nova/virt/powervm, and nearly five hundred in the nova-powervm project from which this code is derived, which doesn\u0027t really seem like a worthwhile endeavor, 对吧?","commit_id":"248325fa673758e7ec0654210371df050c30ffca"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"7217839b15102c2808c45eab147d340a05347b48","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                self.adapter, lpar_uuid, host, vnc_path\u003dlpar_uuid)"},{"line_number":282,"context_line":"        except Exception as err:"},{"line_number":283,"context_line":"            # If the LPAR was not found, then give a more descriptive message"},{"line_number":284,"context_line":"            if isinstance(err, pvm_exc.HttpError):"},{"line_number":285,"context_line":"                if err.response.status \u003d\u003d 404:"},{"line_number":286,"context_line":"                    raise exc.InstanceNotFound(instance_id\u003dinstance.uuid)"},{"line_number":287,"context_line":"            # Otherwise wrapper the error in an exception that can be handled"}],"source_content_type":"text/x-python","patch_set":30,"id":"7ffa3b31_afb51a34","line":284,"updated":"2017-04-20 15:35:20.000000000","message":"is there a reason to not just catch HttpError instead?","commit_id":"4ab3daf531e9d67c9de26927004b14487dbaa41f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"180c9df483978eb3c5db2a3dab5c097a03d521fa","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                self.adapter, lpar_uuid, host, vnc_path\u003dlpar_uuid)"},{"line_number":282,"context_line":"        except Exception as err:"},{"line_number":283,"context_line":"            # If the LPAR was not found, then give a more descriptive message"},{"line_number":284,"context_line":"            if isinstance(err, pvm_exc.HttpError):"},{"line_number":285,"context_line":"                if err.response.status \u003d\u003d 404:"},{"line_number":286,"context_line":"                    raise exc.InstanceNotFound(instance_id\u003dinstance.uuid)"},{"line_number":287,"context_line":"            # Otherwise wrapper the error in an exception that can be handled"}],"source_content_type":"text/x-python","patch_set":30,"id":"7ffa3b31_efb2f748","line":284,"in_reply_to":"7ffa3b31_afb51a34","updated":"2017-04-21 12:40:15.000000000","message":"Yeah, as I\u0027ve been looking over all the exception cases again, we handle this same 404 scenario in a number of different ways in different places.  Point is, we want to raise InstanceNotFound for a 404 HttpError, but InternalError for anything else (including non-404 HttpError).  So we did it this way to avoid duplicating the InternalError.\n\nedmondsw suggested https://bugs.launchpad.net/pypowervm/+bug/1685016 for pypowervm, which (once it lands) will help us clean up all of these.\n\nBut meanwhile, I need to fix this one to trap pvm_exc.Error instead of Exception anyway.  Will revise.","commit_id":"4ab3daf531e9d67c9de26927004b14487dbaa41f"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"ddf43083b9d672f07ff960fc5317c8984f4c9201","unresolved":false,"context_lines":[{"line_number":286,"context_line":"        except pvm_exc.HttpError as e:"},{"line_number":287,"context_line":"            with excutils.save_and_reraise_exception(logger\u003dLOG) as sare:"},{"line_number":288,"context_line":"                # If the LPAR was not found, raise a more descriptive error"},{"line_number":289,"context_line":"                if e.response.status \u003d\u003d 404:"},{"line_number":290,"context_line":"                    sare.reraise \u003d False"},{"line_number":291,"context_line":"                    raise exc.InstanceNotFound(instance_id\u003dinstance.uuid)"}],"source_content_type":"text/x-python","patch_set":32,"id":"7ffa3b31_0db19ae1","line":289,"updated":"2017-04-21 12:55:55.000000000","message":"so, this is fine, but it would be nice if there was a dedicated exception for this case from the pvm layer instead of having to inspect inside exceptions.","commit_id":"30e29a400b5a0b05205b709f9c97f799d1b3441b"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"6a148706d3f721ff4fa628f6e67f78a6f1e0ba2a","unresolved":false,"context_lines":[{"line_number":286,"context_line":"        except pvm_exc.HttpError as e:"},{"line_number":287,"context_line":"            with excutils.save_and_reraise_exception(logger\u003dLOG) as sare:"},{"line_number":288,"context_line":"                # If the LPAR was not found, raise a more descriptive error"},{"line_number":289,"context_line":"                if e.response.status \u003d\u003d 404:"},{"line_number":290,"context_line":"                    sare.reraise \u003d False"},{"line_number":291,"context_line":"                    raise exc.InstanceNotFound(instance_id\u003dinstance.uuid)"}],"source_content_type":"text/x-python","patch_set":32,"id":"7ffa3b31_ed366e51","line":289,"in_reply_to":"7ffa3b31_0db19ae1","updated":"2017-04-21 12:58:34.000000000","message":"Totally agree - see response in PS30 (which I accidentally had sitting in Draft status all night).","commit_id":"30e29a400b5a0b05205b709f9c97f799d1b3441b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e302a87b5824e5b4ca2473c2ee373494e04c0cfc","unresolved":false,"context_lines":[{"line_number":282,"context_line":"            # Note that the VNC viewer will wrap the internal_access_path with"},{"line_number":283,"context_line":"            # the HTTP content."},{"line_number":284,"context_line":"            return console_type.ConsoleVNC(host\u003dhost, port\u003dport,"},{"line_number":285,"context_line":"                                           internal_access_path\u003dlpar_uuid)"},{"line_number":286,"context_line":"        except pvm_exc.HttpError as e:"},{"line_number":287,"context_line":"            with excutils.save_and_reraise_exception(logger\u003dLOG) as sare:"},{"line_number":288,"context_line":"                # If the LPAR was not found, raise a more descriptive error"}],"source_content_type":"text/x-python","patch_set":33,"id":"ff0f0b1f_614ee838","line":285,"range":{"start_line":285,"start_character":43,"end_line":285,"end_character":73},"updated":"2017-05-24 03:02:59.000000000","message":"I\u0027m not really sure how this is used, but assume it\u0027s internal to the powervm console proxy?","commit_id":"021433cc70eaaed1529341c591305581104d6d92"},{"author":{"_account_id":8190,"name":"Drew Thorstensen (thorst)","email":"thorst@us.ibm.com","username":"thorst"},"change_message_id":"e35ec189230d7a2ac39d0bea97261c9b2436efa7","unresolved":false,"context_lines":[{"line_number":282,"context_line":"            # Note that the VNC viewer will wrap the internal_access_path with"},{"line_number":283,"context_line":"            # the HTTP content."},{"line_number":284,"context_line":"            return console_type.ConsoleVNC(host\u003dhost, port\u003dport,"},{"line_number":285,"context_line":"                                           internal_access_path\u003dlpar_uuid)"},{"line_number":286,"context_line":"        except pvm_exc.HttpError as e:"},{"line_number":287,"context_line":"            with excutils.save_and_reraise_exception(logger\u003dLOG) as sare:"},{"line_number":288,"context_line":"                # If the LPAR was not found, raise a more descriptive error"}],"source_content_type":"text/x-python","patch_set":33,"id":"ff0f0b1f_7dfd3307","line":285,"range":{"start_line":285,"start_character":43,"end_line":285,"end_character":73},"in_reply_to":"ff0f0b1f_614ee838","updated":"2017-05-25 16:02:50.000000000","message":"TL;DR - Yes.\n\nLonger answer:\nI looked at how the internal_access_path gets used by other hypervisors.  If set, that string becomes the first thing that gets passed at the VNC negotiation.\n\nSo we use this as a way to make sure that the thing opening the VNC is the thing that requested the VNC.\n\nIf you asked to open the VNC and provided a path of \u0027abc\u0027 but then opened it with the internal_access_path of \u0027xyz\u0027, we would abort the connection.\n\nWe just happen to use the lpar_uuid because it is a uniquely identifiable object for the VM, but it could really be anything.  The vnc_path on line 281 just needs to match the internal_access_path on line 285.\n\nObviously this isn\u0027t a security thing (all the VNC traffic is clear text unless the vnc auth stuff is available).  Its more of a sanity check.","commit_id":"021433cc70eaaed1529341c591305581104d6d92"}]}
