Documentation ¶
Overview ¶
Package client contains the implementation of CRUD operations on MAAS resources.
Index ¶
- type APIClient
- type Account
- func (a *Account) CreateAuthorisationToken(name string) (*entity.AuthorisationToken, error)
- func (a *Account) DeleteAuthorisationToken(key string) error
- func (a *Account) ListAuthorisationTokens() ([]entity.AuthorisationTokenListItem, error)
- func (a *Account) UpdateTokenName(name, token string) error
- type BCache
- type BCacheCacheSet
- type BCacheCacheSets
- type BCaches
- type BlockDevice
- func (b *BlockDevice) AddTag(systemID string, id int, tag string) (*entity.BlockDevice, error)
- func (b *BlockDevice) Delete(systemID string, id int) error
- func (b *BlockDevice) Format(systemID string, id int, fsType string) (*entity.BlockDevice, error)
- func (b *BlockDevice) Get(systemID string, id int) (*entity.BlockDevice, error)
- func (b *BlockDevice) Mount(systemID string, id int, mountPoint string, mountOptions string) (*entity.BlockDevice, error)
- func (b *BlockDevice) RemoveTag(systemID string, id int, tag string) (*entity.BlockDevice, error)
- func (b *BlockDevice) SetBootDisk(systemID string, id int) error
- func (b *BlockDevice) Unformat(systemID string, id int) (*entity.BlockDevice, error)
- func (b *BlockDevice) Unmount(systemID string, id int) (*entity.BlockDevice, error)
- func (b *BlockDevice) Update(systemID string, id int, params *entity.BlockDeviceParams) (*entity.BlockDevice, error)
- type BlockDevicePartition
- func (p *BlockDevicePartition) AddTag(systemID string, blockDeviceID int, id int, tag string) (*entity.BlockDevicePartition, error)
- func (p *BlockDevicePartition) Delete(systemID string, blockDeviceID int, id int) error
- func (p *BlockDevicePartition) Format(systemID string, blockDeviceID int, id int, fsType string, label string) (*entity.BlockDevicePartition, error)
- func (p *BlockDevicePartition) Get(systemID string, blockDeviceID int, id int) (*entity.BlockDevicePartition, error)
- func (p *BlockDevicePartition) Mount(systemID string, blockDeviceID int, id int, mountPoint string, ...) (*entity.BlockDevicePartition, error)
- func (p *BlockDevicePartition) RemoveTag(systemID string, blockDeviceID int, id int, tag string) (*entity.BlockDevicePartition, error)
- func (p *BlockDevicePartition) Unformat(systemID string, blockDeviceID int, id int) (*entity.BlockDevicePartition, error)
- func (p *BlockDevicePartition) Unmount(systemID string, blockDeviceID int, id int) (*entity.BlockDevicePartition, error)
- type BlockDevicePartitions
- type BlockDevices
- type BootResource
- type BootResources
- func (b *BootResources) Create(params *entity.BootResourceParams) (*entity.BootResource, error)
- func (b *BootResources) Get(params *entity.BootResourcesReadParams) ([]entity.BootResource, error)
- func (b *BootResources) Import() error
- func (b *BootResources) IsImporting() (bool, error)
- func (b *BootResources) StopImport() error
- type BootSource
- type BootSourceSelection
- func (b *BootSourceSelection) Delete(bootSourceID int, id int) error
- func (b *BootSourceSelection) Get(bootSourceID int, id int) (*entity.BootSourceSelection, error)
- func (b *BootSourceSelection) Update(bootSourceID int, id int, params *entity.BootSourceSelectionParams) (*entity.BootSourceSelection, error)
- type BootSourceSelections
- type BootSources
- type Client
- func GetClient(apiURL string, apiKey string, apiVersion string) (*Client, error)
- func GetClientWithTransport(apiURL string, apiKey string, apiVersion string, tr http.RoundTripper) (*Client, error)
- func GetTLSClient(apiURL string, apiKey string, apiVersion string, tlsConfig *tls.Config) (*Client, error)
- type DNSResource
- type DNSResourceRecord
- type DNSResourceRecords
- type DNSResources
- type Device
- func (d *Device) Delete(systemID string) error
- func (d *Device) Get(systemID string) (*entity.Device, error)
- func (d *Device) SetWorkloadAnnotations(systemID string, params map[string]string) (*entity.Device, error)
- func (d *Device) Update(systemID string, deviceParams *entity.DeviceUpdateParams) (*entity.Device, error)
- type Devices
- type Discoveries
- func (d *Discoveries) Clear(params *entity.DiscoveryClearParams) error
- func (d *Discoveries) ClearByMACAndIP(mac, ip string) error
- func (d *Discoveries) Get() ([]entity.Discovery, error)
- func (d *Discoveries) GetByUnknownIP() ([]entity.Discovery, error)
- func (d *Discoveries) GetByUnknownIPAndMAC() ([]entity.Discovery, error)
- func (d *Discoveries) GetByUnknownMAC() ([]entity.Discovery, error)
- type Discovery
- type Domain
- type Domains
- type Events
- type Fabric
- type Fabrics
- type IPAddresses
- type IPRange
- type IPRanges
- type MAASServer
- type Machine
- func (m *Machine) Abort(systemID string, comment string) (*entity.Machine, error)
- func (m *Machine) ClearDefaultGateways(systemID string) (*entity.Machine, error)
- func (m *Machine) Commission(systemID string, params *entity.MachineCommissionParams) (*entity.Machine, error)
- func (m *Machine) Delete(systemID string) error
- func (m *Machine) Deploy(systemID string, params *entity.MachineDeployParams) (*entity.Machine, error)
- func (m *Machine) Details(systemID string) (*entity.MachineDetails, error)
- func (m *Machine) ExitRescueMode(systemID string) (*entity.Machine, error)
- func (m *Machine) Get(systemID string) (*entity.Machine, error)
- func (m *Machine) GetPowerParameters(systemID string) (map[string]interface{}, error)
- func (m *Machine) GetPowerState(systemID string) (*entity.MachinePowerState, error)
- func (m *Machine) GetToken(systemID string) (*entity.MachineToken, error)
- func (m *Machine) Lock(systemID string, comment string) (*entity.Machine, error)
- func (m *Machine) MarkBroken(systemID string, comment string) (*entity.Machine, error)
- func (m *Machine) MarkFixed(systemID string, comment string) (*entity.Machine, error)
- func (m *Machine) PowerOff(systemID string, params *entity.MachinePowerOffParams) (*entity.Machine, error)
- func (m *Machine) PowerOn(systemID string, params *entity.MachinePowerOnParams) (*entity.Machine, error)
- func (m *Machine) Release(systemID string, params *entity.MachineReleaseParams) (*entity.Machine, error)
- func (m *Machine) RescueMode(systemID string) (*entity.Machine, error)
- func (m *Machine) SetWorkloadAnnotations(systemID string, params map[string]string) (*entity.Machine, error)
- func (m *Machine) Unlock(systemID string, comment string) (*entity.Machine, error)
- func (m *Machine) Update(systemID string, machineParams *entity.MachineParams, ...) (*entity.Machine, error)
- type Machines
- func (m *Machines) AcceptAll() error
- func (m *Machines) Allocate(params *entity.MachineAllocateParams) (*entity.Machine, error)
- func (m *Machines) Create(machineParams *entity.MachineParams, powerParams map[string]interface{}) (*entity.Machine, error)
- func (m *Machines) Get() ([]entity.Machine, error)
- func (m *Machines) ListAllocated() ([]entity.Machine, error)
- func (m *Machines) Release(systemIDs []string, comment string) error
- type NetworkInterface
- func (n *NetworkInterface) AddTag(systemID string, id int, tag string) (*entity.NetworkInterface, error)
- func (n *NetworkInterface) Delete(systemID string, id int) error
- func (n *NetworkInterface) Disconnect(systemID string, id int) (*entity.NetworkInterface, error)
- func (n *NetworkInterface) Get(systemID string, id int) (*entity.NetworkInterface, error)
- func (n *NetworkInterface) LinkSubnet(systemID string, id int, params *entity.NetworkInterfaceLinkParams) (*entity.NetworkInterface, error)
- func (n *NetworkInterface) RemoveTag(systemID string, id int, tag string) (*entity.NetworkInterface, error)
- func (n *NetworkInterface) SetDefaultGateway(systemID string, id int, linkID int) (*entity.NetworkInterface, error)
- func (n *NetworkInterface) UnlinkSubnet(systemID string, id int, linkID int) (*entity.NetworkInterface, error)
- func (n *NetworkInterface) Update(systemID string, id int, params *entity.NetworkInterfaceUpdateParams) (*entity.NetworkInterface, error)
- type NetworkInterfaces
- func (n *NetworkInterfaces) CreateBond(systemID string, params *entity.NetworkInterfaceBondParams) (*entity.NetworkInterface, error)
- func (n *NetworkInterfaces) CreateBridge(systemID string, params *entity.NetworkInterfaceBridgeParams) (*entity.NetworkInterface, error)
- func (n *NetworkInterfaces) CreatePhysical(systemID string, params *entity.NetworkInterfacePhysicalParams) (*entity.NetworkInterface, error)
- func (n *NetworkInterfaces) CreateVLAN(systemID string, params *entity.NetworkInterfaceVLANParams) (*entity.NetworkInterface, error)
- func (n *NetworkInterfaces) Get(systemID string) ([]entity.NetworkInterface, error)
- type NodeDevice
- type NodeDevices
- type PackageRepositories
- type PackageRepository
- type RAID
- type RAIDs
- type ResourcePool
- func (r *ResourcePool) Delete(id int) error
- func (r *ResourcePool) DeleteByName(name string) error
- func (r *ResourcePool) Get(id int) (*entity.ResourcePool, error)
- func (r *ResourcePool) GetByName(name string) (*entity.ResourcePool, error)
- func (r *ResourcePool) Update(id int, params *entity.ResourcePoolParams) (*entity.ResourcePool, error)
- func (r *ResourcePool) UpdateByName(name string, params *entity.ResourcePoolParams) (*entity.ResourcePool, error)
- type ResourcePools
- type SSHKey
- type SSHKeys
- type SSLKey
- type SSLKeys
- type Space
- type Spaces
- type Subnet
- func (s *Subnet) Delete(id int) error
- func (s *Subnet) Get(id int) (*entity.Subnet, error)
- func (s *Subnet) GetIPAddresses(id int) ([]subnet.IPAddress, error)
- func (s *Subnet) GetReservedIPRanges(id int) ([]subnet.ReservedIPRange, error)
- func (s *Subnet) GetStatistics(id int) (*subnet.Statistics, error)
- func (s *Subnet) GetUnreservedIPRanges(id int) ([]subnet.IPRange, error)
- func (s *Subnet) Update(id int, params *entity.SubnetParams) (*entity.Subnet, error)
- type Subnets
- type Tag
- func (t *Tag) AddMachines(name string, machineIds []string) error
- func (t *Tag) Delete(name string) error
- func (t *Tag) Get(name string) (*entity.Tag, error)
- func (t *Tag) GetMachines(name string) ([]entity.Machine, error)
- func (t *Tag) RemoveMachines(name string, machineIds []string) error
- func (t *Tag) Update(name string, tagParams *entity.TagParams) (*entity.Tag, error)
- type Tags
- type User
- type Users
- type VLAN
- type VLANs
- type VMHost
- func (p *VMHost) Compose(id int, params *entity.VMHostMachineParams) (*entity.Machine, error)
- func (p *VMHost) Delete(id int) error
- func (p *VMHost) Get(id int) (*entity.VMHost, error)
- func (p *VMHost) GetParameters(id int) (map[string]string, error)
- func (p *VMHost) Refresh(id int) (*entity.VMHost, error)
- func (p *VMHost) Update(id int, params *entity.VMHostParams) (*entity.VMHost, error)
- type VMHosts
- type Zone
- type Zones
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIClient ¶
type APIClient struct { AuthClient gomaasapi.Client *gomaasapi.MAASObject }
func GetAPIClient
deprecated
func (APIClient) GetSubObject ¶
type Account ¶ added in v0.3.0
type Account struct {
APIClient APIClient
}
Account implements api.Account
func (*Account) CreateAuthorisationToken ¶ added in v0.3.0
func (a *Account) CreateAuthorisationToken(name string) (*entity.AuthorisationToken, error)
CreateAuthorisationToken creates authorisation token with provided name
func (*Account) DeleteAuthorisationToken ¶ added in v0.3.0
DeleteAuthorisationToken deletes authorisation token with provided key
func (*Account) ListAuthorisationTokens ¶ added in v0.3.0
func (a *Account) ListAuthorisationTokens() ([]entity.AuthorisationTokenListItem, error)
ListAuthorisationTokens Lists authorisation tokens
func (*Account) UpdateTokenName ¶ added in v0.3.0
UpdateTokenName updates given token with provided name
type BCache ¶ added in v0.2.0
type BCache struct {
APIClient APIClient
}
BCache Contains functionality for manipulating the BCache entity.
type BCacheCacheSet ¶ added in v0.2.0
type BCacheCacheSet struct {
APIClient APIClient
}
BCacheCacheSet Contains functionality for manipulating the BCacheCacheSet entity.
func (*BCacheCacheSet) Delete ¶ added in v0.2.0
func (b *BCacheCacheSet) Delete(systemID string, id int) error
Delete BCacheCacheSet.
func (*BCacheCacheSet) Get ¶ added in v0.2.0
func (b *BCacheCacheSet) Get(systemID string, id int) (*entity.BCacheCacheSet, error)
Get BCacheCacheSet details.
func (*BCacheCacheSet) Update ¶ added in v0.2.0
func (b *BCacheCacheSet) Update(systemID string, id int, params *entity.BCacheCacheSetParams) (*entity.BCacheCacheSet, error)
Update BCacheCacheSet.
type BCacheCacheSets ¶ added in v0.2.0
type BCacheCacheSets struct {
APIClient APIClient
}
BCacheCacheSets contains functionality for manipulating the BCacheCacheSets entity.
func (*BCacheCacheSets) Create ¶ added in v0.2.0
func (b *BCacheCacheSets) Create(systemID string, params *entity.BCacheCacheSetParams) (*entity.BCacheCacheSet, error)
Create a BCacheCacheSet of a machine.
func (*BCacheCacheSets) Get ¶ added in v0.2.0
func (b *BCacheCacheSets) Get(systemID string) ([]entity.BCacheCacheSet, error)
Get BCacheCacheSets of a machine.
type BCaches ¶ added in v0.2.0
type BCaches struct {
APIClient APIClient
}
BCaches contains functionality for manipulating the BCaches entity.
type BlockDevice ¶
type BlockDevice struct {
APIClient APIClient
}
BlockDevice implements the api.BlockDevice interface
func (*BlockDevice) AddTag ¶
func (b *BlockDevice) AddTag(systemID string, id int, tag string) (*entity.BlockDevice, error)
AddTag adds a tag to a given BlockDevice
func (*BlockDevice) Delete ¶
func (b *BlockDevice) Delete(systemID string, id int) error
Delete deletes a given BlockDevice
func (*BlockDevice) Format ¶
func (b *BlockDevice) Format(systemID string, id int, fsType string) (*entity.BlockDevice, error)
Format configures a BlockDevice to be formatted for a new file system
func (*BlockDevice) Get ¶
func (b *BlockDevice) Get(systemID string, id int) (*entity.BlockDevice, error)
Get fetches a given BlockDevice based on the given Node's system_id and BlockDevice's id
func (*BlockDevice) Mount ¶
func (b *BlockDevice) Mount(systemID string, id int, mountPoint string, mountOptions string) (*entity.BlockDevice, error)
Mount sets the mount point and options of a given BlockDevice
func (*BlockDevice) RemoveTag ¶
func (b *BlockDevice) RemoveTag(systemID string, id int, tag string) (*entity.BlockDevice, error)
RemoveTag removes a tag from a given BlockDevice
func (*BlockDevice) SetBootDisk ¶
func (b *BlockDevice) SetBootDisk(systemID string, id int) error
SetBootDisk configures the given BlockDevice as the boot disk
func (*BlockDevice) Unformat ¶
func (b *BlockDevice) Unformat(systemID string, id int) (*entity.BlockDevice, error)
Unformat removes the configured file system
func (*BlockDevice) Unmount ¶
func (b *BlockDevice) Unmount(systemID string, id int) (*entity.BlockDevice, error)
Unmount unsets the mount of a BlockDevice
func (*BlockDevice) Update ¶
func (b *BlockDevice) Update(systemID string, id int, params *entity.BlockDeviceParams) (*entity.BlockDevice, error)
Update updates a given BlockDevice
type BlockDevicePartition ¶
type BlockDevicePartition struct {
APIClient APIClient
}
BlockDevicePartition implements the api.BlockDevicePartition interface
func (*BlockDevicePartition) AddTag ¶
func (p *BlockDevicePartition) AddTag(systemID string, blockDeviceID int, id int, tag string) (*entity.BlockDevicePartition, error)
AddTag adds a tag to a given BlockDevicePartition
func (*BlockDevicePartition) Delete ¶
func (p *BlockDevicePartition) Delete(systemID string, blockDeviceID int, id int) error
Delete deletes a given BlockDevicePartition
func (*BlockDevicePartition) Format ¶
func (p *BlockDevicePartition) Format(systemID string, blockDeviceID int, id int, fsType string, label string) (*entity.BlockDevicePartition, error)
Format sets the BlockDevicePartition to be formatted with a given file system
func (*BlockDevicePartition) Get ¶
func (p *BlockDevicePartition) Get(systemID string, blockDeviceID int, id int) (*entity.BlockDevicePartition, error)
Get fetches a given BlockDevicePartion for a given system_id, BlockDevice id and partition id
func (*BlockDevicePartition) Mount ¶
func (p *BlockDevicePartition) Mount(systemID string, blockDeviceID int, id int, mountPoint string, mountOptions string) (*entity.BlockDevicePartition, error)
Mount sets a mount point and options for a given BlockDevicePartition
func (*BlockDevicePartition) RemoveTag ¶
func (p *BlockDevicePartition) RemoveTag(systemID string, blockDeviceID int, id int, tag string) (*entity.BlockDevicePartition, error)
RemoveTag removes a tag from a given BlockDevicePartition
func (*BlockDevicePartition) Unformat ¶
func (p *BlockDevicePartition) Unformat(systemID string, blockDeviceID int, id int) (*entity.BlockDevicePartition, error)
Unformat unsets a file system for a given BlockDevicePartition
func (*BlockDevicePartition) Unmount ¶
func (p *BlockDevicePartition) Unmount(systemID string, blockDeviceID int, id int) (*entity.BlockDevicePartition, error)
Unmount unsets a mount point for a given BlockDevicePartition
type BlockDevicePartitions ¶
type BlockDevicePartitions struct {
APIClient APIClient
}
BlockDevicePartitions implements api.BlockDevicePartitions
func (*BlockDevicePartitions) Create ¶
func (p *BlockDevicePartitions) Create(systemID string, blockDeviceID int, params *entity.BlockDevicePartitionParams) (*entity.BlockDevicePartition, error)
Create creats a new BlockDevicePartition for a given system_id and BlockDevice id
func (*BlockDevicePartitions) Get ¶
func (p *BlockDevicePartitions) Get(systemID string, blockDeviceID int) ([]entity.BlockDevicePartition, error)
Get lists the BlockDevicePartition objects for a given system_id and BlockDevice id
type BlockDevices ¶
type BlockDevices struct {
APIClient APIClient
}
BlockDevices implements api.BlockDevices
func (*BlockDevices) Create ¶
func (b *BlockDevices) Create(systemID string, params *entity.BlockDeviceParams) (*entity.BlockDevice, error)
Create creates a new BlockDevice for a given system_id
func (*BlockDevices) Get ¶
func (b *BlockDevices) Get(systemID string) ([]entity.BlockDevice, error)
Get fetches a list of BlockDevices for a given system_id
type BootResource ¶ added in v0.2.0
type BootResource struct {
APIClient APIClient
}
BootResource implements api.BootResource
func (*BootResource) Delete ¶ added in v0.2.0
func (b *BootResource) Delete(id int) error
Delete deletes a given boot resource
func (*BootResource) Get ¶ added in v0.2.0
func (b *BootResource) Get(id int) (*entity.BootResource, error)
Get fetches a boot resource with a given id
type BootResources ¶ added in v0.2.0
type BootResources struct {
APIClient APIClient
}
BootResources implements api.BootResources
func (*BootResources) Create ¶ added in v0.2.0
func (b *BootResources) Create(params *entity.BootResourceParams) (*entity.BootResource, error)
Create creates a new boot source
func (*BootResources) Get ¶ added in v0.2.0
func (b *BootResources) Get(params *entity.BootResourcesReadParams) ([]entity.BootResource, error)
Get fetches a list of boot resources
func (*BootResources) Import ¶ added in v0.2.0
func (b *BootResources) Import() error
Import imports boot resources to rack controllers
func (*BootResources) IsImporting ¶ added in v0.2.0
func (b *BootResources) IsImporting() (bool, error)
IsImporting returns importing status of boot resources importing to rack controllers
func (*BootResources) StopImport ¶ added in v0.2.0
func (b *BootResources) StopImport() error
StopImport stops importing boot resources to rack controllers
type BootSource ¶ added in v0.2.0
type BootSource struct {
APIClient APIClient
}
BootSource implements api.BootSource
func (*BootSource) Delete ¶ added in v0.2.0
func (b *BootSource) Delete(id int) error
Delete deletes a given boot source
func (*BootSource) Get ¶ added in v0.2.0
func (b *BootSource) Get(id int) (*entity.BootSource, error)
Get fetches a boot source with a given id
func (*BootSource) Update ¶ added in v0.2.0
func (b *BootSource) Update(id int, params *entity.BootSourceParams) (*entity.BootSource, error)
Update updates a given boot source
type BootSourceSelection ¶ added in v0.2.0
type BootSourceSelection struct {
APIClient APIClient
}
BootSourceSelection implements api.BootSourceSelection
func (*BootSourceSelection) Delete ¶ added in v0.2.0
func (b *BootSourceSelection) Delete(bootSourceID int, id int) error
Delete deletes a given BootSourceSelection
func (*BootSourceSelection) Get ¶ added in v0.2.0
func (b *BootSourceSelection) Get(bootSourceID int, id int) (*entity.BootSourceSelection, error)
Get fetches a BootSourceSelection for the given bootSourceID and BootSourceSelection id
func (*BootSourceSelection) Update ¶ added in v0.2.0
func (b *BootSourceSelection) Update(bootSourceID int, id int, params *entity.BootSourceSelectionParams) (*entity.BootSourceSelection, error)
Update updates a given BootSourceSelection
type BootSourceSelections ¶ added in v0.2.0
type BootSourceSelections struct {
APIClient APIClient
}
BootSourceSelections implements api.BootSourceSelections
func (*BootSourceSelections) Create ¶ added in v0.2.0
func (b *BootSourceSelections) Create(bootSourceID int, params *entity.BootSourceSelectionParams) (*entity.BootSourceSelection, error)
Create creates a BootSourceSelection object
func (*BootSourceSelections) Get ¶ added in v0.2.0
func (b *BootSourceSelections) Get(bootSourceID int) ([]entity.BootSourceSelection, error)
Get fetches a list of BootSourceSelection objects
type BootSources ¶ added in v0.2.0
type BootSources struct {
APIClient APIClient
}
BootSources implements api.BootSources
func (*BootSources) Create ¶ added in v0.2.0
func (b *BootSources) Create(params *entity.BootSourceParams) (*entity.BootSource, error)
Create creates a new boot source
func (*BootSources) Get ¶ added in v0.2.0
func (b *BootSources) Get() ([]entity.BootSource, error)
Get fetches a list of boot sources
type Client ¶
type Client struct { Device api.Device Devices api.Devices DNSResource api.DNSResource DNSResources api.DNSResources DNSResourceRecord api.DNSResourceRecord DNSResourceRecords api.DNSResourceRecords Domain api.Domain Domains api.Domains Events api.Events Fabric api.Fabric Fabrics api.Fabrics VLAN api.VLAN VLANs api.VLANs Space api.Space Spaces api.Spaces Machine api.Machine Machines api.Machines VMHost api.VMHost VMHosts api.VMHosts NetworkInterface api.NetworkInterface NetworkInterfaces api.NetworkInterfaces NodeDevice api.NodeDevice NodeDevices api.NodeDevices RAID api.RAID RAIDs api.RAIDs Subnet api.Subnet Subnets api.Subnets IPRange api.IPRange IPRanges api.IPRanges IPAddresses api.IPAddresses Tag api.Tag Tags api.Tags BlockDevice api.BlockDevice BlockDevices api.BlockDevices BlockDevicePartition api.BlockDevicePartition BlockDevicePartitions api.BlockDevicePartitions User api.User Users api.Users ResourcePool api.ResourcePool ResourcePools api.ResourcePools MAASServer api.MAASServer PackageRepository api.PackageRepository PackageRepositories api.PackageRepositories BootSource api.BootSource BootSources api.BootSources BootSourceSelection api.BootSourceSelection BootSourceSelections api.BootSourceSelections BootResource api.BootResource BootResources api.BootResources Zone api.Zone Zones api.Zones BCache api.BCache BCaches api.BCaches BCacheCacheSet api.BCacheCacheSet BCacheCacheSets api.BCacheCacheSets SSHKey api.SSHKey SSHKeys api.SSHKeys SSLKey api.SSLKey SSLKeys api.SSLKeys Account api.Account }
Client is an object providing API interactions with a configured MAAS installation
func GetClientWithTransport ¶ added in v0.4.0
func GetClientWithTransport(apiURL string, apiKey string, apiVersion string, tr http.RoundTripper) (*Client, error)
GetClientWithTransport creates a Client configured with the specified http.Transport
type DNSResource ¶
type DNSResource struct {
APIClient APIClient
}
DNSResource implements api.DNSResource
func (*DNSResource) Delete ¶
func (d *DNSResource) Delete(id int) error
Delete deletes a given DNSResource
func (*DNSResource) Get ¶
func (d *DNSResource) Get(id int) (*entity.DNSResource, error)
Get fetches a given DNSResource
func (*DNSResource) Update ¶
func (d *DNSResource) Update(id int, params *entity.DNSResourceParams) (*entity.DNSResource, error)
Update updates a given DNSResource
type DNSResourceRecord ¶
type DNSResourceRecord struct {
APIClient APIClient
}
DNSResourceRecord implements api.DNSResourceRecord
func (*DNSResourceRecord) Delete ¶
func (d *DNSResourceRecord) Delete(id int) error
Delete deletes a given DNSResourceRecord
func (*DNSResourceRecord) Get ¶
func (d *DNSResourceRecord) Get(id int) (*entity.DNSResourceRecord, error)
Get fetches a given DNSResourceRecord
func (*DNSResourceRecord) Update ¶
func (d *DNSResourceRecord) Update(id int, params *entity.DNSResourceRecordParams) (*entity.DNSResourceRecord, error)
Update updates a given DNSResourceRecord
type DNSResourceRecords ¶
type DNSResourceRecords struct {
APIClient APIClient
}
DNSResourceRecords implements api.DNSResourceRecords
func (*DNSResourceRecords) Create ¶
func (d *DNSResourceRecords) Create(params *entity.DNSResourceRecordParams) (*entity.DNSResourceRecord, error)
Create creates a new DNSResourceRecord
func (*DNSResourceRecords) Get ¶
func (d *DNSResourceRecords) Get() ([]entity.DNSResourceRecord, error)
Get fetches a list of DNSResourceRecord objectts
type DNSResources ¶
type DNSResources struct {
APIClient APIClient
}
DNSResources implements api.DNSResources
func (*DNSResources) Create ¶
func (d *DNSResources) Create(params *entity.DNSResourceParams) (*entity.DNSResource, error)
Create creates a new DNSResource
func (*DNSResources) Get ¶
func (d *DNSResources) Get() ([]entity.DNSResource, error)
Get fetches a list of DNSResource objects
type Device ¶
type Device struct {
APIClient APIClient
}
Device implements api.Device
type Devices ¶
type Devices struct {
APIClient APIClient
}
Devices implements api.Devices
type Discoveries ¶ added in v0.4.0
type Discoveries struct {
APIClient APIClient
}
Discoveries implements api.Discoveries
func (*Discoveries) Clear ¶ added in v0.4.0
func (d *Discoveries) Clear(params *entity.DiscoveryClearParams) error
Clear deletes all discovered neighbours and/or mDNS entries.
func (*Discoveries) ClearByMACAndIP ¶ added in v0.4.0
func (d *Discoveries) ClearByMACAndIP(mac, ip string) error
ClearByMACAndIP delete discoveries that match a MAC and IP
func (*Discoveries) Get ¶ added in v0.4.0
func (d *Discoveries) Get() ([]entity.Discovery, error)
Get complete discovery list
func (*Discoveries) GetByUnknownIP ¶ added in v0.4.0
func (d *Discoveries) GetByUnknownIP() ([]entity.Discovery, error)
GetByUnknownIP get discovery list with unknown IP
func (*Discoveries) GetByUnknownIPAndMAC ¶ added in v0.4.0
func (d *Discoveries) GetByUnknownIPAndMAC() ([]entity.Discovery, error)
GetByUnknownIPAndMAC get discovery list with unknown IP and MAC
func (*Discoveries) GetByUnknownMAC ¶ added in v0.4.0
func (d *Discoveries) GetByUnknownMAC() ([]entity.Discovery, error)
GetByUnknownMAC get discovery list with unknown MAC
type Discovery ¶ added in v0.4.0
type Discovery struct {
APIClient APIClient
}
Discovery implements api.Discovery
type Domain ¶
type Domain struct {
APIClient APIClient
}
Domain implements api.Domain
func (*Domain) SetDefault ¶
SetDefault sets the given Domain as the default Domain
type Domains ¶
type Domains struct {
APIClient APIClient
}
Domains implements api.Domains
type Events ¶ added in v0.3.0
type Events struct {
APIClient APIClient
}
Events implements api.Events
func (*Events) Get ¶ added in v0.3.0
func (e *Events) Get(params *entity.EventParams) (*entity.EventsResp, error)
Get events for nodes
type Fabric ¶
type Fabric struct {
APIClient APIClient
}
Fabric implments api.Fabric
type Fabrics ¶
type Fabrics struct {
APIClient APIClient
}
Fabrics implements api.Fabrics
type IPAddresses ¶
type IPAddresses struct {
APIClient APIClient
}
IPAddresses implements api.IPAddresses
func (*IPAddresses) Get ¶
func (i *IPAddresses) Get(params *entity.IPAddressesParams) ([]entity.IPAddress, error)
Get fetches a specified set of IPAddresses
func (*IPAddresses) Release ¶
func (i *IPAddresses) Release(params *entity.IPAddressesParams) error
Release releases a set of allocated IPAddresses
func (*IPAddresses) Reserve ¶
func (i *IPAddresses) Reserve(params *entity.IPAddressesParams) (*entity.IPAddress, error)
Reserve reserves a set of IPAddresses
type IPRange ¶
type IPRange struct {
APIClient APIClient
}
IPRange implements api.IPRange
type IPRanges ¶
type IPRanges struct {
APIClient APIClient
}
IPRanges implements api.IPRanges
type MAASServer ¶ added in v0.2.0
type MAASServer struct {
APIClient APIClient
}
MAASServer contains functionality for manipulating the MAASServer entity.
func (*MAASServer) Get ¶ added in v0.2.0
func (m *MAASServer) Get(name string) ([]byte, error)
Get MAAS server configuration value.
func (*MAASServer) Post ¶ added in v0.2.0
func (m *MAASServer) Post(name, value string) error
Post (Set) MAAS server configuration value.
type Machine ¶
type Machine struct {
APIClient APIClient
}
Machine contains functionality for manipulating the Machine entity.
func (*Machine) ClearDefaultGateways ¶
ClearDefaultGateways clears default gateways.
func (*Machine) Commission ¶
func (m *Machine) Commission(systemID string, params *entity.MachineCommissionParams) (*entity.Machine, error)
Commission machine.
func (*Machine) Deploy ¶
func (m *Machine) Deploy(systemID string, params *entity.MachineDeployParams) (*entity.Machine, error)
Deploy machine.
func (*Machine) Details ¶ added in v0.3.0
func (m *Machine) Details(systemID string) (*entity.MachineDetails, error)
func (*Machine) ExitRescueMode ¶ added in v0.2.0
ExitRescueMode exits the rescue mode process on a given machine
func (*Machine) GetPowerParameters ¶
GetPowerParameters fetches the power parameters of a given Machine
func (*Machine) GetPowerState ¶ added in v0.2.0
func (m *Machine) GetPowerState(systemID string) (*entity.MachinePowerState, error)
GetPowerState of the machine
func (*Machine) GetToken ¶ added in v0.2.0
func (m *Machine) GetToken(systemID string) (*entity.MachineToken, error)
GetToken gets the machine token for a given machine
func (*Machine) MarkBroken ¶ added in v0.2.0
MarkBroken marks a machine as ‘Broken’
func (*Machine) PowerOff ¶ added in v0.2.0
func (m *Machine) PowerOff(systemID string, params *entity.MachinePowerOffParams) (*entity.Machine, error)
PowerOff machine
func (*Machine) PowerOn ¶ added in v0.2.0
func (m *Machine) PowerOn(systemID string, params *entity.MachinePowerOnParams) (*entity.Machine, error)
PowerOn machine
func (*Machine) Release ¶
func (m *Machine) Release(systemID string, params *entity.MachineReleaseParams) (*entity.Machine, error)
Release machine.
func (*Machine) RescueMode ¶ added in v0.2.0
RescueMode begins the rescue mode process on a given machine
func (*Machine) SetWorkloadAnnotations ¶ added in v0.2.0
func (m *Machine) SetWorkloadAnnotations(systemID string, params map[string]string) (*entity.Machine, error)
SetWorkloadAnnotations add, modify or remove workload annotations for given Machine
type Machines ¶
type Machines struct {
APIClient APIClient
}
Machines contains functionality for manipulating the Machines entity.
func (*Machines) Create ¶
func (m *Machines) Create(machineParams *entity.MachineParams, powerParams map[string]interface{}) (*entity.Machine, error)
Create machine.
func (*Machines) ListAllocated ¶ added in v0.2.0
ListAllocated lists allocated machines
type NetworkInterface ¶
type NetworkInterface struct {
APIClient APIClient
}
NetworkInterface implements api.NetworkInterface
func (*NetworkInterface) AddTag ¶
func (n *NetworkInterface) AddTag(systemID string, id int, tag string) (*entity.NetworkInterface, error)
AddTag adds a given tag to a given NetworkInterface
func (*NetworkInterface) Delete ¶
func (n *NetworkInterface) Delete(systemID string, id int) error
Delete deletes a given NetworkInterface
func (*NetworkInterface) Disconnect ¶
func (n *NetworkInterface) Disconnect(systemID string, id int) (*entity.NetworkInterface, error)
Disconnect marks a given NetworkInterface as disconnected
func (*NetworkInterface) Get ¶
func (n *NetworkInterface) Get(systemID string, id int) (*entity.NetworkInterface, error)
Get fetches a NetworkInterface for the given system_id and NetworkInterface id
func (*NetworkInterface) LinkSubnet ¶
func (n *NetworkInterface) LinkSubnet(systemID string, id int, params *entity.NetworkInterfaceLinkParams) (*entity.NetworkInterface, error)
LinkSubnet links a given Subnet to a given NetworkInterface
func (*NetworkInterface) RemoveTag ¶
func (n *NetworkInterface) RemoveTag(systemID string, id int, tag string) (*entity.NetworkInterface, error)
RemoveTag removes a given tag from a given NetworkInterface
func (*NetworkInterface) SetDefaultGateway ¶
func (n *NetworkInterface) SetDefaultGateway(systemID string, id int, linkID int) (*entity.NetworkInterface, error)
SetDefaultGateway sets the default gateway of the given NetworkInterface
func (*NetworkInterface) UnlinkSubnet ¶
func (n *NetworkInterface) UnlinkSubnet(systemID string, id int, linkID int) (*entity.NetworkInterface, error)
UnlinkSubnet removes a given link
func (*NetworkInterface) Update ¶
func (n *NetworkInterface) Update(systemID string, id int, params *entity.NetworkInterfaceUpdateParams) (*entity.NetworkInterface, error)
Update updates a give NetworkInterface
type NetworkInterfaces ¶
type NetworkInterfaces struct {
APIClient APIClient
}
NetworkInterfaces implements api.NetworkInterfaces
func (*NetworkInterfaces) CreateBond ¶
func (n *NetworkInterfaces) CreateBond(systemID string, params *entity.NetworkInterfaceBondParams) (*entity.NetworkInterface, error)
CreateBond creates a Bond interface from two or more given NetworkInterface objects
func (*NetworkInterfaces) CreateBridge ¶
func (n *NetworkInterfaces) CreateBridge(systemID string, params *entity.NetworkInterfaceBridgeParams) (*entity.NetworkInterface, error)
CreateBridge creates a Bridge type interface
func (*NetworkInterfaces) CreatePhysical ¶
func (n *NetworkInterfaces) CreatePhysical(systemID string, params *entity.NetworkInterfacePhysicalParams) (*entity.NetworkInterface, error)
CreatePhysical creates a new physical interface
func (*NetworkInterfaces) CreateVLAN ¶
func (n *NetworkInterfaces) CreateVLAN(systemID string, params *entity.NetworkInterfaceVLANParams) (*entity.NetworkInterface, error)
CreateVLAN creates an interface tagged for a given VLAN
func (*NetworkInterfaces) Get ¶
func (n *NetworkInterfaces) Get(systemID string) ([]entity.NetworkInterface, error)
Get fetches a list of NetworkInterface objects
type NodeDevice ¶ added in v0.4.0
type NodeDevice struct {
APIClient APIClient
}
NodeDevice implements api.NodeDevice
func (*NodeDevice) Delete ¶ added in v0.4.0
func (a *NodeDevice) Delete(systemID string, id int) error
Delete deletes NodeDevice object with id for given systemID
func (*NodeDevice) Get ¶ added in v0.4.0
func (a *NodeDevice) Get(systemID string, id int) (*entity.NodeDevice, error)
Get fetches NodeDevice object with id for given systemID
type NodeDevices ¶ added in v0.4.0
type NodeDevices struct {
APIClient APIClient
}
NodeDevices implements api.NodeDevices
func (*NodeDevices) Get ¶ added in v0.4.0
func (a *NodeDevices) Get(systemID string, param *entity.NodeDeviceParams) ([]entity.NodeDevice, error)
Get fetches a list of NodeDevice objects
type PackageRepositories ¶ added in v0.2.0
type PackageRepositories struct {
APIClient APIClient
}
PackageRepositories implements api.PackageRepositories
func (*PackageRepositories) Create ¶ added in v0.2.0
func (p *PackageRepositories) Create(packageRepositoryParams *entity.PackageRepositoryParams) (*entity.PackageRepository, error)
Create creates a new PackageRepository
func (*PackageRepositories) Get ¶ added in v0.2.0
func (p *PackageRepositories) Get() ([]entity.PackageRepository, error)
Get fetches a list of PackageRepositories
type PackageRepository ¶ added in v0.2.0
type PackageRepository struct {
APIClient APIClient
}
PackageRepository implements api.PackageRepository
func (*PackageRepository) Delete ¶ added in v0.2.0
func (p *PackageRepository) Delete(id int) error
Delete deletes a given PackageRepository
func (*PackageRepository) Get ¶ added in v0.2.0
func (p *PackageRepository) Get(id int) (*entity.PackageRepository, error)
Get fetches a packageRepository
func (*PackageRepository) Update ¶ added in v0.2.0
func (p *PackageRepository) Update(id int, packageRepositoryParams *entity.PackageRepositoryParams) (*entity.PackageRepository, error)
Update updates a given PackageRepository
type RAID ¶
type RAID struct {
APIClient APIClient
}
RAID Contains functionality for manipulating the RAID entity.
type RAIDs ¶
type RAIDs struct {
APIClient APIClient
}
RAIDs contains functionality for manipulating the RAIDs entity.
type ResourcePool ¶
type ResourcePool struct {
APIClient APIClient
}
ResourcePool implements api.ResourcePool
func (*ResourcePool) Delete ¶
func (r *ResourcePool) Delete(id int) error
Delete deletes a given ResourcePool
func (*ResourcePool) DeleteByName ¶ added in v0.4.0
func (r *ResourcePool) DeleteByName(name string) error
DeleteByName deletes a given ResourcePool
func (*ResourcePool) Get ¶
func (r *ResourcePool) Get(id int) (*entity.ResourcePool, error)
Get fetches a given ResourcePool
func (*ResourcePool) GetByName ¶ added in v0.4.0
func (r *ResourcePool) GetByName(name string) (*entity.ResourcePool, error)
GetByName fetches a given ResourcePool
func (*ResourcePool) Update ¶
func (r *ResourcePool) Update(id int, params *entity.ResourcePoolParams) (*entity.ResourcePool, error)
Update updates a given ResourcePool
func (*ResourcePool) UpdateByName ¶ added in v0.4.0
func (r *ResourcePool) UpdateByName(name string, params *entity.ResourcePoolParams) (*entity.ResourcePool, error)
UpdateByName updates a given ResourcePool
type ResourcePools ¶
type ResourcePools struct {
APIClient APIClient
}
ResourcePools implements api.ResourcePools
func (*ResourcePools) Create ¶
func (r *ResourcePools) Create(params *entity.ResourcePoolParams) (*entity.ResourcePool, error)
Create creates a new ResourcePool
func (*ResourcePools) Get ¶
func (r *ResourcePools) Get() ([]entity.ResourcePool, error)
Get fetches a list of ResourcePool objects
type SSHKey ¶ added in v0.3.0
type SSHKey struct {
APIClient APIClient
}
SSHKey implements api.SSHKey
type SSHKeys ¶ added in v0.3.0
type SSHKeys struct {
APIClient APIClient
}
SSHKeys implements api.SSHKeys
type SSLKey ¶ added in v0.3.0
type SSLKey struct {
APIClient APIClient
}
SSLKey implements api.SSLKey
type SSLKeys ¶ added in v0.3.0
type SSLKeys struct {
APIClient APIClient
}
SSLKeys implements api.SSLKeys
type Spaces ¶
type Spaces struct {
APIClient APIClient
}
Spaces implements api.Spaces
type Subnet ¶
type Subnet struct {
APIClient APIClient
}
Subnet implements api.Subnet
func (*Subnet) GetIPAddresses ¶
GetIPAddresses fetches the allocated IPAddresses in the given subnet
func (*Subnet) GetReservedIPRanges ¶
func (s *Subnet) GetReservedIPRanges(id int) ([]subnet.ReservedIPRange, error)
GetReservedIPRanges fetches the reserved IPRange objects for the given Subnet
func (*Subnet) GetStatistics ¶
func (s *Subnet) GetStatistics(id int) (*subnet.Statistics, error)
GetStatistics gets the stats of the given subnet
func (*Subnet) GetUnreservedIPRanges ¶
GetUnreservedIPRanges gets the IPRange objects for allocation use
type Subnets ¶
type Subnets struct {
APIClient APIClient
}
Subnets contains functionality for manipulating the Subnets entity.
type Tag ¶
type Tag struct {
APIClient APIClient
}
Tag implements api.Tag
func (*Tag) AddMachines ¶
AddMachines adds a set of Machines to a given tag
func (*Tag) GetMachines ¶
GetMachines fetches a list of machines with a given tag
func (*Tag) RemoveMachines ¶
RemoveMachines removes a set of Machines
type Tags ¶
type Tags struct {
APIClient APIClient
}
Tags implements api.Tags
type Users ¶
type Users struct {
APIClient APIClient
}
Users implements api.Users
type VLAN ¶
type VLAN struct {
APIClient APIClient
}
VLAN implements api.VLAN
type VLANs ¶
type VLANs struct {
APIClient APIClient
}
VLANs implements api.VLANs
type VMHost ¶
type VMHost struct { APIClient APIClient // contains filtered or unexported fields }
VMHost contains functionality for manipulating the VMHost entity.
func (*VMHost) GetParameters ¶
GetParameters fetches the configured parameters of a given VMHost
type VMHosts ¶
type VMHosts struct {
APIClient APIClient
}
VMHosts contains functionality for manipulating the VMHosts entity.
type Zone ¶ added in v0.2.0
type Zone struct {
APIClient APIClient
}
Zone Contains functionality for manipulating the Zone entity.
Source Files ¶
- account.go
- bcache.go
- bcache_cache_set.go
- bcache_cache_sets.go
- bcaches.go
- block_device.go
- block_device_partition.go
- block_device_partitions.go
- block_devices.go
- boot_resource.go
- boot_resources.go
- boot_source.go
- boot_source_selection.go
- boot_source_selections.go
- boot_sources.go
- client.go
- device.go
- devices.go
- discoveries.go
- discovery.go
- dns_resource.go
- dns_resource_record.go
- dns_resource_records.go
- dns_resources.go
- domain.go
- domains.go
- events.go
- fabric.go
- fabrics.go
- ip_addresses.go
- ip_range.go
- ip_ranges.go
- maas_server.go
- machine.go
- machines.go
- network_interface.go
- network_interfaces.go
- node_device.go
- node_devices.go
- package_repositories.go
- package_repository.go
- raid.go
- raids.go
- resource_pool.go
- resource_pools.go
- space.go
- spaces.go
- ssh_key.go
- ssh_keys.go
- ssl_key.go
- ssl_keys.go
- subnet.go
- subnets.go
- tag.go
- tags.go
- user.go
- users.go
- utils.go
- vlan.go
- vlans.go
- vm_host.go
- vm_hosts.go
- zone.go
- zones.go