remote

package
v0.0.0-...-9c779f9 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NB   = "ovn-nbctl"
	SB   = "ovn-sbctl"
	L_VS = "ovs-vsctl"
	L_OF = "ovs-ofctl"
)

Variables

View Source
var DBTypeMap map[string]dbparse.OVSDBType = map[string]dbparse.OVSDBType{
	"nb":      dbparse.NB,
	"NB":      dbparse.NB,
	"northdb": dbparse.NB,
	"north":   dbparse.NB,
	"sb":      dbparse.SB,
	"SB":      dbparse.SB,
	"southdb": dbparse.SB,
	"south":   dbparse.SB,
}

Functions

func DumpFlows

func DumpFlows(client *ssh.Client, bridge string) (*bytes.Buffer, error)

func DumpFlowsLS

func DumpFlowsLS(client *ssh.Client, externalIds ExternalIds) (*bytes.Buffer, error)

func DumpFlowsSB

func DumpFlowsSB(client *ssh.Client, externalIds ExternalIds) (*bytes.Buffer, error)

func DumpPorts

func DumpPorts(client *ssh.Client, bridge string) (*bytes.Buffer, error)

func GetDBOSP

func GetDBOSP(client *ssh.Client, db dbparse.OVSDBType) (buf *bytes.Buffer, err error)

func GetDBPod

func GetDBPod(client *ssh.Client, db dbparse.OVSDBType) (buf *bytes.Buffer, err error)

func GetHelp

func GetHelp(client *ssh.Client, externalIds ExternalIds, db dbparse.OVSDBType) (*bytes.Buffer, error)

func GetNBRemote

func GetNBRemote(externalIds map[string]string) string

func GetSBRemote

func GetSBRemote(externalIds map[string]string) string

func RunCmd

func RunCmd(client *ssh.Client, externalIds ExternalIds, cmd string, db dbparse.OVSDBType) (*bytes.Buffer, error)

func SshCommand

func SshCommand(client *ssh.Client, command string) (*bytes.Buffer, *bytes.Buffer, error)

Types

type ExternalIds

type ExternalIds map[string]string

func GetExternalIds

func GetExternalIds(client *ssh.Client) (ExternalIds, error)

type Ssh

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

func NewSsh

func NewSsh(user string, keyFile string) (*Ssh, error)

func (*Ssh) ConnectSSH

func (s *Ssh) ConnectSSH(host string) (*ssh.Client, error)

Jump to

Keyboard shortcuts

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