Documentation
¶
Index ¶
- type AuthOptions
- type Client
- func (client *Client) AssociateFloatingIP(host *model.Host, id string) error
- func (client *Client) Build(params map[string]interface{}) (api.ClientAPI, error)
- func (client *Client) CreateFloatingIP() (*FloatingIP, error)
- func (client *Client) CreateGateway(req model.GatewayRequest) (*model.Host, error)
- func (client *Client) CreateHost(request model.HostRequest) (*model.Host, error)
- func (client *Client) CreateKeyPair(name string) (*model.KeyPair, error)
- func (client *Client) CreateNetwork(req model.NetworkRequest) (*model.Network, error)
- func (client *Client) CreateVPC(req VPCRequest) (*VPC, error)
- func (client *Client) CreateVolume(request model.VolumeRequest) (*model.Volume, error)
- func (client *Client) CreateVolumeAttachment(request model.VolumeAttachmentRequest) (string, error)
- func (client *Client) DeleteFloatingIP(id string) error
- func (client *Client) DeleteGateway(id string) error
- func (client *Client) DeleteHost(id string) error
- func (client *Client) DeleteKeyPair(id string) error
- func (client *Client) DeleteNetwork(id string) error
- func (client *Client) DeleteVPC(id string) error
- func (client *Client) DeleteVolume(id string) error
- func (client *Client) DeleteVolumeAttachment(serverID, vaID string) error
- func (client *Client) DissociateFloatingIP(host *model.Host, id string) error
- func (client *Client) FindFloatingIPByIP(ipAddress string) (*FloatingIP, error)
- func (client *Client) GetAuthOpts() (model.Config, error)
- func (client *Client) GetCfgOpts() (model.Config, error)
- func (client *Client) GetFloatingIP(id string) (*FloatingIP, error)
- func (client *Client) GetHost(hostParam interface{}) (*model.Host, error)
- func (client *Client) GetHostByName(name string) (*model.Host, error)
- func (client *Client) GetHostState(hostParam interface{}) (HostState.Enum, error)
- func (client *Client) GetImage(id string) (*model.Image, error)
- func (client *Client) GetKeyPair(id string) (*model.KeyPair, error)
- func (client *Client) GetNetwork(id string) (*model.Network, error)
- func (client *Client) GetNetworkByName(name string) (*model.Network, error)
- func (client *Client) GetTemplate(id string) (*model.HostTemplate, error)
- func (client *Client) GetVPC(id string) (*VPC, error)
- func (client *Client) GetVolume(id string) (*model.Volume, error)
- func (client *Client) GetVolumeAttachment(serverID, id string) (*model.VolumeAttachment, error)
- func (client *Client) ListAvailabilityZones(all bool) (map[string]bool, error)
- func (client *Client) ListFloatingIPs() pagination.Pager
- func (client *Client) ListHosts() ([]*model.Host, error)
- func (client *Client) ListImages(all bool) ([]model.Image, error)
- func (client *Client) ListKeyPairs() ([]model.KeyPair, error)
- func (client *Client) ListNetworks() ([]*model.Network, error)
- func (client *Client) ListTemplates(all bool) ([]model.HostTemplate, error)
- func (client *Client) ListVPCs() ([]VPC, error)
- func (client *Client) ListVolumeAttachments(serverID string) ([]model.VolumeAttachment, error)
- func (client *Client) ListVolumes() ([]model.Volume, error)
- func (client *Client) RebootHost(id string) error
- func (client *Client) StartHost(id string) error
- func (client *Client) StopHost(id string) error
- func (client *Client) WaitHostReady(hostParam interface{}, timeout time.Duration) (*model.Host, error)
- type FloatingIP
- type ListOpts
- type VPC
- type VPCRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthOptions ¶
type AuthOptions struct {
IdentityEndpoint string
Username string
Password string
DomainName string
ProjectID string
AllowReauth bool
// TokenID allows users to authenticate (possibly as another user) with an
// authentication token ID.
TokenID string
//Openstack region (data center) where the infrstructure will be created
Region string
// Name of the VPC (Virtual Private Cloud)
VPCName string
// CIDR if the VPC
VPCCIDR string
// Identifier for S3 object storage use
S3AccessKeyID string
// Password of the previous identifier
S3AccessKeyPassword string
}
AuthOptions fields are the union of those recognized by each identity implementation and provider.
type Client ¶
type Client struct {
// Opts contains authentication options
Opts *AuthOptions
// Identity contains service client of Identity openstack service
Identity *gc.ServiceClient
// SecurityGroup is an instance of the default security group
SecurityGroup *secgroups.SecGroup
// contains filtered or unexported fields
}
Client is the implementation of the flexibleengine driver regarding to the api.ClientAPI
func AuthenticatedClient ¶
func AuthenticatedClient(opts AuthOptions, cfg openstack.CfgOptions) (*Client, error)
AuthenticatedClient returns an authenticated client
func (*Client) AssociateFloatingIP ¶
AssociateFloatingIP to host
func (*Client) CreateFloatingIP ¶
func (client *Client) CreateFloatingIP() (*FloatingIP, error)
CreateFloatingIP creates a floating IP
func (*Client) CreateGateway ¶
CreateGateway creates a gateway for a network. By current implementation, only one gateway can exist by Network because the object is intended to contain only one hostID
func (*Client) CreateHost ¶
CreateHost creates a new host
func (*Client) CreateKeyPair ¶
CreateKeyPair creates and import a key pair
func (*Client) CreateNetwork ¶
CreateNetwork creates a network (ie a subnet in the network associated to VPC in FlexibleEngine
func (*Client) CreateVPC ¶
func (client *Client) CreateVPC(req VPCRequest) (*VPC, error)
CreateVPC creates a network, which is managed by VPC in FlexibleEngine
func (*Client) CreateVolume ¶
CreateVolume creates a block volume
func (*Client) CreateVolumeAttachment ¶
func (client *Client) CreateVolumeAttachment(request model.VolumeAttachmentRequest) (string, error)
CreateVolumeAttachment attaches a volume to an host
func (*Client) DeleteFloatingIP ¶
DeleteFloatingIP deletes a floating IP
func (*Client) DeleteGateway ¶
DeleteGateway deletes the gateway associated with network identified by ID
func (*Client) DeleteHost ¶
DeleteHost deletes the host identified by id
func (*Client) DeleteKeyPair ¶
DeleteKeyPair deletes the key pair identified by id
func (*Client) DeleteNetwork ¶
DeleteNetwork consists to delete subnet in FlexibleEngine VPC
func (*Client) DeleteVPC ¶
DeleteVPC deletes a Network (ie a VPC in Flexible Engine) identified by 'id'
func (*Client) DeleteVolume ¶
DeleteVolume deletes the volume identified by id
func (*Client) DeleteVolumeAttachment ¶
DeleteVolumeAttachment deletes the volume attachment identifed by id
func (*Client) DissociateFloatingIP ¶
DissociateFloatingIP from host
func (*Client) FindFloatingIPByIP ¶
func (client *Client) FindFloatingIPByIP(ipAddress string) (*FloatingIP, error)
FindFloatingIPByIP returns FloatingIP instance associated with 'ipAddress'
func (*Client) GetAuthOpts ¶
GetAuthOpts returns the auth options
func (*Client) GetCfgOpts ¶
GetCfgOpts return configuration parameters
func (*Client) GetFloatingIP ¶
func (client *Client) GetFloatingIP(id string) (*FloatingIP, error)
GetFloatingIP returns FloatingIP instance corresponding to ID 'id'
func (*Client) GetHostByName ¶
GetHostByName ...
func (*Client) GetHostState ¶
GetHostState ...
func (*Client) GetKeyPair ¶
GetKeyPair returns the key pair identified by id
func (*Client) GetNetwork ¶
GetNetwork returns the network identified by id
func (*Client) GetNetworkByName ¶
GetNetworkByName ...
func (*Client) GetTemplate ¶
func (client *Client) GetTemplate(id string) (*model.HostTemplate, error)
GetTemplate returns the Template referenced by id
func (*Client) GetVolume ¶
GetVolume returns the volume identified by id If volume not found, returns (nil, nil)
func (*Client) GetVolumeAttachment ¶
func (client *Client) GetVolumeAttachment(serverID, id string) (*model.VolumeAttachment, error)
GetVolumeAttachment returns the volume attachment identified by id
func (*Client) ListAvailabilityZones ¶
ListAvailabilityZones lists the usable Availability Zones
func (*Client) ListFloatingIPs ¶
func (client *Client) ListFloatingIPs() pagination.Pager
ListFloatingIPs lists all the floating IP currently requested for the VPC
func (*Client) ListImages ¶
ListImages lists available OS images
func (*Client) ListKeyPairs ¶
ListKeyPairs lists available key pairs
func (*Client) ListNetworks ¶
ListNetworks lists networks
func (*Client) ListTemplates ¶
func (client *Client) ListTemplates(all bool) ([]model.HostTemplate, error)
ListTemplates lists available host templates Host templates are sorted using Dominant Resource Fairness Algorithm
func (*Client) ListVolumeAttachments ¶
func (client *Client) ListVolumeAttachments(serverID string) ([]model.VolumeAttachment, error)
ListVolumeAttachments lists available volume attachment
func (*Client) ListVolumes ¶
ListVolumes lists volumes
type FloatingIP ¶
type FloatingIP struct {
ID string `json:"id"`
Status string `json:"status"`
Type string `json:"type"`
PublicIPAddress string `json:"public_ip_address"`
TenantID string `json:"tenant_id"`
CreateTime string `json:"create_time"`
BandwidthSize int `json:"bandwidth_size"`
}
FloatingIP represents a FlexibleEngine Floating IP
type VPC ¶
type VPC struct {
ID string `json:"id"`
Name string `json:"name,omitempty"`
CIDR string `json:"cidr,omitempty"`
Status string `json:"status,omitempty"`
Network *networks.Network
Router *routers.Router
}
VPC contains information about a VPC
type VPCRequest ¶
VPCRequest defines a request to create a VPC