)]}'
{"rally_openstack/scenarios/grafana/metrics.py":[{"author":{"_account_id":26025,"name":"chenxu","email":"xuchen1990xx@gmail.com","username":"chenxu"},"change_message_id":"9740f141e9eefb9e7e2b9acf8ef173f9ea45934d","unresolved":false,"context_lines":[{"line_number":59,"context_line":"            LOG.info(\"Server %s with pushing metric script is \""},{"line_number":60,"context_line":"                     \"active\" % seed)"},{"line_number":61,"context_line":"        else:"},{"line_number":62,"context_line":"            subprocess.check_output([\"bash\", \"-c\", push_cmd])"},{"line_number":63,"context_line":"            LOG.info(\"Metric pushed locally\")"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _check_metric(self, seed, monitor_vip, grafana, datasource_id,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_b3c12a83","line":62,"range":{"start_line":62,"start_character":12,"end_line":62,"end_character":61},"updated":"2018-04-19 15:08:12.000000000","message":"if using \u0027push_cmd\u0027, will the push_cmd  mismatch the check_cmd because of the random name \u0027seed\u0027 ?","commit_id":"4512bcc202d69e3bc6148c2575a9b54c2f760f75"},{"author":{"_account_id":26025,"name":"chenxu","email":"xuchen1990xx@gmail.com","username":"chenxu"},"change_message_id":"b32a9809b1ab32ff90f62753ea4166616a296c2c","unresolved":false,"context_lines":[{"line_number":59,"context_line":"            LOG.info(\"Server %s with pushing metric script is \""},{"line_number":60,"context_line":"                     \"active\" % seed)"},{"line_number":61,"context_line":"        else:"},{"line_number":62,"context_line":"            subprocess.check_output([\"bash\", \"-c\", push_cmd])"},{"line_number":63,"context_line":"            LOG.info(\"Metric pushed locally\")"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _check_metric(self, seed, monitor_vip, grafana, datasource_id,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_b2733216","line":62,"range":{"start_line":62,"start_character":12,"end_line":62,"end_character":61},"in_reply_to":"9f6a8fd7_5ae1a429","updated":"2018-04-22 14:40:18.000000000","message":"ok got it. Thanks for your explanation.","commit_id":"4512bcc202d69e3bc6148c2575a9b54c2f760f75"},{"author":{"_account_id":13009,"name":"Peter Razumovsky","email":"prazumovsky@mirantis.com","username":"prazumovsky"},"change_message_id":"9c4c997bfc63d74019b0d1babd43a688637bdb77","unresolved":false,"context_lines":[{"line_number":59,"context_line":"            LOG.info(\"Server %s with pushing metric script is \""},{"line_number":60,"context_line":"                     \"active\" % seed)"},{"line_number":61,"context_line":"        else:"},{"line_number":62,"context_line":"            subprocess.check_output([\"bash\", \"-c\", push_cmd])"},{"line_number":63,"context_line":"            LOG.info(\"Metric pushed locally\")"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _check_metric(self, seed, monitor_vip, grafana, datasource_id,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_5ae1a429","line":62,"range":{"start_line":62,"start_character":12,"end_line":62,"end_character":61},"in_reply_to":"9f6a8fd7_b3c12a83","updated":"2018-04-20 13:19:20.000000000","message":"What do you mean? Push cmd curl pushgateway with adding new metric with random name. Check cmd curl grafana datasource (this datasource related to prometheus) that such metric with this random name stored in prometheus. seed for push_cmd and check_cmd is the same.","commit_id":"4512bcc202d69e3bc6148c2575a9b54c2f760f75"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"4b43e2abc683bef4ea3ee280e4dde2a810cfa69c","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _check_metric(self, seed, monitor_vip, grafana, datasource_id,"},{"line_number":66,"context_line":"                      retries_total):"},{"line_number":67,"context_line":"        check_cmd \u003d ("},{"line_number":68,"context_line":"            \"curl -s -u \u0027%(user)s:%(pass)s\u0027 \u0027http://%(vip)s:%(port)s/api\""},{"line_number":69,"context_line":"            \"/datasources/proxy/:%(datasource)s/api/v1\""},{"line_number":70,"context_line":"            \"/query?query\u003drally_test_metric_%(seed)s\u0027\" % {"},{"line_number":71,"context_line":"                \"user\": grafana[\"user\"],"},{"line_number":72,"context_line":"                \"pass\": grafana[\"password\"],"},{"line_number":73,"context_line":"                \"vip\": monitor_vip,"},{"line_number":74,"context_line":"                \"port\": grafana[\"port\"],"},{"line_number":75,"context_line":"                \"datasource\": datasource_id,"},{"line_number":76,"context_line":"                \"seed\": seed"},{"line_number":77,"context_line":"            })"},{"line_number":78,"context_line":"        i \u003d 0"},{"line_number":79,"context_line":"        LOG.info(\"Check metric rally_test_metric_%s in grafana\" % seed)"},{"line_number":80,"context_line":"        while i \u003c retries_total:"},{"line_number":81,"context_line":"            LOG.info(\"Attempt number %s\" % (i + 1))"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_047baebd","line":78,"range":{"start_line":67,"start_character":8,"end_line":78,"end_character":13},"updated":"2018-04-23 14:58:05.000000000","message":"1) why not requests?\n2) it doesn\u0027t check nova\u0027s metric at all.","commit_id":"4512bcc202d69e3bc6148c2575a9b54c2f760f75"},{"author":{"_account_id":13009,"name":"Peter Razumovsky","email":"prazumovsky@mirantis.com","username":"prazumovsky"},"change_message_id":"52e8cf7098020d3c382ea4f42547c61c7afddaad","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _check_metric(self, seed, monitor_vip, grafana, datasource_id,"},{"line_number":66,"context_line":"                      retries_total):"},{"line_number":67,"context_line":"        check_cmd \u003d ("},{"line_number":68,"context_line":"            \"curl -s -u \u0027%(user)s:%(pass)s\u0027 \u0027http://%(vip)s:%(port)s/api\""},{"line_number":69,"context_line":"            \"/datasources/proxy/:%(datasource)s/api/v1\""},{"line_number":70,"context_line":"            \"/query?query\u003drally_test_metric_%(seed)s\u0027\" % {"},{"line_number":71,"context_line":"                \"user\": grafana[\"user\"],"},{"line_number":72,"context_line":"                \"pass\": grafana[\"password\"],"},{"line_number":73,"context_line":"                \"vip\": monitor_vip,"},{"line_number":74,"context_line":"                \"port\": grafana[\"port\"],"},{"line_number":75,"context_line":"                \"datasource\": datasource_id,"},{"line_number":76,"context_line":"                \"seed\": seed"},{"line_number":77,"context_line":"            })"},{"line_number":78,"context_line":"        i \u003d 0"},{"line_number":79,"context_line":"        LOG.info(\"Check metric rally_test_metric_%s in grafana\" % seed)"},{"line_number":80,"context_line":"        while i \u003c retries_total:"},{"line_number":81,"context_line":"            LOG.info(\"Attempt number %s\" % (i + 1))"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_0e6f36fc","line":78,"range":{"start_line":67,"start_character":8,"end_line":78,"end_character":13},"in_reply_to":"9f6a8fd7_047baebd","updated":"2018-04-24 10:25:32.000000000","message":"1. Don\u0027t understand, how I could forgot that lib:) Of course, will fix this.\n\n2. Seems commit msg and docstrings confuse - I will extend them. The goal of test is not to test \"nova metrics\". It\u0027s for test next case: let we deployed some env on openstack with several nodes, using nova instances. Monitoring added on this nodes, it collect some node-specific metrics, not related to nova. We need to verify that monitoring and network configured correctly, and communication established - metrics with their values sends to prometheus and prometheus really stores them. So that the goal of test.","commit_id":"4512bcc202d69e3bc6148c2575a9b54c2f760f75"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"4b43e2abc683bef4ea3ee280e4dde2a810cfa69c","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        :param pushgateway_port: pushgateway port to use for pushing metric"},{"line_number":107,"context_line":"        :param grafana: grafana dict with creds and port to use for checking"},{"line_number":108,"context_line":"               metric. Format: {user: admin, password: pass, port: 9902}"},{"line_number":109,"context_line":"        :param datasource_id: prometheus datasource ID to use it in grafana"},{"line_number":110,"context_line":"        :param retries_total: total number of retries to check metric in"},{"line_number":111,"context_line":"                              grafana"},{"line_number":112,"context_line":"        :param metric_from_vm: create nova instance and push metric from it"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_2426f2cf","line":109,"range":{"start_line":109,"start_character":30,"end_line":109,"end_character":40},"updated":"2018-04-23 14:58:05.000000000","message":"I prefer to remove \"prometheus\" word here and in the whole module. I mean this scenario doesn\u0027t call prometheus directly and any of datasource can be used with it.","commit_id":"4512bcc202d69e3bc6148c2575a9b54c2f760f75"},{"author":{"_account_id":13009,"name":"Peter Razumovsky","email":"prazumovsky@mirantis.com","username":"prazumovsky"},"change_message_id":"52e8cf7098020d3c382ea4f42547c61c7afddaad","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        :param pushgateway_port: pushgateway port to use for pushing metric"},{"line_number":107,"context_line":"        :param grafana: grafana dict with creds and port to use for checking"},{"line_number":108,"context_line":"               metric. Format: {user: admin, password: pass, port: 9902}"},{"line_number":109,"context_line":"        :param datasource_id: prometheus datasource ID to use it in grafana"},{"line_number":110,"context_line":"        :param retries_total: total number of retries to check metric in"},{"line_number":111,"context_line":"                              grafana"},{"line_number":112,"context_line":"        :param metric_from_vm: create nova instance and push metric from it"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_ae796ac8","line":109,"range":{"start_line":109,"start_character":30,"end_line":109,"end_character":40},"in_reply_to":"9f6a8fd7_2426f2cf","updated":"2018-04-24 10:25:32.000000000","message":"OK, agreed, will fix.","commit_id":"4512bcc202d69e3bc6148c2575a9b54c2f760f75"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"4b43e2abc683bef4ea3ee280e4dde2a810cfa69c","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        :param datasource_id: prometheus datasource ID to use it in grafana"},{"line_number":110,"context_line":"        :param retries_total: total number of retries to check metric in"},{"line_number":111,"context_line":"                              grafana"},{"line_number":112,"context_line":"        :param metric_from_vm: create nova instance and push metric from it"},{"line_number":113,"context_line":"                               if True and push metric locally without instance"},{"line_number":114,"context_line":"                               otherwise"},{"line_number":115,"context_line":"        \"\"\""},{"line_number":116,"context_line":"        seed \u003d self.generate_random_name()"},{"line_number":117,"context_line":"        push_metric_cmd \u003d ("}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_c49b7615","line":114,"range":{"start_line":112,"start_character":8,"end_line":114,"end_character":40},"updated":"2018-04-23 14:58:05.000000000","message":"this sounds like a completely separate scenario which doesn\u0027t require openstack","commit_id":"4512bcc202d69e3bc6148c2575a9b54c2f760f75"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"20f2efda10cc7763c1192e8fc83a61c195392ee5","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        :param datasource_id: prometheus datasource ID to use it in grafana"},{"line_number":110,"context_line":"        :param retries_total: total number of retries to check metric in"},{"line_number":111,"context_line":"                              grafana"},{"line_number":112,"context_line":"        :param metric_from_vm: create nova instance and push metric from it"},{"line_number":113,"context_line":"                               if True and push metric locally without instance"},{"line_number":114,"context_line":"                               otherwise"},{"line_number":115,"context_line":"        \"\"\""},{"line_number":116,"context_line":"        seed \u003d self.generate_random_name()"},{"line_number":117,"context_line":"        push_metric_cmd \u003d ("}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_11a19746","line":114,"range":{"start_line":112,"start_character":8,"end_line":114,"end_character":40},"in_reply_to":"9f6a8fd7_0e489684","updated":"2018-05-14 15:42:58.000000000","message":"let\u0027s split","commit_id":"4512bcc202d69e3bc6148c2575a9b54c2f760f75"},{"author":{"_account_id":13009,"name":"Peter Razumovsky","email":"prazumovsky@mirantis.com","username":"prazumovsky"},"change_message_id":"52e8cf7098020d3c382ea4f42547c61c7afddaad","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        :param datasource_id: prometheus datasource ID to use it in grafana"},{"line_number":110,"context_line":"        :param retries_total: total number of retries to check metric in"},{"line_number":111,"context_line":"                              grafana"},{"line_number":112,"context_line":"        :param metric_from_vm: create nova instance and push metric from it"},{"line_number":113,"context_line":"                               if True and push metric locally without instance"},{"line_number":114,"context_line":"                               otherwise"},{"line_number":115,"context_line":"        \"\"\""},{"line_number":116,"context_line":"        seed \u003d self.generate_random_name()"},{"line_number":117,"context_line":"        push_metric_cmd \u003d ("}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_0e489684","line":114,"range":{"start_line":112,"start_character":8,"end_line":114,"end_character":40},"in_reply_to":"9f6a8fd7_c49b7615","updated":"2018-04-24 10:25:32.000000000","message":"I can separate tests with using nova instances (on platform OS) and without any platform just to check that monitoring service started up.","commit_id":"4512bcc202d69e3bc6148c2575a9b54c2f760f75"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"4b43e2abc683bef4ea3ee280e4dde2a810cfa69c","unresolved":false,"context_lines":[{"line_number":114,"context_line":"                               otherwise"},{"line_number":115,"context_line":"        \"\"\""},{"line_number":116,"context_line":"        seed \u003d self.generate_random_name()"},{"line_number":117,"context_line":"        push_metric_cmd \u003d ("},{"line_number":118,"context_line":"            \"echo rally_test_metric_%(seed)s 12345 | curl --data-binary \""},{"line_number":119,"context_line":"            \"@- http://%(monitor_vip)s:%(pgtw_port)s/metrics/job\""},{"line_number":120,"context_line":"            \"/rally_test\" % {\"seed\": seed,"},{"line_number":121,"context_line":"                             \"monitor_vip\": monitor_vip,"},{"line_number":122,"context_line":"                             \"pgtw_port\": pushgateway_port})"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        self._push_metric(seed, image, flavor,"},{"line_number":125,"context_line":"                          push_metric_cmd, metric_from_vm)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_a4f1a26d","line":122,"range":{"start_line":117,"start_character":8,"end_line":122,"end_character":60},"updated":"2018-04-23 14:58:05.000000000","message":"1) it looks like something related to _push_metric method\n2) why not calling `requests` python library directly instead of relying on system package \"curl\" which can be missed?","commit_id":"4512bcc202d69e3bc6148c2575a9b54c2f760f75"},{"author":{"_account_id":13009,"name":"Peter Razumovsky","email":"prazumovsky@mirantis.com","username":"prazumovsky"},"change_message_id":"ec1d7c90183a5db838ff86149e0e0172f1b885d1","unresolved":false,"context_lines":[{"line_number":114,"context_line":"                               otherwise"},{"line_number":115,"context_line":"        \"\"\""},{"line_number":116,"context_line":"        seed \u003d self.generate_random_name()"},{"line_number":117,"context_line":"        push_metric_cmd \u003d ("},{"line_number":118,"context_line":"            \"echo rally_test_metric_%(seed)s 12345 | curl --data-binary \""},{"line_number":119,"context_line":"            \"@- http://%(monitor_vip)s:%(pgtw_port)s/metrics/job\""},{"line_number":120,"context_line":"            \"/rally_test\" % {\"seed\": seed,"},{"line_number":121,"context_line":"                             \"monitor_vip\": monitor_vip,"},{"line_number":122,"context_line":"                             \"pgtw_port\": pushgateway_port})"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        self._push_metric(seed, image, flavor,"},{"line_number":125,"context_line":"                          push_metric_cmd, metric_from_vm)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_92e55bdf","line":122,"range":{"start_line":117,"start_character":8,"end_line":122,"end_character":60},"in_reply_to":"9f6a8fd7_8e534639","updated":"2018-04-27 08:52:43.000000000","message":"2. Not same as above. We add this inside userdata on instance, so we don\u0027t need requests lib here.","commit_id":"4512bcc202d69e3bc6148c2575a9b54c2f760f75"},{"author":{"_account_id":13009,"name":"Peter Razumovsky","email":"prazumovsky@mirantis.com","username":"prazumovsky"},"change_message_id":"52e8cf7098020d3c382ea4f42547c61c7afddaad","unresolved":false,"context_lines":[{"line_number":114,"context_line":"                               otherwise"},{"line_number":115,"context_line":"        \"\"\""},{"line_number":116,"context_line":"        seed \u003d self.generate_random_name()"},{"line_number":117,"context_line":"        push_metric_cmd \u003d ("},{"line_number":118,"context_line":"            \"echo rally_test_metric_%(seed)s 12345 | curl --data-binary \""},{"line_number":119,"context_line":"            \"@- http://%(monitor_vip)s:%(pgtw_port)s/metrics/job\""},{"line_number":120,"context_line":"            \"/rally_test\" % {\"seed\": seed,"},{"line_number":121,"context_line":"                             \"monitor_vip\": monitor_vip,"},{"line_number":122,"context_line":"                             \"pgtw_port\": pushgateway_port})"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        self._push_metric(seed, image, flavor,"},{"line_number":125,"context_line":"                          push_metric_cmd, metric_from_vm)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_8e534639","line":122,"range":{"start_line":117,"start_character":8,"end_line":122,"end_character":60},"in_reply_to":"9f6a8fd7_a4f1a26d","updated":"2018-04-24 10:25:32.000000000","message":"1. You\u0027re right, move it to the method.\n\n2. Same as above.","commit_id":"4512bcc202d69e3bc6148c2575a9b54c2f760f75"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"20f2efda10cc7763c1192e8fc83a61c195392ee5","unresolved":false,"context_lines":[{"line_number":31,"context_line":"\"\"\"Scenarios for Pushgateway and Grafana metrics.\"\"\""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"class PushMetricBasic(commonscenario.Scenario):"},{"line_number":35,"context_line":"    \"\"\"Utility method for push metric scenarios.\"\"\""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def _check_metric(self, seed, monitor_vip, grafana, datasource_id,"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f6a8fd7_8bb446f4","line":34,"range":{"start_line":34,"start_character":0,"end_line":34,"end_character":47},"updated":"2018-05-14 15:42:58.000000000","message":"It is better to use Service class[*] and put push_metric and  check_metric there. Let\u0027s name this class GrafanaService or something like this\n\n[*] https://github.com/openstack/rally/blob/master/rally/task/service.py#L160\n\nThe usage from sceanio will be:\n\n def run(self, ):\n    creds \u003d {\"}\n    grafana_client \u003d GrafanaService(grafana_creds)","commit_id":"ef8b3de478f7ce3bb8b2afc2883aadeebc821ce8"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"20f2efda10cc7763c1192e8fc83a61c195392ee5","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def _push_metric(self, seed, image, flavor, monitor_vip, pushgateway_port):"},{"line_number":92,"context_line":"        push_cmd \u003d ("},{"line_number":93,"context_line":"            \"echo rally_test_metric_%(seed)s 12345 | curl --data-binary \""},{"line_number":94,"context_line":"            \"@- http://%(monitor_vip)s:%(pgtw_port)s/metrics/job\""},{"line_number":95,"context_line":"            \"/rally_test\" % {\"seed\": seed,"},{"line_number":96,"context_line":"                             \"monitor_vip\": monitor_vip,"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f6a8fd7_0b47d6be","line":93,"range":{"start_line":93,"start_character":18,"end_line":93,"end_character":44},"updated":"2018-05-14 15:42:58.000000000","message":"can we use %(seed)s without `rally_test_metric_` ? `seed` already has `s_rally` prefix","commit_id":"ef8b3de478f7ce3bb8b2afc2883aadeebc821ce8"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"20f2efda10cc7763c1192e8fc83a61c195392ee5","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        \"\"\""},{"line_number":154,"context_line":"        seed \u003d self.generate_random_name()"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        push_url \u003d \"http://%(ip)s:%(port)s/metrics/job/rally_test\" % {"},{"line_number":157,"context_line":"            \"ip\": monitor_vip,"},{"line_number":158,"context_line":"            \"port\": pushgateway_port"},{"line_number":159,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f6a8fd7_4b262e19","line":156,"range":{"start_line":156,"start_character":56,"end_line":156,"end_character":65},"updated":"2018-05-14 15:42:58.000000000","message":"\u0027rally_test\u0027 should be configurable as well","commit_id":"ef8b3de478f7ce3bb8b2afc2883aadeebc821ce8"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"20f2efda10cc7763c1192e8fc83a61c195392ee5","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        \"\"\""},{"line_number":154,"context_line":"        seed \u003d self.generate_random_name()"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        push_url \u003d \"http://%(ip)s:%(port)s/metrics/job/rally_test\" % {"},{"line_number":157,"context_line":"            \"ip\": monitor_vip,"},{"line_number":158,"context_line":"            \"port\": pushgateway_port"},{"line_number":159,"context_line":"        }"},{"line_number":160,"context_line":"        resp \u003d requests.post(push_url,"},{"line_number":161,"context_line":"                             headers\u003d{\"Content-type\": \"text/xml\"},"},{"line_number":162,"context_line":"                             data\u003d\"rally_test_metric_%s 12345\\n\" % seed)"},{"line_number":163,"context_line":"        if resp.ok:"},{"line_number":164,"context_line":"            LOG.info(\"Metric %s pushed locally\")"},{"line_number":165,"context_line":"        else:"},{"line_number":166,"context_line":"            LOG.error(\"Error during push metric %s\")"},{"line_number":167,"context_line":"            self.assertFalse(resp.ok)"},{"line_number":168,"context_line":"        self._check_metric(seed, monitor_vip, grafana, datasource_id,"},{"line_number":169,"context_line":"                           retries_total)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f6a8fd7_8b0c4695","line":167,"range":{"start_line":156,"start_character":8,"end_line":167,"end_character":37},"updated":"2018-05-14 15:42:58.000000000","message":"it would be nice to move this into \"GrafanaService\" as well. So we will have a helper class with all grafana related stuff in one place.","commit_id":"ef8b3de478f7ce3bb8b2afc2883aadeebc821ce8"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"35cd74c151bdb2179d820d7db1e56fecd7b55c5d","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        seed \u003d self.generate_random_name()"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        grafana_svc \u003d grafana_service.GrafanaService("},{"line_number":103,"context_line":"            self._clients,"},{"line_number":104,"context_line":"            name_generator\u003dself.generate_random_name,"},{"line_number":105,"context_line":"            atomic_inst\u003dself.atomic_actions())"},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_436f0492","line":103,"range":{"start_line":103,"start_character":12,"end_line":103,"end_character":25},"updated":"2018-05-17 11:23:26.000000000","message":"You do not need to transmit openstack clients there, since it will not be used. What you need to transmit instead is an ip address for Grafana. Do something like https://github.com/xrally/xrally-docker/blob/bb25d5476fc05cf1c58e1db489df354f4773af3e/xrally_docker/common/service.py#L22-L25, i.e just override clients argument.","commit_id":"f2a5d013ce12cea19d6d3426e00f65d4ad753918"}],"rally_openstack/services/grafana/grafana.py":[{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"e57461958de9e8aa6d40d5c7856eb85631470389","unresolved":false,"context_lines":[{"line_number":30,"context_line":"                                             atomic_inst\u003datomic_inst)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    @atomic.action_timer(\"grafana.push_metric\")"},{"line_number":33,"context_line":"    def push_metric(self, seed, monitor_vip, pushgateway_port, job_name):"},{"line_number":34,"context_line":"        \"\"\"Push metric by GET request using pushgateway."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"        :param seed: random name for metric to push"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_54cbf7a3","line":33,"range":{"start_line":33,"start_character":32,"end_line":33,"end_character":63},"updated":"2018-05-22 09:11:27.000000000","message":"What I proposed to do in the previous patch-set is putting these arguments to a dict and transmit it into __init__ method.","commit_id":"a9d676e4bdbd814bed65c3676da9a1ea6a57549e"}]}
