Skip to content

Commit

Permalink
scale operation has better flag handling
Browse files Browse the repository at this point in the history
  • Loading branch information
James Nesbitt committed Oct 9, 2015
1 parent 9b89551 commit 13640a4
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions operation_scale.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,17 @@ type Operation_Scale struct {
}
func (operation *Operation_Scale) Flags(flags []string) {

//@TODO GET SCALE FROM FLAG
// default scale value
operation.scale = 1

if len(flags)>0 {
if flags[0]=="up" {
operation.scale = 1
} else if flags[0]=="down" {
operation.scale = -1
}
}

}

func (operation *Operation_Scale) Help(topics []string) {
Expand Down Expand Up @@ -99,7 +107,7 @@ func (node *Node) ScaleUpNumber(number int) int {
instance.Create([]string{}, false)
}

node.log.Message("Node Scaling up. Starting instance :"+instance.Name)
node.log.Message("Node Scaling up. Stopping instance :"+instance.Name)
instance.Start(false)

count++
Expand Down

0 comments on commit 13640a4

Please sign in to comment.