)]}'
{"shade/_utils.py":[{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"2d5bc85140717f83c11d3140d800fca215e59623","unresolved":false,"context_lines":[{"line_number":361,"context_line":"    \"\"\"Normalize Identity roles.\"\"\""},{"line_number":362,"context_line":"    ret \u003d ["},{"line_number":363,"context_line":"        dict("},{"line_number":364,"context_line":"            domain_id\u003drole.get(\u0027domain_id\u0027),"},{"line_number":365,"context_line":"            id\u003drole.get(\u0027id\u0027),"},{"line_number":366,"context_line":"            name\u003drole.get(\u0027name\u0027),"},{"line_number":367,"context_line":"        ) for role in roles"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f287b81_9cb69c8a","line":364,"updated":"2017-09-01 15:43:19.000000000","message":"ACTUALLY - normalization happens in shade/_normalize.py now, but we haven\u0027t migrated everything from here to  it yet. We also have a standard dict that we add to all the objects (or all the ones we normalize) called \"location\" that contains project information.\n\nThat\u0027s a bit weird for these objects, since User and Role and Project don\u0027t exist in a project like all the other resources. So we need to add location (it also includes cloud and region) - but for these resources we need to override the project info. We can\u0027t do that by passing project_id\u003dNone, as that will cause the project info to be pulled from the current token, which would be wrong. Maybe lets do:\n\n  location \u003d self._get_current_location(project_id\u003d\u0027bogus\u0027)\n  location[\u0027project\u0027][\u0027id\u0027] \u003d None\n\nand update the end of the Location section in doc/source/user/model.rst to mention that identity resources don\u0027t exist in projects, so will have None for all project fields.\n\nFinally, all normalized resources have a \"properties\" field which is a dict with everything that was on the resource from the cloud that we didn\u0027t know about in normalization. Just adding an empty properties dict would be fine.\n\nSO - could I impose on you to do a couple of additional things:\n\n* move this to a _normalize_role and _normalize_roles method in shade/_normalize.py and update the call site\n* add location field as above\n* update doc/source/user/model.rst with an entry for Role and a note about project-less resources\n* add properties field as above","commit_id":"8ec08a48778dbe81152014acafb7afd5ae2e4e86"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"9ebc61e3ee7a08226ddbc0b337b65beb2f67fabe","unresolved":false,"context_lines":[{"line_number":361,"context_line":"    \"\"\"Normalize Identity roles.\"\"\""},{"line_number":362,"context_line":"    ret \u003d ["},{"line_number":363,"context_line":"        dict("},{"line_number":364,"context_line":"            domain_id\u003drole.get(\u0027domain_id\u0027),"},{"line_number":365,"context_line":"            id\u003drole.get(\u0027id\u0027),"},{"line_number":366,"context_line":"            name\u003drole.get(\u0027name\u0027),"},{"line_number":367,"context_line":"        ) for role in roles"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f287b81_bc4f1891","line":364,"in_reply_to":"7f287b81_9cb69c8a","updated":"2017-09-01 15:46:43.000000000","message":"Actually, all the identity resources will need a project-less location- so maybe we should make a _get_identity_location method that does the above (or some other approach) so we can just use it for domain, role, role_assignment user and service.\n\nBonus points if you want to do a patch to update those as well. :)","commit_id":"8ec08a48778dbe81152014acafb7afd5ae2e4e86"}],"shade/operatorcloud.py":[{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"975ae4dff10c18bbc3413317f336ea2b587e5a0d","unresolved":false,"context_lines":[{"line_number":1367,"context_line":"        if not v2 and domain_id:"},{"line_number":1368,"context_line":"            kwargs \u003d {\u0027domain_id\u0027: domain_id}"},{"line_number":1369,"context_line":"        data \u003d self._identity_client.get("},{"line_number":1370,"context_line":"            url, json\u003dkwargs, error_message\u003d\"Failed to list roles\")"},{"line_number":1371,"context_line":"        return _utils.normalize_roles(self._get_and_munchify(\u0027roles\u0027, data))"},{"line_number":1372,"context_line":""},{"line_number":1373,"context_line":"    def search_roles(self, name_or_id\u003dNone, filters\u003dNone, domain_id\u003dNone):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_80b602fa","line":1370,"range":{"start_line":1370,"start_character":17,"end_line":1370,"end_character":30},"updated":"2017-08-24 09:28:23.000000000","message":"it needs to be passed as query parameters in the url\n\nperhaps json will provide it within a body?","commit_id":"a3c5ae0b4c7b3b753f7c601c6514d29226760f61"}]}
