diff options
author | Ritu Sood <Ritu.Sood@intel.com> | 2019-08-19 22:27:28 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-08-19 22:27:28 +0000 |
commit | 49ea7e46428c70fb553f6785b1ce22882f64c259 (patch) | |
tree | 6d40bc90e598592aba33c5d721f3f92fdc2f33ca /src/k8splugin/api/instancehandler.go | |
parent | 3f122fd2ac12ac9110c65924070732836de4ce8a (diff) | |
parent | f22ab29dff2b69aaadd748c34c259f25dacec52d (diff) |
Merge "Add query parameters support to instance API"
Diffstat (limited to 'src/k8splugin/api/instancehandler.go')
-rw-r--r-- | src/k8splugin/api/instancehandler.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/k8splugin/api/instancehandler.go b/src/k8splugin/api/instancehandler.go index 3ec055bc..be8e64fa 100644 --- a/src/k8splugin/api/instancehandler.go +++ b/src/k8splugin/api/instancehandler.go @@ -106,10 +106,16 @@ func (i instanceHandler) getHandler(w http.ResponseWriter, r *http.Request) { } } -// getHandler retrieves information about an instance via the ID +// listHandler retrieves information about an instance via the ID func (i instanceHandler) listHandler(w http.ResponseWriter, r *http.Request) { - resp, err := i.client.List() + //If parameters are not provided, they are sent as empty strings + //Which will list all instances + rbName := r.FormValue("rb-name") + rbVersion := r.FormValue("rb-version") + ProfileName := r.FormValue("profile-name") + + resp, err := i.client.List(rbName, rbVersion, ProfileName) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return |