Documentation ¶
Index ¶
- Constants
- func CheckUnsupportedChars(s string) error
- func CheckUnsupportedCharsDatastore(s string) error
- func LogErrorIfAny(op trace.Operation, clic *cli.Context, err error) error
- func NewOperation(clic *cli.Context, debug *int) trace.Operation
- type CNetworks
- type CertFactory
- type Compute
- type ContainerConfig
- type ContainerNetworks
- type DNS
- type Debug
- type Images
- type Networks
- type OpsCredentials
- type Proxies
- type Registries
- type ResourceLimits
- type Target
- type VCHID
- type VolumeStores
Constants ¶
const ( ApplianceImageKey = "core" LinuxImageKey = "linux" ApplianceImageName = "appliance.iso" LinuxImageName = "bootstrap.iso" // An ISO 9660 sector is normally 2 KiB long. Although the specification allows for alternative sector sizes, you will rarely find anything other than 2 KiB. ISO9660SectorSize = 2048 ISOVolumeSector = 0x10 PublisherOffset = 318 )
const ( // scheme string for nfs volume store targets NfsScheme = "nfs" // scheme string for ds volume store targets DsScheme = "ds" // scheme string for volume store targets without a scheme EmptyScheme = "" )
Variables ¶
This section is empty.
Functions ¶
func CheckUnsupportedChars ¶
CheckUnsupportedChars returns an error if string contains special characters
func CheckUnsupportedCharsDatastore ¶
CheckUnsupportedCharsDatastore returns an error if a datastore string contains special characters
func NewOperation ¶
Types ¶
type CNetworks ¶
type CNetworks struct { ContainerNetworks cli.StringSlice `arg:"container-network"` ContainerNetworksGateway cli.StringSlice `arg:"container-network-gateway"` ContainerNetworksIPRanges cli.StringSlice `arg:"container-network-ip-range"` ContainerNetworksDNS cli.StringSlice `arg:"container-network-dns"` ContainerNetworksFirewall cli.StringSlice `arg:"container-network-firewall"` IsSet bool }
CNetworks holds user input from container network flags
func (*CNetworks) CNetworkFlags ¶
func (*CNetworks) ProcessContainerNetworks ¶
func (c *CNetworks) ProcessContainerNetworks(op trace.Operation) (ContainerNetworks, error)
ProcessContainerNetworks parses container network settings and returns a struct containing all processed container network fields on success.
type CertFactory ¶
type CertFactory struct { Networks CertPath string DisplayName string Scert string Skey string Ccert string Ckey string Cacert string Cakey string ClientCert *tls.Certificate ClientCAsArg cli.StringSlice `arg:"tls-ca"` ClientCAs []byte EnvFile string Cname string Org cli.StringSlice KeySize int NoTLS bool NoTLSverify bool KeyPEM []byte CertPEM []byte NoSaveToDisk bool }
CertFactory has all input parameters for vic-machine certificate commands needed to create a certificate
func (*CertFactory) CertFlags ¶
func (c *CertFactory) CertFlags() []cli.Flag
func (*CertFactory) ProcessCertificates ¶
type Compute ¶
type Compute struct { ComputeResourcePath string `cmd:"compute-resource"` DisplayName string `cmd:"name"` UseVMGroup bool `cmd:"affinity-vm-group"` CreateVMGroup bool DeleteVMGroup bool }
func (*Compute) AffinityFlags ¶ added in v1.4.1
func (*Compute) ComputeFlags ¶
func (c *Compute) ComputeFlags() []cli.Flag
func (*Compute) ComputeFlagsNoName ¶
func (c *Compute) ComputeFlagsNoName() []cli.Flag
type ContainerConfig ¶
type ContainerConfig struct { // NameConvention ContainerNameConvention string `cmd:"container-name-convention"` }
func (*ContainerConfig) ContainerFlags ¶
func (c *ContainerConfig) ContainerFlags() []cli.Flag
type ContainerNetworks ¶
type ContainerNetworks struct { MappedNetworks map[string]string `cmd:"parent" label:"key-value"` MappedNetworksGateways map[string]net.IPNet `cmd:"gateway" label:"key-value"` MappedNetworksIPRanges map[string][]ip.Range `cmd:"ip-range" label:"key-value"` MappedNetworksDNS map[string][]net.IP `cmd:"dns" label:"key-value"` MappedNetworksFirewalls map[string]executor.TrustLevel `cmd:"firewall" label:"key-value"` }
ContainerNetworks holds container network data after processing
func (*ContainerNetworks) IsSet ¶
func (c *ContainerNetworks) IsSet() bool
type Images ¶
func (*Images) CheckImagesFiles ¶
func (*Images) GetImageVersion ¶
GetImageVersion will read iso file version from Primary Volume Descriptor, field "Publisher Identifier"
func (*Images) ImageFlags ¶
type OpsCredentials ¶
type OpsCredentials struct { OpsUser *string `cmd:"ops-user"` OpsPassword *string GrantPerms *bool IsSet bool }
OpsCredentials holds credentials for the VCH operations user
func (*OpsCredentials) Flags ¶
func (o *OpsCredentials) Flags(hidden bool) []cli.Flag
func (*OpsCredentials) ProcessOpsCredentials ¶
func (o *OpsCredentials) ProcessOpsCredentials(op trace.Operation, isCreateOp bool, adminUser string, adminPassword *string) error
ProcessOpsCredentials processes fields for the VCH operations user. When invoked during a VCH create operation, adminUser and adminPassword must be supplied to be used as ops credentials if they are not specified by the user. For a configure operation, adminUser and adminPassword are not needed.
type Registries ¶
type Registries struct { RegistryCAsArg cli.StringSlice `arg:"registry-ca"` InsecureRegistriesArg cli.StringSlice `arg:"insecure-registry"` WhitelistRegistriesArg cli.StringSlice `arg:"whitelist-registry"` RegistryCAs []byte InsecureRegistries []string `cmd:"insecure-registry"` WhitelistRegistries []string `cmd:"whitelist-registry"` }
Registries contains metadata used to create/configure registry CA data
func (*Registries) Flags ¶
func (r *Registries) Flags() []cli.Flag
Flags generates command line flags
func (*Registries) ProcessRegistries ¶
func (r *Registries) ProcessRegistries(op trace.Operation) error
type ResourceLimits ¶
type ResourceLimits struct { VCHCPULimitsMHz *int `cmd:"cpu"` VCHCPUReservationsMHz *int `cmd:"cpu-reservation"` VCHMemoryLimitsMB *int `cmd:"memory"` VCHMemoryReservationsMB *int `cmd:"memory-reservation"` IsSet bool }
func (*ResourceLimits) VCHCPULimitFlags ¶
func (r *ResourceLimits) VCHCPULimitFlags(hidden bool) []cli.Flag
func (*ResourceLimits) VCHMemoryLimitFlags ¶
func (r *ResourceLimits) VCHMemoryLimitFlags(hidden bool) []cli.Flag
type Target ¶
type Target struct { URL *url.URL `cmd:"target"` User string Password *string CloneTicket string Thumbprint string `cmd:"thumbprint"` }
func (*Target) HasCredentials ¶
HasCredentials check that the credentials have been supplied by any of the permitted mechanisms
func (*Target) TargetFlags ¶
func (t *Target) TargetFlags() []cli.Flag
type VolumeStores ¶
type VolumeStores struct {
VolumeStores cli.StringSlice `arg:"volume-store"`
}
func (*VolumeStores) Flags ¶
func (v *VolumeStores) Flags() []cli.Flag
func (*VolumeStores) ProcessVolumeStores ¶
func (v *VolumeStores) ProcessVolumeStores() (map[string]*url.URL, error)