From 92c6e96d729a79b437c5a644d94192fcf0822839 Mon Sep 17 00:00:00 2001 From: monalisa Date: Thu, 11 Jan 2024 13:28:55 +0530 Subject: [PATCH] add overrides --- cmd/workspace/external-locations/overrides.go | 3 ++- cmd/workspace/storage-credentials/overrides.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/workspace/external-locations/overrides.go b/cmd/workspace/external-locations/overrides.go index a271e5f6..63a30cfc 100644 --- a/cmd/workspace/external-locations/overrides.go +++ b/cmd/workspace/external-locations/overrides.go @@ -2,10 +2,11 @@ package external_locations import ( "github.com/databricks/cli/libs/cmdio" + "github.com/databricks/databricks-sdk-go/service/catalog" "github.com/spf13/cobra" ) -func listOverride(listCmd *cobra.Command) { +func listOverride(listCmd *cobra.Command, listReq *catalog.ListExternalLocationsRequest) { listCmd.Annotations["template"] = cmdio.Heredoc(` {{header "Name"}} {{header "Credential"}} {{header "URL"}} {{range .}}{{.Name|green}} {{.CredentialName|cyan}} {{.Url}} diff --git a/cmd/workspace/storage-credentials/overrides.go b/cmd/workspace/storage-credentials/overrides.go index affcdfec..534e045d 100644 --- a/cmd/workspace/storage-credentials/overrides.go +++ b/cmd/workspace/storage-credentials/overrides.go @@ -2,10 +2,11 @@ package storage_credentials import ( "github.com/databricks/cli/libs/cmdio" + "github.com/databricks/databricks-sdk-go/service/catalog" "github.com/spf13/cobra" ) -func listOverride(listCmd *cobra.Command) { +func listOverride(listCmd *cobra.Command, listReq *catalog.ListStorageCredentialsRequest) { listCmd.Annotations["template"] = cmdio.Heredoc(` {{header "ID"}} {{header "Name"}} {{header "Credentials"}} {{range .}}{{.Id|green}} {{.Name|cyan}} {{if .AwsIamRole}}{{.AwsIamRole.RoleArn}}{{end}}{{if .AzureServicePrincipal}}{{.AzureServicePrincipal.ApplicationId}}{{end}}{{if .DatabricksGcpServiceAccount}}{{.DatabricksGcpServiceAccount.Email}}{{end}}