)]}'
{"openstack/resource.py":[{"author":{"_account_id":8246,"name":"Qiming Teng","email":"tengqm@outlook.com","username":"tengqm"},"change_message_id":"d640ec1c5c404ad4256593a5e7478ccd01d7c8c9","unresolved":false,"context_lines":[{"line_number":922,"context_line":"        # necessitate multiple requests, but this naieve approach works for"},{"line_number":923,"context_line":"        # the general case that resources don\u0027t support query params for"},{"line_number":924,"context_line":"        # both id and name. If a particular Resource can benefit from query"},{"line_number":925,"context_line":"        # params, it can override this method."},{"line_number":926,"context_line":"        data \u003d list(cls.list(session, path_args\u003dpath_args))"},{"line_number":927,"context_line":""},{"line_number":928,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_8f2449c5","line":925,"updated":"2015-08-20 06:44:54.000000000","message":"\"if a particular resource can benefit from query params, it can override this method.\" \n\nThis is not a simple method for overriding. How about adding a simpler method (e.g. _list_for_find() or _list_with_params() ) for this purpose?\n\nYes, there are many cases where query by name is not supported. Maybe we can treat it as something those services will improve over time?","commit_id":"04efeb83a450e76bf84db8026629786efe50ce48"},{"author":{"_account_id":8257,"name":"Brian Curtin","email":"brian@python.org","username":"briancurtin"},"change_message_id":"af5ba6369965d787074e49567182174b1c9e8e9a","unresolved":false,"context_lines":[{"line_number":922,"context_line":"        # necessitate multiple requests, but this naieve approach works for"},{"line_number":923,"context_line":"        # the general case that resources don\u0027t support query params for"},{"line_number":924,"context_line":"        # both id and name. If a particular Resource can benefit from query"},{"line_number":925,"context_line":"        # params, it can override this method."},{"line_number":926,"context_line":"        data \u003d list(cls.list(session, path_args\u003dpath_args))"},{"line_number":927,"context_line":""},{"line_number":928,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_91977947","line":925,"in_reply_to":"fa1b9901_8f2449c5","updated":"2015-08-20 14:23:59.000000000","message":"It\u0027s not a simple thing, so I don\u0027t think we can make it as such, and this is about the 4th attempt we\u0027ve made at getting find to work, and there were many other attempts that never ended up as reviews here because they didn\u0027t work well enough. Any override will have to be exactly specific to how that service\u0027s resource works, so there really can\u0027t be any catch-all or generic situations here.\n\nFor example, find_server was working before all of this, but only because it accepts a name\u003d query param. It doesn\u0027t accept an id\u003d query param (from what I can tell), but it was working through id searches via get_by_id. However, find_extension wasn\u0027t working at all because allow_retrieve wasn\u0027t set, so it was failing on id\u003d and then failing on name\u003d queries. If we wanted to provide a specialization, it would only ever try params we know will work.\n\nIf those services want to improve what they support over time, which I believe has some effort going on in a cross-project thing, they can do it and we can revisit the issue then. For now we just have to work with what is provided, which isn\u0027t a whole lot.","commit_id":"04efeb83a450e76bf84db8026629786efe50ce48"},{"author":{"_account_id":8246,"name":"Qiming Teng","email":"tengqm@outlook.com","username":"tengqm"},"change_message_id":"e4df1741c2c91049ce99b1b46fe0ea53f7641981","unresolved":false,"context_lines":[{"line_number":922,"context_line":"        # necessitate multiple requests, but this naieve approach works for"},{"line_number":923,"context_line":"        # the general case that resources don\u0027t support query params for"},{"line_number":924,"context_line":"        # both id and name. If a particular Resource can benefit from query"},{"line_number":925,"context_line":"        # params, it can override this method."},{"line_number":926,"context_line":"        data \u003d list(cls.list(session, path_args\u003dpath_args))"},{"line_number":927,"context_line":""},{"line_number":928,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_4f49385f","line":925,"in_reply_to":"fa1b9901_91977947","updated":"2015-08-20 14:47:47.000000000","message":"thanks for the explanation.","commit_id":"04efeb83a450e76bf84db8026629786efe50ce48"},{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"6e52b7f3a3d27889440a1aaf52ae7fa95fd58366","unresolved":false,"context_lines":[{"line_number":923,"context_line":"        # the general case that resources don\u0027t support query params for"},{"line_number":924,"context_line":"        # both id and name. If a particular Resource can benefit from query"},{"line_number":925,"context_line":"        # params, it can override this method."},{"line_number":926,"context_line":"        data \u003d list(cls.list(session, path_args\u003dpath_args))"},{"line_number":927,"context_line":""},{"line_number":928,"context_line":"        try:"},{"line_number":929,"context_line":"            result \u003d get_one_match(data, cls.id_attribute, False)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_3e70f1a3","line":926,"updated":"2015-08-25 15:01:37.000000000","message":"Can we just open a bug or something that this is going to blow up for any long list.  The old way we were passing the generator so it wouldn\u0027t bring every resource into memory.  It would be a lot better if get_one_match looked at name and id at the same time.  Maybe get_one_match should just be a private method of resource.\n\nAnyway, I could live with working and inefficient if we have a bug.","commit_id":"d043cdc3248ffd51f07cbbfb6cf4f41f44c44c12"},{"author":{"_account_id":8257,"name":"Brian Curtin","email":"brian@python.org","username":"briancurtin"},"change_message_id":"373a731e8bd0a2e7f72fb7c810e07affc477b523","unresolved":false,"context_lines":[{"line_number":923,"context_line":"        # the general case that resources don\u0027t support query params for"},{"line_number":924,"context_line":"        # both id and name. If a particular Resource can benefit from query"},{"line_number":925,"context_line":"        # params, it can override this method."},{"line_number":926,"context_line":"        data \u003d list(cls.list(session, path_args\u003dpath_args))"},{"line_number":927,"context_line":""},{"line_number":928,"context_line":"        try:"},{"line_number":929,"context_line":"            result \u003d get_one_match(data, cls.id_attribute, False)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_c52c79ae","line":926,"in_reply_to":"fa1b9901_3e70f1a3","updated":"2015-08-25 17:10:46.000000000","message":"The latest implementation goes back to using a generator and does so with one loop over the results instead of the previous implementations that did two. It just checks both name and id attributes at the same time now instead of looping separately.","commit_id":"d043cdc3248ffd51f07cbbfb6cf4f41f44c44c12"}],"openstack/tests/functional/compute/v2/test_server.py":[{"author":{"_account_id":8246,"name":"Qiming Teng","email":"tengqm@outlook.com","username":"tengqm"},"change_message_id":"d640ec1c5c404ad4256593a5e7478ccd01d7c8c9","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        self.assertEqual(self.server.id, sot.id)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def test_find_no_match_ignore_true(self):"},{"line_number":70,"context_line":"        sot \u003d self.conn.compute.find_server(uuid.uuid4().hex,"},{"line_number":71,"context_line":"                                            ignore_missing\u003dTrue)"},{"line_number":72,"context_line":"        self.assertIsNone(sot)"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_1a7b998d","line":70,"updated":"2015-08-20 06:44:54.000000000","message":"for nova, the id is str(uuid.uuid4()), not uuid.uuid4().hex.","commit_id":"04efeb83a450e76bf84db8026629786efe50ce48"},{"author":{"_account_id":8257,"name":"Brian Curtin","email":"brian@python.org","username":"briancurtin"},"change_message_id":"09e23a312c1db0dad46861fd56cd94d57bbcbf9d","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        self.assertEqual(self.server.id, sot.id)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def test_find_no_match_ignore_true(self):"},{"line_number":70,"context_line":"        sot \u003d self.conn.compute.find_server(uuid.uuid4().hex,"},{"line_number":71,"context_line":"                                            ignore_missing\u003dTrue)"},{"line_number":72,"context_line":"        self.assertIsNone(sot)"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_25dae34c","line":70,"in_reply_to":"fa1b9901_1a7b998d","updated":"2015-08-20 15:15:55.000000000","message":"Patch Set 2 changes this one to a different string that should be more clear.","commit_id":"04efeb83a450e76bf84db8026629786efe50ce48"},{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"6e52b7f3a3d27889440a1aaf52ae7fa95fd58366","unresolved":false,"context_lines":[{"line_number":81,"context_line":"                                              flavor\u003dself.flavor,"},{"line_number":82,"context_line":"                                              image\u003dself.image.id,"},{"line_number":83,"context_line":"                                              networks\u003d[{\"uuid\":"},{"line_number":84,"context_line":"                                                         self.network.id}])"},{"line_number":85,"context_line":"        self.conn.compute.wait_for_server(sot)"},{"line_number":86,"context_line":"        self.servers.append(sot)"},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_7e8e692f","line":84,"updated":"2015-08-25 15:01:37.000000000","message":"I\u0027m pretty sure our gate can only fire up two servers max and that is sketchy.  Is there any way we could test find with some other resource?  The test fails here because this is the third server and it doesn\u0027t transition to ACTIVE.  There are a lot of things that don\u0027t take up much ram on the gate like an image with no data, network, maybe something like identity/user.\n\nThe orchestration tests fire up a server as well.","commit_id":"d043cdc3248ffd51f07cbbfb6cf4f41f44c44c12"},{"author":{"_account_id":8257,"name":"Brian Curtin","email":"brian@python.org","username":"briancurtin"},"change_message_id":"373a731e8bd0a2e7f72fb7c810e07affc477b523","unresolved":false,"context_lines":[{"line_number":81,"context_line":"                                              flavor\u003dself.flavor,"},{"line_number":82,"context_line":"                                              image\u003dself.image.id,"},{"line_number":83,"context_line":"                                              networks\u003d[{\"uuid\":"},{"line_number":84,"context_line":"                                                         self.network.id}])"},{"line_number":85,"context_line":"        self.conn.compute.wait_for_server(sot)"},{"line_number":86,"context_line":"        self.servers.append(sot)"},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_c555591e","line":84,"in_reply_to":"fa1b9901_7e8e692f","updated":"2015-08-25 17:10:46.000000000","message":"I switched to testing on find_flavor","commit_id":"d043cdc3248ffd51f07cbbfb6cf4f41f44c44c12"}]}
