)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"ba8d6f51bb398f6bfa5a2b01a0d00a5ab37db6cd","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Enhance the ComputeCapabilities filter"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This commit is to enhance ComputeCapabilities filter to accept the"},{"line_number":10,"context_line":"capabilities as list of values and to be able to select the node"},{"line_number":11,"context_line":"based on the same."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I4269a82ac4b6253b2101865fc44aa3a05ff3e563"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"3a961159_6564c8e5","line":10,"updated":"2014-12-16 17:03:07.000000000","message":"Well, the testcase you provide is not showing a list of values but instead a string with some words in there","commit_id":"b56f7b1c9d7f12a7317f20b2722f099b2b318184"},{"author":{"_account_id":11297,"name":"Nisha Agarwal","email":"agarwalnisha1980@gmail.com","username":"Nisha"},"change_message_id":"e1be238d9fefb56408a7bc4676f1acb3734fa79b","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Enhance the ComputeCapabilities filter"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This commit is to enhance ComputeCapabilities filter to accept the"},{"line_number":10,"context_line":"capabilities as list of values and to be able to select the node"},{"line_number":11,"context_line":"based on the same."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I4269a82ac4b6253b2101865fc44aa3a05ff3e563"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"3a961159_ba032a0c","line":10,"in_reply_to":"3a961159_6564c8e5","updated":"2014-12-16 19:13:06.000000000","message":"The list is actually the space seperated values here and not comma seperated as the capabilities in ironic(or other module) can have this kind of input as well.\n\ncapabilities\u003d\u0027key1:val1a val1b,key2:val2\u0027\n\nSince the comma seperates the two keys, comma cannot be used as a seperator in the values for a list. Hence i have used space instead of comma","commit_id":"b56f7b1c9d7f12a7317f20b2722f099b2b318184"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"923224d5cfe9c93dc986e248358cd1dc0f70a843","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Enhance the ComputeCapabilities filter"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This commit is to enhance ComputeCapabilities filter to accept the"},{"line_number":10,"context_line":"capabilities as list of values and to be able to select the node"},{"line_number":11,"context_line":"based on the same."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I4269a82ac4b6253b2101865fc44aa3a05ff3e563"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"3a961159_ed79d093","line":10,"updated":"2014-12-23 11:17:00.000000000","message":"That\u0027s not true, you\u0027re not passing a list, even not a JSON encoded list, you\u0027re just passing a string with a specific sugar formatting...","commit_id":"d88514cf994e5c5760a1217bed0b2ace1c686b09"},{"author":{"_account_id":11297,"name":"Nisha Agarwal","email":"agarwalnisha1980@gmail.com","username":"Nisha"},"change_message_id":"c45afa5fc91aa37e8f902fc641c97052631a60a6","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Enhance the ComputeCapabilities filter"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This commit is to enhance ComputeCapabilities filter to accept the"},{"line_number":10,"context_line":"capabilities as list of values and to be able to select the node"},{"line_number":11,"context_line":"based on the same."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I4269a82ac4b6253b2101865fc44aa3a05ff3e563"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"3a961159_490ddb34","line":10,"in_reply_to":"3a961159_ed79d093","updated":"2015-01-05 11:02:36.000000000","message":"This is due to the existing format of ComputeCapabilities filter. :(","commit_id":"d88514cf994e5c5760a1217bed0b2ace1c686b09"}],"nova/scheduler/filters/compute_capabilities_filter.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"ba8d6f51bb398f6bfa5a2b01a0d00a5ab37db6cd","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                if cap is None:"},{"line_number":67,"context_line":"                    return False"},{"line_number":68,"context_line":"            if not extra_specs_ops.match(str(cap), req):"},{"line_number":69,"context_line":"                scope \u003d str(cap).split(\u0027 \u0027)"},{"line_number":70,"context_line":"                if len(scope) \u003e 1:"},{"line_number":71,"context_line":"                    for index in range(0, len(scope)):"},{"line_number":72,"context_line":"                        if ((scope[index]) \u003d\u003d req):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_45aeece8","line":69,"updated":"2014-12-16 17:03:07.000000000","message":"I really don\u0027t like having this split... Why are you providing a string instead of a list then ?","commit_id":"b56f7b1c9d7f12a7317f20b2722f099b2b318184"},{"author":{"_account_id":11297,"name":"Nisha Agarwal","email":"agarwalnisha1980@gmail.com","username":"Nisha"},"change_message_id":"e1be238d9fefb56408a7bc4676f1acb3734fa79b","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                if cap is None:"},{"line_number":67,"context_line":"                    return False"},{"line_number":68,"context_line":"            if not extra_specs_ops.match(str(cap), req):"},{"line_number":69,"context_line":"                scope \u003d str(cap).split(\u0027 \u0027)"},{"line_number":70,"context_line":"                if len(scope) \u003e 1:"},{"line_number":71,"context_line":"                    for index in range(0, len(scope)):"},{"line_number":72,"context_line":"                        if ((scope[index]) \u003d\u003d req):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_3a365ae8","line":69,"in_reply_to":"3a961159_45aeece8","updated":"2014-12-16 19:13:06.000000000","message":"Ditto reason as provided in commit message.","commit_id":"b56f7b1c9d7f12a7317f20b2722f099b2b318184"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"94c35ddd6defcc068b2c7ee53153557e2f0256b1","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                    return False"},{"line_number":68,"context_line":"            if not extra_specs_ops.match(str(cap), req):"},{"line_number":69,"context_line":"                scope \u003d str(cap).split(\u0027 \u0027)"},{"line_number":70,"context_line":"                if len(scope) \u003e 1:"},{"line_number":71,"context_line":"                    for index in range(0, len(scope)):"},{"line_number":72,"context_line":"                        if ((scope[index]) \u003d\u003d req):"},{"line_number":73,"context_line":"                            return True"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_da605da7","line":70,"range":{"start_line":70,"start_character":16,"end_line":70,"end_character":34},"updated":"2014-12-22 15:17:40.000000000","message":"I\u0027m just wondering we need use this expression?","commit_id":"3ec8493cb589d2279e4665848eee0f292a81a059"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"54129d16dafe93bdeaca0f372aeb9b4bc5f9266c","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                    return False"},{"line_number":68,"context_line":"            if not extra_specs_ops.match(str(cap), req):"},{"line_number":69,"context_line":"                scope \u003d str(cap).split(\u0027 \u0027)"},{"line_number":70,"context_line":"                if len(scope) \u003e 1:"},{"line_number":71,"context_line":"                    for index in range(0, len(scope)):"},{"line_number":72,"context_line":"                        if ((scope[index]) \u003d\u003d req):"},{"line_number":73,"context_line":"                            return True"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_093d37dd","line":70,"in_reply_to":"3a961159_da605da7","updated":"2014-12-23 05:33:24.000000000","message":"Hi Mike, the idea is to perform the operation only cap has more than 1 item seperated by space, otherwise it boils down to comparing only one item , which L68 does. But , may be yes , we could avoid doing the check as it doesn\u0027t make much difference. let me modify the code.\n\nThanks","commit_id":"3ec8493cb589d2279e4665848eee0f292a81a059"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"94c35ddd6defcc068b2c7ee53153557e2f0256b1","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            if not extra_specs_ops.match(str(cap), req):"},{"line_number":69,"context_line":"                scope \u003d str(cap).split(\u0027 \u0027)"},{"line_number":70,"context_line":"                if len(scope) \u003e 1:"},{"line_number":71,"context_line":"                    for index in range(0, len(scope)):"},{"line_number":72,"context_line":"                        if ((scope[index]) \u003d\u003d req):"},{"line_number":73,"context_line":"                            return True"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"                LOG.debug(\"extra_spec requirement \u0027%(req)s\u0027 does not match \""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_7a93e9a2","line":72,"range":{"start_line":71,"start_character":20,"end_line":72,"end_character":51},"updated":"2014-12-22 15:17:40.000000000","message":"Better -\u003e\n    if req in scope:\n        return True","commit_id":"3ec8493cb589d2279e4665848eee0f292a81a059"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"54129d16dafe93bdeaca0f372aeb9b4bc5f9266c","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                scope \u003d str(cap).split(\u0027 \u0027)"},{"line_number":70,"context_line":"                if len(scope) \u003e 1:"},{"line_number":71,"context_line":"                    for index in range(0, len(scope)):"},{"line_number":72,"context_line":"                        if ((scope[index]) \u003d\u003d req):"},{"line_number":73,"context_line":"                            return True"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"                LOG.debug(\"extra_spec requirement \u0027%(req)s\u0027 does not match \""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_0c0b8524","line":72,"in_reply_to":"3a961159_7a93e9a2","updated":"2014-12-23 05:33:24.000000000","message":"will update it. Thanks.","commit_id":"3ec8493cb589d2279e4665848eee0f292a81a059"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"923224d5cfe9c93dc986e248358cd1dc0f70a843","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                if cap is None:"},{"line_number":67,"context_line":"                    return False"},{"line_number":68,"context_line":"            if not extra_specs_ops.match(str(cap), req):"},{"line_number":69,"context_line":"                scope \u003d str(cap).split(\u0027 \u0027)"},{"line_number":70,"context_line":"                if req in scope:"},{"line_number":71,"context_line":"                    return True"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_6d3ec0b9","line":69,"updated":"2014-12-23 11:17:00.000000000","message":"I still disagree with providing the list of values as strings separated by a space. That\u0027s still really hacky, and I honestly already dislike using a comma for separating the keys.\n\nCould we just please use more robust methods for transforming a string into a list, like a JSON encoded list ?","commit_id":"d88514cf994e5c5760a1217bed0b2ace1c686b09"},{"author":{"_account_id":11297,"name":"Nisha Agarwal","email":"agarwalnisha1980@gmail.com","username":"Nisha"},"change_message_id":"bfbf65287298b686b8cdd5ce5b27f60a7935c6c9","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                if cap is None:"},{"line_number":67,"context_line":"                    return False"},{"line_number":68,"context_line":"            if not extra_specs_ops.match(str(cap), req):"},{"line_number":69,"context_line":"                scope \u003d str(cap).split(\u0027 \u0027)"},{"line_number":70,"context_line":"                if req in scope:"},{"line_number":71,"context_line":"                    return True"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1a930d6b_a946244d","line":69,"in_reply_to":"1a930d6b_51c0472a","updated":"2015-01-24 10:45:09.000000000","message":"i just tried your suggested piece of code on python shell:\n\n\u003e\u003e\u003e cap\u003d\"a b c d e\"\n\u003e\u003e\u003e try:\n...     scope \u003d jsonutils.loads(cap)\n... except ValueError:\n...     scope \u003d [cap]\n...\n\u003e\u003e\u003e print scope\n[\u0027a b c d e\u0027]\n\u003e\u003e\u003e\n\nThis is not the desired output.\n\nThe desired output is explained in above comment.","commit_id":"d88514cf994e5c5760a1217bed0b2ace1c686b09"},{"author":{"_account_id":11297,"name":"Nisha Agarwal","email":"agarwalnisha1980@gmail.com","username":"Nisha"},"change_message_id":"db6fc7cdcfa2f187fef318e2088a2859528470f6","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                if cap is None:"},{"line_number":67,"context_line":"                    return False"},{"line_number":68,"context_line":"            if not extra_specs_ops.match(str(cap), req):"},{"line_number":69,"context_line":"                scope \u003d str(cap).split(\u0027 \u0027)"},{"line_number":70,"context_line":"                if req in scope:"},{"line_number":71,"context_line":"                    return True"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1a930d6b_51c0472a","line":69,"in_reply_to":"1a930d6b_e296cb93","updated":"2015-01-22 17:27:10.000000000","message":"In this piece of code above,\n\nscope \u003d jsonutils.loads(cap)\n\nwhat is cap holding i.e. before this line gets executed?\n\nis it \u0027val1 val2 val3....valN\u0027?\n\nor is it \u0027[\u0027val1\u0027,\u0027val2\u0027,\u0027val3\u0027]?\n\nIf the suggested piece of code can handle \u0027val1 val2 val3....valN\u0027 format string to split into multiple values and get that parsed, then i can use the suggested piece of code.\n\nIf the `cap` stores the value as a proper python list, then it will require datatype change for `stats` variable in compute_node.py which means it may break compatibility for the clients who use ComputeCapabilities. (Explained in spec too)","commit_id":"d88514cf994e5c5760a1217bed0b2ace1c686b09"},{"author":{"_account_id":11297,"name":"Nisha Agarwal","email":"agarwalnisha1980@gmail.com","username":"Nisha"},"change_message_id":"c45afa5fc91aa37e8f902fc641c97052631a60a6","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                if cap is None:"},{"line_number":67,"context_line":"                    return False"},{"line_number":68,"context_line":"            if not extra_specs_ops.match(str(cap), req):"},{"line_number":69,"context_line":"                scope \u003d str(cap).split(\u0027 \u0027)"},{"line_number":70,"context_line":"                if req in scope:"},{"line_number":71,"context_line":"                    return True"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_eee76daa","line":69,"in_reply_to":"3a961159_6d3ec0b9","updated":"2015-01-05 11:02:36.000000000","message":"If we replace comma with the JSON encoded list,dictionary etc, then it will require changes in Nova and other related modules which may not be compatible for now.","commit_id":"d88514cf994e5c5760a1217bed0b2ace1c686b09"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"a3bae75099bc836362a024bde95d7e3b713cd064","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                if cap is None:"},{"line_number":67,"context_line":"                    return False"},{"line_number":68,"context_line":"            if not extra_specs_ops.match(str(cap), req):"},{"line_number":69,"context_line":"                scope \u003d str(cap).split(\u0027 \u0027)"},{"line_number":70,"context_line":"                if req in scope:"},{"line_number":71,"context_line":"                    return True"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1a930d6b_e296cb93","line":69,"in_reply_to":"3a961159_eee76daa","updated":"2015-01-22 15:13:33.000000000","message":"I don\u0027t see why you need to change all of this. Let me explain further thanks to this code :\n\n  try:\n    scope \u003d jsonutils.loads(cap)\n  except ValueError:\n    scope \u003d [cap]\n\nThis way, you preserve backwards compatibility with non-encoded capabilities and you allow to provide the list of capabilities in a JSON-encoded list like \u0027[\"cap1\",\"cap2\"]\u0027","commit_id":"d88514cf994e5c5760a1217bed0b2ace1c686b09"}]}
