chia7712 commented on code in PR #750:
URL: https://github.com/apache/yunikorn-core/pull/750#discussion_r1442454587
##########
pkg/webservice/handlers.go:
##########
@@ -60,6 +60,27 @@ const (
NodeDoesNotExists = "Node not found"
)
+var allowedActiveStatusMsg string
+var allowedAppActiveStates map[string]bool
+
+func init() {
+ allowedAppActiveStates = make(map[string]bool)
+
+ allowedAppActiveStates["new"] = true
+ allowedAppActiveStates["accepted"] = true
+ allowedAppActiveStates["starting"] = true
+ allowedAppActiveStates["running"] = true
+ allowedAppActiveStates["completing"] = true
+ allowedAppActiveStates["failing"] = true
+ allowedAppActiveStates["resuming"] = true
+
+ var activeStates []string
+ for k := range allowedAppActiveStates {
+ activeStates = append(activeStates, k)
+ }
+ allowedActiveStatusMsg = fmt.Sprintf("Only following active states are
allowed: %s", strings.Join(activeStates, ","))
Review Comment:
yep!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]