cmd

package
v3.11.0-0.4.0+incompat... Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2018 License: Apache-2.0 Imports: 152 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RshRecommendedName = "rsh"
	DefaultShell       = "/bin/sh"
)
View Source
const CancelBuildRecommendedCommandName = "cancel-build"

CancelBuildRecommendedCommandName is the recommended command name.

View Source
const ExposeRecommendedName = "expose"

ExposeRecommendedName is the recommended command name to expose app.

View Source
const LogsRecommendedCommandName = "logs"

LogsRecommendedCommandName is the recommended command name TODO: Probably move this pattern upstream?

View Source
const NewAppRecommendedCommandName = "new-app"

NewAppRecommendedCommandName is the recommended command name.

View Source
const NewBuildRecommendedCommandName = "new-build"

NewBuildRecommendedCommandName is the recommended command name.

View Source
const RequestProjectRecommendedCommandName = "new-project"

RequestProjectRecommendedCommandName is the recommended command name.

View Source
const RoutePollTimeout = 5 * time.Second

RoutePollTimoutSeconds sets how long new-app command waits for route host to be prepopulated

View Source
const StatusRecommendedName = "status"

StatusRecommendedName is the recommended command name.

View Source
const WhoAmIRecommendedCommandName = "whoami"

Variables

View Source
var ErrExportOmit = fmt.Errorf("object is omitted")

Functions

func CompleteAppConfig

func CompleteAppConfig(config *newcmd.AppConfig, f kcmdutil.Factory, c *cobra.Command, args []string) error

func GetObjectName

func GetObjectName(info *resource.Info) string

func NewCmdAnnotate

func NewCmdAnnotate(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdAnnotate is a wrapper for the Kubernetes cli annotate command

func NewCmdApiResources

func NewCmdApiResources(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

func NewCmdApiVersions

func NewCmdApiVersions(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

func NewCmdApply

func NewCmdApply(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdApply is a wrapper for the Kubernetes cli apply command

func NewCmdAttach

func NewCmdAttach(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdAttach is a wrapper for the Kubernetes cli attach command

func NewCmdAuth

func NewCmdAuth(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

func NewCmdAutoscale

func NewCmdAutoscale(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdAutoscale is a wrapper for the Kubernetes cli autoscale command

func NewCmdBuildLogs

func NewCmdBuildLogs(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdBuildLogs implements the OpenShift cli build-logs command

func NewCmdCancelBuild

func NewCmdCancelBuild(name, baseName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdCancelBuild implements the OpenShift cli cancel-build command

func NewCmdCompletion

func NewCmdCompletion(fullName string, streams genericclioptions.IOStreams) *cobra.Command

func NewCmdConfig

func NewCmdConfig(parentName, name string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdConfig is a wrapper for the Kubernetes cli config command

func NewCmdConvert

func NewCmdConvert(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdConvert is a wrapper for the Kubernetes cli convert command

func NewCmdCp

func NewCmdCp(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdCp is a wrapper for the Kubernetes cli cp command

func NewCmdCreate

func NewCmdCreate(parentName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdCreate is a wrapper for the Kubernetes cli create command

func NewCmdDebug

func NewCmdDebug(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdDebug creates a command for debugging pods.

func NewCmdDelete

func NewCmdDelete(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdDelete is a wrapper for the Kubernetes cli delete command

func NewCmdDeploy

func NewCmdDeploy(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdDeploy creates a new `deploy` command.

func NewCmdDescribe

func NewCmdDescribe(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdDescribe is a wrapper for the Kubernetes cli describe command

func NewCmdEdit

func NewCmdEdit(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdEdit is a wrapper for the Kubernetes cli edit command

func NewCmdExec

func NewCmdExec(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdExec is a wrapper for the Kubernetes cli exec command

func NewCmdExplain

func NewCmdExplain(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdExplain is a wrapper for the Kubernetes cli explain command

func NewCmdExport

func NewCmdExport(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

func NewCmdExpose

func NewCmdExpose(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdExpose is a wrapper for the Kubernetes cli expose command

func NewCmdExtract

func NewCmdExtract(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

func NewCmdGet

func NewCmdGet(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdGet is a wrapper for the Kubernetes cli get command

func NewCmdIdle

func NewCmdIdle(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdIdle implements the OpenShift cli idle command

func NewCmdImportImage

func NewCmdImportImage(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdImportImage implements the OpenShift cli import-image command.

func NewCmdLabel

func NewCmdLabel(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdLabel is a wrapper for the Kubernetes cli label command

func NewCmdLogs

func NewCmdLogs(name, baseName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdLogs creates a new logs command that supports OpenShift resources.

func NewCmdNewApplication

func NewCmdNewApplication(name, baseName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdNewApplication implements the OpenShift cli new-app command.

func NewCmdNewBuild

func NewCmdNewBuild(name, baseName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdNewBuild implements the OpenShift cli new-build command

func NewCmdOptions

func NewCmdOptions(streams genericclioptions.IOStreams) *cobra.Command

NewCmdOptions implements the OpenShift cli options command

func NewCmdPatch

func NewCmdPatch(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdPatch is a wrapper for the Kubernetes cli patch command

func NewCmdPlugin

func NewCmdPlugin(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

func NewCmdPortForward

func NewCmdPortForward(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdPortForward is a wrapper for the Kubernetes cli port-forward command

func NewCmdProcess

func NewCmdProcess(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdProcess implements the OpenShift cli process command

func NewCmdProject

func NewCmdProject(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdProject implements the OpenShift cli rollback command

func NewCmdProjects

func NewCmdProjects(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdProjects implements the OpenShift cli rollback command

func NewCmdProxy

func NewCmdProxy(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdProxy is a wrapper for the Kubernetes cli proxy command

func NewCmdReplace

func NewCmdReplace(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdReplace is a wrapper for the Kubernetes cli replace command

func NewCmdRequestProject

func NewCmdRequestProject(name, baseName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdRequestProject implement the OpenShift cli RequestProject command.

func NewCmdRollback

func NewCmdRollback(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdRollback creates a CLI rollback command.

func NewCmdRsh

func NewCmdRsh(name string, parent string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdRsh returns a command that attempts to open a shell session to the server.

func NewCmdRun

func NewCmdRun(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdRun is a wrapper for the Kubernetes cli run command

func NewCmdScale

func NewCmdScale(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdScale is a wrapper for the Kubernetes cli scale command

func NewCmdStartBuild

func NewCmdStartBuild(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdStartBuild implements the OpenShift cli start-build command

func NewCmdStatus

func NewCmdStatus(name, baseCLIName, fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdStatus implements the OpenShift cli status command. baseCLIName is the path from root cmd to the parent of this cmd.

func NewCmdTYPE

func NewCmdTYPE(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdTYPE implements a TYPE command This is an example type for templating.

func NewCmdTag

func NewCmdTag(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdTag implements the OpenShift cli tag command.

func NewCmdTypes

func NewCmdTypes(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

func NewCmdVersion

func NewCmdVersion(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams, options VersionOptions) *cobra.Command

NewCmdVersion creates a command for displaying the version of this binary

func NewCmdWait

func NewCmdWait(fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

func NewCmdWhoAmI

func NewCmdWhoAmI(name, fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

func RunProcess

func RunProcess(f kcmdutil.Factory, in io.Reader, out, errout io.Writer, cmd *cobra.Command, args []string) error

RunProcess contains all the necessary functionality for the OpenShift cli process command

func RunWhoAmI

func RunWhoAmI(f kcmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, o *WhoAmIOptions) error

func WaitForBuildComplete

func WaitForBuildComplete(c buildclient.BuildResourceInterface, name string) error

WaitForBuildComplete waits for a build identified by the name to complete

Types

type BuildLogsOptions

type BuildLogsOptions struct {
	Follow bool
	NoWait bool

	Name        string
	Namespace   string
	BuildClient buildclientinternal.Interface

	genericclioptions.IOStreams
}

func NewBuildLogsOptions

func NewBuildLogsOptions(streams genericclioptions.IOStreams) *BuildLogsOptions

func (*BuildLogsOptions) Complete

func (o *BuildLogsOptions) Complete(f kcmdutil.Factory, cmd *cobra.Command, args []string) error

func (*BuildLogsOptions) RunBuildLogs

func (o *BuildLogsOptions) RunBuildLogs() error

RunBuildLogs contains all the necessary functionality for the OpenShift cli build-logs command

type CancelBuildOptions

type CancelBuildOptions struct {
	DumpLogs   bool
	Restart    bool
	States     []string
	Namespace  string
	BuildNames []string

	HasError       bool
	ReportError    func(error)
	PrinterCancel  printers.ResourcePrinter
	PrinterRestart printers.ResourcePrinter
	Mapper         meta.RESTMapper
	Client         buildinternalclient.Interface
	BuildClient    buildtypedclient.BuildResourceInterface
	BuildLister    buildlister.BuildLister

	genericclioptions.IOStreams
	// contains filtered or unexported fields
}

CancelBuildOptions contains all the options for running the CancelBuild cli command.

func NewCancelBuildOptions

func NewCancelBuildOptions(streams genericclioptions.IOStreams) *CancelBuildOptions

func (*CancelBuildOptions) Complete

func (o *CancelBuildOptions) Complete(f kcmdutil.Factory, cmd *cobra.Command, args []string) error

Complete completes all the required options.

func (*CancelBuildOptions) RunCancelBuild

func (o *CancelBuildOptions) RunCancelBuild() error

RunCancelBuild implements all the necessary functionality for CancelBuild.

func (*CancelBuildOptions) Validate

func (o *CancelBuildOptions) Validate() error

type DebugOptions

type DebugOptions struct {
	PrintFlags *genericclioptions.PrintFlags

	Attach kcmd.AttachOptions

	CoreClient   coreclient.CoreInterface
	CoreV1Client corev1client.CoreV1Interface
	AppsClient   appsclient.AppsInterface
	ImageClient  imageclient.ImageInterface

	Printer       printers.ResourcePrinter
	LogsForObject polymorphichelpers.LogsForObjectFunc

	NoStdin    bool
	ForceTTY   bool
	DisableTTY bool
	Timeout    time.Duration

	Command            []string
	Annotations        map[string]string
	AsRoot             bool
	AsNonRoot          bool
	AsUser             int64
	KeepLabels         bool // TODO: evaluate selecting the right labels automatically
	KeepAnnotations    bool
	KeepLiveness       bool
	KeepReadiness      bool
	KeepInitContainers bool
	OneContainer       bool
	NodeName           string
	AddEnv             []kapi.EnvVar
	RemoveEnv          []string
	Resources          []string
	Builder            func() *resource.Builder
	Namespace          string
	ExplicitNamespace  bool
	DryRun             bool
	FullCmdName        string

	resource.FilenameOptions
	genericclioptions.IOStreams
}

func NewDebugOptions

func NewDebugOptions(streams genericclioptions.IOStreams) *DebugOptions

func (*DebugOptions) Complete

func (o *DebugOptions) Complete(cmd *cobra.Command, f kcmdutil.Factory, args []string) error

func (*DebugOptions) RunDebug

func (o *DebugOptions) RunDebug() error

Debug creates and runs a debugging pod.

func (DebugOptions) Validate

func (o DebugOptions) Validate() error

type DefaultExporter

type DefaultExporter struct{}

func (*DefaultExporter) AddExportOptions

func (e *DefaultExporter) AddExportOptions(flags *pflag.FlagSet)

func (*DefaultExporter) Export

func (e *DefaultExporter) Export(obj runtime.Object, exact bool) error

type DeployOptions

type DeployOptions struct {
	// contains filtered or unexported fields
}

DeployOptions holds all the options for the `deploy` command

func (*DeployOptions) Complete

func (o *DeployOptions) Complete(f kcmdutil.Factory, args []string, out io.Writer) error

func (DeployOptions) RunDeploy

func (o DeployOptions) RunDeploy() error

func (DeployOptions) Validate

func (o DeployOptions) Validate() error

type ExportOptions

type ExportOptions struct {
	resource.FilenameOptions
	PrintFlags *genericclioptions.PrintFlags

	Exporter Exporter

	AsTemplateName string
	Exact          bool
	Raw            bool
	AllNamespaces  bool
	Selector       string
	OutputVersion  string
	Args           []string

	Builder          *resource.Builder
	Namespace        string
	RequireNamespace bool
	ClientConfig     *rest.Config

	Printer printers.ResourcePrinter

	genericclioptions.IOStreams
}

func NewExportOptions

func NewExportOptions(streams genericclioptions.IOStreams) *ExportOptions

func (*ExportOptions) Complete

func (o *ExportOptions) Complete(f kcmdutil.Factory, args []string) error

func (*ExportOptions) Run

func (o *ExportOptions) Run() error

func (*ExportOptions) Validate

func (o *ExportOptions) Validate() error

type Exporter

type Exporter interface {
	AddExportOptions(*pflag.FlagSet)
	Export(obj runtime.Object, exact bool) error
}

type ExposeOptions

type ExposeOptions struct {
	Hostname       string
	Path           string
	WildcardPolicy string

	Namespace        string
	EnforceNamespace bool
	Clientset        internalclientset.Interface
	Builder          func() *resource.Builder
	Args             []string
	Generator        string
	Filenames        []string
	Port             string
	Protocol         string
}

func NewExposeOptions

func NewExposeOptions() *ExposeOptions

func (*ExposeOptions) Complete

func (o *ExposeOptions) Complete(cmd *cobra.Command, f kcmdutil.Factory, args []string) error

func (*ExposeOptions) Validate

func (o *ExposeOptions) Validate(cmd *cobra.Command) error

Validate adds one layer of validation prior to calling the upstream expose command.

type ExtractOptions

type ExtractOptions struct {
	Out, Err        io.Writer
	Filenames       []string
	OnlyKeys        []string
	TargetDirectory string
	Overwrite       bool

	VisitorFn             func(resource.VisitorFunc) error
	ExtractFileContentsFn func(runtime.Object) (map[string][]byte, bool, error)
}

func (*ExtractOptions) Complete

func (o *ExtractOptions) Complete(f kcmdutil.Factory, in io.Reader, out io.Writer, cmd *cobra.Command, args []string) error

func (*ExtractOptions) Run

func (o *ExtractOptions) Run() error

func (*ExtractOptions) Validate

func (o *ExtractOptions) Validate() error

type IdleOptions

type IdleOptions struct {
	// contains filtered or unexported fields
}

func (*IdleOptions) Complete

func (o *IdleOptions) Complete(f kcmdutil.Factory, cmd *cobra.Command, args []string) error

func (*IdleOptions) RunIdle

func (o *IdleOptions) RunIdle(f kcmdutil.Factory) error

RunIdle runs the idling command logic, taking a list of resources or services in a file, scaling the associated scalable resources to zero, and annotating the associated endpoints objects with the scalable resources to unidle when they receive traffic.

type ImportImageOptions

type ImportImageOptions struct {
	// user set values
	From                 string
	Confirm              bool
	All                  bool
	Scheduled            bool
	Insecure             bool
	InsecureFlagProvided bool

	DryRun bool

	// internal values
	Namespace       string
	Name            string
	Tag             string
	Target          string
	ReferencePolicy string

	genericclioptions.IOStreams
	// contains filtered or unexported fields
}

ImageImportOptions contains all the necessary information to perform an import.

func NewImportImageOptions

func NewImportImageOptions(name string, streams genericclioptions.IOStreams) *ImportImageOptions

func (*ImportImageOptions) Complete

func (o *ImportImageOptions) Complete(f kcmdutil.Factory, cmd *cobra.Command, args []string) error

Complete turns a partially defined ImportImageOptions into a solvent structure which can be validated and used for aa import.

func (*ImportImageOptions) Run

func (o *ImportImageOptions) Run() error

Run contains all the necessary functionality for the OpenShift cli import-image command.

func (*ImportImageOptions) Validate

func (o *ImportImageOptions) Validate(cmd *cobra.Command) error

Validate ensures that a ImportImageOptions is valid and can be used to execute an import.

type NewAppOptions

type NewAppOptions struct {
	*ObjectGeneratorOptions
}

func (*NewAppOptions) Complete

func (o *NewAppOptions) Complete(baseName, commandName string, f kcmdutil.Factory, c *cobra.Command, args []string, in io.Reader, out, errout io.Writer) error

Complete sets any default behavior for the command

func (*NewAppOptions) RunNewApp

func (o *NewAppOptions) RunNewApp() error

RunNewApp contains all the necessary functionality for the OpenShift cli new-app command

type NewBuildOptions

type NewBuildOptions struct {
	*ObjectGeneratorOptions
}

func (*NewBuildOptions) Complete

func (o *NewBuildOptions) Complete(baseName, commandName string, f kcmdutil.Factory, c *cobra.Command, args []string, in io.Reader, out, errout io.Writer) error

Complete sets any default behavior for the command

func (*NewBuildOptions) RunNewBuild

func (o *NewBuildOptions) RunNewBuild() error

RunNewBuild contains all the necessary functionality for the OpenShift cli new-build command

type ObjectGeneratorOptions

type ObjectGeneratorOptions struct {
	Action bulk.BulkAction
	Config *newcmd.AppConfig

	BaseName    string
	CommandPath string
	CommandName string

	In            io.Reader
	ErrOut        io.Writer
	PrintObject   func(obj runtime.Object) error
	LogsForObject polymorphichelpers.LogsForObjectFunc
}

func (*ObjectGeneratorOptions) Complete

func (o *ObjectGeneratorOptions) Complete(baseName, commandName string, f kcmdutil.Factory, c *cobra.Command, args []string, in io.Reader, out, errout io.Writer) error

Complete sets all common default options for commands (new-app and new-build)

type OpenShiftLogsOptions

type OpenShiftLogsOptions struct {
	// Options should hold our own *LogOptions objects.
	Options runtime.Object
	// KubeLogOptions contains all the necessary options for
	// running the upstream logs command.
	KubeLogOptions *kcmd.LogsOptions
	// Client enables access to the Build object when processing
	// build logs for Jenkins Pipeline Strategy builds
	Client buildclient.BuildsGetter
	// Namespace is a required parameter when accessing the Build object when processing
	// build logs for Jenkins Pipeline Strategy builds
	Namespace string
}

OpenShiftLogsOptions holds all the necessary options for running oc logs.

func (*OpenShiftLogsOptions) Complete

func (o *OpenShiftLogsOptions) Complete(f kcmdutil.Factory, cmd *cobra.Command, args []string, out io.Writer) error

Complete calls the upstream Complete for the logs command and then resolves the resource a user requested to view its logs and creates the appropriate logOptions object for it.

func (OpenShiftLogsOptions) RunLog

func (o OpenShiftLogsOptions) RunLog() error

RunLog will run the upstream logs command and may use an OpenShift logOptions object.

func (OpenShiftLogsOptions) Validate

func (o OpenShiftLogsOptions) Validate() error

Validate runs the upstream validation for the logs command and then it will validate any OpenShift-specific log options.

type ProjectOptions

type ProjectOptions struct {
	Config       clientcmdapi.Config
	ClientConfig *restclient.Config
	ClientFn     func() (projectclient.ProjectInterface, kclientset.Interface, error)
	PathOptions  *kclientcmd.PathOptions

	ProjectName  string
	ProjectOnly  bool
	DisplayShort bool

	// SkipAccessValidation means that if a specific name is requested, don't bother checking for access to the project
	SkipAccessValidation bool

	genericclioptions.IOStreams
}

func NewProjectOptions

func NewProjectOptions(streams genericclioptions.IOStreams) *ProjectOptions

func (*ProjectOptions) Complete

func (*ProjectOptions) GetContextFromName

func (o *ProjectOptions) GetContextFromName(contextName string) (*clientcmdapi.Context, bool)

returns a context by the given contextName and a boolean true if the context exists

func (ProjectOptions) RunProject

func (o ProjectOptions) RunProject() error

RunProject contains all the necessary functionality for the OpenShift cli project command

func (ProjectOptions) Validate

func (o ProjectOptions) Validate() error

type ProjectsOptions

type ProjectsOptions struct {
	Config       clientcmdapi.Config
	ClientConfig *restclient.Config
	Client       projectclient.ProjectInterface
	KubeClient   kclientset.Interface
	PathOptions  *kclientcmd.PathOptions

	// internal strings
	CommandName string

	DisplayShort bool

	genericclioptions.IOStreams
}

func NewProjectsOptions

func NewProjectsOptions(name string, streams genericclioptions.IOStreams) *ProjectsOptions

func (*ProjectsOptions) Complete

func (o *ProjectsOptions) Complete(f kcmdutil.Factory, cmd *cobra.Command, args []string) error

func (ProjectsOptions) RunProjects

func (o ProjectsOptions) RunProjects() error

RunProjects lists all projects a user belongs to

func (*ProjectsOptions) Validate

func (o *ProjectsOptions) Validate(args []string) error

type RequestProjectOptions

type RequestProjectOptions struct {
	ProjectName string
	DisplayName string
	Description string

	Name   string
	Server string

	SkipConfigWrite bool

	Client projectclient.ProjectInterface

	ProjectOptions *ProjectOptions
	genericclioptions.IOStreams
}

RequestProjectOptions contains all the options for running the RequestProject cli command.

func NewRequestProjectOptions

func NewRequestProjectOptions(baseName string, streams genericclioptions.IOStreams) *RequestProjectOptions

func (*RequestProjectOptions) Complete

func (o *RequestProjectOptions) Complete(f kcmdutil.Factory, cmd *cobra.Command, args []string) error

Complete completes all the required options.

func (*RequestProjectOptions) Run

func (o *RequestProjectOptions) Run() error

Run implements all the necessary functionality for RequestProject.

type RollbackOptions

type RollbackOptions struct {
	Namespace              string
	TargetName             string
	DesiredVersion         int64
	Format                 string
	Template               string
	DryRun                 bool
	IncludeTriggers        bool
	IncludeStrategy        bool
	IncludeScalingSettings bool
	// contains filtered or unexported fields
}

RollbackOptions contains all the necessary state to perform a rollback.

func (*RollbackOptions) Complete

func (o *RollbackOptions) Complete(f kcmdutil.Factory, cmd *cobra.Command, args []string, out io.Writer) error

Complete turns a partially defined RollbackActions into a solvent structure which can be validated and used for a rollback.

func (*RollbackOptions) Run

func (o *RollbackOptions) Run() error

Run performs a rollback.

func (*RollbackOptions) Validate

func (o *RollbackOptions) Validate() error

Validate ensures that a RollbackOptions is valid and can be used to execute a rollback.

type RshOptions

type RshOptions struct {
	ForceTTY   bool
	DisableTTY bool
	Executable string
	Timeout    int
	*kubecmd.ExecOptions
}

RshOptions declare the arguments accepted by the Rsh command

func NewRshOptions

func NewRshOptions(parent string, streams genericclioptions.IOStreams) *RshOptions

func (*RshOptions) Complete

func (o *RshOptions) Complete(f kcmdutil.Factory, cmd *cobra.Command, args []string) error

Complete applies the command environment to RshOptions

func (*RshOptions) Run

func (o *RshOptions) Run() error

Run starts a remote shell session on the server

func (*RshOptions) Validate

func (o *RshOptions) Validate() error

Validate ensures that RshOptions are valid

type SortByProjectName

type SortByProjectName []projectapi.Project

SortByProjectName is sort

func (SortByProjectName) Len

func (p SortByProjectName) Len() int

func (SortByProjectName) Less

func (p SortByProjectName) Less(i, j int) bool

func (SortByProjectName) Swap

func (p SortByProjectName) Swap(i, j int)

type StartBuildOptions

type StartBuildOptions struct {
	In          io.Reader
	Out, ErrOut io.Writer
	Git         git.Repository

	FromBuild    string
	FromWebhook  string
	ListWebhooks string

	Commit      string
	FromFile    string
	FromDir     string
	FromRepo    string
	FromArchive string

	Env  []string
	Args []string

	Follow              bool
	WaitForComplete     bool
	IncrementalOverride bool
	Incremental         bool
	NoCacheOverride     bool
	NoCache             bool
	LogLevel            string

	GitRepository  string
	GitPostReceive string

	Mapper         meta.RESTMapper
	BuildClient    buildclient.BuildInterface
	BuildLogClient buildclientinternalmanual.BuildLogInterface
	ClientConfig   *restclient.Config

	AsBinary    bool
	ShortOutput bool
	EnvVar      []kapi.EnvVar
	BuildArgs   []kapi.EnvVar
	Name        string
	Namespace   string
}

func (*StartBuildOptions) Complete

func (o *StartBuildOptions) Complete(f kcmdutil.Factory, cmd *cobra.Command, cmdFullName string, args []string) error

func (*StartBuildOptions) Run

func (o *StartBuildOptions) Run() error

Run contains all the necessary functionality for the OpenShift cli start-build command

func (*StartBuildOptions) RunListBuildWebHooks

func (o *StartBuildOptions) RunListBuildWebHooks() error

RunListBuildWebHooks prints the webhooks for the provided build config.

func (*StartBuildOptions) RunStartBuildWebHook

func (o *StartBuildOptions) RunStartBuildWebHook() error

RunStartBuildWebHook tries to trigger the provided webhook. It will attempt to utilize the current client configuration if the webhook has the same URL.

func (*StartBuildOptions) Validate

func (o *StartBuildOptions) Validate() error

Validate returns validation errors regarding start-build

type StatusOptions

type StatusOptions struct {
	// contains filtered or unexported fields
}

StatusOptions contains all the necessary options for the Openshift cli status command.

func (*StatusOptions) Complete

func (o *StatusOptions) Complete(f kcmdutil.Factory, cmd *cobra.Command, baseCLIName string, args []string, out io.Writer) error

Complete completes the options for the Openshift cli status command.

func (StatusOptions) RunStatus

func (o StatusOptions) RunStatus() error

RunStatus contains all the necessary functionality for the OpenShift cli status command.

func (StatusOptions) Validate

func (o StatusOptions) Validate() error

Validate validates the options for the Openshift cli status command.

type TYPEOptions

type TYPEOptions struct {
	PrintFlags *genericclioptions.PrintFlags

	Printer printers.ResourcePrinter
	DryRun  bool

	genericclioptions.IOStreams
}

func NewTYPEOptions

func NewTYPEOptions(streams genericclioptions.IOStreams) *TYPEOptions

NewTYPEOptions returns a TYPEOptions with proper defaults. This is an example type for templating.

func (*TYPEOptions) Complete

func (o *TYPEOptions) Complete(f kcmdutil.Factory, cmd *cobra.Command, args []string) error

func (*TYPEOptions) Run

func (o *TYPEOptions) Run() error

func (*TYPEOptions) Validate

func (o *TYPEOptions) Validate() error

type TagOptions

type TagOptions struct {
	// contains filtered or unexported fields
}

TagOptions contains all the necessary options for the cli tag command.

func (*TagOptions) Complete

func (o *TagOptions) Complete(f kcmdutil.Factory, cmd *cobra.Command, args []string, out io.Writer) error

Complete completes all the required options for the tag command.

func (TagOptions) Run

func (o TagOptions) Run() error

Run contains all the necessary functionality for the OpenShift cli tag command.

func (TagOptions) Validate

func (o TagOptions) Validate() error

Validate validates all the required options for the tag command.

type VersionOptions

type VersionOptions struct {
	BaseName string
	Out      io.Writer

	ClientConfig *rest.Config
	Clients      func() (kclientset.Interface, error)

	Timeout time.Duration

	IsServer            bool
	PrintEtcdVersion    bool
	PrintClientFeatures bool
}

func (*VersionOptions) Complete

func (o *VersionOptions) Complete(cmd *cobra.Command, f kcmdutil.Factory, out io.Writer) error

func (VersionOptions) RunVersion

func (o VersionOptions) RunVersion() error

RunVersion attempts to display client and server versions for Kubernetes and OpenShift

type WhoAmIOptions

type WhoAmIOptions struct {
	UserInterface userclient.UserResourceInterface

	Out io.Writer
}

func (WhoAmIOptions) WhoAmI

func (o WhoAmIOptions) WhoAmI() (*userapi.User, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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