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

Add support for database events in Doctl #1524

Merged

Conversation

bhardwajRahul
Copy link
Contributor

@bhardwajRahul bhardwajRahul commented Apr 16, 2024

This PR aims at adding support for database events in Doctl.

Command Details

Retrieves a list of database cluster events:

You can get a list of database events by calling:

	doctl databases events list <cluster-id>

Usage:
  doctl databases events list <database-cluster-id> [flags]

Aliases:
  list, ls

Examples:
The following example retrieves a list of databases events in a database cluster with the ID `ca9f591d-f38h-5555-a0ef-1c02d1d1e35`: doctl databases events list ca9f591d-f38h-5555-a0ef-1c02d1d1e35

Global Flags:
  -t, --access-token string   API V2 access token
  -u, --api-url string        Override default API endpoint
  -c, --config string         Specify a custom config file (default "/home/user/.config/doctl/config.yaml")
      --context string        Specify a custom authentication context name
      --http-retry-max int    Set maximum number of retries for requests that fail with a 429 or 500-level error (default 5)
      --interactive           Enable interactive behavior. Defaults to true if the terminal supports it (default true)
  -o, --output string         Desired output format [text|json] (default "text")
      --trace                 Show a log of network activity while performing a command
  -v, --verbose               Enable verbose output
  

Command Usage

doctl -t $token databases events list 46f972cf-c41b-433e-96f6-8fad9cbd7119

Ouput

ID               Cluster Name           Type of Event     Create Time
pe49fdf5c6275    db-kafka-nyc3-22258    cluster_create    2024-03-21T11:01:16Z

Copy link
Member

@andrewsomething andrewsomething left a comment

Choose a reason for hiding this comment

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

This looks great! As it adds a new command, can we also get an integration style test. For example:

https://github.com/digitalocean/doctl/blob/main/integration/database_user_list_test.go

@andrewsomething andrewsomething self-requested a review April 16, 2024 15:53
Copy link
Member

@andrewsomething andrewsomething left a comment

Choose a reason for hiding this comment

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

Thanks!

@andrewsomething andrewsomething merged commit 75b63a5 into digitalocean:main Apr 16, 2024
7 checks passed
@bhardwajRahul bhardwajRahul deleted the rbhardwaj/OLDDBAAS-4340 branch April 16, 2024 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants