lxd: github.com/lxc/lxd/lxd/maas Index | Files

package maas

import "github.com/lxc/lxd/lxd/maas"


Package Files


type ContainerInterface Uses

type ContainerInterface struct {
    Name       string
    MACAddress string
    Subnets    []ContainerInterfaceSubnet

ContainerInterface represents a MAAS connected network interface on the container

type ContainerInterfaceSubnet Uses

type ContainerInterfaceSubnet struct {
    Name    string
    Address string

ContainerInterfaceSubnet represents an interface's subscription to a MAAS subnet

type Controller Uses

type Controller struct {
    // contains filtered or unexported fields

Controller represents a MAAS server's machine functions

func NewController Uses

func NewController(url string, key string, machine string) (*Controller, error)

NewController returns a new Controller using the specific MAAS server and machine

func (*Controller) CreateContainer Uses

func (c *Controller) CreateContainer(inst Instance, interfaces []ContainerInterface) error

CreateContainer defines a new MAAS device for the controller

func (*Controller) DefinedContainer Uses

func (c *Controller) DefinedContainer(inst Instance) (bool, error)

DefinedContainer returns true if the container is defined in MAAS

func (*Controller) DeleteContainer Uses

func (c *Controller) DeleteContainer(inst Instance) error

DeleteContainer removes the MAAS device for the container

func (*Controller) RenameContainer Uses

func (c *Controller) RenameContainer(inst Instance, newName string) error

RenameContainer renames the MAAS device for the container without releasing any allocation

func (*Controller) UpdateContainer Uses

func (c *Controller) UpdateContainer(inst Instance, interfaces []ContainerInterface) error

UpdateContainer updates the MAAS device's interfaces with the new provided state

type Instance Uses

type Instance interface {
    Name() string
    Project() string

Instance is a MAAS specific instance interface. This is used rather than instance.Instance to avoid import loops.

Package maas imports 5 packages (graph) and is imported by 18 packages. Updated 2020-06-28. Refresh now. Tools for package owners.