diff --git a/README.rst b/README.rst index f249df5..43cf0c8 100644 --- a/README.rst +++ b/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: + + 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 - diff --git a/iotronicclient/v1/plugin_injection_shell.py b/iotronicclient/v1/plugin_injection_shell.py index d766be7..99e47c9 100644 --- a/iotronicclient/v1/plugin_injection_shell.py +++ b/iotronicclient/v1/plugin_injection_shell.py @@ -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='', 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='', 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='', 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,