cli/cluster: add nsc reservation create command#1868
Closed
annervisser wants to merge 2 commits into
Closed
Conversation
Add `nsc reservation` backed by the public ReservationService, with the list, describe, cancel, and wait subcommands. - reservations are served over the Connect/JSON transport (like the private InstanceService), so requests go through fnapi.Call with protojson against the regional endpoint. - wait polls DescribeReservation until the reservation is fulfilled and then prints the instance id; it supports --cidfile and --wait_timeout. Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-019f1880-ac56-7349-b5df-36566f7fc069
Add `nsc reservation create`, with `nsc instance reserve` as an alias. It mirrors the flags of `nsc instance create` but calls the public ReservationService.ReserveInstance API instead of the private InstanceService. - create returns the reservation id by default; --wait blocks until the reservation is fulfilled and the instance is ready, then prints the same output as `nsc instance create` (shared printInstanceCreated). - machine_type accepts the full [os/arch:]<cpu>x<mem> form, with the legacy mac/silicon alias for macos/arm64; --machine_type stays optional. - reuse the k3s version via private.K3sVersion. Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-019f1880-ac56-7349-b5df-36566f7fc069
Member
Author
|
Superseded by #1869. Instead of a separate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #1858.
Add
nsc reservation create, withnsc instance reserveas an alias. It mirrors the flags ofnsc instance createbut calls the publicReservationService.ReserveInstanceAPI instead of the private InstanceService.--waitblocks until the reservation is fulfilled and the instance is ready, then prints the same output asnsc instance create(sharedprintInstanceCreated).machine_typeaccepts the full[os/arch:]<cpu>x<mem>form, with the legacymac/siliconalias formacos/arm64;--machine_typestays optional.private.K3sVersion.Amp-Thread-ID: https://ampcode.com/threads/T-019f1880-ac56-7349-b5df-36566f7fc069