rafaelweingartner commented on a change in pull request #2703: Fix concurrency 
problem when moving ACL rules with drag&drop
URL: https://github.com/apache/cloudstack/pull/2703#discussion_r202968019
 
 

 ##########
 File path: 
api/src/main/java/org/apache/cloudstack/api/command/user/network/MoveNetworkAclItemCmd.java
 ##########
 @@ -43,6 +43,9 @@
     @Parameter(name = ApiConstants.NEXT_ACL_RULE_ID, type = 
CommandType.STRING, description = "The ID of the rule that is right after the 
new position where the rule being moved is going to be placed. This value can 
be 'NULL' if the rule is being moved to the last position of the network ACL 
list.")
     private String nextAclRuleUuid;
 
+    @Parameter(name = ApiConstants.MOVE_ACL_CONSISTENCY_HASH, type = 
CommandType.STRING, description = "Md5 hash used to check the consistency of 
the ACL rule list before applying the ACL rule move. This check is useful to 
manage concurrency problems that may happen when multiple users are editing the 
same ACL rule listing. The parameter is not required. Therefore, if the user 
does not send it, he/she is assuming the risk of moving ACL rules without 
checking the consistency of the access control list before executing the move. 
We use MD5 hash function on a String that is composed of all UUIDs of the ACL 
rules in concatenated in their respective order (order defined via 'number' 
field).")
 
 Review comment:
   Yes, you are right. I tried to think of a better solution, but I could not 
come up with anything better: (
   
   I do not see much difficulty to use it programmatically. However, I do see 
the problem with cloudmonkey or other similar tools if they do not provide some 
out of the box enabler methods.  On the bright side, ACS UI works like a charm 
without any burden to operators or users.
   
   BTW: I am always open to suggestions!
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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

Reply via email to