Documentation ¶
Index ¶
- func NewOpenStackProviderConfiguration(fileName string) (providers.ProviderConfiguration, error)
- type Configuration
- type FloatingNetworkInfos
- type Network
- type NetworkInterface
- type OpenStackServer
- type SecurityGroup
- type ServerInstance
- func (wrapper ServerInstance) AttachInstance(instanceName string, controlPlane bool, nodeIndex int) (handler providers.ProviderHandler, err error)
- func (wrapper ServerInstance) ConfigurationDidLoad() (err error)
- func (instance *ServerInstance) Create(controlPlane bool, nodeGroup, flavorRef string, userData string, diskSize int) (err error)
- func (wrapper ServerInstance) CreateInstance(instanceName, instanceType string, controlPlane bool, nodeIndex int) (handler providers.ProviderHandler, err error)
- func (instance *ServerInstance) Delete() (err error)
- func (wrapper ServerInstance) GetAvailableGpuTypes() map[string]string
- func (wrapper ServerInstance) GetMode() bool
- func (wrapper ServerInstance) IDFromName(name string) (string, error)
- func (wrapper ServerInstance) InstanceExists(name string) (exists bool)
- func (instance *ServerInstance) PowerOff(ctx *context.Context) (err error)
- func (instance *ServerInstance) PowerOn(ctx *context.Context) (err error)
- func (wrapper ServerInstance) RetrieveNetworkInfos(vmuuid string, network *providers.Network) (err error)
- func (wrapper ServerInstance) SetMode(test bool)
- func (instance *ServerInstance) ShutdownGuest() (err error)
- func (instance *ServerInstance) Status() (status providers.InstanceStatus, err error)
- func (wrapper ServerInstance) UUID(name string) (vmuuid string, err error)
- func (instance *ServerInstance) WaitForIP(callback providers.CallbackWaitSSHReady) (address string, err error)
- func (instance *ServerInstance) WaitForPowered() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewOpenStackProviderConfiguration ¶
func NewOpenStackProviderConfiguration(fileName string) (providers.ProviderConfiguration, error)
Types ¶
type Configuration ¶
type Configuration struct { Cloud string `json:"cloud"` Image string `json:"image"` Timeout time.Duration `json:"timeout"` Network Network `json:"network"` AvailableGPUTypes map[string]string `json:"gpu-types"` KeyName string `json:"keyName"` OpenStackRegion string `default:"home" json:"region"` OpenStackZone string `default:"office" json:"zone"` UseBind9 bool `json:"use-bind9"` Bind9Host string `json:"bind9-host"` RndcKeyFile string `json:"rndc-key-file"` }
type FloatingNetworkInfos ¶
type Network ¶
type Network struct { Domain string `json:"domain,omitempty" yaml:"domain,omitempty"` Interfaces []*NetworkInterface `json:"interfaces,omitempty" yaml:"interfaces,omitempty"` DNS *cloudinit.NetworkResolv `json:"dns,omitempty" yaml:"dns,omitempty"` FloatingInfos *FloatingNetworkInfos `json:"floating-ip,omitempty"` SecurityGroup SecurityGroup `json:"security-group"` }
type NetworkInterface ¶
type NetworkInterface struct { Enabled *bool `json:"enabled,omitempty" yaml:"primary,omitempty"` Primary bool `json:"primary,omitempty" yaml:"primary,omitempty"` NetworkName string `json:"network,omitempty" yaml:"network,omitempty"` DHCP bool `json:"dhcp,omitempty" yaml:"dhcp,omitempty"` IPAddress string `json:"address,omitempty" yaml:"address,omitempty"` Netmask string `json:"netmask,omitempty" yaml:"netmask,omitempty"` }
type OpenStackServer ¶
type SecurityGroup ¶
type ServerInstance ¶
type ServerInstance struct { NodeIndex int InstanceName string PrivateDNSName string InstanceID string Region string Zone string AddressIP string // contains filtered or unexported fields }
func (ServerInstance) AttachInstance ¶
func (ServerInstance) ConfigurationDidLoad ¶
func (wrapper ServerInstance) ConfigurationDidLoad() (err error)
func (*ServerInstance) Create ¶
func (instance *ServerInstance) Create(controlPlane bool, nodeGroup, flavorRef string, userData string, diskSize int) (err error)
Create will create a named VM not powered memory and disk are in megabytes
func (ServerInstance) CreateInstance ¶
func (*ServerInstance) Delete ¶
func (instance *ServerInstance) Delete() (err error)
func (ServerInstance) GetAvailableGpuTypes ¶
func (ServerInstance) IDFromName ¶
This is duplicated from https://github.com/gophercloud/utils so that Gophercloud "core" doesn't have a dependency on the complementary utils repository.
func (ServerInstance) InstanceExists ¶
func (*ServerInstance) PowerOff ¶
func (instance *ServerInstance) PowerOff(ctx *context.Context) (err error)
func (*ServerInstance) PowerOn ¶
func (instance *ServerInstance) PowerOn(ctx *context.Context) (err error)
func (ServerInstance) RetrieveNetworkInfos ¶
func (*ServerInstance) ShutdownGuest ¶
func (instance *ServerInstance) ShutdownGuest() (err error)
func (*ServerInstance) Status ¶
func (instance *ServerInstance) Status() (status providers.InstanceStatus, err error)
func (*ServerInstance) WaitForIP ¶
func (instance *ServerInstance) WaitForIP(callback providers.CallbackWaitSSHReady) (address string, err error)
WaitForIP wait ip a VM by name
func (*ServerInstance) WaitForPowered ¶
func (instance *ServerInstance) WaitForPowered() error
WaitForPowered wait ip a VM by name
Click to show internal directories.
Click to hide internal directories.