Documentation
¶
Index ¶
- Constants
- func GetConsoleErrorf(request *providerGRPC.GetConsoleRequest, format string, a ...any) *providerGRPC.GetConsoleReply
- func ValidateBlueprint(blueprint *OpenstackBlueprint) error
- type OpenstackBlueprint
- func UnmarshalBlueprintBytes(in []byte) (*OpenstackBlueprint, error)
- func UnmarshalBlueprintBytesWithVars(in []byte, vars map[string]interface{}) (*OpenstackBlueprint, error)
- func UnmarshalBlueprintFile(filepath string) (*OpenstackBlueprint, error)
- func UnmarshalBlueprintFileWithVars(filepath string, varFilepath string) (*OpenstackBlueprint, error)
- type OpenstackHost
- type OpenstackNetwork
- type OpenstackNetworkAttachment
- type OpenstackNetworkDHCP
- type OpenstackObject
- type OpenstackResourceType
- type OpenstackRouter
- type ProviderOpenstack
- func (provider *ProviderOpenstack) Author() string
- func (provider ProviderOpenstack) Configure(ctx context.Context, request *providerGRPC.ConfigureRequest) (*commonGRPC.RPCStatusReply, error)
- func (provider ProviderOpenstack) Deploy(ctx context.Context, request *providerGRPC.DeployRequest) (*providerGRPC.DeployReply, error)
- func (provider *ProviderOpenstack) Description() string
- func (provider ProviderOpenstack) Destroy(ctx context.Context, request *providerGRPC.DestroyRequest) (*providerGRPC.DestroyReply, error)
- func (provider ProviderOpenstack) GetConsole(ctx context.Context, request *providerGRPC.GetConsoleRequest) (*providerGRPC.GetConsoleReply, error)
- func (provider *ProviderOpenstack) Name() string
- func (provider *ProviderOpenstack) Version() string
- type ProviderOpenstackConfig
Constants ¶
View Source
const MAJOR_VERSION = "1"
Variables ¶
This section is empty.
Functions ¶
func GetConsoleErrorf ¶ added in v0.1.3
func GetConsoleErrorf(request *providerGRPC.GetConsoleRequest, format string, a ...any) *providerGRPC.GetConsoleReply
func ValidateBlueprint ¶
func ValidateBlueprint(blueprint *OpenstackBlueprint) error
Types ¶
type OpenstackBlueprint ¶
type OpenstackBlueprint struct {
// Inherit standard object values
providers.Blueprint `yaml:",inline"`
// Openstack specific values
Objects map[string]OpenstackObject `yaml:",inline"`
Hosts map[string]OpenstackHost `yaml:"-"`
Networks map[string]OpenstackNetwork `yaml:"-"`
Routers map[string]OpenstackRouter `yaml:"-"`
}
func UnmarshalBlueprintBytes ¶
func UnmarshalBlueprintBytes(in []byte) (*OpenstackBlueprint, error)
func UnmarshalBlueprintBytesWithVars ¶
func UnmarshalBlueprintBytesWithVars(in []byte, vars map[string]interface{}) (*OpenstackBlueprint, error)
func UnmarshalBlueprintFile ¶
func UnmarshalBlueprintFile(filepath string) (*OpenstackBlueprint, error)
func UnmarshalBlueprintFileWithVars ¶
func UnmarshalBlueprintFileWithVars(filepath string, varFilepath string) (*OpenstackBlueprint, error)
type OpenstackHost ¶
type OpenstackHost struct {
// Openstack instance name
Name *string `yaml:"name,omitempty"`
// Openstack instance description
Description *string `yaml:"description,omitempty"`
// Hostname of the host
Hostname string `yaml:"hostname"`
// Image of the host
Image string `yaml:"image"`
// Flavor of the host
Flavor string `yaml:"flavor"`
// Disk size of the host (in GB)
DiskSize int `yaml:"disk_size"`
// Networks to attach this host to
Networks map[string]OpenstackNetworkAttachment `yaml:"networks"`
// Any userdata to pass to created instance
UserData []byte `yaml:"user_data,omitempty"`
}
type OpenstackNetwork ¶
type OpenstackNetwork struct {
// Openstack network name
Name *string `yaml:"name,omitempty"`
// Openstack network description
Description *string `yaml:"description,omitempty"`
// The subnet CIDR for the network
Subnet netip.Prefix `yaml:"subnet"`
// The gateway for the network
Gateway *netip.Addr `yaml:"gateway,omitempty"`
// DHCP ranges for the network (omit to disable DHCP)
DHCP []OpenstackNetworkDHCP `yaml:"dhcp,omitempty"`
// DNS servers for the network (omit to disable DNS)
Resolvers []net.Addr `yaml:"resolvers,omitempty"`
}
type OpenstackNetworkDHCP ¶
type OpenstackObject ¶
type OpenstackObject struct {
// Inherit standard object values
providers.Object `yaml:",inline"`
// Openstack specific values
Resource OpenstackResourceType `yaml:"-"`
Host *OpenstackHost `yaml:"-"`
Network *OpenstackNetwork `yaml:"-"`
Router *OpenstackRouter `yaml:"-"`
}
func (*OpenstackObject) UnmarshalYAML ¶
func (o *OpenstackObject) UnmarshalYAML(n *yaml.Node) error
type OpenstackResourceType ¶
type OpenstackResourceType string
const ( OpenstackResourceTypeHost OpenstackResourceType = "openstack.v1.host" OpenstackResourceTypeNetwork OpenstackResourceType = "openstack.v1.network" OpenstackResourceTypeRouter OpenstackResourceType = "openstack.v1.router" )
type OpenstackRouter ¶
type OpenstackRouter struct {
// Openstack router name
Name *string `yaml:"name,omitempty"`
// Openstack router description
Description *string `yaml:"description,omitempty"`
// The ID or Name of the external Openstack network to attach this router to
ExternalNetwork string `yaml:"external_network"`
// Networks to attach this host to
Networks map[string]OpenstackNetworkAttachment `yaml:"networks"`
}
type ProviderOpenstack ¶
type ProviderOpenstack struct {
providerGRPC.DefaultProviderServer
}
func (*ProviderOpenstack) Author ¶
func (provider *ProviderOpenstack) Author() string
func (ProviderOpenstack) Configure ¶
func (provider ProviderOpenstack) Configure(ctx context.Context, request *providerGRPC.ConfigureRequest) (*commonGRPC.RPCStatusReply, error)
func (ProviderOpenstack) Deploy ¶
func (provider ProviderOpenstack) Deploy(ctx context.Context, request *providerGRPC.DeployRequest) (*providerGRPC.DeployReply, error)
func (*ProviderOpenstack) Description ¶
func (provider *ProviderOpenstack) Description() string
func (ProviderOpenstack) Destroy ¶
func (provider ProviderOpenstack) Destroy(ctx context.Context, request *providerGRPC.DestroyRequest) (*providerGRPC.DestroyReply, error)
func (ProviderOpenstack) GetConsole ¶ added in v0.1.3
func (provider ProviderOpenstack) GetConsole(ctx context.Context, request *providerGRPC.GetConsoleRequest) (*providerGRPC.GetConsoleReply, error)
func (*ProviderOpenstack) Name ¶
func (provider *ProviderOpenstack) Name() string
func (*ProviderOpenstack) Version ¶
func (provider *ProviderOpenstack) Version() string
type ProviderOpenstackConfig ¶
type ProviderOpenstackConfig struct {
AuthUrl string `yaml:"auth_url"`
Username string `yaml:"username"`
Password string `yaml:"password"`
ProjectID string `yaml:"project_id"`
ProjectName string `yaml:"project_name"`
RegionName string `yaml:"region_name"`
DomainName string `yaml:"domain_name,omitempty"`
DomainId string `yaml:"domain_id,omitempty"`
PreferredConsoleType remoteconsoles.ConsoleType `yaml:"console_type,omitempty"`
PreferredConsoleProtocol remoteconsoles.ConsoleProtocol `yaml:"console_protocol,omitempty"`
}
var CONFIG *ProviderOpenstackConfig
func ConfigFromBytes ¶
func ConfigFromBytes(in []byte) (*ProviderOpenstackConfig, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.