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