Documentation ¶
Index ¶
- Constants
- func ValidateOpsManConfig(config *OpsmanConfigFilePayload) error
- type AWSConfig
- type AWSCredential
- type AWSInstanceProfile
- type AWSVMManager
- type AzureConfig
- type AzureCredential
- type AzureNetworkProfile
- type AzureOSDisk
- type AzureStorageProfile
- type AzureVMInfo
- type AzureVMManager
- type CreateVMService
- type DeleteVMService
- type GCPConfig
- type GCPCredential
- type GCPVMManager
- type ID
- type OpenstackConfig
- type OpenstackCredential
- type OpenstackVMManager
- type OpsmanConfig
- type OpsmanConfigFilePayload
- type StateInfo
- type Status
- type VHD
- type Vcenter
- type VcenterCredential
- type VsphereConfig
- type VsphereVMManager
Constants ¶
View Source
const DefaultCPU = "1"
View Source
const DefaultDiskSize = "160"
View Source
const DefaultMemory = "8"
Variables ¶
This section is empty.
Functions ¶
func ValidateOpsManConfig ¶
func ValidateOpsManConfig(config *OpsmanConfigFilePayload) error
Types ¶
type AWSConfig ¶
type AWSConfig struct { AWSCredential `yaml:",inline"` VPCSubnetId string `yaml:"vpc_subnet_id" validate:"required"` SecurityGroupIdDEPRECATED string `yaml:"security_group_id,omitempty"` SecurityGroupIds []string `yaml:"security_group_ids"` KeyPairName string `yaml:"key_pair_name" validate:"required"` IAMInstanceProfileName string `yaml:"iam_instance_profile_name" validate:"required"` PublicIP string `yaml:"public_ip" validate:"omitempty,ip"` PrivateIP string `yaml:"private_ip" validate:"omitempty,ip"` VMName string `yaml:"vm_name"` BootDiskSize string `yaml:"boot_disk_size"` InstanceType string `yaml:"instance_type"` Tags map[string]string `yaml:"tags"` AuthenticationType string `yaml:"authentication_type"` }
func (*AWSConfig) ValidateConfig ¶
type AWSCredential ¶
type AWSCredential struct { AWSInstanceProfile `yaml:",inline"` AccessKeyId string `yaml:"access_key_id,omitempty"` SecretAccessKey string `yaml:"secret_access_key,omitempty"` Region string `yaml:"region" validate:"required"` }
type AWSInstanceProfile ¶
type AWSVMManager ¶
type AWSVMManager struct { Config *OpsmanConfigFilePayload ImageYaml string State StateInfo // contains filtered or unexported fields }
func NewAWSVMManager ¶
func NewAWSVMManager(stdout, stderr io.Writer, config *OpsmanConfigFilePayload, imageYaml string, stateInfo StateInfo, awsRunner awsRunner, t time.Duration) *AWSVMManager
func (*AWSVMManager) AddEnvVars ¶
func (a *AWSVMManager) AddEnvVars() []string
func (*AWSVMManager) DeleteVM ¶
func (a *AWSVMManager) DeleteVM() error
func (*AWSVMManager) ExecuteWithInstanceProfile ¶
type AzureConfig ¶
type AzureConfig struct { AzureCredential `yaml:",inline"` CloudName string `yaml:"cloud_name"` Container string `yaml:"container"` VPCSubnetDEPRECATED string `yaml:"vpc_subnet,omitempty"` SubnetID string `yaml:"subnet_id" validate:"required"` NSG string `yaml:"network_security_group"` VMName string `yaml:"vm_name"` SSHPublicKey string `yaml:"ssh_public_key" validate:"required"` BootDiskSize string `yaml:"boot_disk_size"` PrivateIP string `yaml:"private_ip" validate:"omitempty,ip"` PublicIP string `yaml:"public_ip" validate:"omitempty,ip" ` UseUnmanagedDiskDEPRECATED string `yaml:"use_unmanaged_disk,omitempty"` UseManagedDisk string `yaml:"use_managed_disk"` StorageSKU string `yaml:"storage_sku,omitempty"` VMSize string `yaml:"vm_size"` Tags string `yaml:"tags"` }
type AzureCredential ¶
type AzureCredential struct { TenantID string `yaml:"tenant_id" validate:"required"` SubscriptionID string `yaml:"subscription_id" validate:"required"` ClientID string `yaml:"client_id" validate:"required"` ClientSecret string `yaml:"client_secret" validate:"required"` Location string `yaml:"location" validate:"required"` ResourceGroup string `yaml:"resource_group" validate:"required"` StorageAccount string `yaml:"storage_account" validate:"required"` StorageKey string `yaml:"storage_key"` }
type AzureNetworkProfile ¶
type AzureNetworkProfile struct {
NetworkInterfaces []ID `json:"networkInterfaces"`
}
type AzureOSDisk ¶
type AzureStorageProfile ¶
type AzureStorageProfile struct { ImageReference ID `json:"imageReference"` OSDisk AzureOSDisk `json:"osDisk"` }
type AzureVMInfo ¶
type AzureVMInfo struct { NetworkProfile AzureNetworkProfile `json:"networkProfile"` StorageProfile AzureStorageProfile `json:"storageProfile"` }
type AzureVMManager ¶
type AzureVMManager struct { Config *OpsmanConfigFilePayload ImageYaml string State StateInfo // contains filtered or unexported fields }
func NewAzureVMManager ¶
func NewAzureVMManager(stdout, stderr io.Writer, config *OpsmanConfigFilePayload, imageYaml string, state StateInfo, azureRunner azureRunner, t time.Duration) *AzureVMManager
func (*AzureVMManager) DeleteVM ¶
func (a *AzureVMManager) DeleteVM() error
type CreateVMService ¶
func NewCreateVMManager ¶
func NewCreateVMManager(config *OpsmanConfigFilePayload, image string, state StateInfo, outWriter, errWriter io.Writer) (CreateVMService, error)
type DeleteVMService ¶
type DeleteVMService interface {
DeleteVM() error
}
func NewDeleteVMManager ¶
func NewDeleteVMManager(config *OpsmanConfigFilePayload, image string, state StateInfo, outWriter, errWriter io.Writer) (DeleteVMService, error)
type GCPConfig ¶
type GCPConfig struct { GCPCredential `yaml:",inline"` VpcSubnet string `yaml:"vpc_subnet" validate:"required"` PublicIP string `yaml:"public_ip,omitempty" validate:"omitempty,ip"` PrivateIP string `yaml:"private_ip" validate:"omitempty,ip"` VMName string `yaml:"vm_name"` Tags string `yaml:"tags,omitempty"` CPU string `yaml:"custom_cpu"` Memory string `yaml:"custom_memory"` BootDiskSize string `yaml:"boot_disk_size"` Scopes []string `yaml:"scopes,omitempty"` SSHPublicKey string `yaml:"ssh_public_key"` Hostname string `yaml:"hostname"` }
type GCPCredential ¶
type GCPCredential struct { ServiceAccount string `yaml:"gcp_service_account,omitempty"` ServiceAccountName string `yaml:"gcp_service_account_name,omitempty"` Project string `yaml:"project" validate:"required"` Region string `yaml:"region" validate:"required"` Zone string `yaml:"zone" validate:"required"` }
type GCPVMManager ¶
type GCPVMManager struct { Config *OpsmanConfigFilePayload ImageYaml string State StateInfo // contains filtered or unexported fields }
func NewGcpVMManager ¶
func NewGcpVMManager(config *OpsmanConfigFilePayload, imageYaml string, state StateInfo, gcloudRunner gcloudRunner) *GCPVMManager
func (*GCPVMManager) DeleteVM ¶
func (g *GCPVMManager) DeleteVM() error
type OpenstackConfig ¶
type OpenstackConfig struct { OpenstackCredential `yaml:",inline"` PublicIP string `yaml:"public_ip" validate:"omitempty,ip"` PrivateIP string `yaml:"private_ip" validate:"omitempty,ip"` VMName string `yaml:"vm_name"` Flavor string `yaml:"flavor"` NetID string `yaml:"net_id" validate:"required"` SecurityGroup string `yaml:"security_group_name" validate:"required"` KeyName string `yaml:"key_pair_name" validate:"required"` AvailabilityZone string `yaml:"availability_zone"` }
type OpenstackCredential ¶
type OpenstackCredential struct { Username string `yaml:"username" validate:"required"` Password string `yaml:"password" validate:"required"` AuthUrl string `yaml:"auth_url" validate:"required"` Project string `yaml:"project_name" validate:"required"` ProjectDomainName string `yaml:"project_domain_name"` UserDomainName string `yaml:"user_domain_name"` Insecure bool `yaml:"insecure"` IdentityAPIVersion int `yaml:"identity_api_version"` }
type OpenstackVMManager ¶
type OpenstackVMManager struct { Config *OpenstackConfig Image string State StateInfo // contains filtered or unexported fields }
func NewOpenstackVMManager ¶
func NewOpenstackVMManager(config *OpsmanConfigFilePayload, image string, state StateInfo, openstackRunner openstackRunner) *OpenstackVMManager
func (*OpenstackVMManager) CreateVM ¶
func (o *OpenstackVMManager) CreateVM() (Status, StateInfo, error)
func (*OpenstackVMManager) DeleteVM ¶
func (o *OpenstackVMManager) DeleteVM() error
type OpsmanConfig ¶
type OpsmanConfig struct { Vsphere *VsphereConfig `yaml:"vsphere,omitempty"` GCP *GCPConfig `yaml:"gcp,omitempty"` AWS *AWSConfig `yaml:"aws,omitempty"` Azure *AzureConfig `yaml:"azure,omitempty"` Openstack *OpenstackConfig `yaml:"openstack,omitempty"` Unknown map[string]interface{} `yaml:",inline"` }
type OpsmanConfigFilePayload ¶
type OpsmanConfigFilePayload struct { OpsmanConfig OpsmanConfig `yaml:"opsman-configuration"` Fields map[string]interface{} `yaml:",inline"` }
type Vcenter ¶
type Vcenter struct { VcenterCredential `yaml:",inline"` Datacenter string `yaml:"datacenter" validate:"required"` Datastore string `yaml:"datastore" validate:"required"` Insecure string `yaml:"insecure"` CACert string `yaml:"ca_cert,omitempty"` ResourcePool string `yaml:"resource_pool" validate:"required"` HostDEPRECATED string `yaml:"host,omitempty"` Folder string `yaml:"folder"` }
type VcenterCredential ¶
type VsphereConfig ¶
type VsphereConfig struct { Vcenter `yaml:"vcenter"` DiskType string `yaml:"disk_type" validate:"required"` PrivateIP string `yaml:"private_ip" validate:"required,ip"` DNS string `yaml:"dns" validate:"required"` NTP string `yaml:"ntp" validate:"required"` SSHPassword string `yaml:"ssh_password,omitempty"` SSHPublicKey string `yaml:"ssh_public_key"` Hostname string `yaml:"hostname" validate:"required"` Network string `yaml:"network" validate:"required"` Netmask string `yaml:"netmask" validate:"required"` Gateway string `yaml:"gateway" validate:"required"` VMName string `yaml:"vm_name"` DiskSize string `yaml:"disk_size"` Memory string `yaml:"memory"` CPU string `yaml:"cpu"` }
type VsphereVMManager ¶
type VsphereVMManager struct { ImageOVA string State StateInfo Config *OpsmanConfigFilePayload // contains filtered or unexported fields }
func NewVsphereVMManager ¶
func NewVsphereVMManager(config *OpsmanConfigFilePayload, imageFileName string, state StateInfo, govcRunner govcRunner) *VsphereVMManager
func (*VsphereVMManager) CreateVM ¶
func (v *VsphereVMManager) CreateVM() (Status, StateInfo, error)
func (*VsphereVMManager) DeleteVM ¶
func (v *VsphereVMManager) DeleteVM() error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.