DNS Providers list returned
This commit is contained in:
@ -9,6 +9,7 @@ from flask_restful import Api
|
||||
from lemur.common.schema import validate_schema
|
||||
from lemur.authorities.service import get_by_name
|
||||
from lemur.auth.service import AuthenticatedResource
|
||||
from lemur.dns_providers.service import get_all_dns_providers
|
||||
|
||||
from lemur.defaults.schemas import default_output_schema
|
||||
|
||||
@ -50,7 +51,8 @@ class LemurDefaults(AuthenticatedResource):
|
||||
"state": "CA",
|
||||
"location": "Los Gatos",
|
||||
"organization": "Netflix",
|
||||
"organizationalUnit": "Operations"
|
||||
"organizationalUnit": "Operations",
|
||||
"dnsProviders": [{"name": "test", ...}, {...}],
|
||||
}
|
||||
|
||||
:reqheader Authorization: OAuth token to authenticate
|
||||
@ -59,6 +61,7 @@ class LemurDefaults(AuthenticatedResource):
|
||||
"""
|
||||
|
||||
default_authority = get_by_name(current_app.config.get('LEMUR_DEFAULT_AUTHORITY'))
|
||||
dns_providers = get_all_dns_providers()
|
||||
|
||||
return dict(
|
||||
country=current_app.config.get('LEMUR_DEFAULT_COUNTRY'),
|
||||
@ -67,7 +70,8 @@ class LemurDefaults(AuthenticatedResource):
|
||||
organization=current_app.config.get('LEMUR_DEFAULT_ORGANIZATION'),
|
||||
organizational_unit=current_app.config.get('LEMUR_DEFAULT_ORGANIZATIONAL_UNIT'),
|
||||
issuer_plugin=current_app.config.get('LEMUR_DEFAULT_ISSUER_PLUGIN'),
|
||||
authority=default_authority
|
||||
authority=default_authority,
|
||||
dns_providers=dns_providers,
|
||||
)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user