summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRitu Sood <Ritu.Sood@intel.com>2020-01-23 18:12:20 +0000
committerGerrit Code Review <gerrit@onap.org>2020-01-23 18:12:20 +0000
commitfc960539db54415255c710f593db4513c5e49412 (patch)
tree1d650407ecdc8b76f88a5400fd03b8d68fce4552
parentf3c09ea952108a5bf9b0bc143ffeee2a1bf73fd3 (diff)
parentf05f2447b40b8391600b932617a772a451261443 (diff)
Merge "Update profilehandler comments"
-rw-r--r--src/k8splugin/api/profilehandler.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/k8splugin/api/profilehandler.go b/src/k8splugin/api/profilehandler.go
index 2461d4f8..acd23060 100644
--- a/src/k8splugin/api/profilehandler.go
+++ b/src/k8splugin/api/profilehandler.go
@@ -31,12 +31,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
@@ -71,7 +71,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"]
@@ -98,8 +98,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"]
@@ -127,8 +127,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"]
@@ -149,7 +149,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"]