Documentation
¶
Overview ¶
Package openstack provides OpenStack-specific functionality.
This package contains functions for performing preflight checks and other operations related to OpenStack.
When to use ¶
This package is used internally by opencenter to ensure that the environment is correctly configured for OpenStack. It is invoked as part of the `cluster doctor` command.
Index ¶
- func PreflightOpenStack(authURL string) []string
- type CatalogItem
- type DiscoveryCatalog
- type DiscoveryClient
- type GophercloudDiscoveryClient
- type Provider
- func (p *Provider) DetectDrift(ctx context.Context, desired, actual *cloud.InfrastructureState) (*cloud.DriftReport, error)
- func (p *Provider) GetCurrentState(ctx context.Context, cfg v2.Config) (*cloud.InfrastructureState, error)
- func (p *Provider) ReconcileDrift(ctx context.Context, drift *cloud.DriftReport) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PreflightOpenStack ¶
PreflightOpenStack performs provider-specific preflight checks for OpenStack. It checks for the presence of the `openstack` CLI tool and verifies that the authentication URL is configured.
Inputs:
- authURL: The OpenStack authentication URL.
Outputs:
- []string: A list of warning messages. If the list is empty, all checks passed.
Types ¶
type CatalogItem ¶
type DiscoveryCatalog ¶
type DiscoveryCatalog struct {
Images []CatalogItem
Flavors []CatalogItem
Networks []CatalogItem
Subnets []CatalogItem
ExternalNetworks []CatalogItem
AvailabilityZones []CatalogItem
DesignateAvailable bool
}
type DiscoveryClient ¶
type DiscoveryClient interface {
Discover(ctx context.Context, cfg *v2.Config) (*DiscoveryCatalog, error)
}
func NewDiscoveryClient ¶
func NewDiscoveryClient() DiscoveryClient
type GophercloudDiscoveryClient ¶
type GophercloudDiscoveryClient struct{}
func (*GophercloudDiscoveryClient) Discover ¶
func (c *GophercloudDiscoveryClient) Discover(ctx context.Context, cfg *v2.Config) (*DiscoveryCatalog, error)
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements the CloudProvider interface for OpenStack.
func NewProvider ¶
func NewProvider(authOpts gophercloud.AuthOptions, region string) *Provider
NewProvider creates a new OpenStack cloud provider.
func (*Provider) DetectDrift ¶
func (p *Provider) DetectDrift(ctx context.Context, desired, actual *cloud.InfrastructureState) (*cloud.DriftReport, error)
DetectDrift compares desired state with actual state and returns a drift report.
func (*Provider) GetCurrentState ¶
func (p *Provider) GetCurrentState(ctx context.Context, cfg v2.Config) (*cloud.InfrastructureState, error)
GetCurrentState retrieves the current infrastructure state from OpenStack.
func (*Provider) ReconcileDrift ¶
ReconcileDrift applies safe mutable changes only.