Commit Graph

626 Commits

Author SHA1 Message Date
Zuul 2ab986a473 Merge "Add Datastore Version Registry Extension" 2024-03-28 11:17:29 +00:00
Bo Tran e32a0b0c9c Add Datastore Version Registry Extension
Current, users can config default datastore registry for managers not by
verions. This make you can flexible when have some experimental
datastore.

With this patch, users with the administrator role can configure the
datastore registry external for each datastore version using a command,
without editing configuration files.

Story: #2010860
Task: #48536
Change-Id: I7ee47dd1bb6e52991f0e0028a01e81252a1718c3
2023-12-27 11:09:40 +07:00
Takashi Kajinami 5860dc8ffc Remove six
Python 2 is no longer supported, thus usage of six can be removed.

Change-Id: I7442242289f269d95432209e74caa3cd3917ac5d
2022-05-17 22:02:22 +09:00
Zuul c1a320cef4 Merge "Adapts new API response schema" 2022-04-18 12:54:40 +00:00
Hirotaka Wakabayashi 4815692d8c Uses the "network_id" param creating a cluster
This PR replaces a request parameter name "net-id" with "network_id"
creating a cluster. When creating a cluster, Clusters API internally
calls Instaces API to create a instance. A request parameter name to
create instances has changed[1] but python-troveclient still uses
old parameter name when creating a cluster.

The original problem is instance creation error when creating a
instance that belongs to a cluster. Troves's Instances API has
changed a parameter name from "net-id" to "network_id", but Clusters
API and python-troveclient still uses the "net-id" parameter name.
We need to fix it.

[1]: 5354172407

Task: 44925
Story: 2009958
Change-Id: Ia3d1d6f451296eba34f2389da184c41a7ee9e84e
2022-04-09 18:07:58 +00:00
Hirotaka Wakabayashi 2dbbf5656e Adapts new API response schema
This PR makes troveclient to handle API response in new data schema.
Trove API response data schema has changed by the commit[1].

Original problem is that python-troveclient can't parse a API response
data in new data schema, resulting in an error.

[1]: 429c39890e

Task: 44986
Story: 2009979
Change-Id: I2e446c68c3b82c11d13f6bace54273c109e02069
2022-04-08 04:06:30 +09:00
Lingxian Kong 64f3f62368 Fix detach configuration from instance
Change-Id: Id0853dfb207bbd219755d46a9c0d6b4e897bfbeb
2021-07-09 20:47:13 +12:00
Lingxian Kong cd68986948 Get backup list by instance ID or name
Change-Id: I97d3fcfa2935f76cb8753734fec6dab8669e732a
2021-05-19 20:43:06 +12:00
Lingxian Kong e41d08d243 Support project name in quota CLI
Change-Id: I9886792f346bbe8d4887539ca69588b4957547e1
2021-04-29 14:17:48 +12:00
Dmitriy Rabotyagov 1d533778d7 Respect endpoint, cacert and debug options
When troveclient is used as a plugin for osc, it does not respect
provided endpoint type or cert via osc. This might result in
CERTIFICATE_VERIFY_FAILED error with osc, but not with trove shell.

Change-Id: I3d34774e87fcf0fe8efb024d4e6ff80a4e3f49c6
2021-03-30 14:49:37 +03:00
Lingxian Kong c7319d8fe8 Support to restore backup from data location
This feature needs to bump python-troveclient major version as it
introduced an incompatible change for backup creation CLI.

Change-Id: I6fe94ccb552e2c0020150494ccc2ba6361184229
2021-02-21 00:37:08 +13:00
Lingxian Kong 4c71809fad Bulk backup delete
Change-Id: I100f8a302aeb498e3c0cebd8d36ef5fa437d444d
2021-02-19 11:07:23 +13:00
Joel Capitao 8271ba8719 Switch to collections.abc.*
The abstract base classes previously defined in 'collections' were moved
to 'collections.abc' in 3.3. The aliases will be removed in 3.10.
Preempt this change now with a simple find-replace:

  $ ag -l 'collections.($TYPES)' | \
      xargs sed -i 's/\(collections\)\.\($TYPES\)/\1.abc.\2/g'

Where $TYPES is the list of moved ABCs from [1].

[1] https://docs.python.org/3/library/collections.abc.html

Credit for this commit message to Stephen Finucane <stephenfin@redhat.com>

Change-Id: I782f2449832398cf2cfb886f561635de3d8ac18d
2021-02-11 12:29:00 +01:00
likui 3bdae37673 remove unicode from code
Change-Id: Iadc87779bf513c9d04847b6cf8ecbc60b300d7db
Implements: blueprint remove-unicode
2021-01-03 13:03:32 +08:00
zhangjunhui 182301ac68 Fix a bug in print_list when using formatters
If using formatters it will raise a error that local variable
'data' referenced before assignment

story: 2008472
task: 41511
Change-Id: I6c66139b54a203bd8af01e8534e4d7ce7735e02d
2020-12-29 16:29:51 +08:00
Lingxian Kong 961ef31807 Fix getting server id for listing instances
Just use 'server_id' from the instance response instead.

Story: 2008464
Task: 41496
Change-Id: Ib84dbd5fbd752ab7c7607ccb874663b01bfb7388
2020-12-23 13:29:41 +13:00
Lingxian Kong 23b5546f53 Support operating_status for instance
Change-Id: I3f5badc4d3bbb41de008d39e813d48f6aa670dc1
2020-12-09 11:10:28 +13:00
Lingxian Kong b02459fb1d Show server_id for listing instance by admin
Story: 2008420
Task: 41361

Change-Id: I4dd67cf9aa9a13a520e69872d2752d22f19e63cf
2020-12-09 09:36:33 +13:00
Lingxian Kong 6fab3f7fff Fix creating datastore version
Story: 2008419
Task: 41360

Change-Id: Ib14e5d56f75b68f32ee3ec23a198f618e5141931
2020-12-05 12:26:15 +13:00
Zuul 8b892239dc Merge "Revert "Fix resize flavor for instance"" 2020-11-26 02:17:17 +00:00
Lingxian Kong 3647805c67 Revert "Fix resize flavor for instance"
Story: 2008341
Task: 41244

This reverts commit f859692cc3.

Change-Id: I690956927fb2558950362d1f223596db92e53d1e
2020-11-26 13:37:58 +13:00
Lingxian Kong e43454f4b0 Fix getting datastore versions against previous trove service release
Change-Id: I9d08740b9e220d24aad7f691491d5eea8a7e16f9
2020-11-22 22:50:26 +13:00
Lingxian Kong a57568397e Support datastore version number
- Support "--datastore-version-number" for creating configuration
- Support "--datastore-version-number" for creating instance
- Support "--version-number" for creating datastore version
- Support "--version-name" for updating datastore version
- Support showing version number for datastore version, instance and
  configuration

Story: 2008358
Task: 41264

Change-Id: Ie84b4506736a82a214b0416f7e451d565552f651
2020-11-21 23:44:42 +00:00
Zuul f28390ee5d Merge "Revert "Remove flavor API"" 2020-11-13 08:53:57 +00:00
Lingxian Kong c04e299b1d Revert "Remove flavor API"
Story: 2008341
Task: 41242

This reverts commit 27cf71299e.

Change-Id: I036a0423263b1a0332415c6403647ae82c9e34c4
2020-11-13 20:53:10 +13:00
Lingxian Kong 20566017e5 Do not make extra API call for listing instances
Story: 2008343
Task: 41245

Change-Id: Id6a0dc82430dc601d4102729b3ac010e137881c6
2020-11-13 10:31:57 +13:00
Sam Morrison dd371f0454 Raise error if trying to create an instance without a flavor
Change-Id: Iee4d92921d75f4d72405342fb5147a8bbfd269e5
Story: 2008340
Task: 41241
2020-11-11 16:28:33 +11:00
Sam Morrison eedc89e9d1 Fix up wrong import of exception class
Change-Id: Ib0fb05c82477c4f081a5608012c7d64b3857a223
Story: 2008342
Task: 41243
2020-11-11 16:28:06 +11:00
Lingxian Kong 06fa9f62b6 Fix help message of datastore version upgrade
Change-Id: I9399c62815c20f8db129bf22647e7457eaae0f57
2020-11-05 00:06:02 +13:00
Lingxian Kong 7c9a57665d Support getting instances for a project
Change-Id: I1b3e8dce864740221722070a710f5a2f867d6c4b
2020-10-22 08:51:55 +13:00
wangzihao 17d2d5175e Remove six
Remove all usages of six.

Change-Id: I6ea8d1cdc3060d5c2a4311c7454b66ba75109b0c
2020-10-13 11:02:06 +08:00
likui dfb45e2b66 Use importlib to take place of imp module
The imp module is deprecated[1] since version 3.4, use importlib to
instead

[1]: https://docs.python.org/3/library/imp.html

Change-Id: Ifb44be3b0a0c35dd99d0230e9c371dfcb97f6fdd
2020-10-09 18:21:30 +08:00
Lingxian Kong d233dbea8e image is not required for creating datastore version
Change-Id: Ic4efe1fec9b26b90d1412ab13b94939961bb4be3
2020-10-09 01:55:03 +13:00
Lingxian Kong 28d7981eac Support updating datastore version
Change-Id: Ie6f22493d1722f41db5aa1a601a652e7eefa29c4
2020-10-09 01:09:38 +13:00
Zuul 0f5ffbe632 Merge "Show project Id for backup" 2020-09-15 22:01:43 +00:00
Lingxian Kong bbeb4009a4 Support region in CLI
Change-Id: Ia0580a599fc2385d54def4e18e0780209b82eff7
2020-09-16 09:14:25 +12:00
Lingxian Kong 4756e291b6 Show project Id for backup
Change-Id: I7314abe06ac750c202382ffcf37eaa08bfabcede
2020-09-15 12:27:41 +12:00
Zuul e658e600fd Merge "Support getting backups of a specific project" 2020-09-13 12:42:26 +00:00
Lingxian Kong e4d79c2cbc Support getting backups of a specific project
Change-Id: Ia590fa6aae23b7323963181d79c9b0097fd2e4d1
2020-09-14 00:07:12 +12:00
Lingxian Kong 302ae3f8ac Fix replica detach command
Change-Id: I1d6ae85f93c4b2e549ba528f33ead1076daa601d
2020-09-10 14:06:57 +12:00
Lingxian Kong e0e9be4602 Add support of subnet-id and ip-address for creating instance
Change-Id: Id88e8100a397b1512c73a0b28f14ab8edb221689
2020-08-23 14:37:04 +12:00
Lingxian Kong 2279d2f170 Fix key error when getting private instance
Change-Id: Iff7baea5719f5b94d3e89048d17b37c0682dfdb8
2020-08-23 11:39:57 +12:00
Lingxian Kong ac96356fd5 Fix create instance
Change-Id: I750434c7ebc9038b0acf0e657768f57981817e1f
2020-08-12 22:29:04 +12:00
Lingxian Kong 61b76377fd Support getting and updating instance access info
* Added "public" and "allowed_cidrs" fields for getting instance.
* Added '--is-public/--is-private' and '--allowed-cidr' for updating.

Change-Id: Ifc919667e83573bd6c3b7aff205fe08e82667457
2020-08-11 17:35:41 +12:00
Lingxian Kong 09aff4df80 Support rebuild instance CLI
Change-Id: Ieae9216033d1c9ce0078554c7519bc891f50dc35
2020-08-06 21:47:40 +12:00
Lingxian Kong c23da586e9 Flavor is optional for creating instance
When creating replicas, flavor is not needed. Replica has the same
server settings as the primary.

Change-Id: Ia9b43a464763234b84ba163d8c773b21f53f4ee7
2020-07-26 21:57:05 +12:00
Lingxian Kong 40af556264 Support backup strategy
Change-Id: Ic8c20109b287f2f9220379cb249669d18b52893d
2020-07-16 23:03:53 +12:00
Zuul dfacd5764c Merge "Replace assertItemsEqual with assertCountEqual" 2020-06-23 12:05:45 +00:00
Zuul 147cdc88d9 Merge "Use unittest.mock instead of mock" 2020-06-23 12:05:44 +00:00
Lingxian Kong a9c3174cdd Use primary instead of master for listing instances
Change-Id: I0e597a64fae27016fc06195e8f3531a26753966f
2020-06-17 21:28:35 +12:00