incusplan

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ACL

type ACL struct {
	Name        string            `json:"name" yaml:"name"`
	Description string            `json:"description" yaml:"description"`
	Config      map[string]string `json:"config" yaml:"config"`
	Ingress     []ACLRule         `json:"ingress" yaml:"ingress"`
	Egress      []ACLRule         `json:"egress" yaml:"egress"`
}

type ACLRule

type ACLRule struct {
	Action          string `json:"action" yaml:"action"`
	State           string `json:"state" yaml:"state"`
	Description     string `json:"description" yaml:"description"`
	Source          string `json:"source,omitempty" yaml:"source,omitempty"`
	Destination     string `json:"destination,omitempty" yaml:"destination,omitempty"`
	Protocol        string `json:"protocol,omitempty" yaml:"protocol,omitempty"`
	SourcePort      string `json:"source_port,omitempty" yaml:"source_port,omitempty"`
	DestinationPort string `json:"destination_port,omitempty" yaml:"destination_port,omitempty"`
}

type HostFirewall

type HostFirewall struct {
	Backend         string             `json:"backend" yaml:"backend"`
	RequiredStatus  string             `json:"required_status" yaml:"required_status"`
	RequiredDefault string             `json:"required_default" yaml:"required_default"`
	Rules           []HostFirewallRule `json:"rules" yaml:"rules"`
}

type HostFirewallRule

type HostFirewallRule struct {
	Name string   `json:"name" yaml:"name"`
	Args []string `json:"args" yaml:"args"`
}

type Network

type Network struct {
	Name   string            `json:"name" yaml:"name"`
	Type   string            `json:"type" yaml:"type"`
	Config map[string]string `json:"config" yaml:"config"`
}

type Plan

type Plan struct {
	Version      string            `json:"version" yaml:"version"`
	APIAddress   string            `json:"api_address" yaml:"api_address"`
	ServerConfig map[string]string `json:"server_config" yaml:"server_config"`
	HostFirewall HostFirewall      `json:"host_firewall" yaml:"host_firewall"`
	Storage      Storage           `json:"storage" yaml:"storage"`
	Network      Network           `json:"network" yaml:"network"`
	Project      Project           `json:"project" yaml:"project"`
	ACL          ACL               `json:"acl" yaml:"acl"`
	// PoolACLs are the additional ACLs a pool receives on its own NIC. The
	// bridge ACL above is what every pool shares; anything wider than that is
	// declared by exactly one pool and reaches only that pool's workers.
	PoolACLs []ACL     `json:"pool_acls" yaml:"pool_acls"`
	Profiles []Profile `json:"profiles" yaml:"profiles"`
}

func Build

func Build(cfg config.Config, selectedPools []string) (Plan, error)

Build derives every Incus object from the versioned platform policy. The selected pools are explicit so a cold pilot cannot accidentally materialize a release or otherwise unrequested profile.

type Profile

type Profile struct {
	Name        string                       `json:"name" yaml:"name"`
	Description string                       `json:"description" yaml:"description"`
	Config      map[string]string            `json:"config" yaml:"config"`
	Devices     map[string]map[string]string `json:"devices" yaml:"devices"`
}

type Project

type Project struct {
	Name        string            `json:"name" yaml:"name"`
	Description string            `json:"description" yaml:"description"`
	Config      map[string]string `json:"config" yaml:"config"`
}

type Storage

type Storage struct {
	Name   string            `json:"name" yaml:"name"`
	Driver string            `json:"driver" yaml:"driver"`
	Config map[string]string `json:"config" yaml:"config"`
}

Jump to

Keyboard shortcuts

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