Documentation ¶
Index ¶
- type ContainerInterface
- type ContainerInterfaceSubnet
- type Controller
- func (c *Controller) CreateContainer(inst Instance, interfaces []ContainerInterface) error
- func (c *Controller) DefinedContainer(inst Instance) (bool, error)
- func (c *Controller) DeleteContainer(inst Instance) error
- func (c *Controller) RenameContainer(inst Instance, newName string) error
- func (c *Controller) UpdateContainer(inst Instance, interfaces []ContainerInterface) error
- type Instance
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerInterface ¶
type ContainerInterface struct { Name string MACAddress string Subnets []ContainerInterfaceSubnet }
ContainerInterface represents a MAAS connected network interface on the container.
type ContainerInterfaceSubnet ¶
ContainerInterfaceSubnet represents an interface's subscription to a MAAS subnet.
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller represents a MAAS server's machine functions.
func NewController ¶
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 ¶
func (c *Controller) CreateContainer(inst Instance, interfaces []ContainerInterface) error
CreateContainer defines a new MAAS device for the controller.
func (*Controller) DefinedContainer ¶
func (c *Controller) DefinedContainer(inst Instance) (bool, error)
DefinedContainer returns true if the container is defined in MAAS.
func (*Controller) DeleteContainer ¶
func (c *Controller) DeleteContainer(inst Instance) error
DeleteContainer removes the MAAS device for the container.
func (*Controller) RenameContainer ¶
func (c *Controller) RenameContainer(inst Instance, newName string) error
RenameContainer renames the MAAS device for the container without releasing any allocation.
func (*Controller) UpdateContainer ¶
func (c *Controller) UpdateContainer(inst Instance, interfaces []ContainerInterface) error
UpdateContainer updates the MAAS device's interfaces with the new provided state.