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.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")