io.systemd.MachineImage¶
| Property | Value |
|---|---|
| Go package | github.com/rossedman/sdvarlink/systemd/latest/machineimage |
| Socket | /run/systemd/machine/io.systemd.MachineImage |
| Available since | systemd v257 |
| Methods · types · errors | 6 · 2 · 3 |
Methods¶
List¶
streaming optional
List images
func (c *Client) List(ctx context.Context, in ListIn) (*ListOut, error)
func (c *Client) ListMore(ctx context.Context, in ListIn) iter.Seq2[*ListOut, error]
Parameters
| Field | Type | Description |
|---|---|---|
name |
?string |
If non-null the name of a image to report details on. |
acquireMetadata |
?AcquireMetadata |
If true the output will include image metadata fields such as 'machineInfo' and 'OSRelease'. |
allowInteractiveAuthentication |
?bool |
Controls whether interactive authentication (via polkit) shall be allowed. If unspecified defaults to false. |
Reply
| Field | Type | Description |
|---|---|---|
name |
string |
Name of the image |
path |
?string |
The file system path where image is stored |
type |
string |
The type of this image |
class |
string |
The class of this image |
readOnly |
bool |
Whether the image is read-only |
creationTimestamp |
?int |
The image creation timestamp |
modificationTimestamp |
?int |
The image creation timestamp |
usage |
?int |
The image creation timestamp |
usageExclusive |
?int |
The image disk usage (exclusive) |
limit |
?int |
The image disk usage (exclusive) |
limitExclusive |
?int |
The image disk usage limit (exclusive) |
hostname |
?string |
The hostname of the image |
machineId |
?string |
The machine ID of the image |
machineInfo |
?[]string |
Machine info information of an image. It contains an array of key value pairs read from the machine-info(5) file in the image. |
OSRelease |
?[]string |
OS release information of an image. It contains an array of key value pairs read from the os-release(5) file in the image. |
Update¶
Update image allowing to rename, toggle read-only flag, or set a limit
Parameters
| Field | Type | Description |
|---|---|---|
name |
string |
The name of an image |
allowInteractiveAuthentication |
?bool |
Controls whether interactive authentication (via polkit) shall be allowed. If unspecified defaults to false. |
newName |
?string |
If non-null the new name of the image |
readOnly |
?bool |
If non-null value of the read-only flag of the image |
limit |
?int |
If non-null value of image quota limit |
Clone¶
Clone image
Parameters
| Field | Type | Description |
|---|---|---|
name |
string |
The name of an image |
allowInteractiveAuthentication |
?bool |
Controls whether interactive authentication (via polkit) shall be allowed. If unspecified defaults to false. |
newName |
string |
The new name of the image |
readOnly |
?bool |
If non-null value of the read-only flag of the image |
Remove¶
Remove image
Parameters
| Field | Type | Description |
|---|---|---|
name |
string |
The name of an image |
allowInteractiveAuthentication |
?bool |
Controls whether interactive authentication (via polkit) shall be allowed. If unspecified defaults to false. |
SetPoolLimit¶
since v258
Sets an overall quota limit on the pool of images
Parameters
| Field | Type | Description |
|---|---|---|
allowInteractiveAuthentication |
?bool |
Controls whether interactive authentication (via polkit) shall be allowed. If unspecified defaults to false. |
limit |
int |
New image quota limit |
CleanPool¶
streaming (requires more) · since v258
Clean unused images depending on the specified mode. Note that it does not process vendon and host images.
Parameters
| Field | Type | Description |
|---|---|---|
allowInteractiveAuthentication |
?bool |
Controls whether interactive authentication (via polkit) shall be allowed. If unspecified defaults to false. |
mode |
CleanPoolMode |
Allows removing all or only hidden images |
Reply
| Field | Type | Description |
|---|---|---|
name |
string |
Image name |
usageExclusive |
?int |
The image disk usage (exclusive) |
Types¶
AcquireMetadata¶
A enum field allowing to gracefully get metadata
| Value | Description |
|---|---|
no |
Do not include metadata in the output |
yes |
Include metadata in the output |
graceful |
Include metadata in the output, but gracefully eat up errors |
CleanPoolMode¶
A enum field allowing to control what type of images are cleaned up
| Value | Description |
|---|---|
all |
Remove all unused images |
hidden |
Remove only hidden images |
Errors¶
| Error | Go type | Description |
|---|---|---|
NoSuchImage |
NoSuchImageError |
No matching image exists |
TooManyOperations |
TooManyOperationsError |
Too many ongoing background operations |
NotSupported |
NotSupportedError |
Requested operation is not supported |