s/Meta.lockState/Meta.stateLock/g

This commit is contained in:
James Bardin 2017-02-06 09:58:04 -05:00
parent 0d7752b0f5
commit 07903189f1
6 changed files with 11 additions and 11 deletions

View File

@ -47,7 +47,7 @@ func (c *ApplyCommand) Run(args []string) int {
cmdFlags.StringVar(&c.Meta.statePath, "state", "", "path")
cmdFlags.StringVar(&c.Meta.stateOutPath, "state-out", "", "path")
cmdFlags.StringVar(&c.Meta.backupPath, "backup", "", "path")
cmdFlags.BoolVar(&c.Meta.lockState, "state-lock", true, "lock state")
cmdFlags.BoolVar(&c.Meta.stateLock, "state-lock", true, "lock state")
cmdFlags.Usage = func() { c.Ui.Error(c.Help()) }
if err := cmdFlags.Parse(args); err != nil {
return 1
@ -183,7 +183,7 @@ func (c *ApplyCommand) Run(args []string) int {
opReq.Plan = plan
opReq.PlanRefresh = refresh
opReq.Type = backend.OperationTypeApply
opReq.LockState = c.Meta.lockState
opReq.LockState = c.Meta.stateLock
// Perform the operation
ctx, ctxCancel := context.WithCancel(context.Background())

View File

@ -91,7 +91,7 @@ type Meta struct {
parallelism int
shadow bool
provider string
lockState bool
stateLock bool
}
// initStatePaths is used to initialize the default values for

View File

@ -31,7 +31,7 @@ func (c *PlanCommand) Run(args []string) int {
&c.Meta.parallelism, "parallelism", DefaultParallelism, "parallelism")
cmdFlags.StringVar(&c.Meta.statePath, "state", "", "path")
cmdFlags.BoolVar(&detailed, "detailed-exitcode", false, "detailed-exitcode")
cmdFlags.BoolVar(&c.Meta.lockState, "state-lock", true, "lock state")
cmdFlags.BoolVar(&c.Meta.stateLock, "state-lock", true, "lock state")
cmdFlags.Usage = func() { c.Ui.Error(c.Help()) }
if err := cmdFlags.Parse(args); err != nil {
return 1
@ -85,7 +85,7 @@ func (c *PlanCommand) Run(args []string) int {
opReq.PlanRefresh = refresh
opReq.PlanOutPath = outPath
opReq.Type = backend.OperationTypePlan
opReq.LockState = c.Meta.lockState
opReq.LockState = c.Meta.stateLock
// Perform the operation
op, err := b.Operation(context.Background(), opReq)

View File

@ -23,7 +23,7 @@ func (c *RefreshCommand) Run(args []string) int {
cmdFlags.IntVar(&c.Meta.parallelism, "parallelism", 0, "parallelism")
cmdFlags.StringVar(&c.Meta.stateOutPath, "state-out", "", "path")
cmdFlags.StringVar(&c.Meta.backupPath, "backup", "", "path")
cmdFlags.BoolVar(&c.Meta.lockState, "state-lock", true, "lock state")
cmdFlags.BoolVar(&c.Meta.stateLock, "state-lock", true, "lock state")
cmdFlags.Usage = func() { c.Ui.Error(c.Help()) }
if err := cmdFlags.Parse(args); err != nil {
return 1
@ -53,7 +53,7 @@ func (c *RefreshCommand) Run(args []string) int {
opReq := c.Operation()
opReq.Type = backend.OperationTypeRefresh
opReq.Module = mod
opReq.LockState = c.Meta.lockState
opReq.LockState = c.Meta.stateLock
// Perform the operation
op, err := b.Operation(context.Background(), opReq)

View File

@ -26,7 +26,7 @@ func (c *TaintCommand) Run(args []string) int {
cmdFlags.StringVar(&c.Meta.statePath, "state", DefaultStateFilename, "path")
cmdFlags.StringVar(&c.Meta.stateOutPath, "state-out", "", "path")
cmdFlags.StringVar(&c.Meta.backupPath, "backup", "", "path")
cmdFlags.BoolVar(&c.Meta.lockState, "state-lock", true, "lock state")
cmdFlags.BoolVar(&c.Meta.stateLock, "state-lock", true, "lock state")
cmdFlags.Usage = func() { c.Ui.Error(c.Help()) }
if err := cmdFlags.Parse(args); err != nil {
return 1
@ -72,7 +72,7 @@ func (c *TaintCommand) Run(args []string) int {
return 1
}
if s, ok := st.(state.Locker); c.Meta.lockState && ok {
if s, ok := st.(state.Locker); c.Meta.stateLock && ok {
if err := s.Lock("taint"); err != nil {
c.Ui.Error(fmt.Sprintf("Failed to lock state: %s", err))
return 1

View File

@ -25,7 +25,7 @@ func (c *UntaintCommand) Run(args []string) int {
cmdFlags.StringVar(&c.Meta.statePath, "state", DefaultStateFilename, "path")
cmdFlags.StringVar(&c.Meta.stateOutPath, "state-out", "", "path")
cmdFlags.StringVar(&c.Meta.backupPath, "backup", "", "path")
cmdFlags.BoolVar(&c.Meta.lockState, "state-lock", true, "lock state")
cmdFlags.BoolVar(&c.Meta.stateLock, "state-lock", true, "lock state")
cmdFlags.Usage = func() { c.Ui.Error(c.Help()) }
if err := cmdFlags.Parse(args); err != nil {
return 1
@ -60,7 +60,7 @@ func (c *UntaintCommand) Run(args []string) int {
return 1
}
if s, ok := st.(state.Locker); c.Meta.lockState && ok {
if s, ok := st.(state.Locker); c.Meta.stateLock && ok {
if err := s.Lock("untaint"); err != nil {
c.Ui.Error(fmt.Sprintf("Failed to lock state: %s", err))
return 1