Skip to content

How to generate hierarchical configuration without configuration contexts on site and location. #15874

Answered by candlerb
amuckart asked this question in Q&A
Discussion options

You must be logged in to vote

Ancestors are matched for regions and site groups already, so it might not be too hard to do the same for locations:

# Match against the directly assigned region as well as any parent regions.
region = getattr(obj.site, 'region', None)
regions = region.get_ancestors(include_self=True) if region else []
# Match against the directly assigned site group as well as any parent site groups.
sitegroup = getattr(obj.site, 'group', None)
sitegroups = sitegroup.get_ancestors(include_self=True) if sitegroup else []

Config contexts at rack level seem a reasonable suggestion too (after all, "loc…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@MoratNZ
Comment options

@MoratNZ
Comment options

@candlerb
Comment options

Answer selected by amuckart
@amuckart
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants