1
// Copyright 2013 Canonical Ltd.
2
// Licensed under the AGPLv3, see LICENCE file for details.
9
"github.com/juju/juju/state"
12
// isMachineWithJob returns whether the given entity is a machine that
13
// is configured to run the given job.
14
func isMachineWithJob(e state.Authenticator, j state.MachineJob) bool {
15
m, ok := e.(*state.Machine)
19
for _, mj := range m.Jobs() {
27
func setPassword(e state.Authenticator, password string) error {
28
// Catch expected common case of misspelled
29
// or missing Password parameter.
31
return fmt.Errorf("password is empty")
33
return e.SetPassword(password)