Documentation ¶
Index ¶
- Constants
- Variables
- func CacheOc(openShiftVersion string) string
- func DoesVMExist(profileName string) bool
- func ExitIfNotRunning(driver drivers.Driver, machineName string)
- func ExitIfUndefined(client *libmachine.Client, machineName string)
- func GetBoolEnv(varName string) (bool, error)
- func GetNoProxyConfig(api libmachine.API) (string, string, error)
- func GetOcPathForProfile(profileName string) (error, string)
- func GetVMStatus(profileName string) string
- func IsHostRunning(driver drivers.Driver) bool
- func IsHostStopped(driver drivers.Driver) bool
- func IsValidProfile(profileName string) bool
- func IsValidProfileName(profileName string) bool
- func NewStringSliceValue(val []string, p *[]string) *stringSliceValue
- func NewStringValue(val string, p *string) *stringValue
- func RemoveCurrentContext() error
- func ReplaceEnv(variables []string, varName string, value string) []string
- func SetOcContext(profileName string) error
- func UnpackAddons(addonsDir string) error
- func VMExists(client *libmachine.Client, machineName string) bool
Constants ¶
View Source
const ( HttpProxy = "http-proxy" HttpsProxy = "https-proxy" AddOnEnv = "addon-env" )
Variables ¶
View Source
var ( BooleanFormatError = errors.New("Invalid format for boolean value.") BooleanNoValueError = errors.New("No value given.") )
View Source
var AddOnEnvFlag = &flag.Flag{ Name: AddOnEnv, Shorthand: "a", Usage: "Specify key-value pairs to be added to the add-on interpolation context.", Value: NewStringSliceValue([]string{}, &[]string{}), }
View Source
var (
DefaultAssets = []string{"anyuid", "admin-user", "xpaas", "registry-route"}
)
View Source
var HttpProxyFlag = &flag.Flag{ Name: HttpProxy, Shorthand: "", Usage: "HTTP proxy in the format http://<username>:<password>@<proxy_host>:<proxy_port>. Overrides potential HTTP_PROXY setting in the environment.", Value: NewStringValue("", new(string)), DefValue: "", }
View Source
var HttpsProxyFlag = &flag.Flag{ Name: HttpsProxy, Shorthand: "", Usage: "HTTPS proxy in the format https://<username>:<password>@<proxy_host>:<proxy_port>. Overrides potential HTTPS_PROXY setting in the environment.", Value: NewStringValue("", new(string)), DefValue: "", }
Functions ¶
func CacheOc ¶ added in v1.6.0
CacheOc ensures that the oc binary matching the requested OpenShift version is cached on the host
func DoesVMExist ¶ added in v1.10.0
func ExitIfNotRunning ¶
func ExitIfUndefined ¶
func ExitIfUndefined(client *libmachine.Client, machineName string)
func GetBoolEnv ¶ added in v1.4.0
GetBoolEnv returns truthy or falsy value of given environmental variable. It returns an error on failure with a default of false.
func GetNoProxyConfig ¶ added in v1.16.1
func GetNoProxyConfig(api libmachine.API) (string, string, error)
func GetOcPathForProfile ¶ added in v1.10.0
func GetVMStatus ¶ added in v1.6.0
func IsHostRunning ¶
func IsHostStopped ¶ added in v1.2.0
func IsValidProfile ¶ added in v1.6.0
IsValidProfile return true if a given profile exist
func IsValidProfileName ¶ added in v1.10.0
IsValidProfileName return true if profile name follow ^[a-zA-Z0-9]+[\w+-]*$
func NewStringSliceValue ¶ added in v1.4.0
func NewStringValue ¶ added in v1.4.0
func RemoveCurrentContext ¶ added in v1.10.0
func RemoveCurrentContext() error
RemoveCurrentContext removes the current context from `machinename_kubeconfig`
func ReplaceEnv ¶ added in v1.9.0
ReplaceEnv changes the value of an environment variable It drops the existing value and appends the new value in-place
func SetOcContext ¶ added in v1.6.0
func UnpackAddons ¶ added in v1.2.0
UnpackAddons will unpack the default addons into addons default dir
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.