client

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OperationsCenterClient

type OperationsCenterClient struct {
	// contains filtered or unexported fields
}

func New

func New(addr string, opts ...Option) (OperationsCenterClient, error)

func (OperationsCenterClient) CleanupAllUpdates

func (c OperationsCenterClient) CleanupAllUpdates(ctx context.Context) error

func (OperationsCenterClient) CreateCluster

func (c OperationsCenterClient) CreateCluster(ctx context.Context, cluster api.ClusterPost) error

func (OperationsCenterClient) CreateClusterTemplate

func (c OperationsCenterClient) CreateClusterTemplate(ctx context.Context, clusterTemplate api.ClusterTemplatePost) error

func (OperationsCenterClient) CreateServer

func (c OperationsCenterClient) CreateServer(ctx context.Context, server api.Server) error

func (OperationsCenterClient) CreateToken

func (c OperationsCenterClient) CreateToken(ctx context.Context, newToken api.TokenPut) error

func (OperationsCenterClient) CreateTokenSeed

func (c OperationsCenterClient) CreateTokenSeed(ctx context.Context, id string, newTokenSeed api.TokenSeedPost) error

func (OperationsCenterClient) CreateUpdate

func (c OperationsCenterClient) CreateUpdate(ctx context.Context, updateStream io.ReadCloser) error

func (OperationsCenterClient) DeleteCluster

func (c OperationsCenterClient) DeleteCluster(ctx context.Context, name string, force bool) error

func (OperationsCenterClient) DeleteClusterTemplate

func (c OperationsCenterClient) DeleteClusterTemplate(ctx context.Context, name string) error

func (OperationsCenterClient) DeleteServer

func (c OperationsCenterClient) DeleteServer(ctx context.Context, name string) error

func (OperationsCenterClient) DeleteToken

func (c OperationsCenterClient) DeleteToken(ctx context.Context, id string) error

func (OperationsCenterClient) DeleteTokenSeed

func (c OperationsCenterClient) DeleteTokenSeed(ctx context.Context, id string, name string) error

func (OperationsCenterClient) DoHTTP

func (OperationsCenterClient) FactoryResetCluster added in v0.2.0

func (c OperationsCenterClient) FactoryResetCluster(ctx context.Context, name string, args ...string) error

FactoryResetCluster triggers a factory reset of a cluster. This operations removes the servers and the cluster form Operations Center inventory and triggers a factory reset for all the IncusOS servers. This operation takes up to 2 optional arguments:

  • token - if present, this token will be used in the factory reset seed instead of a freshly generated token.
  • token seed name - if present, the seed information assigned to the given token seed is used instead of the default seed.

func (OperationsCenterClient) GetAPIServerInfo

func (c OperationsCenterClient) GetAPIServerInfo(ctx context.Context) (api.ServerUntrusted, error)

func (OperationsCenterClient) GetBaseAddr

func (c OperationsCenterClient) GetBaseAddr() string

func (OperationsCenterClient) GetCluster

func (c OperationsCenterClient) GetCluster(ctx context.Context, name string) (api.Cluster, error)

func (OperationsCenterClient) GetClusterArtifact

func (c OperationsCenterClient) GetClusterArtifact(ctx context.Context, clusterName string, artifactName string) (api.ClusterArtifact, error)

func (OperationsCenterClient) GetClusterArtifactArchive

func (c OperationsCenterClient) GetClusterArtifactArchive(ctx context.Context, clusterName string, artifactName string, archiveType string) (io.ReadCloser, error)

func (OperationsCenterClient) GetClusterArtifactFile

func (c OperationsCenterClient) GetClusterArtifactFile(ctx context.Context, clusterName string, artifactName string, filename string) (io.ReadCloser, error)

func (OperationsCenterClient) GetClusterArtifacts

func (c OperationsCenterClient) GetClusterArtifacts(ctx context.Context, clusterName string) ([]api.ClusterArtifact, error)

func (OperationsCenterClient) GetClusterTemplate

func (c OperationsCenterClient) GetClusterTemplate(ctx context.Context, name string) (api.ClusterTemplate, error)

func (OperationsCenterClient) GetClusterTemplates

func (c OperationsCenterClient) GetClusterTemplates(ctx context.Context) ([]api.ClusterTemplate, error)

func (OperationsCenterClient) GetClusters

func (c OperationsCenterClient) GetClusters(ctx context.Context) ([]api.Cluster, error)

func (OperationsCenterClient) GetImage

func (c OperationsCenterClient) GetImage(ctx context.Context, id string) (api.Image, error)

func (OperationsCenterClient) GetInstance

func (c OperationsCenterClient) GetInstance(ctx context.Context, id string) (api.Instance, error)

func (OperationsCenterClient) GetNetwork

func (c OperationsCenterClient) GetNetwork(ctx context.Context, id string) (api.Network, error)

func (OperationsCenterClient) GetNetworkACL

func (c OperationsCenterClient) GetNetworkACL(ctx context.Context, id string) (api.NetworkACL, error)

func (OperationsCenterClient) GetNetworkAddressSet

func (c OperationsCenterClient) GetNetworkAddressSet(ctx context.Context, id string) (api.NetworkAddressSet, error)

func (OperationsCenterClient) GetNetworkForward

func (c OperationsCenterClient) GetNetworkForward(ctx context.Context, id string) (api.NetworkForward, error)

func (OperationsCenterClient) GetNetworkIntegration

func (c OperationsCenterClient) GetNetworkIntegration(ctx context.Context, id string) (api.NetworkIntegration, error)

func (OperationsCenterClient) GetNetworkLoadBalancer

func (c OperationsCenterClient) GetNetworkLoadBalancer(ctx context.Context, id string) (api.NetworkLoadBalancer, error)

func (OperationsCenterClient) GetNetworkPeer

func (c OperationsCenterClient) GetNetworkPeer(ctx context.Context, id string) (api.NetworkPeer, error)

func (OperationsCenterClient) GetNetworkZone

func (c OperationsCenterClient) GetNetworkZone(ctx context.Context, id string) (api.NetworkZone, error)

func (OperationsCenterClient) GetPreSeededImage added in v0.2.0

func (c OperationsCenterClient) GetPreSeededImage(ctx context.Context, id string, imageID string) (io.ReadCloser, error)

func (OperationsCenterClient) GetProfile

func (c OperationsCenterClient) GetProfile(ctx context.Context, id string) (api.Profile, error)

func (OperationsCenterClient) GetProject

func (c OperationsCenterClient) GetProject(ctx context.Context, id string) (api.Project, error)

func (OperationsCenterClient) GetServer

func (c OperationsCenterClient) GetServer(ctx context.Context, name string) (api.Server, error)

func (OperationsCenterClient) GetServerSystemNetwork

func (c OperationsCenterClient) GetServerSystemNetwork(ctx context.Context, name string) (api.ServerSystemNetwork, error)

func (OperationsCenterClient) GetServerSystemStorage added in v0.2.0

func (c OperationsCenterClient) GetServerSystemStorage(ctx context.Context, name string) (api.ServerSystemStorage, error)

func (OperationsCenterClient) GetServers

func (c OperationsCenterClient) GetServers(ctx context.Context) ([]api.Server, error)

func (OperationsCenterClient) GetStorageBucket

func (c OperationsCenterClient) GetStorageBucket(ctx context.Context, id string) (api.StorageBucket, error)

func (OperationsCenterClient) GetStoragePool

func (c OperationsCenterClient) GetStoragePool(ctx context.Context, id string) (api.StoragePool, error)

func (OperationsCenterClient) GetStorageVolume

func (c OperationsCenterClient) GetStorageVolume(ctx context.Context, id string) (api.StorageVolume, error)

func (OperationsCenterClient) GetSystemNetworkConfig

func (c OperationsCenterClient) GetSystemNetworkConfig(ctx context.Context) (api.SystemNetwork, error)

func (OperationsCenterClient) GetSystemSecurityConfig

func (c OperationsCenterClient) GetSystemSecurityConfig(ctx context.Context) (api.SystemSecurity, error)

func (OperationsCenterClient) GetSystemSettingsConfig

func (c OperationsCenterClient) GetSystemSettingsConfig(ctx context.Context) (api.SystemSettings, error)

func (OperationsCenterClient) GetSystemUpdatesConfig

func (c OperationsCenterClient) GetSystemUpdatesConfig(ctx context.Context) (api.SystemUpdates, error)

func (OperationsCenterClient) GetToken

func (c OperationsCenterClient) GetToken(ctx context.Context, id string) (api.Token, error)

func (OperationsCenterClient) GetTokenImageFromSeed

func (c OperationsCenterClient) GetTokenImageFromSeed(ctx context.Context, id string, name string, imageType api.ImageType, architecture images.UpdateFileArchitecture) (io.ReadCloser, error)

func (OperationsCenterClient) GetTokenSeed

func (c OperationsCenterClient) GetTokenSeed(ctx context.Context, id string, name string) (api.TokenSeed, error)

func (OperationsCenterClient) GetTokenSeeds

func (c OperationsCenterClient) GetTokenSeeds(ctx context.Context, id string) ([]api.TokenSeed, error)

func (OperationsCenterClient) GetTokens

func (c OperationsCenterClient) GetTokens(ctx context.Context) ([]api.Token, error)

func (OperationsCenterClient) GetUpdate

func (c OperationsCenterClient) GetUpdate(ctx context.Context, id string) (api.Update, error)

func (OperationsCenterClient) GetUpdateFiles

func (c OperationsCenterClient) GetUpdateFiles(ctx context.Context, id string) ([]api.UpdateFile, error)

func (OperationsCenterClient) GetUpdates

func (c OperationsCenterClient) GetUpdates(ctx context.Context) ([]api.Update, error)

func (OperationsCenterClient) GetUpdatesFile

func (c OperationsCenterClient) GetUpdatesFile(ctx context.Context, id string, filename string) (io.ReadCloser, error)

func (OperationsCenterClient) GetWithFilterClusters

func (c OperationsCenterClient) GetWithFilterClusters(ctx context.Context, filter provisioning.ClusterFilter) ([]api.Cluster, error)

func (OperationsCenterClient) GetWithFilterImages

func (c OperationsCenterClient) GetWithFilterImages(ctx context.Context, filter inventory.ImageFilter) ([]api.Image, error)

func (OperationsCenterClient) GetWithFilterInstances

func (c OperationsCenterClient) GetWithFilterInstances(ctx context.Context, filter inventory.InstanceFilter) ([]api.Instance, error)

func (OperationsCenterClient) GetWithFilterInventoryAggregates

func (c OperationsCenterClient) GetWithFilterInventoryAggregates(ctx context.Context, filter inventory.InventoryAggregateFilter) ([]api.InventoryAggregate, error)

func (OperationsCenterClient) GetWithFilterNetworkACLs

func (c OperationsCenterClient) GetWithFilterNetworkACLs(ctx context.Context, filter inventory.NetworkACLFilter) ([]api.NetworkACL, error)

func (OperationsCenterClient) GetWithFilterNetworkAddressSets

func (c OperationsCenterClient) GetWithFilterNetworkAddressSets(ctx context.Context, filter inventory.NetworkAddressSetFilter) ([]api.NetworkAddressSet, error)

func (OperationsCenterClient) GetWithFilterNetworkForwards

func (c OperationsCenterClient) GetWithFilterNetworkForwards(ctx context.Context, filter inventory.NetworkForwardFilter) ([]api.NetworkForward, error)

func (OperationsCenterClient) GetWithFilterNetworkIntegrations

func (c OperationsCenterClient) GetWithFilterNetworkIntegrations(ctx context.Context, filter inventory.NetworkIntegrationFilter) ([]api.NetworkIntegration, error)

func (OperationsCenterClient) GetWithFilterNetworkLoadBalancers

func (c OperationsCenterClient) GetWithFilterNetworkLoadBalancers(ctx context.Context, filter inventory.NetworkLoadBalancerFilter) ([]api.NetworkLoadBalancer, error)

func (OperationsCenterClient) GetWithFilterNetworkPeers

func (c OperationsCenterClient) GetWithFilterNetworkPeers(ctx context.Context, filter inventory.NetworkPeerFilter) ([]api.NetworkPeer, error)

func (OperationsCenterClient) GetWithFilterNetworkZones

func (c OperationsCenterClient) GetWithFilterNetworkZones(ctx context.Context, filter inventory.NetworkZoneFilter) ([]api.NetworkZone, error)

func (OperationsCenterClient) GetWithFilterNetworks

func (c OperationsCenterClient) GetWithFilterNetworks(ctx context.Context, filter inventory.NetworkFilter) ([]api.Network, error)

func (OperationsCenterClient) GetWithFilterProfiles

func (c OperationsCenterClient) GetWithFilterProfiles(ctx context.Context, filter inventory.ProfileFilter) ([]api.Profile, error)

func (OperationsCenterClient) GetWithFilterProjects

func (c OperationsCenterClient) GetWithFilterProjects(ctx context.Context, filter inventory.ProjectFilter) ([]api.Project, error)

func (OperationsCenterClient) GetWithFilterServers

func (c OperationsCenterClient) GetWithFilterServers(ctx context.Context, filter provisioning.ServerFilter) ([]api.Server, error)

func (OperationsCenterClient) GetWithFilterStorageBuckets

func (c OperationsCenterClient) GetWithFilterStorageBuckets(ctx context.Context, filter inventory.StorageBucketFilter) ([]api.StorageBucket, error)

func (OperationsCenterClient) GetWithFilterStoragePools

func (c OperationsCenterClient) GetWithFilterStoragePools(ctx context.Context, filter inventory.StoragePoolFilter) ([]api.StoragePool, error)

func (OperationsCenterClient) GetWithFilterStorageVolumes

func (c OperationsCenterClient) GetWithFilterStorageVolumes(ctx context.Context, filter inventory.StorageVolumeFilter) ([]api.StorageVolume, error)

func (OperationsCenterClient) GetWithFilterUpdates

func (c OperationsCenterClient) GetWithFilterUpdates(ctx context.Context, filter provisioning.UpdateFilter) ([]api.Update, error)

func (OperationsCenterClient) IsServerTrusted

func (c OperationsCenterClient) IsServerTrusted(ctx context.Context, serverCertificate api.Certificate) (actualServerCertificate api.Certificate, _ bool, _ error)

IsServerTrusted verifies, if the server certificate is trusted. This trust can be established by two different ways:

  1. The server has certificate signed by a trusted party, e.g. public CA.
  2. The certificate matches the provides certificate, which has been trusted by the user manually before.

If the certificate presented by the server is not trusted, the certificate presented by the server is returned for further processing, e.g. manual verification by the user.

func (OperationsCenterClient) PoweroffServerSystem added in v0.2.2

func (c OperationsCenterClient) PoweroffServerSystem(ctx context.Context, name string) error

func (OperationsCenterClient) PreparePreSeededImage added in v0.2.0

func (c OperationsCenterClient) PreparePreSeededImage(ctx context.Context, id string, preseed api.TokenImagePost) (imageID string, _ error)

func (OperationsCenterClient) RebootServerSystem added in v0.2.2

func (c OperationsCenterClient) RebootServerSystem(ctx context.Context, name string) error

func (OperationsCenterClient) RefreshUpdates

func (c OperationsCenterClient) RefreshUpdates(ctx context.Context, wait bool) error

func (OperationsCenterClient) RenameCluster

func (c OperationsCenterClient) RenameCluster(ctx context.Context, name string, newName string) error

func (OperationsCenterClient) RenameServer

func (c OperationsCenterClient) RenameServer(ctx context.Context, name string, newName string) error

func (OperationsCenterClient) ResyncCluster

func (c OperationsCenterClient) ResyncCluster(ctx context.Context, name string) error

func (OperationsCenterClient) ResyncServer added in v0.2.0

func (c OperationsCenterClient) ResyncServer(ctx context.Context, name string) error

func (OperationsCenterClient) SetSystemCertificate

func (c OperationsCenterClient) SetSystemCertificate(ctx context.Context, cfg api.SystemCertificatePost) error

func (OperationsCenterClient) UpdateCluster

func (c OperationsCenterClient) UpdateCluster(ctx context.Context, name string, cluster api.ClusterPut) error

func (OperationsCenterClient) UpdateClusterCertificate

func (c OperationsCenterClient) UpdateClusterCertificate(ctx context.Context, name string, requestBody api.ClusterCertificatePut) error

func (OperationsCenterClient) UpdateServer

func (c OperationsCenterClient) UpdateServer(ctx context.Context, name string, server api.ServerPut) error

func (OperationsCenterClient) UpdateServerSystemNetwork

func (c OperationsCenterClient) UpdateServerSystemNetwork(ctx context.Context, name string, server api.ServerSystemNetwork) error

func (OperationsCenterClient) UpdateServerSystemStorage added in v0.2.0

func (c OperationsCenterClient) UpdateServerSystemStorage(ctx context.Context, name string, server api.ServerSystemStorage) error

func (OperationsCenterClient) UpdateSystemNetworkConfig

func (c OperationsCenterClient) UpdateSystemNetworkConfig(ctx context.Context, cfg api.SystemNetworkPut) error

func (OperationsCenterClient) UpdateSystemSecurityConfig

func (c OperationsCenterClient) UpdateSystemSecurityConfig(ctx context.Context, cfg api.SystemSecurityPut) error

func (OperationsCenterClient) UpdateSystemSettingsConfig

func (c OperationsCenterClient) UpdateSystemSettingsConfig(ctx context.Context, cfg api.SystemSettingsPut) error

func (OperationsCenterClient) UpdateSystemUpdatesConfig

func (c OperationsCenterClient) UpdateSystemUpdatesConfig(ctx context.Context, cfg api.SystemUpdatesPut) error

func (OperationsCenterClient) UpdateTokenSeed

func (c OperationsCenterClient) UpdateTokenSeed(ctx context.Context, id string, name string, tokenSeed api.TokenSeedPut) error

type Option

type Option func(c *OperationsCenterClient) error

func WithClientCertificate

func WithClientCertificate(certInfo *incusTLS.CertInfo) Option

func WithForceLocal

func WithForceLocal(unixSocket string) Option

func WithOIDCTokensFile

func WithOIDCTokensFile(oidcTokensFilename string) Option

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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