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.onap.vnfsdk.marketplace.common;
18 public class CommonConstant {
21 public static final String PACKAGE_STATUS_DELETING = "deleting";
23 public static final String PACKAGE_STATUS_DELETE_FAIL = "deleteFailed";
25 public static final String PACKAGE_XML_FORMAT = "xml";
28 public static final String PACKAGE_YAML_FORMAT = "yaml";
30 // host image progress
32 public static final String TOSCA_METADATA = "TOSCA-Metadata";
34 public static final String CSAR_VERSION_META = "Version";
36 public static final String CSAR_TYPE_META = "Type";
38 public static final String CSAR_PROVIDER_META = "Provider";
40 public static final String DEFINITIONS = "Definitions";
42 public static final String CSAR_META = "csar.meta";
44 public static final String MANIFEST = ".mf";
46 public static final String MF_VERSION_META = "vnf_package_version";
48 public static final String MF_PRODUCT_NAME = "vnf_product_name";
50 public static final String MF_PROVIDER_META = "vnf_provider_id";
52 public static final String MF_RELEASE_DATETIME = "vnf_release_date_time";
54 public static final String CSAR_SUFFIX = ".csar";
56 public static final String HTTP_HEADER_CONTENT_RANGE = "Content-Range";
58 public static final String CATALOG_CSAR_DIR_NAME = "/csar";
60 public static final String REPORT_CSAR_DIR_NAME = "/reports";
62 public static final String COMETD_CHANNEL_PACKAGE_DELETE = "/package/delete";
64 public static final String SUCCESS_STR = "SUCCESS";
66 public static final int ONBOARDING_THREAD_COUNT = 1;
67 public static final int SUCESS = 0;
68 public static final int FAILED = -1;
70 public static final String CATALOUGE_UPLOAD_URL = "/openoapi/catalog/v1/csars";
72 private CommonConstant (){
73 // Cannot create instance of the class
76 public static class functionTest
78 public static final String FUNCTEST_URL = "/openoapi/vnfsdk/v1/functest/";
79 public static final String FUNCTEST_RESULT_URL = "/openoapi/vnfsdk/v1/functest/download/";
80 public static final String FUNCTEST_OPERTYPE_ID = "functiontest";
81 public static final String FUNCTEST_PACKAGE_EXISTS = "packageExists";
82 public static final String FUNCTEST_EXEC = "functestexec";
84 private functionTest() {
88 public static class HttpContext {
90 public static final String CONTENT_TYPE = "Content-Type";
92 public static final String MEDIA_TYPE_JSON = "application/json;charset=UTF-8";
94 public static final String URL = "url";
96 public static final String METHOD_TYPE = "methodType";
98 private HttpContext() {
102 public static class LifeCycleTest
104 public static final String LIFECYCLE_TEST_URL = "/openoapi/nslcm/v1/vnfpackage";
105 public static final String LIFECYCLE_TEST_OPERTYPE_ID = "lifecycletest";
106 public static final String LIFECYCLE_TEST_EXEC = "lifecycleTestexec";
107 private LifeCycleTest() {
111 public static class MethodType {
113 public static final String POST = "post";
115 public static final String DELETE = "delete";
117 public static final String PUT = "put";
119 public static final String GET = "get";
121 private MethodType() {
125 public static class MsbRegisterCode {
127 public static final int MSDB_REGISTER_RETRIES = 12;
128 public static final int MSDB_REGISTER_RETRY_SLEEP = 10000;
130 public static final int MSDB_REGISTER_FILE_NOT_EXISTS = 2;
131 public static final int MSDB_REGISTER_SUCESS = 0;
132 public static final int MSDB_REGISTER_FAILED = -1;
133 private MsbRegisterCode() {