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

CLOUDP-305570: Add --watch to Outage simulation #3717

Merged
merged 1 commit into from
Mar 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ Options
- string
- false
- api version to use when calling the api call [options: "2023-01-01"], defaults to the latest version or the profiles api_version config value if set This value defaults to "2023-01-01".
* - -w, --watch
-
- false
- Flag that indicates whether to watch the command until it completes its execution or the watch times out.
* - --watchTimeout
- int
- false
- Time in seconds until a watch times out. After a watch times out, the CLI no longer watches the command.

Inherited Options
-----------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ Options
- string
- false
- api version to use when calling the api call [options: "2023-01-01"], defaults to the latest version or the profiles api_version config value if set This value defaults to "2023-01-01".
* - -w, --watch
-
- false
- Flag that indicates whether to watch the command until it completes its execution or the watch times out.
* - --watchTimeout
- int
- false
- Time in seconds until a watch times out. After a watch times out, the CLI no longer watches the command.

Inherited Options
-----------------
Expand Down
32 changes: 32 additions & 0 deletions internal/api/commands.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions tools/api-generator/overlays/watchers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -441,3 +441,30 @@ actions:
values:
- completed
- failed
- target: $.paths['/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/outageSimulation'].post
update:
x-xgen-atlascli:
watcher:
get:
version: "2023-01-01"
operation-id: getOutageSimulation
params:
groupId: input:groupId
clusterName: input:clusterName
expect:
match:
path: $.state
values:
- SIMULATING
- target: $.paths['/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/outageSimulation'].delete
update:
x-xgen-atlascli:
watcher:
get:
version: "2023-01-01"
operation-id: getOutageSimulation
params:
groupId: input:groupId
clusterName: input:clusterName
expect:
http-code: 404
Loading