Skip to content

Group property management#2

Open
gjherbiet wants to merge 10 commits into
kirei:mainfrom
gjherbiet:feature/group
Open

Group property management#2
gjherbiet wants to merge 10 commits into
kirei:mainfrom
gjherbiet:feature/group

Conversation

@gjherbiet

Copy link
Copy Markdown

This implements management of the per-zone group property as defined in section 4.4.2 of the draft RFC:

  • in zones2catz the list of zones can now be a comma-separated text file, where the zone-specific group can be passed as the second value of the line;
  • in catz2nsd, the zone-specific group property is used instead of the catalog zone default if it is present.

@gjherbiet gjherbiet changed the title Implement catalog zone group property management Group property management Jun 1, 2022
@jschlyter

jschlyter commented Jun 1, 2022

Copy link
Copy Markdown
Member

Great start! Can we get test coverage as well? Please also see test results.

@jschlyter jschlyter self-assigned this Jun 1, 2022
Comment thread dnscatz/catz2nsd.py
def get_catz_zones(catalog_zone: dns.zone.Zone) -> Dict:
"""Get zones from catalog zone"""
zones = set()
zones = {}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps use defaultdict(dict) here to rid of the test at line 232?

@jschlyter

Copy link
Copy Markdown
Member

@gjherbiet you can use poetry run pytest --isort --black to run the tests locally.

@jschlyter

Copy link
Copy Markdown
Member

I've merged the zones2catz patches for now. The other code will need some more work, e.g. I do like some sort of list of allowed groups or perhaps a group2pattern mapping. Will report back after some more thinking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants