8 Commits

Author SHA1 Message Date
M V P Nitesh
38e12731b0 Fixed wrap from taking negative values
Now for wrap input it will take only postive integers as an input and
if any negative numbers are give it will give output as "Wrap argument
should be a non-negative integer".

Change-Id: I39a175e5a30af9128514fef814c6d62d2c283e84
Closes-Bug: #1628797
2017-07-10 13:44:32 +00:00
Luong Anh Tuan
2a36c060bf TrivialFix Remove white space between print and ()
Remove white space between print and ()

Change-Id: Ib80d54c7a375384eb51458afe9929e24b556cdda
2016-09-26 12:50:05 +07:00
Aline Bousquet
87a072933e Fix error returned by ironic --json node-validate
The option --json used the attribute "_info" to print the JSON
response from Ironic API. Some objects do not have this attribute,
which results in an error. This patch stops relying on "_info" and
uses the fields names to build the JSON array.

Change-Id: I6c0ff73a38cda21e147b3216d0c0d0539cc867bb
Closes-Bug: #1558688
2016-06-27 09:41:38 +01:00
Dao Cong Tien
f463451c7a Fix typos in docstrings and comments
Change-Id: I56487bbe5c74fbd3e1d62918dbcf87dddf79a6e3
2016-04-06 09:56:49 +07:00
Aline Bousquet
01ff3dfd2a Improve output of --json option
Indent the output of commands when using the --json option. This patch
is a follow-up patch for https://review.openstack.org/#/c/283519/

Change-Id: Ieb3ffd8c362b37ad9b78bd3ecd98499b26c03bd0
2016-03-03 20:42:12 +00:00
Aline Bousquet
fda1854865 Add a JSON option to the client
Add a json option to list and show commands to return the JSON
response body from the Ironic API without formatting it.

Change-Id: Ic21c8ce1cc211816e309b4a00b6e89a0a8bf6a9d
Closes-Bug: #1436440
2016-03-02 11:29:40 +00:00
Lin Tan
8cfda12f3f Make print_list accept a list of dict
Print_list() only accept a list of objects, it is useful to accept
a list of dicts

Change-Id: Icd4e37c88e8f88e67e66f8212fe5ed22e1c19b24
2015-11-17 09:23:32 -08:00
Lin Tan
4d966622ef Sync with oslo-incubator
According to the latest agreement in Oslo team, apiclient and
clituils will be removed from Oslo incubator. We should keep
the local copy by ourselfs:
1. rename openstack/common/apiclient to common/apiclient
2. Because Ironic only use base.py and exception.py, so delete others.
3. rename openstack/common/cliutils.py to common/clituils.py
4. Delete openstack/common/_i18n becuase we have common/i18n.py
5. Delete openstack folder because it is empty
6. Add related unit tests and add oslotest to test-requirements.

Change-Id: I9eecd0457e86e82e65db1d0bc9a4c5c0ed4bbf74
2015-11-17 09:22:53 -08:00