entity

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: Apache-2.0 Imports: 9 Imported by: 7

Documentation

Overview

Package entity defines types for the MAAS API endpoints' return types.

Each endpoint returns JSON that describes the object it represents. For example, GETting the Subnets endpoint will return an array of Subnet, while GETting the Subnet endpoint (ie subnets/<subnet_id>) will return one Subnet.

Some endpoints expose operations that return metadata about the object, such as as Subnet's GetStatistics(), which contains statistics about the subnet, but does not actually describe the subnet: these alternative types can be found in subpackages named after the endpoint.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorisationToken

type AuthorisationToken struct {
	Name        string `json:"name,omitempty"`
	TokenKey    string `json:"token_key,omitempty"`
	TokenSecret string `json:"token_secret,omitempty"`
	ConsumerKey string `json:"consumer_key,omitempty"`
}

AuthorisationToken represents user account authorisation Token

type AuthorisationTokenListItem

type AuthorisationTokenListItem struct {
	Name  string `json:"name,omitempty"`
	Token string `json:"token,omitempty"`
}

AuthorisationTokenListItem represents user account authorisation token in list API

type BCache

type BCache struct {
	HumanSize     string         `json:"human_size,omitempty"`
	UUID          string         `json:"uuid,omitempty"`
	Name          string         `json:"name,omitempty"`
	SystemID      string         `json:"system_id"`
	CacheMode     string         `json:"cache_mode,omitempty"`
	ResourceURI   string         `json:"resource_uri,omitempty"`
	VirtualDevice BlockDevice    `json:"virtual_device,omitempty"`
	BackingDevice BlockDevice    `json:"backing_device,omitempty"`
	CacheSet      BCacheCacheSet `json:"cache_set"`
	ID            int            `json:"id,omitempty"`
	Size          int64          `json:"size,omitempty"`
}

type BCacheCacheSet

type BCacheCacheSet struct {
	Name        string      `json:"name:omitempty"`
	SystemID    string      `json:"system_id,omitempty"`
	ResourceURI string      `json:"resource_uri,omitempty"`
	CacheDevice BlockDevice `json:"cache_device,omitempty"`
	ID          int         `json:"id,omitempty"`
}

type BCacheCacheSetParams

type BCacheCacheSetParams struct {
	CacheDevice    string `url:"cache_device,omitempty"`
	CachePartition string `url:"cache_partition,omitempty"`
}

type BCacheParams

type BCacheParams struct {
	Name             string `url:"name,omitempty"`
	UUID             string `url:"uuid,omitempty"`
	CacheSet         string `url:"cache_set,omitempty"`
	BackingDevice    string `url:"backing_device,omitempty"`
	BackingPartition string `url:"backing_partition,omitempty"`
	CacheMode        string `url:"cache_mode,omitempty"`
}

type BlockDevice

type BlockDevice struct {
	Filesystem         PartitionFileSystem    `json:"filesystem,omitempty"`
	Path               string                 `json:"path,omitempty"`
	Model              string                 `json:"model,omitempty"`
	ResourceURI        string                 `json:"resource_uri,omitempty"`
	PartitionTableType string                 `json:"partition_table_type,omitempty"`
	UUID               string                 `json:"uuid,omitempty"`
	Serial             string                 `json:"serial,omitempty"`
	IDPath             string                 `json:"id_path,omitempty"`
	UsedFor            string                 `json:"used_for,omitempty"`
	FirmwareVersion    string                 `json:"firmware_version,omitempty"`
	SystemID           string                 `json:"system_id,omitempty"`
	StoragePool        string                 `json:"storage_pool,omitempty"`
	Type               string                 `json:"type,omitempty"`
	Name               string                 `json:"name,omitempty"`
	Partitions         []BlockDevicePartition `json:"partitions,omitempty"`
	Tags               []string               `json:"tags,omitempty"`
	Size               int64                  `json:"size,omitempty"`
	ID                 int                    `json:"id,omitempty"`
	BlockSize          int                    `json:"block_size,omitempty"`
	UsedSize           int64                  `json:"used_size,omitempty"`
	AvailableSize      int64                  `json:"available_size,omitempty"`
	NUMANode           int                    `json:"numa_node,omitempty"`
}

BlockDevice represents the MAAS BlockDevice endpoint.

type BlockDeviceParams

type BlockDeviceParams struct {
	Name      string `url:"name,omitempty"`
	UUID      string `url:"uuid,omitempty"`
	Model     string `url:"model,omitempty"`
	Serial    string `url:"serial,omitempty"`
	IDPath    string `url:"id_path,omitempty"`
	Size      int64  `url:"size,omitempty"`
	BlockSize int    `url:"block_size,omitempty"`
}

type BlockDevicePartition

type BlockDevicePartition struct {
	FileSystem  PartitionFileSystem `json:"filesystem"`
	UUID        string              `json:"uuid"`
	SystemID    string              `json:"system_id"`
	UsedFor     string              `json:"used_for,omitempty"`
	Type        string              `json:"type"`
	Path        string              `json:"path"`
	ResourceURI string              `json:"resource_uri"`
	Tags        []string            `json:"tags,omitempty"`
	Size        int64               `json:"size"`
	ID          int                 `json:"id"`
	DeviceID    int                 `json:"device_id"`
	Bootable    bool                `json:"bootable"`
}

BlockDevicePartition represents the MAAS block device partition endpoint.

type BlockDevicePartitionParams

type BlockDevicePartitionParams struct {
	UUID     string `url:"uuid,omitempty"`
	Size     int64  `url:"size,omitempty"`
	Bootable bool   `url:"bootable"`
}

type BootResource

type BootResource struct {
	Sets         map[string]BootResourceSet `json:"sets,omitempty"`
	Type         string                     `json:"type,omitempty"`
	Name         string                     `json:"name,omitempty"`
	Architecture string                     `json:"architecture,omitempty"`
	BaseImage    string                     `json:"base_image,omitempty"`
	ResourceURI  string                     `json:"resource_uri,omitempty"`
	LastDeployed string                     `json:"last_deployed,omitempty"`
	Subarches    string                     `json:"subarches,omitempty"`
	Title        string                     `json:"title,omitempty"`
	ID           int                        `json:"id,omitempty"`
}

type BootResourceParams

type BootResourceParams struct {
	Name         string `url:"name,omitempty"`
	Architecture string `url:"architecture,omitempty"`
	SHA256       string `url:"sha256,omitempty"`
	Size         string `url:"size,omitempty"`
	Title        string `url:"title,omitempty"`
	Filetype     string `url:"filetype,omitempty"`
	BaseImage    string `url:"base_image,omitempty"`
	Content      string `url:"content,omitempty"`
}

type BootResourceSet

type BootResourceSet struct {
	Files    map[string]BootResourceSetFile `json:"files,omitempty"`
	Version  string                         `json:"version,omitempty"`
	Label    string                         `json:"label,omitempty"`
	Size     int64                          `json:"size,omitempty"`
	Complete bool                           `json:"complete,omitempty"`
}

BootResourceSet represents a BootResource's "set". This type should not be used directly.

type BootResourceSetFile

type BootResourceSetFile struct {
	Filename string `json:"filename,omitempty"`
	Filetype string `json:"filetype,omitempty"`
	SHA256   string `json:"sha256,omitempty"`
	Size     int64  `json:"size,omitempty"`
	Complete bool   `json:"complete,omitempty"`
}

BootResourceSetFile represents a BootResource set's "file". This type should not be used directly.

type BootResourcesReadParams

type BootResourcesReadParams struct {
	Type string `json:"type,omitempty"`
}

type BootSource

type BootSource struct {
	Created         string `json:"created,omitempty"`
	Updated         string `json:"updated,omitempty"`
	URL             string `json:"url,omitempty"`
	KeyringFilename string `json:"keyring_filename,omitempty"`
	KeyringData     string `json:"keyring_data,omitempty"`
	ResourceURI     string `json:"resource_uri,omitempty"`
	ID              int    `json:"id,omitempty"`
}

type BootSourceParams

type BootSourceParams struct {
	KeyringData     string `url:"keyring_data,omitempty"`
	KeyringFilename string `url:"keyring_filename,omitempty"`
	URL             string `url:"url,omitempty"`
}

type BootSourceSelection

type BootSourceSelection struct {
	OS           string   `json:"os,omitempty"`
	Release      string   `json:"release,omitempty"`
	ResourceURI  string   `json:"resource_uri,omitempty"`
	Arches       []string `json:"arches,omitempty"`
	Subarches    []string `json:"subarches,omitempty"`
	Labels       []string `json:"labels,omitempty"`
	ID           int      `json:"id,omitempty"`
	BootSourceID int      `json:"boot_source_id,omitempty"`
}

type BootSourceSelectionParams

type BootSourceSelectionParams struct {
	OS        string   `url:"os,omitempty"`
	Release   string   `url:"release,omitempty"`
	Arches    []string `url:"arches,omitempty"`
	Subarches []string `url:"subarches,omitempty"`
	Labels    []string `url:"labels,omitempty"`
}

type DNSResource

type DNSResource struct {
	FQDN            string              `json:"fqdn,omitempty"`
	ResourceURI     string              `json:"resource_uri,omitempty"`
	IPAddresses     []IPAddress         `json:"ip_addresses,omitempty"`
	ResourceRecords []DNSResourceRecord `json:"resource_records,omitempty"`
	ID              int                 `json:"id,omitempty"`
	AddressTTL      int                 `json:"address_ttl,omitempty"`
}

type DNSResourceParams

type DNSResourceParams struct {
	FQDN        string `url:"fqdn,omitempty"`
	Name        string `url:"name,omitempty"`
	Domain      string `url:"domain,omitempty"`
	IPAddresses string `url:"ip_addresses,omitempty"`
	AddressTTL  int    `url:"address_ttl"`
}

type DNSResourceRecord

type DNSResourceRecord struct {
	RRType      string `json:"rrtype,omitempty"`
	RRData      string `json:"rrdata,omitempty"`
	FQDN        string `json:"fqdn,omitempty"`
	ResourceURI string `json:"resource_uri,omitempty"`
	ID          int    `json:"id,omitempty"`
	TTL         int    `json:"ttl,omitempty"`
}

type DNSResourceRecordParams

type DNSResourceRecordParams struct {
	FQDN   string `url:"fqdn,omitempty"`
	Name   string `url:"name,omitempty"`
	Domain string `url:"domain,omitempty"`
	RRType string `url:"rrtype,omitempty"`
	RRData string `url:"rrdata,omitempty"`
	TTL    int    `url:"ttl"`
}

type DNSResourceRecordsParams added in v0.7.0

type DNSResourceRecordsParams struct {
	Domain string `url:"domain,omitempty"`
	FQDN   string `url:"fqdn,omitempty"`
	Name   string `url:"name,omitempty"`
	RRType string `url:"rrtype,omitempty"`
}

type DNSResourcesParams added in v0.7.0

type DNSResourcesParams struct {
	Domain string `url:"domain,omitempty"`
	FQDN   string `url:"fqdn,omitempty"`
	Name   string `url:"name,omitempty"`
	RRType string `url:"rrtype,omitempty"`
	All    bool   `url:"all,omitempty"`
}

type Device

type Device struct {
	OwnerData           interface{}        `json:"owner_data,omitempty"`
	Zone                Zone               `json:"zone,omitempty"`
	FQDN                string             `json:"fqdn,omitempty"`
	Hostname            string             `json:"hostname,omitempty"`
	SystemID            string             `json:"system_id,omitempty"`
	Owner               string             `json:"owner,omitempty"`
	Description         string             `json:"description,omitempty"`
	Parent              string             `json:"parent,omitempty"`
	ResourceURI         string             `json:"resource_uri,omitempty"`
	NodeTypeName        string             `json:"node_type_name,omitempty"`
	WorkloadAnnotations map[string]string  `json:"workload_annotations,omitempty"`
	IPAddresses         []net.IP           `json:"ip_addresses,omitempty"`
	InterfaceSet        []NetworkInterface `json:"interface_set,omitempty"`
	TagNames            []string           `json:"tag_names,omitempty"`
	Domain              Domain             `json:"domain,omitempty"`
	NodeType            int                `json:"node_type,omitempty"`
	AddressTTL          int                `json:"address_ttl,omitempty"`
}

type DeviceCreateParams

type DeviceCreateParams struct {
	Hostname     string   `url:"hostname,omitempty"`
	Description  string   `url:"description,omitempty"`
	Domain       string   `url:"domain,omitempty"`
	Parent       string   `url:"parent,omitempty"`
	Zone         string   `url:"zone,omitempty"`
	MacAddresses []string `url:"mac_addresses,omitempty"`
}

type DeviceUpdateParams

type DeviceUpdateParams struct {
	Hostname    string `url:"hostname,omitempty"`
	Description string `url:"description,omitempty"`
	Domain      string `url:"domain,omitempty"`
	Parent      string `url:"parent,omitempty"`
	Zone        string `url:"zone,omitempty"`
}

type Discovery

type Discovery struct {
	DiscoveryID     string   `json:"discovery_id,omitempty"`
	IP              string   `json:"ip,omitempty"`
	MACAddress      string   `json:"mac_address,omitempty"`
	LastSeen        string   `json:"last_seen,omitempty"`
	Hostname        string   `json:"hostname,omitempty"`
	FabricName      string   `json:"fabric_name,omitempty"`
	Vid             string   `json:"vid,omitempty"`
	MacOrganization string   `json:"mac_organization,omitempty"`
	ResourceURI     string   `json:"resource_uri,omitempty"`
	Observer        Observer `json:"observer,omitempty"`
}

Discovery represents device discovery in MAAS

type DiscoveryClearParams

type DiscoveryClearParams struct {
	All        bool `url:"all,omitempty"`
	MDNS       bool `url:"mdns,omitempty"`
	Neighbours bool `url:"neighbours,omitempty"`
}

type Domain

type Domain struct {
	Name                string `json:"name,omitempty"`
	ResourceURI         string `json:"resource_uri,omitempty"`
	ID                  int    `json:"id,omitempty"`
	TTL                 int    `json:"ttl,omitempty"`
	ResourceRecordCount int    `json:"resource_record_count,omitempty"`
	Authoritative       bool   `json:"authoritative,omitempty"`
	IsDefault           bool   `json:"is_default,omitempty"`
}

Domain represents the MAAS Domain endpoint

type DomainParams

type DomainParams struct {
	Name          string `url:"name,omitempty"`
	TTL           int    `url:"ttl,omitempty"`
	Authoritative bool   `url:"authoritative"`
}

type Event

type Event struct {
	UserName    string         `json:"username,omitempty"`
	Node        string         `json:"node,omitempty"`
	Hostname    string         `json:"hostname,omitempty"`
	Created     string         `json:"created,omitempty"`
	Type        string         `json:"type,omitempty"`
	Description string         `json:"description,omitempty"`
	Level       event.LogLevel `json:"level,omitempty"`
	ID          int            `json:"id,omitempty"`
}

Event represents an event for MAAS node

type EventParams

type EventParams struct {
	Hostname   string         `url:"hostname,omitempty"`
	MACAddress string         `url:"mac_address,omitempty"`
	ID         string         `url:"id,omitempty"`
	Zone       string         `url:"zone,omitempty"`
	AgentName  string         `url:"agent_name,omitempty"`
	Limit      string         `url:"limit,omitempty"`
	Before     string         `url:"before,omitempty"`
	After      string         `url:"after,omitempty"`
	Owner      string         `url:"owner,omitempty"`
	Level      event.LogLevel `url:"level,omitempty"`
}

EventParams enumerates the parameters for the event get operation

type EventsResp

type EventsResp struct {
	NextURI string  `json:"next_uri,omitempty"`
	PrevURI string  `json:"prev_uri,omitempty"`
	Events  []Event `json:"events,omitempty"`
	Count   int     `json:"count,omitempty"`
}

EventsResp represents the MAAS Events endpoint

type Fabric

type Fabric struct {
	Name        string `json:"name,omitempty"`
	ClassType   string `json:"class_type,omitempty"`
	ResourceURI string `json:"resource_uri,omitempty"`
	VLANs       []VLAN `json:"vlans,omitempty"`
	ID          int    `json:"id,omitempty"`
}

type FabricParams

type FabricParams struct {
	Name        string `url:"name,omitempty"`
	Description string `url:"description,omitempty"`
	ClassType   string `url:"class_type,omitempty"`
}

type HardwareType

type HardwareType int
const (
	NODE HardwareType = iota
	CPU
	MEMORY
	STORAGE
	NETWORK
	GPU
)

HardwareType referring from MAAS server https://github.com/maas/maas/blob/deab73792a4fe839a2e84a926a6c728d510fc9ad/src/metadataserver/enum.py#L126

type IPAddress

type IPAddress struct {
	AllocTypeName string             `json:"alloc_type_name,omitempty"`
	Created       string             `json:"created,omitempty"`
	ResourceURI   string             `json:"resource_uri,omitempty"`
	Owner         User               `json:"owner,omitempty"`
	IP            net.IP             `json:"ip,omitempty"`
	InterfaceSet  []NetworkInterface `json:"interface_set,omitempty"`
	Subnet        Subnet             `json:"subnet,omitempty"`
	AllocType     int                `json:"alloc_type,omitempty"`
}

type IPAddressesParams

type IPAddressesParams struct {
	Subnet     string `url:"subnet,omitempty"`
	IP         string `url:"ip,omitempty"`
	Owner      string `url:"owner,omitempty"`
	All        bool   `url:"all,omitempty"`
	Discovered bool   `url:"discovered,omitempty"`
	Force      bool   `url:"force,omitempty"`
}

type IPRange

type IPRange struct {
	Type        string `json:"type"`
	Comment     string `json:"comment,omitempty"`
	ResourceURI string `json:"resource_uri"`
	User        User   `json:"user,omitempty"`
	StartIP     net.IP `json:"start_ip"`
	EndIP       net.IP `json:"end_ip"`
	Subnet      Subnet `json:"subnet"`
	ID          int    `json:"id"`
}

type IPRangeParams

type IPRangeParams struct {
	Type    string `url:"type"`
	Subnet  string `url:"subnet"`
	StartIP string `url:"start_ip"`
	EndIP   string `url:"end_ip"`
	Comment string `url:"comment,omitempty"`
}

type LicenseKey added in v0.13.0

type LicenseKey struct {
	DistroSeries string `json:"distro_series"`
	LicenseKey   string `json:"license_key"`
	OSystem      string `json:"osystem"`
	ResourceURI  string `json:"resource_uri"`
}

type LicenseKeyParams added in v0.13.0

type LicenseKeyParams struct {
	DistroSeries string `url:"distro_series"`
	LicenseKey   string `url:"license_key"`
	OSystem      string `url:"osystem"`
}

type LogicalVolumeParams added in v0.8.0

type LogicalVolumeParams struct {
	Name string `url:"name,omitempty"`
	UUID string `url:"uuid,omitempty"`
	Size int64  `url:"size,omitempty"`
}

LogicalVolumeParams enumerates the parameters for the logical volume operation.

type MAASTime

type MAASTime time.Time

MAASTime is a custom time format returned by MAAS API which is not RFC3339

func (MAASTime) String

func (t MAASTime) String() string

String returns MAASTime in RFC3339Nano format

func (*MAASTime) UnmarshalJSON

func (t *MAASTime) UnmarshalJSON(data []byte) error

type Machine

type Machine struct {
	HwNextSync              MAASTime                   `json:"next_sync,omitempty"`
	HwLastSync              MAASTime                   `json:"last_sync,omitempty"`
	OwnerData               interface{}                `json:"owner_data,omitempty"`
	HardwareInfo            map[string]string          `json:"hardware_info,omitempty"`
	WorkloadAnnotations     map[string]string          `json:"workload_annotations,omitempty"`
	VMHost                  *MachineVMHost             `json:"pod,omitempty"`
	OSystem                 string                     `json:"osystem,omitempty"`
	FQDN                    string                     `json:"fqdn,omitempty"`
	StatusName              string                     `json:"status_name,omitempty"`
	StatusMessage           string                     `json:"status_message,omitempty"`
	StatusAction            string                     `json:"status_action,omitempty"`
	Description             string                     `json:"description,omitempty"`
	CPUTestStatusName       string                     `json:"cpu_test_status_name,omitempty"`
	OtherTestStatusName     string                     `json:"other_test_status_name,omitempty"`
	Hostname                string                     `json:"hostname,omitempty"`
	ResourceURI             string                     `json:"resource_uri,omitempty"`
	Architecture            string                     `json:"architecture,omitempty"`
	PowerType               string                     `json:"power_type,omitempty"`
	MemoryTestStatusName    string                     `json:"memory_test_status_name,omitempty"`
	PowerState              string                     `json:"power_state,omitempty"`
	DistroSeries            string                     `json:"distro_series,omitempty"`
	MinHWEKernel            string                     `json:"min_hwe_kernel,omitempty"`
	CommissioningStatusName string                     `json:"commissioning_status_name,omitempty"`
	SystemID                string                     `json:"system_id,omitempty"`
	NodeTypeName            string                     `json:"node_type_name,omitempty"`
	StorageTestStatusName   string                     `json:"storage_test_status_name,omitempty"`
	Owner                   string                     `json:"owner,omitempty"`
	HWEKernel               string                     `json:"hwe_kernel,omitempty"`
	TestingStatusName       string                     `json:"testing_status_name,omitempty"`
	Version                 string                     `json:"version,omitempty"`
	BiosBootMethod          string                     `json:"bios_boot_method,omitempty"`
	HardwareUUID            string                     `json:"hardware_uuid,omitempty"`
	InterfaceTestStatusName string                     `json:"interface_test_status_name,omitempty"`
	NetworkTestStatusName   string                     `json:"network_test_status_name,omitempty"`
	Pool                    ResourcePool               `json:"pool,omitempty"`
	Zone                    Zone                       `json:"zone,omitempty"`
	SpecialFilesystems      []MachineSpecialFilesystem `json:"special_filesystems,omitempty"`
	VirtualBlockDeviceSet   []BlockDevice              `json:"virtualblockdevice_set,omitempty"`
	ISCSIBlockDeviceSet     []BlockDevice              `json:"iscsiblockdevice_set,omitempty"`
	ServiceSet              []MachineServiceSet        `json:"service_set,omitempty"`
	PhysicalBlockDeviceSet  []BlockDevice              `json:"physicalblockdevice_set,omitempty"`
	TagNames                []string                   `json:"tag_names,omitempty"`
	RAIDs                   []MachineRAID              `json:"raids,omitempty"`
	IPAddresses             []net.IP                   `json:"ip_addresses,omitempty"`
	BCaches                 []MachineBCache            `json:"bcaches,omitempty"`
	InterfaceSet            []NetworkInterface         `json:"interface_set,omitempty"`
	VolumeGroups            []MachineVolumeGroup       `json:"volume_groups,omitempty"`
	CacheSets               []MachineCacheSet          `json:"cache_sets,omitempty"`
	BlockDeviceSet          []BlockDevice              `json:"blockdevice_set,omitempty"`
	NUMANodeSet             []NUMANode                 `json:"numanode_set,omitempty"`
	DefaultGateways         struct {
		IPv4 struct {
			GatewayIP net.IP `json:"gateway_ip,omitempty"`
			LinkID    int    `json:"link_id,omitempty"`
		} `json:"ipv4,omitempty"`
		IPv6 struct {
			GatewayIP net.IP `json:"gateway_ip,omitempty"`
			LinkID    int    `json:"link_id,omitempty"`
		} `json:"ipv6,omitempty"`
	} `json:"default_gateways,omitempty"`
	Domain                       Domain           `json:"domain,omitempty"`
	BootDisk                     BlockDevice      `json:"boot_disk,omitempty"`
	BootInterface                NetworkInterface `json:"boot_interface,omitempty"`
	CurrentTestingResultID       int              `json:"current_testing_result_id,omitempty"`
	Memory                       int64            `json:"memory,omitempty"`
	NodeType                     int              `json:"node_type,omitempty"`
	HwSyncInterval               int              `json:"sync_interval,omitempty"`
	CPUTestStatus                int              `json:"cpu_test_status,omitempty"`
	AddressTTL                   int              `json:"address_ttl,omitempty"`
	Storage                      float64          `json:"storage,omitempty"`
	CPUSpeed                     int              `json:"cpu_speed,omitempty"`
	CPUCount                     int              `json:"cpu_count,omitempty"`
	Status                       node.Status      `json:"status,omitempty"`
	CurrentInstallationResultID  int              `json:"current_installation_result_id,omitempty"`
	CurrentCommissioningResultID int              `json:"current_commissioning_result_id,omitempty"`
	CommissioningStatus          int              `json:"commissioning_status,omitempty"`
	OtherTestStatus              int              `json:"other_test_status,omitempty"`
	TestingStatus                int              `json:"testing_status,omitempty"`
	InterfaceTestStatus          int              `json:"interface_test_status,omitempty"`
	NetworkTestStatus            int              `json:"network_test_status,omitempty"`
	StorageTestStatus            int              `json:"storage_test_status,omitempty"`
	SwapSize                     int64            `json:"swap_size,omitempty"`
	MemoryTestStatus             int              `json:"memory_test_status,omitempty"`
	EnableHwSync                 bool             `json:"enable_hw_sync,omitempty"`
	DisableIPv4                  bool             `json:"disable_ipv4,omitempty"`
	Netboot                      bool             `json:"netboot,omitempty"`
	Locked                       bool             `json:"locked,omitempty"`
	EphemeralDeploy              bool             `json:"ephemeral_deploy,omitempty"`
}

Machine represents the MAAS Machine endpoint.

func (*Machine) UnmarshalJSON

func (m *Machine) UnmarshalJSON(data []byte) error

type MachineAllocateParams

type MachineAllocateParams struct {
	AgentName        string   `url:"agent_name,omitempty"`
	SystemID         string   `url:"system_id,omitempty"`
	Pool             string   `url:"pool,omitempty"`
	Zone             string   `url:"zone,omitempty"`
	Comment          string   `url:"comment,omitempty"`
	Interfaces       string   `url:"interfaces,omitempty"`
	NotVMHostType    string   `url:"not_pod_type,omitempty"`
	VMHostType       string   `url:"pod_type,omitempty"`
	NotVMHost        string   `url:"not_pod,omitempty"`
	VMHost           string   `url:"pod,omitempty"`
	Arch             string   `url:"arch,omitempty"`
	Name             string   `url:"name,omitempty"`
	NotFabrics       []string `url:"not_fabrics,omitempty"`
	Tags             []string `url:"tags,omitempty"`
	NotInPool        []string `url:"not_in_pool,omitempty"`
	NotInZone        []string `url:"not_in_zone,omitempty"`
	FabricClasses    []string `url:"fabric_classes,omitempty"`
	NotTags          []string `url:"not_tags,omitempty"`
	Fabrics          []string `url:"fabrics,omitempty"`
	Storage          []string `url:"storage,omitempty"`
	NotSubnets       []string `url:"not_subnets,omitempty"`
	NotFabricClasses []string `url:"not_fabric_classes,omitempty"`
	Subnets          []string `url:"subnets,omitempty"`
	CPUCount         int      `url:"cpu_count,omitempty"`
	Mem              int64    `url:"mem,omitempty"`
	BridgeFD         int      `url:"bridge_fd,omitempty"`
	BridgeAll        bool     `url:"bridge_all,omitempty"`
	BridgeSTP        bool     `url:"bridge_stp,omitempty"`
	DryRun           bool     `url:"dry_run,omitempty"`
	Verbose          bool     `url:"verbose,omitempty"`
}

MachineAllocateParams enumerates the options for the allocate operation.

type MachineBCache

type MachineBCache struct {
	SystemID   string `json:"system_id,omitempty"`
	ID         int    `json:"id,omitempty"`
	Incomplete bool   `json:"__incomplete__,omitempty"` //nolint:tagliatelle // MAAS returns this field intentionally
}

MachineBCache represents a Machine's "bcaches" list item. This type should not be used directly.

type MachineCacheSet

type MachineCacheSet struct {
	SystemID   string `json:"system_id,omitempty"`
	ID         int    `json:"id,omitempty"`
	Incomplete bool   `json:"__incomplete__,omitempty"` //nolint:tagliatelle // MAAS returns this field intentionally
}

MachineCacheSet represents a Machine's "cache_sets" list item. This type should not be used directly.

type MachineCommissionParams

type MachineCommissionParams struct {
	ScriptParams         map[string]interface{} `url:"-"`
	CommissioningScripts string                 `url:"commissioning_scripts,omitempty"`
	TestingScripts       string                 `url:"testing_scripts,omitempty"`
	EnableSSH            bool                   `url:"enable_ssh,omitempty"`
	SkipBMCConfig        bool                   `url:"skip_bmc_config,omitempty"`
	SkipNetworking       bool                   `url:"skip_networking,omitempty"`
	SkipStorage          bool                   `url:"skip_storage,omitempty"`
}

MachineCommissionParams enumerates the parameters for the commission operation

type MachineCreateParams added in v0.18.0

type MachineCreateParams struct {
	ScriptParams         map[string]interface{} `url:"-"`
	Commission           *bool                  `url:"commission,omitempty"`
	Domain               string                 `url:"domain,omitempty"`
	MinHWEKernel         string                 `url:"min_hwe_kernel,omitempty"`
	Hostname             string                 `url:"hostname,omitempty"`
	Description          string                 `url:"description,omitempty"`
	PowerType            string                 `url:"power_type,omitempty"`
	Pool                 string                 `url:"pool,omitempty"`
	Zone                 string                 `url:"zone,omitempty"`
	CommissioningScripts string                 `url:"commissioning_scripts,omitempty"`
	Architecture         string                 `url:"architecture,omitempty"`
	TestingScripts       string                 `url:"testing_scripts,omitempty"`
	MACAddresses         []string               `url:"mac_addresses,omitempty"`
	Memory               int64                  `url:"memory,omitempty"`
	SwapSize             int64                  `url:"swap_size,omitempty"`
	CPUCount             int                    `url:"cpu_count,omitempty"`
	SkipBMCConfig        bool                   `url:"skip_bmc_config,omitempty"`
	EnableSSH            bool                   `url:"enable_ssh,omitempty"`
	SkipNetworking       bool                   `url:"skip_networking,omitempty"`
	SkipStorage          bool                   `url:"skip_storage,omitempty"`
	IsDPU                bool                   `url:"is_dpu,omitempty"`
}

MachineCreateParams enumerates the parameters for the machine create operation

type MachineDeployParams

type MachineDeployParams struct {
	UserData        string `url:"user_data,omitempty"`
	DistroSeries    string `url:"distro_series,omitempty"`
	HWEKernel       string `url:"hwe_kernel,omitempty"`
	AgentName       string `url:"agent_name,omitempty"`
	Comment         string `url:"comment,omitempty"`
	BridgeFD        int    `url:"bridge_fd,omitempty"`
	BridgeAll       bool   `url:"bridge_all,omitempty"`
	BridgeSTP       bool   `url:"bridge_stp,omitempty"`
	InstallRackD    bool   `url:"install_rackd,omitempty"`
	InstallKVM      bool   `url:"install_kvm,omitempty"`
	RegisterVMHost  bool   `url:"register_vmhost,omitempty"`
	EnableHwSync    bool   `url:"enable_hw_sync,omitempty"`
	EphemeralDeploy bool   `url:"ephemeral_deploy,omitempty"`
}

MachineDeployParams enumerates the parameters for the deploy operation

type MachineDetails

type MachineDetails NodeDetails

MachineDetails represent the MAAS machine details

type MachinePowerOffParams

type MachinePowerOffParams NodePowerOffParams

MachinePowerOffParams enumerates the parameters for the machine power off operation

type MachinePowerOnParams

type MachinePowerOnParams NodePowerOnParams

MachinePowerOnParams enumerates the parameters for the machine power on operation UserData should be Base64-encoded data

type MachinePowerState

type MachinePowerState NodePowerState

MachinePowerState represent current machines power state

type MachineRAID

type MachineRAID struct {
	SystemID   string `json:"system_id,omitempty"`
	ID         int    `json:"id,omitempty"`
	Incomplete bool   `json:"__incomplete__,omitempty"` //nolint:tagliatelle // MAAS returns this field intentionally
}

MachineRAID represents a Machine's "raids" list item. This type should not be used directly.

type MachineReleaseParams

type MachineReleaseParams struct {
	Comment     string `url:"comment,omitempty"`
	Scripts     string `url:"scripts,omitempty"`
	Erase       bool   `url:"erase,omitempty"`
	Force       bool   `url:"force,omitempty"`
	QuickErase  bool   `url:"quick_erase,omitempty"`
	SecureErase bool   `url:"secure_erase,omitempty"`
}

MachineReleaseParams enumerates the parameters for the release operation. `Scripts` is only available for MAAS versions 3.5 and later.

type MachineServiceSet

type MachineServiceSet struct {
	Name       string `json:"name,omitempty"`
	Status     string `json:"status,omitempty"`
	StatusInfo string `json:"status_info,omitempty"`
}

MachineServiceSet represents a Machine's "service_set". This type should not be used directly.

type MachineSpecialFilesystem

type MachineSpecialFilesystem struct {
	FSType       string `json:"fstype,omitempty"`
	Label        string `json:"label,omitempty"`
	UUID         string `json:"uuid,omitempty"`
	MountPoint   string `json:"mount_point,omitempty"`
	MountOptions string `json:"mount_options,omitempty"`
}

MachineSpecialFilesystem represents a Machine's "special_filesystems" list item. This type should not be used directly.

type MachineToken

type MachineToken struct {
	TokenKey    string `json:"token_key,omitempty"`
	TokenSecret string `json:"token_secret,omitempty"`
	ConsumerKey string `json:"consumer_key,omitempty"`
}

MachineToken represents Machine token

type MachineUpdateParams added in v0.18.0

type MachineUpdateParams struct {
	Domain                   string   `url:"domain,omitempty"`
	Commission               *bool    `url:"commission,omitempty"`
	MinHWEKernel             *string  `url:"min_hwe_kernel,omitempty"`
	Architecture             string   `url:"architecture,omitempty"`
	Hostname                 string   `url:"hostname,omitempty"`
	Description              string   `url:"description,omitempty"`
	PowerType                string   `url:"power_type,omitempty"`
	Pool                     string   `url:"pool,omitempty"`
	Zone                     string   `url:"zone,omitempty"`
	MACAddresses             []string `url:"mac_addresses,omitempty"`
	Memory                   int64    `url:"memory,omitempty"`
	SwapSize                 int64    `url:"swap_size,omitempty"`
	CPUCount                 int      `url:"cpu_count,omitempty"`
	PowerParametersSkipCheck bool     `url:"power_parameters_skip_check,omitempty"`
}

MachineUpdateParams enumerates the parameters for the machine update operation

type MachineVMHost added in v0.8.0

type MachineVMHost struct {
	Name        string `json:"name,omitempty"`
	ResourceURI string `json:"resource_uri,omitempty"`
	ID          int    `json:"id,omitempty"`
}

MachineVMHost represents a Machine's "pod" item. This type should not be used directly.

type MachineVolumeGroup

type MachineVolumeGroup struct {
	SystemID   string `json:"system_id,omitempty"`
	ID         int    `json:"id,omitempty"`
	Incomplete bool   `json:"__incomplete__,omitempty"` //nolint:tagliatelle // MAAS returns this field intentionally
}

MachineVolumeGroup represents a Machine's "volume_groups" list item. This type should not be used directly.

type MachinesParams

type MachinesParams NodeGetParams

MachinesParams enumerates the parameters for the get machines operation

type NUMANode

type NUMANode struct {
	HugepagesSet []NUMANodeHugepages `json:"hugepages_set,omitempty"`
	Cores        []int               `json:"cores,omitempty"`
	Index        int                 `json:"index,omitempty"`
	Memory       int                 `json:"memory,omitempty"`
}

NUMANode represents the MAAS numa node referred from https://github.com/maas/maas/blob/deab73792a4fe839a2e84a926a6c728d510fc9ad/src/maasserver/api/machines.py#L110

type NUMANodeHugepages

type NUMANodeHugepages struct {
	PageSize int `json:"page_size,omitempty"`
	Total    int `json:"total,omitempty"`
}

NUMANodeHugepages represents the MAAS numa node hugepages referred from https://github.com/maas/maas/blob/deab73792a4fe839a2e84a926a6c728d510fc9ad/src/maasserver/api/machines.py#L108

type NetworkInterface

type NetworkInterface struct {
	Params          interface{}                    `json:"params,omitempty"`
	Name            string                         `json:"name,omitempty"`
	Product         string                         `json:"product,omitempty"`
	MACAddress      string                         `json:"mac_address,omitempty"`
	FirmwareVersion string                         `json:"firmware_version,omitempty"`
	Vendor          string                         `json:"vendor,omitempty"`
	Type            string                         `json:"type,omitempty"`
	SystemID        string                         `json:"system_id,omitempty"`
	ResourceURI     string                         `json:"resource_uri,omitempty"`
	Links           []NetworkInterfaceLink         `json:"links,omitempty"`
	Parents         []string                       `json:"parents,omitempty"`
	Children        []string                       `json:"children,omitempty"`
	Tags            []string                       `json:"tags,omitempty"`
	Discovered      []NetworkInterfaceDiscoveredIP `json:"discovered,omitempty"`
	VLAN            VLAN                           `json:"vlan,omitempty"`
	NUMANode        int                            `json:"numa_node,omitempty"`
	LinkSpeed       int                            `json:"link_speed,omitempty"`
	EffectiveMTU    int                            `json:"effective_mtu,omitempty"`
	SRIOVMaxVF      int                            `json:"sriov_max_vf,omitempty"`
	InterfaceSpeed  int                            `json:"interface_speed,omitempty"`
	ID              int                            `json:"id,omitempty"`
	Enabled         bool                           `json:"enabled,omitempty"`
	LinkConnected   bool                           `json:"link_connected,omitempty"`
}

NetworkInterface represents the MAAS Interface endpoint.

type NetworkInterfaceBondParams

type NetworkInterfaceBondParams struct {
	IPAddress          string `url:"ip_address,omitempty"`
	Tags               string `url:"tags,omitempty"`
	BondLACPRate       string `url:"bond_lacp_rate,omitempty"`
	BondMode           string `url:"bond_mode,omitempty"`
	Name               string `url:"name,omitempty"`
	MACAddress         string `url:"mac_address,omitempty"`
	BondXMitHashPolicy string `url:"bond_xmit_hash_policy,omitempty"`
	IPAssignment       string `url:"ip_assignment,omitempty"`
	Parents            []int  `url:"parents,omitempty"`
	InterfaceSpeed     int    `url:"interface_speed,omitempty"`
	LinkSpeed          int    `url:"link_speed,omitempty"`
	BondUpDelay        int    `url:"bond_updelay,omitempty"`
	MTU                int    `url:"mtu,omitempty"`
	BondNumberGratARP  int    `url:"bond_num_grat_arp,omitempty"`
	BondMiimon         int    `url:"bond_miimon,omitempty"`
	BondDownDelay      int    `url:"bond_downdelay,omitempty"`
	VLAN               int    `url:"vlan,omitempty"`
	AcceptRA           bool   `url:"accept_ra,omitempty"`
	LinkConnected      bool   `url:"link_connected,omitempty"`
}

NetworkInterfaceBondParams is the parameters for the NetworkInterfaces create_bond POST operation.

type NetworkInterfaceBridgeParams

type NetworkInterfaceBridgeParams struct {
	IPAssignment   string `url:"ip_assignment,omitempty"`
	MACAddress     string `url:"mac_address,omitempty"`
	Tags           string `url:"tags,omitempty"`
	BridgeType     string `url:"bridge_type,omitempty"`
	IPAddress      string `url:"ip_address,omitempty"`
	Name           string `url:"name,omitempty"`
	Parents        []int  `url:"parents,omitempty"`
	LinkSpeed      int    `url:"link_speed,omitempty"`
	MTU            int    `url:"mtu,omitempty"`
	BridgeFD       int    `url:"bridge_fd,omitempty"`
	InterfaceSpeed int    `url:"interface_speed,omitempty"`
	VLAN           int    `url:"vlan,omitempty"`
	AcceptRA       bool   `url:"accept_ra,omitempty"`
	LinkConnected  bool   `url:"link_connected,omitempty"`
	BridgeSTP      bool   `url:"bridge_stp,omitempty"`
}

NetworkInterfaceBridgeParams is the parameters for the NetworkInterfaces create_bridge POST operation.

type NetworkInterfaceDiscoveredIP

type NetworkInterfaceDiscoveredIP struct {
	IPAddress string `json:"ip_address,omitempty"`
	Subnet    Subnet `json:"subnet,omitempty"`
}

NetworkInterfaceDiscoveredIP is consumed by NetworkInterface{} and should not be used directly.

type NetworkInterfaceLink struct {
	IPAddress string `json:"ip_address,omitempty"`
	Mode      string `json:"mode,omitempty"`
	Subnet    Subnet `json:"subnet,omitempty"`
	ID        int    `json:"id,omitempty"`
}

NetworkInterfaceLink is consumed by NetworkInterface{} and should not be used directly.

type NetworkInterfaceLinkParams

type NetworkInterfaceLinkParams struct {
	IPAddress      string `url:"ip_address,omitempty"`
	Mode           string `url:"mode,omitempty"`
	Subnet         int    `url:"subnet,omitempty"`
	DefaultGateway bool   `url:"default_gateway"`
	Force          bool   `url:"force,omitempty"`
}

NetworkInterfaceLinkParams is used with NetworkInterface.LinkSubnet(). Mode must be one of (AUTO, DHCP, STATIC, LINK_UP). IPAddress is ignored unless mode is STATIC, and will be set automatically if empty. Force allows LINK_UP to be set when other links exist, allows links between different VLANs, and deletes all other links on the interface. DefaultGateway is ignored unless Mode is AUTO or STATIC. Note: You can parse an IP address into a net.IP via net.ParseIP(string).

type NetworkInterfacePhysicalParams

type NetworkInterfacePhysicalParams struct {
	Name           string `url:"name,omitempty"`
	IPAddress      string `url:"ip_address,omitempty"`
	IPAssignment   string `url:"ip_assignment,omitempty"`
	MACAddress     string `url:"mac_address,omitempty"`
	Tags           string `url:"tags,omitempty"`
	InterfaceSpeed int    `url:"interface_speed,omitempty"`
	LinkSpeed      int    `url:"link_speed,omitempty"`
	MTU            int    `url:"mtu,omitempty"`
	NUMANode       int    `url:"numa_node,omitempty"`
	VLAN           int    `url:"vlan,omitempty"`
	Enabled        bool   `url:"enabled,omitempty"`
	LinkConnected  bool   `url:"link_connected,omitempty"`
	AcceptRA       bool   `url:"accept_ra,omitempty"`
}

NetworkInterfacePhysicalParams is the parameters for the NetworkInterfaces create_physical POST operation.

type NetworkInterfaceUpdateParams

type NetworkInterfaceUpdateParams struct {
	BridgeType         string `url:"bridge_type,omitempty"`
	Tags               string `url:"tags,omitempty"`
	BondLACPRate       string `url:"bond_lacp_rate,omitempty"`
	BondMode           string `url:"bond_mode,omitempty"`
	Name               string `url:"name,omitempty"`
	MACAddress         string `url:"mac_address,omitempty"`
	BondXMitHashPolicy string `url:"bond_xmit_hash_policy,omitempty"`
	IPAssignment       string `url:"ip_assignment,omitempty"`
	IPAddress          string `url:"ip_address,omitempty"`
	Parents            []int  `url:"parents,omitempty"`
	InterfaceSpeed     int    `url:"interface_speed,omitempty"`
	BondUpDelay        int    `url:"bond_updelay,omitempty"`
	VLAN               int    `url:"vlan,omitempty"`
	BondDownDelay      int    `url:"bond_downdelay,omitempty"`
	BridgeFD           int    `url:"bridge_fd,omitempty"`
	BondMiimon         int    `url:"bond_miimon,omitempty"`
	LinkSpeed          int    `url:"link_speed,omitempty"`
	NUMANode           int    `url:"numa_node,omitempty"`
	MTU                int    `url:"mtu,omitempty"`
	BondNumberGratARP  int    `url:"bond_num_grat_arp,omitempty"`
	Enabled            bool   `url:"enabled,omitempty"`
	LinkConnected      bool   `url:"link_connected,omitempty"`
	BridgeSTP          bool   `url:"bridge_stp,omitempty"`
	AcceptRA           bool   `url:"accept_ra,omitempty"`
}

NetworkInterfaceUpdateParams is the parameters for the NetworkInterfaces update_bond POST operation.

type NetworkInterfaceVLANParams

type NetworkInterfaceVLANParams struct {
	IPAddress      string `url:"ip_address,omitempty"`
	IPAssignment   string `url:"ip_assignment,omitempty"`
	Name           string `url:"name,omitempty"`
	Tags           string `url:"tags,omitempty"`
	Parents        []int  `url:"parents,omitempty"`
	InterfaceSpeed int    `url:"interface_speed,omitempty"`
	LinkSpeed      int    `url:"link_speed,omitempty"`
	MTU            int    `url:"mtu,omitempty"`
	VLAN           int    `url:"vlan,omitempty"`
	AcceptRA       bool   `url:"accept_ra,omitempty"`
	LinkConnected  bool   `url:"link_connected,omitempty"`
}

NetworkInterfaceVLANParams is the parameters for the NetworkInterfaces create_vlan POST operation.

type Node

type Node Machine

Node represents the MAAS Node endpoint.

type NodeDetails

type NodeDetails struct {
	LLDP string `json:"lldp,omitempty"`
	LSHW string `json:"lshw,omitempty"`
}

NodeDetails represent the MAAS node details

type NodeDevice

type NodeDevice struct {
	SystemID                 string           `json:"system_id,omitempty"`
	VendorID                 string           `json:"vendor_id,omitempty"`
	ProductID                string           `json:"product_id,omitempty"`
	VendorName               string           `json:"vendor_name,omitempty"`
	ProductName              string           `json:"product_name,omitempty"`
	CommissioningDriver      string           `json:"commissioning_driver,omitempty"`
	PCIAddress               string           `json:"pci_address,omitempty"`
	BusName                  string           `json:"bus_name,omitempty"`
	HardwareTypeName         string           `json:"hardware_type_name,omitempty"`
	ResourceURI              string           `json:"resource_uri,omitempty"`
	PhysicalBlockDevice      BlockDevice      `json:"physical_blockdevice,omitempty"`
	PhysicalNetworkInterface NetworkInterface `json:"physical_interface,omitempty"`
	Bus                      NodeDeviceBus    `json:"bus,omitempty"`
	HardwareType             HardwareType     `json:"hardware_type,omitempty"`
	BusNumber                int              `json:"bus_number,omitempty"`
	DeviceNumber             int              `json:"device_number,omitempty"`
	NumaNode                 int              `json:"numa_node,omitempty"`
	ID                       int              `json:"id,omitempty"`
}

NodeDevice represents a Node Device of a MAAS Node

type NodeDeviceBus

type NodeDeviceBus int

type NodeDeviceParams

type NodeDeviceParams struct {
	Bus                 string `url:"bus,omitempty"`
	HardwareType        string `url:"hardware_type,omitempty"`
	VendorID            string `url:"vendor_id,omitempty"`
	ProductID           string `url:"product_id,omitempty"`
	VendorName          string `url:"vendor_name,omitempty"`
	ProductName         string `url:"product_name,omitempty"`
	CommissioningDriver string `url:"commissioning_driver,omitempty"`
}

type NodeGetParams

type NodeGetParams struct {
	ID               []string `url:"id,omitempty"`
	NotID            []string `url:"not_id,omitempty"`
	Hostname         []string `url:"hostname,omitempty"`
	NotHostname      []string `url:"not_hostname,omitempty"`
	MACAddress       []string `url:"mac_address,omitempty"`
	Domain           []string `url:"domain,omitempty"`
	NotDomain        []string `url:"not_domain,omitempty"`
	AgentName        []string `url:"agent_name,omitempty"`
	NotAgentName     []string `url:"not_agent_name,omitempty"`
	Status           []string `url:"status,omitempty"`
	NotStatus        []string `url:"not_status,omitempty"`
	SimpleStatus     []string `url:"simple_status,omitempty"`
	NotSimpleStatus  []string `url:"not_simple_status,omitempty"`
	Arch             []string `url:"arch,omitempty"`
	NotArch          []string `url:"not_arch,omitempty"`
	Tags             []string `url:"tags,omitempty"`
	NotTags          []string `url:"not_tags,omitempty"`
	Fabrics          []string `url:"fabrics,omitempty"`
	NotFabrics       []string `url:"not_fabrics,omitempty"`
	FabricClasses    []string `url:"fabric_classes,omitempty"`
	NotFabricClasses []string `url:"not_fabric_classes,omitempty"`
	Subnets          []string `url:"subnets,omitempty"`
	NotSubnets       []string `url:"not_subnets,omitempty"`
	LinkSpeed        []int    `url:"link_speed,omitempty"`
	VLANs            []string `url:"vlans,omitempty"`
	NotVLANs         []string `url:"not_vlans,omitempty"`
	Zone             []string `url:"zone,omitempty"`
	NotInZone        []string `url:"not_in_zone,omitempty"`
	Pool             []string `url:"pool,omitempty"`
	NotInPool        []string `url:"not_in_pool,omitempty"`
	Storage          string   `url:"storage,omitempty"`
	Interfaces       string   `url:"devices,omitempty"`
	Devices          string   `url:"devices,omitempty"`
	CPUCount         []int    `url:"cpu_count,omitempty"`
	CPUSpeed         []int    `url:"cpu_speed,omitempty"`
	Mem              []int64  `url:"mem,omitempty"`
	Pod              []string `url:"pod,omitempty"`
	NotPod           []string `url:"not_pod,omitempty"`
	PodType          []string `url:"pod_type,omitempty"`
	NotPodType       []string `url:"not_pod_type,omitempty"`
	Owner            []string `url:"owner,omitempty"`
	NotOwner         []string `url:"not_owner,omitempty"`
	PowerState       []string `url:"power_state,omitempty"`
	NotPowerState    []string `url:"not_power_state,omitempty"`
}

NodeGetParams enumerates the parameters for the get nodes operation

type NodePowerOffParams

type NodePowerOffParams struct {
	Comment  string `url:"comment,omitempty"`
	StopMode string `url:"stop_mode,omitempty"`
}

NodePowerOffParams enumerates the parameters for the node power off operation

type NodePowerOnParams

type NodePowerOnParams struct {
	Comment  string `url:"comment,omitempty"`
	UserData string `url:"user_data,omitempty"`
}

NodePowerOnParams enumerates the parameters for the node power on operation UserData should be Base64-encoded data

type NodePowerState

type NodePowerState struct {
	State string `json:"state,omitempty"`
}

NodePowerState represent current node power state

type NodeResult

type NodeResult struct {
	SystemID    string           `json:"system_id,omitempty"`
	TypeName    string           `json:"type_name,omitempty"`
	StatusName  string           `json:"status_name,omitempty"`
	Started     string           `json:"started,omitempty"`
	Ended       string           `json:"ended,omitempty"`
	LastPing    string           `json:"last_ping,omitempty"`
	Runtime     string           `json:"runtime,omitempty"`
	ResourceURI string           `json:"resource_uri,omitempty"`
	Results     []NodeResultItem `json:"results,omitempty"`
	Status      ResultStatus     `json:"status,omitempty"`
	Type        ResultType       `json:"type,omitempty"`
	ID          int              `json:"id,omitempty"`
}

type NodeResultItem added in v0.16.0

type NodeResultItem struct {
	Created          string          `json:"created,omitempty"`
	Stderr           string          `json:"stderr,omitempty"`
	Stdout           string          `json:"stdout,omitempty"`
	Result           string          `json:"result,omitempty"`
	Name             string          `json:"name,omitempty"`
	Started          string          `json:"started,omitempty"`
	Ended            string          `json:"ended,omitempty"`
	Runtime          string          `json:"runtime,omitempty"`
	EstimatedRuntime string          `json:"estimated_runtime,omitempty"`
	Output           string          `json:"output,omitempty"`
	Updated          string          `json:"updated,omitempty"`
	StatusName       string          `json:"status_name,omitempty"`
	Parameters       json.RawMessage `json:"parameters,omitempty"`
	Starttime        json.RawMessage `json:"starttime,omitempty"`
	Endtime          json.RawMessage `json:"endtime,omitempty"`
	Status           ResultStatus    `json:"status,omitempty"`
	ID               int             `json:"id,omitempty"`
	ScriptID         int             `json:"script_id,omitempty"`
	ScriptRevisionID int             `json:"script_revision_id,omitempty"`
	ExitStatus       int             `json:"exit_status,omitempty"`
	Suppressed       bool            `json:"suppressed,omitempty"`
}

type NodeResultParams

type NodeResultParams struct {
	Filters       string       `url:"filters,omitempty"`
	Type          ResultType   `url:"type,omitempty"`
	HardwareType  HardwareType `url:"hardware_type,omitempty"`
	IncludeOutput bool         `url:"include_output,omitempty"`
}

type NodeScript

type NodeScript struct {
	Packages                  json.RawMessage        `json:"packages,omitempty"`
	Results                   json.RawMessage        `json:"results,omitempty"`
	Parameters                json.RawMessage        `json:"parameters,omitempty"`
	TypeName                  string                 `json:"type_name,omitempty"`
	HardwareTypeName          string                 `json:"hardware_type_name,omitempty"`
	ParallelName              string                 `json:"parallel_name,omitempty"`
	Timeout                   string                 `json:"timeout,omitempty"`
	ResourceURI               string                 `json:"resource_uri,omitempty"`
	Name                      string                 `json:"name,omitempty"`
	Description               string                 `json:"description,omitempty"`
	Title                     string                 `json:"title,omitempty"`
	ForHardware               []string               `json:"for_hardware,omitempty"`
	Tags                      []string               `json:"tags,omitempty"`
	History                   []NodeScriptHistory    `json:"history,omitempty"`
	HardwareType              NodeScriptHardwareType `json:"hardware_type,omitempty"`
	Type                      NodeScriptType         `json:"type,omitempty"`
	Parallel                  NodeScriptParallel     `json:"parallel,omitempty"`
	ID                        int                    `json:"id,omitempty"`
	ApplyConfiguredNetworking bool                   `json:"apply_configured_networking,omitempty"`
	Default                   bool                   `json:"default,omitempty"`
	Recommission              bool                   `json:"recommission,omitempty"`
	MayReboot                 bool                   `json:"may_reboot,omitempty"`
	Destructive               bool                   `json:"destructive,omitempty"`
}

NodeScript represents the MAAS Node Script endpoint.

type NodeScriptHardwareType

type NodeScriptHardwareType int
const (
	ScriptHardwareTypeNode NodeScriptHardwareType = iota
	ScriptHardwareTypeCPU
	ScriptHardwareTypeMemory
	ScriptHardwareTypeStorage
	ScriptHardwareTypeNetwork
	ScriptHardwareTypeGPU
)

NodeScriptHardwareType referring from MAAS server https://github.com/canonical/maas/blob/deab73792a4fe839a2e84a926a6c728d510fc9ad/src/metadataserver/enum.py#L126

type NodeScriptHistory

type NodeScriptHistory struct {
	Comment string `json:"comment,omitempty"`
	Created string `json:"created,omitempty"`
	Data    string `json:"data,omitempty"`
	ID      int    `json:"id,omitempty"`
}

NodeScriptHistory represents a NodeScript's "history" list item. This type should not be used directly.

type NodeScriptParallel

type NodeScriptParallel int
const (
	ScriptParallelDisabled NodeScriptParallel = iota
	ScriptParallelInstance
	ScriptParallelAny
)

NodeScriptParallel referring from MAAS server https://github.com/canonical/maas/blob/deab73792a4fe839a2e84a926a6c728d510fc9ad/src/metadataserver/enum.py#L146

type NodeScriptParams

type NodeScriptParams struct {
	ApplyConfiguredNetworking *bool  `url:"apply_configured_networking"`
	Destructive               *bool  `url:"destructive"`
	MayReboot                 *bool  `url:"may_reboot"`
	Recommission              *bool  `url:"recommission"`
	ScriptType                string `url:"script_type,omitempty"`
	HardwareType              string `url:"hardware_type,omitempty"`
	Parallel                  string `url:"parallel,omitempty"`
	Packages                  string `url:"packages,omitempty"`
	Timeout                   string `url:"timeout,omitempty"`
	Comment                   string `url:"comment,omitempty"`
	ForHardware               string `url:"for_hardware,omitempty"`
	Name                      string `url:"name,omitempty"`
	Title                     string `url:"title,omitempty"`
	Description               string `url:"description,omitempty"`
	Tags                      string `url:"tags,omitempty"`
}

type NodeScriptReadParams

type NodeScriptReadParams struct {
	Type          string `url:"type,omitempty"`
	HardwareType  string `url:"hardware_type,omitempty"`
	IncludeScript string `url:"include_script,omitempty"`
	Filters       string `url:"filters,omitempty"`
}

type NodeScriptType

type NodeScriptType int
const (
	ScriptTypeCommissioning NodeScriptType = iota

	ScriptTypeTesting
	ScriptTypeRelease
)

NodeScriptType referring from MAAS server https://github.com/canonical/maas/blob/deab73792a4fe839a2e84a926a6c728d510fc9ad/src/metadataserver/enum.py#L42

type Notification added in v0.14.0

type Notification struct {
	Context     map[string]interface{} `json:"context"`
	User        *User                  `json:"user"`
	ResourceURI string                 `json:"resource_uri"`
	Ident       string                 `json:"ident"`
	Message     string                 `json:"message"`
	Category    notification.Category  `json:"category"`
	ID          int                    `json:"id"`
	Users       bool                   `json:"users"`
	Admins      bool                   `json:"admins"`
	Dismissable bool                   `json:"dismissable"`
}

type NotificationParams added in v0.14.0

type NotificationParams struct {
	Context     map[string]interface{} `url:"context,omitempty"`
	Ident       string                 `url:"ident,omitempty"`
	Message     string                 `url:"message"`
	Category    notification.Category  `url:"category,omitempty"`
	User        int                    `url:"user,omitempty"`
	Users       bool                   `url:"users,omitempty"`
	Admins      bool                   `url:"admins,omitempty"`
	Dismissable bool                   `url:"dismissable,omitempty"`
}

type Observer

type Observer struct {
	SystemID      string `json:"system_id,omitempty"`
	Hostname      string `json:"hostname,omitempty"`
	InterfaceName string `json:"interface_name,omitempty"`
	InterfaceID   int    `json:"interface_id,omitempty"`
}

type PackageRepository

type PackageRepository struct {
	Name               string   `json:"name,omitempty"`
	URL                string   `json:"url,omitempty"`
	Key                string   `json:"key,omitempty"`
	ResourceURI        string   `json:"resource_uri,omitempty"`
	Distributions      []string `json:"distributions,omitempty"`
	DisabledPockets    []string `json:"disabled_pockets,omitempty"`
	DisabledComponents []string `json:"disabled_components,omitempty"`
	Components         []string `json:"components,omitempty"`
	Arches             []string `json:"arches,omitempty"`
	ID                 int      `json:"id,omitempty"`
	DisableSources     bool     `json:"disable_sources,omitempty"`
	Enabled            bool     `json:"enabled,omitempty"`
}

type PackageRepositoryParams

type PackageRepositoryParams struct {
	Enabled            *bool  `url:"enabled,omitempty"`
	Name               string `url:"name,omitempty"`
	URL                string `url:"url,omitempty"`
	Distributions      string `url:"distributions,omitempty"`
	DisabledPockets    string `url:"disabled_pockets,omitempty"`
	DisabledComponents string `url:"disabled_components,omitempty"`
	Components         string `url:"components,omitempty"`
	Arches             string `url:"arches,omitempty"`
	Key                string `url:"key,omitempty"`
	DisableSources     bool   `url:"disable_sources,omitempty"`
}

type PartitionFileSystem

type PartitionFileSystem struct {
	FSType       string `json:"fstype"`
	UUID         string `json:"uuid"`
	MountPoint   string `json:"mount_point"`
	Label        string `json:"label,omitempty"`
	MountOptions string `json:"mount_options,omitempty"`
}

type PowerType

type PowerType struct {
	DriverType      string            `json:"driver_type,omitempty"`
	Name            string            `json:"name,omitempty"`
	Description     string            `json:"description,omitempty"`
	Fields          []PowerTypeField  `json:"fields,omitempty"`
	MissingPackages []string          `json:"missing_packages,omitempty"`
	Chassis         bool              `json:"chassis,omitempty"`
	CanProbe        bool              `json:"can_probe,omitempty"`
	Queryable       bool              `json:"queryable,omitempty"`
	Defaults        PowerTypeDefaults `json:"defaults,omitempty"`
}

PowerType represents a Rack Controller's power type.

type PowerTypeDefaults

type PowerTypeDefaults struct {
	Cores   int   `json:"cores,omitempty"`
	Memory  int64 `json:"memory,omitempty"`
	Storage int64 `json:"storage,omitempty"`
}

PowerTypeDefaults represents a Rack Controller Power Type "defaults". This type should not be used directly.

type PowerTypeField

type PowerTypeField struct {
	Name      string     `json:"name,omitempty"`
	Label     string     `json:"label,omitempty"`
	FieldType string     `json:"field_type,omitempty"`
	Default   string     `json:"default,omitempty"`
	Scope     string     `json:"scope,omitempty"`
	Choices   [][]string `json:"choices,omitempty"`
	Required  bool       `json:"required,omitempty"`
	Secret    bool       `json:"secret,omitempty"`
}

PowerTypeField represents a Rack Controller Power Type "field". This type should not be used directly.

type RAID

type RAID struct {
	UUID          string       `json:"uuid,omitempty"`
	Name          string       `json:"name,omitempty"`
	Level         string       `json:"level,omitempty"`
	HumanSize     string       `json:"human_size,omitempty"`
	ResourceURI   string       `json:"resource_uri"`
	SystemID      string       `json:"system_id"`
	Devices       []RAIDDevice `json:"devices,omitempty"`
	SpareDevices  []RAIDDevice `json:"spare_devices,omitempty"`
	VirtualDevice BlockDevice  `json:"virtual_device,omitempty"`
	ID            int          `json:"id,omitempty"`
	Size          float64      `json:"size,omitempty"`
}

RAID represents the MAAS RAID endpoint. LP:2109708 - size field field is a float, not an int, for RAID-10

type RAIDCreateParams

type RAIDCreateParams struct {
	Name            string   `url:"name,omitempty"`
	UUID            string   `url:"uuid,omitempty"`
	Level           string   `url:"level,omitempty"`
	BlockDevices    []string `url:"block_devices,omitempty"`
	Partitions      []string `url:"partitions,omitempty"`
	SpareDevices    []string `url:"spare_devices,omitempty"`
	SparePartitions []string `url:"spare_partitions,omitempty"`
}

RAIDCreateParams enumerates the parameters for the RAID create operation

type RAIDDevice

type RAIDDevice struct {
	Filesystem         PartitionFileSystem    `json:"filesystem,omitempty"`
	Type               string                 `json:"type,omitempty"`
	Model              string                 `json:"model,omitempty"`
	ResourceURI        string                 `json:"resource_uri,omitempty"`
	Name               string                 `json:"name,omitempty"`
	Path               string                 `json:"path,omitempty"`
	Serial             string                 `json:"serial,omitempty"`
	IDPath             string                 `json:"id_path,omitempty"`
	UsedFor            string                 `json:"used_for,omitempty"`
	FirmwareVersion    string                 `json:"firmware_version,omitempty"`
	PartitionTableType string                 `json:"partition_table_type,omitempty"`
	StoragePool        string                 `json:"storage_pool,omitempty"`
	UUID               string                 `json:"uuid,omitempty"`
	SystemID           string                 `json:"system_id,omitempty"`
	Partitions         []BlockDevicePartition `json:"partitions,omitempty"`
	Tags               []string               `json:"tags,omitempty"`
	Size               int64                  `json:"size,omitempty"`
	ID                 int                    `json:"id,omitempty"`
	BlockSize          int                    `json:"block_size,omitempty"`
	DeviceID           int                    `json:"device_id,omitempty"`
	AvailableSize      int64                  `json:"available_size,omitempty"`
	NUMANode           int                    `json:"numa_node,omitempty"`
	UsedSize           int64                  `json:"used_size,omitempty"`
	Bootable           bool                   `json:"bootable,omitempty"`
}

RAIDDevice is a combination of a BlockDevice and BlockDevicePartition since a RAID can contain either at devices field

type RAIDUpdateParams

type RAIDUpdateParams struct {
	Name                  string   `url:"name,omitempty"`
	UUID                  string   `url:"uuid,omitempty"`
	AddBlockDevices       []string `url:"add_block_devices,omitempty"`
	AddPartitions         []string `url:"add_partitions,omitempty"`
	AddSpareDevices       []string `url:"add_spare_devices,omitempty"`
	AddSparePartitions    []string `url:"add_spare_partitions,omitempty"`
	RemoveBlockDevices    []string `url:"remove_block_devices,omitempty"`
	RemovePartitions      []string `url:"remove_partitions,omitempty"`
	RemoveSpareDevices    []string `url:"remove_spare_devices,omitempty"`
	RemoveSparePartitions []string `url:"remove_spare_partitions,omitempty"`
}

RAIDUpdateParams enumerates the parameters for the RAID update operation

type RackController

type RackController struct {
	HardwareInfo                 map[string]string   `json:"hardware_info,omitempty"`
	TestingStatusName            string              `json:"testing_status_name,omitempty"`
	Architecture                 string              `json:"architecture,omitempty"`
	Version                      string              `json:"version,omitempty"`
	FQDN                         string              `json:"fqdn,omitempty"`
	DistroSeries                 string              `json:"distro_series,omitempty"`
	OSystem                      string              `json:"osystem,omitempty"`
	StatusAction                 string              `json:"status_action,omitempty"`
	SystemID                     string              `json:"system_id,omitempty"`
	Description                  string              `json:"description,omitempty"`
	PowerType                    string              `json:"power_type,omitempty"`
	StorageTestStatusName        string              `json:"storage_test_status_name,omitempty"`
	ResourceURI                  string              `json:"resource_uri,omitempty"`
	PowerState                   string              `json:"power_state,omitempty"`
	HardwareUUID                 string              `json:"hardware_uuid,omitempty"`
	CommissioningStatusName      string              `json:"commissioning_status_name,omitempty"`
	CPUTestStatusName            string              `json:"cpu_test_status_name,omitempty"`
	InterfaceTestStatusName      string              `json:"interface_test_status_name,omitempty"`
	MemoryTestStatusName         string              `json:"memory_test_status_name,omitempty"`
	NetworkTestStatusName        string              `json:"network_test_status_name,omitempty"`
	OtherTestStatusName          string              `json:"other_test_status_name,omitempty"`
	NodeTypeName                 string              `json:"node_type_name,omitempty"`
	Hostname                     string              `json:"hostname,omitempty"`
	Zone                         Zone                `json:"zone,omitempty"`
	InterfaceSet                 []NetworkInterface  `json:"interface_set,omitempty"`
	IPAddresses                  []net.IP            `json:"ip_addresses,omitempty"`
	ServiceSet                   []MachineServiceSet `json:"service_set,omitempty"`
	TagNames                     []string            `json:"tag_names,omitempty"`
	Domain                       Domain              `json:"domain,omitempty"`
	TestingStatus                int                 `json:"testing_status,omitempty"`
	CurrentTestingResultID       int                 `json:"current_testing_result_id,omitempty"`
	CurrentCommissioningResultID int                 `json:"current_commissioning_result_id,omitempty"`
	Memory                       int64               `json:"memory,omitempty"`
	CPUCount                     int                 `json:"cpu_count,omitempty"`
	NodeType                     int                 `json:"node_type,omitempty"`
	CurrentInstallationResultID  int                 `json:"current_installation_result_id,omitempty"`
	SwapSize                     int64               `json:"swap_size,omitempty"`
	CommissioningStatus          int                 `json:"commissioning_status,omitempty"`
	CPUTestStatus                int                 `json:"cpu_test_status,omitempty"`
	InterfaceTestStatus          int                 `json:"interface_test_status,omitempty"`
	MemoryTestStatus             int                 `json:"memory_test_status,omitempty"`
	NetworkTestStatus            int                 `json:"network_test_status,omitempty"`
	OtherTestStatus              int                 `json:"other_test_status,omitempty"`
	StorageTestStatus            int                 `json:"storage_test_status,omitempty"`
	CPUSpeed                     int                 `json:"cpu_speed,omitempty"`
}

RackController represents the MAAS Rack Controller endpoint.

type RackControllerDetails

type RackControllerDetails NodeDetails

RackControllerDetails represent the MAAS rack controller details

type RackControllerParams

type RackControllerParams struct {
	Zone      string `url:"zone,omitempty"`
	Domain    string `url:"domain,omitempty"`
	PowerType string `url:"power_type,omitempty"`
}

RackControllerParams enumerates the parameters for the update rack controller operation

type RackControllerPowerOffParams

type RackControllerPowerOffParams NodePowerOffParams

RackControllerPowerOffParams enumerates the parameters for the rack controller power off operation

type RackControllerPowerOnParams

type RackControllerPowerOnParams NodePowerOnParams

RackControllerPowerOnParams enumerates the parameters for the rack controller power on operation UserData should be Base64-encoded data

type RackControllerPowerState

type RackControllerPowerState NodePowerState

RackControllerPowerState represent current rack controller's power state

type RackControllerSetZoneParams

type RackControllerSetZoneParams struct {
	Zone  string   `url:"zone,omitempty"`
	Nodes []string `url:"nodes,omitempty"`
}

RackControllerSetZoneParams enumerates the parameters for the rack controller set_zone operation

type RackControllersGetParams

type RackControllersGetParams NodeGetParams

RackControllersGetParams enumerates the parameters for the get rack controllers operation

type ReservedIP added in v0.20.0

type ReservedIP struct {
	Comment     string `json:"comment,omitempty"`
	IP          string `json:"ip,omitempty"`
	MACAddress  string `json:"mac_address,omitempty"`
	ResourceURI string `json:"resource_uri,omitempty"`
	Subnet      Subnet `json:"subnet,omitempty"`
	ID          int    `json:"id,omitempty"`
}

ReservedIP represents the MAAS Reserved IP endpoint

type ReservedIPCreateParams added in v0.20.0

type ReservedIPCreateParams struct {
	IP         string `url:"ip"`
	MACAddress string `url:"mac_address,omitempty"`
	Comment    string `url:"comment,omitempty"`
	Subnet     int    `url:"subnet,omitempty"`
}

type ReservedIPUpdateParams added in v0.20.0

type ReservedIPUpdateParams struct {
	Comment string `url:"comment"`
}

type ResourcePool

type ResourcePool struct {
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
	ResourceURI string `json:"resource_uri,omitempty"`
	ID          int    `json:"id,omitempty"`
}

ResourcePool represents the MAAS ResourcePool endpoint

type ResourcePoolParams

type ResourcePoolParams struct {
	Name        string `url:"name,omitempty"`
	Description string `url:"description,omitempty"`
}

type ResultStatus added in v0.16.0

type ResultStatus int

ResultStatus referring from MAAS server https://github.com/maas/maas/blob/master/src/metadataserver/enum.py#L73

const (
	PENDING ResultStatus = iota
	RUNNING
	PASSED
	FAILED
	TIMEDOUT
	ABORTED
	DEGRADED
	INSTALLING
	FAILEDINSTALLING
	SKIPPED
	APPLYINGNETCONF
	FAILEDAPPLYINGNETCONF
)

type ResultType

type ResultType int

ResultType referring from MAAS server https://github.com/maas/maas/blob/master/src/metadataserver/enum.py#L58

const (
	COMMISSIONING ResultType = iota
	INSTALLATION
	TESTING
	RELEASE
)

type SSHKey

type SSHKey struct {
	Key         string `json:"key,omitempty"`
	Keysource   string `json:"keysource,omitempty"`
	ResourceURI string `json:"resource_uri,omitempty"`
	ID          int    `json:"id,omitempty"`
}

type SSLKey

type SSLKey struct {
	Key         string `json:"key,omitempty"`
	ResourceURI string `json:"resource_uri,omitempty"`
	ID          int    `json:"id,omitempty"`
}

type Space

type Space struct {
	Name        string   `json:"name,omitempty"`
	ResourceURI string   `json:"resource_uri,omitempty"`
	Subnets     []Subnet `json:"subnets,omitempty"`
	VLANs       []VLAN   `json:"vlans,omitempty"`
	ID          int      `json:"id,omitempty"`
}

type StaticRoute added in v0.10.0

type StaticRoute struct {
	GatewayIP   string `json:"gateway_ip,omitempty"`
	ResourceURI string `json:"resource_uri,omitempty"`
	Destination Subnet `json:"destination,omitempty"`
	Source      Subnet `json:"source,omitempty"`
	ID          int    `json:"id,omitempty"`
	Metric      int    `json:"metric,omitempty"`
}

type StaticRouteParams added in v0.10.0

type StaticRouteParams struct {
	Source      string `url:"source,omitempty"`
	Destination string `url:"destination,omitempty"`
	GatewayIP   string `url:"gateway_ip,omitempty"`
	Metric      int    `url:"metric,omitempty"`
}

type Subnet

type Subnet struct {
	Space                     string   `json:"space,omitempty"`
	CIDR                      string   `json:"cidr,omitempty"`
	Name                      string   `json:"name,omitempty"`
	ResourceURI               string   `json:"resource_uri,omitempty"`
	Description               string   `json:"description,omitempty"`
	GatewayIP                 net.IP   `json:"gateway_ip,omitempty"`
	DNSServers                []net.IP `json:"dns_servers,omitempty"`
	DisabledBootArchitectures []string `json:"disabled_boot_architectures,omitempty"`
	VLAN                      VLAN     `json:"vlan,omitempty"`
	ID                        int      `json:"id,omitempty"`
	RDNSMode                  int      `json:"rdns_mode,omitempty"`
	AllowDNS                  bool     `json:"allow_dns,omitempty"`
	Managed                   bool     `json:"managed,omitempty"`
	ActiveDiscovery           bool     `json:"active_discovery,omitempty"`
	AllowProxy                bool     `json:"allow_proxy,omitempty"`
}

Subnet represents the MAAS Subnet endpoint.

type SubnetParams

type SubnetParams struct {
	CIDR            string   `url:"cidr"`
	Name            string   `url:"name,omitempty"`
	Description     string   `url:"description,omitempty"`
	VLAN            string   `url:"vlan,omitempty"`
	Fabric          string   `url:"fabric,omitempty"`
	GatewayIP       string   `url:"gateway_ip,omitempty"`
	DNSServers      []string `url:"dns_servers,omitempty"`
	VID             int      `url:"vid,omitempty"`
	RDNSMode        int      `url:"rdns_mode"`
	AllowDNS        bool     `url:"allow_dns"`
	AllowProxy      bool     `url:"allow_proxy"`
	Managed         bool     `url:"managed"`
	ActiveDiscovery bool     `url:"active_discovery"`
}

SubnetParams contains the parameters for the POST operation on the Subnets endpoint.

type Tag

type Tag struct {
	Name        string `json:"name,omitempty"`
	Definition  string `json:"definition,omitempty"`
	Comment     string `json:"comment,omitempty"`
	KernelOpts  string `json:"kernel_opts,omitempty"`
	ResourceURI string `json:"resource_uri,omitempty"`
}

type TagParams

type TagParams struct {
	Name       string `url:"name"`
	Definition string `url:"definition,omitempty"`
	Comment    string `url:"comment,omitempty"`
	KernelOpts string `url:"kernel_opts,omitempty"`
}

type User

type User struct {
	UserName    string `json:"username"`
	Email       string `json:"email"`
	ResourceURI string `json:"resource_uri"`
	IsSuperUser bool   `json:"is_superuser"`
	IsLocal     bool   `json:"is_local"`
}

type UserDeleteParams added in v0.13.0

type UserDeleteParams struct {
	UserName            string `url:"username"`
	TransferResourcesTo string `url:"transfer_resources_to,omitempty"`
}

type UserParams

type UserParams struct {
	UserName    string `url:"username"`
	Password    string `url:"password"`
	Email       string `url:"email"`
	IsSuperUser bool   `url:"is_superuser,int"`
}

type VLAN

type VLAN struct {
	RelayVLAN     *VLAN  `json:"relay_vlan,omitempty"`
	Name          string `json:"name,omitempty"`
	ExternalDHCP  string `json:"external_dhcp,omitempty"`
	Description   string `json:"description,omitempty"`
	PrimaryRack   string `json:"primary_rack,omitempty"`
	SecondaryRack string `json:"secondary_rack,omitempty"`
	Space         string `json:"space,omitempty"`
	Fabric        string `json:"fabric,omitempty"`
	ResourceURI   string `json:"resource_uri,omitempty"`
	MTU           int    `json:"mtu,omitempty"`
	FabricID      int    `json:"fabric_id,omitempty"`
	VID           int    `json:"vid,omitempty"`
	ID            int    `json:"id,omitempty"`
	DHCPOn        bool   `json:"dhcp_on,omitempty"`
}

VLAN represents the MAAS VLAN endpoint.

type VLANParams

type VLANParams struct {
	PrimaryRack   *string `url:"primary_rack,omitempty"`
	SecondaryRack *string `url:"secondary_rack,omitempty"`
	RelayVLAN     *string `url:"relay_vlan,omitempty"`
	Name          string  `url:"name,omitempty"`
	Description   string  `url:"description,omitempty"`
	Space         string  `url:"space,omitempty"`
	VID           int     `url:"vid,omitempty"`
	MTU           int     `url:"mtu,omitempty"`
	DHCPOn        bool    `url:"dhcp_on"`
}

VLANParams contains the options for a POST request to the vlans endpoint. Only the VID field is required. If Space is empty or the string "undefined", the VLAN will be created in the 'undefined' space.

type VMHost

type VMHost struct {
	Zone               Zone                `json:"zone,omitempty"`
	Pool               ResourcePool        `json:"pool,omitempty"`
	ResourceURI        string              `json:"resource_uri,omitempty"`
	DefaultMACVLANMode string              `json:"default_macvlan_mode,omitempty"`
	Type               string              `json:"type,omitempty"`
	Name               string              `json:"name,omitempty"`
	Tags               []string            `json:"tags,omitempty"`
	Architectures      []string            `json:"architectures,omitempty"`
	StoragePools       []VMHostStoragePool `json:"storage_pools,omitempty"`
	Capabilities       []string            `json:"capabilities,omitempty"`
	Host               struct {
		SystemID   string `json:"system_id,omitempty"`
		Incomplete bool   `json:"__incomplete__,omitempty"` //nolint:tagliatelle // MAAS returns this field intentionally
	} `json:"host,omitempty"`
	Total                 VMHostResource `json:"total,omitempty"`
	Available             VMHostResource `json:"available,omitempty"`
	Used                  VMHostResource `json:"used,omitempty"`
	CPUOverCommitRatio    float64        `json:"cpu_over_commit_ratio,omitempty"`
	MemoryOverCommitRatio float64        `json:"memory_over_commit_ratio,omitempty"`
	ID                    int            `json:"id,omitempty"`
}

VMHost represents the MAAS VM host endpoint.

type VMHostMachineParams

type VMHostMachineParams struct {
	Architecture    string `url:"architecture,omitempty"`
	Storage         string `url:"storage,omitempty"`
	Interfaces      string `url:"interfaces,omitempty"`
	Hostname        string `url:"hostname,omitempty"`
	Cores           int    `url:"cores,omitempty"`
	PinnedCores     int    `url:"pinned_cores,omitempty"`
	Memory          int64  `url:"memory,omitempty"`
	HugepagesBacked bool   `url:"hugepages_backed,omitempty"`
}

VMHostMachineParams enumerates the VMHost machine configuration options.

type VMHostParams

type VMHostParams struct {
	Pool                  string  `url:"pool,omitempty"`
	Type                  string  `url:"type,omitempty"`
	PowerUser             string  `url:"power_user,omitempty"`
	PowerPass             string  `url:"power_pass,omitempty"`
	Name                  string  `url:"name,omitempty"`
	Zone                  string  `url:"zone,omitempty"`
	PowerAddress          string  `url:"power_address,omitempty"`
	DefaultStoragePool    string  `url:"default_storage_pool,omitempty"`
	Key                   string  `url:"key,omitempty"`
	Tags                  string  `url:"tags,omitempty"`
	DefaultMacvlanMode    string  `url:"default_macvlan_mode,omitempty"`
	Certificate           string  `url:"certificate,omitempty"`
	Project               string  `url:"project,omitempty"`
	Password              string  `url:"password,omitempty"`
	MemoryOverCommitRatio float64 `url:"memory_over_commit_ratio,omitempty"`
	CPUOverCommitRatio    float64 `url:"cpu_over_commit_ratio,omitempty"`
}

VMHostParams enumerates the VMHost configuration options.

type VMHostResource

type VMHostResource struct {
	Cores        int   `json:"cores,omitempty"`
	Memory       int64 `json:"memory,omitempty"`
	LocalStorage int64 `json:"local_storage,omitempty"`
}

VMHostResource represents the "used", "available", and "total" objects in a VMHost This type should not be used directly.

type VMHostStoragePool

type VMHostStoragePool struct {
	ID        string `json:"id,omitempty"`
	Name      string `json:"name,omitempty"`
	Type      string `json:"type,omitempty"`
	Path      string `json:"path,omitempty"`
	Total     int64  `json:"total,omitempty"`
	Used      int64  `json:"used,omitempty"`
	Available int64  `json:"available,omitempty"`
	Default   bool   `json:"default,omitempty"`
}

VMHostStoragePool represents the "storage_pools" object in a VMHost. This type should not be used directly.

type Version

type Version struct {
	Subversion   string   `json:"subversion,omitempty"`
	Version      string   `json:"version,omitempty"`
	Capabilities []string `json:"capabilities,omitempty"`
}

type VirtualBlockDevice added in v0.8.0

type VirtualBlockDevice struct {
	BlockDevice
}

VirtualBlockDevice represents a logical volume and extends BlockDevice.

type VolumeGroup

type VolumeGroup struct {
	Devices            interface{}          `json:"devices,omitempty"`
	ResourceURI        string               `json:"resource_uri,omitempty"`
	HumanSize          string               `json:"human_size,omitempty"`
	UUID               string               `json:"uuid,omitempty"`
	HumanAvailableSize string               `json:"human_available_size,omitempty"`
	SystemID           string               `json:"system_id,omitempty"`
	HumanUsedSize      string               `json:"human_used_size,omitempty"`
	Name               string               `json:"name,omitempty"`
	LogicalVolumes     []VirtualBlockDevice `json:"logical_volumes,omitempty"`
	Size               int64                `json:"size,omitempty"`
	UsedSize           int64                `json:"used_size,omitempty"`
	AvailableSize      int64                `json:"available_size,omitempty"`
	ID                 int                  `json:"id,omitempty"`
}

VolumeGroup represents the MAAS VolumeGroup endpoint.

type VolumeGroupCreateParams added in v0.8.0

type VolumeGroupCreateParams struct {
	Name         string   `url:"name,omitempty"`
	UUID         string   `url:"uuid,omitempty"`
	BlockDevices []string `url:"block_devices,omitempty"`
	Partitions   []string `url:"partitions,omitempty"`
}

VolumeGroupCreateParams enumerates the parameters for the volume group create operation.

type VolumeGroupUpdateParams added in v0.8.0

type VolumeGroupUpdateParams struct {
	Name               string   `url:"name,omitempty"`
	UUID               string   `url:"uuid,omitempty"`
	AddBlockDevices    []string `url:"add_block_devices,omitempty"`
	RemoveBlockDevices []string `url:"remove_block_devices,omitempty"`
	AddPartitions      []string `url:"add_partitions,omitempty"`
	RemovePartitions   []string `url:"remove_partitions,omitempty"`
}

VolumeGroupUpdateParams enumerates the parameters for the volume group update operation.

type Zone

type Zone struct {
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
	ResourceURI string `json:"resource_uri,omitempty"`
	ID          int    `json:"id,omitempty"`
}

Zone represents the MAAS Zone endpoint

type ZoneParams

type ZoneParams struct {
	Name        string `url:"name,omitempty"`
	Description string `url:"description,omitempty"`
}

Directories

Path Synopsis
Package event contains entities related to events.
Package event contains entities related to events.
Package node contains entities related to nodes.
Package node contains entities related to nodes.
Package notification contains entities related to notifications.
Package notification contains entities related to notifications.
Package subnet contains entities related to subnets.
Package subnet contains entities related to subnets.

Jump to

Keyboard shortcuts

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