Documentation ¶
Index ¶
- type FloatingIP
- type ListOpts
- type Stack
- func (s *Stack) AssociateFloatingIP(host *resources.Host, id string) error
- func (s *Stack) CreateFloatingIP() (*FloatingIP, error)
- func (s *Stack) CreateGateway(req resources.GatewayRequest) (*resources.Host, *userdata.Content, error)
- func (s *Stack) CreateHost(request resources.HostRequest) (host *resources.Host, userData *userdata.Content, err error)
- func (s *Stack) CreateNetwork(req resources.NetworkRequest) (network *resources.Network, err error)
- func (s *Stack) CreateVIP(networkID string, name string) (*resources.VIP, error)
- func (s *Stack) CreateVPC(req VPCRequest) (*VPC, error)
- func (s *Stack) CreateVolume(request resources.VolumeRequest) (*resources.Volume, error)
- func (s *Stack) CreateVolumeAttachment(request resources.VolumeAttachmentRequest) (string, error)
- func (s *Stack) DeleteFloatingIP(id string) error
- func (s *Stack) DeleteGateway(id string) error
- func (s *Stack) DeleteHost(id string) error
- func (s *Stack) DeleteNetwork(id string) error
- func (s *Stack) DeleteVPC(id string) error
- func (s *Stack) DeleteVolumeAttachment(serverID, vaID string) error
- func (s *Stack) DissociateFloatingIP(host *resources.Host, id string) error
- func (s *Stack) FindFloatingIPByIP(ipAddress string) (*FloatingIP, error)
- func (s *Stack) GetAuthOpts() (providers.Config, error)
- func (s *Stack) GetAuthenticationOptions() stacks.AuthenticationOptions
- func (s *Stack) GetConfigurationOptions() stacks.ConfigurationOptions
- func (s *Stack) GetFloatingIP(id string) (*FloatingIP, error)
- func (s *Stack) GetNetwork(id string) (*resources.Network, error)
- func (s *Stack) GetNetworkByName(name string) (*resources.Network, error)
- func (s *Stack) GetVPC(id string) (*VPC, error)
- func (s *Stack) GetVolume(id string) (*resources.Volume, error)
- func (s *Stack) GetVolumeAttachment(serverID, id string) (*resources.VolumeAttachment, error)
- func (s *Stack) InitDefaultSecurityGroup() error
- func (s *Stack) InspectHost(hostParam interface{}) (host *resources.Host, err error)
- func (s *Stack) ListFloatingIPs() pagination.Pager
- func (s *Stack) ListHosts() ([]*resources.Host, error)
- func (s *Stack) ListNetworks() ([]*resources.Network, error)
- func (s *Stack) ListVPCs() ([]VPC, error)
- func (s *Stack) ListVolumeAttachments(serverID string) ([]resources.VolumeAttachment, error)
- func (s *Stack) ListVolumes() ([]resources.Volume, error)
- func (s *Stack) WaitHostReady(hostParam interface{}, timeout time.Duration) (*resources.Host, error)
- type VPC
- type VPCRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 Stack ¶
type Stack struct { // use openstack stack when fully openstack compliant *openstack.Stack // contains filtered or unexported fields }
Stack is the implementation for huaweicloud cloud stack
func New ¶
func New(auth stacks.AuthenticationOptions, cfg stacks.ConfigurationOptions) (*Stack, error)
New authenticates and return interface Stack
func (*Stack) AssociateFloatingIP ¶
AssociateFloatingIP to host
func (*Stack) CreateFloatingIP ¶
func (s *Stack) CreateFloatingIP() (*FloatingIP, error)
CreateFloatingIP creates a floating IP
func (*Stack) CreateGateway ¶
func (s *Stack) CreateGateway(req resources.GatewayRequest) (*resources.Host, *userdata.Content, error)
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 (*Stack) CreateHost ¶
func (s *Stack) CreateHost(request resources.HostRequest) (host *resources.Host, userData *userdata.Content, err error)
CreateHost creates a new host On success returns an instance of resources.Host, and a string containing the script to execute to finalize host installation
func (*Stack) CreateNetwork ¶
CreateNetwork creates a network (ie a subnet in the network associated to VPC in FlexibleEngine
func (*Stack) CreateVPC ¶
func (s *Stack) CreateVPC(req VPCRequest) (*VPC, error)
CreateVPC creates a network, which is managed by VPC in FlexibleEngine
func (*Stack) CreateVolume ¶
CreateVolume creates a block volume
func (*Stack) CreateVolumeAttachment ¶
func (s *Stack) CreateVolumeAttachment(request resources.VolumeAttachmentRequest) (string, error)
CreateVolumeAttachment attaches a volume to an host
func (*Stack) DeleteFloatingIP ¶
DeleteFloatingIP deletes a floating IP
func (*Stack) DeleteGateway ¶
DeleteGateway deletes the gateway associated with network identified by ID
func (*Stack) DeleteHost ¶
DeleteHost deletes the host identified by id
func (*Stack) DeleteNetwork ¶
DeleteNetwork consists to delete subnet in FlexibleEngine VPC
func (*Stack) DeleteVolumeAttachment ¶
DeleteVolumeAttachment deletes the volume attachment identifed by id
func (*Stack) DissociateFloatingIP ¶
DissociateFloatingIP from host
func (*Stack) FindFloatingIPByIP ¶
func (s *Stack) FindFloatingIPByIP(ipAddress string) (*FloatingIP, error)
FindFloatingIPByIP returns FloatingIP instance associated with 'ipAddress'
func (*Stack) GetAuthOpts ¶
GetAuthOpts returns the auth options
func (*Stack) GetAuthenticationOptions ¶
func (s *Stack) GetAuthenticationOptions() stacks.AuthenticationOptions
GetAuthenticationOptions ...
func (*Stack) GetConfigurationOptions ¶
func (s *Stack) GetConfigurationOptions() stacks.ConfigurationOptions
GetConfigurationOptions ...
func (*Stack) GetFloatingIP ¶
func (s *Stack) GetFloatingIP(id string) (*FloatingIP, error)
GetFloatingIP returns FloatingIP instance corresponding to ID 'id'
func (*Stack) GetNetwork ¶
GetNetwork returns the network identified by id
func (*Stack) GetNetworkByName ¶
GetNetworkByName ...
func (*Stack) GetVolume ¶
GetVolume returns the volume identified by id If volume not found, returns (nil, nil) - TODO: returns utils.ErrNotFound
func (*Stack) GetVolumeAttachment ¶
func (s *Stack) GetVolumeAttachment(serverID, id string) (*resources.VolumeAttachment, error)
GetVolumeAttachment returns the volume attachment identified by id
func (*Stack) InitDefaultSecurityGroup ¶
InitDefaultSecurityGroup create an open Security Group The default security group opens all TCP, UDP, ICMP ports Security is managed individually on each host using a linux firewall
func (*Stack) InspectHost ¶
InspectHost updates the data inside host with the data from provider
func (*Stack) ListFloatingIPs ¶
func (s *Stack) ListFloatingIPs() pagination.Pager
ListFloatingIPs lists all the floating IP currently requested for the VPC
func (*Stack) ListNetworks ¶
ListNetworks lists networks
func (*Stack) ListVolumeAttachments ¶
func (s *Stack) ListVolumeAttachments(serverID string) ([]resources.VolumeAttachment, error)
ListVolumeAttachments lists available volume attachment
func (*Stack) ListVolumes ¶
ListVolumes lists volumes
func (*Stack) WaitHostReady ¶
func (s *Stack) WaitHostReady(hostParam interface{}, timeout time.Duration) (*resources.Host, error)
WaitHostReady waits an host achieve ready state hostParam can be an ID of host, or an instance of *resources.Host; any other type will return an utils.ErrInvalidParameter.
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