12 Commits

Author SHA1 Message Date
Steve Martinelli
eed19c835f move old apiclient code out of openstack/common
As part of the first community-wide goal [1], teams were asked
to remove the openstack/common package of their projects
if one existed. This was a byproduct of the old oslo-incubator
form of syncing common functionality.

The package, apiclient, was moved to a top level location
and cliutils was moved to the common module. There are no oslo
specific libraries, the recommended solution is to move it
in tree and maintain it there.

Specifically in this patch, I also rearranged some of the
imports to make them match up with the hacking guidelines
while I was re-ordering them for the refactor anyway.

Lastly, the apiclient/fake_client.py was deleted since it
was not used.

[1] http://governance.openstack.org/goals/ocata/remove-incubated-oslo-code.html

Change-Id: Ib7b691240b819c9c91b100ca47ffaba75b281c78
2016-11-10 10:02:08 -05:00
Chaozhe.Chen
32286e0cbc Use "# noqa" instead of "#flake8: noqa"
"# flake8: noqa" option disables all checks for the whole file.
To disable one line we should use "# noqa".

Change-Id: Iea2fbf239c7f11bc0cc8788bcc4b8abc862339be
Closes-bug: #1540254
2016-02-09 23:06:08 +08:00
Alex Tomic
fb33d87fef Client Changes for Guest Log File Retrieval
Implements log file retrieval from the guest agent.  The contents
of the log file are pushed up to a swift container as a series of
objects that represent a subset of the lines in the log.

The following trove CLI commands are implemented:

trove log-list <instance>         : lists log files available on guest
trove log-enable <instance> <log> : enables writing to log file
trove log-disable <instance> <log>: disables writing to log file
trove log-publish <instance> <log>: publishes updates to swift container
trove log-discard <instance> <log>: discards published logs
trove log-tail <instance> <log>   : displays last lines of log
trove log-save <instance> <log>   : saves the entire log to a file

Change-Id: Ic15c455747b9f1966d83d7034c9b748ca5e2cce9
Co-Authored-By: Morgan Jones <morgan@tesora.com>
Co-Authored-By: Alex Tomic <atomic@tesora.com>
Co-Authored-By: Peter Stachowski <peter@tesora.com>
2016-01-27 14:41:15 -05:00
Christian Berendt
31569163a5 fixed several pep8 issues
* E265 block comment should start with '# '
  * E128 continuation line under-indented for visual indent
  * E713 test for membership should be 'not in'

Tested with pep8 version 1.5.6 (2014-04-14).

Change-Id: If2853c79bea91ebef5cd97dff66788b46b174a9a
2014-05-13 23:12:17 +02:00
amcrn
10ff1cf745 Remove Duplicate ClientExceptions and Merge
horizon handles troveclient.ClientException as a recoverable error,
with troveclient defined via "from troveclient import exceptions
as troveclient". this patch imports oslo's apiclient exceptions
in troveclient/exceptions.py to ensure all ClientExceptions are
considered recoverable. also removes unused exceptions that were
unnecessarily ported from the compat version of the client. this
fix is necessary to avoid seeing the generic error message of
"Error: There was an error submitting the form. Please try again."
in horizon vs. the explicit error message.

Change-Id: I94c8ec0289821ccd365d6689488a3e25877c1560
Closes-Bug: #1292033
2014-04-25 10:56:37 -07:00
He Yongli
59ec2bb433 Remove vim header
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
2014-02-16 13:08:07 +08:00
Sushil Kumar
d56111cb07 Fixed misspellings of common words
Fixed misspelling of common words found by the 'misspellings' tool.

Change-Id: I8e03379f92b62fd4856bbc74b7e4641226a403d3
Closes-Bug: #1257531
2014-01-14 03:39:07 +00:00
Dirk Mueller
d4a62491e1 Tighten flake8 checks in Gating
There are a few checks that already pass:
 - F401 - unused imports of modules
 - F403 - ‘from module import *’ used; unable to detect undefined names

And there are two (H401 and H403) that can be made
passing easily. Enable gating on all of them.

Change-Id: I9d3c49ecea1b2171d194ab6cc751316c252081e8
2013-12-18 14:08:37 +01:00
Michael Basnight
af4d4ed4f7 Fixing copyright and license headers
* Added HP copyrights as appropriate

Change-Id: If4f30b0caf03b16f5fb4f54185ba80d9fa41d0b0
2013-10-22 11:21:33 -07:00
Michael Basnight
fd43cbd73b Massive refactoring to the troveclient
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
2013-10-09 19:21:08 -07:00
ZhiQiang Fan
e3a301ff28 Replace OpenStack LLC with OpenStack Foundation
Some files still use trademark OpenStack LLC in header, which
should be changed to OpenStack Foundation.

Change-Id: Ib30cd06cdd13b9f949e028753716aa55736f4a40
Fixes-Bug: #1214176
2013-09-20 05:09:59 +08:00
Michael Basnight
9916c8f273 Rename from reddwarf to trove.
Implements Blueprint reddwarf-trove-rename

Change-Id: Ib2d694c7466887ca297bea4250eca17cdc06b7bf
2013-06-21 20:15:23 +00:00