aboutsummaryrefslogtreecommitdiffstats
path: root/src/k8splugin/api/api.go
diff options
context:
space:
mode:
authorKiran Kamineni <kiran.k.kamineni@intel.com>2018-11-15 17:09:54 -0800
committerVictor Morales <victor.morales@intel.com>2018-11-19 14:41:49 -0800
commit3f780f7973081903f1ab6ea01a855fb6c5512a48 (patch)
tree93c596d4b438df56fc9894162b1f5a2292ea0068 /src/k8splugin/api/api.go
parent1b76b8fada122365b9adf99cc305721cc114d30a (diff)
Reconcile names in code and Jira items
k8splugin manages deployment of resource bundles and these are not restricted to vnfs. This names' change is to reflect that functionality. P2: using rb instead of resource bundle Issue-ID: MULTICLOUD-410 Change-Id: I09e0b92a8fc13562e1c6bb17dc8bc13de97264d7 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.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/k8splugin/api/api.go b/src/k8splugin/api/api.go
index f05fbb0b..571a9576 100644
--- a/src/k8splugin/api/api.go
+++ b/src/k8splugin/api/api.go
@@ -14,7 +14,7 @@ limitations under the License.
package api
import (
- "k8splugin/vnfd"
+ "k8splugin/rb"
"os"
"path/filepath"
"plugin"
@@ -106,13 +106,13 @@ func NewRouter(kubeconfig string) *mux.Router {
vnfInstanceHandler.HandleFunc("/{cloudRegionID}/{namespace}/{externalVNFID}", DeleteHandler).Methods("DELETE")
vnfInstanceHandler.HandleFunc("/{cloudRegionID}/{namespace}/{externalVNFID}", GetHandler).Methods("GET")
- vnfdRouter := router.PathPrefix("/v1/vnfd").Subrouter()
- vh := vnfdHandler{vnfdClient: vnfd.GetVNFDClient()}
- vnfdRouter.HandleFunc("", vh.vnfdCreateHandler).Methods("POST")
- vnfdRouter.HandleFunc("/{vnfdID}/upload", vh.vnfdUploadHandler).Methods("POST")
- vnfdRouter.HandleFunc("", vh.vnfdListHandler).Methods("GET")
- vnfdRouter.HandleFunc("/{vnfdID}", vh.vnfdGetHandler).Methods("GET")
- vnfdRouter.HandleFunc("/{vnfdID}", vh.vnfdDeleteHandler).Methods("DELETE")
+ resRouter := router.PathPrefix("/v1/rb").Subrouter()
+ rbdef := rbDefinitionHandler{client: rb.NewDefinitionClient()}
+ resRouter.HandleFunc("/definition", rbdef.createHandler).Methods("POST")
+ resRouter.HandleFunc("/definition/{rbdID}/upload", rbdef.uploadHandler).Methods("POST")
+ resRouter.HandleFunc("/definition", rbdef.listHandler).Methods("GET")
+ resRouter.HandleFunc("/definition/{rbdID}", rbdef.getHandler).Methods("GET")
+ resRouter.HandleFunc("/definition/{rbdID}", rbdef.deleteHandler).Methods("DELETE")
// (TODO): Fix update method
// vnfInstanceHandler.HandleFunc("/{vnfInstanceId}", UpdateHandler).Methods("PUT")