Skip to content

Commit

Permalink
Merge pull request #92 from james-nesbitt/lessverboseup
Browse files Browse the repository at this point in the history
made up operation a bit quieter (and more clear)
  • Loading branch information
james-nesbitt committed Feb 26, 2016
2 parents d98c370 + 6bbe153 commit e9c9bb0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions operation/operation_up.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ func (operation *UpOperation) Run(logger log.Log) bool {
} else if !node.Can("Up") {
nodeLogger.Info("Node doesn't Up [" + node.MachineName() + "]")
} else {
nodeLogger.Message("Uping node")
nodeLogger.Message("Bringing node up")

if node.Can("build") {
nodeClient := node.Client()
nodeClient := node.Client()

if node.Can("build") && (operation.force || !nodeClient.HasImage()) {
nodeLogger.Message("Building node image")
nodeClient.Build(nodeLogger, operation.force)
}
if node.Can("pull") {
nodeClient := node.Client()
if node.Can("pull") && (operation.force || !nodeClient.HasImage()) {
nodeLogger.Message("Pulling node image")
nodeClient.Pull(nodeLogger, operation.force)
}
Expand All @@ -99,11 +99,11 @@ func (operation *UpOperation) Run(logger log.Log) bool {
instance, _ := instances.Instance(id)
instanceClient := instance.Client()

if create {
if create && !instanceClient.HasContainer() {
nodeLogger.Message("Creating node instance container : " + id)
instanceClient.Create(nodeLogger, []string{}, operation.force)
}
if start {
if start && !instanceClient.IsRunning() {
nodeLogger.Message("Starting node instance container : " + id)
instanceClient.Start(nodeLogger, operation.force)
}
Expand Down

0 comments on commit e9c9bb0

Please sign in to comment.