virtualization

package
v0.0.0-...-7194a8b Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2025 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	common.Client
}

func New deprecated

func New(baseURL, authToken string, insecureSkipVerify bool) (*Client, error)

Deprecated: Use NewClient() function instead.

func (*Client) CreateVMInterface

func (c *Client) CreateVMInterface(vmni models.WritableVMInterface) (*models.VMInterface, error)

func (*Client) CreateVirtualMachine

func (c *Client) CreateVirtualMachine(vm models.WriteableVirtualMachine) (*models.VirtualMachine, error)

func (*Client) DeleteVMInterface

func (c *Client) DeleteVMInterface(id int) error

func (*Client) DeleteVirtualMachine

func (c *Client) DeleteVirtualMachine(id int) error

func (*Client) GetVMInterface

func (c *Client) GetVMInterface(id int) (*models.VMInterface, error)

func (*Client) GetVirtualMachine

func (c *Client) GetVirtualMachine(id int) (*models.VirtualMachine, error)

func (*Client) ListClusters

func (c *Client) ListClusters(opts models.ListClusterRequest) (*models.ListClusterResponse, error)

func (*Client) ListVMInterfaces

func (*Client) UpdateVMInterface

func (c *Client) UpdateVMInterface(vmi models.WritableVMInterface) (*models.VMInterface, error)

func (*Client) UpdateVirtualMachine

func (c *Client) UpdateVirtualMachine(vm models.WriteableVirtualMachine) (*models.VirtualMachine, error)

type NetboxAPI

type NetboxAPI interface {
	common.HTTPConnectable

	// cluster
	ListClusters(opts models.ListClusterRequest) (*models.ListClusterResponse, error)

	// virtual machines
	CreateVirtualMachine(vm models.WriteableVirtualMachine) (*models.VirtualMachine, error)
	UpdateVirtualMachine(vm models.WriteableVirtualMachine) (*models.VirtualMachine, error)
	DeleteVirtualMachine(id int) error
	GetVirtualMachine(id int) (*models.VirtualMachine, error)
	ListVirtualMachines(opts models.ListVirtualMachinesRequest) (*models.ListVirtualMachinesResponse, error)

	// vm interfaces
	CreateVMInterface(vmni models.WritableVMInterface) (*models.VMInterface, error)
	UpdateVMInterface(vmi models.WritableVMInterface) (*models.VMInterface, error)
	DeleteVMInterface(id int) error
	ListVMInterfaces(opts models.ListVMInterfacesRequest) (*models.ListVMInterfacesResponse, error)
	GetVMInterface(id int) (*models.VMInterface, error)
}

func NewClient

func NewClient(baseURL, authToken string, insecureSkipVerify bool) (NetboxAPI, error)

Jump to

Keyboard shortcuts

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