summaryrefslogtreecommitdiffstats
path: root/src/k8splugin/api/instancehandler.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/k8splugin/api/instancehandler.go')
-rw-r--r--src/k8splugin/api/instancehandler.go10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/k8splugin/api/instancehandler.go b/src/k8splugin/api/instancehandler.go
index b56a8e12..3baa8065 100644
--- a/src/k8splugin/api/instancehandler.go
+++ b/src/k8splugin/api/instancehandler.go
@@ -1,6 +1,8 @@
/*
Copyright 2018 Intel Corporation.
Copyright © 2021 Samsung Electronics
+Copyright © 2021 Orange
+
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
@@ -181,15 +183,11 @@ func (i instanceHandler) queryHandler(w http.ResponseWriter, r *http.Request) {
name := r.FormValue("Name")
labels := r.FormValue("Labels")
if apiVersion == "" {
- http.Error(w, "Missing apiVersion mandatory parameter", http.StatusBadRequest)
+ http.Error(w, "Missing ApiVersion mandatory parameter", http.StatusBadRequest)
return
}
if kind == "" {
- http.Error(w, "Missing kind mandatory parameter", http.StatusBadRequest)
- return
- }
- if name == "" && labels == "" {
- http.Error(w, "Name or Labels parameter must be provided", http.StatusBadRequest)
+ http.Error(w, "Missing Kind mandatory parameter", http.StatusBadRequest)
return
}
resp, err := i.client.Query(id, apiVersion, kind, name, labels)