)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b0b9c514df3624d1d39ddbfbaaeb49ee917488cb","unresolved":false,"context_lines":[{"line_number":11,"context_line":"clients to correclty handle such cases."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I87c8b86373967639eb55b4cc3b7d6cbd9780f3ac"},{"line_number":14,"context_line":"Closes-Bug: #1577725"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1a122d0e_fb48a78c","line":14,"range":{"start_line":14,"start_character":13,"end_line":14,"end_character":20},"updated":"2016-05-03 14:58:10.000000000","message":"Please change this to 1571722 since I\u0027ve duped your bug against 1571722 - which was what we were duplicating a lot of these types of bugs against.","commit_id":"987c5b35c1929cdcb86e904ca0c7e9fa71ea30c9"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"5bc3c63b36344ffa4f2c9a929387741a1526a03f","unresolved":false,"context_lines":[{"line_number":7,"context_line":"network: handle unauthorized exception from neutron"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Neutron can raise an unauthorized exception for an expired token"},{"line_number":10,"context_line":"passed. We should to convert this exception to a HTTP 401 to make"},{"line_number":11,"context_line":"clients to correclty handle such cases."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I87c8b86373967639eb55b4cc3b7d6cbd9780f3ac"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"dab17558_9e888ec8","line":10,"updated":"2016-05-12 14:27:40.000000000","message":"s/should to convert/should convert/","commit_id":"6db06dea7a49dd9913e1d9e54e6a0eff33ec9f8f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"5bc3c63b36344ffa4f2c9a929387741a1526a03f","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Neutron can raise an unauthorized exception for an expired token"},{"line_number":10,"context_line":"passed. We should to convert this exception to a HTTP 401 to make"},{"line_number":11,"context_line":"clients to correclty handle such cases."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I87c8b86373967639eb55b4cc3b7d6cbd9780f3ac"},{"line_number":14,"context_line":"Closes-Bug: #1571722"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"dab17558_7e85eaab","line":11,"updated":"2016-05-12 14:27:40.000000000","message":"s/clients to correclty/clients correctly/","commit_id":"6db06dea7a49dd9913e1d9e54e6a0eff33ec9f8f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"069226b7e716c79cce8345d13a0f78319412d4b9","unresolved":false,"context_lines":[{"line_number":7,"context_line":"network: handle unauthorized exception from neutron"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Neutron can raise an unauthorized exception for an expired token"},{"line_number":10,"context_line":"passed. We should to convert this exception to a HTTP 401 to make"},{"line_number":11,"context_line":"clients to correclty handle such cases."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I87c8b86373967639eb55b4cc3b7d6cbd9780f3ac"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"7aa08908_cb026a72","line":10,"updated":"2016-06-09 12:53:20.000000000","message":"s/should to convert/should convert/","commit_id":"93097c927e8a3d1214abda0c3674d0820383b517"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"069226b7e716c79cce8345d13a0f78319412d4b9","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Neutron can raise an unauthorized exception for an expired token"},{"line_number":10,"context_line":"passed. We should to convert this exception to a HTTP 401 to make"},{"line_number":11,"context_line":"clients to correclty handle such cases."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I87c8b86373967639eb55b4cc3b7d6cbd9780f3ac"},{"line_number":14,"context_line":"Closes-Bug: #1571722"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"7aa08908_ab071e80","line":11,"updated":"2016-06-09 12:53:20.000000000","message":"s/to correeclty/correctly/","commit_id":"93097c927e8a3d1214abda0c3674d0820383b517"}],"nova/api/openstack/extensions.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8dc86ca437b055094a19f42270e92b4358f11084","unresolved":false,"context_lines":[{"line_number":496,"context_line":"                    # happens due to invalid API parameters, as an"},{"line_number":497,"context_line":"                    # expected error."},{"line_number":498,"context_line":"                    raise"},{"line_number":499,"context_line":"                elif isinstance(exc, exception.Unauthorized):"},{"line_number":500,"context_line":"                    # Handle an authorized exception, will be"},{"line_number":501,"context_line":"                    # automatically converted to a HTTP 401, clients"},{"line_number":502,"context_line":"                    # like python-novaclient handle this error to"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_7b8817c7","line":499,"updated":"2016-05-03 14:57:08.000000000","message":"We need a test for this, preferably a functional test.","commit_id":"987c5b35c1929cdcb86e904ca0c7e9fa71ea30c9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8dc86ca437b055094a19f42270e92b4358f11084","unresolved":false,"context_lines":[{"line_number":500,"context_line":"                    # Handle an authorized exception, will be"},{"line_number":501,"context_line":"                    # automatically converted to a HTTP 401, clients"},{"line_number":502,"context_line":"                    # like python-novaclient handle this error to"},{"line_number":503,"context_line":"                    # generate new token and do an other attempt."},{"line_number":504,"context_line":"                    raise"},{"line_number":505,"context_line":""},{"line_number":506,"context_line":"                LOG.exception(_LE(\"Unexpected exception in API method\"))"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_9b4893b5","line":503,"range":{"start_line":503,"start_character":48,"end_line":503,"end_character":56},"updated":"2016-05-03 14:57:08.000000000","message":"s/an other/another/","commit_id":"987c5b35c1929cdcb86e904ca0c7e9fa71ea30c9"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"649323ef336fb235726ec59304277379c5b4716c","unresolved":false,"context_lines":[{"line_number":471,"context_line":"                    # happens due to invalid API parameters, as an"},{"line_number":472,"context_line":"                    # expected error."},{"line_number":473,"context_line":"                    raise"},{"line_number":474,"context_line":"                elif isinstance(exc, exception.Unauthorized):"},{"line_number":475,"context_line":"                    # Handle an authorized exception, will be"},{"line_number":476,"context_line":"                    # automatically converted to a HTTP 401, clients"},{"line_number":477,"context_line":"                    # like python-novaclient handle this error to"}],"source_content_type":"text/x-python","patch_set":9,"id":"dada55a8_b378faf9","line":474,"updated":"2016-07-25 09:59:30.000000000","message":"Hmm, I wonder about the other side effects of this, but I think this is correct.","commit_id":"9d9a3b675d88ee7799f50c4bf16dcb3a954caf69"}],"nova/exception.py":[{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"d207e6002b1249886a3054838bb40eaf647de173","unresolved":false,"context_lines":[{"line_number":2088,"context_line":""},{"line_number":2089,"context_line":""},{"line_number":2090,"context_line":"class Unauthorized(NovaException):"},{"line_number":2091,"context_line":"    ec2_code \u003d \u0027AuthFailure\u0027"},{"line_number":2092,"context_line":"    msg_fmt \u003d _(\"Not authorized.\")"},{"line_number":2093,"context_line":"    code \u003d 401"}],"source_content_type":"text/x-python","patch_set":11,"id":"3aaa91ec_93dcc913","line":2091,"range":{"start_line":2091,"start_character":4,"end_line":2091,"end_character":28},"updated":"2016-06-23 00:09:53.000000000","message":"ec2_code is not necessary now.\n\nec2_code is not used at all after removing ec2 code, and the other ec2_code also have been removed since I681d461029bbc3a05aaa150f2d154eb8bdf5ff0f","commit_id":"2295b1fc4a0cf12ff2de00800ea99229cf93dc0d"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"a3c35822538fb39fbd5a17858578e7b7b0183330","unresolved":false,"context_lines":[{"line_number":2088,"context_line":""},{"line_number":2089,"context_line":""},{"line_number":2090,"context_line":"class Unauthorized(NovaException):"},{"line_number":2091,"context_line":"    ec2_code \u003d \u0027AuthFailure\u0027"},{"line_number":2092,"context_line":"    msg_fmt \u003d _(\"Not authorized.\")"},{"line_number":2093,"context_line":"    code \u003d 401"}],"source_content_type":"text/x-python","patch_set":11,"id":"3aaa91ec_1d7e1b19","line":2091,"in_reply_to":"3aaa91ec_93dcc913","updated":"2016-06-23 08:02:12.000000000","message":"Ok I\u0027ll remove that","commit_id":"2295b1fc4a0cf12ff2de00800ea99229cf93dc0d"}],"nova/network/neutronv2/api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8dc86ca437b055094a19f42270e92b4358f11084","unresolved":false,"context_lines":[{"line_number":130,"context_line":"            try:"},{"line_number":131,"context_line":"                ret \u003d obj(*args, **kwargs)"},{"line_number":132,"context_line":"            except neutron_client_exc.Unauthorized:"},{"line_number":133,"context_line":"                # Token as expired so neutron is raising a"},{"line_number":134,"context_line":"                # unauthorized exception, we should to convert it to"},{"line_number":135,"context_line":"                # raise a 401 which will be returned to novaclient to"},{"line_number":136,"context_line":"                # generate new token according credentials and process"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_3b985f6a","line":133,"range":{"start_line":133,"start_character":24,"end_line":133,"end_character":26},"updated":"2016-05-03 14:57:08.000000000","message":"s/as/is/","commit_id":"987c5b35c1929cdcb86e904ca0c7e9fa71ea30c9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8dc86ca437b055094a19f42270e92b4358f11084","unresolved":false,"context_lines":[{"line_number":131,"context_line":"                ret \u003d obj(*args, **kwargs)"},{"line_number":132,"context_line":"            except neutron_client_exc.Unauthorized:"},{"line_number":133,"context_line":"                # Token as expired so neutron is raising a"},{"line_number":134,"context_line":"                # unauthorized exception, we should to convert it to"},{"line_number":135,"context_line":"                # raise a 401 which will be returned to novaclient to"},{"line_number":136,"context_line":"                # generate new token according credentials and process"},{"line_number":137,"context_line":"                # a retry."}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_fb8d472b","line":134,"range":{"start_line":134,"start_character":52,"end_line":134,"end_character":54},"updated":"2016-05-03 14:57:08.000000000","message":"s/to//","commit_id":"987c5b35c1929cdcb86e904ca0c7e9fa71ea30c9"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"5bc3c63b36344ffa4f2c9a929387741a1526a03f","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        obj \u003d object.__getattribute__(self, name)"},{"line_number":124,"context_line":"        if callable(obj):"},{"line_number":125,"context_line":"            obj \u003d object.__getattribute__(self, \u0027proxy\u0027)(obj)"},{"line_number":126,"context_line":"        return obj"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    def proxy(self, obj):"},{"line_number":129,"context_line":"        def wrapper(*args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_de9216f6","line":126,"updated":"2016-05-12 14:27:40.000000000","message":"Instead of the above __getattribute__ stuff which calls to the proxy() method, couldn\u0027t you just use __call__?\n\n def __call__(self, *args, **kwargs):\n     try:\n         return self.base_client(*args, **kwargs)\n     except neutron_client_exc.Unauthorized:\n         raise exception.Unauthorized()","commit_id":"6db06dea7a49dd9913e1d9e54e6a0eff33ec9f8f"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"929c16e649065e96bf7929fae4f2f632b343ea63","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        obj \u003d object.__getattribute__(self, name)"},{"line_number":124,"context_line":"        if callable(obj):"},{"line_number":125,"context_line":"            obj \u003d object.__getattribute__(self, \u0027proxy\u0027)(obj)"},{"line_number":126,"context_line":"        return obj"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    def proxy(self, obj):"},{"line_number":129,"context_line":"        def wrapper(*args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_f2074b7f","line":126,"in_reply_to":"dab17558_1cd2e634","updated":"2016-05-12 15:32:35.000000000","message":"Oh after rereading I guess you already know that.\n\nI tried to see if python-novaclient implements such method but i can\u0027t find it","commit_id":"6db06dea7a49dd9913e1d9e54e6a0eff33ec9f8f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"f03fc63c7e97f8746d78fed84b4f757693b89979","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        obj \u003d object.__getattribute__(self, name)"},{"line_number":124,"context_line":"        if callable(obj):"},{"line_number":125,"context_line":"            obj \u003d object.__getattribute__(self, \u0027proxy\u0027)(obj)"},{"line_number":126,"context_line":"        return obj"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    def proxy(self, obj):"},{"line_number":129,"context_line":"        def wrapper(*args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_b24ae3aa","line":126,"in_reply_to":"dab17558_1cd2e634","updated":"2016-05-12 15:35:02.000000000","message":"Yeah, never mind my comment... I was confusing the way this works with something entirely different (the API middleware stuff..)","commit_id":"6db06dea7a49dd9913e1d9e54e6a0eff33ec9f8f"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"d954e41fddef425255fd9588e4be709bb20ec927","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        obj \u003d object.__getattribute__(self, name)"},{"line_number":124,"context_line":"        if callable(obj):"},{"line_number":125,"context_line":"            obj \u003d object.__getattribute__(self, \u0027proxy\u0027)(obj)"},{"line_number":126,"context_line":"        return obj"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    def proxy(self, obj):"},{"line_number":129,"context_line":"        def wrapper(*args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_1cd2e634","line":126,"in_reply_to":"dab17558_de9216f6","updated":"2016-05-12 14:56:11.000000000","message":"Hum I don\u0027t think so, from what I know the method __call__ is used when we use an object as a function like [1]:\n\n   o \u003d ClientWrapper(...)\n   o(foo, bar)\n\nOr I do not understand your thinking ?\n\n[1] https://docs.python.org/2/reference/datamodel.html#object.__call__","commit_id":"6db06dea7a49dd9913e1d9e54e6a0eff33ec9f8f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3eea75a5e41e31f2fab5acd9cd291e2b09dd0b83","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            try:"},{"line_number":96,"context_line":"                ret \u003d obj(*args, **kwargs)"},{"line_number":97,"context_line":"            except neutron_client_exc.Unauthorized:"},{"line_number":98,"context_line":"                # Token is expired so Neutron is raising a"},{"line_number":99,"context_line":"                # unauthorized exception, we should convert it to"},{"line_number":100,"context_line":"                # raise a 401 which will be returned to novaclient to"},{"line_number":101,"context_line":"                # generate new token according credentials and process"}],"source_content_type":"text/x-python","patch_set":12,"id":"3aaa91ec_da33c060","line":98,"range":{"start_line":98,"start_character":18,"end_line":98,"end_character":34},"updated":"2016-06-24 01:36:52.000000000","message":"Or the credentials in nova.conf just aren\u0027t correct for connecting to neutron...several of the bugs for this fall into that scenario.","commit_id":"b2371d3de73d517b7f16fbe7fdbbc9b336aa7dca"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"8b65dbe04543d4fc233c32e87b0761ca5bdd88d8","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        def wrapper(*args, **kwargs):"},{"line_number":95,"context_line":"            try:"},{"line_number":96,"context_line":"                ret \u003d obj(*args, **kwargs)"},{"line_number":97,"context_line":"            except neutron_client_exc.Unauthorized:"},{"line_number":98,"context_line":"                # Token is expired or the credentials in nova.conf"},{"line_number":99,"context_line":"                # aren\u0027t correct for connecting so Neutron is raising"},{"line_number":100,"context_line":"                # a unauthorized exception, we should convert it to"}],"source_content_type":"text/x-python","patch_set":14,"id":"3aaa91ec_816a0880","line":97,"updated":"2016-07-01 15:12:25.000000000","message":"we could then check for the failures here if auth_from_config was true, and this is where we\u0027d raise different exceptions depending on those results.","commit_id":"d2325937c73431508e841d3e592b18cd24552b4a"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"8b65dbe04543d4fc233c32e87b0761ca5bdd88d8","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    if admin or (context.is_admin and not context.auth_token):"},{"line_number":122,"context_line":"        if not _ADMIN_AUTH:"},{"line_number":123,"context_line":"            _ADMIN_AUTH \u003d _load_auth_plugin(CONF)"},{"line_number":124,"context_line":"        auth_plugin \u003d _ADMIN_AUTH"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    elif context.auth_token:"},{"line_number":127,"context_line":"        auth_plugin \u003d context.get_auth_plugin()"}],"source_content_type":"text/x-python","patch_set":14,"id":"3aaa91ec_c19890cf","line":124,"updated":"2016-07-01 15:12:25.000000000","message":"We can get here either with a valid user supplied context or not. Either way we are pulling from the config file for our creds. This should also set:\n\nauth_from_config \u003d True","commit_id":"d2325937c73431508e841d3e592b18cd24552b4a"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"8b65dbe04543d4fc233c32e87b0761ca5bdd88d8","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        auth_plugin \u003d _ADMIN_AUTH"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    elif context.auth_token:"},{"line_number":127,"context_line":"        auth_plugin \u003d context.get_auth_plugin()"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    if not auth_plugin:"},{"line_number":130,"context_line":"        # We did not get a user token and we should not be using"}],"source_content_type":"text/x-python","patch_set":14,"id":"3aaa91ec_c17ff067","line":127,"updated":"2016-07-01 15:12:25.000000000","message":"We get here if we have a valid user, and passed it in on the wire, so always an interactive session.","commit_id":"d2325937c73431508e841d3e592b18cd24552b4a"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"8b65dbe04543d4fc233c32e87b0761ca5bdd88d8","unresolved":false,"context_lines":[{"line_number":129,"context_line":"    if not auth_plugin:"},{"line_number":130,"context_line":"        # We did not get a user token and we should not be using"},{"line_number":131,"context_line":"        # an admin token so log an error"},{"line_number":132,"context_line":"        raise exception.Unauthorized()"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    return ClientWrapper("},{"line_number":135,"context_line":"        clientv20.Client(session\u003d_SESSION,"}],"source_content_type":"text/x-python","patch_set":14,"id":"3aaa91ec_c13410ae","line":132,"updated":"2016-07-01 15:12:25.000000000","message":"When can this happen? If we came in from the wire we\u0027ll always have an auth_token. This seems like this could only be caused by periodic jobs trying to do things not as an admin? This seems like dedicated logging here before this exception would be in order.","commit_id":"d2325937c73431508e841d3e592b18cd24552b4a"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"8b65dbe04543d4fc233c32e87b0761ca5bdd88d8","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        clientv20.Client(session\u003d_SESSION,"},{"line_number":136,"context_line":"                         auth\u003dauth_plugin,"},{"line_number":137,"context_line":"                         endpoint_override\u003dCONF.neutron.url,"},{"line_number":138,"context_line":"                         region_name\u003dCONF.neutron.region_name))"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"def _is_not_duplicate(item, items, items_list_name, instance):"}],"source_content_type":"text/x-python","patch_set":14,"id":"3aaa91ec_41494032","line":138,"updated":"2016-07-01 15:12:25.000000000","message":"if we add a ClientWrapper parameter which is auth_from_config or something, we could pass it here.","commit_id":"d2325937c73431508e841d3e592b18cd24552b4a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a4237fab6a0c67a76d105b9181c8c9275f1cc9e8","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        def wrapper(*args, **kwargs):"},{"line_number":93,"context_line":"            try:"},{"line_number":94,"context_line":"                ret \u003d obj(*args, **kwargs)"},{"line_number":95,"context_line":"            except neutron_client_exc.Unauthorized:"},{"line_number":96,"context_line":"                if not self.admin:"},{"line_number":97,"context_line":"                    # Token is expired so Neutron is raising a"},{"line_number":98,"context_line":"                    # unauthorized exception, we should convert it to"}],"source_content_type":"text/x-python","patch_set":16,"id":"fad55976_6326d969","line":95,"range":{"start_line":95,"start_character":38,"end_line":95,"end_character":50},"updated":"2016-07-16 00:14:55.000000000","message":"This handles the 401. We also have stuff like bug 1603592 where we get a 403 because neutron policy fails on something, in the case of that bug the user can\u0027t create a port.\n\nI guess we could just handle 403 in a follow-on change.","commit_id":"80d39a65062a424c9efe42257a38a09c6af2f3e9"}],"nova/tests/functional/api_sample_tests/test_networks.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"76a70fe10fd01c12ce50e07a80455912a765e770","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        response \u003d self._do_get(\u0027os-networks/%s\u0027 % uuid)"},{"line_number":68,"context_line":"        self._verify_response(\u0027network-show-resp\u0027, {}, response, 200)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    @mock.patch(\u0027nova.network.api.API.get\u0027, side_effect\u003dexception.Unauthorized)"},{"line_number":71,"context_line":"    def test_network_show_token_expired(self, mock_get):"},{"line_number":72,"context_line":"        uuid \u003d test_networks.FAKE_NETWORKS[0][\u0027uuid\u0027]"},{"line_number":73,"context_line":"        response \u003d self._do_get(\u0027os-networks/%s\u0027 % uuid)"}],"source_content_type":"text/x-python","patch_set":16,"id":"dada55a8_9d224a00","line":70,"range":{"start_line":70,"start_character":17,"end_line":70,"end_character":37},"updated":"2016-07-22 21:20:25.000000000","message":"I realize this is just for testing out the REST API error handling, I just needed to point out that this is nova-network. We could maybe use the nova.tests.fixtures.NeutronFixture but it might be more work than it\u0027s worth for this.","commit_id":"80d39a65062a424c9efe42257a38a09c6af2f3e9"}]}
