net

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const BasePath = "mgmt/tm/net"
View Source
const InterfaceEndpoint = "/interface"

InterfaceEndpoint represents the REST resource for managing interfaces.

View Source
const InterfaceStatsEndpoint = "/interface/stats"

InterfaceStatsEndpoint represents the REST resource for managing InterfaceStats.

View Source
const RouteDomainEndpoint = "/route-domain"

RouteDomainEndpoint represents the REST resource for managing a route domain.

View Source
const RouteEndpoint = "/route"

RouteEndpoint represents the REST resource for managing a route.

View Source
const SelfEndpoint = "/self"

SelfEndpoint represents the REST resource for managing a self IP.

View Source
const TrunkEndpoint = "/trunk"

TrunkEndpoint represents the REST resource for managing a trunk.

View Source
const VlanEndpoint = "/vlan"

VlanEndpoint represents the REST resource for managing a vlan.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssignedInterface

type AssignedInterface struct {
	FullPath   string `json:"fullPath,omitempty"`
	Generation int    `json:"generation,omitempty"`
	Kind       string `json:"kind,omitempty"`
	Name       string `json:"name,omitempty"`
	SelfLink   string `json:"selfLink,omitempty"`
	TagMode    string `json:"tagMode,omitempty"`
	Untagged   bool   `json:"untagged,omitempty"`
}

type AssignedInterfaceList

type AssignedInterfaceList struct {
	Items    []AssignedInterface `json:"items,omitempty"`
	Kind     string              `json:"kind,omitempty"`
	SelfLink string              `json:"selfLink,omitempty"`
}

type InetResource

type InetResource struct {
	// contains filtered or unexported fields
}

A InetResource provides an API to manage Interface configurations.

func (*InetResource) Get

func (pr *InetResource) Get(id string) (*Interface, error)

Get a single interface configuration identified by id.

func (*InetResource) ListAll

func (pr *InetResource) ListAll() (*InterfaceList, error)

ListAll lists all interfaces configuration.

func (*InetResource) ShowStats

func (pr *InetResource) ShowStats(id string) (*InterfaceStatsList, error)

type InetStatsResource

type InetStatsResource struct {
	// contains filtered or unexported fields
}

InterfaceStatsResource provides an API to manage InterfaceStats configurations.

func (*InetStatsResource) All

type Interface

type Interface struct {
	Bundle                 string `json:"bundle,omitempty"`
	BundleSpeed            string `json:"bundleSpeed,omitempty"`
	Enabled                bool   `json:"enabled,omitempty"`
	FlowControl            string `json:"flowControl,omitempty"`
	ForceGigabitFiber      string `json:"forceGigabitFiber,omitempty"`
	ForwardErrorCorrection string `json:"forwardErrorCorrection,omitempty"`
	FullPath               string `json:"fullPath,omitempty"`
	Generation             int    `json:"generation,omitempty"`
	IfIndex                int    `json:"ifIndex,omitempty"`
	Kind                   string `json:"kind,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"`
	MediaSfp               string `json:"mediaSfp,omitempty"`
	Mtu                    int    `json:"mtu,omitempty"`
	Name                   string `json:"name,omitempty"`
	PreferPort             string `json:"preferPort,omitempty"`
	QinqEthertype          string `json:"qinqEthertype,omitempty"`
	SelfLink               string `json:"selfLink,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"`
}

type InterfaceList

type InterfaceList struct {
	Items    []Interface `json:"items,omitempty"`
	Kind     string      `json:"kind,omitempty"`
	SelfLink string      `json:"selfLink,omitempty"`
}

A InterfaceList holds a list of Interface.

type InterfaceStats

type InterfaceStats struct {
	Entries struct {
		CountersBitsIn struct {
			Value int `json:"value"`
		} `json:"counters.bitsIn,omitempty"`
		CountersBitsOut struct {
			Value int `json:"value"`
		} `json:"counters.bitsOut,omitempty"`
		CountersDropsAll struct {
			Value int `json:"value"`
		} `json:"counters.dropsAll,omitempty"`
		CountersErrorsAll struct {
			Value int `json:"value"`
		} `json:"counters.errorsAll,omitempty"`
		CountersPktsIn struct {
			Value int `json:"value"`
		} `json:"counters.pktsIn,omitempty"`
		CountersPktsOut struct {
			Value int `json:"value"`
		} `json:"counters.pktsOut,omitempty"`
		MediaActive struct {
			Description string `json:"description,omitempty"`
		} `json:"mediaActive,omitempty"`
		Status struct {
			Description string `json:"description,omitempty"`
		} `json:"status,omitempty"`
		TmName struct {
			Description string `json:"description,omitempty"`
		} `json:"tmName,omitempty"`
	} `json:"entries,omitempty"`
}

type InterfaceStatsEntries

type InterfaceStatsEntries struct {
	NestedInterfaceStats InterfaceStats `json:"nestedStats,omitempty"`
}

type InterfaceStatsList

type InterfaceStatsList struct {
	Entries  map[string]InterfaceStatsEntries `json:"entries,omitempty"`
	Kind     string                           `json:"kind,omitempty"`
	SelfLink string                           `json:"selflink,omitempty"`
}

type NET

type NET struct {
	// contains filtered or unexported fields
}

func New

func New(c *f5.Client) NET

New creates a new NET client.

func (NET) Inet

func (net NET) Inet() *InetResource

Inet returns a InetResource configured to query tm/net/interface API.

func (NET) InetStats

func (net NET) InetStats() *InetStatsResource

func (NET) Route

func (net NET) Route() *RouteResource

Route returns a RouteResource configured to query tm/net/route API.

func (NET) RouteDomain

func (net NET) RouteDomain() *RouteDomainResource

RouteDomain returns a RouteDomainResource configured to query /tm/net/route-domain API.

func (NET) Self

func (net NET) Self() *SelfResource

Self returns a SelfResource configured to query /tm/net/self API.

func (NET) Trunk

func (net NET) Trunk() *TrunkResource

RouteDomain returns a RouteDomainResource configured to query /tm/net/route-domain API.

func (NET) Vlan

func (net NET) Vlan() *VlanResource

Vlan returns a VlanResource configured to query /tm/net/vlan API.

type Route

type Route struct {
	FullPath   string `json:"fullPath,omitempty"`
	Generation int    `json:"generation,omitempty"`
	Gw         string `json:"gw,omitempty"`
	Kind       string `json:"kind,omitempty"`
	Mtu        int    `json:"mtu,omitempty"`
	Name       string `json:"name,omitempty"`
	Network    string `json:"network,omitempty"`
	Partition  string `json:"partition,omitempty"`
	SelfLink   string `json:"selfLink,omitempty"`
}

A Route hold the configuration for a route.

type RouteDomain

type RouteDomain struct {
	ConnectionLimit int      `json:"connectionLimit,omitempty"`
	FullPath        string   `json:"fullPath,omitempty"`
	Generation      int      `json:"generation,omitempty"`
	ID              int      `json:"id,omitempty"`
	Kind            string   `json:"kind,omitempty"`
	Name            string   `json:"name,omitempty"`
	SelfLink        string   `json:"selfLink,omitempty"`
	Strict          string   `json:"strict,omitempty"`
	Vlans           []string `json:"vlans,omitempty"`
	VlansReference  []struct {
		Link string `json:"link,omitempty"`
	} `json:"vlansReference,omitempty"`
}

A RouteDomain hold the configuration for a route domain.

type RouteDomainList

type RouteDomainList struct {
	Items    []RouteDomain `json:"items,omitempty"`
	Kind     string        `json:"kind,omitempty"`
	SelfLink string        `json:"selfLink,omitempty"`
}

A RouteDomainList holds a list of RouteDomain.

type RouteDomainResource

type RouteDomainResource struct {
	// contains filtered or unexported fields
}

A RouteDomainResource provides API to manage route domain configuration.

func (*RouteDomainResource) Create

func (pr *RouteDomainResource) Create(item RouteDomain) error

Create a new route domain configuration.

func (*RouteDomainResource) Delete

func (pr *RouteDomainResource) Delete(id string) error

Delete a single route domain configuration identified by id.

func (*RouteDomainResource) Edit

func (pr *RouteDomainResource) Edit(id string, item RouteDomain) error

Edit a route domain configuration identified by id.

func (*RouteDomainResource) Get

func (pr *RouteDomainResource) Get(id string) (*RouteDomain, error)

Get a single route domain configuration identified by id.

func (*RouteDomainResource) ListAll

func (pr *RouteDomainResource) ListAll() (*RouteDomainList, error)

ListAll lists all the route domain configurations.

type RouteList

type RouteList struct {
	Items    []Route `json:"items,omitempty"`
	Kind     string  `json:"kind,omitempty"`
	SelfLink string  `json:"selfLink,omitempty"`
}

A RouteList holds a list of Route.

type RouteResource

type RouteResource struct {
	// contains filtered or unexported fields
}

A RouteResource provides API to manage routes configuration.

func (*RouteResource) Create

func (pr *RouteResource) Create(item Route) error

Create a new route configuration.

func (*RouteResource) Delete

func (pr *RouteResource) Delete(id string) error

Delete a single route configuration identified by id.

func (*RouteResource) Edit

func (pr *RouteResource) Edit(id string, item Route) error

Edit a route configuration identified by id.

func (*RouteResource) Get

func (pr *RouteResource) Get(id string) (*Route, error)

Get a single route configuration identified by id.

func (*RouteResource) ListAll

func (pr *RouteResource) ListAll() (*RouteList, error)

ListAll lists all the route configurations.

type Self

type Self struct {
	Address               string `json:"address,omitempty"`
	AddressSource         string `json:"addressSource,omitempty"`
	Floating              string `json:"floating,omitempty"`
	FullPath              string `json:"fullPath,omitempty"`
	Generation            int    `json:"generation,omitempty"`
	InheritedTrafficGroup string `json:"inheritedTrafficGroup,omitempty"`
	Kind                  string `json:"kind,omitempty"`
	Name                  string `json:"name,omitempty"`
	SelfLink              string `json:"selfLink,omitempty"`
	TrafficGroup          string `json:"trafficGroup,omitempty"`
	TrafficGroupReference struct {
		Link string `json:"link,omitempty"`
	} `json:"trafficGroupReference,omitempty"`
	Unit          int    `json:"unit,omitempty"`
	Vlan          string `json:"vlan,omitempty"`
	VlanReference struct {
		Link string `json:"link,omitempty"`
	} `json:"vlanReference,omitempty"`
}

A Self hold the configuration for a Self IP.

type SelfList

type SelfList struct {
	Items    []Self `json:"items,omitempty"`
	Kind     string `json:"kind,omitempty"`
	SelfLink string `json:"selfLink,omitempty"`
}

A SelfList holds a list of Self.

type SelfResource

type SelfResource struct {
	// contains filtered or unexported fields
}

A SelfResource provides API to manage self ip configuration.

func (*SelfResource) Create

func (pr *SelfResource) Create(item Self) error

Create a new self ip configuration.

func (*SelfResource) Delete

func (pr *SelfResource) Delete(id string) error

Delete a single self ip configuration identified by id.

func (*SelfResource) Edit

func (pr *SelfResource) Edit(id string, item Self) error

Edit a self ip configuration identified by id.

func (*SelfResource) Get

func (pr *SelfResource) Get(id string) (*Self, error)

Get a single self ip configuration identified by id.

func (*SelfResource) ListAll

func (pr *SelfResource) ListAll() (*SelfList, error)

ListAll lists all the self ip configurations.

type Trunk

type Trunk struct {
	Bandwidth           int      `json:"bandwidth,omitempty"`
	CfgMbrCount         int      `json:"cfgMbrCount,omitempty"`
	DistributionHash    string   `json:"distributionHash,omitempty"`
	FullPath            string   `json:"fullPath,omitempty"`
	Generation          int      `json:"generation,omitempty"`
	ID                  int      `json:"id,omitempty"`
	Interfaces          []string `json:"interfaces,omitempty"`
	InterfacesReference []struct {
		Link string `json:"link,omitempty"`
	} `json:"interfacesReference,omitempty"`
	Kind             string `json:"kind,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"`
	Media            string `json:"media,omitempty"`
	Name             string `json:"name,omitempty"`
	QinqEthertype    string `json:"qinqEthertype,omitempty"`
	SelfLink         string `json:"selfLink,omitempty"`
	Stp              string `json:"stp,omitempty"`
	Type             string `json:"type,omitempty"`
	WorkingMbrCount  int    `json:"workingMbrCount,omitempty"`
}

A Trunk hold the configuration for a trunk.

type TrunkList

type TrunkList struct {
	Items    []Trunk `json:"items,omitempty"`
	Kind     string  `json:"kind,omitempty"`
	SelfLink string  `json:"selfLink,omitempty"`
}

A TrunkList holds a list of Trunks.

type TrunkResource

type TrunkResource struct {
	// contains filtered or unexported fields
}

A TrunkResource provides API to manage trunks configuration.

func (*TrunkResource) Create

func (pr *TrunkResource) Create(item Trunk) error

Create a new trunk configuration.

func (*TrunkResource) Delete

func (pr *TrunkResource) Delete(id string) error

Delete a single trunk configuration identified by id.

func (*TrunkResource) Edit

func (pr *TrunkResource) Edit(id string, item Trunk) error

Edit a trunk configuration identified by id.

func (*TrunkResource) Get

func (pr *TrunkResource) Get(id string) (*Trunk, error)

Get a single trunk configuration identified by id.

func (*TrunkResource) ListAll

func (pr *TrunkResource) ListAll() (*TrunkList, error)

ListAll lists all the trunk configurations.

type Vlan

type Vlan struct {
	AutoLasthop         string `json:"autoLasthop,omitempty"`
	CmpHash             string `json:"cmpHash,omitempty"`
	DagRoundRobin       string `json:"dagRoundRobin,omitempty"`
	DagTunnel           string `json:"dagTunnel,omitempty"`
	Failsafe            string `json:"failsafe,omitempty"`
	FailsafeAction      string `json:"failsafeAction,omitempty"`
	FailsafeTimeout     int    `json:"failsafeTimeout,omitempty"`
	FullPath            string `json:"fullPath,omitempty"`
	Generation          int    `json:"generation,omitempty"`
	IfIndex             int    `json:"ifIndex,omitempty"`
	InterfacesReference struct {
		IsSubcollection bool   `json:"isSubcollection,omitempty"`
		Link            string `json:"link,omitempty"`
	} `json:"interfacesReference,omitempty"`
	Kind     string `json:"kind,omitempty"`
	Learning string `json:"learning,omitempty"`
	Mtu      int    `json:"mtu,omitempty"`
	Name     string `json:"name,omitempty"`
	SelfLink string `json:"selfLink,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"`
}

A Vlan hold the configuration for a vlan.

type VlanList

type VlanList struct {
	Items    []Vlan `json:"items,omitempty"`
	Kind     string `json:"kind,omitempty"`
	SelfLink string `json:"selfLink,omitempty"`
}

A VlanList holds a list of Vlan.

type VlanResource

type VlanResource struct {
	// contains filtered or unexported fields
}

A VlanResource provides API to manage vlan configuration.

func (*VlanResource) AddInterface

func (pr *VlanResource) AddInterface(id string, item AssignedInterface) error

Edit a vlan configuration identified by id.

func (*VlanResource) Create

func (pr *VlanResource) Create(item Vlan) error

Create a new vlan configuration.

func (*VlanResource) Delete

func (pr *VlanResource) Delete(id string) error

Delete a single vlan configuration identified by id.

func (*VlanResource) Edit

func (pr *VlanResource) Edit(id string, item Vlan) error

Edit a vlan configuration identified by id.

func (*VlanResource) Get

func (pr *VlanResource) Get(id string) (*Vlan, error)

Get a single vlan configuration identified by id.

func (*VlanResource) GetInterfaces

func (pr *VlanResource) GetInterfaces(id string) (*AssignedInterfaceList, error)

GetInterfaces gets all interfaces associated to the vlan identified by id.

func (*VlanResource) ListAll

func (pr *VlanResource) ListAll() (*VlanList, error)

ListAll lists all the vlan configurations.

Jump to

Keyboard shortcuts

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