)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"88a152e523426deddb8bb2170534d4aac440bdc1","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Alexander Maretskiy \u003camaretskiy@mirantis.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-11-16 14:48:18 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"[Ci] WIP Propose module for resources listing and compare"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch adds module tests.ci.osresources, which can make and"},{"line_number":10,"context_line":"save listing of most important cloud resources and compare"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"ba8a016a_9fee2aeb","line":7,"updated":"2015-11-16 16:59:56.000000000","message":"Since the patch is almost ready, please, remove WIP statement, so I\u0027ll be able to put -1:)","commit_id":"443af23046e618be46d2224595064ea06cbdd321"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"4f126dbd1e8739d4be17153ae2c155a8cb21c119","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Alexander Maretskiy \u003camaretskiy@mirantis.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-11-16 14:48:18 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"[Ci] WIP Propose module for resources listing and compare"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch adds module tests.ci.osresources, which can make and"},{"line_number":10,"context_line":"save listing of most important cloud resources and compare"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"ba8a016a_1fbb1a74","line":7,"in_reply_to":"ba8a016a_9fee2aeb","updated":"2015-11-16 17:06:39.000000000","message":"Yes, it seems to be a time to remove WIP","commit_id":"443af23046e618be46d2224595064ea06cbdd321"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"0911abc1eb81f3dcfa1a85467034b4d7241f928d","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Now we can check if there is a resources leak in cleanup"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I5338c77ebd9390ec74a3f1a2028cc0b1ea1b51cf"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"ba8a016a_4ecbfd53","line":15,"updated":"2015-11-17 15:53:43.000000000","message":"This change (perhaps incidentally) partially implements the \"Refactoring Rally Cleanup\" spec. (See case 5 at https://github.com/openstack/rally/blob/master/doc/specs/in-progress/cleanup_refactoring.rst) I\u0027ve registered a blueprint for the spec, so you can add:\n\nImplements: blueprint cleanup-refactoring","commit_id":"bd4864dd4857960e999372ef1a2f9ad810fba59e"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"69147fa88e46d20526a86467386d79bceabb4032","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Now we can check if there is a resources leak in cleanup"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I5338c77ebd9390ec74a3f1a2028cc0b1ea1b51cf"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"ba8a016a_a95aa328","line":15,"in_reply_to":"ba8a016a_4ecbfd53","updated":"2015-11-17 16:01:34.000000000","message":"Of course this patch adds a cleanup check for gates, but I do not think it actually touches this spec since it does not affect any cleanup","commit_id":"bd4864dd4857960e999372ef1a2f9ad810fba59e"}],"tests/ci/osresources.py":[{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"238c0e0eee8b495072a5114ee9187d4d80aed508","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        return self.client.services.list()"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"class Neutron(ResourceManager):"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def _client(self):"},{"line_number":124,"context_line":"        return self.clients.neutron(version\u003d\"2.0\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa80f949_bc9dd167","line":121,"updated":"2015-11-06 03:05:20.000000000","message":"We should add check here do we support neutron at all","commit_id":"9897609fa3d5c81d127db12fc1415d66f52cd32e"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"238c0e0eee8b495072a5114ee9187d4d80aed508","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        return self.client.stacks.list()"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"class CinderV1(ResourceManager):"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"    def _client(self):"},{"line_number":181,"context_line":"        return self.clients.cinder(version\u003d\"1\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa80f949_5cae2599","line":178,"updated":"2015-11-06 03:05:20.000000000","message":"We shouldn\u0027t have different handlers for different versions of the same service. \n\nAll logic regarding to difference in versions should be kept here.","commit_id":"9897609fa3d5c81d127db12fc1415d66f52cd32e"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"238c0e0eee8b495072a5114ee9187d4d80aed508","unresolved":false,"context_lines":[{"line_number":214,"context_line":"    removed, added \u003d changes"},{"line_number":215,"context_line":"    \"\"\""},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    RESOURCE_MANAGERS \u003d (Keystone,"},{"line_number":218,"context_line":"                         NovaV2,"},{"line_number":219,"context_line":"                         Neutron,"},{"line_number":220,"context_line":"                         Glance,"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa80f949_bc18711f","line":217,"updated":"2015-11-06 03:05:20.000000000","message":"use rally.common.discovery tools here instead of hardcoding the stuff","commit_id":"9897609fa3d5c81d127db12fc1415d66f52cd32e"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"238c0e0eee8b495072a5114ee9187d4d80aed508","unresolved":false,"context_lines":[{"line_number":221,"context_line":"                         Heat,"},{"line_number":222,"context_line":"                         CinderV1)"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"    ENDPOINT_DEFAULTS \u003d {"},{"line_number":225,"context_line":"        \"username\": \"must-be-set-explicitly\","},{"line_number":226,"context_line":"        \"password\": \"must-be-set-explicitly\","},{"line_number":227,"context_line":"        \"tenant_name\": \"admin\","}],"source_content_type":"text/x-python","patch_set":3,"id":"fa80f949_7cd5291a","line":224,"updated":"2015-11-06 03:05:20.000000000","message":"This is actually credential information not endpoints we have bug that should address this in rally code so please do not introduce new places.","commit_id":"9897609fa3d5c81d127db12fc1415d66f52cd32e"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"1a1d2e7a4bc478cb359fb2b904e694be5c5b4570","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    @property"},{"line_number":40,"context_line":"    def client(self):"},{"line_number":41,"context_line":"        if not hasattr(self, \"_cached_client\"):"},{"line_number":42,"context_line":"            self._cached_client \u003d self._client()"},{"line_number":43,"context_line":"        return self._cached_client"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def has_extension(self, name):"}],"source_content_type":"text/x-python","patch_set":7,"id":"da85f559_0cf20607","line":42,"updated":"2015-11-13 14:14:58.000000000","message":"`client` method is redundant. Each client support cache by itself  - https://github.com/openstack/rally/blob/master/rally/osclients.py#L191-L198","commit_id":"593336d6807da03a082dec9da7f63049ba7d140d"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"0aacdfb491050f6441001840e2e823e73b6488c4","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                    # raise ValueError(\"Failed to represent resource %r\" % res)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"                all_resources.append("},{"line_number":73,"context_line":"                    \" # \".join([cls, resource_name, str(id_)]))"},{"line_number":74,"context_line":"        return all_resources"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"da85f559_15718fa8","line":73,"updated":"2015-11-14 11:29:39.000000000","message":"it would be nice to display a name here too.","commit_id":"9ce3a85f3c96d8b1e01ddd4dccfbbd7623962f39"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"e02c4a13fe88f1eca67d40c225fc08d4414d5ed2","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                    # raise ValueError(\"Failed to represent resource %r\" % res)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"                all_resources.append("},{"line_number":73,"context_line":"                    \" # \".join([cls, resource_name, str(id_)]))"},{"line_number":74,"context_line":"        return all_resources"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"ba8a016a_d716eb54","line":73,"in_reply_to":"da85f559_15718fa8","updated":"2015-11-16 12:00:46.000000000","message":"Agreed. Actually I\u0027m planning to represent resource by dict with at least both `id\u0027 and `name\u0027 keys (if available)","commit_id":"9ce3a85f3c96d8b1e01ddd4dccfbbd7623962f39"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"0aacdfb491050f6441001840e2e823e73b6488c4","unresolved":false,"context_lines":[{"line_number":169,"context_line":"        return self.clients.glance()"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def list_images(self):"},{"line_number":172,"context_line":"        return self.client.images.list()"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"class Heat(ResourceManager):"}],"source_content_type":"text/x-python","patch_set":9,"id":"da85f559_0c60af34","line":172,"updated":"2015-11-14 11:29:39.000000000","message":"https://github.com/openstack/python-glanceclient/blob/master/glanceclient/v1/shell.py#L109-L112","commit_id":"9ce3a85f3c96d8b1e01ddd4dccfbbd7623962f39"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"e02c4a13fe88f1eca67d40c225fc08d4414d5ed2","unresolved":false,"context_lines":[{"line_number":169,"context_line":"        return self.clients.glance()"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def list_images(self):"},{"line_number":172,"context_line":"        return self.client.images.list()"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"class Heat(ResourceManager):"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba8a016a_1768f3f4","line":172,"in_reply_to":"da85f559_0c60af34","updated":"2015-11-16 12:00:46.000000000","message":"It seems that python client works differently, it uses optional argument `owner\u0027, so all images are listed by default\n\nhttps://github.com/openstack/python-glanceclient/blob/master/glanceclient/v1/images.py#L202-L204","commit_id":"9ce3a85f3c96d8b1e01ddd4dccfbbd7623962f39"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"0aacdfb491050f6441001840e2e823e73b6488c4","unresolved":false,"context_lines":[{"line_number":201,"context_line":"    def list_volume_types(self):"},{"line_number":202,"context_line":"        return self.client.volume_types.list()"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    def list_volumes(self):"},{"line_number":205,"context_line":"        return self.client.volumes.list()"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"da85f559_4cf2379c","line":204,"updated":"2015-11-14 11:29:39.000000000","message":"Cinder also supports all-tenants:\n\nhttps://github.com/openstack/python-cinderclient/blob/master/cinderclient/v1/shell.py#L183-L190","commit_id":"9ce3a85f3c96d8b1e01ddd4dccfbbd7623962f39"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"e02c4a13fe88f1eca67d40c225fc08d4414d5ed2","unresolved":false,"context_lines":[{"line_number":201,"context_line":"    def list_volume_types(self):"},{"line_number":202,"context_line":"        return self.client.volume_types.list()"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    def list_volumes(self):"},{"line_number":205,"context_line":"        return self.client.volumes.list()"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"ba8a016a_45f9e84c","line":204,"in_reply_to":"da85f559_4cf2379c","updated":"2015-11-16 12:00:46.000000000","message":"Done","commit_id":"9ce3a85f3c96d8b1e01ddd4dccfbbd7623962f39"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"88a152e523426deddb8bb2170534d4aac440bdc1","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from rally import osclients"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"\"\"\"List and compare most used OpenStack cloud resources.\"\"\""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class ResourceManager(object):"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba8a016a_9f170aed","line":26,"updated":"2015-11-16 16:59:56.000000000","message":"I prefer to put this comment before imports.","commit_id":"443af23046e618be46d2224595064ea06cbdd321"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"ab3b2ecde16406e027bbe6f1c2268b213e6c505c","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from rally import osclients"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"\"\"\"List and compare most used OpenStack cloud resources.\"\"\""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class ResourceManager(object):"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba8a016a_ef575a00","line":26,"in_reply_to":"ba8a016a_3c35a1f6","updated":"2015-11-17 13:35:14.000000000","message":"Sorry, comment in wrong place (should be in commit message) :)","commit_id":"443af23046e618be46d2224595064ea06cbdd321"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"e5b7f6983c49c455e2d2ad4ec2c7a5bcba65d4ec","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from rally import osclients"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"\"\"\"List and compare most used OpenStack cloud resources.\"\"\""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class ResourceManager(object):"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba8a016a_3c35a1f6","line":26,"in_reply_to":"ba8a016a_9f170aed","updated":"2015-11-17 11:34:49.000000000","message":"There will be at least 1 WIP path set because of debug","commit_id":"443af23046e618be46d2224595064ea06cbdd321"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"4f126dbd1e8739d4be17153ae2c155a8cb21c119","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from rally import osclients"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"\"\"\"List and compare most used OpenStack cloud resources.\"\"\""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class ResourceManager(object):"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba8a016a_bf89aecc","line":26,"in_reply_to":"ba8a016a_9f170aed","updated":"2015-11-16 17:06:39.000000000","message":"Will done","commit_id":"443af23046e618be46d2224595064ea06cbdd321"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"88a152e523426deddb8bb2170534d4aac440bdc1","unresolved":false,"context_lines":[{"line_number":29,"context_line":"class ResourceManager(object):"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def __init__(self, clients):"},{"line_number":32,"context_line":"        self.available_extensions \u003d []"},{"line_number":33,"context_line":"        self.clients \u003d clients"},{"line_number":34,"context_line":"        self.available_services \u003d self.clients.services().values()"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"ba8a016a_3f4dbe72","line":32,"updated":"2015-11-16 16:59:56.000000000","message":"This variable and `has_extension` method are neutron specific stuff, so it should be moved to `Neutron` class, until first statement is true.","commit_id":"443af23046e618be46d2224595064ea06cbdd321"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"4f126dbd1e8739d4be17153ae2c155a8cb21c119","unresolved":false,"context_lines":[{"line_number":29,"context_line":"class ResourceManager(object):"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def __init__(self, clients):"},{"line_number":32,"context_line":"        self.available_extensions \u003d []"},{"line_number":33,"context_line":"        self.clients \u003d clients"},{"line_number":34,"context_line":"        self.available_services \u003d self.clients.services().values()"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"ba8a016a_1fa47a55","line":32,"in_reply_to":"ba8a016a_3f4dbe72","updated":"2015-11-16 17:06:39.000000000","message":"Agreed","commit_id":"443af23046e618be46d2224595064ea06cbdd321"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"88a152e523426deddb8bb2170534d4aac440bdc1","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        return True"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    @property"},{"line_number":40,"context_line":"    def client(self):"},{"line_number":41,"context_line":"        return self._client()"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def has_extension(self, name):"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba8a016a_4c63421b","line":40,"updated":"2015-11-16 16:59:56.000000000","message":"I suggest to remove all _clients methods and use statement `getattr(self.clients, self.__class__.__name__.lower())`","commit_id":"443af23046e618be46d2224595064ea06cbdd321"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"4f126dbd1e8739d4be17153ae2c155a8cb21c119","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        return True"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    @property"},{"line_number":40,"context_line":"    def client(self):"},{"line_number":41,"context_line":"        return self._client()"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def has_extension(self, name):"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba8a016a_3f95bee3","line":40,"in_reply_to":"ba8a016a_4c63421b","updated":"2015-11-16 17:06:39.000000000","message":"Sounds reasonable","commit_id":"443af23046e618be46d2224595064ea06cbdd321"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"b9a5b4ffe3c87136de4b35f82158f0e691b2a21b","unresolved":false,"context_lines":[{"line_number":56,"context_line":"            def get_value(res, key):"},{"line_number":57,"context_line":"                if isinstance(res, dict):"},{"line_number":58,"context_line":"                    return res.get(key)"},{"line_number":59,"context_line":"                return getattr(res, key, None)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"            for res in resources:"},{"line_number":62,"context_line":"                res_repr \u003d []"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba8a016a_17ba24e2","line":59,"updated":"2015-11-16 16:17:05.000000000","message":"Inner functions have poor performance, so since this function doesn\u0027t use any closure features it should be moved into the ResourceManager class.","commit_id":"443af23046e618be46d2224595064ea06cbdd321"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"33d4113f1b8bcfe790825fee2dcb32a79436fa02","unresolved":false,"context_lines":[{"line_number":56,"context_line":"            def get_value(res, key):"},{"line_number":57,"context_line":"                if isinstance(res, dict):"},{"line_number":58,"context_line":"                    return res.get(key)"},{"line_number":59,"context_line":"                return getattr(res, key, None)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"            for res in resources:"},{"line_number":62,"context_line":"                res_repr \u003d []"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba8a016a_37364804","line":59,"in_reply_to":"ba8a016a_17ba24e2","updated":"2015-11-16 16:26:54.000000000","message":"Sounds reasonable","commit_id":"443af23046e618be46d2224595064ea06cbdd321"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"b9a5b4ffe3c87136de4b35f82158f0e691b2a21b","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                for key in \"id\", \"name\", resource_name:"},{"line_number":64,"context_line":"                    value \u003d get_value(res, key)"},{"line_number":65,"context_line":"                    if value:"},{"line_number":66,"context_line":"                        res_repr.append([key, value])"},{"line_number":67,"context_line":"                if not res_repr:"},{"line_number":68,"context_line":"                    res_repr.append([\"repr\", repr(res)])"},{"line_number":69,"context_line":"                    # raise ValueError(\"Failed to represent resource %r\" % res)"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba8a016a_977cd421","line":66,"updated":"2015-11-16 16:17:05.000000000","message":"Why is this a list instead of a dict? It seems like a dict would be more readable when it was dumped to the end user, and more useful if we wanted to do programmatic tasks as well.","commit_id":"443af23046e618be46d2224595064ea06cbdd321"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"88a152e523426deddb8bb2170534d4aac440bdc1","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                for key in \"id\", \"name\", resource_name:"},{"line_number":64,"context_line":"                    value \u003d get_value(res, key)"},{"line_number":65,"context_line":"                    if value:"},{"line_number":66,"context_line":"                        res_repr.append([key, value])"},{"line_number":67,"context_line":"                if not res_repr:"},{"line_number":68,"context_line":"                    res_repr.append([\"repr\", repr(res)])"},{"line_number":69,"context_line":"                    # raise ValueError(\"Failed to represent resource %r\" % res)"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba8a016a_4cc7c212","line":66,"in_reply_to":"ba8a016a_097c4c71","updated":"2015-11-16 16:59:56.000000000","message":"\u003eThis can not be dict because we need something with strict order\n\ncollections.OrderedDict?","commit_id":"443af23046e618be46d2224595064ea06cbdd321"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"4f126dbd1e8739d4be17153ae2c155a8cb21c119","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                for key in \"id\", \"name\", resource_name:"},{"line_number":64,"context_line":"                    value \u003d get_value(res, key)"},{"line_number":65,"context_line":"                    if value:"},{"line_number":66,"context_line":"                        res_repr.append([key, value])"},{"line_number":67,"context_line":"                if not res_repr:"},{"line_number":68,"context_line":"                    res_repr.append([\"repr\", repr(res)])"},{"line_number":69,"context_line":"                    # raise ValueError(\"Failed to represent resource %r\" % res)"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba8a016a_7ffca63e","line":66,"in_reply_to":"ba8a016a_4cc7c212","updated":"2015-11-16 17:06:39.000000000","message":"No reason to use OrderedDict when we have list. We do not use dict-like stuff like __getattr__(), the only aim is correct str representation","commit_id":"443af23046e618be46d2224595064ea06cbdd321"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"c24fe9f47d11e7b59c0516408c181777ee809716","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                for key in \"id\", \"name\", resource_name:"},{"line_number":64,"context_line":"                    value \u003d get_value(res, key)"},{"line_number":65,"context_line":"                    if value:"},{"line_number":66,"context_line":"                        res_repr.append([key, value])"},{"line_number":67,"context_line":"                if not res_repr:"},{"line_number":68,"context_line":"                    res_repr.append([\"repr\", repr(res)])"},{"line_number":69,"context_line":"                    # raise ValueError(\"Failed to represent resource %r\" % res)"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba8a016a_f8566c05","line":66,"in_reply_to":"ba8a016a_7ffca63e","updated":"2015-11-16 17:48:43.000000000","message":"Could we make this a list of tuples, then? That way it would set()-ify correctly and keep the compare() code simple, but we could also cast it to a dict for output so the string representation would be prettier as well.","commit_id":"443af23046e618be46d2224595064ea06cbdd321"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"33d4113f1b8bcfe790825fee2dcb32a79436fa02","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                for key in \"id\", \"name\", resource_name:"},{"line_number":64,"context_line":"                    value \u003d get_value(res, key)"},{"line_number":65,"context_line":"                    if value:"},{"line_number":66,"context_line":"                        res_repr.append([key, value])"},{"line_number":67,"context_line":"                if not res_repr:"},{"line_number":68,"context_line":"                    res_repr.append([\"repr\", repr(res)])"},{"line_number":69,"context_line":"                    # raise ValueError(\"Failed to represent resource %r\" % res)"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba8a016a_097c4c71","line":66,"in_reply_to":"ba8a016a_977cd421","updated":"2015-11-16 16:26:54.000000000","message":"This can not be dict because we need something with strict order to be sure that comparison will work.\n\nLook at line 247 - we transform list to str representation, so later we use set() to compare result strings. We need to be sure that same resource generates same string, but different order (in dict) can broke that","commit_id":"443af23046e618be46d2224595064ea06cbdd321"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"e5b7f6983c49c455e2d2ad4ec2c7a5bcba65d4ec","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                for key in \"id\", \"name\", resource_name:"},{"line_number":64,"context_line":"                    value \u003d get_value(res, key)"},{"line_number":65,"context_line":"                    if value:"},{"line_number":66,"context_line":"                        res_repr.append([key, value])"},{"line_number":67,"context_line":"                if not res_repr:"},{"line_number":68,"context_line":"                    res_repr.append([\"repr\", repr(res)])"},{"line_number":69,"context_line":"                    # raise ValueError(\"Failed to represent resource %r\" % res)"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba8a016a_57787ef2","line":66,"in_reply_to":"ba8a016a_f8566c05","updated":"2015-11-17 11:34:49.000000000","message":"I will try to convert res_repr to a str with dict-like representation","commit_id":"443af23046e618be46d2224595064ea06cbdd321"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"b9a5b4ffe3c87136de4b35f82158f0e691b2a21b","unresolved":false,"context_lines":[{"line_number":206,"context_line":"class CloudResources(object):"},{"line_number":207,"context_line":"    \"\"\"List and compare cloud resources."},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    resources \u003d CloudResources(uth_url\u003d..., ...)"},{"line_number":210,"context_line":"    saved_list \u003d resources.list()"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    # Do something with the cloud ..."}],"source_content_type":"text/x-python","patch_set":10,"id":"ba8a016a_973ff424","line":209,"updated":"2015-11-16 16:17:05.000000000","message":"s/uth_url/auth_url/","commit_id":"443af23046e618be46d2224595064ea06cbdd321"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"33d4113f1b8bcfe790825fee2dcb32a79436fa02","unresolved":false,"context_lines":[{"line_number":206,"context_line":"class CloudResources(object):"},{"line_number":207,"context_line":"    \"\"\"List and compare cloud resources."},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    resources \u003d CloudResources(uth_url\u003d..., ...)"},{"line_number":210,"context_line":"    saved_list \u003d resources.list()"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    # Do something with the cloud ..."}],"source_content_type":"text/x-python","patch_set":10,"id":"ba8a016a_e99308a2","line":209,"in_reply_to":"ba8a016a_973ff424","updated":"2015-11-16 16:26:54.000000000","message":"Will done","commit_id":"443af23046e618be46d2224595064ea06cbdd321"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"b9a5b4ffe3c87136de4b35f82158f0e691b2a21b","unresolved":false,"context_lines":[{"line_number":236,"context_line":"                    try_s \u003d \"%s (duplicate %i)\" % (s, i)"},{"line_number":237,"context_line":"                s \u003d try_s"},{"line_number":238,"context_line":"            lst_.append(s)"},{"line_number":239,"context_line":"        return lst_"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    def list(self):"},{"line_number":242,"context_line":"        managers_classes \u003d discover.itersubclasses(ResourceManager)"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba8a016a_77e290a1","line":239,"updated":"2015-11-16 16:17:05.000000000","message":"More verbose variable names would make this function much easier to read.","commit_id":"443af23046e618be46d2224595064ea06cbdd321"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"33d4113f1b8bcfe790825fee2dcb32a79436fa02","unresolved":false,"context_lines":[{"line_number":236,"context_line":"                    try_s \u003d \"%s (duplicate %i)\" % (s, i)"},{"line_number":237,"context_line":"                s \u003d try_s"},{"line_number":238,"context_line":"            lst_.append(s)"},{"line_number":239,"context_line":"        return lst_"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    def list(self):"},{"line_number":242,"context_line":"        managers_classes \u003d discover.itersubclasses(ResourceManager)"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba8a016a_a98d007d","line":239,"in_reply_to":"ba8a016a_77e290a1","updated":"2015-11-16 16:26:54.000000000","message":"Will done","commit_id":"443af23046e618be46d2224595064ea06cbdd321"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"b9a5b4ffe3c87136de4b35f82158f0e691b2a21b","unresolved":false,"context_lines":[{"line_number":238,"context_line":"            lst_.append(s)"},{"line_number":239,"context_line":"        return lst_"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    def list(self):"},{"line_number":242,"context_line":"        managers_classes \u003d discover.itersubclasses(ResourceManager)"},{"line_number":243,"context_line":"        resources \u003d []"},{"line_number":244,"context_line":"        for cls in managers_classes:"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba8a016a_17eea48b","line":241,"updated":"2015-11-16 16:17:05.000000000","message":"The name \u0027list\u0027 collides with a builtin.","commit_id":"443af23046e618be46d2224595064ea06cbdd321"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"33d4113f1b8bcfe790825fee2dcb32a79436fa02","unresolved":false,"context_lines":[{"line_number":238,"context_line":"            lst_.append(s)"},{"line_number":239,"context_line":"        return lst_"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    def list(self):"},{"line_number":242,"context_line":"        managers_classes \u003d discover.itersubclasses(ResourceManager)"},{"line_number":243,"context_line":"        resources \u003d []"},{"line_number":244,"context_line":"        for cls in managers_classes:"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba8a016a_a969808d","line":241,"in_reply_to":"ba8a016a_17eea48b","updated":"2015-11-16 16:26:54.000000000","message":"No, because builtins use module namespace, but this method uses instance and class namespaces, so they do not clash. This is reflected in http://docs.openstack.org/developer/hacking/","commit_id":"443af23046e618be46d2224595064ea06cbdd321"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"b4cd792febb865e05b7288326b646e9bd93e4336","unresolved":false,"context_lines":[{"line_number":248,"context_line":"    parser \u003d argparse.ArgumentParser("},{"line_number":249,"context_line":"        description\u003d(\"Save list of OpenStack cloud resources or compare \""},{"line_number":250,"context_line":"                     \"with previously saved list.\"))"},{"line_number":251,"context_line":"    parser.add_argument(\"--credentials\","},{"line_number":252,"context_line":"                        type\u003dargparse.FileType(\"r\"),"},{"line_number":253,"context_line":"                        metavar\u003d\"\u003cpath/to/credentials.json\u003e\","},{"line_number":254,"context_line":"                        help\u003d\"cloud credentials in JSON format\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba8a016a_9ba457ba","line":251,"updated":"2015-11-19 11:35:10.000000000","message":"This script is designed to be used in gates, so the question is \"do we need an ability to specify credentials separately?\"","commit_id":"bd4864dd4857960e999372ef1a2f9ad810fba59e"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"c7fd23e6e4737ce43e07d1320577fd370d6a8094","unresolved":false,"context_lines":[{"line_number":248,"context_line":"    parser \u003d argparse.ArgumentParser("},{"line_number":249,"context_line":"        description\u003d(\"Save list of OpenStack cloud resources or compare \""},{"line_number":250,"context_line":"                     \"with previously saved list.\"))"},{"line_number":251,"context_line":"    parser.add_argument(\"--credentials\","},{"line_number":252,"context_line":"                        type\u003dargparse.FileType(\"r\"),"},{"line_number":253,"context_line":"                        metavar\u003d\"\u003cpath/to/credentials.json\u003e\","},{"line_number":254,"context_line":"                        help\u003d\"cloud credentials in JSON format\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba8a016a_7eeac175","line":251,"in_reply_to":"ba8a016a_9ba457ba","updated":"2015-11-19 11:48:07.000000000","message":"I\u0027ve added this option for 2 purposes:\n\n1. reserved option for usage on gates (we can not relay only on deployment config for default deployment on all possible use cases)\n\n2. someone of us may check resources changes on some (non-default) local environment to find out if there is a resources leak with his/her specific patch set\n\nSo this option looks useful","commit_id":"bd4864dd4857960e999372ef1a2f9ad810fba59e"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"b4cd792febb865e05b7288326b646e9bd93e4336","unresolved":false,"context_lines":[{"line_number":281,"context_line":"        given_list \u003d json.load(args.compare_with_list)"},{"line_number":282,"context_line":"        changes \u003d resources.compare(with_list\u003dgiven_list)"},{"line_number":283,"context_line":"        removed, added \u003d changes"},{"line_number":284,"context_line":"        sys.stdout.write("},{"line_number":285,"context_line":"            json.dumps({\"removed\": removed, \"added\": added}, indent\u003d2))"},{"line_number":286,"context_line":"        if any(changes):"},{"line_number":287,"context_line":"            return 0  # `1\u0027 will fail gate job"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba8a016a_3b1f6b09","line":284,"updated":"2015-11-19 11:35:10.000000000","message":"why not just print?","commit_id":"bd4864dd4857960e999372ef1a2f9ad810fba59e"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"c7fd23e6e4737ce43e07d1320577fd370d6a8094","unresolved":false,"context_lines":[{"line_number":281,"context_line":"        given_list \u003d json.load(args.compare_with_list)"},{"line_number":282,"context_line":"        changes \u003d resources.compare(with_list\u003dgiven_list)"},{"line_number":283,"context_line":"        removed, added \u003d changes"},{"line_number":284,"context_line":"        sys.stdout.write("},{"line_number":285,"context_line":"            json.dumps({\"removed\": removed, \"added\": added}, indent\u003d2))"},{"line_number":286,"context_line":"        if any(changes):"},{"line_number":287,"context_line":"            return 0  # `1\u0027 will fail gate job"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba8a016a_a129ec8b","line":284,"in_reply_to":"ba8a016a_3b1f6b09","updated":"2015-11-19 11:48:07.000000000","message":"Because I didn\u0027t want to import print_function for single usage, and there is already `sys\u0027 module available","commit_id":"bd4864dd4857960e999372ef1a2f9ad810fba59e"}]}
