Commit Graph

2805 Commits

Author SHA1 Message Date
Ross McFarland 799e1232b3 Record should work with encoded same as everything else 2022-08-20 08:11:24 -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 a33235d608 YamlProvider idna/utf-8 support, prefers utf8 2022-08-18 08:26:57 -07:00
Ross McFarland 0b0632717d Use decoded_* for human readable stuff 2022-08-18 08:11:18 -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 286e2bc94d Use dict.__repr__ for IdnaDict 2022-08-18 07:42:08 -07:00
Ross McFarland f00474cca4 Record.name/decoded_name pattern implemented 2022-08-17 18:51:00 -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 67c75ff146 Implement IdnaDict, a dict with case and idna/utf-8 insensitive keys 2022-08-17 09:58:35 -07:00
Ross McFarland c92734f7a6 Merge pull request #920 from octodns/rel-0-9-19
Rel 0.9.19 version bump & CHANGELOG update
v0.9.19
2022-08-14 11:53:10 -07:00
Ross McFarland 55aecba9de Add missing 0.9.18 CHANGELOG entries 2022-08-14 11:49:31 -07:00
Ross McFarland dfd56c6636 Rel 0.9.19 version bump & CHANGELOG update 2022-08-14 11:49:20 -07:00
Ross McFarland b5340801e0 Merge pull request #917 from octodns/subzones
Fix issues with sub-zone handling
2022-08-14 11:42:14 -07:00
Ross McFarland ffe456714c Correct error message grammar
Co-authored-by: Sachi King <nakato@nakato.io>
2022-08-12 13:28:06 -07:00
Ross McFarland 4a847cb38c More test cases for configured_sub_zones 2022-08-11 12:25:37 -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 611431b042 Broken up string formatting cleanup 2022-08-11 08:42:16 -07:00
Ross McFarland 33794f3796 Fix a bug in Zone.add_record subzone handling when name ends with non-dotted subzone name 2022-08-11 08:40:32 -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 62caa4bac6 Merge pull request #914 from octodns/rel-0-9-18
Rel 0.9.18 version bump & CHANGELOG update
v0.9.18
2022-08-09 08:09:09 -07:00
Ross McFarland af40184f29 Rel 0.9.18 version bump & CHANGELOG update 2022-08-09 08:06:53 -07:00
Ross McFarland a874edf43a Merge pull request #903 from octodns/idna
Add idna encode/decode helpers
2022-08-09 08:01:58 -07:00
Ross McFarland ea50c8cf38 Merge branch 'idna' of github.com:octodns/octodns into idna 2022-08-09 07:58:31 -07:00
Ross McFarland 78c53de22c Merge remote-tracking branch 'origin/master' into idna 2022-08-09 07:58:07 -07:00
Ross McFarland c80a93a296 Merge pull request #898 from octodns/dump-support-output-provider
Implement a sketch of --output-provider support for dump
2022-07-22 16:09:06 -07:00
Ross McFarland 02e07f4209 Merge remote-tracking branch 'origin/master' into dump-support-output-provider 2022-07-22 16:06:51 -07:00
Adam Smith f749505df3 Merge pull request #913 from yzguy/zonefilesource_multivalue_ptr
AxfrSource and ZoneFileSource: support multi-value PTR records
2022-07-22 13:00:56 -04:00
Adam Smith 2a56d9b26e AxfrSource and ZoneFileSource: support multi-value PTR records 2022-07-22 12:50:24 -04:00
Ross McFarland a0841f4420 Merge pull request #911 from octodns/black-formatting
Implement black formatting
2022-07-12 14:56:55 -07:00
Ross McFarland e671e7e57a Remove unneeded [] from list comprehension
Co-authored-by: Viranch Mehta <email@viranch.me>
2022-07-04 20:40:00 -07:00
Ross McFarland 26d8f7aa92 .git-blame-ignore-revs for initial black formatting 2022-07-04 12:29:46 -07:00
Ross McFarland e116d26eec Implement black formatting 2022-07-04 12:27:39 -07:00
Ross McFarland c98b5abdf3 Merge branch 'master' into idna 2022-07-04 10:20:48 -07:00
Ross McFarland 392d8b516f Merge pull request #910 from octodns/rm-funding
Remove repo-specific FUNDING.yml
2022-07-02 09:13:05 -07:00
Ross McFarland 0bf5154311 Remove repo-specific FUNDING.yml 2022-07-02 09:11:04 -07:00
Ross McFarland c33da93bd9 Merge pull request #908 from nakato/dottedsubzone
Support dotted subdomains for subzones
2022-06-27 06:52:42 -07:00
Sachi King 04be906c3c Add test to validate non-dotted subdomain zones are vaild
This confirms that in addition to the recently added support for dotted
subdomains that subdomains that are not dotted are supported.  From
RFC1034 Section 3.5 this would be a <subdomain> that contains a single
<label> without <subdomain> recurring.
2022-06-27 10:56:20 +10: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
Ross McFarland 5c1a1b9621 Merge remote-tracking branch 'origin/master' into idna 2022-06-26 16:36:17 -04:00
Ross McFarland 08523cd4ba Functionally complete (I think) IDNA encode/decode support 2022-06-26 16:35:47 -04: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