440 Commits

Author SHA1 Message Date
Edmond Kotowski
4acdad63ac TroveClient API Documentation cleanup
- The documentation index page will now contain a
Version 1 API Reference section with links to each v1 module and
documentation for each method in that module.

- Copied python-novaclients gen_ref method into the doc/source/conf.py file
that dyanamically generates the sphinx .rst files for each trove v1 module.
When it runs it will create generate a new folder named ref/v1/ and will
contain each module such as instances.rst with the filled out automodule
sphinx code.

Ex: /ref/v1/instances.rst

.. automodule:: troveclient.v1.instances
    :members:
    :undoc-members:
    :show-inheritance:

Change-Id: Ib311486564f5b6def205590a1ccc2e493f3fef97
2015-02-11 18:31:34 -08:00
OpenStack Proposal Bot
a67f6b1a78 Updated from global requirements
Change-Id: I6a5b16ec5543afb786c391fcef49aca7dcb6575d
2015-02-09 18:30:54 +00:00
Jenkins
0cc35e2f0a Merge "Show '-' for size when volume support disabled" 2015-02-09 16:10:57 +00:00
Ashleigh Farnham
b76eac2b0c Show '-' for size when volume support disabled
When volume support is disabled trove list does not contain include
a volume attribute in the response. Previously we would only add a
value for size when the volume attribute was present. This change
adds a value of '-' when there is no volume attribute. This makes
the behaviour consistent with the behaviour of nova list where the
task state has no value.

Change-Id: I75e5f7c493f3d2fe938ecc8663457953c58f6b02
Closes-Bug:1394591
2015-02-02 15:50:59 -08:00
Amrith Kumar
dca7bfe1e6
Handle obsolete and unused oslo modules
The python-troveclient module still had references to strutils, and
gettextutils which are now obsolete.

Change-Id: Ia54a565c00966b0a1cb5f18c6e17e1237b2bfee6
Partial-Bug: #1380789
2015-01-23 07:49:23 -05:00
Jenkins
96e44b5a9b Merge "Fixed typo in exception message" 2015-01-22 21:33:06 +00:00
Peter Stachowski
9d37dbb716 Fixed typo in exception message
The word 'simultaneously' was incorrectly spelled. This has been fixed.

Change-Id: Id231404b09b1d26274ec9be114d0f304aab02192
2015-01-19 14:34:07 -05:00
Edmond Kotowski
976f574444 default endpoint_type to 'publicURL'
When trying to create a troveclient.v1.client.Client without specifying
endpoint_type explicitly it will raise an AuthorizationFailure exception.
This was because troveclient.v1.client.Client defaulted endpoint_type=None
which overrides the troveclient.client.HTTPClient default value of 'publicURL'
to None. Fix was to default the endpoint_type to 'publicURL' in the
troveclient.v1.client.Client __init__ method.

Also updated the documentation and README.rst for creating a
trove client object because it was out of date and incorrect.

Change-Id: I64dfbaa4eefc73d01468470dbe9eba5e209ff157
Closes-Bug: 1409982
2015-01-12 18:11:34 -08:00
Jenkins
7a06f8632e Merge "Fallback to flavor's str_id when id is None" 2014-12-19 11:54:22 +00:00
Jenkins
5ea85dad65 Merge "Add instance name as parameter to CLI" 2014-12-19 11:50:33 +00:00
Adam Gandelman
a90a669c9c Fallback to flavor's str_id when id is None
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
2014-12-12 16:05:56 -08:00
Jenkins
6f8b0d09bd Merge "Fixes trove show output" 2014-12-11 20:58:32 +00:00
Jenkins
06dd75c8d4 Merge "Remove RAX-specific auth in troveclient" 2014-12-10 21:07:02 +00:00
Zhi Yan Liu
1cd9228647 Add profiling support to Trove client
To be able to create profiling traces for Trove, client should be
able to send special HTTP header that contains trace info.
This patch is as well important to be able to make cross project
traces. (Typical case horizon calls Trove via python client, if
profiler is initialized, Trove client will add extra header, that
will be parsed by special osprofiler middleware in Trove api)
Don't worry no security issue here, trace information is signed
by HMAC key that is setted in api-paste.ini. So only person that
knows HMAC key is able to send proper header.
Main patch in Trove is: I580cce8d2b3c4ec9ce625ac09de6f14e1249f6f5

We prepared a common BP in oslo-spec due to integration change is
similar to all projects: I95dccdc9f274661767d2659c18b96da169891f30
Currently there are 2 other projects are using osprofiler: Glance &
Cinder, and some others are working in progress.

Change-Id: I5a76e11d428c63d33f6d2c2021426090ebf8340c
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
2014-12-10 03:41:18 +08:00
Swapnil Kulkarni
cd58da5213 Remove RAX-specific auth in troveclient
Author: Swapnil Kulkarni <swapnilkulkarni2608@gmail.com>
Co-Authored-By: Nikhil Manchanda <SlickNik@gmail.com>
Co-Authored-By: Craig Vyvial <cp16net@gmail.com>

Change-Id: I250777890a1f5240c5f14290cf02eb5a7b34b434
Closes-Bug: #966329
2014-12-09 13:33:33 -06:00
Jenkins
4d8e1567ec Merge "Associate flavor types with datastore versions" 2014-12-09 11:15:02 +00:00
Doug Shelley
df3afb2abc Add instance name as parameter to CLI
Allow CLI to take instance name as well as instance id for
sub-commands where instance can be specified. This commit
does not include the metadata-* commands as the backend for
that feature isn't merged. The spec will be adjusted to
reflect that they commands will be out of scope.

Affected sub-commands are:
backup-create
backup-list-instance
configuration-attach
configuration-default
configuration-detach
create (just for --replica_of)
database-create
database-delete
database-list
detach-replica
delete
resize-flavor
resize-instance
resize-volume
restart
root-enable
root-show
update
user-create
user-delete
user-grant-access
user-list
user-revoke-access
user-show
user-show-access
user-update-attributes

Unit tests were added to test passing in an instance object
for the affected sub-commands. A new set of unit tests were
added for databases.py (doesn't look like any existed before).

Change-Id: I5554a7d423990ff9cb24437a893d90d212b022b1
blueprint: add-instance-name-to-cli
2014-12-08 14:29:06 -05:00
ridhi.j.shah@gmail.com
30989fbfb8 Associate flavor types with datastore versions
This feature provides the ability to associate flavor
types with datastore versions.The trove-mange util enables
adding/deleting this information.The trove-client has been
changed to include a new api call:
/{tenant_id}/datastores/{datastore}/versions/{version}/flavors.
This call will return all nova flavors if no entries are found
for the said datastore-version in datastore_version_metadata,
otherwise only the entries found are returned.

Change-Id: I89fc2db0078d7884b7b3fa91f5daec68c0132dfb
Implements: blueprint associate-flavors-datastores
2014-12-07 16:22:41 -06:00
Jenkins
6055ed56e2 Merge "Workflow documentation is now in infra-manual" 2014-12-05 22:57:36 +00:00
Jeremy Stanley
8d19bdad5b Workflow documentation is now in infra-manual
Replace URLs for workflow documentation to appropriate parts of the
OpenStack Project Infrastructure Manual.

Change-Id: Ie62438c60d2087fa067e967a5e2b8ea8ee392e48
2014-12-05 03:30:40 +00:00
OpenStack Proposal Bot
699b17157d Updated from global requirements
Change-Id: Ieafe119fe7df2567794c1c85c270c8236fb623b1
2014-12-04 21:34:24 +00:00
Tim Simpson
3f124e916c Fixes client to send 0 for min/max size
Previously, if 0 is passed as the min_size or max_size for a
configuration, the Trove client would ignore it and not put it in the
dict making up the request body. This changes that code to explicitly
check if this value is not None instead of ignoring it if its zero.

Co-Authored-By: Craig Vyvial <cp16net@gmail.com>

Fixes bug: 1398995

Change-Id: I7f1d196b00a612365576bfb82fbfd35d647588d4
2014-12-03 23:25:53 -06:00
Jenkins
3ba7e9b831 Merge "Adds support for Keystone V3 API" 2014-12-02 19:30:51 +00:00
Bob Thyne
4f1fb53ecb Adds support for Keystone V3 API
Updated trove client to support Keystone V3 API. The
Keystoneclient session object is used for authentication, retrieving
the service catalog and HTTP connection/session management.

Added additional CLI parameters for Keystone V3.

Added tests using requests_mock instead of mocking completely the
session object like the previous failed patch:

https://review.openstack.org/#/c/102315

Change-Id: Ib804c0a45b3b4d3f8670ec642b2c2fd1be6cd656
2014-12-01 15:58:36 -08:00
OpenStack Proposal Bot
4d67c84df6 Updated from global requirements
Change-Id: Ie62f7d7122538685db76240ce7b5d748aa623a87
2014-11-18 11:37:09 +00:00
Jenkins
fa3e560f8e Merge "Fixed typo in doc/source" 2014-11-13 09:06:57 +00:00
Jenkins
efb0f37f8d Merge "Reverse fix for 1323866 as it regressed trove CLI" 2014-11-12 21:12:58 +00:00
Jenkins
f159c7f07d Merge "Updated from global requirements" 2014-11-12 13:35:16 +00:00
Amrith Kumar
d4c2887854 Reverse fix for 1323866 as it regressed trove CLI
Trove CLI appears to be broken (fresh checkout, devstack as well as
openstack gate). All commands fail with

ERROR: __init__() got an unexpected keyword argument 'http_log_debug'

Correcting the obvious place where this appears to be an issue is
causing additional failures and as it is time-critical to get this
back up and running, I'm proposing a reversal of the change from
3c47a1855b7ee1345dadfb00ae90a6279b7c424e while that change is
completely reworked.

I will ping trove core for an approval on this and if I don't get an
approval, I'll fast track this reversal.

Change-Id: Icac028cfafac57c7e3ef03d4277ae2b7833bf58f
Partial-Bug: 1391840
2014-11-10 12:25:29 -05:00
daniel-a-nguyen
3c47a1855b Adds support for Keystone V3 API
Updated trove client to support Keystone V3 API. The
Keystoneclient session object is used for authentication, retrieving
the service catalog and HTTP connection/session management.

Added additional CLI parameters for Keystone V3.

Change-Id: I800c252234be2ff11d818cf7513c61c5431eb15c
Closes-Bug: 1323866
2014-11-05 15:54:16 -08:00
OpenStack Proposal Bot
c2b8cb77a0 Updated from global requirements
Change-Id: I6aff733b699084cdeba2f94b077e4f4a5b4ff36a
2014-11-05 08:35:50 +00:00
Peter Stachowski
fbe2b0a2a8 Fixed typo in doc/source
There was a typo in the Authentication section of the usage.rst
file.

This has been fixed, along with some lining up of comments in the
test code to make it easier to read.

Change-Id: I342a286055246beaeadc7e763d3b75bd17c32a60
2014-10-28 09:49:28 -04:00
Sushil Kumar
dc21242144 Fixes trove show output
Reasons:
- trove show gives different output for id and names as input,
  as explained in bug, with name it shows less information.

Changes:
- Returns the object found by id after finding the matching object
  from the list of obtained instances, which results in getting
  same attributes for output
  irrespective whichever way the command is used.

Change-Id: Ib397d5791e9a6f10c10c2ab3160401c1c7cfa214
Closes-Bug: #1384055
2014-10-22 07:43:32 +00:00
OpenStack Proposal Bot
d596428b41 Updated from global requirements
Change-Id: If9e276a98fa46b4737acb71a82e085a0f4d637e1
2014-10-15 23:46:56 +00:00
Jenkins
ca8bdcde6e Merge "Work toward Python 3.4 support and testing" 2014-10-14 22:17:00 +00:00
Jenkins
77ba6c099b Merge "Fix universal wheel support" 2014-10-09 20:14:16 +00:00
Jenkins
ae56ed1c3a Merge "Use OpenStack branding for trove client" 2014-10-08 22:17:46 +00:00
Andreas Jaeger
f8a83650b8 Fix universal wheel support
There's a typo in setup.cfg, it should be "universal".

Change-Id: I78992d222cf55df25db5fa94a7d8a2ffa462c5c9
2014-09-22 10:41:33 +02:00
Andreas Jaeger
4a3615d8c5 Use OpenStack branding for trove client
Add oslosphinx to get OpenStack branding.
Remove html_static_path since it's unused and issues a warning.
Update copyright year.

Change-Id: I0bdcab8ebc5a201a3f91b4a6c4724536d1157901
2014-09-19 11:53:35 +02:00
amcrn
4c122dca77 Fix Cluster-Create and Cluster-Show Response
the refactoring in Ie1ac42d61e920ac8ea1ebab35c2db096fd313077
broke the responses for the aforementioned commands,
resulting in stacktraces.

Change-Id: Idb6d5677cb854b9dc76ad621910277b687c111a1
Closes-Bug: #1368982
2014-09-12 16:07:43 -07:00
Nikhil Manchanda
e010a91975 Update the README.rst with latest help
The help has substantially changed since the last time the
trove client was published to pypi. Updated the README.rst
with the latest help information.

Closes-Bug: 1366981
Change-Id: I3e2533b4c57f63d20e804c1fca5731fe6a522199
2014-09-08 13:58:32 -07:00
Jenkins
fa33d6e927 Merge "Use 'replica' instead of 'slave'" 2014-09-08 16:23:03 +00:00
Greg Lucas
b287f672ac Use 'replica' instead of 'slave'
Replace the mysql-specific term 'slave' with the more general term
'replica'.

In order to merge properly the client currently handles both 'slave' and
'replica' in certain cases. The 'slave' support will be removed completely
once the trove runtime is updated to be in sync.

Change-Id: Id22d18a84a4ac104ff8af09959e8eb2ae0102e97
Co-Authored-By: Nikhil Manchanda <SlickNik@gmail.com>
Partial-Bug: 1360310
2014-09-05 11:13:37 -04:00
Craig Vyvial
b20b18e8ac adding configuration parameters mgmt api
add the CRUD calls of configuration parameters mgmt calls

partially implements blueprint configuration-parameters-in-db
Change-Id: Iaaea946bdbcab91ca02e5e2cbf956a3980a461ab
2014-09-03 21:16:03 -07:00
Jeremy Stanley
94513614a1 Work toward Python 3.4 support and testing
Change-Id: I4a9c0444af0abf408ffd3899106f4cacf3c93aa1
2014-09-03 19:05:59 +00:00
amcrn
6852bdcefc Clusters troveclient Implementation
adds clusters support to the troveclient.

Co-Authored-By: Ranjitha Vemula <rvemula@ebaysf.com>
Co-Authored-By: Michael Yu <michayu@ebaysf.com>
Co-Authored-By: Mat Lowery <mlowery@ebaysf.com>

Partially implements: blueprint clustering

Change-Id: I6ed2c4c79a17fcf8f14c587cab6a8ec3acaf319f
2014-09-02 16:38:56 -07:00
ridhi.j.shah@gmail.com
33c76fab16 Add a drop config-grp command in update instance
As per the current code in the client, there is no option to detach
the configuration group of the instance. This change gives a user the
option to explicitly drop the config group of the instance as part of
the instance update call.

Change-Id: I7defd110549df87afd267d3ebe998904ff6b7483
Closes-Bug: 1359359
2014-09-01 11:45:18 -07:00
Jenkins
522eb72a3e Merge "Updated from global requirements" 2014-08-31 11:24:47 +00:00
Jenkins
aebe42bccc Merge "Add new command: detach-replica" 2014-08-31 04:29:10 +00:00
OpenStack Proposal Bot
5581b294c2 Updated from global requirements
Change-Id: Ic0a0f060a974fbf605a135f473d55c0a8f5eb4da
2014-08-30 08:36:13 +00:00