Skip to content
This repository was archived by the owner on Dec 21, 2022. It is now read-only.
This repository was archived by the owner on Dec 21, 2022. It is now read-only.

Filter by parent role mapping #21

@janfabry

Description

@janfabry

Take this case:

class a(A):
    class Hosts:
        app = [host0, host1]
        lb = [host2, host3]

    @map_roles(host=('app', 'lb'))
    class git(Git):
         pass

Now I can do the following to git show the load balancers:

> a git :host2 show
> a git :host3 show

However, instead of doing this individually, I would like to use the already defined lb role mapping. Something like:

 > a %lb git show

So when resolving the hosts to pass to Git, we will filter out the hosts that are not part of the lb role of the parent service. The difference is that filtering by host isolation happens after you select the service, while filtering by host mapping happens before - I think that makes sense, as the mappings come from the parent service.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions