17755: Merge branch 'main' into 17755-add-singularity-to-compute-image
[arvados.git] / lib / controller / fed_containers.go
index c62cea1168eb29c212ad5eefdd7a9d58dc609f8c..fd4f0521bcdcf0b0258cae415a2b63cc02043cd5 100644 (file)
@@ -19,7 +19,7 @@ import (
 func remoteContainerRequestCreate(
        h *genericFederatedRequestHandler,
        effectiveMethod string,
-       clusterId *string,
+       clusterID *string,
        uuid string,
        remainder string,
        w http.ResponseWriter,
@@ -42,7 +42,7 @@ func remoteContainerRequestCreate(
                return true
        }
 
-       if *clusterId == "" || *clusterId == h.handler.Cluster.ClusterID {
+       if *clusterID == "" || *clusterID == h.handler.Cluster.ClusterID {
                // Submitting container request to local cluster. No
                // need to set a runtime_token (rails api will create
                // one when the container runs) or do a remote cluster
@@ -66,14 +66,14 @@ func remoteContainerRequestCreate(
 
        crString, ok := request["container_request"].(string)
        if ok {
-               var crJson map[string]interface{}
-               err := json.Unmarshal([]byte(crString), &crJson)
+               var crJSON map[string]interface{}
+               err := json.Unmarshal([]byte(crString), &crJSON)
                if err != nil {
                        httpserver.Error(w, err.Error(), http.StatusBadRequest)
                        return true
                }
 
-               request["container_request"] = crJson
+               request["container_request"] = crJSON
        }
 
        containerRequest, ok := request["container_request"].(map[string]interface{})
@@ -117,7 +117,7 @@ func remoteContainerRequestCreate(
        req.ContentLength = int64(buf.Len())
        req.Header.Set("Content-Length", fmt.Sprintf("%v", buf.Len()))
 
-       resp, err := h.handler.remoteClusterRequest(*clusterId, req)
+       resp, err := h.handler.remoteClusterRequest(*clusterID, req)
        h.handler.proxy.ForwardResponse(w, resp, err)
        return true
 }