summaryrefslogtreecommitdiffstats
path: root/src/dcm/cmd
diff options
context:
space:
mode:
authorItohan <itohan.ukponmwan@intel.com>2020-04-14 17:06:13 -0700
committerItohan <itohan.ukponmwan@intel.com>2020-04-20 12:02:19 -0700
commitb0919a7cd6f49bcd2ae3e59c7a31e40f36cb7879 (patch)
treef756d263bd25140ad83cf6b9041a9e3f62f7e5c7 /src/dcm/cmd
parentf853b30cdc2655f6889f24214ba21791351c0787 (diff)
Implement Apply API for DCM
This implents the Apply API. When the apply API is called, this reads from mongodb and creates resources in ETCD Issue-ID: MULTICLOUD-996 Signed-off-by: Itohan Ukponmwan <itohan.ukponmwan@intel.com> Change-Id: I5b9c8b44673e66296d1339b5b3f4afc5f4cae9cc
Diffstat (limited to 'src/dcm/cmd')
-rw-r--r--src/dcm/cmd/main.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/dcm/cmd/main.go b/src/dcm/cmd/main.go
index d8c13d2e..77d5348b 100644
--- a/src/dcm/cmd/main.go
+++ b/src/dcm/cmd/main.go
@@ -26,7 +26,7 @@ import (
"github.com/onap/multicloud-k8s/src/orchestrator/pkg/infra/auth"
"github.com/onap/multicloud-k8s/src/orchestrator/pkg/infra/config"
"github.com/onap/multicloud-k8s/src/orchestrator/pkg/infra/db"
-
+ contextDb "github.com/onap/multicloud-k8s/src/orchestrator/pkg/infra/contextdb"
"github.com/gorilla/handlers"
)
@@ -41,6 +41,13 @@ func main() {
log.Fatalln("Exiting...")
}
+ err = contextDb.InitializeContextDatabase()
+ if err != nil {
+ log.Println("Unable to initialize database connection...")
+ log.Println(err)
+ log.Fatalln("Exiting...")
+ }
+
httpRouter := api.NewRouter(nil, nil, nil, nil, nil)
loggedRouter := handlers.LoggingHandler(os.Stdout, httpRouter)
log.Println("Starting Distributed Cloud Manager API")