openstack

package
v0.0.0-...-2170ac4 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func PreflightOpenStack

func PreflightOpenStack(authURL string) []string

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 CatalogItem struct {
	ID   string
	Name string
}

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

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

func (p *Provider) ReconcileDrift(ctx context.Context, drift *cloud.DriftReport) error

ReconcileDrift applies safe mutable changes only.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL