Search code examples
openstack

Mapping from openstack cli to REST API


Is there a mapping of which REST APIs the openstack-cli uses for the various requests? Obviously, in all cases (?) it will use keystone to get a token and then it will go on and use the REST APIs of the various components to perform the request. It would be nice if which APIs -- or at least which component(s) -- the request was using.

I'm wanting this to debug a particular component. Lets say I have an issue with Cinder. Its not obvious to me which openstack CLI commands would use Cinder and which APIs. It would be nice if I could look through a list and say "Oh!! 'openstack get foo bar deluxe' will exercise that particular API" (or a particular URI may be more accurate).


Solution

  • I dont think there is documentation for mapping openstackclient CLI to REST API. Typically a CLI could call more than one REST API to fetch the required information. Best resource for this mapping would be the source code itself. https://github.com/openstack/python-openstackclient

    On the other hand, I think the REST API documentation of OpenStack is pretty exhaustive and detailed. You can access the REST API from https://developer.openstack.org/api-guide/quick-start/