)]}'
{"neutronclient/neutron/v2_0/__init__.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"85d662c115acb8923c5aa762d828fb279d25c836","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        message\u003dnot_found_message, status_code\u003d404)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"def find_resourceid_by_name_or_id(client, resource, name_or_id):"},{"line_number":64,"context_line":"    try:"},{"line_number":65,"context_line":"        return find_resourceid_by_id(client, resource, name_or_id)"},{"line_number":66,"context_line":"    except exceptions.NeutronClientException:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2B764%3D","line":63,"updated":"2013-11-18 11:56:50.000000000","message":"It is better to move this method before find_resourceid_by_id. This methods calls find_resourceid_by_id and find_resourceid_by_name, so it looks a bit odd that it is placed between them.","commit_id":"75a9c5c50b8c07c40419f18ab02cb2aba213d43b"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"cfd520aab2d4dc9991a6c887f37d71b1fe7a323d","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        message\u003dnot_found_message, status_code\u003d404)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"def find_resourceid_by_name_or_id(client, resource, name_or_id):"},{"line_number":64,"context_line":"    try:"},{"line_number":65,"context_line":"        return find_resourceid_by_id(client, resource, name_or_id)"},{"line_number":66,"context_line":"    except exceptions.NeutronClientException:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2B5%2BU%3D","line":63,"in_reply_to":"AAAATn%2F%2B764%3D","updated":"2013-11-21 05:57:12.000000000","message":"ok, i would just move it below both of methods","commit_id":"75a9c5c50b8c07c40419f18ab02cb2aba213d43b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"a2d5cf70348c4e5d565e63481e2a92aacf9f47bd","unresolved":false,"context_lines":[{"line_number":454,"context_line":"        if not body[self.resource]:"},{"line_number":455,"context_line":"            raise exceptions.CommandError("},{"line_number":456,"context_line":"                \"Must specify new values to update %s\" % self.resource)"},{"line_number":457,"context_line":"        _id \u003d self.get_resource_id(neutron_client, parsed_args.id)"},{"line_number":458,"context_line":"        obj_updator \u003d getattr(neutron_client,"},{"line_number":459,"context_line":"                              \"update_%s\" % self.resource)"},{"line_number":460,"context_line":"        obj_updator(_id, body)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2Bht0%3D","line":457,"updated":"2013-11-25 04:19:13.000000000","message":"On a second thought, it seems better to add a class attribute \"allow_names\" to UpdateCommand. It is a way used in DeleteCommand and ShowCommand.\n\nIf we have allow_names attribute, the only things to do are:\n\n- Copy L.494-498 below to here\n- Add allow_names (which defaults to True) to UpdateCommand\n- Add allow_names \u003d False to UpdateHealthMonitor","commit_id":"1db2d1c79ae7352e8f57199693368fc56125a240"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"9bb7dc2fe3c6f98d73a41c29df5e7afd01fa0497","unresolved":false,"context_lines":[{"line_number":454,"context_line":"        if not body[self.resource]:"},{"line_number":455,"context_line":"            raise exceptions.CommandError("},{"line_number":456,"context_line":"                \"Must specify new values to update %s\" % self.resource)"},{"line_number":457,"context_line":"        _id \u003d self.get_resource_id(neutron_client, parsed_args.id)"},{"line_number":458,"context_line":"        obj_updator \u003d getattr(neutron_client,"},{"line_number":459,"context_line":"                              \"update_%s\" % self.resource)"},{"line_number":460,"context_line":"        obj_updator(_id, body)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BhW0%3D","line":457,"in_reply_to":"AAAATn%2F%2Bht0%3D","updated":"2013-11-25 08:32:21.000000000","message":"yeah, good point.","commit_id":"1db2d1c79ae7352e8f57199693368fc56125a240"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"9ec1f532c9f0fa999e8c931f8d7c72450bec200c","unresolved":false,"context_lines":[{"line_number":455,"context_line":"            _id \u003d find_resourceid_by_name_or_id("},{"line_number":456,"context_line":"                neutron_client, self.resource, parsed_args.id)"},{"line_number":457,"context_line":"        else:"},{"line_number":458,"context_line":"            _id \u003d find_resourceid_by_id("},{"line_number":459,"context_line":"                neutron_client, self.resource, parsed_args.id)"},{"line_number":460,"context_line":"        obj_updator \u003d getattr(neutron_client,"},{"line_number":461,"context_line":"                              \"update_%s\" % self.resource)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2BhO4%3D","line":458,"updated":"2013-11-25 08:02:42.000000000","message":"invoking this method instead of directly using parsed_args.id gives nicer error message in case id is not found","commit_id":"ad64270c2534376916ecf729fbdc20c052d5e036"}],"neutronclient/neutron/v2_0/lb/healthmonitor.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"85d662c115acb8923c5aa762d828fb279d25c836","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        # verify that healthmonitor exists"},{"line_number":130,"context_line":"        neutronV20.find_resourceid_by_id(neutron_client,"},{"line_number":131,"context_line":"                                         self.resource,"},{"line_number":132,"context_line":"                                         parsed_args.id)"},{"line_number":133,"context_line":"        obj_updator \u003d getattr(neutron_client,"},{"line_number":134,"context_line":"                              \"update_%s\" % self.resource)"},{"line_number":135,"context_line":"        obj_updator(parsed_args.id, body)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2B73k%3D","line":132,"updated":"2013-11-18 11:56:50.000000000","message":"The only difference between UpdateCommand and UpdateHelathMonitor is L.130-132. How about defining a submethod to retrieve resource id in UpdateCommand class, and override it in this class. I believe it seems more simple fix.\n\n(in neutron/v2_0/__init__.py)\n\n  class UpdateCommand(..):\n     def get_resource_id(self, client, resource, parsed_args):\n          return neutronV20.find_resourceid_by_name_or_id(...)\n\n     def run(...):\n           ....\n           _id \u003d self._get_resource_id(...)\n           ....\n\nand\n\n  class UpdateHelathMonitor(self, client, resource, parsed_args):\n      def get_resource_id(...):\n          return parsed_args.id\n\nNote that we don\u0027t need to call find_resourceid_by_id because update operation checks if the specified resource exists.","commit_id":"75a9c5c50b8c07c40419f18ab02cb2aba213d43b"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"cfd520aab2d4dc9991a6c887f37d71b1fe7a323d","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        # verify that healthmonitor exists"},{"line_number":130,"context_line":"        neutronV20.find_resourceid_by_id(neutron_client,"},{"line_number":131,"context_line":"                                         self.resource,"},{"line_number":132,"context_line":"                                         parsed_args.id)"},{"line_number":133,"context_line":"        obj_updator \u003d getattr(neutron_client,"},{"line_number":134,"context_line":"                              \"update_%s\" % self.resource)"},{"line_number":135,"context_line":"        obj_updator(parsed_args.id, body)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2BxI4%3D","line":132,"in_reply_to":"AAAATn%2F%2B73k%3D","updated":"2013-11-21 05:57:12.000000000","message":"agree","commit_id":"75a9c5c50b8c07c40419f18ab02cb2aba213d43b"}]}
