Revert status code cmd

pull/9383/head
Priya Wadhwa 2020-09-29 19:38:12 -04:00
parent a05dc6516b
commit 6e91d719dd
1 changed files with 11 additions and 10 deletions

View File

@ -66,6 +66,8 @@ const (
// Irrelevant is used for statuses that aren't meaningful for worker nodes // Irrelevant is used for statuses that aren't meaningful for worker nodes
Irrelevant = "Irrelevant" Irrelevant = "Irrelevant"
InsufficientStorage = reason.ExInsufficientStorage
// New status modes, based roughly on HTTP/SMTP standards // New status modes, based roughly on HTTP/SMTP standards
// 1xx signifies a transitional state. If retried, it will soon return a 2xx, 4xx, or 5xx // 1xx signifies a transitional state. If retried, it will soon return a 2xx, 4xx, or 5xx
Starting = 100 Starting = 100
@ -84,18 +86,18 @@ const (
Paused = 418 // I'm a teapot! Paused = 418 // I'm a teapot!
// 5xx signifies a server-side error (that may be retryable) // 5xx signifies a server-side error (that may be retryable)
Error = 500 Error = 500
InsufficientStorage = 507 Unknown = 520
Unknown = 520
) )
var ( var (
codeNames = map[int]string{ codeNames = map[int]string{
100: "Starting", reason.ExInsufficientStorage: "InsufficientStorage",
101: "Pausing", 100: "Starting",
102: "Unpausing", 101: "Pausing",
110: "Stopping", 102: "Unpausing",
103: "Deleting", 110: "Stopping",
103: "Deleting",
200: "OK", 200: "OK",
203: "Warning", 203: "Warning",
@ -105,12 +107,11 @@ var (
418: "Paused", 418: "Paused",
500: "Error", 500: "Error",
507: "InsufficientStorage",
520: "Unknown", 520: "Unknown",
} }
codeDetails = map[int]string{ codeDetails = map[int]string{
507: "/var is almost out of disk space", reason.ExInsufficientStorage: "/var is almost out of disk space",
} }
) )