)]}'
{"monasca_tempest_tests/tests/api/base.py":[{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"8bedd6a4866cad6ced7237400aecd407ee964eed","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                for element in elements:"},{"line_number":52,"context_line":"                    id \u003d element[\u0027id\u0027]"},{"line_number":53,"context_line":"                    cls.monasca_client.delete_alarm_definition(id)"},{"line_number":54,"context_line":"        else:"},{"line_number":55,"context_line":"            pass"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        resp, response_body \u003d cls.monasca_client.list_notification_methods()"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa80f949_95e7df3f","line":54,"updated":"2015-11-04 03:07:52.000000000","message":"You don\u0027t actually need the else statement here and in the block below unless you\u0027re planning on filling them out later.","commit_id":"dee1554858aa119541ded0a537a92d7d45d158c2"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"860cf24b715f11cdf1d1de75a8e5dc807bcca2a8","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        resp, response_body \u003d cls.monasca_client.list_alarm_definitions()"},{"line_number":48,"context_line":"        if type(response_body) is dict:"},{"line_number":49,"context_line":"            elements \u003d response_body[\u0027elements\u0027]"},{"line_number":50,"context_line":"            if elements:"},{"line_number":51,"context_line":"                for element in elements:"},{"line_number":52,"context_line":"                    id \u003d element[\u0027id\u0027]"},{"line_number":53,"context_line":"                    cls.monasca_client.delete_alarm_definition(id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_8d27bd11","line":50,"updated":"2015-11-04 16:24:06.000000000","message":"So, first  you check to see that you have a valid dict, and then get elements, and then check if you have elements.\n\nIf you are trying to check if elements is in the response body I think you might want to do something like this\n\nif resp \u003d\u003d 200:\n    if \u0027elements\u0027 in response_body:\n        elements \u003d response_body[\u0027elements\u0027]","commit_id":"39816528f763f6fc2318910479fde8e44d0f597f"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"860cf24b715f11cdf1d1de75a8e5dc807bcca2a8","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        resp, response_body \u003d cls.monasca_client.list_notification_methods()"},{"line_number":56,"context_line":"        if type(response_body) is dict:"},{"line_number":57,"context_line":"            elements \u003d response_body[\u0027elements\u0027]"},{"line_number":58,"context_line":"            if elements:"},{"line_number":59,"context_line":"                for element in elements:"},{"line_number":60,"context_line":"                    id \u003d element[\u0027id\u0027]"},{"line_number":61,"context_line":"                    cls.monasca_client.delete_notification_method(id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_8d6edd2d","line":58,"updated":"2015-11-04 16:24:06.000000000","message":"Same comment as above.","commit_id":"39816528f763f6fc2318910479fde8e44d0f597f"}],"monasca_tempest_tests/tests/api/test_measurements.py":[{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"0c217eded3633a976d4fad15e351ae7dd96443b2","unresolved":false,"context_lines":[{"line_number":45,"context_line":"            metrics.append(metric)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        cls.monasca_client.create_metrics(metrics)"},{"line_number":48,"context_line":"        time.sleep(WAIT_TIME)"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        cls._start_timestamp \u003d start_timestamp"},{"line_number":51,"context_line":"        cls._end_timestamp \u003d end_timestamp"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_ed0f6986","line":48,"updated":"2015-11-04 16:17:22.000000000","message":"Can we get rid of the time.sleep in these tests? We should be able to submit a bunch of metrics all at once and just use them for all the tests.","commit_id":"39816528f763f6fc2318910479fde8e44d0f597f"},{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"1c4a1a41c45a7d1d75a281cb9ddc059ca3c26f34","unresolved":false,"context_lines":[{"line_number":45,"context_line":"            metrics.append(metric)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        cls.monasca_client.create_metrics(metrics)"},{"line_number":48,"context_line":"        time.sleep(WAIT_TIME)"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        cls._start_timestamp \u003d start_timestamp"},{"line_number":51,"context_line":"        cls._end_timestamp \u003d end_timestamp"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_b047781c","line":48,"in_reply_to":"fa80f949_4dab151e","updated":"2015-11-04 16:29:38.000000000","message":"Yes, sorry. I should have been more clear, I meant I would prefer if we only had to wait once for the initial setup, rather than waiting in each test.","commit_id":"39816528f763f6fc2318910479fde8e44d0f597f"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"860cf24b715f11cdf1d1de75a8e5dc807bcca2a8","unresolved":false,"context_lines":[{"line_number":45,"context_line":"            metrics.append(metric)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        cls.monasca_client.create_metrics(metrics)"},{"line_number":48,"context_line":"        time.sleep(WAIT_TIME)"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        cls._start_timestamp \u003d start_timestamp"},{"line_number":51,"context_line":"        cls._end_timestamp \u003d end_timestamp"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_4dab151e","line":48,"in_reply_to":"fa80f949_ed0f6986","updated":"2015-11-04 16:24:06.000000000","message":"A couple of things:\n\n1. The metrics take some time to propogate through the system, so we have to wait. Rather than waiting to whatever WAIT_TIME is set too, we could just query the measurements once a second and guarantee that we\u0027ve received all the  measurements that we\u0027ve set, which should end quicker.\n\n2. Also agree that we should try to set-up the measurements once for all the tests and re-use as much as possible since waiting for the measurements to get in the system takes a while.","commit_id":"39816528f763f6fc2318910479fde8e44d0f597f"}]}
