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.
17 package org.onap.vnfsdk.marketplace.common;
19 public class CommonConstant {
22 public static final String PACKAGE_STATUS_DELETING = "deleting";
24 public static final String PACKAGE_STATUS_DELETE_FAIL = "deleteFailed";
26 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;
68 public static final int SUCESS = 0;
70 public static final int FAILED = -1;
72 public static final int HTTP_PORT = 8702;
74 public static final int HTTPS_PORT = 8702;
76 public static final String BASE_URL = "/onapui/vnfmarket";
78 public static final String CATALOUGE_UPLOAD_URL = "/onapapi/catalog/v1/csars";
80 private CommonConstant() {
81 // Cannot create instance of the class
84 public static class FunctionTest {
86 public static final String FUNCTEST_URL = "/onapapi/vnfsdk/v1/functest/";
88 public static final String FUNCTEST_RESULT_URL = "/onapapi/vnfsdk/v1/functest/download/";
90 public static final String FUNCTEST_OPERTYPE_ID = "functiontest";
92 public static final String FUNCTEST_PACKAGE_EXISTS = "packageExists";
94 public static final String FUNCTEST_EXEC = "functestexec";
96 private FunctionTest() {
100 public static class HttpContext {
102 public static final String CONTENT_TYPE = "Content-Type";
104 public static final String MEDIA_TYPE_JSON = "application/json;charset=UTF-8";
106 public static final String URL = "url";
108 public static final String METHOD_TYPE = "methodType";
110 private HttpContext() {
114 public static class LifeCycleTest {
116 public static final String LIFECYCLE_TEST_URL = "/onapapi/nslcm/v1/vnfpackage";
118 public static final String LIFECYCLE_TEST_OPERTYPE_ID = "lifecycletest";
120 public static final String LIFECYCLE_TEST_EXEC = "lifecycleTestexec";
122 private LifeCycleTest() {
126 public static class MethodType {
128 public static final String POST = "post";
130 public static final String DELETE = "delete";
132 public static final String PUT = "put";
134 public static final String GET = "get";
136 private MethodType() {
140 public static class MsbRegisterCode {
142 public static final int MSDB_REGISTER_RETRIES = 12;
144 public static final int MSDB_REGISTER_RETRY_SLEEP = 10000;
146 public static final int MSDB_REGISTER_FILE_NOT_EXISTS = 2;
148 public static final int MSDB_REGISTER_SUCESS = 0;
150 public static final int MSDB_REGISTER_FAILED = -1;
152 private MsbRegisterCode() {