summaryrefslogtreecommitdiff
path: root/quantumclient/tests/unit
Commit message (Collapse)AuthorAgeFilesLines
* Fix xml request doesn't work with unicodeHe Jie Xu2013-04-071-0/+45
| | | | | | | | | | | | | | | | | | 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
* Move tests to project rootAlessio Ababilov2013-04-0120-3705/+0
| | | | | | Implements: blueprint tests-in-root Change-Id: I6a1dbc59720abcaafb6fd9b8585f3f6065dcde92
* Handle auth_token and endpoint_url if passed to the http client constructorOleg Bondarev2013-03-261-13/+44
| | | | | | Fixes bug 1152427 Change-Id: Ic7811d928fd00cde0a72f451b5ede8351092a54c
* Merge "Improve unit tests for python-quantumclient"Jenkins2013-03-251-0/+129
|\
| * Improve unit tests for python-quantumclientTatyana Leontovich2013-03-221-0/+129
| | | | | | | | | | | | | | | | Add tests for: quantumclient.shell Partially Fixes: bug #1137783 Change-Id: Ia6a856cf3c1da67419818ae1693d56f447c2f070
* | Merge "Improve unit tests for python-quantumclient"Jenkins2013-03-211-0/+45
|\ \ | |/ |/|
| * Improve unit tests for python-quantumclientTatyana Leontovich2013-03-121-0/+45
| | | | | | | | | | | | | | | | Add tests for quantumclient.quantum.v2.quota Partially Fixes: bug #1137783 Change-Id: I62fef9334ac864eda2f980d8ad173c536b2f3b1b
* | Rename source_(group_id/ip_prefix) to remote_(group_id/ip_prefix)Aaron Rosen2013-03-041-15/+15
| | | | | | | | | | | | Fixes bug 1144426 Change-Id: I3c5ac92f583ffce19f5ed38219d796bc6585e123
* | Add pagination support for clientHe Jie Xu2013-03-0111-5/+337
| | | | | | | | | | | | | | | | | | | | Fixes bug 1130625 Add pagination params: -P, --page-size SIZE Add sorting params: --sort-key FIELD --sort-dir {asc,desc} Add xml support Change-Id: I76abb6335f53176feade216413a8cabaaefe42be
* | rename port to port_protocol for lbaas cliMark McClain2013-02-272-20/+21
|/ | | | | | fixes bug 1133057 Change-Id: Ic4b35e0c6335e3fc65022203a56ea2cce89f975c
* CLI support for network gateway feature2.2.0a1Salvatore Orlando2013-02-202-2/+112
| | | | | | | | | | Blueprint nvp-nwgw-extension-client Adds commands for gateway management, and for connecting networks to gateways. These commands use the nicira-specific extension 'nvp-network-gateway' Change-Id: Iefcba201bc9fd8dce35762514af0f56b29430ccd
* Allow known options after unknown ones in list and update commandgongysh2013-02-195-42/+81
| | | | | | blueprint known-options-location-in-list-update-commands Change-Id: Icad4fbc0d9f1751bd36573b37ac7fe32987fada9
* Add nvp queue support to clientAaron Rosen2013-02-142-1/+81
| | | | | | | This patch adds the nvp_qos_queue commands to the client Implements blueprint nvp-qos-extension-client Change-Id: Ic6d2a13ecb82e7e68b52b3143befb2f34b5e759f
* Allow ability to remove security groups from portsAaron Rosen2013-02-051-0/+8
| | | | | | | | | This commit adds the option --no-security-groups to port-update in order to remove security groups from a port. Fixes bug 1112089 Change-Id: I43a5cc2c8b443f2d34fffe66b442925a5ae312ac
* Remove gettext.install from quantumclient.__init__He Jie Xu2013-02-051-0/+22
| | | | | | fix bug 1097628 Change-Id: Ic6f2dfb4593fa507fb788786616bff6af3cbb896
* The change implements LBaaS CLI commands.Ilya Shakhat2013-01-287-1/+659
| | | | | | | | | | | | | | | | | Implements: blueprint lbaas-cli New commands: * Vip: lb-vip-create, lb-vip-list, lb-vip-show, lb-vip-update, lb-vip-delete * Pool: lb-pool-create, lb-pool-list, lb-pool-show, lb-pool-update, lb-pool-delete, lb-pool-stats * Member: lb-member-create, lb-member-list, lb-member-show, lb-member-update, lb-member-delete * Health Monitor: lb-healthmonitor-create, lb-healthmonitor-list, lb-healthmonitor-show, lb-healthmonitor-update, lb-healthmonitor-delete, lb-healthmonitor-associate, lb-healthmonitor-disassociate Change-Id: Idaa569024c24955886a836e3dfedd009fed87007
* Remove multiple white spacesgongysh2013-01-264-7/+7
| | | | Change-Id: I3715160a18cc2facdb8978ec97bf0f7ece1c3f05
* Display security group name in security-group-rule-listAkihiro MOTOKI2013-01-151-0/+100
| | | | | | | | | | | | It is useful to display security group name rather than its id for security_group_id and source_group_id. Also add '--no-nameconv' option to disable conversion from security group id to its name. When security-group-rule-list is executed by admin user it is likely more than one groups have same name. This option is useful for such cases. Change-Id: I7fd0f1fb26fce8ed24e0f710666866607e681bc8
* Migrate from unittest to testtoolsMonty Taylor2013-01-144-25/+20
| | | | | | Part of blueprint grizzly-testtools Change-Id: If92ba40209cb45905220df8c72501f33cdc4e1fc
* Merge "Display subnet cidr information in net-list"Jenkins2013-01-141-13/+88
|\
| * Display subnet cidr information in net-listAkihiro MOTOKI2013-01-111-13/+88
| | | | | | | | | | | | | | | | | | | | Fixes bug 1074415 This commit introduces extend_list() in ListCommand class. This method can be used to update a retrieved list (e.g., add additional information or convert some field to more human-readable value). Change-Id: Icf5ab616ab4d9add16c921e1944ba37b376b2ab2
* | Allow known options defined after position arguments.gongysh2013-01-134-5/+67
|/ | | | | | | | | | | We run the argument parser to split known options and unknown options. Make '-' work and have the same effect as '_' in both known and unknown option parts. Make metavar Uppercase. blueprint options-location Change-Id: Ic27b278484133c8b83e3b031a0810a76b050219f
* Fix import order nitsZhongyue Luo2012-12-315-22/+24
| | | | Change-Id: I7c95fa2db1d719f6ed34468ad12b7a9e4c9e794d
* Merge "Add --security-group option to port-create"Jenkins2012-12-311-0/+32
|\
| * Add --security-group option to port-createAkihiro MOTOKI2012-12-171-0/+32
| | | | | | | | | | | | | | | | | | [Usage] quantum port-create --security-group sg1 --security-group sg2 net1 A security group can be specified by name. Part of blueprint quantum-client-security-groups Change-Id: I82126f4839c4c0b265912ac6f5e111f5fbd2f72b
* | Add --dns-nameserver, --host-route, --disable-dhcp to subnet-createAkihiro MOTOKI2012-12-131-0/+88
|/ | | | | | Fixes bug 1042982 Change-Id: I71f7e54a0982ac5fd188986d902667bd3fd6b219
* Merge "Convenience cmds for l3"Jenkins2012-11-162-32/+255
|\
| * Convenience cmds for l3ivan-zhu2012-11-132-32/+255
| | | | | | | | | | | | | | | | | | | | | | | | Bug #1049551 Add two CLI and unit tests: quantum net-external-list (runs net-list with router:external=True filter) quantum router-port-list <router-id/name> (runs port-list, filtering with device_id equal to specified router) Change-Id: I9a9668836ac24d4cbc6a3867ec031611b64ded14
* | Adds securitygroup implementationAaron Rosen2012-10-312-4/+156
|/ | | | | | Implements blueprint quantum-client-security-groups API Change-Id: I9b6ad8525909688915fadefc75075406b8380327
* Support shared option in CLISalvatore Orlando2012-09-111-1/+4
| | | | | | | | Fix bug 1049386 Add the 'shared' attribute to known parameters Change-Id: Ica3b00c6b4108a328748025f94ceebf8c935e662
* Limit list command for router and floating ipGary Kotton2012-09-111-1/+1
| | | | | | | | Fixes bug 1047751 Also removes tenant id from network list output Change-Id: I5302b97ed784580508d2ca2170ab3c240053c1a1
* Send all options with CreateFloatingIPSalvatore Orlando2012-09-091-0/+19
| | | | | | Fix Bug 1048081 Change-Id: I87a66e80a42304508e3e9bc3afbe275b41918404
* *-list command shows only limited fields normally.yong sheng gong2012-09-012-1/+56
| | | | | | | | | Bug #1036051 We add list_columns in list commands to limit the output columns. The behaviour is overriden if we use -c in command. Change-Id: I0fa6c73cd7270d86aff01d3790d59c8d4e8a235a
* Change '_' to '-' in optionsDean Troyer2012-08-243-0/+30
| | | | | | | | | | This changes every command-line option with a '_' in its name and changes them to '-'. The old option names are maintained for backward compatibility but are no longer in the help text. BP command-options Change-Id: I94daea544ab613321c0a1c4de45092be6dc8471d
* initial client + CLI support for routers + floating ipsDan Wendlandt2012-08-223-1/+270
| | | | | | | | | | bp quantum-client-l3-floating-ip The task also does the following: 1. Fixes alignment of the --help output 2. Ensures that a show command prints a dictionary correctly Change-Id: Ib61b3e8748a7bd476ec008ab6ce20ab852e92f58
* Support --no-gateway optionNachi Ueno2012-08-141-1/+34
| | | | | | | if --no-gateway is specified, null is used for gateway value. Fixs bug 1035987 Change-Id: I6b9e00563cc2993f40de204e2c399218f00b88c4
* Merge "Refreshes keystone token if a token is expired."Jenkins2012-08-141-0/+130
|\
| * Refreshes keystone token if a token is expired.Akihiro MOTOKI2012-08-121-0/+130
| | | | | | | | | | | | Fixes bug 1034212 Change-Id: I523d289807caff74068328f612451cee74b94cbb
* | deal with -c option when the list result is empty.Yong Sheng Gong2012-08-121-0/+30
|/ | | | | | bug #1033123 Change-Id: Idd10e9ae8fd57e6173ef7f92411176834efebff5
* Add name or id to quantum cli commands.Yong Sheng Gong2012-08-055-62/+156
| | | | | | | | | | | | | | Bug #1030180 We first lookup the resource id via id if it looks like an id. If we cannot find it via id, we will look it up via name. All of the update/show/delete support reference resource via name or id. To create port/subnet, we can refercen network via network's name. Also in port creation, we support reference subnet in fixed_ip via its name. quantum_test.sh is added to test the command lines after running 'python setup.py install' Change-Id: I54b6912e2c4044ba70aaf604cd79520022de262f
* Allow to retrieve objects by nameSalvatore Orlando2012-07-264-18/+69
| | | | | | | | | | | | | | | Fixes bug 979527 xxx-show commands now can accept either an id or a name of the resource to retrieve, similarly to the "nova get" command. This has been preferred to using mutually exclusive keyword argument, in order to avoid confusion with other CLI tools. NOTE: the current patch allow search by name only for networks. The restriction will be lifted once name attributes for port and subnets are added. Change-Id: Id186139a01c9f2cfc36ca3405b4024bd7780622e
* Remove quantum client codes for API v1.0Yong Sheng Gong2012-07-133-1688/+0
| | | | | | Bug #1021546 Change-Id: Ic628db01034bc6dfb5fad3d6a2905e243900229a
* Support allocation pools for subnetGary Kotton2012-07-112-8/+50
| | | | | | | | | | | | | Fixes bug 1022227 Usage examples: create_subnet --tenant_id <id> --allocation_pool start=1.1.1.1,end=1.1.1.10 <networkid> <gw> More than one allocation pool can be added by doing the following: --allocation_pool start=1.1.1.1,end=1.1.1.10 --allocation_pool start=1.1.1.123,end=1.1.1.125 ... Change-Id: I313625b6a8c1da6eaca8b1943da52738978ed72b
* Make quantum cli consistent with other cli's practice.Yong Sheng Gong2012-07-053-45/+39
| | | | | | | | | Bug 1011759 We use dash in command names, underscore in options or arguments, adopt noun-verb format command names. Change-Id: Ibeb2b4a31929dbb7008cec3b04bd77e75d9ace1a
* add --fixed-ip argument to create port0.1.0Yong Sheng Gong2012-06-251-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | 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
* add keystone support, new command interface, API v2.0Yong Sheng Gong2012-06-218-27/+813
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Clean up codebase in accordance with HACKING/PEP8.Maru Newby2012-05-022-54/+63
| | | | | | | * Adds HACKING.rst * Addresses 981208 Change-Id: I3d701ca9a748a0c4ceada7d76a31dc6bb2d5969b
* Remove server-specific functionality.Maru Newby2012-04-244-0/+1651
* 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