Fixing various problems with the syncing of endpoints, throttling sta… (#398)

* Fixing various problems with the syncing of endpoints, throttling stale endpoints etc.
This commit is contained in:
kevgliss
2016-07-12 08:40:49 -07:00
committed by GitHub
parent 4f3dc5422c
commit f38868a97f
11 changed files with 102 additions and 17 deletions

View File

@ -48,6 +48,15 @@ def get_by_dnsname(endpoint_dnsname):
return database.get(Endpoint, endpoint_dnsname, field='dnsname')
def get_by_source(source_label):
"""
Retrieves all endpoints for a given source.
:param source_label:
:return:
"""
return Endpoint.query.filter(Endpoint.source.label == source_label).all() # noqa
def create(**kwargs):
"""
Creates a new endpoint.