Merge remote-tracking branch 'origin' into fix-windows-root-filer

This commit is contained in:
Shreyas Goenka 2023-06-15 19:40:05 +02:00
commit 0947b61bab
No known key found for this signature in database
GPG Key ID: 92A07DF49CCB0622
93 changed files with 1955 additions and 175 deletions

View File

@ -18,6 +18,13 @@ var accountCmd = &cobra.Command{
func init() {
root.RootCmd.AddCommand(accountCmd)
{{range .Services}}{{if .IsAccounts}}{{if not (in $excludes .KebabName) }}
accountCmd.AddCommand({{.SnakeName}}.Cmd){{end}}{{end}}{{end}}
{{range .Services}}{{if .IsAccounts}}{{if not (in $excludes .KebabName) -}}
accountCmd.AddCommand({{.SnakeName}}.Cmd)
{{end}}{{end}}{{end}}
// Register commands with groups
{{range .Services}}{{if .IsAccounts}}{{if not (in $excludes .KebabName) -}}
{{.SnakeName}}.Cmd.GroupID = "{{ .Package.Name }}"
{{end}}{{end}}{{end}}
}

View File

@ -1,6 +1,6 @@
// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT.
package cmd
package workspace
{{$excludes := list "command-execution" "statement-execution" "dbfs" "dbsql-permissions"}}
@ -11,6 +11,12 @@ import (
)
func init() {
{{range .Services}}{{if not .IsAccounts}}{{if not (in $excludes .KebabName) }}
root.RootCmd.AddCommand({{.SnakeName}}.Cmd){{end}}{{end}}{{end}}
{{range .Services}}{{if not .IsAccounts}}{{if not (in $excludes .KebabName) -}}
root.RootCmd.AddCommand({{.SnakeName}}.Cmd)
{{end}}{{end}}{{end}}
// Register commands with groups
{{range .Services}}{{if not .IsAccounts}}{{if not (in $excludes .KebabName) -}}
{{.SnakeName}}.Cmd.GroupID = "{{ .Package.Name }}"
{{end}}{{end}}{{end}}
}

View File

@ -20,13 +20,18 @@ import (
{{define "service"}}
var Cmd = &cobra.Command{
Use: "{{(.TrimPrefix "account").KebabName}}",
{{if .Description -}}
Short: `{{.Summary | without "`"}}`,
{{- if .Description }}
Short: `{{.Summary | without "`"}}`,
Long: `{{.Comment " " 80 | without "`"}}`,
{{- end}}
{{- end }}
Annotations: map[string]string{
"package": "{{ .Package.Name }}",
},
{{- if .IsPrivatePreview }}
// This service is being previewed; hide from help output.
Hidden: true,
{{- end }}
}
{{- $serviceName := .KebabName -}}
@ -79,10 +84,16 @@ func init() {
{{- $hasRequiredArgs := and (not $hasIdPrompt) $hasPosArgs -}}
var {{.CamelName}}Cmd = &cobra.Command{
Use: "{{.KebabName}}{{if $hasPosArgs}}{{range .Request.RequiredFields}} {{.ConstantName}}{{end}}{{end}}",
{{if .Description -}}
Short: `{{.Summary | without "`"}}`,
{{- if .Description }}
Short: `{{.Summary | without "`"}}`,
Long: `{{.Comment " " 80 | without "`"}}`,
{{end}}
{{- end }}
{{- if .IsPrivatePreview }}
// This command is being previewed; hide from help output.
Hidden: true,
{{- end }}
Annotations: map[string]string{},{{if $hasRequiredArgs }}
Args: func(cmd *cobra.Command, args []string) error {
check := cobra.ExactArgs({{len .Request.RequiredFields}})
@ -174,6 +185,9 @@ var {{.CamelName}}Cmd = &cobra.Command{
{{template "method-call" .}}
{{end -}}
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
{{end}}
// end service {{.Name}}{{end}}

View File

@ -1,5 +1,20 @@
# Version changelog
## 0.100.4
CLI:
* Add workspace import-dir command ([#456](https://github.com/databricks/cli/pull/456)).
* Annotate generated commands with OpenAPI package name ([#466](https://github.com/databricks/cli/pull/466)).
* Associate generated commands with command groups ([#475](https://github.com/databricks/cli/pull/475)).
* Disable shell completions for generated commands ([#483](https://github.com/databricks/cli/pull/483)).
* Include [DEFAULT] section header when writing ~/.databrickscfg ([#464](https://github.com/databricks/cli/pull/464)).
* Pass through proxy related environment variables ([#465](https://github.com/databricks/cli/pull/465)).
* Restore flags to original values on test completion ([#470](https://github.com/databricks/cli/pull/470)).
* Update configure command ([#482](https://github.com/databricks/cli/pull/482)).
Dependencies:
* Bump SDK to latest ([#473](https://github.com/databricks/cli/pull/473)).
## 0.100.3
CLI:

25
LICENSE Normal file
View File

@ -0,0 +1,25 @@
DB license
Copyright (2022) Databricks, Inc.
Definitions.
Agreement: The agreement between Databricks, Inc., and you governing the use of the Databricks Services, which shall be, with respect to Databricks, the Databricks Terms of Service located at www.databricks.com/termsofservice, and with respect to Databricks Community Edition, the Community Edition Terms of Service located at www.databricks.com/ce-termsofuse, in each case unless you have entered into a separate written agreement with Databricks governing the use of the applicable Databricks Services.
Software: The source code and object code to which this license applies.
Scope of Use. You may not use this Software except in connection with your use of the Databricks Services pursuant to the Agreement. Your use of the Software must comply at all times with any restrictions applicable to the Databricks Services, generally, and must be used in accordance with any applicable documentation. You may view, use, copy, modify, publish, and/or distribute the Software solely for the purposes of using the code within or connecting to the Databricks Services. If you do not agree to these terms, you may not view, use, copy, modify, publish, and/or distribute the Software.
Redistribution. You may redistribute and sublicense the Software so long as all use is in compliance with these terms. In addition:
You must give any other recipients a copy of this License;
You must cause any modified files to carry prominent notices stating that you changed the files;
You must retain, in the source code form of any derivative works that you distribute, all copyright, patent, trademark, and attribution notices from the source code form, excluding those notices that do not pertain to any part of the derivative works; and
If the source code form includes a "NOTICE" text file as part of its distribution, then any derivative works that you distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the derivative works.
You may add your own copyright statement to your modifications and may provide additional license terms and conditions for use, reproduction, or distribution of your modifications, or for any such derivative works as a whole, provided your use, reproduction, and distribution of the Software otherwise complies with the conditions stated in this License.
Termination. This license terminates automatically upon your breach of these terms or upon the termination of your Agreement. Additionally, Databricks may terminate this license at any time on notice. Upon termination, you must permanently delete the Software and all copies thereof.
DISCLAIMER; LIMITATION OF LIABILITY.
THE SOFTWARE IS PROVIDED “AS-IS” AND WITH ALL FAULTS. DATABRICKS, ON BEHALF OF ITSELF AND ITS LICENSORS, SPECIFICALLY DISCLAIMS ALL WARRANTIES RELATING TO THE SOURCE CODE, EXPRESS AND IMPLIED, INCLUDING, WITHOUT LIMITATION, IMPLIED WARRANTIES, CONDITIONS AND OTHER TERMS OF MERCHANTABILITY, SATISFACTORY QUALITY OR FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. DATABRICKS AND ITS LICENSORS TOTAL AGGREGATE LIABILITY RELATING TO OR ARISING OUT OF YOUR USE OF OR DATABRICKS PROVISIONING OF THE SOURCE CODE SHALL BE LIMITED TO ONE THOUSAND ($1,000) DOLLARS. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

100
NOTICE Normal file
View File

@ -0,0 +1,100 @@
Copyright (2023) Databricks, Inc.
This Software includes software developed at Databricks (https://www.databricks.com/) and its use is subject to the included LICENSE file.
This Software contains code from the following open source projects, licensed under the Apache 2.0 license:
spf13/cobra - https://github.com/spf13/cobra
Copyright cobra authors
License - https://github.com/spf13/cobra/blob/main/LICENSE.txt
briandowns/spinner - https://github.com/briandowns/spinner
Copyright 2022 Brian J. Downs
License - https://github.com/briandowns/spinner/blob/master/LICENSE
go-ini/ini - https://github.com/go-ini/ini
Copyright ini authors
License - https://github.com/go-ini/ini/blob/main/LICENSE
—--
This software contains code from the following open source projects, licensed under the MPL 2.0 license:
hashicopr/go-version - https://github.com/hashicorp/go-version
Copyright 2014 HashiCorp, Inc.
License - https://github.com/hashicorp/go-version/blob/main/LICENSE
hashicorp/hc-install - https://github.com/hashicorp/hc-install
Copyright 2020 HashiCorp, Inc.
License - https://github.com/hashicorp/hc-install/blob/main/LICENSE
hashicopr/terraform-exec - https://github.com/hashicorp/terraform-exec
Copyright 2020 HashiCorp, Inc.
LIcense - https://github.com/hashicorp/terraform-exec/blob/main/LICENSE
hashicorp/terraform-json - https://github.com/hashicorp/terraform-json
Copyright 2019 HashiCorp, Inc.
License - https://github.com/hashicorp/terraform-json/blob/main/LICENSE
---
This software contains code from the following open source projects, licensed under the BSD (2-clause) license:
pkg/browser - https://github.com/pkg/browser
Copyright (c) 2014, Dave Cheney <dave@cheney.net>
License - https://github.com/pkg/browser/blob/master/LICENSE
---
This software contains code from the following open source projects, licensed under the BSD (3-clause) license:
spf13/pflag - https://github.com/spf13/pflag
Copyright (c) 2012 Alex Ogier. All rights reserved.
Copyright (c) 2012 The Go Authors. All rights reserved.
License - https://raw.githubusercontent.com/spf13/pflag/master/LICENSE
google/uuid - https://github.com/google/uuid
Copyright (c) 2009,2014 Google Inc. All rights reserved.
License - https://github.com/google/uuid/blob/master/LICENSE
imdario/mergo - https://github.com/imdario/mergo
Copyright (c) 2013 Dario Castañé. All rights reserved.
Copyright (c) 2012 The Go Authors. All rights reserved.
License - https://github.com/imdario/mergo/blob/master/LICENSE
manifoldco/promptui - https://github.com/manifoldco/promptui
Copyright (c) 2017, Arigato Machine Inc. All rights reserved.
License - https://github.com/manifoldco/promptui/blob/master/LICENSE.md
—--
This Software contains code from the following open source projects, licensed under the MIT license:
fatih/color - https://github.com/fatih/color
Copyright (c) 2013 Fatih Arslan
License - https://github.com/fatih/color/blob/main/LICENSE.md
ghodss/yaml - https://github.com/ghodss/yaml
Copyright (c) 2014 Sam Ghods
License - https://github.com/ghodss/yaml/blob/master/LICENSE
mattn/go-isatty - https://github.com/mattn/go-isatty
Copyright (c) Yasuhiro MATSUMOTO <mattn.jp@gmail.com>
https://github.com/mattn/go-isatty/blob/master/LICENSE
nwidger/jsoncolor - https://github.com/nwidger/jsoncolor
Copyright (c) 2016 Niels Widger
License - https://github.com/nwidger/jsoncolor/blob/master/LICENSE
sabhiram/go-gitignore - https://github.com/sabhiram/go-gitignore
Copyright (c) 2015 Shaba Abhiram
License - https://github.com/sabhiram/go-gitignore/blob/master/LICENSE
stretchr/testify - https://github.com/stretchr/testify
Copyright (c) 2012-2020 Mat Ryer, Tyler Bunnell and contributors.
License - https://github.com/stretchr/testify/blob/master/LICENSE
whilp/git-urls - https://github.com/whilp/git-urls
Copyright (c) 2020 Will Maier
License - https://github.com/whilp/git-urls/blob/master/LICENSE

View File

@ -103,6 +103,21 @@ func setTempDirEnvVars(env map[string]string, b *bundle.Bundle) error {
return nil
}
// This function passes through all proxy related environment variables.
func setProxyEnvVars(env map[string]string, b *bundle.Bundle) error {
for _, v := range []string{"http_proxy", "https_proxy", "no_proxy"} {
// The case (upper or lower) is notoriously inconsistent for tools on Unix systems.
// We therefore try to read both the upper and lower case versions of the variable.
for _, v := range []string{strings.ToUpper(v), strings.ToLower(v)} {
if val, ok := os.LookupEnv(v); ok {
// Only set uppercase version of the variable.
env[strings.ToUpper(v)] = val
}
}
}
return nil
}
func (m *initialize) Apply(ctx context.Context, b *bundle.Bundle) error {
tfConfig := b.Config.Bundle.Terraform
if tfConfig == nil {
@ -142,6 +157,12 @@ func (m *initialize) Apply(ctx context.Context, b *bundle.Bundle) error {
return err
}
// Set the proxy related environment variables
err = setProxyEnvVars(env, b)
if err != nil {
return err
}
// Configure environment variables for auth for Terraform to use.
log.Debugf(ctx, "Environment variables for Terraform: %s", strings.Join(maps.Keys(env), ", "))
err = tf.SetEnv(env)

View File

@ -5,12 +5,14 @@ import (
"os"
"os/exec"
"runtime"
"strings"
"testing"
"github.com/databricks/cli/bundle"
"github.com/databricks/cli/bundle/config"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"golang.org/x/exp/maps"
)
func unsetEnv(t *testing.T, name string) {
@ -222,3 +224,51 @@ func TestSetTempDirEnvVarsForWindowsWithoutAnyTempDirEnvVarsSet(t *testing.T) {
"TMP": tmpDir,
}, env)
}
func TestSetProxyEnvVars(t *testing.T) {
b := &bundle.Bundle{
Config: config.Root{
Path: t.TempDir(),
Bundle: config.Bundle{
Environment: "whatever",
},
},
}
// Temporarily clear environment variables.
clearEnv := func() {
for _, v := range []string{"http_proxy", "https_proxy", "no_proxy"} {
for _, v := range []string{strings.ToUpper(v), strings.ToLower(v)} {
t.Setenv(v, "foo")
os.Unsetenv(v)
}
}
}
// No proxy env vars set.
clearEnv()
env := make(map[string]string, 0)
err := setProxyEnvVars(env, b)
require.NoError(t, err)
assert.Len(t, env, 0)
// Lower case set.
clearEnv()
t.Setenv("http_proxy", "foo")
t.Setenv("https_proxy", "foo")
t.Setenv("no_proxy", "foo")
env = make(map[string]string, 0)
err = setProxyEnvVars(env, b)
require.NoError(t, err)
assert.ElementsMatch(t, []string{"HTTP_PROXY", "HTTPS_PROXY", "NO_PROXY"}, maps.Keys(env))
// Upper case set.
clearEnv()
t.Setenv("HTTP_PROXY", "foo")
t.Setenv("HTTPS_PROXY", "foo")
t.Setenv("NO_PROXY", "foo")
env = make(map[string]string, 0)
err = setProxyEnvVars(env, b)
require.NoError(t, err)
assert.ElementsMatch(t, []string{"HTTP_PROXY", "HTTPS_PROXY", "NO_PROXY"}, maps.Keys(env))
}

View File

@ -21,6 +21,9 @@ var Cmd = &cobra.Command{
Annotations: map[string]string{
"package": "iam",
},
// This service is being previewed; hide from help output.
Hidden: true,
}
// start get command
@ -72,6 +75,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -122,6 +128,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -170,6 +179,9 @@ var updateCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service AccountAccessControl

View File

@ -72,6 +72,9 @@ var downloadCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service BillableUsage

View File

@ -20,6 +20,9 @@ var Cmd = &cobra.Command{
Annotations: map[string]string{
"package": "billing",
},
// This service is being previewed; hide from help output.
Hidden: true,
}
// start create command
@ -64,6 +67,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -122,6 +128,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -181,6 +190,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -209,6 +221,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -255,6 +270,9 @@ var updateCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service Budgets

27
cmd/account/cmd.go generated
View File

@ -64,4 +64,31 @@ func init() {
accountCmd.AddCommand(vpc_endpoints.Cmd)
accountCmd.AddCommand(workspace_assignment.Cmd)
accountCmd.AddCommand(workspaces.Cmd)
// Register commands with groups
account_access_control.Cmd.GroupID = "iam"
billable_usage.Cmd.GroupID = "billing"
budgets.Cmd.GroupID = "billing"
credentials.Cmd.GroupID = "provisioning"
custom_app_integration.Cmd.GroupID = "oauth2"
encryption_keys.Cmd.GroupID = "provisioning"
account_groups.Cmd.GroupID = "iam"
account_ip_access_lists.Cmd.GroupID = "settings"
log_delivery.Cmd.GroupID = "billing"
account_metastore_assignments.Cmd.GroupID = "catalog"
account_metastores.Cmd.GroupID = "catalog"
networks.Cmd.GroupID = "provisioning"
o_auth_enrollment.Cmd.GroupID = "oauth2"
private_access.Cmd.GroupID = "provisioning"
published_app_integration.Cmd.GroupID = "oauth2"
service_principal_secrets.Cmd.GroupID = "oauth2"
account_service_principals.Cmd.GroupID = "iam"
account_settings.Cmd.GroupID = "settings"
storage.Cmd.GroupID = "provisioning"
account_storage_credentials.Cmd.GroupID = "catalog"
account_users.Cmd.GroupID = "iam"
vpc_endpoints.Cmd.GroupID = "provisioning"
workspace_assignment.Cmd.GroupID = "iam"
workspaces.Cmd.GroupID = "provisioning"
}

View File

@ -81,6 +81,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -141,6 +144,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -200,6 +206,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -228,6 +237,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service Credentials

View File

@ -76,6 +76,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -125,6 +128,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -173,6 +179,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -201,6 +210,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -253,6 +265,9 @@ var updateCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service CustomAppIntegration

View File

@ -97,6 +97,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -146,6 +149,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -208,6 +214,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -247,6 +256,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service EncryptionKeys

42
cmd/account/groups.go Normal file
View File

@ -0,0 +1,42 @@
package account
import "github.com/spf13/cobra"
// Groups returns an ordered list of command groups.
// The order matches the order used in the Databricks API explorer.
func Groups() []cobra.Group {
return []cobra.Group{
{
ID: "iam",
Title: "Identity and Access Management",
},
{
ID: "catalog",
Title: "Unity Catalog",
},
{
ID: "settings",
Title: "Settings",
},
{
ID: "provisioning",
Title: "Provisioning",
},
{
ID: "billing",
Title: "Billing",
},
{
ID: "oauth2",
Title: "OAuth",
},
}
}
func init() {
// Register groups with parent command
groups := Groups()
for i := range groups {
accountCmd.AddGroup(&groups[i])
}
}

View File

@ -81,6 +81,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -139,6 +142,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -197,6 +203,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -252,6 +261,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start patch command
@ -312,6 +324,9 @@ var patchCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -378,6 +393,9 @@ var updateCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service AccountGroups

View File

@ -102,6 +102,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -160,6 +163,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -218,6 +224,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -245,6 +254,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start replace command
@ -310,6 +322,9 @@ var replaceCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -379,6 +394,9 @@ var updateCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service AccountIpAccessLists

View File

@ -152,6 +152,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -211,6 +214,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -263,6 +269,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start patch-status command
@ -319,6 +328,9 @@ var patchStatusCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service LogDelivery

View File

@ -74,6 +74,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -128,6 +131,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -183,6 +189,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -233,6 +242,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -289,6 +301,9 @@ var updateCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service AccountMetastoreAssignments

View File

@ -68,6 +68,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -117,6 +120,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -166,6 +172,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -195,6 +204,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -246,6 +258,9 @@ var updateCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service AccountMetastores

View File

@ -76,6 +76,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -139,6 +142,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -198,6 +204,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -229,6 +238,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service Networks

View File

@ -78,6 +78,9 @@ var createCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -108,6 +111,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service OAuthEnrollment

View File

@ -86,6 +86,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -151,6 +154,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -216,6 +222,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -244,6 +253,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start replace command
@ -318,6 +330,9 @@ var replaceCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service PrivateAccess

View File

@ -76,6 +76,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -125,6 +128,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -173,6 +179,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -201,6 +210,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -252,6 +264,9 @@ var updateCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service PublishedAppIntegration

View File

@ -82,6 +82,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -134,6 +137,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -187,6 +193,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service ServicePrincipalSecrets

View File

@ -80,6 +80,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -138,6 +141,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -197,6 +203,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -252,6 +261,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start patch command
@ -313,6 +325,9 @@ var patchCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -382,6 +397,9 @@ var updateCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service AccountServicePrincipals

View File

@ -66,6 +66,9 @@ var readPersonalComputeSettingCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service AccountSettings

View File

@ -73,6 +73,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -123,6 +126,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -174,6 +180,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -223,6 +232,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -276,6 +288,9 @@ var updateCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service AccountStorageCredentials

View File

@ -78,6 +78,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -137,6 +140,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -195,6 +201,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -223,6 +232,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service Storage

View File

@ -88,6 +88,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -147,6 +150,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -205,6 +211,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -260,6 +269,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start patch command
@ -321,6 +333,9 @@ var patchCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -390,6 +405,9 @@ var updateCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service AccountUsers

View File

@ -83,6 +83,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -149,6 +152,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -211,6 +217,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -243,6 +252,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service VpcEndpoints

View File

@ -76,6 +76,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -127,6 +130,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -179,6 +185,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -232,6 +241,9 @@ var updateCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service WorkspaceAssignment

View File

@ -113,6 +113,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, info)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -181,6 +184,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -255,6 +261,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -286,6 +295,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -481,6 +493,9 @@ var updateCmd = &cobra.Command{
}
return cmdio.Render(ctx, info)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service Workspaces

View File

@ -8,7 +8,7 @@ import (
// rootCmd represents the root command for the bundle subcommand.
var rootCmd = &cobra.Command{
Use: "bundle",
Short: "Databricks Asset Bundles",
Short: "Databricks Application Bundles",
}
func AddCommand(cmd *cobra.Command) {

View File

@ -1,124 +1,167 @@
package configure
import (
"bytes"
"errors"
"context"
"fmt"
"os"
"path/filepath"
"net/url"
"github.com/databricks/cli/cmd/root"
"github.com/databricks/cli/libs/cmdio"
"github.com/databricks/cli/libs/databrickscfg"
"github.com/databricks/databricks-sdk-go/config"
"github.com/spf13/cobra"
"gopkg.in/ini.v1"
)
type Configs struct {
Host string `ini:"host"`
Token string `ini:"token,omitempty"`
Profile string `ini:"-"`
}
var tokenMode bool
func (cfg *Configs) loadNonInteractive(cmd *cobra.Command) error {
host, err := cmd.Flags().GetString("host")
if err != nil || host == "" {
return fmt.Errorf("use --host to specify host in non interactive mode: %w", err)
}
cfg.Host = host
if !tokenMode {
return nil
}
n, err := fmt.Scanf("%s\n", &cfg.Token)
func validateHost(s string) error {
u, err := url.Parse(s)
if err != nil {
return err
}
if n != 1 {
return fmt.Errorf("exactly 1 argument required")
if u.Host == "" || u.Scheme != "https" {
return fmt.Errorf("must start with https://")
}
if u.Path != "" && u.Path != "/" {
return fmt.Errorf("must use empty path")
}
return nil
}
func configureFromFlags(cmd *cobra.Command, ctx context.Context, cfg *config.Config) error {
// Configure profile name if set.
profile, err := cmd.Flags().GetString("profile")
if err != nil {
return fmt.Errorf("read --profile flag: %w", err)
}
if profile != "" {
cfg.Profile = profile
}
// Configure host if set.
host, err := cmd.Flags().GetString("host")
if err != nil {
return fmt.Errorf("read --host flag: %w", err)
}
if host != "" {
cfg.Host = host
}
// Validate host if set.
if cfg.Host != "" {
err = validateHost(cfg.Host)
if err != nil {
return err
}
}
return nil
}
func configureInteractive(cmd *cobra.Command, ctx context.Context, cfg *config.Config) error {
err := configureFromFlags(cmd, ctx, cfg)
if err != nil {
return err
}
// Ask user to specify the host if not already set.
if cfg.Host == "" {
prompt := cmdio.Prompt(ctx)
prompt.Label = "Databricks Host"
prompt.Default = "https://"
prompt.AllowEdit = true
prompt.Validate = validateHost
out, err := prompt.Run()
if err != nil {
return err
}
cfg.Host = out
}
// Ask user to specify the token is not already set.
if cfg.Token == "" {
prompt := cmdio.Prompt(ctx)
prompt.Label = "Personal Access Token"
prompt.Mask = '*'
out, err := prompt.Run()
if err != nil {
return err
}
cfg.Token = out
}
return nil
}
func configureNonInteractive(cmd *cobra.Command, ctx context.Context, cfg *config.Config) error {
err := configureFromFlags(cmd, ctx, cfg)
if err != nil {
return err
}
if cfg.Host == "" {
return fmt.Errorf("host must be set in non-interactive mode")
}
// Read token from stdin if not already set.
if cfg.Token == "" {
_, err := fmt.Fscanf(cmd.InOrStdin(), "%s\n", &cfg.Token)
if err != nil {
return err
}
}
return nil
}
var configureCmd = &cobra.Command{
Use: "configure",
Short: "Configure authentication",
Use: "configure",
Short: "Configure authentication",
Long: `Configure authentication.
This command adds a profile to your ~/.databrickscfg file.
You can write to a different file by setting the DATABRICKS_CONFIG_FILE environment variable.
If this command is invoked in non-interactive mode, it will read the token from stdin.
The host must be specified with the --host flag.
`,
Hidden: true,
RunE: func(cmd *cobra.Command, args []string) error {
profile, err := cmd.Flags().GetString("profile")
var cfg config.Config
// Load environment variables, possibly the DEFAULT profile.
err := config.ConfigAttributes.Configure(&cfg)
if err != nil {
return fmt.Errorf("read --profile flag: %w", err)
return fmt.Errorf("unable to instantiate configuration from environment variables: %w", err)
}
path := os.Getenv("DATABRICKS_CONFIG_FILE")
if path == "" {
path, err = os.UserHomeDir()
if err != nil {
return fmt.Errorf("homedir: %w", err)
}
ctx := cmd.Context()
interactive := cmdio.IsInTTY(ctx) && cmdio.IsOutTTY(ctx)
var fn func(*cobra.Command, context.Context, *config.Config) error
if interactive {
fn = configureInteractive
} else {
fn = configureNonInteractive
}
if filepath.Base(path) == ".databrickscfg" {
path = filepath.Dir(path)
}
err = os.MkdirAll(path, os.ModeDir|os.ModePerm)
err = fn(cmd, ctx, &cfg)
if err != nil {
return fmt.Errorf("create config dir: %w", err)
}
cfgPath := filepath.Join(path, ".databrickscfg")
_, err = os.Stat(cfgPath)
if errors.Is(err, os.ErrNotExist) {
file, err := os.Create(cfgPath)
if err != nil {
return fmt.Errorf("create config file: %w", err)
}
file.Close()
} else if err != nil {
return fmt.Errorf("open config file: %w", err)
return err
}
ini_cfg, err := ini.Load(cfgPath)
if err != nil {
return fmt.Errorf("load config file: %w", err)
}
cfg := &Configs{"", "", profile}
err = ini_cfg.Section(profile).MapTo(cfg)
if err != nil {
return fmt.Errorf("unmarshal loaded config: %w", err)
}
// Clear the Databricks CLI path in token mode.
// This is relevant for OAuth only.
cfg.DatabricksCliPath = ""
err = cfg.loadNonInteractive(cmd)
if err != nil {
return fmt.Errorf("reading configs: %w", err)
}
err = ini_cfg.Section(profile).ReflectFrom(cfg)
if err != nil {
return fmt.Errorf("marshall config: %w", err)
}
var buffer bytes.Buffer
if ini_cfg.Section("DEFAULT").Body() != "" {
//This configuration makes the ini library write the DEFAULT header explicitly.
//DEFAULT section might be empty
ini.DefaultHeader = true
}
_, err = ini_cfg.WriteTo(&buffer)
if err != nil {
return fmt.Errorf("write config to buffer: %w", err)
}
err = os.WriteFile(cfgPath, buffer.Bytes(), os.ModePerm)
if err != nil {
return fmt.Errorf("write congfig to file: %w", err)
}
return nil
// Save profile to config file.
return databrickscfg.SaveToProfile(ctx, &cfg)
},
}
func init() {
root.RootCmd.AddCommand(configureCmd)
configureCmd.Flags().BoolVarP(&tokenMode, "token", "t", false, "Configure using Databricks Personal Access Token")
configureCmd.Flags().String("host", "", "Host to connect to.")
configureCmd.Flags().String("profile", "DEFAULT", "CLI connection profile to use.")
configureCmd.Flags().String("host", "", "Databricks workspace host.")
configureCmd.Flags().String("profile", "DEFAULT", "Name for the connection profile to configure.")
// Include token flag for compatibility with the legacy CLI.
// It doesn't actually do anything because we always use PATs.
configureCmd.Flags().BoolP("token", "t", true, "Configure using Databricks Personal Access Token")
configureCmd.Flags().MarkHidden("token")
}

View File

@ -52,7 +52,7 @@ func TestDefaultConfigureNoInteractive(t *testing.T) {
})
os.Stdin = inp
root.RootCmd.SetArgs([]string{"configure", "--token", "--host", "host"})
root.RootCmd.SetArgs([]string{"configure", "--token", "--host", "https://host"})
err := root.RootCmd.ExecuteContext(ctx)
assert.NoError(t, err)
@ -67,7 +67,7 @@ func TestDefaultConfigureNoInteractive(t *testing.T) {
defaultSection, err := cfg.GetSection("DEFAULT")
assert.NoError(t, err)
assertKeyValueInSection(t, defaultSection, "host", "host")
assertKeyValueInSection(t, defaultSection, "host", "https://host")
assertKeyValueInSection(t, defaultSection, "token", "token")
}
@ -75,8 +75,8 @@ func TestConfigFileFromEnvNoInteractive(t *testing.T) {
//TODO: Replace with similar test code from go SDK, once we start using it directly
ctx := context.Background()
tempHomeDir := setup(t)
cfgFileDir := filepath.Join(tempHomeDir, "test")
t.Setenv("DATABRICKS_CONFIG_FILE", cfgFileDir)
cfgPath := filepath.Join(tempHomeDir, ".databrickscfg")
t.Setenv("DATABRICKS_CONFIG_FILE", cfgPath)
inp := getTempFileWithContent(t, tempHomeDir, "token\n")
defer inp.Close()
@ -84,12 +84,11 @@ func TestConfigFileFromEnvNoInteractive(t *testing.T) {
t.Cleanup(func() { os.Stdin = oldStdin })
os.Stdin = inp
root.RootCmd.SetArgs([]string{"configure", "--token", "--host", "host"})
root.RootCmd.SetArgs([]string{"configure", "--token", "--host", "https://host"})
err := root.RootCmd.ExecuteContext(ctx)
assert.NoError(t, err)
cfgPath := filepath.Join(cfgFileDir, ".databrickscfg")
_, err = os.Stat(cfgPath)
assert.NoError(t, err)
@ -99,25 +98,25 @@ func TestConfigFileFromEnvNoInteractive(t *testing.T) {
defaultSection, err := cfg.GetSection("DEFAULT")
assert.NoError(t, err)
assertKeyValueInSection(t, defaultSection, "host", "host")
assertKeyValueInSection(t, defaultSection, "host", "https://host")
assertKeyValueInSection(t, defaultSection, "token", "token")
}
func TestCustomProfileConfigureNoInteractive(t *testing.T) {
ctx := context.Background()
tempHomeDir := setup(t)
cfgPath := filepath.Join(tempHomeDir, ".databrickscfg")
inp := getTempFileWithContent(t, tempHomeDir, "token\n")
defer inp.Close()
oldStdin := os.Stdin
t.Cleanup(func() { os.Stdin = oldStdin })
os.Stdin = inp
root.RootCmd.SetArgs([]string{"configure", "--token", "--host", "host", "--profile", "CUSTOM"})
root.RootCmd.SetArgs([]string{"configure", "--token", "--host", "https://host", "--profile", "CUSTOM"})
err := root.RootCmd.ExecuteContext(ctx)
assert.NoError(t, err)
cfgPath := filepath.Join(tempHomeDir, ".databrickscfg")
_, err = os.Stat(cfgPath)
assert.NoError(t, err)
@ -127,6 +126,6 @@ func TestCustomProfileConfigureNoInteractive(t *testing.T) {
defaultSection, err := cfg.GetSection("CUSTOM")
assert.NoError(t, err)
assertKeyValueInSection(t, defaultSection, "host", "host")
assertKeyValueInSection(t, defaultSection, "host", "https://host")
assertKeyValueInSection(t, defaultSection, "token", "token")
}

View File

@ -74,6 +74,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -134,6 +137,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -192,6 +198,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -219,6 +228,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -268,6 +280,9 @@ var updateCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service Alerts

View File

@ -79,6 +79,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -130,6 +133,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -180,6 +186,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -211,6 +220,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -267,6 +279,9 @@ var updateCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service Catalogs

View File

@ -96,6 +96,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -155,6 +158,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start edit command
@ -211,6 +217,9 @@ var editCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -269,6 +278,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -319,6 +331,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service ClusterPolicies

View File

@ -18,26 +18,26 @@ var Cmd = &cobra.Command{
Short: `The Clusters API allows you to create, start, edit, list, terminate, and delete clusters.`,
Long: `The Clusters API allows you to create, start, edit, list, terminate, and
delete clusters.
Databricks maps cluster node instance types to compute units known as DBUs.
See the instance type pricing page for a list of the supported instance types
and their corresponding DBUs.
A Databricks cluster is a set of computation resources and configurations on
which you run data engineering, data science, and data analytics workloads,
such as production ETL pipelines, streaming analytics, ad-hoc analytics, and
machine learning.
You run these workloads as a set of commands in a notebook or as an automated
job. Databricks makes a distinction between all-purpose clusters and job
clusters. You use all-purpose clusters to analyze data collaboratively using
interactive notebooks. You use job clusters to run fast and robust automated
jobs.
You can create an all-purpose cluster using the UI, CLI, or REST API. You can
manually terminate and restart an all-purpose cluster. Multiple users can
share such clusters to do collaborative interactive analysis.
IMPORTANT: Databricks retains cluster configuration information for up to 200
all-purpose clusters terminated in the last 30 days and up to 30 job clusters
recently terminated by the job scheduler. To keep an all-purpose cluster
@ -64,7 +64,7 @@ var changeOwnerCmd = &cobra.Command{
Use: "change-owner CLUSTER_ID OWNER_USERNAME",
Short: `Change cluster owner.`,
Long: `Change cluster owner.
Change the owner of the cluster. You must be an admin to perform this
operation.`,
@ -96,6 +96,9 @@ var changeOwnerCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start create command
@ -144,17 +147,17 @@ var createCmd = &cobra.Command{
Use: "create SPARK_VERSION",
Short: `Create new cluster.`,
Long: `Create new cluster.
Creates a new Spark cluster. This method will acquire new instances from the
cloud provider if necessary. This method is asynchronous; the returned
cluster_id can be used to poll the cluster status. When this method returns,
the cluster will be in a PENDING state. The cluster will be usable once it
enters a RUNNING state.
Note: Databricks may not be able to acquire some of the requested nodes, due
to cloud provider limitations (account limits, spot price, etc.) or transient
network issues.
If Databricks acquires at least 85% of the requested on-demand nodes, cluster
creation will succeed. Otherwise the cluster will terminate with an
informative error message.`,
@ -198,6 +201,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, info)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -221,7 +227,7 @@ var deleteCmd = &cobra.Command{
Use: "delete CLUSTER_ID",
Short: `Terminate cluster.`,
Long: `Terminate cluster.
Terminates the Spark cluster with the specified ID. The cluster is removed
asynchronously. Once the termination has completed, the cluster will be in a
TERMINATED state. If the cluster is already in a TERMINATING or
@ -276,6 +282,9 @@ var deleteCmd = &cobra.Command{
}
return cmdio.Render(ctx, info)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start edit command
@ -327,18 +336,18 @@ var editCmd = &cobra.Command{
Use: "edit CLUSTER_ID SPARK_VERSION",
Short: `Update cluster configuration.`,
Long: `Update cluster configuration.
Updates the configuration of a cluster to match the provided attributes and
size. A cluster can be updated if it is in a RUNNING or TERMINATED state.
If a cluster is updated while in a RUNNING state, it will be restarted so
that the new attributes can take effect.
If a cluster is updated while in a TERMINATED state, it will remain
TERMINATED. The next time it is started using the clusters/start API, the
new attributes will take effect. Any attempt to update a cluster in any other
state will be rejected with an INVALID_STATE error code.
Clusters created by the Databricks Jobs service cannot be edited.`,
Annotations: map[string]string{},
@ -381,6 +390,9 @@ var editCmd = &cobra.Command{
}
return cmdio.Render(ctx, info)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start events command
@ -406,7 +418,7 @@ var eventsCmd = &cobra.Command{
Use: "events CLUSTER_ID",
Short: `List cluster activity events.`,
Long: `List cluster activity events.
Retrieves a list of events about the activity of a cluster. This API is
paginated. If there are more events to read, the response includes all the
nparameters necessary to request the next page of events.`,
@ -448,6 +460,9 @@ var eventsCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -471,7 +486,7 @@ var getCmd = &cobra.Command{
Use: "get CLUSTER_ID",
Short: `Get cluster info.`,
Long: `Get cluster info.
Retrieves the information for a cluster given its identifier. Clusters can be
described while they are running, or up to 60 days after they are terminated.`,
@ -512,6 +527,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -532,11 +550,11 @@ var listCmd = &cobra.Command{
Use: "list",
Short: `List all clusters.`,
Long: `List all clusters.
Return information about all pinned clusters, active clusters, up to 200 of
the most recently terminated all-purpose clusters in the past 30 days, and up
to 30 of the most recently terminated job clusters in the past 30 days.
For example, if there is 1 pinned cluster, 4 active clusters, 45 terminated
all-purpose clusters in the past 30 days, and 50 terminated job clusters in
the past 30 days, then this API returns the 1 pinned cluster, 4 active
@ -569,6 +587,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list-node-types command
@ -582,7 +603,7 @@ var listNodeTypesCmd = &cobra.Command{
Use: "list-node-types",
Short: `List node types.`,
Long: `List node types.
Returns a list of supported Spark node types. These node types can be used to
launch a cluster.`,
@ -597,6 +618,9 @@ var listNodeTypesCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list-zones command
@ -610,7 +634,7 @@ var listZonesCmd = &cobra.Command{
Use: "list-zones",
Short: `List availability zones.`,
Long: `List availability zones.
Returns a list of availability zones where clusters can be created in (For
example, us-west-2a). These zones can be used to launch a cluster.`,
@ -625,6 +649,9 @@ var listZonesCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start permanent-delete command
@ -643,10 +670,10 @@ var permanentDeleteCmd = &cobra.Command{
Use: "permanent-delete CLUSTER_ID",
Short: `Permanently delete cluster.`,
Long: `Permanently delete cluster.
Permanently deletes a Spark cluster. This cluster is terminated and resources
are asynchronously removed.
In addition, users will no longer see permanently deleted clusters in the
cluster list, and API users can no longer perform any action on permanently
deleted clusters.`,
@ -688,6 +715,9 @@ var permanentDeleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start pin command
@ -706,7 +736,7 @@ var pinCmd = &cobra.Command{
Use: "pin CLUSTER_ID",
Short: `Pin cluster.`,
Long: `Pin cluster.
Pinning a cluster ensures that the cluster will always be returned by the
ListClusters API. Pinning a cluster that is already pinned will have no
effect. This API can only be called by workspace admins.`,
@ -748,6 +778,9 @@ var pinCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start resize command
@ -774,7 +807,7 @@ var resizeCmd = &cobra.Command{
Use: "resize CLUSTER_ID",
Short: `Resize cluster.`,
Long: `Resize cluster.
Resizes a cluster to have a desired number of workers. This will fail unless
the cluster is in a RUNNING state.`,
@ -827,6 +860,9 @@ var resizeCmd = &cobra.Command{
}
return cmdio.Render(ctx, info)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start restart command
@ -852,7 +888,7 @@ var restartCmd = &cobra.Command{
Use: "restart CLUSTER_ID",
Short: `Restart cluster.`,
Long: `Restart cluster.
Restarts a Spark cluster with the supplied ID. If the cluster is not currently
in a RUNNING state, nothing will happen.`,
@ -905,6 +941,9 @@ var restartCmd = &cobra.Command{
}
return cmdio.Render(ctx, info)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start spark-versions command
@ -918,7 +957,7 @@ var sparkVersionsCmd = &cobra.Command{
Use: "spark-versions",
Short: `List available Spark versions.`,
Long: `List available Spark versions.
Returns the list of available Spark versions. These versions can be used to
launch a cluster.`,
@ -933,6 +972,9 @@ var sparkVersionsCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start start command
@ -956,10 +998,10 @@ var startCmd = &cobra.Command{
Use: "start CLUSTER_ID",
Short: `Start terminated cluster.`,
Long: `Start terminated cluster.
Starts a terminated Spark cluster with the supplied ID. This works similar to
createCluster except:
* The previous cluster id and attributes are preserved. * The cluster starts
with the last specified cluster size. * If the previous cluster was an
autoscaling cluster, the current cluster starts with the minimum number of
@ -1015,6 +1057,9 @@ var startCmd = &cobra.Command{
}
return cmdio.Render(ctx, info)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start unpin command
@ -1033,7 +1078,7 @@ var unpinCmd = &cobra.Command{
Use: "unpin CLUSTER_ID",
Short: `Unpin cluster.`,
Long: `Unpin cluster.
Unpinning a cluster will allow the cluster to eventually be removed from the
ListClusters API. Unpinning a cluster that is not pinned will have no effect.
This API can only be called by workspace admins.`,
@ -1075,6 +1120,9 @@ var unpinCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service Clusters

54
cmd/workspace/cmd.go generated
View File

@ -1,6 +1,6 @@
// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT.
package cmd
package workspace
import (
"github.com/databricks/cli/cmd/root"
@ -56,7 +56,6 @@ import (
)
func init() {
root.RootCmd.AddCommand(alerts.Cmd)
root.RootCmd.AddCommand(catalogs.Cmd)
root.RootCmd.AddCommand(cluster_policies.Cmd)
@ -105,4 +104,55 @@ func init() {
root.RootCmd.AddCommand(workspace.Cmd)
root.RootCmd.AddCommand(workspace_bindings.Cmd)
root.RootCmd.AddCommand(workspace_conf.Cmd)
// Register commands with groups
alerts.Cmd.GroupID = "sql"
catalogs.Cmd.GroupID = "catalog"
cluster_policies.Cmd.GroupID = "compute"
clusters.Cmd.GroupID = "compute"
connections.Cmd.GroupID = "catalog"
current_user.Cmd.GroupID = "iam"
dashboards.Cmd.GroupID = "sql"
data_sources.Cmd.GroupID = "sql"
experiments.Cmd.GroupID = "ml"
external_locations.Cmd.GroupID = "catalog"
functions.Cmd.GroupID = "catalog"
git_credentials.Cmd.GroupID = "workspace"
global_init_scripts.Cmd.GroupID = "compute"
grants.Cmd.GroupID = "catalog"
groups.Cmd.GroupID = "iam"
instance_pools.Cmd.GroupID = "compute"
instance_profiles.Cmd.GroupID = "compute"
ip_access_lists.Cmd.GroupID = "settings"
jobs.Cmd.GroupID = "jobs"
libraries.Cmd.GroupID = "compute"
metastores.Cmd.GroupID = "catalog"
model_registry.Cmd.GroupID = "ml"
permissions.Cmd.GroupID = "iam"
pipelines.Cmd.GroupID = "pipelines"
policy_families.Cmd.GroupID = "compute"
providers.Cmd.GroupID = "sharing"
queries.Cmd.GroupID = "sql"
query_history.Cmd.GroupID = "sql"
recipient_activation.Cmd.GroupID = "sharing"
recipients.Cmd.GroupID = "sharing"
repos.Cmd.GroupID = "workspace"
schemas.Cmd.GroupID = "catalog"
secrets.Cmd.GroupID = "workspace"
service_principals.Cmd.GroupID = "iam"
serving_endpoints.Cmd.GroupID = "serving"
shares.Cmd.GroupID = "sharing"
storage_credentials.Cmd.GroupID = "catalog"
system_schemas.Cmd.GroupID = "catalog"
table_constraints.Cmd.GroupID = "catalog"
tables.Cmd.GroupID = "catalog"
token_management.Cmd.GroupID = "settings"
tokens.Cmd.GroupID = "settings"
users.Cmd.GroupID = "iam"
volumes.Cmd.GroupID = "catalog"
warehouses.Cmd.GroupID = "sql"
workspace.Cmd.GroupID = "workspace"
workspace_bindings.Cmd.GroupID = "catalog"
workspace_conf.Cmd.GroupID = "settings"
}

View File

@ -29,6 +29,9 @@ var Cmd = &cobra.Command{
Annotations: map[string]string{
"package": "catalog",
},
// This service is being previewed; hide from help output.
Hidden: true,
}
// start create command
@ -87,6 +90,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -145,6 +151,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -203,6 +212,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -230,6 +242,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -276,6 +291,9 @@ var updateCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service Connections

View File

@ -43,6 +43,9 @@ var meCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service CurrentUser

View File

@ -74,6 +74,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -133,6 +136,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -192,6 +198,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -244,6 +253,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start restore command
@ -302,6 +314,9 @@ var restoreCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service Dashboards

View File

@ -53,6 +53,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service DataSources

View File

@ -83,6 +83,9 @@ var createExperimentCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start create-run command
@ -138,6 +141,9 @@ var createRunCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete-experiment command
@ -188,6 +194,9 @@ var deleteExperimentCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete-run command
@ -236,6 +245,9 @@ var deleteRunCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete-tag command
@ -286,6 +298,9 @@ var deleteTagCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get-by-name command
@ -342,6 +357,9 @@ var getByNameCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get-experiment command
@ -390,6 +408,9 @@ var getExperimentCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get-history command
@ -443,6 +464,9 @@ var getHistoryCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get-run command
@ -498,6 +522,9 @@ var getRunCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list-artifacts command
@ -551,6 +578,9 @@ var listArtifactsCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list-experiments command
@ -602,6 +632,9 @@ var listExperimentsCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start log-batch command
@ -690,6 +723,9 @@ var logBatchCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start log-inputs command
@ -741,6 +777,9 @@ var logInputsCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start log-metric command
@ -803,6 +842,9 @@ var logMetricCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start log-model command
@ -854,6 +896,9 @@ var logModelCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start log-param command
@ -909,6 +954,9 @@ var logParamCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start restore-experiment command
@ -962,6 +1010,9 @@ var restoreExperimentCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start restore-run command
@ -1010,6 +1061,9 @@ var restoreRunCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start search-experiments command
@ -1063,6 +1117,9 @@ var searchExperimentsCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start search-runs command
@ -1119,6 +1176,9 @@ var searchRunsCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start set-experiment-tag command
@ -1169,6 +1229,9 @@ var setExperimentTagCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start set-tag command
@ -1222,6 +1285,9 @@ var setTagCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update-experiment command
@ -1272,6 +1338,9 @@ var updateExperimentCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update-run command
@ -1324,6 +1393,9 @@ var updateRunCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service Experiments

View File

@ -85,6 +85,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -136,6 +139,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -186,6 +192,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -216,6 +225,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -274,6 +286,9 @@ var updateCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service ExternalLocations

View File

@ -120,6 +120,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -185,6 +188,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -249,6 +255,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -304,6 +313,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -371,6 +383,9 @@ var updateCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service Functions

View File

@ -78,6 +78,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -139,6 +142,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -200,6 +206,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -228,6 +237,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -293,6 +305,9 @@ var updateCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service GitCredentials

View File

@ -79,6 +79,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -137,6 +140,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -195,6 +201,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -225,6 +234,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -279,6 +291,9 @@ var updateCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service GlobalInitScripts

View File

@ -83,6 +83,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get-effective command
@ -137,6 +140,9 @@ var getEffectiveCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -191,6 +197,9 @@ var updateCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service Grants

65
cmd/workspace/groups.go Normal file
View File

@ -0,0 +1,65 @@
package workspace
import (
"github.com/databricks/cli/cmd/root"
"github.com/spf13/cobra"
)
// Groups returns an ordered list of command groups.
// The order matches the order used in the Databricks API explorer.
func Groups() []cobra.Group {
return []cobra.Group{
{
ID: "workspace",
Title: "Databricks Workspace",
},
{
ID: "compute",
Title: "Compute",
},
{
ID: "jobs",
Title: "Jobs",
},
{
ID: "pipelines",
Title: "Delta Live Tables",
},
{
ID: "ml",
Title: "Machine Learning",
},
{
ID: "serving",
Title: "Real-time Serving",
},
{
ID: "iam",
Title: "Identity and Access Management",
},
{
ID: "sql",
Title: "Databricks SQL",
},
{
ID: "catalog",
Title: "Unity Catalog",
},
{
ID: "sharing",
Title: "Delta Sharing",
},
{
ID: "settings",
Title: "Settings",
},
}
}
func init() {
// Register groups with parent command
groups := Groups()
for i := range groups {
root.RootCmd.AddGroup(&groups[i])
}
}

View File

@ -81,6 +81,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -139,6 +142,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -197,6 +203,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -252,6 +261,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start patch command
@ -312,6 +324,9 @@ var patchCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -378,6 +393,9 @@ var updateCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service Groups

View File

@ -97,6 +97,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -156,6 +159,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start edit command
@ -218,6 +224,9 @@ var editCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -276,6 +285,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -303,6 +315,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service InstancePools

View File

@ -75,6 +75,9 @@ var addCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start edit command
@ -140,6 +143,9 @@ var editCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -169,6 +175,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start remove command
@ -220,6 +229,9 @@ var removeCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service InstanceProfiles

View File

@ -103,6 +103,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -161,6 +164,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -219,6 +225,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -246,6 +255,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start replace command
@ -313,6 +325,9 @@ var replaceCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -384,6 +399,9 @@ var updateCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service IpAccessLists

View File

@ -99,6 +99,9 @@ var cancelAllRunsCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start cancel-run command
@ -185,6 +188,9 @@ var cancelRunCmd = &cobra.Command{
}
return cmdio.Render(ctx, info)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start create command
@ -249,6 +255,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -310,6 +319,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete-run command
@ -371,6 +383,9 @@ var deleteRunCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start export-run command
@ -434,6 +449,9 @@ var exportRunCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -495,6 +513,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get-run command
@ -563,6 +584,9 @@ var getRunCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get-run-output command
@ -633,6 +657,9 @@ var getRunOutputCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -686,6 +713,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list-runs command
@ -744,6 +774,9 @@ var listRunsCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start repair-run command
@ -843,6 +876,9 @@ var repairRunCmd = &cobra.Command{
}
return cmdio.Render(ctx, info)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start reset command
@ -892,6 +928,9 @@ var resetCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start run-now command
@ -987,6 +1026,9 @@ var runNowCmd = &cobra.Command{
}
return cmdio.Render(ctx, info)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start submit command
@ -1070,6 +1112,9 @@ var submitCmd = &cobra.Command{
}
return cmdio.Render(ctx, info)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -1135,6 +1180,9 @@ var updateCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service Jobs

View File

@ -67,6 +67,9 @@ var allClusterStatusesCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start cluster-status command
@ -129,6 +132,9 @@ var clusterStatusCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start install command
@ -179,6 +185,9 @@ var installCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start uninstall command
@ -226,6 +235,9 @@ var uninstallCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service Libraries

View File

@ -86,6 +86,9 @@ var assignCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start create command
@ -137,6 +140,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start current command
@ -164,6 +170,9 @@ var currentCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -224,6 +233,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -283,6 +295,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -312,6 +327,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start maintenance command
@ -333,6 +351,9 @@ var maintenanceCmd = &cobra.Command{
Enables or disables auto maintenance on the metastore.`,
// This command is being previewed; hide from help output.
Hidden: true,
Annotations: map[string]string{},
Args: func(cmd *cobra.Command, args []string) error {
check := cobra.ExactArgs(2)
@ -364,6 +385,9 @@ var maintenanceCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start summary command
@ -392,6 +416,9 @@ var summaryCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start unassign command
@ -444,6 +471,9 @@ var unassignCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -511,6 +541,9 @@ var updateCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update-assignment command
@ -578,6 +611,9 @@ var updateAssignmentCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service Metastores

View File

@ -79,6 +79,9 @@ var approveTransitionRequestCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start create-comment command
@ -131,6 +134,9 @@ var createCommentCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start create-model command
@ -185,6 +191,9 @@ var createModelCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start create-model-version command
@ -239,6 +248,9 @@ var createModelVersionCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start create-transition-request command
@ -294,6 +306,9 @@ var createTransitionRequestCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start create-webhook command
@ -346,6 +361,9 @@ var createWebhookCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete-comment command
@ -394,6 +412,9 @@ var deleteCommentCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete-model command
@ -442,6 +463,9 @@ var deleteModelCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete-model-tag command
@ -491,6 +515,9 @@ var deleteModelTagCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete-model-version command
@ -540,6 +567,9 @@ var deleteModelVersionCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete-model-version-tag command
@ -590,6 +620,9 @@ var deleteModelVersionTagCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete-transition-request command
@ -646,6 +679,9 @@ var deleteTransitionRequestCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete-webhook command
@ -697,6 +733,9 @@ var deleteWebhookCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get-latest-versions command
@ -747,6 +786,9 @@ var getLatestVersionsCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get-model command
@ -799,6 +841,9 @@ var getModelCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get-model-version command
@ -848,6 +893,9 @@ var getModelVersionCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get-model-version-download-uri command
@ -897,6 +945,9 @@ var getModelVersionDownloadUriCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list-models command
@ -948,6 +999,9 @@ var listModelsCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list-transition-requests command
@ -997,6 +1051,9 @@ var listTransitionRequestsCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list-webhooks command
@ -1050,6 +1107,9 @@ var listWebhooksCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start reject-transition-request command
@ -1105,6 +1165,9 @@ var rejectTransitionRequestCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start rename-model command
@ -1155,6 +1218,9 @@ var renameModelCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start search-model-versions command
@ -1207,6 +1273,9 @@ var searchModelVersionsCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start search-models command
@ -1259,6 +1328,9 @@ var searchModelsCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start set-model-tag command
@ -1309,6 +1381,9 @@ var setModelTagCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start set-model-version-tag command
@ -1360,6 +1435,9 @@ var setModelVersionTagCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start test-registry-webhook command
@ -1412,6 +1490,9 @@ var testRegistryWebhookCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start transition-stage command
@ -1475,6 +1556,9 @@ var transitionStageCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update-comment command
@ -1524,6 +1608,9 @@ var updateCommentCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update-model command
@ -1574,6 +1661,9 @@ var updateModelCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update-model-version command
@ -1625,6 +1715,9 @@ var updateModelVersionCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update-webhook command
@ -1681,6 +1774,9 @@ var updateWebhookCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service ModelRegistry

View File

@ -68,6 +68,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get-permission-levels command
@ -117,6 +120,9 @@ var getPermissionLevelsCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start set command
@ -169,6 +175,9 @@ var setCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -220,6 +229,9 @@ var updateCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service Permissions

View File

@ -100,6 +100,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -158,6 +161,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -219,6 +225,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get-update command
@ -268,6 +277,9 @@ var getUpdateCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list-pipeline-events command
@ -331,6 +343,9 @@ var listPipelineEventsCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list-pipelines command
@ -383,6 +398,9 @@ var listPipelinesCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list-updates command
@ -445,6 +463,9 @@ var listUpdatesCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start reset command
@ -520,6 +541,9 @@ var resetCmd = &cobra.Command{
}
return cmdio.Render(ctx, info)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start start-update command
@ -583,6 +607,9 @@ var startUpdateCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start stop command
@ -658,6 +685,9 @@ var stopCmd = &cobra.Command{
}
return cmdio.Render(ctx, info)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -736,6 +766,9 @@ var updateCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service Pipelines

View File

@ -69,6 +69,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -115,6 +118,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service PolicyFamilies

View File

@ -75,6 +75,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -134,6 +137,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -194,6 +200,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -246,6 +255,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list-shares command
@ -306,6 +318,9 @@ var listSharesCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -372,6 +387,9 @@ var updateCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service Providers

View File

@ -84,6 +84,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -144,6 +147,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -203,6 +209,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -256,6 +265,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start restore command
@ -315,6 +327,9 @@ var restoreCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -381,6 +396,9 @@ var updateCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service Queries

View File

@ -71,6 +71,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service QueryHistory

View File

@ -65,6 +65,9 @@ var getActivationUrlInfoCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start retrieve-token command
@ -114,6 +117,9 @@ var retrieveTokenCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service RecipientActivation

View File

@ -80,6 +80,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -139,6 +142,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -199,6 +205,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -251,6 +260,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start rotate-token command
@ -304,6 +316,9 @@ var rotateTokenCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start share-permissions command
@ -363,6 +378,9 @@ var sharePermissionsCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -429,6 +447,9 @@ var updateCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service Recipients

View File

@ -82,6 +82,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -143,6 +146,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -204,6 +210,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -255,6 +264,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -321,6 +333,9 @@ var updateCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service Repos

View File

@ -78,6 +78,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -137,6 +140,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -197,6 +203,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -249,6 +258,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -316,6 +328,9 @@ var updateCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service Schemas

View File

@ -84,6 +84,9 @@ var createScopeCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete-acl command
@ -138,6 +141,9 @@ var deleteAclCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete-scope command
@ -190,6 +196,9 @@ var deleteScopeCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete-secret command
@ -244,6 +253,9 @@ var deleteSecretCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get-acl command
@ -298,6 +310,9 @@ var getAclCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list-acls command
@ -351,6 +366,9 @@ var listAclsCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list-scopes command
@ -381,6 +399,9 @@ var listScopesCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list-secrets command
@ -436,6 +457,9 @@ var listSecretsCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start put-acl command
@ -514,6 +538,9 @@ var putAclCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service Secrets

View File

@ -80,6 +80,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -138,6 +141,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -197,6 +203,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -252,6 +261,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start patch command
@ -313,6 +325,9 @@ var patchCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -382,6 +397,9 @@ var updateCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service ServicePrincipals

View File

@ -82,6 +82,9 @@ var buildLogsCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start create command
@ -143,6 +146,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, info)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -189,6 +195,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start export-metrics command
@ -239,6 +248,9 @@ var exportMetricsCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -287,6 +299,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -312,6 +327,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start logs command
@ -362,6 +380,9 @@ var logsCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start query command
@ -408,6 +429,9 @@ var queryCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update-config command
@ -476,6 +500,9 @@ var updateConfigCmd = &cobra.Command{
}
return cmdio.Render(ctx, info)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service ServingEndpoints

View File

@ -69,6 +69,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -118,6 +121,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -169,6 +175,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -198,6 +207,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start share-permissions command
@ -247,6 +259,9 @@ var sharePermissionsCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -313,6 +328,9 @@ var updateCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update-permissions command
@ -367,6 +385,9 @@ var updatePermissionsCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service Shares

View File

@ -94,6 +94,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -155,6 +158,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -215,6 +221,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -246,6 +255,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -317,6 +329,9 @@ var updateCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start validate command
@ -384,6 +399,9 @@ var validateCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service StorageCredentials

View File

@ -19,6 +19,9 @@ var Cmd = &cobra.Command{
Annotations: map[string]string{
"package": "catalog",
},
// This service is being previewed; hide from help output.
Hidden: true,
}
// start disable command
@ -69,6 +72,9 @@ var disableCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start enable command
@ -97,6 +103,9 @@ var enableCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -146,6 +155,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service SystemSchemas

View File

@ -85,6 +85,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -146,6 +149,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service TableConstraints

View File

@ -89,6 +89,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -153,6 +156,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -211,6 +217,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list-summaries command
@ -284,6 +293,9 @@ var listSummariesCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service Tables

View File

@ -75,6 +75,9 @@ var createOboTokenCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -133,6 +136,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -191,6 +197,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -241,6 +250,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service TokenManagement

View File

@ -73,6 +73,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -134,6 +137,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -161,6 +167,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service Tokens

View File

@ -88,6 +88,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -147,6 +150,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -205,6 +211,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -260,6 +269,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start patch command
@ -321,6 +333,9 @@ var patchCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -390,6 +405,9 @@ var updateCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service Users

View File

@ -26,6 +26,9 @@ var Cmd = &cobra.Command{
Annotations: map[string]string{
"package": "catalog",
},
// This service is being previewed; hide from help output.
Hidden: true,
}
// start create command
@ -100,6 +103,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -162,6 +168,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -221,6 +230,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start read command
@ -284,6 +296,9 @@ var readCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -353,6 +368,9 @@ var updateCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service Volumes

View File

@ -107,6 +107,9 @@ var createCmd = &cobra.Command{
}
return cmdio.Render(ctx, info)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start delete command
@ -165,6 +168,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start edit command
@ -261,6 +267,9 @@ var editCmd = &cobra.Command{
}
return cmdio.Render(ctx, info)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get command
@ -324,6 +333,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get-workspace-warehouse-config command
@ -352,6 +364,9 @@ var getWorkspaceWarehouseConfigCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -401,6 +416,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start set-workspace-warehouse-config command
@ -459,6 +477,9 @@ var setWorkspaceWarehouseConfigCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start start command
@ -541,6 +562,9 @@ var startCmd = &cobra.Command{
}
return cmdio.Render(ctx, info)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start stop command
@ -623,6 +647,9 @@ var stopCmd = &cobra.Command{
}
return cmdio.Render(ctx, info)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service Warehouses

View File

@ -71,6 +71,9 @@ var getCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start update command
@ -123,6 +126,9 @@ var updateCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service WorkspaceBindings

View File

@ -65,6 +65,9 @@ var getStatusCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start set-status command
@ -113,6 +116,9 @@ var setStatusCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service WorkspaceConf

View File

@ -90,6 +90,9 @@ var deleteCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start export command
@ -102,7 +105,6 @@ func init() {
// TODO: short flags
exportCmd.Flags().Var(&exportJson, "json", `either inline JSON string or @path/to/file.json with request body`)
exportCmd.Flags().BoolVar(&exportReq.DirectDownload, "direct-download", exportReq.DirectDownload, `Flag to enable direct download.`)
exportCmd.Flags().Var(&exportReq.Format, "format", `This specifies the format of the exported file.`)
}
@ -158,6 +160,9 @@ var exportCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start get-status command
@ -207,6 +212,9 @@ var getStatusCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start import command
@ -263,6 +271,9 @@ var importCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start list command
@ -315,6 +326,9 @@ var listCmd = &cobra.Command{
}
return cmdio.Render(ctx, response)
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// start mkdirs command
@ -378,6 +392,9 @@ var mkdirsCmd = &cobra.Command{
}
return nil
},
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
ValidArgsFunction: cobra.NoFileCompletions,
}
// end service Workspace

18
go.mod
View File

@ -4,7 +4,7 @@ go 1.18
require (
github.com/briandowns/spinner v1.23.0 // Apache 2.0
github.com/databricks/databricks-sdk-go v0.9.1-0.20230609162050-fdf0bf49f7bd // Apache 2.0
github.com/databricks/databricks-sdk-go v0.9.1-0.20230614092458-b5bbc1c8dabb // Apache 2.0
github.com/fatih/color v1.15.0 // MIT
github.com/ghodss/yaml v1.0.0 // MIT + NOTICE
github.com/google/uuid v1.3.0 // BSD-3-Clause
@ -24,10 +24,10 @@ require (
github.com/whilp/git-urls v1.0.0 // MIT
golang.org/x/exp v0.0.0-20230310171629-522b1b587ee0
golang.org/x/mod v0.10.0
golang.org/x/oauth2 v0.8.0
golang.org/x/oauth2 v0.9.0
golang.org/x/sync v0.2.0
golang.org/x/term v0.8.0
golang.org/x/text v0.9.0
golang.org/x/term v0.9.0
golang.org/x/text v0.10.0
gopkg.in/ini.v1 v1.67.0 // Apache 2.0
)
@ -43,18 +43,18 @@ require (
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/s2a-go v0.1.4 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.4 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/zclconf/go-cty v1.13.2 // indirect
go.opencensus.io v0.24.0 // indirect
golang.org/x/crypto v0.9.0 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/crypto v0.10.0 // indirect
golang.org/x/net v0.11.0 // indirect
golang.org/x/sys v0.9.0 // indirect
golang.org/x/time v0.3.0 // indirect
google.golang.org/api v0.125.0 // indirect
google.golang.org/api v0.127.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect
google.golang.org/grpc v1.55.0 // indirect

36
go.sum
View File

@ -34,8 +34,8 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH
github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/databricks/databricks-sdk-go v0.9.1-0.20230609162050-fdf0bf49f7bd h1:mhituyVw1q1LA/l8V2dKK7JBZlAGDosolYylmVvL/YE=
github.com/databricks/databricks-sdk-go v0.9.1-0.20230609162050-fdf0bf49f7bd/go.mod h1:CjACzGP8eyLmKN0OQs8v8LPilp1FEFk2Tp6N7zT7cpQ=
github.com/databricks/databricks-sdk-go v0.9.1-0.20230614092458-b5bbc1c8dabb h1:M4TAWTG9Cg205GQn84azS+jZIkE6eNdcGr04ZeBqQLA=
github.com/databricks/databricks-sdk-go v0.9.1-0.20230614092458-b5bbc1c8dabb/go.mod h1:KGnka35+ywspOGF6/t3okMzPZXLgLJtEIzAHWXy/eSg=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@ -91,8 +91,8 @@ github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkj
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k=
github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k=
github.com/googleapis/enterprise-certificate-proxy v0.2.4 h1:uGy6JWR/uMIILU8wbf+OkstIrNiMjGpEIyhx8f6W7s4=
github.com/googleapis/enterprise-certificate-proxy v0.2.4/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k=
github.com/googleapis/gax-go/v2 v2.10.0 h1:ebSgKfMxynOdxw8QQuFOKMgomqeLGPqNLQox2bo42zg=
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
@ -163,8 +163,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g=
golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0=
golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM=
golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20230310171629-522b1b587ee0 h1:LGJsf5LRplCck6jUCH3dBL2dmycNruWNF5xugkSlfXw=
golang.org/x/exp v0.0.0-20230310171629-522b1b587ee0/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
@ -187,12 +187,12 @@ golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwY
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU=
golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8=
golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE=
golang.org/x/oauth2 v0.9.0 h1:BPpt2kU7oMRq3kCHAA1tbSEshXRw1LpG2ztgDwrzuAs=
golang.org/x/oauth2 v0.9.0/go.mod h1:qYgFZaFiu6Wg24azG8bdV52QJXJGbZzIIsRCdVKzbLw=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@ -217,20 +217,20 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s=
golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols=
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.9.0 h1:GRRCnKYhdQrD8kfRAdQ6Zcw1P0OcELxGLKJvtjVMZ28=
golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58=
golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
@ -243,8 +243,8 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/api v0.125.0 h1:7xGvEY4fyWbhWMHf3R2/4w7L4fXyfpRGE9g6lp8+DCk=
google.golang.org/api v0.125.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw=
google.golang.org/api v0.127.0 h1:v7rj0vA0imM3Ou81k1eyFxQNScLzn71EyGnJDr+V/XI=
google.golang.org/api v0.127.0/go.mod h1:Y611qgqaE92On/7g65MQgxYul3c0rEB894kniWLY750=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c=

View File

@ -9,6 +9,7 @@ import (
"math/rand"
"os"
"path/filepath"
"reflect"
"strings"
"sync"
"testing"
@ -16,6 +17,8 @@ import (
"github.com/databricks/cli/cmd/root"
_ "github.com/databricks/cli/cmd/version"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"github.com/stretchr/testify/require"
_ "github.com/databricks/cli/cmd/workspace"
@ -82,6 +85,33 @@ func consumeLines(ctx context.Context, wg *sync.WaitGroup, r io.Reader) <-chan s
return ch
}
func (t *cobraTestRunner) registerFlagCleanup(c *cobra.Command) {
// Find target command that will be run. Example: if the command run is `databricks fs cp`,
// target command corresponds to `cp`
targetCmd, _, err := c.Find(t.args)
require.NoError(t, err)
// Force initialization of default flags.
// These are initialized by cobra at execution time and would otherwise
// not be cleaned up by the cleanup function below.
targetCmd.InitDefaultHelpFlag()
targetCmd.InitDefaultVersionFlag()
// Restore flag values to their original value on test completion.
targetCmd.Flags().VisitAll(func(f *pflag.Flag) {
v := reflect.ValueOf(f.Value)
if v.Kind() == reflect.Ptr {
v = v.Elem()
}
// Store copy of the current flag value.
reset := reflect.New(v.Type()).Elem()
reset.Set(v)
t.Cleanup(func() {
v.Set(reset)
})
})
}
func (t *cobraTestRunner) RunBackground() {
var stdoutR, stderrR io.Reader
var stdoutW, stderrW io.WriteCloser
@ -92,6 +122,12 @@ func (t *cobraTestRunner) RunBackground() {
root.SetErr(stderrW)
root.SetArgs(t.args)
// Register cleanup function to restore flags to their original values
// once test has been executed. This is needed because flag values reside
// in a global singleton data-structure, and thus subsequent tests might
// otherwise interfere with each other
t.registerFlagCleanup(root)
errch := make(chan error)
ctx, cancel := context.WithCancel(context.Background())

View File

@ -3,7 +3,7 @@ package internal
import (
"context"
"errors"
"io/ioutil"
"io"
"net/http"
"os"
"path/filepath"
@ -69,7 +69,7 @@ func assertLocalFileContents(t *testing.T, path string, content string) {
func assertFilerFileContents(t *testing.T, ctx context.Context, f filer.Filer, path string, content string) {
r, err := f.Read(ctx, path)
require.NoError(t, err)
b, err := ioutil.ReadAll(r)
b, err := io.ReadAll(r)
require.NoError(t, err)
assert.Contains(t, string(b), content)
}

View File

@ -51,7 +51,7 @@ func IsInteractive(ctx context.Context) bool {
}
// IsTTY detects if io.Writer is a terminal.
func IsTTY(w io.Writer) bool {
func IsTTY(w any) bool {
f, ok := w.(*os.File)
if !ok {
return false
@ -60,6 +60,24 @@ func IsTTY(w io.Writer) bool {
return isatty.IsTerminal(fd) || isatty.IsCygwinTerminal(fd)
}
// IsInTTY detects if the input reader is a terminal.
func IsInTTY(ctx context.Context) bool {
c := fromContext(ctx)
return IsTTY(c.in)
}
// IsOutTTY detects if the output writer is a terminal.
func IsOutTTY(ctx context.Context) bool {
c := fromContext(ctx)
return IsTTY(c.out)
}
// IsErrTTY detects if the error writer is a terminal.
func IsErrTTY(ctx context.Context) bool {
c := fromContext(ctx)
return IsTTY(c.err)
}
// IsTTY detects if stdout is a terminal. It assumes that stderr is terminal as well
func (c *cmdIO) IsTTY() bool {
f, ok := c.out.(*os.File)
@ -170,6 +188,22 @@ func Secret(ctx context.Context) (value string, err error) {
return c.Secret()
}
type nopWriteCloser struct {
io.Writer
}
func (nopWriteCloser) Close() error {
return nil
}
func Prompt(ctx context.Context) *promptui.Prompt {
c := fromContext(ctx)
return &promptui.Prompt{
Stdin: io.NopCloser(c.in),
Stdout: nopWriteCloser{c.out},
}
}
func (c *cmdIO) Spinner(ctx context.Context) chan string {
var sp *spinner.Spinner
if c.interactive {

View File

@ -33,6 +33,11 @@ func (p *ProgressLogFormat) Set(s string) error {
*p = ProgressLogFormat(ModeInplace.String())
case ModeJson.String():
*p = ProgressLogFormat(ModeJson.String())
case ModeDefault.String():
// We include ModeDefault here for symmetry reasons so this flag value
// can be unset after test runs. We should not point this value in error
// messages though since it's internal only
*p = ProgressLogFormat(ModeJson.String())
default:
valid := []string{
ModeAppend.String(),