e167ae101cad4e7bd832f14a17b15ecf8c85274c
[vnfsdk/refrepo.git] /
1 /**
2  * Copyright 2017 Huawei Technologies Co., Ltd.
3  *
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
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16 package org.onap.vnfsdk.marketplace.common;
17
18 public class CommonConstant {
19
20   // Package Status
21   public static final String PACKAGE_STATUS_DELETING = "deleting";
22
23   public static final String PACKAGE_STATUS_DELETE_FAIL = "deleteFailed";
24
25   public static final String PACKAGE_XML_FORMAT = "xml";
26
27
28   public static final String PACKAGE_YAML_FORMAT = "yaml";
29
30   // host image progress
31
32   public static final String TOSCA_METADATA = "TOSCA-Metadata";
33
34   public static final String CSAR_VERSION_META = "Version";
35
36   public static final String CSAR_TYPE_META = "Type";
37
38   public static final String CSAR_PROVIDER_META = "Provider";
39
40   public static final String DEFINITIONS = "Definitions";
41
42   public static final String CSAR_META = "csar.meta";
43
44   public static final String MANIFEST = ".mf";
45
46   public static final String MF_VERSION_META = "vnf_package_version";
47
48   public static final String MF_PRODUCT_NAME = "vnf_product_name";
49
50   public static final String MF_PROVIDER_META = "vnf_provider_id";
51
52   public static final String MF_RELEASE_DATETIME = "vnf_release_date_time";
53
54   public static final String CSAR_SUFFIX = ".csar";
55
56   public static final String HTTP_HEADER_CONTENT_RANGE = "Content-Range";
57
58   public static final  String CATALOG_CSAR_DIR_NAME = "/csar";
59
60   public static final  String REPORT_CSAR_DIR_NAME = "/reports";
61
62   public static final String COMETD_CHANNEL_PACKAGE_DELETE = "/package/delete";
63
64   public static final String SUCCESS_STR = "SUCCESS";
65
66   public static final int ONBOARDING_THREAD_COUNT = 1;
67   public static final int SUCESS = 0;
68   public static final int FAILED = -1;
69
70   public static final  String CATALOUGE_UPLOAD_URL = "/onapapi/catalog/v1/csars";
71
72   private CommonConstant (){
73       // Cannot create instance of the class
74   }
75
76   public static class functionTest
77   {
78       public static final String FUNCTEST_URL = "/onapapi/vnfsdk/v1/functest/";
79       public static final String FUNCTEST_RESULT_URL = "/onapapi/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";
83
84       private functionTest() {
85       }
86   }
87
88   public static class HttpContext {
89
90       public static final String CONTENT_TYPE = "Content-Type";
91
92       public static final String MEDIA_TYPE_JSON = "application/json;charset=UTF-8";
93
94       public static final String URL = "url";
95
96       public static final String METHOD_TYPE = "methodType";
97
98       private HttpContext() {
99       }
100   }
101
102   public static class LifeCycleTest
103   {
104       public static final String LIFECYCLE_TEST_URL = "/onapapi/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() {
108       }
109   }
110
111   public static class MethodType {
112
113       public static final String POST = "post";
114
115       public static final String DELETE = "delete";
116
117       public static final String PUT = "put";
118
119       public static final String GET = "get";
120
121       private MethodType() {
122       }
123   }
124
125   public static class MsbRegisterCode {
126
127       public static final int MSDB_REGISTER_RETRIES = 12;
128       public static final int MSDB_REGISTER_RETRY_SLEEP = 10000;
129
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() {
134       }
135   }
136 }
137