Commit Graph

47 Commits

Author SHA1 Message Date
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
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 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
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
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 7c9a57665d Support getting instances for a project
Change-Id: I1b3e8dce864740221722070a710f5a2f867d6c4b
2020-10-22 08:51:55 +13: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 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 6e440c35bd Remove unnecessary API call for listing instances
Change-Id: Ibd6a1ce15abc12524f49f4091acb38d6841a8476
2020-06-11 00:09:02 +12:00
Lingxian Kong 99126428ce Support role for listing instances
Change-Id: Ia3e8d5d65bc134f3c7bc62ca9c170018be54660c
2020-06-03 15:23:55 +12:00
Lingxian Kong 27cf71299e Remove flavor API
Change-Id: I5a35911b5658fdf6bc08844b31cc1325b749526a
2020-05-08 00:30:49 -06:00
Sean McGinnis 2b8282bb1e
Use unittest.mock instead of third party mock
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: Ib83e626f51e6e01898bb7931c1660a1a548500f3
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-18 11:59:46 -05:00
Lingxian Kong f859692cc3 Fix resize flavor for instance
Change-Id: I9192857a690585cb3f365b15707dfa98e521e788
Story: #2007188
Task: #38315
2020-01-21 11:15:14 +13:00
Lingxian Kong 68e3ae83c1 Support to reboot instance
openstack database instance reboot <instance>

Change-Id: Id5ac985399797356165eaac68dd05bc46ee0124d
2020-01-04 18:07:35 +13:00
Lingxian Kong a0324f4109 Support to force delete instance
Change-Id: I20802f199ef943244f27a842743434e1c84c79e5
2020-01-04 00:22:51 +13:00
Lingxian Kong 4463f36eb0 Add IP addresses in instance list output
Change-Id: I469fe301f438577ee7c897dcddb28cb672e50c6b
2019-12-25 00:38:50 +13:00
Lingxian Kong f5a57732a9 Support log actions in osc plugin
- openstack database log show <instance_id> <log_name>
- openstack database log set <instance_id> <log_name>
  [OPTIONS]

Change-Id: I86f414a53e6f6416f96e0040635bb010aa49cf41
2019-12-16 13:41:30 +13:00
Lingxian Kong 4d54360691 Support to create public instance
Add two params for creating instance:
'--is-public' and '--allowed-cidr'

Change-Id: I3bc69e3d56d250b562543f0de2c78c05fcaefead
Story: 2006500
Task: 36469
2019-09-11 21:40:06 +12:00
Lingxian Kong 16d1dedb54 Support to batch delete database instances
Allow users to delete database instances in batch, usage:

usage: openstack database instance delete [-h] instance [instance ...]

Change-Id: I88a15ba1910f7b3294067b54ae4a7a9b4c4a17a5
2019-06-06 13:38:35 +12: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
Zuul 3adf5fe392 Merge "Add promote-to-replica-source to OSC" 2018-07-18 06:21:52 +00:00
wangyao 42913d9248 Add detach-replica to OSC
This change adds database support to the python-openstackclient
project for the detach-replica command.

The trove command detach-replica is now:
    openstack database instance detach replica

Change-Id: Ia6034eccbd3490696270d44d00966c3da94b3999
Partially-Implements: blueprint trove-support-in-python-openstackclient
2018-07-17 16:36:02 +08:00
wangyao 3f705bd0c8 Add promote-to-replica-source to OSC
This change adds database support to the python-openstackclient
project for the promote-to-replica-source command.

The trove command promote-to-replica-source is now:
    openstack database instance promote to replica source

Change-Id: I0009b3e1074ddabaed6b02f5578f28cffc995b30
Partially-Implements: blueprint trove-support-in-python-openstackclient
2018-07-17 16:03:41 +08:00
wangyao a199d90aa1 Add eject-replica-source to OSC
This change adds database support to the python-openstackclient
project for the eject-replica-source command.

The trove command eject-replica-source is now:
    openstack database instance eject replica source

Change-Id: I674e78e310b2953b28d0829cbe6fda62c00b6ea8
Partially-Implements: blueprint trove-support-in-python-openstackclient
2018-07-13 16:59:01 +08:00
Zuul 0bc788e55c Merge "Fix log-enable high priority error" 2018-01-23 16:26:56 +00:00
caishan e30e8db7e7 Fix log-enable high priority error
1. Modify setup.cfg to make command openstack database log enable run
correctlly. class EnableDatabaseInstanceLog should be in database_instances,
not in database_limits. This is a HIGH priority error.

2. Originally, trove log-enable will return a log info when execute successfully.
This change makes OSC log_enable acts like the origin troveclient enable_log.

Change-Id: I68c5ef451c8e6c7fb189d6270bad002da7ffc9a6
2018-01-22 05:38:27 -08:00
Zhao Chao bf24669d60 Add 'update' command to OSC
This change adds database support to the python-openstackclient
project for the 'update' command.

The trove command update is now:
    openstack database instance update

Change-Id: I426c892540f82bc19b7b28d7845a2f6699c3f526
Partially-Implements: blueprint trove-support-in-python-openstackclient
Signed-off-by: Zhao Chao <zhaochao1984@gmail.com>
2018-01-22 10:00:48 +08:00
caishan 38b870575f Add restart to OSC
This change adds database support to the python-openstackclient
project for the restart command

The trove command restart is now:
    openstack database instance restart

Change-Id: I24eeb001d27eae39be5c33650e9bc04287053c8c
Partially-Implements: blueprint trove-support-in-python-openstackclient
2018-01-21 06:44:56 -08:00
caishan 34dbc53ec2 Add log-enable to OSC
This change adds database support to the python-openstackclient
project for the log-enable command

The trove command log-enable is now:
    openstack database log enable

Change-Id: Ia5bb395264946f79673970336e4c1f23857bb77d
Partially-Implements: blueprint trove-support-in-python-openstackclient
2018-01-21 00:51:51 +00:00
Zhao Chao e89cadc0ed Add force-delete to OSC
This change adds database support for the python-openstackclient
project for the force-delete and cluster-force-delete commands.

The trove command force-delete is now:
    openstack database instance force delete
The trove command cluster-force-delete is now:
    openstack database cluster force delete

Change-Id: I919678ca6b06d3b5762eac1990cc1fbf0e149d7c
Partially-Implements: blueprint trove-support-in-python-openstackclient
Signed-off-by: Zhao Chao <zhaochao1984@gmail.com>
2018-01-20 17:20:32 +08:00
caishan f0f4aeeec6 Add resize-volume to OSC
This change adds database support to the python-openstackclient
project for the resize-volume command

The trove command resize-volume is now:
    openstack database instance resize volume

Change-Id: If2413a605d294db0b0ee9c7aa49fbb1c929ebcd0
Partially-Implements: blueprint trove-support-in-python-openstackclient
2018-01-19 21:04:44 +00:00
Zhao Chao e93d56de56 Add upgrade to OSC
This change adds database support for the python-openstackclient
project for the upgrade and cluster-upgrade commands.

The trove command upgrade is now:
    openstack database instance upgrade
The trove command cluster-upgrade is now:
    openstack database cluster upgrade

Change-Id: Ic416d476c645fa3c697881fb001d512ed3d25d2b
Partially-Implements: blueprint trove-support-in-python-openstackclient
Signed-off-by: Zhao Chao <zhaochao1984@gmail.com>
2018-01-19 09:09:33 +08:00
caishan 3747c17e18 Add resize-instance to OSC
This change adds database support to the python-openstackclient
project for the resize-instance command

The trove command resize-instance is now:
    openstack database instance resize flavor

Change-Id: I58f8a6ebf8f715c5cc67ce67a36f87d720056ffe
Partially-Implements: blueprint trove-support-in-python-openstackclient
2018-01-18 01:35:29 -08:00
zhanggang f11d1bb7cc Add reset-status to OSC
This change adds database support to the python-openstackclient
project for the cluster-reset-status and reset-status command.

The trove command cluster-reset-status is now:
    openstack database cluster reset status
The trove command reset-status is now:
    openstack database instance reset status

Change-Id: I8945327d244bfd2a9afe7febb7179467a8be9bd0
Partially-Implements: blueprint trove-support-in-python-openstackclient
2017-12-28 00:04:18 -05:00
wangyao 81c38d5824 Add create to OSC
This change adds database support to the python-openstackclient
project for the create command.

The trove command create is now:
    openstack database instance create

Change-Id: Icab8761a35a4cbc2f7b5f845eb1da917675eb98d
Partially-Implements: blueprint trove-support-in-python-openstackclient
2017-12-23 07:19:12 +08:00
Zuul addd13a310 Merge "Add instance-delete to OSC" 2017-12-20 19:52:23 +00:00
zhanggang f88012ebec Add instance-delete to OSC
This change adds database support to the python-openstackclient
project for the instance-delete command.

The trove command delete is now:
    openstack database instance delete

Change-Id: Id052d14190e9fbdfe10db4e043fa78d6aef83ba9
Partially-Implements: trove-support-in-python-openstackclient
2017-12-08 03:09:12 -05:00
wangyao ec601fb0ee Fix abnormal display with openstack database instance list
According bug description, openstack database instance list
abnormal display except first instance. The cause of the problem
is method set_attributes_for_print when return instances got a
wrong indentation. So just modify this. And modify tests to
validate it.

Change-Id: I6124706ba79ab13bbd769631f491e314784652c7
Closes-Bug: #1734228
2017-12-07 09:47:11 +08:00
wangyao 1c1efa56d3 Add show to OSC
This change adds database support to the python-openstackclient
project for the show command.

The trove command show is now:
    openstack database instance show

Change-Id: I18580a7cc3394cecede18c15dc2fa9027ea842ba
2017-12-03 21:19:52 +08:00
Trevor McCasland 09b5f9fa5e Add list to OSC
This change adds database support to the python-openstackclient
project for the list command.

The trove command list is now:
    openstack database instance list

Partially-Implements: blueprint trove-support-in-python-openstackclient
Change-Id: Ic5328827dbf6d1f47db62f0bb2e65e164a0b2b6b
2017-06-11 01:59:35 +00:00