operations

package
v22.11.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 112 Imported by: 0

Documentation

Overview

Package operations contains the implementations of resources interfaces

Index

Constants

View Source
const (
	// MinimumMetadataVersion defines the version of the metadata recognized by the release
	// Must be incremented each time a new release requires upgrade of metadata (hopefully not for all new releases)
	// By convention, it corresponds to the SafeScale release that introduced the new format
	MinimumMetadataVersion = "v21.05.0"

	// FirstMetadataVersion corresponds to the first metadata format version
	FirstMetadataVersion = "v20.06.0"

	MustUpgradeMessage  = "" /* 189-byte string literal not displayed */
	MustUpgradeBinaries = "" /* 129-byte string literal not displayed */
)
View Source
const NOTFOUND = unix.ENOENT

NOTFOUND Not found

Variables

View Source
var (
	CurrentNetworkAbstractContextKey   = "current_network_abstract"
	CurrentNetworkPropertiesContextKey = "current_network_properties"
)
View Source
var MINTIMINGS = &temporal.MutableTimings{
	Timeouts: temporal.Timeouts{
		Communication:          100 * time.Millisecond,
		Connection:             100 * time.Millisecond,
		Context:                100 * time.Millisecond,
		HostCreation:           4 * time.Second,
		HostCleanup:            100 * time.Millisecond,
		HostOperation:          100 * time.Millisecond,
		HostLongOperation:      100 * time.Millisecond,
		Operation:              100 * time.Millisecond,
		Metadata:               100 * time.Millisecond,
		MetadataReadAfterWrite: 100 * time.Millisecond,
		SSHConnection:          100 * time.Millisecond,
		RebootTimeout:          100 * time.Millisecond,
	},
	Delays: temporal.Delays{
		Small:  100 * time.Millisecond,
		Normal: 100 * time.Millisecond,
		Big:    100 * time.Millisecond,
	},
}

Functions

func ActionFromError

func ActionFromError(err error) string

func CheckMetadataVersion

func CheckMetadataVersion(ctx context.Context, svc iaas.Service) (string, fail.Error)

CheckMetadataVersion checks if the content of /version in metadata bucket is equal to MetadataVersion

func ExtractFeatureParameters

func ExtractFeatureParameters(params []string) (map[string]interface{}, error)

ExtractFeatureParameters convert a slice of string in format a=b into a map index on 'a' with value 'b'

func FreeCIDRForSingleHost

func FreeCIDRForSingleHost(ctx context.Context, network resources.Network, index uint) fail.Error

FreeCIDRForSingleHost frees the CIDR index inside the Network 'Network'

func ListSubnets

func ListSubnets(ctx context.Context, svc iaas.Service, networkID string, all bool) (_ []*abstract.Subnet, ferr fail.Error)

ListSubnets returns a list of available subnets

func LoadBucket

func LoadBucket(inctx context.Context, svc iaas.Service, ref string) (resources.Bucket, fail.Error)

func LoadCluster

func LoadCluster(inctx context.Context, svc iaas.Service, ref string) (resources.Cluster, fail.Error)

func LoadHost

func LoadHost(inctx context.Context, svc iaas.Service, ref string) (resources.Host, fail.Error)

func LoadLabel

func LoadLabel(inctx context.Context, svc iaas.Service, ref string) (resources.Label, fail.Error)

func LoadNetwork

func LoadNetwork(inctx context.Context, svc iaas.Service, ref string) (resources.Network, fail.Error)

func LoadShare

func LoadShare(inctx context.Context, svc iaas.Service, ref string) (resources.Share, fail.Error)

func LoadTerraformBucket added in v22.11.9

func LoadTerraformBucket(inctx context.Context, svc iaas.Service, ref string) (resources.Bucket, fail.Error)

func LoadTerraformHost added in v22.11.9

func LoadTerraformHost(inctx context.Context, svc iaas.Service, ref string) (resources.Host, fail.Error)

func LoadTerraformHosts added in v22.11.9

func LoadTerraformHosts(inctx context.Context, svc iaas.Service) ([]resources.Host, fail.Error)

func LoadVolume

func LoadVolume(inctx context.Context, svc iaas.Service, ref string) (resources.Volume, fail.Error)

func NewBucket

func NewBucket(svc iaas.Service) (resources.Bucket, fail.Error)

NewBucket instantiates bucket struct

func NewCluster

func NewCluster(inctx context.Context, svc iaas.Service, opts ...Option) (_ resources.Cluster, ferr fail.Error)

func NewFeature

func NewFeature(ctx context.Context, svc iaas.Service, name string) (_ resources.Feature, ferr fail.Error)

NewFeature searches for a spec file name 'name' and initializes a new Feature object with its content error contains :

  • fail.ErrNotFound if no Feature is found by its name
  • fail.ErrSyntax if Feature found contains syntax error

func NewLabel

func NewLabel(svc iaas.Service) (_ resources.Label, ferr fail.Error)

NewLabel creates an instance of Label

func NewNetwork

func NewNetwork(svc iaas.Service) (resources.Network, fail.Error)

NewNetwork creates an instance of Networking

func NewShare

func NewShare(svc iaas.Service) (resources.Share, fail.Error)

NewShare creates an instance of Share

func NewVolume

func NewVolume(svc iaas.Service) (_ resources.Volume, ferr fail.Error)

NewVolume creates an instance of Volume

func RenderFeature added in v22.11.3

func RenderFeature(inctx context.Context, feat Feature) (string, fail.Error)

func ReserveCIDRForSingleHost

func ReserveCIDRForSingleHost(ctx context.Context, networkInstance resources.Network) (_ string, _ uint, ferr fail.Error)

ReserveCIDRForSingleHost returns the first available CIDR and its index inside the Network 'network'

func SetCurrentTenant

func SetCurrentTenant(ctx context.Context, tenantName string) error

SetCurrentTenant sets the tenant to use for upcoming commands

Types

type ClassicCluster added in v22.11.8

type ClassicCluster struct {
	*MetadataCore
	// contains filtered or unexported fields
}

ClassicCluster is the implementation of resources.Cluster interface

func NewClassicCluster added in v22.11.9

func NewClassicCluster(inctx context.Context, svc iaas.Service) (_ *ClassicCluster, ferr fail.Error)

NewClassicCluster is the constructor of resources.Cluster struct

func (*ClassicCluster) AddFeature added in v22.11.8

func (instance *ClassicCluster) AddFeature(
	ctx context.Context, name string, vars data.Map, settings resources.FeatureSettings,
) (resources.Results, fail.Error)

AddFeature installs a feature on the ClassicCluster

func (*ClassicCluster) AddNodes added in v22.11.8

func (instance *ClassicCluster) AddNodes(ctx context.Context, cluName string, count uint, def abstract.HostSizingRequirements, parameters data.Map, keepOnFailure bool) (_ []resources.Host, ferr fail.Error)

AddNodes adds several nodes

func (*ClassicCluster) Browse added in v22.11.8

func (instance *ClassicCluster) Browse(inctx context.Context, callback func(*abstract.ClusterIdentity) fail.Error) (ferr fail.Error)

Browse walks through ClassicCluster MetadataFolder and executes a callback for each entry FIXME: adds a ClassicCluster status check to prevent operations on removed clusters

func (*ClassicCluster) CheckFeature added in v22.11.8

func (instance *ClassicCluster) CheckFeature(
	ctx context.Context, name string, vars data.Map, settings resources.FeatureSettings,
) (resources.Results, fail.Error)

CheckFeature tells if a feature is installed on the ClassicCluster

func (*ClassicCluster) ComplementFeatureParameters added in v22.11.8

func (instance *ClassicCluster) ComplementFeatureParameters(inctx context.Context, v data.Map) (ferr fail.Error)

ComplementFeatureParameters configures parameters that are implicitly defined, based on target

func (*ClassicCluster) Create added in v22.11.8

func (instance *ClassicCluster) Create(inctx context.Context, req abstract.ClusterRequest) fail.Error

Create creates the necessary infrastructure of the ClassicCluster

func (*ClassicCluster) Delete added in v22.11.8

func (instance *ClassicCluster) Delete(ctx context.Context, force bool) (ferr fail.Error)

Delete deletes the ClassicCluster

func (*ClassicCluster) DeleteSpecificNode added in v22.11.8

func (instance *ClassicCluster) DeleteSpecificNode(ctx context.Context, hostID string, selectedMasterID string) (ferr fail.Error)

DeleteSpecificNode deletes a node identified by its ID

func (*ClassicCluster) Deserialize added in v22.11.8

func (instance *ClassicCluster) Deserialize(_ context.Context, buf []byte) (ferr fail.Error)

Deserialize reads json code and recreates ClassicCluster metadata

func (*ClassicCluster) ExecuteScript added in v22.11.8

func (instance *ClassicCluster) ExecuteScript(
	inctx context.Context, tmplName string, variables data.Map, host resources.Host,
) (_ int, _ string, _ string, ferr fail.Error)

ExecuteScript executes the script template with the parameters on target Host

func (*ClassicCluster) Exists added in v22.11.8

func (instance *ClassicCluster) Exists(ctx context.Context) (_ bool, ferr fail.Error)

Exists checks if the resource actually exists in provider side (not in stow metadata)

func (*ClassicCluster) FindAvailableMaster added in v22.11.8

func (instance *ClassicCluster) FindAvailableMaster(ctx context.Context) (master resources.Host, ferr fail.Error)

FindAvailableMaster returns ID of the first master available to execute order satisfies interface ClassicCluster.ClassicCluster.Controller

func (*ClassicCluster) GetAdminPassword added in v22.11.8

func (instance *ClassicCluster) GetAdminPassword(_ context.Context) (adminPassword string, ferr fail.Error)

GetAdminPassword returns the password of the ClassicCluster admin account satisfies interface ClassicCluster.Controller

func (*ClassicCluster) GetComplexity added in v22.11.8

func (instance *ClassicCluster) GetComplexity(ctx context.Context) (_ clustercomplexity.Enum, ferr fail.Error)

GetComplexity returns the complexity of the ClassicCluster

func (*ClassicCluster) GetFlavor added in v22.11.8

func (instance *ClassicCluster) GetFlavor(ctx context.Context) (flavor clusterflavor.Enum, ferr fail.Error)

GetFlavor returns the flavor of the ClassicCluster

func (*ClassicCluster) GetIdentity added in v22.11.8

func (instance *ClassicCluster) GetIdentity(ctx context.Context) (clusterIdentity abstract.ClusterIdentity, ferr fail.Error)

GetIdentity returns the identity of the ClassicCluster

func (*ClassicCluster) GetKeyPair added in v22.11.8

func (instance *ClassicCluster) GetKeyPair(_ context.Context) (keyPair *abstract.KeyPair, ferr fail.Error)

GetKeyPair returns the key pair used in the ClassicCluster

func (*ClassicCluster) GetNetworkConfig added in v22.11.8

func (instance *ClassicCluster) GetNetworkConfig(ctx context.Context) (config *propertiesv3.ClusterNetwork, ferr fail.Error)

GetNetworkConfig returns subnet configuration of the ClassicCluster

func (*ClassicCluster) GetState added in v22.11.8

func (instance *ClassicCluster) GetState(ctx context.Context) (state clusterstate.Enum, ferr fail.Error)

GetState returns the current state of the ClassicCluster Uses the "maker" ForceGetState

func (*ClassicCluster) InstallMethods added in v22.11.8

func (instance *ClassicCluster) InstallMethods(ctx context.Context) (map[uint8]installmethod.Enum, fail.Error)

InstallMethods returns a list of installation methods usable on the target, ordered from upper to lower preference (1 = the highest preference) satisfies resources.Targetable interface

func (*ClassicCluster) InstalledFeatures added in v22.11.8

func (instance *ClassicCluster) InstalledFeatures(ctx context.Context) ([]string, fail.Error)

InstalledFeatures returns a list of installed features

func (*ClassicCluster) IsFeatureInstalled added in v22.11.8

func (instance *ClassicCluster) IsFeatureInstalled(inctx context.Context, name string) (_ bool, _ fail.Error)

IsFeatureInstalled tells if a Feature identified by name is installed on ClassicCluster, using only metadata

func (*ClassicCluster) IsNull added in v22.11.8

func (instance *ClassicCluster) IsNull() bool

IsNull tells if the instance should be considered as a null value

func (*ClassicCluster) ListEligibleFeatures added in v22.11.8

func (instance *ClassicCluster) ListEligibleFeatures(ctx context.Context) (_ []resources.Feature, ferr fail.Error)

ListEligibleFeatures returns a slice of features eligible to ClassicCluster

func (*ClassicCluster) ListInstalledFeatures added in v22.11.8

func (instance *ClassicCluster) ListInstalledFeatures(ctx context.Context) (_ []resources.Feature, ferr fail.Error)

ListInstalledFeatures returns a slice of installed features

func (*ClassicCluster) ListMasters added in v22.11.8

func (instance *ClassicCluster) ListMasters(ctx context.Context) (list resources.IndexedListOfClusterNodes, ferr fail.Error)

ListMasters lists the node instances corresponding to masters (if there is such masters in the flavor...)

func (*ClassicCluster) ListNodeNames added in v22.11.8

func (instance *ClassicCluster) ListNodeNames(ctx context.Context) (list data.IndexedListOfStrings, ferr fail.Error)

ListNodeNames lists the names of the nodes in the ClassicCluster

func (*ClassicCluster) ListNodes added in v22.11.8

func (instance *ClassicCluster) ListNodes(ctx context.Context) (list resources.IndexedListOfClusterNodes, ferr fail.Error)

ListNodes lists node instances corresponding to the nodes in the ClassicCluster satisfies interface ClassicCluster.Controller

func (*ClassicCluster) RegisterFeature added in v22.11.8

func (instance *ClassicCluster) RegisterFeature(
	ctx context.Context, feat resources.Feature, requiredBy resources.Feature, clusterContext bool,
) (ferr fail.Error)

RegisterFeature registers an installed Feature in metadata of a ClassicCluster satisfies interface resources.Targetable

func (*ClassicCluster) RemoveFeature added in v22.11.8

func (instance *ClassicCluster) RemoveFeature(
	ctx context.Context, name string, vars data.Map, settings resources.FeatureSettings,
) (resources.Results, fail.Error)

RemoveFeature uninstalls a feature from the ClassicCluster

func (*ClassicCluster) Sdump added in v22.11.8

func (instance *ClassicCluster) Sdump(ctx context.Context) (_ string, ferr fail.Error)

func (*ClassicCluster) Shrink added in v22.11.8

func (instance *ClassicCluster) Shrink(ctx context.Context, cluName string, count uint) (_ []*propertiesv3.ClusterNode, ferr fail.Error)

Shrink reduces cluster size by 'count' nodes

func (*ClassicCluster) Start added in v22.11.8

func (instance *ClassicCluster) Start(ctx context.Context) (ferr fail.Error)

Start starts the ClassicCluster

func (*ClassicCluster) Stop added in v22.11.8

func (instance *ClassicCluster) Stop(ctx context.Context) (ferr fail.Error)

Stop stops the ClassicCluster

func (*ClassicCluster) TargetType added in v22.11.8

func (instance *ClassicCluster) TargetType() featuretargettype.Enum

TargetType returns the type of the target

satisfies resources.Targetable interface

func (*ClassicCluster) ToProtocol added in v22.11.8

func (instance *ClassicCluster) ToProtocol(ctx context.Context) (_ *protocol.ClusterResponse, ferr fail.Error)

ToProtocol converts instance to protocol.ClusterResponse message

func (*ClassicCluster) UnregisterFeature added in v22.11.8

func (instance *ClassicCluster) UnregisterFeature(inctx context.Context, feat string) (ferr fail.Error)

UnregisterFeature unregisters a Feature from ClassicCluster metadata satisfies interface resources.Targetable

type ClusterCreationParameters added in v22.11.9

type ClusterCreationParameters struct {
	Name             string `json:"Name"`
	Identity         string `json:"Identity"`
	Flavor           uint   `json:"Flavor"`
	Complexity       uint   `json:"Complexity"`
	Cidr             string `json:"Cidr"`
	Nodes            uint   `json:"Nodes"`
	Masters          uint   `json:"Masters"`
	DefaultGateway   string `json:"DefaultGateway"`
	OperatorUsername string `json:"OperatorUsername"`
	GwTemplate       string `json:"GwTemplate"`
	NodeTemplate     string `json:"NodeTemplate"`
	MasterTemplate   string `json:"MasterTemplate"`

	CreationDate string `json:"CreationDate"`

	GwDiskSize     uint `json:"GwDiskSize"`
	NodeDiskSize   uint `json:"NodeDiskSize"`
	MasterDiskSize uint `json:"MasterDiskSize"`

	GwOsPublisher string `json:"GwOsPublisher"`
	GwOsOffer     string `json:"GwOsOffer"`
	GwOsSku       string `json:"GwOsSku"`
	GwOsVersion   string `json:"GwOsVersion"`

	NodeOsPublisher string `json:"NodeOsPublisher"`
	NodeOsOffer     string `json:"NodeOsOffer"`
	NodeOsSku       string `json:"NodeOsSku"`
	NodeOsVersion   string `json:"NodeOsVersion"`

	MasterOsPublisher string `json:"MasterOsPublisher"`
	MasterOsOffer     string `json:"MasterOsOffer"`
	MasterOsSku       string `json:"MasterOsSku"`
	MasterOsVersion   string `json:"MasterOsVersion"`
	Region            string `json:"Region"`
}

type ClusterSizing added in v22.11.9

type ClusterSizing struct {
	NumGateways   uint
	NumNodes      uint
	NumMasters    uint
	SizingGateway *abstract.HostSizingRequirements
	SizingNode    *abstract.HostSizingRequirements
	SizingMaster  *abstract.HostSizingRequirements
}

type ConditionedFeatureParameter

type ConditionedFeatureParameter struct {
	FeatureParameter
	// contains filtered or unexported fields
}

ConditionedFeatureParameter describes a Feature prepared for use on a Target

func NewConditionedFeatureParameter

func NewConditionedFeatureParameter(parameter FeatureParameter, value *string) (ConditionedFeatureParameter, fail.Error)

NewConditionedFeatureParameter creates an instance of ConditionedFeatureParameter from FeatureParameter and sets the current value

func (ConditionedFeatureParameter) Value

func (cfp ConditionedFeatureParameter) Value() string

Value returns the current value of the parameter

type ConditionedFeatureParameters

type ConditionedFeatureParameters map[string]ConditionedFeatureParameter

func (ConditionedFeatureParameters) ToMap

ToMap converts a ConditionedFeatureParameters to a data.Map (to be used in template)

type Config added in v22.11.9

type Config struct {
	LogLevel string `hcl:"log_level"`
}

type ConfigInt added in v22.11.9

type ConfigInt struct {
	Threshold int `hcl:"power"`
}

type Feature

type Feature struct {
	// contains filtered or unexported fields
}

Feature contains the information about a FeatureFile to be installed

func NewEmbeddedFeature

func NewEmbeddedFeature(ctx context.Context, svc iaas.Service, name string) (_ *Feature, ferr fail.Error)

NewEmbeddedFeature searches for an embedded featured named 'name' and initializes a new Feature object with its content

func (*Feature) Add

func (instance *Feature) Add(ctx context.Context, target resources.Targetable, v data.Map, s resources.FeatureSettings) (_ resources.Results, ferr fail.Error)

Add installs the Feature on the target Installs succeeds if error == nil and Results.Successful() is true

func (*Feature) Applicable

func (instance *Feature) Applicable(ctx context.Context, tg resources.Targetable) (bool, fail.Error)

Applicable tells if the Feature is installable on the target

func (*Feature) Check

func (instance *Feature) Check(ctx context.Context, target resources.Targetable, v data.Map, s resources.FeatureSettings) (_ resources.Results, ferr fail.Error)

Check if Feature is installed on target Check is ok if error is nil and Results.Successful() is true

func (*Feature) Clone

func (instance *Feature) Clone() (data.Clonable, error)

Clone ... satisfies interface data.Clonable

func (*Feature) ClusterSizingRequirements

func (instance *Feature) ClusterSizingRequirements() (map[string]interface{}, fail.Error)

ClusterSizingRequirements returns the cluster sizing requirements for all flavors FIXME: define a type to return instead of a map[string]interface{}

func (*Feature) ClusterSizingRequirementsForFlavor

func (instance *Feature) ClusterSizingRequirementsForFlavor(flavor string) (map[string]interface{}, fail.Error)

ClusterSizingRequirementsForFlavor returns the cluster sizing requirements for specified flavors returns:

  • nil, nil: no sizing requirements defined for the flavor
  • map[string]interface{}, nil: sizing requirements defined for the flavor
  • nil, *fail.ErrInvalidInstance: called from a null valued instance

FIXME: define a type to return instead of a map[string]interface{}

func (*Feature) ConditionParameters added in v22.11.3

func (instance *Feature) ConditionParameters(ctx context.Context, externals data.Map, target resources.Targetable) fail.Error

ConditionParameters inits if needed the Feature parameters conditioned for final use Returned error may be:

  • nil: everything went well
  • fail.InvalidRequestError: a required parameter is missing (value not provided in externals and no default value defined)

func (*Feature) Dependencies

func (instance *Feature) Dependencies(_ context.Context) (map[string]struct{}, fail.Error)

Dependencies returns a list of features needed as dependencies

func (*Feature) GetDisplayFilename

func (instance *Feature) GetDisplayFilename(_ context.Context) string

GetDisplayFilename returns the filename of the Feature definition, beautifulled, with error handling

func (*Feature) GetFilename

func (instance *Feature) GetFilename(_ context.Context) (string, fail.Error)

GetFilename returns the filename of the Feature definition, with error handling

func (*Feature) GetID

func (instance *Feature) GetID() (string, error)

GetID ...

func (*Feature) GetName

func (instance *Feature) GetName() string

GetName returns the display name of the Feature, with error handling

func (*Feature) InstanciateInstallerOfMethod

func (instance *Feature) InstanciateInstallerOfMethod(m installmethod.Enum) Installer

InstanciateInstallerOfMethod instantiates the right installer corresponding to the method

func (*Feature) IsNull

func (instance *Feature) IsNull() bool

IsNull tells if the instance represents a null value

func (Feature) ListParametersWithControl

func (instance Feature) ListParametersWithControl(_ context.Context) []string

ListParametersWithControl returns a slice of parameter names that have control script

func (Feature) PrepareParameters added in v22.11.3

func (instance Feature) PrepareParameters(ctx context.Context, externals data.Map, target resources.Targetable) (data.Map, fail.Error)

prepareConditionedParameters builds a map of strings with final value set, picking it from externals if provided (otherwise, default value is set) Returned error may be:

  • nil: everything went well
  • fail.InvalidRequestError: a required parameter is missing (value not provided in externals and no default value defined)

func (*Feature) Remove

func (instance *Feature) Remove(ctx context.Context, target resources.Targetable, v data.Map, s resources.FeatureSettings) (_ resources.Results, ferr fail.Error)

Remove uninstalls the Feature from the target

func (*Feature) Replace

func (instance *Feature) Replace(p data.Clonable) (data.Clonable, error)

Replace ... satisfies interface data.Clonable may panic

func (*Feature) Specs

func (instance *Feature) Specs() *viper.Viper

Specs returns a copy of the spec file (we don't want external use to modify Feature.specs)

func (Feature) ToProtocol

func (instance Feature) ToProtocol(ctx context.Context) *protocol.FeatureResponse

ToProtocol converts a Feature to *protocol.FeatureResponse

type FeatureFile

type FeatureFile struct {
	// contains filtered or unexported fields
}

FeatureFile contains the information about an installable Feature

func LoadFeatureFile

func LoadFeatureFile(inctx context.Context, svc iaas.Service, ref string, emb bool) (*FeatureFile, fail.Error)

func (*FeatureFile) Clone

func (ff *FeatureFile) Clone() (data.Clonable, error)

Clone ... satisfies interface data.Clonable

func (*FeatureFile) DisplayFilename

func (ff *FeatureFile) DisplayFilename() string

DisplayFilename returns the filename of the Feature definition, beautifulled, with error handling

func (*FeatureFile) Filename

func (ff *FeatureFile) Filename() string

Filename returns the filename of the Feature definition, with error handling

func (*FeatureFile) GetID

func (ff *FeatureFile) GetID() (string, error)

GetID ...

func (*FeatureFile) GetName

func (ff *FeatureFile) GetName() string

GetName returns the display name of the Feature, with error handling

func (*FeatureFile) IsNull

func (ff *FeatureFile) IsNull() bool

IsNull tells if the instance represents a null value

func (*FeatureFile) Replace

func (ff *FeatureFile) Replace(p data.Clonable) (data.Clonable, error)

Replace ... satisfies interface data.Clonable may panic

func (*FeatureFile) Specs

func (ff *FeatureFile) Specs() *viper.Viper

Specs returns a copy of the spec file (we don't want external use to modify Feature.specs)

type FeatureParameter

type FeatureParameter struct {
	// contains filtered or unexported fields
}

FeatureParameter describes a Feature parameter as defined by Feature file content

func NewFeatureParameter

func NewFeatureParameter(name, description string, hasDefault bool, defaultValue string, hasValueControl bool, valueControlCode string) (FeatureParameter, fail.Error)

NewFeatureParameter initiales an new instance of FeatureParameter

func (FeatureParameter) DefaultValue

func (fp FeatureParameter) DefaultValue() (string, bool)

DefaultValue returns the default value of the parameter

func (FeatureParameter) Description

func (fp FeatureParameter) Description() string

Description returns the description of the parameter

func (FeatureParameter) HasDefaultValue

func (fp FeatureParameter) HasDefaultValue() bool

HasDefaultValue tells if the parameter has a default value

func (FeatureParameter) HasValueControl

func (fp FeatureParameter) HasValueControl() bool

HasValueControl tells if the parameter has a value control

func (FeatureParameter) Name

func (fp FeatureParameter) Name() string

Name returns the name of the parameter

func (FeatureParameter) ValueControlCode

func (fp FeatureParameter) ValueControlCode() (string, bool)

ValueControlCode returns the bash code to control the value

type FolderDecoderCallback

type FolderDecoderCallback func([]byte) fail.Error

FolderDecoderCallback is the prototype of the function that will decode data read from Metadata

type Host

type Host struct {
	*MetadataCore
}

Host ... follows interface resources.Host

func NewHost

func NewHost(svc iaas.Service) (_ *Host, ferr fail.Error)

NewHost ...

func (*Host) AddFeature

func (instance *Host) AddFeature(ctx context.Context, name string, vars data.Map, settings resources.FeatureSettings) (outcomes resources.Results, ferr fail.Error)

AddFeature handles 'safescale host feature add <host name or id> <feature name>'

func (*Host) BindLabel

func (instance *Host) BindLabel(ctx context.Context, labelInstance resources.Label, value string) (ferr fail.Error)

BindLabel binds a Label to Host

func (*Host) BindSecurityGroup

func (instance *Host) BindSecurityGroup(ctx context.Context, sgInstance resources.SecurityGroup, enable resources.SecurityGroupActivation) (ferr fail.Error)

BindSecurityGroup binds a security group to the Host; if enabled is true, apply it immediately

func (*Host) Browse

func (instance *Host) Browse(ctx context.Context, callback func(*abstract.HostCore) fail.Error) (ferr fail.Error)

Browse walks through Host MetadataFolder and executes a callback for each entry

func (*Host) CheckFeature

func (instance *Host) CheckFeature(ctx context.Context, name string, vars data.Map, settings resources.FeatureSettings) (_ resources.Results, ferr fail.Error)

CheckFeature ...

func (*Host) ComplementFeatureParameters

func (instance *Host) ComplementFeatureParameters(ctx context.Context, v data.Map) (ferr fail.Error)

ComplementFeatureParameters configures parameters that are appropriate for the target satisfies interface install.Targetable

func (*Host) Create

func (instance *Host) Create(inctx context.Context, hostReq abstract.HostRequest, hostDef abstract.HostSizingRequirements, extra interface{}) (_ *userdata.Content, ferr fail.Error)

Create creates a new Host and its metadata If the metadata is already carrying a Host, returns fail.ErrNotAvailable In case of error occurring after Host resource creation, 'instance' still contains ID of the Host created. This can be used to defer Host deletion in case of error

func (*Host) Delete

func (instance *Host) Delete(ctx context.Context) (ferr fail.Error)

Delete deletes a Host with its metadata and updates subnet links

func (*Host) DeleteFeature

func (instance *Host) DeleteFeature(inctx context.Context, name string, vars data.Map, settings resources.FeatureSettings) (_ resources.Results, ferr fail.Error)

DeleteFeature handles 'safescale host delete-feature <host name> <feature name>'

func (*Host) DisableSecurityGroup

func (instance *Host) DisableSecurityGroup(ctx context.Context, sgInstance resources.SecurityGroup) (ferr fail.Error)

DisableSecurityGroup disables a bound security group to Host

func (*Host) EnableSecurityGroup

func (instance *Host) EnableSecurityGroup(ctx context.Context, sg resources.SecurityGroup) (ferr fail.Error)

EnableSecurityGroup enables a bound security group to Host by applying its rules

func (*Host) Exists

func (instance *Host) Exists(ctx context.Context) (_ bool, ferr fail.Error)

Exists checks if the resource actually exists in provider side (not in stow metadata)

func (*Host) ForceGetState

func (instance *Host) ForceGetState(ctx context.Context) (state hoststate.Enum, ferr fail.Error)

ForceGetState returns the current state of the provider Host then alter metadata

func (*Host) GetAccessIP

func (instance *Host) GetAccessIP(ctx context.Context) (_ string, ferr fail.Error)

GetAccessIP returns the IP to reach the Host

func (*Host) GetDefaultSubnet

func (instance *Host) GetDefaultSubnet(ctx context.Context) (subnetInstance resources.Subnet, ferr fail.Error)

GetDefaultSubnet returns the Networking instance corresponding to Host default subnet

func (*Host) GetMounts

func (instance *Host) GetMounts(ctx context.Context) (mounts *propertiesv1.HostMounts, ferr fail.Error)

GetMounts returns the information abouts the mounts of the Host

func (*Host) GetPrivateIP

func (instance *Host) GetPrivateIP(_ context.Context) (_ string, ferr fail.Error)

GetPrivateIP returns the private IP of the Host on its default Networking

func (*Host) GetPrivateIPOnSubnet

func (instance *Host) GetPrivateIPOnSubnet(ctx context.Context, subnetID string) (_ string, ferr fail.Error)

GetPrivateIPOnSubnet returns the private IP of the Host on its default Subnet

func (*Host) GetPublicIP

func (instance *Host) GetPublicIP(_ context.Context) (_ string, ferr fail.Error)

GetPublicIP returns the public IP address of the Host

func (*Host) GetSSHConfig

func (instance *Host) GetSSHConfig(ctx context.Context) (_ sshapi.Config, ferr fail.Error)

GetSSHConfig loads SSH configuration for Host from metadata

func (*Host) GetShare

func (instance *Host) GetShare(ctx context.Context, shareRef string) (_ *propertiesv1.HostShare, ferr fail.Error)

GetShare returns a clone of the propertiesv1.HostShare corresponding to share 'shareRef'

func (*Host) GetShares

func (instance *Host) GetShares(ctx context.Context) (shares *propertiesv1.HostShares, ferr fail.Error)

GetShares returns the information about the shares hosted by the Host

func (*Host) GetState

func (instance *Host) GetState(ctx context.Context) (hoststate.Enum, fail.Error)

GetState returns the last known state of the Host, without forced inspect

func (*Host) GetVolumes

func (instance *Host) GetVolumes(ctx context.Context) (_ *propertiesv1.HostVolumes, ferr fail.Error)

GetVolumes returns information about volumes attached to the Host

func (*Host) InstallMethods

func (instance *Host) InstallMethods(_ context.Context) (map[uint8]installmethod.Enum, fail.Error)

InstallMethods returns a list of installation methods usable on the target, ordered from upper to lower preference (1 = highest preference) satisfies interface install.Targetable

func (*Host) InstalledFeatures

func (instance *Host) InstalledFeatures(ctx context.Context) ([]string, fail.Error)

InstalledFeatures returns a slice of installed features satisfies interface resources.Targetable

func (*Host) IsClusterMember

func (instance *Host) IsClusterMember(ctx context.Context) (yes bool, ferr fail.Error)

IsClusterMember returns true if the Host is member of a cluster

func (*Host) IsFeatureInstalled

func (instance *Host) IsFeatureInstalled(ctx context.Context, name string) (found bool, ferr fail.Error)

IsFeatureInstalled ...

func (*Host) IsGateway

func (instance *Host) IsGateway(ctx context.Context) (_ bool, ferr fail.Error)

IsGateway tells if the Host acts as a gateway for a Subnet

func (*Host) IsNull

func (instance *Host) IsNull() bool

IsNull ...

func (*Host) IsSingle

func (instance *Host) IsSingle(ctx context.Context) (_ bool, ferr fail.Error)

IsSingle tells if the Host is single

func (*Host) ListEligibleFeatures

func (instance *Host) ListEligibleFeatures(ctx context.Context) (_ []resources.Feature, ferr fail.Error)

ListEligibleFeatures returns a slice of features eligible to ClassicCluster

func (*Host) ListInstalledFeatures

func (instance *Host) ListInstalledFeatures(ctx context.Context) (_ []resources.Feature, ferr fail.Error)

ListInstalledFeatures returns a slice of installed features

func (*Host) ListLabels

func (instance *Host) ListLabels(ctx context.Context) (_ map[string]string, ferr fail.Error)

ListLabels lists Labels bound to Host

func (*Host) ListSecurityGroups

func (instance *Host) ListSecurityGroups(ctx context.Context, state securitygroupstate.Enum) (list []*propertiesv1.SecurityGroupBond, ferr fail.Error)

ListSecurityGroups returns a slice of security groups bound to Host

func (*Host) Pull

func (instance *Host) Pull(ctx context.Context, target, source string, timeout time.Duration) (_ int, _ string, _ string, ferr fail.Error)

Pull downloads a file from Host

func (*Host) Push

func (instance *Host) Push(
	ctx context.Context, source, target, owner, mode string, timeout time.Duration,
) (_ int, _ string, _ string, ferr fail.Error)

Push uploads a file to Host

func (*Host) PushStringToFileWithOwnership

func (instance *Host) PushStringToFileWithOwnership(
	ctx context.Context, content string, filename string, owner, mode string,
) (ferr fail.Error)

PushStringToFileWithOwnership creates a file 'filename' on remote 'Host' with the content 'content', and apply ownership

func (*Host) Reboot

func (instance *Host) Reboot(ctx context.Context, soft bool) (ferr fail.Error)

Reboot reboots the Host

func (*Host) RegisterFeature

func (instance *Host) RegisterFeature(ctx context.Context, feat resources.Feature, requiredBy resources.Feature, clusterContext bool) (ferr fail.Error)

RegisterFeature registers an installed Feature in metadata of Host

func (*Host) RelaxedDeleteHost

func (instance *Host) RelaxedDeleteHost(ctx context.Context) (ferr fail.Error)

RelaxedDeleteHost is the method that really deletes a host, being a gateway or not

func (*Host) Reload

func (instance *Host) Reload(ctx context.Context) (ferr fail.Error)

Reload reloads Host from metadata and current Host state on provider state

func (*Host) ResetLabel

func (instance *Host) ResetLabel(ctx context.Context, labelInstance resources.Label) (ferr fail.Error)

ResetLabel resets the value of Label bound with Host to default value of Label

func (*Host) Run

func (instance *Host) Run(ctx context.Context, cmd string, outs outputs.Enum, connectionTimeout, executionTimeout time.Duration) (_ int, _ string, _ string, ferr fail.Error)

Run tries to execute command 'cmd' on the Host

func (*Host) Start

func (instance *Host) Start(ctx context.Context) (ferr fail.Error)

Start starts the Host

func (*Host) Stop

func (instance *Host) Stop(ctx context.Context) (ferr fail.Error)

Stop stops the Host

func (*Host) Sync

func (instance *Host) Sync(ctx context.Context) (ferr fail.Error)

func (*Host) TargetType

func (instance *Host) TargetType() featuretargettype.Enum

TargetType returns the type of the target. satisfies install.Targetable interface.

func (*Host) ToProtocol

func (instance *Host) ToProtocol(ctx context.Context) (ph *protocol.Host, ferr fail.Error)

ToProtocol convert a resources.Host to protocol.Host

func (*Host) UnbindLabel

func (instance *Host) UnbindLabel(ctx context.Context, labelInstance resources.Label) (ferr fail.Error)

UnbindLabel removes a Label from Host

func (*Host) UnbindSecurityGroup

func (instance *Host) UnbindSecurityGroup(ctx context.Context, sgInstance resources.SecurityGroup) (ferr fail.Error)

UnbindSecurityGroup unbinds a security group from the Host

func (*Host) UnregisterFeature

func (instance *Host) UnregisterFeature(ctx context.Context, feat string) (ferr fail.Error)

UnregisterFeature unregisters a Feature from ClassicCluster metadata

func (*Host) UpdateLabel

func (instance *Host) UpdateLabel(ctx context.Context, labelInstance resources.Label, value string) (ferr fail.Error)

UpdateLabel resets the value of the Label bound to Host to default value of Label

func (*Host) WaitSSHReady

func (instance *Host) WaitSSHReady(ctx context.Context, timeout time.Duration) (_ string, ferr fail.Error)

WaitSSHReady waits until SSH responds successfully

type InitScriptParameters added in v22.11.9

type InitScriptParameters struct {
	Name             string `json:"Name"`
	Cidr             string `json:"Cidr"`
	Nodes            uint   `json:"Nodes"`
	Masters          uint   `json:"Masters"`
	DefaultGateway   string `json:"DefaultGateway"`
	OperatorUsername string `json:"OperatorUsername"`
	Region           string `json:"Region"`
}

type Installer

type Installer interface {
	Check(context.Context, resources.Feature, resources.Targetable, data.Map, resources.FeatureSettings) (resources.Results, fail.Error)  // checks if a Feature is installed
	Add(context.Context, resources.Feature, resources.Targetable, data.Map, resources.FeatureSettings) (resources.Results, fail.Error)    // executes installation of Feature
	Remove(context.Context, resources.Feature, resources.Targetable, data.Map, resources.FeatureSettings) (resources.Results, fail.Error) // executes deletion of Feature
}

Installer defines the API of an Installer

type Item

type Item struct {
	Local        string
	Remote       string
	RemoteOwner  string
	RemoteRights string
}

Item is a helper struct to ease the copy of local files to remote

func (Item) RemoveRemote

func (rfc Item) RemoveRemote(ctx context.Context, host resources.Host) fail.Error

RemoveRemote deletes the remote file from host

func (Item) Upload

func (rfc Item) Upload(ctx context.Context, host resources.Host) (ferr fail.Error)

Upload transfers the local file to the hostname

func (Item) UploadString

func (rfc Item) UploadString(ctx context.Context, content string, host resources.Host) fail.Error

UploadString transfers the local file to the hostname

type KeyValueTag added in v22.11.9

type KeyValueTag struct {
	Id               string  `json:"Id"`
	Key              string  `json:"Key"`
	Value            *string `json:"Value"`
	WithDefaultValue bool    `json:"WithDefaultValue"`
}

func NewTfLabel added in v22.11.9

func NewTfLabel(key string, value string) (*KeyValueTag, error)

func NewTfTag added in v22.11.9

func NewTfTag(key string) (*KeyValueTag, error)

func (*KeyValueTag) GetId added in v22.11.9

func (t *KeyValueTag) GetId() string

GetId get the Id

func (*KeyValueTag) GetKey added in v22.11.9

func (t *KeyValueTag) GetKey() string

GetKey get the Key

func (*KeyValueTag) GetValue added in v22.11.9

func (t *KeyValueTag) GetValue() (string, error)

GetValue get the Value

func (*KeyValueTag) HasDefaultValue added in v22.11.9

func (t *KeyValueTag) HasDefaultValue() bool

HasDefaultValue get the WithDefaultValue

type KongController

type KongController struct {
	// contains filtered or unexported fields
}

KongController allows to control Kong, installed on a host

func NewKongController

func NewKongController(ctx context.Context, svc iaas.Service, subnet resources.Subnet, addressPrimaryGateway bool) (*KongController, fail.Error)

NewKongController creates a controller for Kong

func (*KongController) Apply

func (k *KongController) Apply(ctx context.Context, rule map[interface{}]interface{}, values *data.Map) (string, fail.Error)

Apply applies the rule to Kong proxy Currently, support rule types 'service', 'route' and 'upstream' Returns rule name and error

func (*KongController) GetHostname

func (k *KongController) GetHostname() string

GetHostname returns the name of the Host that corresponds to this instance

type MetadataCore

type MetadataCore struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

MetadataCore contains the core functions of a persistent object

func NewCore

func NewCore(svc iaas.Service, kind string, path string, instance data.Clonable) (_ *MetadataCore, ferr fail.Error)

NewCore creates an instance of MetadataCore

func (*MetadataCore) Alter

func (myself *MetadataCore) Alter(inctx context.Context, callback resources.Callback) (rerr fail.Error)

Alter protects the data for exclusive write Valid keyvalues for options are : - "Reload": bool = allow disabling reloading from Object Storage if set to false (default is true)

func (*MetadataCore) BrowseFolder

func (myself *MetadataCore) BrowseFolder(inctx context.Context, callback func(buf []byte) fail.Error) (_ fail.Error)

BrowseFolder walks through MetadataFolder and executes a callback for each entry

func (*MetadataCore) Carry

func (myself *MetadataCore) Carry(inctx context.Context, clonable data.Clonable) (rerr fail.Error)

Carry links metadata with real data If c is already carrying a shielded data, returns fail.NotAvailableError

errors returned : - fail.ErrInvalidInstance - fail.ErrInvalidParameter - fail.ErrNotAvailable if the MetadataCore instance already carries a data

func (*MetadataCore) Delete

func (myself *MetadataCore) Delete(inctx context.Context) (_ fail.Error)

Delete deletes the metadata

func (*MetadataCore) Deserialize

func (myself *MetadataCore) Deserialize(inctx context.Context, buf []byte) fail.Error

Deserialize reads json code and reinstantiates

func (*MetadataCore) GetID

func (myself *MetadataCore) GetID() (string, error)

GetID returns the id of the data protected satisfies interface data.Identifiable

func (*MetadataCore) GetKind

func (myself *MetadataCore) GetKind() string

GetKind returns the kind of object served

func (*MetadataCore) GetName

func (myself *MetadataCore) GetName() string

GetName returns the name of the data protected satisfies interface data.Identifiable

func (*MetadataCore) Inspect

func (myself *MetadataCore) Inspect(inctx context.Context, callback resources.Callback) (rerr fail.Error)

Inspect protects the data for shared read

func (*MetadataCore) IsNull

func (myself *MetadataCore) IsNull() bool

IsNull returns true if the MetadataCore instance represents the null value for MetadataCore

func (*MetadataCore) IsTaken

func (myself *MetadataCore) IsTaken() bool

func (*MetadataCore) IsValid

func (myself *MetadataCore) IsValid() (bool, fail.Error)

func (*MetadataCore) Read

func (myself *MetadataCore) Read(inctx context.Context, ref string) (_ fail.Error)

Read gets the data from Object Storage

func (*MetadataCore) ReadByID

func (myself *MetadataCore) ReadByID(inctx context.Context, id string) (_ fail.Error)

ReadByID reads a metadata identified by ID from Object Storage

func (*MetadataCore) Reload

func (myself *MetadataCore) Reload(inctx context.Context) (ferr fail.Error)

Reload reloads the content from the Object Storage

func (*MetadataCore) Sdump

func (myself *MetadataCore) Sdump(inctx context.Context) (string, fail.Error)

func (*MetadataCore) Service

func (myself *MetadataCore) Service() iaas.Service

Service returns the iaas.Service used to create/load the persistent object

type MetadataFolder

type MetadataFolder struct {
	// contains filtered or unexported fields
}

MetadataFolder describes a metadata MetadataFolder

func NewMetadataFolder

func NewMetadataFolder(svc iaas.Service, path string) (MetadataFolder, fail.Error)

NewMetadataFolder creates a new Metadata MetadataFolder object, ready to help access the metadata inside it

func (MetadataFolder) Browse

func (instance MetadataFolder) Browse(ctx context.Context, path string, callback FolderDecoderCallback) fail.Error

Browse browses the content of a specific path in Metadata and executes 'callback' on each entry

func (MetadataFolder) Delete

func (instance MetadataFolder) Delete(ctx context.Context, path string, name string) fail.Error

Delete removes metadata passed as parameter

func (MetadataFolder) GetBucket

GetBucket returns the bucket used by the MetadataFolder to store Object Storage

func (*MetadataFolder) IsNull

func (instance *MetadataFolder) IsNull() bool

IsNull tells if the MetadataFolder instance should be considered as a null value

func (MetadataFolder) Lookup

func (instance MetadataFolder) Lookup(ctx context.Context, path string, name string) fail.Error

Lookup tells if the object named 'name' is inside the ObjectStorage MetadataFolder

func (MetadataFolder) Path

func (instance MetadataFolder) Path() string

Path returns the base path of the MetadataFolder

func (MetadataFolder) Read

func (instance MetadataFolder) Read(ctx context.Context, path string, name string, callback func([]byte) fail.Error, options ...datadef.ImmutableKeyValue) fail.Error

Read loads the content of the object stored in metadata bucket returns true, nil if the object has been found returns false, fail.Error if an error occurred (including object not found) The callback function has to know how to decode it and where to store the result

func (MetadataFolder) Service

func (instance MetadataFolder) Service() iaas.Service

Service returns the service used by the MetadataFolder

func (MetadataFolder) Write

func (instance MetadataFolder) Write(ctx context.Context, path string, name string, content []byte, options ...datadef.ImmutableKeyValue) fail.Error

Write writes the content in Object Storage, and check the write operation is committed. Returns nil on success (with assurance the write operation has been committed on remote side) May return fail.ErrTimeout if the read-after-write operation timed out. Return any other errors that can occur from the remote side

type MetadataFolderLike

type MetadataFolderLike interface {
	IsNull() bool
	Service() iaas.Service
	GetBucket(ctx context.Context) (abstract.ObjectStorageBucket, fail.Error)
	Path() string
	Lookup(ctx context.Context, path string, name string) fail.Error
	Delete(ctx context.Context, path string, name string) fail.Error
	Read(ctx context.Context, path string, name string, callback func([]byte) fail.Error, options ...data.ImmutableKeyValue) fail.Error
	Write(ctx context.Context, path string, name string, content []byte, options ...data.ImmutableKeyValue) fail.Error
	Browse(ctx context.Context, path string, callback FolderDecoderCallback) fail.Error
}

type Network

type Network struct {
	*MetadataCore
}

Network links Object Storage MetadataFolder and Networking

func (*Network) AbandonSubnet

func (instance *Network) AbandonSubnet(ctx context.Context, subnetID string) (ferr fail.Error)

AbandonSubnet unregisters a Subnet from the Network (does not imply the Subnet is deleted)

func (*Network) AdoptSubnet

func (instance *Network) AdoptSubnet(ctx context.Context, subnet resources.Subnet) (ferr fail.Error)

AdoptSubnet registers a Subnet to the Network metadata

func (*Network) Browse

func (instance *Network) Browse(ctx context.Context, callback func(*abstract.Network) fail.Error) (ferr fail.Error)

Browse walks through all the metadata objects in subnet

func (*Network) Create

func (instance *Network) Create(inctx context.Context, req *abstract.NetworkRequest, snreq *abstract.SubnetRequest) (_ fail.Error)

Create creates a Network returns:

  • *fail.ErrInvalidParameter: one parameter is invalid
  • *failErrInvalidInstance: Create() is called from bad instance (nil or null value)
  • *fail.ErrNotAvailable: a Network with the same name is currently created
  • *fail.ErrDuplicate: a Network with the same name already exist on Provider Side (managed or not by SafeScale)
  • *fail.ErrAborted: abort signal has been received

func (*Network) Delete

func (instance *Network) Delete(inctx context.Context) (ferr fail.Error)

Delete deletes subnet

func (*Network) Exists

func (instance *Network) Exists(ctx context.Context) (_ bool, ferr fail.Error)

Exists checks if the resource actually exists in provider side (not in stow metadata)

func (*Network) GetCIDR

func (instance *Network) GetCIDR(ctx context.Context) (cidr string, ferr fail.Error)

GetCIDR returns the CIDR of the subnet

func (*Network) InspectSubnet

func (instance *Network) InspectSubnet(ctx context.Context, ref string) (_ resources.Subnet, ferr fail.Error)

InspectSubnet returns the instance of resources.Subnet corresponding to the subnet referenced by 'ref' attached to the subnet

func (*Network) IsNull

func (instance *Network) IsNull() bool

IsNull tells if the instance corresponds to subnet Null Value

func (*Network) ToProtocol

func (instance *Network) ToProtocol(ctx context.Context) (out *protocol.Network, ferr fail.Error)

ToProtocol converts resources.Network to protocol.Network

type NetworkCreationParameters added in v22.11.9

type NetworkCreationParameters struct {
	Name           string `json:"Name"`
	Identity       string `json:"Identity"`
	CreationDate   string `json:"CreationDate"`
	Cidr           string `json:"Cidr"`
	Masters        uint   `json:"Masters"`
	DefaultGateway string `json:"DefaultGateway"`
	Region         string `json:"Region"`
	GwTemplate     string `json:"GwTemplate"`
	MasterTemplate string `json:"MasterTemplate"`

	GwDiskSize     uint `json:"GwDiskSize"`
	MasterDiskSize uint `json:"MasterDiskSize"`

	GwOsPublisher string `json:"GwOsPublisher"`
	GwOsOffer     string `json:"GwOsOffer"`
	GwOsSku       string `json:"GwOsSku"`
	GwOsVersion   string `json:"GwOsVersion"`

	MasterOsPublisher string `json:"MasterOsPublisher"`
	MasterOsOffer     string `json:"MasterOsOffer"`
	MasterOsSku       string `json:"MasterOsSku"`
	MasterOsVersion   string `json:"MasterOsVersion"`
	OperatorUsername  string `json:"OperatorUsername"`
}

type Option added in v22.11.9

type Option func(clu *resources.Cluster) error

type RemoteFilesHandler

type RemoteFilesHandler struct {
	// contains filtered or unexported fields
}

RemoteFilesHandler handles the copy of files and cleanup

func (*RemoteFilesHandler) Add

func (rfh *RemoteFilesHandler) Add(file *Item)

Add adds an Item in the handler

func (*RemoteFilesHandler) Cleanup

func (rfh *RemoteFilesHandler) Cleanup(ctx context.Context, host resources.Host) fail.Error

Cleanup executes the removal of remote files. NOTE: Removal of local files is the responsibility of the caller, not the RemoteFilesHandler. TODO: allow to cleanup on many hosts

func (*RemoteFilesHandler) Count

func (rfh *RemoteFilesHandler) Count() uint

Count returns the number of files in the handler

func (*RemoteFilesHandler) Upload

func (rfh *RemoteFilesHandler) Upload(ctx context.Context, host resources.Host) fail.Error

Upload executes the copy of files TODO: allow to upload to many hosts

type ResourcesRepository added in v22.11.9

type ResourcesRepository[T any] interface {
	Create(ctx context.Context, data T) error
	Read(ctx context.Context, id string) (*T, error)
	Update(ctx context.Context, id string, data T) error
	Delete(ctx context.Context, id string) error
}

type ResourcesRepositoryImpl added in v22.11.9

type ResourcesRepositoryImpl[T any] struct {
	// contains filtered or unexported fields
}

func (ResourcesRepositoryImpl[T]) Create added in v22.11.9

func (r ResourcesRepositoryImpl[T]) Create(ctx context.Context, data T) error

func (ResourcesRepositoryImpl[T]) Delete added in v22.11.9

func (r ResourcesRepositoryImpl[T]) Delete(ctx context.Context, id string) error

func (ResourcesRepositoryImpl[T]) Read added in v22.11.9

func (r ResourcesRepositoryImpl[T]) Read(ctx context.Context, id string) (*T, error)

func (ResourcesRepositoryImpl[T]) Update added in v22.11.9

func (r ResourcesRepositoryImpl[T]) Update(ctx context.Context, id string, data T) error

type SecurityGroup

type SecurityGroup struct {
	*MetadataCore
}

SecurityGroup ... follows interface resources.SecurityGroup

func LoadSecurityGroup

func LoadSecurityGroup(inctx context.Context, svc iaas.Service, ref string) (*SecurityGroup, fail.Error)

func NewSecurityGroup

func NewSecurityGroup(svc iaas.Service) (*SecurityGroup, fail.Error)

NewSecurityGroup ...

func (*SecurityGroup) AddRule

func (instance *SecurityGroup) AddRule(ctx context.Context, rule *abstract.SecurityGroupRule) (ferr fail.Error)

AddRule adds a rule to a security group

func (*SecurityGroup) AddRules

func (instance *SecurityGroup) AddRules(ctx context.Context, rules abstract.SecurityGroupRules) (ferr fail.Error)

AddRules adds rules to a Security Group

func (*SecurityGroup) BindToHost

func (instance *SecurityGroup) BindToHost(
	ctx context.Context, hostInstance resources.Host, enable resources.SecurityGroupActivation,
	mark resources.SecurityGroupMark,
) (ferr fail.Error)

BindToHost binds the security group to a host.

func (*SecurityGroup) BindToSubnet

func (instance *SecurityGroup) BindToSubnet(
	ctx context.Context, subnetInstance resources.Subnet, enable resources.SecurityGroupActivation,
	mark resources.SecurityGroupMark,
) (ferr fail.Error)

BindToSubnet binds the security group to a host This method assumes the Subnet is not called while the Subnet is currently locked (otherwise will deadlock...)

func (*SecurityGroup) Browse

func (instance *SecurityGroup) Browse(
	ctx context.Context, callback func(*abstract.SecurityGroup) fail.Error,
) (ferr fail.Error)

Browse walks through SecurityGroup MetadataFolder and executes a callback for each entry

func (*SecurityGroup) Clear

func (instance *SecurityGroup) Clear(ctx context.Context) (ferr fail.Error)

Clear removes all rules from a security group

func (*SecurityGroup) Create

func (instance *SecurityGroup) Create(
	inctx context.Context, networkID, name, description string, rules abstract.SecurityGroupRules,
) (_ fail.Error)

Create creates a new SecurityGroup and its metadata. If needed by Cloud Provider, the Security Group will be attached to Network identified by 'networkID' (otherwise this parameter is ignored) If the metadata is already carrying a SecurityGroup, returns fail.ErrNotAvailable

func (*SecurityGroup) Delete

func (instance *SecurityGroup) Delete(ctx context.Context, force bool) (ferr fail.Error)

Delete deletes a Security Group

func (*SecurityGroup) DeleteRule

func (instance *SecurityGroup) DeleteRule(ctx context.Context, rule *abstract.SecurityGroupRule) (ferr fail.Error)

DeleteRule deletes a rule identified by its ID from a security group If rule is not in the security group, returns *fail.ErrNotFound

func (*SecurityGroup) Exists

func (instance *SecurityGroup) Exists(ctx context.Context) (_ bool, ferr fail.Error)

Exists checks if the resource actually exists in provider side (not in stow metadata)

func (*SecurityGroup) GetBoundHosts

func (instance *SecurityGroup) GetBoundHosts(ctx context.Context) (
	_ []*propertiesv1.SecurityGroupBond, ferr fail.Error,
)

GetBoundHosts returns the list of ID of hosts bound to the security group

func (*SecurityGroup) GetBoundSubnets

func (instance *SecurityGroup) GetBoundSubnets(ctx context.Context) (
	list []*propertiesv1.SecurityGroupBond, ferr fail.Error,
)

GetBoundSubnets returns the subnet bound to the security group

func (*SecurityGroup) IsNull

func (instance *SecurityGroup) IsNull() bool

IsNull tests if instance is nil or empty

func (*SecurityGroup) Reset

func (instance *SecurityGroup) Reset(ctx context.Context) (ferr fail.Error)

Reset clears a security group and re-adds associated rules as stored in metadata

func (*SecurityGroup) ToProtocol

func (instance *SecurityGroup) ToProtocol(ctx context.Context) (_ *protocol.SecurityGroupResponse, ferr fail.Error)

ToProtocol converts a Security Group to protobuf message

func (*SecurityGroup) UnbindFromHost

func (instance *SecurityGroup) UnbindFromHost(ctx context.Context, hostInstance resources.Host) (ferr fail.Error)

UnbindFromHost unbinds the security group from a host

func (*SecurityGroup) UnbindFromHostByReference

func (instance *SecurityGroup) UnbindFromHostByReference(ctx context.Context, hostRef string) (ferr fail.Error)

UnbindFromHostByReference unbinds the security group from a host identified by reference (id or name)

func (*SecurityGroup) UnbindFromSubnet

func (instance *SecurityGroup) UnbindFromSubnet(
	ctx context.Context, subnetInstance resources.Subnet,
) (ferr fail.Error)

UnbindFromSubnet unbinds the security group from a subnet

func (*SecurityGroup) UnbindFromSubnetByReference

func (instance *SecurityGroup) UnbindFromSubnetByReference(ctx context.Context, subnetRef string) (ferr fail.Error)

UnbindFromSubnetByReference unbinds the security group from a subnet

type Share

type Share struct {
	*MetadataCore
}

Share contains information to maintain in Object Storage a list of shared folders

func (*Share) Browse

func (instance *Share) Browse(ctx context.Context, callback func(string, string) fail.Error) (ferr fail.Error)

Browse walks through shares MetadataFolder and executes a callback for each entry

func (*Share) Create

func (instance *Share) Create(
	ctx context.Context,
	shareName string,
	server resources.Host, spath string,
	options string,

) (ferr fail.Error)

Create creates a Share on host

func (*Share) Delete

func (instance *Share) Delete(ctx context.Context) (ferr fail.Error)

Delete deletes a Share from server

func (*Share) Exists

func (instance *Share) Exists(ctx context.Context) (bool, fail.Error)

Exists checks if the resource actually exists in provider side (not in stow metadata)

func (*Share) GetServer

func (instance *Share) GetServer(ctx context.Context) (_ resources.Host, ferr fail.Error)

GetServer returns the Host acting as Share server, with error handling

func (*Share) IsNull

func (instance *Share) IsNull() bool

IsNull tells if the instance should be considered as a null value

func (*Share) Mount

func (instance *Share) Mount(ctx context.Context, target resources.Host, spath string, withCache bool) (_ *propertiesv1.HostRemoteMount, ferr fail.Error)

Mount mounts a Share on a local directory of a host returns a clone of the propertiesv1.HostRemoteMount created on success

func (*Share) ToProtocol

func (instance *Share) ToProtocol(ctx context.Context) (_ *protocol.ShareMountList, ferr fail.Error)

ToProtocol transforms a Share into its protobuf representation

func (*Share) Unmount

func (instance *Share) Unmount(ctx context.Context, target resources.Host) (ferr fail.Error)

Unmount unmounts a Share from local directory of a host

type ShareIdentity

type ShareIdentity struct {
	HostID    string `json:"host_id"`    // contains the ID of the host serving the Share
	HostName  string `json:"host_name"`  // contains the name of the host serving the Share
	ShareID   string `json:"share_id"`   // contains the ID of the Share
	ShareName string `json:"share_name"` // contains the name of the Share
}

ShareIdentity contains information about a Share

func (ShareIdentity) Clone

func (si ShareIdentity) Clone() (data.Clonable, error)

Clone ... satisfies interface data.Clonable

func (*ShareIdentity) Deserialize

func (si *ShareIdentity) Deserialize(buf []byte) (ferr fail.Error)

Deserialize ... satisfies interface data.Serializable

func (ShareIdentity) GetID

func (si ShareIdentity) GetID() (string, error)

GetID returns the ID of the Share satisfies interface data.Identifiable

func (ShareIdentity) GetName

func (si ShareIdentity) GetName() string

GetName returns the name of the Share satisfies interface data.Identifiable

func (*ShareIdentity) IsNull

func (si *ShareIdentity) IsNull() bool

IsNull ... satisfies interface data.Clonable

func (*ShareIdentity) Replace

func (si *ShareIdentity) Replace(p data.Clonable) (data.Clonable, error)

Replace ... satisfies interface data.Clonable may panic

func (ShareIdentity) Serialize

func (si ShareIdentity) Serialize() ([]byte, fail.Error)

Serialize ... satisfies interface data.Serializable

type StdResult

type StdResult struct {
	Content     interface{}
	Err         error
	ToBeDeleted bool
}

type Subnet

type Subnet struct {
	*MetadataCore
}

Subnet links Object Storage MetadataFolder and Subnet

func LoadSubnet

func LoadSubnet(inctx context.Context, svc iaas.Service, networkRef, sunetRef string) (*Subnet, fail.Error)

func NewSubnet

func NewSubnet(svc iaas.Service) (_ *Subnet, ferr fail.Error)

NewSubnet creates an instance of Subnet used as resources.Subnet

func (*Subnet) AttachHost

func (instance *Subnet) AttachHost(ctx context.Context, host resources.Host) (ferr fail.Error)

AttachHost links Host to the Subnet

func (*Subnet) BindSecurityGroup

func (instance *Subnet) BindSecurityGroup(ctx context.Context, sgInstance resources.SecurityGroup, enabled resources.SecurityGroupActivation) (ferr fail.Error)

BindSecurityGroup binds a security group to the Subnet; if enabled is true, apply it immediately

func (*Subnet) Browse

func (instance *Subnet) Browse(ctx context.Context, callback func(*abstract.Subnet) fail.Error) (ferr fail.Error)

Browse walks through all the metadata objects in Subnet

func (*Subnet) Carry

func (instance *Subnet) Carry(ctx context.Context, clonable data.Clonable) (ferr fail.Error)

Carry wraps rv.core.Carry() to add Volume to service cache

func (*Subnet) Create

func (instance *Subnet) Create(ctx context.Context, req abstract.SubnetRequest, gwname string, gwSizing *abstract.HostSizingRequirements, extra interface{}) (ferr fail.Error)

Create creates a Subnet

func (*Subnet) CreateSecurityGroups

func (instance *Subnet) CreateSecurityGroups(ctx context.Context, networkInstance resources.Network, keepOnFailure bool, defaultSSHPort int32) (subnetGWSG, subnetInternalSG, subnetPublicIPSG resources.SecurityGroup, ferr fail.Error)

CreateSecurityGroups ...

func (*Subnet) CreateSubnetWithoutGateway

func (instance *Subnet) CreateSubnetWithoutGateway(ctx context.Context, req abstract.SubnetRequest) (ferr fail.Error)

CreateSubnetWithoutGateway creates a Subnet named like 'singleHostName', without gateway

func (*Subnet) Delete

func (instance *Subnet) Delete(inctx context.Context) fail.Error

Delete deletes a Subnet

func (*Subnet) DetachHost

func (instance *Subnet) DetachHost(ctx context.Context, hostID string) (ferr fail.Error)

DetachHost unlinks host ID from Subnet

func (*Subnet) DisableSecurityGroup

func (instance *Subnet) DisableSecurityGroup(ctx context.Context, sgInstance resources.SecurityGroup) (ferr fail.Error)

DisableSecurityGroup disables an already binded security group on Subnet

func (*Subnet) EnableSecurityGroup

func (instance *Subnet) EnableSecurityGroup(ctx context.Context, sgInstance resources.SecurityGroup) (ferr fail.Error)

EnableSecurityGroup enables a binded security group to Subnet

func (*Subnet) Exists

func (instance *Subnet) Exists(ctx context.Context) (_ bool, ferr fail.Error)

Exists checks if the resource actually exists in provider side (not in stow metadata)

func (*Subnet) GetCIDR

func (instance *Subnet) GetCIDR(ctx context.Context) (cidr string, ferr fail.Error)

GetCIDR returns the CIDR of the Subnet

func (*Subnet) GetDefaultRouteIP

func (instance *Subnet) GetDefaultRouteIP(ctx context.Context) (ip string, ferr fail.Error)

GetDefaultRouteIP returns the IP of the LAN default route

func (*Subnet) GetEndpointIP

func (instance *Subnet) GetEndpointIP(ctx context.Context) (_ string, ferr fail.Error)

GetEndpointIP returns the internet (public) IP to reach the Subnet

func (*Subnet) GetGatewayPublicIP

func (instance *Subnet) GetGatewayPublicIP(ctx context.Context, primary bool) (_ string, ferr fail.Error)

GetGatewayPublicIP returns the Public IP of a particular gateway

func (*Subnet) GetGatewayPublicIPs

func (instance *Subnet) GetGatewayPublicIPs(ctx context.Context) (_ []string, ferr fail.Error)

GetGatewayPublicIPs returns a slice of public IP of gateways

func (*Subnet) GetState

func (instance *Subnet) GetState(ctx context.Context) (state subnetstate.Enum, ferr fail.Error)

GetState returns the current state of the Subnet

func (*Subnet) GetVirtualIP

func (instance *Subnet) GetVirtualIP(ctx context.Context) (vip *abstract.VirtualIP, ferr fail.Error)

GetVirtualIP returns an abstract.VirtualIP used by gateway HA

func (*Subnet) HasVirtualIP

func (instance *Subnet) HasVirtualIP(ctx context.Context) (bool, fail.Error)

HasVirtualIP tells if the Subnet uses a VIP a default route

func (*Subnet) InspectGateway

func (instance *Subnet) InspectGateway(ctx context.Context, primary bool) (_ resources.Host, ferr fail.Error)

InspectGateway returns the gateway related to Subnet

func (*Subnet) InspectGatewaySecurityGroup

func (instance *Subnet) InspectGatewaySecurityGroup(ctx context.Context) (_ resources.SecurityGroup, ferr fail.Error)

InspectGatewaySecurityGroup returns the instance of SecurityGroup in Subnet related to external access on gateways

func (*Subnet) InspectInternalSecurityGroup

func (instance *Subnet) InspectInternalSecurityGroup(ctx context.Context) (_ resources.SecurityGroup, ferr fail.Error)

InspectInternalSecurityGroup returns the instance of SecurityGroup for internal security inside the Subnet

func (*Subnet) InspectNetwork

func (instance *Subnet) InspectNetwork(ctx context.Context) (rn resources.Network, ferr fail.Error)

InspectNetwork returns the Network instance owning the Subnet

func (*Subnet) InspectPublicIPSecurityGroup

func (instance *Subnet) InspectPublicIPSecurityGroup(ctx context.Context) (_ resources.SecurityGroup, ferr fail.Error)

InspectPublicIPSecurityGroup returns the instance of SecurityGroup in Subnet for Hosts with Public IP (which does not apply on gateways)

func (*Subnet) IsNull

func (instance *Subnet) IsNull() bool

IsNull tells if the instance is a null value

func (*Subnet) ListHosts

func (instance *Subnet) ListHosts(ctx context.Context) (_ []resources.Host, ferr fail.Error)

ListHosts returns the list of Hosts attached to the Subnet (excluding gateway)

func (*Subnet) ListSecurityGroups

func (instance *Subnet) ListSecurityGroups(ctx context.Context, state securitygroupstate.Enum) (list []*propertiesv1.SecurityGroupBond, ferr fail.Error)

ListSecurityGroups returns a slice of security groups bound to Subnet

func (*Subnet) ToProtocol

func (instance *Subnet) ToProtocol(ctx context.Context) (_ *protocol.Subnet, ferr fail.Error)

ToProtocol converts resources.Network to protocol.Network

func (*Subnet) UnbindSecurityGroup

func (instance *Subnet) UnbindSecurityGroup(ctx context.Context, sgInstance resources.SecurityGroup) (ferr fail.Error)

UnbindSecurityGroup unbinds a security group from the host

type SubnetCreationParameters added in v22.11.9

type SubnetCreationParameters struct {
	Name             string `json:"Name"`
	Identity         string `json:"Identity"`
	Cidr             string `json:"Cidr"`
	Nodes            uint   `json:"Nodes"`
	Masters          uint   `json:"Masters"`
	DefaultGateway   string `json:"DefaultGateway"`
	OperatorUsername string `json:"OperatorUsername"`
	GwTemplate       string `json:"GwTemplate"`
	NodeTemplate     string `json:"NodeTemplate"`
	MasterTemplate   string `json:"MasterTemplate"`

	CreationDate string `json:"CreationDate"`

	GwDiskSize     uint `json:"GwDiskSize"`
	NodeDiskSize   uint `json:"NodeDiskSize"`
	MasterDiskSize uint `json:"MasterDiskSize"`

	GwOsPublisher string `json:"GwOsPublisher"`
	GwOsOffer     string `json:"GwOsOffer"`
	GwOsSku       string `json:"GwOsSku"`
	GwOsVersion   string `json:"GwOsVersion"`

	NodeOsPublisher string `json:"NodeOsPublisher"`
	NodeOsOffer     string `json:"NodeOsOffer"`
	NodeOsSku       string `json:"NodeOsSku"`
	NodeOsVersion   string `json:"NodeOsVersion"`

	MasterOsPublisher string `json:"MasterOsPublisher"`
	MasterOsOffer     string `json:"MasterOsOffer"`
	MasterOsSku       string `json:"MasterOsSku"`
	MasterOsVersion   string `json:"MasterOsVersion"`
	Region            string `json:"Region"`
}

type Tenant

type Tenant struct {
	Name       string
	BucketName string
	Service    iaas.Service
}

Tenant structure to handle name and Service for a tenant

func CurrentTenant

func CurrentTenant(ctx context.Context) *Tenant

CurrentTenant returns the tenant used for commands or, if not set, set the tenant to use if it is the only one registered

func LoadTenant added in v22.11.6

func LoadTenant(ctx context.Context, tenantName string) (*Tenant, error)

LoadTenant sets the tenant to use for upcoming commands

type TerraformCluster added in v22.11.9

type TerraformCluster struct {
	Name       string
	Identity   string
	Complexity clustercomplexity.Enum
	Flavor     clusterflavor.Enum
	// contains filtered or unexported fields
}

func LoadTerraformCluster added in v22.11.9

func LoadTerraformCluster(inctx context.Context, svc iaas.Service, name string) (_ *TerraformCluster, ferr fail.Error)

func NewTerraformCluster added in v22.11.9

func NewTerraformCluster(svc iaas.Service) (*TerraformCluster, fail.Error)

func NewTfCluster added in v22.11.9

func NewTfCluster(inctx context.Context, svc iaas.Service) (_ *TerraformCluster, ferr fail.Error)

func (TerraformCluster) AddFeature added in v22.11.9

func (t TerraformCluster) AddFeature(ctx context.Context, name string, vars data.Map, settings resources.FeatureSettings) (resources.Results, fail.Error)

func (TerraformCluster) AddNodes added in v22.11.9

func (t TerraformCluster) AddNodes(ctx context.Context, name string, count uint, def abstract.HostSizingRequirements, parameters data.Map, keepOnFailure bool) ([]resources.Host, fail.Error)

func (TerraformCluster) Alter added in v22.11.9

func (t TerraformCluster) Alter(ctx context.Context, callback resources.Callback) fail.Error

func (TerraformCluster) Browse added in v22.11.9

func (t TerraformCluster) Browse(ctx context.Context, callback func(*abstract.ClusterIdentity) fail.Error) fail.Error

func (TerraformCluster) BrowseFolder added in v22.11.9

func (t TerraformCluster) BrowseFolder(ctx context.Context, callback func(buf []byte) fail.Error) fail.Error

func (TerraformCluster) CheckFeature added in v22.11.9

func (t TerraformCluster) CheckFeature(ctx context.Context, name string, vars data.Map, settings resources.FeatureSettings) (resources.Results, fail.Error)

func (TerraformCluster) ComplementFeatureParameters added in v22.11.9

func (t TerraformCluster) ComplementFeatureParameters(ctx context.Context, v data.Map) fail.Error

func (*TerraformCluster) Create added in v22.11.9

func (TerraformCluster) Delete added in v22.11.9

func (t TerraformCluster) Delete(ctx context.Context, force bool) fail.Error

Delete deletes the cluster and its resources and also the infrastructure created with terraform

func (TerraformCluster) DeleteSpecificNode added in v22.11.9

func (t TerraformCluster) DeleteSpecificNode(ctx context.Context, hostID string, selectedMasterID string) fail.Error

func (TerraformCluster) Deserialize added in v22.11.9

func (t TerraformCluster) Deserialize(ctx context.Context, buf []byte) fail.Error

func (TerraformCluster) Exists added in v22.11.9

func (t TerraformCluster) Exists(ctx context.Context) (bool, fail.Error)

func (TerraformCluster) FindAvailableMaster added in v22.11.9

func (t TerraformCluster) FindAvailableMaster(ctx context.Context) (resources.Host, fail.Error)

func (TerraformCluster) GetAdminPassword added in v22.11.9

func (t TerraformCluster) GetAdminPassword(ctx context.Context) (string, fail.Error)

func (TerraformCluster) GetComplexity added in v22.11.9

func (TerraformCluster) GetFlavor added in v22.11.9

func (TerraformCluster) GetID added in v22.11.9

func (t TerraformCluster) GetID() (string, error)

func (TerraformCluster) GetIdentity added in v22.11.9

func (TerraformCluster) GetKeyPair added in v22.11.9

func (t TerraformCluster) GetKeyPair(ctx context.Context) (*abstract.KeyPair, fail.Error)

func (TerraformCluster) GetName added in v22.11.9

func (t TerraformCluster) GetName() string

func (TerraformCluster) GetNetworkConfig added in v22.11.9

func (TerraformCluster) GetState added in v22.11.9

func (TerraformCluster) Inspect added in v22.11.9

func (t TerraformCluster) Inspect(ctx context.Context, callback resources.Callback) fail.Error

func (TerraformCluster) InstallMethods added in v22.11.9

func (t TerraformCluster) InstallMethods(ctx context.Context) (map[uint8]installmethod.Enum, fail.Error)

func (TerraformCluster) InstalledFeatures added in v22.11.9

func (t TerraformCluster) InstalledFeatures(ctx context.Context) ([]string, fail.Error)

func (TerraformCluster) IsFeatureInstalled added in v22.11.9

func (t TerraformCluster) IsFeatureInstalled(ctx context.Context, name string) (found bool, ferr fail.Error)

func (TerraformCluster) IsNull added in v22.11.9

func (t TerraformCluster) IsNull() bool

func (TerraformCluster) ListEligibleFeatures added in v22.11.9

func (t TerraformCluster) ListEligibleFeatures(ctx context.Context) ([]resources.Feature, fail.Error)

func (TerraformCluster) ListInstalledFeatures added in v22.11.9

func (t TerraformCluster) ListInstalledFeatures(ctx context.Context) ([]resources.Feature, fail.Error)

func (TerraformCluster) ListMasters added in v22.11.9

func (TerraformCluster) ListNodes added in v22.11.9

func (TerraformCluster) Read added in v22.11.9

func (t TerraformCluster) Read(ctx context.Context, ref string) fail.Error

func (TerraformCluster) ReadByID added in v22.11.9

func (t TerraformCluster) ReadByID(ctx context.Context, id string) fail.Error

func (TerraformCluster) RegisterFeature added in v22.11.9

func (t TerraformCluster) RegisterFeature(ctx context.Context, feat resources.Feature, requiredBy resources.Feature, clusterContext bool) fail.Error

func (TerraformCluster) Reload added in v22.11.9

func (t TerraformCluster) Reload(ctx context.Context) fail.Error

func (TerraformCluster) RemoveFeature added in v22.11.9

func (t TerraformCluster) RemoveFeature(ctx context.Context, name string, vars data.Map, settings resources.FeatureSettings) (resources.Results, fail.Error)

func (TerraformCluster) Sdump added in v22.11.9

func (t TerraformCluster) Sdump(ctx context.Context) (string, fail.Error)

func (TerraformCluster) Service added in v22.11.9

func (t TerraformCluster) Service() iaas.Service

func (TerraformCluster) Shrink added in v22.11.9

func (t TerraformCluster) Shrink(ctx context.Context, name string, count uint) ([]*propertiesv3.ClusterNode, fail.Error)

func (TerraformCluster) Start added in v22.11.9

func (t TerraformCluster) Start(ctx context.Context) fail.Error

func (TerraformCluster) Stop added in v22.11.9

func (TerraformCluster) TargetType added in v22.11.9

func (t TerraformCluster) TargetType() featuretargettype.Enum

func (TerraformCluster) ToProtocol added in v22.11.9

func (TerraformCluster) UnregisterFeature added in v22.11.9

func (t TerraformCluster) UnregisterFeature(ctx context.Context, feat string) fail.Error

type TfBucket added in v22.11.9

type TfBucket struct {
	StorageAccount string
	Name           string
	Identity       string
	// contains filtered or unexported fields
}

func ListTerraformBuckets added in v22.11.9

func ListTerraformBuckets(inctx context.Context, svc iaas.Service) ([]*TfBucket, fail.Error)

func NewTerraformBucket added in v22.11.9

func NewTerraformBucket(svc iaas.Service) (*TfBucket, fail.Error)

func (TfBucket) Alter added in v22.11.9

func (t TfBucket) Alter(ctx context.Context, callback resources.Callback) fail.Error

func (TfBucket) Browse added in v22.11.9

func (t TfBucket) Browse(ctx context.Context, callback func(bucket *abstract.ObjectStorageBucket) fail.Error) fail.Error

func (TfBucket) BrowseFolder added in v22.11.9

func (t TfBucket) BrowseFolder(ctx context.Context, callback func(buf []byte) fail.Error) fail.Error

func (*TfBucket) Create added in v22.11.9

func (t *TfBucket) Create(ctx context.Context, name string) fail.Error

func (TfBucket) Delete added in v22.11.9

func (t TfBucket) Delete(ctx context.Context) fail.Error

func (TfBucket) Deserialize added in v22.11.9

func (t TfBucket) Deserialize(ctx context.Context, buf []byte) fail.Error

func (TfBucket) Exists added in v22.11.9

func (t TfBucket) Exists(ctx context.Context) (bool, fail.Error)

func (TfBucket) GetID added in v22.11.9

func (t TfBucket) GetID() (string, error)

func (TfBucket) GetName added in v22.11.9

func (t TfBucket) GetName() string

func (TfBucket) Inspect added in v22.11.9

func (t TfBucket) Inspect(ctx context.Context, callback resources.Callback) fail.Error

func (TfBucket) IsNull added in v22.11.9

func (t TfBucket) IsNull() bool

func (TfBucket) Mount added in v22.11.9

func (t TfBucket) Mount(ctx context.Context, hostname string, path string) fail.Error

func (TfBucket) Read added in v22.11.9

func (t TfBucket) Read(ctx context.Context, ref string) fail.Error

func (TfBucket) ReadByID added in v22.11.9

func (t TfBucket) ReadByID(ctx context.Context, id string) fail.Error

func (TfBucket) Reload added in v22.11.9

func (t TfBucket) Reload(ctx context.Context) fail.Error

func (TfBucket) Sdump added in v22.11.9

func (t TfBucket) Sdump(ctx context.Context) (string, fail.Error)

func (TfBucket) Service added in v22.11.9

func (t TfBucket) Service() iaas.Service

func (TfBucket) ToProtocol added in v22.11.9

func (t TfBucket) ToProtocol(ctx context.Context) (*protocol.BucketResponse, fail.Error)

func (TfBucket) Unmount added in v22.11.9

func (t TfBucket) Unmount(ctx context.Context, hostname string) fail.Error

type TfHost added in v22.11.9

type TfHost struct {
	ID           string            `json:"id,omitempty"`
	Name         string            `json:"name,omitempty"`
	PrivateKey   string            `json:"private_key,omitempty"`
	SSHPort      uint32            `json:"ssh_port,omitempty"`
	Password     string            `json:"password,omitempty"`
	Tags         map[string]string `json:"tags,omitempty"`
	PrivateIP    string            `json:"private_ip,omitempty"`
	PublicIP     string            `json:"public_ip,omitempty"`
	DiskSizeInGb int32             `json:"disk_size_in_gb,omitempty"`
	TemplateSize string            `json:"template_size,omitempty"`
	Operator     string            `json:"operator,omitempty"`

	InternalTerraformID string

	Gw2SSHConfig *ssh.CommonConfig `json:"gw_2_ssh_config,omitempty"`
	GwSSHConfig  *ssh.CommonConfig `json:"gw_ssh_config,omitempty"`

	Network    string   `json:"network,omitempty"`
	NetworkIDs []string `json:"networks,omitempty"`
	Nics       []string `json:"nics,omitempty"`
	SubnetID   string   `json:"subnet_id,omitempty"`

	VmIdentity string `json:"vm_identity,omitempty"`
	// contains filtered or unexported fields
}

func LoadTerraformHostObject added in v22.11.9

func LoadTerraformHostObject(ctx context.Context, svc iaas.Service, hostName string) (*TfHost, error)

func NewTerraformHost added in v22.11.9

func NewTerraformHost(svc iaas.Service) (*TfHost, fail.Error)

func (TfHost) Alter added in v22.11.9

func (t TfHost) Alter(ctx context.Context, callback resources.Callback) fail.Error

func (*TfHost) BindLabel added in v22.11.9

func (t *TfHost) BindLabel(inctx context.Context, labelInstance resources.Label, value string) fail.Error

func (TfHost) BindSecurityGroup added in v22.11.9

func (TfHost) Browse added in v22.11.9

func (t TfHost) Browse(ctx context.Context, callback func(*abstract.HostCore) fail.Error) fail.Error

func (TfHost) BrowseFolder added in v22.11.9

func (t TfHost) BrowseFolder(ctx context.Context, callback func(buf []byte) fail.Error) fail.Error

func (TfHost) ComplementFeatureParameters added in v22.11.9

func (t TfHost) ComplementFeatureParameters(ctx context.Context, v data.Map) fail.Error

func (*TfHost) Create added in v22.11.9

func (t *TfHost) Create(ctx context.Context, hostReq abstract.HostRequest, hostDef abstract.HostSizingRequirements, extra interface{}) (*userdata.Content, fail.Error)

func (TfHost) Delete added in v22.11.9

func (t TfHost) Delete(ctx context.Context) fail.Error

func (TfHost) Deserialize added in v22.11.9

func (t TfHost) Deserialize(ctx context.Context, buf []byte) fail.Error

func (TfHost) DisableSecurityGroup added in v22.11.9

func (t TfHost) DisableSecurityGroup(ctx context.Context, sg resources.SecurityGroup) fail.Error

func (TfHost) EnableSecurityGroup added in v22.11.9

func (t TfHost) EnableSecurityGroup(ctx context.Context, sg resources.SecurityGroup) fail.Error

func (TfHost) Exists added in v22.11.9

func (t TfHost) Exists(ctx context.Context) (bool, fail.Error)

func (TfHost) ForceGetState added in v22.11.9

func (t TfHost) ForceGetState(ctx context.Context) (hoststate.Enum, fail.Error)

func (TfHost) GetAccessIP added in v22.11.9

func (t TfHost) GetAccessIP(ctx context.Context) (string, fail.Error)

func (TfHost) GetDefaultSubnet added in v22.11.9

func (t TfHost) GetDefaultSubnet(ctx context.Context) (resources.Subnet, fail.Error)

func (TfHost) GetID added in v22.11.9

func (t TfHost) GetID() (string, error)

func (TfHost) GetMounts added in v22.11.9

func (t TfHost) GetMounts(ctx context.Context) (*propertiesv1.HostMounts, fail.Error)

func (TfHost) GetName added in v22.11.9

func (t TfHost) GetName() string

func (TfHost) GetPrivateIP added in v22.11.9

func (t TfHost) GetPrivateIP(ctx context.Context) (string, fail.Error)

func (TfHost) GetPrivateIPOnSubnet added in v22.11.9

func (t TfHost) GetPrivateIPOnSubnet(ctx context.Context, subnetID string) (string, fail.Error)

func (TfHost) GetPublicIP added in v22.11.9

func (t TfHost) GetPublicIP(ctx context.Context) (string, fail.Error)

func (TfHost) GetSSHConfig added in v22.11.9

func (t TfHost) GetSSHConfig(ctx context.Context) (sshapi.Config, fail.Error)

func (TfHost) GetShare added in v22.11.9

func (t TfHost) GetShare(ctx context.Context, shareRef string) (*propertiesv1.HostShare, fail.Error)

func (TfHost) GetShares added in v22.11.9

func (t TfHost) GetShares(ctx context.Context) (*propertiesv1.HostShares, fail.Error)

func (TfHost) GetState added in v22.11.9

func (t TfHost) GetState(ctx context.Context) (hoststate.Enum, fail.Error)

func (TfHost) GetVolumes added in v22.11.9

func (t TfHost) GetVolumes(ctx context.Context) (*propertiesv1.HostVolumes, fail.Error)

func (TfHost) Inspect added in v22.11.9

func (t TfHost) Inspect(ctx context.Context, callback resources.Callback) fail.Error

func (TfHost) InstallMethods added in v22.11.9

func (t TfHost) InstallMethods(ctx context.Context) (map[uint8]installmethod.Enum, fail.Error)

func (TfHost) InstalledFeatures added in v22.11.9

func (t TfHost) InstalledFeatures(ctx context.Context) ([]string, fail.Error)

func (TfHost) IsClusterMember added in v22.11.9

func (t TfHost) IsClusterMember(ctx context.Context) (bool, fail.Error)

func (TfHost) IsFeatureInstalled added in v22.11.9

func (t TfHost) IsFeatureInstalled(ctx context.Context, name string) (bool, fail.Error)

func (TfHost) IsGateway added in v22.11.9

func (t TfHost) IsGateway(ctx context.Context) (bool, fail.Error)

func (TfHost) IsNull added in v22.11.9

func (t TfHost) IsNull() bool

func (TfHost) IsSingle added in v22.11.9

func (t TfHost) IsSingle(ctx context.Context) (bool, fail.Error)

func (TfHost) ListEligibleFeatures added in v22.11.9

func (t TfHost) ListEligibleFeatures(ctx context.Context) ([]resources.Feature, fail.Error)

func (TfHost) ListInstalledFeatures added in v22.11.9

func (t TfHost) ListInstalledFeatures(ctx context.Context) ([]resources.Feature, fail.Error)

func (TfHost) ListLabels added in v22.11.9

func (t TfHost) ListLabels(ctx context.Context) (list map[string]string, err fail.Error)

func (TfHost) ListSecurityGroups added in v22.11.9

func (t TfHost) ListSecurityGroups(ctx context.Context, state securitygroupstate.Enum) ([]*propertiesv1.SecurityGroupBond, fail.Error)

func (TfHost) Pull added in v22.11.9

func (t TfHost) Pull(ctx context.Context, target, source string, timeout time.Duration) (int, string, string, fail.Error)

func (TfHost) Push added in v22.11.9

func (t TfHost) Push(ctx context.Context, source, target, owner, mode string, timeout time.Duration) (int, string, string, fail.Error)

func (TfHost) PushStringToFileWithOwnership added in v22.11.9

func (t TfHost) PushStringToFileWithOwnership(ctx context.Context, content string, filename string, owner, mode string) fail.Error

func (TfHost) Read added in v22.11.9

func (t TfHost) Read(ctx context.Context, ref string) fail.Error

func (TfHost) ReadByID added in v22.11.9

func (t TfHost) ReadByID(ctx context.Context, id string) fail.Error

func (TfHost) Reboot added in v22.11.9

func (t TfHost) Reboot(ctx context.Context, soft bool) fail.Error

func (TfHost) RegisterFeature added in v22.11.9

func (t TfHost) RegisterFeature(ctx context.Context, feat resources.Feature, requiredBy resources.Feature, clusterContext bool) fail.Error

func (TfHost) Reload added in v22.11.9

func (t TfHost) Reload(ctx context.Context) fail.Error

func (TfHost) ResetLabel added in v22.11.9

func (t TfHost) ResetLabel(ctx context.Context, labelInstance resources.Label) fail.Error

func (TfHost) Run added in v22.11.9

func (t TfHost) Run(ctx context.Context, cmd string, outs outputs.Enum, connectionTimeout, executionTimeout time.Duration) (int, string, string, fail.Error)

func (TfHost) Sdump added in v22.11.9

func (t TfHost) Sdump(ctx context.Context) (string, fail.Error)

func (TfHost) Service added in v22.11.9

func (t TfHost) Service() iaas.Service

func (TfHost) Start added in v22.11.9

func (t TfHost) Start(ctx context.Context) fail.Error

func (TfHost) Stop added in v22.11.9

func (t TfHost) Stop(ctx context.Context) fail.Error

func (TfHost) TargetType added in v22.11.9

func (t TfHost) TargetType() featuretargettype.Enum

func (TfHost) ToProtocol added in v22.11.9

func (t TfHost) ToProtocol(ctx context.Context) (*protocol.Host, fail.Error)

func (*TfHost) UnbindLabel added in v22.11.9

func (t *TfHost) UnbindLabel(inctx context.Context, labelInstance resources.Label) fail.Error

func (TfHost) UnbindSecurityGroup added in v22.11.9

func (t TfHost) UnbindSecurityGroup(ctx context.Context, sg resources.SecurityGroup) fail.Error

func (TfHost) UnregisterFeature added in v22.11.9

func (t TfHost) UnregisterFeature(ctx context.Context, feat string) fail.Error

func (*TfHost) UpdateLabel added in v22.11.9

func (t *TfHost) UpdateLabel(inctx context.Context, labelInstance resources.Label, value string) fail.Error

func (TfHost) WaitSSHReady added in v22.11.9

func (t TfHost) WaitSSHReady(ctx context.Context, timeout time.Duration) (status string, err fail.Error)

type TfLabel added in v22.11.9

type TfLabel struct {
	// contains filtered or unexported fields
}

func LoadTerraformLabel added in v22.11.9

func LoadTerraformLabel(inctx context.Context, svc iaas.Service, ref string) (*TfLabel, fail.Error)

func LoadTerraformLabels added in v22.11.9

func LoadTerraformLabels(inctx context.Context, svc iaas.Service) ([]*TfLabel, fail.Error)

func NewTerraformLabel added in v22.11.9

func NewTerraformLabel(svc iaas.Service) (*TfLabel, fail.Error)

func (TfLabel) Alter added in v22.11.9

func (t TfLabel) Alter(ctx context.Context, callback resources.Callback) fail.Error

func (TfLabel) BindToHost added in v22.11.9

func (t TfLabel) BindToHost(ctx context.Context, hostInstance resources.Host, value string) fail.Error

func (TfLabel) Browse added in v22.11.9

func (t TfLabel) Browse(ctx context.Context, callback func(*abstract.Label) fail.Error) fail.Error

func (TfLabel) BrowseFolder added in v22.11.9

func (t TfLabel) BrowseFolder(ctx context.Context, callback func(buf []byte) fail.Error) fail.Error

func (*TfLabel) Create added in v22.11.9

func (t *TfLabel) Create(ctx context.Context, name string, hasDefault bool, defaultValue string) fail.Error

func (TfLabel) DefaultValue added in v22.11.9

func (t TfLabel) DefaultValue(ctx context.Context) (string, fail.Error)

func (TfLabel) Delete added in v22.11.9

func (t TfLabel) Delete(ctx context.Context) fail.Error

func (TfLabel) Deserialize added in v22.11.9

func (t TfLabel) Deserialize(ctx context.Context, buf []byte) fail.Error

func (TfLabel) GetID added in v22.11.9

func (t TfLabel) GetID() (string, error)

func (TfLabel) GetName added in v22.11.9

func (t TfLabel) GetName() string

func (TfLabel) Inspect added in v22.11.9

func (t TfLabel) Inspect(ctx context.Context, callback resources.Callback) fail.Error

func (TfLabel) IsNull added in v22.11.9

func (t TfLabel) IsNull() bool

func (TfLabel) IsTag added in v22.11.9

func (t TfLabel) IsTag(ctx context.Context) (bool, fail.Error)

func (TfLabel) Read added in v22.11.9

func (t TfLabel) Read(ctx context.Context, ref string) fail.Error

func (TfLabel) ReadByID added in v22.11.9

func (t TfLabel) ReadByID(ctx context.Context, id string) fail.Error

func (TfLabel) Reload added in v22.11.9

func (t TfLabel) Reload(ctx context.Context) fail.Error

func (TfLabel) Sdump added in v22.11.9

func (t TfLabel) Sdump(ctx context.Context) (string, fail.Error)

func (TfLabel) Service added in v22.11.9

func (t TfLabel) Service() iaas.Service

func (TfLabel) ToProtocol added in v22.11.9

func (t TfLabel) ToProtocol(ctx context.Context, withHosts bool) (*protocol.LabelInspectResponse, fail.Error)

func (TfLabel) UnbindFromHost added in v22.11.9

func (t TfLabel) UnbindFromHost(ctx context.Context, hostInstance resources.Host) fail.Error

type TfNetwork added in v22.11.9

type TfNetwork struct {
	Name     string
	Identity string

	CIDR       string
	Tags       map[string]string
	SubnetCidr string
	SubnetId   string
	SubnetName string
	// contains filtered or unexported fields
}

func ListTerraformClusters added in v22.11.9

func ListTerraformClusters(inctx context.Context, svc iaas.Service) (_ []*TfNetwork, ferr fail.Error)

func ListTerraformNetworks added in v22.11.9

func ListTerraformNetworks(inctx context.Context, svc iaas.Service) (_ []*TfNetwork, ferr fail.Error)

func LoadTerraformNetwork added in v22.11.9

func LoadTerraformNetwork(inctx context.Context, svc iaas.Service, name string) (_ *TfNetwork, ferr fail.Error)

func NewTerraformNetwork added in v22.11.9

func NewTerraformNetwork(svc iaas.Service) (*TfNetwork, fail.Error)

func (TfNetwork) AbandonSubnet added in v22.11.9

func (t TfNetwork) AbandonSubnet(ctx context.Context, subnetID string) fail.Error

func (TfNetwork) AdoptSubnet added in v22.11.9

func (t TfNetwork) AdoptSubnet(ctx context.Context, subnet resources.Subnet) fail.Error

func (TfNetwork) Alter added in v22.11.9

func (t TfNetwork) Alter(ctx context.Context, callback resources.Callback) fail.Error

func (TfNetwork) Browse added in v22.11.9

func (t TfNetwork) Browse(ctx context.Context, callback func(*abstract.Network) fail.Error) fail.Error

func (TfNetwork) BrowseFolder added in v22.11.9

func (t TfNetwork) BrowseFolder(ctx context.Context, callback func(buf []byte) fail.Error) fail.Error

func (*TfNetwork) Create added in v22.11.9

func (TfNetwork) Delete added in v22.11.9

func (t TfNetwork) Delete(ctx context.Context) fail.Error

func (TfNetwork) Deserialize added in v22.11.9

func (t TfNetwork) Deserialize(ctx context.Context, buf []byte) fail.Error

func (TfNetwork) Exists added in v22.11.9

func (t TfNetwork) Exists(ctx context.Context) (bool, fail.Error)

func (TfNetwork) GetID added in v22.11.9

func (t TfNetwork) GetID() (string, error)

func (TfNetwork) GetName added in v22.11.9

func (t TfNetwork) GetName() string

func (TfNetwork) Inspect added in v22.11.9

func (t TfNetwork) Inspect(ctx context.Context, callback resources.Callback) fail.Error

func (TfNetwork) InspectSubnet added in v22.11.9

func (t TfNetwork) InspectSubnet(ctx context.Context, subnetRef string) (resources.Subnet, fail.Error)

func (TfNetwork) IsNull added in v22.11.9

func (t TfNetwork) IsNull() bool

func (TfNetwork) Read added in v22.11.9

func (t TfNetwork) Read(ctx context.Context, ref string) fail.Error

func (TfNetwork) ReadByID added in v22.11.9

func (t TfNetwork) ReadByID(ctx context.Context, id string) fail.Error

func (TfNetwork) Reload added in v22.11.9

func (t TfNetwork) Reload(ctx context.Context) fail.Error

func (TfNetwork) Sdump added in v22.11.9

func (t TfNetwork) Sdump(ctx context.Context) (string, fail.Error)

func (TfNetwork) Service added in v22.11.9

func (t TfNetwork) Service() iaas.Service

func (TfNetwork) ToProtocol added in v22.11.9

func (t TfNetwork) ToProtocol(ctx context.Context) (*protocol.Network, fail.Error)

type TfNic added in v22.11.9

type TfNic struct {
	Name     string
	Identity string
}

type TfSecurityGroup added in v22.11.9

type TfSecurityGroup struct {
	Name     string
	Identity string

	Location string
	Tags     map[string]string

	Rules []map[string]interface{}
	// contains filtered or unexported fields
}

func ListTerraformSGs added in v22.11.9

func ListTerraformSGs(inctx context.Context, svc iaas.Service) ([]*TfSecurityGroup, fail.Error)

func LoadTerraformSecurityGroup added in v22.11.9

func LoadTerraformSecurityGroup(inctx context.Context, svc iaas.Service, ref string) (*TfSecurityGroup, fail.Error)

func NewTerraformSecurityGroup added in v22.11.9

func NewTerraformSecurityGroup(svc iaas.Service) (*TfSecurityGroup, fail.Error)

func (TfSecurityGroup) AddRule added in v22.11.9

func (TfSecurityGroup) AddRules added in v22.11.9

func (TfSecurityGroup) Alter added in v22.11.9

func (t TfSecurityGroup) Alter(ctx context.Context, callback resources.Callback) fail.Error

func (TfSecurityGroup) BindToHost added in v22.11.9

func (TfSecurityGroup) BindToSubnet added in v22.11.9

func (TfSecurityGroup) Browse added in v22.11.9

func (t TfSecurityGroup) Browse(ctx context.Context, callback func(*abstract.SecurityGroup) fail.Error) fail.Error

func (TfSecurityGroup) BrowseFolder added in v22.11.9

func (t TfSecurityGroup) BrowseFolder(ctx context.Context, callback func(buf []byte) fail.Error) fail.Error

func (TfSecurityGroup) Clear added in v22.11.9

func (t TfSecurityGroup) Clear(ctx context.Context) fail.Error

func (*TfSecurityGroup) Create added in v22.11.9

func (t *TfSecurityGroup) Create(ctx context.Context, networkID, name, description string, rules abstract.SecurityGroupRules) fail.Error

func (TfSecurityGroup) Delete added in v22.11.9

func (t TfSecurityGroup) Delete(ctx context.Context, force bool) fail.Error

func (TfSecurityGroup) DeleteRule added in v22.11.9

func (TfSecurityGroup) Deserialize added in v22.11.9

func (t TfSecurityGroup) Deserialize(ctx context.Context, buf []byte) fail.Error

func (TfSecurityGroup) Exists added in v22.11.9

func (t TfSecurityGroup) Exists(ctx context.Context) (bool, fail.Error)

func (TfSecurityGroup) GetBoundHosts added in v22.11.9

func (TfSecurityGroup) GetBoundSubnets added in v22.11.9

func (TfSecurityGroup) GetID added in v22.11.9

func (t TfSecurityGroup) GetID() (string, error)

func (TfSecurityGroup) GetName added in v22.11.9

func (t TfSecurityGroup) GetName() string

func (TfSecurityGroup) Inspect added in v22.11.9

func (t TfSecurityGroup) Inspect(ctx context.Context, callback resources.Callback) fail.Error

func (TfSecurityGroup) IsNull added in v22.11.9

func (t TfSecurityGroup) IsNull() bool

func (TfSecurityGroup) Read added in v22.11.9

func (t TfSecurityGroup) Read(ctx context.Context, ref string) fail.Error

func (TfSecurityGroup) ReadByID added in v22.11.9

func (t TfSecurityGroup) ReadByID(ctx context.Context, id string) fail.Error

func (TfSecurityGroup) Reload added in v22.11.9

func (t TfSecurityGroup) Reload(ctx context.Context) fail.Error

func (TfSecurityGroup) Reset added in v22.11.9

func (t TfSecurityGroup) Reset(ctx context.Context) fail.Error

func (TfSecurityGroup) Sdump added in v22.11.9

func (t TfSecurityGroup) Sdump(ctx context.Context) (string, fail.Error)

func (TfSecurityGroup) Service added in v22.11.9

func (t TfSecurityGroup) Service() iaas.Service

func (TfSecurityGroup) ToProtocol added in v22.11.9

func (TfSecurityGroup) UnbindFromHost added in v22.11.9

func (t TfSecurityGroup) UnbindFromHost(ctx context.Context, host resources.Host) fail.Error

func (TfSecurityGroup) UnbindFromHostByReference added in v22.11.9

func (t TfSecurityGroup) UnbindFromHostByReference(ctx context.Context, s string) fail.Error

func (TfSecurityGroup) UnbindFromSubnet added in v22.11.9

func (t TfSecurityGroup) UnbindFromSubnet(ctx context.Context, subnet resources.Subnet) fail.Error

func (TfSecurityGroup) UnbindFromSubnetByReference added in v22.11.9

func (t TfSecurityGroup) UnbindFromSubnetByReference(ctx context.Context, s string) fail.Error

type TfShare added in v22.11.9

type TfShare struct {
	// contains filtered or unexported fields
}

func NewTerraformShare added in v22.11.9

func NewTerraformShare(svc iaas.Service) (*TfShare, fail.Error)

func (TfShare) Alter added in v22.11.9

func (t TfShare) Alter(ctx context.Context, callback resources.Callback) fail.Error

func (TfShare) Browse added in v22.11.9

func (t TfShare) Browse(ctx context.Context, callback func(hostName string, shareID string) fail.Error) fail.Error

func (TfShare) BrowseFolder added in v22.11.9

func (t TfShare) BrowseFolder(ctx context.Context, callback func(buf []byte) fail.Error) fail.Error

func (TfShare) Create added in v22.11.9

func (t TfShare) Create(ctx context.Context, shareName string, host resources.Host, path string, options string) fail.Error

func (TfShare) Delete added in v22.11.9

func (t TfShare) Delete(ctx context.Context) fail.Error

func (TfShare) Deserialize added in v22.11.9

func (t TfShare) Deserialize(ctx context.Context, buf []byte) fail.Error

func (TfShare) Exists added in v22.11.9

func (t TfShare) Exists(ctx context.Context) (bool, fail.Error)

func (TfShare) GetID added in v22.11.9

func (t TfShare) GetID() (string, error)

func (TfShare) GetName added in v22.11.9

func (t TfShare) GetName() string

func (TfShare) GetServer added in v22.11.9

func (t TfShare) GetServer(ctx context.Context) (resources.Host, fail.Error)

func (TfShare) Inspect added in v22.11.9

func (t TfShare) Inspect(ctx context.Context, callback resources.Callback) fail.Error

func (TfShare) IsNull added in v22.11.9

func (t TfShare) IsNull() bool

func (TfShare) Mount added in v22.11.9

func (t TfShare) Mount(ctx context.Context, host resources.Host, path string, withCache bool) (*propertiesv1.HostRemoteMount, fail.Error)

func (TfShare) Read added in v22.11.9

func (t TfShare) Read(ctx context.Context, ref string) fail.Error

func (TfShare) ReadByID added in v22.11.9

func (t TfShare) ReadByID(ctx context.Context, id string) fail.Error

func (TfShare) Reload added in v22.11.9

func (t TfShare) Reload(ctx context.Context) fail.Error

func (TfShare) Sdump added in v22.11.9

func (t TfShare) Sdump(ctx context.Context) (string, fail.Error)

func (TfShare) Service added in v22.11.9

func (t TfShare) Service() iaas.Service

func (TfShare) ToProtocol added in v22.11.9

func (t TfShare) ToProtocol(ctx context.Context) (*protocol.ShareMountList, fail.Error)

func (TfShare) Unmount added in v22.11.9

func (t TfShare) Unmount(ctx context.Context, host resources.Host) fail.Error

type TfSubnet added in v22.11.9

type TfSubnet struct {
	Name        string
	Identity    string
	NetworkName string
	NetworkID   string
	GatewayIDS  []string
	CIDR        string
	Tags        map[string]string
	// contains filtered or unexported fields
}

func ListTerraformSubnets added in v22.11.9

func ListTerraformSubnets(inctx context.Context, svc iaas.Service, networkRef, sunetRef string, all bool) ([]*TfSubnet, fail.Error)

func LoadTerraformSubnet added in v22.11.9

func LoadTerraformSubnet(inctx context.Context, svc iaas.Service, networkRef, sunetRef string) (*TfSubnet, fail.Error)

func NewTerraformSubnet added in v22.11.9

func NewTerraformSubnet(svc iaas.Service) (*TfSubnet, fail.Error)

func (TfSubnet) Alter added in v22.11.9

func (t TfSubnet) Alter(ctx context.Context, callback resources.Callback) fail.Error

func (TfSubnet) AttachHost added in v22.11.9

func (t TfSubnet) AttachHost(ctx context.Context, host resources.Host) fail.Error

func (TfSubnet) BindSecurityGroup added in v22.11.9

func (t TfSubnet) BindSecurityGroup(ctx context.Context, group resources.SecurityGroup, activation resources.SecurityGroupActivation) fail.Error

func (TfSubnet) Browse added in v22.11.9

func (t TfSubnet) Browse(ctx context.Context, callback func(*abstract.Subnet) fail.Error) fail.Error

func (TfSubnet) BrowseFolder added in v22.11.9

func (t TfSubnet) BrowseFolder(ctx context.Context, callback func(buf []byte) fail.Error) fail.Error

func (*TfSubnet) Create added in v22.11.9

func (t *TfSubnet) Create(ctx context.Context, req abstract.SubnetRequest, gwname string, gwSizing *abstract.HostSizingRequirements, extra interface{}) fail.Error

func (TfSubnet) Delete added in v22.11.9

func (t TfSubnet) Delete(ctx context.Context) fail.Error

func (TfSubnet) Deserialize added in v22.11.9

func (t TfSubnet) Deserialize(ctx context.Context, buf []byte) fail.Error

func (TfSubnet) DetachHost added in v22.11.9

func (t TfSubnet) DetachHost(ctx context.Context, hostID string) fail.Error

func (TfSubnet) DisableSecurityGroup added in v22.11.9

func (t TfSubnet) DisableSecurityGroup(ctx context.Context, group resources.SecurityGroup) fail.Error

func (TfSubnet) EnableSecurityGroup added in v22.11.9

func (t TfSubnet) EnableSecurityGroup(ctx context.Context, group resources.SecurityGroup) fail.Error

func (TfSubnet) Exists added in v22.11.9

func (t TfSubnet) Exists(ctx context.Context) (bool, fail.Error)

func (TfSubnet) GetCIDR added in v22.11.9

func (t TfSubnet) GetCIDR(ctx context.Context) (string, fail.Error)

func (TfSubnet) GetDefaultRouteIP added in v22.11.9

func (t TfSubnet) GetDefaultRouteIP(ctx context.Context) (string, fail.Error)

func (TfSubnet) GetEndpointIP added in v22.11.9

func (t TfSubnet) GetEndpointIP(ctx context.Context) (string, fail.Error)

func (TfSubnet) GetGatewayPublicIP added in v22.11.9

func (t TfSubnet) GetGatewayPublicIP(ctx context.Context, primary bool) (string, fail.Error)

func (TfSubnet) GetGatewayPublicIPs added in v22.11.9

func (t TfSubnet) GetGatewayPublicIPs(ctx context.Context) ([]string, fail.Error)

func (TfSubnet) GetID added in v22.11.9

func (t TfSubnet) GetID() (string, error)

func (TfSubnet) GetName added in v22.11.9

func (t TfSubnet) GetName() string

func (TfSubnet) GetState added in v22.11.9

func (t TfSubnet) GetState(ctx context.Context) (subnetstate.Enum, fail.Error)

func (TfSubnet) HasVirtualIP added in v22.11.9

func (t TfSubnet) HasVirtualIP(ctx context.Context) (bool, fail.Error)

func (TfSubnet) Inspect added in v22.11.9

func (t TfSubnet) Inspect(ctx context.Context, callback resources.Callback) fail.Error

func (TfSubnet) InspectGateway added in v22.11.9

func (t TfSubnet) InspectGateway(ctx context.Context, primary bool) (resources.Host, fail.Error)

func (TfSubnet) InspectGatewaySecurityGroup added in v22.11.9

func (t TfSubnet) InspectGatewaySecurityGroup(ctx context.Context) (resources.SecurityGroup, fail.Error)

func (TfSubnet) InspectInternalSecurityGroup added in v22.11.9

func (t TfSubnet) InspectInternalSecurityGroup(ctx context.Context) (resources.SecurityGroup, fail.Error)

func (TfSubnet) InspectNetwork added in v22.11.9

func (t TfSubnet) InspectNetwork(ctx context.Context) (resources.Network, fail.Error)

func (TfSubnet) InspectPublicIPSecurityGroup added in v22.11.9

func (t TfSubnet) InspectPublicIPSecurityGroup(ctx context.Context) (resources.SecurityGroup, fail.Error)

func (TfSubnet) IsNull added in v22.11.9

func (t TfSubnet) IsNull() bool

func (TfSubnet) ListHosts added in v22.11.9

func (t TfSubnet) ListHosts(ctx context.Context) ([]resources.Host, fail.Error)

func (TfSubnet) ListSecurityGroups added in v22.11.9

func (t TfSubnet) ListSecurityGroups(ctx context.Context, state securitygroupstate.Enum) ([]*propertiesv1.SecurityGroupBond, fail.Error)

func (TfSubnet) Read added in v22.11.9

func (t TfSubnet) Read(ctx context.Context, ref string) fail.Error

func (TfSubnet) ReadByID added in v22.11.9

func (t TfSubnet) ReadByID(ctx context.Context, id string) fail.Error

func (TfSubnet) Reload added in v22.11.9

func (t TfSubnet) Reload(ctx context.Context) fail.Error

func (TfSubnet) Sdump added in v22.11.9

func (t TfSubnet) Sdump(ctx context.Context) (string, fail.Error)

func (TfSubnet) Service added in v22.11.9

func (t TfSubnet) Service() iaas.Service

func (TfSubnet) ToProtocol added in v22.11.9

func (t TfSubnet) ToProtocol(ctx context.Context) (*protocol.Subnet, fail.Error)

func (TfSubnet) UnbindSecurityGroup added in v22.11.9

func (t TfSubnet) UnbindSecurityGroup(ctx context.Context, group resources.SecurityGroup) fail.Error

type TfVolume added in v22.11.9

type TfVolume struct {
	Identity string
	Name     string

	Size int32

	Location string
	Tags     map[string]string
	// contains filtered or unexported fields
}

func ListTerraformVolumes added in v22.11.9

func ListTerraformVolumes(inctx context.Context, svc iaas.Service) ([]*TfVolume, fail.Error)

func LoadTerraformVolume added in v22.11.9

func LoadTerraformVolume(inctx context.Context, svc iaas.Service, ref string) (*TfVolume, fail.Error)

func NewTerraformVolume added in v22.11.9

func NewTerraformVolume(svc iaas.Service) (*TfVolume, fail.Error)

func (TfVolume) Alter added in v22.11.9

func (t TfVolume) Alter(ctx context.Context, callback resources.Callback) fail.Error

func (TfVolume) Attach added in v22.11.9

func (t TfVolume) Attach(ctx context.Context, host resources.Host, path, format string, doNotFormat, doNotMount bool) fail.Error

func (TfVolume) Browse added in v22.11.9

func (t TfVolume) Browse(ctx context.Context, callback func(*abstract.Volume) fail.Error) fail.Error

func (TfVolume) BrowseFolder added in v22.11.9

func (t TfVolume) BrowseFolder(ctx context.Context, callback func(buf []byte) fail.Error) fail.Error

func (*TfVolume) Create added in v22.11.9

func (t *TfVolume) Create(ctx context.Context, req abstract.VolumeRequest) fail.Error

func (TfVolume) Delete added in v22.11.9

func (t TfVolume) Delete(ctx context.Context) fail.Error

func (TfVolume) Deserialize added in v22.11.9

func (t TfVolume) Deserialize(ctx context.Context, buf []byte) fail.Error

func (TfVolume) Detach added in v22.11.9

func (t TfVolume) Detach(ctx context.Context, host resources.Host) fail.Error

func (TfVolume) Exists added in v22.11.9

func (t TfVolume) Exists(ctx context.Context) (bool, fail.Error)

func (TfVolume) GetAttachments added in v22.11.9

func (t TfVolume) GetAttachments(ctx context.Context) (*propertiesv1.VolumeAttachments, fail.Error)

func (TfVolume) GetID added in v22.11.9

func (t TfVolume) GetID() (string, error)

func (TfVolume) GetName added in v22.11.9

func (t TfVolume) GetName() string

func (TfVolume) GetSize added in v22.11.9

func (t TfVolume) GetSize(ctx context.Context) (int, fail.Error)

func (TfVolume) GetSpeed added in v22.11.9

func (t TfVolume) GetSpeed(ctx context.Context) (volumespeed.Enum, fail.Error)

func (TfVolume) Inspect added in v22.11.9

func (t TfVolume) Inspect(ctx context.Context, callback resources.Callback) fail.Error

func (TfVolume) IsNull added in v22.11.9

func (t TfVolume) IsNull() bool

func (TfVolume) Read added in v22.11.9

func (t TfVolume) Read(ctx context.Context, ref string) fail.Error

func (TfVolume) ReadByID added in v22.11.9

func (t TfVolume) ReadByID(ctx context.Context, id string) fail.Error

func (TfVolume) Reload added in v22.11.9

func (t TfVolume) Reload(ctx context.Context) fail.Error

func (TfVolume) Sdump added in v22.11.9

func (t TfVolume) Sdump(ctx context.Context) (string, fail.Error)

func (TfVolume) Service added in v22.11.9

func (t TfVolume) Service() iaas.Service

func (TfVolume) ToProtocol added in v22.11.9

type TfVolumeAttachment added in v22.11.9

type TfVolumeAttachment struct {
	Name     string