~themue/juju-core/053-env-more-script-friendly

« back to all changes in this revision

Viewing changes to cmd/juju/destroymachine.go

  • Committer: Dimiter Naydenov
  • Date: 2013-07-29 15:15:41 UTC
  • mto: This revision was merged to the branch mainline in revision 1565.
  • Revision ID: dimiter.naydenov@canonical.com-20130729151541-zm8murwo9u7mtsdu
names: new package

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 
6
6
import (
7
7
        "fmt"
 
8
 
8
9
        "launchpad.net/juju-core/cmd"
9
10
        "launchpad.net/juju-core/juju"
10
 
        "launchpad.net/juju-core/state"
 
11
        "launchpad.net/juju-core/names"
11
12
)
12
13
 
13
14
// DestroyMachineCommand causes an existing machine to be destroyed.
31
32
                return fmt.Errorf("no machines specified")
32
33
        }
33
34
        for _, id := range args {
34
 
                if !state.IsMachineId(id) {
 
35
                if !names.IsMachineId(id) {
35
36
                        return fmt.Errorf("invalid machine id %q", id)
36
37
                }
37
38
        }