app

package
v0.0.0-...-cb6729e Latest Latest
Warning

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

Go to latest
Published: May 20, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BridgesToNicCommand = cli.Command{
	Name:  "bridges-to-nic",
	Usage: "Delete ovs bridge and move IP/routes to underlying NIC",
	Flags: []cli.Flag{},
	Action: func(context *cli.Context) error {
		args := context.Args()
		if len(args) == 0 {
			return fmt.Errorf("Please specify list of bridges")
		}

		if err := util.SetExec(kexec.New()); err != nil {
			return err
		}

		var errorList []error
		for _, bridge := range args {
			if err := util.BridgeToNic(bridge); err != nil {
				errorList = append(errorList, err)
			}
		}

		return errors.NewAggregate(errorList)
	},
}

BridgesToNicCommand removes a NIC interface from OVS bridge and deletes the bridge

View Source
var NicsToBridgeCommand = cli.Command{
	Name:  "nics-to-bridge",
	Usage: "Create ovs bridge for nic interfaces",
	Flags: []cli.Flag{},
	Action: func(context *cli.Context) error {
		args := context.Args()
		if len(args) == 0 {
			return fmt.Errorf("Please specify list of nic interfaces")
		}

		if err := util.SetExec(kexec.New()); err != nil {
			return err
		}

		var errorList []error
		for _, nic := range args {
			if _, err := util.NicToBridge(nic); err != nil {
				errorList = append(errorList, err)
			}
		}

		return errors.NewAggregate(errorList)
	},
}

NicsToBridgeCommand creates ovs bridge for provided nic interfaces.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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