X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=blueprints%2Fcommon%2Feliot-ui%2Fbe%2Fsrc%2Feliotk8sclient%2Fsrc%2Fmain%2Fjava%2Fcom%2Feliot%2Feliotbe%2Feliotk8sclient%2Fcontroller%2FAppDeployController.java;fp=blueprints%2Fcommon%2Feliot-ui%2Fbe%2Fsrc%2Feliotk8sclient%2Fsrc%2Fmain%2Fjava%2Fcom%2Feliot%2Feliotbe%2Feliotk8sclient%2Fcontroller%2FAppDeployController.java;h=0000000000000000000000000000000000000000;hb=434326c60fb0434bda587102b4746173fe425dea;hp=7e3721b3fdf574d892c8c7cc4204029bc49628f6;hpb=37827e492060182b32df67c2a538a29808fa5e17;p=eliot.git diff --git a/blueprints/common/eliot-ui/be/src/eliotk8sclient/src/main/java/com/eliot/eliotbe/eliotk8sclient/controller/AppDeployController.java b/blueprints/common/eliot-ui/be/src/eliotk8sclient/src/main/java/com/eliot/eliotbe/eliotk8sclient/controller/AppDeployController.java deleted file mode 100755 index 7e3721b..0000000 --- a/blueprints/common/eliot-ui/be/src/eliotk8sclient/src/main/java/com/eliot/eliotbe/eliotk8sclient/controller/AppDeployController.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2020 Huawei Technologies Co., Ltd. - * - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.eliot.eliotbe.eliotk8sclient.controller; - -import com.eliot.eliotbe.eliotk8sclient.service.AppServiceHandler; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import javax.validation.constraints.Pattern; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -@Validated -@RestController -public class AppDeployController { - - public static final Logger logger = LoggerFactory.getLogger(AppDeployController.class); - - public static final String HOST_IP_REGEXP - = "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$"; - public static final String APP_INSTANCE_ID_REGEXP - = "([a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}){1}"; - public static final String TENENT_ID_REGEXP = "[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}"; - public static final String WORKLOAD_ID_REGEXP = "^.{1,1024}$"; - public static final String QUERY_REGEXP = "^.{1,512}$"; - @Autowired - private AppServiceHandler appServiceHandler; - - /** - * Upload Deployment YAML file. - * @param file file - * @return - */ - @RequestMapping(path = "/upload", - method = RequestMethod.POST,produces = MediaType.APPLICATION_JSON_VALUE) - public ResponseEntity> uploadAppDeployment( - @RequestParam("file") MultipartFile file) throws IOException { - logger.info("Deployment Upload File"); - return appServiceHandler.uploadDeployment(file); - } -}