5 Commits

Author SHA1 Message Date
He Jie Xu
4421ab10b8 Fix xml request doesn't work with unicode
Fix bug 1160704

* httplib2 doesn't work with unicode url and params. So encode all unicode
to utf-8 before request.
* Fix xml serializer doesn't work with unicode
* Decode command argument to unicode in main function
* Exception's message maybe include unicode, decode message to unicode
before logging or print.
* Sync the changing of serializer/deserilizer's code with quantum server code
  https://review.openstack.org/#/c/25482/
  https://review.openstack.org/#/c/25046/
  https://review.openstack.org/#/c/21410/
* Enable xml test

Change-Id: Ib140e34d54cc916e2ea172e4bad9e4a77388723a
2013-04-07 21:49:15 +08:00
gongysh
57f0e91836 Fix curl command for PUT and DELETE.
Bug #1076968

We print request curl command before HTTP request,
and response information after HTTP request.

Change-Id: I19840e8bd606a30389cd029c0add066c945fcdf6
2012-11-09 19:36:30 +08:00
Yong Sheng Gong
50c46f61d1 add --fixed-ip argument to create port
add --fixed-ip argument to create port and add list and dict type for unknow option
now we can use known option feature:
 quantumv2 create_port --fixed-ip subnet_id=<id>,ip_address=<ip>
--fixed-ip subnet_id=<id>, ip_address=<ip2> network_id
or unknown option feature:
one ip:
 quantumv2 create_port network_id --fixed_ips type=dict list=true subnet_id=<id>,ip_address=<ip>
two ips:
quantumv2 create_port network_id --fixed_ips type=dict subnet_id=<id>,ip_address=<ip> subnet_id=<id>,ip_address=<ip2>
to create port
Please download: https://review.openstack.org/#/c/8794/4 and
set core_plugin = quantum.db.db_base_plugin_v2.QuantumDbPluginV2 on quantum server side

Patch 2: support cliff 1.0
Patch 3: support specify auth strategy, for now, any other auth strategy than keystone will disable auth,
format port output
Patch 4: format None as '' when outputing, deal with list of dict, add QUANTUMCLIENT_DEBUG env to enable http req/resp print,
which is helpful for testing nova integration
Patch 5: fix interactive mode, and initialize_app problem

Change-Id: I693848c75055d1947862d55f4b538c1dfb1e86db
2012-06-25 18:19:18 +08:00
Yong Sheng Gong
dd803f8e26 add keystone support, new command interface, API v2.0
blueprint new-cli
Bug #1001053

Implement new commands interface, ready for v2.0. adopt cliff arch. new
client binary is quantumv2. After it is stable, we will remove quantum
binary. Httplibs2 is used.

usage: https://docs.google.com/document/d/1e_4UtnhFfgtnsB8EVB31BZKldaVzl_BlsGnGBrKmcDk/edit

Patch 2: add license header
Patch 3: add v1.0 support, fix show net details
Patch 4: quantumclient network api v2.0
Patch 5: subnet and port commands for api v2.0, add fields selector
Patch 6: add test cases
Patch 7: fix interactive mode, modify according to comments and https://review.openstack.org/#/c/8366/, add two tasks to BP: noauth and openstack common
Patch 8: fix log problem
Patch 9: modify according to the comments by dan on patch 5
Patch 10: just trigger jenkins
Patch 11: pep 1.3 fix
Patch 12: cliff and prettytable to more than 0.6.0
Patch 13: change setup.py to include more packages
Patch 14: pep check on jenkins
Patch 15: add license text to empty __init__.py files
Patch 16: fix v1.1 test cases after server changes

Change-Id: Ibbbdd834371c6a023b31e4797718fc0fe9786d89
2012-06-21 00:17:39 +08:00
Maru Newby
05c5a2b4a9 Remove server-specific functionality.
* Moved server-specific functionality found in quantum.common to
   the quantum repo.
 * Renamed primary package from quantum -> quantumclient.
 * Addresses bug 977711 and bug 921933

Change-Id: If34553924c8dfcc6b148c1d91f173a4b81eeb95a
2012-04-24 14:14:52 -07:00