-
Notifications
You must be signed in to change notification settings - Fork 175
Expand file tree
/
Copy pathbase.py
More file actions
69 lines (48 loc) · 1.6 KB
/
base.py
File metadata and controls
69 lines (48 loc) · 1.6 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
from typing import override
from ai.backend.common.data.permission.types import EntityType
from ai.backend.manager.actions.action import BaseAction
from ai.backend.manager.actions.action.scope import BaseScopeAction, BaseScopeActionResult
from ai.backend.manager.actions.action.single_entity import (
BaseSingleEntityAction,
BaseSingleEntityActionResult,
)
from ai.backend.manager.actions.action.types import FieldData
class GroupAction(BaseAction):
@override
@classmethod
def entity_type(cls) -> EntityType:
return EntityType.GROUP
class GroupScopeAction(BaseScopeAction):
@override
@classmethod
def entity_type(cls) -> EntityType:
return EntityType.GROUP
class GroupScopeActionResult(BaseScopeActionResult):
pass
class GroupSingleEntityAction(BaseSingleEntityAction):
@override
@classmethod
def entity_type(cls) -> EntityType:
return EntityType.GROUP
@override
def field_data(self) -> FieldData | None:
return None
class GroupSingleEntityActionResult(BaseSingleEntityActionResult):
pass
class ProjectScopeAction(BaseScopeAction):
@override
@classmethod
def entity_type(cls) -> EntityType:
return EntityType.PROJECT
class ProjectScopeActionResult(BaseScopeActionResult):
pass
class ProjectSingleEntityAction(BaseSingleEntityAction):
@override
@classmethod
def entity_type(cls) -> EntityType:
return EntityType.PROJECT
@override
def field_data(self) -> FieldData | None:
return None
class ProjectSingleEntityActionResult(BaseSingleEntityActionResult):
pass