Search code examples
cloudopenstackvirtualizationopenstack-api

OpenStack:What is the difference between using "CLI to the OpenStack APIs" and the separate APIs of the components?


What is the difference between:

  1. using "the Command-line interface to the OpenStack APIs" through the command "openstack"

and

  1. using the separate APIs of the different components (for example using the command-line interface to the Neutron APIs directly)?

Advantages and disadvantages?


Solution

  • I'm not quite sure, but what I have been observing recently is a community-wide effort to unify the syntax of the different OpenStack services (and hence the subtle differences between their APIs and CLIs (for instance the param --key-name in nova vs the param --keypair in magnum)).

    Thus I would say, since there is an effort to make the openstack command the de-facto standard, that it has more advantages (provided the individual clients are discontinued in the future). However, it really comes down to your preferences or your daily needs.

    I personally prefer using the openstack command since I find more intuitive to "find out" new subcommands I might not be aware of, specially when using the autocomplete:

    openstack complete > /tmp/completion && . /tmp/completion
    

    In addition, to find out the equivalents between the OpenStackClient (the openstack command) and the respecting CLIs, this list might be useful. It also shows which legacy commands have no equivalent in the openstack command