mfi

package
v0.0.0-...-f1431d7 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2016 License: MIT Imports: 13 Imported by: 2

Documentation

Overview

mfi utility functions

Index

Constants

View Source
const SYSTEM_CFG = `` /* 4309-byte string literal not displayed */
View Source
const (
	TEMPFILE_PREFIX = "mfi_deploy"
)
View Source
const WLAN_OVERWRITE = `
essid={{.WifiSSID}}
security=wpapsk
wpakey={{.WifiPassword}}
`

Variables

View Source
var ErrWifiPasswordNotPresent = errors.New("Wifi password not present")
View Source
var ErrWifiSsidNotPresent = errors.New("Wifi SSID not present")

Functions

This section is empty.

Types

type Config

type Config struct {
	EthernetConfig        bool
	WlanOverwriteFilename string
	SystemCfgFilename     string
	WifiSSID              string
	WifiPassword          string
	HwAddr                string
	Host                  string
}

func (*Config) FindDeviceOn

func (c *Config) FindDeviceOn(netmask string) (resultIp net.IP, err error)

func (*Config) RunStep1Wifi

func (c *Config) RunStep1Wifi() (err error)

func (*Config) RunStep2PushConfig

func (c *Config) RunStep2PushConfig() (err error)

type MfiStatus

type MfiStatus struct {
	Wlan MfiWlan `json:"wlan"`
}

type MfiWlan

type MfiWlan struct {
	HwAddr string `json:"hwaddr"`
}

type SshCommands

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

func NewSshCommands

func NewSshCommands() (s *SshCommands)

func (*SshCommands) Add

func (s *SshCommands) Add(cmd string)

func (*SshCommands) AddFile

func (s *SshCommands) AddFile(filename, text string)

func (*SshCommands) Exec

func (s *SshCommands) Exec(host string) (err error)

Exec a command via ssh on the mfi switch. That's always on the mfi's own Wifi, so the IP is usually 192.168.2.20. Therefore its SSH Fingerprint always changes. We don't want SSH to complain about that: http://bit.ly/1Os4sx5

Jump to

Keyboard shortcuts

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