Documentation
¶
Index ¶
- Constants
- func AddTenant(tenant Tenant, path string) error
- func Attach(ctx context.Context, network, instance, ip string) error
- func CleanupNetworks(ctx context.Context) error
- func CreateGroup(ctx context.Context, params NewGroupParams) error
- func CreateInstance(ctx context.Context, params NewInstanceParams) error
- func CreateNetwork(ctx context.Context, network NewNetworkParams) error
- func CreateScenario(ctx context.Context, params NewScenarioParams) error
- func DeleteNetworks(ctx context.Context, predicate NetworkPredicate) ([]v3.PrivateNetwork, error)
- func DeprotectInstances(ctx context.Context, by string) error
- func DestroyInstances(ctx context.Context, by string) error
- func DestroyNetworks(ctx context.Context, by string) error
- func EmbiggenDisk(ctx context.Context, by string, gb int64) error
- func ExportInstanceOverview(ctx context.Context, by, file string) error
- func ExportInventory(ctx context.Context, file, by string) error
- func ExportPlaybook(ctx context.Context, groupfile, playbookPath string) error
- func ExportScenarioOverview(ctx context.Context, scenario, by, file string, hidePassword bool) error
- func FlushNetworks(ctx context.Context) error
- func FlushRecords(ctx context.Context, domain string) error
- func FormatInstance(instance v3.Instance) string
- func GetAllowedSizes(ctx context.Context) (map[string]*v3.InstanceType, error)
- func GetInstanceTypeBySize(ctx context.Context, size string) (*v3.InstanceType, error)
- func GetNetworks(ctx context.Context, by string) ([]v3.PrivateNetwork, error)
- func GetSSHKeyByName(ctx context.Context, name string) (*v3.SSHKey, error)
- func GetTemplateByName(ctx context.Context, name string) (*v3.Template, error)
- func GroupFileFromText(inputPath, outputPath string) error
- func LabelInstances(ctx context.Context, label, value, by string) error
- func ListImages(ctx context.Context, contains string) ([]string, error)
- func ListInstanceTypes(ctx context.Context, family string) ([]v3.InstanceType, error)
- func ListInstances(ctx context.Context, by string) ([]v3.Instance, error)
- func ListNetworks(ctx context.Context, by string) error
- func ParseYAMLFile[T any](path string) (*T, error)
- func ProbeInstances(ctx context.Context, by, suffix, domain string, secure bool) error
- func ProtectInstances(ctx context.Context, by string) error
- func RemoveTenant(name, path string) error
- func ScaleInstances(ctx context.Context, by string, size string) error
- func SetDefaultTenant(name, path string) error
- func StartInstances(ctx context.Context, by string) error
- func StopInstances(ctx context.Context, by string) error
- func SyncRecords(ctx context.Context, domain string) error
- type DNSEntry
- type Group
- type InstanceCreationCache
- type InstanceGroup
- type NetworkIPConfig
- type NetworkPredicate
- type NewGroupParams
- type NewInstanceGroupParam
- type NewInstanceParams
- type NewNetworkParams
- type NewScenarioParams
- type Play
- type Scenario
- type ScenarioInstance
- type ScenarioNetwork
- type ScenarioNetworkConnection
- type ScenarioSetup
- type Task
- type TaskAuthorizedKey
- type TaskUser
- type Tenant
- type TenantFile
- type User
Constants ¶
View Source
const ( MinDiskSizeGB = 10 MaxDiskSizeGB = 250 )
View Source
const ConfigFilePerm = 0600
Variables ¶
This section is empty.
Functions ¶
func CleanupNetworks ¶ added in v0.0.4
func CreateGroup ¶ added in v0.0.2
func CreateGroup(ctx context.Context, params NewGroupParams) error
func CreateInstance ¶
func CreateInstance(ctx context.Context, params NewInstanceParams) error
func CreateNetwork ¶ added in v0.0.4
func CreateNetwork(ctx context.Context, network NewNetworkParams) error
func CreateScenario ¶ added in v0.0.6
func CreateScenario(ctx context.Context, params NewScenarioParams) error
func DeleteNetworks ¶ added in v0.0.4
func DeleteNetworks(ctx context.Context, predicate NetworkPredicate) ([]v3.PrivateNetwork, error)
func ExportInstanceOverview ¶ added in v0.1.0
func ExportInventory ¶ added in v0.0.3
func ExportPlaybook ¶ added in v0.0.3
func ExportScenarioOverview ¶ added in v0.1.0
func FlushNetworks ¶ added in v0.0.4
func FormatInstance ¶
func GetAllowedSizes ¶ added in v0.0.6
func GetInstanceTypeBySize ¶
func GetNetworks ¶ added in v0.0.4
func GetTemplateByName ¶
func GroupFileFromText ¶ added in v0.0.2
func ListInstanceTypes ¶
func ParseYAMLFile ¶ added in v0.0.6
func ProbeInstances ¶
func RemoveTenant ¶
func SetDefaultTenant ¶
Types ¶
type Group ¶ added in v0.0.2
func ParseGroupFile ¶ added in v0.0.2
type InstanceCreationCache ¶ added in v0.0.6
type InstanceGroup ¶ added in v0.0.2
type NetworkIPConfig ¶ added in v0.0.4
type NetworkPredicate ¶ added in v0.0.4
type NetworkPredicate func(network v3.PrivateNetwork) bool
type NewGroupParams ¶ added in v0.0.2
type NewInstanceGroupParam ¶ added in v0.0.3
type NewInstanceGroupParam struct {
Names map[string]User
Key string
Autostart bool
Image string
Size string
Labels string
CloudInit string
}
func (*NewInstanceGroupParam) Compile ¶ added in v0.0.3
func (p *NewInstanceGroupParam) Compile(ctx context.Context) (*InstanceGroup, error)
type NewInstanceParams ¶
type NewNetworkParams ¶ added in v0.0.4
type NewNetworkParams struct {
Name string
Description string
Labels string
StartIP string
EndIP string
Netmask string
}
func (*NewNetworkParams) ParseIPs ¶ added in v0.0.4
func (n *NewNetworkParams) ParseIPs() (*NetworkIPConfig, error)
type NewScenarioParams ¶ added in v0.0.6
type Scenario ¶ added in v0.0.6
type Scenario struct {
Name string `yaml:"name"`
Instances []ScenarioInstance `yaml:"instances"`
Networks []ScenarioNetwork `yaml:"networks"`
}
func ParseScenarioFile ¶ added in v0.0.6
func (*Scenario) CompileFor ¶ added in v0.0.6
func (s *Scenario) CompileFor(ctx context.Context, g *Group) *ScenarioSetup
func (*Scenario) ValidateExternally ¶ added in v0.0.6
func (s *Scenario) ValidateExternally(ctx context.Context) (*InstanceCreationCache, error)
ValidateExternally validates all the image and size definitions in the instances section.
func (*Scenario) ValidateInternally ¶ added in v0.0.6
ValidateInternally validates all the IP addresses in the network section and whether or not the connections defined refer existing instances.
type ScenarioInstance ¶ added in v0.0.6
type ScenarioNetwork ¶ added in v0.0.6
type ScenarioNetworkConnection ¶ added in v0.0.6
type ScenarioSetup ¶ added in v0.0.6
type Task ¶ added in v0.0.3
type Task struct {
Name string `yaml:"name"`
User TaskUser `yaml:"user,omitempty"`
AuthorizedKey TaskAuthorizedKey `yaml:"authorized_key,omitempty"`
}
type TaskAuthorizedKey ¶ added in v0.0.3
type Tenant ¶
type Tenant struct {
Name string `json:"name"`
Key string `json:"key"`
Secret string `json:"secret"`
Zone string `json:"zone"`
}
func GetDefaultTenant ¶
func (Tenant) IsNonEmpty ¶
type TenantFile ¶
type TenantFile struct {
Default string `json:"default"`
Tenants map[string]Tenant `json:"tenants"`
}
func ReadTenants ¶
func ReadTenants(path string) (*TenantFile, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.