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

94 Commits

Author SHA1 Message Date
Ross McFarland
6a1b86af6f Rework configured_sub_zones and add tests specifically for it 2022-08-11 07:50:32 -07:00
Ross McFarland
6e5c7a8b70 Add failing tests of subzone handling 2022-08-11 06:18:05 -07:00
Ross McFarland
35a6c85bbb Rework Manager.zone_tree into a property 2022-08-11 06:07:03 -07:00
Ross McFarland
02e07f4209 Merge remote-tracking branch 'origin/master' into dump-support-output-provider 2022-07-22 16:06:51 -07:00
Ross McFarland
e116d26eec Implement black formatting 2022-07-04 12:27:39 -07:00
Sachi King
d5363e8045 Add comments and use list comprehensions
Per PR review, use list comprehensions as they are prefered in py3 over
use of filter.

Add comments to describe the building of the zone tree.
2022-06-27 10:50:05 +10:00
Sachi King
5592f5da96 Support dotted subdomains for subzones
Currently if there are two zones configured;
- example.com.
- delegated.subdomain.example.com.

When an NS record is created in example.com.yaml as such:
delegated.subdomain:
  type: NS
  values:
  - ns1.example.org.

The NS record for delegated.subdomain.example.com cannot be created as it
throws an exception:

octodns.zone.SubzoneRecordException: Record delegated.subdomain.example.com is under a managed subzone

Additionally, all records other than NS are rejected for
subdomain.example.com..

This is caused by zone_tree being the result of all zones split on '.'
and being added to the tree, even if a zone does not exist at that
point.

To support records where a subzone is dotted, the the map is built such
that each node represents the subdomain of the closest subzone.

Before:
{"com", {"example": {"subdomain": {"delegated": {}}}}}

After:
{"example.com": {"delegated.subdomain": {}}}

Fixes: #378
2022-06-24 20:36:47 +10:00
Ross McFarland
d332a7bb38 Comments about dump's directory and copy 2022-04-16 12:55:41 -07:00
Ross McFarland
0d606e0728 dump output_provider testing 2022-04-14 12:50:51 -07:00
Ross McFarland
43e955a538 Only copy and set directory when it doesn't match 2022-04-14 12:19:26 -07:00
Ross McFarland
17c294042f Implement a sketch of --output-provider support for dump 2022-04-14 10:19:33 -07:00
Ross McFarland
66958f7c21 Manager._try_version with 3.7 noop (for now) 2022-03-28 13:33:32 -07:00
Ross McFarland
b458fe0dc8 Walk module hierarchy looking for __VERSION__ 2022-03-25 20:43:48 -07:00
Ross McFarland
633aef5845 Manager prints provider, processor, and plan_output versions for non-core modules when available 2022-03-25 20:03:42 -07:00
Ross McFarland
6ab6124d72 Log the octoDNS version as part of Manager.__init__ info line 2022-03-25 18:16:50 -07:00
Ross McFarland
e0a5f4d746 Rework _AggregateTarget to dynamically handle SUPPORTS 2022-02-08 09:31:42 -08:00
Ross McFarland
32c358af04 Quell all python warnings, mostly *Equals -> Equal and warn -> warning 2022-01-13 10:58:07 -08:00
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