Documentation ¶
Index ¶
- Constants
- func CleanDeletedPorts(bridgeDriver string)
- func LinuxBridgePrepare() error
- func OVSPrepare() error
- func Prepare(bridgeDriver string) error
- type IBridgeDriver
- type SBaseBridgeDriver
- func (d *SBaseBridgeDriver) Bridge() string
- func (d *SBaseBridgeDriver) BringupInterface() error
- func (d *SBaseBridgeDriver) CleanupConfig()
- func (d *SBaseBridgeDriver) ConfirmToConfig() (bool, error)
- func (d *SBaseBridgeDriver) DisableDHCPClient() (bool, error)
- func (d *SBaseBridgeDriver) FetchConfig()
- func (d *SBaseBridgeDriver) GetMac() string
- func (d *SBaseBridgeDriver) GetMetadataServerPort() int
- func (d *SBaseBridgeDriver) GetVlanId() int
- func (d *SBaseBridgeDriver) MigrateSlaveConfigs(o IBridgeDriver) error
- func (d *SBaseBridgeDriver) PersistentConfig() error
- func (d *SBaseBridgeDriver) Setup(o IBridgeDriver) error
- func (d *SBaseBridgeDriver) SetupAddresses(mask net.IPMask) error
- func (d *SBaseBridgeDriver) SetupRoutes(routespecs []iproute2.RouteSpec, add bool) error
- func (d *SBaseBridgeDriver) SetupSlaveAddresses(slaveAddrs [][]string) error
- func (d *SBaseBridgeDriver) WarmupConfig() error
- type SLinuxBridgeDriver
- func (l *SLinuxBridgeDriver) Exists() (bool, error)
- func (l *SLinuxBridgeDriver) GenerateIfdownScripts(scriptPath string, nic *desc.SGuestNetwork, isVolatileHost bool) error
- func (l *SLinuxBridgeDriver) GenerateIfupScripts(scriptPath string, nic *desc.SGuestNetwork, isVolatileHost bool) error
- func (l *SLinuxBridgeDriver) Interfaces() ([]string, error)
- func (l *SLinuxBridgeDriver) OnVolatileGuestResume(nic *desc.SGuestNetwork) error
- func (d *SLinuxBridgeDriver) PersistentConfig() error
- func (l *SLinuxBridgeDriver) RegisterHostlocalServer(mac, ip string) error
- func (l *SLinuxBridgeDriver) SetupBridgeDev() error
- func (l *SLinuxBridgeDriver) SetupInterface() error
- type SOVSBridgeDriver
- func (o *SOVSBridgeDriver) CleanupConfig()
- func (o *SOVSBridgeDriver) Exists() (bool, error)
- func (o *SOVSBridgeDriver) GenerateIfdownScripts(scriptPath string, nic *desc.SGuestNetwork, isVolatileHost bool) error
- func (o *SOVSBridgeDriver) GenerateIfupScripts(scriptPath string, nic *desc.SGuestNetwork, isVolatileHost bool) error
- func (o *SOVSBridgeDriver) Interfaces() ([]string, error)
- func (o *SOVSBridgeDriver) OnVolatileGuestResume(nic *desc.SGuestNetwork) error
- func (d *SOVSBridgeDriver) PersistentConfig() error
- func (o *SOVSBridgeDriver) RegisterHostlocalServer(mac, ip string) error
- func (o *SOVSBridgeDriver) SetupBridgeDev() error
- func (o *SOVSBridgeDriver) SetupInterface() error
- func (o *SOVSBridgeDriver) WarmupConfig() error
- type SRule
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
Types ¶
type IBridgeDriver ¶
type IBridgeDriver interface { MigrateSlaveConfigs(IBridgeDriver) error ConfirmToConfig() (bool, error) GetMac() string GetVlanId() int FetchConfig() Setup(IBridgeDriver) error SetupAddresses(net.IPMask) error SetupSlaveAddresses([][]string) error SetupRoutes(routes []iproute2.RouteSpec, add bool) 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 *desc.SGuestNetwork, isVolatileHost bool) error GenerateIfdownScripts(scriptPath string, nic *desc.SGuestNetwork, isVolatileHost bool) error RegisterHostlocalServer(mac, ip string) error OnVolatileGuestResume(nic *desc.SGuestNetwork) 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) GetVlanId ¶
func (d *SBaseBridgeDriver) GetVlanId() int
func (*SBaseBridgeDriver) MigrateSlaveConfigs ¶
func (d *SBaseBridgeDriver) MigrateSlaveConfigs(o IBridgeDriver) error
func (*SBaseBridgeDriver) PersistentConfig ¶
func (d *SBaseBridgeDriver) PersistentConfig() error
func (*SBaseBridgeDriver) Setup ¶
func (d *SBaseBridgeDriver) Setup(o IBridgeDriver) error
func (*SBaseBridgeDriver) SetupAddresses ¶
func (d *SBaseBridgeDriver) SetupAddresses(mask net.IPMask) error
func (*SBaseBridgeDriver) SetupRoutes ¶
func (d *SBaseBridgeDriver) SetupRoutes(routespecs []iproute2.RouteSpec, add bool) 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 *desc.SGuestNetwork, isVolatileHost bool) error
func (*SLinuxBridgeDriver) GenerateIfupScripts ¶
func (l *SLinuxBridgeDriver) GenerateIfupScripts(scriptPath string, nic *desc.SGuestNetwork, isVolatileHost bool) error
func (*SLinuxBridgeDriver) Interfaces ¶
func (l *SLinuxBridgeDriver) Interfaces() ([]string, error)
func (*SLinuxBridgeDriver) OnVolatileGuestResume ¶
func (l *SLinuxBridgeDriver) OnVolatileGuestResume(nic *desc.SGuestNetwork) 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 *desc.SGuestNetwork, isVolatileHost bool) error
func (*SOVSBridgeDriver) GenerateIfupScripts ¶
func (o *SOVSBridgeDriver) GenerateIfupScripts(scriptPath string, nic *desc.SGuestNetwork, isVolatileHost bool) error
func (*SOVSBridgeDriver) Interfaces ¶
func (o *SOVSBridgeDriver) Interfaces() ([]string, error)
func (*SOVSBridgeDriver) OnVolatileGuestResume ¶
func (o *SOVSBridgeDriver) OnVolatileGuestResume(nic *desc.SGuestNetwork) 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
Click to show internal directories.
Click to hide internal directories.