Jump to: navigation, search

UnifiedCLI

Revision as of 22:31, 9 April 2012 by Dtroyer (talk)

UnifiedCLI

Status: DRAFT

Summary

A unified OpenStack CLI will provide users with an improved experience in dealing with the variety of commands and arguments required to operate OpenStack.

Release Note

The Unified CLI is intended to be a complete substitute for the bundles CLI binaries supplied with the OpenStack project lcient libraries. Its use is not mandatory, however it is intended to have a significantly better user experience.

Rationale

The user experience with OpenStack CLI tools is a frustrating one right now due to a number of inconsistencies between the varios tools, not to mention making a user know that keystone is the user/tenant tool and nova is the instance/flavor/image tools and glance is the image tools (but nova does that too!), etc.

At this point it seems fair to consider those tools to be the 'free sample cli' that comes bundled with the client libraries and ignore them in favor of a new unified in spirit, if not in implementation, OpenStack CLI interface.

It may not be possible (or reasonable) to gather the functionality of the various OpenStack clients into a single binary; in any case the existing binaries will be replaced with one or more binaries that have a uniform command structure and option usage. The intended model is similar to that used by git (multiple binaries front-ended by a single interface) or libvirt's virsh (a single monolithic binary that does everything) where they follow the form "cli-tool command arguments". In addition, the virsh-like mode of an embedded command line can be supported that would be able to speed up operations by caching authentication and other data between commands.

Goals

  • use consistient naming and strucutre for commands and arguments
  • use the OpenStack Python client API modules, extending them as required
  • use a single-binary approach that also contains an embedded command-line that can execute multiple commands on a single authentication (see libvirt's virsh for an example)
  • consistent output formats with the option of reliably machine parsable formats
  • independence from the OpenStack project names

Design

Command Structure

  • the top level command name is represented here with 'oscli'
  • sub-commands take the form:
    • oscli [<global-options>] <verb> <noun> [<object>] [<command-local-options>]

The existing command sets for Keystone, Nova, Glance and Quantum have been mapped into the new command format.

Command Arguments

  • All long options names shall use '-' as the interpolation character
  • Authentication options conform to the original CLIAuth with the exception as noted above ('-' chars)
  • All arguments are --argument=value

Other

  • arguments that normally require an ID in the OS-API may also use the name or other short identifier where reasonable to support
  • output option for character-delimited format, character can be specified, default to '|'

Implementation

Unresolved issues

  • Positional arguments are allowed where the common use case is obvious, with the --argument=value also being accepted

Other Information