module
Version:
v0.0.0-...-a2cb0ab
Opens a new window with list of versions in this module.
Published: Apr 24, 2023
License: Apache-2.0
Opens a new window with license information.
README
¶
Golang MAAS Client
This repository contains the following packages:
api
- defines an interface to each MAAS API endpoint.
entity
- defines types for the MAAS API endpoints' return types.
client
- contains the MAAS client source code.
Usage
import (
gomaasclient "github.com/pescobar/gomaasclient/client"
)
c, _ := gomaasclient.GetClient("<MAAS_URL>", "<API_KEY>", "2.0")
// List MAAS machines
machines, _ := c.Machines.Get()
// Get MAAS machine details
machine, _ := c.Machine.Get(machines[0].SystemID)
// List MAAS VM hosts
vmHosts, _ := c.VMHosts.Get()
Credit
This work was initially started by Brian Hazeltine (@onwsk8r) as part of his Terraform MAAS provider implementation.
Directories
¶
package api defines an interface to each MaaS API endpoint.
|
package api defines an interface to each MaaS API endpoint. |
|
|
package entity defines types for the MaaS API endpoints' return types.
|
package entity defines types for the MaaS API endpoints' return types. |
|
|
|
|
test
|
|
|
|
Click to show internal directories.
Click to hide internal directories.