From 0ba4a73db336b47f8023036999aab4b24096458d Mon Sep 17 00:00:00 2001 From: "a.berezin" Date: Thu, 8 Aug 2024 18:34:46 +0300 Subject: [PATCH] [#279] Add objectID filter for APE Signed-off-by: a.berezin --- src/frostfs_testlib/storage/dataclasses/ape.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/frostfs_testlib/storage/dataclasses/ape.py b/src/frostfs_testlib/storage/dataclasses/ape.py index de1648e..b6563f4 100644 --- a/src/frostfs_testlib/storage/dataclasses/ape.py +++ b/src/frostfs_testlib/storage/dataclasses/ape.py @@ -48,6 +48,7 @@ class ConditionKey(HumanReadableEnum): ROLE = '"\\$Actor:role"' PUBLIC_KEY = '"\\$Actor:publicKey"' OBJECT_TYPE = '"\\$Object:objectType"' + OBJECT_ID = '"\\$Object:objectID"' class MatchType(HumanReadableEnum): @@ -80,6 +81,10 @@ class Condition: def by_object_type(*args, **kwargs) -> "Condition": return Condition(ConditionKey.OBJECT_TYPE, *args, **kwargs) + @staticmethod + def by_object_id(*args, **kwargs) -> "Condition": + return Condition(ConditionKey.OBJECT_ID, *args, **kwargs) + class Rule: def __init__(