Documentation ¶
Index ¶
- Constants
- func NewDriver(hostName, storePath string) drivers.Driver
- type Client
- type Driver
- func (d *Driver) Create() error
- func (d *Driver) DriverName() string
- func (d *Driver) GetCreateFlags() []mcnflag.Flag
- func (d *Driver) GetIP() (string, error)
- func (d *Driver) GetSSHHostname() (string, error)
- func (d *Driver) GetState() (state.State, error)
- func (d *Driver) GetURL() (string, error)
- func (d *Driver) Kill() error
- func (d *Driver) Remove() error
- func (d *Driver) Restart() error
- func (d *Driver) SetClient(client Client)
- func (d *Driver) SetConfigFromFlags(flags drivers.DriverOptions) error
- func (d *Driver) Start() error
- func (d *Driver) Stop() error
- func (d *Driver) UnmarshalJSON(data []byte) error
- type FloatingIP
- type GenericClient
- func (c *GenericClient) AssignFloatingIP(d *Driver, floatingIP *FloatingIP) error
- func (c *GenericClient) Authenticate(d *Driver) error
- func (c *GenericClient) CreateInstance(d *Driver) (string, error)
- func (c *GenericClient) CreateKeyPair(d *Driver, name string, publicKey string) error
- func (c *GenericClient) DeleteFloatingIP(d *Driver, floatingIP *FloatingIP) error
- func (c *GenericClient) DeleteInstance(d *Driver) error
- func (c *GenericClient) DeleteKeyPair(d *Driver, name string) error
- func (c *GenericClient) GetFlavorID(d *Driver) (string, error)
- func (c *GenericClient) GetFloatingIP(d *Driver, ip string) (*FloatingIP, error)
- func (c *GenericClient) GetFloatingIPPoolID(d *Driver) (string, error)
- func (c *GenericClient) GetFloatingIPs(d *Driver) ([]FloatingIP, error)
- func (c *GenericClient) GetImageID(d *Driver) (string, error)
- func (c *GenericClient) GetInstanceIPAddresses(d *Driver) ([]IPAddress, error)
- func (c *GenericClient) GetInstancePortID(d *Driver) (string, error)
- func (c *GenericClient) GetInstanceState(d *Driver) (string, error)
- func (c *GenericClient) GetNetworkID(d *Driver) (string, error)
- func (c *GenericClient) GetPublicKey(keyPairName string) ([]byte, error)
- func (c *GenericClient) GetServerDetail(d *Driver) (*servers.Server, error)
- func (c *GenericClient) InitBlockStorageClient(d *Driver) error
- func (c *GenericClient) InitComputeClient(d *Driver) error
- func (c *GenericClient) InitNetworkClient(d *Driver) error
- func (c *GenericClient) RestartInstance(d *Driver) error
- func (c *GenericClient) SetTLSConfig(d *Driver) error
- func (c *GenericClient) StartInstance(d *Driver) error
- func (c *GenericClient) StopInstance(d *Driver) error
- func (c *GenericClient) VolumeAttach(d *Driver) (string, error)
- func (c *GenericClient) VolumeCreate(d *Driver) (string, error)
- func (c *GenericClient) WaitForInstanceStatus(d *Driver, status string) error
- func (c *GenericClient) WaitForVolumeStatus(d *Driver, status string) error
- type IPAddress
Constants ¶
View Source
const ( Floating string = "floating" Fixed string = "fixed" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client interface { Authenticate(d *Driver) error InitComputeClient(d *Driver) error InitNetworkClient(d *Driver) error InitBlockStorageClient(d *Driver) error CreateInstance(d *Driver) (string, error) GetInstanceState(d *Driver) (string, error) StartInstance(d *Driver) error StopInstance(d *Driver) error RestartInstance(d *Driver) error DeleteInstance(d *Driver) error WaitForInstanceStatus(d *Driver, status string) error GetInstanceIPAddresses(d *Driver) ([]IPAddress, error) GetPublicKey(keyPairName string) ([]byte, error) CreateKeyPair(d *Driver, name string, publicKey string) error DeleteKeyPair(d *Driver, name string) error GetNetworkID(d *Driver) (string, error) GetFlavorID(d *Driver) (string, error) GetImageID(d *Driver) (string, error) AssignFloatingIP(d *Driver, floatingIP *FloatingIP) error DeleteFloatingIP(d *Driver, floatingIP *FloatingIP) error GetFloatingIPs(d *Driver) ([]FloatingIP, error) GetFloatingIP(d *Driver, ip string) (*FloatingIP, error) GetFloatingIPPoolID(d *Driver) (string, error) GetInstancePortID(d *Driver) (string, error) VolumeCreate(d *Driver) (string, error) WaitForVolumeStatus(d *Driver, status string) error VolumeAttach(d *Driver) (string, error) }
type Driver ¶
type Driver struct { *drivers.BaseDriver AuthUrl string ActiveTimeout int Insecure bool CaCert string DomainId string DomainName string UserId string Username string Password string TenantName string TenantId string TenantDomainName string TenantDomainId string UserDomainName string UserDomainId string ApplicationCredentialId string ApplicationCredentialName string ApplicationCredentialSecret string Region string AvailabilityZone string EndpointType string MachineId string FlavorName string FlavorId string ImageName string ImageId string KeyPairName string NetworkName string NetworkId string UserData []byte PrivateKeyFile string SecurityGroups []string FloatingIpPool string ComputeNetwork bool FloatingIpPoolId string IpVersion int ConfigDrive bool BootFromVolume bool VolumeName string VolumeDevicePath string VolumeId string VolumeType string VolumeSize int // ExistingKey keeps track of whether the key was created by us or we used an existing one. If an existing one was used, we shouldn't delete it when the machine is deleted. ExistingKey bool // contains filtered or unexported fields }
func NewDerivedDriver ¶
func (*Driver) DriverName ¶
DriverName returns the name of the driver
func (*Driver) GetCreateFlags ¶ added in v0.5.0
func (*Driver) GetSSHHostname ¶ added in v0.2.0
func (*Driver) SetConfigFromFlags ¶
func (d *Driver) SetConfigFromFlags(flags drivers.DriverOptions) error
func (*Driver) UnmarshalJSON ¶
UnmarshalJSON loads driver config from JSON. This function is used by the RPCServerDriver that wraps all drivers as a means of populating an already-initialized driver with new configuration. See `RPCServerDriver.SetConfigRaw`.
type FloatingIP ¶ added in v0.5.1
type GenericClient ¶
type GenericClient struct { Provider *gophercloud.ProviderClient Compute *gophercloud.ServiceClient Network *gophercloud.ServiceClient BlockStorage *gophercloud.ServiceClient }
func (*GenericClient) AssignFloatingIP ¶
func (c *GenericClient) AssignFloatingIP(d *Driver, floatingIP *FloatingIP) error
func (*GenericClient) Authenticate ¶
func (c *GenericClient) Authenticate(d *Driver) error
func (*GenericClient) CreateInstance ¶
func (c *GenericClient) CreateInstance(d *Driver) (string, error)
func (*GenericClient) CreateKeyPair ¶
func (c *GenericClient) CreateKeyPair(d *Driver, name string, publicKey string) error
func (*GenericClient) DeleteFloatingIP ¶
func (c *GenericClient) DeleteFloatingIP(d *Driver, floatingIP *FloatingIP) error
func (*GenericClient) DeleteInstance ¶
func (c *GenericClient) DeleteInstance(d *Driver) error
func (*GenericClient) DeleteKeyPair ¶
func (c *GenericClient) DeleteKeyPair(d *Driver, name string) error
func (*GenericClient) GetFlavorID ¶ added in v0.5.1
func (c *GenericClient) GetFlavorID(d *Driver) (string, error)
func (*GenericClient) GetFloatingIP ¶
func (c *GenericClient) GetFloatingIP(d *Driver, ip string) (*FloatingIP, error)
func (*GenericClient) GetFloatingIPPoolID ¶ added in v0.5.1
func (c *GenericClient) GetFloatingIPPoolID(d *Driver) (string, error)
func (*GenericClient) GetFloatingIPs ¶
func (c *GenericClient) GetFloatingIPs(d *Driver) ([]FloatingIP, error)
func (*GenericClient) GetImageID ¶ added in v0.5.1
func (c *GenericClient) GetImageID(d *Driver) (string, error)
func (*GenericClient) GetInstanceIPAddresses ¶ added in v0.5.1
func (c *GenericClient) GetInstanceIPAddresses(d *Driver) ([]IPAddress, error)
func (*GenericClient) GetInstancePortID ¶ added in v0.5.1
func (c *GenericClient) GetInstancePortID(d *Driver) (string, error)
func (*GenericClient) GetInstanceState ¶
func (c *GenericClient) GetInstanceState(d *Driver) (string, error)
func (*GenericClient) GetNetworkID ¶ added in v0.5.1
func (c *GenericClient) GetNetworkID(d *Driver) (string, error)
func (*GenericClient) GetPublicKey ¶ added in v0.5.6
func (c *GenericClient) GetPublicKey(keyPairName string) ([]byte, error)
func (*GenericClient) GetServerDetail ¶
func (c *GenericClient) GetServerDetail(d *Driver) (*servers.Server, error)
func (*GenericClient) InitBlockStorageClient ¶
func (c *GenericClient) InitBlockStorageClient(d *Driver) error
func (*GenericClient) InitComputeClient ¶
func (c *GenericClient) InitComputeClient(d *Driver) error
func (*GenericClient) InitNetworkClient ¶
func (c *GenericClient) InitNetworkClient(d *Driver) error
func (*GenericClient) RestartInstance ¶
func (c *GenericClient) RestartInstance(d *Driver) error
func (*GenericClient) SetTLSConfig ¶ added in v0.9.0
func (c *GenericClient) SetTLSConfig(d *Driver) error
func (*GenericClient) StartInstance ¶
func (c *GenericClient) StartInstance(d *Driver) error
func (*GenericClient) StopInstance ¶
func (c *GenericClient) StopInstance(d *Driver) error
func (*GenericClient) VolumeAttach ¶
func (c *GenericClient) VolumeAttach(d *Driver) (string, error)
func (*GenericClient) VolumeCreate ¶
func (c *GenericClient) VolumeCreate(d *Driver) (string, error)
func (*GenericClient) WaitForInstanceStatus ¶
func (c *GenericClient) WaitForInstanceStatus(d *Driver, status string) error
func (*GenericClient) WaitForVolumeStatus ¶
func (c *GenericClient) WaitForVolumeStatus(d *Driver, status string) error
Click to show internal directories.
Click to hide internal directories.