)]}'
{"novaclient/v2/hosts.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"cfc5a288b0545394bf1454e211c3aaec2c14c3d6","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"class HostFromList(Host):"},{"line_number":45,"context_line":"    def __repr__(self):"},{"line_number":46,"context_line":"        return \"\u003cHost: %s\u003e\" % self.host_name"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"class HostManager(base.ManagerWithFind):"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_935a5a29","line":46,"updated":"2015-11-23 17:45:56.000000000","message":"The concern I have is that HostFromList objects still have update(), startup(), shutdown(), and reboot() methods, all of which will fail with an AttributeError when called due to the missing self.host.","commit_id":"0cd6f03ac350874a6cb0ae8d46e233c7cc526957"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"c90b11a08a51f91741efe0ea09f8d8ffc1efcbd3","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"class HostFromList(Host):"},{"line_number":45,"context_line":"    def __repr__(self):"},{"line_number":46,"context_line":"        return \"\u003cHost: %s\u003e\" % self.host_name"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"class HostManager(base.ManagerWithFind):"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_f9685dbc","line":46,"in_reply_to":"ba8a016a_935a5a29","updated":"2015-11-23 22:20:32.000000000","message":"Thanks for catching that! Let me work on this a bit","commit_id":"0cd6f03ac350874a6cb0ae8d46e233c7cc526957"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"56e061c1f2918b09c25e22a20eca3ea4bf32c75a","unresolved":false,"context_lines":[{"line_number":18,"context_line":"\"\"\""},{"line_number":19,"context_line":"from novaclient import base"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"class Host(base.Resource):"},{"line_number":23,"context_line":"    def __repr__(self):"},{"line_number":24,"context_line":"        return \"\u003cHost: %s\u003e\" % self.host"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_f59f70b2","line":21,"updated":"2015-11-24 11:32:46.000000000","message":"Imo, it would be much better(less code duplication) to extend this class. Just add host_name property:\n\n    @property\n    def host_name(self):\n        return self.host","commit_id":"ebfba23abce5ed69f73e42d10d786b77f0c57bfa"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"4897a97682ee0d6133055b94292193eac8a9338a","unresolved":false,"context_lines":[{"line_number":18,"context_line":"\"\"\""},{"line_number":19,"context_line":"from novaclient import base"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"class Host(base.Resource):"},{"line_number":23,"context_line":"    def __repr__(self):"},{"line_number":24,"context_line":"        return \"\u003cHost: %s\u003e\" % self.host"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_9f1dbf75","line":21,"in_reply_to":"9a8ffd7b_cb74f1fe","updated":"2015-11-24 20:58:51.000000000","message":"Could just use a setter:\n\n    @property\n    def host_name(self):\n        return self.host\n\n    @host_name.setter\n    def host_name(self, value):\n        self.host \u003d value","commit_id":"ebfba23abce5ed69f73e42d10d786b77f0c57bfa"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"489fb3f6928b6c34637445ff7592b86c9f797c2c","unresolved":false,"context_lines":[{"line_number":18,"context_line":"\"\"\""},{"line_number":19,"context_line":"from novaclient import base"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"class Host(base.Resource):"},{"line_number":23,"context_line":"    def __repr__(self):"},{"line_number":24,"context_line":"        return \"\u003cHost: %s\u003e\" % self.host"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_cb74f1fe","line":21,"in_reply_to":"9a8ffd7b_f59f70b2","updated":"2015-11-24 19:42:19.000000000","message":"I think the problem with that is host from a list has attribute host_name and it can\u0027t set the attribute \"host_name\" (during __init__) if it\u0027s defined as a property this way","commit_id":"ebfba23abce5ed69f73e42d10d786b77f0c57bfa"}]}
