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

   ### Description
   We used to use port 8096 to access admin api keys in a cloudstack simulator 
testing setup for ansible. But this stopped woring with an error since a 4.22. 
I think. I am not sure if this is the correct fix but leaving it for testing 
and feedback
   
   ```
   # cs getUserKeys id=$admin_id 
   CloudStack error: HTTP 530 response from CloudStack
   {
     "getuserkeysresponse": {
       "cserrorcode": 9999,
       "errorcode": 530,
       "errortext": "Cannot invoke 
\"org.apache.cloudstack.acl.apikeypair.ApiKeyPair.getUserId()\" because 
\"accessingKeyPair\" is null",
       "uuidList": []
     }
   }
   ```
   
   This is what we do:
   
   ```
   ## Install cs cloudstack cli
   $ pip install cs
   
   ## configure dummy login, 8096 does not need a real secret/key but the 
library want one
   $ export CLOUDSTACK_ENDPOINT=http://127.0.0.1:8096
   $ export CLOUDSTACK_SECRET=dummy
   $ export CLOUDSTACK_KEY=dummy
   
   ## query user id of admin account
   $ admin_id="$(cs listUsers account=admin | jq '.user[0].id')"
   $ echo $admin_id 
   "3988a617-a622-11f1-a89d-ee147cfcbd84"
   
   ## try to get real api keys:
   
   $ cs getUserKeys id=$admin_id 
   CloudStack error: HTTP 530 response from CloudStack
   {
     "getuserkeysresponse": {
       "cserrorcode": 9999,
       "errorcode": 530,
       "errortext": "Cannot invoke 
\"org.apache.cloudstack.acl.apikeypair.ApiKeyPair.getUserId()\" because 
\"accessingKeyPair\" is null",
       "uuidList": []
     }
   }
   ```
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [x] 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
   - [ ] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [x] Minor
   - [ ] Trivial
   
   ### Screenshots (if appropriate):
   
   ### How Has This Been Tested?
   
   Preparing for testing.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to