c9ea19453ad4288bbe56799fa439493ff53d199c
[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
17 package org.onap.vnfsdk.marketplace.common;
18
19 public class CommonConstant {
20
21     // Package Status
22     public static final String PACKAGE_STATUS_DELETING = "deleting";
23
24     public static final String PACKAGE_STATUS_DELETE_FAIL = "deleteFailed";
25
26     public static final String PACKAGE_XML_FORMAT = "xml";
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
68     public static final int SUCESS = 0;
69
70     public static final int FAILED = -1;
71
72     public static final int HTTP_PORT = 8702;
73
74     public static final int HTTPS_PORT = 8702;
75
76     public static final String BASE_URL = "/onapui/vnfmarket";
77
78     public static final String CATALOUGE_UPLOAD_URL = "/onapapi/catalog/v1/csars";
79
80     private CommonConstant() {
81         // Cannot create instance of the class
82     }
83
84     public static class functionTest {
85
86         public static final String FUNCTEST_URL = "/onapapi/vnfsdk/v1/functest/";
87
88         public static final String FUNCTEST_RESULT_URL = "/onapapi/vnfsdk/v1/functest/download/";
89
90         public static final String FUNCTEST_OPERTYPE_ID = "functiontest";
91
92         public static final String FUNCTEST_PACKAGE_EXISTS = "packageExists";
93
94         public static final String FUNCTEST_EXEC = "functestexec";
95
96         private functionTest() {
97         }
98     }
99
100     public static class HttpContext {
101
102         public static final String CONTENT_TYPE = "Content-Type";
103
104         public static final String MEDIA_TYPE_JSON = "application/json;charset=UTF-8";
105
106         public static final String URL = "url";
107
108         public static final String METHOD_TYPE = "methodType";
109
110         private HttpContext() {
111         }
112     }
113
114     public static class LifeCycleTest {
115
116         public static final String LIFECYCLE_TEST_URL = "/onapapi/nslcm/v1/vnfpackage";
117
118         public static final String LIFECYCLE_TEST_OPERTYPE_ID = "lifecycletest";
119
120         public static final String LIFECYCLE_TEST_EXEC = "lifecycleTestexec";
121
122         private LifeCycleTest() {
123         }
124     }
125
126     public static class MethodType {
127
128         public static final String POST = "post";
129
130         public static final String DELETE = "delete";
131
132         public static final String PUT = "put";
133
134         public static final String GET = "get";
135
136         private MethodType() {
137         }
138     }
139
140     public static class MsbRegisterCode {
141
142         public static final int MSDB_REGISTER_RETRIES = 12;
143
144         public static final int MSDB_REGISTER_RETRY_SLEEP = 10000;
145
146         public static final int MSDB_REGISTER_FILE_NOT_EXISTS = 2;
147
148         public static final int MSDB_REGISTER_SUCESS = 0;
149
150         public static final int MSDB_REGISTER_FAILED = -1;
151
152         private MsbRegisterCode() {
153         }
154     }
155 }