10 Commits

Author SHA1 Message Date
Lucas Alvares Gomes
11f7da97b6 Deal with unicode strings
The ironic client was trying to convert unicode strings received from the
API to ascii causing it to fail, this patch will correct it.

Change-Id: I8765abb188f758f982807a38f5d291fbc2be0da9
Closes-Bug: #1247156
2013-11-12 10:02:58 +00:00
Lucas Alvares Gomes
d82105652c Custom output file on the print_*() functions
In order to make the code more flexible and cleaner when testing (and
debugging) the print_*() functions can now redirect the output to a
different output file.

Change-Id: I34779220d80e037bdfe9e528ffad5187ff109ceb
2013-11-12 10:00:15 +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
Kui Shi
f88361e187 Sort the dict iterms
In Python 3.3, hash randomization is enabled by default. It causes the
iteration order of dicts and sets to be unpredictable and differ
across Python runs.

Partial implement: blueprint py33-support

Change-Id: I739bd9ee1cc10dc01d28efb9a4d2b840bc374d63
2013-10-17 17:21:18 +08:00
Kui Shi
ebb6b304e8 Replace basestring with six.string_types
Partial implement: blueprint py33-support

Change-Id: Ibf1c63d407698f37b333da8f90bbdedbd9512c75
2013-10-17 17:21:14 +08:00
Kui Shi
8fa5e71b47 Use six.iteritems() for dict
In Python 3, dict.iteritems() is not supported anymore.

Partial implement: blueprint py33-support

Change-Id: Iec357ce5c5a6d2ffe4085bf26569a926e92e735a
2013-10-17 17:21:10 +08:00
Kui Shi
2056e57243 Transform print statement to print function
Partial implement: blueprint py33-support

Change-Id: Iefeea112a1928b7069a9c35198ef4e9dce8a382a
2013-10-17 17:20:57 +08:00
Lucas Alvares Gomes
cc66495430 Implement *-update commands to resrouces
Added node-update, chassis-update and port-update commands for v1.

Change-Id: I051841fce2872f1e19f95117e8827d7a2b1b521c
2013-09-30 16:59:14 +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