)]}'
{"docs/Plugins.md":[{"author":{"_account_id":10311,"name":"Joseph Davis","email":"joseph.davis@suse.com","username":"joadavis"},"change_message_id":"6b15ebbb16d7584042ef6b303a656f38b36dcd7d","unresolved":false,"context_lines":[{"line_number":924,"context_line":"## Certificate Expiration (PEM file)"},{"line_number":925,"context_line":"An extension to the Agent provides the ability to determine the expiration date"},{"line_number":926,"context_line":"of the PEM formatted X.509 certificate in a file. The metric is days until the"},{"line_number":927,"context_line":"certificate expires"},{"line_number":928,"context_line":""},{"line_number":929,"context_line":" default dimensions:"},{"line_number":930,"context_line":"```"}],"source_content_type":"text/x-markdown","patch_set":5,"id":"3fa7e38b_a3143fea","line":927,"updated":"2019-10-29 05:37:40.000000000","message":"You mentioned it in the comments in the code, but you might also mention here that an expired certificate would report a negative integer.\nIt might help to have a short table of examples, with 10 days from expiration, 3 hours from expiration, 2 days past expiration as examples of what the metric would show.  Just a suggestion, not a requirement.","commit_id":"2f36e1e675859d591ff51ab3fdbd1c3704744e00"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"17c109fc08e0a3d185ac13e3bb7b0ce6b80447e0","unresolved":false,"context_lines":[{"line_number":924,"context_line":"## Certificate Expiration (PEM file)"},{"line_number":925,"context_line":"An extension to the Agent provides the ability to determine the expiration date"},{"line_number":926,"context_line":"of the PEM formatted X.509 certificate in a file. The metric is days until the"},{"line_number":927,"context_line":"certificate expires"},{"line_number":928,"context_line":""},{"line_number":929,"context_line":" default dimensions:"},{"line_number":930,"context_line":"```"}],"source_content_type":"text/x-markdown","patch_set":5,"id":"3fa7e38b_b368fb87","line":927,"in_reply_to":"3fa7e38b_a3143fea","updated":"2019-10-29 17:05:02.000000000","message":"Done","commit_id":"2f36e1e675859d591ff51ab3fdbd1c3704744e00"},{"author":{"_account_id":10311,"name":"Joseph Davis","email":"joseph.davis@suse.com","username":"joadavis"},"change_message_id":"6b15ebbb16d7584042ef6b303a656f38b36dcd7d","unresolved":false,"context_lines":[{"line_number":937,"context_line":"* init_config"},{"line_number":938,"context_line":"* instances"},{"line_number":939,"context_line":""},{"line_number":940,"context_line":"The init_config section lists the global configuration settings, such the period at which to output the metric."},{"line_number":941,"context_line":""},{"line_number":942,"context_line":"    $ ls -l `which ping` -rwsr-xr-x 1 root root 35712 Nov 8 2011 /bin/ping"},{"line_number":943,"context_line":""}],"source_content_type":"text/x-markdown","patch_set":5,"id":"3fa7e38b_432eab43","line":940,"range":{"start_line":940,"start_character":65,"end_line":940,"end_character":73},"updated":"2019-10-29 05:37:40.000000000","message":"nit: \"such as the\".  I wouldn\u0027t hold back the commit for this, but you might also wrap this line as it is getting a little long.","commit_id":"2f36e1e675859d591ff51ab3fdbd1c3704744e00"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"17c109fc08e0a3d185ac13e3bb7b0ce6b80447e0","unresolved":false,"context_lines":[{"line_number":937,"context_line":"* init_config"},{"line_number":938,"context_line":"* instances"},{"line_number":939,"context_line":""},{"line_number":940,"context_line":"The init_config section lists the global configuration settings, such the period at which to output the metric."},{"line_number":941,"context_line":""},{"line_number":942,"context_line":"    $ ls -l `which ping` -rwsr-xr-x 1 root root 35712 Nov 8 2011 /bin/ping"},{"line_number":943,"context_line":""}],"source_content_type":"text/x-markdown","patch_set":5,"id":"3fa7e38b_33796b81","line":940,"range":{"start_line":940,"start_character":65,"end_line":940,"end_character":73},"in_reply_to":"3fa7e38b_432eab43","updated":"2019-10-29 17:05:02.000000000","message":"Done","commit_id":"2f36e1e675859d591ff51ab3fdbd1c3704744e00"},{"author":{"_account_id":10311,"name":"Joseph Davis","email":"joseph.davis@suse.com","username":"joadavis"},"change_message_id":"6b15ebbb16d7584042ef6b303a656f38b36dcd7d","unresolved":false,"context_lines":[{"line_number":943,"context_line":""},{"line_number":944,"context_line":"```yaml"},{"line_number":945,"context_line":"init_config:"},{"line_number":946,"context_line":"  collect_period: 3600"},{"line_number":947,"context_line":"```"},{"line_number":948,"context_line":""},{"line_number":949,"context_line":"The instances section contains the urls to check."}],"source_content_type":"text/x-markdown","patch_set":5,"id":"3fa7e38b_6c094f29","line":946,"updated":"2019-10-29 05:37:40.000000000","message":"You might mention what the default value is (I know from the code it is 3600).  Is it worth suggesting 6, 8 or 12 hour periods as well?","commit_id":"2f36e1e675859d591ff51ab3fdbd1c3704744e00"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"17c109fc08e0a3d185ac13e3bb7b0ce6b80447e0","unresolved":false,"context_lines":[{"line_number":943,"context_line":""},{"line_number":944,"context_line":"```yaml"},{"line_number":945,"context_line":"init_config:"},{"line_number":946,"context_line":"  collect_period: 3600"},{"line_number":947,"context_line":"```"},{"line_number":948,"context_line":""},{"line_number":949,"context_line":"The instances section contains the urls to check."}],"source_content_type":"text/x-markdown","patch_set":5,"id":"3fa7e38b_733603b7","line":946,"in_reply_to":"3fa7e38b_6c094f29","updated":"2019-10-29 17:05:02.000000000","message":"Done","commit_id":"2f36e1e675859d591ff51ab3fdbd1c3704744e00"},{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"d09fdd66f57f47d63d88fc2f7b4ca4f48d083b33","unresolved":false,"context_lines":[{"line_number":987,"context_line":"The cert_files option is a comma separated list of certificate files to check."},{"line_number":988,"context_line":""},{"line_number":989,"context_line":"These options can be set if desired:"},{"line_number":990,"context_line":"* collect_period: Integer time in seconds between outputting the metric.  Since the metric is in days, it makes sense to output it at a slower rate. The default is 3600, once per hour"},{"line_number":991,"context_line":""},{"line_number":992,"context_line":"## Congestion"},{"line_number":993,"context_line":""}],"source_content_type":"text/x-markdown","patch_set":6,"id":"3fa7e38b_05097029","line":990,"updated":"2019-10-30 19:36:42.000000000","message":"nit: Could you wrap this line as well?","commit_id":"c0534f432300a4d8ee687a20187789090caff1aa"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"5f7ea93fc08999ba59438e955b9953030d8f0b95","unresolved":false,"context_lines":[{"line_number":987,"context_line":"The cert_files option is a comma separated list of certificate files to check."},{"line_number":988,"context_line":""},{"line_number":989,"context_line":"These options can be set if desired:"},{"line_number":990,"context_line":"* collect_period: Integer time in seconds between outputting the metric.  Since the metric is in days, it makes sense to output it at a slower rate. The default is 3600, once per hour"},{"line_number":991,"context_line":""},{"line_number":992,"context_line":"## Congestion"},{"line_number":993,"context_line":""}],"source_content_type":"text/x-markdown","patch_set":6,"id":"3fa7e38b_5032c4a8","line":990,"in_reply_to":"3fa7e38b_05097029","updated":"2019-10-30 21:18:46.000000000","message":"Done","commit_id":"c0534f432300a4d8ee687a20187789090caff1aa"},{"author":{"_account_id":17669,"name":"Doug Szumski","email":"doug@stackhpc.com","username":"DougSzumski"},"change_message_id":"a3eb00c1f75456c13fe3e37826c9d51f677e212c","unresolved":false,"context_lines":[{"line_number":926,"context_line":"An extension to the Agent provides the ability to determine the expiration date"},{"line_number":927,"context_line":"of the PEM formatted X.509 certificate in a file. The metric is days until the"},{"line_number":928,"context_line":"certificate expires. If the given certificate has already expired, it will"},{"line_number":929,"context_line":"return a netagive number. For example, if the certificate has already expired"},{"line_number":930,"context_line":"5 days prior to the check, -5 will be returned."},{"line_number":931,"context_line":""},{"line_number":932,"context_line":"Notice that the days till expiration value is calculated based on every 24"}],"source_content_type":"text/x-markdown","patch_set":7,"id":"3fa7e38b_b96a00b0","line":929,"range":{"start_line":929,"start_character":9,"end_line":929,"end_character":17},"updated":"2019-10-31 10:37:04.000000000","message":"nit: s/netagive/negative","commit_id":"ab2f6c265118a3655dfaa436ccf60141387484ff"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"ba96306f8c755f72a2bc8ba2fc781be21aa31c14","unresolved":false,"context_lines":[{"line_number":926,"context_line":"An extension to the Agent provides the ability to determine the expiration date"},{"line_number":927,"context_line":"of the PEM formatted X.509 certificate in a file. The metric is days until the"},{"line_number":928,"context_line":"certificate expires. If the given certificate has already expired, it will"},{"line_number":929,"context_line":"return a netagive number. For example, if the certificate has already expired"},{"line_number":930,"context_line":"5 days prior to the check, -5 will be returned."},{"line_number":931,"context_line":""},{"line_number":932,"context_line":"Notice that the days till expiration value is calculated based on every 24"}],"source_content_type":"text/x-markdown","patch_set":7,"id":"3fa7e38b_91683421","line":929,"range":{"start_line":929,"start_character":9,"end_line":929,"end_character":17},"in_reply_to":"3fa7e38b_b96a00b0","updated":"2019-10-31 18:48:48.000000000","message":"Done","commit_id":"ab2f6c265118a3655dfaa436ccf60141387484ff"},{"author":{"_account_id":17669,"name":"Doug Szumski","email":"doug@stackhpc.com","username":"DougSzumski"},"change_message_id":"a3eb00c1f75456c13fe3e37826c9d51f677e212c","unresolved":false,"context_lines":[{"line_number":943,"context_line":"| Nov  1 23:00:50 2019 GMT | Nov  2 23:01:50 2019 GMT | -1 |"},{"line_number":944,"context_line":"| Nov  1 23:00:50 2019 GMT | Nov  3 23:23:00 2019 GMT | -2 |"},{"line_number":945,"context_line":""},{"line_number":946,"context_line":" default dimensions:"},{"line_number":947,"context_line":"```"},{"line_number":948,"context_line":"    cert_file: cert_file"},{"line_number":949,"context_line":"```"}],"source_content_type":"text/x-markdown","patch_set":7,"id":"3fa7e38b_d9d81c80","line":946,"range":{"start_line":946,"start_character":0,"end_line":946,"end_character":20},"updated":"2019-10-31 10:37:04.000000000","message":"By default, the following dimensions are included with the metric?","commit_id":"ab2f6c265118a3655dfaa436ccf60141387484ff"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"ba96306f8c755f72a2bc8ba2fc781be21aa31c14","unresolved":false,"context_lines":[{"line_number":943,"context_line":"| Nov  1 23:00:50 2019 GMT | Nov  2 23:01:50 2019 GMT | -1 |"},{"line_number":944,"context_line":"| Nov  1 23:00:50 2019 GMT | Nov  3 23:23:00 2019 GMT | -2 |"},{"line_number":945,"context_line":""},{"line_number":946,"context_line":" default dimensions:"},{"line_number":947,"context_line":"```"},{"line_number":948,"context_line":"    cert_file: cert_file"},{"line_number":949,"context_line":"```"}],"source_content_type":"text/x-markdown","patch_set":7,"id":"3fa7e38b_d15b0c83","line":946,"range":{"start_line":946,"start_character":0,"end_line":946,"end_character":20},"in_reply_to":"3fa7e38b_d9d81c80","updated":"2019-10-31 18:48:48.000000000","message":"Done","commit_id":"ab2f6c265118a3655dfaa436ccf60141387484ff"},{"author":{"_account_id":17669,"name":"Doug Szumski","email":"doug@stackhpc.com","username":"DougSzumski"},"change_message_id":"a3eb00c1f75456c13fe3e37826c9d51f677e212c","unresolved":false,"context_lines":[{"line_number":946,"context_line":" default dimensions:"},{"line_number":947,"context_line":"```"},{"line_number":948,"context_line":"    cert_file: cert_file"},{"line_number":949,"context_line":"```"},{"line_number":950,"context_line":"A YAML file (cert_file_check.yaml) contains the list of cert_files to check."},{"line_number":951,"context_line":""},{"line_number":952,"context_line":"The configuration of the certificate expiration check is done in YAML, and consists of two keys:"}],"source_content_type":"text/x-markdown","patch_set":7,"id":"3fa7e38b_19cc74b9","line":949,"updated":"2019-10-31 10:37:04.000000000","message":"Sub-section: ###configuration ?","commit_id":"ab2f6c265118a3655dfaa436ccf60141387484ff"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"ba96306f8c755f72a2bc8ba2fc781be21aa31c14","unresolved":false,"context_lines":[{"line_number":946,"context_line":" default dimensions:"},{"line_number":947,"context_line":"```"},{"line_number":948,"context_line":"    cert_file: cert_file"},{"line_number":949,"context_line":"```"},{"line_number":950,"context_line":"A YAML file (cert_file_check.yaml) contains the list of cert_files to check."},{"line_number":951,"context_line":""},{"line_number":952,"context_line":"The configuration of the certificate expiration check is done in YAML, and consists of two keys:"}],"source_content_type":"text/x-markdown","patch_set":7,"id":"3fa7e38b_51471ca4","line":949,"in_reply_to":"3fa7e38b_19cc74b9","updated":"2019-10-31 18:48:48.000000000","message":"Done","commit_id":"ab2f6c265118a3655dfaa436ccf60141387484ff"},{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"c07f9c7497fd740cd00f733c3e8cf93179a77b86","unresolved":false,"context_lines":[{"line_number":29,"context_line":"  - [cAdvisor_host](#cadvisor_host)"},{"line_number":30,"context_line":"  - [Check_MK_Local](#check_mk_local)"},{"line_number":31,"context_line":"  - [Ceph](#ceph)"},{"line_number":32,"context_line":"  - [Certificate Expiration (HTTPS)](#certificate-expiration-https)"},{"line_number":33,"context_line":"  - [Congestion](#congestion)"},{"line_number":34,"context_line":"  - [Couch](#couch)"},{"line_number":35,"context_line":"  - [Couchbase](#couchbase)"}],"source_content_type":"text/x-markdown","patch_set":8,"id":"3fa7e38b_480ccaeb","line":32,"updated":"2019-11-13 13:54:28.000000000","message":"Please add an item to the table of contents.","commit_id":"302f53bae36e07f783ad302c18f0cf6ce0ee49a9"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"2670005965d2cbbef98643a13648927e4cac2088","unresolved":false,"context_lines":[{"line_number":29,"context_line":"  - [cAdvisor_host](#cadvisor_host)"},{"line_number":30,"context_line":"  - [Check_MK_Local](#check_mk_local)"},{"line_number":31,"context_line":"  - [Ceph](#ceph)"},{"line_number":32,"context_line":"  - [Certificate Expiration (HTTPS)](#certificate-expiration-https)"},{"line_number":33,"context_line":"  - [Congestion](#congestion)"},{"line_number":34,"context_line":"  - [Couch](#couch)"},{"line_number":35,"context_line":"  - [Couchbase](#couchbase)"}],"source_content_type":"text/x-markdown","patch_set":8,"id":"3fa7e38b_94d2d75a","line":32,"in_reply_to":"3fa7e38b_480ccaeb","updated":"2019-11-13 16:36:06.000000000","message":"Done","commit_id":"302f53bae36e07f783ad302c18f0cf6ce0ee49a9"}],"monasca_agent/collector/checks_d/cert_file_check.py":[{"author":{"_account_id":10311,"name":"Joseph Davis","email":"joseph.davis@suse.com","username":"joadavis"},"change_message_id":"6b15ebbb16d7584042ef6b303a656f38b36dcd7d","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def get_expire_in_days(self, cert_file):"},{"line_number":45,"context_line":"        \"\"\"Take the path the the TLS certificate file and returns the number of"},{"line_number":46,"context_line":"           the number of days till the certificate expires. If the certificate"},{"line_number":47,"context_line":"           has already expired, it will return a negative number. For example,"},{"line_number":48,"context_line":"           if the certificate has already expired 5 days prior to the check,"},{"line_number":49,"context_line":"           -5 will be returned."}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_e370f774","line":46,"range":{"start_line":46,"start_character":11,"end_line":46,"end_character":24},"updated":"2019-10-29 05:37:40.000000000","message":"redundant comment text","commit_id":"2f36e1e675859d591ff51ab3fdbd1c3704744e00"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"17c109fc08e0a3d185ac13e3bb7b0ce6b80447e0","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def get_expire_in_days(self, cert_file):"},{"line_number":45,"context_line":"        \"\"\"Take the path the the TLS certificate file and returns the number of"},{"line_number":46,"context_line":"           the number of days till the certificate expires. If the certificate"},{"line_number":47,"context_line":"           has already expired, it will return a negative number. For example,"},{"line_number":48,"context_line":"           if the certificate has already expired 5 days prior to the check,"},{"line_number":49,"context_line":"           -5 will be returned."}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_d5ca3f4d","line":46,"range":{"start_line":46,"start_character":11,"end_line":46,"end_character":24},"in_reply_to":"3fa7e38b_e370f774","updated":"2019-10-29 17:05:02.000000000","message":"Done","commit_id":"2f36e1e675859d591ff51ab3fdbd1c3704744e00"},{"author":{"_account_id":10311,"name":"Joseph Davis","email":"joseph.davis@suse.com","username":"joadavis"},"change_message_id":"6b15ebbb16d7584042ef6b303a656f38b36dcd7d","unresolved":false,"context_lines":[{"line_number":46,"context_line":"           the number of days till the certificate expires. If the certificate"},{"line_number":47,"context_line":"           has already expired, it will return a negative number. For example,"},{"line_number":48,"context_line":"           if the certificate has already expired 5 days prior to the check,"},{"line_number":49,"context_line":"           -5 will be returned."},{"line_number":50,"context_line":"        \"\"\""},{"line_number":51,"context_line":"        try:"},{"line_number":52,"context_line":"            with open(cert_file, \u0027r\u0027) as cf:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_a3667fba","line":49,"updated":"2019-10-29 05:37:40.000000000","message":"So if the cert expires today (in 3 hours for example) will it return 0 or 1?","commit_id":"2f36e1e675859d591ff51ab3fdbd1c3704744e00"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"17c109fc08e0a3d185ac13e3bb7b0ce6b80447e0","unresolved":false,"context_lines":[{"line_number":46,"context_line":"           the number of days till the certificate expires. If the certificate"},{"line_number":47,"context_line":"           has already expired, it will return a negative number. For example,"},{"line_number":48,"context_line":"           if the certificate has already expired 5 days prior to the check,"},{"line_number":49,"context_line":"           -5 will be returned."},{"line_number":50,"context_line":"        \"\"\""},{"line_number":51,"context_line":"        try:"},{"line_number":52,"context_line":"            with open(cert_file, \u0027r\u0027) as cf:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_954367b0","line":49,"in_reply_to":"3fa7e38b_a3667fba","updated":"2019-10-29 17:05:02.000000000","message":"It will return 0 as it is less than 24 hours. In production, customer is not expected to create an alarm definition with a very tight window. Depending on the corporate security process, I would say a buffer of 10 days (cert_file.cert_expire_days \u003c 10) should be the minimum as certificate renewal is likely not instantaneous.","commit_id":"2f36e1e675859d591ff51ab3fdbd1c3704744e00"},{"author":{"_account_id":17669,"name":"Doug Szumski","email":"doug@stackhpc.com","username":"DougSzumski"},"change_message_id":"a3eb00c1f75456c13fe3e37826c9d51f677e212c","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class CertificateFileCheck(AgentCheck):"},{"line_number":24,"context_line":"    \"\"\"Check the given certificate file output a metric"},{"line_number":25,"context_line":"       which is the number of days until it expires"},{"line_number":26,"context_line":"    \"\"\""},{"line_number":27,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_7951e8d8","line":24,"range":{"start_line":24,"start_character":35,"end_line":24,"end_character":42},"updated":"2019-10-31 10:37:04.000000000","message":"nit: file and output","commit_id":"ab2f6c265118a3655dfaa436ccf60141387484ff"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"ba96306f8c755f72a2bc8ba2fc781be21aa31c14","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class CertificateFileCheck(AgentCheck):"},{"line_number":24,"context_line":"    \"\"\"Check the given certificate file output a metric"},{"line_number":25,"context_line":"       which is the number of days until it expires"},{"line_number":26,"context_line":"    \"\"\""},{"line_number":27,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_91091432","line":24,"range":{"start_line":24,"start_character":35,"end_line":24,"end_character":42},"in_reply_to":"3fa7e38b_7951e8d8","updated":"2019-10-31 18:48:48.000000000","message":"Done","commit_id":"ab2f6c265118a3655dfaa436ccf60141387484ff"},{"author":{"_account_id":17669,"name":"Doug Szumski","email":"doug@stackhpc.com","username":"DougSzumski"},"change_message_id":"a3eb00c1f75456c13fe3e37826c9d51f677e212c","unresolved":false,"context_lines":[{"line_number":30,"context_line":"                                                   agent_config, instances)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def check(self, instance):"},{"line_number":33,"context_line":"        cert_file \u003d instance.get(\u0027cert_file\u0027, None)"},{"line_number":34,"context_line":"        dimensions \u003d self._set_dimensions(None, instance)"},{"line_number":35,"context_line":"        dimensions[\u0027cert_file\u0027] \u003d cert_file"},{"line_number":36,"context_line":"        self.log.info(\u0027cert_file \u003d %s\u0027 % cert_file)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_19dd5440","line":33,"updated":"2019-10-31 10:37:04.000000000","message":"If this is None, it looks like we should catch the exception on line 57, but should we just return here earlier?","commit_id":"ab2f6c265118a3655dfaa436ccf60141387484ff"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"ba96306f8c755f72a2bc8ba2fc781be21aa31c14","unresolved":false,"context_lines":[{"line_number":30,"context_line":"                                                   agent_config, instances)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def check(self, instance):"},{"line_number":33,"context_line":"        cert_file \u003d instance.get(\u0027cert_file\u0027, None)"},{"line_number":34,"context_line":"        dimensions \u003d self._set_dimensions(None, instance)"},{"line_number":35,"context_line":"        dimensions[\u0027cert_file\u0027] \u003d cert_file"},{"line_number":36,"context_line":"        self.log.info(\u0027cert_file \u003d %s\u0027 % cert_file)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_1199a41d","line":33,"in_reply_to":"3fa7e38b_19dd5440","updated":"2019-10-31 18:48:48.000000000","message":"Good point! I like the fail fast approach.","commit_id":"ab2f6c265118a3655dfaa436ccf60141387484ff"}],"requirements.txt":[{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"d09fdd66f57f47d63d88fc2f7b4ca4f48d083b33","unresolved":false,"context_lines":[{"line_number":27,"context_line":"eventlet!\u003d0.18.3,!\u003d0.20.1,\u003e\u003d0.18.2 # MIT"},{"line_number":28,"context_line":"keystoneauth1\u003e\u003d3.3.0 # Apache-2.0"},{"line_number":29,"context_line":"monasca-common\u003e\u003d2.7.0 # Apache-2.0"},{"line_number":30,"context_line":"cryptography\u003e\u003d2.1 # BSD/Apache-2.0"}],"source_content_type":"text/plain","patch_set":6,"id":"3fa7e38b_25002c01","line":30,"updated":"2019-10-30 19:36:42.000000000","message":"We add plugin requirements to [extras] section in setup.cfg.","commit_id":"c0534f432300a4d8ee687a20187789090caff1aa"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"5f7ea93fc08999ba59438e955b9953030d8f0b95","unresolved":false,"context_lines":[{"line_number":27,"context_line":"eventlet!\u003d0.18.3,!\u003d0.20.1,\u003e\u003d0.18.2 # MIT"},{"line_number":28,"context_line":"keystoneauth1\u003e\u003d3.3.0 # Apache-2.0"},{"line_number":29,"context_line":"monasca-common\u003e\u003d2.7.0 # Apache-2.0"},{"line_number":30,"context_line":"cryptography\u003e\u003d2.1 # BSD/Apache-2.0"}],"source_content_type":"text/plain","patch_set":6,"id":"3fa7e38b_d0e23401","line":30,"in_reply_to":"3fa7e38b_25002c01","updated":"2019-10-30 21:18:46.000000000","message":"ah, good to know","commit_id":"c0534f432300a4d8ee687a20187789090caff1aa"}],"test-requirements.txt":[{"author":{"_account_id":17669,"name":"Doug Szumski","email":"doug@stackhpc.com","username":"DougSzumski"},"change_message_id":"f1ad2dce0d6544a3e3d56d6b52571083a11a414f","unresolved":false,"context_lines":[{"line_number":9,"context_line":"prometheus_client"},{"line_number":10,"context_line":"stestr\u003e\u003d1.0.0 # Apache-2.0"},{"line_number":11,"context_line":"docutils\u003e\u003d0.11 # OSI-Approved Open Source, Public Domain"},{"line_number":12,"context_line":"freezegun\u003e\u003d0.3.6 # Apache-2.0"},{"line_number":13,"context_line":""}],"source_content_type":"text/plain","patch_set":8,"id":"3fa7e38b_984b7029","line":12,"updated":"2019-11-01 09:29:43.000000000","message":"I think this needs to be compatible with this: https://github.com/openstack/requirements/blob/master/upper-constraints.txt#L308\n\nHopefully you can just lower the version?","commit_id":"302f53bae36e07f783ad302c18f0cf6ce0ee49a9"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"22ca4f1439ceb038a55a04df384cd8dca37550b8","unresolved":false,"context_lines":[{"line_number":9,"context_line":"prometheus_client"},{"line_number":10,"context_line":"stestr\u003e\u003d1.0.0 # Apache-2.0"},{"line_number":11,"context_line":"docutils\u003e\u003d0.11 # OSI-Approved Open Source, Public Domain"},{"line_number":12,"context_line":"freezegun\u003e\u003d0.3.6 # Apache-2.0"},{"line_number":13,"context_line":""}],"source_content_type":"text/plain","patch_set":8,"id":"3fa7e38b_e4451d70","line":12,"in_reply_to":"3fa7e38b_984b7029","updated":"2019-11-01 16:03:41.000000000","message":"Should be fine though as it is capped at 0.3.12.","commit_id":"302f53bae36e07f783ad302c18f0cf6ce0ee49a9"},{"author":{"_account_id":17669,"name":"Doug Szumski","email":"doug@stackhpc.com","username":"DougSzumski"},"change_message_id":"b870ded797820e204541222d761fff19c94aa599","unresolved":false,"context_lines":[{"line_number":9,"context_line":"prometheus_client"},{"line_number":10,"context_line":"stestr\u003e\u003d1.0.0 # Apache-2.0"},{"line_number":11,"context_line":"docutils\u003e\u003d0.11 # OSI-Approved Open Source, Public Domain"},{"line_number":12,"context_line":"freezegun\u003e\u003d0.3.6 # Apache-2.0"},{"line_number":13,"context_line":""}],"source_content_type":"text/plain","patch_set":8,"id":"3fa7e38b_5a42c83c","line":12,"in_reply_to":"3fa7e38b_e4451d70","updated":"2019-11-01 16:48:07.000000000","message":"Err, yes, sorry!","commit_id":"302f53bae36e07f783ad302c18f0cf6ce0ee49a9"}],"tests/checks_d/test_cert_file_check.py":[{"author":{"_account_id":17669,"name":"Doug Szumski","email":"doug@stackhpc.com","username":"DougSzumski"},"change_message_id":"a3eb00c1f75456c13fe3e37826c9d51f677e212c","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            agent_config\u003d{}"},{"line_number":69,"context_line":"        )"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def test_unable_to_read_file(self):"},{"line_number":72,"context_line":"        tmp_certdir \u003d tempfile.mkdtemp(prefix\u003d\u0027test-cert-file-check-\u0027)"},{"line_number":73,"context_line":"        try:"},{"line_number":74,"context_line":"            bogus_cert_file \u003d os.path.join(tmp_certdir, \u0027foo\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_79f00892","line":71,"range":{"start_line":71,"start_character":8,"end_line":71,"end_character":32},"updated":"2019-10-31 10:37:04.000000000","message":"Is it worth adding a test case for when the cert_file is None? (someone badly configured the plugin perhaps)","commit_id":"ab2f6c265118a3655dfaa436ccf60141387484ff"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"ba96306f8c755f72a2bc8ba2fc781be21aa31c14","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            agent_config\u003d{}"},{"line_number":69,"context_line":"        )"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def test_unable_to_read_file(self):"},{"line_number":72,"context_line":"        tmp_certdir \u003d tempfile.mkdtemp(prefix\u003d\u0027test-cert-file-check-\u0027)"},{"line_number":73,"context_line":"        try:"},{"line_number":74,"context_line":"            bogus_cert_file \u003d os.path.join(tmp_certdir, \u0027foo\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_3156202c","line":71,"range":{"start_line":71,"start_character":8,"end_line":71,"end_character":32},"in_reply_to":"3fa7e38b_79f00892","updated":"2019-10-31 18:48:48.000000000","message":"Done","commit_id":"ab2f6c265118a3655dfaa436ccf60141387484ff"},{"author":{"_account_id":17669,"name":"Doug Szumski","email":"doug@stackhpc.com","username":"DougSzumski"},"change_message_id":"a3eb00c1f75456c13fe3e37826c9d51f677e212c","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        tmp_certdir \u003d tempfile.mkdtemp(prefix\u003d\u0027test-cert-file-check-\u0027)"},{"line_number":100,"context_line":"        try:"},{"line_number":101,"context_line":"            bogus_cert_file \u003d os.path.join(tmp_certdir, \u0027foo\u0027)"},{"line_number":102,"context_line":"            # create a self-signed cert that expires in 10 days from now"},{"line_number":103,"context_line":"            with open(bogus_cert_file, \u0027w\u0027) as f:"},{"line_number":104,"context_line":"                f.write(generate_selfsigned_cert(10))"},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_794568b3","line":102,"updated":"2019-10-31 10:37:04.000000000","message":"Also check the case when certificate has already expired and a negative number is returned?","commit_id":"ab2f6c265118a3655dfaa436ccf60141387484ff"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"ba96306f8c755f72a2bc8ba2fc781be21aa31c14","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        tmp_certdir \u003d tempfile.mkdtemp(prefix\u003d\u0027test-cert-file-check-\u0027)"},{"line_number":100,"context_line":"        try:"},{"line_number":101,"context_line":"            bogus_cert_file \u003d os.path.join(tmp_certdir, \u0027foo\u0027)"},{"line_number":102,"context_line":"            # create a self-signed cert that expires in 10 days from now"},{"line_number":103,"context_line":"            with open(bogus_cert_file, \u0027w\u0027) as f:"},{"line_number":104,"context_line":"                f.write(generate_selfsigned_cert(10))"},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_912034b2","line":102,"in_reply_to":"3fa7e38b_794568b3","updated":"2019-10-31 18:48:48.000000000","message":"Done","commit_id":"ab2f6c265118a3655dfaa436ccf60141387484ff"}]}
