Documentation
¶
Index ¶
- Constants
- Variables
- func AsNotIncusOSError(err error) error
- func StatusErrorCheck(err error, matchStatusCodes ...int) bool
- func StatusErrorMatch(err error, matchStatusCodes ...int) (int, bool)
- func TokenSeedImagePathSegments(imageType ImageType, architecture images.UpdateFileArchitecture, ...) []string
- func TokenSeedPreparedImagePathSegments(imageType ImageType, architecture images.UpdateFileArchitecture, ...) []string
- type ApplicationVersionData
- type BIOSAttribute
- type BIOSProfileResolution
- type BIOSSecureBoot
- type BIOSSecureBootDatabase
- type BMCAPIType
- type BMCBootProgress
- type BMCConfig
- type BMCData
- type BMCDump
- type BMCDumpEntry
- type BMCDumpError
- type BMCLogEvent
- type BMCRebootState
- type BMCTaskState
- type BMCVirtualMedia
- type Certificate
- type Channel
- type ChannelPost
- type ChannelPut
- type Cluster
- type ClusterAddServersPost
- type ClusterArtifact
- type ClusterArtifactFile
- type ClusterBulkUpdateAction
- type ClusterBulkUpdatePost
- type ClusterCertificatePut
- type ClusterConfig
- type ClusterConfigRollingRestart
- type ClusterDeleteMode
- type ClusterMemberConfigKey
- type ClusterPost
- type ClusterPut
- type ClusterRemoveServersPost
- 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 ImageSource
- type ImageSourcePost
- type ImageSourcePut
- type ImageType
- type InMaintenanceState
- type IncusImage
- type IncusImageAlias
- type IncusImagePost
- type IncusImagePut
- type IncusImageVersion
- type IncusImageVersionItem
- type IncusImageVersions
- 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 SeedSecurity
- type SeedUpdate
- type SeedUpdateConfig
- type Server
- type ServerAction
- type ServerBMCApplyBIOSAttributesPost
- type ServerBMCAttachMedia
- type ServerBMCDetachMedia
- type ServerBMCLocatePost
- type ServerDeploymentPost
- type ServerDeploymentState
- type ServerDeploymentStatus
- type ServerDeploymentStep
- type ServerPost
- type ServerPut
- type ServerRegistrationResponse
- type ServerSelfUpdate
- type ServerSelfUpdateCause
- type ServerStatus
- type ServerStatusDetail
- type ServerSystemKernel
- type ServerSystemLogging
- type ServerSystemNetwork
- type ServerSystemNetworkVLAN
- type ServerSystemProvider
- type ServerSystemSecurity
- 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
- type Warning
- type WarningPut
- type WarningScope
- type WarningStatus
- type WarningType
Constants ¶
const ( // AuthenticationMethodTLS is the default authentication method for interacting with Incus remotely. AuthenticationMethodTLS = "tls" // AuthenticationMethodOIDC is a token based authentication method. AuthenticationMethodOIDC = "oidc" // AuthenticationMethodUnix is the authentication method for local connections through the unix socket. AuthenticationMethodUnix = "unix" // AuthenticationUntrusted is reported for a client, which is not authenticated. AuthenticationUntrusted = "untrusted" )
const ( APIVersion string = "1.0" APIStatus string = "devel" )
const ServerNameOperationsCenter = "operations-center"
Variables ¶
var BMCAPITypes = map[BMCAPIType]struct{}{ BMCAPITypeNone: {}, BMCAPITypeRedfishV1Generic: {}, }
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 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 TokenSeedImagePathSegments ¶ added in v0.9.0
func TokenSeedImagePathSegments(imageType ImageType, architecture images.UpdateFileArchitecture, channel string) []string
TokenSeedImagePathSegments returns the path segments addressing the pre-seeded image of a token seed, relative to the token seed, e.g. "architecture/x86_64/channel/stable/type/iso/file.iso".
The channel is omitted if empty, which lets the server fall back to the configured default update channel. The trailing filename segment is not inspected by the server, it only exists so the URL ends in a recognized media extension, for the sake of BMC firmware that validates the format of the virtual media Image URI.
func TokenSeedPreparedImagePathSegments ¶ added in v0.9.0
func TokenSeedPreparedImagePathSegments(imageType ImageType, architecture images.UpdateFileArchitecture, channel string, fingerprintID string) []string
TokenSeedPreparedImagePathSegments returns the path segments addressing one already generated pre-seeded image of a token seed, e.g. "architecture/x86_64/channel/stable/type/iso/a1B2c3D4e5F6.iso".
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"`
// FriendlyVersion holds the friendly version of the application.
// Example: 7.0.0 [202511041800]
FriendlyVersion string `json:"friendly_version,omitzero" yaml:"friendly_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 BIOSAttribute ¶ added in v0.9.0
type BIOSAttribute struct {
// Name holds the name of the BIOS attribute.
// Example: NumaNodesPerSocket
Name string `json:"name" yaml:"name"`
// CurrentValue holds the current value of the BIOS attribute on the
// server.
// Example: 4
CurrentValue any `json:"current_value" yaml:"current_value"`
// Type holds the type of the BIOS attribute, e.g. Enumeration, String,
// Integer, Boolean or Password.
// Example: Enumeration
Type string `json:"type" yaml:"type"`
// LowerBound holds the lower limit for an Integer attribute, if declared
// by the BMC.
// Example: 0
LowerBound *int64 `json:"lower_bound,omitempty" yaml:"lower_bound,omitempty"`
// UpperBound holds the upper limit for an Integer attribute, if declared
// by the BMC.
// Example: 20
UpperBound *int64 `json:"upper_bound,omitempty" yaml:"upper_bound,omitempty"`
// MinLength holds the minimum character length for a String attribute,
// if declared by the BMC.
// Example: 4
MinLength *int64 `json:"min_length,omitempty" yaml:"min_length,omitempty"`
// MaxLength holds the maximum character length for a String attribute,
// if declared by the BMC.
// Example: 20
MaxLength *int64 `json:"max_length,omitempty" yaml:"max_length,omitempty"`
// AcceptableValues holds the values the BMC declares as acceptable for
// the BIOS attribute. Empty if the attribute is not an enumeration.
// Example: ["UserMode", "SetupMode"]
AcceptableValues []string `json:"acceptable_values" yaml:"acceptable_values"`
}
BIOSAttribute describes a single BIOS attribute known to the BMC.
swagger:model
type BIOSProfileResolution ¶ added in v0.9.0
type BIOSProfileResolution struct {
// Profiles holds the names of the BIOS profiles, that contributed to the
// resolution, in the order they have been applied.
// Example: ["dell-poweredge", "dell-poweredge-r7x0"]
Profiles []string `json:"profiles" yaml:"profiles"`
// Attributes holds the BIOS attribute names and values to apply to the
// server via BMC, e.g. {"SecureBoot": "Enabled", "TpmSecurity": "On"}.
Attributes map[string]any `json:"attributes" yaml:"attributes"`
// DeferredAttributes holds the BIOS attribute names and values, that are
// applied to the server in a second pass, once the attributes above are in
// effect, e.g. {"Tpm2Algorithm": "SHA256"}.
DeferredAttributes map[string]any `json:"deferred_attributes" yaml:"deferred_attributes"`
// SecureBoot holds the secure boot certificates and signatures, that are
// allowed to stay during the initialization of the server.
SecureBoot BIOSSecureBoot `json:"secure_boot" yaml:"secure_boot"`
}
BIOSProfileResolution is the outcome of the resolution of the BIOS profiles for a server. It holds the BIOS attributes and the secure boot configuration accumulated from all the BIOS profiles matching the server, which are applied to the server before IncusOS is installed on it.
swagger:model
type BIOSSecureBoot ¶ added in v0.9.0
type BIOSSecureBoot struct {
// DB holds the signature database.
DB BIOSSecureBootDatabase `json:"db" yaml:"db"`
// DBX holds the forbidden signature database.
DBX BIOSSecureBootDatabase `json:"dbx" yaml:"dbx"`
// KEK holds the key exchange key database.
KEK BIOSSecureBootDatabase `json:"kek" yaml:"kek"`
}
BIOSSecureBoot holds the secure boot configuration per secure boot database.
swagger:model
func (BIOSSecureBoot) Clone ¶ added in v0.9.0
func (s BIOSSecureBoot) Clone() BIOSSecureBoot
type BIOSSecureBootDatabase ¶ added in v0.9.0
type BIOSSecureBootDatabase struct {
// Certificates is keyed by the SHA256 fingerprint of the certificate in
// lower case hex notation. A value of true keeps the certificate, a value of
// false removes it.
Certificates map[string]bool `json:"certificates,omitempty" yaml:"certificates,omitempty"`
// Signatures is keyed by the signature value. A value of true keeps
// the signature, a value of false removes it.
Signatures map[string]bool `json:"signatures,omitempty" yaml:"signatures,omitempty"`
}
BIOSSecureBootDatabase holds the secure boot certificates and signatures of a single secure boot database, that are allowed to stay during the initialization of a server.
swagger:model
func (BIOSSecureBootDatabase) Clone ¶ added in v0.9.0
func (d BIOSSecureBootDatabase) Clone() BIOSSecureBootDatabase
type BMCAPIType ¶ added in v0.8.0
type BMCAPIType string
const ( BMCAPITypeNone BMCAPIType = "" BMCAPITypeRedfishV1Generic BMCAPIType = "redfish-v1-generic" )
func (BMCAPIType) String ¶ added in v0.8.0
func (s BMCAPIType) String() string
type BMCBootProgress ¶ added in v0.9.0
type BMCBootProgress struct {
// LastState holds the last boot progress state, e.g. "OSRunning" or
// "SystemHardwareInitializationComplete". Empty if not reported.
// Example: OSRunning
LastState string `json:"last_state" yaml:"last_state"`
// LastStateTime holds the time the last boot progress state was reached.
// Example: 2024-11-12T16:15:00Z
LastStateTime time.Time `json:"last_state_time" yaml:"last_state_time"`
// LastBootTimeSeconds holds how long the last boot took.
// Example: 315.5
LastBootTimeSeconds float64 `json:"last_boot_time_seconds" yaml:"last_boot_time_seconds"`
// OEMLastState holds the vendor specific state, set only when LastState is "OEM".
OEMLastState string `json:"oem_last_state" yaml:"oem_last_state"`
}
BMCBootProgress defines the last boot progress state reported by the BMC.
swagger:model
type BMCConfig ¶ added in v0.8.0
type BMCConfig struct {
// APIType specifies the BMC API type of the server, which is used to
// determine the correct BMC adapter to talk to the server.
APIType BMCAPIType `json:"api_type" yaml:"api_type"`
// Endpoint holds the base URL of the bmc of the server.
Endpoint string `json:"endpoint" yaml:"endpoint"`
// Certificate holds the PEM encoded certificate of the BMC used to establish
// trust for the TLS connection.
Certificate string `json:"certificate" yaml:"certificate"`
// AutoPinCertificate defines, if the certificate presented by the BMC should be
// accepted on the first connection test. If set to true and Certificate is
// empty, the certificate presented by the BMC during the connection test is
// persisted in the Certificate property. If a certificate is provided in the
// Certificate property or if AutoPinCertificate is set to false, any not trusted
// Certificate presented by the BMC will cause an error during the connection
// test.
AutoPinCertificate bool `json:"auto_pin_certificate" yaml:"auto_pin_certificate"`
// Username holds the username used to authenticate with the bmc of the server.
Username string `json:"username" yaml:"username"`
// Password holds the password used to authenticate with the bmc of the server.
Password string `json:"password" yaml:"password"`
}
type BMCData ¶ added in v0.8.0
type BMCData struct {
// BMCProtocol holds the protocol name, that is used to interact with the BMC.
// Example: Redfish
BMCProtocol string `json:"bmc_protocol" yaml:"bmc_protocol"`
// BMCProtocolVersion holds the protocol version reported by the BMC.
// Example: 1.16.0
BMCProtocolVersion string `json:"bmc_protocol_version" yaml:"bmc_protocol_version"`
// BMCVendor holds the vendor name reported by the BMC.
// Example: Dell
BMCVendor string `json:"bmc_vendor" yaml:"bmc_vendor"`
// BMCModel holds the model name reported by the BMC manager.
// Example: 17G Monolithic
BMCModel string `json:"bmc_model" yaml:"bmc_model"`
// BMCFirmwareVersion holds the firmware version of the BMC manager.
// Example: 1.30.20.10
BMCFirmwareVersion string `json:"bmc_firmware_version" yaml:"bmc_firmware_version"`
// BMCServiceIdentification holds the service identification of the BMC manager.
// Example: XXXXXXX
BMCServiceIdentification string `json:"bmc_service_identification" yaml:"bmc_service_identification"`
// ServerManufacturer holds the manufacturer reported for the system.
// Example: Dell Inc.
ServerManufacturer string `json:"server_manufacturer" yaml:"server_manufacturer"`
// ServerModel holds the model of the system.
// Example: PowerEdge R770
ServerModel string `json:"server_model" yaml:"server_model"`
// ServerSubModel holds information about the sub-model or configuration of the system.
ServerSubModel string `json:"server_sub_model" yaml:"server_sub_model"`
// ServerUUID is the unique system UUID typically derived from hardware, e.g. mainboard.
// Example: e9de436e-b94e-4aef-8563-883aec84096e
ServerUUID string `json:"system_uuid" yaml:"system_uuid"`
// ServerAssetTag holds the asset tag of the system.
// Example: XXXXXXX
ServerAssetTag string `json:"server_asset_tag" yaml:"server_asset_tag"`
// ServerHostName hold the host name as reported by the BMC for the server.
ServerHostName string `json:"server_host_name" yaml:"server_host_name"`
// ServerSKU holds the Stock Keeping Unit (SKU) for the server.
ServerSKU string `json:"server_sku" yaml:"server_sku"`
// ServerSerialNumber holds the serial number of the server.
ServerSerialNumber string `json:"server_serial_number" yaml:"server_serial_number"`
// ServerBIOSVersion holds the version of the BIOS.
// Example: 1.7.5
ServerBIOSVersion string `json:"server_bios_version" yaml:"server_bios_version"`
// ServerBIOSAttributes holds the BIOS settings/attributes as reported by the BMC.
ServerBIOSAttributes map[string]any `json:"server_bios_attributes" yaml:"server_bios_attributes"`
// ServerProcessorManufacturer holds the manufacturer reported for the first CPU.
// Example: Intel
ServerProcessorManufacturer string `json:"server_processor_manufacturer" yaml:"server_processor_manufacturer"`
// ServerProcessorArchitecture holds the architecture reported for the first CPU.
// Example: x86
ServerProcessorArchitecture string `json:"server_processor_architecture" yaml:"server_processor_architecture"`
// ServerProcessorInstructionSet holds the instruction set reported for the first CPU.
// Example: x86-64
ServerProcessorInstructionSet string `json:"server_processor_instruction_set" yaml:"server_processor_instruction_set"`
// ServerCPUSockets holds the number of physical CPUs reported for the server.
// It is 0, if the BMC does not report the number of CPUs.
// Example: 2
ServerCPUSockets int `json:"server_cpu_sockets" yaml:"server_cpu_sockets"`
// ServerHasTPM reports, if a trusted platform module is present in the server.
// Example: true
ServerHasTPM bool `json:"server_has_tpm" yaml:"server_has_tpm"`
// ServerPowerState holds the power state reported for the server.
// Example: On
ServerPowerState string `json:"server_power_state" yaml:"server_power_state"`
// ServerLocationIndicatorActive reports, if the location indicator LED is active.
// Example: false
ServerLocationIndicatorActive bool `json:"server_location_indicator_active" yaml:"server_location_indicator_active"`
// ServerHealthStatus holds the reported overall health status for the server.
// Example: Warning
ServerHealthStatus string `json:"server_health_status" yaml:"server_health_status"`
// ServerLastResetTime holds the time the system last came out of reset, as
// reported by the BMC. Zero if the BMC does not report it.
// Example: 2024-11-12T16:15:00Z
ServerLastResetTime time.Time `json:"server_last_reset_time" yaml:"server_last_reset_time"`
// ServerBootProgress holds the last boot progress state reported by the BMC.
ServerBootProgress BMCBootProgress `json:"server_boot_progress" yaml:"server_boot_progress"`
// VirtualMedia holds all virtual media slots (e.g. CD, DVD, floppy, USB)
// reported by the BMC system or manager, keyed by "<service>:<id>" (e.g. "system:1").
VirtualMedia map[string]BMCVirtualMedia `json:"virtual_media" yaml:"virtual_media"`
// 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"`
}
BMCData defines the data, that have been collected from the BMC.
swagger:model
type BMCDump ¶ added in v0.8.1
type BMCDump map[string]BMCDumpEntry
BMCDump holds the raw responses of the BMC (e.g. Redfish API), keyed by the endpoint name or path they were retrieved from.
swagger:model
type BMCDumpEntry ¶ added in v0.8.1
type BMCDumpEntry struct {
// Response contains the raw JSON response returned by the BMC.
Response json.RawMessage `json:"response,omitempty" yaml:"response,omitempty"`
// Error contains the error details, if the request failed.
Error *BMCDumpError `json:"error,omitempty" yaml:"error,omitempty"`
// Allow contains the methods the BMC reported as allowed for this endpoint
// in the "Allow" response header.
Allow string `json:"allow,omitempty" yaml:"allow,omitempty"`
// Trace contains additional dumped request and response details
// (e.g. HTTP headers). Opaque field for human inspection only. Populated if
// tracing is requested.
Trace string `json:"trace,omitempty" yaml:"trace,omitempty"`
}
BMCDumpEntry is the result of a single request against the BMC API.
swagger:model
type BMCDumpError ¶ added in v0.8.1
type BMCDumpError struct {
// Message contains the human readable error message.
Message string `json:"message" yaml:"message"`
// Error as reported by the API.
Error string `json:"error" yaml:"error"`
// Code contains the error code, if any.
Code string `json:"code,omitempty" yaml:"code,omitempty"`
// StatusCode contains the http status code, if applicable.
StatusCode int `json:"status_code,omitempty" yaml:"status_code,omitempty"`
}
BMCDumpError describes a failed request against the BMC API.
swagger:model
type BMCLogEvent ¶ added in v0.8.0
type BMCLogEvent struct {
// EntryCode holds the entry code for the log entry if the entry type is `SEL`.
// Example: Informational
EntryCode string `json:"entry_code" yaml:"entry_code"`
// Message holds the actual message of the log event.
// Example: This is a test log event.
Message string `json:"message" yaml:"message"`
// Severity of the log event. Possible values: OK, Warning, Critical
// Example: OK
Severity string `json:"severity" yaml:"severity"`
// Timestamp of the log event in RFC3339 format.
// Example: 2026-07-30T08:04:00Z
Timestamp time.Time `json:"timestamp" yaml:"timestamp"`
// EntryType holds the type of the entry. Possible values include (but not
// limited to): SEL, Event, CXL, Oem.
// Example: SEL
EntryType string `json:"entry_type" yaml:"entry_type"`
}
BMCLogEvent defines a log event from the BMC.
swagger:model
type BMCRebootState ¶ added in v0.9.0
type BMCRebootState string
BMCRebootState is the outcome of the attempt to tell, if a server has rebooted, see BMCHasRebootedSince.
const ( // BMCRebootStateUnknown means the BMC does not report any of the properties // required to tell, if the server has rebooted. BMCRebootStateUnknown BMCRebootState = "unknown" // BMCRebootStateNotRebooted means the BMC does report the properties and // they indicate, that the server has not rebooted. BMCRebootStateNotRebooted BMCRebootState = "not-rebooted" // BMCRebootStateRebooted means the server has rebooted. BMCRebootStateRebooted BMCRebootState = "rebooted" )
func BMCHasRebootedSince ¶ added in v0.9.0
func BMCHasRebootedSince(previous BMCData, current BMCData, since time.Time) BMCRebootState
BMCHasRebootedSince reports, if the server has rebooted since the given time, by comparing a previous BMC data snapshot with the current one. Since neither of the required properties is supported by every BMC, the outcome is tri-state and callers need to handle BMCRebootStateUnknown by falling back to another signal.
func (BMCRebootState) String ¶ added in v0.9.0
func (s BMCRebootState) String() string
type BMCTaskState ¶ added in v0.9.0
type BMCTaskState string
BMCTaskState describes the state of a task started via the BMC.
const ( BMCTaskStateUnknown BMCTaskState = "unknown" BMCTaskStateRunning BMCTaskState = "running" BMCTaskStateCompleted BMCTaskState = "completed" )
func (BMCTaskState) MarshalText ¶ added in v0.9.0
func (s BMCTaskState) MarshalText() ([]byte, error)
func (BMCTaskState) String ¶ added in v0.9.0
func (s BMCTaskState) String() string
func (*BMCTaskState) UnmarshalText ¶ added in v0.9.0
func (s *BMCTaskState) UnmarshalText(text []byte) error
type BMCVirtualMedia ¶ added in v0.8.1
type BMCVirtualMedia struct {
// ID uniquely identifies this virtual media entry among all virtual media
// reported by the BMC. It is derived from the service (e.g. "system") and ID.
// Example: system:1
ID string `json:"id" yaml:"id"`
// Inserted reports, if a virtual media is currently inserted into this slot.
Inserted bool `json:"inserted" yaml:"inserted"`
// Image holds the URI of the media attached to the virtual media.
Image string `json:"image" yaml:"image"`
// ImageName holds the name of the inserted virtual media image.
ImageName string `json:"image_name" yaml:"image_name"`
// ConnectedVia holds the connection method of the virtual media (e.g. URI, Applet).
ConnectedVia string `json:"connected_via" yaml:"connected_via"`
// Status holds the reported health status of the virtual media.
Status string `json:"status" yaml:"status"`
// MediaTypes holds the media types supported by the virtual media.
MediaTypes []string `json:"media_types" yaml:"media_types"`
// TransferMethod describes how the image transfer occurs.
TransferMethod string `json:"transfer_method" yaml:"transfer_method"`
// TransferProtocolType holds the network protocol used with the image URI.
TransferProtocolType string `json:"transfer_protocol_type" yaml:"transfer_protocol_type"`
// WriteProtected reports, if the remote device media prevents writing to that media.
WriteProtected bool `json:"write_protected" yaml:"write_protected"`
}
BMCVirtualMedia defines a single virtual media slot exposed by the BMC (system or manager), e.g. CD, DVD, floppy, or USB.
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 `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"`
}
Channel defines a channel.
swagger:model
type ChannelPost ¶ added in v0.3.0
type ChannelPost struct {
ChannelPut `yaml:",inline"`
// 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 ClusterAddServersPost ¶ added in v0.6.0
type ClusterAddServersPost struct {
// Names of the servers to be added to the cluster.
// Example: ["server1", "server2"]
ServerNames []string `json:"server_names" yaml:"server_names"`
// If set to true, the post join operations (namely the creation of the local storage volumes for backups,
// images and logs) are skipped.
SkipPostJoinOperations bool `json:"skip_post_join_operations" yaml:"skip_post_join_operations"`
// If set to true, the IncusOS services configuration (lvm, iscsi, multipath, nvme, ceph, linstor, ovn) is
// copied from an existing member of the cluster to the servers to be added, before they join the cluster.
// Member dependent addresses, such as the linstor listen address and the ovn tunnel address, are adapted
// for each added server.
CopyServicesConfig bool `json:"copy_services_config" yaml:"copy_services_config"`
}
ClusterAddServersPost represents a cluster add servers request containing the names of the servers to be added to the cluster.
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.Duration (as string, e.g. "15m"), 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 string `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 ClusterMemberConfigKey ¶ added in v0.6.0
type ClusterMemberConfigKey = incusapi.ClusterMemberConfigKey
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 ClusterRemoveServersPost ¶ added in v0.6.0
type ClusterRemoveServersPost struct {
// Name of the server to be removed from the cluster.
// Example: ["server1"]
ServerNames []string `json:"server_names" yaml:"server_names"`
}
ClusterRemoveServersPost represents a remove server from a cluster request containing the name of the server to be removed from the cluster.
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" ClusterUpdateInProgressRollingReboot ClusterUpdateInProgress = "rolling reboot" ClusterUpdateInProgressError ClusterUpdateInProgress = "error" )
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"`
// Error contains the error description, if the cluster update failed permanently.
Error string `json:"error" yaml:"error"`
// 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"`
// PendingReboot contains the list of server names of the servers, which still
// have to be rebooted as part of an on demand rolling reboot. A server is
// removed from the list as soon as its reboot has been triggered. The list is
// only populated during the rolling reboot, it is empty for all other phases.
PendingReboot []string `json:"pending_reboot" yaml:"pending_reboot"`
// 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"`
}
Image defines a image in the inventory.
The model name is set explicitly, because the type name collides with Image from github.com/lxc/incus/v7/shared/api, which is embedded as Object below. Without it, go-swagger derives both names from the package paths, which makes them change whenever an unrelated colliding type is added.
swagger:model InventoryImage
type ImageSource ¶ added in v0.7.0
type ImageSource struct {
ImageSourcePost `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"`
}
ImageSource defines an image source like images.linuxcontainers.org.
The model name is set explicitly, because the type name collides with ImageSource from github.com/lxc/incus/v7/shared/api. Without it, go-swagger derives both names from the package paths, which makes them change whenever an unrelated colliding type is added.
swagger:model IncusImageSource
type ImageSourcePost ¶ added in v0.7.0
type ImageSourcePost struct {
ImageSourcePut `yaml:",inline"`
// Name of the image source.
// Example: linuxcontainers.org
Name string `json:"name" yaml:"name"`
}
type ImageSourcePut ¶ added in v0.7.0
type ImageSourcePut struct {
// URL of the image source.
// Example: https://images.linuxcontainers.org
URL string `json:"url" yaml:"url"`
// FilterExression applied when fetching images from the image source.
// Only images matching the filter expression are fetched.
// Example: Architecture == "amd64"
FilterExpression string `json:"filter_expression" yaml:"filter_expression"`
}
ImageSourcePut represents the fields available for update for an image source.
swagger:model
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 IncusImage ¶ added in v0.7.0
type IncusImage struct {
IncusImagePut `yaml:",inline"`
// Name of the incus image in the format "os:release:architecture:variant".
// Example: almalinux:10:amd64:cloud
Name string `json:"name" yaml:"name"`
// OperatingSystem of the incus image.
// Example: almalinux
OperatingSystem string `json:"os" yaml:"os"`
// Release of the operating system of the incus image.
// Example: 10
Release string `json:"release" yaml:"release"`
// Architecture the incus image is built for.
// Example: amd64
Architecture string `json:"arch" yaml:"arch"`
// Variant of the incus image.
// Example: default
Variant string `json:"variant" yaml:"variant,omitempty"`
// Versions of the incus image.
Versions map[string]IncusImageVersion `json:"versions" yaml:"versions"`
// 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"`
}
IncusImage defines an incus image.
swagger:model
type IncusImageAlias ¶ added in v0.7.0
type IncusImageAlias []string
func (*IncusImageAlias) UnmarshalJSON ¶ added in v0.7.0
func (i *IncusImageAlias) UnmarshalJSON(data []byte) error
type IncusImagePost ¶ added in v0.7.0
type IncusImagePost struct {
// OperatingSystem of the incus image.
// Example: almalinux
OperatingSystem string `json:"os" yaml:"os"`
// Release of the operating system of the incus image.
// Example: 10
Release string `json:"release" yaml:"release"`
// Architecture the incus image is built for.
// Example: amd64
Architecture string `json:"arch" yaml:"arch"`
// Variant of the incus image.
// Example: default
Variant string `json:"variant" yaml:"variant"`
// Version of the incus image.
// Example: 20260616
Version string `json:"version" yaml:"version"`
}
IncusImagePost represents the fields available when creating an incus image version.
swagger:model
type IncusImagePut ¶ added in v0.7.0
type IncusImagePut struct {
// Aliases of the incus image.
Aliases IncusImageAlias `json:"aliases" yaml:"aliases"`
// Description of the incus image.
Description string `json:"description" yaml:"description"`
}
IncusImagePut represents the fields available for update for an incus image.
swagger:model
type IncusImageVersion ¶ added in v0.7.0
type IncusImageVersion struct {
// Items of the incus image version. This is the file artifacts, that are
// available for a given incus image version.
Items map[string]IncusImageVersionItem `json:"items" yaml:"items"`
}
type IncusImageVersionItem ¶ added in v0.7.0
type IncusImageVersionItem struct {
// CombinedSha256DiskKvmImg holds the combinded sha256 hash of the incus image
// versions metadata ("incus.tar.xz") and the "disk.qcow2" image.
CombinedSha256DiskKvmImg string `json:"combined_disk-kvm-img_sha256,omitempty" yaml:"combined_disk-kvm-img_sha256"`
// CombinedSha256RootXz holds the combinded sha256 hash of the incus image
// versions metadata ("incus.tar.xz") and the "root.tar.xz" image.
CombinedSha256RootXz string `json:"combined_rootxz_sha256,omitempty" yaml:"combined_rootxz_sha256"`
// CombinedSha256SquashFs holds the combinded sha256 hash of the incus image
// versions metadata ("incus.tar.xz") and the "root.squashfs" image.
CombinedSha256SquashFs string `json:"combined_squashfs_sha256,omitempty" yaml:"combined_squashfs_sha256"`
// FileType holds the file type. This defaults to the file name like
// incus.tar.xz. Special file types are "squashfs" and "disk-kvm.img".
FileType string `json:"ftype" yaml:"ftype"`
// Path, relative to the repositories root folder, where the particular
// file artifact is stored.
Path string `json:"path" yaml:"path"`
// HashSha256 holds the sha256 hash of the file.
HashSha256 string `json:"sha256,omitempty" yaml:"sha256"`
// Size holds the size in bytes of the file.
Size int64 `json:"size" yaml:"size"`
}
type IncusImageVersions ¶ added in v0.7.0
type IncusImageVersions map[string]IncusImageVersion
func (*IncusImageVersions) Scan ¶ added in v0.7.0
func (i *IncusImageVersions) Scan(value any) error
Scan implements the sql.Scanner interface.
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"`
}
Instance defines a instance in the inventory.
The model name is set explicitly, because the type name collides with InstanceFull from github.com/lxc/incus/v7/shared/api, which is embedded as Object below. Without it, go-swagger derives both names from the package paths, which makes them change whenever an unrelated colliding type is added.
swagger:model InventoryInstance
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"`
}
InventoryAggregate holds the inventory resources of a single cluster.
swagger:model
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"`
}
Network defines a network in the inventory.
The model name is set explicitly, because the type name collides with Network from github.com/lxc/incus/v7/shared/api, which is embedded as Object below. Without it, go-swagger derives both names from the package paths, which makes them change whenever an unrelated colliding type is added.
swagger:model InventoryNetwork
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"`
}
NetworkACL defines a network ACL in the inventory.
The model name is set explicitly, because the type name collides with NetworkACL from github.com/lxc/incus/v7/shared/api, which is embedded as Object below. Without it, go-swagger derives both names from the package paths, which makes them change whenever an unrelated colliding type is added.
swagger:model InventoryNetworkACL
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"`
}
NetworkAddressSet defines a network address set in the inventory.
The model name is set explicitly, because the type name collides with NetworkAddressSet from github.com/lxc/incus/v7/shared/api, which is embedded as Object below. Without it, go-swagger derives both names from the package paths, which makes them change whenever an unrelated colliding type is added.
swagger:model InventoryNetworkAddressSet
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"`
}
NetworkForward defines a network forward in the inventory.
The model name is set explicitly, because the type name collides with NetworkForward from github.com/lxc/incus/v7/shared/api, which is embedded as Object below. Without it, go-swagger derives both names from the package paths, which makes them change whenever an unrelated colliding type is added.
swagger:model InventoryNetworkForward
type NetworkIntegration ¶
type NetworkIntegration struct {
UUID uuid.UUID `json:"uuid" yaml:"uuid"`
Cluster string `json:"cluster" yaml:"cluster"`
Name string `json:"name" yaml:"name"`
Object incusapi.NetworkIntegration `json:"object" yaml:"object"`
LastUpdated time.Time `json:"last_updated" yaml:"last_updated"`
}
NetworkIntegration defines a network integration in the inventory.
The model name is set explicitly, because the type name collides with NetworkIntegration from github.com/lxc/incus/v7/shared/api, which is embedded as Object below. Without it, go-swagger derives both names from the package paths, which makes them change whenever an unrelated colliding type is added.
swagger:model InventoryNetworkIntegration
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"`
}
NetworkLoadBalancer defines a network load balancer in the inventory.
The model name is set explicitly, because the type name collides with NetworkLoadBalancer from github.com/lxc/incus/v7/shared/api, which is embedded as Object below. Without it, go-swagger derives both names from the package paths, which makes them change whenever an unrelated colliding type is added.
swagger:model InventoryNetworkLoadBalancer
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"`
}
NetworkPeer defines a network peer in the inventory.
The model name is set explicitly, because the type name collides with NetworkPeer from github.com/lxc/incus/v7/shared/api, which is embedded as Object below. Without it, go-swagger derives both names from the package paths, which makes them change whenever an unrelated colliding type is added.
swagger:model InventoryNetworkPeer
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"`
}
NetworkZone defines a network zone in the inventory.
The model name is set explicitly, because the type name collides with NetworkZone from github.com/lxc/incus/v7/shared/api, which is embedded as Object below. Without it, go-swagger derives both names from the package paths, which makes them change whenever an unrelated colliding type is added.
swagger:model InventoryNetworkZone
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"`
}
Profile defines a profile in the inventory.
The model name is set explicitly, because the type name collides with Profile from github.com/lxc/incus/v7/shared/api, which is embedded as Object below. Without it, go-swagger derives both names from the package paths, which makes them change whenever an unrelated colliding type is added.
swagger:model InventoryProfile
type Project ¶
type Project struct {
UUID uuid.UUID `json:"uuid" yaml:"uuid"`
Cluster string `json:"cluster" yaml:"cluster"`
Name string `json:"name" yaml:"name"`
Object incusapi.Project `json:"object" yaml:"object"`
LastUpdated time.Time `json:"last_updated" yaml:"last_updated"`
}
Project defines a project in the inventory.
The model name is set explicitly, because the type name collides with Project from github.com/lxc/incus/v7/shared/api, which is embedded as Object below. Without it, go-swagger derives both names from the package paths, which makes them change whenever an unrelated colliding type is added.
swagger:model InventoryProject
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 SeedSecurity ¶ added in v0.7.2
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"`
// BMCData contains the data, that is collected from the BMC.
BMCData BMCData `json:"bmc_data" yaml:"bmc_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"`
// Deployment reports the progress of the automated deployment of the server.
// It is only set, if a deployment has been requested for the server, and is
// read only.
Deployment *ServerDeploymentStatus `json:"deployment,omitempty" yaml:"deployment,omitempty"`
// 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 ServerBMCApplyBIOSAttributesPost ¶ added in v0.9.0
type ServerBMCApplyBIOSAttributesPost struct {
// Attributes contains the BIOS attribute names and values to apply to the
// server via BMC. The available attribute names and accepted value types
// are BMC/BIOS vendor specific.
Attributes map[string]any `json:"attributes" yaml:"attributes"`
}
ServerBMCApplyBIOSAttributesPost represents a request to apply a set of BIOS attributes to a server via its BMC.
swagger:model
type ServerBMCAttachMedia ¶ added in v0.9.0
type ServerBMCAttachMedia struct {
// TokenUUID holds the UUID of the provisioning token that owns the seed.
// Example: 8f6c3d1a-2b4e-4c9a-9f7d-1a2b3c4d5e6f
TokenUUID string `json:"token_uuid" yaml:"token_uuid"`
// Seed holds the name of the token seed used to generate the installation
// media. The referenced token seed must be public.
// Example: default
Seed string `json:"seed" yaml:"seed"`
// Type holds the type of image to generate. Possible values: iso, raw.
// Example: iso
Type string `json:"type" yaml:"type"`
// Architecture holds the CPU architecture of the image to generate. Possible
// values: x86_64, aarch64.
// Example: x86_64
Architecture string `json:"architecture" yaml:"architecture"`
// Channel holds the channel the most recent update should be taken from to
// generate the image. Optional, defaults to the configured default channel.
// Example: stable
Channel string `json:"channel" yaml:"channel"`
// VirtualMediaID identifies the virtual media device the media is attached
// to, using the "<service>:<bmc-id>" notation (e.g. "system:1" or
// "manager:2") as reported in the BMC virtual media data.
// Example: system:1
VirtualMediaID string `json:"virtual_media_id" yaml:"virtual_media_id"`
// SetBootDevice requests, that the virtual media is registered as the boot
// device for the next boot of the server in addition to being attached.
// Detaching the media restores the default boot configuration of the system.
// Example: true
SetBootDevice bool `json:"set_boot_device" yaml:"set_boot_device"`
}
ServerBMCAttachMedia defines the request to attach installation media to a server via its BMC.
swagger:model
type ServerBMCDetachMedia ¶ added in v0.9.0
type ServerBMCDetachMedia struct {
// VirtualMediaID identifies the virtual media device the media is detached
// from, using the "<service>:<bmc-id>" notation (e.g. "system:1" or
// "manager:2") as reported in the BMC virtual media data.
// Example: system:1
VirtualMediaID string `json:"virtual_media_id" yaml:"virtual_media_id"`
}
ServerBMCDetachMedia defines the request to detach installation media from a server via its BMC.
swagger:model
type ServerBMCLocatePost ¶ added in v0.9.0
type ServerBMCLocatePost struct {
// Active defines, if the location indicator LED should be turned on (true)
// or off (false).
// Example: true
Active bool `json:"active" yaml:"active"`
}
ServerBMCLocatePost represents a request to change the state of the location indicator LED of a server via its BMC.
swagger:model
type ServerDeploymentPost ¶ added in v0.9.0
type ServerDeploymentPost struct {
// TokenUUID holds the UUID of the provisioning token that owns the seed the
// installation media is generated from.
// Example: 8f6c3d1a-2b4e-4c9a-9f7d-1a2b3c4d5e6f
TokenUUID string `json:"token_uuid" yaml:"token_uuid"`
// Seed holds the name of the token seed used to generate the installation
// media. The referenced token seed must be public, since the BMC fetches
// the image unauthenticated.
// Example: some-seed-name
Seed string `json:"seed" yaml:"seed"`
// Type holds the type of image to generate. Possible values: iso, raw.
// Optional, defaults to iso.
// Example: iso
Type string `json:"type" yaml:"type"`
// Architecture holds the CPU architecture of the image to generate. Possible
// values: x86_64, aarch64. Optional, defaults to x86_64.
// Example: x86_64
Architecture string `json:"architecture" yaml:"architecture"`
// Channel holds the channel the most recent update should be taken from to
// generate the image. Optional, defaults to the configured default channel.
// Example: stable
Channel string `json:"channel" yaml:"channel"`
// VirtualMediaID identifies the virtual media device the installation media
// is attached to, using the "<service>:<bmc-id>" notation (e.g. "system:1").
// Optional, the first virtual media device advertising CD or DVD support is
// picked automatically, if it is left empty, the ones offered by the system
// taking precedence over the ones offered by the manager.
// Example: system:1
VirtualMediaID string `json:"virtual_media_id" yaml:"virtual_media_id"`
// Force requests, that a token seed, which does not reboot the server upon
// completion of the installation ("force_reboot"), is accepted. The
// deployment then relies on the read progress of the installation media
// alone to tell, when the first stage of the installation is done.
// Example: false
Force bool `json:"force" yaml:"force"`
// SkipSecureBootCertificates requests, that the enrollment of the secure
// boot certificates of IncusOS is skipped, which is required for a BMC,
// whose Redfish API does not support the modification of the UEFI key
// databases. The certificates are then expected to have been enrolled by an
// operator before the deployment is triggered.
// Example: false
SkipSecureBootCertificates bool `json:"skip_secure_boot_certificates" yaml:"skip_secure_boot_certificates"`
}
ServerDeploymentPost defines the request to deploy IncusOS on a server using the automated deployment control loop.
swagger:model
type ServerDeploymentState ¶ added in v0.9.0
type ServerDeploymentState string
ServerDeploymentState is the state, the automated deployment of a server is in.
const ( // ServerDeploymentStateRefreshBMCData collects the BMC data of the server, // so the deployment operates on an up to date view of the hardware. ServerDeploymentStateRefreshBMCData ServerDeploymentState = "refresh-bmc-data" // ServerDeploymentStateCheckBIOS reads the BIOS attributes of the server back // and records for both BIOS passes, whether they still have anything to // apply, so a server, that is configured correctly already, is not power // cycled for nothing. ServerDeploymentStateCheckBIOS ServerDeploymentState = "check-bios" // ServerDeploymentStatePowerOffBIOS powers the server off before the BIOS // attributes are applied. ServerDeploymentStatePowerOffBIOS ServerDeploymentState = "power-off-bios" // ServerDeploymentStateWaitPowerOffBIOS waits for the server to be powered off. ServerDeploymentStateWaitPowerOffBIOS ServerDeploymentState = "wait-power-off-bios" // ServerDeploymentStateApplyBIOS applies the resolved BIOS attributes. ServerDeploymentStateApplyBIOS ServerDeploymentState = "apply-bios" // ServerDeploymentStatePowerOnBIOS powers the server on, so the staged BIOS // attributes are picked up by the firmware. ServerDeploymentStatePowerOnBIOS ServerDeploymentState = "power-on-bios" // ServerDeploymentStateWaitBIOSApplied waits for the BIOS attributes to be applied. ServerDeploymentStateWaitBIOSApplied ServerDeploymentState = "wait-bios-applied" // ServerDeploymentStateVerifyBIOS reads the BIOS attributes back and // compares them to the resolved BIOS profile. ServerDeploymentStateVerifyBIOS ServerDeploymentState = "verify-bios" // ServerDeploymentStatePowerOffBIOSDeferred powers the server off before the // deferred BIOS attributes are applied. ServerDeploymentStatePowerOffBIOSDeferred ServerDeploymentState = "power-off-bios-deferred" // ServerDeploymentStateWaitPowerOffBIOSDeferred waits for the server to be powered off. ServerDeploymentStateWaitPowerOffBIOSDeferred ServerDeploymentState = "wait-power-off-bios-deferred" // ServerDeploymentStateApplyBIOSDeferred applies the resolved deferred BIOS // attributes, which only the firmware of a server, that has picked the // attributes applied before up, accepts. ServerDeploymentStateApplyBIOSDeferred ServerDeploymentState = "apply-bios-deferred" // ServerDeploymentStatePowerOnBIOSDeferred powers the server on, so the staged // deferred BIOS attributes are picked up by the firmware. ServerDeploymentStatePowerOnBIOSDeferred ServerDeploymentState = "power-on-bios-deferred" // ServerDeploymentStateWaitBIOSAppliedDeferred waits for the deferred BIOS // attributes to be applied. ServerDeploymentStateWaitBIOSAppliedDeferred ServerDeploymentState = "wait-bios-applied-deferred" // ServerDeploymentStateVerifyBIOSDeferred reads the deferred BIOS attributes // back and compares them to the resolved BIOS profile. ServerDeploymentStateVerifyBIOSDeferred ServerDeploymentState = "verify-bios-deferred" // ServerDeploymentStatePowerOffSecureBoot powers the server off, so the // secure boot databases can be reinitialized and the installation media can // be attached. The server stays off until it is booted from that media. ServerDeploymentStatePowerOffSecureBoot ServerDeploymentState = "power-off-secure-boot" // ServerDeploymentStateWaitPowerOffSecureBoot waits for the server to be powered off. ServerDeploymentStateWaitPowerOffSecureBoot ServerDeploymentState = "wait-power-off-secure-boot" // ServerDeploymentStateSecureBoot initializes the secure boot databases of // the server with the certificates of IncusOS. ServerDeploymentStateSecureBoot ServerDeploymentState = "secure-boot-certificates" // ServerDeploymentStateClearMedia ejects the media left in the virtual media // devices of the server. ServerDeploymentStateClearMedia ServerDeploymentState = "clear-media" // ServerDeploymentStateWaitMediaCleared waits for all the virtual media // devices to report no media inserted anymore. ServerDeploymentStateWaitMediaCleared ServerDeploymentState = "wait-media-cleared" // ServerDeploymentStatePowerOnSecureBoot powers the server on, so the // firmware picks the enrolled secure boot certificates up. ServerDeploymentStatePowerOnSecureBoot ServerDeploymentState = "power-on-secure-boot" // ServerDeploymentStateWaitSecureBootSettled waits for the firmware to have // picked the enrolled secure boot certificates up, which it signals by // rebooting the server on its own. ServerDeploymentStateWaitSecureBootSettled ServerDeploymentState = "wait-secure-boot-settled" // ServerDeploymentStatePowerOffSecureBootSettled powers the server off again, // so the installation media can be attached and booted. ServerDeploymentStatePowerOffSecureBootSettled ServerDeploymentState = "power-off-secure-boot-settled" // ServerDeploymentStateWaitPowerOffSecureBootSettled waits for the server to be powered off. ServerDeploymentStateWaitPowerOffSecureBootSettled ServerDeploymentState = "wait-power-off-secure-boot-settled" // ServerDeploymentStateAttachMedia attaches the installation media and // registers it as the boot device for the next boot. ServerDeploymentStateAttachMedia ServerDeploymentState = "attach-media" // ServerDeploymentStateWaitMediaAttached waits for the installation media to // be reported as inserted. ServerDeploymentStateWaitMediaAttached ServerDeploymentState = "wait-media-attached" // ServerDeploymentStatePowerOnInstall powers the server on, so it boots the // installation media. ServerDeploymentStatePowerOnInstall ServerDeploymentState = "power-on-install" // ServerDeploymentStateWaitInstall waits for the first stage of the IncusOS // installation to complete. ServerDeploymentStateWaitInstall ServerDeploymentState = "wait-install" // ServerDeploymentStateDetachMedia ejects the installation media, which also // restores the default boot device of the server. ServerDeploymentStateDetachMedia ServerDeploymentState = "detach-media" // ServerDeploymentStateWaitMediaDetached waits for the installation media to // be reported as ejected. ServerDeploymentStateWaitMediaDetached ServerDeploymentState = "wait-media-detached" // ServerDeploymentStateWaitReboot waits for the server to come back up after // the first stage of the installation. ServerDeploymentStateWaitReboot ServerDeploymentState = "wait-reboot" // ServerDeploymentStateWaitRegistration waits for the server to register // itself with Operations Center. ServerDeploymentStateWaitRegistration ServerDeploymentState = "wait-registration" // ServerDeploymentStateCleanup ejects any media still attached to the server. ServerDeploymentStateCleanup ServerDeploymentState = "cleanup" // ServerDeploymentStateCancel ejects the installation media and powers the // server off after the deployment has been cancelled. ServerDeploymentStateCancel ServerDeploymentState = "cancel" // ServerDeploymentStateWaitCancel waits for the server to be powered off. ServerDeploymentStateWaitCancel ServerDeploymentState = "wait-cancel" // ServerDeploymentStateCompleted is the terminal state of a successful deployment. ServerDeploymentStateCompleted ServerDeploymentState = "completed" // ServerDeploymentStateFailed is the terminal state of a failed deployment. // Nothing is cleaned up, so an operator can inspect the server through the BMC. ServerDeploymentStateFailed ServerDeploymentState = "failed" // ServerDeploymentStateCancelled is the terminal state of a cancelled deployment. ServerDeploymentStateCancelled ServerDeploymentState = "cancelled" )
func (ServerDeploymentState) IsTerminal ¶ added in v0.9.0
func (s ServerDeploymentState) IsTerminal() bool
IsTerminal reports, if no further step is performed for a deployment in this state.
func (ServerDeploymentState) MarshalText ¶ added in v0.9.0
func (s ServerDeploymentState) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface.
func (ServerDeploymentState) String ¶ added in v0.9.0
func (s ServerDeploymentState) String() string
func (*ServerDeploymentState) UnmarshalText ¶ added in v0.9.0
func (s *ServerDeploymentState) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface.
type ServerDeploymentStatus ¶ added in v0.9.0
type ServerDeploymentStatus struct {
// State holds the state of the deployment.
// Example: wait-install
State ServerDeploymentState `json:"state" yaml:"state"`
// Request holds the deployment request, as it has been accepted.
Request ServerDeploymentPost `json:"request" yaml:"request"`
// ForceReboot reports, if the token seed used for the deployment reboots the
// server on its own upon completion of the first stage of the installation.
// Example: true
ForceReboot bool `json:"force_reboot" yaml:"force_reboot"`
// BIOSProfiles holds the names of the BIOS profiles, that have been resolved
// for the server when the deployment was requested.
// Example: ["dell-poweredge"]
BIOSProfiles []string `json:"bios_profiles" yaml:"bios_profiles"`
// BIOSAttributes holds the BIOS attributes, that have been resolved for the
// server when the deployment was requested.
BIOSAttributes map[string]any `json:"bios_attributes" yaml:"bios_attributes"`
// BIOSDeferredAttributes holds the BIOS attributes, that have been resolved
// for the server when the deployment was requested and that are applied in a
// second pass, once the attributes above are in effect.
BIOSDeferredAttributes map[string]any `json:"bios_deferred_attributes" yaml:"bios_deferred_attributes"`
// SecureBoot holds the secure boot allow lists, that have been resolved for
// the server when the deployment was requested. They name the entries of the
// UEFI key databases, that are kept while the databases are reinitialized.
SecureBoot BIOSSecureBoot `json:"secure_boot" yaml:"secure_boot"`
// MediaURL holds the URL of the installation media attached to the server.
MediaURL string `json:"media_url" yaml:"media_url"`
// MediaBytesRead holds how much of the installation media the BMC has read so
// far. It counts every byte of the image once, no matter how often the BMC
// requested it, so a BMC re-requesting ranges it has fetched before does not
// inflate it. It is -1, if no read progress is available.
// Example: 966754304
MediaBytesRead int64 `json:"media_bytes_read" yaml:"media_bytes_read"`
// MediaSize holds the size of the installation media the bytes above are
// read from. It is 0, if no read progress is available.
// Example: 3433074688
MediaSize int64 `json:"media_size" yaml:"media_size"`
// Retries holds the number of attempts already spent on the current state.
// Example: 0
Retries int `json:"retries" yaml:"retries"`
// LastError holds the error reported by the last failed attempt.
LastError string `json:"last_error" yaml:"last_error"`
// FailedState holds the state the deployment failed in.
FailedState ServerDeploymentState `json:"failed_state" yaml:"failed_state"`
// StartedAt is the time the deployment was requested in RFC3339 format.
// Example: 2024-11-12T16:15:00Z
StartedAt time.Time `json:"started_at" yaml:"started_at"`
// StateEnteredAt is the time the current state was entered in RFC3339 format.
// Example: 2024-11-12T16:15:00Z
StateEnteredAt time.Time `json:"state_entered_at" yaml:"state_entered_at"`
// FinishedAt is the time the deployment reached a terminal state in RFC3339
// format. It is zero for a deployment still in progress.
// Example: 2024-11-12T16:15:00Z
FinishedAt time.Time `json:"finished_at" yaml:"finished_at"`
// History holds the states the deployment has gone through.
History []ServerDeploymentStep `json:"history" yaml:"history"`
}
ServerDeploymentStatus reports the progress of the automated deployment of a server. It is read only, deployments are triggered through the deploy and cancel-deploy endpoints.
swagger:model
type ServerDeploymentStep ¶ added in v0.9.0
type ServerDeploymentStep struct {
// State holds the state of the deployment.
// Example: attach-media
State ServerDeploymentState `json:"state" yaml:"state"`
// EnteredAt is the time the state was entered in RFC3339 format.
// Example: 2024-11-12T16:15:00Z
EnteredAt time.Time `json:"entered_at" yaml:"entered_at"`
// Retries holds the number of attempts, that have been spent on the state.
// Example: 1
Retries int `json:"retries" yaml:"retries"`
// Error holds the error reported by the last failed attempt on the state.
Error string `json:"error" yaml:"error"`
}
ServerDeploymentStep is a single state an automated deployment has gone through.
swagger:model
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"`
// SystemUUID is the unique system UUID typically derived from hardware, e.g. mainboard.
// Example: e9de436e-b94e-4aef-8563-883aec84096e
SystemUUID string `json:"system_uuid" yaml:"system_uuid"`
// MachineID is the unique machine ID of the server, this might be the same as
// the SystemUUID, but it can also be a distinct value. It is defined as
// a 128-bit value encoded as hex characters without any delimiters.
// Example: e9de436eb94e4aef8563883aec84096e
MachineID string `json:"machine_id" yaml:"machine_id"`
}
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"`
// BMCConfig holds the BMC related configuration.
BMCConfig BMCConfig `json:"bmc_config" yaml:"bmc_config"`
}
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.
swagger:model
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"`
// Cause holds the identifier of the source event, which triggered the self update.
// Example: network-config-changed
Cause ServerSelfUpdateCause `json:"cause" yaml:"cause"`
}
ServerSelfUpdate defines a self update request of a server.
swagger:model
type ServerSelfUpdateCause ¶ added in v0.6.0
type ServerSelfUpdateCause string
const ( ServerSelfUpdateCauseDefault ServerSelfUpdateCause = "" // Empty string is threated as network config changed for backwards compatibility reasons. ServerSelfUpdateCauseNetworkConfigChanged ServerSelfUpdateCause = "network-config-changed" ServerSelfUpdateCauseSystemIsReady ServerSelfUpdateCause = "system-is-ready" ServerSelfUpdateCauseOSUpdateApplied ServerSelfUpdateCause = "os-update-applied" ServerSelfUpdateCauseApplicationUpdateApplied ServerSelfUpdateCause = "application-update-applied" ServerSelfUpdateCauseNetworkInterfaceStateChanged ServerSelfUpdateCause = "network-interface-state-changed" ServerSelfUpdateCauseStorageConfigChanged ServerSelfUpdateCause = "storage-config-changed" ServerSelfUpdateCauseSystemRebootTriggered ServerSelfUpdateCause = "system-reboot-triggered" ServerSelfUpdateCauseShutdownTriggered ServerSelfUpdateCause = "system-shutdown-triggered" ServerSelfUpdateCauseSecureBootUpdateApplied ServerSelfUpdateCause = "secure-boot-update-applied" ServerSelfUpdateCauseSuspendTriggered ServerSelfUpdateCause = "suspend-triggered" )
type ServerStatus ¶
type ServerStatus string
const ( ServerStatusUnknown ServerStatus = "unknown" ServerStatusUnregistered ServerStatus = "unregistered" ServerStatusDeploying ServerStatus = "deploying" 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 = "" ServerStatusDetailUnregisteredDeploymentFailed ServerStatusDetail = "deployment failed" ServerStatusDetailUnregisteredDeploymentCancelled ServerStatusDetail = "deployment cancelled" ServerStatusDetailDeployingPreparing ServerStatusDetail = "preparing" ServerStatusDetailDeployingConfiguringBIOS ServerStatusDetail = "configuring BIOS" ServerStatusDetailDeployingAttachingMedia ServerStatusDetail = "attaching installation media" ServerStatusDetailDeployingInstalling ServerStatusDetail = "installing" ServerStatusDetailDeployingFinalizing ServerStatusDetail = "finalizing" ServerStatusDetailDeployingCancelling ServerStatusDetail = "cancelling" ServerStatusDetailPendingRegistering ServerStatusDetail = "registering" ServerStatusDetailPendingReconfiguring ServerStatusDetail = "re-configuring" ServerStatusDetailReadyUpdatingOS ServerStatusDetail = "updating" ServerStatusDetailReadyUpdatingApplication ServerStatusDetail = "updating application" ServerStatusDetailReadyEvacuating ServerStatusDetail = "evacuating" ServerStatusDetailReadyRestoring ServerStatusDetail = "restoring" 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 ServerSystemSecurity ¶ added in v0.7.2
type ServerSystemSecurity = incusosapi.SystemSecurity
ServerSystemSecurity is a type alias to hold the system security 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" ServerTypeIncusLTS70 ServerType = "incus-lts-7.0" ServerTypeMigrationManager ServerType = "migration-manager" ServerTypeOperationsCenter ServerType = "operations-center" )
func (ServerType) IsIncus ¶ added in v0.7.1
func (s ServerType) IsIncus() bool
IsIncus reports whether the server type is one of the Incus kinds.
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"`
// Authentication protocol of a trusted client (one of "tls", "oidc" or "unix"), "untrusted" otherwise
// 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, ServerStatusDetailReadyRestoring, NeedsUpdate: false, InMaintenance: InMaintenanceRestoring or InMaintenanceEvacuated ServerUpdateStateInMaintenancePostRestore ServerUpdateState = "post restore" // ServerStatusReady, ServerStatusDetailReadyRestoring, NeedsUpdate: false, InMaintenance: NotInMaintenance 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(osName string, latestAvailableVersions map[string]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"`
}
StorageBucket defines a storage bucket in the inventory.
The model name is set explicitly, because the type name collides with StorageBucketFull from github.com/lxc/incus/v7/shared/api, which is embedded as Object below. Without it, go-swagger derives both names from the package paths, which makes them change whenever an unrelated colliding type is added.
swagger:model InventoryStorageBucket
type StoragePool ¶
type StoragePool struct {
UUID uuid.UUID `json:"uuid" yaml:"uuid"`
Cluster string `json:"cluster" yaml:"cluster"`
Name string `json:"name" yaml:"name"`
Object incusapi.StoragePool `json:"object" yaml:"object"`
LastUpdated time.Time `json:"last_updated" yaml:"last_updated"`
}
StoragePool defines a storage pool in the inventory.
The model name is set explicitly, because the type name collides with StoragePool from github.com/lxc/incus/v7/shared/api, which is embedded as Object below. Without it, go-swagger derives both names from the package paths, which makes them change whenever an unrelated colliding type is added.
swagger:model InventoryStoragePool
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"`
}
StorageVolume defines a storage volume in the inventory.
The model name is set explicitly, because the type name collides with StorageVolumeFull from github.com/lxc/incus/v7/shared/api, which is embedded as Object below. Without it, go-swagger derives both names from the package paths, which makes them change whenever an unrelated colliding type is added.
swagger:model InventoryStorageVolume
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 and to only contain fields, which are part of the respective seed definition. Unknown fields are rejected instead of being silently ignored.
The incus.yaml and update.yaml seeds are managed by Operations Center itself and are therefore not accepted as part of the provided configuration.
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 and to only contain fields, which are part of the respective seed definition. Unknown fields are rejected instead of being silently ignored.
The incus.yaml and update.yaml seeds are managed by Operations Center itself and are therefore not accepted as part of the provided configuration.
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"`
// 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"`
}
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 and to only contain fields, which are part of the respective seed definition. Unknown fields are rejected instead of being silently ignored.
The incus.yaml and update.yaml seeds are managed by Operations Center itself and are therefore not accepted as part of the provided configuration.
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 and to only contain fields, which are part of the respective seed definition. Unknown fields are rejected instead of being silently ignored.
The incus.yaml and update.yaml seeds are managed by Operations Center itself and are therefore not accepted as part of the provided configuration.
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.
type Warning ¶ added in v0.6.0
type Warning struct {
WarningPut `yaml:",inline"`
// Unique identifier of the warning.
// Example: a2095069-a527-4b2a-ab23-1739325dcac7
UUID uuid.UUID `json:"uuid" yaml:"uuid"`
// Scope of the warning.
Scope WarningScope `json:"scope" yaml:"scope"`
// Type of the warning.
// Example: Networks not imported
Type WarningType `json:"type" yaml:"type"`
// First time the warning occurred for the first time, that is, the timestamp
// when the respective warning has been seen or observed by Operations Center
// for the first time. RFC3339 format.
// Example: 2025-01-01T01:00:00Z
FirstOccurrence time.Time `json:"first_occurrence" yaml:"first_occurrence"`
// Most recent time the warning occurred, that is, the timestamp when the
// respective warning has been seen or observed by Operations Center for the
// last time. RFC3339 format.
// Example: 2025-01-01T01:00:00Z
LastOccurrence time.Time `json:"last_occurrence" yaml:"last_occurrence"`
// 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"`
// Messages associated with the warning type.
// Example: ["message one", "message two"]
Messages []string `json:"messages" yaml:"messages"`
// Number of times the warning has been seen.
// Example: 10
Count int `json:"count" yaml:"count"`
}
Warning represents a record of a warning.
swagger:model
type WarningPut ¶ added in v0.6.0
type WarningPut struct {
// Current acknowledgement status of the warning.
// Example: new
Status WarningStatus `json:"status" yaml:"status"`
}
WarningPut represents configurable properties of a warning.
swagger:model
type WarningScope ¶ added in v0.6.0
type WarningScope struct {
// Action scope of the warning.
// Example: sync
Scope string `json:"scope" yaml:"scope"`
// Entity the warning relates to.
// Example: source
EntityType string `json:"entity_type" yaml:"entity_type"`
// Name of the entity.
// Example: mySource
Entity string `json:"entity" yaml:"entity"`
}
WarningScope represents a scope for a warning.
type WarningStatus ¶ added in v0.6.0
type WarningStatus string
WarningStatus is the acknowledgement status of a warning.
const ( WarningStatusNew WarningStatus = "new" WarningStatusAcknowledged WarningStatus = "acknowledged" )
type WarningType ¶ added in v0.6.0
type WarningType string
WarningType represents a warning message group.
const ( // WarningTypeUnreachable indicates a server is unreachable. WarningTypeUnreachable WarningType = "Server unreachable" // WarningTypeClusterRollingUpdateNextAction indicates a warning during // evaluation of the next rolling cluster update action. WarningTypeClusterRollingUpdateNextAction WarningType = "Cluster update next action failed" // WarningTypeUpdateRefreshFailed indicates a warning happening during the // refresh of the updates. WarningTypeUpdateRefreshFailed WarningType = "Update refresh failed" // WarningTypeACMECertificateUpdateFailed indicates a warning happening during // the ACME certificate udpate. WarningTypeACMECertificateUpdateFailed WarningType = "ACME certificate update failed" // WarningTypeCertificateExpiration indicates that a certificate is soon to // expire. WarningTypeCertificateExpiration WarningType = "Certificate expiration" // WarningTypeCertificateInvalid indicates a warning happening during // validity check of certificates. WarningTypeCertificateInvalid WarningType = "Certificate invalid" // WarningTypeClusterInventoryResyncFailed indicates a warning during resync // of a cluster's inventory. WarningTypeClusterInventoryResyncFailed WarningType = "Inventory resync failed" // WarningTypeUpdateChannelMismatch indicates a warning where the update // channel reported by a server does not match the expected update channel // defined in Operations Center. WarningTypeUpdateChannelMismatch WarningType = "Update channel mismatch" // WarningTypeServerRegistrationScriptletFailed indicates a warning during // server registration where the registration scriptlet failed. WarningTypeServerRegistrationScriptletFailed WarningType = "Server registration scriptlet failed" // WarningTypeVersionDatailsMissing indicates a warning where version details // for a given update (OS or application) is missing. WarningTypeVersionDatailsMissing WarningType = "Update version details missing" )
Source Files
¶
- api_aggregate_gen.go
- auth.go
- certificate.go
- config_map.go
- error.go
- incus_image.go
- incus_image_source.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_bios_profile.go
- provisioning_channel.go
- provisioning_cluster.go
- provisioning_cluster_artifact.go
- provisioning_cluster_template.go
- provisioning_seed.go
- provisioning_server.go
- provisioning_server_bmc.go
- provisioning_server_deployment.go
- provisioning_token.go
- provisioning_update.go
- response.go
- status_code.go
- warning.go