node

package
v0.0.0-...-d9482cb Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: Apache-2.0 Imports: 46 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TimeoutTask

func TimeoutTask(d time.Duration) func() (err error)

Types

type AlreadyExists

type AlreadyExists struct {
	Err string
}

NodeAlreadyExists custom error

func (*AlreadyExists) Error

func (n *AlreadyExists) Error() string

type ErrorMessage

type ErrorMessage struct {
	Message string `json:"message"`
}

ErrorMessage message struct for InspectorErr

type InspectorErr

type InspectorErr struct {
	Error ErrorMessage `json:"error"`
}

InspectorErr custom error struct for inspector callback errors

type Node

type Node struct {
	Name           string             `json:"name"`
	RemoteIP       string             `json:"remoteIP"`
	PrimaryIP      string             `json:"primaryIP"`
	UUID           string             `json:"uuid"`
	ProvisionState string             `json:"provisionState"`
	InstanceUUID   string             `json:"instanceUUID"`
	InstanceIPv4   string             `json:"instanceIP"`
	Host           string             `json:"host"`
	Tasks          []*netbox.Task     `json:"tasks"`
	Status         string             `json:"status"`
	PortGroupUUID  string             `json:"portGroupUUID"`
	ResourceClass  string             `json:"-"`
	IpamAddresses  []models.IPAddress `json:"-"`

	Updated time.Time `json:"-"`

	Redfish _redfish.Redfish `json:"-"`
	Netbox  *netbox.Netbox   `json:"-"`
	// contains filtered or unexported fields
}

func New

func New(name string, cfg config.Config) (n *Node, err error)

func (*Node) AddTask

func (n *Node) AddTask(service, taskName string) error

func (*Node) DeleteNode

func (n *Node) DeleteNode() (err error)

DeleteNode deletes a node via the baremetal api

func (*Node) DeleteTestInstance

func (n *Node) DeleteTestInstance() (err error)

DeleteTestInstance deletes the test instance via the nova api

func (*Node) MergeTaskWithContext

func (n *Node) MergeTaskWithContext(cfgCtx netbox.ConfigContext) error

func (*Node) Temper

func (n *Node) Temper(netboxSts bool, wg *sync.WaitGroup, limiter chan bool)

Jump to

Keyboard shortcuts

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