7345fac5bf52705aad77be8cffea75375c06875b
[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.openo.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 CSAR_SUFFIX = ".csar";
44
45   public static final String HTTP_HEADER_CONTENT_RANGE = "Content-Range";
46   
47   public static final  String CATALOG_CSAR_DIR_NAME = "/csar";
48   
49   public static final  String REPORT_CSAR_DIR_NAME = "/reports";
50   
51   public static final String COMETD_CHANNEL_PACKAGE_DELETE = "/package/delete";
52   
53   public static final String SUCCESS_STR = "SUCCESS";
54   
55   public static final int ONBOARDING_THREAD_COUNT = 1;
56   public static final int SUCESS = 0;
57   public static final int FAILED = -1;
58   
59   public static final  String CATALOUGE_UPLOAD_URL = "/openoapi/catalog/v1/csars";
60   
61   public static class functionTest 
62   {    
63       public static final String FUNCTEST_URL = "/openoapi/vnfsdk/v1/functest/";
64       public static final String FUNCTEST_RESULT_URL = "/openoapi/vnfsdk/v1/functest/download/";
65       public static final String FUNCTEST_OPERTYPE_ID = "functiontest";
66       public static final String FUNCTEST_PACKAGE_EXISTS = "packageExists";
67       public static final String FUNCTEST_EXEC = "functestexec";
68       
69       private functionTest() {
70       }
71   }
72     
73   public static class LifeCycleTest 
74   {    
75       public static final String LIFECYCLE_TEST_URL = "/openoapi/nslcm/v1/vnfpackage";
76       public static final String LIFECYCLE_TEST_OPERTYPE_ID = "lifecycletest";
77       public static final String LIFECYCLE_TEST_EXEC = "lifecycleTestexec";
78       private LifeCycleTest() {
79       }
80   }
81     
82   public static class HttpContext {
83
84       public static final String CONTENT_TYPE = "Content-Type";
85
86       public static final String MEDIA_TYPE_JSON = "application/json;charset=UTF-8";
87
88       public static final String URL = "url";
89
90       public static final String METHOD_TYPE = "methodType";
91
92       private HttpContext() {
93       }
94   }
95   
96   public static class MethodType {
97
98       public static final String POST = "post";
99
100       public static final String DELETE = "delete";
101
102       public static final String PUT = "put";
103
104       public static final String GET = "get";
105
106       private MethodType() {
107       }
108   }
109   
110   public static class MsbRegisterCode {
111
112       public static final int MSDB_REGISTER_RETRIES = 12;
113       public static final int MSDB_REGISTER_RETRY_SLEEP = 10000;
114       
115       public static final int MSDB_REGISTER_FILE_NOT_EXISTS = 2;
116       public static final int MSDB_REGISTER_SUCESS = 0;
117       public static final int MSDB_REGISTER_FAILED = -1;
118       private MsbRegisterCode() {
119       }
120   }
121 }