xiaoyuyao commented on a change in pull request #920: HDDS-1545. Cli to 
add,remove,get and delete acls for Ozone objects. Contributed by Ajay Kumar.
URL: https://github.com/apache/hadoop/pull/920#discussion_r291381841
 
 

 ##########
 File path: hadoop-ozone/dist/src/main/smoketest/basic/ozone-shell.robot
 ##########
 @@ -60,6 +63,39 @@ Test ozone shell
                     Execute             ozone sh bucket delete 
${protocol}${server}/${volume}/bb1
                     Execute             ozone sh volume delete 
${protocol}${server}/${volume} --user bilbo
 
+Test Volume Acls
+    [arguments]     ${protocol}         ${server}       ${volume}
+    ${result} =     Execute             ozone sh volume create 
${protocol}${server}/${volume}
+                    Should not contain  ${result}       Failed
+    ${result} =     Execute             ozone sh volume getacl 
${protocol}${server}/${volume}
+    Should Match Regexp                 ${result}       \"type\" : 
\"USER\",\n.*\"name\" : \"[a-z]*[A-Z]*[0-9]*\",\n.*\"aclList\" : . \"ALL\" .
+    ${result} =     Execute             ozone sh volume addacl 
${protocol}${server}/${volume} -a user:superuser1:rwxy
+    ${result} =     Execute             ozone sh volume getacl 
${protocol}${server}/${volume}
+    Should Match Regexp                 ${result}       \"type\" : 
\"USER\",\n.*\"name\" : \"superuser1*\",\n.*\"aclList\" : . \"READ\", 
\"WRITE\", \"READ_ACL\", \"WRITE_ACL\"
+    ${result} =     Execute             ozone sh volume removeacl 
${protocol}${server}/${volume} -a user:superuser1:xy
+    ${result} =     Execute             ozone sh volume getacl 
${protocol}${server}/${volume}
+    Should Match Regexp                 ${result}       \"type\" : 
\"USER\",\n.*\"name\" : \"superuser1\",\n.*\"aclList\" : . \"READ\", \"WRITE\"
+    ${result} =     Execute             ozone sh volume setacl 
${protocol}${server}/${volume} -al user:superuser1:rwxy,group:superuser1:a
+    ${result} =     Execute             ozone sh volume getacl 
${protocol}${server}/${volume}
+    Should Match Regexp                 ${result}       \"type\" : 
\"USER\",\n.*\"name\" : \"superuser1*\",\n.*\"aclList\" : . \"READ\", 
\"WRITE\", \"READ_ACL\", \"WRITE_ACL\"
+    Should Match Regexp                 ${result}       \"type\" : 
\"GROUP\",\n.*\"name\" : \"superuser1\",\n.*\"aclList\" : . \"ALL\"
+
+Test Bucket Acls
+    [arguments]     ${protocol}         ${server}       ${volume}
+    ${result} =     Execute             ozone sh volume getacl 
${protocol}${server}/${volume}/bb1
 
 Review comment:
   this needs to be ozone sh bucket

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to