python-digitalocean icon indicating copy to clipboard operation
python-digitalocean copied to clipboard

Added DO Database endpoints

Open MSAdministrator opened this issue 6 years ago • 5 comments

Adding the capability to do the following within the DigitalOcean Database endpoints:

  • Database Clusters, Replicas, Database Users, and Databases within a cluster
    • Create
    • Destroy
    • List
    • Get

Additionally, Database clusters can be:

  • Resized
  • Migrated
  • Maintenance Window Set

MSAdministrator avatar Nov 11 '19 18:11 MSAdministrator

Any thoughts on this?

MSAdministrator avatar Jan 03 '20 01:01 MSAdministrator

The lack of tests is only reason PR isn't merged yet? Can fix that if so.

orn0t avatar Feb 22 '20 14:02 orn0t

Sorry all, I have not had the time to write the tests. @orn0t if you want to go right ahead.

MSAdministrator avatar Feb 22 '20 16:02 MSAdministrator

@MSAdministrator could u also implement endpoints for databases itself?

MY_DATABASE_CLUSTER.add_database(name='myNewDatabase') https://developers.digitalocean.com/documentation/v2/#add-a-new-database

MY_DATABASE_CLUSTER.delete_database(name='myOldDatabase') https://developers.digitalocean.com/documentation/v2/#delete-a-database

MY_DATABASE_CLUSTER.list() https://developers.digitalocean.com/documentation/v2/#list-all-databases

MY_DATABASE_CLUSTER.add_user(name='myNewUser') https://developers.digitalocean.com/documentation/v2/#add-a-database-user

MY_DATABASE_CLUSTER.remove_user(name='myOldUser') https://developers.digitalocean.com/documentation/v2/#remove-a-database-user

And if the database engine is mysql it would be super cool the change to auth method MY_DATABASE_USER.reset_mysql_auth_method(method='caching_sha2_password') https://developers.digitalocean.com/documentation/v2/#reset-a-database-user-s-mysql-authentication-method

Many thanks for your contributions to this project.

KasparWe avatar Mar 10 '20 21:03 KasparWe

@MSAdministrator if you need help writing tests just ping me :)

KasparWe avatar Mar 10 '20 21:03 KasparWe