aboutsummaryrefslogtreecommitdiffstats
path: root/src/k8splugin/api/api.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/k8splugin/api/api.go')
-rw-r--r--src/k8splugin/api/api.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/k8splugin/api/api.go b/src/k8splugin/api/api.go
index 06f5009f..593e2b0b 100644
--- a/src/k8splugin/api/api.go
+++ b/src/k8splugin/api/api.go
@@ -106,6 +106,7 @@ func NewRouter(kubeconfig string) *mux.Router {
vnfInstanceHandler.HandleFunc("/{cloudRegionID}/{namespace}/{externalVNFID}", DeleteHandler).Methods("DELETE")
vnfInstanceHandler.HandleFunc("/{cloudRegionID}/{namespace}/{externalVNFID}", GetHandler).Methods("GET")
+ //rbd is resource bundle definition
resRouter := router.PathPrefix("/v1/rb").Subrouter()
rbdef := rbDefinitionHandler{client: rb.NewDefinitionClient()}
resRouter.HandleFunc("/definition", rbdef.createHandler).Methods("POST")
@@ -114,6 +115,15 @@ func NewRouter(kubeconfig string) *mux.Router {
resRouter.HandleFunc("/definition/{rbdID}", rbdef.getHandler).Methods("GET")
resRouter.HandleFunc("/definition/{rbdID}", rbdef.deleteHandler).Methods("DELETE")
+ //rbp is resource bundle profile
+ rbprofile := rbProfileHandler{client: rb.NewProfileClient()}
+ resRouter.HandleFunc("/profile", rbprofile.createHandler).Methods("POST")
+ resRouter.HandleFunc("/profile/{rbpID}/content", rbprofile.uploadHandler).Methods("POST")
+ resRouter.HandleFunc("/profile/help", rbprofile.helpHandler).Methods("GET")
+ resRouter.HandleFunc("/profile", rbprofile.listHandler).Methods("GET")
+ resRouter.HandleFunc("/profile/{rbpID}", rbprofile.getHandler).Methods("GET")
+ resRouter.HandleFunc("/profile/{rbpID}", rbprofile.deleteHandler).Methods("DELETE")
+
// (TODO): Fix update method
// vnfInstanceHandler.HandleFunc("/{vnfInstanceId}", UpdateHandler).Methods("PUT")