Documentation ¶
Index ¶
- Constants
- func GetCreateFlags() []cli.Flag
- func NewDriver(machineName string, storePath string, caCert string, privateKey string) (drivers.Driver, error)
- type Client
- type Driver
- func (d *Driver) AuthorizePort(ports []*drivers.Port) error
- func (d *Driver) Create() error
- func (d *Driver) DeauthorizePort(ports []*drivers.Port) error
- func (d *Driver) DriverName() string
- func (d *Driver) GetIP() (string, error)
- func (d *Driver) GetMachineName() string
- func (d *Driver) GetProviderType() provider.ProviderType
- func (d *Driver) GetSSHHostname() (string, error)
- func (d *Driver) GetSSHKeyPath() string
- func (d *Driver) GetSSHPort() (int, error)
- func (d *Driver) GetSSHUsername() string
- func (d *Driver) GetState() (state.State, error)
- func (d *Driver) GetURL() (string, error)
- func (d *Driver) Kill() error
- func (d *Driver) PreCreateCheck() error
- func (d *Driver) Remove() error
- func (d *Driver) Restart() error
- func (d *Driver) SetConfigFromFlags(flags drivers.DriverOptions) error
- func (d *Driver) Start() error
- func (d *Driver) Stop() error
- type FloatingIp
- type GenericClient
- func (c *GenericClient) AssignFloatingIP(d *Driver, floatingIp *FloatingIp, portId string) 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) DeleteInstance(d *Driver) error
- func (c *GenericClient) DeleteKeyPair(d *Driver, name string) error
- func (c *GenericClient) GetFlavorId(d *Driver) (string, error)
- func (c *GenericClient) GetFloatingIPs(d *Driver) ([]FloatingIp, error)
- func (c *GenericClient) GetFloatingIpPoolId(d *Driver) (string, 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) GetServerDetail(d *Driver) (*servers.Server, 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) StartInstance(d *Driver) error
- func (c *GenericClient) StopInstance(d *Driver) error
- func (c *GenericClient) WaitForInstanceStatus(d *Driver, status string, timeout int) error
- type IpAddress
Constants ¶
View Source
const ( Floating string = "floating" Fixed string = "fixed" )
Variables ¶
This section is empty.
Functions ¶
func GetCreateFlags ¶
Types ¶
type Client ¶
type Client interface { Authenticate(d *Driver) error InitComputeClient(d *Driver) error InitNetworkClient(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, timeout int) error GetInstanceIpAddresses(d *Driver) ([]IpAddress, 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, portId string) error GetFloatingIPs(d *Driver) ([]FloatingIp, error) GetFloatingIpPoolId(d *Driver) (string, error) GetInstancePortId(d *Driver) (string, error) }
type Driver ¶
type Driver struct { AuthUrl string Insecure bool Username string Password string TenantName string TenantId string Region string EndpointType string MachineName string MachineId string FlavorName string FlavorId string ImageName string ImageId string KeyPairName string NetworkName string NetworkId string SecurityGroups []string FloatingIpPool string FloatingIpPoolId string SSHUser string SSHPort int Ip string CaCertPath string PrivateKeyPath string SwarmMaster bool SwarmHost string SwarmDiscovery string // contains filtered or unexported fields }
func NewDerivedDriver ¶
func (*Driver) AuthorizePort ¶ added in v0.2.0
func (*Driver) DeauthorizePort ¶ added in v0.2.0
func (*Driver) DriverName ¶
func (*Driver) GetMachineName ¶ added in v0.2.0
func (*Driver) GetProviderType ¶ added in v0.2.0
func (d *Driver) GetProviderType() provider.ProviderType
func (*Driver) GetSSHHostname ¶ added in v0.2.0
func (*Driver) GetSSHKeyPath ¶ added in v0.2.0
func (*Driver) GetSSHPort ¶ added in v0.2.0
func (*Driver) GetSSHUsername ¶ added in v0.2.0
func (*Driver) PreCreateCheck ¶
func (*Driver) SetConfigFromFlags ¶
func (d *Driver) SetConfigFromFlags(flags drivers.DriverOptions) error
type GenericClient ¶
type GenericClient struct { Provider *gophercloud.ProviderClient Compute *gophercloud.ServiceClient Network *gophercloud.ServiceClient }
func (*GenericClient) AssignFloatingIP ¶
func (c *GenericClient) AssignFloatingIP(d *Driver, floatingIp *FloatingIp, portId string) 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) DeleteInstance ¶
func (c *GenericClient) DeleteInstance(d *Driver) error
func (*GenericClient) DeleteKeyPair ¶
func (c *GenericClient) DeleteKeyPair(d *Driver, name string) error
func (*GenericClient) GetFlavorId ¶
func (c *GenericClient) GetFlavorId(d *Driver) (string, error)
func (*GenericClient) GetFloatingIPs ¶
func (c *GenericClient) GetFloatingIPs(d *Driver) ([]FloatingIp, error)
func (*GenericClient) GetFloatingIpPoolId ¶
func (c *GenericClient) GetFloatingIpPoolId(d *Driver) (string, error)
func (*GenericClient) GetImageId ¶
func (c *GenericClient) GetImageId(d *Driver) (string, error)
func (*GenericClient) GetInstanceIpAddresses ¶
func (c *GenericClient) GetInstanceIpAddresses(d *Driver) ([]IpAddress, error)
func (*GenericClient) GetInstancePortId ¶
func (c *GenericClient) GetInstancePortId(d *Driver) (string, error)
func (*GenericClient) GetInstanceState ¶
func (c *GenericClient) GetInstanceState(d *Driver) (string, error)
func (*GenericClient) GetNetworkId ¶
func (c *GenericClient) GetNetworkId(d *Driver) (string, error)
func (*GenericClient) GetServerDetail ¶
func (c *GenericClient) GetServerDetail(d *Driver) (*servers.Server, 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) StartInstance ¶
func (c *GenericClient) StartInstance(d *Driver) error
func (*GenericClient) StopInstance ¶
func (c *GenericClient) StopInstance(d *Driver) error
func (*GenericClient) WaitForInstanceStatus ¶
func (c *GenericClient) WaitForInstanceStatus(d *Driver, status string, timeout int) error
Click to show internal directories.
Click to hide internal directories.