f5_bigip

package
v0.0.0-...-3fb3ecb Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2023 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

View Source
const TmUriPrefix = "/mgmt/tm"

Variables

View Source
var (
	// slog                       *utils.SLOG
	ResOrder                   []string
	BIGIPiControlTimeCostTotal *prometheus.GaugeVec
	BIGIPiControlTimeCostCount *prometheus.GaugeVec
)

Functions

func GatherKinds

func GatherKinds(ocfg, ncfg *map[string]interface{}) []string

Types

type BIGIP

type BIGIP struct {
	Version       string
	URL           string
	Authorization string
	// contains filtered or unexported fields
}

func New

func New(url, user, password string) *BIGIP

type BIGIPContext

type BIGIPContext struct {
	BIGIP
	context.Context
}

func (*BIGIPContext) All

func (bc *BIGIPContext) All(kind string) (*map[string]interface{}, error)

func (*BIGIPContext) Arps

func (bc *BIGIPContext) Arps() (*map[string]string, error)

func (*BIGIPContext) CommitTrans

func (bc *BIGIPContext) CommitTrans(transId float64) error

func (*BIGIPContext) CreateSelf

func (bc *BIGIPContext) CreateSelf(name, address, vlan string) error

func (*BIGIPContext) CreateTunnel

func (bc *BIGIPContext) CreateTunnel(name, key, address, profile string) error

func (*BIGIPContext) CreateVxlanProfile

func (bc *BIGIPContext) CreateVxlanProfile(name, port string) error

func (*BIGIPContext) Delete

func (bc *BIGIPContext) Delete(kind, name, partition, subfolder string) error

func (*BIGIPContext) DeleteDataGroup

func (bc *BIGIPContext) DeleteDataGroup(dgkey string) error

func (*BIGIPContext) DeletePartition

func (bc *BIGIPContext) DeletePartition(name string) error

DeletePartition delete the specified partition if exists on BIG-IP

func (*BIGIPContext) Deploy

func (bc *BIGIPContext) Deploy(kind, name, partition, subfolder string, body map[string]interface{}) error

func (*BIGIPContext) DeployPartition

func (bc *BIGIPContext) DeployPartition(name string) error

DeployPartition create the specified partition if not exists on BIG-IP

func (*BIGIPContext) DeployWithTrans

func (bc *BIGIPContext) DeployWithTrans(rr *[]RestRequest, transId float64) (int, error)

func (*BIGIPContext) DoRestRequests

func (bc *BIGIPContext) DoRestRequests(rr *[]RestRequest) error

func (*BIGIPContext) Exist

func (bc *BIGIPContext) Exist(kind, name, partition, subfolder string) (*map[string]interface{}, error)

func (*BIGIPContext) Fdbs

func (bc *BIGIPContext) Fdbs(tunnelName string) (*map[string]string, error)

func (*BIGIPContext) GenRestRequests

func (bc *BIGIPContext) GenRestRequests(partition string, ocfg, ncfg *map[string]interface{}) (*[]RestRequest, error)

GenRestRequests generate a list of rest requests, each item is type of RestRequest GenRestRequests will compare the passed ocfg and ncfg, and in addition the actual states got from BIG-IP, and concludes into a list of RestRequests indicating which resource needs to be POST, PATCH or DELETE, and in which order. The generated []RestRequest will be used by DoRestRequests function for execution in trasaction mode.

func (*BIGIPContext) GetExistingResources

func (bc *BIGIPContext) GetExistingResources(partition string, kinds []string) (*map[string]map[string]interface{}, error)

func (*BIGIPContext) ListPartitions

func (bc *BIGIPContext) ListPartitions() ([]string, error)

func (*BIGIPContext) LoadDataGroup

func (bc *BIGIPContext) LoadDataGroup(dgkey string) (*PersistedConfig, error)

func (*BIGIPContext) MakeTrans

func (bc *BIGIPContext) MakeTrans() (float64, error)

func (*BIGIPContext) Members

func (bc *BIGIPContext) Members(poolname string, partition string, subfolder string) ([]string, error)

func (*BIGIPContext) ModifyDbValue

func (bc *BIGIPContext) ModifyDbValue(name, value string) error

func (*BIGIPContext) Ndps

func (bc *BIGIPContext) Ndps() (*map[string]string, error)

func (*BIGIPContext) SaveDataGroup

func (bc *BIGIPContext) SaveDataGroup(dgkey string, pc *PersistedConfig) error

func (*BIGIPContext) SaveSysConfig

func (bc *BIGIPContext) SaveSysConfig(partitions []string) error

func (*BIGIPContext) Tmsh

func (bc *BIGIPContext) Tmsh(cmd string) (*map[string]interface{}, error)

func (*BIGIPContext) Update

func (bc *BIGIPContext) Update(kind, name, partition, subfolder string, body map[string]interface{}) error

func (*BIGIPContext) Upload

func (bc *BIGIPContext) Upload(name, content string) (string, error)

type BIGIPVersion

type BIGIPVersion struct {
	Build   string
	Date    string
	Edition string
	Product string
	Title   string
	Version string
}

type PersistedConfig

type PersistedConfig struct {
	AS3   string
	Rest  string
	CmKey string
	PsMap map[string]interface{}
}

type RestRequest

type RestRequest struct {
	ResName   string
	Partition string
	Subfolder string
	Kind      string

	Method     string
	ResUri     string
	Headers    map[string]interface{}
	Body       interface{}
	WithTrans  bool
	ScheduleIt string
}

Jump to

Keyboard shortcuts

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