1
0
mirror of https://github.com/github/octodns.git synced 2024-05-11 05:55:00 +00:00
Commit Graph

77 Commits

Author SHA1 Message Date
Ross McFarland
aae65594f2 Remove explicit use of six 2021-09-17 07:10:07 -07:00
Ross McFarland
953a3bb88e Merge branch 'master' into py3-f-strings 2021-09-15 18:34:53 -07:00
Ross McFarland
2cf52180ac Add lenient config support to validate(_configs) 2021-09-13 19:09:05 -07:00
Ross McFarland
adf08a178a f-strings for Manager, Zone and yaml 2021-09-04 19:08:29 -07:00
Ross McFarland
cdfec9035f Merge branch 'master' into python-2.7-fixes 2021-06-25 15:43:08 -07:00
blanariu
3cc0fac817 Fix bug in Manager when using Python 2.7
In Python 2.7 the if statement would catch both cases from the test
test_populate_lenient_fallback, so the test was failing. These are
the error strings differences between Python 2 and 3:

Python 2:
NoLenient: populate() got an unexpected keyword argument 'lenient'
NoZone: populate() got multiple values for keyword argument 'lenient'

Python 3:
NoLenient: populate() got an unexpected keyword argument 'lenient'
NoZone: populate() got multiple values for argument 'lenient'
2021-06-24 12:39:56 +03:00
Ross McFarland
c3f0bf677a Validate processor config sections 2021-06-23 18:49:19 -07:00
Ross McFarland
716d068196 Backwards compat for plan overrides, 100% manager coverage, singular processor module name 2021-04-27 06:45:18 -07:00
Ross McFarland
395a5c7054 Merge remote-tracking branch 'origin' into processors 2021-04-26 18:16:58 -07:00
Christian Funkhouser
ada61f8d76 De-lint an aggressively-long log line 2021-04-08 11:56:17 -04:00
Christian Funkhouser
aa93e20f2e Represent plan_output_fh less verbosely.
Co-authored-by: Ross McFarland <ross@github.com>
2021-04-08 11:03:30 -04:00
Christian Funkhouser
2075550f07 Test that Manager passes fh to _PlanOutputs 2021-04-07 18:21:34 -04:00
Christian Funkhouser
090dbe3515 sync accepts file handle for plan output 2021-04-07 16:00:05 -04:00
Ross McFarland
236615fdd5 Merge branch 'master' into processors 2021-03-11 17:43:56 -08:00
Ross McFarland
3e09451fd7 Remove debug print. 2020-12-18 08:50:59 -08:00
Marc 'risson' Schmitt
2b454ccc22 manager: error when an alias zone is synced without its source
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
2020-12-17 15:23:22 +01:00
Ross McFarland
86232b48cf Replace some nbsp chars that have slipped into manager.py somehow 2020-12-10 08:30:15 -08:00
Ross McFarland
261abeb133 Sketch at process: source, target, plan setup, with ownership 2020-12-06 13:02:56 -08:00
Ross McFarland
e4d6084b4c POC of processors concept that can hook in to modify zones 2020-12-03 17:50:56 -08:00
Jonathan Leroy
bb7a1a43b7 Implement suggested changes 2020-11-02 18:42:03 +01:00
Jonathan Leroy
2d4855508c Check that an alias zone source is not an alias zone 2020-11-01 23:58:40 +01:00
Jonathan Leroy
95a71a268e Apply workaround for python bug #2506 witout using "pragma: no cover"
comment
2020-10-31 23:51:04 +01:00
Jonathan Leroy
e524d69f63 Fixes linting issue 2020-10-31 23:32:20 +01:00
Jonathan Leroy
d3be3be734 Fix coverage issue 2020-10-31 23:26:27 +01:00
Jonathan Leroy
6b568f5c9d Compare alias zones content with the one of its parent zone, even if
there is no changes in the parent zone
2020-10-31 19:07:34 +01:00
Jonathan Leroy
6f01a543df Implement configuration validation for alias zones 2020-10-31 09:43:23 +01:00
Jonathan Leroy
8679bb4899 Remove sources argument when calling _populate_and_plan() for an alias
zone
2020-10-31 09:41:27 +01:00
Jonathan Leroy
0b3a99bb8c Implement Record.copy() function
Flip if in _populate_and_plan()
2020-10-31 09:38:35 +01:00
Jonathan Leroy
3acea0d89d Handle multiples sources on aliased zones 2020-10-31 01:09:37 +01:00
Jonathan Leroy
897a033443 Add tests for Manager.get_zones() 2020-10-21 20:02:12 +02:00
Jonathan Leroy
1f60a6af5e Fixes typo in manager.get_zone() 2020-10-21 19:24:49 +02:00
Jonathan Leroy
94a8b67a3b Fixes linting errors 2020-10-21 19:18:27 +02:00
Jonathan Leroy
12c3aa64a8 Add zones aliases support to octodns-compare command 2020-10-21 19:11:25 +02:00
Jonathan Leroy
06c18f4063 Add zones aliases support to octodns-report command 2020-10-21 19:11:02 +02:00
Jonathan Leroy
f2a6f870b4 Make each alias zone reference its target zone instead of listing all
aliases zones in the target zone configuration
2020-10-20 22:18:48 +02:00
Jonathan Leroy
7bf0b31367 Revert "Add support for zones aliases"
This reverts commit b926d78c5c.
2020-10-20 19:54:35 +02:00
Jonathan Leroy
2cc91ead71 Merge branch 'master' into zones-aliases 2020-10-20 19:51:56 +02:00
Guillaume Gelin
31105cc472 Implement octodns-sync --source
It can be useful to only synchronize zones that use a certain source. For
example, in a situation where some zones use a dynamic source and others don't,
you probably want to synchronize those with a dynamic source regularly, and
only synchronize the others when a change is made.

Although we only synchronize the zones that use a given source, we still want
to synchronize all sources to avoid deleting records that would live in another
source of the zone.
2020-08-27 16:16:24 +02:00
Jonathan Leroy
b926d78c5c Add support for zones aliases
This commit adds support for zones aliases. This allows to define one or
multiple zone as aliases of an existing zone without using workarounds
like simlinks and miltiple "zones" entries in the configuration file.

An alias zone is share all of its content with it parent zone, only the
name of the zone is different.

```
zones:
  example.com.:
    aliases:
      - example.net.
      - example.org.
    sources:
      - in
    targets:
      - out
```

Known issues:
- No documentation,
- Only the `octodns-sync` and `octodns-validate` commands supports
aliases zones at this time,

I added a loop in the manager init function which convert all alias
zone to "real" ones during config validation, however I'm not sure
this is the right approach. Comments welcome.
2020-08-03 00:47:22 +02:00
Ross McFarland
c25dd38d4f lenient param to populate needs to be optoinal 2020-06-24 18:37:22 -07:00
Lance Hudson
e477f9f888 Add the ability to mark a zone as lenient 2020-06-11 20:11:12 -04:00
Mikalai Radchuk
6498a1e094 Fixes a typo in log 2020-01-29 20:53:16 +00:00
Ross McFarland
b8e2ec124b Fix Manager comment wrapping 2019-10-14 07:48:17 -07:00
Ross McFarland
b3bd4382cc Apply suggestions from code review
Co-Authored-By: Theo Julienne <theojulienne@github.com>
2019-10-14 07:32:09 -07:00
Ross McFarland
b5c75d189c Convert sources building back out to for x in y from list comprehension 2019-10-09 16:01:39 -07:00
Ross McFarland
4d0bc29acc Remove a couple more filters( 2019-10-09 15:36:25 -07:00
Ross McFarland
00fa158c59 filter -> [... if]s 2019-10-09 15:31:27 -07:00
Ross McFarland
3f487197df Manager throws ManagerException rather than Exception, more robust tests 2019-10-09 15:09:37 -07:00
Ross McFarland
25cc4f42db Explicit list on filter when checking for non-existant targets 2019-10-07 09:33:14 -07:00
cclauss
c8b261a409 Unroll the list comprehensions 2019-07-13 23:49:09 +02:00