Documentation
¶
Index ¶
- type Capabilities
- type Config
- type ConfigMap
- func (c ConfigMap) Config(name string) (interface{}, bool)
- func (c ConfigMap) Get(name string) (interface{}, bool)
- func (c ConfigMap) GetInteger(name string) int
- func (c ConfigMap) GetMapOfStrings(name string) map[string]string
- func (c ConfigMap) GetSliceOfStrings(name string) []string
- func (c ConfigMap) GetString(name string) string
- func (c ConfigMap) Set(name string, value interface{})
- type Provider
- type ProviderProxy
- func (s ProviderProxy) AddPublicIPToVIP(ctx context.Context, ip *abstract.VirtualIP) (ferr fail.Error)
- func (s ProviderProxy) AddRuleToSecurityGroup(ctx context.Context, sgParam stacks.SecurityGroupParameter, ...) (_ *abstract.SecurityGroup, ferr fail.Error)
- func (s ProviderProxy) BindHostToVIP(ctx context.Context, ip *abstract.VirtualIP, s2 string) (ferr fail.Error)
- func (s ProviderProxy) BindSecurityGroupToHost(ctx context.Context, sgParam stacks.SecurityGroupParameter, ...) (ferr fail.Error)
- func (s ProviderProxy) Build(m map[string]interface{}) (_ Provider, ferr fail.Error)
- func (s ProviderProxy) ChangeSecurityGroupSecurity(ctx context.Context, b bool, b2 bool, net string, s2 string) fail.Error
- func (s ProviderProxy) ClearHostStartupScript(ctx context.Context, parameter stacks.HostParameter) (ferr fail.Error)
- func (s ProviderProxy) ClearSecurityGroup(ctx context.Context, sgParam stacks.SecurityGroupParameter) (_ *abstract.SecurityGroup, ferr fail.Error)
- func (s ProviderProxy) CreateHost(ctx context.Context, request abstract.HostRequest, extra interface{}) (_ *abstract.HostFull, _ *userdata.Content, ferr fail.Error)
- func (s ProviderProxy) CreateKeyPair(ctx context.Context, name string) (_ *abstract.KeyPair, ferr fail.Error)
- func (s ProviderProxy) CreateNetwork(ctx context.Context, req abstract.NetworkRequest) (_ *abstract.Network, ferr fail.Error)
- func (s ProviderProxy) CreateSecurityGroup(ctx context.Context, networkRef, name, description string, ...) (_ *abstract.SecurityGroup, ferr fail.Error)
- func (s ProviderProxy) CreateSubnet(ctx context.Context, req abstract.SubnetRequest) (_ *abstract.Subnet, ferr fail.Error)
- func (s ProviderProxy) CreateVIP(ctx context.Context, networkID, subnetID, name string, securityGroups []string) (_ *abstract.VirtualIP, ferr fail.Error)
- func (s ProviderProxy) CreateVolume(ctx context.Context, request abstract.VolumeRequest) (_ *abstract.Volume, ferr fail.Error)
- func (s ProviderProxy) CreateVolumeAttachment(ctx context.Context, request abstract.VolumeAttachmentRequest) (_ string, ferr fail.Error)
- func (s ProviderProxy) DeleteHost(ctx context.Context, parameter stacks.HostParameter) (ferr fail.Error)
- func (s ProviderProxy) DeleteKeyPair(ctx context.Context, id string) (ferr fail.Error)
- func (s ProviderProxy) DeleteNetwork(ctx context.Context, id string) (ferr fail.Error)
- func (s ProviderProxy) DeleteRuleFromSecurityGroup(ctx context.Context, sgParam stacks.SecurityGroupParameter, ...) (_ *abstract.SecurityGroup, ferr fail.Error)
- func (s ProviderProxy) DeleteSecurityGroup(ctx context.Context, group *abstract.SecurityGroup) (ferr fail.Error)
- func (s ProviderProxy) DeleteSubnet(ctx context.Context, id string) (ferr fail.Error)
- func (s ProviderProxy) DeleteVIP(ctx context.Context, ip *abstract.VirtualIP) (ferr fail.Error)
- func (s ProviderProxy) DeleteVolume(ctx context.Context, id string) (ferr fail.Error)
- func (s ProviderProxy) DeleteVolumeAttachment(ctx context.Context, serverID, id string) (ferr fail.Error)
- func (s ProviderProxy) GetAuthenticationOptions(ctx context.Context) (_ Config, ferr fail.Error)
- func (s ProviderProxy) GetCapabilities(ctx context.Context) (_ Capabilities, ferr fail.Error)
- func (s ProviderProxy) GetConfigurationOptions(ctx context.Context) (_ Config, ferr fail.Error)
- func (s ProviderProxy) GetDefaultNetwork(ctx context.Context) (_ *abstract.Network, ferr fail.Error)
- func (s ProviderProxy) GetDefaultSecurityGroupName(ctx context.Context) (_ string, ferr fail.Error)
- func (s ProviderProxy) GetHostState(ctx context.Context, parameter stacks.HostParameter) (_ hoststate.Enum, ferr fail.Error)
- func (s ProviderProxy) GetName() (_ string, ferr fail.Error)
- func (s ProviderProxy) GetRawAuthenticationOptions(ctx context.Context) (_ stacks.AuthenticationOptions, ferr fail.Error)
- func (s ProviderProxy) GetRawConfigurationOptions(ctx context.Context) (_ stacks.ConfigurationOptions, ferr fail.Error)
- func (s ProviderProxy) GetRegexpsOfTemplatesWithGPU() (_ []*regexp.Regexp, ferr fail.Error)
- func (s ProviderProxy) GetStack() (_ api.Stack, ferr fail.Error)
- func (s ProviderProxy) GetStackName() (_ string, ferr fail.Error)
- func (s ProviderProxy) GetTenantParameters() (_ map[string]interface{}, ferr fail.Error)
- func (s ProviderProxy) HasDefaultNetwork(ctx context.Context) (_ bool, ferr fail.Error)
- func (s ProviderProxy) InspectHost(ctx context.Context, parameter stacks.HostParameter) (_ *abstract.HostFull, ferr fail.Error)
- func (s ProviderProxy) InspectImage(ctx context.Context, id string) (_ *abstract.Image, ferr fail.Error)
- func (s ProviderProxy) InspectKeyPair(ctx context.Context, id string) (_ *abstract.KeyPair, ferr fail.Error)
- func (s ProviderProxy) InspectNetwork(ctx context.Context, id string) (_ *abstract.Network, ferr fail.Error)
- func (s ProviderProxy) InspectNetworkByName(ctx context.Context, name string) (_ *abstract.Network, ferr fail.Error)
- func (s ProviderProxy) InspectSecurityGroup(ctx context.Context, sgParam stacks.SecurityGroupParameter) (_ *abstract.SecurityGroup, ferr fail.Error)
- func (s ProviderProxy) InspectSubnet(ctx context.Context, id string) (_ *abstract.Subnet, ferr fail.Error)
- func (s ProviderProxy) InspectSubnetByName(ctx context.Context, networkID, name string) (_ *abstract.Subnet, ferr fail.Error)
- func (s ProviderProxy) InspectTemplate(ctx context.Context, id string) (_ *abstract.HostTemplate, ferr fail.Error)
- func (s ProviderProxy) InspectVolume(ctx context.Context, id string) (_ *abstract.Volume, ferr fail.Error)
- func (s ProviderProxy) InspectVolumeAttachment(ctx context.Context, serverID, id string) (_ *abstract.VolumeAttachment, ferr fail.Error)
- func (s ProviderProxy) ListAvailabilityZones(ctx context.Context) (_ map[string]bool, ferr fail.Error)
- func (s ProviderProxy) ListHosts(ctx context.Context, b bool) (_ abstract.HostList, ferr fail.Error)
- func (s ProviderProxy) ListImages(ctx context.Context, all bool) (_ []*abstract.Image, ferr fail.Error)
- func (s ProviderProxy) ListKeyPairs(ctx context.Context) (_ []*abstract.KeyPair, ferr fail.Error)
- func (s ProviderProxy) ListNetworks(ctx context.Context) (_ []*abstract.Network, ferr fail.Error)
- func (s ProviderProxy) ListRegions(ctx context.Context) (_ []string, ferr fail.Error)
- func (s ProviderProxy) ListSecurityGroups(ctx context.Context, networkRef string) (_ []*abstract.SecurityGroup, ferr fail.Error)
- func (s ProviderProxy) ListSubnets(ctx context.Context, networkID string) (_ []*abstract.Subnet, ferr fail.Error)
- func (s ProviderProxy) ListTemplates(ctx context.Context, all bool) (_ []*abstract.HostTemplate, ferr fail.Error)
- func (s ProviderProxy) ListVolumeAttachments(ctx context.Context, serverID string) (_ []*abstract.VolumeAttachment, ferr fail.Error)
- func (s ProviderProxy) ListVolumes(ctx context.Context) (_ []*abstract.Volume, ferr fail.Error)
- func (s ProviderProxy) RebootHost(ctx context.Context, parameter stacks.HostParameter) (ferr fail.Error)
- func (s ProviderProxy) StartHost(ctx context.Context, parameter stacks.HostParameter) (ferr fail.Error)
- func (s ProviderProxy) StopHost(ctx context.Context, host stacks.HostParameter, gracefully bool) (ferr fail.Error)
- func (s ProviderProxy) UnbindHostFromVIP(ctx context.Context, ip *abstract.VirtualIP, s2 string) (ferr fail.Error)
- func (s ProviderProxy) UnbindSecurityGroupFromHost(ctx context.Context, sgParam stacks.SecurityGroupParameter, ...) (ferr fail.Error)
- func (s ProviderProxy) WaitHostReady(ctx context.Context, hostParam stacks.HostParameter, timeout time.Duration) (_ *abstract.HostCore, ferr fail.Error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Capabilities ¶
type Capabilities struct { // PublicVirtualIP indicates if the provider has the capability to provide a Virtual IP with public IP address PublicVirtualIP bool // PrivateVirtualIP indicates if the provider has the capability to provide a Virtual IP with private IP address PrivateVirtualIP bool // Layer3Networking indicates if the provider uses Layer3 networking Layer3Networking bool // CanDisableSecurityGroup indicates if the provider supports to disable a Security Group CanDisableSecurityGroup bool }
Capabilities represents key/value configuration.
type Config ¶
type Config interface { // Config gets a string configuration value and a // bool indicating whether the value was present or not. Config(name string) (interface{}, bool) // Get is an alias to Config() Get(name string) (interface{}, bool) // Set sets the configuration name to specified value Set(name string, value interface{}) // GetString returns a string corresponding to the key, empty string if it doesn't exist GetString(name string) string // GetSliceOfStrings returns a slice of strings corresponding to the key, empty string slice if it doesn't exist GetSliceOfStrings(name string) []string // GetMapOfStrings returns a string map of strings corresponding to the key, empty map if it doesn't exist GetMapOfStrings(name string) map[string]string // GetInteger returns an integer corresponding to the key, 0 if it doesn't exist GetInteger(name string) int }
Config represents key/value configuration.
type ConfigMap ¶
type ConfigMap map[string]interface{}
ConfigMap is a map[string]string that implements the Config method.
func (ConfigMap) Config ¶
Config gets a string configuration value and a bool indicating whether the value was present or not.
func (ConfigMap) GetInteger ¶
GetInteger returns an integer corresponding to the key, 0 if it doesn't exist
func (ConfigMap) GetMapOfStrings ¶
GetMapOfStrings returns a string map of strings corresponding to the key, empty map if it doesn't exist
func (ConfigMap) GetSliceOfStrings ¶
GetSliceOfStrings returns a string slice corresponding to the key, empty string slice if it doesn't exist
type Provider ¶
type Provider interface { api.Stack // Build builds a new Client from configuration parameter and can be called from nil Build(map[string]interface{}) (Provider, fail.Error) // ListImages lists available OS images, all bool is unused here but used at upper levels to filter using whitelists and blacklists ListImages(ctx context.Context, all bool) ([]*abstract.Image, fail.Error) // ListTemplates lists available host templates, all bool is unused here but used at upper levels to filter using whitelists and blacklists, Host templates are sorted using Dominant Resource Fairness Algorithm ListTemplates(ctx context.Context, all bool) ([]*abstract.HostTemplate, fail.Error) // GetAuthenticationOptions returns authentication options as a Config GetAuthenticationOptions(ctx context.Context) (Config, fail.Error) // GetConfigurationOptions returns configuration options as a Config GetConfigurationOptions(ctx context.Context) (Config, fail.Error) GetName() (string, fail.Error) // GetName returns the tenant name GetStack() (api.Stack, fail.Error) // Returns the stack object used by the provider. Use with caution GetRegexpsOfTemplatesWithGPU() ([]*regexp.Regexp, fail.Error) // GetCapabilities returns the capabilities of the provider GetCapabilities(ctx context.Context) (Capabilities, fail.Error) // GetTenantParameters returns the tenant parameters as read GetTenantParameters() (map[string]interface{}, fail.Error) }
Provider is the interface to cloud stack It has to recall Stack api, to serve as Provider AND as Stack
type ProviderProxy ¶
ProviderProxy ...
func (ProviderProxy) AddPublicIPToVIP ¶
func (ProviderProxy) AddRuleToSecurityGroup ¶
func (s ProviderProxy) AddRuleToSecurityGroup(ctx context.Context, sgParam stacks.SecurityGroupParameter, rule *abstract.SecurityGroupRule) (_ *abstract.SecurityGroup, ferr fail.Error)
func (ProviderProxy) BindHostToVIP ¶
func (ProviderProxy) BindSecurityGroupToHost ¶
func (s ProviderProxy) BindSecurityGroupToHost(ctx context.Context, sgParam stacks.SecurityGroupParameter, hostParam stacks.HostParameter) (ferr fail.Error)
func (ProviderProxy) Build ¶
func (s ProviderProxy) Build(m map[string]interface{}) (_ Provider, ferr fail.Error)
func (ProviderProxy) ChangeSecurityGroupSecurity ¶
func (ProviderProxy) ClearHostStartupScript ¶
func (s ProviderProxy) ClearHostStartupScript(ctx context.Context, parameter stacks.HostParameter) (ferr fail.Error)
func (ProviderProxy) ClearSecurityGroup ¶
func (s ProviderProxy) ClearSecurityGroup(ctx context.Context, sgParam stacks.SecurityGroupParameter) (_ *abstract.SecurityGroup, ferr fail.Error)
func (ProviderProxy) CreateHost ¶
func (ProviderProxy) CreateKeyPair ¶
func (ProviderProxy) CreateNetwork ¶
func (s ProviderProxy) CreateNetwork(ctx context.Context, req abstract.NetworkRequest) (_ *abstract.Network, ferr fail.Error)
func (ProviderProxy) CreateSecurityGroup ¶
func (s ProviderProxy) CreateSecurityGroup(ctx context.Context, networkRef, name, description string, rules abstract.SecurityGroupRules) (_ *abstract.SecurityGroup, ferr fail.Error)
func (ProviderProxy) CreateSubnet ¶
func (s ProviderProxy) CreateSubnet(ctx context.Context, req abstract.SubnetRequest) (_ *abstract.Subnet, ferr fail.Error)
func (ProviderProxy) CreateVolume ¶
func (s ProviderProxy) CreateVolume(ctx context.Context, request abstract.VolumeRequest) (_ *abstract.Volume, ferr fail.Error)
func (ProviderProxy) CreateVolumeAttachment ¶
func (s ProviderProxy) CreateVolumeAttachment(ctx context.Context, request abstract.VolumeAttachmentRequest) (_ string, ferr fail.Error)
func (ProviderProxy) DeleteHost ¶
func (s ProviderProxy) DeleteHost(ctx context.Context, parameter stacks.HostParameter) (ferr fail.Error)
func (ProviderProxy) DeleteKeyPair ¶
func (ProviderProxy) DeleteNetwork ¶
func (ProviderProxy) DeleteRuleFromSecurityGroup ¶
func (s ProviderProxy) DeleteRuleFromSecurityGroup(ctx context.Context, sgParam stacks.SecurityGroupParameter, rule *abstract.SecurityGroupRule) (_ *abstract.SecurityGroup, ferr fail.Error)
func (ProviderProxy) DeleteSecurityGroup ¶
func (s ProviderProxy) DeleteSecurityGroup(ctx context.Context, group *abstract.SecurityGroup) (ferr fail.Error)
func (ProviderProxy) DeleteSubnet ¶
func (ProviderProxy) DeleteVolume ¶
func (ProviderProxy) DeleteVolumeAttachment ¶
func (ProviderProxy) GetAuthenticationOptions ¶
func (ProviderProxy) GetCapabilities ¶
func (s ProviderProxy) GetCapabilities(ctx context.Context) (_ Capabilities, ferr fail.Error)
func (ProviderProxy) GetConfigurationOptions ¶
func (ProviderProxy) GetDefaultNetwork ¶
func (ProviderProxy) GetDefaultSecurityGroupName ¶
func (ProviderProxy) GetHostState ¶
func (s ProviderProxy) GetHostState(ctx context.Context, parameter stacks.HostParameter) (_ hoststate.Enum, ferr fail.Error)
func (ProviderProxy) GetRawAuthenticationOptions ¶
func (s ProviderProxy) GetRawAuthenticationOptions(ctx context.Context) (_ stacks.AuthenticationOptions, ferr fail.Error)
func (ProviderProxy) GetRawConfigurationOptions ¶
func (s ProviderProxy) GetRawConfigurationOptions(ctx context.Context) (_ stacks.ConfigurationOptions, ferr fail.Error)
func (ProviderProxy) GetRegexpsOfTemplatesWithGPU ¶
func (s ProviderProxy) GetRegexpsOfTemplatesWithGPU() (_ []*regexp.Regexp, ferr fail.Error)
func (ProviderProxy) GetStackName ¶
func (s ProviderProxy) GetStackName() (_ string, ferr fail.Error)
func (ProviderProxy) GetTenantParameters ¶
func (s ProviderProxy) GetTenantParameters() (_ map[string]interface{}, ferr fail.Error)
func (ProviderProxy) HasDefaultNetwork ¶
func (ProviderProxy) InspectHost ¶
func (s ProviderProxy) InspectHost(ctx context.Context, parameter stacks.HostParameter) (_ *abstract.HostFull, ferr fail.Error)
func (ProviderProxy) InspectImage ¶
func (ProviderProxy) InspectKeyPair ¶
func (ProviderProxy) InspectNetwork ¶
func (ProviderProxy) InspectNetworkByName ¶
func (ProviderProxy) InspectSecurityGroup ¶
func (s ProviderProxy) InspectSecurityGroup(ctx context.Context, sgParam stacks.SecurityGroupParameter) (_ *abstract.SecurityGroup, ferr fail.Error)
func (ProviderProxy) InspectSubnet ¶
func (ProviderProxy) InspectSubnetByName ¶
func (ProviderProxy) InspectTemplate ¶
func (s ProviderProxy) InspectTemplate(ctx context.Context, id string) (_ *abstract.HostTemplate, ferr fail.Error)
func (ProviderProxy) InspectVolume ¶
func (ProviderProxy) InspectVolumeAttachment ¶
func (s ProviderProxy) InspectVolumeAttachment(ctx context.Context, serverID, id string) (_ *abstract.VolumeAttachment, ferr fail.Error)
func (ProviderProxy) ListAvailabilityZones ¶
func (ProviderProxy) ListImages ¶
func (ProviderProxy) ListKeyPairs ¶
func (ProviderProxy) ListNetworks ¶
func (ProviderProxy) ListRegions ¶
func (ProviderProxy) ListSecurityGroups ¶
func (s ProviderProxy) ListSecurityGroups(ctx context.Context, networkRef string) (_ []*abstract.SecurityGroup, ferr fail.Error)
func (ProviderProxy) ListSubnets ¶
func (ProviderProxy) ListTemplates ¶
func (s ProviderProxy) ListTemplates(ctx context.Context, all bool) (_ []*abstract.HostTemplate, ferr fail.Error)
func (ProviderProxy) ListVolumeAttachments ¶
func (s ProviderProxy) ListVolumeAttachments(ctx context.Context, serverID string) (_ []*abstract.VolumeAttachment, ferr fail.Error)
func (ProviderProxy) ListVolumes ¶
func (ProviderProxy) RebootHost ¶
func (s ProviderProxy) RebootHost(ctx context.Context, parameter stacks.HostParameter) (ferr fail.Error)
func (ProviderProxy) StartHost ¶
func (s ProviderProxy) StartHost(ctx context.Context, parameter stacks.HostParameter) (ferr fail.Error)
func (ProviderProxy) StopHost ¶
func (s ProviderProxy) StopHost(ctx context.Context, host stacks.HostParameter, gracefully bool) (ferr fail.Error)
func (ProviderProxy) UnbindHostFromVIP ¶
func (ProviderProxy) UnbindSecurityGroupFromHost ¶
func (s ProviderProxy) UnbindSecurityGroupFromHost(ctx context.Context, sgParam stacks.SecurityGroupParameter, hostParam stacks.HostParameter) (ferr fail.Error)