pkg/cmd/cli/sa/subcommand.go
b28e2c6c
 package sa
 
 import (
 	"io"
 
 	"github.com/spf13/cobra"
 
6267dded
 	"github.com/openshift/origin/pkg/cmd/templates"
b28e2c6c
 	cmdutil "github.com/openshift/origin/pkg/cmd/util"
 	"github.com/openshift/origin/pkg/cmd/util/clientcmd"
 )
 
 const ServiceAccountsRecommendedName = "serviceaccounts"
 
6267dded
 var serviceAccountsLong = templates.LongDesc(`Manage service accounts in your project.
b28e2c6c
 
6267dded
 Service accounts allow system components to access the API.`)
b28e2c6c
 
6267dded
 const (
 	serviceAccountsShort = `Manage service accounts in your project.`
b28e2c6c
 )
 
 func NewCmdServiceAccounts(name, fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command {
 	cmds := &cobra.Command{
 		Use:     name,
 		Short:   serviceAccountsShort,
 		Long:    serviceAccountsLong,
 		Aliases: []string{"sa"},
 		Run:     cmdutil.DefaultSubCommandRun(out),
 	}
 
 	cmds.AddCommand(NewCommandGetServiceAccountToken(GetServiceAccountTokenRecommendedName, fullName+" "+GetServiceAccountTokenRecommendedName, f, out))
 	cmds.AddCommand(NewCommandNewServiceAccountToken(NewServiceAccountTokenRecommendedName, fullName+" "+NewServiceAccountTokenRecommendedName, f, out))
 
 	return cmds
 }