hostbridge

package
v0.3.9-9 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2023 License: Apache-2.0 Imports: 21 Imported by: 3

Documentation

Index

Constants

View Source
const (
	DRV_OPEN_VSWITCH = "openvswitch"
	DRV_LINUX_BRIDGE = "linux_bridge"
)

Variables

This section is empty.

Functions

func CleanDeletedPorts

func CleanDeletedPorts(bridgeDriver string)

func LinuxBridgePrepare

func LinuxBridgePrepare() error

func OVSPrepare

func OVSPrepare() error

func Prepare

func Prepare(bridgeDriver string) error

Types

type IBridgeDriver

type IBridgeDriver interface {
	ConfirmToConfig() (bool, error)
	GetMac() string
	FetchConfig()
	Setup(IBridgeDriver) error
	SetupAddresses(net.IPMask) error
	SetupSlaveAddresses([][]string) error
	SetupRoutes([]iproute2.RouteSpec) error
	BringupInterface() error

	Exists() (bool, error)
	Interfaces() ([]string, error)
	WarmupConfig() error
	CleanupConfig()
	SetupBridgeDev() error
	SetupInterface() error
	PersistentConfig() error
	DisableDHCPClient() (bool, error)

	GenerateIfupScripts(scriptPath string, nic jsonutils.JSONObject, isVolatileHost bool) error
	GenerateIfdownScripts(scriptPath string, nic jsonutils.JSONObject, isVolatileHost bool) error
	RegisterHostlocalServer(mac, ip string) error

	OnVolatileGuestResume(nic jsonutils.JSONObject) error

	Bridge() string
	// contains filtered or unexported methods
}

func NewDriver

func NewDriver(bridgeDriver, bridge, inter, ip string) (IBridgeDriver, error)

type SBaseBridgeDriver

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

func NewBaseBridgeDriver

func NewBaseBridgeDriver(bridge, inter, ip string) (*SBaseBridgeDriver, error)

func (*SBaseBridgeDriver) Bridge

func (d *SBaseBridgeDriver) Bridge() string

func (*SBaseBridgeDriver) BringupInterface

func (d *SBaseBridgeDriver) BringupInterface() error

func (*SBaseBridgeDriver) CleanupConfig

func (d *SBaseBridgeDriver) CleanupConfig()

func (*SBaseBridgeDriver) ConfirmToConfig

func (d *SBaseBridgeDriver) ConfirmToConfig() (bool, error)

func (*SBaseBridgeDriver) DisableDHCPClient

func (d *SBaseBridgeDriver) DisableDHCPClient() (bool, error)

func (*SBaseBridgeDriver) FetchConfig

func (d *SBaseBridgeDriver) FetchConfig()

func (*SBaseBridgeDriver) GetMac

func (d *SBaseBridgeDriver) GetMac() string

func (*SBaseBridgeDriver) GetMetadataServerPort

func (d *SBaseBridgeDriver) GetMetadataServerPort() int

func (*SBaseBridgeDriver) PersistentConfig

func (d *SBaseBridgeDriver) PersistentConfig() error

func (*SBaseBridgeDriver) Setup

func (*SBaseBridgeDriver) SetupAddresses

func (d *SBaseBridgeDriver) SetupAddresses(mask net.IPMask) error

func (*SBaseBridgeDriver) SetupRoutes

func (d *SBaseBridgeDriver) SetupRoutes(routespecs []iproute2.RouteSpec) error

func (*SBaseBridgeDriver) SetupSlaveAddresses

func (d *SBaseBridgeDriver) SetupSlaveAddresses(slaveAddrs [][]string) error

func (*SBaseBridgeDriver) WarmupConfig

func (d *SBaseBridgeDriver) WarmupConfig() error

type SLinuxBridgeDriver

type SLinuxBridgeDriver struct {
	SBaseBridgeDriver
}

func NewLinuxBridgeDeriver

func NewLinuxBridgeDeriver(bridge, inter, ip string) (*SLinuxBridgeDriver, error)

func (*SLinuxBridgeDriver) Exists

func (l *SLinuxBridgeDriver) Exists() (bool, error)

func (*SLinuxBridgeDriver) GenerateIfdownScripts

func (l *SLinuxBridgeDriver) GenerateIfdownScripts(scriptPath string, nic jsonutils.JSONObject, isVolatileHost bool) error

func (*SLinuxBridgeDriver) GenerateIfupScripts

func (l *SLinuxBridgeDriver) GenerateIfupScripts(scriptPath string, nic jsonutils.JSONObject, isVolatileHost bool) error

func (*SLinuxBridgeDriver) Interfaces

func (l *SLinuxBridgeDriver) Interfaces() ([]string, error)

func (*SLinuxBridgeDriver) OnVolatileGuestResume

func (l *SLinuxBridgeDriver) OnVolatileGuestResume(nic jsonutils.JSONObject) error

func (*SLinuxBridgeDriver) PersistentConfig

func (d *SLinuxBridgeDriver) PersistentConfig() error

func (*SLinuxBridgeDriver) RegisterHostlocalServer

func (l *SLinuxBridgeDriver) RegisterHostlocalServer(mac, ip string) error

func (*SLinuxBridgeDriver) SetupBridgeDev

func (l *SLinuxBridgeDriver) SetupBridgeDev() error

func (*SLinuxBridgeDriver) SetupInterface

func (l *SLinuxBridgeDriver) SetupInterface() error

type SOVSBridgeDriver

type SOVSBridgeDriver struct {
	SBaseBridgeDriver
}

func NewOVSBridgeDriver

func NewOVSBridgeDriver(bridge, inter, ip string) (*SOVSBridgeDriver, error)

func NewOVSBridgeDriverByName

func NewOVSBridgeDriverByName(bridge string) (*SOVSBridgeDriver, error)

func (*SOVSBridgeDriver) CleanupConfig

func (o *SOVSBridgeDriver) CleanupConfig()

func (*SOVSBridgeDriver) Exists

func (o *SOVSBridgeDriver) Exists() (bool, error)

func (*SOVSBridgeDriver) GenerateIfdownScripts

func (o *SOVSBridgeDriver) GenerateIfdownScripts(scriptPath string, nic jsonutils.JSONObject, isVolatileHost bool) error

func (*SOVSBridgeDriver) GenerateIfupScripts

func (o *SOVSBridgeDriver) GenerateIfupScripts(scriptPath string, nic jsonutils.JSONObject, isVolatileHost bool) error

func (*SOVSBridgeDriver) Interfaces

func (o *SOVSBridgeDriver) Interfaces() ([]string, error)

func (*SOVSBridgeDriver) OnVolatileGuestResume

func (o *SOVSBridgeDriver) OnVolatileGuestResume(nic jsonutils.JSONObject) error

func (*SOVSBridgeDriver) PersistentConfig

func (d *SOVSBridgeDriver) PersistentConfig() error

func (*SOVSBridgeDriver) RegisterHostlocalServer

func (o *SOVSBridgeDriver) RegisterHostlocalServer(mac, ip string) error

func (*SOVSBridgeDriver) SetupBridgeDev

func (o *SOVSBridgeDriver) SetupBridgeDev() error

func (*SOVSBridgeDriver) SetupInterface

func (o *SOVSBridgeDriver) SetupInterface() error

func (*SOVSBridgeDriver) WarmupConfig

func (o *SOVSBridgeDriver) WarmupConfig() error

type SRule

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

Jump to

Keyboard shortcuts

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