Documentation
¶
Index ¶
- func Errorf(format string, a ...any) *string
- func ValidateBlueprint(blueprint *OpenstackBlueprint) error
- type OpenstackBlueprint
- 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 *pgrpc.ConfigureRequest) (*pgrpc.ConfigureReply, error)
- func (provider ProviderOpenstack) DeployResource(ctx context.Context, request *pgrpc.DeployResourceRequest) (*pgrpc.DeployResourceReply, error)
- func (provider *ProviderOpenstack) Description() string
- func (provider ProviderOpenstack) DestroyResource(ctx context.Context, request *pgrpc.DestroyResourceRequest) (*pgrpc.DestroyResourceReply, error)
- func (provider ProviderOpenstack) ExtractResourceMetadata(ctx context.Context, request *pgrpc.ExtractResourceMetadataRequest) (*pgrpc.ExtractResourceMetadataReply, error)
- func (provider *ProviderOpenstack) Name() string
- func (provider ProviderOpenstack) ResourcePower(ctx context.Context, request *pgrpc.ResourcePowerRequest) (*pgrpc.ResourcePowerReply, error)
- func (provider ProviderOpenstack) RetrieveData(ctx context.Context, request *pgrpc.RetrieveDataRequest) (*pgrpc.RetrieveDataReply, error)
- func (provider *ProviderOpenstack) Version() string
- type ProviderOpenstackConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateBlueprint ¶
func ValidateBlueprint(blueprint *OpenstackBlueprint) error
Types ¶
type OpenstackBlueprint ¶
type OpenstackBlueprint struct { // Inherit standard object values models.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:"-"` }
type OpenstackHost ¶
type OpenstackHost struct { // Openstack instance id ID *string `yaml:"id,omitempty"` // Openstack instance name Name *string `yaml:"name,omitempty"` // Openstack instance description Description *string `yaml:"description,omitempty"` // Hostname of the host Hostname string `yaml:"hostname,omitempty"` // Image of the host Image string `yaml:"image,omitempty"` // Flavor of the host Flavor string `yaml:"flavor,omitempty"` // Disk size of the host (in GB) DiskSize int `yaml:"disk_size,omitempty"` // Networks to attach this host to Networks map[string]OpenstackNetworkAttachment `yaml:"networks,omitempty"` // Any userdata to pass to created instance UserData []byte `yaml:"user_data,omitempty"` }
type OpenstackNetwork ¶
type OpenstackNetwork struct { // Openstack network id ID *string `yaml:"id,omitempty"` // 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 models.Object `yaml:",inline"` // Openstack specific values Data *OpenstackResourceType `yaml:"-"` 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 id ID *string `yaml:"id,omitempty"` // 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 {
pgrpc.DefaultProviderServer
}
func (*ProviderOpenstack) Author ¶
func (provider *ProviderOpenstack) Author() string
func (ProviderOpenstack) Configure ¶
func (provider ProviderOpenstack) Configure(ctx context.Context, request *pgrpc.ConfigureRequest) (*pgrpc.ConfigureReply, error)
func (ProviderOpenstack) DeployResource ¶ added in v0.2.0
func (provider ProviderOpenstack) DeployResource(ctx context.Context, request *pgrpc.DeployResourceRequest) (*pgrpc.DeployResourceReply, error)
func (*ProviderOpenstack) Description ¶
func (provider *ProviderOpenstack) Description() string
func (ProviderOpenstack) DestroyResource ¶ added in v0.2.0
func (provider ProviderOpenstack) DestroyResource(ctx context.Context, request *pgrpc.DestroyResourceRequest) (*pgrpc.DestroyResourceReply, error)
func (ProviderOpenstack) ExtractResourceMetadata ¶ added in v0.2.0
func (provider ProviderOpenstack) ExtractResourceMetadata(ctx context.Context, request *pgrpc.ExtractResourceMetadataRequest) (*pgrpc.ExtractResourceMetadataReply, error)
func (*ProviderOpenstack) Name ¶
func (provider *ProviderOpenstack) Name() string
func (ProviderOpenstack) ResourcePower ¶ added in v0.2.0
func (provider ProviderOpenstack) ResourcePower(ctx context.Context, request *pgrpc.ResourcePowerRequest) (*pgrpc.ResourcePowerReply, error)
func (ProviderOpenstack) RetrieveData ¶ added in v0.2.0
func (provider ProviderOpenstack) RetrieveData(ctx context.Context, request *pgrpc.RetrieveDataRequest) (*pgrpc.RetrieveDataReply, error)
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)
Click to show internal directories.
Click to hide internal directories.