~ubuntu-branches/ubuntu/saucy/juju-core/saucy

« back to all changes in this revision

Viewing changes to src/launchpad.net/juju-core/cmd/juju/destroymachine.go

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2013-08-20 16:02:16 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20130820160216-5yu1llasa2e2youn
Tags: 1.13.1-0ubuntu1
* New upstream release.
  - Build and install juju metadata plugin.
  - d/NEWS: Add some guidance on upgrading environments from 1.11.x
    to 1.13.x.
* d/NEWS: Add details about lack of upgrade path from juju < 1.11
  and how to interact with older juju environments.

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.
14
15
type DestroyMachineCommand struct {
15
 
        EnvCommandBase
 
16
        cmd.EnvCommandBase
16
17
        MachineIds []string
17
18
}
18
19
 
31
32
                return fmt.Errorf("no machines specified")
32
33
        }
33
34
        for _, id := range args {
34
 
                if !state.IsMachineId(id) {
 
35
                if !names.IsMachine(id) {
35
36
                        return fmt.Errorf("invalid machine id %q", id)
36
37
                }
37
38
        }