clients

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IronicClient

func IronicClient(ironicEndpoint string, auth AuthConfig, tls TLSConfig) (client *gophercloud.ServiceClient, err error)

IronicClient creates a client for Ironic

Types

type AuthConfig

type AuthConfig struct {
	Type     AuthType
	Username string
	Password string
}

AuthConfig contains data needed to configure authentication in the client

func ConfigFromEndpointURL

func ConfigFromEndpointURL(endpointURL string) (endpoint string, auth AuthConfig, err error)

ConfigFromEndpointURL returns an endpoint and an auth config from an endpoint URL that may contain HTTP basic auth credentials.

func LoadAuth

func LoadAuth() (auth AuthConfig, err error)

LoadAuth loads the Ironic configuration from the environment

type AuthType

type AuthType string

AuthType is the method of authenticating requests to the server

const (
	// NoAuth uses no authentication
	NoAuth AuthType = "noauth"
	// HTTPBasicAuth uses HTTP Basic Authentication
	HTTPBasicAuth AuthType = "http_basic"
)

type AvailableFeatures added in v0.5.0

type AvailableFeatures struct {
	MaxVersion int
}

AvailableFeatures represents features that Ironic API provides. See https://docs.openstack.org/ironic/latest/contributor/webapi-version-history.html

func GetAvailableFeatures added in v0.5.0

func GetAvailableFeatures(client *gophercloud.ServiceClient) (features AvailableFeatures, err error)

func (AvailableFeatures) ChooseMicroversion added in v0.5.0

func (af AvailableFeatures) ChooseMicroversion() string

func (AvailableFeatures) HasFirmwareUpdates added in v0.5.0

func (af AvailableFeatures) HasFirmwareUpdates() bool

func (AvailableFeatures) Log added in v0.5.0

func (af AvailableFeatures) Log(logger logr.Logger)

type TLSConfig

type TLSConfig struct {
	TrustedCAFile         string
	ClientCertificateFile string
	ClientPrivateKeyFile  string
	InsecureSkipVerify    bool
	SkipClientSANVerify   bool
}

TLSConfig contains the TLS configuration for the Ironic connection. Using Go default values for this will result in no additional trusted CA certificates and a secure connection. When specifying Certificate and Private key, TLS connection will use client certificate authentication.

Jump to

Keyboard shortcuts

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