Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DBAAS: support for user operations (#654)
# Description <!-- * Prefix: the title with the component name being changed. Add a short and self describing sentence to ease the review * Please add a few lines providing context and describing the change * Please self comment changes whenever applicable to help with the review process * Please keep the checklist as part of the PR. Tick what applies to this change. --> This adds for the following API calls: - Creating users for supported DBAAS services - Deleting users for supported DBAAS services - Resetting user credentials for supported DBAAS services - Listing and showing user details for supported DBAAS services ## Checklist (For exoscale contributors) * [ ] Changelog updated (under *Unreleased* block) * [x] Testing ## Testing ``` ➜ ~/exo/cli git:(tgrondier/sc-104242/cli-users) ✗ go run . dbaas user delete test myuser3 24-11-29 16:12 [+] Are you sure you want to delete user "myuser3" [yN]: y ✔ Creating DBaaS user "myuser3" 0s ┼───────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼ │ DATABASE SERVICE │ │ ┼───────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼ │ Zone │ ch-gva-2 │ │ Name │ test │ │ Type │ mysql │ │ Plan │ hobbyist-2 │ │ Disk Size │ 8.0 GiB │ │ State │ running │ │ Creation Date │ 2024-11-29 15:00:34 +0000 UTC │ │ Update Date │ 2024-11-29 15:02:56 +0000 UTC │ │ Nodes │ 1 │ │ Node CPUs │ 2 │ │ Node Memory │ 2.0 GiB │ │ Termination Protected │ false │ │ Maintenance │ saturday (19:26:58) │ ... │ Users │ avnadmin (primary) │ ┼───────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼ ➜ ~/exo/cli git:(tgrondier/sc-104242/cli-users) ✗ go run . dbaas user reset-credentials test myuser2 24-12-02 10:52 ✔ Resetting DBaaS user "myuser2" 0s ┼────────────────┼──────────────────────────┼ │ SERVICE USER │ │ ┼────────────────┼──────────────────────────┼ │ Username │ myuser2 │ │ Type │ regular │ │ Password │ AVNS_46o-1gO9pE8acEc9Nzp │ │ Access Control │ Categories │ │ │ Channels * │ │ │ Commands │ │ │ Keys │ │ │ │ ┼────────────────┼──────────────────────────┼ ➜ ~/exo/cli git:(tgrondier/sc-104242/cli-users) ✗ go run . dbaas user create test myuser2 24-12-02 10:46 ✔ Creating DBaaS user "myuser2" 0s ┼────────────────┼──────────────────────────┼ │ SERVICE USER │ │ ┼────────────────┼──────────────────────────┼ │ Username │ myuser2 │ │ Type │ normal │ │ Password │ AVNS_QWLuqR0A_FCAll3JiVN │ │ Authentication │ caching_sha2_password │ ┼────────────────┼──────────────────────────┼ ```
- Loading branch information