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.go69
1 files changed, 0 insertions, 69 deletions
diff --git a/src/k8splugin/api/instancehandler.go b/src/k8splugin/api/instancehandler.go
index be8e64fa..acbeb53f 100644
--- a/src/k8splugin/api/instancehandler.go
+++ b/src/k8splugin/api/instancehandler.go
@@ -144,72 +144,3 @@ func (i instanceHandler) deleteHandler(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.StatusAccepted)
}
-
-// // UpdateHandler method to update a VNF instance.
-// func UpdateHandler(w http.ResponseWriter, r *http.Request) {
-// vars := mux.Vars(r)
-// id := vars["vnfInstanceId"]
-
-// var resource UpdateVnfRequest
-
-// if r.Body == nil {
-// http.Error(w, "Body empty", http.StatusBadRequest)
-// return
-// }
-
-// err := json.NewDecoder(r.Body).Decode(&resource)
-// if err != nil {
-// http.Error(w, err.Error(), http.StatusUnprocessableEntity)
-// return
-// }
-
-// err = validateBody(resource)
-// if err != nil {
-// http.Error(w, err.Error(), http.StatusUnprocessableEntity)
-// return
-// }
-
-// kubeData, err := utils.ReadCSARFromFileSystem(resource.CsarID)
-
-// if kubeData.Deployment == nil {
-// werr := pkgerrors.Wrap(err, "Update VNF deployment error")
-// http.Error(w, werr.Error(), http.StatusInternalServerError)
-// return
-// }
-// kubeData.Deployment.SetUID(types.UID(id))
-
-// if err != nil {
-// werr := pkgerrors.Wrap(err, "Update VNF deployment information error")
-// http.Error(w, werr.Error(), http.StatusInternalServerError)
-// return
-// }
-
-// // (TODO): Read kubeconfig for specific Cloud Region from local file system
-// // if present or download it from AAI
-// s, err := NewVNFInstanceService("../kubeconfig/config")
-// if err != nil {
-// http.Error(w, err.Error(), http.StatusInternalServerError)
-// return
-// }
-
-// err = s.Client.UpdateDeployment(kubeData.Deployment, resource.Namespace)
-// if err != nil {
-// werr := pkgerrors.Wrap(err, "Update VNF error")
-
-// http.Error(w, werr.Error(), http.StatusInternalServerError)
-// return
-// }
-
-// resp := UpdateVnfResponse{
-// DeploymentID: id,
-// }
-
-// w.Header().Set("Content-Type", "application/json")
-// w.WriteHeader(http.StatusCreated)
-
-// err = json.NewEncoder(w).Encode(resp)
-// if err != nil {
-// werr := pkgerrors.Wrap(err, "Parsing output of new VNF error")
-// http.Error(w, werr.Error(), http.StatusInternalServerError)
-// }
-// }