From 96a1cc67f1b86ec066832df845d580498b48cda3 Mon Sep 17 00:00:00 2001 From: namrata Date: Wed, 25 Jul 2018 11:07:04 +0000 Subject: [PATCH] Doc: Add appcontainer action list and appcontainer action show Add command list documentation for the 'appcontainer action list' and 'appcontainer action show' commands and moved existing content on the doc-migration specification. Partially Implements: blueprint zun-cli-guide Change-Id: I08f569866b6c22f39c2fade6842ee35f4198a89f --- doc/source/cli/command-list.rst | 11 ++ doc/source/cli/command-objects/action.rst | 125 ++++++++++++++++++++++ doc/source/cli/index.rst | 91 ++-------------- doc/source/cli/man/zun.rst | 87 +++++++++++++++ 4 files changed, 230 insertions(+), 84 deletions(-) create mode 100644 doc/source/cli/command-list.rst create mode 100644 doc/source/cli/command-objects/action.rst create mode 100644 doc/source/cli/man/zun.rst diff --git a/doc/source/cli/command-list.rst b/doc/source/cli/command-list.rst new file mode 100644 index 00000000..9044f693 --- /dev/null +++ b/doc/source/cli/command-list.rst @@ -0,0 +1,11 @@ +.. _command-list: + +============ +Command List +============ + +.. toctree:: + :glob: + :maxdepth: 2 + + command-objects/* diff --git a/doc/source/cli/command-objects/action.rst b/doc/source/cli/command-objects/action.rst new file mode 100644 index 00000000..1d7ab097 --- /dev/null +++ b/doc/source/cli/command-objects/action.rst @@ -0,0 +1,125 @@ +=================== +appcontainer action +=================== + +An **appcontainer action** specifies the action details for a container. + +appcontainer action list +------------------------ + +List actions on a container + +.. program:: appcontainer action list +.. code:: bash + + openstack appcontainer action list [-h] + [-f {csv,json,table,value,yaml}] + [-c COLUMN] [--max-width ] + [--fit-width] [--print-empty] + [--noindent] + [--quote {all,minimal,none,nonnumeric}] + [--sort-column SORT_COLUMN] + + +.. describe:: + + ID or name of the container to list actions. + +.. option:: -h, --help + + show this help message and exit + +.. option:: -f {csv,json,table,value,yaml}, + --format {csv,json,table,value,yaml} + + the output format, defaults to table + +.. option:: -c COLUMN, --column COLUMN + + specify the column(s) to include, can be repeated + +.. option:: --sort-column SORT_COLUMN + + specify the column(s) to sort the data (columns + specified first have a priority, non-existing columns + are ignored), can be repeated + +.. option:: --max-width + + Maximum display width, <1 to disable. You can also use + the CLIFF_MAX_TERM_WIDTH environment variable, but the + parameter takes precedence. + +.. option:: --fit-width + + Fit the table to the display width. Implied if --max-width + greater than 0. Set the environment variable + CLIFF_FIT_WIDTH=1 to always enable + +.. option:: --print-empty + + Print empty table if there is no data to show. + +.. option:: --noindent + + whether to disable indenting the JSON + +.. option:: --quote {all,minimal,none,nonnumeric} + + when to include quotes, defaults to nonnumeric + +appcontainer action show +------------------------ + +Shows action + +.. program:: appcontainer action show +.. code:: bash + + openstack appcontainer action show [-h] + [-f {json,shell,table,value,yaml}] + [-c COLUMN] [--max-width ] + [--fit-width] [--print-empty] + [--noindent] [--prefix PREFIX] + + +.. describe:: + + ID or name of the container to show. + +.. describe:: + + request ID of action to describe. + +.. option:: -f {json,shell,table,value,yaml}, + --format {json,shell,table,value,yaml} + + the output format, defaults to table + +.. option:: -c COLUMN, --column COLUMN + + specify the column(s) to include, can be repeated + +.. option:: --max-width + + Maximum display width, <1 to disable. You can also use + the CLIFF_MAX_TERM_WIDTH environment variable, but the + parameter takes precedence. + +.. option:: --fit-width + + Fit the table to the display width. Implied if --max-width + greater than 0. Set the environment variable CLIFF_FIT_WIDTH + =1 to always enable + +.. option:: --print-empty + + Print empty table if there is no data to show. + +.. option:: --noindent + + whether to disable indenting the JSON + +.. option:: --prefix PREFIX + + add a prefix to all variable names diff --git a/doc/source/cli/index.rst b/doc/source/cli/index.rst index ce0300d4..d292c44c 100644 --- a/doc/source/cli/index.rst +++ b/doc/source/cli/index.rst @@ -1,86 +1,9 @@ -.. - Licensed under the Apache License, Version 2.0 (the "License"); you may - not use this file except in compliance with the License. You may obtain - a copy of the License at +==================== + User Documentation +==================== - http://www.apache.org/licenses/LICENSE-2.0 +.. toctree:: + :maxdepth: 2 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - License for the specific language governing permissions and limitations - under the License. - -================ -Zun CLI man page -================ - - -SYNOPSIS -======== - -Zun operation use `zun` command, and also support use `openstack` command. - -:program:`zun` [options] [command-options] - -:program:`openstack` appcontainer [command-options] - - -DESCRIPTION -=========== - -The :program:`zun` command line utility interacts with OpenStack Containers -Service (Zun). - -In order to use the CLI, you must provide your OpenStack username, password, -project (historically called tenant), and auth endpoint. You can use -configuration options `--os-username`, `--os-password`, `--os-tenant-name` or -`--os-tenant-id`, and `--os-auth-url` or set corresponding environment -variables:: - - export OS_USERNAME=user - export OS_PASSWORD=pass - export OS_PROJECT_NAME=myproject - export OS_AUTH_URL=http://auth.example.com:5000/v3 - export OS_USER_DOMAIN_ID=default - export OS_PROJECT_DOMAIN_ID=default - -OPTIONS -======= - -To get a list of available commands and options run:: - - zun help - -To get usage and options of a command:: - - zun help - -EXAMPLES -======== - -List all the containers:: - - zun list - -Create new container:: - - zun run --name container01 IMAGE01 - -Describe a specific container:: - - zun show container01 - -You can also use openstack command as follow. - -List all the containers:: - - openstack appcontainer list - -Create new container:: - - openstack appcontainer run --name container01 IMAGE01 - -Describe a specific container:: - - openstack appcontainer show container01 + Manual Page + command-list diff --git a/doc/source/cli/man/zun.rst b/doc/source/cli/man/zun.rst new file mode 100644 index 00000000..2fc0787d --- /dev/null +++ b/doc/source/cli/man/zun.rst @@ -0,0 +1,87 @@ +.. _manpage: + +================ +Zun CLI man page +================ + + +SYNOPSIS +======== + +Zun operation use `zun` command, and also support use `openstack` command. + +:program:`zun` [options] [command-options] + +:program:`openstack` appcontainer [command-options] + + +DESCRIPTION +=========== + +The :program:`zun` command line utility interacts with OpenStack Containers +Service (Zun). + +In order to use the CLI, you must provide your OpenStack username, password, +project (historically called tenant), and auth endpoint. You can use +configuration options `--os-username`, `--os-password`, `--os-tenant-name` or +`--os-tenant-id`, and `--os-auth-url` or set corresponding environment +variables:: + + export OS_USERNAME=user + export OS_PASSWORD=pass + export OS_PROJECT_NAME=myproject + export OS_AUTH_URL=http://auth.example.com:5000/v3 + export OS_USER_DOMAIN_ID=default + export OS_PROJECT_DOMAIN_ID=default + +OPTIONS +======= + +To get a list of available commands and options run:: + + zun help + +To get usage and options of a command:: + + zun help + +You can also use openstack command as follow. + +To get a list of available commands run:: + + openstack help appcontainer + +To get usage and options of a command:: + + openstack appcontainer --help + + + +EXAMPLES +======== + +List all the containers:: + + zun list + +Create new container:: + + zun run --name container01 IMAGE01 + +Describe a specific container:: + + zun show container01 + +You can also use openstack command as follow. + +List all the containers:: + + openstack appcontainer list + +Create new container:: + + openstack appcontainer run --name container01 IMAGE01 + +Describe a specific container:: + + openstack appcontainer show container01