summaryrefslogtreecommitdiff
path: root/troveclient/utils.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix flavor-show problems with UUIDMasaki Matsushita2015-06-291-1/+1
| | | | | | | | | flavor-show fails if the flavor's ID is in the form of UUID and user specified its name. The change in troveclient/v1/shell.py#L92-L95 is from Sushil Kumar. Closes-Bug: #1467383 Change-Id: Ie838796191a06193a59499da59fae79b9d9f060f
* Drop use of 'oslo' namespace packageDoug Hellmann2015-05-061-2/+2
| | | | | | | | | | | | | | | | | | | | | The Oslo libraries have moved all of their code out of the 'oslo' namespace package into per-library packages. The namespace package was retained during kilo for backwards compatibility, but will be removed by the liberty-2 milestone. This change removes the use of the namespace package, replacing it with the new package names. The patches in the libraries will be put on hold until application patches have landed, or L2, whichever comes first. At that point, new versions of the libraries without namespace packages will be released as a major version update. Please merge this patch, or an equivalent, before L2 to avoid problems with those library releases. Blueprint: remove-namespace-packages https://blueprints.launchpad.net/oslo-incubator/+spec/remove-namespace-packages Change-Id: I2a8caa859830b3416bfe54e4261dd3415ac5a76a
* Handle obsolete and unused oslo modulesAmrith Kumar2015-01-231-3/+5
| | | | | | | | The python-troveclient module still had references to strutils, and gettextutils which are now obsolete. Change-Id: Ia54a565c00966b0a1cb5f18c6e17e1237b2bfee6 Partial-Bug: #1380789
* Fallback to flavor's str_id when id is NoneAdam Gandelman2014-12-121-9/+4
| | | | | | | | | | | | | | | | | When a nova flavor's id is a string and not an int, Trove will return None for the flavor's id and instead expect clients to use the str_id field. This updates the shell mask this from the user and always present the relevant value as id, and allow specifying either str_id or id for flavor-show. find_resource() was updated to deal with ints and strings, not just UUIDs and ints. Relies on changes to Trove @ https://review.openstack.org/#/c/115811 Related-bug: #1333852 Change-Id: If08430b07b7e8b6a1737f3e71dba6a471de63794
* Corrects trove-client outputSushil Kumar2014-05-231-1/+1
| | | | | | | | Updates the condition to test global symbol 'json_output' and print results accordingly. Change-Id: Ib1d5d45413b4652456c05bda6304701b0ce23a06 Closes-Bug: #1322461
* Merge "Enabled F821, H306, H402, and H404 flake8 rule"Jenkins2014-05-231-15/+17
|\
| * Enabled F821, H306, H402, and H404 flake8 ruleSushil Kumar2014-05-091-15/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Reasons: - F821 is disabled. - H306 is disabled. - H402 is disabled. - H404 is disabled. Changes: - Updates tox.ini to enable F821, H306, H402 and H404 rules. - Updates code for F821, H306, H402 and H404 violation. Change-Id: I772270bb833ac774e080fc63e330d6b333f23de2
* | Changed Trove CLI list headers to match Nova CLIPeter Stachowski2014-04-241-19/+38
|/ | | | | | | | | | | | | Added ability to pass in header labels to print_list. If not passed in, header lables are automatically created from the fields by replacing '_' with spaces and capitalizing each word. IDs are also capitalized. All field data is now left-aligned, except numerics which are right-aligned. Also changed print_dict so that all values are left-aligned. Change-Id: I3b69dc7f92c496594cf37832f4ff98f1abdf52dd Closes-Bug: #1272700
* Fix create call for security group rulesDenis Makogon2014-04-011-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reasons: - The security group rule create call was expecting from_port, to_port, and protocol as arguments, but the Trove API was ignoring these since it picks these up from the respective datastore confs. Changes: - Removing the extra arguments from the security-group-rule create command: - from_port - to_port - protocol Note that even though the user was able to specify the ports for the rule these were _never_ being honored since these were being picked up from the respective config files. Usage before change: - trove secgroup-add-rule <security_group> <protocol> <from_port> <to_port> <cidr> Usage after change: - trove secgroup-add-rule <security_group> <cidr> Change-Id: Ic1440f735b6cf2b8b4f29c5ab9f48bcb427ca9e6 Closes-Bug: #1298749
* Get rid of XML related trove client bindingsNikhil Manchanda2014-03-161-2/+0
| | | | | | | | We will no longer support XML for the trove API; it behooves us to remove XML related code, and clean up the trove client. Partially implements bp: destroy-xml-api Change-Id: I58f95e81f3e4bc4bad277ff2a48abfced2b48199
* Remove vim headerHe Yongli2014-02-161-2/+0
| | | | | | | | | | | No need to set tabstop tons of times, this can be set in your vimrc file instead. More disucssion: http://openstack.10931.n7.nabble.com/Remove-vim-modelines-td21780.html Change-Id: I45766d91f0c0b3622bbdc7dc5517497c87ebee8c Closes-Bug: #1229324
* Support Extensions to Trove Clientamcrn2014-01-231-0/+12
| | | | | | | | | | | | | | extensions on the contrib path (i.e. troveclient/v1/contrib/*.py), extensions on the python path that follow the naming convention of *_python_troveclient_ext, and entry-points will now be discovered and loaded. due to the mismatch of the api version and the troveclient package name, '1.0' vs. '1', the client has been patched to look for contrib in troveclient/v1 vs. the standard troveclient/v1_0 Change-Id: I3ea7bb5ba471b0d421581dcfda7216f429cb7b65 Closes-Bug: #1267577
* Datastores improvementsAndrey Shestakov2014-01-211-0/+13
| | | | | | | | | | | | Improvements for client: - added datastore field in instances list - fixed datastore and version fields in instance show output - fixed mistakes in help texts - add possibility to retrieve version by uuid (without specified datastore) Implements: blueprint datastore-type-version-followon Change-Id: Id41da29ce9732823bc4696301953e9cf8cdc82f5
* Fixed misspellings of common wordsSushil Kumar2014-01-141-1/+1
| | | | | | | Fixed misspelling of common words found by the 'misspellings' tool. Change-Id: I8e03379f92b62fd4856bbc74b7e4641226a403d3 Closes-Bug: #1257531
* Removes unused import statementsDebasish Chowdhury2013-11-301-1/+0
| | | | | Change-Id: If229aa3f6e1009e1abfba13aba3970bdf2dd3761 closes-bug: #1255885
* Allow --json output override printing dict/listNick Shobe2013-11-211-0/+32
| | | | Change-Id: Ib02f244cb969ac8dfc92ac94e6e915063d13764d
* Merge "Fix unicode issue"Jenkins2013-10-231-10/+3
|\
| * Fix unicode issueKui Shi2013-10-211-10/+3
| | | | | | | | | | | | | | | | | | | | In Python 3, all string is unicode. Replace unicode() with six.u() Make use of strutils.to_slug() for slugify() definition Partial implements: blueprint py33-support Change-Id: I6a1e19c095a2fbafcbe47b34c7af17e1b0353b9e
* | Fixing copyright and license headersMichael Basnight2013-10-221-1/+5
|/ | | | | | * Added HP copyrights as appropriate Change-Id: If4f30b0caf03b16f5fb4f54185ba80d9fa41d0b0
* Massive refactoring to the troveclientMichael Basnight2013-10-091-12/+178
| | | | | | | | | | | | | | | | The new client adheres to the standards of the other clients now. It prints out tables, uses ENVVAR's for auth, no longer stores pickled json in a login token, uses openstack common, and moves the cli operations into a v1 module for the future of trove when it has a v2 api. Please note for compatibility, the troveclient.compat module has the old cli. In order to deploy it, amend the setup.cfg to include the compat module. implements blueprint cli-compliance-upgrade Change-Id: Ie69d9dbc75ce90496da316244c97acca1877a327
* Replace OpenStack LLC with OpenStack FoundationZhiQiang Fan2013-09-201-1/+1
| | | | | | | | Some files still use trademark OpenStack LLC in header, which should be changed to OpenStack Foundation. Change-Id: Ib30cd06cdd13b9f949e028753716aa55736f4a40 Fixes-Bug: #1214176
* Start using pyflakesDirk Mueller2013-06-261-1/+0
| | | | | | | | Instead of globally disabling pyflakes warnings, disable only those that occur frequently and fix the rest. Enable gating on those. Change-Id: I774d809ebcda2339b30c104b031211a3b2c491bd
* Rename from reddwarf to trove.0.1.3Michael Basnight2013-06-211-0/+68
Implements Blueprint reddwarf-trove-rename Change-Id: Ib2d694c7466887ca297bea4250eca17cdc06b7bf