)]}'
{"tempest/api/orchestration/base.py":[{"author":{"_account_id":6917,"name":"Bartosz Górski","email":"bartosz@codilime.com","username":"bartosz-gorski"},"change_message_id":"7e149e919717c48886a31182de303a802e3d6c34","unresolved":false,"context_lines":[{"line_number":113,"context_line":"    @staticmethod"},{"line_number":114,"context_line":"    def stack_output(stack, output_key):"},{"line_number":115,"context_line":"        \"\"\"Return a stack output value for a give key.\"\"\""},{"line_number":116,"context_line":"        return list(o[\u0027output_value\u0027] for o in stack[\u0027outputs\u0027]"},{"line_number":117,"context_line":"                    if o[\u0027output_key\u0027] \u003d\u003d output_key)[0]"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2FujU%3D","line":116,"updated":"2013-06-24 11:18:41.000000000","message":"Maybe it is better to use next() function with default value to get first matching element of the list? What this function should do when element if not found? Raise an exception or return None? Using next() this code looks like this next((o[\u0027output_value\u0027] for o in stack[\u0027outputs\u0027] if o[\u0027output_key\u0027] \u003d\u003d output_key), None). Also first argument will be a generator instead of whole list. If list is empty then None is returned","commit_id":"ddf91ed0baceb51917df77ff4ad97bd37689228a"}],"tempest/api/orchestration/stacks/test_instance_cfn_init.py":[{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"f9a7de7b8ee312f67fde9b79a95d9be6df1967c5","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class InstanceCfnInitTestJSON(base.BaseOrchestrationTest):"},{"line_number":30,"context_line":"    _interface \u003d \u0027json\u0027"},{"line_number":31,"context_line":"    existing_keypair \u003d (tempest.config.TempestConfig()."},{"line_number":32,"context_line":"                        orchestration.keypair_name is not None)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    template \u003d \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPn%2F%2Fk2Y%3D","line":31,"updated":"2013-06-27 14:29:25.000000000","message":"why do you need to recall TempestConfig() here? Can\u0027t you just use the inherited version? The base test class already does this and by call it again it means that you\u0027ll be parsing the config again.","commit_id":"38d8f09279d099a010741723c17d9f024a187723"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"940c9a6e96c77d20ef4325a06ab9f2a0fc7fc011","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class InstanceCfnInitTestJSON(base.BaseOrchestrationTest):"},{"line_number":30,"context_line":"    _interface \u003d \u0027json\u0027"},{"line_number":31,"context_line":"    existing_keypair \u003d (tempest.config.TempestConfig()."},{"line_number":32,"context_line":"                        orchestration.keypair_name is not None)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    template \u003d \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPn%2F%2FhgA%3D","line":31,"in_reply_to":"AAAAPn%2F%2FjGc%3D","updated":"2013-06-28 15:20:37.000000000","message":"Yep, you\u0027re right I confused existing_keypair here with all the other keypair variables so I just thought you were just using it as a variable.","commit_id":"38d8f09279d099a010741723c17d9f024a187723"},{"author":{"_account_id":4571,"name":"Steve Baker","email":"sbaker@redhat.com","username":"steve-stevebaker"},"change_message_id":"9744c04b6dee55ff3e958263d75d83d76e397b72","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class InstanceCfnInitTestJSON(base.BaseOrchestrationTest):"},{"line_number":30,"context_line":"    _interface \u003d \u0027json\u0027"},{"line_number":31,"context_line":"    existing_keypair \u003d (tempest.config.TempestConfig()."},{"line_number":32,"context_line":"                        orchestration.keypair_name is not None)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    template \u003d \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPn%2F%2FjGc%3D","line":31,"in_reply_to":"AAAAPn%2F%2Fk2Y%3D","updated":"2013-06-28 00:09:01.000000000","message":"Every other use of @testtools.skipIf seems to recall TempestConfig(). It looks like the decorator doesn\u0027t have access to cls or self, and I can\u0027t see a way to reuse the inherited version.","commit_id":"38d8f09279d099a010741723c17d9f024a187723"}],"tempest/services/orchestration/json/orchestration_client.py":[{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"3dbc0d9dfe95889a121c44d502a29dc42a5ca0ec","unresolved":false,"context_lines":[{"line_number":91,"context_line":"            \u0027CREATE_FAILED\u0027,"},{"line_number":92,"context_line":"            \u0027DELETE_FAILED\u0027,"},{"line_number":93,"context_line":"            \u0027UPDATE_FAILED\u0027,"},{"line_number":94,"context_line":"            \u0027ROLLBACK_FAILED\u0027)):"},{"line_number":95,"context_line":"        \"\"\"Waits for a Resource to reach a given status.\"\"\""},{"line_number":96,"context_line":"        resource_status \u003d None"},{"line_number":97,"context_line":"        start \u003d int(time.time())"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2FwXE%3D","line":94,"updated":"2013-06-22 00:39:19.000000000","message":"ok, this must have passed pep8, but that\u0027s the most confusing indentation ever. Can we try an alternate appraoch which is either make the tuple a class or file constant, or some other param indenting that passes pep8 that doesn\u0027t make the 2nd level nest retreat further than the primary)","commit_id":"ddf91ed0baceb51917df77ff4ad97bd37689228a"},{"author":{"_account_id":4571,"name":"Steve Baker","email":"sbaker@redhat.com","username":"steve-stevebaker"},"change_message_id":"096bbb3394e55695687dc8836bc9d65cf6ced82e","unresolved":false,"context_lines":[{"line_number":91,"context_line":"            \u0027CREATE_FAILED\u0027,"},{"line_number":92,"context_line":"            \u0027DELETE_FAILED\u0027,"},{"line_number":93,"context_line":"            \u0027UPDATE_FAILED\u0027,"},{"line_number":94,"context_line":"            \u0027ROLLBACK_FAILED\u0027)):"},{"line_number":95,"context_line":"        \"\"\"Waits for a Resource to reach a given status.\"\"\""},{"line_number":96,"context_line":"        resource_status \u003d None"},{"line_number":97,"context_line":"        start \u003d int(time.time())"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2Fmb8%3D","line":94,"in_reply_to":"AAAAPn%2F%2Fuik%3D","updated":"2013-06-26 22:56:52.000000000","message":"I\u0027ve switched to a regexp based failure check.","commit_id":"ddf91ed0baceb51917df77ff4ad97bd37689228a"},{"author":{"_account_id":6917,"name":"Bartosz Górski","email":"bartosz@codilime.com","username":"bartosz-gorski"},"change_message_id":"7e149e919717c48886a31182de303a802e3d6c34","unresolved":false,"context_lines":[{"line_number":91,"context_line":"            \u0027CREATE_FAILED\u0027,"},{"line_number":92,"context_line":"            \u0027DELETE_FAILED\u0027,"},{"line_number":93,"context_line":"            \u0027UPDATE_FAILED\u0027,"},{"line_number":94,"context_line":"            \u0027ROLLBACK_FAILED\u0027)):"},{"line_number":95,"context_line":"        \"\"\"Waits for a Resource to reach a given status.\"\"\""},{"line_number":96,"context_line":"        resource_status \u003d None"},{"line_number":97,"context_line":"        start \u003d int(time.time())"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2Fuik%3D","line":94,"in_reply_to":"AAAAPn%2F%2FwXE%3D","updated":"2013-06-24 11:18:41.000000000","message":"Also the same tuple is used as default parameter value in two different functions (wait_for_stack_status and wait_for_resource_status). So it is wise to define it as constant value in one place.","commit_id":"ddf91ed0baceb51917df77ff4ad97bd37689228a"},{"author":{"_account_id":6917,"name":"Bartosz Górski","email":"bartosz@codilime.com","username":"bartosz-gorski"},"change_message_id":"7e149e919717c48886a31182de303a802e3d6c34","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        resource_status \u003d None"},{"line_number":97,"context_line":"        start \u003d int(time.time())"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        while resource_status !\u003d status:"},{"line_number":100,"context_line":"            try:"},{"line_number":101,"context_line":"                resp, body \u003d self.get_resource("},{"line_number":102,"context_line":"                    stack_identifier, resource_name)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2FuhE%3D","line":99,"updated":"2013-06-24 11:18:41.000000000","message":"From what I can see this loop will have at most two iteration (because of last command time.sleep(self.build_interval)) or I am wrong? In most cases it will not get the status in the first iteration. So it will sleep for self.build_interval period and in the second iteration it will get status or will be raise Timeout. So maybe better it is to remove loop, sleep and beginning and then try to get status. But this is not time efficient solution. Other solution is to use incremental sleep periods. In first iteration sleep for 1 second, in second 2 seconds, in third 4 seconds and so on. If next sleeping period is longer than left time to timeout then sleep just for left time. It is more time efficient way of waiting.\n\nFor example it build_time out is 10 seconds. In first iteration we sleep for 1 second, in second for 2s, in third for 4s, and in fourth only for  3s (10 - 1 - 2 - 4 \u003d 3).","commit_id":"ddf91ed0baceb51917df77ff4ad97bd37689228a"},{"author":{"_account_id":4571,"name":"Steve Baker","email":"sbaker@redhat.com","username":"steve-stevebaker"},"change_message_id":"096bbb3394e55695687dc8836bc9d65cf6ced82e","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        resource_status \u003d None"},{"line_number":97,"context_line":"        start \u003d int(time.time())"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        while resource_status !\u003d status:"},{"line_number":100,"context_line":"            try:"},{"line_number":101,"context_line":"                resp, body \u003d self.get_resource("},{"line_number":102,"context_line":"                    stack_identifier, resource_name)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2Fmb0%3D","line":99,"in_reply_to":"AAAAPn%2F%2FuhE%3D","updated":"2013-06-26 22:56:52.000000000","message":"I\u0027ve changed this a bit to avoid a sleep on first success.","commit_id":"ddf91ed0baceb51917df77ff4ad97bd37689228a"}]}
