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

116 Commits

Author SHA1 Message Date
Ross McFarland
1d535ad596 more pragma: no cover for 3.7 specific import work-around 2023-02-04 08:18:50 -08:00
Ross McFarland
6be0a8133a isort import formatting 2023-01-22 13:54:19 -08:00
Ross McFarland
976d68d710 Merge branch 'main' into get-zone 2022-11-27 06:53:42 -08:00
Ross McFarland
bd13f8dab1 Manager.get_zone used everywhere rather than direct create 2022-11-20 09:24:28 -08:00
Ross McFarland
9841781d08 Remove stale TODO 2022-11-15 10:32:51 -08:00
Ross McFarland
7e3857fe1f Pass plan_output a dedicated logger rather than use the Manager's 2022-09-29 12:39:04 -07:00
Ross McFarland
d7880c084d Remove from __futures__ bits, all are now manditory 2022-09-15 14:10:21 -07:00
Ross McFarland
0f57e6c63e Implement manager.processors for configuring global processors 2022-09-12 15:28:51 -07:00
Ross McFarland
b4792707f8 Merge remote-tracking branch 'origin/main' into idna-internally 2022-09-12 14:56:01 -07:00
Ross McFarland
fa4225b625 Fix lots of errant '...' '...' string joins 2022-09-06 12:47:47 -07:00
Ross McFarland
3bd79627c3 Doc Zone.configured_sub_zones 2022-08-27 16:32:06 -07:00
Ross McFarland
94317879b4 few more utf-8 prints/exceptions 2022-08-18 20:13:36 -07:00
Ross McFarland
2d0f2ccc5c Add idna tests of eligible_zones and fix some messages/bugs 2022-08-18 20:10:11 -07:00
Ross McFarland
33284381f8 Use IdnaDict for eligible zone filtering 2022-08-18 12:32:20 -07:00
Ross McFarland
497336e6ab Use IdnaDict for configured_sub_zones, fix get_zone, comments 2022-08-18 08:10:21 -07:00
Ross McFarland
56faf78c72 Support eligible_zones with idna 2022-08-18 07:42:34 -07:00
Ross McFarland
a3ceb1f409 Extract Manager zones configuration, add checks for matching utf-u and idna zone names 2022-08-17 18:40:10 -07:00
Ross McFarland
bfe4ff3d2e Break up Manager.__init__ configuration bits for easier testing 2022-08-17 18:10:40 -07:00
Ross McFarland
c1ef45e0fd Convert Manager.config['zones'] to IdnaDict
- print Zone.decoded_name to logs for better readability
- Prefer decoded name in YamlProvider
2022-08-17 10:29:32 -07:00
Ross McFarland
18ee70ddb5 Fix issue when subzone is a non-dotted endswith for zone 2022-08-11 09:10:56 -07:00
Ross McFarland
af010121ea Do away with zone_tree, not a tree and unnecessary now 2022-08-11 08:58:40 -07:00
Ross McFarland
810cc7faff Use collections.deque for pop'ing 2022-08-11 08:53:19 -07:00
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