~juju-qa/ubuntu/xenial/juju/2.0-rc2

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/worker/storageprovisioner/filesystem_ops.go

  • Committer: Nicholas Skaggs
  • Date: 2016-09-30 14:39:30 UTC
  • mfrom: (1.8.1)
  • Revision ID: nicholas.skaggs@canonical.com-20160930143930-vwwhrefh6ftckccy
import upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
                        }
45
45
                        statuses = append(statuses, params.EntityStatusArgs{
46
46
                                Tag:    filesystemParams[i].Tag.String(),
47
 
                                Status: status.StatusError.String(),
 
47
                                Status: status.Error.String(),
48
48
                                Info:   err.Error(),
49
49
                        })
50
50
                        logger.Debugf(
63
63
                for i, result := range results {
64
64
                        statuses = append(statuses, params.EntityStatusArgs{
65
65
                                Tag:    filesystemParams[i].Tag.String(),
66
 
                                Status: status.StatusAttaching.String(),
 
66
                                Status: status.Attaching.String(),
67
67
                        })
68
68
                        entityStatus := &statuses[len(statuses)-1]
69
69
                        if result.Error != nil {
74
74
                                // that we will retry. When we distinguish between
75
75
                                // transient and permanent errors, we will set the
76
76
                                // status to "error" for permanent errors.
77
 
                                entityStatus.Status = status.StatusPending.String()
 
77
                                entityStatus.Status = status.Pending.String()
78
78
                                entityStatus.Info = result.Error.Error()
79
79
                                logger.Debugf(
80
80
                                        "failed to create %s: %v",
148
148
                        p := filesystemAttachmentParams[i]
149
149
                        statuses = append(statuses, params.EntityStatusArgs{
150
150
                                Tag:    p.Filesystem.String(),
151
 
                                Status: status.StatusAttached.String(),
 
151
                                Status: status.Attached.String(),
152
152
                        })
153
153
                        entityStatus := &statuses[len(statuses)-1]
154
154
                        if result.Error != nil {
163
163
                                // indicate that we will retry. When we distinguish
164
164
                                // between transient and permanent errors, we will
165
165
                                // set the status to "error" for permanent errors.
166
 
                                entityStatus.Status = status.StatusAttaching.String()
 
166
                                entityStatus.Status = status.Attaching.String()
167
167
                                entityStatus.Info = result.Error.Error()
168
168
                                logger.Debugf(
169
169
                                        "failed to attach %s to %s: %v",
216
216
                        }
217
217
                        statuses = append(statuses, params.EntityStatusArgs{
218
218
                                Tag:    filesystemParams[i].Tag.String(),
219
 
                                Status: status.StatusError.String(),
 
219
                                Status: status.Error.String(),
220
220
                                Info:   err.Error(),
221
221
                        })
222
222
                        logger.Debugf(
250
250
                        reschedule = append(reschedule, ops[tag])
251
251
                        statuses = append(statuses, params.EntityStatusArgs{
252
252
                                Tag:    tag.String(),
253
 
                                Status: status.StatusDestroying.String(),
 
253
                                Status: status.Destroying.String(),
254
254
                                Info:   err.Error(),
255
255
                        })
256
256
                }
297
297
                                // attachment, we'll have to check if
298
298
                                // there are any other attachments
299
299
                                // before saying the status "detached".
300
 
                                Status: status.StatusDetached.String(),
 
300
                                Status: status.Detached.String(),
301
301
                        })
302
302
                        id := params.MachineStorageId{
303
303
                                MachineTag:    p.Machine.String(),
306
306
                        entityStatus := &statuses[len(statuses)-1]
307
307
                        if err != nil {
308
308
                                reschedule = append(reschedule, ops[id])
309
 
                                entityStatus.Status = status.StatusDetaching.String()
 
309
                                entityStatus.Status = status.Detaching.String()
310
310
                                entityStatus.Info = err.Error()
311
311
                                logger.Debugf(
312
312
                                        "failed to detach %s from %s: %v",