Jump to: navigation, search


  1. Numbered list item

[Status: Proposal]

OpenStackClient keeps local state and configuration information in the usual UNIX manner in the current user's home directory.

Top Level


All of the files kept are below the ~/.openstack directory in the current user's home directory. This directory is not for the exclusive use of OpenStackClient, it happens to be the first to define the contents and use. As long as all files and directories are named with this in mind it should be a simple matter to avoid collisions. If this becomes commonly adopted it may make sense to extract a 'registry' of known nakes in ~/.openstack for common reference.



One current use by the legacy CLIs is for a bash-completion cache. Also anticipated is a local cache of UUID-Name mappings for numerous objects. If the cache files are stored in a portable format it is possible for them to be shared among multiple applications.

One consideration is cache files need to be separated according to the cloud and user credentials being used. For this reason the cache files are stored in a directory named as a hash of the endpoint and username being used in the request. [Note: it will be necessary to consider Domain at some point here.]

OpenStackClient Configuration


OpenStackClient did not originally have any stored configuration, getting everything it needed from the environment, command-line options and interactive prompts. This quickly becomes unwieldly as the number of clouds and user credentials rises above a few. Again, with a nod to UNIX tradition, this file is named ~/.openstackclient/oscrc.

The sorts of things stored in oscrc include any of the global command-line options, such as --os-username and --os-identity-api-version. One difference in the naming is the elimination of the --os- prefix, so a short file might look like:




OpenStackClient already uses ~/.openstack-keyring.cfg to store credentials when OS_USE_KEYRING=True. Currently the only change is to move the file here.