You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "nvazquez (via GitHub)" <gi...@apache.org> on 2024/09/16 02:12:13 UTC

[I] [API] Internal DB IDs used as parameters [cloudstack]

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

   ##### ISSUE TYPE
    * Improvement Request
   
   ##### COMPONENT NAME
   ~~~
   API
   ~~~
   
   ##### CLOUDSTACK VERSION
   ~~~
   Any
   ~~~
   
   ##### CONFIGURATION
   N/A
   
   
   ##### OS / ENVIRONMENT
   N/A
   
   
   ##### SUMMARY
   The API accepts internal database IDs as well as UUIDs on the UUID parameters. For example:
   
   ````
   (nvs) 🐱 > list accounts id=c3d932e5-488c-11ef-a188-3e7340e5df3c filter=id,name
   {
     "account": [
       {
         "id": "c3d932e5-488c-11ef-a188-3e7340e5df3c",
         "name": "nicolas"
       }
     ],
     "count": 1
   }
   (nvs) 🐱 > list accounts id=2 filter=id,name
   {
     "account": [
       {
         "id": "c3d932e5-488c-11ef-a188-3e7340e5df3c",
         "name": "nicolas"
       }
     ],
     "count": 1
   }
   (nvs) 🐱 > list accounts id=3 filter=id,name
   {
     "account": [
       {
         "id": "eef0d0a3-8013-4c37-954d-eafb96716c95",
         "name": "baremetal-system-account"
       }
     ],
     "count": 1
   }
   ````
   
   ##### EXPECTED RESULTS
   ~~~
   ERROR - only UUIDs must be accepted
   ~~~
   
   ##### ACTUAL RESULTS
   ~~~
   Successful API response
   ~~~
   


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


Re: [I] [API] Internal DB IDs used as parameters [cloudstack]

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

   @nvazquez @DaanHoogland how about a global config to control the behaviour? Only pre-3.x (or the ones missing since annotation) APIs would allow internal DB IDs. I created a PR to control this. Default behaviour would continue


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


Re: [I] [API] Internal DB IDs used as parameters [cloudstack]

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

   Hi @shwstppr - I see this PR https://github.com/apache/cloudstack/pull/11976 has been closed, any plans to include it on 24.0?


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


Re: [I] [API] Internal DB IDs used as parameters [cloudstack]

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

   @DaanHoogland Root admin filter makes sense. But since will add an additional DB call to check the caller for each API/param I would want something like to keep track of the caller, https://github.com/apache/cloudstack/pull/11390


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


Re: [I] [API] Internal DB IDs used as parameters [cloudstack]

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

   Thanks @DaanHoogland. @nvazquez what he said ^^


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


Re: [I] [API] Internal DB IDs used as parameters [cloudstack]

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

   @shwstppr as #11390 is for main/23, shall we move this to milestone 23 as well?


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


Re: [I] [API] Internal DB IDs used as parameters [cloudstack]

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

   > 19\. Hi [@shwstppr](https://github.com/shwstppr) - I see this PR [#11976](https://github.com/apache/cloudstack/pull/11976) has been closed, any plans to include it on 24.0?
   
   @nvazquez , I rember @shwstppr closing this due to lack of involvement. you can reopen and test it. it still makes sense.


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


Re: [I] [API] Internal DB IDs used as parameters [cloudstack]

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

   @nvazquez isn't this just very convenient for admins? they have to look at the db and it would be very usefull for them to be able to use the DB ID instead of the UUID, at times. I can understand if we disable this for other users but would really like to keep the behaviour in for admins.


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


Re: [I] [API] Internal DB IDs used as parameters [cloudstack]

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

   yout PR looks good @shwstppr , I wonder though if we should only allow root admin to use the old behaviour?


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