lemur/lemur/dns_providers/service.py

17 lines
441 B
Python
Raw Normal View History

2018-04-11 01:04:07 +02:00
from lemur.dns_providers.models import DnsProviders
def get_all_dns_providers(status="active"):
"""
Retrieves all certificates within Lemur.
:return:
"""
2018-04-12 00:56:00 +02:00
all_dns_providers = DnsProviders.query.all()
dns_provider_result = []
for provider in all_dns_providers:
print(provider)
if provider.status == status:
dns_provider_result.append(provider.__dict__)
return dns_provider_result