efeef06172702d63aec57ef681f351910b1e893d
[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   // Address
20   public static final String DEFAULT_MSB_ADDRESS = "http://127.0.0.1:8080";
21
22   // Package Status
23   public static final String PACKAGE_STATUS_DELETING = "deleting";
24
25   public static final String PACKAGE_STATUS_DELETE_FAIL = "deleteFailed";
26
27   public static final String PACKAGE_XML_FORMAT = "xml";
28
29
30   public static final String PACKAGE_YAML_FORMAT = "yaml";
31
32   // host image progress
33
34   public static final String TOSCA_METADATA = "TOSCA-Metadata";
35
36   public static final String CSAR_VERSION_META = "version";
37
38   public static final String CSAR_TYPE_META = "type";
39
40   public static final String CSAR_PROVIDER_META = "provider";
41
42   public static final String DEFINITIONS = "Definitions";
43
44   public static final String CSAR_META = "csar.meta";
45
46   public static final String MANIFEST = ".mf";
47
48   public static final String MF_VERSION_META = "vnf_package_version";
49
50   public static final String MF_PRODUCT_NAME = "vnf_product_name";
51
52   public static final String MF_PROVIDER_META = "vnf_provider_id";
53
54   public static final String MF_RELEASE_DATETIME = "vnf_release_date_time";
55
56   public static final String CSAR_SUFFIX = ".csar";
57
58   public static final String HTTP_HEADER_CONTENT_RANGE = "Content-Range";
59
60   public static final  String CATALOG_CSAR_DIR_NAME = "/csar";
61
62   public static final  String REPORT_CSAR_DIR_NAME = "/reports";
63
64   public static final String COMETD_CHANNEL_PACKAGE_DELETE = "/package/delete";
65
66   public static final String SUCCESS_STR = "SUCCESS";
67
68   public static final int ONBOARDING_THREAD_COUNT = 1;
69   public static final int SUCESS = 0;
70   public static final int FAILED = -1;
71
72   public static final  String CATALOUGE_UPLOAD_URL = "/openoapi/catalog/v1/csars";
73
74   private CommonConstant (){
75       // Cannot create instance of the class
76   }
77
78   public static class functionTest
79   {
80       public static final String FUNCTEST_URL = "/openoapi/vnfsdk/v1/functest/";
81       public static final String FUNCTEST_RESULT_URL = "/openoapi/vnfsdk/v1/functest/download/";
82       public static final String FUNCTEST_OPERTYPE_ID = "functiontest";
83       public static final String FUNCTEST_PACKAGE_EXISTS = "packageExists";
84       public static final String FUNCTEST_EXEC = "functestexec";
85
86       private functionTest() {
87       }
88   }
89
90   public static class LifeCycleTest
91   {
92       public static final String LIFECYCLE_TEST_URL = "/openoapi/nslcm/v1/vnfpackage";
93       public static final String LIFECYCLE_TEST_OPERTYPE_ID = "lifecycletest";
94       public static final String LIFECYCLE_TEST_EXEC = "lifecycleTestexec";
95       private LifeCycleTest() {
96       }
97   }
98
99   public static class HttpContext {
100
101       public static final String CONTENT_TYPE = "Content-Type";
102
103       public static final String MEDIA_TYPE_JSON = "application/json;charset=UTF-8";
104
105       public static final String URL = "url";
106
107       public static final String METHOD_TYPE = "methodType";
108
109       private HttpContext() {
110       }
111   }
112
113   public static class MethodType {
114
115       public static final String POST = "post";
116
117       public static final String DELETE = "delete";
118
119       public static final String PUT = "put";
120
121       public static final String GET = "get";
122
123       private MethodType() {
124       }
125   }
126
127   public static class MsbRegisterCode {
128
129       public static final int MSDB_REGISTER_RETRIES = 12;
130       public static final int MSDB_REGISTER_RETRY_SLEEP = 10000;
131
132       public static final int MSDB_REGISTER_FILE_NOT_EXISTS = 2;
133       public static final int MSDB_REGISTER_SUCESS = 0;
134       public static final int MSDB_REGISTER_FAILED = -1;
135       private MsbRegisterCode() {
136       }
137   }
138 }
139