more details for the instructions
Change-Id: I1f50866c84f1304670f6235e8fda917d252e8dec
This commit is contained in:
parent
d09735b806
commit
38c6c7d6d0
44
README.rst
44
README.rst
@ -11,16 +11,48 @@ Client for the IoTronic service.
|
||||
|
||||
Installing
|
||||
----------------------
|
||||
Clone the repo and install the client::
|
||||
|
||||
Clone the repo
|
||||
git clone https://github.com/openstack/python-iotronicclient.git
|
||||
cd python-iotronicclient
|
||||
pip install -r requirements.txt
|
||||
python setup.py install
|
||||
|
||||
``git clone https://github.com/openstack/python-iotronicclient.git``
|
||||
``cd python-iotronicclient``
|
||||
``pip install -r requirements.txt``
|
||||
``python setup.py install``
|
||||
Usage
|
||||
----------------------
|
||||
help::
|
||||
|
||||
iotronic --help
|
||||
|
||||
::
|
||||
|
||||
Command-line interface to the Iotronic API.
|
||||
|
||||
Positional arguments:
|
||||
<subcommand>
|
||||
board-create Register a new board with the Iotronic service.
|
||||
board-delete Unregister board(s) from the Iotronic service.
|
||||
board-list List the boards which are registered with the Iotronic
|
||||
service.
|
||||
board-show Show detailed information about a board.
|
||||
board-update Update information about a registered board.
|
||||
plugin-create Register a new plugin with the Iotronic service.
|
||||
plugin-delete Unregister plugin(s) from the Iotronic service.
|
||||
plugin-list List the plugins which are registered with the
|
||||
Iotronic service.
|
||||
plugin-show Show detailed information about a plugin.
|
||||
plugin-update Update information about a registered plugin.
|
||||
plugin-action Execute an action of the plugin.
|
||||
plugin-inject Inject a plugin into a board.
|
||||
plugin-remove Remove a plugin from a board.
|
||||
plugins-on-board Show information about a the plugins injected on a
|
||||
board.
|
||||
bash-completion Prints all of the commands and options for bash-
|
||||
completion.
|
||||
help Display help about this program or one of its
|
||||
subcommands.
|
||||
|
||||
|
||||
* Free software: Apache license
|
||||
* Source: http://git.openstack.org/cgit/openstack/python-iotronicclient
|
||||
* Bugs: http://bugs.launchpad.net/python-iotronicclient
|
||||
|
||||
|
@ -39,6 +39,7 @@ def _print_injected(injection, fields=None, json=False):
|
||||
default=False,
|
||||
help="Start the plugin on boot")
|
||||
def do_plugin_inject(cc, args):
|
||||
"""Inject a plugin into a board."""
|
||||
onboot = False
|
||||
if args.onboot:
|
||||
onboot = True
|
||||
@ -59,6 +60,7 @@ def do_plugin_inject(cc, args):
|
||||
metavar='<plugin>',
|
||||
help="Name or UUID of the plugin.")
|
||||
def do_plugin_remove(cc, args):
|
||||
"""Remove a plugin from a board."""
|
||||
try:
|
||||
cc.plugin_injection.plugin_remove(args.board, args.plugin)
|
||||
print(_('Removed plugin %(plugin)s from board %(board)s') % {
|
||||
@ -90,6 +92,7 @@ def do_plugin_remove(cc, args):
|
||||
metavar='<params_file>',
|
||||
help="Json file of parameters")
|
||||
def do_plugin_action(cc, args):
|
||||
"""Execute an action of the plugin."""
|
||||
params = {}
|
||||
if args.params_file:
|
||||
with open(args.params_file, 'r') as fil:
|
||||
@ -106,9 +109,9 @@ def do_plugin_action(cc, args):
|
||||
metavar='<id>',
|
||||
help="Name or UUID of the board ")
|
||||
def do_plugins_on_board(cc, args):
|
||||
"""Show information about a the plugins injected on a board."""
|
||||
fields = res_fields.PLUGIN_INJECT_RESOURCE_ON_BOARD.fields
|
||||
field_labels = res_fields.PLUGIN_INJECT_RESOURCE_ON_BOARD.labels
|
||||
"""Show detailed information about a board."""
|
||||
list = cc.plugin_injection.plugins_on_board(args.board)
|
||||
if list:
|
||||
cliutils.print_list(list, fields=fields,
|
||||
|
Loading…
x
Reference in New Issue
Block a user