diff options
author | Ritu Sood <ritu.sood@intel.com> | 2020-03-03 00:44:52 -0800 |
---|---|---|
committer | Eric Multanen <eric.w.multanen@intel.com> | 2020-04-07 09:20:19 -0700 |
commit | ee5748eca6350222051125b5e2313f78da00efbe (patch) | |
tree | 0af1e364a976787a7c640e676a159e72d9be8a3e /src/ncm/api/api.go | |
parent | ec83b3d3bda5501b20e05efae198202b29396c4a (diff) |
Adding function to Query cluster based on label
Add Query endpoint and implements returning list
of clusters with label.
Issue-ID: MULTICLOUD-922
Signed-off-by: Ritu Sood <ritu.sood@intel.com>
Signed-off-by: Eric Multanen <eric.w.multanen@intel.com>
Change-Id: I879b5e9002a0cbc9191abb99f1e164ee2b1c6581
Diffstat (limited to 'src/ncm/api/api.go')
-rw-r--r-- | src/ncm/api/api.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ncm/api/api.go b/src/ncm/api/api.go index 34b46c67..3ff8671a 100644 --- a/src/ncm/api/api.go +++ b/src/ncm/api/api.go @@ -74,6 +74,7 @@ func NewRouter(testClient interface{}) *mux.Router { router.HandleFunc("/cluster-providers/{name}", clusterHandler.deleteClusterProviderHandler).Methods("DELETE") router.HandleFunc("/cluster-providers/{provider-name}/clusters", clusterHandler.createClusterHandler).Methods("POST") router.HandleFunc("/cluster-providers/{provider-name}/clusters", clusterHandler.getClusterHandler).Methods("GET") + router.HandleFunc("/cluster-providers/{provider-name}/clusters", clusterHandler.getClusterHandler).Queries("label", "{label}") router.HandleFunc("/cluster-providers/{provider-name}/clusters/{name}", clusterHandler.getClusterHandler).Methods("GET") router.HandleFunc("/cluster-providers/{provider-name}/clusters/{name}", clusterHandler.deleteClusterHandler).Methods("DELETE") router.HandleFunc("/cluster-providers/{provider-name}/clusters/{cluster-name}/labels", clusterHandler.createClusterLabelHandler).Methods("POST") |