(#97) Common ACL variables

Signed-off-by: EliChin <elizaveta@nspcc.ru>
This commit is contained in:
EliChin 2021-08-27 12:18:00 +03:00 committed by Elizaveta Chichindaeva
parent 11c4f21faa
commit ea6a01b3de
5 changed files with 15 additions and 7 deletions

View file

@ -1,19 +1,20 @@
*** Settings *** *** Settings ***
Variables ../../../variables/common.py Variables ../../../variables/common.py
Variables ../../../variables/acl.py
*** Keywords *** *** Keywords ***
Create Containers Create Containers
Log Create Private Container Log Create Private Container
${PRIV_CID_GEN} = Create container ${USER_KEY} 0x18888888 ${COMMON_PLACEMENT_RULE} ${PRIV_CID_GEN} = Create container ${USER_KEY} ${PRIVATE_ACL} ${COMMON_PLACEMENT_RULE}
Container Existing ${USER_KEY} ${PRIV_CID_GEN} Container Existing ${USER_KEY} ${PRIV_CID_GEN}
Log Create Public Container Log Create Public Container
${PUBLIC_CID_GEN} = Create container ${USER_KEY} 0x1FFFFFFF ${COMMON_PLACEMENT_RULE} ${PUBLIC_CID_GEN} = Create container ${USER_KEY} ${PUBLIC_ACL} ${COMMON_PLACEMENT_RULE}
Container Existing ${USER_KEY} ${PUBLIC_CID_GEN} Container Existing ${USER_KEY} ${PUBLIC_CID_GEN}
Log Create Read-Only Container Log Create Read-Only Container
${READONLY_CID_GEN} = Create container ${USER_KEY} 0x1FFF88FF ${COMMON_PLACEMENT_RULE} ${READONLY_CID_GEN} = Create container ${USER_KEY} ${READONLY_ACL} ${COMMON_PLACEMENT_RULE}
Container Existing ${USER_KEY} ${READONLY_CID_GEN} Container Existing ${USER_KEY} ${READONLY_CID_GEN}
Set Global Variable ${PRIV_CID} ${PRIV_CID_GEN} Set Global Variable ${PRIV_CID} ${PRIV_CID_GEN}

View file

@ -1,5 +1,6 @@
*** Settings *** *** Settings ***
Variables ../../../variables/common.py Variables ../../../variables/common.py
Variables ../../../variables/acl.py
*** Variables *** *** Variables ***
${FILE_USR_HEADER} = key1=1,key2=abc ${FILE_USR_HEADER} = key1=1,key2=abc
@ -16,8 +17,8 @@ Create Container Public
Create Container Inaccessible Create Container Inaccessible
Log Create Inaccessible Container Log Create Inaccessible Container
${PUBLIC_CID_GEN} = Create container ${USER_KEY} 0x40000000 ${COMMON_PLACEMENT_RULE} ${INACCESSIBLE_CID_GEN} = Create container ${USER_KEY} ${INACCESSIBLE_ACL} ${COMMON_PLACEMENT_RULE}
[Return] ${PUBLIC_CID_GEN} [Return] ${INACCESSIBLE_CID_GEN}
Generate file Generate file

View file

@ -1,5 +1,6 @@
*** Settings *** *** Settings ***
Variables ../../../variables/common.py Variables ../../../variables/common.py
Variables ../../../variables/acl.py
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py Library ../${RESOURCES}/payment_neogo.py
@ -21,7 +22,7 @@ Delete Containers
${WALLET_OTH} ${ADDR_OTH} ${OTHER_KEY} = Init Wallet with Address ${ASSETS_DIR} ${WALLET_OTH} ${ADDR_OTH} ${OTHER_KEY} = Init Wallet with Address ${ASSETS_DIR}
Payment Operations ${ADDR_OTH} ${OTHER_KEY} Payment Operations ${ADDR_OTH} ${OTHER_KEY}
${CID} = Create container ${USER_KEY} 0x1FFFFFFF ${COMMON_PLACEMENT_RULE} ${CID} = Create container ${USER_KEY} ${PUBLIC_ACL} ${COMMON_PLACEMENT_RULE}
Container Existing ${USER_KEY} ${CID} Container Existing ${USER_KEY} ${CID}
Run Keyword And Expect Error * Run Keyword And Expect Error *

View file

@ -1,5 +1,6 @@
*** Settings *** *** Settings ***
Variables ../../../variables/common.py Variables ../../../variables/common.py
Variables ../../../variables/acl.py
Library Collections Library Collections
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
@ -28,7 +29,7 @@ Duplicated Object Attributes
${WALLET} ${ADDR} ${USER_KEY} = Init Wallet with Address ${ASSETS_DIR} ${WALLET} ${ADDR} ${USER_KEY} = Init Wallet with Address ${ASSETS_DIR}
Payment Operations ${ADDR} ${USER_KEY} Payment Operations ${ADDR} ${USER_KEY}
${PUBLIC_CID} = Create container ${USER_KEY} 0x1FFFFFFF ${POLICY} ${EMPTY} ${PUBLIC_CID} = Create container ${USER_KEY} ${PUBLIC_ACL} ${POLICY} ${EMPTY}
${FILE_S} = Generate file of bytes ${SIMPLE_OBJ_SIZE} ${FILE_S} = Generate file of bytes ${SIMPLE_OBJ_SIZE}

4
robot/variables/acl.py Normal file
View file

@ -0,0 +1,4 @@
PUBLIC_ACL = "0x1FFFFFFF"
PRIVATE_ACL = "0x18888888"
READONLY_ACL = "0x1FFF88FF"
INACCESSIBLE_ACL = "0x40000000 "