)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15961,"name":"lisali","email":"xiaoyan.li@intel.com","username":"lisali"},"change_message_id":"df625576f2a7c3e3a9539454cdb243c87ee27be4","unresolved":false,"context_lines":[{"line_number":9,"context_line":"When I create a replication volume with extra_specs"},{"line_number":10,"context_line":"\u0027replication_type\u003d\u003cis\u003e xxx\u0027, creation failure is expected. But the"},{"line_number":11,"context_line":"replication volume create success."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Please pay attention on \u0027\u003cis\u003e\u0027 and \u0027\u003cin\u003e\u0027 key words. Volume backend"},{"line_number":14,"context_line":"reports capabilities as replication_type\u003d[\u0027sync\u0027, \u0027async\u0027], so the"},{"line_number":15,"context_line":"valid extra_specs should be \u0027replication_type\u003d\u003cin\u003e sync\u0027 or"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9a68dd71_88cfb8b2","line":12,"updated":"2016-01-27 06:42:13.000000000","message":"s/the replication volume create success/the replication volume is created success/","commit_id":"787d2d55e5192b381a8ccaca8a456b179210bf6f"},{"author":{"_account_id":16793,"name":"Liucheng Jiang","email":"jiangliucheng@huawei.com","username":"Jiangliucheng"},"change_message_id":"9c24a96c257979f5e0cf549928784a142c7672e1","unresolved":false,"context_lines":[{"line_number":9,"context_line":"When I create a replication volume with extra_specs"},{"line_number":10,"context_line":"\u0027replication_type\u003d\u003cis\u003e xxx\u0027, creation failure is expected. But the"},{"line_number":11,"context_line":"replication volume create success."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Please pay attention on \u0027\u003cis\u003e\u0027 and \u0027\u003cin\u003e\u0027 key words. Volume backend"},{"line_number":14,"context_line":"reports capabilities as replication_type\u003d[\u0027sync\u0027, \u0027async\u0027], so the"},{"line_number":15,"context_line":"valid extra_specs should be \u0027replication_type\u003d\u003cin\u003e sync\u0027 or"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7a5de9d1_c925df5c","line":12,"in_reply_to":"9a68dd71_88cfb8b2","updated":"2016-01-27 16:19:25.000000000","message":"Done","commit_id":"787d2d55e5192b381a8ccaca8a456b179210bf6f"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"d7fce16384eb57aee3ba8346b043e019f907d949","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When I create a replication volume with extra_specs"},{"line_number":10,"context_line":"\u0027replication_type\u003d\u003cis\u003e xxx\u0027, creation failure is expected. But the"},{"line_number":11,"context_line":"replication volume is created success."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Please pay attention on \u0027\u003cis\u003e\u0027 and \u0027\u003cin\u003e\u0027 key words. Volume backend"},{"line_number":14,"context_line":"reports capabilities as replication_type\u003d[\u0027sync\u0027, \u0027async\u0027], so the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"7a5de9d1_37c062e0","line":11,"updated":"2016-01-28 12:38:11.000000000","message":"No, successful creation should be expected instead of failure.  The problem is not \u003cis\u003e failed to do its job, it\u0027s you misunderstand how \u003cis\u003e works.  The left operand \u0027replication_type\u0027s value ([\u0027sync\u0027, \u0027async\u0027]) in this case is converted to False, same for the right operand \u0027xxx\u0027, therefore, \u0027replication_type\u003d\u003cis\u003e XXX\u0027 is evaulated as True.","commit_id":"ea018f0ec506d9c67fba96dcb666681d45eda230"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"d7fce16384eb57aee3ba8346b043e019f907d949","unresolved":false,"context_lines":[{"line_number":14,"context_line":"reports capabilities as replication_type\u003d[\u0027sync\u0027, \u0027async\u0027], so the"},{"line_number":15,"context_line":"valid extra_specs should be \u0027replication_type\u003d\u003cin\u003e sync\u0027 or"},{"line_number":16,"context_line":"\u0027replication_type\u003d\u003cin\u003e async\u0027. When I use \u0027\u003cis\u003e\u0027 instead of \u0027\u003cin\u003e\u0027,"},{"line_number":17,"context_line":"the scheduler match the capabilities and choose an unexpected backend."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Cinder scheduler match values incorrectly when use \u0027\u003cis\u003e\u0027 method in"},{"line_number":20,"context_line":"capabilities_filter. Operator method \u0027\u003cis\u003e\u0027 should be used to compare"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"7a5de9d1_d7b6ae89","line":17,"updated":"2016-01-28 12:38:11.000000000","message":"What you described is expect, because what \u003cis\u003e operator does is to first convert both left/right operands (string) to boolean in a loose manner (not strict, anything other than \u0027t\u0027, \u0027true\u0027, \u0027on\u0027 \u0027y\u0027, \u0027yes\u0027 or \u00271\u0027 are treated as False, https://github.com/openstack/oslo.utils/blob/master/oslo_utils/strutils.py#L110-L121), and then evalute.","commit_id":"ea018f0ec506d9c67fba96dcb666681d45eda230"}],"cinder/scheduler/filters/extra_specs_ops.py":[{"author":{"_account_id":15961,"name":"lisali","email":"xiaoyan.li@intel.com","username":"lisali"},"change_message_id":"df625576f2a7c3e3a9539454cdb243c87ee27be4","unresolved":false,"context_lines":[{"line_number":30,"context_line":"#   \u003d, s\u003d\u003d, s!\u003d, s\u003e\u003d, s\u003e, s\u003c\u003d, s\u003c, \u003cin\u003e, \u003cis\u003e, \u003cor\u003e, \u003d\u003d, !\u003d, \u003e\u003d, \u003c\u003d"},{"line_number":31,"context_line":"# 2. Note that \u003cor\u003e is handled in a different way below."},{"line_number":32,"context_line":"# 3. If the first word in the extra_specs is not one of the operators,"},{"line_number":33,"context_line":"#   it is ignored."},{"line_number":34,"context_line":"_op_methods \u003d {\u0027\u003d\u0027: lambda x, y: float(x) \u003e\u003d float(y),"},{"line_number":35,"context_line":"               \u0027\u003cin\u003e\u0027: lambda x, y: y in x,"},{"line_number":36,"context_line":"               \u0027\u003cis\u003e\u0027: method_op_is,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_48f22008","line":33,"updated":"2016-01-27 06:42:13.000000000","message":"Please add a comments here so that people can use \u0027is\u0027 correctly.","commit_id":"787d2d55e5192b381a8ccaca8a456b179210bf6f"},{"author":{"_account_id":16793,"name":"Liucheng Jiang","email":"jiangliucheng@huawei.com","username":"Jiangliucheng"},"change_message_id":"9c24a96c257979f5e0cf549928784a142c7672e1","unresolved":false,"context_lines":[{"line_number":30,"context_line":"#   \u003d, s\u003d\u003d, s!\u003d, s\u003e\u003d, s\u003e, s\u003c\u003d, s\u003c, \u003cin\u003e, \u003cis\u003e, \u003cor\u003e, \u003d\u003d, !\u003d, \u003e\u003d, \u003c\u003d"},{"line_number":31,"context_line":"# 2. Note that \u003cor\u003e is handled in a different way below."},{"line_number":32,"context_line":"# 3. If the first word in the extra_specs is not one of the operators,"},{"line_number":33,"context_line":"#   it is ignored."},{"line_number":34,"context_line":"_op_methods \u003d {\u0027\u003d\u0027: lambda x, y: float(x) \u003e\u003d float(y),"},{"line_number":35,"context_line":"               \u0027\u003cin\u003e\u0027: lambda x, y: y in x,"},{"line_number":36,"context_line":"               \u0027\u003cis\u003e\u0027: method_op_is,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a5de9d1_a9d8a3f0","line":33,"in_reply_to":"9a68dd71_48f22008","updated":"2016-01-27 16:19:25.000000000","message":"Somebody may misunderstand the feature, but indeed the code can explain the situation by itself. Thanks for your advice.","commit_id":"787d2d55e5192b381a8ccaca8a456b179210bf6f"},{"author":{"_account_id":16308,"name":"Sheel Rana","email":"ranasheel2000@gmail.com","username":"sheel.rana"},"change_message_id":"f105e7b5bb2c9ade435353c9342a0ddd021d2442","unresolved":false,"context_lines":[{"line_number":33,"context_line":"#   it is ignored."},{"line_number":34,"context_line":"_op_methods \u003d {\u0027\u003d\u0027: lambda x, y: float(x) \u003e\u003d float(y),"},{"line_number":35,"context_line":"               \u0027\u003cin\u003e\u0027: lambda x, y: y in x,"},{"line_number":36,"context_line":"               \u0027\u003cis\u003e\u0027: method_op_is,"},{"line_number":37,"context_line":"               \u0027\u003d\u003d\u0027: lambda x, y: float(x) \u003d\u003d float(y),"},{"line_number":38,"context_line":"               \u0027!\u003d\u0027: lambda x, y: float(x) !\u003d float(y),"},{"line_number":39,"context_line":"               \u0027\u003e\u003d\u0027: lambda x, y: float(x) \u003e\u003d float(y),"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_29ae32e6","line":36,"range":{"start_line":36,"start_character":23,"end_line":36,"end_character":36},"updated":"2016-01-25 14:21:05.000000000","message":"why different function is written?\nI think its ok to use existing lambda itslef.\nPlease let me know if there is any specific reason behind not using lamda?","commit_id":"787d2d55e5192b381a8ccaca8a456b179210bf6f"},{"author":{"_account_id":16793,"name":"Liucheng Jiang","email":"jiangliucheng@huawei.com","username":"Jiangliucheng"},"change_message_id":"79fa86b192e7313cbd3cca2e3b786ec875123b60","unresolved":false,"context_lines":[{"line_number":33,"context_line":"#   it is ignored."},{"line_number":34,"context_line":"_op_methods \u003d {\u0027\u003d\u0027: lambda x, y: float(x) \u003e\u003d float(y),"},{"line_number":35,"context_line":"               \u0027\u003cin\u003e\u0027: lambda x, y: y in x,"},{"line_number":36,"context_line":"               \u0027\u003cis\u003e\u0027: method_op_is,"},{"line_number":37,"context_line":"               \u0027\u003d\u003d\u0027: lambda x, y: float(x) \u003d\u003d float(y),"},{"line_number":38,"context_line":"               \u0027!\u003d\u0027: lambda x, y: float(x) !\u003d float(y),"},{"line_number":39,"context_line":"               \u0027\u003e\u003d\u0027: lambda x, y: float(x) \u003e\u003d float(y),"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_6fe08e29","line":36,"range":{"start_line":36,"start_character":23,"end_line":36,"end_character":36},"in_reply_to":"9a68dd71_29ae32e6","updated":"2016-01-26 01:45:24.000000000","message":"Please note the function bool_from_string\u0027s parameter \u0027strict\u0027. The default value of \u0027strict\u0027 is False, So bool_from_string([]) is False. We can find that a volume type defined as \u0027key\u003d\u003cis\u003e xxx\u0027 can match a backend with \u0027key\u003d[other_val_1,other_val_2]\u0027 capabilities.\nSee my commit message. Thanks.","commit_id":"787d2d55e5192b381a8ccaca8a456b179210bf6f"}],"cinder/tests/unit/scheduler/test_host_filters.py":[{"author":{"_account_id":16308,"name":"Sheel Rana","email":"ranasheel2000@gmail.com","username":"sheel.rana"},"change_message_id":"f105e7b5bb2c9ade435353c9342a0ddd021d2442","unresolved":false,"context_lines":[{"line_number":1160,"context_line":"            req\u003d\u0027\u003cis\u003e True\u0027,"},{"line_number":1161,"context_line":"            matches\u003dFalse)"},{"line_number":1162,"context_line":""},{"line_number":1163,"context_line":"    def test_extra_specs_fails_with_op_is3(self):"},{"line_number":1164,"context_line":"        self._do_extra_specs_ops_test("},{"line_number":1165,"context_line":"            value\u003dFalse,"},{"line_number":1166,"context_line":"            req\u003d\u0027\u003cis\u003e Nonsense\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_ce051c14","line":1163,"range":{"start_line":1163,"start_character":2,"end_line":1163,"end_character":49},"updated":"2016-01-25 14:21:05.000000000","message":"why this function is replaced?","commit_id":"787d2d55e5192b381a8ccaca8a456b179210bf6f"}]}
