X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=service-exposure%2Frapps-helm-installer.go;h=4a5d4649e8aa9a2b53ee455c7d0c5b0792413655;hb=df61b02070956cac9ec7429281dc78ba853b46ed;hp=0dc93419931675896a8b56aead7de0a00cebfc60;hpb=2513eea5c9c4a1685ab6cbf0c2727d21399de5c7;p=nonrtric.git diff --git a/service-exposure/rapps-helm-installer.go b/service-exposure/rapps-helm-installer.go index 0dc93419..4a5d4649 100644 --- a/service-exposure/rapps-helm-installer.go +++ b/service-exposure/rapps-helm-installer.go @@ -2,7 +2,7 @@ // ========================LICENSE_START================================= // O-RAN-SC // %% -// Copyright (C) 2022: Nordix Foundation +// Copyright (C) 2022-2023: Nordix Foundation // %% // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -225,7 +225,6 @@ func runUninstall(res http.ResponseWriter, req *http.Request) { func uninstallSecurity(rapp Rapp, chartName string) error { var url string var params string - role := rapp.Roles[0].Role realm := rapp.Realm client := rapp.Client authenticator := rapp.Authenticator @@ -243,7 +242,7 @@ func uninstallSecurity(rapp Rapp, chartName string) error { // remove keycloak client fmt.Println("Removing keycloak client") url = "http://rapps-keycloak-mgr.default/remove?" - params = "name=" + client + "&realm=" + realm + "&role=" + role + "&authType=" + authenticator + params = "name=" + client + "&realm=" + realm + "&authType=" + authenticator url += params _, err = http.Get(url) if err != nil { @@ -290,6 +289,7 @@ func main() { func addToRepo(url string) (string, error) { repoFile := settings.RepositoryConfig + fmt.Printf("Repo File %s\n", repoFile) //Ensure the file directory exists as it is required for file locking err := os.MkdirAll(filepath.Dir(repoFile), os.ModePerm) @@ -341,7 +341,10 @@ func dryRun() (*action.Install, error) { install := action.NewInstall(actionConfig) + fmt.Printf("Repo Name: %s\n",repoName) + fmt.Printf("Chart Name: %s\n",chartName) cp, err := install.ChartPathOptions.LocateChart(fmt.Sprintf("%s/%s", repoName, chartName), settings) + fmt.Printf("Chart location: %s\n",cp) chartRequested, err = loader.Load(cp) @@ -537,7 +540,7 @@ func registrerRapp(chartName, chartType string) { id serial PRIMARY KEY, name VARCHAR ( 50 ) UNIQUE NOT NULL, type VARCHAR ( 50 ) NOT NULL, - created_on TIMESTAMP DEFAULT NOW() + created_on TIMESTAMP DEFAULT NOW() );` _, err = db.Exec(createStmt) if err != nil {