Authenticating to devstack and listing nova flavors + servers
Hi All, I am working on an api and would like to get some more context behinds authenticating into the api - so I am trying to get a list out of available flavors 1 and servers to start off with. I am able to get a token that I can interact with against keystone which shows up as https://mydevstackurl/identity/ <https://mydevstackurl/identity/> however when I try and run a simple curl against my compute as follows: curl -H "X-Auth-Token: $OS_TOKEN" -s https://http://mydevstackurl/compute/api/v2.1/servers <https://http//mydevstackurl/compute/api/v2.1/servers> I got no response back from curl - no 200 ,no 30x no 4xx nothing. Can anyone help to get me started ? The documents seem to be pretty detailed - but the methods provided don’t seem to work either in the tutorial: for example: curl -s -H "X-Auth-Token: $OS_TOKEN" \ $OS_COMPUTE_API/flavors \ | python -m json.tool Only returns: zsh: no matches found: http://mydevstackurl/identity/v3/auth/tokens?nocatalog <http://mydevstackurl/identity/v3/auth/tokens?nocatalog> Expecting value: line 1 column 1 (char 0) Thanks
On Sun, Mar 21, 2021 at 05:06:06PM -0400, Joe Wolfe wrote:
curl -s -H "X-Auth-Token: $OS_TOKEN" \ $OS_COMPUTE_API/flavors \ | python -m json.tool
Only returns:
zsh: no matches found: http://mydevstackurl/identity/v3/auth/tokens?nocatalog <http://mydevstackurl/identity/v3/auth/tokens?nocatalog> Expecting value: line 1 column 1 (char 0)
It looks like zsh coniders the "?" in the URL there as some sort of matching character, and can't find anything. Just quote the URL like "$OS_COMPUTE_API/flavors". In general devstack doesn't work with zsh, but I know some people use [1] for openrc import. -i [1] https://docs.openstack.org/devstack/victoria/faq.html#can-i-at-least-source-...
participants (2)
-
Ian Wienand
-
Joe Wolfe