Documentation
¶
Index ¶
- func GenerateSdnMgmtMAC() string
- func GetDefaultNetModel() (model sdnapi.NetworkModel, err error)
- func LoadNetModeFromFile(filepath string) (sdnapi.NetworkModel, error)
- type LinkState
- type SdnClient
- func (client *SdnClient) ApplyNetworkModel(netModel model.NetworkModel) (err error)
- func (client *SdnClient) GetEveIfIP(eveIfName string) (ip string, err error)
- func (client *SdnClient) GetEveIfMAC(eveIfName string) (mac string, err error)
- func (client *SdnClient) GetNetworkConfigGraph() (config string, err error)
- func (client *SdnClient) GetNetworkModel() (netModel model.NetworkModel, err error)
- func (client *SdnClient) GetSdnLogs() (string, error)
- func (client *SdnClient) GetSdnStatus() (status model.SDNStatus, err error)
- func (client *SdnClient) RunCmdFromEndpoint(epLogicalLabel, cmd string, args ...string) error
- func (client *SdnClient) SSHIntoSdnVM() error
- func (client *SdnClient) SSHPortForwarding(localPort, targetPort uint16, targetIP string) (close func(), err error)
- type SdnMgmtSubnet
- type SdnVMConfig
- type SdnVMQemuRunner
- type SdnVMRunner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateSdnMgmtMAC ¶
func GenerateSdnMgmtMAC() string
GenerateSdnMgmtMAC (deterministically) generates MAC address for interface connecting Eden-SDN with the Host.
func GetDefaultNetModel ¶
func GetDefaultNetModel() (model sdnapi.NetworkModel, err error)
GetDefaultNetModel : get default network model. Used unless the user selects custom network model.
func LoadNetModeFromFile ¶
func LoadNetModeFromFile(filepath string) (sdnapi.NetworkModel, error)
LoadNetModeFromFile loads network model stored inside a JSON file.
Types ¶
type SdnClient ¶
SdnClient is a client for talking to Eden-SDN management agent. It also allows to SSH into SDN VM, establish SSH port forwarding with SDN VM and to run command from inside of an endpoint deployed in Eden-SDN.
func (*SdnClient) ApplyNetworkModel ¶
func (client *SdnClient) ApplyNetworkModel(netModel model.NetworkModel) (err error)
ApplyNetworkModel : submit network model to Eden-SDN.
func (*SdnClient) GetEveIfIP ¶
GetEveIfIP : get IP address assigned to the given EVE interface.
func (*SdnClient) GetEveIfMAC ¶
GetEveIfMAC : get MAC address assigned to the given EVE interface.
func (*SdnClient) GetNetworkConfigGraph ¶
GetNetworkConfigGraph : get network config applied by Eden-SDN. Network config items and their dependencies are depicted using a DOT graph.
func (*SdnClient) GetNetworkModel ¶
func (client *SdnClient) GetNetworkModel() (netModel model.NetworkModel, err error)
GetNetworkModel : get network model currently applied to Eden-SDN.
func (*SdnClient) GetSdnLogs ¶
GetSdnLogs : get all logs from running Eden-SDN VM.
func (*SdnClient) GetSdnStatus ¶
GetSdnStatus : get status of the running Eden-SDN.
func (*SdnClient) RunCmdFromEndpoint ¶
RunCmdFromEndpoint : execute command from inside of an endpoint deployed in Eden-SDN.
func (*SdnClient) SSHIntoSdnVM ¶
SSHIntoSdnVM : ssh into the running Eden-SDN.
type SdnMgmtSubnet ¶
SdnMgmtSubnet : IP configuration for Eden-SDN management network.
type SdnVMConfig ¶
type SdnVMConfig struct {
Architecture string
Acceleration bool
HostOS string // darwin, linux, etc.
ImagePath string
ConfigDir string
CPU int
RAM int // in MB
Firmware []string
NetModel model.NetworkModel
TelnetPort uint16
SSHPort uint16
SSHKeyPath string
MgmtPort uint16
MgmtSubnet SdnMgmtSubnet
NetDevBasePort uint16 // QEMU-specific
PidFile string
ConsoleLogFile string
}
SdnVMConfig : configuration for Eden-SDN VM.
type SdnVMQemuRunner ¶
type SdnVMQemuRunner struct {
SdnVMConfig
}
SdnVMQemuRunner implements Eden-SDN VM runner using QEMU.
func NewSdnVMQemuRunner ¶
func NewSdnVMQemuRunner(config SdnVMConfig) *SdnVMQemuRunner
NewSdnVMQemuRunner is constructor for SdnVMQemuRunner.
func (*SdnVMQemuRunner) RequiresVmRestart ¶
func (vm *SdnVMQemuRunner) RequiresVmRestart(oldModel, newModel model.NetworkModel) bool
RequiresVmRestart returns true if the set of ports has changed.
func (*SdnVMQemuRunner) Start ¶
func (vm *SdnVMQemuRunner) Start() error
Start Eden-SDN VM using QEMU.
func (*SdnVMQemuRunner) Stop ¶
func (vm *SdnVMQemuRunner) Stop() (err error)
Stop Eden-SDN VM running in QEMU.
type SdnVMRunner ¶
type SdnVMRunner interface {
// Start Eden-SDN VM.
Start() error
// Stop Eden-SDN VM.
Stop() error
// RequiresVmRestart should return true if going from oldModel to newModel requires
// to restart EVE VM and SDN VM.
RequiresVmRestart(oldModel, newModel model.NetworkModel) bool
}
SdnVMRunner is implemented for every virtualization technology on which Eden-SDN is supported. Currently only QEMU is supported.
func GetSdnVMRunner ¶
func GetSdnVMRunner(devModelType string, config SdnVMConfig) (SdnVMRunner, error)
GetSdnVMRunner returns SdnVMRunner for a given device model type.