diff options
author | Kiran Kamineni <kiran.k.kamineni@intel.com> | 2019-07-18 14:11:11 -0700 |
---|---|---|
committer | Kiran Kamineni <kiran.k.kamineni@intel.com> | 2019-07-18 14:11:16 -0700 |
commit | e04fd6fa1f0abe6b18787b192e01164db1db06db (patch) | |
tree | 12ffeeadec8c154300c132e46b584c287211aef5 /src/k8splugin/api/api.go | |
parent | 71a2a9c8b8c77cee67571549a06c96ceb3781077 (diff) |
Add a list api for instances
curl -X GET /v1/instance
returns all the instances created.
It returns abbreviated instances for improved readability.
For details on what resources were created
for each instance, use the ID with GET.
Issue-ID: MULTICLOUD-715
Change-Id: I05afe0fd2c254acbca4329289c81545f95c9fac5
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
Diffstat (limited to 'src/k8splugin/api/api.go')
-rw-r--r-- | src/k8splugin/api/api.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/k8splugin/api/api.go b/src/k8splugin/api/api.go index 353972a1..1bbe14a3 100644 --- a/src/k8splugin/api/api.go +++ b/src/k8splugin/api/api.go @@ -38,6 +38,7 @@ func NewRouter(defClient rb.DefinitionManager, instHandler := instanceHandler{client: instClient} instRouter := router.PathPrefix("/v1").Subrouter() instRouter.HandleFunc("/instance", instHandler.createHandler).Methods("POST") + instRouter.HandleFunc("/instance", instHandler.listHandler).Methods("GET") instRouter.HandleFunc("/instance/{instID}", instHandler.getHandler).Methods("GET") instRouter.HandleFunc("/instance/{instID}", instHandler.deleteHandler).Methods("DELETE") // (TODO): Fix update method |