19 Commits

Author SHA1 Message Date
David Hu
e3d356476b Add keystone v3 CLI support
This change allows user domains and tenant/project domains to
be specified through CLI.  This is necessary because keystone
v2 API is deprecatedas of Icehouse.

Change-Id: I50187a12b73777118ee77590202746b272ecc030
2014-10-06 10:47:06 +00:00
Ruby Loo
91ff271e4c Add defaults to the CLI help strings
This modifies the help strings for timeout, os-service-type, and
os-endpoint-type arguments, to include the default values used.

Change-Id: I6bc9c243654b74550c60caf7fdb40e18addb3cd4
2014-09-16 14:40:27 +00:00
Jenkins
a6923debc8 Merge "handles keyboard interrupt" 2014-09-11 16:46:50 +00:00
Rakesh H S
ad8c27f8e0 handles keyboard interrupt
When an user intentionally provides an keyboard interrupt, ironicclient
throws the entire traceback on to the terminal instead of handling it.
ironicclient will now handle the keyboard interrrupt and provides an crisp
message on to the terminal.

Change-Id: I8e657dc0cf64fa3396fb8fd32c5ffb57016ce864
Closes-Bug: #1367283
2014-09-11 17:51:13 +05:30
Ruby Loo
70b27a083c Add 'bash-completion' to 'ironic help' response
If you do 'ironic' or 'ironic help', it will show a list of subcommands.
This adds 'bash-completion' to that list.

The 'ironic bash-completion' subcommand lists all of the commands.
It won't include 'bash-completion' in this list, to be consistent with
nova's and keystone's bash-completion subcommand.

Change-Id: I7f2b76ad2885d9fe34dc91a97ee77984a21a27f4
Closes-Bug: #1304488
2014-09-09 15:11:18 +00:00
Jenkins
25befcb5f9 Merge "Add bash completion support for ironic cli" 2014-07-15 18:58:11 +00:00
Ramakrishnan G
1155530941 Add bash completion support for ironic cli
This commit adds the 'bash-completion' option to
ironic cli which prints all sub-commands and
options, and bash_completion scripts for bash
auto completion.

Change-Id: Ide5b29e262b4217046f124d86902cd0abfdab1b6
Closes-Bug: 1332408
2014-07-09 22:50:12 +05:30
Andrey Kurilin
fb63911eb1 Remove aliases arg and env from utils
This patch removes aliases in `ironicclient.common.utils` and starts
to use directly `arg` and `env` functions from common code.

Change-Id: Ied396b767e623fbcbf0c7a32326be7b64132b3e1
2014-07-09 11:30:06 +03:00
Martin Geisler
af741ec223 Add UTF-8 coding lines to all Python files
While not strictly necessary for files containing only ASCII
characters, adding a line with "coding: utf-8" can guard against
future SyntaxError's in case someone inserts a Unicode literal.

This commit adds such lines to all .py files. The syntax used by this
commit works with Python (of course). It also works with Emacs, which
will recognize the special "-*-" marker and use the "coding" variable
to correctly decode the file, even in an environment where UTF-8 is
not the default file encoding.

Existing coding lines were normalized to match the new lines added.

Partial-bug: #1325193
Change-Id: I58bf93fea711fd25890356a397e594bd820c99e3
2014-05-31 13:22:44 +02:00
Lucas Alvares Gomes
1aec4586e2 Add missing i18n support
There are some exception messages in common/utils.py and shell.py that
does not support i18n, this patch update the code to support it.

Change-Id: I836b892075333d48e4d1591986fec1362c84fc61
Partial-bug: #1240402
2013-11-28 10:23:54 +00:00
Ghe Rivero
1b1dd31067 Reorder imports
As per hacking and PEP8, grouping third party libraries in
their own group.

http://www.python.org/dev/peps/pep-0008/#imports

Change-Id: I7a574d311b5171def0c6930162a46ce4c215097d
2013-11-11 18:12:58 +01:00
Jenkins
3446a9734d Merge "Transform print statement to print function" 2013-11-11 09:20:09 +00:00
Ghe Rivero
a6fd095e95 Transform print statement to print function
Needed to comply with new hacking>=0.8.0,<0.9 requirement.

Partial implement: blueprint py33-support

Change-Id: I478a47c814462a4f7edb0f389a00666bc901af77
2013-11-06 10:30:39 +01:00
Lucas Alvares Gomes
ce93dd5ce1 Add node-set-power-state to cli
Add the node-set-power-state command to allow changing the power state
of a node using the cli.

Change-Id: I176bfe54db84e1c5677f7955b9cf247f0d09be4e
2013-11-01 17:42:50 +00:00
Lucas Alvares Gomes
958652fcb4 Add short command line option
Add short command line option alternative for resources creation. This
patch also sacrifices the short option used for debug (-d) in place of
improve the user experience for the real user, developers who needs to
enable debug can still use the long form alternative (--debug).

Change-Id: I1588dc453e1c432fd372e07b87978a77faddcd1c
2013-10-03 11:45:48 +01:00
Lucas Alvares Gomes
913ffc3161 Improve help strings
Improve help strings, remove the upper and lower case mix, inform the
user that some fields are required, remove the period at the end of the
strings making them more uniform.

Change-Id: If5531e0f3161b74f29a80d61792746d561660f49
2013-10-03 11:03:54 +01:00
Lucas Alvares Gomes
489daf6710 Improve error feedback
When an error occur instead of just return the HTTP response code the
client will now try to extract the error message that contains the reason
of the problem and show it to the user in a user-friendly way (no codes
at all), the intention of this patch is to improve the usability of the
ironic client. Things like HTTP response codes can still be viewed when
used with the debug mode enabled ( -d ).

Change-Id: Ieca021cc0e0eabe91c13335c3062ef9622da3004
2013-10-02 16:41:53 +01:00
Lucas Alvares Gomes
3b901b0134 Split v1/shell.py into different files
Splitting v1/shell.py into one file per resource makes the code more
organized and in the long run helps to improve code readability.

Change-Id: Ia57019548158ffe33a1eca444405107caa327936
2013-09-26 11:24:26 +01:00
Lucas Alvares Gomes
ba073c0707 Basic project structure
Mostly taken from other OpenStack client projects and adapted for Ironic.

Change-Id: I1ef9613b9e24bbb6caac9657dc1da3add899478e
2013-09-19 00:21:14 +01:00