)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"78156541807fa10d3d3763eac2eff6ce0c684188","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"With the addition of working endpoints, basic_http.yaml is extended with"},{"line_number":33,"context_line":"more complete testing of basic http behaviors. Tests for"},{"line_number":34,"context_line":"resource_providers are in resource-provicer.yaml."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"Change-Id: I799d839101af78b4d89aca175f647efc2b56c401"},{"line_number":37,"context_line":"Partially-Implements: blueprint generic-resource-pools"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":54,"id":"bacf61ea_2dcb6ea5","line":34,"updated":"2016-08-07 17:49:41.000000000","message":"s/provicer/provider","commit_id":"a86c38b1b6a15047f2560f5e5288f7d9c18a5d50"}],"nova/api/openstack/placement/deploy.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"78156541807fa10d3d3763eac2eff6ce0c684188","unresolved":false,"context_lines":[{"line_number":25,"context_line":"NAME \u003d \"nova\""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"# Make sure that objects are registers for this running of the"},{"line_number":29,"context_line":"# placement API."},{"line_number":30,"context_line":"# NOTE(cdent): This means that objects are restricted from being"},{"line_number":31,"context_line":"# used at the module level in the placement package."}],"source_content_type":"text/x-python","patch_set":54,"id":"bacf61ea_adb75e1f","line":28,"updated":"2016-08-07 17:49:41.000000000","message":"s/registers/registered/","commit_id":"a86c38b1b6a15047f2560f5e5288f7d9c18a5d50"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"78156541807fa10d3d3763eac2eff6ce0c684188","unresolved":false,"context_lines":[{"line_number":28,"context_line":"# Make sure that objects are registers for this running of the"},{"line_number":29,"context_line":"# placement API."},{"line_number":30,"context_line":"# NOTE(cdent): This means that objects are restricted from being"},{"line_number":31,"context_line":"# used at the module level in the placement package."},{"line_number":32,"context_line":"objects.register_all()"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":54,"id":"bacf61ea_0d394aa4","line":31,"updated":"2016-08-07 17:49:41.000000000","message":"What precisely do you mean by the above NOTE?","commit_id":"a86c38b1b6a15047f2560f5e5288f7d9c18a5d50"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"5d3dfb3284258f54e28280adc5a368efd425fbba","unresolved":false,"context_lines":[{"line_number":28,"context_line":"# Make sure that objects are registers for this running of the"},{"line_number":29,"context_line":"# placement API."},{"line_number":30,"context_line":"# NOTE(cdent): This means that objects are restricted from being"},{"line_number":31,"context_line":"# used at the module level in the placement package."},{"line_number":32,"context_line":"objects.register_all()"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":54,"id":"bacf61ea_cdfa9242","line":31,"in_reply_to":"bacf61ea_0d394aa4","updated":"2016-08-07 18:39:10.000000000","message":"This is a pasto that\u0027s the result of refectoring. It was briefly the case that the register_all was within the deploy method and thus, within the placement package, the resource provider objects were only available if the service had been deployed. This is no longer true, so I\u0027ll clean this up when I get the other things.","commit_id":"a86c38b1b6a15047f2560f5e5288f7d9c18a5d50"}],"nova/api/openstack/placement/handler.py":[{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"66c564110808e40308b76063820674631e27b0c4","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        self._selector.add(\u0027/{uuid:segment}[/]\u0027,"},{"line_number":69,"context_line":"                           GET\u003dresource_provider.get_resource_provider,"},{"line_number":70,"context_line":"                           DELETE\u003dresource_provider.delete_resource_provider,"},{"line_number":71,"context_line":"                           PUT\u003dresource_provider.update_resource_provider)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def __call__(self, environ, start_response):"},{"line_number":74,"context_line":"        # All requests require admin"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a9d85d2_5ac74d12","line":71,"updated":"2016-06-20 14:14:49.000000000","message":"Where is the resource_provider portion of the path declared? That\u0027s not obvious to me.","commit_id":"27016b47d780f80df0790dcaa2d109445a5cce1b"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"9ad0dd1f603703aef075d9612344c4b16e0d7337","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        self._selector.add(\u0027/{uuid:segment}[/]\u0027,"},{"line_number":69,"context_line":"                           GET\u003dresource_provider.get_resource_provider,"},{"line_number":70,"context_line":"                           DELETE\u003dresource_provider.delete_resource_provider,"},{"line_number":71,"context_line":"                           PUT\u003dresource_provider.update_resource_provider)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def __call__(self, environ, start_response):"},{"line_number":74,"context_line":"        # All requests require admin"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a9d85d2_7ee119d0","line":71,"in_reply_to":"5a9d85d2_5959095a","updated":"2016-06-21 15:40:40.000000000","message":"hmmm... I don\u0027t think we want to do it that way. We really should have /resource_providers in the path on the app side otherwise things are going to be a bit weird.\n\nCan\u0027t we bypass auth for / in the middleware itself?","commit_id":"27016b47d780f80df0790dcaa2d109445a5cce1b"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"fe48c06abfebf2dcfa6d68adda2f2e011cbc245d","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        self._selector.add(\u0027/{uuid:segment}[/]\u0027,"},{"line_number":69,"context_line":"                           GET\u003dresource_provider.get_resource_provider,"},{"line_number":70,"context_line":"                           DELETE\u003dresource_provider.delete_resource_provider,"},{"line_number":71,"context_line":"                           PUT\u003dresource_provider.update_resource_provider)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def __call__(self, environ, start_response):"},{"line_number":74,"context_line":"        # All requests require admin"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a9d85d2_5959095a","line":71,"in_reply_to":"5a9d85d2_5ac74d12","updated":"2016-06-20 20:06:37.000000000","message":"In paste.ini, which is part of why I want to get rid of paste.\n\nBasically if reusing the paste pipeline for auth, and we want noauth at / but auth at /resource_providers splitting into two apps was the easy way to go.\n\nIf paste gets removed that will change and the routing will get a bit more obvious (whether it is selector or something else).","commit_id":"27016b47d780f80df0790dcaa2d109445a5cce1b"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"73849187a32953116249e102fa5023a8934d9113","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        self._selector.add(\u0027/{uuid:segment}[/]\u0027,"},{"line_number":69,"context_line":"                           GET\u003dresource_provider.get_resource_provider,"},{"line_number":70,"context_line":"                           DELETE\u003dresource_provider.delete_resource_provider,"},{"line_number":71,"context_line":"                           PUT\u003dresource_provider.update_resource_provider)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def __call__(self, environ, start_response):"},{"line_number":74,"context_line":"        # All requests require admin"}],"source_content_type":"text/x-python","patch_set":11,"id":"3aaa91ec_42bf4dfb","line":71,"in_reply_to":"5a9d85d2_7ee119d0","updated":"2016-06-22 13:22:33.000000000","message":"Yes that\u0027s the plan, see my response to you on the microversion patch.","commit_id":"27016b47d780f80df0790dcaa2d109445a5cce1b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"75c839b4a5771c460d3b930f8b584024cbbc9d01","unresolved":false,"context_lines":[{"line_number":80,"context_line":"                \u0027admin required\u0027, json_formatter\u003dutil.json_error_formatter)"},{"line_number":81,"context_line":"        try:"},{"line_number":82,"context_line":"            return self._selector(environ, start_response)"},{"line_number":83,"context_line":"        # Trap the small number of nova exceptions that aren\u0027t"},{"line_number":84,"context_line":"        # caught elsewhere and transform them into webob.exc."},{"line_number":85,"context_line":"        except exception.NotFound as exc:"},{"line_number":86,"context_line":"            raise webob.exc.HTTPNotFound("}],"source_content_type":"text/x-python","patch_set":11,"id":"3aaa91ec_9055b4fb","line":83,"updated":"2016-06-23 15:19:32.000000000","message":"Hmm, so nova-api today decorates each method with something like:\n\n@extensions.expected_errors((400, 403, 404))\n\nSo that if something slips through there it\u0027s a 500, and in some cases prompts a microversion change to return different error codes:\n\nhttp://docs.openstack.org/developer/nova/api_microversion_dev.html#when-do-i-need-a-new-microversion\n\nThose always seem debatable though, but I think the point was to make sure we knew exactly what we allowed in and out of the API. Handling stuff globally would be easier but then we don\u0027t have as good a grasp on what the methods in the placement API are returning.","commit_id":"27016b47d780f80df0790dcaa2d109445a5cce1b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"05c49ba3876abff2e0511d665383f81f69a71d72","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        \u0027GET\u0027: resource_provider.get_resource_provider,"},{"line_number":46,"context_line":"        \u0027DELETE\u0027: resource_provider.delete_resource_provider,"},{"line_number":47,"context_line":"        \u0027PUT\u0027: resource_provider.update_resource_provider"},{"line_number":48,"context_line":"    }"},{"line_number":49,"context_line":"}"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"1aa78d24_cc3050eb","line":48,"updated":"2016-07-05 21:08:14.000000000","message":"Need a trailing comma here.","commit_id":"1b0006ffa56fc696a0847fcb262552aafca0e86d"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"18794ce532eecd0e3f779fa29d5ad0a4d2345817","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        \u0027GET\u0027: resource_provider.get_resource_provider,"},{"line_number":46,"context_line":"        \u0027DELETE\u0027: resource_provider.delete_resource_provider,"},{"line_number":47,"context_line":"        \u0027PUT\u0027: resource_provider.update_resource_provider"},{"line_number":48,"context_line":"    }"},{"line_number":49,"context_line":"}"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"1aa78d24_6c595cfe","line":48,"in_reply_to":"1aa78d24_cc3050eb","updated":"2016-07-05 21:15:31.000000000","message":"Done","commit_id":"1b0006ffa56fc696a0847fcb262552aafca0e86d"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"78156541807fa10d3d3763eac2eff6ce0c684188","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"# URLs and Handlers"},{"line_number":36,"context_line":"# NOTE(cdent): When adding URLs here, do not use regex patterns in"},{"line_number":37,"context_line":"# the path parameters (e.g. {uuid}) as that will lead to 404s that"},{"line_number":38,"context_line":"# are unable to include specific information on the why of the 404."},{"line_number":39,"context_line":"ROUTE_DECLARATIONS \u003d {"},{"line_number":40,"context_line":"    \u0027/\u0027: {"}],"source_content_type":"text/x-python","patch_set":54,"id":"bacf61ea_6dc1e67f","line":37,"updated":"2016-08-07 17:49:41.000000000","message":"But you use {uuid} in a URL below on line 47?","commit_id":"a86c38b1b6a15047f2560f5e5288f7d9c18a5d50"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"5d3dfb3284258f54e28280adc5a368efd425fbba","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"# URLs and Handlers"},{"line_number":36,"context_line":"# NOTE(cdent): When adding URLs here, do not use regex patterns in"},{"line_number":37,"context_line":"# the path parameters (e.g. {uuid}) as that will lead to 404s that"},{"line_number":38,"context_line":"# are unable to include specific information on the why of the 404."},{"line_number":39,"context_line":"ROUTE_DECLARATIONS \u003d {"},{"line_number":40,"context_line":"    \u0027/\u0027: {"}],"source_content_type":"text/x-python","patch_set":54,"id":"bacf61ea_adf59e51","line":37,"in_reply_to":"bacf61ea_6dc1e67f","updated":"2016-08-07 18:39:10.000000000","message":"Ah yeah, that\u0027s unclear, what I mean is don\u0027t use a regex in a path parameter, an example of a path parameter is {uuid}. I\u0027ll change that to be an example that includes a regex, which would be something like:\n\n   {uuid:[0-9a-zA-Z-]+}\n\nWill fix.","commit_id":"a86c38b1b6a15047f2560f5e5288f7d9c18a5d50"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"fcd8080766f69c68e9435818de5b28fa62359e15","unresolved":false,"context_lines":[{"line_number":129,"context_line":"            return dispatch(environ, start_response, self._map)"},{"line_number":130,"context_line":"        # Trap the small number of nova exceptions that aren\u0027t"},{"line_number":131,"context_line":"        # caught elsewhere and transform them into webob.exc."},{"line_number":132,"context_line":"        except exception.NotFound as exc:"},{"line_number":133,"context_line":"            raise webob.exc.HTTPNotFound("},{"line_number":134,"context_line":"                exc, json_formatter\u003dutil.json_error_formatter)"}],"source_content_type":"text/x-python","patch_set":56,"id":"9ad45d7e_7ac1782e","line":132,"range":{"start_line":132,"start_character":8,"end_line":132,"end_character":41},"updated":"2016-08-08 13:08:42.000000000","message":"The source of leaking unexpected error?","commit_id":"a7c6a9155d013b8663ccc61dbb8f3b34c4513f78"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"7732e8e75cb39b63ae0ac5e27d3e63e43c0f0ccc","unresolved":false,"context_lines":[{"line_number":129,"context_line":"            return dispatch(environ, start_response, self._map)"},{"line_number":130,"context_line":"        # Trap the small number of nova exceptions that aren\u0027t"},{"line_number":131,"context_line":"        # caught elsewhere and transform them into webob.exc."},{"line_number":132,"context_line":"        except exception.NotFound as exc:"},{"line_number":133,"context_line":"            raise webob.exc.HTTPNotFound("},{"line_number":134,"context_line":"                exc, json_formatter\u003dutil.json_error_formatter)"}],"source_content_type":"text/x-python","patch_set":56,"id":"9ad45d7e_9a2f0ca1","line":132,"in_reply_to":"9ad45d7e_7ac1782e","updated":"2016-08-08 13:30:52.000000000","message":"They are not unexpected. Basically there are a variety of places in the handlers (those here and those in followup patches) where objects.\u003csomething\u003e could return NotFound.\n\nI\u0027ll make the comment more explicit.","commit_id":"a7c6a9155d013b8663ccc61dbb8f3b34c4513f78"}],"nova/api/openstack/placement/handlers/resource_provider.py":[{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"faa08e180ea12e218a7df919c8186713023e35a4","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    try:"},{"line_number":76,"context_line":"        resource_provider.destroy()"},{"line_number":77,"context_line":"    except exception.ObjectActionError as exc:"},{"line_number":78,"context_line":"        if \u0027resources still in use\u0027 in exc.message:"},{"line_number":79,"context_line":"            raise webob.exc.HTTPConflict("},{"line_number":80,"context_line":"                \u0027Unable to delete resource provider %s: %s\u0027 % (uuid, exc),"},{"line_number":81,"context_line":"                json_formatter\u003dutil.json_error_formatter)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3aaa91ec_d04d7c3f","line":78,"range":{"start_line":78,"start_character":11,"end_line":78,"end_character":50},"updated":"2016-06-23 15:22:30.000000000","message":"it would be better to not be string matching here. If we think there are different errors that we are doing different things with, make dedicated exceptions for them.","commit_id":"27016b47d780f80df0790dcaa2d109445a5cce1b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"32046950382a3d12e67c17448cf8f516a185049f","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    try:"},{"line_number":76,"context_line":"        resource_provider.destroy()"},{"line_number":77,"context_line":"    except exception.ObjectActionError as exc:"},{"line_number":78,"context_line":"        if \u0027resources still in use\u0027 in exc.message:"},{"line_number":79,"context_line":"            raise webob.exc.HTTPConflict("},{"line_number":80,"context_line":"                \u0027Unable to delete resource provider %s: %s\u0027 % (uuid, exc),"},{"line_number":81,"context_line":"                json_formatter\u003dutil.json_error_formatter)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3aaa91ec_f0feb8ac","line":78,"range":{"start_line":78,"start_character":11,"end_line":78,"end_character":50},"in_reply_to":"3aaa91ec_d04d7c3f","updated":"2016-06-23 15:24:06.000000000","message":"+1 - this should be a ResourceProviderInUse exception.","commit_id":"27016b47d780f80df0790dcaa2d109445a5cce1b"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"d6a7fc66c6e1dfe33855dd13502686d1cda01cf8","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    try:"},{"line_number":76,"context_line":"        resource_provider.destroy()"},{"line_number":77,"context_line":"    except exception.ObjectActionError as exc:"},{"line_number":78,"context_line":"        if \u0027resources still in use\u0027 in exc.message:"},{"line_number":79,"context_line":"            raise webob.exc.HTTPConflict("},{"line_number":80,"context_line":"                \u0027Unable to delete resource provider %s: %s\u0027 % (uuid, exc),"},{"line_number":81,"context_line":"                json_formatter\u003dutil.json_error_formatter)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1aa78d24_0939e541","line":78,"in_reply_to":"3aaa91ec_f0feb8ac","updated":"2016-07-04 19:50:39.000000000","message":"I\u0027ve figured out why this is still like this: The destroy() method on ResourceProvider object no longer exists, it was removed in one of the several restructurings. I\u0027ll update the commit message and add a failing test so that is more clear.\n\nMore discussion is required on how existing inventory and allocations will impact a desire to delete before it can be implemented.","commit_id":"27016b47d780f80df0790dcaa2d109445a5cce1b"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"78156541807fa10d3d3763eac2eff6ce0c684188","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    req.response.location \u003d util.resource_provider_url("},{"line_number":107,"context_line":"        req.environ, resource_provider)"},{"line_number":108,"context_line":"    req.response.status \u003d 201"},{"line_number":109,"context_line":"    req.response.content_type \u003d None"},{"line_number":110,"context_line":"    return req.response"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":""}],"source_content_type":"text/x-python","patch_set":54,"id":"bacf61ea_8dc6da97","line":109,"updated":"2016-08-07 17:49:41.000000000","message":"We typically return a JSON-ified version of the thing we just created on POST responses, no?","commit_id":"a86c38b1b6a15047f2560f5e5288f7d9c18a5d50"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"c872df781edfa7236c106b42c72f5e163ce70388","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    req.response.location \u003d util.resource_provider_url("},{"line_number":107,"context_line":"        req.environ, resource_provider)"},{"line_number":108,"context_line":"    req.response.status \u003d 201"},{"line_number":109,"context_line":"    req.response.content_type \u003d None"},{"line_number":110,"context_line":"    return req.response"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":""}],"source_content_type":"text/x-python","patch_set":54,"id":"9ad45d7e_421485f4","line":109,"in_reply_to":"bacf61ea_6d8606ba","updated":"2016-08-08 15:45:58.000000000","message":"Nah, no need. Fair point.","commit_id":"a86c38b1b6a15047f2560f5e5288f7d9c18a5d50"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"5d3dfb3284258f54e28280adc5a368efd425fbba","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    req.response.location \u003d util.resource_provider_url("},{"line_number":107,"context_line":"        req.environ, resource_provider)"},{"line_number":108,"context_line":"    req.response.status \u003d 201"},{"line_number":109,"context_line":"    req.response.content_type \u003d None"},{"line_number":110,"context_line":"    return req.response"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":""}],"source_content_type":"text/x-python","patch_set":54,"id":"bacf61ea_6d8606ba","line":109,"in_reply_to":"bacf61ea_8dc6da97","updated":"2016-08-07 18:39:10.000000000","message":"In the spec http://specs.openstack.org/openstack/nova-specs/specs/newton/approved/generic-resource-pools.html#post-resource-providers we\u0027ve got \"The response body is empty. The headers include a location header pointing to the created resource provider\"\n\nIf I remember correctly the rationale there was because since we\u0027re only sending a name and maybe a uuid, getting back a name and uuid is not terribly exciting. We can follow $LOCATION to get the hyperlinks to other resources if we want to be hypermedia about it.\n\nEasy to change, though, if we want.","commit_id":"a86c38b1b6a15047f2560f5e5288f7d9c18a5d50"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"fcd8080766f69c68e9435818de5b28fa62359e15","unresolved":false,"context_lines":[{"line_number":29,"context_line":"            \"type\": \"string\""},{"line_number":30,"context_line":"        },"},{"line_number":31,"context_line":"        \"uuid\": {"},{"line_number":32,"context_line":"            \"type\": \"string\""},{"line_number":33,"context_line":"        }"},{"line_number":34,"context_line":"    },"},{"line_number":35,"context_line":"    \"required\": ["}],"source_content_type":"text/x-python","patch_set":56,"id":"9ad45d7e_9a76ec3c","line":32,"updated":"2016-08-08 13:08:42.000000000","message":"you should validate the invalid UUID","commit_id":"a7c6a9155d013b8663ccc61dbb8f3b34c4513f78"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"7732e8e75cb39b63ae0ac5e27d3e63e43c0f0ccc","unresolved":false,"context_lines":[{"line_number":29,"context_line":"            \"type\": \"string\""},{"line_number":30,"context_line":"        },"},{"line_number":31,"context_line":"        \"uuid\": {"},{"line_number":32,"context_line":"            \"type\": \"string\""},{"line_number":33,"context_line":"        }"},{"line_number":34,"context_line":"    },"},{"line_number":35,"context_line":"    \"required\": ["}],"source_content_type":"text/x-python","patch_set":56,"id":"9ad45d7e_f5b45bd2","line":32,"in_reply_to":"9ad45d7e_9a76ec3c","updated":"2016-08-08 13:30:52.000000000","message":"thanks","commit_id":"a7c6a9155d013b8663ccc61dbb8f3b34c4513f78"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"fcd8080766f69c68e9435818de5b28fa62359e15","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    req.response.location \u003d util.resource_provider_url("},{"line_number":107,"context_line":"        req.environ, resource_provider)"},{"line_number":108,"context_line":"    req.response.status \u003d 201"},{"line_number":109,"context_line":"    req.response.content_type \u003d None"},{"line_number":110,"context_line":"    return req.response"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":""}],"source_content_type":"text/x-python","patch_set":56,"id":"9ad45d7e_da034475","line":109,"range":{"start_line":109,"start_character":32,"end_line":109,"end_character":36},"updated":"2016-08-08 13:08:42.000000000","message":"why this is None, not \u0027application/json\u0027?","commit_id":"a7c6a9155d013b8663ccc61dbb8f3b34c4513f78"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"d8b77ebc77cfc91a45cc5882d722eb88b721015f","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    req.response.location \u003d util.resource_provider_url("},{"line_number":107,"context_line":"        req.environ, resource_provider)"},{"line_number":108,"context_line":"    req.response.status \u003d 201"},{"line_number":109,"context_line":"    req.response.content_type \u003d None"},{"line_number":110,"context_line":"    return req.response"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":""}],"source_content_type":"text/x-python","patch_set":56,"id":"9ad45d7e_353713e5","line":109,"range":{"start_line":109,"start_character":32,"end_line":109,"end_character":36},"in_reply_to":"9ad45d7e_da034475","updated":"2016-08-08 13:15:25.000000000","message":"Ah, I know now, the body is empty","commit_id":"a7c6a9155d013b8663ccc61dbb8f3b34c4513f78"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"7732e8e75cb39b63ae0ac5e27d3e63e43c0f0ccc","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    req.response.location \u003d util.resource_provider_url("},{"line_number":107,"context_line":"        req.environ, resource_provider)"},{"line_number":108,"context_line":"    req.response.status \u003d 201"},{"line_number":109,"context_line":"    req.response.content_type \u003d None"},{"line_number":110,"context_line":"    return req.response"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":""}],"source_content_type":"text/x-python","patch_set":56,"id":"9ad45d7e_d5dcb71a","line":109,"in_reply_to":"9ad45d7e_da034475","updated":"2016-08-08 13:30:52.000000000","message":"yeah, no body, you figured this one out","commit_id":"a7c6a9155d013b8663ccc61dbb8f3b34c4513f78"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"fcd8080766f69c68e9435818de5b28fa62359e15","unresolved":false,"context_lines":[{"line_number":167,"context_line":"    resource_provider \u003d objects.ResourceProvider.get_by_uuid("},{"line_number":168,"context_line":"        context, uuid)"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    data \u003d _extract_resource_provider(req.body)"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    resource_provider.name \u003d data[\u0027name\u0027]"},{"line_number":173,"context_line":""}],"source_content_type":"text/x-python","patch_set":56,"id":"9ad45d7e_3aa0a090","line":170,"updated":"2016-08-08 13:08:42.000000000","message":"This share same json-schema with POST method, that means I can input a uuid, but nothing will update.","commit_id":"a7c6a9155d013b8663ccc61dbb8f3b34c4513f78"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"7732e8e75cb39b63ae0ac5e27d3e63e43c0f0ccc","unresolved":false,"context_lines":[{"line_number":167,"context_line":"    resource_provider \u003d objects.ResourceProvider.get_by_uuid("},{"line_number":168,"context_line":"        context, uuid)"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    data \u003d _extract_resource_provider(req.body)"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    resource_provider.name \u003d data[\u0027name\u0027]"},{"line_number":173,"context_line":""}],"source_content_type":"text/x-python","patch_set":56,"id":"9ad45d7e_f99a95c4","line":170,"in_reply_to":"9ad45d7e_3aa0a090","updated":"2016-08-08 13:30:52.000000000","message":"Yeah, I was leaving that as \"we can safely ignore\" but that violates some of the discussions we\u0027ve had in api-wg about strict validation, so I\u0027ll fix.","commit_id":"a7c6a9155d013b8663ccc61dbb8f3b34c4513f78"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"a193e3dadacce0b5575580e5527005f354c8c334","unresolved":false,"context_lines":[{"line_number":42,"context_line":"}"},{"line_number":43,"context_line":"# Remove uuid to create the schema for PUTting a resource provider"},{"line_number":44,"context_line":"PUT_RESOURCE_PROVIDER_SCHEMA \u003d copy.deepcopy(POST_RESOURCE_PROVIDER_SCHEMA)"},{"line_number":45,"context_line":"PUT_RESOURCE_PROVIDER_SCHEMA[\u0027properties\u0027].pop(\u0027uuid\u0027)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"def _extract_resource_provider(body, schema):"}],"source_content_type":"text/x-python","patch_set":63,"id":"3ac371cc_7e163cf2","line":45,"updated":"2016-08-16 11:40:43.000000000","message":"nit/opinion: I found that our copy/patch model for compute jsonschema got really really out of control in figuring out what was going on. Blowing the whole thing out is a biteasier for understanding.","commit_id":"78765b6004b1865de5aa6f2c3c653829c3f3ffa4"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"a193e3dadacce0b5575580e5527005f354c8c334","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        req.environ, resource_provider)"},{"line_number":220,"context_line":"    req.response.status \u003d 204"},{"line_number":221,"context_line":"    req.response.content_type \u003d None"},{"line_number":222,"context_line":"    return req.response"}],"source_content_type":"text/x-python","patch_set":63,"id":"3ac371cc_5ed26001","line":222,"updated":"2016-08-16 11:40:43.000000000","message":"location + 204 doesn\u0027t look like an RFC use for location header - https://tools.ietf.org/html/rfc7231#section-7.1.2 - which only talks about 201 and 3xx. \n\nCan we just return the content in the body instead with a 200.","commit_id":"78765b6004b1865de5aa6f2c3c653829c3f3ffa4"}],"nova/api/openstack/placement/util.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"409d75df33d7fd6fbd50dc89f5d536918a84c656","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    # NOTE(cdent): For the time being we don\u0027t need to urldecode"},{"line_number":76,"context_line":"    # the value as the entire placement API has paths that accept no"},{"line_number":77,"context_line":"    # encode values."},{"line_number":78,"context_line":"    return environ[\u0027wsgiorg.routing_args\u0027][1][name]"}],"source_content_type":"text/x-python","patch_set":11,"id":"3aaa91ec_76a2c04c","line":78,"updated":"2016-06-23 15:50:32.000000000","message":"Don\u0027t we need to avoid KeyError here?","commit_id":"27016b47d780f80df0790dcaa2d109445a5cce1b"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"7f994492ea2ac7226743cf078a6dd8e68c0473bd","unresolved":false,"context_lines":[{"line_number":87,"context_line":""},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"def resource_provider_url(resource_provider):"},{"line_number":90,"context_line":"    # TODO(cdent): fully qualify? prefix?"},{"line_number":91,"context_line":"    return \u0027/resource_providers/%s\u0027 % resource_provider.uuid"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"1aa78d24_4f2e0d44","line":90,"updated":"2016-07-06 00:41:55.000000000","message":"Use environ[\u0027SCRIPT_NAME\u0027] here to establish the prefix (in the next patchset, tomorrow).","commit_id":"c50393a25ebb77e61cf3f6c557614e0c090ddd24"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"3f552a6346fe3a7ec2c390ca86bd8d4629d8502f","unresolved":false,"context_lines":[{"line_number":27,"context_line":"# needs to be imported when jsonschema is doing validation this works."},{"line_number":28,"context_line":"@jsonschema.FormatChecker.cls_checks(\u0027uuid\u0027)"},{"line_number":29,"context_line":"def _validate_uuid_format(instance):"},{"line_number":30,"context_line":"    return uuidutils.is_uuid_like(instance)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"def check_accept(*types):"}],"source_content_type":"text/x-python","patch_set":59,"id":"9ad45d7e_3c9aa0b9","line":30,"updated":"2016-08-11 13:21:00.000000000","message":"nit: for people not familiar with the fact that jsonschema uses decorators to modify itself from other functions, this is super confusing. I also expect a bunch of code cleanup tools will see this as a dangling reference. \n\nMight be worth being super explicit that this should not be deleted even though it doesn\u0027t look like it\u0027s used.","commit_id":"b8606065323250049729584cb29bef3be28fe6a2"}],"nova/tests/unit/api/openstack/placement/test_util.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"78156541807fa10d3d3763eac2eff6ce0c684188","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        expected_url \u003d (\u0027/placement/resource_providers/%s\u0027"},{"line_number":40,"context_line":"                        % uuidsentinel.rp_uuid)"},{"line_number":41,"context_line":"        self.assertEqual(expected_url, util.resource_provider_url("},{"line_number":42,"context_line":"            environ, self.resource_provider))"}],"source_content_type":"text/x-python","patch_set":54,"id":"bacf61ea_cdbc5208","line":42,"updated":"2016-08-07 17:49:41.000000000","message":"Please also add unit tests for require_content() and check_accept() in the util module. Or were you essentially stating that check_accept() and require_content() were already adequately unit-test-covered by their use in the gabbi functional tests?","commit_id":"a86c38b1b6a15047f2560f5e5288f7d9c18a5d50"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"5d3dfb3284258f54e28280adc5a368efd425fbba","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        expected_url \u003d (\u0027/placement/resource_providers/%s\u0027"},{"line_number":40,"context_line":"                        % uuidsentinel.rp_uuid)"},{"line_number":41,"context_line":"        self.assertEqual(expected_url, util.resource_provider_url("},{"line_number":42,"context_line":"            environ, self.resource_provider))"}],"source_content_type":"text/x-python","patch_set":54,"id":"bacf61ea_2db7ee85","line":42,"in_reply_to":"bacf61ea_cdbc5208","updated":"2016-08-07 18:39:10.000000000","message":"The gabbi tests do cover them, but happy to make it more explicit if that makes people happy. If this gets broken up into smaller patches, then having the util module full unit testsed would make sense.","commit_id":"a86c38b1b6a15047f2560f5e5288f7d9c18a5d50"}]}
