Skip to content

feat(hosting): add vps list, get, start, stop and restart - #428

Draft
nverma-godaddy wants to merge 3 commits into
godaddy:mainfrom
nverma-godaddy:VPS4-6814-hosting-vps-list
Draft

nverma-godaddy wants to merge 3 commits into
godaddy:mainfrom
nverma-godaddy:VPS4-6814-hosting-vps-list

Conversation

@nverma-godaddy

Copy link
Copy Markdown

What

Adds the gddy hosting vps command group for virtual private servers, behind the hosting-vps feature flag (Experimental), so it is hidden in a normal build.

  • hosting vps list: name, id, status, os, controlPanel, createdAt, expiresAt. --limit caps how many are shown
  • hosting vps get --server-id <id>: one server in detail
  • hosting vps start --server-id <id>
  • hosting vps stop --server-id <id> --confirm
  • hosting vps restart --server-id <id> --confirm
  • hosting vps operation get --server-id <id> --operation-id <id>

Behaviour:

  • stop and restart send nothing without --confirm; start needs none
  • Write commands wait for the operation (poll every 5 s, give up after 15 minutes) and exit non-zero on FAILED with the reason. --no-wait returns at once
  • New default scopes hosting.server:read and hosting.server:execute
  • New guide gddy guide hosting-vps

Blocked on

  • Spec: gdcorp-platform/hosting.application-lifecycle-specification#16. rust/hosting-client/openapi/hosting.oas3.json here was generated from that branch, so the catalog drift check will fail until it merges. After the merge I will rerun cargo run -p generate-api-catalog and commit the result, including rust/schemas/api/hosting.json.
  • The two new scopes must be registered on the CLI's OAuth clients before login can grant them.
  • The servers API is not live yet (VPS4 backend and gateway routes).

Testing

  • cargo check --workspace, cargo clippy --workspace --all-targets -- -D warnings, cargo fmt --check, ./rust/scripts/check-module-size.sh: pass
  • cargo test --workspace: pass (1600 in the main crate)
  • vale on the new guide: 0 errors, 0 warnings
  • Run end to end against a local VPS4 on the test environment: list and get returned real servers, and stop without --confirm sent nothing. start, stop --confirm and restart --confirm were not run end to end; the test environment's kill switch blocks writes.

Jira: VPS4-6814

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.

1 participant