~themue/juju-core/050-prepare-openstack

« back to all changes in this revision

Viewing changes to cmd/juju/deploy.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:
6
6
import (
7
7
        "errors"
8
8
        "fmt"
 
9
        "os"
 
10
 
9
11
        "launchpad.net/gnuflag"
 
12
 
10
13
        "launchpad.net/juju-core/charm"
11
14
        "launchpad.net/juju-core/cmd"
12
15
        "launchpad.net/juju-core/constraints"
13
16
        "launchpad.net/juju-core/juju"
14
 
        "launchpad.net/juju-core/state"
15
 
        "os"
 
17
        "launchpad.net/juju-core/names"
16
18
)
17
19
 
18
20
type DeployCommand struct {
76
78
func (c *DeployCommand) Init(args []string) error {
77
79
        switch len(args) {
78
80
        case 2:
79
 
                if !state.IsServiceName(args[1]) {
 
81
                if !names.IsServiceName(args[1]) {
80
82
                        return fmt.Errorf("invalid service name %q", args[1])
81
83
                }
82
84
                c.ServiceName = args[1]