ufm

package
v0.0.0-...-d838790 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MembershipLimited = "limited"
	MembershipFull    = "full"
)
View Source
const PkeysPath = "/ufmRestV2/resources/pkeys"
View Source
const PortsPath = "/ufmRestV2/resources/ports"
View Source
const SystemsPath = "/ufmRestV2/resources/systems"

Variables

This section is empty.

Functions

func DoNothing

func DoNothing()

Types

type CreatePkeyData

type CreatePkeyData struct {
	Pkey         string  `json:"pkey"`
	Index0       string  `json:"index0,omitempty"`
	IpOverIb     bool    `json:"ip_over_ib,omitempty"`
	MtuLimit     int     `json:"mtu_limit,omitempty"`
	ServiceLevel int     `json:"service_level,omitempty"`
	RateLimit    float64 `json:"rate_limit,omitempty"`
}

type UfmClient

type UfmClient struct {
	Insecure      bool
	Username      string
	Password      string
	Endpoint      string
	CurrentCookie *http.Cookie
}

func GetClient

func GetClient(username string, password string, endpoint string, insecure bool, cookieFile string) (*UfmClient, error)

func (*UfmClient) Auth

func (u *UfmClient) Auth() error

func (*UfmClient) CreatePkey

func (u *UfmClient) CreatePkey(data *CreatePkeyData) error

func (*UfmClient) Get

func (u *UfmClient) Get(path string, queries []string) (*http.Response, error)

raw get with queries

func (*UfmClient) GetSystems

func (u *UfmClient) GetSystems(filters []string) (ret string, err error)

get all systems, pass in list of filters such as [ip=1.1.1.1, name=mycomputer,...]

func (*UfmClient) PkeyAddGuids

func (u *UfmClient) PkeyAddGuids(pkey string, index0 bool, ipoib bool, membership string, guids []string) (err error)

func (*UfmClient) PkeyList

func (u *UfmClient) PkeyList() (ret string, err error)

func (*UfmClient) PkeyRemoveGuids

func (u *UfmClient) PkeyRemoveGuids(pkey string, guids []string) (err error)

func (*UfmClient) PortsGet

func (u *UfmClient) PortsGet(portName string) (ret string, err error)

func (*UfmClient) PortsGetAll

func (u *UfmClient) PortsGetAll(filters string) (ret string, err error)

func (*UfmClient) PortsGetAllBrief

func (u *UfmClient) PortsGetAllBrief(filters string) (ret string, err error)

func (*UfmClient) Post

func (u *UfmClient) Post(path string, data io.Reader) (*http.Response, error)

raw put

Jump to

Keyboard shortcuts

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