mirror of
https://github.com/github/octodns.git
synced 2024-05-11 05:55:00 +00:00
docstrings for each provider showing config
This commit is contained in:
@@ -56,6 +56,8 @@ zones:
|
||||
|
||||
`class` is a special key that tells OctoDNS what python class should be loaded. Any other keys will be passed as configuration values to that provider. In general any sensitive or frequently rotated values should come from environmental variables. When OctoDNS sees a value that starts with `env/` it will look for that value in the process's environment and pass the result along.
|
||||
|
||||
Further information can be found in the `docstring` of each source and provider class.
|
||||
|
||||
Now that we have something to tell OctoDNS about our providers & zones we need to tell it about or records. We'll keep it simple for now and just create a single `A` record at the top-level of the domain.
|
||||
|
||||
`config/example.com.yaml`
|
||||
@@ -70,6 +72,8 @@ Now that we have something to tell OctoDNS about our providers & zones we need t
|
||||
- 1.2.3.5
|
||||
```
|
||||
|
||||
Further information can be found in [Records Documentation](/docs/records.md`).
|
||||
|
||||
### Noop
|
||||
|
||||
We're ready to do a dry-run with our new setup to see what changes it would make. Since we're pretending here we'll act like there are no existing records for `example.com.` in our accounts on either provider.
|
||||
|
@@ -24,6 +24,16 @@ class CloudflareAuthenticationError(Exception):
|
||||
|
||||
|
||||
class CloudflareProvider(BaseProvider):
|
||||
'''
|
||||
Cloudflare DNS provider
|
||||
|
||||
cloudflare:
|
||||
class: octodns.provider.cloudflare.CloudflareProvider
|
||||
# Your Cloudflare account email address (required)
|
||||
email: dns-manager@example.com
|
||||
# The api key (required)
|
||||
token: foo
|
||||
'''
|
||||
SUPPORTS_GEO = False
|
||||
# TODO: support SRV
|
||||
UNSUPPORTED_TYPES = ('NAPTR', 'PTR', 'SOA', 'SRV', 'SSHFP')
|
||||
|
@@ -80,6 +80,16 @@ class DnsimpleClient(object):
|
||||
|
||||
|
||||
class DnsimpleProvider(BaseProvider):
|
||||
'''
|
||||
Dnsimple provider using API v2
|
||||
|
||||
dnsimple:
|
||||
class: octodns.provider.dnsimple.DnsimpleProvider
|
||||
# API v2 account access token (required)
|
||||
token: letmein
|
||||
# Your account number (required)
|
||||
account: 42
|
||||
'''
|
||||
SUPPORTS_GEO = False
|
||||
|
||||
def __init__(self, id, token, account, *args, **kwargs):
|
||||
|
@@ -81,6 +81,21 @@ class _CachingDynZone(DynZone):
|
||||
|
||||
|
||||
class DynProvider(BaseProvider):
|
||||
'''
|
||||
Dynect Managed DNS provider
|
||||
|
||||
dyn:
|
||||
class: octodns.provider.dyn.DynProvider
|
||||
# Your dynect customer name (required)
|
||||
customer: cust
|
||||
# Your dynect username (required)
|
||||
username: user
|
||||
# Your dynect password (required)
|
||||
password: pass
|
||||
# Whether or not to support TrafficDirectors and enable GeoDNS
|
||||
# (optional, default is false)
|
||||
traffic_directors_enabled: true
|
||||
'''
|
||||
RECORDS_TO_TYPE = {
|
||||
'a_records': 'A',
|
||||
'aaaa_records': 'AAAA',
|
||||
|
@@ -337,6 +337,25 @@ class PowerDnsBaseProvider(BaseProvider):
|
||||
|
||||
|
||||
class PowerDnsProvider(PowerDnsBaseProvider):
|
||||
'''
|
||||
PowerDNS API v4 Provider
|
||||
|
||||
powerdns:
|
||||
class: octodns.provider.powerdns.PowerDnsProvider
|
||||
# The host on which PowerDNS api is listening (required)
|
||||
host: fqdn
|
||||
# The api key that grans access (required)
|
||||
api_key: api-key
|
||||
# The port on which PowerDNS api is listening (optional, default 8081)
|
||||
port: 8081
|
||||
# The nameservers to use for this provider (optional,
|
||||
# default unmanaged)
|
||||
nameserver_values:
|
||||
- 1.2.3.4.
|
||||
- 1.2.3.5.
|
||||
# The nameserver record TTL when managed, (optional, default 600)
|
||||
nameserver_ttl: 600
|
||||
'''
|
||||
|
||||
def __init__(self, id, host, api_key, port=8081, nameserver_values=None,
|
||||
nameserver_ttl=600, *args, **kwargs):
|
||||
|
@@ -140,6 +140,18 @@ def _octal_replace(s):
|
||||
|
||||
|
||||
class Route53Provider(BaseProvider):
|
||||
'''
|
||||
AWS Route53 Provider
|
||||
|
||||
route53:
|
||||
class: octodns.provider.route53.Route53Provider
|
||||
# The AWS access key id (required)
|
||||
access_key_id:
|
||||
# The AWS secret access key (required)
|
||||
secret_access_key:
|
||||
|
||||
In general the account used will need full permissions on Route53.
|
||||
'''
|
||||
SUPPORTS_GEO = True
|
||||
|
||||
# This should be bumped when there are underlying changes made to the
|
||||
|
@@ -16,6 +16,17 @@ from .base import BaseProvider
|
||||
|
||||
|
||||
class YamlProvider(BaseProvider):
|
||||
'''
|
||||
Core provider for records configured in yaml files on disk.
|
||||
|
||||
config:
|
||||
class: octodns.provider.yaml.YamlProvider
|
||||
# The location of yaml config files (required)
|
||||
directory: ./config
|
||||
# The ttl to use for records when not specified in the data
|
||||
# (optional, default 3600)
|
||||
default_ttl: 3600
|
||||
'''
|
||||
SUPPORTS_GEO = True
|
||||
|
||||
def __init__(self, id, directory, default_ttl=3600, *args, **kwargs):
|
||||
|
@@ -17,13 +17,13 @@ from ..zone import DuplicateRecordException, SubzoneRecordException
|
||||
from .base import BaseSource
|
||||
|
||||
|
||||
class TinyDnsSource(BaseSource):
|
||||
class TinyDnsBaseSource(BaseSource):
|
||||
SUPPORTS_GEO = False
|
||||
|
||||
split_re = re.compile(r':+')
|
||||
|
||||
def __init__(self, id, default_ttl=3600):
|
||||
super(TinyDnsSource, self).__init__(id)
|
||||
super(TinyDnsBaseSource, self).__init__(id)
|
||||
self.default_ttl = default_ttl
|
||||
|
||||
def _data_for_A(self, _type, records):
|
||||
@@ -177,10 +177,18 @@ class TinyDnsSource(BaseSource):
|
||||
'skipping'.format(addr))
|
||||
|
||||
|
||||
class TinyDnsFileSource(TinyDnsSource):
|
||||
class TinyDnsFileSource(TinyDnsBaseSource):
|
||||
'''
|
||||
A basic TinyDNS zonefile importer created to import legacy data.
|
||||
|
||||
tinydns:
|
||||
class: octodns.source.tinydns.TinyDnsFileSource
|
||||
# The location of the TinyDNS zone files
|
||||
directory: ./zones
|
||||
# The ttl to use for records when not specified in the data
|
||||
# (optional, default 3600)
|
||||
default_ttl: 3600
|
||||
|
||||
NOTE: timestamps & lo fields are ignored if present.
|
||||
'''
|
||||
def __init__(self, id, directory, default_ttl=3600):
|
||||
|
Reference in New Issue
Block a user