Remove get_pending_certificates from verisign issuer

This commit is contained in:
Curtis Castrapel 2018-03-28 08:56:28 -07:00
parent a316cbba73
commit b814a4f009
2 changed files with 0 additions and 32 deletions

View File

@ -518,19 +518,6 @@ def publish_verisign_units():
requests.post('http://localhost:8078/metrics', data=json.dumps(metric)) 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(): def main():
manager.add_command("start", LemurServer()) manager.add_command("start", LemurServer())
manager.add_command("runserver", Server(host='127.0.0.1', threaded=True)) manager.add_command("runserver", Server(host='127.0.0.1', threaded=True))

View File

@ -221,25 +221,6 @@ class VerisignIssuerPlugin(IssuerPlugin):
response = self.session.post(url, headers={'content-type': 'application/x-www-form-urlencoded'}) response = self.session.post(url, headers={'content-type': 'application/x-www-form-urlencoded'})
return handle_response(response.content)['Response']['Order'] 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): def clear_pending_certificates(self):
""" """
Uses Verisign to clear the pending certificates awaiting approval. Uses Verisign to clear the pending certificates awaiting approval.