diff options
author | 2020-03-31 01:30:03 +0000 | |
---|---|---|
committer | 2020-04-11 00:51:20 +0000 | |
commit | c644ab480d2a764ee242cca14f96ea28a181bcad (patch) | |
tree | 02f9e0bdc96110e26188878b34bd1ce6802e4ecb /src/orchestrator/api/api.go | |
parent | 335c7cca38eb804c2977e4dd9af9efa0ea7ef82b (diff) |
Resolve the helm templates
Resolving the helm templates for each of the apps
in the compositeApp by utilizing the helm libraries
and thus getting the sorted templates with all values
rendered.
This is a subtask of adding instantiation APIs.
Issue-ID: MULTICLOUD-1041
Signed-off-by: Rajamohan Raj <rajamohan.raj@intel.com>
Change-Id: Id4fddda69b5276b2409d835723b11367400ab6ea
Diffstat (limited to 'src/orchestrator/api/api.go')
-rw-r--r-- | src/orchestrator/api/api.go | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/orchestrator/api/api.go b/src/orchestrator/api/api.go index 1d38f106..fbd29563 100644 --- a/src/orchestrator/api/api.go +++ b/src/orchestrator/api/api.go @@ -33,7 +33,8 @@ func NewRouter(projectClient moduleLib.ProjectManager, deploymentIntentGrpClient moduleLib.DeploymentIntentGroupManager, intentClient moduleLib.IntentManager, compositeProfileClient moduleLib.CompositeProfileManager, - appProfileClient moduleLib.AppProfileManager) *mux.Router { + appProfileClient moduleLib.AppProfileManager, + instantiationClient moduleLib.InstantiationManager) *mux.Router { router := mux.NewRouter().PathPrefix("/v2").Subrouter() @@ -163,5 +164,16 @@ func NewRouter(projectClient moduleLib.ProjectManager, router.HandleFunc("/projects/{project-name}/composite-apps/{composite-app-name}/{composite-app-version}/deployment-intent-groups/{deployment-intent-group-name}/intents/{intent-name}", intentHandler.getIntentHandler).Methods("GET") router.HandleFunc("/projects/{project-name}/composite-apps/{composite-app-name}/{composite-app-version}/deployment-intent-groups/{deployment-intent-group-name}/intents/{intent-name}", intentHandler.deleteIntentHandler).Methods("DELETE") + // setting routes for Instantiation + if instantiationClient == nil { + instantiationClient = moduleClient.Instantiation + } + + instantiationHandler := instantiationHandler{ + client: instantiationClient, + } + + router.HandleFunc("/projects/{project-name}/composite-apps/{composite-app-name}/{composite-app-version}/deployment-intent-groups/{deployment-intent-group-name}/instantiate", instantiationHandler.instantiateHandler).Methods("POST") + return router } |