cmd

package
v17.10.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2017 License: Apache-2.0 Imports: 23 Imported by: 14

Documentation

Index

Constants

View Source
const (
	FORMAT_JSON = "json"
	FORMAT_NAME = "name"
	FORMAT_WIDE = "wide"
	FORMAT_YAML = "yaml"

	MODE_DIRECT = "direct"
	MODE_TUNNEL = "tunnel"
	MODE_LOGS   = "logs"

	CLI_KUBERNETES = "kubectl"
	CLI_OPENSHIFT  = "oc"

	POD_SERVER = "127.0.0.1:8000"

	EXIT_CODE_SUCCESS = 0
	EXIT_CODE_FAILURE = 1
)
View Source
const (
	LOG_LIMIT_BYTES = 10485760 // 10 MiB

)

Variables

View Source
var (
	OperatingMode       string
	KubernetesCLI       string
	TridentPodName      string
	TridentPodNamespace string
	ExitCode            int

	Debug        bool
	Server       string
	OutputFormat string
)
View Source
var AllBackends bool
View Source
var AllStorageClasses bool
View Source
var AllVolumes bool
View Source
var RootCmd = &cobra.Command{
	SilenceUsage: true,
	Use:          "tridentctl",
	Short:        "A CLI tool for NetApp Trident",
	Long:         `A CLI tool for managing the NetApp Trident external storage provisioner for Kubernetes`,
	PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
		err := discoverOperatingMode(cmd)
		return err
	},
}

Functions

func GetBackend

func GetBackend(baseURL, backendName string) (api.Backend, error)

func GetBackends

func GetBackends(baseURL string) ([]string, error)

func GetBaseURL

func GetBaseURL() (string, error)

func GetExitCodeFromError

func GetExitCodeFromError(err error) int

func GetStorageClass

func GetStorageClass(baseURL, storageClassName string) (api.StorageClass, error)

func GetStorageClasses

func GetStorageClasses(baseURL string) ([]string, error)

func GetVolume

func GetVolume(baseURL, volumeName string) (storage.VolumeExternal, error)

func GetVolumes

func GetVolumes(baseURL string) ([]string, error)

func SetExitCodeFromError

func SetExitCodeFromError(err error)

func TunnelCommand

func TunnelCommand(commandArgs []string)

func TunnelCommandRaw

func TunnelCommandRaw(commandArgs []string) ([]byte, error)

func WriteBackends

func WriteBackends(backends []api.Backend)

func WriteJSON

func WriteJSON(out interface{})

func WriteStorageClasses

func WriteStorageClasses(storageClasses []api.StorageClass)

func WriteVolumes

func WriteVolumes(volumes []storage.VolumeExternal)

func WriteYAML

func WriteYAML(out interface{})

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL