You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "sbrueseke (via GitHub)" <gi...@apache.org> on 2023/03/23 13:06:26 UTC

[GitHub] [cloudstack] sbrueseke opened a new issue, #7362: api call listRoles name filter not working as expected

sbrueseke opened a new issue, #7362:
URL: https://github.com/apache/cloudstack/issues/7362

   <!--
   Verify first that your issue/request is not already reported on GitHub.
   Also test if the latest release and main branch are affected too.
   Always add information AFTER of these HTML comments, but no need to delete the comments.
   -->
   
   ##### ISSUE TYPE
   <!-- Pick one below and delete the rest -->
    * Bug Report
   
   ##### COMPONENT NAME
   <!--
   Categorize the issue, e.g. API, VR, VPN, UI, etc.
   -->
   ~~~
   API
   ~~~
   
   ##### CLOUDSTACK VERSION
   <!--
   New line separated list of affected versions, commit ID for issues on main branch.
   -->
   
   ~~~
   4.18.0.0
   ~~~
   
   ##### CONFIGURATION
   <!--
   Information about the configuration if relevant, e.g. basic network, advanced networking, etc.  N/A otherwise
   -->
   
   
   ##### OS / ENVIRONMENT
   <!--
   Information about the environment if relevant, N/A otherwise
   -->
   
   
   ##### SUMMARY
   <!-- Explain the problem/feature briefly -->
   When using parameter name with api call listRoles it lists all roles which have the value of name in the actual name instead of the roles with the exact value of name. Parameter keyword should be used to filter when wanting to find all roles where the value is part of the name.
   
   ##### STEPS TO REPRODUCE
   <!--
   For bugs, show exactly how to reproduce the problem, using a minimal test-case. Use Screenshots if accurate.
   
   For new features, show how the feature would be used.
   -->
   
   <!-- Paste example playbooks or commands between quotes below -->
   ~~~
   Create a new role with name "New Domain Admin".
   Do the following api call: /client/api/?command=listRoles&name=Domain%20Admin&response=json
   ~~~
   
   <!-- You can also paste gist.github.com links for larger files -->
   
   ##### EXPECTED RESULTS
   <!-- What did you expect to happen when running the steps above? -->
   
   ~~~
   You should only get 1 result back. The result should be the default "Domain Admin" role.
   ~~~
   
   ##### ACTUAL RESULTS
   <!-- What actually happened? -->
   
   <!-- Paste verbatim command output between quotes below -->
   ~~~
   You get 2 results back. The default "Domain Admin" and the new created "New Domain Admin".
   ~~~
   


-- 
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-unsubscribe@cloudstack.apache.org.apache.org

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


[GitHub] [cloudstack] nvazquez commented on issue #7362: api call listRoles name filter not working as expected

Posted by "nvazquez (via GitHub)" <gi...@apache.org>.
nvazquez commented on issue #7362:
URL: https://github.com/apache/cloudstack/issues/7362#issuecomment-1491708024

   Thanks @harikrishna-patnala, I was not using the latest version on my test env, have verified on 4.18 and is fixed as you mentioned (https://github.com/apache/cloudstack/pull/6032)


-- 
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-unsubscribe@cloudstack.apache.org

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


[GitHub] [cloudstack] harikrishna-patnala commented on issue #7362: api call listRoles name filter not working as expected

Posted by "harikrishna-patnala (via GitHub)" <gi...@apache.org>.
harikrishna-patnala commented on issue #7362:
URL: https://github.com/apache/cloudstack/issues/7362#issuecomment-1491257721

   @nvazquez listVMs was fixed later. It is listing with exact name, I've checked the code as well.
   
   (localcloud) 🐱 > list virtualmachines name=TestVM filter=id,name
   {
     "count": 1,
     "virtualmachine": [
       {
         "id": "f4ff60b2-d17a-46af-bb16-caa8d2221dd5",
         "name": "TestVM"
       }
     ]
   }
   (localcloud) 🐱 > list virtualmachines name=Test filter=id,name
   (localcloud) 🐱 > 
   (localcloud) 🐱 > 
   (localcloud) 🐱 > list virtualmachines name=test filter=id,name
   (localcloud) 🐱 > 
   
   


-- 
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-unsubscribe@cloudstack.apache.org

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


[GitHub] [cloudstack] rohityadavcloud closed issue #7362: api call listRoles name filter not working as expected

Posted by "rohityadavcloud (via GitHub)" <gi...@apache.org>.
rohityadavcloud closed issue #7362: api call listRoles name filter not working as expected
URL: https://github.com/apache/cloudstack/issues/7362


-- 
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-unsubscribe@cloudstack.apache.org

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


[GitHub] [cloudstack] kiranchavala commented on issue #7362: api call listRoles name filter not working as expected

Posted by "kiranchavala (via GitHub)" <gi...@apache.org>.
kiranchavala commented on issue #7362:
URL: https://github.com/apache/cloudstack/issues/7362#issuecomment-1488035070

   Able to reproduce the issue 
   
   (scmk) 🐱 > list roles  name=Domain Admin response=json
   {
     "count": 2,
     "role": [
       {
         "description": "Default domain admin role",
         "id": "2acbd609-cdea-11ed-b8aa-1e000a0003b1",
         "isdefault": true,
         "name": "Domain Admin",
         "type": "DomainAdmin"
       },
       {
         "description": "New Domain Admin",
         "id": "ae9b8992-e5f2-45a5-8adb-26c1bd0209aa",
         "isdefault": false,
         "name": "New Domain Admin",
         "type": "DomainAdmin"
       }
     ]
   }
   


-- 
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-unsubscribe@cloudstack.apache.org

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


[GitHub] [cloudstack] rohityadavcloud commented on issue #7362: api call listRoles name filter not working as expected

Posted by "rohityadavcloud (via GitHub)" <gi...@apache.org>.
rohityadavcloud commented on issue #7362:
URL: https://github.com/apache/cloudstack/issues/7362#issuecomment-1503771835

   Fixed in https://github.com/apache/cloudstack/pull/7384


-- 
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-unsubscribe@cloudstack.apache.org

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


[GitHub] [cloudstack] harikrishna-patnala commented on issue #7362: api call listRoles name filter not working as expected

Posted by "harikrishna-patnala (via GitHub)" <gi...@apache.org>.
harikrishna-patnala commented on issue #7362:
URL: https://github.com/apache/cloudstack/issues/7362#issuecomment-1491258568

   I've created a new PR to fix roles search (in UI as well). Along with that I've fixed other scenarios where keyword is already there, I made the name to be exact search https://github.com/apache/cloudstack/pull/7384


-- 
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-unsubscribe@cloudstack.apache.org

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


[GitHub] [cloudstack] nvazquez commented on issue #7362: api call listRoles name filter not working as expected

Posted by "nvazquez (via GitHub)" <gi...@apache.org>.
nvazquez commented on issue #7362:
URL: https://github.com/apache/cloudstack/issues/7362#issuecomment-1490538368

   Hi @sbrueseke @kiranchavala, I was checking the name paramenter behaviour on listVirtualMachines and it does not retrieve the exact VM name when I set it. For example, check this:
   
   ````
   (localcloud) 🐱 > list virtualmachines name=test filter=id,name
   {
     "count": 1,
     "virtualmachine": [
       {
         "id": "096fc02b-fe71-41e8-bc81-412d2e31b70d",
         "name": "TestVM"
       }
     ]
   }
   ````
   
   That makes me wonder if this is a bug or not, what do you think?


-- 
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-unsubscribe@cloudstack.apache.org

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