)]}'
{"refstack/api/controllers/guidelines.py":[{"author":{"_account_id":10234,"name":"Andrey Pavlov","email":"andrey.mp@gmail.com","username":"andrey-mp"},"change_message_id":"72500b2dceddf08143a1025543d39ddc8133e09a","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        g \u003d guidelines.Guidelines()"},{"line_number":42,"context_line":"        json \u003d g.get_guideline_contents(version)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        if json:"},{"line_number":45,"context_line":"            if pecan.request.GET.get(const.TYPE):"},{"line_number":46,"context_line":"                types \u003d pecan.request.GET.get(const.TYPE).split(\u0027,\u0027)"},{"line_number":47,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_d3503161","line":44,"range":{"start_line":44,"start_character":8,"end_line":44,"end_character":10},"updated":"2016-04-10 18:45:54.000000000","message":"what about -\n\nif not json:\n    return Error\n\nother code...","commit_id":"818286eaac6f85aaf67dceb220fd6b13fb854bc0"},{"author":{"_account_id":9626,"name":"Paul Van Eck","email":"pvaneck@us.ibm.com","username":"pvaneck"},"change_message_id":"70c6fafc1643a026320d4b12a278db999f0b1c1f","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        g \u003d guidelines.Guidelines()"},{"line_number":42,"context_line":"        json \u003d g.get_guideline_contents(version)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        if json:"},{"line_number":45,"context_line":"            if pecan.request.GET.get(const.TYPE):"},{"line_number":46,"context_line":"                types \u003d pecan.request.GET.get(const.TYPE).split(\u0027,\u0027)"},{"line_number":47,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a18252c_4925d1c0","line":44,"range":{"start_line":44,"start_character":8,"end_line":44,"end_character":10},"in_reply_to":"9a061dce_d3503161","updated":"2016-04-12 00:23:52.000000000","message":"Done","commit_id":"818286eaac6f85aaf67dceb220fd6b13fb854bc0"}],"refstack/api/guidelines.py":[{"author":{"_account_id":10234,"name":"Andrey Pavlov","email":"andrey.mp@gmail.com","username":"andrey-mp"},"change_message_id":"72500b2dceddf08143a1025543d39ddc8133e09a","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        are given. If not target is specified, then all capabilities are given."},{"line_number":111,"context_line":"        \"\"\""},{"line_number":112,"context_line":"        components \u003d guideline_json[\u0027components\u0027]"},{"line_number":113,"context_line":"        if target \u003d\u003d \u0027platform\u0027:"},{"line_number":114,"context_line":"            platform_components \u003d guideline_json[\u0027platform\u0027][\u0027required\u0027]"},{"line_number":115,"context_line":"            target_caps \u003d set()"},{"line_number":116,"context_line":"            for component in platform_components:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a1b2928_9cf28d6e","line":113,"updated":"2016-04-10 18:45:54.000000000","message":"may I suggest another implementation?\n(similar to JS code)\n\ntargets \u003d set()\nif target !\u003d \u0027platform\u0027:\n    targets.append(target)\nelse:\n    p \u003d full_list[\u0027platform\u0027]\n    targets \u003d set().union(p[\u0027required\u0027]).union(p[\u0027advisory\u0027])\n\nfor target in targets:\n    target_caps \u003d set()\n    for component in platform_components:\n        ...\n\n\nI made similar implemetation in prototype here:\nhttps://github.com/cloudscaling/refstack/commit/945bfce6b70566b6917ed90cbeb148098f6d82a6#diff-ab9604e07ef0597920231aef1fee25a3R168","commit_id":"818286eaac6f85aaf67dceb220fd6b13fb854bc0"},{"author":{"_account_id":9626,"name":"Paul Van Eck","email":"pvaneck@us.ibm.com","username":"pvaneck"},"change_message_id":"70c6fafc1643a026320d4b12a278db999f0b1c1f","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        are given. If not target is specified, then all capabilities are given."},{"line_number":111,"context_line":"        \"\"\""},{"line_number":112,"context_line":"        components \u003d guideline_json[\u0027components\u0027]"},{"line_number":113,"context_line":"        if target \u003d\u003d \u0027platform\u0027:"},{"line_number":114,"context_line":"            platform_components \u003d guideline_json[\u0027platform\u0027][\u0027required\u0027]"},{"line_number":115,"context_line":"            target_caps \u003d set()"},{"line_number":116,"context_line":"            for component in platform_components:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a18252c_6431d4ec","line":113,"in_reply_to":"7a1b2928_9cf28d6e","updated":"2016-04-12 00:23:52.000000000","message":"Adjusted my implementation to use a targets set then just loop over that like in your implementation.","commit_id":"818286eaac6f85aaf67dceb220fd6b13fb854bc0"},{"author":{"_account_id":10234,"name":"Andrey Pavlov","email":"andrey.mp@gmail.com","username":"andrey-mp"},"change_message_id":"acd633bd81d250c69636e0c02b5a7e39d16f75ba","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        if target !\u003d \u0027platform\u0027:"},{"line_number":115,"context_line":"            targets.add(target)"},{"line_number":116,"context_line":"        else:"},{"line_number":117,"context_line":"            targets.update(guideline_json[\u0027platform\u0027][\u0027required\u0027])"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        target_caps \u003d set()"},{"line_number":120,"context_line":"        for component in targets:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_37f54b83","line":117,"range":{"start_line":117,"start_character":55,"end_line":117,"end_character":63},"updated":"2016-04-12 06:30:07.000000000","message":"is it needed here to include not only \u0027required\u0027?\nI check that only required field is filled right now.\nbut spec describes that all should be included by default.","commit_id":"ebd2adfeadb9dd2126d257f52133bd511b80e4df"},{"author":{"_account_id":10526,"name":"Catherine Diep","email":"cdiep@us.ibm.com","username":"cdiep"},"change_message_id":"649e01d6d246fc95847badff3d848ae10a517e3c","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        if target !\u003d \u0027platform\u0027:"},{"line_number":115,"context_line":"            targets.add(target)"},{"line_number":116,"context_line":"        else:"},{"line_number":117,"context_line":"            targets.update(guideline_json[\u0027platform\u0027][\u0027required\u0027])"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        target_caps \u003d set()"},{"line_number":120,"context_line":"        for component in targets:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_23867613","line":117,"range":{"start_line":117,"start_character":55,"end_line":117,"end_character":63},"in_reply_to":"5a18252c_1a2da2a7","updated":"2016-04-13 02:31:57.000000000","message":"Good catch Andrey.\n\nI agreed with Paul that we should be handling non-required platform components in another patch because there is no components defined in the other than platform.required at the moment.\n\nFor the time being, does it makes sense to allow the values of target to be one of the following (instead of just platform, compute, object)?\n\n- platform\n- required (this will include tests of all components in required)\n- required.compute \n- required.object\n- advisory\n- ...\n\nFor the scenario described in Paul\u0027s example, I think we should consult with DefCore for solution.","commit_id":"ebd2adfeadb9dd2126d257f52133bd511b80e4df"},{"author":{"_account_id":9626,"name":"Paul Van Eck","email":"pvaneck@us.ibm.com","username":"pvaneck"},"change_message_id":"bce4c98dba8b148973acae1761dff32c6f247bda","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        if target !\u003d \u0027platform\u0027:"},{"line_number":115,"context_line":"            targets.add(target)"},{"line_number":116,"context_line":"        else:"},{"line_number":117,"context_line":"            targets.update(guideline_json[\u0027platform\u0027][\u0027required\u0027])"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        target_caps \u003d set()"},{"line_number":120,"context_line":"        for component in targets:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_a64a94aa","line":117,"range":{"start_line":117,"start_character":55,"end_line":117,"end_character":63},"in_reply_to":"5a18252c_23867613","updated":"2016-04-13 03:33:01.000000000","message":"Let\u0027s not complicate things and overload the target variable. It\u0027s more straightforward to have target only be either be the name of a component (i.e. compute, storage) or \u0027platform\u0027.\n\nThose other suggestions can be created using the target parameter in conjunction with the types param...\nex:\nrequired.object would simply be target\u003dobject\u0026types\u003drequired","commit_id":"ebd2adfeadb9dd2126d257f52133bd511b80e4df"},{"author":{"_account_id":9626,"name":"Paul Van Eck","email":"pvaneck@us.ibm.com","username":"pvaneck"},"change_message_id":"57510472b6757fea655dcac5b073e1011b48ec40","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        if target !\u003d \u0027platform\u0027:"},{"line_number":115,"context_line":"            targets.add(target)"},{"line_number":116,"context_line":"        else:"},{"line_number":117,"context_line":"            targets.update(guideline_json[\u0027platform\u0027][\u0027required\u0027])"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        target_caps \u003d set()"},{"line_number":120,"context_line":"        for component in targets:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_1a2da2a7","line":117,"range":{"start_line":117,"start_character":55,"end_line":117,"end_character":63},"in_reply_to":"5a18252c_37f54b83","updated":"2016-04-13 00:19:09.000000000","message":"I think the spec may be referring more to component categories. But maybe ignoring what is in platform, and just return all capabilities in all components by default (i.e. when no target is specified) may be better (instead of default target\u003dplatform)?\n\nBut, I do think that we should be handling non-required platform components if there is a possibility of there being one. However, I am thinking we should tackle that in another patch since the UI also pulls from only \u0027platform.required\u0027. Some logic will probably have to be implemented for statuses defined in \u0027platform\u0027 to take precedence over a capability\u0027s status defined in the actual component.\nFor example, if a component was defined as \u0027advisory\u0027 in \u0027platform\u0027, all \u0027required\u0027 capabilities in that \u0027advisory\u0027 component should probably be treated/labeled as \u0027advisory\u0027.\nThat way an \u0027advisory\u0027 component won\u0027t lead to capabilities being \u0027required\u0027.\n\nGets kinda cumbersome with the two layers of categorization when it comes to \u0027platform\u0027.","commit_id":"ebd2adfeadb9dd2126d257f52133bd511b80e4df"}]}
