Uniform formatting and volume as hostpath
[ealt-edge.git] / mecm / mepm / applcm / broker / pkg / handlers / handlersImpl.go
index 282d5b0..6867b2c 100644 (file)
@@ -23,6 +23,13 @@ import (
        "bytes"
        "encoding/json"
        "fmt"
+       "io"
+       "io/ioutil"
+       "net/http"
+       "os"
+       "path/filepath"
+       "strings"
+
        "github.com/buger/jsonparser"
        "github.com/ghodss/yaml"
        "github.com/google/uuid"
@@ -30,18 +37,12 @@ import (
        "github.com/sirupsen/logrus"
        "google.golang.org/grpc/codes"
        "google.golang.org/grpc/status"
-       "io"
-       "io/ioutil"
-       "net/http"
-       "os"
-       "path/filepath"
-       "strings"
 )
 
 // Handler of REST APIs
 type HandlerImpl struct {
-       logger     *logrus.Logger
-       dbAdapter  *dbAdapter.DbAdapter
+       logger    *logrus.Logger
+       dbAdapter *dbAdapter.DbAdapter
 }
 
 // Creates handler implementation
@@ -296,7 +297,7 @@ func (impl *HandlerImpl) InstantiateAppInstance(w http.ResponseWriter, r *http.R
                        respondError(w, http.StatusInternalServerError, "artifact not available in application package")
                        return
                }
-               pluginInfo = "helm.plugin" + ":" + os.Getenv("HELM_PLUGIN_PORT")
+               pluginInfo = "helmplugin" + ":" + os.Getenv("HELM_PLUGIN_PORT")
                impl.logger.Infof("Plugin Info ", pluginInfo)
        case "kubernetes":
                pkgPath := PackageFolderPath + packageName + PackageArtifactPath + "Kubernetes"
@@ -380,7 +381,7 @@ func (impl *HandlerImpl) QueryAppInstanceInfo(w http.ResponseWriter, r *http.Req
 
                switch appPackageInfo.DeployType {
                case "helm":
-                       pluginInfo = "helm.plugin" + ":" + os.Getenv("HELM_PLUGIN_PORT")
+                       pluginInfo = "helmplugin" + ":" + os.Getenv("HELM_PLUGIN_PORT")
                case "kubernetes":
                        pluginInfo = "kubernetes.plugin" + ":" + os.Getenv("KUBERNETES_PLUGIN_PORT")
                default:
@@ -434,7 +435,7 @@ func (impl *HandlerImpl) TerminateAppInstance(w http.ResponseWriter, r *http.Req
        var pluginInfo string
        switch appPackageInfo.DeployType {
        case "helm":
-               pluginInfo = "helm.plugin" + ":" + os.Getenv("HELM_PLUGIN_PORT")
+               pluginInfo = "helmplugin" + ":" + os.Getenv("HELM_PLUGIN_PORT")
        case "kubernetes":
                pluginInfo = "kubernetes.plugin" + ":" + os.Getenv("KUBERNETES_PLUGIN_PORT")
        default: