Skip to content

cmd

Groups related commands.

Commands invoked by dpteam groups are defined here.

add_groups(team_name=typer.Option(None, '--team-name', '-tn', help="Team names separated by space (e.g. 'dev-stat-a demo-stat-b')"))

Adds a team with respective groups.

Source code in dapla_team_cli/groups/cmd.py
28
29
30
31
32
33
34
35
36
37
38
39
def add_groups(
    team_name: Optional[str] = typer.Option(
        None, "--team-name", "-tn", help="Team names separated by space (e.g. 'dev-stat-a demo-stat-b')"
    )
) -> None:
    """Adds a team with respective groups."""
    if team_name is None:
        team_name = confirm_input("Provide the name of the team to be created")

    # team_name = get_remote_from_name(team_name).name
    group_suffixes: List[str] = []  # TODO: Add as CLI option
    add(team_name, group_suffixes)

groups()

Interact with a team's auth group memberships.

Source code in dapla_team_cli/groups/cmd.py
22
23
24
25
@app.callback()
def groups() -> None:
    """Interact with a team's auth group memberships."""
    pass

remove_groups(team_name=typer.Option(None, '--team-name', '-tn', help='Team name (e.g. demo-enhjoern-a)'))

Removes a team with respective groups.

Source code in dapla_team_cli/groups/cmd.py
42
43
44
45
46
47
48
49
50
def remove_groups(
    team_name: Optional[str] = typer.Option(None, "--team-name", "-tn", help="Team name (e.g. demo-enhjoern-a)")
) -> None:
    """Removes a team with respective groups."""
    if team_name is None:
        team_name = get_team_name()
    # team_name = get_remote_from_name(team_name).name
    group_suffixes: List[str] = []  # TODO: Add as CLI option
    remove(team_name, group_suffixes)