22 Commits

Author SHA1 Message Date
wangzihao
17d2d5175e Remove six
Remove all usages of six.

Change-Id: I6ea8d1cdc3060d5c2a4311c7454b66ba75109b0c
2020-10-13 11:02:06 +08:00
Lingxian Kong
7a791177e8 Get all the database instances by admin
Currently, there is no way for the admin user to get databases of all
the projects, which is very important for auditing or billing purpose.

With this change, admin user can get all the database instances by
running:

$ openstack database instances list --all-projects

Change-Id: I318907b1d4a63017f4a6f7967312770f8784c1f4
Story: #2005735
Task: #33393
2019-05-21 00:12:14 +12:00
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
jiansong
91e098e0ea Avoid use xx=[] for parameter in function
Use xx = [] for the parameter for function, this parameter will
only be initialized at the first call, this is should be avoided.
Better choice is to set the initial value to None, then the initialization
time use xx= xx or []

more information:http://effbot.org/zone/default-values.htm

Change-Id: Icbade7dd4c7d231ae65fd4f8de673b484bab721c
2016-10-19 02:08:46 +00:00
Morgan Jones
ea0e472edd Fix troveclient to support Mistral
Mistral gets confused by Trove's (aguably wrong) inclusion
of a member called 'items' in the Pagenated object that
Trove returns as the result of 'list' client methods.

This change changes Pagenated to inherit from the 'list'
class so that the items method is not required (and has
the additional benefit of just generally being a better
implementation of a list type result).

Change-Id: I683120451f69f07f131e6fa422c082f85735b196
Closes-bug: 1585705
Depends-On: Id674ae57bfcdc5e09bde1e323a614b3a03a7cad3
2016-05-26 16:14:37 -04:00
Steve Leon
7170b72ceb Add datastore filter to backup-list
This fix enhances the backup-list command to optionally receive
a datastore name or ID to filter the backup list by. The filter
is sent as a query string.

To attach the query string to the URL and have it still work with
the URL for pagination, i have made some changes in the way url
with query strings are constructed. This includes the pagination
URL.

partially implements: blueprint backup-metadata

Change-Id: I0b9ef3ec7f51ed76517a22f9c0edfdce3694a36f
2014-06-03 09:02:49 -07:00
Jenkins
d59016901d Merge "Remove dependent module py3kcompat" 2014-04-25 10:24:17 +00:00
llg8212
5c6e00406b Remove dependent module py3kcompat
Module py3kcompat was removed from oslo-incubator, we can use
six directly.

* Sync commit of removing py3kcompat from oslo
* use six replace usage of py3kcompat

Change-Id: I15b9ffb10e2d5765a1ed07dd5fd4e2bf7b21ec49
Closes-Bug: #1280033
2014-02-18 10:48:16 +08: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
a35d358240 Updates common.check_for_exceptions and its calls
Reasons:
- exceptions.from_response has 3 arguments but is being called with
  one argument less, which is url.

Changes:
- Updated common.check_for_exceptions to support urls as needed by
  troveclient.openstack.common.apiclient.exceptions.from_response.
- Adds url to exceptions.from_response calls in troveclient.

Closes-Bug: #1266239

Change-Id: Ie18c90349479f740369f63c48a8d9b463641f84d
2014-01-23 08:43:16 +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
Debasish Chowdhury
9c7120959e Removes unused import statements
Change-Id: If229aa3f6e1009e1abfba13aba3970bdf2dd3761
closes-bug: #1255885
2013-11-30 18:52:19 +05:30
Jenkins
206b0f4578 Merge "Replace urllib.quote with urlutils.quote" 2013-10-23 15:37:16 +00:00
Kui Shi
c07e9cf63d Replace urllib.quote with urlutils.quote
quote is defined in urlutils for Python2&3 compatability.

Partial implements: blueprint py33-support

Change-Id: I81e667c76544b6bafd81d51d788158f6a062a90c
2013-10-23 06:38:32 +08: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
fadd19e3a9 Removing lxml/httplib2 depends
These depends are compat only. They dont need to be listed as deps.

Change-Id: Ia5718865100148d149e9c7657ace78cb08cacbac
2013-10-10 18:31:34 +00: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
Vipul Sabhaya
12a577f15a Remove trove as default value for Service Name
* This causes service catalog lookup issues when the Catalog
  contains service_type = database, but service_name = somethine_else

fixes bug 1228372

Change-Id: I1f7eebb06d7f57c0ecc95d8c05104f43e803c406
2013-09-23 14:56:11 -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
Denis M
812755e8a0 PEP8 with tox -epep8 check fails
Change-Id: Ife06919f321ab4ad73bece2e6080fbd7d947eeef
Fixes: bug #1219014
2013-08-30 20:32:17 +03:00
Riddhi Shah
8f96a61b6a API for Modify User Attributes - username, host, password
At present, when a Cloud Database user creates a username, password and hostname for a database user,
he does not have the ability to modify these user attributes.
This API enables the Cloud DB user to make changes to one or more of these user attributes (username,hostname,password).
These changes are in the troveclient to enable simple command line requests

Implements: blueprint modify-userattributes

Change-Id: I0887f2d927eec8c77c0f562c9d855a370591231a
2013-07-25 11:05:06 -05: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