You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by GitBox <gi...@apache.org> on 2021/01/26 10:51:56 UTC

[GitHub] [incubator-yunikorn-core] manirajv06 commented on a change in pull request #231: YUNIKORN-418: Add "config" REST API

manirajv06 commented on a change in pull request #231:
URL: https://github.com/apache/incubator-yunikorn-core/pull/231#discussion_r564420063



##########
File path: pkg/webservice/handlers.go
##########
@@ -457,7 +457,36 @@ func getClusterConfig(w http.ResponseWriter, r *http.Request) {
 	}
 }
 
-func updateConfig(w http.ResponseWriter, r *http.Request) {
+func createClusterConfig(w http.ResponseWriter, r *http.Request) {
+	writeHeaders(w)
+
+	queryParams := r.URL.Query()
+	_, dryRunExists := queryParams["dry_run"]
+	if len(queryParams) == 0 || !dryRunExists {
+		http.Error(w, "Mandatory parameters are missing in URL path. Please check the usage documentation", http.StatusBadRequest)
+		return
+	}
+	if queryParams.Get("dry_run") != "1" {
+		http.Error(w, "Invalid query params. Please check the usage documentation", http.StatusBadRequest)
+		return
+	}

Review comment:
       Taken care. Filed a separate JIRA - https://issues.apache.org/jira/browse/YUNIKORN-515 to track doc/user guide changes.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org