Jump to: navigation, search

Difference between revisions of "UnifiedCLI/Mapping"

(console)
(diagnostics)
Line 1,696: Line 1,696:
 
|}
 
|}
  
'''dns'''
+
==== dns ====
  
 +
''These commands need some attention...an IP shouldn't be required for all record types.  They need to be more DNS-y.  Zone anyone?''
 +
{| class="wikitable"
 +
|-
 +
! OSC Command !! Implemented !! !! Nova command
 +
|-
 +
|
 
<source lang="bash">
 
<source lang="bash">
nova dns-create [--type <type>] <ip> <name> <domain>
+
os create dns
 
+
    [--type <type>]
os create dns ...
+
    <ip>
 +
    <name>
 +
    <domain>
 +
</source>
 +
|| no
 +
|| ||
 +
<source lang="bash">
 +
nova dns-create
 +
    [--type <type>]
 +
    <ip>
 +
    <name>
 +
    <domain>
 +
</source>
 +
|-
 +
|
 +
<source lang="bash">
 +
os delete dns
 +
    <domain>
 +
    <name>
 +
</source>
 +
|| no
 +
|| ||
 +
<source lang="bash">
 +
nova dns-delete
 +
    <domain>
 +
    <name>
 +
</source>
 +
|-
 +
|
 +
<source lang="bash">
 +
os list dns
 +
    [--ip <ip>]
 +
    [--name <name>]
 +
    <domain>
 +
</source>
 +
|| no
 +
|| ||
 +
<source lang="bash">
 +
nova dns-list
 +
    [--ip <ip>]
 +
    [--name <name>]
 +
    <domain>
 
</source>
 
</source>
 
+
|-
 
+
|
 
<source lang="bash">
 
<source lang="bash">
nova dns-delete <domain> <name>
+
os create dns-domain
 
+
    [--project <project>]
os delete dns ...
+
    [--availability-zone <availability-zone>]
 +
    [--public | --private]
 +
    <domain>
 
</source>
 
</source>
 
+
|| no
 
+
|| ||
 
<source lang="bash">
 
<source lang="bash">
nova dns-list [--ip <ip>] [--name <name>] <domain>
+
nova dns-create-private-domain
 +
    [--availability_zone <availability_zone>]
 +
    <domain>
  
os list dns ...
+
nova dns-create-public-domain
 +
    [--project <project>]
 +
    <domain>
 
</source>
 
</source>
 
+
|-
 
+
|
'''dns-domain'''
 
 
 
 
<source lang="bash">
 
<source lang="bash">
nova dns-create-private-domain [--availability_zone <availability_zone>]
+
os delete dns-domain
                              <domain>
+
    <domain>
 
 
os create dns-domain [--private] ...
 
 
</source>
 
</source>
 
+
|| no
 
+
|| ||
'''dns-public-domain'''
 
 
 
 
<source lang="bash">
 
<source lang="bash">
nova dns-create-public-domain [--project <project>] <domain>
+
nova dns-delete-domain
 
+
    <domain>
os create dns-domain [--public] ...
 
 
</source>
 
</source>
 
+
|-
 
+
|
 
<source lang="bash">
 
<source lang="bash">
nova dns-delete-domain <domain>
+
os list dns-domains
 
 
os delete dns-domain ...
 
 
</source>
 
</source>
 
+
|| no
 
+
|| ||
 
<source lang="bash">
 
<source lang="bash">
 
nova dns-domains
 
nova dns-domains
 
os list dns-domains
 
 
</source>
 
</source>
 
+
|}
  
 
'''endpoints'''
 
'''endpoints'''

Revision as of 22:22, 23 April 2013

OpenStackClient Commands

Part of the UnifiedCLI proposal

[Note that the use of the word object here is its generic meaning as the target of an action.]

Command Structure

The OpenStackClient has a consistent and predictable format for all of its commands.

  • The top level command name is openstack
  • Sub-commands take the form:
openstack [<global-options>] <verb> <object> [<command-local-arguments>]

Command Arguments

  • All long options names shall use '-' as the interpolation character (--like-this)
  • Authentication options conform to a revised version of the original CLIAuth
  • Global arguments generally have a corresponding environment variable that may also be used to set the value. If both are present, the command-line option takes priority. The environment variable names can be derived from the option by dropping the leading '--', converting all embedded dashes ('-') to underscores ('_'), and converting to upper case.
  • Positional arguments trail command options. Some commands require two objects be acted upon, both objects will appear in the command object and both positional arguments appear in the same order as in the command object.

Verbs

The verbs used by the default OpenStack clients are defined below to provide a consistent meaning to each action. Many of them have logical opposite actions. Those verbs with an opposite action are noted in parens if applicable.

  • add (remove) - add an object to a container which itself is usually another object; the command is built in the order of "add object1 to object2" (<object1>-<object2>), the positional arguments also appear in that order
  • attach (detach) - connect two objects (is this different from add/remove?)
  • create (delete) - create a new occurrance of the specified object
  • delete (create) - delete a specific occurrance of the specified object
  • detach (attach) - disconnect two objects (is this different from add/remove?)
  • list - display summary information about multiple objects
  • lock (unlock)
  • migrate - move a server to a different host; --live performs a live migration if possible
  • pause (unpause) - stop a server and leave it in memory
  • reboot - forcibly reboot a server
  • rebuild - rebuild a server using (most of) the same arguments as in the original create
  • remove (add) - remove an object from a group of objects
  • rescue (unrescue) - reboot a server in a special rescue mode allowing access to the original disks
  • resize - change a server's flavor
  • resume (suspend) - return a suspended server to running state
  • save - download an object locally
  • set (unset) - set an attribute of the object, often called metadata
  • show - display detailed information about the specifiec object
  • ssh
  • suspend (resume) - stop a server and save to disk freeing memory
  • unlock (lock)
  • unpause (pause) - return a paused server to running state
  • unrescue (rescue) - return a server to normal boot mode
  • unset (set) - remove an attribute of the object

Global Options

The common global options from the default OpenStack clients have been mapped to the set of global options below.


OSC Option Environment Variable Option Environment Variable
--version --version
--help --help
--debug --debug
--quiet
--verbose
--log-file <filename>
--os-auth-url <url> OS_AUTH_URL --os-auth-url <url> OS_AUTH_URL
--os-tenant-name <name> OS_TENANT_NAME --os-tenant-name <name> OS_TENANT_NAME
--os-tenant-id <id> OS_TENANT_ID --os-tenant-id <id> OS_TENANT_ID
--os-username <name> OS_USERNAME --os-username <name> OS_USERNAME
--os-password <pw> OS_PASSWORD --os-password <pw> OS_PASSWORD
--os-region-name <region> OS_REGION_NAME --os-region-name <region> OS_REGION_NAME
--os-cacert <file> OS_CACERT --os-cacert <file> OS_CACERT
--insecure
--os-use-keyring

Common Options

A number of options will appear in many commands and should have the same form in all commands to the extent possible.

Option Description Usual Default
--description describes an object none
--enable Used for setting the enabled state for an object n/a
--disable Used for setting the enabled state for an object n/a

Command Mapping Summary

This is an example mapping of the existing commands from Keystone (Identity), Nova (Compute), Glance (Image) and Cinder (Volume) to the <verb> <object> form for the OpenStackClient cli tool. It reduces both the number of verbs and objects by handling some of the smaller differences with command line options.

Further consolidation could be achieved by additional options or by introduction secondary objects to the syntax. For example, the credentials and x509-cert (and x509-root-cert) objects could be combined:


nova x509-create-cert [<pk-file>] [<x509-cert>] os create credentials --x509 [<pk-file>] [<x509-cert>]
nova credentials os show credentials
nova x509-get-root-cert os show credentials --x509 --root


Identity

OSC Option Environment Variable Keystone Option Environment Variable
--os-identity-api-version <ver> OS_IDENTITY_API_VERSION --os-identity-api-version <ver> OS_IDENTITY_API_VERSION
--os-token <token> OS_TOKEN --os-token <token> OS_SERVICE_TOKEN
--os-url <url> OS_URL --os-endpoint <url> OS_SERVICE_ENDPOINT
--os-cert <file> OS_CERT
--os-key <key-file> OS_KEY
--os-cache OS_CACHE
--force-new-token
--stale-duration <seconds>


API v2.0

catalog

OSC Command Implemented Keystone command
os show service
    [--catalog <service-type>]
yes
keystone catalog
    [--service <service-type>]


ec2-credentials

OSC Command Implemented Keystone command
os create ec2-credentials
    --tenant_id <tenant-id>
    [--user <user-id>]
in progress
keystone ec2-credentials-create
    [--user <user-id>] 
    [--tenant_id <tenant-id>]
## are both args really optional?
os delete ec2-credentials
    <access-key>

## what changes if --user is not provided?
in progress
keystone ec2-credentials-delete
    [--user <user-id>] 
    --access <access-key>
os list ec2-credentials
    [--user <user-id>]
in progress
keystone ec2-credentials-list
    [--user <user-id>]
os show ec2-credentials
    <access-key>

## what changes if --user is not provided?
in progress
keystone ec2-credentials-get
    [--user <user-id>] 
    --access <access-key>

endpoint

OSC Command Implemented Keystone command
os create endpoint
    [--region <endpoint-region>
    [--publicurl <public-url>]
    [--adminurl <admin-url>]
    [--internalurl <internal-url>]
    <service>
yes
keystone endpoint-create
    [--region <endpoint-region>]
    [--service_id <service-id>]
    [--publicurl <public-url>]
    [--adminurl <admin-url>]
    [--internalurl <internal-url>]
os delete endpoint
    <endpoint-id>
yes
keystone endpoint-delete
    <endpoint-id>
os list endpoint
    [--long]
yes
keystone endpoint-list
os show endpoint
    [--type <endpoint-type>]
    [--attr <endpoint-attribute>] 
    [--value <endpoint-value>]
    [--all]
    <service>
yes
keystone endpoint-get
    --service <service-type>
    [--endpoint_type <endpoint-type>]
    [--attr <service-attribute>] 
    [--value <value>]


role

OSC Command Implemented Keystone command
os create role
    <role-name>
yes
keystone role-create --name
    <role-name>
os delete role
    <role>
yes
keystone role-delete
    <role-id>
os list role
yes
keystone role-list
os show role
    <role>
yes
keystone role-get
    <role-id>


service

OSC Command Implemented Keystone command
os create service
    [--type <service-type>]
    [--description <service-description>]
    <service-name>
yes
keystone service-create
    --name <name> 
    --type <type>
    [--description <service-description>]
os delete service
    <service>
yes
keystone service-delete
    <service-id>
os list service [--long]
yes
keystone service-list
os show service
    <service>
yes
keystone service-get
    <service-id>


tenant

OSC Command Implemented Keystone command
os create tenant
    [--description <tenant-description>]
    [--enable | --disable]
    <tenant-name>
yes
keystone tenant-create
    --name <tenant-name>
    [--description <tenant-description>]
    [--enabled <true|false>]
os delete tenant
    <tenant>
yes
keystone tenant-delete
    <tenant-id>
os list tenant
    [--long]
yes
keystone tenant-list
os set tenant
    [--name <new-tenant-name>]
    [--description <new-tenant-description>]
    [--enable | --disable]
    <tenant>
yes
keystone tenant-update
    [--name <tenant_name>]
    [--description <tenant-description>]
    [--enabled <true|false>]
    <tenant-id>
os show tenant
    <tenant>
yes
keystone tenant-get
    <tenant-id>


token

OSC Command Implemented Keystone command
os show token
    [--width <token-display-width>]
 ??
keystone token-get [--wrap <integer>]


user

OSC Command Implemented Keystone command
os create user 
    [--password <user-password>]
    [--email <user-email>]
    [--tenant <tenant>]
    [--enable | --disable]
    <user-name>
yes
keystone user-create
    --name <user-name> 
    [--tenant_id <tenant-id>]
    [--pass <pass>] 
    [--email <email>]
    [--enabled <true|false>]
os delete user
    <user>
yes
keystone user-delete
    <user-id>
os list user
    [--tenant <tenant>]
    [--long]
yes
keystone user-list
    [<tenant-id>]
os set user
    [--name <new-user-name>]
    [--password <user-password>]
    [--email <user-email>]
    [--tenant <tenant>]
    [--enable|--disable]
    <user>
yes
keystone user-password-update
    --pass <password>
    <user-id>
os show user
    <user>
yes
keystone user-get
    <user-id>


user-role

OSC Command Implemented Keystone command
os add role-user
    [--tenant <tenant>]
    <role> <user>
yes
keystone user-role-add
    --user <user-id>
    --role <role-id>
    [--tenant_id <tenant-id>]
os list role-user
    [--tenant <tenant>]
    [<user>]
yes
keystone user-role-list
    [--user <user-id>]
    [--tenant_id <tenant-id>]
os remove role-user
    [--tenant <tenant>]
    <role> <user>
yes
keystone user-role-remove
    --user <user-id>
    --role <role-id>
    [--tenant_id <tenant-id>]


<other>

keystone bootstrap
        --pass <password>
        [--user-name <user-name>]
        [--role-name <role-name>]
        [--tenant-name <tenant-name>]

## do not create in openstackclient, since it is in contribute


keystone discover

## do not create in openstackclient, obsolete.

API v3

credential

OSC Command Implemented Keystone command
os create credential
    [--project <project>]
    [--type ec2|cert]
    <user>
    <data>
yes
keystone credential-create
    --user_id <user-id>
    --type <credential-type>
    --data <credential-data>
    [--project_id <project-id>]
os delete credential
    <credential-id>
yes
keystone credential-delete
    <credential-id>
os list credential
yes
keystone credential-list
os set credential
    [--user <user>]
    [--type ec2|cert]
    [--data <data>]
    [--project <project>]
    <credential-id>
yes
keystone credential-update
    [--user <user>]
    [--type <type>]
    [--data <data>]
    [--project <project>]
    <credential-id>
os show credential
    <credential-id>
yes
keystone credential-get
    <credential-id>

domain

OSC Command Implemented Keystone command
os create domain
    [--description <domain-description>]
    [--enable | --disable]
    <domain-name>
yes
keystone domain-create
    --name <domain-name>
    [--description <domain-description>]
    [--enabled <true|false>]
    [--private_project_names <true|false>]
    [--private_user_names <true|false>]
os delete domain
    <domain>
yes
keystone domain-delete
    <domain-id>
os list domain
yes
keystone domain-list
os set domain
    [--name <new-domain-name>]
    [--description <new-domain-description>]
    [--enable | --disable]
    <domain>
yes
keystone domain-update
    [--name <domain_name>]
    [--description <domain-description>]
    [--enabled <true|false>]
    [--private_project_names <true|false>]
    [--private_user_names <true|false>]
    <domain-id>
os show domain
    <domain>
yes
keystone domain-get
    <domain-id>

endpoint

OSC Command Implemented Keystone command
os create endpoint
    [--region <endpoint-region>
    [--enable | --disable]
    <service>
    <interface admin|public|internal>
    <url>
yes
keystone endpoint-create 
    [--region <endpoint-region>
    [--enable | --disable]
    <service_id>
    <interface admin|public|internal>
    <url>
os delete endpoint
    <endpoint-id>
yes
os list endpoint
    [--long]
yes
keystone endpoint-list
os set endpoint
    [--interface <endpoint-interface>]
    [--url <endpoint-url>]
    [--service <service-id>]
    [--region <endpoint-region>]
    [--enable | --disable]
    <endpoint>
yes
keystone endpoint-set
    [--interface <endpoint-interface>]
    [--url <endpoint-url>]
    [--service <service-id>]
    [--region <endpoint-region>]
    [--enable | --disable]
    <endpoint>
os show endpoint
    <endpoint>
yes
keystone endpoint-get 
    <endpoint>

group

OSC Command Implemented Keystone command
os create group
    [--domain <domain>]
    [--description <group-description>]
    <group-name>
yes
keystone group-create
    --name <group-name>
    [--domain_id <domain-id>]
    [--description <group-description>]
os delete group
    <group>
yes
keystone group-delete
    <group-id>
os list group
    [--long]
yes
keystone group-list
os set group
    [--name <new-group-name>]
    [--domain <domain>]
    [--description <new-group-description>]
    <group>
yes
keystone group-update
    [--name <group_name>]
    [--domain_id <domain-id>]
    [--description <group-description>]
    <group-id>
os show group
    <group>
yes
keystone group-get
    <group-id>

policy

OSC Command Implemented Keystone command
os create policy
    [--type <policy-type>]
    --blob-file <blob-file>
yes
keystone policy-create
    --type <policy-type>
    --blob <policy-blob>
os delete policy
    <policy-id>
yes
keystone policy-delete
    <policy-id>
os list policy
    [--include-blob]
yes
keystone policy-list
os set policy
    [--type <policy-type>]
    [--blob-file<blob-file>]
    <policy-id>
yes
keystone policy-update
    [--type <policy-type>]
    [--blob <policy-blob>]
    <policy-id>
os show policy
    <policy-id>
yes
keystone policy-get
    <policy-id>

project

OSC Command Implemented Keystone command
os create project
    [--domain <project-domain>]
    [--description <project-description>]
    [--enable | --disable]
    <project-name>
yes
keystone project-create
    [--domain_id <domain_id>]
    [--description <description>]
    [--enable | --disable]
    <name>
os delete project
    <project>
yes
os project-delete
    <project_id>
os list project [--long]
yes
keystone project-list
os set project
    [--name <new-project-name>]
    [--domain <project-domain>]
    [--description <new-project-description>]
    [--enable | --disable]
    <project>
yes
keystone project-set
    [--name <new-project-name>]
    [--domain <project-domain>]
    [--description <new-project-description>]
    [--enable | --disable]
    <project_id>
os show project
    <project>
yes
keystone project-get
    <project_id>

role

OSC Command Implemented Keystone command
os add role
    [--user <user> | --group <group>]
    [--domain <domain> | --project <project>]
    <role>
yes
os create role
    <role-name>
yes
os delete role
    <role>
yes
os list role
yes
os list user-role
yes
os list group-role
yes
os remove role
    [--user <user> | --group <group>]
    [--domain <domain> | --project <project>]
    <role>
yes
os set role
    [--name <new-role-name>]
    <role>
yes
os show role
    <role>
yes

service

OSC Command Implemented Keystone command
os create service
	[--name <name>]
        [--enabled <true|false>]
        <type>
yes
keystone service-create
	[--name <name>]
        [--enabled <true|false>]
        <type>
os delete service
    <service>
yes
keystone service-delete
    <service_id>
os list service
yes
keystone service-list
os set service
    [--type <service-type>]
    [--name <new-name>]
    [--enable | --disable]
    <service>
yes
keystone service-set
    [--type <service-type>]
    [--name <new-name>]
    [--enable | --disable]
    <service>
os show service
    <service>
yes
keystone service-get 
    <service_id>

user

OSC Command Implemented Keystone command
os create user 
    [--password <password>] 
    [--project <project>]
    [--email <user-email>]
    [--enable | --disable]
    <name>
yes
keystone user-create
    --name <user-name> 
    [--domain_id <domain-id>]
    [--default_project_id <project-id>]
    [--description <description>]
    [--enabled <true|false>]
    [--password <password>]
os delete user
    <user>
yes
keystone user-delete
    <user-id>
os list user
    [--project <project>]
    [--long]
yes
keystone user-list
os set user
    [--name <new-name>]
    [--password <password>] 
    [--project <project>]
    [--email <user-email>]
    [--enable | --disable]
    <user>
yes
keystone user-update
    --user_id <user-id>
    [--name <user-name>]
    [--domain_id <domain-id>]
    [--default_project_id <project-id>]
    [--description <description>]
    [--enabled <true|false>]
    [--password <password>]
os show user
    <user>
yes
keystone user-get
    <user-id>

Compute

OSC Option Environment Variable Nova Option Environment Variable
--os-auth-system <auth-system> OS_AUTH_SYSTEM
--service-type <type>
--service-name <name> NOVA_SERVICE_NAME
--volume-service-name <name> NOVA_VOLUME_SERVICE_NAME
--endpoint-type <type> NOVA_ENDPOINT_TYPE
--os-compute-api-version <ver> OS_COMPUTE_API_VERSION --os-compute-api-version <ver> OS_COMPUTE_API_VERSION
--bypass-url <bypass-url>


API v2 (1.1)

agent

OSC Command Implemented Nova command
os create agent
    <os>
    <architecture>
    <version>
    <url>
    <md5hash>
    <hypervisor>
yes
os delete agent
    <id>
yes
os list agent
    [--hypervisor <hypervisor>]
yes
os set agent
    <id>
    <version>
    <url>
    <md5hash>
yes


aggregate

OSC Command Implemented Nova command
os add aggregate
    <aggregate>
    <host>
no
nova aggregate-add-host
    <id>
    <host>
os create aggregate
    <name>
    <availability_zone>
no
nova aggregate-create
    <name>
    <availability_zone>
os delete aggregate
    <aggregate>
no
nova aggregate-delete
    <id>
os list aggregate
no
nova aggregate-list
os remove aggregate
    <aggregate>
    <host>
no
nova aggregate-remove-host
    <id>
    <host>
os set aggregate
    [--name <new-name>]
    [--zone <availability-zone>]
    [--property <key=value>]
    <aggregate>
no
nova aggregate-update
    <id>
    <name>
    [<availability_zone>]

nova aggregate-set-metadata
    <id>
    <key=value>
    [<key=value> ...]
os show aggregate
    <aggregate>
no
nova aggregate-details
    <id>


bash-completion

OSC Command Implemented Nova command

TBD

no
nova bash-completion

cloudpipe

OSC Command Implemented Nova command
os create cloudpipe
    <project>
no
nova cloudpipe-create
    <project>
os list cloudpipe
no
nova cloudpipe-list

console

OSC Command Implemented Nova command
os show console-log
    [--lines <num-lines>]
    <server>
yes
nova console-log
    [--length <length>]
    <server>
os show console-url
    [--novnc | --xvpvnc | --spice]
    <server>
yes
nova get-vnc-console
    <server>
    <console_type>

credentials

This may be better handled as part of the Identity API

OSC Command Implemented Nova command
TBD
no
nova credentials

diagnostics

Consider implementing this as: show server --diagnostics <server>

OSC Command Implemented Nova command
os show diagnostics
    <server>
no
nova diagnostics
    <server>

dns

These commands need some attention...an IP shouldn't be required for all record types. They need to be more DNS-y. Zone anyone?

OSC Command Implemented Nova command
os create dns
    [--type <type>]
    <ip>
    <name>
    <domain>
no
nova dns-create
    [--type <type>]
    <ip>
    <name>
    <domain>
os delete dns
    <domain>
    <name>
no
nova dns-delete
    <domain>
    <name>
os list dns
    [--ip <ip>]
    [--name <name>]
    <domain>
no
nova dns-list
    [--ip <ip>]
    [--name <name>]
    <domain>
os create dns-domain
    [--project <project>]
    [--availability-zone <availability-zone>]
    [--public | --private]
    <domain>
no
nova dns-create-private-domain
    [--availability_zone <availability_zone>]
    <domain>

nova dns-create-public-domain
    [--project <project>]
    <domain>
os delete dns-domain
    <domain>
no
nova dns-delete-domain
    <domain>
os list dns-domains
no
nova dns-domains

endpoints

nova endpoints

os list endpoints

# does this overlap with keystone?

fixed-ip

OSC Command Implemented Nova command
os add fixed-ip
    <network>
    <server>
yes
nova add-fixed-ip
    <server>
    <network_id>
os remove fixed-ip
    <ip-address>
    <server>
yes
nova remove-fixed-ip
    <server>
    <address>


flavor

OSC Command Implemented Nova command
os create flavor
    [--id <id>]
    [--ram <size-mb>]
    [--disk <size-gb>]
    [--ephemeral-disk <size-gb>]
    [--swap <size-mb>]
    [--vcpus <num-cpu>]
    [--rxtx-factor <factor>]
    [--public | --private]
    <name>
(partial)
default: auto
default: 256M
default: 0G
default: 0G
default: 0G
default: 1
default: 1
default: public
nova flavor-create
    [--ephemeral <ephemeral>] 
    [--swap <swap>]
    [--rxtx-factor <factor>]
    <name>
    <id>
    <ram>
    <disk>
    <vcpus>
os delete flavor
    <flavor>
yes
nova flavor-delete 
    <id>
os list flavor
yes
nova flavor-list
os show flavor
    <flavor>
yes


floating-ip

OSC Command Implemented Nova command
os add floating-ip
    <ip-address>
    <server>
yes
nova add-floating-ip
    <server>
    <address>
os create floating-ip
    [<pool>]
yes
nova floating-ip-create
    [<floating_ip_pool>]
os delete floating-ip
    <ip-address>
yes
nova floating-ip-delete
    <address>
os list floating-ip
yes
nova floating-ip-list
os remove floating-ip
    <ip-address>
    <server>
yes
nova remove-floating-ip
    <server>
    <address>


floating-ip-pool

OSC Command Implemented Nova command
os list floating-ip-pool
yes
nova floating-ip-pool-list


host

OSC Command Implemented Nova command
os list host
    [--zone <availability-zone>]
yes
nova host-action
    [--action <action>]
    <hostname>
os set host
    ...
no
nova host-update
    [--status <status>] 
    [--maintenance <maintenance_mode>]
    <hostname>
os show host
    <host>
yes


hypervisor

OSC Command Implemented Nova command
os list hypervisor
    [--matching <hostname>]
yes
os show hypervisor
    <id>
yes


keypair

OSC Command Implemented Nova command
os create keypair
    [--public-key <file>]
    <name>
yes
nova keypair-add
    [--pub_key <pub_key>]
    <name>
os delete keypair
    <name>
yes
nova keypair-delete
    <name>
os list keypair
yes
nova keypair-list
os show keypair
    [--public-key]
    <name>
yes


limits

nova absolute-limits

os show limits --absolute
## is there any other kind?


quota

nova quota-defaults <tenant_id>
nova quota-show <tenant_id>

os show quota <tenant> [--defaults]


nova quota-update [--instances <instances>] 
                  [--cores <cores>]
                  [--ram <ram>] 
                  [--volumes <volumes>]
                  [--gigabytes <gigabytes>]
                  [--floating-ips <floating_ips>]
                  [--metadata-items <metadata_items>]
                  [--injected-files <injected_files>]
                  [--injected-file-content-bytes <injected_file_content_bytes>]
                  <tenant_id>

os set quota ...


quota-class

nova quota-class-show <class>

os show quota-class ...


nova quota-class-update [--instances <instances>] 
                        [--cores <cores>]
                        [--ram <ram>] 
                        [--volumes <volumes>]
                        [--gigabytes <gigabytes>]
                        [--floating-ips <floating_ips>]
                        [--metadata-items <metadata_items>]
                        [--injected-files <injected_files>]
                        [--injected-file-content-bytes <injected_file_content_bytes>]
                        <class>

os set quota-class ...


rate-limits

nova rate-limits

os show rate-limits


resource

nova describe-resource <hostname>

os show resource ...


secgroup

OSC Command Implemented Nova command
os add secgroup
    <secgroup>
    <server>
no
nova add-secgroup
    <server>
    <secgroup>
os create secgroup
    [--description <description>]
    <name>
yes
nova secgroup-create
    <name>
    <description>
os delete secgroup
    <secgroup>
yes
nova secgroup-delete
    <secgroup>
os list secgroup
    [--all-tenants]
yes
nova secgroup-list
     [--all-tenants [<0|1>]]
os remove secgroup
    <secgroup>
    <server>
no
nova remove-secgroup
    <server>
    <secgroup>

secgroup-group-rule

OSC Command Implemented Nova command
os create secgroup-group-rule
    [--proto <protocol>]
    [--port <port>:<port>]
    <source-group>
    <secgroup>
no
nova secgroup-add-group-rule
    [--ip_proto <ip_proto>]
    [--from_port <from_port>]
    [--to_port <to_port>]
    <secgroup>
    <source_group>
os delete secgroup-group-rule
    [--proto <protocol>]
    [--port <port>:<port>]
    <source-group>
    <secgroup>
no
nova secgroup-delete-group-rule
    [--ip_proto <ip_proto>]
    [--from_port <from_port>]
    [--to_port <to_port>]
    <secgroup>
    <source_group>

secgroup-rule

OSC Command Implemented Nova command
os create secgroup-rule
    [--proto <proto>]
    [--src-ip <ip-address>]
    [--src-port <port>]
    [--dst-port <port>]
    <secgroup>
no
nova secgroup-add-rule
    <secgroup>
    <ip_proto>
    <from_port>
    <to_port>
    <cidr>
os delete secgroup-rule
    [--proto <proto>]
    [--src-ip <ip-address>]
    [--src-port <port>]
    [--dst-port <port>]
    <secgroup>
no
nova secgroup-delete-rule
    <secgroup>
    <ip_proto>
    <from_port>
    <to_port>
    <cidr>
os list secgroup-rule
    <secgroup>
no
nova secgroup-list-rules
    <secgroup>

server

OSC Command Implemented Nova command
os create server
    --image <image>
    --flavor <flavor>
    [--security-group <security-group-list> [...] ]
    [--key-name <key-name>]
    [--meta-data <key=value> [...] ]
    [--file <dest-filename=source-filename>] [...] ]
    [--user-data <user-data>]
    [--availability-zone <zone-name>]
    [--block-device-mapping <dev-name=mapping> [...] ]
    [--nic <net-id=net-uuid,v4-fixed-ip=ip-addr> [...] ]
    [--hint <key=value> [...] ]
    [--config-drive <value>|True ]
    [--min <count>]
    [--max <count>]
    [--wait]
    <server-name>
yes
nova boot
    [--flavor <flavor>]
    [--image <image>]
    [--meta <key=value>]
    [--file <dst-path=src-path>]
    [--key_name <key_name>]
    [--user_data <user-data>]
    [--availability_zone <availability-zone>]
    [--security_groups <security_groups>]
    [--block_device_mapping <dev_name=mapping>]
    [--hint <key=value>]
    [--nic <net-id=net-uuid,v4-fixed-ip=ip-addr>]
    [--config-drive <value>]
    [--poll]
    <name>
os delete server
    <server>
yes
nova delete
    <server>
os list server
    [--reservation-id <reservation-id>] 
    [--ip <ip-regex>]
    [--ip6 <ip6-regex>] 
    [--name <name-regex>]
    [--instance-name <instance-name-regex>] 
    [--status <status>]
    [--flavor <flavor>]
    [--image <image>] 
    [--host <hostname>]
    [--all-tenants]
yes
nova list
    [--reservation_id <reservation_id>] 
    [--ip <ip_regexp>]
    [--ip6 <ip6_regexp>] 
    [--name <name_regexp>]
    [--instance_name <name_regexp>] 
    [--status <status>]
    [--flavor <flavor>] [--image <image>] 
    [--host <hostname>]
    [--all_tenants [<0|1>]]
os lock server
    <server>
no
nova lock
    <server>
os migrate server
    --live
    [--block_migrate]
    [--disk_over_commit]
    <server>
    <host>

os migrate server
    [--wait]
    <server>
no
nova live-migration
    [--block_migrate] 
    [--disk_over_commit]
    <server>
<host>

nova migrate
    [--poll]
    <server>
os pause server
    <server>
yes
nova pause
    <server>
os reboot server
    [--hard | --soft]
    [--wait]
    <server>
yes
nova reboot
    [--hard]
    [--poll]
    <server>
os rebuild server 
    --image <image>
    [--password <password>] 
    [--wait]
    <server>
yes
nova rebuild
    [--rebuild_password <rebuild_password>] 
    [--poll]
    <server>
    <image>
os rename server
    <server>
    <new-name>
no
nova rename
    <server>
    <name>
os rescue server
    <server>
no
nova rescue
    <server>
os resize server 
    --flavor <flavor>
    [--wait]
    <server>
no
nova resize
    [--poll]
    <server>
    <flavor>
os resize server
    --confirm
    <server>
no
nova resize-confirm
    <server>
os resume server
    <server>
yes
nova resume
    <server>
os set server
    --meta-data <key=value>
    [--meta-data <key=value>] ...
    <server>
os unset server
    --meta-data <key>
    [--meta-data <key>] ...
    <server>
no
nova meta
    <server>
    <action>
    <key=value>
    [<key=value> ...]
os set server
    --root-password
    <server>
no
nova root-password
    <server>
os show server
    <server>
yes
nova show
    <server>
os ssh server
    [--port PORT]
    --private]
    [--ipv6]
    [--login <login>]
    <server>
no
nova ssh
    [--port PORT]
    [--private]
    [--ipv6]
    [--login <login>]
    <server>
os suspend server
    <server>
yes
nova suspend
    <server>
os unlock server
    <server>
no
nova unlock
    <server>
os unpause server
    <server>
yes
nova unpause
    <server>
os unrescue server
    <server>
no
nova unrescue
    <server>


usage

nova usage-list [--start <start>] [--end <end>]

os list usage ...


volume

nova volume-attach <server> <volume> <device>

os attach volume ...
nova volume-detach <server> <volume>

os detach volume ...


x509-cert

nova x509-create-cert [<private_key_file>] [<x509_cert>]

os create x509-cert ...


x509-root-cert

nova x509-get-root-cert [<filename>]

os show x509-root-cert ...

Image

OSC Option Environment Variable Glance Option Environment Variable
--os-image-api-version <ver> OS_IMAGE_API_VERSION --os-image-api-version <ver> OS_IMAGE_API_VERSION
--os-service-type <type> OS_SERVICE_TYPE
--os-endpoint-type <type> OS_ENDPOINT_TYPE
--os-token <token> OS_TOKEN --os-auth-token <token> OS_AUTH_TOKEN
--os-url <url> OS_URL --os-image-url <url> OS_IMAGE_URL
--os-cacert <file> OS_CACERT
--cert-file <file> CERT_FILE
--key-file <key-file> KEY_FILE
--no-ssl-compression


API v1

image

OSC Command Implemented Glance command
os create image
    [--id <id>]
    [--store <store>]
    [--container-format <format>]
    [--disk-format <format>]
    [--owner <tenant>]
    [--size <size-bytes>]
    [--min-disk <disk-gb>]
    [--min-ram <ram-mg>]
    [--location <image-url>]
    [--copy-from <image-url>]
    [--file <local-filename>]
    [--checksum <checksum>]
    [--protected | --unprotected]
    [--public | --private]
    [--property <key=value>]
    <name>
yes
glance image-create
    [--id <IMAGE_ID>]
    [--name <NAME>]
    [--disk-format <CONTAINER_FORMAT>]
    [--container-format <DISK_FORMAT>]
    [--owner <TENANT_ID>]
    [--size <SIZE>]
    [--min-disk <DISK_GB>]
    [--min-ram <DISK_RAM>]
    [--location <IMAGE_URL>]
    [--checksum <CHECKSUM>]
    [--copy-from <IMAGE_URL>]
    [--public] [--protected]
    [--property <key=value>]

API v2

image

OSC Command Implemented Glance command
os delete image
    <id>
yes
glance image-delete
    <IMAGE_ID>


glance image-list

os list image ...


glance image-show <IMAGE_ID>

os show image ...


glance member-images [options] <MEMBER>

os list image --member <member> [options]


glance show [options] <ID>

os show image ...


glance update [options] <ID> <field1=value1 field2=value2 ...>

os set image ...


image-member

glance member-create [--can-share] <IMAGE_ID> <TENANT_ID>

os create image-member ...


glance member-delete <IMAGE_ID> <TENANT_ID>

os list image-member <image> [options]


glance member-delete [options] <ID> <MEMBER>

os delete image-member ...


glance member-list [--image-id <IMAGE_ID>] [--tenant-id <TENANT_ID>]

os list image-member ...

Volume

Cinder Option Environment Variable OSC Option Environment Variable
--os-volume-api-version <ver> OS_VOLUME_API_VERSION --os-volume-api-version <ver> OS_VOLUME_API_VERSION
--service-type <type>
--service-name <name> CINDER_SERVICE_NAME
--volume-service-name <name> CINDER_VOLUME_SERVICE_NAME
--endpoint-type <type> CINDER_ENDPOINT_TYPE
--retries <int>


API v1.0

quota

OSC Command Implemented Cinder command
os list quota
    <tenant>
yes
os set quota
    [--volumes] <new-volumes>]
    [--gigabytes <new-gigabytes>]
    <tenant>
yes
 cinder quota-update
    [--volumes <volumes>]
    [--snapshots <snapshots>]
    [--gigabytes <gigabytes>]
    <tenant_id>
os show quota
    <tenant>
yes
cinder quota-show
    <tenant_id>

snapshot

OSC Command Implemented Cinder command
os create snapshot
    --name <name>
    [--description <description>]
    [--force]
    <volume>
yes
cinder snapshot-create
    --force <True|False>
    --display-name <display-name>
    --display-description <display-description>
    <volume-id>
os delete snapshot
    <snapshot>
yes
cinder snapshot-delete
    <snapshot-id>
os list snapshot
yes (no opts yet)
cinder snapshot-list 
    --all-tenants [<0|1>]
    --display-name <display-name>
    --status <status>
    --volume-id <volume-id>
os set snapshot
    [--name <new-name>]
    [--description <new-description>]
    <snapshot>
yes
cinder snapshot-rename
    --display-description <display-description>
    --display-name <display-name>
    <snapshot-id>
os show snapshot
    <snapshot>
yes
cinder snapshot-show
    <snapshot-id>

volume

OSC Command Implemented Cinder command
os create volume
    --size <size>
    [--description <description>]
    [--volume-type <volume-type>]
    [--snapshot-id <snapshot-id>]
    [--source <volid>]
    [--image <image-id>]
    [--availability-zone <availability-zone>]
    [--metadata <key=value>]
    [--user <user>]           # admin only
    [--project <project>]     # admin only
    <name>
yes
cinder create
    [--snapshot-id <snapshot-id>]
    [--source-volid <source-volid>]
    [--image-id <image-id>]
    [--display-name <display-name>]
    [--display-description <display-description>]
    [--volume-type <volume-type>]
    [--availability-zone <availability-zone>]
    [--metadata <key=value>]
    <size>
os delete volume
    [--force]
    <volume>
yes
cinder delete
    <volume-id>

cinder force-delete
    <volume-id>
os list volume
    [--name <name>]
    [--status <status>]
    [--long]
    [--all-tenants]           # admin only
yes
cinder list 
    --all-tenants [<0|1>]
    --display-name <display-name>
    --status <status>
os set volume
    [--name <new-name>]
    [--description <new-description>]
    [--metadata <key=value>]
    <volume>
yes
cinder metadata
    <volume-id>
    <action>
    <key=value>

cinder rename
    --display-description <display-description>
    <volume-id>
    <display-name>
os show volume
    <volume>
yes
cinder show
    <volume-id>
os unset volume 
    [--metadata <key=value>]
    <volume>
yes

volume-type

OSC Command Implemented Cinder command
os create volume-type
    <name>
yes
cinder type-create
    <type-name>
os delete volume-type
    <volume-type>
yes
cinder type-delete
    <type-id>
os list volume-type
    [--long]
yes
cinder type-list 

cinder extra-specs-list
os set volume-type
    [--metadata <key=value>]
    <volume-type>
yes
cinder type-key
    <type-id>
    <set>
    <key=value>
os unset volume-type
    [--metadata <key=value>]
    <volume-type>
yes
cinder type-key
    <type-id>
    <unset>
    <key>

Network

quantum

Command-line Option Environment Variable
--host=HOST
--port=PORT
--ssl
--verbose
--logfile=LOGFILE
--token=TOKEN
--version=VERSION QUANTUM_VERSION


API v2.0

  • Verbs:
    • quantum: create, delete, list, plug, show, update, unplug
    • os: add, create, delete, list, remove, set, show
  • Objects:
    • quantum: iface, net, port
    • os: interface, network, port

iface

plug_iface <tenant-id> <net-id> <port-id> <iface-id>

add interface <tenant> <network> <port> <interface>


show_iface <tenant-id> <net-id> <port-id>

show interface <tenant> <network> <port>


unplug_iface <tenant-id> <net-id> <port-id>

remove interface <tenant> <network> <port>


net

create_net <tenant-id> <net-name>

create network <tenant> <network-name>


delete_net <tenant-id> <net-id>

delete <tenant> <network>


list_nets <tenant-id>

list network <tenant>


list_nets_detail <tenant-id>

list network --detail <tenant>


show_net <tenant-id> <net-id>

show network <tenant> <network>


show_net_detail <tenant-id> <net-id>

show network --detail <tenant> <network>


update_net <tenant-id> <net-id> <new-name>

set network <tenant> <network> --name <name>


port

create_port <tenant-id> <net-id>

create port <tenant> <network>


delete_port <tenant-id> <net-id> <port-id>

delete port <tenant> <network> <port>


list_ports <tenant-id> <net-id>

list port <tenant> <network>


list_ports_detail <tenant-id> <net-id>

list port --detail <tenant> <network>


show_port <tenant-id> <net-id> <port-id>

show port <tenant> <network> <port>


show_port_detail <tenant-id> <net-id> <port-id>

show port --detail <tenant> <network> <port>


update_port <tenant-id> <net-id> <port-id> <params>

set port <tenant> <network> <port> <params>


Options

In general, options will be transformed into more UNIX-like usage

  • --enable true|false becomes --enable|--disable

(dhellmann) Not all boolean options have natural antonyms like enable/disable. It may be more consistent to use a --flag --no-flag style naming convention to indicate the opposites of flags.

"(dtroyer) Yup, except i really don't like --no-enable. I'm going to work through the switch mapping to see how many others we really have to deal with."