Update keycloak version
[nonrtric.git] / service-exposure / rapps-helm-installer.go
index 0dc9341..4a5d464 100644 (file)
@@ -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 {