summaryrefslogtreecommitdiffstats
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.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/k8splugin/api/api.go b/src/k8splugin/api/api.go
index 604ccdc8..741c0639 100644
--- a/src/k8splugin/api/api.go
+++ b/src/k8splugin/api/api.go
@@ -15,6 +15,7 @@ package api
import (
"k8splugin/internal/app"
+ "k8splugin/internal/connection"
"k8splugin/internal/rb"
"github.com/gorilla/mux"
@@ -41,6 +42,7 @@ func NewRouter(defClient rb.DefinitionManager,
// (TODO): Fix update method
// instRouter.HandleFunc("/{vnfInstanceId}", UpdateHandler).Methods("PUT")
+ //Setup the broker handler here
brokerHandler := brokerInstanceHandler{client: instClient}
instRouter.HandleFunc("/{cloud-owner}/{cloud-region}/infra_workload", brokerHandler.createHandler).Methods("POST")
instRouter.HandleFunc("/{cloud-owner}/{cloud-region}/infra_workload/{instID}",
@@ -48,6 +50,13 @@ func NewRouter(defClient rb.DefinitionManager,
instRouter.HandleFunc("/{cloud-owner}/{cloud-region}/infra_workload/{instID}",
brokerHandler.deleteHandler).Methods("DELETE")
+ //Setup the connectivity api handler here
+ connectionClient := connection.NewConnectionClient()
+ connectionHandler := connection.ConnectionHandler{Client: connectionClient}
+ instRouter.HandleFunc("/connectivity-info", connectionHandler.CreateHandler).Methods("POST")
+ instRouter.HandleFunc("/connectivity-info/{connname}", connectionHandler.GetHandler).Methods("GET")
+ instRouter.HandleFunc("/connectivity-info/{connname}", connectionHandler.DeleteHandler).Methods("DELETE")
+
//Setup resource bundle definition routes
if defClient == nil {
defClient = rb.NewDefinitionClient()