)]}'
{"smaugclient/common/utils.py":[{"author":{"_account_id":2023,"name":"Saggi Mizrahi","email":"ficoos+osreview@gmail.com","username":"ficoos"},"change_message_id":"fb9e3e674950ad1545ced890c667b8e601e4673e","unresolved":false,"context_lines":[{"line_number":141,"context_line":"    \"\"\"Helper for the _find_* methods.\"\"\"\r"},{"line_number":142,"context_line":"    # first try to get entity as integer id\r"},{"line_number":143,"context_line":"    try:\r"},{"line_number":144,"context_line":"        if isinstance(name_or_id, int) or name_or_id.isdigit():\r"},{"line_number":145,"context_line":"            return manager.get(int(name_or_id), *args, **kwargs)\r"},{"line_number":146,"context_line":"    except exceptions.NotFound:\r"},{"line_number":147,"context_line":"        pass\r"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_a6ca7e18","line":144,"range":{"start_line":144,"start_character":0,"end_line":144,"end_character":63},"updated":"2016-03-08 15:48:40.000000000","message":"Just catch the error in the conversion instead of checking.","commit_id":"409ed358c15bb9beaa5251e6cf128014bd810b21"}],"smaugclient/tests/unit/v1/__init__.py":[{"author":{"_account_id":2023,"name":"Saggi Mizrahi","email":"ficoos+osreview@gmail.com","username":"ficoos"},"change_message_id":"fb9e3e674950ad1545ced890c667b8e601e4673e","unresolved":false,"context_lines":[{"line_number":1,"context_line":"__author__ \u003d \u0027c00179918\u0027\r"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_922e9cf8","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":24},"updated":"2016-03-08 15:48:40.000000000","message":"What is this?","commit_id":"409ed358c15bb9beaa5251e6cf128014bd810b21"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"4e15bdafe5c7bf40bd7f717196e5272f7398d161","unresolved":false,"context_lines":[{"line_number":1,"context_line":"__author__ \u003d \u0027c00179918\u0027\r"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_7bb8ede5","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":24},"in_reply_to":"5aef4532_922e9cf8","updated":"2016-03-09 05:20:06.000000000","message":"I will remove it.","commit_id":"409ed358c15bb9beaa5251e6cf128014bd810b21"}],"smaugclient/v1/shell.py":[{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"8e60b42d60addb77ab59d6a7a995e9e71244953e","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        \u0027status\u0027: args.status,\r"},{"line_number":84,"context_line":"    }\r"},{"line_number":85,"context_line":"\r"},{"line_number":86,"context_line":"    if args.sort and (args.sort_key or args.sort_dir):\r"},{"line_number":87,"context_line":"        raise exceptions.CommandError(\r"},{"line_number":88,"context_line":"            \u0027The --sort_key and --sort_dir arguments are deprecated and are \u0027\r"},{"line_number":89,"context_line":"            \u0027not supported with --sort.\u0027)\r"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_bee8d511","line":86,"updated":"2016-03-09 01:04:40.000000000","message":"If sort_key and sort_dir are deprecated, why don\u0027t remove them?\nAfter all we are in developing process now.","commit_id":"409ed358c15bb9beaa5251e6cf128014bd810b21"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"4e15bdafe5c7bf40bd7f717196e5272f7398d161","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        \u0027status\u0027: args.status,\r"},{"line_number":84,"context_line":"    }\r"},{"line_number":85,"context_line":"\r"},{"line_number":86,"context_line":"    if args.sort and (args.sort_key or args.sort_dir):\r"},{"line_number":87,"context_line":"        raise exceptions.CommandError(\r"},{"line_number":88,"context_line":"            \u0027The --sort_key and --sort_dir arguments are deprecated and are \u0027\r"},{"line_number":89,"context_line":"            \u0027not supported with --sort.\u0027)\r"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_9b6e99ff","line":86,"in_reply_to":"5aef4532_bee8d511","updated":"2016-03-09 05:20:06.000000000","message":"Both sort types are supported by RESTAPI in openstack, although sort_key and sort_dir are deprecated.","commit_id":"409ed358c15bb9beaa5251e6cf128014bd810b21"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"8e60b42d60addb77ab59d6a7a995e9e71244953e","unresolved":false,"context_lines":[{"line_number":116,"context_line":"    \"\"\"Create a plan.\"\"\"\r"},{"line_number":117,"context_line":"    plan_resources \u003d _extract_resources(args)\r"},{"line_number":118,"context_line":"    plan \u003d cs.plans.create(args.name, args.provider_id, plan_resources)\r"},{"line_number":119,"context_line":"    utils.print_dict(plan)\r"},{"line_number":120,"context_line":"\r"},{"line_number":121,"context_line":"\r"},{"line_number":122,"context_line":"@utils.arg(\u0027plan\u0027,\r"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_4a0aa722","line":119,"range":{"start_line":119,"start_character":21,"end_line":119,"end_character":25},"updated":"2016-03-09 01:04:40.000000000","message":"should use plan.to_dict()?","commit_id":"409ed358c15bb9beaa5251e6cf128014bd810b21"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"4e15bdafe5c7bf40bd7f717196e5272f7398d161","unresolved":false,"context_lines":[{"line_number":116,"context_line":"    \"\"\"Create a plan.\"\"\"\r"},{"line_number":117,"context_line":"    plan_resources \u003d _extract_resources(args)\r"},{"line_number":118,"context_line":"    plan \u003d cs.plans.create(args.name, args.provider_id, plan_resources)\r"},{"line_number":119,"context_line":"    utils.print_dict(plan)\r"},{"line_number":120,"context_line":"\r"},{"line_number":121,"context_line":"\r"},{"line_number":122,"context_line":"@utils.arg(\u0027plan\u0027,\r"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_9b45f971","line":119,"range":{"start_line":119,"start_character":21,"end_line":119,"end_character":25},"in_reply_to":"5aef4532_4a0aa722","updated":"2016-03-09 05:20:06.000000000","message":"This method is used for printing a dict not a obj. Here return  value of plan is a dict.","commit_id":"409ed358c15bb9beaa5251e6cf128014bd810b21"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"8e60b42d60addb77ab59d6a7a995e9e71244953e","unresolved":false,"context_lines":[{"line_number":133,"context_line":"           nargs\u003d\"+\",\r"},{"line_number":134,"context_line":"           help\u003d\u0027ID of plan.\u0027)\r"},{"line_number":135,"context_line":"def do_plan_delete(cs, args):\r"},{"line_number":136,"context_line":"    \"\"\"Delete plan details.\"\"\"\r"},{"line_number":137,"context_line":"    failure_count \u003d 0\r"},{"line_number":138,"context_line":"    for plan_id in args.plan:\r"},{"line_number":139,"context_line":"        try:\r"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_de6161aa","line":136,"range":{"start_line":136,"start_character":19,"end_line":136,"end_character":26},"updated":"2016-03-09 01:04:40.000000000","message":"remove","commit_id":"409ed358c15bb9beaa5251e6cf128014bd810b21"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"4e15bdafe5c7bf40bd7f717196e5272f7398d161","unresolved":false,"context_lines":[{"line_number":133,"context_line":"           nargs\u003d\"+\",\r"},{"line_number":134,"context_line":"           help\u003d\u0027ID of plan.\u0027)\r"},{"line_number":135,"context_line":"def do_plan_delete(cs, args):\r"},{"line_number":136,"context_line":"    \"\"\"Delete plan details.\"\"\"\r"},{"line_number":137,"context_line":"    failure_count \u003d 0\r"},{"line_number":138,"context_line":"    for plan_id in args.plan:\r"},{"line_number":139,"context_line":"        try:\r"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_7b48ed87","line":136,"range":{"start_line":136,"start_character":19,"end_line":136,"end_character":26},"in_reply_to":"5aef4532_de6161aa","updated":"2016-03-09 05:20:06.000000000","message":"Done","commit_id":"409ed358c15bb9beaa5251e6cf128014bd810b21"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"8e60b42d60addb77ab59d6a7a995e9e71244953e","unresolved":false,"context_lines":[{"line_number":137,"context_line":"    failure_count \u003d 0\r"},{"line_number":138,"context_line":"    for plan_id in args.plan:\r"},{"line_number":139,"context_line":"        try:\r"},{"line_number":140,"context_line":"            plan \u003d utils.find_resource(cs.plans, plan_id)\r"},{"line_number":141,"context_line":"            cs.plans.delete(plan.id)\r"},{"line_number":142,"context_line":"        except exceptions.NotFound:\r"},{"line_number":143,"context_line":"            failure_count +\u003d 1\r"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_8fa4c1a6","line":140,"updated":"2016-03-09 01:04:40.000000000","message":"I didn\u0027t get why need to find resource first.\nDoes this mean that client has cached plan info?\nIs this used for reducing the API request traffic?","commit_id":"409ed358c15bb9beaa5251e6cf128014bd810b21"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"8e60b42d60addb77ab59d6a7a995e9e71244953e","unresolved":false,"context_lines":[{"line_number":155,"context_line":"@utils.arg(\"--resources\", metavar\u003d\"\u003cid\u003dtype,id\u003dtype\u003e\",\r"},{"line_number":156,"context_line":"           help\u003d\"Resources to which the plan will be updated.\")\r"},{"line_number":157,"context_line":"@utils.arg(\"--status\", metavar\u003d\"\u003cstatus\u003e\",\r"},{"line_number":158,"context_line":"           help\u003d\"status to which the plan will be updated.\")\r"},{"line_number":159,"context_line":"def do_plan_update(cs, args):\r"},{"line_number":160,"context_line":"    \"\"\"Updata a plan.\"\"\"\r"},{"line_number":161,"context_line":"    data \u003d {}\r"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_2f02cd6f","line":158,"updated":"2016-03-09 01:04:40.000000000","message":"suggest listing the valid statuses that could use here.","commit_id":"409ed358c15bb9beaa5251e6cf128014bd810b21"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"4e15bdafe5c7bf40bd7f717196e5272f7398d161","unresolved":false,"context_lines":[{"line_number":155,"context_line":"@utils.arg(\"--resources\", metavar\u003d\"\u003cid\u003dtype,id\u003dtype\u003e\",\r"},{"line_number":156,"context_line":"           help\u003d\"Resources to which the plan will be updated.\")\r"},{"line_number":157,"context_line":"@utils.arg(\"--status\", metavar\u003d\"\u003cstatus\u003e\",\r"},{"line_number":158,"context_line":"           help\u003d\"status to which the plan will be updated.\")\r"},{"line_number":159,"context_line":"def do_plan_update(cs, args):\r"},{"line_number":160,"context_line":"    \"\"\"Updata a plan.\"\"\"\r"},{"line_number":161,"context_line":"    data \u003d {}\r"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_56834856","line":158,"in_reply_to":"5aef4532_2f02cd6f","updated":"2016-03-09 05:20:06.000000000","message":"Yes It is better to list all supported status. But I am not sure all the status supportted.","commit_id":"409ed358c15bb9beaa5251e6cf128014bd810b21"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"8e60b42d60addb77ab59d6a7a995e9e71244953e","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        utils.print_dict(plan.to_dict())\r"},{"line_number":176,"context_line":"\r"},{"line_number":177,"context_line":"\r"},{"line_number":178,"context_line":"def _extract_resources(args):\r"},{"line_number":179,"context_line":"    resources \u003d []\r"},{"line_number":180,"context_line":"    for data in args.resources.split(\u0027,\u0027):\r"},{"line_number":181,"context_line":"        resource \u003d {}\r"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_8f0de140","line":178,"range":{"start_line":178,"start_character":23,"end_line":178,"end_character":27},"updated":"2016-03-09 01:04:40.000000000","message":"why not directly pass args.resources as parameter?","commit_id":"409ed358c15bb9beaa5251e6cf128014bd810b21"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"4e15bdafe5c7bf40bd7f717196e5272f7398d161","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        utils.print_dict(plan.to_dict())\r"},{"line_number":176,"context_line":"\r"},{"line_number":177,"context_line":"\r"},{"line_number":178,"context_line":"def _extract_resources(args):\r"},{"line_number":179,"context_line":"    resources \u003d []\r"},{"line_number":180,"context_line":"    for data in args.resources.split(\u0027,\u0027):\r"},{"line_number":181,"context_line":"        resource \u003d {}\r"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_56ea2810","line":178,"range":{"start_line":178,"start_character":23,"end_line":178,"end_character":27},"in_reply_to":"5aef4532_8f0de140","updated":"2016-03-09 05:20:06.000000000","message":"It doesn\u0027t matter.","commit_id":"409ed358c15bb9beaa5251e6cf128014bd810b21"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"8e60b42d60addb77ab59d6a7a995e9e71244953e","unresolved":false,"context_lines":[{"line_number":185,"context_line":"            raise exceptions.CommandError(\r"},{"line_number":186,"context_line":"                \"Unable to parse parameter resources.\")\r"},{"line_number":187,"context_line":"\r"},{"line_number":188,"context_line":"        resource[\"id\"] \u003d resource_id\r"},{"line_number":189,"context_line":"        resource[\"type\"] \u003d resource_type\r"},{"line_number":190,"context_line":"        resources.append(resource)\r"},{"line_number":191,"context_line":"    return resources\r"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_071d10bd","line":188,"updated":"2016-03-09 01:04:40.000000000","message":"suggest checking resource_id validity, maybe use uuidutils.is_uuid_like or something.","commit_id":"409ed358c15bb9beaa5251e6cf128014bd810b21"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"4e15bdafe5c7bf40bd7f717196e5272f7398d161","unresolved":false,"context_lines":[{"line_number":185,"context_line":"            raise exceptions.CommandError(\r"},{"line_number":186,"context_line":"                \"Unable to parse parameter resources.\")\r"},{"line_number":187,"context_line":"\r"},{"line_number":188,"context_line":"        resource[\"id\"] \u003d resource_id\r"},{"line_number":189,"context_line":"        resource[\"type\"] \u003d resource_type\r"},{"line_number":190,"context_line":"        resources.append(resource)\r"},{"line_number":191,"context_line":"    return resources\r"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_56bb48e5","line":188,"in_reply_to":"5aef4532_071d10bd","updated":"2016-03-09 05:20:06.000000000","message":"I nearly never check the uuid format of id in client project. It will be checked by wsgi resource controller according to other client project.","commit_id":"409ed358c15bb9beaa5251e6cf128014bd810b21"}]}
