// ClearInternalPort will remove the internal port from this switch, disabling
// the management OS.
ClearInternalPort will remove the internal port from this switch, disabling
the management OS.
// ClearInternalPort will remove the internal port from this switch disabling // the management OS .
func (v VirtualSwitch) ClearInternalPort() (bool, error) {
	internalPort, err := v.getSwitchInternalPort()
	if err != nil {
		if err != wmi.ErrNotFound {
			return false, errors.Wrap(err, "getSwitchInternalPort")
		}
	}
	if internalPort == "" {
		return false, nil
	}
	resources := []string{
		internalPort,
	}
	err = v.removeSwitchResources(resources)
	if err != nil {
		return false, errors.Wrap(err, "removeSwitchResources")
	}
	return true, nil
}
func ( v VirtualSwitch ) ClearInternalPort ( ) ( bool , error ) { internalPort , err := v . getSwitchInternalPort ( ) if err != nil { if err != wmi . ErrNotFound { return false , errors . Wrap ( err , " " ) } } if internalPort == " " { return false , nil } resources := [ ] string { internalPort , } err = v . removeSwitchResources ( resources ) if err != nil { return false , errors . Wrap ( err , " " ) } return true , nil }
ClearInternalPort will remove the internal port from this switch, disabling
the management OS.
ClearInternalPort will remove the internal port from this switch disabling the management OS .