From 7d3b179cf841753cdb12d5ca0f01bfe6db636f33 Mon Sep 17 00:00:00 2001 From: Scaleway Bot Date: Tue, 2 Apr 2024 15:30:33 +0200 Subject: [PATCH] feat(llm_inference): change more cli fields to positional (#3732) Co-authored-by: Jules Casteran --- .../test-all-usage-llm-inference-acl-add-usage.golden | 2 +- ...est-all-usage-llm-inference-acl-delete-usage.golden | 2 +- .../test-all-usage-llm-inference-acl-list-usage.golden | 2 +- .../test-all-usage-llm-inference-acl-set-usage.golden | 2 +- ...ll-usage-llm-inference-endpoint-create-usage.golden | 2 +- docs/commands/llm-inference.md | 10 +++++----- go.mod | 2 +- go.sum | 4 ++-- .../llm_inference/v1beta1/llm_inference_cli.go | 10 +++++----- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/cmd/scw/testdata/test-all-usage-llm-inference-acl-add-usage.golden b/cmd/scw/testdata/test-all-usage-llm-inference-acl-add-usage.golden index f3688fc35b..09fceea269 100644 --- a/cmd/scw/testdata/test-all-usage-llm-inference-acl-add-usage.golden +++ b/cmd/scw/testdata/test-all-usage-llm-inference-acl-add-usage.golden @@ -3,7 +3,7 @@ Add new ACL rules for a specific deployment. USAGE: - scw llm-inference acl add [arg=value ...] + scw llm-inference acl add [arg=value ...] ARGS: deployment-id ID of the deployment to add ACL rules to diff --git a/cmd/scw/testdata/test-all-usage-llm-inference-acl-delete-usage.golden b/cmd/scw/testdata/test-all-usage-llm-inference-acl-delete-usage.golden index 26fbf1e8c1..fc08c142f4 100644 --- a/cmd/scw/testdata/test-all-usage-llm-inference-acl-delete-usage.golden +++ b/cmd/scw/testdata/test-all-usage-llm-inference-acl-delete-usage.golden @@ -3,7 +3,7 @@ Delete an exising ACL. USAGE: - scw llm-inference acl delete [arg=value ...] + scw llm-inference acl delete [arg=value ...] ARGS: acl-id ID of the ACL rule to delete diff --git a/cmd/scw/testdata/test-all-usage-llm-inference-acl-list-usage.golden b/cmd/scw/testdata/test-all-usage-llm-inference-acl-list-usage.golden index 57f8d5c9de..e39b93a7a5 100644 --- a/cmd/scw/testdata/test-all-usage-llm-inference-acl-list-usage.golden +++ b/cmd/scw/testdata/test-all-usage-llm-inference-acl-list-usage.golden @@ -3,7 +3,7 @@ List ACLs for a specific deployment. USAGE: - scw llm-inference acl list [arg=value ...] + scw llm-inference acl list [arg=value ...] ARGS: deployment-id ID of the deployment to list ACL rules for diff --git a/cmd/scw/testdata/test-all-usage-llm-inference-acl-set-usage.golden b/cmd/scw/testdata/test-all-usage-llm-inference-acl-set-usage.golden index c4eb787383..8d83cdb244 100644 --- a/cmd/scw/testdata/test-all-usage-llm-inference-acl-set-usage.golden +++ b/cmd/scw/testdata/test-all-usage-llm-inference-acl-set-usage.golden @@ -3,7 +3,7 @@ Set new ACL rules for a specific deployment. USAGE: - scw llm-inference acl set [arg=value ...] + scw llm-inference acl set [arg=value ...] ARGS: deployment-id ID of the deployment to set ACL rules for diff --git a/cmd/scw/testdata/test-all-usage-llm-inference-endpoint-create-usage.golden b/cmd/scw/testdata/test-all-usage-llm-inference-endpoint-create-usage.golden index 6e85d3c8a8..f459733973 100644 --- a/cmd/scw/testdata/test-all-usage-llm-inference-endpoint-create-usage.golden +++ b/cmd/scw/testdata/test-all-usage-llm-inference-endpoint-create-usage.golden @@ -3,7 +3,7 @@ Create a new Endpoint related to a specific deployment. USAGE: - scw llm-inference endpoint create [arg=value ...] + scw llm-inference endpoint create [arg=value ...] ARGS: deployment-id ID of the deployment to create the endpoint for diff --git a/docs/commands/llm-inference.md b/docs/commands/llm-inference.md index d0f3407935..37325564b5 100644 --- a/docs/commands/llm-inference.md +++ b/docs/commands/llm-inference.md @@ -37,7 +37,7 @@ Add new ACL rules for a specific deployment. **Usage:** ``` -scw llm-inference acl add [arg=value ...] +scw llm-inference acl add [arg=value ...] ``` @@ -59,7 +59,7 @@ Delete an exising ACL. **Usage:** ``` -scw llm-inference acl delete [arg=value ...] +scw llm-inference acl delete [arg=value ...] ``` @@ -79,7 +79,7 @@ List ACLs for a specific deployment. **Usage:** ``` -scw llm-inference acl list [arg=value ...] +scw llm-inference acl list [arg=value ...] ``` @@ -99,7 +99,7 @@ Set new ACL rules for a specific deployment. **Usage:** ``` -scw llm-inference acl set [arg=value ...] +scw llm-inference acl set [arg=value ...] ``` @@ -270,7 +270,7 @@ Create a new Endpoint related to a specific deployment. **Usage:** ``` -scw llm-inference endpoint create [arg=value ...] +scw llm-inference endpoint create [arg=value ...] ``` diff --git a/go.mod b/go.mod index 9e6d27d89d..d93c94f89d 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( github.com/moby/buildkit v0.11.6 github.com/opencontainers/go-digest v1.0.0 github.com/pkg/errors v0.9.1 - github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25.0.20240329105646-c0ed2d3750f9 + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25.0.20240329152759-b47741a7bf2a github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 diff --git a/go.sum b/go.sum index ef2554a43f..21314f6118 100644 --- a/go.sum +++ b/go.sum @@ -425,8 +425,8 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI= github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25.0.20240329105646-c0ed2d3750f9 h1:ytq3dM17GsFlK8REuRMMr0+pwqj84824pXLw8m1ruW8= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25.0.20240329105646-c0ed2d3750f9/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25.0.20240329152759-b47741a7bf2a h1:C1cHJWg9ko/9GwhCMD6mY8x0/R4bJd2TA5K0iMaM6eA= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25.0.20240329152759-b47741a7bf2a/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8= github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM= github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE= diff --git a/internal/namespaces/llm_inference/v1beta1/llm_inference_cli.go b/internal/namespaces/llm_inference/v1beta1/llm_inference_cli.go index d660bf024d..20d5d20d31 100644 --- a/internal/namespaces/llm_inference/v1beta1/llm_inference_cli.go +++ b/internal/namespaces/llm_inference/v1beta1/llm_inference_cli.go @@ -416,7 +416,7 @@ func llmInferenceEndpointCreate() *core.Command { Short: `ID of the deployment to create the endpoint for`, Required: true, Deprecated: false, - Positional: false, + Positional: true, }, { Name: "endpoint.private-network.private-network-id", @@ -534,7 +534,7 @@ func llmInferenceACLList() *core.Command { Short: `ID of the deployment to list ACL rules for`, Required: true, Deprecated: false, - Positional: false, + Positional: true, }, core.RegionArgSpec(scw.RegionFrPar, scw.Region(core.AllLocalities)), }, @@ -573,7 +573,7 @@ func llmInferenceACLAdd() *core.Command { Short: `ID of the deployment to add ACL rules to`, Required: true, Deprecated: false, - Positional: false, + Positional: true, }, { Name: "acls.{index}.ip", @@ -617,7 +617,7 @@ func llmInferenceACLSet() *core.Command { Short: `ID of the deployment to set ACL rules for`, Required: true, Deprecated: false, - Positional: false, + Positional: true, }, { Name: "acls.{index}.ip", @@ -661,7 +661,7 @@ func llmInferenceACLDelete() *core.Command { Short: `ID of the ACL rule to delete`, Required: true, Deprecated: false, - Positional: false, + Positional: true, }, core.RegionArgSpec(scw.RegionFrPar), },