diff options
author | 2019-01-18 00:10:54 +0000 | |
---|---|---|
committer | 2019-01-18 00:10:54 +0000 | |
commit | 002602dc6b09d4012fbca05740eb4e4dbb9ce6ce (patch) | |
tree | aaba4c9c5c22ffc6e9bc87b64081168540da4e10 /src/k8splugin/api/api.go | |
parent | e9ee50babb3bbfe7a6e774460a46782abefd5107 (diff) | |
parent | cd9644049545a47676e87ad279833ced1b0f9c1a (diff) |
Merge "Add resource bundle profile api"
Diffstat (limited to 'src/k8splugin/api/api.go')
-rw-r--r-- | src/k8splugin/api/api.go | 10 |
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") |