)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"c60f5b3f68f44f6f9c8fbc08f5476d6ba0371da7","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Accept multiple properties"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"At the moment, python-blazarclient does not accept multiple properties when"},{"line_number":10,"context_line":"creating reases. This is because of the wrong regular expression used to"},{"line_number":11,"context_line":"separate given options. This patch fixs the regular expression and enables"},{"line_number":12,"context_line":"multiple properties in python-blazarclient."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"bf3e73b7_753d3eba","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":15},"updated":"2017-08-07 14:09:09.000000000","message":"Don\u0027t need this kind of phrase in commit message.","commit_id":"907952600470ec5106a8658726c7ab5bf8363c95"},{"author":{"_account_id":22687,"name":"Hiroki Ito","email":"ito.hiroki@lab.ntt.co.jp","username":"hrito"},"change_message_id":"4896c8aec2831bc9cc5ece0d95d02dc44170427f","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Accept multiple properties"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"At the moment, python-blazarclient does not accept multiple properties when"},{"line_number":10,"context_line":"creating reases. This is because of the wrong regular expression used to"},{"line_number":11,"context_line":"separate given options. This patch fixs the regular expression and enables"},{"line_number":12,"context_line":"multiple properties in python-blazarclient."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9f436f4f_52671227","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":15},"in_reply_to":"bf3e73b7_753d3eba","updated":"2017-08-08 02:14:12.000000000","message":"Done","commit_id":"907952600470ec5106a8658726c7ab5bf8363c95"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"c60f5b3f68f44f6f9c8fbc08f5476d6ba0371da7","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Accept multiple properties"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"At the moment, python-blazarclient does not accept multiple properties when"},{"line_number":10,"context_line":"creating reases. This is because of the wrong regular expression used to"},{"line_number":11,"context_line":"separate given options. This patch fixs the regular expression and enables"},{"line_number":12,"context_line":"multiple properties in python-blazarclient."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"bf3e73b7_3547b64e","line":10,"range":{"start_line":10,"start_character":9,"end_line":10,"end_character":15},"updated":"2017-08-07 14:09:09.000000000","message":"leases?","commit_id":"907952600470ec5106a8658726c7ab5bf8363c95"},{"author":{"_account_id":22687,"name":"Hiroki Ito","email":"ito.hiroki@lab.ntt.co.jp","username":"hrito"},"change_message_id":"4896c8aec2831bc9cc5ece0d95d02dc44170427f","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Accept multiple properties"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"At the moment, python-blazarclient does not accept multiple properties when"},{"line_number":10,"context_line":"creating reases. This is because of the wrong regular expression used to"},{"line_number":11,"context_line":"separate given options. This patch fixs the regular expression and enables"},{"line_number":12,"context_line":"multiple properties in python-blazarclient."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9f436f4f_326c8e07","line":10,"range":{"start_line":10,"start_character":9,"end_line":10,"end_character":15},"in_reply_to":"bf3e73b7_3547b64e","updated":"2017-08-08 02:14:12.000000000","message":"Done","commit_id":"907952600470ec5106a8658726c7ab5bf8363c95"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"c60f5b3f68f44f6f9c8fbc08f5476d6ba0371da7","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"At the moment, python-blazarclient does not accept multiple properties when"},{"line_number":10,"context_line":"creating reases. This is because of the wrong regular expression used to"},{"line_number":11,"context_line":"separate given options. This patch fixs the regular expression and enables"},{"line_number":12,"context_line":"multiple properties in python-blazarclient."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I35dc3cd213e70890abe20c6f17cd4fb90fcb3ea9"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"bf3e73b7_d5a4ea0a","line":11,"range":{"start_line":11,"start_character":23,"end_line":11,"end_character":25},"updated":"2017-08-07 14:09:09.000000000","message":"please separate the paragraph when you describe the problem and the fix.","commit_id":"907952600470ec5106a8658726c7ab5bf8363c95"},{"author":{"_account_id":22687,"name":"Hiroki Ito","email":"ito.hiroki@lab.ntt.co.jp","username":"hrito"},"change_message_id":"4896c8aec2831bc9cc5ece0d95d02dc44170427f","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"At the moment, python-blazarclient does not accept multiple properties when"},{"line_number":10,"context_line":"creating reases. This is because of the wrong regular expression used to"},{"line_number":11,"context_line":"separate given options. This patch fixs the regular expression and enables"},{"line_number":12,"context_line":"multiple properties in python-blazarclient."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I35dc3cd213e70890abe20c6f17cd4fb90fcb3ea9"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9f436f4f_12718ae1","line":11,"range":{"start_line":11,"start_character":23,"end_line":11,"end_character":25},"in_reply_to":"bf3e73b7_d5a4ea0a","updated":"2017-08-08 02:14:12.000000000","message":"Done","commit_id":"907952600470ec5106a8658726c7ab5bf8363c95"}],"blazarclient/exception.py":[{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"c60f5b3f68f44f6f9c8fbc08f5476d6ba0371da7","unresolved":false,"context_lines":[{"line_number":81,"context_line":"class DuplicatedLeaseParameters(BlazarClientException):"},{"line_number":82,"context_line":"    \"\"\"Occurs if lease parameters are duplicated.\"\"\""},{"line_number":83,"context_line":"    message \u003d _(\"The lease parameters are duplicated.\")"},{"line_number":84,"context_line":"    code \u003d 406"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf3e73b7_154dd271","line":84,"range":{"start_line":84,"start_character":11,"end_line":84,"end_character":14},"updated":"2017-08-07 14:09:09.000000000","message":"It should be 400 instead of 406. 406 status codes means \"the server doesn\u0027t accept a requested Accept related header\".\n\n1. https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/406","commit_id":"907952600470ec5106a8658726c7ab5bf8363c95"},{"author":{"_account_id":22687,"name":"Hiroki Ito","email":"ito.hiroki@lab.ntt.co.jp","username":"hrito"},"change_message_id":"4896c8aec2831bc9cc5ece0d95d02dc44170427f","unresolved":false,"context_lines":[{"line_number":81,"context_line":"class DuplicatedLeaseParameters(BlazarClientException):"},{"line_number":82,"context_line":"    \"\"\"Occurs if lease parameters are duplicated.\"\"\""},{"line_number":83,"context_line":"    message \u003d _(\"The lease parameters are duplicated.\")"},{"line_number":84,"context_line":"    code \u003d 406"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f436f4f_f275e6cd","line":84,"range":{"start_line":84,"start_character":11,"end_line":84,"end_character":14},"in_reply_to":"bf3e73b7_154dd271","updated":"2017-08-08 02:14:12.000000000","message":"Done","commit_id":"907952600470ec5106a8658726c7ab5bf8363c95"}],"blazarclient/tests/v1/shell_commands/test_leases.py":[{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"c60f5b3f68f44f6f9c8fbc08f5476d6ba0371da7","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2014 Mirantis Inc."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"# you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":2,"id":"bf3e73b7_725c344b","line":1,"range":{"start_line":1,"start_character":16,"end_line":1,"end_character":29},"updated":"2017-08-07 14:09:09.000000000","message":"2017 NTT?","commit_id":"907952600470ec5106a8658726c7ab5bf8363c95"},{"author":{"_account_id":22687,"name":"Hiroki Ito","email":"ito.hiroki@lab.ntt.co.jp","username":"hrito"},"change_message_id":"4896c8aec2831bc9cc5ece0d95d02dc44170427f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2014 Mirantis Inc."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"# you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":2,"id":"9f436f4f_927c5ab6","line":1,"range":{"start_line":1,"start_character":16,"end_line":1,"end_character":29},"in_reply_to":"bf3e73b7_725c344b","updated":"2017-08-08 02:14:12.000000000","message":"Done","commit_id":"907952600470ec5106a8658726c7ab5bf8363c95"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"c60f5b3f68f44f6f9c8fbc08f5476d6ba0371da7","unresolved":false,"context_lines":[{"line_number":39,"context_line":"                \u0027min\u003d1,\u0027"},{"line_number":40,"context_line":"                \u0027max\u003d2,\u0027"},{"line_number":41,"context_line":"                \u0027hypervisor_properties\u003d[\"and\", [\"\u003e\u003d\", \"$vcpus\", \"2\"], \u0027"},{"line_number":42,"context_line":"                \u0027[\"\u003e\u003d\", \"memory_mb\", \"2048\"]],\u0027"},{"line_number":43,"context_line":"                \u0027resource_properties\u003d[\"and\", [\"\u003e\u003d\", \"$vcpus\", \"2\"], \u0027"},{"line_number":44,"context_line":"                \u0027[\"\u003e\u003d\", \"memory_mb\", \"2048\"]]\u0027"},{"line_number":45,"context_line":"            ]"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf3e73b7_d26c000a","line":42,"range":{"start_line":42,"start_character":24,"end_line":42,"end_character":35},"updated":"2017-08-07 14:09:09.000000000","message":"a suggestion: the variable without $ prefix works with a real blazar API?  Of course, I know this is a test for args2body but it\u0027s good to use a real syntax that works well with blazar API.","commit_id":"907952600470ec5106a8658726c7ab5bf8363c95"},{"author":{"_account_id":22687,"name":"Hiroki Ito","email":"ito.hiroki@lab.ntt.co.jp","username":"hrito"},"change_message_id":"4896c8aec2831bc9cc5ece0d95d02dc44170427f","unresolved":false,"context_lines":[{"line_number":39,"context_line":"                \u0027min\u003d1,\u0027"},{"line_number":40,"context_line":"                \u0027max\u003d2,\u0027"},{"line_number":41,"context_line":"                \u0027hypervisor_properties\u003d[\"and\", [\"\u003e\u003d\", \"$vcpus\", \"2\"], \u0027"},{"line_number":42,"context_line":"                \u0027[\"\u003e\u003d\", \"memory_mb\", \"2048\"]],\u0027"},{"line_number":43,"context_line":"                \u0027resource_properties\u003d[\"and\", [\"\u003e\u003d\", \"$vcpus\", \"2\"], \u0027"},{"line_number":44,"context_line":"                \u0027[\"\u003e\u003d\", \"memory_mb\", \"2048\"]]\u0027"},{"line_number":45,"context_line":"            ]"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f436f4f_12186a7f","line":42,"range":{"start_line":42,"start_character":24,"end_line":42,"end_character":35},"in_reply_to":"bf3e73b7_d26c000a","updated":"2017-08-08 02:14:12.000000000","message":"Just a mistake. I\u0027ll add $ prefix to memory_mb.","commit_id":"907952600470ec5106a8658726c7ab5bf8363c95"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"c60f5b3f68f44f6f9c8fbc08f5476d6ba0371da7","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                \u0027[\"\u003e\u003d\", \"memory_mb\", \"2048\"]]\u0027"},{"line_number":45,"context_line":"            ]"},{"line_number":46,"context_line":"        )"},{"line_number":47,"context_line":"        self.cl.args2body(args)"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def test_args2body_incorrect_phys_res_params(self):"},{"line_number":50,"context_line":"        args \u003d argparse.Namespace("}],"source_content_type":"text/x-python","patch_set":2,"id":"bf3e73b7_b2873cd8","line":47,"range":{"start_line":47,"start_character":8,"end_line":47,"end_character":31},"updated":"2017-08-07 14:09:09.000000000","message":"This method returns a value. So the test should check whether the value is expected.","commit_id":"907952600470ec5106a8658726c7ab5bf8363c95"},{"author":{"_account_id":22687,"name":"Hiroki Ito","email":"ito.hiroki@lab.ntt.co.jp","username":"hrito"},"change_message_id":"4896c8aec2831bc9cc5ece0d95d02dc44170427f","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                \u0027[\"\u003e\u003d\", \"memory_mb\", \"2048\"]]\u0027"},{"line_number":45,"context_line":"            ]"},{"line_number":46,"context_line":"        )"},{"line_number":47,"context_line":"        self.cl.args2body(args)"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def test_args2body_incorrect_phys_res_params(self):"},{"line_number":50,"context_line":"        args \u003d argparse.Namespace("}],"source_content_type":"text/x-python","patch_set":2,"id":"9f436f4f_9518c475","line":47,"range":{"start_line":47,"start_character":8,"end_line":47,"end_character":31},"in_reply_to":"bf3e73b7_b2873cd8","updated":"2017-08-08 02:14:12.000000000","message":"I\u0027ll add a value check process.","commit_id":"907952600470ec5106a8658726c7ab5bf8363c95"},{"author":{"_account_id":23840,"name":"Hiroaki Kobayashi","email":"kobayashi.hiroaki@lab.ntt.co.jp","username":"hiro-kobayashi"},"change_message_id":"f7d4e1bcfd6b5eabac4b8abcb862b599eb28b4cd","unresolved":false,"context_lines":[{"line_number":38,"context_line":"            physical_reservations\u003d["},{"line_number":39,"context_line":"                \u0027min\u003d1,\u0027"},{"line_number":40,"context_line":"                \u0027max\u003d2,\u0027"},{"line_number":41,"context_line":"                \u0027hypervisor_properties\u003d[\"and\", [\"\u003e\u003d\", \"$vcpus\", \"2\"], \u0027"},{"line_number":42,"context_line":"                \u0027[\"\u003e\u003d\", \"$memory_mb\", \"2048\"]],\u0027"},{"line_number":43,"context_line":"                \u0027resource_properties\u003d[\"and\", [\"\u003e\u003d\", \"$vcpus\", \"2\"], \u0027"},{"line_number":44,"context_line":"                \u0027[\"\u003e\u003d\", \"$memory_mb\", \"2048\"]]\u0027"},{"line_number":45,"context_line":"            ]"},{"line_number":46,"context_line":"        )"},{"line_number":47,"context_line":"        expected \u003d {"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_a08804c6","line":44,"range":{"start_line":41,"start_character":0,"end_line":44,"end_character":47},"updated":"2017-08-09 06:03:15.000000000","message":"Not a strong objection but using the same values for resource_properties with hypervisor_properties is not a correct usage of API. How about changing resource_properties like [\"\u003d\u003d\", \"$extra_key\", \"extra_value\"]?","commit_id":"f3e69b90421ddd5cfc6c0680b8d894c8dd38cba0"},{"author":{"_account_id":23840,"name":"Hiroaki Kobayashi","email":"kobayashi.hiroaki@lab.ntt.co.jp","username":"hiro-kobayashi"},"change_message_id":"f7d4e1bcfd6b5eabac4b8abcb862b599eb28b4cd","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                \u0027incorrect_param\u003d1,\u0027"},{"line_number":77,"context_line":"                \u0027min\u003d1,\u0027"},{"line_number":78,"context_line":"                \u0027max\u003d2,\u0027"},{"line_number":79,"context_line":"                \u0027hypervisor_properties\u003d[\"and\", [\"\u003e\u003d\", \"$vcpus\", \"2\"], \u0027"},{"line_number":80,"context_line":"                \u0027[\"\u003e\u003d\", \"$memory_mb\", \"2048\"]],\u0027"},{"line_number":81,"context_line":"                \u0027resource_properties\u003d[\"and\", [\"\u003e\u003d\", \"$vcpus\", \"2\"], \u0027"},{"line_number":82,"context_line":"                \u0027[\"\u003e\u003d\", \"$memory_mb\", \"2048\"]]\u0027"},{"line_number":83,"context_line":"            ]"},{"line_number":84,"context_line":"        )"},{"line_number":85,"context_line":"        self.assertRaises(exception.IncorrectLease,"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_408f18cc","line":82,"range":{"start_line":79,"start_character":0,"end_line":82,"end_character":47},"updated":"2017-08-09 06:03:15.000000000","message":"ditto","commit_id":"f3e69b90421ddd5cfc6c0680b8d894c8dd38cba0"},{"author":{"_account_id":23840,"name":"Hiroaki Kobayashi","email":"kobayashi.hiroaki@lab.ntt.co.jp","username":"hiro-kobayashi"},"change_message_id":"f7d4e1bcfd6b5eabac4b8abcb862b599eb28b4cd","unresolved":false,"context_lines":[{"line_number":97,"context_line":"                \u0027min\u003d1,\u0027"},{"line_number":98,"context_line":"                \u0027min\u003d1,\u0027"},{"line_number":99,"context_line":"                \u0027max\u003d2,\u0027"},{"line_number":100,"context_line":"                \u0027hypervisor_properties\u003d[\"and\", [\"\u003e\u003d\", \"$vcpus\", \"2\"], \u0027"},{"line_number":101,"context_line":"                \u0027[\"\u003e\u003d\", \"$memory_mb\", \"2048\"]],\u0027"},{"line_number":102,"context_line":"                \u0027resource_properties\u003d[\"and\", [\"\u003e\u003d\", \"$vcpus\", \"2\"], \u0027"},{"line_number":103,"context_line":"                \u0027[\"\u003e\u003d\", \"$memory_mb\", \"2048\"]]\u0027"},{"line_number":104,"context_line":"            ]"},{"line_number":105,"context_line":"        )"},{"line_number":106,"context_line":"        self.assertRaises(exception.DuplicatedLeaseParameters,"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_20be5465","line":103,"range":{"start_line":100,"start_character":0,"end_line":103,"end_character":47},"updated":"2017-08-09 06:03:15.000000000","message":"ditto","commit_id":"f3e69b90421ddd5cfc6c0680b8d894c8dd38cba0"},{"author":{"_account_id":22687,"name":"Hiroki Ito","email":"ito.hiroki@lab.ntt.co.jp","username":"hrito"},"change_message_id":"b9cb9519638010a8cf3f0cf4b53b316b2a082fe2","unresolved":false,"context_lines":[{"line_number":38,"context_line":"            physical_reservations\u003d["},{"line_number":39,"context_line":"                \u0027min\u003d1,\u0027"},{"line_number":40,"context_line":"                \u0027max\u003d2,\u0027"},{"line_number":41,"context_line":"                \u0027hypervisor_properties\u003d\u0027"},{"line_number":42,"context_line":"                \u0027[\"and\", [\"\u003e\u003d\", \"$vcpus\", \"2\"], \u0027"},{"line_number":43,"context_line":"                \u0027[\"\u003d\u003d\", \"$hypervisor_type\", \"QEMU\"]],\u0027"},{"line_number":44,"context_line":"                \u0027resource_properties\u003d\u0027"},{"line_number":45,"context_line":"                \u0027[\"\u003e\u003d\", \"$memory_mb\", \"2048\"]\u0027"},{"line_number":46,"context_line":"            ]"},{"line_number":47,"context_line":"        )"},{"line_number":48,"context_line":"        expected \u003d {"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_68479e1f","line":45,"range":{"start_line":41,"start_character":0,"end_line":45,"end_character":46},"updated":"2017-08-09 09:01:29.000000000","message":"I\u0027ve tried to use the value you suggested but it doesn\u0027t work because of db error and so I use different values for resource_properties.","commit_id":"dd9da778b809b43915199c6c25711b721a655154"},{"author":{"_account_id":23840,"name":"Hiroaki Kobayashi","email":"kobayashi.hiroaki@lab.ntt.co.jp","username":"hiro-kobayashi"},"change_message_id":"dd5112c65f99f8a842f36f90bbe1a970ab68d24d","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                \u0027[\"and\", [\"\u003e\u003d\", \"$vcpus\", \"2\"], \u0027"},{"line_number":43,"context_line":"                \u0027[\"\u003d\u003d\", \"$hypervisor_type\", \"QEMU\"]],\u0027"},{"line_number":44,"context_line":"                \u0027resource_properties\u003d\u0027"},{"line_number":45,"context_line":"                \u0027[\"\u003e\u003d\", \"$memory_mb\", \"2048\"]\u0027"},{"line_number":46,"context_line":"            ]"},{"line_number":47,"context_line":"        )"},{"line_number":48,"context_line":"        expected \u003d {"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_0805b2c2","line":45,"range":{"start_line":45,"start_character":16,"end_line":45,"end_character":46},"updated":"2017-08-09 09:02:48.000000000","message":"The $memory_mb should be in hypervisor_properties. resource_properties check against extra capabilities of the host. How about using [\"\u003d\u003d\", \"$extra_key\", \"extra_value\"] as a generic sample?","commit_id":"dd9da778b809b43915199c6c25711b721a655154"},{"author":{"_account_id":22687,"name":"Hiroki Ito","email":"ito.hiroki@lab.ntt.co.jp","username":"hrito"},"change_message_id":"b7a4c8b88b15b47f5100e7638a9b1283e000552c","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                \u0027[\"and\", [\"\u003e\u003d\", \"$vcpus\", \"2\"], \u0027"},{"line_number":43,"context_line":"                \u0027[\"\u003d\u003d\", \"$hypervisor_type\", \"QEMU\"]],\u0027"},{"line_number":44,"context_line":"                \u0027resource_properties\u003d\u0027"},{"line_number":45,"context_line":"                \u0027[\"\u003e\u003d\", \"$memory_mb\", \"2048\"]\u0027"},{"line_number":46,"context_line":"            ]"},{"line_number":47,"context_line":"        )"},{"line_number":48,"context_line":"        expected \u003d {"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_6869de23","line":45,"range":{"start_line":45,"start_character":16,"end_line":45,"end_character":46},"in_reply_to":"9f436f4f_0805b2c2","updated":"2017-08-09 09:14:26.000000000","message":"I understand. I take your advice.","commit_id":"dd9da778b809b43915199c6c25711b721a655154"},{"author":{"_account_id":23840,"name":"Hiroaki Kobayashi","email":"kobayashi.hiroaki@lab.ntt.co.jp","username":"hiro-kobayashi"},"change_message_id":"dd5112c65f99f8a842f36f90bbe1a970ab68d24d","unresolved":false,"context_lines":[{"line_number":58,"context_line":"                        \u0027[\"and\", [\"\u003e\u003d\", \"$vcpus\", \"2\"], \u0027"},{"line_number":59,"context_line":"                        \u0027[\"\u003d\u003d\", \"$hypervisor_type\", \"QEMU\"]]\u0027,"},{"line_number":60,"context_line":"                    \u0027resource_properties\u0027:"},{"line_number":61,"context_line":"                        \u0027[\"\u003e\u003d\", \"$memory_mb\", \"2048\"]\u0027,"},{"line_number":62,"context_line":"                    \u0027resource_type\u0027: \u0027physical:host\u0027"},{"line_number":63,"context_line":"                }"},{"line_number":64,"context_line":"            ]"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_c827aa64","line":61,"range":{"start_line":61,"start_character":22,"end_line":61,"end_character":55},"updated":"2017-08-09 09:02:48.000000000","message":"ditto","commit_id":"dd9da778b809b43915199c6c25711b721a655154"},{"author":{"_account_id":22687,"name":"Hiroki Ito","email":"ito.hiroki@lab.ntt.co.jp","username":"hrito"},"change_message_id":"b7a4c8b88b15b47f5100e7638a9b1283e000552c","unresolved":false,"context_lines":[{"line_number":58,"context_line":"                        \u0027[\"and\", [\"\u003e\u003d\", \"$vcpus\", \"2\"], \u0027"},{"line_number":59,"context_line":"                        \u0027[\"\u003d\u003d\", \"$hypervisor_type\", \"QEMU\"]]\u0027,"},{"line_number":60,"context_line":"                    \u0027resource_properties\u0027:"},{"line_number":61,"context_line":"                        \u0027[\"\u003e\u003d\", \"$memory_mb\", \"2048\"]\u0027,"},{"line_number":62,"context_line":"                    \u0027resource_type\u0027: \u0027physical:host\u0027"},{"line_number":63,"context_line":"                }"},{"line_number":64,"context_line":"            ]"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_48761a09","line":61,"range":{"start_line":61,"start_character":22,"end_line":61,"end_character":55},"in_reply_to":"9f436f4f_c827aa64","updated":"2017-08-09 09:14:26.000000000","message":"Done","commit_id":"dd9da778b809b43915199c6c25711b721a655154"},{"author":{"_account_id":23840,"name":"Hiroaki Kobayashi","email":"kobayashi.hiroaki@lab.ntt.co.jp","username":"hiro-kobayashi"},"change_message_id":"dd5112c65f99f8a842f36f90bbe1a970ab68d24d","unresolved":false,"context_lines":[{"line_number":80,"context_line":"                \u0027[\"and\", [\"\u003e\u003d\", \"$vcpus\", \"2\"], \u0027"},{"line_number":81,"context_line":"                \u0027[\"\u003d\u003d\", \"$hypervisor_type\", \"QEMU\"]],\u0027"},{"line_number":82,"context_line":"                \u0027resource_properties\u003d\u0027"},{"line_number":83,"context_line":"                \u0027[\"\u003e\u003d\", \"$memory_mb\", \"2048\"]\u0027"},{"line_number":84,"context_line":"            ]"},{"line_number":85,"context_line":"        )"},{"line_number":86,"context_line":"        self.assertRaises(exception.IncorrectLease,"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_a82c6647","line":83,"range":{"start_line":83,"start_character":16,"end_line":83,"end_character":46},"updated":"2017-08-09 09:02:48.000000000","message":"ditto","commit_id":"dd9da778b809b43915199c6c25711b721a655154"},{"author":{"_account_id":22687,"name":"Hiroki Ito","email":"ito.hiroki@lab.ntt.co.jp","username":"hrito"},"change_message_id":"b7a4c8b88b15b47f5100e7638a9b1283e000552c","unresolved":false,"context_lines":[{"line_number":80,"context_line":"                \u0027[\"and\", [\"\u003e\u003d\", \"$vcpus\", \"2\"], \u0027"},{"line_number":81,"context_line":"                \u0027[\"\u003d\u003d\", \"$hypervisor_type\", \"QEMU\"]],\u0027"},{"line_number":82,"context_line":"                \u0027resource_properties\u003d\u0027"},{"line_number":83,"context_line":"                \u0027[\"\u003e\u003d\", \"$memory_mb\", \"2048\"]\u0027"},{"line_number":84,"context_line":"            ]"},{"line_number":85,"context_line":"        )"},{"line_number":86,"context_line":"        self.assertRaises(exception.IncorrectLease,"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_e866ee51","line":83,"range":{"start_line":83,"start_character":16,"end_line":83,"end_character":46},"in_reply_to":"9f436f4f_a82c6647","updated":"2017-08-09 09:14:26.000000000","message":"Done","commit_id":"dd9da778b809b43915199c6c25711b721a655154"},{"author":{"_account_id":23840,"name":"Hiroaki Kobayashi","email":"kobayashi.hiroaki@lab.ntt.co.jp","username":"hiro-kobayashi"},"change_message_id":"dd5112c65f99f8a842f36f90bbe1a970ab68d24d","unresolved":false,"context_lines":[{"line_number":102,"context_line":"                \u0027[\"and\", [\"\u003e\u003d\", \"$vcpus\", \"2\"], \u0027"},{"line_number":103,"context_line":"                \u0027[\"\u003d\u003d\", \"$hypervisor_type\", \"QEMU\"]],\u0027"},{"line_number":104,"context_line":"                \u0027resource_properties\u003d\u0027"},{"line_number":105,"context_line":"                \u0027[\"\u003e\u003d\", \"$memory_mb\", \"2048\"]\u0027"},{"line_number":106,"context_line":"            ]"},{"line_number":107,"context_line":"        )"},{"line_number":108,"context_line":"        self.assertRaises(exception.DuplicatedLeaseParameters,"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_481bba1a","line":105,"range":{"start_line":105,"start_character":16,"end_line":105,"end_character":46},"updated":"2017-08-09 09:02:48.000000000","message":"ditto","commit_id":"dd9da778b809b43915199c6c25711b721a655154"},{"author":{"_account_id":22687,"name":"Hiroki Ito","email":"ito.hiroki@lab.ntt.co.jp","username":"hrito"},"change_message_id":"b7a4c8b88b15b47f5100e7638a9b1283e000552c","unresolved":false,"context_lines":[{"line_number":102,"context_line":"                \u0027[\"and\", [\"\u003e\u003d\", \"$vcpus\", \"2\"], \u0027"},{"line_number":103,"context_line":"                \u0027[\"\u003d\u003d\", \"$hypervisor_type\", \"QEMU\"]],\u0027"},{"line_number":104,"context_line":"                \u0027resource_properties\u003d\u0027"},{"line_number":105,"context_line":"                \u0027[\"\u003e\u003d\", \"$memory_mb\", \"2048\"]\u0027"},{"line_number":106,"context_line":"            ]"},{"line_number":107,"context_line":"        )"},{"line_number":108,"context_line":"        self.assertRaises(exception.DuplicatedLeaseParameters,"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_a860e633","line":105,"range":{"start_line":105,"start_character":16,"end_line":105,"end_character":46},"in_reply_to":"9f436f4f_481bba1a","updated":"2017-08-09 09:14:26.000000000","message":"Done","commit_id":"dd9da778b809b43915199c6c25711b721a655154"}],"blazarclient/v1/shell_commands/leases.py":[{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"753ee354e62ba3e770c541ae4cfdfac12e749312","unresolved":false,"context_lines":[{"line_number":144,"context_line":"                       % phys_res_str)"},{"line_number":145,"context_line":"            phys_res_info \u003d {\"min\": \"\", \"max\": \"\", \"hypervisor_properties\": \"\","},{"line_number":146,"context_line":"                             \"resource_properties\": \"\"}"},{"line_number":147,"context_line":"            prog \u003d regex.compile(\u0027^(\\w+)\u003d(?\u003crec\u003e\\w+|\\[(?:[^[\\]]+|(?\u0026rec))*\\])(?:,(.+))?$\u0027)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"            def parse_params(params):"},{"line_number":150,"context_line":"                match \u003d prog.search(params)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff346bd7_566d7930","line":147,"range":{"start_line":147,"start_character":0,"end_line":147,"end_character":90},"updated":"2017-07-25 10:15:55.000000000","message":"I don\u0027t think current parsing strategy is good since it overwrite duplicate parameters if one of the parameters are listed twice. For instance, min is assigned to 1 in \u0027min\u003d3,max\u003d4,min\u003d1\u0027.\n\nIMO, if the parsing checks the parameters one by one, regex library is not required here.","commit_id":"880fffe058bcb3ebce83d19904d9f8d01fc0c862"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"ac48d27dae72956c04327e8fb61122e4bd38af70","unresolved":false,"context_lines":[{"line_number":144,"context_line":"                       % phys_res_str)"},{"line_number":145,"context_line":"            phys_res_info \u003d {\"min\": \"\", \"max\": \"\", \"hypervisor_properties\": \"\","},{"line_number":146,"context_line":"                             \"resource_properties\": \"\"}"},{"line_number":147,"context_line":"            prog \u003d regex.compile(\u0027^(\\w+)\u003d(?\u003crec\u003e\\w+|\\[(?:[^[\\]]+|(?\u0026rec))*\\])(?:,(.+))?$\u0027)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"            def parse_params(params):"},{"line_number":150,"context_line":"                match \u003d prog.search(params)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff346bd7_e186c9db","line":147,"range":{"start_line":147,"start_character":0,"end_line":147,"end_character":90},"in_reply_to":"ff346bd7_388303cf","updated":"2017-07-26 01:16:20.000000000","message":"In general, this kind of parsing should start from end of the string like following:\n\n  ^((.*),)?(min|max|hypervisor_properties|resource_properties)\u003d(.+)$\n\nThere\u0027re two reasons to the strategy. 1. regular expression usually matches greedy. so the expression doesn\u0027t need to care about the brackets. 2. the code becomes more simple like this.\n\n  k, v \u003d match.group(3, 4)\n  if match.group(1) is not None:\n      parse_params(1)","commit_id":"880fffe058bcb3ebce83d19904d9f8d01fc0c862"},{"author":{"_account_id":22687,"name":"Hiroki Ito","email":"ito.hiroki@lab.ntt.co.jp","username":"hrito"},"change_message_id":"789649f8a589f818f498df0a3cb62ff457c532ee","unresolved":false,"context_lines":[{"line_number":144,"context_line":"                       % phys_res_str)"},{"line_number":145,"context_line":"            phys_res_info \u003d {\"min\": \"\", \"max\": \"\", \"hypervisor_properties\": \"\","},{"line_number":146,"context_line":"                             \"resource_properties\": \"\"}"},{"line_number":147,"context_line":"            prog \u003d regex.compile(\u0027^(\\w+)\u003d(?\u003crec\u003e\\w+|\\[(?:[^[\\]]+|(?\u0026rec))*\\])(?:,(.+))?$\u0027)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"            def parse_params(params):"},{"line_number":150,"context_line":"                match \u003d prog.search(params)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff346bd7_388303cf","line":147,"range":{"start_line":147,"start_character":0,"end_line":147,"end_character":90},"in_reply_to":"ff346bd7_566d7930","updated":"2017-07-25 10:51:45.000000000","message":"I agree to fix the problem you mentioned in this patch. I think current parsing strategy already checks parameters one by one by using parse_params(params) recursively and so it can be fixed with little tweak.\n\nI think regex package is still needed to treat nested brackets such like \u0027hypervisor_properties\u003d[\"and\", [\"\u003e\u003d\", \"$vcpus\", \"2\"], [\"\u003e\u003d\", \"memory_mb\", \"1024\"]\u0027,resource_properties\u003d[...]\u0027 since it is hard to treat nested brackets by using basic re library and can\u0027t tell which brackets are pair. IMO, using regex library is easiest solution to avoid this problem.\n\nIf you have good idea, please let me know.","commit_id":"880fffe058bcb3ebce83d19904d9f8d01fc0c862"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"ae14fd64bcc07846aa9ee77860031c7326ce7c54","unresolved":false,"context_lines":[{"line_number":144,"context_line":"                       % phys_res_str)"},{"line_number":145,"context_line":"            phys_res_info \u003d {\"min\": \"\", \"max\": \"\", \"hypervisor_properties\": \"\","},{"line_number":146,"context_line":"                             \"resource_properties\": \"\"}"},{"line_number":147,"context_line":"            prog \u003d regex.compile(\u0027^(\\w+)\u003d(?\u003crec\u003e\\w+|\\[(?:[^[\\]]+|(?\u0026rec))*\\])(?:,(.+))?$\u0027)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"            def parse_params(params):"},{"line_number":150,"context_line":"                match \u003d prog.search(params)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff346bd7_6103f910","line":147,"range":{"start_line":147,"start_character":0,"end_line":147,"end_character":90},"in_reply_to":"ff346bd7_e186c9db","updated":"2017-07-26 01:22:47.000000000","message":"for the recursive calling, parse_params(match.group(2)) is correct with my regular expression.","commit_id":"880fffe058bcb3ebce83d19904d9f8d01fc0c862"}]}
