()
| 61 | ) |
| 62 | |
| 63 | func (s DeviceState) String() string { |
| 64 | switch s { |
| 65 | case Creating: |
| 66 | return "Creating" |
| 67 | case Created: |
| 68 | return "Created" |
| 69 | case Activating: |
| 70 | return "Activating" |
| 71 | case Activated: |
| 72 | return "Activated" |
| 73 | case Suspending: |
| 74 | return "Suspending" |
| 75 | case Suspended: |
| 76 | return "Suspended" |
| 77 | case Resuming: |
| 78 | return "Resuming" |
| 79 | case Resumed: |
| 80 | return "Resumed" |
| 81 | case Deactivating: |
| 82 | return "Deactivating" |
| 83 | case Deactivated: |
| 84 | return "Deactivated" |
| 85 | case Removing: |
| 86 | return "Removing" |
| 87 | case Removed: |
| 88 | return "Removed" |
| 89 | case Faulty: |
| 90 | return "Faulty" |
| 91 | default: |
| 92 | return fmt.Sprintf("unknown %d", s) |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | // DeviceInfo represents metadata for thin device within thin-pool |
| 97 | type DeviceInfo struct { |
no outgoing calls