Add cli and contributor documents file.

Change-Id: I2a780d01bb08f7fdfb40a9ca7dc2ab126657e3ea
Signed-off-by: Yuanbin.Chen <cybing4@gmail.com>
This commit is contained in:
Yuanbin.Chen
2018-02-24 13:37:09 +08:00
parent 575cec8d05
commit b120ede1b7
3 changed files with 141 additions and 0 deletions

84
doc/source/cli/index.rst Normal file
View File

@@ -0,0 +1,84 @@
..
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
http://www.apache.org/licenses/LICENSE-2.0
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.
===================
Senlin CLI man page
===================
SYNOPSIS
========
The Senlin clustering service doesn't provide its own command line tool
since Queens release. Users are supposed to use :program:`openstack cluster`
commands instead. The python-senlinclient project is an implementation of the
OpenStackClient (OSC) plugin that interacts with the Senlin clustering service.
:program:`openstack` [options] <command> [command-options]
:program:`openstack help cluster`
DESCRIPTION
===========
The :program:`openstack cluster` command line utility interacts with OpenStack Cluster
Service (Senlin).
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_TENANT_NAME=myproject
export OS_AUTH_URL=http://auth.example.com:5000/v3
OPTIONS
=======
To get a list of available commands and options run::
openstack help cluster
To get usage and options of a command::
openstack help cluster <command>
EXAMPLES
========
Get help for profile create command::
openstack help cluster profile create
List all the profiles::
openstack cluster profile list
Create new profile::
openstack cluster profile create --spec-file cirros_basic.yaml PF001
Show a specific profile details::
openstack cluster profile show PF001
Create a node::
openstack cluster node create --profile PF001 NODE001
For more information, please see the senlin documentation.
`https://docs.openstack.org/senlin/latest/tutorial/basics.html`

View File

@@ -0,0 +1,55 @@
..
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
http://www.apache.org/licenses/LICENSE-2.0
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.
==================
SenlinClient Tests
==================
Unit Tests
==========
Senlinclient contains a suite of unit tests, in the senlinclient/tests/unit
directory.
Any proposed code change will be automatically rejected by the OpenStack
Jenkins server if the change causes unit test failures.
Running the tests
-----------------
There are a number of ways to run unit tests currently, and there's a
combination of frameworks used depending on what commands you use. The
preferred method is to use tox, which calls ostestr via the tox.ini file.
To run all tests simply run::
tox
This will create a virtual environment, load all the packages from
test-requirements.txt and run all unit tests as well as run flake8 and hacking
checks against the code.
Note that you can inspect the tox.ini file to get more details on the available
options and what the test run does by default.
Running a subset of tests using tox
-----------------------------------
One common activity is to just run a single test, you can do this with tox
simply by specifying to just run py27 or py35 tests against a single test::
tox -epy27 senlinclient.tests.unit.v1.test_node.TestNodeList.test_node_list_defaults
Or all tests in the test_node.py file::
tox -epy27 senlinclient.tests.unit.v1.test_node
For more information on these options and how to run tests, please see the
`ostestr documentation <https://docs.openstack.org/os-testr/latest/>`_.

View File

@@ -8,6 +8,8 @@ Contents:
:maxdepth: 2
install/index
contributor/index
cli/index
Indices and tables