2 * Copyright 2017 Huawei Technologies Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package org.openo.vnfsdk.marketplace.common;
18 public class CommonConstant {
20 public static final String PACKAGE_STATUS_DELETING = "deleting";
22 public static final String PACKAGE_STATUS_DELETE_FAIL = "deleteFailed";
24 public static final String PACKAGE_XML_FORMAT = "xml";
27 public static final String PACKAGE_YAML_FORMAT = "yaml";
29 // host image progress
31 public static final String TOSCA_METADATA = "TOSCA-Metadata";
33 public static final String CSAR_VERSION_META = "version";
35 public static final String CSAR_TYPE_META = "type";
37 public static final String CSAR_PROVIDER_META = "provider";
39 public static final String DEFINITIONS = "Definitions";
41 public static final String CSAR_META = "csar.meta";
43 public static final String CSAR_SUFFIX = ".csar";
45 public static final String HTTP_HEADER_CONTENT_RANGE = "Content-Range";
47 public static final String CATALOG_CSAR_DIR_NAME = "/csar";
49 public static final String REPORT_CSAR_DIR_NAME = "/reports";
51 public static final String COMETD_CHANNEL_PACKAGE_DELETE = "/package/delete";
53 public static final String SUCCESS_STR = "SUCCESS";
55 public static final int ONBOARDING_THREAD_COUNT = 1;
56 public static final int SUCESS = 0;
57 public static final int FAILED = -1;
59 public static final String CATALOUGE_UPLOAD_URL = "/openoapi/catalog/v1/csars";
61 public static class functionTest
63 public static final String FUNCTEST_URL = "/openoapi/vnfsdk/v1/functest/";
64 public static final String FUNCTEST_RESULT_URL = "/openoapi/vnfsdk/v1/functest/download/";
65 public static final String FUNCTEST_OPERTYPE_ID = "functiontest";
66 public static final String FUNCTEST_PACKAGE_EXISTS = "packageExists";
67 public static final String FUNCTEST_EXEC = "functestexec";
69 private functionTest() {
73 public static class LifeCycleTest
75 public static final String LIFECYCLE_TEST_URL = "/openoapi/nslcm/v1/vnfpackage";
76 public static final String LIFECYCLE_TEST_OPERTYPE_ID = "lifecycletest";
77 public static final String LIFECYCLE_TEST_EXEC = "lifecycleTestexec";
78 private LifeCycleTest() {
82 public static class HttpContext {
84 public static final String CONTENT_TYPE = "Content-Type";
86 public static final String MEDIA_TYPE_JSON = "application/json;charset=UTF-8";
88 public static final String URL = "url";
90 public static final String METHOD_TYPE = "methodType";
92 private HttpContext() {
96 public static class MethodType {
98 public static final String POST = "post";
100 public static final String DELETE = "delete";
102 public static final String PUT = "put";
104 public static final String GET = "get";
106 private MethodType() {
110 public static class MsbRegisterCode {
112 public static final int MSDB_REGISTER_RETRIES = 12;
113 public static final int MSDB_REGISTER_RETRY_SLEEP = 10000;
115 public static final int MSDB_REGISTER_FILE_NOT_EXISTS = 2;
116 public static final int MSDB_REGISTER_SUCESS = 0;
117 public static final int MSDB_REGISTER_FAILED = -1;
118 private MsbRegisterCode() {