drivers/exoscale/exoscale.go
func (d *Driver) GetState() (state.State, error) {
	vm, err := d.virtualMachine()
	if err != nil {
		return state.Error, err
	}
	switch vm.State {
	case "Starting":
		return state.Starting, nil
	case "Running":
		return state.Running, nil
	case "Stopping":
		return state.Running, nil
	case "Stopped":
		return state.Stopped, nil
	case "Destroyed":
		return state.Stopped, nil
	case "Expunging":
		return state.Stopped, nil
	case "Migrating":
		return state.Paused, nil
	case "Error":
		return state.Error, nil
	case "Unknown":
		return state.Error, nil
	case "Shutdowned":
		return state.Stopped, nil
	}
	return state.None, nil
}
func (d *Driver) GetState() (state.State, error) {
	vm, err := d.virtualMachine()
	if err != nil {
		return state.Error, err
	}
	switch vm.State {
	case "Starting":
		return state.Starting, nil
	case "Running":
		return state.Running, nil
	case "Stopping":
		return state.Running, nil
	case "Stopped":
		return state.Stopped, nil
	case "Destroyed":
		return state.Stopped, nil
	case "Expunging":
		return state.Stopped, nil
	case "Migrating":
		return state.Paused, nil
	case "Error":
		return state.Error, nil
	case "Unknown":
		return state.Error, nil
	case "Shutdowned":
		return state.Stopped, nil
	}
	return state.None, nil
}
func ( d * Driver ) GetState ( ) ( state . State , error ) { vm , err := d . virtualMachine ( ) if err != nil { return state . Error , err } switch vm . State { case " " : return state . Starting , nil case " " : return state . Running , nil case " " : return state . Running , nil case " " : return state . Stopped , nil case " " : return state . Stopped , nil case " " : return state . Stopped , nil case " " : return state . Paused , nil case " " : return state . Error , nil case " " : return state . Error , nil case " " : return state . Stopped , nil } return state . None , nil }
// GetState returns a github.com/machine/libmachine/state.State representing the state of the host (running, stopped, etc.)
GetState returns a github . com / machine / libmachine / state . State representing the state of the host ( running stopped etc . )