Documentation
¶
Index ¶
- Constants
- Variables
- func AsNotIncusOSError(err error) error
- func CertEncodeToPEM(rawCert []byte) string
- func StatusErrorCheck(err error, matchStatusCodes ...int) bool
- func StatusErrorMatch(err error, matchStatusCodes ...int) (int, bool)
- func X509CertEncodeToPEM(cert *x509.Certificate) string
- type ApplicationVersionData
- type Certificate
- type Channel
- type ChannelPost
- type ChannelPut
- type Cluster
- type ClusterArtifact
- type ClusterArtifactFile
- type ClusterBulkUpdateAction
- type ClusterBulkUpdatePost
- type ClusterCertificatePut
- type ClusterConfig
- type ClusterConfigRollingRestart
- type ClusterDeleteMode
- type ClusterPost
- type ClusterPut
- type ClusterStatus
- type ClusterTemplate
- type ClusterTemplatePost
- type ClusterTemplatePut
- type ClusterTemplateVariable
- type ClusterTemplateVariables
- type ClusterUpdateInProgress
- type ClusterUpdateInProgressStatus
- type ClusterUpdatePost
- type ClusterUpdateStatus
- type ConfigMap
- type HardwareData
- type Image
- type ImageType
- type InMaintenanceState
- type Instance
- type InventoryAggregate
- type Network
- type NetworkACL
- type NetworkAddressSet
- type NetworkForward
- type NetworkIntegration
- type NetworkLoadBalancer
- type NetworkPeer
- type NetworkZone
- type OSData
- type OSVersionData
- type Profile
- type Project
- type Response
- type ResponseRaw
- type ResponseType
- type SeedApplication
- type SeedApplications
- type SeedIncus
- type SeedInstall
- type SeedMigrationManager
- type SeedNetwork
- type SeedOperationsCenter
- type SeedUpdate
- type SeedUpdateConfig
- type Server
- type ServerAction
- type ServerPost
- type ServerPut
- type ServerRegistrationResponse
- type ServerSelfUpdate
- type ServerStatus
- type ServerStatusDetail
- type ServerSystemKernel
- type ServerSystemLogging
- type ServerSystemNetwork
- type ServerSystemNetworkVLAN
- type ServerSystemProvider
- type ServerSystemStorage
- type ServerSystemUpdate
- type ServerType
- type ServerUntrusted
- type ServerUpdateApplication
- type ServerUpdatePost
- type ServerUpdateState
- type ServerVersionData
- type StatusCode
- type StatusError
- type StorageBucket
- type StoragePool
- type StorageVolume
- type Token
- type TokenImagePost
- type TokenProviderConfig
- type TokenPut
- type TokenSeed
- type TokenSeedConfigs
- type TokenSeedPost
- type TokenSeedPut
- type Update
- type UpdateChangelog
- type UpdateChangelogs
- type UpdateFile
- type UpdatePut
- type UpdateStatus
Constants ¶
const ( // AuthenticationMethodTLS is the default authentication method for interacting with Incus remotely. AuthenticationMethodTLS = "tls" // AuthenticationMethodOIDC is a token based authentication method. AuthenticationMethodOIDC = "oidc" )
const ( APIVersion string = "1.0" APIStatus string = "devel" )
const ServerNameOperationsCenter = "operations-center"
Variables ¶
var ClusterDeleteModes = map[ClusterDeleteMode]struct{}{ ClusterDeleteModeNormal: {}, ClusterDeleteModeForce: {}, ClusterDeleteModeFactoryReset: {}, }
var ClusterStatuses = map[ClusterStatus]struct{}{ ClusterStatusUnknown: {}, ClusterStatusPending: {}, ClusterStatusReady: {}, }
var NotIncusOSError = notIncusOSError{}
var StatusCodeNames = map[StatusCode]string{ Success: "Success", Failure: "Failure", }
StatusCodeNames associates a status code to its name.
Functions ¶
func AsNotIncusOSError ¶
AsNotIncusOSError returns a NotIncusOSError, if the passed error matches the message of NotIncusOSError. Otherwise the passed error is returned unaltered.
func CertEncodeToPEM ¶
func StatusErrorCheck ¶
StatusErrorCheck returns whether or not err was caused by a StatusError and if it matches one of the optional status codes.
func StatusErrorMatch ¶
StatusErrorMatch checks if err was caused by StatusError. Can optionally also check whether the StatusError's status code matches one of the supplied status codes in matchStatus. Returns the matched StatusError status code and true if match criteria are met, otherwise false.
func X509CertEncodeToPEM ¶
func X509CertEncodeToPEM(cert *x509.Certificate) string
Types ¶
type ApplicationVersionData ¶ added in v0.2.2
type ApplicationVersionData struct {
// Name of the software component.
// Example: IncusOS
Name string `json:"name" yaml:"name"`
// Version string.
// Example: 202512250102
Version string `json:"version" yaml:"version"`
// AvailableVersion is the most recent version available for this application
// in the update channel assigned to the respective system.
AvailableVersion *string `json:"available_version,omitempty" yaml:"available_version,omitempty"`
// NeedsUpdate is true, if this application needs to be updated
// (available_version > version).
NeedsUpdate *bool `json:"needs_update,omitempty" yaml:"needs_update,omitempty"`
// InMaintenance is the application state indicating if the application
// is in maintenance mode (e.g. for Incus, if it has been evacuated).
InMaintenance InMaintenanceState `json:"in_maintenance" yaml:"in_maintenance"`
}
ApplicationVersionData defines a single version information for an application.
swagger:model
type Certificate ¶
type Certificate struct {
*x509.Certificate
}
func (Certificate) MarshalJSON ¶
func (c Certificate) MarshalJSON() ([]byte, error)
func (Certificate) MarshalYAML ¶
func (c Certificate) MarshalYAML() (any, error)
func (Certificate) String ¶
func (c Certificate) String() string
func (*Certificate) UnmarshalJSON ¶
func (c *Certificate) UnmarshalJSON(b []byte) error
func (*Certificate) UnmarshalYAML ¶
func (c *Certificate) UnmarshalYAML(unmarshal func(v any) error) error
type Channel ¶ added in v0.3.0
type Channel struct {
ChannelPost
// LastUpdated is the time, when this information has been updated for the last time in RFC3339 format.
// Example: 2024-11-12T16:15:00Z
LastUpdated time.Time `json:"last_updated" yaml:"last_updated"`
}
Channel defines a channel.
swagger:model
type ChannelPost ¶ added in v0.3.0
type ChannelPost struct {
ChannelPut
// Name of the channel.
// Example: stable
Name string `json:"name" yaml:"name"`
}
ChannelPost represents the fields available when creating a channel.
swagger:model
type ChannelPut ¶ added in v0.3.0
type ChannelPut struct {
// Description of the channel.
// Example: stable channel, used for production.
Description string `json:"description" yaml:"description"`
}
ChannelPut represents the fields available for update for a channel.
swagger:model
type Cluster ¶
type Cluster struct {
ClusterPut `yaml:",inline"`
// A human-friendly name for this cluster.
// Example: MyCluster
Name string `json:"name" yaml:"name"`
// Certificate of the cluster endpoint in PEM encoded format.
// Example:
// -----BEGIN CERTIFICATE-----
// ...
// -----END CERTIFICATE-----
Certificate string `json:"certificate" yaml:"certificate"`
// Fingerprint in SHA256 format of the certificate.
// Example: fd200419b271f1dc2a5591b693cc5774b7f234e1ff8c6b78ad703b6888fe2b69
Fingerprint string `json:"fingerprint" yaml:"fingerprint"`
// Status contains the status the cluster is currently in from the point of view of Operations Center.
// Possible values for status are: pending, ready
// Example: pending
Status ClusterStatus `json:"status" yaml:"status"`
// UpdateStatus contains the aggregated update state for the cluster,
// which consists of the lowest state of all the servers of the cluster.
//
// Additionally, it contains details about an ongoing cluster wide update
// process if any.
UpdateStatus ClusterUpdateStatus `json:"update_status" yaml:"update_status"`
// LastUpdated is the time, when this information has been updated for the last time in RFC3339 format.
// Example: 2024-11-12T16:15:00Z
LastUpdated time.Time `json:"last_updated" yaml:"last_updated"`
}
Cluster defines a cluster of servers running Hypervisor OS.
swagger:model
type ClusterArtifact ¶
type ClusterArtifact struct {
// Cluster the artifact belongs to.
// Example: cluster01
Cluster string `json:"cluster" yaml:"cluster"`
// Name of the artifact
// Example: terraform-configuration
Name string `json:"name" yaml:"name"`
// Description of the cluster artifact.
// Example: Terraform configuration.
Description string `json:"description" yaml:"description"`
// Properties contains properties of the artifact as key/value pairs.
// Example (in YAML notation for readability):
// properties:
// arch: x86_64
// os: linux
Properties ConfigMap `json:"properties" yaml:"properties"`
// Files contains the list of files, that form the given artifact.
Files []ClusterArtifactFile `json:"files" yaml:"files"`
// LastUpdated is the time, when this information has been updated for the
// last time in RFC3339 format.
// Example: 2024-11-12T16:15:00Z
LastUpdated time.Time `json:"last_updated" yaml:"last_updated"`
}
ClusterArtifact defines an artifact, which belongs to a given cluster.
swagger:model
type ClusterArtifactFile ¶
type ClusterArtifactFile struct {
// Name of the artifact file.
// Example: somefile.txt
Name string `json:"name" yaml:"name"`
// MimeType of the artifact file, used when the file content is returned
// to set the correct Content-Type header.
// Example: text/plain
MimeType string `json:"mime_type" yaml:"mime_type"`
// Size of the File in bytes.
// Example: 54300000
Size int64 `json:"size" yaml:"size"`
}
ClusterArtifactFile defines a single file of a cluster artifact.
swagger:model
type ClusterBulkUpdateAction ¶ added in v0.5.0
type ClusterBulkUpdateAction string
const ( ClusterBulkUpdateActionInvalid ClusterBulkUpdateAction = "" ClusterBulkUpdateActionAddNetworkInterfaceVLANTags ClusterBulkUpdateAction = "add_network_interface_vlan_tags" ClusterBulkUpdateActionRemoveNetworkInterfaceVLANTags ClusterBulkUpdateAction = "remove_network_interface_vlan_tags" ClusterBulkUpdateActionUpdateSystemLogging ClusterBulkUpdateAction = "update_system_logging" ClusterBulkUpdateActionUpdateSystemKernel ClusterBulkUpdateAction = "update_system_kernel" ClusterBulkUpdateActionAddApplication ClusterBulkUpdateAction = "add_application" ClusterBulkUpdateActionAddISCSIStorageTarget ClusterBulkUpdateAction = "add_iscsi_storage_target" ClusterBulkUpdateActionRemoveISCSIStorageTarget ClusterBulkUpdateAction = "remove_iscsi_storage_target" ClusterBulkUpdateActionAddMultipathStorageTarget ClusterBulkUpdateAction = "add_multipath_storage_target" ClusterBulkUpdateActionRemoveMultipathStorageTarget ClusterBulkUpdateAction = "remove_multipath_storage_target" ClusterBulkUpdateActionAddNVMEStorageTarget ClusterBulkUpdateAction = "add_nvme_storage_target" ClusterBulkUpdateActionRemoveNVMEStorageTarget ClusterBulkUpdateAction = "remove_nvme_storage_target" )
type ClusterBulkUpdatePost ¶ added in v0.5.0
type ClusterBulkUpdatePost struct {
// Action to be executed for this bulk update.
Action ClusterBulkUpdateAction `json:"action" yaml:"action"`
// Arguments for the action, the exact structure depends on the
// defined action.
Arguments *json.RawMessage `json:"arguments" yaml:"arguments"`
}
ClusterBulkUpdatePost represents a cluster bulk update request containing action and optional arguments.
swagger:model
type ClusterCertificatePut ¶
type ClusterCertificatePut struct {
// The new certificate (X509 PEM encoded) for the cluster.
// Example: X509 PEM certificate
ClusterCertificate string `json:"cluster_certificate" yaml:"cluster_certificate"`
// The new certificate key (X509 PEM encoded) for the cluster.
// Example: X509 PEM certificate key
ClusterCertificateKey string `json:"cluster_certificate_key" yaml:"cluster_certificate_key"`
}
ClusterCertificatePut represents the certificate and key pair for all cluster members.
swagger:model
type ClusterConfig ¶ added in v0.5.0
type ClusterConfig struct {
RollingRestart ClusterConfigRollingRestart `json:"rolling_restart" yaml:"rolling_restart"`
}
ClusterConfig contains cluster wide configuration used by Operations Center when interacting with the cluster.
func (*ClusterConfig) Scan ¶ added in v0.5.0
func (c *ClusterConfig) Scan(value any) error
type ClusterConfigRollingRestart ¶ added in v0.5.0
type ClusterConfigRollingRestart struct {
// PostRestoreDelay holds the time, that is waited between the resore
// of a server and the evacuation of the next server. This should be set if
// RestoreMode is kept at the default value in order to grant a cluster
// enough time to move previously evacuated instances back to their
// originating server.
PostRestoreDelay time.Duration `json:"post_restore_delay" yaml:"post_restore_delay"`
// RestoreMode is the mode applied dring Incus restore operation. Valid
// values are "" (default, move instances back, that have been evacuated
// previously) and "skip" (skip moving evacuated instances back).
// Example: skip
RestoreMode string `json:"restore_mode" yaml:"restore_mode"`
}
type ClusterDeleteMode ¶
type ClusterDeleteMode string
const ( ClusterDeleteModeNormal ClusterDeleteMode = "normal" ClusterDeleteModeForce ClusterDeleteMode = "force" ClusterDeleteModeFactoryReset ClusterDeleteMode = "factory-reset" )
func (ClusterDeleteMode) String ¶
func (s ClusterDeleteMode) String() string
type ClusterPost ¶
type ClusterPost struct {
Cluster `yaml:",inline"`
// Names of the servers beloning to the cluster.
// Example: [ "server1", "server2" ]
ServerNames []string `json:"server_names" yaml:"server_names"`
// ServerType is the expected type of servers to be clustered.
// Clustering will fail, if not all the servers are of the same type.
ServerType ServerType `json:"server_type" yaml:"server_type"`
// ServicesConfig contains the configuration for each service, which should be configured on Hypervisor OS.
// Operations Center is simply passing forward the settings to Hypervisor OS.
// For details about the configuration settings available refer to the service
// API definitions in https://github.com/lxc/incus-os/tree/main/incus-osd/api.
ServicesConfig map[string]any `json:"services_config" yaml:"services_config"`
// ApplicationSeedConfig contains the seed configuration for the application, which is
// applied during post clustering. This configuration is application specific.
ApplicationSeedConfig map[string]any `json:"application_seed_config" yaml:"application_seed_config"`
// ClusterTemplate contains the name of a cluster template, which should be
// used for the cluster creation.
// If ClusterTemplate is a none empty string, the respective cluster template
// is used and the values in ServiceConfig and ApplicationConfig are
// disregarded. If the cluster template is not found, an error is returned.
ClusterTemplate string `json:"cluster_template" yaml:"cluster_template"`
// ClusterTemplateVariableValues contains the variable values, which should
// be applied to the respective placeholders in the cluster template.
ClusterTemplateVariableValues ConfigMap `json:"cluster_template_variable_values" yaml:"cluster_template_variable_values"`
}
ClusterPost represents the fields available for a new cluster of servers running Hypervisor OS.
swagger:model
type ClusterPut ¶
type ClusterPut struct {
// URL, hostname or IP address of the cluster endpoint.
// This is only user facing, e.g. the address of a load balancer infront of
// the cluster and not used by Operations Center for direct communication
// Operations Center relies on the connection URL of the cluster members.
// Example: https://incus.local:6443
ConnectionURL string `json:"connection_url" yaml:"connection_url"`
// Channel the cluster is following for updates.
// Example: stable
Channel string `json:"channel" yaml:"channel"`
// Description of the cluster.
// Example: Lab cluster with limited resources.
Description string `json:"description" yaml:"description"`
// Properties contains properties of the cluster as key/value pairs.
// Example (in YAML notation for readability):
// properties:
// env: lab
Properties ConfigMap `json:"properties" yaml:"properties"`
// Config contains cluster wide configuration used by Operations Center
// when interacting with the cluster. For example waiting delays during
// cluster evacuation and restore, before a subsequent server is processed.
Config ClusterConfig `json:"config" yaml:"config"`
}
ClusterPut defines the updateable part of a cluster of servers running Hypervisor OS.
swagger:model
type ClusterStatus ¶
type ClusterStatus string
const ( ClusterStatusUnknown ClusterStatus = "unknown" ClusterStatusPending ClusterStatus = "pending" ClusterStatusReady ClusterStatus = "ready" )
func (ClusterStatus) MarshalText ¶
func (s ClusterStatus) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface.
func (*ClusterStatus) Scan ¶
func (s *ClusterStatus) Scan(value any) error
Scan implements the sql.Scanner interface.
func (ClusterStatus) String ¶
func (s ClusterStatus) String() string
func (*ClusterStatus) UnmarshalText ¶
func (s *ClusterStatus) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface.
type ClusterTemplate ¶
type ClusterTemplate struct {
ClusterTemplatePost `yaml:",inline"`
// LastUpdated is the time, when this information has been updated for the last time in RFC3339 format.
// Example: 2024-11-12T16:15:00Z
LastUpdated time.Time `json:"last_updated" yaml:"last_updated"`
}
ClusterTemplate defines a template, which can be used to form a cluster of servers running Hypervisor OS.
swagger:model
type ClusterTemplatePost ¶
type ClusterTemplatePost struct {
ClusterTemplatePut `yaml:",inline"`
// A human-friendly name for this cluster config template.
// Example: MyTemplate
Name string `json:"name" yaml:"name"`
}
ClusterTemplatePost defines a template, which can be used to form a cluster of servers running Hypervisor OS.
swagger:model
type ClusterTemplatePut ¶
type ClusterTemplatePut struct {
// Description of the cluster config template.
// Example: Cluster configuration for production clusters.
Description string `json:"description" yaml:"description"`
// ServiceConfigTemplate represents a template the service config for cluster
// creation.
// It contains contains the configuration for each service, which should be
// configured on Hypervisor OS.
// Operations Center is simply passing forward the settings to Hypervisor OS.
// For details about the configuration settings available refer to the service
// API definitions in https://github.com/lxc/incus-os/tree/main/incus-osd/api.
ServiceConfigTemplate string `json:"service_config_template" yaml:"service_config_template"`
// ApplicationConfigTemplate represents a template for the application config
// for cluster creation.
// It contains the seed configuration for the application, which is
// applied during post clustering. This configuration is application specific.
ApplicationConfigTemplate string `json:"application_config_template" yaml:"application_config_template"`
// Variables is a map of variable names to variable definitions.
Variables ClusterTemplateVariables `json:"variables" yaml:"variables"`
}
ClusterTemplatePut represents the fields available for update.
swagger:model
type ClusterTemplateVariable ¶
type ClusterTemplateVariable struct {
// Description describes a cluster config template variable.
// Example: Long name for the cluster.
Description string `json:"description" yaml:"description"`
// DefaultValue is the default value applied for a cluster config variable
// if no value is provided for the variable.
// Example: Incus cluster
DefaultValue string `json:"default" yaml:"default"`
}
ClusterTemplateVariable defines the properties of a variable, that can be used in a cluster config template.
type ClusterTemplateVariables ¶
type ClusterTemplateVariables map[string]ClusterTemplateVariable
ClusterTemplateVariables defines the variables, that can be used in a cluster config template.
func (*ClusterTemplateVariables) Scan ¶
func (c *ClusterTemplateVariables) Scan(value any) error
Scan implements the sql.Scanner interface.
type ClusterUpdateInProgress ¶ added in v0.5.0
type ClusterUpdateInProgress string
const ( ClusterUpdateInProgressInactive ClusterUpdateInProgress = "" ClusterUpdateInProgressApplyUpdate ClusterUpdateInProgress = "applying updates" ClusterUpdateInProgressApplyUpdateWithReboot ClusterUpdateInProgress = "applying updates with reboot" ClusterUpdateInProgressRollingRestart ClusterUpdateInProgress = "restarting servers" )
type ClusterUpdateInProgressStatus ¶ added in v0.5.0
type ClusterUpdateInProgressStatus struct {
// InProgress is true, if a cluster wide update is on going and false
// otherwise.
// Example: true
InProgress ClusterUpdateInProgress `json:"in_progress" yaml:"in_progress"`
// StatusDescription contains progress information for the user in plain text
// form.
// Example: [3/20] Evacuating server xyz
StatusDescription *string `json:"status_description,omitempty" yaml:"status_description"`
// EvacuatedBefore contains the list of server names of the servers, that have
// been manually evacuated already before the rolling update has been
// triggered.
EvacuatedBefore []string `json:"evacuated_before" yaml:"evacuated_before"`
// LastUpdated is the time, when this information has been updated for the
// last time in RFC3339 format.
// Example: 2024-11-12T16:15:00Z
LastUpdated time.Time `json:"last_updated" yaml:"last_updated"`
}
type ClusterUpdatePost ¶ added in v0.5.0
type ClusterUpdatePost struct {
// Reboot indicates ifif after the update a rolling reboot of the servers
// should be triggered or not. If reboot is set to true, the servers are
// rebooted, otherwise only the updates are applied without reboot (OS updates
// will require a reboot at a later stage).
Reboot bool `json:"reboot" yaml:"reboot"`
}
ClusterUpdatePost represents a cluster update request.
swagger:model
type ClusterUpdateStatus ¶ added in v0.3.0
type ClusterUpdateStatus struct {
// NeedsUpdate holds the list of server names of the servers within the
// cluster, which need to be updated. If NeedsUpdate is empty, all servers are
// up to date.
NeedsUpdate []string `json:"needs_update,omitempty" yaml:"needs_update"`
// NeedsReboot holds the list of server names of the servers within the
// cluster, which need to be rebooted. If NeedsReboot is empty, all servers
// are up to date and don't require a reboot.
NeedsReboot []string `json:"needs_reboot,omitempty" yaml:"needs_reboot"`
// InMaintenance holds the list of server names of the servers within the
// cluster, which are currently in a maintenance state other than
// `NotInMaintenance`. If InMaintenance is empty, all servers are fully
// operational and not in maintenance.
InMaintenance []string `json:"in_maintenance,omitempty" yaml:"in_maintenance"`
// InProgressStatus holds the status information about an ongoing cluster
// update, if any.
InProgressStatus ClusterUpdateInProgressStatus `json:"in_progress_status" yaml:"in_progress_status"`
}
ClusterUpdateStatus contains the update status of each server of the cluster as well as an aggregated cluster update status.
func (*ClusterUpdateStatus) Scan ¶ added in v0.5.0
func (c *ClusterUpdateStatus) Scan(value any) error
Scan implements the sql.Scanner interface.
type ConfigMap ¶
ConfigMap type is used to hold incus config. In contrast to plain map[string]string it provides unmarshal methods for JSON and YAML, which gracefully handle numbers and bools.
swagger:model swagger:type object
Example:
{"user.mykey": "foo"}
func (*ConfigMap) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler interface.
func (*ConfigMap) UnmarshalYAML ¶
UnmarshalYAML implements yaml.Unmarshaler interface.
type HardwareData ¶
func (*HardwareData) Scan ¶
func (h *HardwareData) Scan(value any) error
Scan implements the sql.Scanner interface.
type Image ¶
type Image struct {
UUID uuid.UUID `json:"uuid" yaml:"uuid"`
Cluster string `json:"cluster" yaml:"cluster"`
ProjectName string `json:"project_name" yaml:"project_name"`
Name string `json:"name" yaml:"name"`
Object incusapi.Image `json:"object" yaml:"object"`
LastUpdated time.Time `json:"last_updated" yaml:"last_updated"`
}
type ImageType ¶
type ImageType string
func (ImageType) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface.
func (*ImageType) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface.
func (ImageType) UpdateFileType ¶
func (i ImageType) UpdateFileType() images.UpdateFileType
type InMaintenanceState ¶ added in v0.4.0
type InMaintenanceState int
const ( NotInMaintenance InMaintenanceState = 0 InMaintenanceEvacuating InMaintenanceState = 1 InMaintenanceEvacuated InMaintenanceState = 2 InMaintenanceRestoring InMaintenanceState = 3 )
func (*InMaintenanceState) String ¶ added in v0.4.0
func (m *InMaintenanceState) String() string
type Instance ¶
type Instance struct {
UUID uuid.UUID `json:"uuid" yaml:"uuid"`
Cluster string `json:"cluster" yaml:"cluster"`
Server string `json:"server" yaml:"server"`
ProjectName string `json:"project_name" yaml:"project_name"`
Name string `json:"name" yaml:"name"`
Object incusapi.InstanceFull `json:"object" yaml:"object"`
LastUpdated time.Time `json:"last_updated" yaml:"last_updated"`
}
type InventoryAggregate ¶
type InventoryAggregate struct {
Cluster string `json:"cluster" yaml:"cluster"`
Servers []string `json:"servers" yaml:"servers"`
Images []Image `json:"images" yaml:"images"`
Instances []Instance `json:"instances" yaml:"instances"`
Networks []Network `json:"networks" yaml:"networks"`
NetworkACLs []NetworkACL `json:"network_acls" yaml:"network_acls"`
NetworkAddressSets []NetworkAddressSet `json:"network_address_sets" yaml:"network_address_sets"`
NetworkForwards []NetworkForward `json:"network_forwards" yaml:"network_forwards"`
NetworkIntegrations []NetworkIntegration `json:"network_integrations" yaml:"network_integrations"`
NetworkLoadBalancers []NetworkLoadBalancer `json:"network_load_balancers" yaml:"network_load_balancers"`
NetworkPeers []NetworkPeer `json:"network_peers" yaml:"network_peers"`
NetworkZones []NetworkZone `json:"network_zones" yaml:"network_zones"`
Profiles []Profile `json:"profiles" yaml:"profiles"`
Projects []Project `json:"projects" yaml:"projects"`
StorageBuckets []StorageBucket `json:"storage_buckets" yaml:"storage_buckets"`
StoragePools []StoragePool `json:"storage_pools" yaml:"storage_pools"`
StorageVolumes []StorageVolume `json:"storage_volumes" yaml:"storage_volumes"`
}
type Network ¶
type Network struct {
UUID uuid.UUID `json:"uuid" yaml:"uuid"`
Cluster string `json:"cluster" yaml:"cluster"`
ProjectName string `json:"project_name" yaml:"project_name"`
Name string `json:"name" yaml:"name"`
Object incusapi.Network `json:"object" yaml:"object"`
LastUpdated time.Time `json:"last_updated" yaml:"last_updated"`
}
type NetworkACL ¶
type NetworkACL struct {
UUID uuid.UUID `json:"uuid" yaml:"uuid"`
Cluster string `json:"cluster" yaml:"cluster"`
ProjectName string `json:"project_name" yaml:"project_name"`
Name string `json:"name" yaml:"name"`
Object incusapi.NetworkACL `json:"object" yaml:"object"`
LastUpdated time.Time `json:"last_updated" yaml:"last_updated"`
}
type NetworkAddressSet ¶
type NetworkAddressSet struct {
UUID uuid.UUID `json:"uuid" yaml:"uuid"`
Cluster string `json:"cluster" yaml:"cluster"`
ProjectName string `json:"project_name" yaml:"project_name"`
Name string `json:"name" yaml:"name"`
Object incusapi.NetworkAddressSet `json:"object" yaml:"object"`
LastUpdated time.Time `json:"last_updated" yaml:"last_updated"`
}
type NetworkForward ¶
type NetworkForward struct {
UUID uuid.UUID `json:"uuid" yaml:"uuid"`
Cluster string `json:"cluster" yaml:"cluster"`
ProjectName string `json:"project_name" yaml:"project_name"`
NetworkName string `json:"parent_name" yaml:"parent_name"`
Name string `json:"name" yaml:"name"`
Object incusapi.NetworkForward `json:"object" yaml:"object"`
LastUpdated time.Time `json:"last_updated" yaml:"last_updated"`
}
type NetworkIntegration ¶
type NetworkLoadBalancer ¶
type NetworkLoadBalancer struct {
UUID uuid.UUID `json:"uuid" yaml:"uuid"`
Cluster string `json:"cluster" yaml:"cluster"`
ProjectName string `json:"project_name" yaml:"project_name"`
NetworkName string `json:"parent_name" yaml:"parent_name"`
Name string `json:"name" yaml:"name"`
Object incusapi.NetworkLoadBalancer `json:"object" yaml:"object"`
LastUpdated time.Time `json:"last_updated" yaml:"last_updated"`
}
type NetworkPeer ¶
type NetworkPeer struct {
UUID uuid.UUID `json:"uuid" yaml:"uuid"`
Cluster string `json:"cluster" yaml:"cluster"`
ProjectName string `json:"project_name" yaml:"project_name"`
NetworkName string `json:"parent_name" yaml:"parent_name"`
Name string `json:"name" yaml:"name"`
Object incusapi.NetworkPeer `json:"object" yaml:"object"`
LastUpdated time.Time `json:"last_updated" yaml:"last_updated"`
}
type NetworkZone ¶
type NetworkZone struct {
UUID uuid.UUID `json:"uuid" yaml:"uuid"`
Cluster string `json:"cluster" yaml:"cluster"`
ProjectName string `json:"project_name" yaml:"project_name"`
Name string `json:"name" yaml:"name"`
Object incusapi.NetworkZone `json:"object" yaml:"object"`
LastUpdated time.Time `json:"last_updated" yaml:"last_updated"`
}
type OSData ¶
type OSData struct {
// Network contains the network data of the server OS, in the same form as presented by IncusOS in the network API.
Network incusosapi.SystemNetwork `json:"network" yaml:"network"`
// Security contains the security data of the server OS, in the same form as presented by IncusOS in the security API.
Security incusosapi.SystemSecurity `json:"security" yaml:"security"`
// Storage contains the storage data of the server OS, in the same form as presented by IncusOS in the storage API.
Storage incusosapi.SystemStorage `json:"storage" yaml:"storage"`
}
type OSVersionData ¶ added in v0.2.2
type OSVersionData struct {
// Name of the software component.
// Example: IncusOS
Name string `json:"name" yaml:"name"`
// Version string.
// Example: 202512250102
Version string `json:"version" yaml:"version"`
// Next Version string. If this version is different from "version",
// an update is available and applied on the system, but the system has
// not yet been rebooted, so the new update is not yet active.
// Example: 202512250102
VersionNext string `json:"version_next" yaml:"version_next"`
// AvailableVersion is the most recent version available for the OS in the
// update channel assigned to the respective system.
AvailableVersion *string `json:"available_version,omitempty" yaml:"available_version,omitempty"`
// NeedsReboot is the "needs_reboot" state reported by the server. Currently
// this is only expected to be "true", if "version_next" is different than
// "version", but in the future, there might be other reasons for a server
// to report, that a reboot is required.
NeedsReboot bool `json:"needs_reboot" yaml:"needs_reboot"`
// NeedsUpdate is true, if the OS needs to be updated
// (available_version > version_next).
NeedsUpdate *bool `json:"needs_update,omitempty" yaml:"needs_update,omitempty"`
}
OSVersionData defines a single version information for the OS.
swagger:model
type Profile ¶
type Profile struct {
UUID uuid.UUID `json:"uuid" yaml:"uuid"`
Cluster string `json:"cluster" yaml:"cluster"`
ProjectName string `json:"project_name" yaml:"project_name"`
Name string `json:"name" yaml:"name"`
Object incusapi.Profile `json:"object" yaml:"object"`
LastUpdated time.Time `json:"last_updated" yaml:"last_updated"`
}
type Response ¶
type Response struct {
Type ResponseType `json:"type" yaml:"type"`
// Valid only for Sync responses
Status string `json:"status" yaml:"status"`
StatusCode int `json:"status_code" yaml:"status_code"`
// Valid only for Async responses
Operation string `json:"operation" yaml:"operation"`
// Valid only for Error responses
Code int `json:"error_code" yaml:"error_code"`
Error string `json:"error" yaml:"error"`
// Valid for Sync and Error responses
Metadata json.RawMessage `json:"metadata" yaml:"metadata"`
}
Response represents an operation.
func (*Response) MetadataAsMap ¶
MetadataAsMap parses the Response metadata into a map.
func (*Response) MetadataAsStringSlice ¶
MetadataAsStringSlice parses the Response metadata into a slice of string.
func (*Response) MetadataAsStruct ¶
MetadataAsStruct parses the Response metadata into a provided struct.
type ResponseRaw ¶
type ResponseRaw struct {
Type ResponseType `json:"type" yaml:"type"`
// Valid only for Sync responses
Status string `json:"status" yaml:"status"`
StatusCode int `json:"status_code" yaml:"status_code"`
// Valid only for Async responses
Operation string `json:"operation" yaml:"operation"`
// Valid only for Error responses
Code int `json:"error_code" yaml:"error_code"`
Error string `json:"error" yaml:"error"`
// Valid for Sync and Error responses
Metadata any `json:"metadata" yaml:"metadata"`
}
ResponseRaw represents an operation in its original form.
type ResponseType ¶
type ResponseType string
ResponseType represents a valid response type.
const ( SyncResponse ResponseType = "sync" AsyncResponse ResponseType = "async" ErrorResponse ResponseType = "error" )
Response types.
type SeedApplication ¶ added in v0.5.0
type SeedApplication = seed.Application
type SeedApplications ¶ added in v0.5.0
type SeedApplications = seed.Applications
type SeedInstall ¶ added in v0.5.0
type SeedMigrationManager ¶ added in v0.5.0
type SeedMigrationManager = seed.MigrationManager
type SeedNetwork ¶ added in v0.5.0
type SeedOperationsCenter ¶ added in v0.5.0
type SeedOperationsCenter = seed.OperationsCenter
type SeedUpdate ¶ added in v0.5.0
type SeedUpdateConfig ¶ added in v0.5.0
type SeedUpdateConfig = api.SystemUpdateConfig
type Server ¶
type Server struct {
ServerPost `yaml:",inline"`
// Certificate of the server endpoint in PEM encoded format.
// Example:
// -----BEGIN CERTIFICATE-----
// ...
// -----END CERTIFICATE-----
Certificate string `json:"certificate" yaml:"certificate"`
// Fingerprint in SHA256 format of the certificate.
// Example: fd200419b271f1dc2a5591b693cc5774b7f234e1ff8c6b78ad703b6888fe2b69
Fingerprint string `json:"fingerprint" yaml:"fingerprint"`
// The cluster the server is part of.
// Example: one
Cluster string `json:"cluster" yaml:"cluster"`
// Type defines the type of the server, which is normally one of "incus", "migration-manager", "operations-center".
// Example: incus
Type ServerType `json:"server_type" yaml:"server_type"`
// HardwareData contains the hardware data of the server, in the same form as presented by Incus in the resource API.
HardwareData HardwareData `json:"hardware_data" yaml:"hardware_data"`
// OSData contains the configuration data of the operating system, e.g. incus-os.
OSData OSData `json:"os_data" yaml:"os_data"`
// VersionData contains information about the servers version.
VersionData ServerVersionData `json:"version_data" yaml:"version_data"`
// Status contains the status the server is currently in from the point of view of Operations Center.
// Possible values for status are: pending, ready
// Example: pending
Status ServerStatus `json:"server_status" yaml:"server_status"`
// StatusDetail contains the secondary status, which gives additional details
// on the server status.
// Example: rebooting
StatusDetail ServerStatusDetail `json:"server_status_detail" yaml:"server_status_detail"`
// LastUpdated is the time, when this information has been updated for the last time in RFC3339 format.
// Example: 2024-11-12T16:15:00Z
LastUpdated time.Time `json:"last_updated" yaml:"last_updated"`
// LastSeen is the time, when this server has been seen for the last time
// by any sort of connection between the server and operations center
// in RFC3339 format.
// Example: 2024-11-12T16:15:00Z
LastSeen time.Time `json:"last_seen" yaml:"last_seen"`
// SystemStateIsTrusted is extracted from the OSData. The system state is
// trusted, if this value is set to true. Otherwise the system state is not
// trusted.
SystemStateIsTrusted bool `json:"system_state_is_trusted" yaml:"system_state_is_trusted"`
}
Server defines a server running Hypervisor OS.
swagger:model
func (Server) RecommendedAction ¶ added in v0.4.0
func (s Server) RecommendedAction() ServerAction
func (Server) UpdateState ¶ added in v0.4.0
func (s Server) UpdateState() ServerUpdateState
type ServerAction ¶ added in v0.3.0
type ServerAction string
const ( ServerActionNone ServerAction = "" ServerActionUpdate ServerAction = "update" ServerActionEvacuate ServerAction = "evacuate" ServerActionReboot ServerAction = "reboot" ServerActionRestore ServerAction = "restore" )
type ServerPost ¶
type ServerPost struct {
ServerPut `yaml:",inline"`
// Name of the server.
// Example: incus.local
Name string `json:"name" yaml:"name"`
// URL, hostname or IP address of the server endpoint used by Operations
// Center for its communication.
// Example: https://incus.local:6443
ConnectionURL string `json:"connection_url" yaml:"connection_url"`
}
ServerPost defines a new server running Hypervisor OS.
swagger:model
type ServerPut ¶
type ServerPut struct {
// Public URL, hostname or IP address of the server endpoint for user facing
// communication with the server. Only required, if it differs from
// connection_url, e.g. because the server is behind a reverse proxy.
// Example: https://incus.local:6443
PublicConnectionURL string `json:"public_connection_url" yaml:"public_connection_url"`
// Channel the server is following for updates.
// Example: stable
Channel string `json:"channel" yaml:"channel"`
// Description of the server.
// Example: Lab server with limited resources.
Description string `json:"description" yaml:"description"`
// Properties contains properties of the server as key/value pairs.
// Example (in YAML notation for readability):
// properties:
// arch: x86_64
// os: linux
Properties ConfigMap `json:"properties" yaml:"properties"`
}
ServerPut defines the updateable part of a server running Hypervisor OS.
swagger:model
type ServerRegistrationResponse ¶
type ServerRegistrationResponse struct {
// ClientCertificate is the certificate in PEM format used by Operations Center
// when connecting to servers or clusters.
ClientCertificate string `json:"certificate" yaml:"certificate"`
}
ServerRegistrationResponse defines the response to a successful server registration.
type ServerSelfUpdate ¶
type ServerSelfUpdate struct {
// URL, hostname or IP address of the server endpoint.
// Example: https://incus.local:6443
ConnectionURL string `json:"connection_url" yaml:"connection_url"`
}
ServerSelfUpdate defines a self update request of a server.
swagger:model
type ServerStatus ¶
type ServerStatus string
const ( ServerStatusUnknown ServerStatus = "unknown" ServerStatusPending ServerStatus = "pending" ServerStatusReady ServerStatus = "ready" ServerStatusOffline ServerStatus = "offline" )
func (ServerStatus) MarshalText ¶
func (s ServerStatus) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface.
func (*ServerStatus) Scan ¶
func (s *ServerStatus) Scan(value any) error
Scan implements the sql.Scanner interface.
func (ServerStatus) String ¶
func (s ServerStatus) String() string
func (*ServerStatus) UnmarshalText ¶
func (s *ServerStatus) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface.
type ServerStatusDetail ¶ added in v0.4.0
type ServerStatusDetail string
const ( ServerStatusDetailNone ServerStatusDetail = "" ServerStatusDetailPendingReconfiguring ServerStatusDetail = "re-configuring" ServerStatusDetailReadyUpdating ServerStatusDetail = "updating" ServerStatusDetailOfflineRebooting ServerStatusDetail = "rebooting" ServerStatusDetailOfflineShutdown ServerStatusDetail = "shut down" ServerStatusDetailOfflineUnresponsive ServerStatusDetail = "unresponsive" )
func (ServerStatusDetail) MarshalText ¶ added in v0.4.0
func (s ServerStatusDetail) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface.
func (*ServerStatusDetail) Scan ¶ added in v0.4.0
func (s *ServerStatusDetail) Scan(value any) error
Scan implements the sql.Scanner interface.
func (ServerStatusDetail) String ¶ added in v0.4.0
func (s ServerStatusDetail) String() string
func (*ServerStatusDetail) UnmarshalText ¶ added in v0.4.0
func (s *ServerStatusDetail) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface.
type ServerSystemKernel ¶ added in v0.5.0
type ServerSystemKernel = incusosapi.SystemKernel
ServerSystemKernel is a type alias to hold the system kernel configuration from IncusOS.
type ServerSystemLogging ¶ added in v0.5.0
type ServerSystemLogging = incusosapi.SystemLogging
ServerSystemLogging is a type alias to hold the system logging configuration from IncusOS.
type ServerSystemNetwork ¶
type ServerSystemNetwork = incusosapi.SystemNetwork
ServerSystemNetwork is a type alias to hold the system network configuration from IncusOS.
type ServerSystemNetworkVLAN ¶ added in v0.5.0
type ServerSystemNetworkVLAN = incusosapi.SystemNetworkVLAN
ServerSystemNetworkVLAN is a type alias to hold the system network vlan configuration from IncusOS.
type ServerSystemProvider ¶
type ServerSystemProvider = incusosapi.SystemProvider
ServerSystemProvider is a type alias to hold the system provider configuration from IncusOS.
type ServerSystemStorage ¶ added in v0.2.0
type ServerSystemStorage = incusosapi.SystemStorage
ServerSystemStorage is a type alias to hold the system network configuration from IncusOS.
type ServerSystemUpdate ¶ added in v0.3.0
type ServerSystemUpdate = incusosapi.SystemUpdate
ServerSystemUpdate is a type alias to hold the system update configuration from IncusOS.
type ServerType ¶
type ServerType string
const ( ServerTypeUnknown ServerType = "unknown" ServerTypeIncus ServerType = "incus" ServerTypeMigrationManager ServerType = "migration-manager" ServerTypeOperationsCenter ServerType = "operations-center" )
func (ServerType) MarshalText ¶
func (s ServerType) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface.
func (*ServerType) Scan ¶
func (s *ServerType) Scan(value any) error
Scan implements the sql.Scanner interface.
func (ServerType) String ¶
func (s ServerType) String() string
func (*ServerType) UnmarshalText ¶
func (s *ServerType) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface.
type ServerUntrusted ¶
type ServerUntrusted struct {
// Support status of the current API (one of "devel", "stable" or "deprecated")
// Read only: true
// Example: stable
APIStatus string `json:"api_status" yaml:"api_status"`
// API version number
// Read only: true
// Example: 1.0
APIVersion string `json:"api_version" yaml:"api_version"`
// Whether the client is trusted (one of "trusted" or "untrusted")
// Read only: true
// Example: untrusted
Auth string `json:"auth" yaml:"auth"`
// List of supported authentication methods
// Read only: true
// Example: ["tls"]
//
// API extension: macaroon_authentication
AuthMethods []string `json:"auth_methods" yaml:"auth_methods"`
// Server version number
// Read only: true
// Example: 1.0.0
ServerVersion string `json:"server_version" yaml:"server_version"`
}
ServerUntrusted represents a server configuration for an untrusted client
swagger:model
type ServerUpdateApplication ¶ added in v0.3.0
type ServerUpdateApplication struct {
// Name of the software component.
// Example: IncusOS
Name string `json:"name" yaml:"name"`
// TriggerUpdate triggers an update for the given application, if the provided
// value is set to true.
TriggerUpdate bool `json:"trigger_update" yaml:"trigger_update"`
}
ServerUpdateApplication defines the update trigger information for a single application in an update request. This is used for both, applications as well as the operations system.
swagger:model
type ServerUpdatePost ¶ added in v0.3.0
type ServerUpdatePost struct {
// Applications holds the update trigger information for the installed applications.
Applications []ServerUpdateApplication `json:"applications" yaml:"applications"`
// OS holds the update trigger information for the operating system.
OS ServerUpdateApplication `json:"os" yaml:"os"`
}
ServerUpdatePost defines the update trigger information for an update request for a server including the OS and/or its applications.
swagger:model
type ServerUpdateState ¶ added in v0.3.0
type ServerUpdateState string
const ( ServerUpdateStateUndefined ServerUpdateState = "undefined" // Returned for undefined states ServerUpdateStateUpToDate ServerUpdateState = "up to date" // ServerStatusReady, NeedsUpdate: false, NeedsReboot: false, InMaintenance: NotInMaintenance ServerUpdateStateUpdatePending ServerUpdateState = "update pending" // ServerStatusReady, NeedsUpdate: true ServerUpdateStateUpdating ServerUpdateState = "updating" // ServerStatusReady, ServerStatusDetailReadyUpdating ServerUpdateStateEvacuationPending ServerUpdateState = "evacuation pending" // ServerStatusReady, NeedsUpdate: false, NeedsReboot: true, IsIncusCluster: true, InMaintenance: NotInMaintenance ServerUpdateStateEvacuating ServerUpdateState = "evacuating" // ServerStatusReady, NeedsUpdate: false, InMaintenance: InMaintenanceEvacuating ServerUpdateStateInMaintenanceRebootPending ServerUpdateState = "in maintenance, reboot pending" // ServerStatusReady, NeedsUpdate: false, NeedsReboot: true, InMaintenance: InMaintenanceEvacuated ServerUpdateStateInMaintenanceRebooting ServerUpdateState = "in maintenance, rebooting" // ServerStatusOffline, ServerStatusDetailOfflineRebooting, InMaintenance: InMaintenanceEvacuated ServerUpdateStateInMaintenanceRestorePending ServerUpdateState = "in maintenance, restore pending" // ServerStatusReady, NeedsUpdate: false, InMaintenance: InMaintenanceEvacuated ServerUpdateStateInMaintenanceRestoring ServerUpdateState = "restoring" // ServerStatusReady, NeedsUpdate: false, InMaintenance: InMaintenanceRestoring ServerUpdateStateRebootPending ServerUpdateState = "reboot pending" // ServerStatusReady, NeedsUpdate: false, NeedsReboot: true, IsIncusCluster: false, InMaintenance: NotInMaintenance ServerUpdateStateRebooting ServerUpdateState = "rebooting" // ServerStatusOffline, ServerStatusDetailOfflineRebooting )
func (ServerUpdateState) String ¶ added in v0.3.0
func (s ServerUpdateState) String() string
type ServerVersionData ¶ added in v0.2.2
type ServerVersionData struct {
// OS holds the version information for the operating system.
OS OSVersionData `json:"os" yaml:"os"`
// Applications holds the version information for the installed applications.
Applications []ApplicationVersionData `json:"applications" yaml:"applications"`
// The channel the system is following for updates.
UpdateChannel string `json:"update_channel" yaml:"update_channel"`
// NeedsUpdate is the aggregated state over OS and all applications indicating
// if there is any component, where an update is available.
NeedsUpdate *bool `json:"needs_update,omitempty" yaml:"needs_update"`
// NeedsReboot is the aggregated state over OS and all applications indicating
// if there is any component, where a reboot is required.
NeedsReboot *bool `json:"needs_reboot,omitempty" yaml:"needs_reboot"`
// InMaintenance is the aggreaged state over OS and all applications indicating
// if there is any component currently in maintenance state.
InMaintenance *InMaintenanceState `json:"in_maintenance,omitempty" yaml:"in_maintenance"`
}
ServerVersionData defines the version information for a server including the OS and all its applications.
swagger:model
func (*ServerVersionData) Compute ¶ added in v0.3.0
func (s *ServerVersionData) Compute(latestAvailableVersions map[images.UpdateFileComponent]string)
Compute the calculated fields of the ServerVersionData. The argument is expected to be a lookup map for the most recent available version for each component.
func (*ServerVersionData) Scan ¶ added in v0.2.2
func (s *ServerVersionData) Scan(value any) error
Scan implements the sql.Scanner interface.
type StatusCode ¶
type StatusCode int
StatusCode represents a valid operation and container status.
const ( Success StatusCode = 200 Failure StatusCode = 400 )
Status codes.
func (StatusCode) String ¶
func (o StatusCode) String() string
String returns a suitable string representation for the status code.
type StatusError ¶
type StatusError struct {
// contains filtered or unexported fields
}
StatusError error type that contains an HTTP status code and message.
func StatusErrorf ¶
func StatusErrorf(status int, format string, a ...any) StatusError
StatusErrorf returns a new StatusError containing the specified status and message.
func (StatusError) Error ¶
func (e StatusError) Error() string
Error returns the error message or the http.StatusText() of the status code if message is empty.
type StorageBucket ¶
type StorageBucket struct {
UUID uuid.UUID `json:"uuid" yaml:"uuid"`
Cluster string `json:"cluster" yaml:"cluster"`
Server string `json:"server" yaml:"server"`
ProjectName string `json:"project_name" yaml:"project_name"`
StoragePoolName string `json:"parent_name" yaml:"parent_name"`
Name string `json:"name" yaml:"name"`
Object incusapi.StorageBucketFull `json:"object" yaml:"object"`
LastUpdated time.Time `json:"last_updated" yaml:"last_updated"`
}
type StoragePool ¶
type StorageVolume ¶
type StorageVolume struct {
UUID uuid.UUID `json:"uuid" yaml:"uuid"`
Cluster string `json:"cluster" yaml:"cluster"`
Server string `json:"server" yaml:"server"`
ProjectName string `json:"project_name" yaml:"project_name"`
StoragePoolName string `json:"parent_name" yaml:"parent_name"`
Name string `json:"name" yaml:"name"`
Type string `json:"type" yaml:"type"`
Object incusapi.StorageVolumeFull `json:"object" yaml:"object"`
LastUpdated time.Time `json:"last_updated" yaml:"last_updated"`
}
type Token ¶
type Token struct {
TokenPut `yaml:",inline"`
// UUID of the token, which serves as the the token.
// Example: b32d0079-c48b-4957-b1cb-bef54125c861
UUID uuid.UUID `json:"uuid" yaml:"uuid"`
}
Token defines a registration token for use during registration.
swagger:model
type TokenImagePost ¶
type TokenImagePost struct {
// Type contains the type of image to be generated.
// Possible values for status are: iso, raw
// Example: iso
Type ImageType `json:"type" yaml:"type"`
// Architecture contains the CPU architecture the image should be generated
// for.
Architecture images.UpdateFileArchitecture `json:"architecture" yaml:"architecture"`
// Seeds represents the seed configuration for e.g. applications.yaml,
// install.yaml and network.yaml.
Seeds TokenSeedConfigs `json:"seeds" yaml:"seeds"`
}
TokenImagePost defines the configuration to generate a pre-seeded ISO or raw image for a given Token.
Operations Center just passes through the provided configuration for applications.yaml, install.yaml and network.yaml as is without any validation of the provided configuration besides of ensuring it to be valid yaml.
swagger:model
type TokenProviderConfig ¶
type TokenProviderConfig struct {
api.SystemProviderConfig `yaml:",inline"`
Version string `json:"version" yaml:"version"`
}
TokenProviderConfig defines the provider configuration for a given token.
swagger:model
type TokenPut ¶
type TokenPut struct {
// Value indicating, how many times the token might be used for registration.
// Example: 10
UsesRemaining int `json:"uses_remaining" yaml:"uses_remaining"`
// The time at which the token expires in RFC3339 format with seconds precision.
// Example: "2025-02-04T07:25:47Z"
ExpireAt time.Time `json:"expire_at" yaml:"expire_at"`
// Description of this token.
// Example: "Test Environment"
Description string `json:"description" yaml:"description"`
// Channel, used to seed images as well as which gets assigned to servers
// using this token during provisioning.
// Example: "stable"
Channel string `json:"channel" yaml:"channel"`
}
TokenPut defines the configurable properties of Token.
swagger:model
type TokenSeed ¶
type TokenSeed struct {
TokenSeedPost `yaml:",inline"`
// UUID of the token.
// Example: b32d0079-c48b-4957-b1cb-bef54125c861
Token uuid.UUID `json:"token_uuid" yaml:"token_uuid"`
// LastUpdated is the time, when this information has been updated for the last time in RFC3339 format.
// Example: 2024-11-12T16:15:00Z
LastUpdated time.Time `json:"last_updated" yaml:"last_updated"`
}
TokenSeed defines a named token seed configuration, for which a pre-seeded ISO or raw image can be fetched later.
Operations Center just passes through the provided configuration for application.yaml, install.yaml and network.yaml as is without any validation of the provided configuration besides of ensuring it to be valid yaml.
swagger:model
type TokenSeedConfigs ¶
type TokenSeedConfigs struct {
// Applications represents the applications configuration (applications.yaml) to be included in the pre-seeded image.
Applications SeedApplications `json:"applications" yaml:"applications"`
// Incus represents the incus preseed configuration (incus.yaml) fo be included in the pre-seeded image.
Incus SeedIncus `json:"incus" yaml:"incus"`
// Install represents the install configuration (install.yaml) to be included in the pre-seeded image.
Install SeedInstall `json:"install" yaml:"install"`
// MigrationManager represents the seed configuration for migration manager (migration-manager.yaml) to be included in the pre-seeded image.
MigrationManager SeedMigrationManager `json:"migration_manager" yaml:"migration_manager"`
// Network represents the network configuration (network.yaml) to be included in the pre-seeded image.
Network SeedNetwork `json:"network" yaml:"network"`
// OperationsCenter represents the seed configuration for operations center (operations-center.yaml) to be included in the pre-seeded image.
OperationsCenter SeedOperationsCenter `json:"operations_center" yaml:"operations_center"`
// Update represents the seed configuration for updates (update.yaml) to be included in the pre-seeded image.
Update SeedUpdate `json:"update" yaml:"update"`
}
type TokenSeedPost ¶
type TokenSeedPost struct {
// Name contains the name of the token seed configuration.
// Example: MyConfig
Name string `json:"name" yaml:"name"`
TokenSeedPut `yaml:",inline"`
}
TokenSeedPost defines a named token seed configuration, for which a pre-seeded ISO or raw image can be fetched later.
Operations Center just passes through the provided configuration for application.yaml, install.yaml and network.yaml as is without any validation of the provided configuration besides of ensuring it to be valid yaml.
swagger:model
type TokenSeedPut ¶
type TokenSeedPut struct {
// Description contains the description of the token seed configuration.
// Example: Configuration for lab servers.
Description string `json:"description" yaml:"description"`
// Public defines, if images generated based on the given token seed
// configuration can be retrieved without authentication. If public is set to
// `true`, no authentication is necessary, otherwise authentication is
// required.
// Example: true
Public bool `json:"public" yaml:"public"`
// Seeds represents the seed configuration for e.g. application.yaml,
// install.yaml and network.yaml.
Seeds TokenSeedConfigs `json:"seeds" yaml:"seeds"`
}
TokenSeedPut defines the updateable part of a named token seed configuration, for which a pre-seeded ISO or raw image can be fetched later.
Operations Center just passes through the provided configuration for application.yaml, install.yaml and network.yaml as is without any validation of the provided configuration besides of ensuring it to be valid yaml.
swagger:model
type Update ¶
type Update struct {
UpdatePut `yaml:",inline"`
// UUID of the update.
UUID uuid.UUID `json:"uuid" yaml:"uuid"`
// Version of the Update as opaque string.
// Example: 202501311418
Version string `json:"version" yaml:"version"`
// PublishedAt is the date, when the Update has been published in RFC3339 format.
// Example: 2025-02-12T09:59:00Z
PublishedAt time.Time `json:"published_at" yaml:"published_at"`
// Severity of the Update. Allowed values: none, low, medium, high, critical
// Example: none
Severity images.UpdateSeverity `json:"severity" yaml:"severity"`
// Origin of the Update.
// Example: linuxcontainers.org
Origin string `json:"origin" yaml:"origin"`
// // URL of the File.
// // Example: releases/download/202501311418/
URL string `json:"url" yaml:"url"`
// UpstreamChannels holds the name of the channels from upstream (source)
// the update is part of.
// Example: stable
UpstreamChannels []string `json:"upstream_channels" yaml:"upstream_channels"`
// Status contains the status the update is currently in.
// Possible values for status are: pending, ready
// Example: ready
Status UpdateStatus `json:"update_status" yaml:"update_status"`
}
Update defines an update.
swagger:model
type UpdateChangelog ¶ added in v0.5.0
UpdateChangelog defines a changelog for an update.
swagger:model
type UpdateChangelogs ¶ added in v0.5.0
type UpdateChangelogs []UpdateChangelog
UpdateChangelogs represents a series of changelogs, e.g. for all the updates of a channel.
swagger:model
type UpdateFile ¶
type UpdateFile struct {
// Filename of the File.
// Example: IncusOS_202501311418.efi.gz
Filename string `json:"filename" yaml:"filename"`
// Size of the File in bytes.
// Example: 54300000
Size int `json:"size" yaml:"size"`
// Sha256 checksum of the file in hex encoding (64 ascii characters in the alphabet [0-9A-Fa-f])
// Example: 11465a836ce54a8f293ac9234aa51050094cfbb8906c1a10ab9487dd92088643
Sha256 string `json:"sha256"`
// Component the file provides. One of: os, incus, debug
// Example: os
Component images.UpdateFileComponent `json:"component" yaml:"component"`
// Type of the file. One of: image-raw, image-iso, image-manifest, update-efi, update-usr, update-usr-verity, update-usr-verity-signature
// Example: image-raw
Type images.UpdateFileType `json:"type" yaml:"type"`
// Architecture of the file. E.g. x86_64, aarch64
// Example: x86_64
Architecture images.UpdateFileArchitecture `json:"architecture" yaml:"architecture"`
}
UpdateFile defines an update file.
swagger:model
type UpdatePut ¶ added in v0.3.0
type UpdatePut struct {
// Channels holds the name of the channels the update is assigned to.
// Example: stable
Channels []string `json:"channels" yaml:"channels"`
}
UpdatePut defines the updateable part of an update.
swagger:model
type UpdateStatus ¶
type UpdateStatus string
const ( UpdateStatusUnknown UpdateStatus = "unknown" UpdateStatusPending UpdateStatus = "pending" UpdateStatusReady UpdateStatus = "ready" )
func (UpdateStatus) MarshalText ¶
func (s UpdateStatus) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface.
func (*UpdateStatus) Scan ¶
func (s *UpdateStatus) Scan(value any) error
Scan implements the sql.Scanner interface.
func (UpdateStatus) String ¶
func (s UpdateStatus) String() string
func (*UpdateStatus) UnmarshalText ¶
func (s *UpdateStatus) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface.
Source Files
¶
- api_aggregate_gen.go
- auth.go
- certificate.go
- config_map.go
- error.go
- inventory_image_gen.go
- inventory_instance_gen.go
- inventory_network_acl_gen.go
- inventory_network_address_set_gen.go
- inventory_network_forward_gen.go
- inventory_network_gen.go
- inventory_network_integration_gen.go
- inventory_network_load_balancer_gen.go
- inventory_network_peer_gen.go
- inventory_network_zone_gen.go
- inventory_profile_gen.go
- inventory_project_gen.go
- inventory_storage_bucket_gen.go
- inventory_storage_pool_gen.go
- inventory_storage_volume_gen.go
- operations_center.go
- provisioning_channel.go
- provisioning_cluster.go
- provisioning_cluster_artifact.go
- provisioning_cluster_template.go
- provisioning_seed.go
- provisioning_server.go
- provisioning_token.go
- provisioning_update.go
- response.go
- status_code.go