as3

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEndpointTenantName

func GetEndpointTenantName(networkId strfmt.UUID) string

func GetServiceName

func GetServiceName(Id strfmt.UUID) string

func GetServicePoolName

func GetServicePoolName(Id strfmt.UUID) string

func GetServiceSnatPoolName

func GetServiceSnatPoolName(Id strfmt.UUID) string

Types

type ADC

type ADC struct {
	Class         string `json:"class"`
	SchemaVersion string `json:"schemaVersion"`
	UpdateMode    string `json:"updateMode"`
	Id            string `json:"id"`

	Tenants map[string]Tenant
}

func (ADC) MarshalJSON

func (a ADC) MarshalJSON() ([]byte, error)

type AS3

type AS3 struct {
	Schema      string `json:"$schema,omitempty"`
	Persist     bool   `json:"persist"`
	Class       string `json:"class"`
	Action      string `json:"action,omitempty"`
	Declaration any    `json:"declaration,omitempty"`
}

func GetAS3Declaration

func GetAS3Declaration(tenants map[string]Tenant) AS3

type Application

type Application struct {
	Class    string `json:"class"`
	Label    string `json:"label,omitempty"`
	Remark   string `json:"remark,omitempty"`
	Template string `json:"template"`

	// Application Services
	Services map[string]any
}

func (Application) MarshalJSON

func (a Application) MarshalJSON() ([]byte, error)

type BigIP

type BigIP struct {
	Host string
	BigIPIface
}

BigIP Wrapper

func GetBigIPSession

func GetBigIPSession(rawURL string) (*BigIP, error)

func (*BigIP) CleanupGuestVlan

func (b *BigIP) CleanupGuestVlan(segmentId int) error

func (*BigIP) CleanupRouteDomain

func (b *BigIP) CleanupRouteDomain(segmentId int) error

func (*BigIP) CleanupSelfIP

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

func (*BigIP) CleanupVLAN

func (b *BigIP) CleanupVLAN(segmentId int) error

func (*BigIP) EnsureBigIPSelfIP added in v1.1.0

func (b *BigIP) EnsureBigIPSelfIP(name string, address string, segmentId int) error

func (*BigIP) EnsureGuestVlan

func (b *BigIP) EnsureGuestVlan(segmentId int) error

func (*BigIP) EnsureInterfaceVlan

func (b *BigIP) EnsureInterfaceVlan(segmentId int) error

func (*BigIP) EnsureRouteDomain

func (b *BigIP) EnsureRouteDomain(segmentId int, parent *int) error

func (*BigIP) EnsureVLAN

func (b *BigIP) EnsureVLAN(segmentId int) error

func (*BigIP) GetBigIPDevice

func (b *BigIP) GetBigIPDevice(hostname string) *bigip.Device

func (*BigIP) GetHostname

func (b *BigIP) GetHostname() string

func (*BigIP) GetVCMPGuests

func (b *BigIP) GetVCMPGuests() (*VcmpGuests, error)

func (*BigIP) PostBigIP

func (b *BigIP) PostBigIP(as3 *AS3, tenant string) error

func (*BigIP) RouteDomains

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

func (*BigIP) SyncGuestVLANs added in v1.1.0

func (b *BigIP) SyncGuestVLANs(usedSegments map[int]struct{}) error

type BigIPIface added in v1.1.0

type BigIPIface interface {
	PostAs3Bigip(as3NewJson string, tenantFilter string) (error, string, string)
	GetDevices() ([]bigip.Device, error)
	APICall(options *bigip.APIRequest) ([]byte, error)
	SelfIP(selfip string) (*bigip.SelfIP, error)
	SelfIPs() (*bigip.SelfIPs, error)
	DeleteSelfIP(name string) error
	DeleteRouteDomain(name string) error
	CreateSelfIP(config *bigip.SelfIP) error
	UpdateVcmpGuest(name string, config *bigip.VcmpGuest) error
	Vlans() (*bigip.Vlans, error)
	CreateVlan(config *bigip.Vlan) error
	GetVlanInterfaces(vlan string) (*bigip.VlanInterfaces, error)
	AddInterfaceToVlan(vlan, iface string, tagged bool) error
	DeleteVlan(name string) error
}

type ExtendedEndpoint

type ExtendedEndpoint struct {
	models.Endpoint
	Port             *ports.Port
	ServicePortNr    int32
	ServiceNetworkId strfmt.UUID
	SegmentId        *int
	ProxyProtocol    bool
}

ExtendedEndpoint is an endpoint with additional fields...

type ExtendedService

type ExtendedService struct {
	models.Service
	NeutronPorts map[string]*ports.Port // SelfIPs / SNAT IPs
	SubnetID     string
	SegmentId    int
}

ExtendedService is a service with additional fields for snat ports etc.

type IRule

type IRule struct {
	Label  string `json:"label,omitempty"`
	Remark string `json:"remark,omitempty"`
	Class  string `json:"class"`
	IRule  any    `json:"iRule"`
}

type IRuleBase64

type IRuleBase64 struct {
	Value string
}

func (IRuleBase64) MarshalJSON

func (i IRuleBase64) MarshalJSON() ([]byte, error)

type MockBigIPIface added in v1.1.0

type MockBigIPIface struct {
	mock.Mock
}

MockBigIPIface is an autogenerated mock type for the BigIPIface type

func NewMockBigIPIface added in v1.1.0

func NewMockBigIPIface(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockBigIPIface

NewMockBigIPIface creates a new instance of MockBigIPIface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockBigIPIface) APICall added in v1.1.0

func (_m *MockBigIPIface) APICall(options *bigip.APIRequest) ([]byte, error)

APICall provides a mock function with given fields: options

func (*MockBigIPIface) AddInterfaceToVlan added in v1.1.0

func (_m *MockBigIPIface) AddInterfaceToVlan(vlan string, iface string, tagged bool) error

AddInterfaceToVlan provides a mock function with given fields: vlan, iface, tagged

func (*MockBigIPIface) CreateSelfIP added in v1.1.0

func (_m *MockBigIPIface) CreateSelfIP(config *bigip.SelfIP) error

CreateSelfIP provides a mock function with given fields: config

func (*MockBigIPIface) CreateVlan added in v1.1.0

func (_m *MockBigIPIface) CreateVlan(config *bigip.Vlan) error

CreateVlan provides a mock function with given fields: config

func (*MockBigIPIface) DeleteRouteDomain added in v1.1.0

func (_m *MockBigIPIface) DeleteRouteDomain(name string) error

DeleteRouteDomain provides a mock function with given fields: name

func (*MockBigIPIface) DeleteSelfIP added in v1.1.0

func (_m *MockBigIPIface) DeleteSelfIP(name string) error

DeleteSelfIP provides a mock function with given fields: name

func (*MockBigIPIface) DeleteVlan added in v1.1.0

func (_m *MockBigIPIface) DeleteVlan(name string) error

DeleteVlan provides a mock function with given fields: name

func (*MockBigIPIface) EXPECT added in v1.1.0

func (*MockBigIPIface) GetDevices added in v1.1.0

func (_m *MockBigIPIface) GetDevices() ([]bigip.Device, error)

GetDevices provides a mock function with given fields:

func (*MockBigIPIface) GetVlanInterfaces added in v1.1.0

func (_m *MockBigIPIface) GetVlanInterfaces(vlan string) (*bigip.VlanInterfaces, error)

GetVlanInterfaces provides a mock function with given fields: vlan

func (*MockBigIPIface) PostAs3Bigip added in v1.1.0

func (_m *MockBigIPIface) PostAs3Bigip(as3NewJson string, tenantFilter string) (error, string, string)

PostAs3Bigip provides a mock function with given fields: as3NewJson, tenantFilter

func (*MockBigIPIface) SelfIP added in v1.1.0

func (_m *MockBigIPIface) SelfIP(selfip string) (*bigip.SelfIP, error)

SelfIP provides a mock function with given fields: selfip

func (*MockBigIPIface) SelfIPs added in v1.1.0

func (_m *MockBigIPIface) SelfIPs() (*bigip.SelfIPs, error)

SelfIPs provides a mock function with given fields:

func (*MockBigIPIface) UpdateVcmpGuest added in v1.1.0

func (_m *MockBigIPIface) UpdateVcmpGuest(name string, config *bigip.VcmpGuest) error

UpdateVcmpGuest provides a mock function with given fields: name, config

func (*MockBigIPIface) Vlans added in v1.1.0

func (_m *MockBigIPIface) Vlans() (*bigip.Vlans, error)

Vlans provides a mock function with given fields:

type MockBigIPIface_APICall_Call added in v1.1.0

type MockBigIPIface_APICall_Call struct {
	*mock.Call
}

MockBigIPIface_APICall_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'APICall'

func (*MockBigIPIface_APICall_Call) Return added in v1.1.0

func (*MockBigIPIface_APICall_Call) Run added in v1.1.0

func (*MockBigIPIface_APICall_Call) RunAndReturn added in v1.1.0

type MockBigIPIface_AddInterfaceToVlan_Call added in v1.1.0

type MockBigIPIface_AddInterfaceToVlan_Call struct {
	*mock.Call
}

MockBigIPIface_AddInterfaceToVlan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddInterfaceToVlan'

func (*MockBigIPIface_AddInterfaceToVlan_Call) Return added in v1.1.0

func (*MockBigIPIface_AddInterfaceToVlan_Call) Run added in v1.1.0

func (*MockBigIPIface_AddInterfaceToVlan_Call) RunAndReturn added in v1.1.0

type MockBigIPIface_CreateSelfIP_Call added in v1.1.0

type MockBigIPIface_CreateSelfIP_Call struct {
	*mock.Call
}

MockBigIPIface_CreateSelfIP_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateSelfIP'

func (*MockBigIPIface_CreateSelfIP_Call) Return added in v1.1.0

func (*MockBigIPIface_CreateSelfIP_Call) Run added in v1.1.0

func (*MockBigIPIface_CreateSelfIP_Call) RunAndReturn added in v1.1.0

type MockBigIPIface_CreateVlan_Call added in v1.1.0

type MockBigIPIface_CreateVlan_Call struct {
	*mock.Call
}

MockBigIPIface_CreateVlan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateVlan'

func (*MockBigIPIface_CreateVlan_Call) Return added in v1.1.0

func (*MockBigIPIface_CreateVlan_Call) Run added in v1.1.0

func (*MockBigIPIface_CreateVlan_Call) RunAndReturn added in v1.1.0

type MockBigIPIface_DeleteRouteDomain_Call added in v1.1.0

type MockBigIPIface_DeleteRouteDomain_Call struct {
	*mock.Call
}

MockBigIPIface_DeleteRouteDomain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteRouteDomain'

func (*MockBigIPIface_DeleteRouteDomain_Call) Return added in v1.1.0

func (*MockBigIPIface_DeleteRouteDomain_Call) Run added in v1.1.0

func (*MockBigIPIface_DeleteRouteDomain_Call) RunAndReturn added in v1.1.0

type MockBigIPIface_DeleteSelfIP_Call added in v1.1.0

type MockBigIPIface_DeleteSelfIP_Call struct {
	*mock.Call
}

MockBigIPIface_DeleteSelfIP_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteSelfIP'

func (*MockBigIPIface_DeleteSelfIP_Call) Return added in v1.1.0

func (*MockBigIPIface_DeleteSelfIP_Call) Run added in v1.1.0

func (*MockBigIPIface_DeleteSelfIP_Call) RunAndReturn added in v1.1.0

type MockBigIPIface_DeleteVlan_Call added in v1.1.0

type MockBigIPIface_DeleteVlan_Call struct {
	*mock.Call
}

MockBigIPIface_DeleteVlan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteVlan'

func (*MockBigIPIface_DeleteVlan_Call) Return added in v1.1.0

func (*MockBigIPIface_DeleteVlan_Call) Run added in v1.1.0

func (*MockBigIPIface_DeleteVlan_Call) RunAndReturn added in v1.1.0

type MockBigIPIface_Expecter added in v1.1.0

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

func (*MockBigIPIface_Expecter) APICall added in v1.1.0

func (_e *MockBigIPIface_Expecter) APICall(options interface{}) *MockBigIPIface_APICall_Call

APICall is a helper method to define mock.On call

  • options *bigip.APIRequest

func (*MockBigIPIface_Expecter) AddInterfaceToVlan added in v1.1.0

func (_e *MockBigIPIface_Expecter) AddInterfaceToVlan(vlan interface{}, iface interface{}, tagged interface{}) *MockBigIPIface_AddInterfaceToVlan_Call

AddInterfaceToVlan is a helper method to define mock.On call

  • vlan string
  • iface string
  • tagged bool

func (*MockBigIPIface_Expecter) CreateSelfIP added in v1.1.0

func (_e *MockBigIPIface_Expecter) CreateSelfIP(config interface{}) *MockBigIPIface_CreateSelfIP_Call

CreateSelfIP is a helper method to define mock.On call

  • config *bigip.SelfIP

func (*MockBigIPIface_Expecter) CreateVlan added in v1.1.0

func (_e *MockBigIPIface_Expecter) CreateVlan(config interface{}) *MockBigIPIface_CreateVlan_Call

CreateVlan is a helper method to define mock.On call

  • config *bigip.Vlan

func (*MockBigIPIface_Expecter) DeleteRouteDomain added in v1.1.0

func (_e *MockBigIPIface_Expecter) DeleteRouteDomain(name interface{}) *MockBigIPIface_DeleteRouteDomain_Call

DeleteRouteDomain is a helper method to define mock.On call

  • name string

func (*MockBigIPIface_Expecter) DeleteSelfIP added in v1.1.0

func (_e *MockBigIPIface_Expecter) DeleteSelfIP(name interface{}) *MockBigIPIface_DeleteSelfIP_Call

DeleteSelfIP is a helper method to define mock.On call

  • name string

func (*MockBigIPIface_Expecter) DeleteVlan added in v1.1.0

func (_e *MockBigIPIface_Expecter) DeleteVlan(name interface{}) *MockBigIPIface_DeleteVlan_Call

DeleteVlan is a helper method to define mock.On call

  • name string

func (*MockBigIPIface_Expecter) GetDevices added in v1.1.0

GetDevices is a helper method to define mock.On call

func (*MockBigIPIface_Expecter) GetVlanInterfaces added in v1.1.0

func (_e *MockBigIPIface_Expecter) GetVlanInterfaces(vlan interface{}) *MockBigIPIface_GetVlanInterfaces_Call

GetVlanInterfaces is a helper method to define mock.On call

  • vlan string

func (*MockBigIPIface_Expecter) PostAs3Bigip added in v1.1.0

func (_e *MockBigIPIface_Expecter) PostAs3Bigip(as3NewJson interface{}, tenantFilter interface{}) *MockBigIPIface_PostAs3Bigip_Call

PostAs3Bigip is a helper method to define mock.On call

  • as3NewJson string
  • tenantFilter string

func (*MockBigIPIface_Expecter) SelfIP added in v1.1.0

func (_e *MockBigIPIface_Expecter) SelfIP(selfip interface{}) *MockBigIPIface_SelfIP_Call

SelfIP is a helper method to define mock.On call

  • selfip string

func (*MockBigIPIface_Expecter) SelfIPs added in v1.1.0

SelfIPs is a helper method to define mock.On call

func (*MockBigIPIface_Expecter) UpdateVcmpGuest added in v1.1.0

func (_e *MockBigIPIface_Expecter) UpdateVcmpGuest(name interface{}, config interface{}) *MockBigIPIface_UpdateVcmpGuest_Call

UpdateVcmpGuest is a helper method to define mock.On call

  • name string
  • config *bigip.VcmpGuest

func (*MockBigIPIface_Expecter) Vlans added in v1.1.0

Vlans is a helper method to define mock.On call

type MockBigIPIface_GetDevices_Call added in v1.1.0

type MockBigIPIface_GetDevices_Call struct {
	*mock.Call
}

MockBigIPIface_GetDevices_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDevices'

func (*MockBigIPIface_GetDevices_Call) Return added in v1.1.0

func (*MockBigIPIface_GetDevices_Call) Run added in v1.1.0

func (*MockBigIPIface_GetDevices_Call) RunAndReturn added in v1.1.0

type MockBigIPIface_GetVlanInterfaces_Call added in v1.1.0

type MockBigIPIface_GetVlanInterfaces_Call struct {
	*mock.Call
}

MockBigIPIface_GetVlanInterfaces_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetVlanInterfaces'

func (*MockBigIPIface_GetVlanInterfaces_Call) Return added in v1.1.0

func (*MockBigIPIface_GetVlanInterfaces_Call) Run added in v1.1.0

func (*MockBigIPIface_GetVlanInterfaces_Call) RunAndReturn added in v1.1.0

type MockBigIPIface_PostAs3Bigip_Call added in v1.1.0

type MockBigIPIface_PostAs3Bigip_Call struct {
	*mock.Call
}

MockBigIPIface_PostAs3Bigip_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PostAs3Bigip'

func (*MockBigIPIface_PostAs3Bigip_Call) Return added in v1.1.0

func (*MockBigIPIface_PostAs3Bigip_Call) Run added in v1.1.0

func (_c *MockBigIPIface_PostAs3Bigip_Call) Run(run func(as3NewJson string, tenantFilter string)) *MockBigIPIface_PostAs3Bigip_Call

func (*MockBigIPIface_PostAs3Bigip_Call) RunAndReturn added in v1.1.0

type MockBigIPIface_SelfIP_Call added in v1.1.0

type MockBigIPIface_SelfIP_Call struct {
	*mock.Call
}

MockBigIPIface_SelfIP_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SelfIP'

func (*MockBigIPIface_SelfIP_Call) Return added in v1.1.0

func (*MockBigIPIface_SelfIP_Call) Run added in v1.1.0

func (*MockBigIPIface_SelfIP_Call) RunAndReturn added in v1.1.0

type MockBigIPIface_SelfIPs_Call added in v1.1.0

type MockBigIPIface_SelfIPs_Call struct {
	*mock.Call
}

MockBigIPIface_SelfIPs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SelfIPs'

func (*MockBigIPIface_SelfIPs_Call) Return added in v1.1.0

func (*MockBigIPIface_SelfIPs_Call) Run added in v1.1.0

func (*MockBigIPIface_SelfIPs_Call) RunAndReturn added in v1.1.0

type MockBigIPIface_UpdateVcmpGuest_Call added in v1.1.0

type MockBigIPIface_UpdateVcmpGuest_Call struct {
	*mock.Call
}

MockBigIPIface_UpdateVcmpGuest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateVcmpGuest'

func (*MockBigIPIface_UpdateVcmpGuest_Call) Return added in v1.1.0

func (*MockBigIPIface_UpdateVcmpGuest_Call) Run added in v1.1.0

func (*MockBigIPIface_UpdateVcmpGuest_Call) RunAndReturn added in v1.1.0

type MockBigIPIface_Vlans_Call added in v1.1.0

type MockBigIPIface_Vlans_Call struct {
	*mock.Call
}

MockBigIPIface_Vlans_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Vlans'

func (*MockBigIPIface_Vlans_Call) Return added in v1.1.0

func (*MockBigIPIface_Vlans_Call) Run added in v1.1.0

func (*MockBigIPIface_Vlans_Call) RunAndReturn added in v1.1.0

func (_c *MockBigIPIface_Vlans_Call) RunAndReturn(run func() (*bigip.Vlans, error)) *MockBigIPIface_Vlans_Call

type Pointer

type Pointer struct {
	Use   string `json:"use,omitempty"`
	BigIP string `json:"bigip,omitempty"`
}

type Pool

type Pool struct {
	Class    string       `json:"class"`
	Label    string       `json:"label,omitempty"`
	Remark   string       `json:"remark,omitempty"`
	Members  []PoolMember `json:"members"`
	Monitors []Pointer    `json:"monitors"`
}

type PoolMember

type PoolMember struct {
	RouteDomain     int      `json:"routeDomain"`
	ServicePort     int32    `json:"servicePort"`
	ServerAddresses []string `json:"serverAddresses"`
	Enable          bool     `json:"enable"`
	AdminState      string   `json:"adminState,omitempty"`
	Remark          string   `json:"remark,omitempty"`
}

type RouteDomains added in v1.0.1

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

type Service

type Service struct {
	Label               string    `json:"label,omitempty"`
	Remark              string    `json:"remark,omitempty"`
	Class               string    `json:"class"`
	AllowVlans          []string  `json:"allowVlans"`
	IRules              []Pointer `json:"iRules"`
	Mirroring           string    `json:"mirroring"`
	PersistanceMethods  []string  `json:"persistenceMethods"`
	Pool                Pointer   `json:"pool"`
	ProfileL4           *Pointer  `json:"profileL4,omitempty"`
	ProfileTCP          *Pointer  `json:"profileTCP,omitempty"`
	Snat                any       `json:"snat,omitempty"`
	VirtualAddresses    []string  `json:"virtualAddresses"`
	TranslateServerPort bool      `json:"translateServerPort"`
	VirtualPort         int32     `json:"virtualPort"`
}

type SnatPool

type SnatPool struct {
	Class         string   `json:"class"`
	Label         string   `json:"label,omitempty"`
	Remark        string   `json:"remark,omitempty"`
	SnatAddresses []string `json:"snatAddresses"`
}

type Tenant

type Tenant struct {
	Class  string `json:"class"`
	Label  string `json:"label,omitempty"`
	Remark string `json:"remark,omitempty"`

	Applications map[string]Application
}

func GetEndpointTenants

func GetEndpointTenants(endpoints []*ExtendedEndpoint) Tenant

func GetServiceTenants

func GetServiceTenants(endpointServices []*ExtendedService) Tenant

func (Tenant) MarshalJSON

func (t Tenant) MarshalJSON() ([]byte, error)

type VcmpGuests

type VcmpGuests struct {
	Guests []bigip.VcmpGuest `json:"items,omitempty"`
}

Jump to

Keyboard shortcuts

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