caasapplicationprovisioner

package
v0.0.0-...-6dcaeb9 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*charmscommon.CharmInfoClient
	*charmscommon.ApplicationCharmInfoClient
	// contains filtered or unexported fields
}

Client allows access to the CAAS application provisioner API endpoint.

func NewClient

func NewClient(caller base.APICaller) *Client

NewClient returns a client used to access the CAAS Application Provisioner API.

func (*Client) ApplicationOCIResources

func (c *Client) ApplicationOCIResources(appName string) (map[string]resources.DockerImageDetails, error)

ApplicationOCIResources returns all the OCI image resources for an application.

func (*Client) ClearApplicationResources

func (c *Client) ClearApplicationResources(appName string) error

ClearApplicationResources clears the flag which indicates an application still has resources in the cluster.

func (*Client) DestroyUnits

func (c *Client) DestroyUnits(unitNames []string) error

DestroyUnits is responsible for starting the process of destroying units associated with this application.

func (*Client) Life

func (c *Client) Life(entityName string) (life.Value, error)

Life returns the lifecycle state for the specified application or unit in the current model.

func (*Client) ProvisionerConfig

func (c *Client) ProvisionerConfig() (params.CAASApplicationProvisionerConfig, error)

ProvisionerConfig returns the provisoner's configuration.

func (*Client) ProvisioningInfo

func (c *Client) ProvisioningInfo(applicationName string) (ProvisioningInfo, error)

ProvisioningInfo returns the info needed to provision an operator for an application.

func (*Client) ProvisioningState

func (c *Client) ProvisioningState(appName string) (*params.CAASApplicationProvisioningState, error)

ProvisioningState returns the current provisioning state for the CAAS application. The result can be nil.

func (*Client) RemoveUnit

func (c *Client) RemoveUnit(unitName string) error

RemoveUnit removes the specified unit from the current model.

func (*Client) SetOperatorStatus

func (c *Client) SetOperatorStatus(appName string, status status.Status, message string, data map[string]interface{}) error

SetOperatorStatus updates the provisioning status of an operator.

func (*Client) SetPassword

func (c *Client) SetPassword(appName string, password string) error

SetPassword sets API password for the specified application.

func (*Client) SetProvisioningState

func (c *Client) SetProvisioningState(appName string, state params.CAASApplicationProvisioningState) error

SetProvisioningState sets the provisioning state for the CAAS application.

func (*Client) Units

func (c *Client) Units(appName string) ([]params.CAASUnit, error)

Units returns all the units for an Application.

func (*Client) UpdateUnits

UpdateUnits updates the state model to reflect the state of the units as reported by the cloud.

func (*Client) WatchApplication

func (c *Client) WatchApplication(appName string) (watcher.NotifyWatcher, error)

WatchApplication returns a NotifyWatcher that notifies of changes to the application in the current model.

func (*Client) WatchApplications

func (c *Client) WatchApplications() (watcher.StringsWatcher, error)

WatchApplications returns a StringsWatcher that notifies of changes to the lifecycles of CAAS applications in the current model.

func (*Client) WatchProvisioningInfo

func (c *Client) WatchProvisioningInfo(applicationName string) (watcher.NotifyWatcher, error)

func (*Client) WatchUnits

func (c *Client) WatchUnits(application string) (watcher.StringsWatcher, error)

WatchUnits returns a StringsWatcher that notifies of changes to the lifecycles of units of the specified application in the current model.

type ProvisioningInfo

type ProvisioningInfo struct {
	Version              version.Number
	APIAddresses         []string
	CACert               string
	Tags                 map[string]string
	Constraints          constraints.Value
	Filesystems          []storage.KubernetesFilesystemParams
	Devices              []devices.KubernetesDeviceParams
	Base                 corebase.Base
	ImageDetails         resources.DockerImageDetails
	CharmModifiedVersion int
	CharmURL             *charm.URL
	Trust                bool
	Scale                int
}

ProvisioningInfo holds the info needed to provision an operator.

Jump to

Keyboard shortcuts

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