Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added DO Database endpoints #292

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

MSAdministrator
Copy link

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
Copy link
Author

Any thoughts on this?

Copy link
Owner

@koalalorenzo koalalorenzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like tests are missing

@orn0t
Copy link

orn0t commented Feb 22, 2020

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

@MSAdministrator
Copy link
Author

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

@KasparWe
Copy link

@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
Copy link

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

digitalocean/Database.py Outdated Show resolved Hide resolved
Co-Authored-By: Douwe Maan <me@douwe.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants