diff options
Diffstat (limited to 'src/k8splugin/api')
-rw-r--r-- | src/k8splugin/api/api.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/k8splugin/api/api.go b/src/k8splugin/api/api.go index 4bf8d6a6..282835a4 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" @@ -39,6 +40,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}", @@ -46,6 +48,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() |