Update profilehandler comments 46/96046/2
authorMarcus G K Williams <marcus.williams@intel.com>
Thu, 19 Sep 2019 21:43:56 +0000 (14:43 -0700)
committerMarcus Williams <marcus.williams@intel.com>
Tue, 29 Oct 2019 22:36:38 +0000 (22:36 +0000)
Issue-ID: MULTICLOUD-828
Signed-off-by: Marcus G K Williams <marcus.williams@intel.com>
Change-Id: Ib7678c6829916cb7e29611d151f7d67c2a274faf

src/k8splugin/api/profilehandler.go

index 68ab77a..9aed299 100644 (file)
@@ -30,12 +30,12 @@ import (
 // Used to store backend implementations objects
 // Also simplifies mocking for unit testing purposes
 type rbProfileHandler struct {
-       // Interface that implements bundle Definition operations
-       // We will set this variable with a mock interface for testing
+       // Interface that implements bundle profile operations
+       // Set this variable with a mock interface for testing
        client rb.ProfileManager
 }
 
-// createHandler handles creation of the definition entry in the database
+// createHandler creates a profile entry in the database
 func (h rbProfileHandler) createHandler(w http.ResponseWriter, r *http.Request) {
        var p rb.Profile
 
@@ -70,7 +70,7 @@ func (h rbProfileHandler) createHandler(w http.ResponseWriter, r *http.Request)
        }
 }
 
-// uploadHandler handles upload of the bundle tar file into the database
+// uploadHandler uploads the profile artifact tar file into the database
 func (h rbProfileHandler) uploadHandler(w http.ResponseWriter, r *http.Request) {
        vars := mux.Vars(r)
        rbName := vars["rbname"]
@@ -97,8 +97,8 @@ func (h rbProfileHandler) uploadHandler(w http.ResponseWriter, r *http.Request)
        w.WriteHeader(http.StatusOK)
 }
 
-// getHandler handles GET operations on a particular ids
-// Returns a rb.Definition
+// getHandler gets a Profile Key in the database
+// Returns an rb.Profile
 func (h rbProfileHandler) getHandler(w http.ResponseWriter, r *http.Request) {
        vars := mux.Vars(r)
        rbName := vars["rbname"]
@@ -120,8 +120,8 @@ func (h rbProfileHandler) getHandler(w http.ResponseWriter, r *http.Request) {
        }
 }
 
-// getHandler handles GET operations on a particular ids
-// Returns a rb.Definition
+// getHandler gets all profiles of a Resource Bundle Key in the database
+// Returns a list of rb.Profile
 func (h rbProfileHandler) listHandler(w http.ResponseWriter, r *http.Request) {
        vars := mux.Vars(r)
        rbName := vars["rbname"]
@@ -142,7 +142,7 @@ func (h rbProfileHandler) listHandler(w http.ResponseWriter, r *http.Request) {
        }
 }
 
-// deleteHandler handles DELETE operations on a particular bundle definition id
+// deleteHandler deletes a particular Profile Key in the database
 func (h rbProfileHandler) deleteHandler(w http.ResponseWriter, r *http.Request) {
        vars := mux.Vars(r)
        rbName := vars["rbname"]