Browse Source

Pass through YamlProvider doc and CHANGELOG entry

pull/1047/head
Ross McFarland 2 years ago
parent
commit
3c304aa6ee
No known key found for this signature in database GPG Key ID: 943B179E15D3B22A
2 changed files with 37 additions and 4 deletions
  1. +6
    -0
      CHANGELOG.md
  2. +31
    -4
      octodns/provider/yaml.py

+ 6
- 0
CHANGELOG.md View File

@ -5,6 +5,12 @@
* New dynamic zone config support that allows wildcard entries in the octoDNS * New dynamic zone config support that allows wildcard entries in the octoDNS
config to be expanded by the source provider(s). See config to be expanded by the source provider(s). See
[Dynamic Zone Config](/README.md#dynamic-zone-config) for more information. [Dynamic Zone Config](/README.md#dynamic-zone-config) for more information.
* SplitYamlProvider has been deprecated and will be removed in 2.0. YamlProvider
now includes the ability to process split zones when configured to do so and
allows for more flexibility in how things are laid out than was previously
possible. This includes the ability to split some zones and not others and
even to have partially split zones with some records in the primary zone YAML
and others in a split directory. See YamlProvider documentation for more info.
#### Stuff #### Stuff


+ 31
- 4
octodns/provider/yaml.py View File

@ -32,11 +32,27 @@ class YamlProvider(BaseProvider):
populate_should_replace: false populate_should_replace: false
# The filename used to load split style zones, False means disabled. # The filename used to load split style zones, False means disabled.
# When enabled the provider will search for zone records split across # When enabled the provider will search for zone records split across
# multiple YAML files in a directory with the zone name.
# multiple YAML files in the directory with split_extension appended to
# the zone name. split_extension should include the `.`
# See "Split Details" below for more information # See "Split Details" below for more information
# (optional, default False, . is the recommended best practice when # (optional, default False, . is the recommended best practice when
# enabling) # enabling)
split_extension: false split_extension: false
# Disable loading of the primary zone .yaml file. If split_extension
# is defined both split files and the primary zone .yaml will be loaded
# by default. Setting this to true will disable that and rely soley on
# split files.
# (optional, default False)
split_only: false
# When writing YAML records out to disk with split_extension enabled
# each record is written out into its own file with .yaml appended to
# the name of the record. This would result in files like `.yaml` for
# the apex and `*.yaml` for a wildcard. If your OS doesn't allow such
# filenames or you would prefer to avoid them you can enable
# split_catchall to instead write those records into a file named
# `$[zone.name].yaml`
# (optional, default False)
split_catchall: false
Split Details Split Details
------------- -------------
@ -44,10 +60,11 @@ class YamlProvider(BaseProvider):
All files are stored in a subdirectory matching the name of the zone All files are stored in a subdirectory matching the name of the zone
(including the trailing .) of the directory config. It is a recommended (including the trailing .) of the directory config. It is a recommended
best practice that the files be named RECORD.yaml, but all files are best practice that the files be named RECORD.yaml, but all files are
sourced and processed as if they were a single large file.
sourced and processed ignoring the filenames so it is up to you how to
organize them.
A full directory structure for the zone github.com. managed under directory
"zones/" would be:
With `split_extension: .` the directory structure for the zone github.com.
managed under directory "zones/" would look like:
zones/ zones/
github.com./ github.com./
@ -396,6 +413,16 @@ class SplitYamlProvider(YamlProvider):
''' '''
DEPRECATED: Use YamlProvider with the split_extension parameter instead. DEPRECATED: Use YamlProvider with the split_extension parameter instead.
When migrating the following configuration options would result in the same
behavior as SplitYamlProvider
config:
class: octodns.provider.yaml.YamlProvider
# extension is configured as split_extension
split_extension: .
split_only: true
split_catchall: true
TO BE REMOVED: 2.0 TO BE REMOVED: 2.0
''' '''


Loading…
Cancel
Save