forked from TrueCloudLab/frostfs-testlib
[#323] Update APE related entities
Signed-off-by: a.berezin <a.berezin@yadro.com>
This commit is contained in:
parent
8eaa511e5c
commit
0c9660fffc
2 changed files with 19 additions and 3 deletions
|
@ -26,6 +26,18 @@ class ObjectOperations(HumanReadableEnum):
|
|||
return [op for op in ObjectOperations if op != ObjectOperations.WILDCARD_ALL]
|
||||
|
||||
|
||||
class ContainerOperations(HumanReadableEnum):
|
||||
PUT = "container.put"
|
||||
GET = "container.get"
|
||||
LIST = "container.list"
|
||||
DELETE = "container.delete"
|
||||
WILDCARD_ALL = "container.*"
|
||||
|
||||
@staticmethod
|
||||
def get_all():
|
||||
return [op for op in ObjectOperations if op != ObjectOperations.WILDCARD_ALL]
|
||||
|
||||
|
||||
@dataclass
|
||||
class Operations:
|
||||
GET_CONTAINER = "GetContainer"
|
||||
|
@ -124,7 +136,7 @@ class Rule:
|
|||
|
||||
if not operations:
|
||||
self.operations = []
|
||||
elif isinstance(operations, ObjectOperations):
|
||||
elif isinstance(operations, (ObjectOperations, ContainerOperations)):
|
||||
self.operations = [operations]
|
||||
else:
|
||||
self.operations = operations
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue