// GetVMSwitchByName will return a list of VM switches that have the specified
// name. VM switch names are non unique, so we return a list.
GetVMSwitchByName will return a list of VM switches that have the specified
name. VM switch names are non unique, so we return a list.
// GetVMSwitchByName will return a list of VM switches that have the specified // name . VM switch names are non unique so we return a list .
func (m *Manager) GetVMSwitchByName(name string) ([]VirtualSwitch, error) {
	qParams := []wmi.Query{
		&wmi.AndQuery{
			wmi.QueryFields{
				Key:   "ElementName",
				Value: name,
				Type:  wmi.Equals,
			},
		},
	}
	return m.getVirtualSwitches(qParams)
}
func ( m * Manager ) GetVMSwitchByName ( name string ) ( [ ] VirtualSwitch , error ) { qParams := [ ] wmi . Query { & wmi . AndQuery { wmi . QueryFields { Key : " " , Value : name , Type : wmi . Equals , } , } , } return m . getVirtualSwitches ( qParams ) }
GetVMSwitchByName will return a list of VM switches that have the specified
name.
GetVMSwitchByName will return a list of VM switches that have the specified name .