func OvsManagedBridges() (set.Strings, error) {
	haveOvsCli, err := ovsToolsAvailable()
	if err != nil {
		return nil, errors.Trace(err)
	} else if !haveOvsCli { // nothing to do if the tools are missing
		return nil, nil
	}

	// Query list of ovs-managed device names
	res, err := getCommandOutput(exec.Command("ovs-vsctl", "list-br"))
	if err != nil {
		return nil, errors.Annotate(err, "querying ovs-managed bridges via ovs-vsctl")
	}

	ovsBridges := set.NewStrings()
	for _, iface := range strings.Split(string(res), "\n") {
		if iface = strings.TrimSpace(iface); iface != "" {
			ovsBridges.Add(iface)
		}
	}
	return ovsBridges, nil
}
// OvsManagedBridges returns a set containing the names of all bridge
// interfaces that are managed by openvswitch.
OvsManagedBridges returns a set containing the names of all bridge
interfaces that are managed by openvswitch.
// OvsManagedBridges returns a set containing the names of all bridge // interfaces that are managed by openvswitch .
func OvsManagedBridges() (set.Strings, error) {
	haveOvsCli, err := ovsToolsAvailable()
	if err != nil {
		return nil, errors.Trace(err)
	} else if !haveOvsCli { 
		return nil, nil
	}
	res, err := getCommandOutput(exec.Command("ovs-vsctl", "list-br"))
	if err != nil {
		return nil, errors.Annotate(err, "querying ovs-managed bridges via ovs-vsctl")
	}
	ovsBridges := set.NewStrings()
	for _, iface := range strings.Split(string(res), "\n") {
		if iface = strings.TrimSpace(iface); iface != "" {
			ovsBridges.Add(iface)
		}
	}
	return ovsBridges, nil
}
func OvsManagedBridges ( ) ( set . Strings , error ) { haveOvsCli , err := ovsToolsAvailable ( ) if err != nil { return nil , errors . Trace ( err ) } else if ! haveOvsCli { return nil , nil } res , err := getCommandOutput ( exec . Command ( " " , " " ) ) if err != nil { return nil , errors . Annotate ( err , " " ) } ovsBridges := set . NewStrings ( ) for _ , iface := range strings . Split ( string ( res ) , " \n " ) { if iface = strings . TrimSpace ( iface ) ; iface != " " { ovsBridges . Add ( iface ) } } return ovsBridges , nil }
OvsManagedBridges returns a set containing the names of all bridge
interfaces that are managed by openvswitch.
OvsManagedBridges returns a set containing the names of all bridge interfaces that are managed by openvswitch .
// nothing to do if the tools are missing // Query list of ovs-managed device names