summaryrefslogtreecommitdiffstats
path: root/src/orchestrator/api
diff options
context:
space:
mode:
authorEric Multanen <eric.w.multanen@intel.com>2020-03-18 17:33:27 -0700
committerEric Multanen <eric.w.multanen@intel.com>2020-03-19 10:46:24 -0700
commitd08b7efcb335d892f0eb6f2c8e4a7d406a9b27fc (patch)
tree3c1f7caae426c86eb1811595da9a0c09c0c1fe41 /src/orchestrator/api
parent7cb9c0b9e9ee87f962c1a678471f24b14b02ec85 (diff)
Add more validation methods
Add more validation methods and move to package orchestration/infra/validation Issue-ID: MULTICLOUD-1029 Signed-off-by: Eric Multanen <eric.w.multanen@intel.com> Change-Id: Id37bbb73fff9ab115ec49c88cdd3e08ee6be3098
Diffstat (limited to 'src/orchestrator/api')
-rw-r--r--src/orchestrator/api/app_profilehandler.go4
-rw-r--r--src/orchestrator/api/apphandler.go4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/orchestrator/api/app_profilehandler.go b/src/orchestrator/api/app_profilehandler.go
index 16423483..ef7833de 100644
--- a/src/orchestrator/api/app_profilehandler.go
+++ b/src/orchestrator/api/app_profilehandler.go
@@ -27,8 +27,8 @@ import (
"net/http"
"net/textproto"
+ "github.com/onap/multicloud-k8s/src/orchestrator/pkg/infra/validation"
moduleLib "github.com/onap/multicloud-k8s/src/orchestrator/pkg/module"
- "github.com/onap/multicloud-k8s/src/orchestrator/utils"
"github.com/gorilla/mux"
pkgerrors "github.com/pkg/errors"
@@ -89,7 +89,7 @@ func (h appProfileHandler) createAppProfileHandler(w http.ResponseWriter, r *htt
return
}
- err = utils.IsTarGz(bytes.NewBuffer(content))
+ err = validation.IsTarGz(bytes.NewBuffer(content))
if err != nil {
http.Error(w, "Error in file format", http.StatusUnprocessableEntity)
return
diff --git a/src/orchestrator/api/apphandler.go b/src/orchestrator/api/apphandler.go
index 06341e7e..2c81431c 100644
--- a/src/orchestrator/api/apphandler.go
+++ b/src/orchestrator/api/apphandler.go
@@ -27,8 +27,8 @@ import (
"net/http"
"net/textproto"
+ "github.com/onap/multicloud-k8s/src/orchestrator/pkg/infra/validation"
moduleLib "github.com/onap/multicloud-k8s/src/orchestrator/pkg/module"
- "github.com/onap/multicloud-k8s/src/orchestrator/utils"
"github.com/gorilla/mux"
)
@@ -92,7 +92,7 @@ func (h appHandler) createAppHandler(w http.ResponseWriter, r *http.Request) {
return
}
- err = utils.IsTarGz(bytes.NewBuffer(content))
+ err = validation.IsTarGz(bytes.NewBuffer(content))
if err != nil {
http.Error(w, "Error in file format", http.StatusUnprocessableEntity)
return