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

   ### Description
   
   This PR adds a command to mark a Management Server as removed on the 
database only if its status is marked as `Down`. To execute the command, it is 
obligatory to inform the `id` of the targeted MS.
   
   ### 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)
   - [ ] build/CI
   - [ ] test (unit or integration test code)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [x] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [ ] Minor
   - [ ] Trivial
   
   ### How Has This Been Tested?
   
   In a local lab, I added an MS through the database.
   
   - With State="Down" I executed through CMK `remove managementserver 
id=<uuid>` and verified that the MS wasn't being listed on the UI and was 
marked as `Removed` on the database.
   - With State="Up" I executed the same command and verified an error was 
returned informing it wasn't possible to remove an MS which state was marked as 
"Up".
   - With State="Down" I executed through a URL 
`http://<IP>:8080/client/api?command=removeManagementServer&response=json&id=<UUID>`
 and verified the MS was marked as removed and wasn't being listed on the UI.
   - With State="Up" I executed the same URL and received an error informing it 
wasn't possible to remove an MS which state was marked as "Up".
   - Trying to execute the command with a non-existent _id_ returns an error 
warning the request format may be invalid, the entity may not exist, or the 
parameter annotation may be wrong.
   - Trying to execute the command without an _id_, both in CMK and with a URL, 
returns an error informing the _id_ parameter is obligatory and it is missing.


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