-
Notifications
You must be signed in to change notification settings - Fork 175
Expand file tree
/
Copy path__init__.py
More file actions
84 lines (58 loc) · 1.97 KB
/
__init__.py
File metadata and controls
84 lines (58 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
"""Self-service CLI command group for v2 REST API.
Registers self-service sub-groups per entity under
``backend.ai v2 my {entity} {command}``.
"""
from __future__ import annotations
import click
from ai.backend.common.cli import LazyGroup
@click.group()
def my() -> None:
"""Self-service commands for the current user."""
@my.group(cls=LazyGroup, import_name="ai.backend.client.cli.v2.my.keypair:keypair")
def keypair() -> None:
"""My keypair commands."""
@my.group(cls=LazyGroup, import_name="ai.backend.client.cli.v2.my.role:role")
def role() -> None:
"""My role commands."""
@my.group(
cls=LazyGroup,
import_name="ai.backend.client.cli.v2.my.login_history:login_history",
)
def login_history() -> None:
"""My login history commands."""
@my.group(
cls=LazyGroup,
import_name="ai.backend.client.cli.v2.my.login_session:login_session",
)
def login_session() -> None:
"""My login session commands."""
@my.group(cls=LazyGroup, import_name="ai.backend.client.cli.v2.my.export:export")
def export() -> None:
"""My export commands."""
@my.group(cls=LazyGroup, import_name="ai.backend.client.cli.v2.my.session:session")
def session() -> None:
"""My session commands."""
@my.group(cls=LazyGroup, import_name="ai.backend.client.cli.v2.my.deployment:deployment")
def deployment() -> None:
"""My deployment commands."""
@my.group(
cls=LazyGroup,
import_name="ai.backend.client.cli.v2.my.resource_allocation:resource_allocation",
name="resource-allocation",
)
def resource_allocation() -> None:
"""My resource allocation commands."""
@my.group(
cls=LazyGroup,
import_name="ai.backend.client.cli.v2.my.resource_policy:resource_policy",
name="resource-policy",
)
def resource_policy() -> None:
"""My resource policy commands."""
@my.group(
cls=LazyGroup,
import_name="ai.backend.client.cli.v2.my.storage_host:storage_host",
name="storage-host",
)
def storage_host() -> None:
"""My storage host commands."""