Ver código fonte

Add `REMOVE` and `ORPHANED` to TaskState

This fix tries to address the issue raised in 36142 where
there are discrepancies between Swarm API and swagger.yaml.

This fix adds two recently added state `REMOVE` and `ORPHANED` to TaskState.

This fix fixes 36142.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Yong Tang 7 anos atrás
pai
commit
a40687f5ac
2 arquivos alterados com 6 adições e 0 exclusões
  1. 2 0
      api/swagger.yaml
  2. 4 0
      api/types/swarm/task.go

+ 2 - 0
api/swagger.yaml

@@ -2804,6 +2804,8 @@ definitions:
       - "shutdown"
       - "failed"
       - "rejected"
+      - "remove"
+      - "orphaned"
 
   Task:
     type: "object"

+ 4 - 0
api/types/swarm/task.go

@@ -36,6 +36,10 @@ const (
 	TaskStateFailed TaskState = "failed"
 	// TaskStateRejected REJECTED
 	TaskStateRejected TaskState = "rejected"
+	// TaskStateRemove REMOVE
+	TaskStateRemove TaskState = "remove"
+	// TaskStateOrphaned ORPHANED
+	TaskStateOrphaned TaskState = "orphaned"
 )
 
 // Task represents a task.