)]}'
{"doc/source/command-objects/flavor-access.rst":[{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"df87ffc08aae9e1a2b3fb0705fc9f3b87ffd28a1","unresolved":false,"context_lines":[{"line_number":5,"context_line":"Compute v2"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"flavor access add"},{"line_number":8,"context_line":"-------------"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"Add a flavor access"},{"line_number":11,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"1a122d0e_2f0e42e5","line":8,"range":{"start_line":8,"start_character":0,"end_line":8,"end_character":13},"updated":"2016-05-04 07:03:49.000000000","message":"missing a few ---\u0027s here","commit_id":"8f346da70cb5c67216751b86b02d7e63e30a96ff"},{"author":{"_account_id":21514,"name":"Huanxuan Ao","email":"aohuanxuan@163.com","username":"aohuanxuan"},"change_message_id":"3db87929fec7bf4e36bbfc09af400d0dbbd182ec","unresolved":false,"context_lines":[{"line_number":5,"context_line":"Compute v2"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"flavor access add"},{"line_number":8,"context_line":"-------------"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"Add a flavor access"},{"line_number":11,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"1a122d0e_3bd5e0b6","line":8,"range":{"start_line":8,"start_character":0,"end_line":8,"end_character":13},"in_reply_to":"1a122d0e_2f0e42e5","updated":"2016-05-04 09:32:42.000000000","message":"Thank you!","commit_id":"8f346da70cb5c67216751b86b02d7e63e30a96ff"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"df87ffc08aae9e1a2b3fb0705fc9f3b87ffd28a1","unresolved":false,"context_lines":[{"line_number":7,"context_line":"flavor access add"},{"line_number":8,"context_line":"-------------"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"Add a flavor access"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":".. program:: flavor access add"},{"line_number":13,"context_line":".. code:: bash"}],"source_content_type":"text/x-rst","patch_set":2,"id":"1a122d0e_cfd4ee20","line":10,"range":{"start_line":10,"start_character":0,"end_line":10,"end_character":19},"updated":"2016-05-04 07:03:49.000000000","message":"leaving a suggestion here, see what other think about it:\n\n  \"Allow projects to access a flavor\"","commit_id":"8f346da70cb5c67216751b86b02d7e63e30a96ff"},{"author":{"_account_id":21514,"name":"Huanxuan Ao","email":"aohuanxuan@163.com","username":"aohuanxuan"},"change_message_id":"3db87929fec7bf4e36bbfc09af400d0dbbd182ec","unresolved":false,"context_lines":[{"line_number":7,"context_line":"flavor access add"},{"line_number":8,"context_line":"-------------"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"Add a flavor access"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":".. program:: flavor access add"},{"line_number":13,"context_line":".. code:: bash"}],"source_content_type":"text/x-rst","patch_set":2,"id":"1a122d0e_259e6307","line":10,"range":{"start_line":10,"start_character":0,"end_line":10,"end_character":19},"in_reply_to":"1a122d0e_cfd4ee20","updated":"2016-05-04 09:32:42.000000000","message":"Thank you for your suggestion!","commit_id":"8f346da70cb5c67216751b86b02d7e63e30a96ff"}],"doc/source/commands.rst":[{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"df87ffc08aae9e1a2b3fb0705fc9f3b87ffd28a1","unresolved":false,"context_lines":[{"line_number":88,"context_line":"* ``endpoint``: (**Identity**) the base URL used to contact a specific service"},{"line_number":89,"context_line":"* ``extension``: (**Compute**, **Identity**, **Network**, **Volume**) OpenStack server API extensions"},{"line_number":90,"context_line":"* ``federation protocol``: (**Identity**) the underlying protocol used while federating identities"},{"line_number":91,"context_line":"* ``flavor``: (**Compute**) predefined server configurations: ram, root disk, etc"},{"line_number":92,"context_line":"* ``flavor access``: (**Compute**) the flavor access for projects"},{"line_number":93,"context_line":"* ``group``: (**Identity**) a grouping of users"},{"line_number":94,"context_line":"* ``host``: (**Compute**) - the physical computer running compute services"}],"source_content_type":"text/x-rst","patch_set":2,"id":"1a122d0e_cfbb4ee3","line":91,"range":{"start_line":91,"start_character":4,"end_line":91,"end_character":10},"updated":"2016-05-04 07:03:49.000000000","message":"why not just use \"os flavor add\" ?","commit_id":"8f346da70cb5c67216751b86b02d7e63e30a96ff"},{"author":{"_account_id":21514,"name":"Huanxuan Ao","email":"aohuanxuan@163.com","username":"aohuanxuan"},"change_message_id":"3db87929fec7bf4e36bbfc09af400d0dbbd182ec","unresolved":false,"context_lines":[{"line_number":88,"context_line":"* ``endpoint``: (**Identity**) the base URL used to contact a specific service"},{"line_number":89,"context_line":"* ``extension``: (**Compute**, **Identity**, **Network**, **Volume**) OpenStack server API extensions"},{"line_number":90,"context_line":"* ``federation protocol``: (**Identity**) the underlying protocol used while federating identities"},{"line_number":91,"context_line":"* ``flavor``: (**Compute**) predefined server configurations: ram, root disk, etc"},{"line_number":92,"context_line":"* ``flavor access``: (**Compute**) the flavor access for projects"},{"line_number":93,"context_line":"* ``group``: (**Identity**) a grouping of users"},{"line_number":94,"context_line":"* ``host``: (**Compute**) - the physical computer running compute services"}],"source_content_type":"text/x-rst","patch_set":2,"id":"1a122d0e_5b67fce9","line":91,"range":{"start_line":91,"start_character":4,"end_line":91,"end_character":10},"in_reply_to":"1a122d0e_cfbb4ee3","updated":"2016-05-04 09:32:42.000000000","message":"I saw the command in novaclient named \"nova flavor access add\",So I used \"flavor access add\" too.And I think user can know the feature of the command more clearly by using \"flavor access add\"","commit_id":"8f346da70cb5c67216751b86b02d7e63e30a96ff"}],"openstackclient/compute/v2/flavor.py":[{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"9a065f8ab9adc8f5e7349e3c59c1ad322edbe224","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        parser.add_argument("},{"line_number":51,"context_line":"            \u0027flavor\u0027,"},{"line_number":52,"context_line":"            metavar\u003d\u0027\u003cflavor\u003e\u0027,"},{"line_number":53,"context_line":"            help\u003d\"Flavor (name or ID) to add access for the given project\""},{"line_number":54,"context_line":"        )"},{"line_number":55,"context_line":"        parser.add_argument("},{"line_number":56,"context_line":"            \u0027--project\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_2d2a6d90","line":53,"range":{"start_line":53,"start_character":18,"end_line":53,"end_character":73},"updated":"2016-05-11 06:57:46.000000000","message":"this sounds weird, but i can\u0027t think of a better suggestion","commit_id":"5c28b8f18ceb0d79ed5814dd89df1cb0c0661f99"},{"author":{"_account_id":21514,"name":"Huanxuan Ao","email":"aohuanxuan@163.com","username":"aohuanxuan"},"change_message_id":"28215129e15c1152c1e53bb5d968d6364a39834e","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        parser.add_argument("},{"line_number":51,"context_line":"            \u0027flavor\u0027,"},{"line_number":52,"context_line":"            metavar\u003d\u0027\u003cflavor\u003e\u0027,"},{"line_number":53,"context_line":"            help\u003d\"Flavor (name or ID) to add access for the given project\""},{"line_number":54,"context_line":"        )"},{"line_number":55,"context_line":"        parser.add_argument("},{"line_number":56,"context_line":"            \u0027--project\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_53903495","line":53,"range":{"start_line":53,"start_character":18,"end_line":53,"end_character":73},"in_reply_to":"dab17558_2d2a6d90","updated":"2016-05-11 07:42:00.000000000","message":"I copied this from novaclient,and I don\u0027t have a better way to change it now.Maybe someone else will have a better idea.","commit_id":"5c28b8f18ceb0d79ed5814dd89df1cb0c0661f99"},{"author":{"_account_id":14937,"name":"Tang Chen","email":"imtangchen@163.com","username":"tangchen"},"change_message_id":"17ab7d63b7bad4b6b151f720620c6988b04d5649","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        parser.add_argument("},{"line_number":51,"context_line":"            \u0027flavor\u0027,"},{"line_number":52,"context_line":"            metavar\u003d\u0027\u003cflavor\u003e\u0027,"},{"line_number":53,"context_line":"            help\u003d\"Flavor (name or ID) to add access for the given project\""},{"line_number":54,"context_line":"        )"},{"line_number":55,"context_line":"        parser.add_argument("},{"line_number":56,"context_line":"            \u0027--project\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_e502f008","line":53,"range":{"start_line":53,"start_character":17,"end_line":53,"end_character":74},"updated":"2016-05-12 12:17:00.000000000","message":"Please use _() to wrap the help message. This is used to translate the message automatically.\n\nfrom openstackclient.i18n import _","commit_id":"a09138cd08b89354ba863166e3e5dca55619bbe7"},{"author":{"_account_id":21514,"name":"Huanxuan Ao","email":"aohuanxuan@163.com","username":"aohuanxuan"},"change_message_id":"ef65e8bc5bccc057c66fde729fadd70cbb267c1b","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        parser.add_argument("},{"line_number":51,"context_line":"            \u0027flavor\u0027,"},{"line_number":52,"context_line":"            metavar\u003d\u0027\u003cflavor\u003e\u0027,"},{"line_number":53,"context_line":"            help\u003d\"Flavor (name or ID) to add access for the given project\""},{"line_number":54,"context_line":"        )"},{"line_number":55,"context_line":"        parser.add_argument("},{"line_number":56,"context_line":"            \u0027--project\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_28a32d51","line":53,"range":{"start_line":53,"start_character":17,"end_line":53,"end_character":74},"in_reply_to":"dab17558_e502f008","updated":"2016-05-12 12:27:59.000000000","message":"Done","commit_id":"a09138cd08b89354ba863166e3e5dca55619bbe7"},{"author":{"_account_id":14937,"name":"Tang Chen","email":"imtangchen@163.com","username":"tangchen"},"change_message_id":"17ab7d63b7bad4b6b151f720620c6988b04d5649","unresolved":false,"context_lines":[{"line_number":56,"context_line":"            \u0027--project\u0027,"},{"line_number":57,"context_line":"            metavar\u003d\u0027\u003cproject\u003e\u0027,"},{"line_number":58,"context_line":"            required\u003dTrue,"},{"line_number":59,"context_line":"            help\u003d\"Project (name or ID) to add flavor access for\""},{"line_number":60,"context_line":"        )"},{"line_number":61,"context_line":"        identity_common.add_project_domain_option_to_parser(parser)"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_85120457","line":59,"range":{"start_line":59,"start_character":12,"end_line":59,"end_character":64},"updated":"2016-05-12 12:17:00.000000000","message":"ditto","commit_id":"a09138cd08b89354ba863166e3e5dca55619bbe7"},{"author":{"_account_id":21514,"name":"Huanxuan Ao","email":"aohuanxuan@163.com","username":"aohuanxuan"},"change_message_id":"ef65e8bc5bccc057c66fde729fadd70cbb267c1b","unresolved":false,"context_lines":[{"line_number":56,"context_line":"            \u0027--project\u0027,"},{"line_number":57,"context_line":"            metavar\u003d\u0027\u003cproject\u003e\u0027,"},{"line_number":58,"context_line":"            required\u003dTrue,"},{"line_number":59,"context_line":"            help\u003d\"Project (name or ID) to add flavor access for\""},{"line_number":60,"context_line":"        )"},{"line_number":61,"context_line":"        identity_common.add_project_domain_option_to_parser(parser)"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_888859c8","line":59,"range":{"start_line":59,"start_character":12,"end_line":59,"end_character":64},"in_reply_to":"dab17558_85120457","updated":"2016-05-12 12:27:59.000000000","message":"Done","commit_id":"a09138cd08b89354ba863166e3e5dca55619bbe7"},{"author":{"_account_id":14937,"name":"Tang Chen","email":"imtangchen@163.com","username":"tangchen"},"change_message_id":"17ab7d63b7bad4b6b151f720620c6988b04d5649","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        flavor \u003d _find_flavor(compute_client, parsed_args.flavor)"},{"line_number":76,"context_line":"        if flavor.is_public:"},{"line_number":77,"context_line":"            msg \u003d \"Cannot add access to a public flavor.\""},{"line_number":78,"context_line":"            raise exceptions.CommandError(msg)"},{"line_number":79,"context_line":"        data \u003d compute_client.flavor_access.add_tenant_access("},{"line_number":80,"context_line":"            flavor.id, project_id)"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_650f202f","line":77,"range":{"start_line":77,"start_character":12,"end_line":77,"end_character":57},"updated":"2016-05-12 12:17:00.000000000","message":"ditto","commit_id":"a09138cd08b89354ba863166e3e5dca55619bbe7"},{"author":{"_account_id":21514,"name":"Huanxuan Ao","email":"aohuanxuan@163.com","username":"aohuanxuan"},"change_message_id":"ef65e8bc5bccc057c66fde729fadd70cbb267c1b","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        flavor \u003d _find_flavor(compute_client, parsed_args.flavor)"},{"line_number":76,"context_line":"        if flavor.is_public:"},{"line_number":77,"context_line":"            msg \u003d \"Cannot add access to a public flavor.\""},{"line_number":78,"context_line":"            raise exceptions.CommandError(msg)"},{"line_number":79,"context_line":"        data \u003d compute_client.flavor_access.add_tenant_access("},{"line_number":80,"context_line":"            flavor.id, project_id)"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_a88f1dcb","line":77,"range":{"start_line":77,"start_character":12,"end_line":77,"end_character":57},"in_reply_to":"dab17558_650f202f","updated":"2016-05-12 12:27:59.000000000","message":"Done","commit_id":"a09138cd08b89354ba863166e3e5dca55619bbe7"},{"author":{"_account_id":14937,"name":"Tang Chen","email":"imtangchen@163.com","username":"tangchen"},"change_message_id":"9aa1774a865d3a494ca9a8181f43ec209ce603e9","unresolved":false,"context_lines":[{"line_number":275,"context_line":"        flavor \u003d _find_flavor(compute_client, parsed_args.flavor)"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"        if not parsed_args.property and not parsed_args.project:"},{"line_number":278,"context_line":"            self.app.log.error(_(\"No changes requested\\n\"))"},{"line_number":279,"context_line":"            return"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"        result \u003d 0"}],"source_content_type":"text/x-python","patch_set":8,"id":"9abb7d3a_bce8cd11","line":278,"range":{"start_line":278,"start_character":34,"end_line":278,"end_character":57},"updated":"2016-05-30 05:57:42.000000000","message":"Other set commands will raise an exception if nothing specified. I\u0027d suggest we keep the consistency.\n\nAnd also, the \"\\n\" is not necessary.","commit_id":"f7b33faf7f170b1196e79cb7738ed60befa0ea47"},{"author":{"_account_id":21514,"name":"Huanxuan Ao","email":"aohuanxuan@163.com","username":"aohuanxuan"},"change_message_id":"9778d19d12d38a5b9b09fdd6e8feafce00343193","unresolved":false,"context_lines":[{"line_number":275,"context_line":"        flavor \u003d _find_flavor(compute_client, parsed_args.flavor)"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"        if not parsed_args.property and not parsed_args.project:"},{"line_number":278,"context_line":"            self.app.log.error(_(\"No changes requested\\n\"))"},{"line_number":279,"context_line":"            return"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"        result \u003d 0"}],"source_content_type":"text/x-python","patch_set":8,"id":"9abb7d3a_1383c757","line":278,"range":{"start_line":278,"start_character":34,"end_line":278,"end_character":57},"in_reply_to":"9abb7d3a_bce8cd11","updated":"2016-05-30 07:08:37.000000000","message":"Done.Thank you.","commit_id":"f7b33faf7f170b1196e79cb7738ed60befa0ea47"},{"author":{"_account_id":14937,"name":"Tang Chen","email":"imtangchen@163.com","username":"tangchen"},"change_message_id":"9aa1774a865d3a494ca9a8181f43ec209ce603e9","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                flavor.set_keys(parsed_args.property)"},{"line_number":285,"context_line":"            except Exception as e:"},{"line_number":286,"context_line":"                self.app.log.error("},{"line_number":287,"context_line":"                    _(\"Failed to set flavor property: \") + str(e))"},{"line_number":288,"context_line":"                result +\u003d 1"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"        if parsed_args.project:"}],"source_content_type":"text/x-python","patch_set":8,"id":"9abb7d3a_bc044dc0","line":287,"range":{"start_line":287,"start_character":19,"end_line":287,"end_character":65},"updated":"2016-05-30 05:57:42.000000000","message":"I think this is not following the guildline.\n(http://docs.openstack.org/developer/oslo.i18n/guidelines.html#adding-variables-to-translated-messages)\n\n# WRONG\nraise ValueError(_(\u0027some message\u0027) + \u0027: variable\u003d%s\u0027 % variable)\n# RIGHT\nraise ValueError(_(\u0027some message: variable\u003d%s\u0027) % variable)","commit_id":"f7b33faf7f170b1196e79cb7738ed60befa0ea47"},{"author":{"_account_id":21514,"name":"Huanxuan Ao","email":"aohuanxuan@163.com","username":"aohuanxuan"},"change_message_id":"9778d19d12d38a5b9b09fdd6e8feafce00343193","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                flavor.set_keys(parsed_args.property)"},{"line_number":285,"context_line":"            except Exception as e:"},{"line_number":286,"context_line":"                self.app.log.error("},{"line_number":287,"context_line":"                    _(\"Failed to set flavor property: \") + str(e))"},{"line_number":288,"context_line":"                result +\u003d 1"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"        if parsed_args.project:"}],"source_content_type":"text/x-python","patch_set":8,"id":"9abb7d3a_537d4f6d","line":287,"range":{"start_line":287,"start_character":19,"end_line":287,"end_character":65},"in_reply_to":"9abb7d3a_bc044dc0","updated":"2016-05-30 07:08:37.000000000","message":"Done.Thank you.","commit_id":"f7b33faf7f170b1196e79cb7738ed60befa0ea47"},{"author":{"_account_id":14937,"name":"Tang Chen","email":"imtangchen@163.com","username":"tangchen"},"change_message_id":"9aa1774a865d3a494ca9a8181f43ec209ce603e9","unresolved":false,"context_lines":[{"line_number":306,"context_line":"                result +\u003d 1"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"        if result \u003e 0:"},{"line_number":309,"context_line":"            raise exceptions.CommandError(\"Command Failed: One or more of the\""},{"line_number":310,"context_line":"                                          \" operations failed\")"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"class ShowFlavor(command.ShowOne):"}],"source_content_type":"text/x-python","patch_set":8,"id":"9abb7d3a_8103e641","line":310,"range":{"start_line":309,"start_character":42,"end_line":310,"end_character":62},"updated":"2016-05-30 05:57:42.000000000","message":"_() warper. :)","commit_id":"f7b33faf7f170b1196e79cb7738ed60befa0ea47"},{"author":{"_account_id":21514,"name":"Huanxuan Ao","email":"aohuanxuan@163.com","username":"aohuanxuan"},"change_message_id":"9778d19d12d38a5b9b09fdd6e8feafce00343193","unresolved":false,"context_lines":[{"line_number":306,"context_line":"                result +\u003d 1"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"        if result \u003e 0:"},{"line_number":309,"context_line":"            raise exceptions.CommandError(\"Command Failed: One or more of the\""},{"line_number":310,"context_line":"                                          \" operations failed\")"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"class ShowFlavor(command.ShowOne):"}],"source_content_type":"text/x-python","patch_set":8,"id":"9abb7d3a_739213a1","line":310,"range":{"start_line":309,"start_character":42,"end_line":310,"end_character":62},"in_reply_to":"9abb7d3a_8103e641","updated":"2016-05-30 07:08:37.000000000","message":"Done.Thank you.","commit_id":"f7b33faf7f170b1196e79cb7738ed60befa0ea47"}],"openstackclient/compute/v2/flavor_access.py":[{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"df87ffc08aae9e1a2b3fb0705fc9f3b87ffd28a1","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from openstackclient.identity import common as identity_common"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"def _find_flavor(compute_client, flavor):"},{"line_number":24,"context_line":"    try:"},{"line_number":25,"context_line":"        return compute_client.flavors.get(flavor)"},{"line_number":26,"context_line":"    except Exception as ex:"},{"line_number":27,"context_line":"        if type(ex).__name__ \u003d\u003d \u0027NotFound\u0027:"},{"line_number":28,"context_line":"            pass"},{"line_number":29,"context_line":"        else:"},{"line_number":30,"context_line":"            raise"},{"line_number":31,"context_line":"    try:"},{"line_number":32,"context_line":"        return compute_client.flavors.find(name\u003dflavor, is_public\u003dNone)"},{"line_number":33,"context_line":"    except Exception as ex:"},{"line_number":34,"context_line":"        if type(ex).__name__ \u003d\u003d \u0027NotFound\u0027:"},{"line_number":35,"context_line":"            msg \u003d \"No flavor with a name or ID of \u0027%s\u0027 exists.\" % flavor"},{"line_number":36,"context_line":"            raise exceptions.CommandError(msg)"},{"line_number":37,"context_line":"        else:"},{"line_number":38,"context_line":"            raise"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"class AddFlavorAccess(command.Lister):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_8f99567c","line":38,"range":{"start_line":23,"start_character":0,"end_line":38,"end_character":17},"updated":"2016-05-04 07:03:49.000000000","message":"if this command is included with flavor.py we don\u0027t need to re-create this private function","commit_id":"8f346da70cb5c67216751b86b02d7e63e30a96ff"},{"author":{"_account_id":21514,"name":"Huanxuan Ao","email":"aohuanxuan@163.com","username":"aohuanxuan"},"change_message_id":"3db87929fec7bf4e36bbfc09af400d0dbbd182ec","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from openstackclient.identity import common as identity_common"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"def _find_flavor(compute_client, flavor):"},{"line_number":24,"context_line":"    try:"},{"line_number":25,"context_line":"        return compute_client.flavors.get(flavor)"},{"line_number":26,"context_line":"    except Exception as ex:"},{"line_number":27,"context_line":"        if type(ex).__name__ \u003d\u003d \u0027NotFound\u0027:"},{"line_number":28,"context_line":"            pass"},{"line_number":29,"context_line":"        else:"},{"line_number":30,"context_line":"            raise"},{"line_number":31,"context_line":"    try:"},{"line_number":32,"context_line":"        return compute_client.flavors.find(name\u003dflavor, is_public\u003dNone)"},{"line_number":33,"context_line":"    except Exception as ex:"},{"line_number":34,"context_line":"        if type(ex).__name__ \u003d\u003d \u0027NotFound\u0027:"},{"line_number":35,"context_line":"            msg \u003d \"No flavor with a name or ID of \u0027%s\u0027 exists.\" % flavor"},{"line_number":36,"context_line":"            raise exceptions.CommandError(msg)"},{"line_number":37,"context_line":"        else:"},{"line_number":38,"context_line":"            raise"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"class AddFlavorAccess(command.Lister):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_5b6c1c36","line":38,"range":{"start_line":23,"start_character":0,"end_line":38,"end_character":17},"in_reply_to":"1a122d0e_8f99567c","updated":"2016-05-04 09:32:42.000000000","message":"Thank you for reviewing : ).The patch about adding this function in flavor.py is not be merged yet,so I could not use it.And I think a new file for flavor access commands is neccessary because there are at least 3 commands for flavor access.I would like to continue my work to complete the rest flavor access commands in one patch after this patch be merged.","commit_id":"8f346da70cb5c67216751b86b02d7e63e30a96ff"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"df87ffc08aae9e1a2b3fb0705fc9f3b87ffd28a1","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        flavor \u003d _find_flavor(compute_client, parsed_args.flavor)"},{"line_number":72,"context_line":"        if flavor.is_public:"},{"line_number":73,"context_line":"            msg \u003d \"Can not add access to a public flavor.\""},{"line_number":74,"context_line":"            raise exceptions.CommandError(msg)"},{"line_number":75,"context_line":"        data \u003d compute_client.flavor_access.add_tenant_access("},{"line_number":76,"context_line":"            flavor.id, project_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_afc7f262","line":73,"range":{"start_line":73,"start_character":19,"end_line":73,"end_character":26},"updated":"2016-05-04 07:03:49.000000000","message":"Cannot* one word","commit_id":"8f346da70cb5c67216751b86b02d7e63e30a96ff"},{"author":{"_account_id":21514,"name":"Huanxuan Ao","email":"aohuanxuan@163.com","username":"aohuanxuan"},"change_message_id":"3db87929fec7bf4e36bbfc09af400d0dbbd182ec","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        flavor \u003d _find_flavor(compute_client, parsed_args.flavor)"},{"line_number":72,"context_line":"        if flavor.is_public:"},{"line_number":73,"context_line":"            msg \u003d \"Can not add access to a public flavor.\""},{"line_number":74,"context_line":"            raise exceptions.CommandError(msg)"},{"line_number":75,"context_line":"        data \u003d compute_client.flavor_access.add_tenant_access("},{"line_number":76,"context_line":"            flavor.id, project_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_7bf6385e","line":73,"range":{"start_line":73,"start_character":19,"end_line":73,"end_character":26},"in_reply_to":"1a122d0e_afc7f262","updated":"2016-05-04 09:32:42.000000000","message":"Thank you!","commit_id":"8f346da70cb5c67216751b86b02d7e63e30a96ff"},{"author":{"_account_id":10453,"name":"octopuszhang","email":"zhangyf@rc.inesa.com","username":"1"},"change_message_id":"7e10a7987dbedfe073a9f70766a070fed4b58ebb","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        )"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        return (column_headers,"},{"line_number":88,"context_line":"                (utils.get_item_properties("},{"line_number":89,"context_line":"                    s, columns,"},{"line_number":90,"context_line":"                ) for s in data))"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_c16b3e84","line":90,"range":{"start_line":88,"start_character":0,"end_line":90,"end_character":33},"updated":"2016-05-03 15:28:59.000000000","message":"seems good，but in my opinion，it\u0027s difficult to read.","commit_id":"8f346da70cb5c67216751b86b02d7e63e30a96ff"},{"author":{"_account_id":21514,"name":"Huanxuan Ao","email":"aohuanxuan@163.com","username":"aohuanxuan"},"change_message_id":"3db87929fec7bf4e36bbfc09af400d0dbbd182ec","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        )"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        return (column_headers,"},{"line_number":88,"context_line":"                (utils.get_item_properties("},{"line_number":89,"context_line":"                    s, columns,"},{"line_number":90,"context_line":"                ) for s in data))"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_3b8320ab","line":90,"range":{"start_line":88,"start_character":0,"end_line":90,"end_character":33},"in_reply_to":"1a122d0e_4fc8de75","updated":"2016-05-04 09:32:42.000000000","message":"Thank you!","commit_id":"8f346da70cb5c67216751b86b02d7e63e30a96ff"},{"author":{"_account_id":21514,"name":"Huanxuan Ao","email":"aohuanxuan@163.com","username":"aohuanxuan"},"change_message_id":"3db87929fec7bf4e36bbfc09af400d0dbbd182ec","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        )"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        return (column_headers,"},{"line_number":88,"context_line":"                (utils.get_item_properties("},{"line_number":89,"context_line":"                    s, columns,"},{"line_number":90,"context_line":"                ) for s in data))"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_1b9e2407","line":90,"range":{"start_line":88,"start_character":0,"end_line":90,"end_character":33},"in_reply_to":"1a122d0e_c16b3e84","updated":"2016-05-04 09:32:42.000000000","message":"Thank you for reviewing!This is the same with many other files.","commit_id":"8f346da70cb5c67216751b86b02d7e63e30a96ff"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"df87ffc08aae9e1a2b3fb0705fc9f3b87ffd28a1","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        )"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        return (column_headers,"},{"line_number":88,"context_line":"                (utils.get_item_properties("},{"line_number":89,"context_line":"                    s, columns,"},{"line_number":90,"context_line":"                ) for s in data))"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_4fc8de75","line":90,"range":{"start_line":88,"start_character":0,"end_line":90,"end_character":33},"in_reply_to":"1a122d0e_c16b3e84","updated":"2016-05-04 07:03:49.000000000","message":"this is copy/paste of many other files, seems OK to me","commit_id":"8f346da70cb5c67216751b86b02d7e63e30a96ff"}],"openstackclient/tests/compute/v2/test_flavor.py":[{"author":{"_account_id":14937,"name":"Tang Chen","email":"imtangchen@163.com","username":"tangchen"},"change_message_id":"17ab7d63b7bad4b6b151f720620c6988b04d5649","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    def test_flavor_add_all_options(self):"},{"line_number":109,"context_line":"        arglist \u003d ["},{"line_number":110,"context_line":"            \u0027--project\u0027, identity_fakes_v3.project_id,"},{"line_number":111,"context_line":"            self.flavor.id,"},{"line_number":112,"context_line":"            \"--project-domain\", identity_fakes_v3.domain_name,"},{"line_number":113,"context_line":"        ]"},{"line_number":114,"context_line":"        verifylist \u003d ["}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_a51628ef","line":111,"range":{"start_line":111,"start_character":12,"end_line":111,"end_character":27},"updated":"2016-05-12 12:17:00.000000000","message":"Please put the positional option after all the other options.","commit_id":"a09138cd08b89354ba863166e3e5dca55619bbe7"},{"author":{"_account_id":21514,"name":"Huanxuan Ao","email":"aohuanxuan@163.com","username":"aohuanxuan"},"change_message_id":"ef65e8bc5bccc057c66fde729fadd70cbb267c1b","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    def test_flavor_add_all_options(self):"},{"line_number":109,"context_line":"        arglist \u003d ["},{"line_number":110,"context_line":"            \u0027--project\u0027, identity_fakes_v3.project_id,"},{"line_number":111,"context_line":"            self.flavor.id,"},{"line_number":112,"context_line":"            \"--project-domain\", identity_fakes_v3.domain_name,"},{"line_number":113,"context_line":"        ]"},{"line_number":114,"context_line":"        verifylist \u003d ["}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_08c62916","line":111,"range":{"start_line":111,"start_character":12,"end_line":111,"end_character":27},"in_reply_to":"dab17558_a51628ef","updated":"2016-05-12 12:27:59.000000000","message":"Done","commit_id":"a09138cd08b89354ba863166e3e5dca55619bbe7"},{"author":{"_account_id":14937,"name":"Tang Chen","email":"imtangchen@163.com","username":"tangchen"},"change_message_id":"9aa1774a865d3a494ca9a8181f43ec209ce603e9","unresolved":false,"context_lines":[{"line_number":439,"context_line":""},{"line_number":440,"context_line":"    # Return value of self.flavors_mock.find()."},{"line_number":441,"context_line":"    flavor \u003d compute_fakes.FakeFlavor.create_one_flavor("},{"line_number":442,"context_line":"        attrs\u003d{\u0027os-flavor-access:is_public\u0027: False})"},{"line_number":443,"context_line":""},{"line_number":444,"context_line":"    def setUp(self):"},{"line_number":445,"context_line":"        super(TestFlavorSet, self).setUp()"}],"source_content_type":"text/x-python","patch_set":8,"id":"9abb7d3a_1ce119ff","line":442,"range":{"start_line":442,"start_character":8,"end_line":442,"end_character":51},"updated":"2016-05-30 05:57:42.000000000","message":"If you just use this attr in one test, then put it in the test function. But if you put it here, I\u0027d prefer move it to class FakeFlavor.","commit_id":"f7b33faf7f170b1196e79cb7738ed60befa0ea47"},{"author":{"_account_id":21514,"name":"Huanxuan Ao","email":"aohuanxuan@163.com","username":"aohuanxuan"},"change_message_id":"9778d19d12d38a5b9b09fdd6e8feafce00343193","unresolved":false,"context_lines":[{"line_number":439,"context_line":""},{"line_number":440,"context_line":"    # Return value of self.flavors_mock.find()."},{"line_number":441,"context_line":"    flavor \u003d compute_fakes.FakeFlavor.create_one_flavor("},{"line_number":442,"context_line":"        attrs\u003d{\u0027os-flavor-access:is_public\u0027: False})"},{"line_number":443,"context_line":""},{"line_number":444,"context_line":"    def setUp(self):"},{"line_number":445,"context_line":"        super(TestFlavorSet, self).setUp()"}],"source_content_type":"text/x-python","patch_set":8,"id":"9abb7d3a_f39e03b7","line":442,"range":{"start_line":442,"start_character":8,"end_line":442,"end_character":51},"in_reply_to":"9abb7d3a_1ce119ff","updated":"2016-05-30 07:08:37.000000000","message":"We can only set flavor access for a private flavor,so the attr is used for all tests of flavor access setting. But we can\u0027t put it to FakeFlavor class because the default value of \"os-flavor-access:is_public\" should be \"True\" to match the real condition.","commit_id":"f7b33faf7f170b1196e79cb7738ed60befa0ea47"},{"author":{"_account_id":14937,"name":"Tang Chen","email":"imtangchen@163.com","username":"tangchen"},"change_message_id":"b8dee8a50b64c63b41c89ce7f98b8f071a157e1a","unresolved":false,"context_lines":[{"line_number":439,"context_line":""},{"line_number":440,"context_line":"    # Return value of self.flavors_mock.find()."},{"line_number":441,"context_line":"    flavor \u003d compute_fakes.FakeFlavor.create_one_flavor("},{"line_number":442,"context_line":"        attrs\u003d{\u0027os-flavor-access:is_public\u0027: False})"},{"line_number":443,"context_line":""},{"line_number":444,"context_line":"    def setUp(self):"},{"line_number":445,"context_line":"        super(TestFlavorSet, self).setUp()"}],"source_content_type":"text/x-python","patch_set":8,"id":"9abb7d3a_d34adfc4","line":442,"range":{"start_line":442,"start_character":8,"end_line":442,"end_character":51},"in_reply_to":"9abb7d3a_f39e03b7","updated":"2016-05-30 07:15:06.000000000","message":"OK.","commit_id":"f7b33faf7f170b1196e79cb7738ed60befa0ea47"}],"releasenotes/notes/bug-1575461-094b1da27417ef2c.yaml":[{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"9a065f8ab9adc8f5e7349e3c59c1ad322edbe224","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Add ``flavor access add`` command that supports projects to access a flavor."},{"line_number":5,"context_line":"    [Bug `1575461 \u003chttps://bugs.launchpad.net/python-openstackclient/+bug/1575461\u003e`_]"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"dab17558_cd11215f","line":4,"range":{"start_line":4,"start_character":17,"end_line":4,"end_character":23},"updated":"2016-05-11 06:57:46.000000000","message":"remove \"access\"","commit_id":"5c28b8f18ceb0d79ed5814dd89df1cb0c0661f99"},{"author":{"_account_id":21514,"name":"Huanxuan Ao","email":"aohuanxuan@163.com","username":"aohuanxuan"},"change_message_id":"28215129e15c1152c1e53bb5d968d6364a39834e","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Add ``flavor access add`` command that supports projects to access a flavor."},{"line_number":5,"context_line":"    [Bug `1575461 \u003chttps://bugs.launchpad.net/python-openstackclient/+bug/1575461\u003e`_]"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"dab17558_48499fcf","line":4,"range":{"start_line":4,"start_character":17,"end_line":4,"end_character":23},"in_reply_to":"dab17558_cd11215f","updated":"2016-05-11 07:42:00.000000000","message":"Oh..I am sorry I fogot this,I will change it right now.Thank you!","commit_id":"5c28b8f18ceb0d79ed5814dd89df1cb0c0661f99"}]}
