bigip

package module
v0.0.0-...-0b3ffd4 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2016 License: MIT Imports: 9 Imported by: 0

README

go-bigip

GoDoc Travis-CI license

A Go package that interacts with F5 BIG-IP systems using the REST API.

Some of the tasks you can do are as follows:

  • Get a detailed list of all nodes, pools, vlans, routes, trunks, route domains, self IP's, virtual servers, monitors on the BIG-IP system.
  • Create/delete nodes, pools, vlans, routes, trunks, route domains, self IP's, virtual servers, monitors, etc.
  • Modify individual settings for all of the above.
  • Change the status of nodes and individual pool members (enable/disable).

Note: You must be on version 11.4+

Examples & Documentation

Visit the GoDoc page for package documentation and examples.

Here's a blog post that goes a little more in-depth.

Contributors

A very special thanks to the following who have helped contribute to this software!

Documentation

Overview

Package bigip interacts with F5 BIG-IP systems using the REST API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIRequest

type APIRequest struct {
	Method      string
	URL         string
	Body        string
	ContentType string
}

APIRequest builds our request before sending it to the server.

type BigIP

type BigIP struct {
	Host      string
	User      string
	Password  string
	Token     string // if set, will be used instead of User/Password
	Transport *http.Transport
}

BigIP is a container for our session state.

func NewSession

func NewSession(host, user, passwd string) *BigIP

NewSession sets up our connection to the BIG-IP system.

func NewTokenSession

func NewTokenSession(host, user, passwd, loginProviderName string) (b *BigIP, err error)

NewTokenSession sets up our connection to the BIG-IP system, and instructs the session to use token authentication instead of Basic Auth. This is required when using an external authentication provider, such as Radius or Active Directory. loginProviderName is probably "tmos" but your environment may vary.

func (*BigIP) APICall

func (b *BigIP) APICall(options *APIRequest) ([]byte, error)

APICall is used to query the BIG-IP web API.

func (*BigIP) AddInterfaceToVlan

func (b *BigIP) AddInterfaceToVlan(vlan, iface string, tagged bool) error

AddInterfaceToVlan associates the given interface to the specified VLAN.

func (*BigIP) AddMonitorToPool

func (b *BigIP) AddMonitorToPool(monitor, pool string) error

AddMonitorToPool assigns the monitor, <monitor> to the given <pool>.

func (*BigIP) AddPoolMember

func (b *BigIP) AddPoolMember(pool, partition string, member string) error

AddPoolMember adds a node/member to the given pool. <member> must be in the form of <node>:<port>, i.e.: "web-server1:443".

func (*BigIP) CreateIRule

func (b *BigIP) CreateIRule(name, rule string) error

CreateIRule creates a new iRule on the system.

func (*BigIP) CreateMonitor

func (b *BigIP) CreateMonitor(name, parent string, interval, timeout int, send, receive string, partition string) error

CreateMonitor adds a new monitor to the BIG-IP system. <parent> must be one of "http", "https", "icmp", or "gateway icmp".

func (*BigIP) CreateNode

func (b *BigIP) CreateNode(name, partition string, address string) error

CreateNode adds a new node to the BIG-IP system.

func (*BigIP) CreatePolicy

func (b *BigIP) CreatePolicy(p *Policy) error

Create a new policy. It is not necessary to set the Ordinal fields on subcollections.

func (*BigIP) CreatePool

func (b *BigIP) CreatePool(name string, partition string) error

CreatePool adds a new pool to the BIG-IP system.

func (*BigIP) CreateRoute

func (b *BigIP) CreateRoute(name, dest, gateway string) error

CreateRoute adds a new static route to the BIG-IP system. <dest> must include the subnet mask in CIDR notation, i.e.: "10.1.1.0/24".

func (*BigIP) CreateRouteDomain

func (b *BigIP) CreateRouteDomain(name string, id int, strict bool, vlans string) error

CreateRouteDomain adds a new route domain to the BIG-IP system. <vlans> must be separated by a comma, i.e.: "vlan1010, vlan1020".

func (*BigIP) CreateSelfIP

func (b *BigIP) CreateSelfIP(name, address, vlan string) error

CreateSelfIP adds a new self IP to the BIG-IP system. For <address>, you must include the subnet mask in CIDR notation, i.e.: "10.1.1.1/24".

func (*BigIP) CreateTrunk

func (b *BigIP) CreateTrunk(name, interfaces string, lacp bool) error

CreateTrunk adds a new trunk to the BIG-IP system. <interfaces> must be separated by a comma, i.e.: "1.4, 1.6, 1.8".

func (*BigIP) CreateVirtualServer

func (b *BigIP) CreateVirtualServer(name, destination, mask, pool string, port int, partition string) error

CreateVirtualServer adds a new virtual server to the BIG-IP system. <mask> can either be in CIDR notation or decimal, i.e.: "24" or "255.255.255.0". A CIDR mask of "0" is the same as "0.0.0.0".

func (*BigIP) CreateVlan

func (b *BigIP) CreateVlan(name string, tag int) error

CreateVlan adds a new VLAN to the BIG-IP system.

func (*BigIP) DeleteIRule

func (b *BigIP) DeleteIRule(name string) error

DeleteIRule removes an iRule from the system.

func (*BigIP) DeleteMonitor

func (b *BigIP) DeleteMonitor(name, partition string, parent string) error

DeleteMonitor removes a monitor.

func (*BigIP) DeleteNode

func (b *BigIP) DeleteNode(name string, partition string) error

DeleteNode removes a node.

func (*BigIP) DeletePolicy

func (b *BigIP) DeletePolicy(name string) error

func (*BigIP) DeletePool

func (b *BigIP) DeletePool(name string, partition string) error

DeletePool removes a pool.

func (*BigIP) DeletePoolMember

func (b *BigIP) DeletePoolMember(pool, partition string, member string) error

DeletePoolMember removes a member from the given pool. <member> must be in the form of <node>:<port>, i.e.: "web-server1:443".

func (*BigIP) DeleteRoute

func (b *BigIP) DeleteRoute(name string) error

DeleteRoute removes a static route.

func (*BigIP) DeleteRouteDomain

func (b *BigIP) DeleteRouteDomain(name string) error

DeleteRouteDomain removes a route domain.

func (*BigIP) DeleteSelfIP

func (b *BigIP) DeleteSelfIP(name string) error

DeleteSelfIP removes a self IP.

func (*BigIP) DeleteTrunk

func (b *BigIP) DeleteTrunk(name string) error

DeleteTrunk removes a trunk.

func (*BigIP) DeleteVirtualServer

func (b *BigIP) DeleteVirtualServer(name string, partition string) error

DeleteVirtualServer removes a virtual server.

func (*BigIP) DeleteVlan

func (b *BigIP) DeleteVlan(name string) error

DeleteVlan removes a vlan.

func (*BigIP) GetNode

func (b *BigIP) GetNode(name string, partition string) (*Node, error)

Get a Node by name. Returns nil if the node does not exist

func (*BigIP) GetPolicy

func (b *BigIP) GetPolicy(name string) (*Policy, error)

Load a fully policy definition. Policies seem to be best dealt with as one big entity.

func (*BigIP) GetPool

func (b *BigIP) GetPool(name string, partition string) (*Pool, error)

Get a Pool by name. Returns nil if the Pool does not exist

func (*BigIP) GetVirtualServer

func (b *BigIP) GetVirtualServer(name string, partition string) (*VirtualServer, error)

Get a VirtualServer by name. Returns nil if the VirtualServer does not exist

func (*BigIP) IRule

func (b *BigIP) IRule(name string) (*IRule, error)

IRule returns information about the given iRule.

func (*BigIP) IRules

func (b *BigIP) IRules() (*IRules, error)

IRules returns a list of irules

func (*BigIP) Interfaces

func (b *BigIP) Interfaces() (*Interfaces, error)

Interfaces returns a list of interfaces.

func (*BigIP) ModifyIRule

func (b *BigIP) ModifyIRule(name string, irule *IRule) error

ModifyIRule updates the given iRule with any changed values.

func (*BigIP) ModifyMonitor

func (b *BigIP) ModifyMonitor(name, partition string, parent string, config *Monitor) error

ModifyMonitor allows you to change any attribute of a monitor. <parent> must be one of "http", "https", "icmp", or "gateway icmp". Fields that can be modified are referenced in the Monitor struct.

func (*BigIP) ModifyNode

func (b *BigIP) ModifyNode(name string, partition string, config *Node) error

ModifyNode allows you to change any attribute of a node. Fields that can be modified are referenced in the Node struct.

func (*BigIP) ModifyPool

func (b *BigIP) ModifyPool(name string, partition string, config *Pool) error

ModifyPool allows you to change any attribute of a pool. Fields that can be modified are referenced in the Pool struct.

func (*BigIP) ModifyRoute

func (b *BigIP) ModifyRoute(name string, config *Route) error

ModifyRoute allows you to change any attribute of a static route. Fields that can be modified are referenced in the Route struct.

func (*BigIP) ModifyRouteDomain

func (b *BigIP) ModifyRouteDomain(name string, config *RouteDomain) error

ModifyRouteDomain allows you to change any attribute of a route domain. Fields that can be modified are referenced in the RouteDomain struct.

func (*BigIP) ModifySelfIP

func (b *BigIP) ModifySelfIP(name string, config *SelfIP) error

ModifySelfIP allows you to change any attribute of a self IP. Fields that can be modified are referenced in the SelfIP struct.

func (*BigIP) ModifyTrunk

func (b *BigIP) ModifyTrunk(name string, config *Trunk) error

ModifyTrunk allows you to change any attribute of a trunk. Fields that can be modified are referenced in the Trunk struct.

func (*BigIP) ModifyVirtualAddress

func (b *BigIP) ModifyVirtualAddress(vaddr string, config *VirtualAddress) error

ModifyVirtualAddress allows you to change any attribute of a virtual address. Fields that can be modified are referenced in the VirtualAddress struct.

func (*BigIP) ModifyVirtualServer

func (b *BigIP) ModifyVirtualServer(name string, partition string, config *VirtualServer) error

ModifyVirtualServer allows you to change any attribute of a virtual server. Fields that can be modified are referenced in the VirtualServer struct.

func (*BigIP) ModifyVlan

func (b *BigIP) ModifyVlan(name string, config *Vlan) error

ModifyVlan allows you to change any attribute of a VLAN. Fields that can be modified are referenced in the Vlan struct.

func (*BigIP) Monitors

func (b *BigIP) Monitors() ([]Monitor, error)

Monitors returns a list of all TCP, HTTP, HTTPS, Gateway ICMP, and ICMP monitors.

func (*BigIP) NodeStatus

func (b *BigIP) NodeStatus(name, partition string, state string) error

NodeStatus changes the status of a node. <state> can be either "enable" or "disable".

func (*BigIP) Nodes

func (b *BigIP) Nodes() (*Nodes, error)

Nodes returns a list of nodes.

func (*BigIP) Policies

func (b *BigIP) Policies() (*Policies, error)

func (*BigIP) PoolMemberStatus

func (b *BigIP) PoolMemberStatus(pool, partition string, member, state string) error

PoolMemberStatus changes the status of a pool member. <state> can be either "enable" or "disable". <member> must be in the form of <node>:<port>, i.e.: "web-server1:443".

func (*BigIP) PoolMembers

func (b *BigIP) PoolMembers(name string, partition string) ([]string, error)

PoolMembers returns a list of pool members for the given pool.

func (*BigIP) Pools

func (b *BigIP) Pools() (*Pools, error)

Pools returns a list of pools.

func (*BigIP) RouteDomains

func (b *BigIP) RouteDomains() (*RouteDomains, error)

RouteDomains returns a list of route domains.

func (*BigIP) Routes

func (b *BigIP) Routes() (*Routes, error)

Routes returns a list of routes.

func (*BigIP) SafeGet

func (b *BigIP) SafeGet(url string) ([]byte, error)

Perform a GET request and treat 404's as nil objects instead of errors.

func (*BigIP) SelfIPs

func (b *BigIP) SelfIPs() (*SelfIPs, error)

SelfIPs returns a list of self IP's.

func (*BigIP) Trunks

func (b *BigIP) Trunks() (*Trunks, error)

Trunks returns a list of trunks.

func (*BigIP) UpdatePolicy

func (b *BigIP) UpdatePolicy(name string, p *Policy) error

Update an existing policy.

func (*BigIP) VirtualAddressStatus

func (b *BigIP) VirtualAddressStatus(vaddr, state string) error

VirtualAddressStatus changes the status of a virtual address. <state> can be either "enable" or "disable".

func (*BigIP) VirtualAddresses

func (b *BigIP) VirtualAddresses() (*VirtualAddresses, error)

VirtualAddresses returns a list of virtual addresses.

func (*BigIP) VirtualServerProfiles

func (b *BigIP) VirtualServerProfiles(vs string, partition string) (*Profiles, error)

VirtualServerProfiles gets the profiles currently associated with a virtual server.

func (*BigIP) VirtualServers

func (b *BigIP) VirtualServers() (*VirtualServers, error)

VirtualServers returns a list of virtual servers.

func (*BigIP) Vlans

func (b *BigIP) Vlans() (*Vlans, error)

Vlans returns a list of vlans.

type IRule

type IRule struct {
	Name      string `json:"name,omitempty"`
	Partition string `json:"partition,omitempty"`
	Rule      string `json:"apiAnonymous,omitempty"`
}

type IRules

type IRules struct {
	IRules []IRule `json:"items"`
}

type Interface

type Interface struct {
	Name              string `json:"name,omitempty"`
	FullPath          string `json:"fullPath,omitempty"`
	Generation        int    `json:"generation,omitempty"`
	Bundle            string `json:"bundle,omitempty"`
	Enabled           bool   `json:"enabled,omitempty"`
	FlowControl       string `json:"flowControl,omitempty"`
	ForceGigabitFiber string `json:"forceGigabitFiber,omitempty"`
	IfIndex           int    `json:"ifIndex,omitempty"`
	LLDPAdmin         string `json:"lldpAdmin,omitempty"`
	LLDPTlvmap        int    `json:"lldpTlvmap,omitempty"`
	MACAddress        string `json:"macAddress,omitempty"`
	MediaActive       string `json:"mediaActive,omitempty"`
	MediaFixed        string `json:"mediaFixed,omitempty"`
	MediaMax          string `json:"mediaMax,omitempty"`
	MediaSFP          string `json:"mediaSfp,omitempty"`
	MTU               int    `json:"mtu,omitempty"`
	PreferPort        string `json:"preferPort,omitempty"`
	SFlow             struct {
		PollInterval       int    `json:"pollInterval,omitempty"`
		PollIntervalGlobal string `json:"pollIntervalGlobal,omitempty"`
	} `json:"sflow,omitempty"`
	STP             string `json:"stp,omitempty"`
	STPAutoEdgePort string `json:"stpAutoEdgePort,omitempty"`
	STPEdgePort     string `json:"stpEdgePort,omitempty"`
	STPLinkType     string `json:"stpLinkType,omitempty"`
}

Interface contains information about each individual interface.

type Interfaces

type Interfaces struct {
	Interfaces []Interface `json:"items"`
}

Interfaces contains a list of every interface on the BIG-IP system.

type Monitor

type Monitor struct {
	Name           string
	Partition      string
	FullPath       string
	Generation     int
	ParentMonitor  string
	Description    string
	Destination    string
	Interval       int
	IPDSCP         int
	ManualResume   bool
	ReceiveString  string
	ReceiveDisable string
	Reverse        bool
	SendString     string
	TimeUntilUp    int
	Timeout        int
	Transparent    bool
	UpInterval     int
}

Monitor contains information about each individual monitor.

func (*Monitor) MarshalJSON

func (p *Monitor) MarshalJSON() ([]byte, error)

func (*Monitor) UnmarshalJSON

func (p *Monitor) UnmarshalJSON(b []byte) error

type Monitors

type Monitors struct {
	Monitors []Monitor `json:"items"`
}

Monitors contains a list of all monitors on the BIG-IP system.

type Node

type Node struct {
	Name            string `json:"name,omitempty"`
	Partition       string `json:"partition,omitempty"`
	FullPath        string `json:"fullPath,omitempty"`
	Generation      int    `json:"generation,omitempty"`
	Address         string `json:"address,omitempty"`
	ConnectionLimit int    `json:"connectionLimit,omitempty"`
	DynamicRatio    int    `json:"dynamicRatio,omitempty"`
	Logging         string `json:"logging,omitempty"`
	Monitor         string `json:"monitor,omitempty"`
	RateLimit       string `json:"rateLimit,omitempty"`
	Ratio           int    `json:"ratio,omitempty"`
	Session         string `json:"session,omitempty"`
	State           string `json:"state,omitempty"`
}

Node contains information about each individual node. You can use all of these fields when modifying a node.

type Nodes

type Nodes struct {
	Nodes []Node `json:"items"`
}

Nodes contains a list of every node on the BIG-IP system.

type Policies

type Policies struct {
	Policies []Policy `json:"items"`
}

type Policy

type Policy struct {
	Name      string
	Partition string
	Controls  []string
	Requires  []string
	Strategy  string
	Rules     []PolicyRule
}

func (*Policy) MarshalJSON

func (p *Policy) MarshalJSON() ([]byte, error)

func (*Policy) UnmarshalJSON

func (p *Policy) UnmarshalJSON(b []byte) error

type PolicyRule

type PolicyRule struct {
	Name       string
	Ordinal    int
	Conditions []PolicyRuleCondition
	Actions    []PolicyRuleAction
}

func (*PolicyRule) MarshalJSON

func (p *PolicyRule) MarshalJSON() ([]byte, error)

func (*PolicyRule) UnmarshalJSON

func (p *PolicyRule) UnmarshalJSON(b []byte) error

type PolicyRuleAction

type PolicyRuleAction struct {
	Name               string `json:"name,omitempty"`
	AppService         string `json:"appService,omitempty"`
	Application        string `json:"application,omitempty"`
	Asm                bool   `json:"asm,omitempty"`
	Avr                bool   `json:"avr,omitempty"`
	Cache              bool   `json:"cache,omitempty"`
	Carp               bool   `json:"carp,omitempty"`
	Category           string `json:"category,omitempty"`
	Classify           bool   `json:"classify,omitempty"`
	ClonePool          string `json:"clonePool,omitempty"`
	Code               int    `json:"code,omitempty"`
	Compress           bool   `json:"compress,omitempty"`
	Content            string `json:"content,omitempty"`
	CookieHash         bool   `json:"cookieHash,omitempty"`
	CookieInsert       bool   `json:"cookieInsert,omitempty"`
	CookiePassive      bool   `json:"cookiePassive,omitempty"`
	CookieRewrite      bool   `json:"cookieRewrite,omitempty"`
	Decompress         bool   `json:"decompress,omitempty"`
	Defer              bool   `json:"defer,omitempty"`
	DestinationAddress bool   `json:"destinationAddress,omitempty"`
	Disable            bool   `json:"disable,omitempty"`
	Domain             string `json:"domain,omitempty"`
	Enable             bool   `json:"enable,omitempty"`
	Expiry             string `json:"expiry,omitempty"`
	ExpirySecs         int    `json:"expirySecs,omitempty"`
	Expression         string `json:"expression,omitempty"`
	Extension          string `json:"extension,omitempty"`
	Facility           string `json:"facility,omitempty"`
	Forward            bool   `json:"forward,omitempty"`
	FromProfile        string `json:"fromProfile,omitempty"`
	Hash               bool   `json:"hash,omitempty"`
	Host               string `json:"host,omitempty"`
	Http               bool   `json:"http,omitempty"`
	HttpBasicAuth      bool   `json:"httpBasicAuth,omitempty"`
	HttpCookie         bool   `json:"httpCookie,omitempty"`
	HttpHeader         bool   `json:"httpHeader,omitempty"`
	HttpHost           bool   `json:"httpHost,omitempty"`
	HttpReferer        bool   `json:"httpReferer,omitempty"`
	HttpReply          bool   `json:"httpReply,omitempty"`
	HttpSetCookie      bool   `json:"httpSetCookie,omitempty"`
	HttpUri            bool   `json:"httpUri,omitempty"`
	Ifile              string `json:"ifile,omitempty"`
	Insert             bool   `json:"insert,omitempty"`
	InternalVirtual    string `json:"internalVirtual,omitempty"`
	IpAddress          string `json:"ipAddress,omitempty"`
	Key                string `json:"key,omitempty"`
	L7dos              bool   `json:"l7dos,omitempty"`
	Length             int    `json:"length,omitempty"`
	Location           string `json:"location,omitempty"`
	Log                bool   `json:"log,omitempty"`
	LtmPolicy          bool   `json:"ltmPolicy,omitempty"`
	Member             string `json:"member,omitempty"`
	Message            string `json:"message,omitempty"`
	TmName             string `json:"tmName,omitempty"`
	Netmask            string `json:"netmask,omitempty"`
	Nexthop            string `json:"nexthop,omitempty"`
	Node               string `json:"node,omitempty"`
	Offset             int    `json:"offset,omitempty"`
	Path               string `json:"path,omitempty"`
	Pem                bool   `json:"pem,omitempty"`
	Persist            bool   `json:"persist,omitempty"`
	Pin                bool   `json:"pin,omitempty"`
	Policy             string `json:"policy,omitempty"`
	Pool               string `json:"pool,omitempty"`
	Port               int    `json:"port,omitempty"`
	Priority           string `json:"priority,omitempty"`
	Profile            string `json:"profile,omitempty"`
	Protocol           string `json:"protocol,omitempty"`
	QueryString        string `json:"queryString,omitempty"`
	Rateclass          string `json:"rateclass,omitempty"`
	Redirect           bool   `json:"redirect,omitempty"`
	Remove             bool   `json:"remove,omitempty"`
	Replace            bool   `json:"replace,omitempty"`
	Request            bool   `json:"request,omitempty"`
	RequestAdapt       bool   `json:"requestAdapt,omitempty"`
	Reset              bool   `json:"reset,omitempty"`
	Response           bool   `json:"response,omitempty"`
	ResponseAdapt      bool   `json:"responseAdapt,omitempty"`
	Scheme             string `json:"scheme,omitempty"`
	Script             string `json:"script,omitempty"`
	Select             bool   `json:"select,omitempty"`
	ServerSsl          bool   `json:"serverSsl,omitempty"`
	SetVariable        bool   `json:"setVariable,omitempty"`
	Snat               string `json:"snat,omitempty"`
	Snatpool           string `json:"snatpool,omitempty"`
	SourceAddress      bool   `json:"sourceAddress,omitempty"`
	SslClientHello     bool   `json:"sslClientHello,omitempty"`
	SslServerHandshake bool   `json:"sslServerHandshake,omitempty"`
	SslServerHello     bool   `json:"sslServerHello,omitempty"`
	SslSessionId       bool   `json:"sslSessionId,omitempty"`
	Status             int    `json:"status,omitempty"`
	Tcl                bool   `json:"tcl,omitempty"`
	TcpNagle           bool   `json:"tcpNagle,omitempty"`
	Text               string `json:"text,omitempty"`
	Timeout            int    `json:"timeout,omitempty"`
	Uie                bool   `json:"uie,omitempty"`
	Universal          bool   `json:"universal,omitempty"`
	Value              string `json:"value,omitempty"`
	Virtual            string `json:"virtual,omitempty"`
	Vlan               string `json:"vlan,omitempty"`
	VlanId             int    `json:"vlanId,omitempty"`
	Wam                bool   `json:"wam,omitempty"`
	Write              bool   `json:"write,omitempty"`
}

type PolicyRuleActions

type PolicyRuleActions struct {
	Items []PolicyRuleAction `json:"items"`
}

type PolicyRuleCondition

type PolicyRuleCondition struct {
	Name                  string   `json:"name,omitempty"`
	Generation            int      `json:"generation,omitempty"`
	Address               bool     `json:"address,omitempty"`
	All                   bool     `json:"all,omitempty"`
	AppService            string   `json:"appService,omitempty"`
	BrowserType           bool     `json:"browserType,omitempty"`
	BrowserVersion        bool     `json:"browserVersion,omitempty"`
	CaseInsensitive       bool     `json:"caseInsensitive,omitempty"`
	CaseSensitive         bool     `json:"caseSensitive,omitempty"`
	Cipher                bool     `json:"cipher,omitempty"`
	CipherBits            bool     `json:"cipherBits,omitempty"`
	ClientSsl             bool     `json:"clientSsl,omitempty"`
	Code                  bool     `json:"code,omitempty"`
	CommonName            bool     `json:"commonName,omitempty"`
	Contains              bool     `json:"contains,omitempty"`
	Continent             bool     `json:"continent,omitempty"`
	CountryCode           bool     `json:"countryCode,omitempty"`
	CountryName           bool     `json:"countryName,omitempty"`
	CpuUsage              bool     `json:"cpuUsage,omitempty"`
	DeviceMake            bool     `json:"deviceMake,omitempty"`
	DeviceModel           bool     `json:"deviceModel,omitempty"`
	Domain                bool     `json:"domain,omitempty"`
	EndsWith              bool     `json:"endsWith,omitempty"`
	Equals                bool     `json:"equals,omitempty"`
	Expiry                bool     `json:"expiry,omitempty"`
	Extension             bool     `json:"extension,omitempty"`
	External              bool     `json:"external,omitempty"`
	Geoip                 bool     `json:"geoip,omitempty"`
	Greater               bool     `json:"greater,omitempty"`
	GreaterOrEqual        bool     `json:"greaterOrEqual,omitempty"`
	Host                  bool     `json:"host,omitempty"`
	HttpBasicAuth         bool     `json:"httpBasicAuth,omitempty"`
	HttpCookie            bool     `json:"httpCookie,omitempty"`
	HttpHeader            bool     `json:"httpHeader,omitempty"`
	HttpHost              bool     `json:"httpHost,omitempty"`
	HttpMethod            bool     `json:"httpMethod,omitempty"`
	HttpReferer           bool     `json:"httpReferer,omitempty"`
	HttpSetCookie         bool     `json:"httpSetCookie,omitempty"`
	HttpStatus            bool     `json:"httpStatus,omitempty"`
	HttpUri               bool     `json:"httpUri,omitempty"`
	HttpUserAgent         bool     `json:"httpUserAgent,omitempty"`
	HttpVersion           bool     `json:"httpVersion,omitempty"`
	Index                 int      `json:"index,omitempty"`
	Internal              bool     `json:"internal,omitempty"`
	Isp                   bool     `json:"isp,omitempty"`
	Last_15secs           bool     `json:"last_15secs,omitempty"`
	Last_1min             bool     `json:"last_1min,omitempty"`
	Last_5mins            bool     `json:"last_5mins,omitempty"`
	Less                  bool     `json:"less,omitempty"`
	LessOrEqual           bool     `json:"lessOrEqual,omitempty"`
	Local                 bool     `json:"local,omitempty"`
	Major                 bool     `json:"major,omitempty"`
	Matches               bool     `json:"matches,omitempty"`
	Minor                 bool     `json:"minor,omitempty"`
	Missing               bool     `json:"missing,omitempty"`
	Mss                   bool     `json:"mss,omitempty"`
	TmName                string   `json:"tmName,omitempty"`
	Not                   bool     `json:"not,omitempty"`
	Org                   bool     `json:"org,omitempty"`
	Password              bool     `json:"password,omitempty"`
	Path                  bool     `json:"path,omitempty"`
	PathSegment           bool     `json:"pathSegment,omitempty"`
	Port                  bool     `json:"port,omitempty"`
	Present               bool     `json:"present,omitempty"`
	Protocol              bool     `json:"protocol,omitempty"`
	QueryParameter        bool     `json:"queryParameter,omitempty"`
	QueryString           bool     `json:"queryString,omitempty"`
	RegionCode            bool     `json:"regionCode,omitempty"`
	RegionName            bool     `json:"regionName,omitempty"`
	Remote                bool     `json:"remote,omitempty"`
	Request               bool     `json:"request,omitempty"`
	Response              bool     `json:"response,omitempty"`
	RouteDomain           bool     `json:"routeDomain,omitempty"`
	Rtt                   bool     `json:"rtt,omitempty"`
	Scheme                bool     `json:"scheme,omitempty"`
	ServerName            bool     `json:"serverName,omitempty"`
	SslCert               bool     `json:"sslCert,omitempty"`
	SslClientHello        bool     `json:"sslClientHello,omitempty"`
	SslExtension          bool     `json:"sslExtension,omitempty"`
	SslServerHandshake    bool     `json:"sslServerHandshake,omitempty"`
	SslServerHello        bool     `json:"sslServerHello,omitempty"`
	StartsWith            bool     `json:"startsWith,omitempty"`
	Tcp                   bool     `json:"tcp,omitempty"`
	Text                  bool     `json:"text,omitempty"`
	UnnamedQueryParameter bool     `json:"unnamedQueryParameter,omitempty"`
	UserAgentToken        bool     `json:"userAgentToken,omitempty"`
	Username              bool     `json:"username,omitempty"`
	Value                 bool     `json:"value,omitempty"`
	Values                []string `json:"values,omitempty"`
	Version               bool     `json:"version,omitempty"`
	Vlan                  bool     `json:"vlan,omitempty"`
	VlanId                bool     `json:"vlanId,omitempty"`
}

type PolicyRuleConditions

type PolicyRuleConditions struct {
	Items []PolicyRuleCondition `json:"items"`
}

type PolicyRules

type PolicyRules struct {
	Items []PolicyRule `json:"items,omitempty"`
}

type Pool

type Pool struct {
	Name                   string
	Partition              string
	FullPath               string
	Generation             int
	AllowNAT               bool
	AllowSNAT              bool
	IgnorePersistedWeight  bool
	IPTOSToClient          string
	IPTOSToServer          string
	LinkQoSToClient        string
	LinkQoSToServer        string
	LoadBalancingMode      string
	MinActiveMembers       int
	MinUpMembers           int
	MinUpMembersAction     string
	MinUpMembersChecking   string
	Monitor                string
	QueueDepthLimit        int
	QueueOnConnectionLimit string
	QueueTimeLimit         int
	ReselectTries          int
	SlowRampTime           int
}

Pool contains information about each pool. You can use all of these fields when modifying a pool.

func (*Pool) MarshalJSON

func (p *Pool) MarshalJSON() ([]byte, error)

func (*Pool) UnmarshalJSON

func (p *Pool) UnmarshalJSON(b []byte) error

type Pools

type Pools struct {
	Pools []Pool `json:"items"`
}

Pools contains a list of pools on the BIG-IP system.

type Profile

type Profile struct {
	Name      string `json:"name,omitempty"`
	Partition string `json:"partition,omitempty"`
}

type Profiles

type Profiles struct {
	Profiles []Profile `json:"items"`
}

type RequestError

type RequestError struct {
	Code       int      `json:"code,omitempty"`
	Message    string   `json:"message,omitempty"`
	ErrorStack []string `json:"errorStack,omitempty"`
}

RequestError contains information about any error we get from a request.

func (*RequestError) Error

func (r *RequestError) Error() error

Error returns the error message.

type Route

type Route struct {
	Name       string `json:"name,omitempty"`
	Partition  string `json:"partition,omitempty"`
	FullPath   string `json:"fullPath,omitempty"`
	Generation int    `json:"generation,omitempty"`
	Gateway    string `json:"gw,omitempty"`
	MTU        int    `json:"mtu,omitempty"`
	Network    string `json:"network,omitempty"`
}

Route contains information about each individual route. You can use all of these fields when modifying a route.

type RouteDomain

type RouteDomain struct {
	Name       string   `json:"name,omitempty"`
	Partition  string   `json:"partition,omitempty"`
	FullPath   string   `json:"fullPath,omitempty"`
	Generation int      `json:"generation,omitempty"`
	ID         int      `json:"id,omitempty"`
	Strict     string   `json:"strict,omitempty"`
	Vlans      []string `json:"vlans,omitempty"`
}

RouteDomain contains information about each individual route domain. You can use all of these fields when modifying a route domain.

type RouteDomains

type RouteDomains struct {
	RouteDomains []RouteDomain `json:"items"`
}

RouteDomains contains a list of every route domain on the BIG-IP system.

type Routes

type Routes struct {
	Routes []Route `json:"items"`
}

Routes contains a list of every route on the BIG-IP system.

type SelfIP

type SelfIP struct {
	Name                  string `json:"name,omitempty"`
	Partition             string `json:"partition,omitempty"`
	FullPath              string `json:"fullPath,omitempty"`
	Generation            int    `json:"generation,omitempty"`
	Address               string `json:"address,omitempty"`
	Floating              string `json:"floating,omitempty"`
	InheritedTrafficGroup string `json:"inheritedTrafficGroup,omitempty"`
	TrafficGroup          string `json:"trafficGroup,omitempty"`
	Unit                  int    `json:"unit,omitempty"`
	Vlan                  string `json:"vlan,omitempty"`
}

SelfIP contains information about each individual self IP. You can use all of these fields when modifying a self IP.

type SelfIPs

type SelfIPs struct {
	SelfIPs []SelfIP `json:"items"`
}

SelfIPs contains a list of every self IP on the BIG-IP system.

type Trunk

type Trunk struct {
	Name               string   `json:"name,omitempty"`
	FullPath           string   `json:"fullPath,omitempty"`
	Generation         int      `json:"generation,omitempty"`
	Bandwidth          int      `json:"bandwidth,omitempty"`
	MemberCount        int      `json:"cfgMbrCount,omitempty"`
	DistributionHash   string   `json:"distributionHash,omitempty"`
	ID                 int      `json:"id,omitempty"`
	LACP               string   `json:"lacp,omitempty"`
	LACPMode           string   `json:"lacpMode,omitempty"`
	LACPTimeout        string   `json:"lacpTimeout,omitempty"`
	LinkSelectPolicy   string   `json:"linkSelectPolicy,omitempty"`
	MACAddress         string   `json:"macAddress,omitempty"`
	STP                string   `json:"stp,omitempty"`
	Type               string   `json:"type,omitempty"`
	WorkingMemberCount int      `json:"workingMbrCount,omitempty"`
	Interfaces         []string `json:"interfaces,omitempty"`
}

Trunk contains information about each individual trunk. You can use all of these fields when modifying a trunk.

type Trunks

type Trunks struct {
	Trunks []Trunk `json:"items"`
}

Trunks contains a list of every trunk on the BIG-IP system.

type VirtualAddress

type VirtualAddress struct {
	Name                  string
	Partition             string
	FullPath              string
	Generation            int
	Address               string
	ARP                   bool
	AutoDelete            string
	ConnectionLimit       int
	Enabled               bool
	Floating              bool
	ICMPEcho              bool
	InheritedTrafficGroup bool
	Mask                  string
	RouteAdvertisement    bool
	ServerScope           string
	TrafficGroup          string
	Unit                  int
}

VirtualAddress contains information about each individual virtual address.

func (*VirtualAddress) MarshalJSON

func (p *VirtualAddress) MarshalJSON() ([]byte, error)

func (*VirtualAddress) UnmarshalJSON

func (p *VirtualAddress) UnmarshalJSON(b []byte) error

type VirtualAddresses

type VirtualAddresses struct {
	VirtualAddresses []VirtualAddress `json:"items"`
}

VirtualAddresses contains a list of all virtual addresses on the BIG-IP system.

type VirtualServer

type VirtualServer struct {
	Name                     string `json:"name,omitempty"`
	Partition                string `json:"partition,omitempty"`
	FullPath                 string `json:"fullPath,omitempty"`
	Generation               int    `json:"generation,omitempty"`
	AddressStatus            string `json:"addressStatus,omitempty"`
	AutoLastHop              string `json:"autoLastHop,omitempty"`
	CMPEnabled               string `json:"cmpEnabled,omitempty"`
	ConnectionLimit          int    `json:"connectionLimit,omitempty"`
	Destination              string `json:"destination,omitempty"`
	Enabled                  bool   `json:"enabled,omitempty"`
	GTMScore                 int    `json:"gtmScore,omitempty"`
	IPProtocol               string `json:"ipProtocol,omitempty"`
	Mask                     string `json:"mask,omitempty"`
	Mirror                   string `json:"mirror,omitempty"`
	MobileAppTunnel          string `json:"mobileAppTunnel,omitempty"`
	NAT64                    string `json:"nat64,omitempty"`
	Pool                     string `json:"pool,omitempty"`
	RateLimit                string `json:"rateLimit,omitempty"`
	RateLimitDestinationMask int    `json:"rateLimitDstMask,omitempty"`
	RateLimitMode            string `json:"rateLimitMode,omitempty"`
	RateLimitSourceMask      int    `json:"rateLimitSrcMask,omitempty"`
	Source                   string `json:"source,omitempty"`
	SourceAddressTranslation struct {
		Type string `json:"type,omitempty"`
	} `json:"sourceAddressTranslation,omitempty"`
	SourcePort       string    `json:"sourcePort,omitempty"`
	SYNCookieStatus  string    `json:"synCookieStatus,omitempty"`
	TranslateAddress string    `json:"translateAddress,omitempty"`
	TranslatePort    string    `json:"translatePort,omitempty"`
	VlansDisabled    bool      `json:"vlansDisabled,omitempty"`
	VSIndex          int       `json:"vsIndex,omitempty"`
	Rules            []string  `json:"rules,omitempty"`
	Profiles         []Profile `json:"profiles,omitempty"`
}

VirtualServer contains information about each individual virtual server.

type VirtualServers

type VirtualServers struct {
	VirtualServers []VirtualServer `json:"items"`
}

VirtualServers contains a list of all virtual servers on the BIG-IP system.

type Vlan

type Vlan struct {
	Name            string `json:"name,omitempty"`
	Partition       string `json:"partition,omitempty"`
	FullPath        string `json:"fullPath,omitempty"`
	Generation      int    `json:"generation,omitempty"`
	AutoLastHop     string `json:"autoLastHop,omitempty"`
	CMPHash         string `json:"cmpHash,omitempty"`
	DAGRoundRobin   string `json:"dagRoundRobin,omitempty"`
	Failsafe        string `json:"failsafe,omitempty"`
	FailsafeAction  string `json:"failsafeAction,omitempty"`
	FailsafeTimeout int    `json:"failsafeTimeout,omitempty"`
	IfIndex         int    `json:"ifIndex,omitempty"`
	Learning        string `json:"learning,omitempty"`
	MTU             int    `json:"mtu,omitempty"`
	SFlow           struct {
		PollInterval       int    `json:"pollInterval,omitempty"`
		PollIntervalGlobal string `json:"pollIntervalGlobal,omitempty"`
		SamplingRate       int    `json:"samplingRate,omitempty"`
		SamplingRateGlobal string `json:"samplingRateGlobal,omitempty"`
	} `json:"sflow,omitempty"`
	SourceChecking string `json:"sourceChecking,omitempty"`
	Tag            int    `json:"tag,omitempty"`
}

Vlan contains information about each individual VLAN. You can use all of these fields when modifying a VLAN.

type VlanInterface

type VlanInterface struct {
	Name     string `json:"name,omitempty"`
	Tagged   bool   `json:"tagged,omitempty"`
	Untagged bool   `json:"untagged,omitempty"`
}

VlanInterface contains fields to be used when adding an interface to a VLAN.

type Vlans

type Vlans struct {
	Vlans []Vlan `json:"items"`
}

Vlans contains a list of every VLAN on the BIG-IP system.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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