diff options
author | Bin Yang <bin.yang@windriver.com> | 2019-04-12 03:26:10 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-04-12 03:26:10 +0000 |
commit | fccd5b4d6efd86fc55598103aca140a8f28d5071 (patch) | |
tree | 66682d6c36e9c60ccd26be70c5b14f8b892f05a4 /src/k8splugin/api | |
parent | 84c644d692929bbf041aae16c91e6dbf5fbdeb7f (diff) | |
parent | 8c3bfebaf6792bbf5fb9042532c918107633a957 (diff) |
Merge "Add Connectivity Info API"
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 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() |