Documentation
¶
Index ¶
- func AddFileIntoEServer(server *EServer, filePath, prefix string) (*api.FileInfo, error)
- func CleanContext(eveDist, certsDist, imagesDist, evePID, eveUUID, sdnPID, vmName string, ...) (err error)
- func CleanEden(...) (err error)
- func CloneFromGit(dist string, gitRepo string, tag string) (err error)
- func DeleteEVEParallels(vmName string) (err error)
- func DeleteEVEVBox(vmName string) (err error)
- func GenerateEVEConfig(devModel, eveConfig string, domain string, ip string, port int, apiV1 bool, ...) (err error)
- func GenerateEveCerts(certsDir, domain, ip, eveIP, uuid, devModel, ssid, arch, password string, ...) (err error)
- func GetLinkStatesQemu(qemuMonitorPort int, ifNames []string) (linkStates []edensdn.LinkState, err error)
- func GetLinkStatesVbox(vmName string, ifNames []string) (linkStates []edensdn.LinkState, err error)
- func MakeEveInRepo(desc utils.EVEDescription, dist string) (image, additional string, err error)
- func PutEveCerts(certsDir, devModel, ssid, arch, password string) (err error)
- func ReadFileInSquashFS(squashFSPath, filePath string) (content []byte, err error)
- func SetLinkStateQemu(qemuMonitorPort int, ifName string, up bool) error
- func SetLinkStateVbox(vmName, ifName string, up bool) error
- func StartAdam(adamPort int, adamPath string, adamForce bool, adamTag string, ...) (err error)
- func StartEServer(serverPort int, imageDist string, eserverForce bool, eserverTag string) (err error)
- func StartEVEParallels(vmName, eveImageFile string, parallelsCpus int, parallelsMem int, ...) (err error)
- func StartEVEQemu(qemuARCH, qemuOS, eveImageFile, imageFormat string, isInstaller bool, ...) (err error)
- func StartEVEVBox(vmName, eveImageFile string, cpus int, mem int, hostFwd map[string]string) (err error)
- func StartRedis(redisPort int, redisPath string, redisForce bool, redisTag string) (err error)
- func StartRegistry(port int, tag, registryPath string, opts ...string) (err error)
- func StartSWTPM(stateDir string) error
- func StatusAdam() (status string, err error)
- func StatusEServer() (status string, err error)
- func StatusEVEParallels(vmName string) (status string, err error)
- func StatusEVEQemu(pidFile string) (status string, err error)
- func StatusEVEVBox(vmName string) (status string, err error)
- func StatusRedis() (status string, err error)
- func StatusRegistry() (status string, err error)
- func StopAdam(adamRm bool) (err error)
- func StopEServer(eserverRm bool) (err error)
- func StopEVEParallels(vmName string) (err error)
- func StopEVEQemu(pidFile string) (err error)
- func StopEVEVBox(vmName string) (err error)
- func StopEden(adamRm, redisRm, registryRm, eserverRm, eveRemote bool, ...)
- func StopEve(evePidFile, swtpmPidFile, sdnPidFile, devModel, vmName string, sdnDisable bool)
- func StopRedis(redisRm bool) (err error)
- func StopRegistry(rm bool) (err error)
- func StopSDN(devModel, sdnPidFile string, sdnDisable bool)
- func StopSWTPM(stateDir string) error
- type EServer
- type EVEInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFileIntoEServer ¶
AddFileIntoEServer puts file into eserver prefix will be added to the file if defined
func CleanContext ¶
func CleanContext(eveDist, certsDist, imagesDist, evePID, eveUUID, sdnPID, vmName string, configSaved string, remote, sdnDisable bool) (err error)
CleanContext cleanup only context data
func CleanEden ¶
func CleanEden(eveDist, adamDist, certsDist, imagesDist, eserverDist, redisDist, registryDist, configDist, evePID, sdnPID, configSaved string, remote bool, devModel, vmName string, sdnDisable bool) (err error)
CleanEden teardown Eden and cleanup
func CloneFromGit ¶
CloneFromGit function clone from git into dist
func DeleteEVEParallels ¶
DeleteEVEParallels function removes EVE from parallels
func DeleteEVEVBox ¶
DeleteEVEVBox function removes EVE from VirtualBox
func GenerateEVEConfig ¶
func GenerateEVEConfig(devModel, eveConfig string, domain string, ip string, port int, apiV1 bool, softserial string, bootstrapFile string, withSDN bool) (err error)
GenerateEVEConfig function copy certs to EVE config folder if ip is empty will not fill hosts file
func GenerateEveCerts ¶
func GenerateEveCerts(certsDir, domain, ip, eveIP, uuid, devModel, ssid, arch, password string, grubOptions []string, apiV1 bool) (err error)
GenerateEveCerts function generates certs for EVE
func GetLinkStatesQemu ¶ added in v1.0.0
func GetLinkStatesQemu(qemuMonitorPort int, ifNames []string) (linkStates []edensdn.LinkState, err error)
GetLinkStatesQemu returns link states for the given set of EVE interfaces.
func GetLinkStatesVbox ¶ added in v1.0.0
GetLinkStatesVbox returns link states for the given set of EVE interfaces.
func MakeEveInRepo ¶
func MakeEveInRepo(desc utils.EVEDescription, dist string) (image, additional string, err error)
MakeEveInRepo build image of EVE from source
func PutEveCerts ¶
PutEveCerts function put certs for zedcontrol
func ReadFileInSquashFS ¶
ReadFileInSquashFS returns the content of a single file (filePath) inside squashfs (squashFSPath)
func SetLinkStateQemu ¶
SetLinkStateQemu changes the link state of the given interface.
func SetLinkStateVbox ¶
SetLinkStateVbox changes the link state of the given interface.
func StartAdam ¶
func StartAdam(adamPort int, adamPath string, adamForce bool, adamTag string, adamRemoteRedisURL string, apiV1 bool, opts ...string) (err error)
StartAdam function run adam in docker with mounted adamPath/run:/adam/run if adamForce is set, it recreates container
func StartEServer ¶
func StartEServer(serverPort int, imageDist string, eserverForce bool, eserverTag string) (err error)
StartEServer function run eserver in docker if eserverForce is set, it recreates container
func StartEVEParallels ¶
func StartEVEParallels(vmName, eveImageFile string, parallelsCpus int, parallelsMem int, hostFwd map[string]string) (err error)
StartEVEParallels function run EVE in parallels
func StartEVEQemu ¶
func StartEVEQemu(qemuARCH, qemuOS, eveImageFile, imageFormat string, isInstaller bool, qemuSMBIOSSerial string, eveTelnetPort, qemuMonitorPort, netDevBasePort int, qemuHostFwd map[string]string, qemuAccel bool, qemuConfigFile, logFile, pidFile string, netModel sdnapi.NetworkModel, withSDN bool, tapInterface, usbImagePath string, swtpm, foreground bool) (err error)
StartEVEQemu function run EVE in qemu
func StartEVEVBox ¶
func StartEVEVBox(vmName, eveImageFile string, cpus int, mem int, hostFwd map[string]string) (err error)
StartEVEVBox function runs EVE in VirtualBox
func StartRedis ¶
StartRedis function run redis in docker with mounted redisPath:/data if redisForce is set, it recreates container
func StartRegistry ¶
StartRegistry function run registry in docker
func StartSWTPM ¶ added in v1.0.0
StartSWTPM starts swtpm process and use stateDir as state, log, pid and socket location
func StatusAdam ¶
StatusAdam function return status of adam
func StatusEServer ¶
StatusEServer function return eserver of adam
func StatusEVEParallels ¶
StatusEVEParallels function get status of EVE
func StatusEVEQemu ¶
StatusEVEQemu function get status of EVE
func StatusEVEVBox ¶
StatusEVEVBox function get status of EVE
func StatusRedis ¶
StatusRedis function return status of redis
func StatusRegistry ¶
StatusRegistry function return status of registry
func StopEServer ¶
StopEServer function stop eserver container
func StopEVEParallels ¶
StopEVEParallels function stop EVE and delete parallels VM
func StopEVEVBox ¶
StopEVEVBox function stop EVE in VirtualBox
func StopEden ¶
func StopEden(adamRm, redisRm, registryRm, eserverRm, eveRemote bool, evePidFile, swtpmPidFile, sdnPidFile, devModel, vmName string, sdnDisable bool)
StopEden teardown Eden
func StopRegistry ¶
StopRegistry function stop registry container
Types ¶
type EServer ¶
EServer for connection to eserver
func (*EServer) EServerAddFile ¶
EServerAddFile send file with image into eserver
func (*EServer) EServerAddFileURL ¶
EServerAddFileURL send url to download image into eserver
type EVEInfo ¶
type EVEInfo struct { EVERelease []byte //EVERelease is /etc/eve-release from rootfs Syslog []byte //Syslog is /rsyslog/syslog.txt from persist volume }
EVEInfo contains info from SD card
func GetInfoFromSDCard ¶
GetInfoFromSDCard obtain info from SD card with EVE devicePath is /dev/sdX or /dev/diskX