diff --git a/lemur/manage.py b/lemur/manage.py index 5129514c..8f45cfb4 100755 --- a/lemur/manage.py +++ b/lemur/manage.py @@ -518,19 +518,6 @@ def publish_verisign_units(): requests.post('http://localhost:8078/metrics', data=json.dumps(metric)) -@manager.command -def publish_unapproved_verisign_certificates(): - """ - Query the Verisign for any certificates that need to be approved. - :return: - """ - from lemur.plugins import plugins - from lemur.extensions import metrics - v = plugins.get('verisign-issuer') - certs = v.get_pending_certificates() - metrics.send('pending_certificates', 'gauge', certs) - - def main(): manager.add_command("start", LemurServer()) manager.add_command("runserver", Server(host='127.0.0.1', threaded=True)) diff --git a/lemur/plugins/lemur_verisign/plugin.py b/lemur/plugins/lemur_verisign/plugin.py index d02fd8e5..44fa71df 100644 --- a/lemur/plugins/lemur_verisign/plugin.py +++ b/lemur/plugins/lemur_verisign/plugin.py @@ -221,25 +221,6 @@ class VerisignIssuerPlugin(IssuerPlugin): response = self.session.post(url, headers={'content-type': 'application/x-www-form-urlencoded'}) return handle_response(response.content)['Response']['Order'] - def get_pending_certificates(self): - """ - Uses Verisign to fetch the number of certificate awaiting approval. - - :return: - """ - url = current_app.config.get("VERISIGN_URL") + '/reportingws' - - end = arrow.now() - start = end.replace(days=-7) - data = { - 'reportType': 'summary', - 'certProductType': 'Server', - 'startDate': start.format("MM/DD/YYYY"), - 'endDate': end.format("MM/DD/YYYY"), - } - response = self.session.post(url, data=data) - return response.json()['certificateSummary'][0]['Pending'] - def clear_pending_certificates(self): """ Uses Verisign to clear the pending certificates awaiting approval.