Added config parameter for chartmuseum URL.
Issue-ID: RIC-955
Signed-off-by: subhash kumar singh <subh.singh@samsung.com>
Change-Id: Ifbab618f42abea6827f26b5d4cad23589b9d3acf
log-level: debug
onborder-url: "http://127.0.0.1:9191"
mock-server: "127.0.0.1:9191"
-getCharts-url: "http://127.0.0.1:9191"
+getCharts-url: "http://127.0.0.1:9191/helmrepo/api/charts"
download-charts-url-format: "http://127.0.0.1:9191/helmrepo/charts/%s-%s.tgz"
getCharts-by-name-url: "http://127.0.0.1:9191/helmrepo/api/charts/%s"
getCharts-by-name-and-version-url: "http://127.0.0.1:9191/helmrepo/api/charts/%s/%s"
-getXappHealth-url: "http://127.0.0.1:9191/ric/v1/health/alive/%s/%s"
\ No newline at end of file
+getXappHealth-url: "http://127.0.0.1:9191/ric/v1/health/alive/%s/%s"
+customOnboard-url: "http://127.0.0.1:37019/api/charts"
\ No newline at end of file
download-charts-url-format: "http://service-ricplt-xapp-onboarder-http.ricplt:8080/charts/%s-%s.tgz"
getCharts-by-name-url: "http://service-ricplt-xapp-onboarder-http:8080/api/charts/%s"
getCharts-by-name-and-version-url: "http://service-ricplt-xapp-onboarder-http:8080/api/charts/%s/%s"
-getXappHealth-url: "http://service-ricxapp-%s-http.%s:8080/ric/v1/health/alive"
\ No newline at end of file
+getXappHealth-url: "http://service-ricxapp-%s-http.%s:8080/ric/v1/health/alive"
+customOnboard-url: "http://service-ricplt-xapp-onboarder-http.ricplt:8080/api/charts"
\ No newline at end of file
DownloadChartURLFormat string `yaml:"download-charts-url-format"`
MockServer string `yaml:"mock-server"`
GETxAPPHealthURL string `yaml:"getXappHealth-url"`
+ CustomOnboardURL string `yaml:"customOnboard-url"`
}
func ReadConfiguration(configFile string) (c *Conf, err error) {
// onboard provided helm chart
func (o *Onboarder) CustomOnboard(reader io.Reader) middleware.Responder {
ricdms.Logger.Debug("onboarder received req to onboard")
- resp, err := http.Post("http://service-ricplt-xapp-onboarder-http.ricplt:8080/api/charts", "application/x-www-form-urlencoded", reader)
+ resp, err := http.Post(ricdms.Config.CustomOnboardURL, "application/x-www-form-urlencoded", reader)
if err != nil {
ricdms.Logger.Error("err received while onboarding chart to chartmuseum: %v", err)
// TODO: introcuce error in in swagger to handle the error cases.