openstack

package
v1.0.0-rc07 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	StatusPlanned  = "planned"
	StatusApplied  = "applied"
	StatusNoOp     = "no-op"
	StatusBlocked  = "blocked"
	StatusDeclined = "declined"

	// DefaultLinuxImageName is the operator preference applied when no
	// --image-name is given. It is a NAME, resolved against live Glance
	// inventory exactly like an explicit selector, so nothing is ever persisted
	// unless the cloud actually has that image. Image IDs are project-scoped and
	// must never be baked in (see the stale-image detection in Plan); a name
	// carries no such risk. When the cloud does not have it, plan falls through
	// to the ordinary ambiguous path and prints the candidate list.
	DefaultLinuxImageName = "Ubuntu 24.04"
)

Variables

EnsureProfileAuth is the seam through which the command layer obtains a persistable application credential for a cloud profile, minting and persisting one into clouds.yaml when the profile lacks an ID/secret pair. Tests replace it to exercise the auto-import flow without a live Keystone.

Functions

This section is empty.

Types

type ApplyPersistence

type ApplyPersistence struct {
	FileSystem fs.FileSystem
	Validate   func(context.Context, *v2.Config) error
}

ApplyPersistence persists a non-empty provider patch after prospective validation. It deliberately has no remote mutation capability.

func (ApplyPersistence) Apply

func (p ApplyPersistence) Apply(ctx context.Context, path string, original, prospective *v2.Config, originalData []byte, result Result) (Result, error)

type AuthImport

type AuthImport struct {
	ApplicationCredentialID     string
	ApplicationCredentialSecret string
}

type Change

type Change struct {
	Path string `json:"path" yaml:"path"`
	Old  string `json:"old" yaml:"old"`
	New  string `json:"new" yaml:"new"`
}

type Options

type Options struct {
	ImageName             string
	WindowsImageName      string
	NetworkID             string
	ExternalNetworkID     string
	SubnetID              string
	AvailabilityZone      string
	CreateInternalNetwork bool
	Replace               bool
	ImportAuth            *AuthImport
	ImportTLS             bool
}

type Result

type Result struct {
	SchemaVersion           int         `json:"schema_version" yaml:"schema_version"`
	Operation               string      `json:"operation" yaml:"operation"`
	Status                  string      `json:"status" yaml:"status"`
	Cluster                 string      `json:"cluster" yaml:"cluster"`
	Provider                string      `json:"provider" yaml:"provider"`
	CloudProfile            string      `json:"cloud_profile" yaml:"cloud_profile"`
	InternalNetworkMode     string      `json:"internal_network_mode,omitempty" yaml:"internal_network_mode,omitempty"`
	Changes                 []Change    `json:"changes" yaml:"changes"`
	Selections              []Selection `json:"selections" yaml:"selections"`
	Warnings                []string    `json:"warnings" yaml:"warnings"`
	RemoteActions           []string    `json:"remote_actions" yaml:"remote_actions"`
	SensitiveValuesRedacted bool        `json:"sensitive_values_redacted" yaml:"sensitive_values_redacted"`
}

func Plan

func Plan(ctx context.Context, cfg *v2.Config, snapshot *cloudopenstack.DiscoverySnapshot, opts Options) (Result, *v2.Config, error)

type Selection

type Selection struct {
	Field      string                    `json:"field" yaml:"field"`
	Candidates []cloudopenstack.Resource `json:"candidates" yaml:"candidates"`
}

Jump to

Keyboard shortcuts

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