)]}'
{"keystoneclient/tests/unit/v3/test_limits.py":[{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"b4b5a7ded046f8a78a7fcd289f74ce873aeff1a5","unresolved":false,"context_lines":[{"line_number":25,"context_line":"        self.manager \u003d self.client.limits"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    def new_ref(self, **kwargs):"},{"line_number":28,"context_line":"        kwargs \u003d super(LimitTests, self).new_ref(**kwargs)"},{"line_number":29,"context_line":"        kwargs.setdefault(\u0027project_id\u0027, uuid.uuid4().hex)"},{"line_number":30,"context_line":"        kwargs.setdefault(\u0027service_id\u0027, uuid.uuid4().hex)"},{"line_number":31,"context_line":"        kwargs.setdefault(\u0027resource_name\u0027, uuid.uuid4().hex)"},{"line_number":32,"context_line":"        kwargs.setdefault(\u0027resource_limit\u0027, 15)"},{"line_number":33,"context_line":"        kwargs.setdefault(\u0027description\u0027, uuid.uuid4().hex)"},{"line_number":34,"context_line":"        return kwargs"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def test_create(self):"},{"line_number":37,"context_line":"        # This test overrides the generic test case provided by the CrudTests"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_1b242360","line":34,"range":{"start_line":28,"start_character":0,"end_line":34,"end_character":21},"updated":"2018-06-14 17:26:22.000000000","message":"[NIT] typically I don\u0027t like this method, for future reference, use:\n\n    def new_ref(self, **kwargs):\n       ref \u003d {\n           \u0027project_id\u0027: uuid.uuid4().hex,\n           \u0027service_id\u0027: uuid.uuid4().hex,                   \n           \u0027resource_name\u0027: uuid.uuid4().hex,\n           \u0027resource_limit\u0027: uuid.uuid4().hex,\n           \u0027description\u0027: uuid.uuid4().hex}\n       ref.update(kwargs)\n       return ref","commit_id":"2d75858284d9fe967536d91b845dfba0c1c07bf3"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"6aac72aeb91a482c422de4747a45820626746d21","unresolved":false,"context_lines":[{"line_number":25,"context_line":"        self.manager \u003d self.client.limits"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    def new_ref(self, **kwargs):"},{"line_number":28,"context_line":"        kwargs \u003d super(LimitTests, self).new_ref(**kwargs)"},{"line_number":29,"context_line":"        kwargs.setdefault(\u0027project_id\u0027, uuid.uuid4().hex)"},{"line_number":30,"context_line":"        kwargs.setdefault(\u0027service_id\u0027, uuid.uuid4().hex)"},{"line_number":31,"context_line":"        kwargs.setdefault(\u0027resource_name\u0027, uuid.uuid4().hex)"},{"line_number":32,"context_line":"        kwargs.setdefault(\u0027resource_limit\u0027, 15)"},{"line_number":33,"context_line":"        kwargs.setdefault(\u0027description\u0027, uuid.uuid4().hex)"},{"line_number":34,"context_line":"        return kwargs"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def test_create(self):"},{"line_number":37,"context_line":"        # This test overrides the generic test case provided by the CrudTests"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_9e034111","line":34,"range":{"start_line":28,"start_character":0,"end_line":34,"end_character":21},"in_reply_to":"5f7c97a3_1b242360","updated":"2018-06-14 18:36:03.000000000","message":"Just because it\u0027s not as clear?","commit_id":"2d75858284d9fe967536d91b845dfba0c1c07bf3"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"b4b5a7ded046f8a78a7fcd289f74ce873aeff1a5","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        expected_limit \u003d req_ref.pop()"},{"line_number":55,"context_line":"        for attr in expected_limit:"},{"line_number":56,"context_line":"            self.assertEqual("},{"line_number":57,"context_line":"                getattr(returned, attr),"},{"line_number":58,"context_line":"                expected_limit[attr],"},{"line_number":59,"context_line":"                \u0027Expected different %s\u0027 % attr)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_5bcffb8a","line":56,"range":{"start_line":56,"start_character":12,"end_line":56,"end_character":29},"updated":"2018-06-14 17:26:22.000000000","message":"Don\u0027t use self.assertEqual for dictionary comparisons, use `assertDictEqual`, this will save you headaches.","commit_id":"2d75858284d9fe967536d91b845dfba0c1c07bf3"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"e585b19ad3b9b2e76cd5c0dadb0e06383e43f059","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        expected_limit \u003d req_ref.pop()"},{"line_number":55,"context_line":"        for attr in expected_limit:"},{"line_number":56,"context_line":"            self.assertEqual("},{"line_number":57,"context_line":"                getattr(returned, attr),"},{"line_number":58,"context_line":"                expected_limit[attr],"},{"line_number":59,"context_line":"                \u0027Expected different %s\u0027 % attr)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_3b01df6b","line":56,"range":{"start_line":56,"start_character":12,"end_line":56,"end_character":29},"in_reply_to":"5f7c97a3_5bcffb8a","updated":"2018-06-14 17:31:19.000000000","message":"Ah, Strike this comment, not relevant, sorry!","commit_id":"2d75858284d9fe967536d91b845dfba0c1c07bf3"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"b4b5a7ded046f8a78a7fcd289f74ce873aeff1a5","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    def test_list_filter_by_service(self):"},{"line_number":63,"context_line":"        service_id \u003d uuid.uuid4().hex"},{"line_number":64,"context_line":"        expected_query \u003d {\u0027service_id\u0027: service_id}"},{"line_number":65,"context_line":"        super(LimitTests, self).test_list("},{"line_number":66,"context_line":"            expected_query\u003dexpected_query, service\u003dservice_id"},{"line_number":67,"context_line":"        )"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def test_list_filtered_by_resource_name(self):"},{"line_number":70,"context_line":"        resource_name \u003d uuid.uuid4().hex"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_7bd43720","line":67,"range":{"start_line":65,"start_character":7,"end_line":67,"end_character":9},"updated":"2018-06-14 17:26:22.000000000","message":"Why are you calling super() here instead of just self.test_list(), is there an MRO issue?","commit_id":"2d75858284d9fe967536d91b845dfba0c1c07bf3"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"c8975cedb0ed1c2e7f566a2c58beb3c32d20a4f3","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    def test_list_filter_by_service(self):"},{"line_number":63,"context_line":"        service_id \u003d uuid.uuid4().hex"},{"line_number":64,"context_line":"        expected_query \u003d {\u0027service_id\u0027: service_id}"},{"line_number":65,"context_line":"        super(LimitTests, self).test_list("},{"line_number":66,"context_line":"            expected_query\u003dexpected_query, service\u003dservice_id"},{"line_number":67,"context_line":"        )"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def test_list_filtered_by_resource_name(self):"},{"line_number":70,"context_line":"        resource_name \u003d uuid.uuid4().hex"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_09a859d7","line":67,"range":{"start_line":65,"start_character":7,"end_line":67,"end_character":9},"in_reply_to":"5f7c97a3_3ed22dd3","updated":"2018-06-14 18:38:37.000000000","message":"Done","commit_id":"2d75858284d9fe967536d91b845dfba0c1c07bf3"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"8b99b541dfe2bf9f9657e4e4649bf8de8c6158c3","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    def test_list_filter_by_service(self):"},{"line_number":63,"context_line":"        service_id \u003d uuid.uuid4().hex"},{"line_number":64,"context_line":"        expected_query \u003d {\u0027service_id\u0027: service_id}"},{"line_number":65,"context_line":"        super(LimitTests, self).test_list("},{"line_number":66,"context_line":"            expected_query\u003dexpected_query, service\u003dservice_id"},{"line_number":67,"context_line":"        )"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def test_list_filtered_by_resource_name(self):"},{"line_number":70,"context_line":"        resource_name \u003d uuid.uuid4().hex"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_3ed22dd3","line":67,"range":{"start_line":65,"start_character":7,"end_line":67,"end_character":9},"in_reply_to":"5f7c97a3_7bd43720","updated":"2018-06-14 18:23:03.000000000","message":"There isn\u0027t. The first iteration of these tests I was treating it as an override.","commit_id":"2d75858284d9fe967536d91b845dfba0c1c07bf3"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"b4b5a7ded046f8a78a7fcd289f74ce873aeff1a5","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def test_list_filtered_by_resource_name(self):"},{"line_number":70,"context_line":"        resource_name \u003d uuid.uuid4().hex"},{"line_number":71,"context_line":"        super(LimitTests, self).test_list(resource_name\u003dresource_name)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def test_list_filtered_by_region(self):"},{"line_number":74,"context_line":"        region_id \u003d uuid.uuid4().hex"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_dbe22b03","line":71,"range":{"start_line":71,"start_character":0,"end_line":71,"end_character":70},"updated":"2018-06-14 17:26:22.000000000","message":"Same question as above.","commit_id":"2d75858284d9fe967536d91b845dfba0c1c07bf3"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"c8975cedb0ed1c2e7f566a2c58beb3c32d20a4f3","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def test_list_filtered_by_resource_name(self):"},{"line_number":70,"context_line":"        resource_name \u003d uuid.uuid4().hex"},{"line_number":71,"context_line":"        super(LimitTests, self).test_list(resource_name\u003dresource_name)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def test_list_filtered_by_region(self):"},{"line_number":74,"context_line":"        region_id \u003d uuid.uuid4().hex"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_e9aabdd1","line":71,"range":{"start_line":71,"start_character":0,"end_line":71,"end_character":70},"in_reply_to":"5f7c97a3_dbe22b03","updated":"2018-06-14 18:38:37.000000000","message":"Done","commit_id":"2d75858284d9fe967536d91b845dfba0c1c07bf3"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"b4b5a7ded046f8a78a7fcd289f74ce873aeff1a5","unresolved":false,"context_lines":[{"line_number":73,"context_line":"    def test_list_filtered_by_region(self):"},{"line_number":74,"context_line":"        region_id \u003d uuid.uuid4().hex"},{"line_number":75,"context_line":"        expected_query \u003d {\u0027region_id\u0027: region_id}"},{"line_number":76,"context_line":"        super(LimitTests, self).test_list("},{"line_number":77,"context_line":"            expected_query\u003dexpected_query, region\u003dregion_id"},{"line_number":78,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_9becb3f5","line":78,"range":{"start_line":76,"start_character":8,"end_line":78,"end_character":9},"updated":"2018-06-14 17:26:22.000000000","message":"Same question as above.","commit_id":"2d75858284d9fe967536d91b845dfba0c1c07bf3"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"c8975cedb0ed1c2e7f566a2c58beb3c32d20a4f3","unresolved":false,"context_lines":[{"line_number":73,"context_line":"    def test_list_filtered_by_region(self):"},{"line_number":74,"context_line":"        region_id \u003d uuid.uuid4().hex"},{"line_number":75,"context_line":"        expected_query \u003d {\u0027region_id\u0027: region_id}"},{"line_number":76,"context_line":"        super(LimitTests, self).test_list("},{"line_number":77,"context_line":"            expected_query\u003dexpected_query, region\u003dregion_id"},{"line_number":78,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_a9b4c537","line":78,"range":{"start_line":76,"start_character":8,"end_line":78,"end_character":9},"in_reply_to":"5f7c97a3_9becb3f5","updated":"2018-06-14 18:38:37.000000000","message":"Done","commit_id":"2d75858284d9fe967536d91b845dfba0c1c07bf3"}],"keystoneclient/v3/limits.py":[{"author":{"_account_id":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"},"change_message_id":"07032d0a4663af00daa746667fbe3c73d750e979","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        if limit:"},{"line_number":147,"context_line":"            limit_id \u003d base.getid(limit)"},{"line_number":148,"context_line":"        else:"},{"line_number":149,"context_line":"            limit_id \u003d id"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        url \u003d \u0027%s/%s\u0027 % (self.collection_key, limit_id)"},{"line_number":152,"context_line":"        return self.client.delete(url)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_4fbc4cba","line":149,"updated":"2018-06-12 18:54:12.000000000","message":"Throw an error when both limit and id are None.","commit_id":"6318cd3ee9c2881729829c0a1305c54c369b4b98"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"4cd4dafbc839c0708707feeb5e5d2f58dc435a9e","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        if limit:"},{"line_number":147,"context_line":"            limit_id \u003d base.getid(limit)"},{"line_number":148,"context_line":"        else:"},{"line_number":149,"context_line":"            limit_id \u003d id"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        url \u003d \u0027%s/%s\u0027 % (self.collection_key, limit_id)"},{"line_number":152,"context_line":"        return self.client.delete(url)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_8f47c4a3","line":149,"in_reply_to":"5f7c97a3_4fbc4cba","updated":"2018-06-12 18:58:42.000000000","message":"++ \n\nI actually reworked this a bit to just require limit instead of limit or id. Mainly because we have the ability to use base.getid(limit) to handle either input.","commit_id":"6318cd3ee9c2881729829c0a1305c54c369b4b98"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"1b82cae0fa9235f7ce7cfcfcfb303e70b87b5c54","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        :param project: the project to create a limit for."},{"line_number":45,"context_line":"        :type project: str or :class:`keystoneclient.v3.projects.Project`"},{"line_number":46,"context_line":"        :param service: the service that owns the resource to limit."},{"line_number":47,"context_line":"        :type service: str or :class:`keystoneclient.v3.services.Service`"},{"line_number":48,"context_line":"        :param resource_name: the name of the resource to limit"},{"line_number":49,"context_line":"        :type resource_name: str"},{"line_number":50,"context_line":"        :param resource_limit: the quantity of the limit"},{"line_number":51,"context_line":"        :type resource_limit: int"},{"line_number":52,"context_line":"        :param description: a description of the limit"},{"line_number":53,"context_line":"        :type description: str"},{"line_number":54,"context_line":"        :param region: region the limit applies to"},{"line_number":55,"context_line":"        :type region: str or :class:`keystoneclient.v3.regions.Region`"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        :returns: a reference of the created limit"},{"line_number":58,"context_line":"        :rtype: :class:`keystoneclient.v3.limits.Limit`"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_3bfa71b9","line":55,"range":{"start_line":46,"start_character":0,"end_line":55,"end_character":70},"updated":"2018-06-12 22:13:46.000000000","message":"I realized when writing the client stuff that this duplicates of a lot of the registered limit work... \n\nI wonder if it would make sense to change the project specific limits API to just accept a registered limit ID, a project, and the resource limit override?","commit_id":"7903c5da040474b2fbb065b82e76cb6d37fe1876"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"e5c6eb26d268346162d7c036fec8ddad796f152e","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        :param project: the project to create a limit for."},{"line_number":45,"context_line":"        :type project: str or :class:`keystoneclient.v3.projects.Project`"},{"line_number":46,"context_line":"        :param service: the service that owns the resource to limit."},{"line_number":47,"context_line":"        :type service: str or :class:`keystoneclient.v3.services.Service`"},{"line_number":48,"context_line":"        :param resource_name: the name of the resource to limit"},{"line_number":49,"context_line":"        :type resource_name: str"},{"line_number":50,"context_line":"        :param resource_limit: the quantity of the limit"},{"line_number":51,"context_line":"        :type resource_limit: int"},{"line_number":52,"context_line":"        :param description: a description of the limit"},{"line_number":53,"context_line":"        :type description: str"},{"line_number":54,"context_line":"        :param region: region the limit applies to"},{"line_number":55,"context_line":"        :type region: str or :class:`keystoneclient.v3.regions.Region`"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        :returns: a reference of the created limit"},{"line_number":58,"context_line":"        :rtype: :class:`keystoneclient.v3.limits.Limit`"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_bbe9a17f","line":55,"range":{"start_line":46,"start_character":0,"end_line":55,"end_character":70},"in_reply_to":"5f7c97a3_3bfa71b9","updated":"2018-06-12 22:32:42.000000000","message":"For example - http://paste.openstack.org/raw/723353/","commit_id":"7903c5da040474b2fbb065b82e76cb6d37fe1876"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"7cc848992856cfb00687e026fd3eb0c97a52bc01","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            resource_limit\u003dresource_limit,"},{"line_number":97,"context_line":"            description\u003ddescription,"},{"line_number":98,"context_line":"            **kwargs"},{"line_number":99,"context_line":"        )"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def get(self, limit):"},{"line_number":102,"context_line":"        \"\"\"Retrieve a project limit."}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_0b470d4e","line":99,"updated":"2018-06-13 16:34:35.000000000","message":"Looking at the API reference and code for project limits, it\u0027s only possible to update the resource_limit and the description. Everything else is tightly coupled to the registered limit.\n\nMaybe we shouldn\u0027t expose things in the client that we can\u0027t actually update (e.g. project_id, resource_name, etc...)","commit_id":"7903c5da040474b2fbb065b82e76cb6d37fe1876"}]}
