JoaoJandre opened a new pull request, #7446:
URL: https://github.com/apache/cloudstack/pull/7446

   ### Description
   
   Sometimes users have the need to move resources between domains, for 
example, in a big company, a department may be moved from one part of the 
company to another, changing the company's department hierarchy, the easiest 
way of reflecting this change on the company's cloud environment would be to 
move subdomains between domains, but currently ACS offers no option to do that. 
   This PR adds the `moveDomain` API,  which will move domains between 
subdomains. Furthermore, if the domain that is being moved has any subdomains, 
those will also be moved, maintaining the current subdomain tree.
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
   - [X] New feature (non-breaking change which adds functionality)
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [ ] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [x] Major
   - [ ] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [ ] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   ## Description of tests
   
   | Test | Result |
   | ------ | ------ |
   | Move an Inactive Domain | Error, as an inactive domain should not be able 
to be moved |
   | Move a Domain to a new inactive parent domain | Error, as a domain that  
is inactive should not receive any new children|
   | Move a domain to a new parent domain that has a child with the same name 
as the domain to be moved | Error, as two subdomains of the same domain should 
not have the same name |
   | Move Domain ROOT | Error, root domain by definition must always be the 
father of all other domains|
   | Move a domain that is already on the destination | Error, as it is already 
is were it should be |
   | Move a domain to itself (moved domain = new parent domain) | Error, as 
this makes no sense |
   | Move a domain that uses a shared network that is inaccessible to the new 
parent domain | Error, as the new parent domain must have access to all of its 
children's resources |
   | Move a domain that has a child subdomain that uses a shared network that 
is inaccessible to the new parent domain | Error, as the new parent domain must 
have access to all of its children's resources |
   | Move a domain that uses a affinity group that is inaccessible to the new 
parent domain | Error, as the new parent domain must have access to all of its 
children's resources |
   | Move a domain that has a child subdomain that uses a affinity group that 
is inaccessible to the new parent domain | Error,  as the new parent domain 
must have access to all of its children's resources|
   | Move a domain that owns a shared network | Success |
   | Move a domain that has a subdomain that owns a shared network | Success |
   | Move a domain that uses a shared network that is accessible to the new 
parent domain | Success |
   | Move a domain that has a subdomain that uses a shared network that is 
accessible to the new parent domain | Success |
   | Move a domain that owns an affinity group | Success |
   | Move a domain that has a subdomain that owns an affinity group | Success |
   | Move a domain that uses a affinity group that is accessible to the new 
parent domain | Success |
   | Move a domain that has a subdomain that uses a affinity group that is 
accessible to the new parent domain | Success |
   | Move a domain that exceeds the resource limits of the new parent domain | 
Success |
   
   
   All tests performed as expected. In the case of shared networks, all had 
subdomain access.
   
   For successful cases, it was checked whether the following attributes of the 
moved domain and its children were correctly changed:
   - Path
   - Level
   - Use of resources
   - Limits
   - Parent domain
   
   In addition, it was verified that the number of children of the current 
parent domain and the target domain were correctly accounted for.


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to