)]}'
{"nova/api/openstack/placement/handlers/claim.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a635fb014688083ac8c38f272a5d0ff001bc921c","unresolved":false,"context_lines":[{"line_number":62,"context_line":"@webob.dec.wsgify"},{"line_number":63,"context_line":"@util.require_content(\u0027application/json\u0027)"},{"line_number":64,"context_line":"def post_claim(req):"},{"line_number":65,"context_line":"    \"\"\"POST to claiming resources"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    On success return a 200 response with a list of Resource Providers UUIDs"},{"line_number":68,"context_line":"    matching the resource amount requests plus a Content-Location header"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a71b18c_aa981e79","line":65,"updated":"2016-12-06 19:09:09.000000000","message":"This is not claiming resources. Claiming resources involves creating allocation records in the placement API and returning the provider information for each provider that had resources allocated against it.","commit_id":"a0b75a4d235a99d38f8ef8562a112038c7b390d8"}],"nova/api/openstack/placement/handlers/request.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"119194ab264951f4ca7303990f7bcd43eda3e5d5","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"def _serialize_resource_providers(rp_uuids):"},{"line_number":48,"context_line":"    return {\u0027resource_providers\u0027: rp_uuids}"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"def _send_resource_providers(req, resource_providers):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a71b18c_e5d5e0e4","line":48,"updated":"2016-12-06 22:45:05.000000000","message":"Instead of just returning a list of UUIDs, I can return a list of dicts like :\n\n {\u0027rp_uuid\u0027: \u003cuuid\u003e\n  \u0027rp_generation\u0027: \u003cgen\u003e\n  \u0027links\u0027: {\u0027rel\u0027: self, \u0027href\u0027: \u0027/resource_providers/\u003cuuid\u003e\u0027 }}\n\nThoughts?","commit_id":"a7527a672e1a3083c365d3c013726a176bcfe0ad"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"8dae19a15d73720739e53deb70201676e3bf2bcf","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        _serialize_resource_providers(rp_uuids))"},{"line_number":56,"context_line":"    req.response.content_type \u003d \u0027application/json\u0027"},{"line_number":57,"context_line":"    req.response.content_location \u003d _serialize_list_resource_providers_url("},{"line_number":58,"context_line":"        req.environ, rp_uuids)"},{"line_number":59,"context_line":"    return req.response"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a71b18c_6537104d","line":58,"updated":"2016-12-06 22:46:50.000000000","message":"See that, I\u0027m also returning a Content-Location header saying that you could get the RPs using that URL as per RFC7231\n\nhttps://tools.ietf.org/html/rfc7231#section-4.3.3","commit_id":"a7527a672e1a3083c365d3c013726a176bcfe0ad"}],"nova/api/openstack/placement/handlers/resource_provider.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"612d70d51f3a7d99a9630d770119ab0ae1403d4c","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            if attr \u003d\u003d \u0027min_resources\u0027:"},{"line_number":180,"context_line":"                # NOTE(sbauza): We need to decode that dictionary"},{"line_number":181,"context_line":"                try:"},{"line_number":182,"context_line":"                    filters[attr] \u003d jsonutils.loads(req.GET[attr])"},{"line_number":183,"context_line":"                except ValueError:"},{"line_number":184,"context_line":"                    raise webob.exc.HTTPBadRequest("},{"line_number":185,"context_line":"                        _(\u0027Invalid min_resources value: %(res)s\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5da102_796ff52a","line":182,"updated":"2016-11-02 14:28:07.000000000","message":"This is better than some of the alternatives that have been discussed but I don\u0027t see any compelling reason for the json encoding when a collection of \"normal\" GET query parameters could also work.","commit_id":"9c60231edd52417b61f4b101b409140c963f2e85"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"6f529be727e5b56e53c668b354bd349f2e3e98c8","unresolved":false,"context_lines":[{"line_number":177,"context_line":"    for attr in objects.ResourceProviderList.allowed_filters:"},{"line_number":178,"context_line":"        if attr in req.GET:"},{"line_number":179,"context_line":"            if attr \u003d\u003d \u0027min_resources\u0027:"},{"line_number":180,"context_line":"                # NOTE(sbauza): We need to decode that dictionary"},{"line_number":181,"context_line":"                try:"},{"line_number":182,"context_line":"                    resources \u003d jsonutils.loads(req.GET[attr])"},{"line_number":183,"context_line":"                except ValueError:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a629dbe_853401df","line":180,"updated":"2016-11-07 13:55:34.000000000","message":"This could probably just be a comment, not a NOTE, yeah? Explaining that the incoming data is encoded JSON (which, BTW, I still think is a bad idea).","commit_id":"a16d70dea8fd01c63437340e2bd543267813bc48"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"51c338136fb428709080b473ca0bf213ca87e573","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    \"type\": \"object\","},{"line_number":54,"context_line":"    \"properties\": {"},{"line_number":55,"context_line":"        \"name\": {"},{"line_number":56,"context_line":"            \"type\": \"string\""},{"line_number":57,"context_line":"        },"},{"line_number":58,"context_line":"        \"uuid\": {"},{"line_number":59,"context_line":"            \"type\": \"string\","}],"source_content_type":"text/x-python","patch_set":13,"id":"3a71b18c_9b40b609","line":56,"updated":"2016-12-08 14:29:00.000000000","message":"are there any other restrictions on name from a length standpoint?","commit_id":"21d0c5ecacfc59611501b5bce2c6911d8f7a840a"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"fb5ae84c5af9d173e0f9f091d92b4d108b9f772a","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    \"type\": \"object\","},{"line_number":54,"context_line":"    \"properties\": {"},{"line_number":55,"context_line":"        \"name\": {"},{"line_number":56,"context_line":"            \"type\": \"string\""},{"line_number":57,"context_line":"        },"},{"line_number":58,"context_line":"        \"uuid\": {"},{"line_number":59,"context_line":"            \"type\": \"string\","}],"source_content_type":"text/x-python","patch_set":13,"id":"3a71b18c_7cccb161","line":56,"in_reply_to":"3a71b18c_9b40b609","updated":"2016-12-08 15:02:37.000000000","message":"Nothing I can see now","commit_id":"21d0c5ecacfc59611501b5bce2c6911d8f7a840a"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"51c338136fb428709080b473ca0bf213ca87e573","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        },"},{"line_number":58,"context_line":"        \"uuid\": {"},{"line_number":59,"context_line":"            \"type\": \"string\","},{"line_number":60,"context_line":"            \"format\": \"uuid\""},{"line_number":61,"context_line":"        }"},{"line_number":62,"context_line":"    },"},{"line_number":63,"context_line":"    \"additionalProperties\": False,"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a71b18c_3bd8821d","line":60,"updated":"2016-12-08 14:29:00.000000000","message":"This seems to actually make it impossible for \"uuid\u003din:...\" to work. We\u0027ll probably need some alternative approach to validating this. Is there anything canned for that yet?","commit_id":"21d0c5ecacfc59611501b5bce2c6911d8f7a840a"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"fb5ae84c5af9d173e0f9f091d92b4d108b9f772a","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        },"},{"line_number":58,"context_line":"        \"uuid\": {"},{"line_number":59,"context_line":"            \"type\": \"string\","},{"line_number":60,"context_line":"            \"format\": \"uuid\""},{"line_number":61,"context_line":"        }"},{"line_number":62,"context_line":"    },"},{"line_number":63,"context_line":"    \"additionalProperties\": False,"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a71b18c_fc060184","line":60,"in_reply_to":"3a71b18c_3bd8821d","updated":"2016-12-08 15:02:37.000000000","message":"Thanks, excellent point !","commit_id":"21d0c5ecacfc59611501b5bce2c6911d8f7a840a"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"b333061907a69ee458d3ca2277754e30419f08e9","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    \"type\": \"object\","},{"line_number":54,"context_line":"    \"properties\": {"},{"line_number":55,"context_line":"        \"name\": {"},{"line_number":56,"context_line":"            \"type\": \"string\""},{"line_number":57,"context_line":"        },"},{"line_number":58,"context_line":"        \"uuid\": {"},{"line_number":59,"context_line":"            \"type\": \"string\","}],"source_content_type":"text/x-python","patch_set":14,"id":"3a71b18c_3f44eb19","line":56,"updated":"2016-12-08 15:32:49.000000000","message":"Just to follow up on sean\u0027s earlier comments about length restrictions: See: Ia22ae86702dabe18bc577b17164a81c363da6d41 and I5b8c3c175ca617ae7bb82b81b0fe608ae1755b72 which implements length and value checks for some of the POST and PUT operations.\n\nSuch limitations are hard to enforce here because we are allowing the \u0027in:\u0027 syntax. It\u0027s less of an issue here since it\u0027s not a write operation and if you make a bad query all that happens is that you get unexpected results.","commit_id":"eb0b88476cd759273619c095a91651b37ad2c865"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"b333061907a69ee458d3ca2277754e30419f08e9","unresolved":false,"context_lines":[{"line_number":236,"context_line":"        schema \u003d GET_RPS_SCHEMA_1_3"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"    try:"},{"line_number":239,"context_line":"        jsonschema.validate(dict(req.GET), schema,"},{"line_number":240,"context_line":"                            format_checker\u003djsonschema.FormatChecker())"},{"line_number":241,"context_line":"    except jsonschema.ValidationError as exc:"},{"line_number":242,"context_line":"        raise webob.exc.HTTPBadRequest("}],"source_content_type":"text/x-python","patch_set":14,"id":"3a71b18c_3fd4ebbb","line":239,"updated":"2016-12-08 15:32:49.000000000","message":"Using dict(req.GET) here means that we have a different format for representing the query string than is being used in the jsonschema-based parameter validation in the compute api. There \u0027req.GET.dict_of_lists()\u0027 is used and above where \"string\" is used as the type in the schema, an array of strings with an array length of 1 is used.\n\nSee I7d5c353680cafbd59692bd462e9d3f8766021310 for more info.\n\nThe issue here is not that we are exposing different behaviors (they are basically the same) but rather that the structure and type of the schema are different and that could lead to maintenance confusion.","commit_id":"eb0b88476cd759273619c095a91651b37ad2c865"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"c1d6dbddd896c17c8d61b88310ff742730642687","unresolved":false,"context_lines":[{"line_number":236,"context_line":"        schema \u003d GET_RPS_SCHEMA_1_3"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"    try:"},{"line_number":239,"context_line":"        jsonschema.validate(dict(req.GET), schema,"},{"line_number":240,"context_line":"                            format_checker\u003djsonschema.FormatChecker())"},{"line_number":241,"context_line":"    except jsonschema.ValidationError as exc:"},{"line_number":242,"context_line":"        raise webob.exc.HTTPBadRequest("}],"source_content_type":"text/x-python","patch_set":14,"id":"3a71b18c_ea66e1eb","line":239,"in_reply_to":"3a71b18c_2a2ff988","updated":"2016-12-10 21:29:07.000000000","message":"Actually, no, not done... turns out that if I do that, I need to change the JSONSchema to accept lists of strings. And I don\u0027t think that\u0027s appropriate.","commit_id":"eb0b88476cd759273619c095a91651b37ad2c865"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"24352708158df0cac4ecfbc10dd9cb6e130d49a5","unresolved":false,"context_lines":[{"line_number":236,"context_line":"        schema \u003d GET_RPS_SCHEMA_1_3"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"    try:"},{"line_number":239,"context_line":"        jsonschema.validate(dict(req.GET), schema,"},{"line_number":240,"context_line":"                            format_checker\u003djsonschema.FormatChecker())"},{"line_number":241,"context_line":"    except jsonschema.ValidationError as exc:"},{"line_number":242,"context_line":"        raise webob.exc.HTTPBadRequest("}],"source_content_type":"text/x-python","patch_set":14,"id":"3a71b18c_2a2ff988","line":239,"in_reply_to":"3a71b18c_3fd4ebbb","updated":"2016-12-10 21:20:51.000000000","message":"Done","commit_id":"eb0b88476cd759273619c095a91651b37ad2c865"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"c390e79ed577f400ad7f121a4c9e6faa13544e64","unresolved":false,"context_lines":[{"line_number":264,"context_line":"            context, filters)"},{"line_number":265,"context_line":"    except exception.ResourceClassNotFound as exc:"},{"line_number":266,"context_line":"        raise webob.exc.HTTPBadRequest("},{"line_number":267,"context_line":"            _(\u0027Wrong resource name in exc: %(error)s\u0027) %"},{"line_number":268,"context_line":"            {\u0027error\u0027: exc},"},{"line_number":269,"context_line":"            json_formatter\u003dutil.json_error_formatter)"},{"line_number":270,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3a71b18c_0298b61a","line":267,"range":{"start_line":267,"start_character":35,"end_line":267,"end_character":41},"updated":"2016-12-08 15:50:44.000000000","message":"Maybe \"in request\"?","commit_id":"eb0b88476cd759273619c095a91651b37ad2c865"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"24352708158df0cac4ecfbc10dd9cb6e130d49a5","unresolved":false,"context_lines":[{"line_number":264,"context_line":"            context, filters)"},{"line_number":265,"context_line":"    except exception.ResourceClassNotFound as exc:"},{"line_number":266,"context_line":"        raise webob.exc.HTTPBadRequest("},{"line_number":267,"context_line":"            _(\u0027Wrong resource name in exc: %(error)s\u0027) %"},{"line_number":268,"context_line":"            {\u0027error\u0027: exc},"},{"line_number":269,"context_line":"            json_formatter\u003dutil.json_error_formatter)"},{"line_number":270,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3a71b18c_6a53b117","line":267,"range":{"start_line":267,"start_character":35,"end_line":267,"end_character":41},"in_reply_to":"3a71b18c_0298b61a","updated":"2016-12-10 21:20:51.000000000","message":"Done","commit_id":"eb0b88476cd759273619c095a91651b37ad2c865"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"3024ac11718e8e13c710026c8f4321112cdafa9a","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        try:"},{"line_number":106,"context_line":"            rc_name, amount \u003d rt.split(\u0027:\u0027)"},{"line_number":107,"context_line":"            result[rc_name] \u003d int(amount)"},{"line_number":108,"context_line":"        except ValueError:"},{"line_number":109,"context_line":"            msg \u003d _(\u0027Expected resources query string parameter in form: \u0027"},{"line_number":110,"context_line":"                    \u0027?resources\u003dVCPU:2,MEMORY_MB:1024\u0027)"},{"line_number":111,"context_line":"            raise webob.exc.HTTPBadRequest(msg,"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a71b18c_52632e1a","line":108,"updated":"2016-12-09 13:53:44.000000000","message":"Ideally it would be good to tell the user what they did. So actually capture which thing failed and say:\n\nError parsing MEMORY_MB:FOO - FOO is not an integer\n\nAlso, do we have fuzzing for MEMORY_MB:-1?","commit_id":"da4b6203879386378ffe8f75633e03ee0434220d"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"6a1ccfe36bcffb3981a6c9fbe19d5b74c452258a","unresolved":false,"context_lines":[{"line_number":85,"context_line":"    instance that will consume 2 vCPUs, 1024 MB of RAM and 50GB of disk space,"},{"line_number":86,"context_line":"    they would use the following query string:"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        ?resources\u003dVCPU:2,MEMORY_MB:1024:DISK_GB:50"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    The returned value would be:"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"ba5201f7_fe6518e1","line":88,"range":{"start_line":88,"start_character":26,"end_line":88,"end_character":51},"updated":"2017-01-03 07:20:43.000000000","message":"nit, after \"MEMORY:1024\", it should be a \u0027,\u0027, not a \u0027:\u0027\n\nI\u0027m also thinking about traits....Currently a trait like \"HW:CPU:X86:AVX\". so \":\" is special char at here. But maybe it is fine, there isn\u0027t decision about the final naming of trait. And maybe we can have another query parameter at here. And maybe we will have claim API in the future instead of this temp API when traits is ready. so maybe it isn\u0027t worth to worry about it.","commit_id":"4115123f9f60fbde7e2e8b354e0df44fb5d78dbd"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"6a1ccfe36bcffb3981a6c9fbe19d5b74c452258a","unresolved":false,"context_lines":[{"line_number":263,"context_line":"    except jsonschema.ValidationError as exc:"},{"line_number":264,"context_line":"        raise webob.exc.HTTPBadRequest("},{"line_number":265,"context_line":"            _(\u0027Invalid query string parameters: %(exc)s\u0027) %"},{"line_number":266,"context_line":"            {\u0027exc\u0027: exc},"},{"line_number":267,"context_line":"            json_formatter\u003dutil.json_error_formatter)"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    if \u0027uuid\u0027 in req.GET and not uuidutils.is_uuid_like(req.GET[\u0027uuid\u0027]):"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba5201f7_5ed38438","line":266,"updated":"2017-01-03 07:20:43.000000000","message":"Probably we should use \"exc.format_message()\", I can\u0027t remove the reason...we use it all the time. But check that the str(exc) will break for unicode, format_message works fine.","commit_id":"4115123f9f60fbde7e2e8b354e0df44fb5d78dbd"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"33854f5eed85a94cb7cc9a26764aa718e6b16045","unresolved":false,"context_lines":[{"line_number":263,"context_line":"    except jsonschema.ValidationError as exc:"},{"line_number":264,"context_line":"        raise webob.exc.HTTPBadRequest("},{"line_number":265,"context_line":"            _(\u0027Invalid query string parameters: %(exc)s\u0027) %"},{"line_number":266,"context_line":"            {\u0027exc\u0027: exc},"},{"line_number":267,"context_line":"            json_formatter\u003dutil.json_error_formatter)"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    if \u0027uuid\u0027 in req.GET and not uuidutils.is_uuid_like(req.GET[\u0027uuid\u0027]):"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba5201f7_5645eb6d","line":266,"in_reply_to":"ba5201f7_5ed38438","updated":"2017-01-04 16:44:25.000000000","message":"Well, we already do that pattern for all the raised exceptions in that module...","commit_id":"4115123f9f60fbde7e2e8b354e0df44fb5d78dbd"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"6a1ccfe36bcffb3981a6c9fbe19d5b74c452258a","unresolved":false,"context_lines":[{"line_number":283,"context_line":"    except exception.ResourceClassNotFound as exc:"},{"line_number":284,"context_line":"        raise webob.exc.HTTPBadRequest("},{"line_number":285,"context_line":"            _(\u0027Wrong resource name in request: %(error)s\u0027) %"},{"line_number":286,"context_line":"            {\u0027error\u0027: exc},"},{"line_number":287,"context_line":"            json_formatter\u003dutil.json_error_formatter)"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"    response \u003d req.response"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba5201f7_7ed84854","line":286,"range":{"start_line":286,"start_character":22,"end_line":286,"end_character":25},"updated":"2017-01-03 07:20:43.000000000","message":"ditto","commit_id":"4115123f9f60fbde7e2e8b354e0df44fb5d78dbd"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"33854f5eed85a94cb7cc9a26764aa718e6b16045","unresolved":false,"context_lines":[{"line_number":315,"context_line":"    try:"},{"line_number":316,"context_line":"        resource_provider.save()"},{"line_number":317,"context_line":"    except db_exc.DBDuplicateEntry as exc:"},{"line_number":318,"context_line":"        raise webob.exc.HTTPConflict("},{"line_number":319,"context_line":"            _(\u0027Conflicting resource provider already exists: %(error)s\u0027) %"},{"line_number":320,"context_line":"            {\u0027error\u0027: exc},"},{"line_number":321,"context_line":"            json_formatter\u003dutil.json_error_formatter)"},{"line_number":322,"context_line":"    except exception.ObjectActionError as exc:"},{"line_number":323,"context_line":"        raise webob.exc.HTTPBadRequest("},{"line_number":324,"context_line":"            _(\u0027Unable to save resource provider %(rp_uuid)s: %(error)s\u0027) %"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba5201f7_962673cc","line":321,"range":{"start_line":318,"start_character":0,"end_line":321,"end_character":53},"updated":"2017-01-04 16:44:25.000000000","message":"for example, here is how we raise an exception","commit_id":"4115123f9f60fbde7e2e8b354e0df44fb5d78dbd"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"e400aab8e5f1aad2cdabc125b38db079f1bd5795","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        \"uuid\": {"},{"line_number":59,"context_line":"            \"type\": \"string\","},{"line_number":60,"context_line":"        },"},{"line_number":61,"context_line":"        \"member_of\": {"},{"line_number":62,"context_line":"            \"type\": \"array\","},{"line_number":63,"context_line":"            \"items\": {"},{"line_number":64,"context_line":"                \"type\": \"string\","}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5201f7_f4a86279","line":61,"updated":"2017-01-05 19:48:30.000000000","message":"member_of isn\u0027t an array. In the raw query string it is represented as:\n\n    member_of\u003din:agg_1,agg_2,agg_3\n\nSince that code hasn\u0027t merged yet I\u0027d either rebase this on that, or just leave member_of out of this change until it does merge, so that you have some tests in place to make sure what you\u0027re trying to do here actually works.","commit_id":"bf99bb82976b5f4a7f35d3abe9131b38969372d2"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b8cc7aee3ac40b99ebec4ad4a549f0ed580c32d6","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        \"uuid\": {"},{"line_number":59,"context_line":"            \"type\": \"string\","},{"line_number":60,"context_line":"        },"},{"line_number":61,"context_line":"        \"member_of\": {"},{"line_number":62,"context_line":"            \"type\": \"array\","},{"line_number":63,"context_line":"            \"items\": {"},{"line_number":64,"context_line":"                \"type\": \"string\","}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5201f7_9fd9dc59","line":61,"in_reply_to":"ba5201f7_f4a86279","updated":"2017-01-06 10:43:07.000000000","message":"Per IRC, there is a consensus that we accidentally accepted member_of while it shouldn\u0027t be yet possible, so I\u0027ll remove it from the schema.","commit_id":"bf99bb82976b5f4a7f35d3abe9131b38969372d2"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"a109a653d51a1f3f9e9306976823a631fb6eab64","unresolved":false,"context_lines":[{"line_number":129,"context_line":"                raise webob.exc.HTTPBadRequest(msg,"},{"line_number":130,"context_line":"                        json_formatter\u003dutil.json_error_formatter)"},{"line_number":131,"context_line":"            result[rc_name] \u003d amount"},{"line_number":132,"context_line":"        except ValueError:"},{"line_number":133,"context_line":"            msg \u003d _(\u0027Requested resource %(resource_name)s expected positive \u0027"},{"line_number":134,"context_line":"                    \u0027integer amount. Got: %(amount)s.\u0027)"},{"line_number":135,"context_line":"            msg \u003d msg % {"}],"source_content_type":"text/x-python","patch_set":25,"id":"ba5201f7_0f4421b5","line":132,"range":{"start_line":132,"start_character":0,"end_line":132,"end_character":26},"updated":"2017-01-11 15:58:45.000000000","message":"This exception block only applies to line 121, no? If so, it should be moved right after that.","commit_id":"be9bb3658f7c165c8b10839b39b635c18b9d6916"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ac7d07da5d8791b1105ee3017e9ddb0664608bf9","unresolved":false,"context_lines":[{"line_number":129,"context_line":"                raise webob.exc.HTTPBadRequest(msg,"},{"line_number":130,"context_line":"                        json_formatter\u003dutil.json_error_formatter)"},{"line_number":131,"context_line":"            result[rc_name] \u003d amount"},{"line_number":132,"context_line":"        except ValueError:"},{"line_number":133,"context_line":"            msg \u003d _(\u0027Requested resource %(resource_name)s expected positive \u0027"},{"line_number":134,"context_line":"                    \u0027integer amount. Got: %(amount)s.\u0027)"},{"line_number":135,"context_line":"            msg \u003d msg % {"}],"source_content_type":"text/x-python","patch_set":25,"id":"ba5201f7_8d2724b5","line":132,"range":{"start_line":132,"start_character":0,"end_line":132,"end_character":26},"in_reply_to":"ba5201f7_0f4421b5","updated":"2017-01-11 23:28:19.000000000","message":"Done","commit_id":"be9bb3658f7c165c8b10839b39b635c18b9d6916"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"a109a653d51a1f3f9e9306976823a631fb6eab64","unresolved":false,"context_lines":[{"line_number":278,"context_line":"            _(\u0027Invalid uuid value: %(uuid)s\u0027) % {\u0027uuid\u0027: req.GET[\u0027uuid\u0027]},"},{"line_number":279,"context_line":"            json_formatter\u003dutil.json_error_formatter)"},{"line_number":280,"context_line":"    filters \u003d {}"},{"line_number":281,"context_line":"    for attr in [\u0027uuid\u0027, \u0027name\u0027, \u0027member_of\u0027]:"},{"line_number":282,"context_line":"        if attr in req.GET:"},{"line_number":283,"context_line":"            value \u003d req.GET[attr]"},{"line_number":284,"context_line":"            # special case member_of to always make its value a"}],"source_content_type":"text/x-python","patch_set":25,"id":"ba5201f7_2f9645f0","line":281,"range":{"start_line":281,"start_character":16,"end_line":281,"end_character":45},"updated":"2017-01-11 15:58:45.000000000","message":"Why did this move from the ResourceProviderList object definition?","commit_id":"be9bb3658f7c165c8b10839b39b635c18b9d6916"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ac7d07da5d8791b1105ee3017e9ddb0664608bf9","unresolved":false,"context_lines":[{"line_number":278,"context_line":"            _(\u0027Invalid uuid value: %(uuid)s\u0027) % {\u0027uuid\u0027: req.GET[\u0027uuid\u0027]},"},{"line_number":279,"context_line":"            json_formatter\u003dutil.json_error_formatter)"},{"line_number":280,"context_line":"    filters \u003d {}"},{"line_number":281,"context_line":"    for attr in [\u0027uuid\u0027, \u0027name\u0027, \u0027member_of\u0027]:"},{"line_number":282,"context_line":"        if attr in req.GET:"},{"line_number":283,"context_line":"            value \u003d req.GET[attr]"},{"line_number":284,"context_line":"            # special case member_of to always make its value a"}],"source_content_type":"text/x-python","patch_set":25,"id":"ba5201f7_320bf32b","line":281,"range":{"start_line":281,"start_character":16,"end_line":281,"end_character":45},"in_reply_to":"ba5201f7_2f9645f0","updated":"2017-01-11 23:28:19.000000000","message":"Because the validation moved into the JSONSchema above.","commit_id":"be9bb3658f7c165c8b10839b39b635c18b9d6916"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"167c4c43ab0ed87f203792df5fb90c75bdf3f301","unresolved":false,"context_lines":[{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    allowed_filters \u003d set(objects.ResourceProviderList.allowed_filters)"},{"line_number":169,"context_line":"    if not want_version.matches((1, 3)):"},{"line_number":170,"context_line":"        allowed_filters.remove(\u0027member_of\u0027)"},{"line_number":171,"context_line":"    passed_filters \u003d set(req.GET.keys())"},{"line_number":172,"context_line":"    invalid_filters \u003d passed_filters - allowed_filters"},{"line_number":173,"context_line":"    if invalid_filters:"}],"source_content_type":"text/x-python","patch_set":26,"id":"7a3c09a3_912b5e33","side":"PARENT","line":170,"updated":"2017-01-12 21:18:24.000000000","message":"So before this change, if I\u0027m passing in member_of as a query parameter on microversion 1.0, 1.1 or 1.2, it\u0027s just silently stripped out, but now with the schema validation that\u0027s going to be a 400 error, correct?\n\nIf this is intentional, I think we should call it out in the release notes, right?","commit_id":"cf6592df3c763022c485ecd12f23a5e1b0b0c8d3"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"c35e0e8e8db6dafc3ec450ef15cc8e826ae888ca","unresolved":false,"context_lines":[{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    allowed_filters \u003d set(objects.ResourceProviderList.allowed_filters)"},{"line_number":169,"context_line":"    if not want_version.matches((1, 3)):"},{"line_number":170,"context_line":"        allowed_filters.remove(\u0027member_of\u0027)"},{"line_number":171,"context_line":"    passed_filters \u003d set(req.GET.keys())"},{"line_number":172,"context_line":"    invalid_filters \u003d passed_filters - allowed_filters"},{"line_number":173,"context_line":"    if invalid_filters:"}],"source_content_type":"text/x-python","patch_set":26,"id":"7a3c09a3_98037a0f","side":"PARENT","line":170,"in_reply_to":"7a3c09a3_74c1802e","updated":"2017-01-13 01:28:34.000000000","message":"dang it, I missed this point.","commit_id":"cf6592df3c763022c485ecd12f23a5e1b0b0c8d3"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"7381e1fb153d3aec00b6e45d6fdb10d15ed323d0","unresolved":false,"context_lines":[{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    allowed_filters \u003d set(objects.ResourceProviderList.allowed_filters)"},{"line_number":169,"context_line":"    if not want_version.matches((1, 3)):"},{"line_number":170,"context_line":"        allowed_filters.remove(\u0027member_of\u0027)"},{"line_number":171,"context_line":"    passed_filters \u003d set(req.GET.keys())"},{"line_number":172,"context_line":"    invalid_filters \u003d passed_filters - allowed_filters"},{"line_number":173,"context_line":"    if invalid_filters:"}],"source_content_type":"text/x-python","patch_set":26,"id":"7a3c09a3_f148228a","side":"PARENT","line":170,"in_reply_to":"7a3c09a3_912b5e33","updated":"2017-01-12 21:32:06.000000000","message":"Yeah, we discussed this on IRC and came to the conclusion that since the scheduler reporting client is the only thing that currently calls the placement API, we weren\u0027t concerned about a very brief period of time (only a few patches) where it was possible to pass member_of to the REST API and it would process it before the 1.4 microversion in this patch landed.","commit_id":"cf6592df3c763022c485ecd12f23a5e1b0b0c8d3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"86daea440d0b93ba04a6bb09a0cc87c3cf66af9c","unresolved":false,"context_lines":[{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    allowed_filters \u003d set(objects.ResourceProviderList.allowed_filters)"},{"line_number":169,"context_line":"    if not want_version.matches((1, 3)):"},{"line_number":170,"context_line":"        allowed_filters.remove(\u0027member_of\u0027)"},{"line_number":171,"context_line":"    passed_filters \u003d set(req.GET.keys())"},{"line_number":172,"context_line":"    invalid_filters \u003d passed_filters - allowed_filters"},{"line_number":173,"context_line":"    if invalid_filters:"}],"source_content_type":"text/x-python","patch_set":26,"id":"7a3c09a3_74c1802e","side":"PARENT","line":170,"in_reply_to":"7a3c09a3_f148228a","updated":"2017-01-12 21:46:35.000000000","message":"OK, yeah, so to recap my discussion on IRC today about this, we didn\u0027t allow member_of in Newton because it wasn\u0027t in the allowed_filters set below. Then we added 1.3 and didn\u0027t fail if you passed member_of with microversion \u003c 1.3, but now we\u0027re going back to enforcing the schema validation - which right given the limited exposure of this to anyone we can probably bend the rules a bit.","commit_id":"cf6592df3c763022c485ecd12f23a5e1b0b0c8d3"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"253c2c6c47a93ece72973a5ac9b8ca59fee3cdf3","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        raise webob.exc.HTTPBadRequest("},{"line_number":181,"context_line":"            _(\u0027Invalid uuid value: %(uuid)s\u0027) % {\u0027uuid\u0027: req.GET[\u0027uuid\u0027]},"},{"line_number":182,"context_line":"            json_formatter\u003dutil.json_error_formatter)"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    filters \u003d {}"},{"line_number":185,"context_line":"    for attr in objects.ResourceProviderList.allowed_filters:"},{"line_number":186,"context_line":"        if attr in req.GET:"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba5201f7_3043e414","side":"PARENT","line":183,"updated":"2017-01-12 06:07:10.000000000","message":"a extra change.","commit_id":"cf6592df3c763022c485ecd12f23a5e1b0b0c8d3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"167c4c43ab0ed87f203792df5fb90c75bdf3f301","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        raise webob.exc.HTTPBadRequest("},{"line_number":181,"context_line":"            _(\u0027Invalid uuid value: %(uuid)s\u0027) % {\u0027uuid\u0027: req.GET[\u0027uuid\u0027]},"},{"line_number":182,"context_line":"            json_formatter\u003dutil.json_error_formatter)"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    filters \u003d {}"},{"line_number":185,"context_line":"    for attr in objects.ResourceProviderList.allowed_filters:"},{"line_number":186,"context_line":"        if attr in req.GET:"}],"source_content_type":"text/x-python","patch_set":26,"id":"7a3c09a3_d16de6cd","side":"PARENT","line":183,"in_reply_to":"ba5201f7_3043e414","updated":"2017-01-12 21:18:24.000000000","message":"Yeah I personally like the blank line separation between blocks of operations here which is removed by this change.","commit_id":"cf6592df3c763022c485ecd12f23a5e1b0b0c8d3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"167c4c43ab0ed87f203792df5fb90c75bdf3f301","unresolved":false,"context_lines":[{"line_number":56,"context_line":"            \"type\": \"string\""},{"line_number":57,"context_line":"        },"},{"line_number":58,"context_line":"        \"uuid\": {"},{"line_number":59,"context_line":"            \"type\": \"string\","},{"line_number":60,"context_line":"        }"},{"line_number":61,"context_line":"    },"},{"line_number":62,"context_line":"    \"additionalProperties\": False,"}],"source_content_type":"text/x-python","patch_set":26,"id":"7a3c09a3_4ef2339c","line":59,"updated":"2017-01-12 21:18:24.000000000","message":"Add \"format\": \"uuid\" like on L38 above? Or can we not do that because of \u0027in:\u0027 syntax? Or...is that part of member_of so 1.3 below?","commit_id":"5d6220ffecfaab2e37a73f40ba7056aa2e15b744"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"7381e1fb153d3aec00b6e45d6fdb10d15ed323d0","unresolved":false,"context_lines":[{"line_number":56,"context_line":"            \"type\": \"string\""},{"line_number":57,"context_line":"        },"},{"line_number":58,"context_line":"        \"uuid\": {"},{"line_number":59,"context_line":"            \"type\": \"string\","},{"line_number":60,"context_line":"        }"},{"line_number":61,"context_line":"    },"},{"line_number":62,"context_line":"    \"additionalProperties\": False,"}],"source_content_type":"text/x-python","patch_set":26,"id":"7a3c09a3_b1cbfa1d","line":59,"in_reply_to":"7a3c09a3_4ef2339c","updated":"2017-01-12 21:32:06.000000000","message":"Correct, the in: thing means we cannot use format: uuid.","commit_id":"5d6220ffecfaab2e37a73f40ba7056aa2e15b744"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"86daea440d0b93ba04a6bb09a0cc87c3cf66af9c","unresolved":false,"context_lines":[{"line_number":56,"context_line":"            \"type\": \"string\""},{"line_number":57,"context_line":"        },"},{"line_number":58,"context_line":"        \"uuid\": {"},{"line_number":59,"context_line":"            \"type\": \"string\","},{"line_number":60,"context_line":"        }"},{"line_number":61,"context_line":"    },"},{"line_number":62,"context_line":"    \"additionalProperties\": False,"}],"source_content_type":"text/x-python","patch_set":26,"id":"7a3c09a3_f4801049","line":59,"in_reply_to":"7a3c09a3_b1cbfa1d","updated":"2017-01-12 21:46:35.000000000","message":"But that\u0027s not used, L289 deals only with member_of for using in:.","commit_id":"5d6220ffecfaab2e37a73f40ba7056aa2e15b744"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"167c4c43ab0ed87f203792df5fb90c75bdf3f301","unresolved":false,"context_lines":[{"line_number":75,"context_line":"# _normalize_resources_qs_param() function below."},{"line_number":76,"context_line":"GET_RPS_SCHEMA_1_4 \u003d copy.deepcopy(GET_RPS_SCHEMA_1_3)"},{"line_number":77,"context_line":"GET_RPS_SCHEMA_1_4[\u0027properties\u0027][\u0027resources\u0027] \u003d {"},{"line_number":78,"context_line":"    \"type\": \"string\""},{"line_number":79,"context_line":"}"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"7a3c09a3_113a0ece","line":78,"updated":"2017-01-12 21:18:24.000000000","message":"Could we have a format rule for the regex of 0 or more commas but knowing that things have to be grouped by :?","commit_id":"5d6220ffecfaab2e37a73f40ba7056aa2e15b744"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"7381e1fb153d3aec00b6e45d6fdb10d15ed323d0","unresolved":false,"context_lines":[{"line_number":75,"context_line":"# _normalize_resources_qs_param() function below."},{"line_number":76,"context_line":"GET_RPS_SCHEMA_1_4 \u003d copy.deepcopy(GET_RPS_SCHEMA_1_3)"},{"line_number":77,"context_line":"GET_RPS_SCHEMA_1_4[\u0027properties\u0027][\u0027resources\u0027] \u003d {"},{"line_number":78,"context_line":"    \"type\": \"string\""},{"line_number":79,"context_line":"}"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"7a3c09a3_d1e7a6aa","line":78,"in_reply_to":"7a3c09a3_113a0ece","updated":"2017-01-12 21:32:06.000000000","message":"Maybe? Not sure it\u0027s totally worth the effort versus more descriptive formatting failure messages produced by the _normalize_resources_qs_param() function below.","commit_id":"5d6220ffecfaab2e37a73f40ba7056aa2e15b744"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"86daea440d0b93ba04a6bb09a0cc87c3cf66af9c","unresolved":false,"context_lines":[{"line_number":75,"context_line":"# _normalize_resources_qs_param() function below."},{"line_number":76,"context_line":"GET_RPS_SCHEMA_1_4 \u003d copy.deepcopy(GET_RPS_SCHEMA_1_3)"},{"line_number":77,"context_line":"GET_RPS_SCHEMA_1_4[\u0027properties\u0027][\u0027resources\u0027] \u003d {"},{"line_number":78,"context_line":"    \"type\": \"string\""},{"line_number":79,"context_line":"}"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"7a3c09a3_5476443f","line":78,"in_reply_to":"7a3c09a3_d1e7a6aa","updated":"2017-01-12 21:46:35.000000000","message":"On http://www.regexpal.com/ I\u0027m able to make this work:\n\n(?:[A-Z0-9_]+\\:[0-9]+),?\n\nWith these tests:\n\nVCPU:2,DISK_GB:50,MEMORY_MB:1024\n\nVCPU:2\n\nCUSTOM_IRON_EAGLE:2\n\n--\n\nBut it also passes with this:\n\nCUSTOM_IRON_EAGLE:2,\n\nWhich would be wrong.\n\nIt might be fine to do it explicitly with code.","commit_id":"5d6220ffecfaab2e37a73f40ba7056aa2e15b744"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"167c4c43ab0ed87f203792df5fb90c75bdf3f301","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        except ValueError:"},{"line_number":114,"context_line":"            msg \u003d _(\u0027Badly formed resources parameter. Expected resources \u0027"},{"line_number":115,"context_line":"                    \u0027query string parameter in form: \u0027"},{"line_number":116,"context_line":"                    \u0027?resources\u003dVCPU:2,MEMORY_MB:1024. Got: %s.\u0027)"},{"line_number":117,"context_line":"            msg \u003d msg % rt"},{"line_number":118,"context_line":"            raise webob.exc.HTTPBadRequest(msg,"},{"line_number":119,"context_line":"                    json_formatter\u003dutil.json_error_formatter)"}],"source_content_type":"text/x-python","patch_set":26,"id":"7a3c09a3_d1e6c6e7","line":116,"range":{"start_line":116,"start_character":32,"end_line":116,"end_character":53},"updated":"2017-01-12 21:18:24.000000000","message":"I wonder if we want to be more generic and say:\n\n$RESOURCE_CLASS_NAME:$AMOUNT\n\nInstead of using actual resource class names.","commit_id":"5d6220ffecfaab2e37a73f40ba7056aa2e15b744"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"167c4c43ab0ed87f203792df5fb90c75bdf3f301","unresolved":false,"context_lines":[{"line_number":259,"context_line":"    context \u003d req.environ[\u0027placement.context\u0027]"},{"line_number":260,"context_line":"    want_version \u003d req.environ[microversion.MICROVERSION_ENVIRON]"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    schema \u003d GET_RPS_SCHEMA_1_0"},{"line_number":263,"context_line":"    if want_version \u003d\u003d (1, 3):"},{"line_number":264,"context_line":"        schema \u003d GET_RPS_SCHEMA_1_3"},{"line_number":265,"context_line":"    if want_version \u003e\u003d (1, 4):"},{"line_number":266,"context_line":"        schema \u003d GET_RPS_SCHEMA_1_4"},{"line_number":267,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":26,"id":"7a3c09a3_b1621aac","line":264,"range":{"start_line":262,"start_character":4,"end_line":264,"end_character":35},"updated":"2017-01-12 21:18:24.000000000","message":"nit: It seems like we could/should have done this in a separate change before the 1.4 microversion is added here.","commit_id":"5d6220ffecfaab2e37a73f40ba7056aa2e15b744"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"7381e1fb153d3aec00b6e45d6fdb10d15ed323d0","unresolved":false,"context_lines":[{"line_number":259,"context_line":"    context \u003d req.environ[\u0027placement.context\u0027]"},{"line_number":260,"context_line":"    want_version \u003d req.environ[microversion.MICROVERSION_ENVIRON]"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    schema \u003d GET_RPS_SCHEMA_1_0"},{"line_number":263,"context_line":"    if want_version \u003d\u003d (1, 3):"},{"line_number":264,"context_line":"        schema \u003d GET_RPS_SCHEMA_1_3"},{"line_number":265,"context_line":"    if want_version \u003e\u003d (1, 4):"},{"line_number":266,"context_line":"        schema \u003d GET_RPS_SCHEMA_1_4"},{"line_number":267,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":26,"id":"7a3c09a3_d111665f","line":264,"range":{"start_line":262,"start_character":4,"end_line":264,"end_character":35},"in_reply_to":"7a3c09a3_b1621aac","updated":"2017-01-12 21:32:06.000000000","message":"We had this up for a long time. Just we happened to land other patches in between that added members to the ResourceProviderList.allowed_filters attribute that this patch changes to be JSONSchema-based validation...","commit_id":"5d6220ffecfaab2e37a73f40ba7056aa2e15b744"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"86daea440d0b93ba04a6bb09a0cc87c3cf66af9c","unresolved":false,"context_lines":[{"line_number":259,"context_line":"    context \u003d req.environ[\u0027placement.context\u0027]"},{"line_number":260,"context_line":"    want_version \u003d req.environ[microversion.MICROVERSION_ENVIRON]"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    schema \u003d GET_RPS_SCHEMA_1_0"},{"line_number":263,"context_line":"    if want_version \u003d\u003d (1, 3):"},{"line_number":264,"context_line":"        schema \u003d GET_RPS_SCHEMA_1_3"},{"line_number":265,"context_line":"    if want_version \u003e\u003d (1, 4):"},{"line_number":266,"context_line":"        schema \u003d GET_RPS_SCHEMA_1_4"},{"line_number":267,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":26,"id":"7a3c09a3_343c582f","line":264,"range":{"start_line":262,"start_character":4,"end_line":264,"end_character":35},"in_reply_to":"7a3c09a3_d111665f","updated":"2017-01-12 21:46:35.000000000","message":"I\u0027m not really following, which part was up for a long time? And does that mean because it\u0027s been up for a long time it means we shouldn\u0027t separate the changes?\n\nI\u0027m not -1 on this per se, but it does clutter up this change a bit trying to backfill the earlier microversion schema validation in here before doing it for 1.4.","commit_id":"5d6220ffecfaab2e37a73f40ba7056aa2e15b744"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"253c2c6c47a93ece72973a5ac9b8ca59fee3cdf3","unresolved":false,"context_lines":[{"line_number":265,"context_line":"    if want_version \u003e\u003d (1, 4):"},{"line_number":266,"context_line":"        schema \u003d GET_RPS_SCHEMA_1_4"},{"line_number":267,"context_line":"    try:"},{"line_number":268,"context_line":"        jsonschema.validate(dict(req.GET), schema,"},{"line_number":269,"context_line":"                            format_checker\u003djsonschema.FormatChecker())"},{"line_number":270,"context_line":"    except jsonschema.ValidationError as exc:"},{"line_number":271,"context_line":"        raise webob.exc.HTTPBadRequest("}],"source_content_type":"text/x-python","patch_set":26,"id":"ba5201f7_50dea86d","line":268,"range":{"start_line":268,"start_character":28,"end_line":268,"end_character":41},"updated":"2017-01-12 06:07:10.000000000","message":"Looks like all of those parameters only can accept one value. So this is good. This is also the different with Nova servers API.","commit_id":"5d6220ffecfaab2e37a73f40ba7056aa2e15b744"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"253c2c6c47a93ece72973a5ac9b8ca59fee3cdf3","unresolved":false,"context_lines":[{"line_number":270,"context_line":"    except jsonschema.ValidationError as exc:"},{"line_number":271,"context_line":"        raise webob.exc.HTTPBadRequest("},{"line_number":272,"context_line":"            _(\u0027Invalid query string parameters: %(exc)s\u0027) %"},{"line_number":273,"context_line":"            {\u0027exc\u0027: exc},"},{"line_number":274,"context_line":"            json_formatter\u003dutil.json_error_formatter)"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"    if \u0027uuid\u0027 in req.GET and not uuidutils.is_uuid_like(req.GET[\u0027uuid\u0027]):"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba5201f7_b0b8b412","line":273,"updated":"2017-01-12 06:07:10.000000000","message":"I think I can file a bug for it, I feel this break for i18n. And we have same problem in the placement API many place. We can use exc.format_message() or six.text_type(exc)","commit_id":"5d6220ffecfaab2e37a73f40ba7056aa2e15b744"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"167c4c43ab0ed87f203792df5fb90c75bdf3f301","unresolved":false,"context_lines":[{"line_number":270,"context_line":"    except jsonschema.ValidationError as exc:"},{"line_number":271,"context_line":"        raise webob.exc.HTTPBadRequest("},{"line_number":272,"context_line":"            _(\u0027Invalid query string parameters: %(exc)s\u0027) %"},{"line_number":273,"context_line":"            {\u0027exc\u0027: exc},"},{"line_number":274,"context_line":"            json_formatter\u003dutil.json_error_formatter)"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"    if \u0027uuid\u0027 in req.GET and not uuidutils.is_uuid_like(req.GET[\u0027uuid\u0027]):"}],"source_content_type":"text/x-python","patch_set":26,"id":"7a3c09a3_ceb5437f","line":273,"in_reply_to":"ba5201f7_2bcc59ba","updated":"2017-01-12 21:18:24.000000000","message":"Are you sure that \u0027%s\u0027 % exc is the same as using str(exc)? Because I thought the % meant it was handled differently. See:\n\nhttp://docs.openstack.org/developer/oslo.i18n/guidelines.html#avoid-forcing-the-translation-of-translatable-variables","commit_id":"5d6220ffecfaab2e37a73f40ba7056aa2e15b744"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"bb3ae67cb034bd377c333c2fb4b43d993681f22e","unresolved":false,"context_lines":[{"line_number":270,"context_line":"    except jsonschema.ValidationError as exc:"},{"line_number":271,"context_line":"        raise webob.exc.HTTPBadRequest("},{"line_number":272,"context_line":"            _(\u0027Invalid query string parameters: %(exc)s\u0027) %"},{"line_number":273,"context_line":"            {\u0027exc\u0027: exc},"},{"line_number":274,"context_line":"            json_formatter\u003dutil.json_error_formatter)"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"    if \u0027uuid\u0027 in req.GET and not uuidutils.is_uuid_like(req.GET[\u0027uuid\u0027]):"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba5201f7_2bcc59ba","line":273,"in_reply_to":"ba5201f7_b0b8b412","updated":"2017-01-12 06:12:22.000000000","message":"Here is the link https://bugs.launchpad.net/nova/+bug/1655833","commit_id":"5d6220ffecfaab2e37a73f40ba7056aa2e15b744"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"167c4c43ab0ed87f203792df5fb90c75bdf3f301","unresolved":false,"context_lines":[{"line_number":273,"context_line":"            {\u0027exc\u0027: exc},"},{"line_number":274,"context_line":"            json_formatter\u003dutil.json_error_formatter)"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"    if \u0027uuid\u0027 in req.GET and not uuidutils.is_uuid_like(req.GET[\u0027uuid\u0027]):"},{"line_number":277,"context_line":"        raise webob.exc.HTTPBadRequest("},{"line_number":278,"context_line":"            _(\u0027Invalid uuid value: %(uuid)s\u0027) % {\u0027uuid\u0027: req.GET[\u0027uuid\u0027]},"},{"line_number":279,"context_line":"            json_formatter\u003dutil.json_error_formatter)"},{"line_number":280,"context_line":"    filters \u003d {}"},{"line_number":281,"context_line":"    for attr in [\u0027uuid\u0027, \u0027name\u0027, \u0027member_of\u0027]:"},{"line_number":282,"context_line":"        if attr in req.GET:"}],"source_content_type":"text/x-python","patch_set":26,"id":"7a3c09a3_8e309b09","line":279,"range":{"start_line":276,"start_character":4,"end_line":279,"end_character":53},"updated":"2017-01-12 21:18:24.000000000","message":"If the 1.0 schema enforces the format of the uuid parameter to be a uuid, then we don\u0027t need to manually do this check.","commit_id":"5d6220ffecfaab2e37a73f40ba7056aa2e15b744"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"86daea440d0b93ba04a6bb09a0cc87c3cf66af9c","unresolved":false,"context_lines":[{"line_number":273,"context_line":"            {\u0027exc\u0027: exc},"},{"line_number":274,"context_line":"            json_formatter\u003dutil.json_error_formatter)"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"    if \u0027uuid\u0027 in req.GET and not uuidutils.is_uuid_like(req.GET[\u0027uuid\u0027]):"},{"line_number":277,"context_line":"        raise webob.exc.HTTPBadRequest("},{"line_number":278,"context_line":"            _(\u0027Invalid uuid value: %(uuid)s\u0027) % {\u0027uuid\u0027: req.GET[\u0027uuid\u0027]},"},{"line_number":279,"context_line":"            json_formatter\u003dutil.json_error_formatter)"},{"line_number":280,"context_line":"    filters \u003d {}"},{"line_number":281,"context_line":"    for attr in [\u0027uuid\u0027, \u0027name\u0027, \u0027member_of\u0027]:"},{"line_number":282,"context_line":"        if attr in req.GET:"}],"source_content_type":"text/x-python","patch_set":26,"id":"7a3c09a3_b464c849","line":279,"range":{"start_line":276,"start_character":4,"end_line":279,"end_character":53},"in_reply_to":"7a3c09a3_343e18b9","updated":"2017-01-12 21:46:35.000000000","message":"As I replied above, I think in: only matters for member_of and isn\u0027t used for name or uuid. At one point before this change Sylvain had a patch to allow querying for resource providers using in: on name and uuid but we determined there was no use case for that right now, so it was dropped.","commit_id":"5d6220ffecfaab2e37a73f40ba7056aa2e15b744"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"7381e1fb153d3aec00b6e45d6fdb10d15ed323d0","unresolved":false,"context_lines":[{"line_number":273,"context_line":"            {\u0027exc\u0027: exc},"},{"line_number":274,"context_line":"            json_formatter\u003dutil.json_error_formatter)"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"    if \u0027uuid\u0027 in req.GET and not uuidutils.is_uuid_like(req.GET[\u0027uuid\u0027]):"},{"line_number":277,"context_line":"        raise webob.exc.HTTPBadRequest("},{"line_number":278,"context_line":"            _(\u0027Invalid uuid value: %(uuid)s\u0027) % {\u0027uuid\u0027: req.GET[\u0027uuid\u0027]},"},{"line_number":279,"context_line":"            json_formatter\u003dutil.json_error_formatter)"},{"line_number":280,"context_line":"    filters \u003d {}"},{"line_number":281,"context_line":"    for attr in [\u0027uuid\u0027, \u0027name\u0027, \u0027member_of\u0027]:"},{"line_number":282,"context_line":"        if attr in req.GET:"}],"source_content_type":"text/x-python","patch_set":26,"id":"7a3c09a3_343e18b9","line":279,"range":{"start_line":276,"start_character":4,"end_line":279,"end_character":53},"in_reply_to":"7a3c09a3_8e309b09","updated":"2017-01-12 21:32:06.000000000","message":"We would still need to add this check because of the in: thing.","commit_id":"5d6220ffecfaab2e37a73f40ba7056aa2e15b744"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"167c4c43ab0ed87f203792df5fb90c75bdf3f301","unresolved":false,"context_lines":[{"line_number":284,"context_line":"            # special case member_of to always make its value a"},{"line_number":285,"context_line":"            # list, either by accepting the single value, or if it"},{"line_number":286,"context_line":"            # starts with \u0027in:\u0027 splitting on \u0027,\u0027."},{"line_number":287,"context_line":"            # NOTE(cdent): This will all change when we start using"},{"line_number":288,"context_line":"            # JSONSchema validation of query params."},{"line_number":289,"context_line":"            if attr \u003d\u003d \u0027member_of\u0027:"},{"line_number":290,"context_line":"                if value.startswith(\u0027in:\u0027):"},{"line_number":291,"context_line":"                    value \u003d value[3:].split(\u0027,\u0027)"}],"source_content_type":"text/x-python","patch_set":26,"id":"7a3c09a3_b103fa0c","line":288,"range":{"start_line":287,"start_character":12,"end_line":288,"end_character":52},"updated":"2017-01-12 21:18:24.000000000","message":"Aren\u0027t we doing schema validation on query parameters now?","commit_id":"5d6220ffecfaab2e37a73f40ba7056aa2e15b744"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7a9976076b6472319218f3c9ee0a3b9afda26412","unresolved":false,"context_lines":[{"line_number":284,"context_line":"            # special case member_of to always make its value a"},{"line_number":285,"context_line":"            # list, either by accepting the single value, or if it"},{"line_number":286,"context_line":"            # starts with \u0027in:\u0027 splitting on \u0027,\u0027."},{"line_number":287,"context_line":"            # NOTE(cdent): This will all change when we start using"},{"line_number":288,"context_line":"            # JSONSchema validation of query params."},{"line_number":289,"context_line":"            if attr \u003d\u003d \u0027member_of\u0027:"},{"line_number":290,"context_line":"                if value.startswith(\u0027in:\u0027):"},{"line_number":291,"context_line":"                    value \u003d value[3:].split(\u0027,\u0027)"}],"source_content_type":"text/x-python","patch_set":26,"id":"7a3c09a3_07945789","line":288,"range":{"start_line":287,"start_character":12,"end_line":288,"end_character":52},"in_reply_to":"7a3c09a3_b103fa0c","updated":"2017-01-13 21:28:19.000000000","message":"I guess member_of is still a string, but not sure how we\u0027d validate it in jsonschema unless we just had a regex to handle the in: + , grouping or a single uuid.","commit_id":"5d6220ffecfaab2e37a73f40ba7056aa2e15b744"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"167c4c43ab0ed87f203792df5fb90c75bdf3f301","unresolved":false,"context_lines":[{"line_number":300,"context_line":"            context, filters)"},{"line_number":301,"context_line":"    except exception.ResourceClassNotFound as exc:"},{"line_number":302,"context_line":"        raise webob.exc.HTTPBadRequest("},{"line_number":303,"context_line":"            _(\u0027Wrong resource name in request: %(error)s\u0027) %"},{"line_number":304,"context_line":"            {\u0027error\u0027: exc},"},{"line_number":305,"context_line":"            json_formatter\u003dutil.json_error_formatter)"},{"line_number":306,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"7a3c09a3_71e4323b","line":303,"range":{"start_line":303,"start_character":15,"end_line":303,"end_character":45},"updated":"2017-01-12 21:18:24.000000000","message":"nit: seems we could have a better error message here, maybe something like \u0027Invalid resource class in request\u0027?","commit_id":"5d6220ffecfaab2e37a73f40ba7056aa2e15b744"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"253c2c6c47a93ece72973a5ac9b8ca59fee3cdf3","unresolved":false,"context_lines":[{"line_number":301,"context_line":"    except exception.ResourceClassNotFound as exc:"},{"line_number":302,"context_line":"        raise webob.exc.HTTPBadRequest("},{"line_number":303,"context_line":"            _(\u0027Wrong resource name in request: %(error)s\u0027) %"},{"line_number":304,"context_line":"            {\u0027error\u0027: exc},"},{"line_number":305,"context_line":"            json_formatter\u003dutil.json_error_formatter)"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"    response \u003d req.response"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba5201f7_6b3f41b4","line":304,"updated":"2017-01-12 06:07:10.000000000","message":"ditto","commit_id":"5d6220ffecfaab2e37a73f40ba7056aa2e15b744"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e28674ae37c35494627af4b9d90d64d5c70c64e6","unresolved":false,"context_lines":[{"line_number":66,"context_line":"# Placement API microversion 1.3 adds support for a member_of attribute"},{"line_number":67,"context_line":"GET_RPS_SCHEMA_1_3 \u003d copy.deepcopy(GET_RPS_SCHEMA_1_0)"},{"line_number":68,"context_line":"GET_RPS_SCHEMA_1_3[\u0027properties\u0027][\u0027member_of\u0027] \u003d {"},{"line_number":69,"context_line":"    # TODO(mriedem): At some point we need to do jsonschema and/or uuid"},{"line_number":70,"context_line":"    # validation of the value(s) here."},{"line_number":71,"context_line":"    \"type\": \"string\""},{"line_number":72,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":27,"id":"7a3c09a3_ccafcee1","line":69,"updated":"2017-01-14 02:45:06.000000000","message":"woot woot:\n\nhttps://review.openstack.org/#/c/420272/","commit_id":"a5dc7f1a11b14dcf9602de5dcd761b7ccce81711"}],"nova/api/openstack/placement/microversion.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"b333061907a69ee458d3ca2277754e30419f08e9","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    \u00271.0\u0027,"},{"line_number":38,"context_line":"    \u00271.1\u0027,  # initial support for aggregate.get_aggregates and set_aggregates"},{"line_number":39,"context_line":"    \u00271.2\u0027,  # Adds /resource_classes resource endpoint"},{"line_number":40,"context_line":"    \u00271.3\u0027,  # Support resources query string parameter in GET /r-p"},{"line_number":41,"context_line":"]"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3a71b18c_5f72877d","line":40,"updated":"2016-12-08 15:32:49.000000000","message":"nit: I\u0027d prefer /resource_providers instead of /r-p, just so we\u0027re not causing anyone confusion over whether this is something different.","commit_id":"eb0b88476cd759273619c095a91651b37ad2c865"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"24352708158df0cac4ecfbc10dd9cb6e130d49a5","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    \u00271.0\u0027,"},{"line_number":38,"context_line":"    \u00271.1\u0027,  # initial support for aggregate.get_aggregates and set_aggregates"},{"line_number":39,"context_line":"    \u00271.2\u0027,  # Adds /resource_classes resource endpoint"},{"line_number":40,"context_line":"    \u00271.3\u0027,  # Support resources query string parameter in GET /r-p"},{"line_number":41,"context_line":"]"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3a71b18c_aa594937","line":40,"in_reply_to":"3a71b18c_5f72877d","updated":"2016-12-10 21:20:51.000000000","message":"Done","commit_id":"eb0b88476cd759273619c095a91651b37ad2c865"}],"nova/api/openstack/placement/rest_api_version_history.rst":[{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"c390e79ed577f400ad7f121a4c9e6faa13544e64","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"`GET /resource_providers?resources\u003dVCPU:2,MEMORY_MB:1024,DISK_GB:50`"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"If the resource class is not existing, then it will return a HTTP 400."}],"source_content_type":"text/x-rst","patch_set":14,"id":"3a71b18c_a281c291","line":67,"range":{"start_line":67,"start_character":22,"end_line":67,"end_character":37},"updated":"2016-12-08 15:50:44.000000000","message":"does not exist","commit_id":"eb0b88476cd759273619c095a91651b37ad2c865"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"24352708158df0cac4ecfbc10dd9cb6e130d49a5","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"`GET /resource_providers?resources\u003dVCPU:2,MEMORY_MB:1024,DISK_GB:50`"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"If the resource class is not existing, then it will return a HTTP 400."}],"source_content_type":"text/x-rst","patch_set":14,"id":"3a71b18c_ca42053e","line":67,"range":{"start_line":67,"start_character":22,"end_line":67,"end_character":37},"in_reply_to":"3a71b18c_a281c291","updated":"2016-12-10 21:20:51.000000000","message":"Done","commit_id":"eb0b88476cd759273619c095a91651b37ad2c865"}],"nova/tests/functional/api/openstack/placement/gabbits/request.yaml":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"127b9a1a6840ad29f0922f85ce13d0ff51307556","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# More interesting tests for usages are in with_allocations"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"fixtures:"},{"line_number":4,"context_line":"    - APIFixture"}],"source_content_type":"text/x-yaml","patch_set":12,"id":"3a71b18c_05ce075a","line":1,"updated":"2016-12-08 13:47:49.000000000","message":"oops, missed to delete that one.","commit_id":"473e6c38e090c06e477dfce7e5846818283ebe34"}],"nova/tests/functional/api/openstack/placement/gabbits/resource-provider.yaml":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"6a1ccfe36bcffb3981a6c9fbe19d5b74c452258a","unresolved":false,"context_lines":[{"line_number":196,"context_line":"  GET: /resource_providers?resources\u003dMEMORY_MB:10240"},{"line_number":197,"context_line":"  response_json_paths:"},{"line_number":198,"context_line":"      $.resource_providers.`len`: 0"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"- name: list one resource provider filtering by uuid"},{"line_number":201,"context_line":"  GET: /resource_providers?uuid\u003d$ENVIRON[\u0027RP_UUID\u0027]"},{"line_number":202,"context_line":"  response_json_paths:"}],"source_content_type":"text/x-yaml","patch_set":19,"id":"ba5201f7_3e9de065","line":199,"updated":"2017-01-03 07:20:43.000000000","message":"Better to have a case for resource class not found","commit_id":"4115123f9f60fbde7e2e8b354e0df44fb5d78dbd"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"33854f5eed85a94cb7cc9a26764aa718e6b16045","unresolved":false,"context_lines":[{"line_number":196,"context_line":"  GET: /resource_providers?resources\u003dMEMORY_MB:10240"},{"line_number":197,"context_line":"  response_json_paths:"},{"line_number":198,"context_line":"      $.resource_providers.`len`: 0"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"- name: list one resource provider filtering by uuid"},{"line_number":201,"context_line":"  GET: /resource_providers?uuid\u003d$ENVIRON[\u0027RP_UUID\u0027]"},{"line_number":202,"context_line":"  response_json_paths:"}],"source_content_type":"text/x-yaml","patch_set":19,"id":"ba5201f7_7102f970","line":199,"in_reply_to":"ba5201f7_3e9de065","updated":"2017-01-04 16:44:25.000000000","message":"Done","commit_id":"4115123f9f60fbde7e2e8b354e0df44fb5d78dbd"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"e400aab8e5f1aad2cdabc125b38db079f1bd5795","unresolved":false,"context_lines":[{"line_number":136,"context_line":"  status: 400"},{"line_number":137,"context_line":"  response_strings:"},{"line_number":138,"context_line":"      - \u0027Invalid query string parameters\u0027"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"- name: list resource providers providing resources filter before API 1.3"},{"line_number":141,"context_line":"  GET: /resource_providers?resources\u003dVCPU:1"},{"line_number":142,"context_line":"  request_headers:"}],"source_content_type":"text/x-yaml","patch_set":22,"id":"ba5201f7_940e3639","line":139,"updated":"2017-01-05 19:48:30.000000000","message":"Instead of adding these tests in here, and changing the way the fixtures are being used for the tests that already existed, you might consider putting the resource filtering tests in their own yaml file that you create (in the same dir).","commit_id":"bf99bb82976b5f4a7f35d3abe9131b38969372d2"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"73992110cf2d4fec9ceba8876e3df1fa3ace37d1","unresolved":false,"context_lines":[{"line_number":137,"context_line":"  response_strings:"},{"line_number":138,"context_line":"      - \u0027Invalid query string parameters\u0027"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"- name: list resource providers providing resources filter before API 1.4"},{"line_number":141,"context_line":"  GET: /resource_providers?resources\u003dVCPU:1"},{"line_number":142,"context_line":"  request_headers:"},{"line_number":143,"context_line":"      OpenStack-API-Version: placement 1.3"}],"source_content_type":"text/x-yaml","patch_set":24,"id":"ba5201f7_6b12735a","line":140,"updated":"2017-01-09 16:13:27.000000000","message":"(copying my comment from an earlier patchset to this one):\n\nInstead of adding these tests in here, and changing the way the fixtures are being used for the tests that already existed, you might consider putting the resource filtering tests in their own yaml file that you create (in the same dir).","commit_id":"4ea057819cfef500c4e943c0cc59d84c8e1a1263"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"1e25d1587008ede66367932e256b788dde3a7263","unresolved":false,"context_lines":[{"line_number":137,"context_line":"  response_strings:"},{"line_number":138,"context_line":"      - \u0027Invalid query string parameters\u0027"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"- name: list resource providers providing resources filter before API 1.4"},{"line_number":141,"context_line":"  GET: /resource_providers?resources\u003dVCPU:1"},{"line_number":142,"context_line":"  request_headers:"},{"line_number":143,"context_line":"      OpenStack-API-Version: placement 1.3"}],"source_content_type":"text/x-yaml","patch_set":24,"id":"ba5201f7_f7ec802b","line":140,"in_reply_to":"ba5201f7_6b12735a","updated":"2017-01-09 17:17:11.000000000","message":"Done","commit_id":"4ea057819cfef500c4e943c0cc59d84c8e1a1263"}],"nova/tests/functional/api/openstack/placement/gabbits/resource-providers-querying.yaml":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7a9976076b6472319218f3c9ee0a3b9afda26412","unresolved":false,"context_lines":[{"line_number":47,"context_line":"      - \u0027Invalid query string parameters\u0027"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"- name: list resource providers providing a badly-formatted resources filter"},{"line_number":50,"context_line":"  GET: /resource_providers?resources\u003dVCPU"},{"line_number":51,"context_line":"  status: 400"},{"line_number":52,"context_line":"  response_strings:"},{"line_number":53,"context_line":"      - \u0027Badly formed resources parameter. Expected resources query string parameter in form:\u0027"}],"source_content_type":"text/x-yaml","patch_set":26,"id":"7a3c09a3_07e53708","line":50,"updated":"2017-01-13 21:28:19.000000000","message":"We should have one like this too:\n\n?resources\u003dVCPU:2,","commit_id":"5d6220ffecfaab2e37a73f40ba7056aa2e15b744"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7a9976076b6472319218f3c9ee0a3b9afda26412","unresolved":false,"context_lines":[{"line_number":74,"context_line":"      - \u0027Wrong resource name in request\u0027"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"- name: list resource providers providing resources"},{"line_number":77,"context_line":"  GET: /resource_providers?resources\u003dDISK_GB:500"},{"line_number":78,"context_line":"  response_json_paths:"},{"line_number":79,"context_line":"      $.resource_providers.`len`: 1"},{"line_number":80,"context_line":"      $.resource_providers[0].uuid: $ENVIRON[\u0027RP_UUID\u0027]"}],"source_content_type":"text/x-yaml","patch_set":26,"id":"7a3c09a3_27f233d3","line":77,"updated":"2017-01-13 21:28:19.000000000","message":"We should have a positive test with multiple resource classes to know we\u0027re handling the comma.","commit_id":"5d6220ffecfaab2e37a73f40ba7056aa2e15b744"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a1c69f8e5597dfe6418138a1d37ad15c9df6d276","unresolved":false,"context_lines":[{"line_number":74,"context_line":"      - \u0027Wrong resource name in request\u0027"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"- name: list resource providers providing resources"},{"line_number":77,"context_line":"  GET: /resource_providers?resources\u003dDISK_GB:500"},{"line_number":78,"context_line":"  response_json_paths:"},{"line_number":79,"context_line":"      $.resource_providers.`len`: 1"},{"line_number":80,"context_line":"      $.resource_providers[0].uuid: $ENVIRON[\u0027RP_UUID\u0027]"}],"source_content_type":"text/x-yaml","patch_set":26,"id":"7a3c09a3_6aeec28c","line":77,"in_reply_to":"7a3c09a3_27f233d3","updated":"2017-01-13 22:16:01.000000000","message":"We should also have a positive test that has the resource provider in an aggregate and then use the \u0027resources\u0027 query parameter with the \u0027member_of\u0027 query parameter to make sure that all works together.","commit_id":"5d6220ffecfaab2e37a73f40ba7056aa2e15b744"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d87fb7d3a1a0e782da4b84f61e96519a61a0fdc5","unresolved":false,"context_lines":[{"line_number":79,"context_line":"      $.resource_providers.`len`: 1"},{"line_number":80,"context_line":"      $.resource_providers[0].uuid: $ENVIRON[\u0027RP_UUID\u0027]"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"- name: list resource providers providing resources (no match - less than min_unit)"},{"line_number":83,"context_line":"  GET: /resource_providers?resources\u003dDISK_GB:1"},{"line_number":84,"context_line":"  response_json_paths:"},{"line_number":85,"context_line":"      $.resource_providers.`len`: 0"}],"source_content_type":"text/x-yaml","patch_set":26,"id":"7a3c09a3_87304758","line":82,"range":{"start_line":82,"start_character":74,"end_line":82,"end_character":82},"updated":"2017-01-13 21:35:37.000000000","message":"The min/max unit and step size stuff is going to be tricky from the developer side. I think that\u0027s a wrinkle that will eventually need to be handled in the API reference docs. I could just see someone making a query and getting 0 results back because they didn\u0027t consider those parameters.","commit_id":"5d6220ffecfaab2e37a73f40ba7056aa2e15b744"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4412fc7109ccd8a4a1f0a163b2de3e27547dcac2","unresolved":false,"context_lines":[{"line_number":79,"context_line":"      $.resource_providers.`len`: 1"},{"line_number":80,"context_line":"      $.resource_providers[0].uuid: $ENVIRON[\u0027RP_UUID\u0027]"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"- name: list resource providers providing resources (no match - less than min_unit)"},{"line_number":83,"context_line":"  GET: /resource_providers?resources\u003dDISK_GB:1"},{"line_number":84,"context_line":"  response_json_paths:"},{"line_number":85,"context_line":"      $.resource_providers.`len`: 0"}],"source_content_type":"text/x-yaml","patch_set":26,"id":"7a3c09a3_cab5f6cd","line":82,"range":{"start_line":82,"start_character":74,"end_line":82,"end_character":82},"in_reply_to":"7a3c09a3_87304758","updated":"2017-01-13 22:09:40.000000000","message":"We could also mention this a bit in the REST API version history doc for the 1.4 microversion.","commit_id":"5d6220ffecfaab2e37a73f40ba7056aa2e15b744"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7a9976076b6472319218f3c9ee0a3b9afda26412","unresolved":false,"context_lines":[{"line_number":95,"context_line":"      $.resource_providers.`len`: 0"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"- name: list resource providers providing resources (no match - bad step size)"},{"line_number":98,"context_line":"  GET: /resource_providers?resources\u003dDISK_GB:11"},{"line_number":99,"context_line":"  response_json_paths:"},{"line_number":100,"context_line":"      $.resource_providers.`len`: 0"},{"line_number":101,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":26,"id":"7a3c09a3_c7b96feb","line":98,"updated":"2017-01-13 21:28:19.000000000","message":"We should have a negative test where one resource is a match (let\u0027s say DISK_GB:500) but another resource class (that exists, so we\u0027d have to add that allocation, maybe VCPU) that doesn\u0027t.","commit_id":"5d6220ffecfaab2e37a73f40ba7056aa2e15b744"}],"releasenotes/notes/placement-rest-api-filter-providers-by-resources-0ab51c9766fe654f.yaml":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"167c4c43ab0ed87f203792df5fb90c75bdf3f301","unresolved":false,"context_lines":[{"line_number":6,"context_line":"    can have a \"resources\" query string parameter supplied that indicates the"},{"line_number":7,"context_line":"    requested amounts of various resources that a provider must have the"},{"line_number":8,"context_line":"    capacity to serve. The \"resources\" query string parameter takes the form"},{"line_number":9,"context_line":"    \"?resources\u003d$RESOURCE_CLASS_NAME:$AMOUNT,$RESOURCE_CLASS_NAME:$AMOUNT\". For"},{"line_number":10,"context_line":"    instance, if the user wishes to see resource providers that can service a"},{"line_number":11,"context_line":"    request for 2 vCPUs, 1024 MB of RAM and 50 GB of disk space, the user can"},{"line_number":12,"context_line":"    issue a request to"}],"source_content_type":"text/x-yaml","patch_set":26,"id":"7a3c09a3_31e46a0c","line":9,"range":{"start_line":9,"start_character":4,"end_line":9,"end_character":74},"updated":"2017-01-12 21:18:24.000000000","message":"nit: this might look better in ``?resources\u003d...``.","commit_id":"5d6220ffecfaab2e37a73f40ba7056aa2e15b744"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"167c4c43ab0ed87f203792df5fb90c75bdf3f301","unresolved":false,"context_lines":[{"line_number":9,"context_line":"    \"?resources\u003d$RESOURCE_CLASS_NAME:$AMOUNT,$RESOURCE_CLASS_NAME:$AMOUNT\". For"},{"line_number":10,"context_line":"    instance, if the user wishes to see resource providers that can service a"},{"line_number":11,"context_line":"    request for 2 vCPUs, 1024 MB of RAM and 50 GB of disk space, the user can"},{"line_number":12,"context_line":"    issue a request to"},{"line_number":13,"context_line":"    `GET /resource_providers?resources\u003dVCPU:2,MEMORY_MB:1024,DISK_GB:50`"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"    The placement API is only available to admin users."}],"source_content_type":"text/x-yaml","patch_set":26,"id":"7a3c09a3_11204e49","line":13,"range":{"start_line":12,"start_character":4,"end_line":13,"end_character":72},"updated":"2017-01-12 21:18:24.000000000","message":"We should put this in a code block like:\n\nissue a request to::\n\n  ``GET /resource_providers?resources\u003dVCPU:2,MEMORY_MB:1024,DISK_GB:50``\n\nOr something like that.\n\nAnd to do that formatting, you\u0027d need:\n\nfeatures:\n  - |\n    A new Placement API...","commit_id":"5d6220ffecfaab2e37a73f40ba7056aa2e15b744"}]}
