summaryrefslogtreecommitdiffstats
path: root/csarvalidation/src/main/java/org/onap/validation/csar/CommonConstants.java
blob: b36bb628e0d76d60ee367bface64f1fcfb1978f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
/**
 * Copyright 2017 Huawei Technologies Co., Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.onap.validation.csar;

public class CommonConstants {
	// Package Status
	public static final String PACKAGE_STATUS_DELETING = "deleting";

	public static final String PACKAGE_STATUS_DELETE_FAIL = "deleteFailed";

	public static final String PACKAGE_XML_FORMAT = "xml";

	public static final String PACKAGE_YAML_FORMAT = "yaml";

	// host image progress

	public static final String TOSCA_METADATA = "TOSCA-Metadata";

	public static final String CSAR_VERSION_META = "version";

	public static final String CSAR_TYPE_META = "type";

	public static final String CSAR_PROVIDER_META = "provider";

	public static final String DEFINITIONS = "Definitions";

	public static final String CSAR_META = "csar.meta";

	public static final String CSAR_SUFFIX = ".csar";

	public static final String HTTP_HEADER_CONTENT_RANGE = "Content-Range";

	public static final String CATALOG_CSAR_DIR_NAME = "/csar";

	public static final String REPORT_CSAR_DIR_NAME = "/reports";

	public static final String COMETD_CHANNEL_PACKAGE_DELETE = "/package/delete";

	public static final String SUCCESS_STR = "SUCCESS";

	public static final int ONBOARDING_THREAD_COUNT = 1;
	public static final int SUCESS = 0;
	public static final int FAILED = -1;

	public static final String CATALOUGE_UPLOAD_URL = "/openoapi/catalog/v1/csars";

	public static final int BUFFER_SIZE = 2 * 1024 * 1024;

	private CommonConstants() {
		// Cannot create instance of the class
	}

	public static class functionTest {
		public static final String FUNCTEST_URL = "/openoapi/vnfsdk/v1/functest/";
		public static final String FUNCTEST_RESULT_URL = "/openoapi/vnfsdk/v1/functest/download/";
		public static final String FUNCTEST_OPERTYPE_ID = "functiontest";
		public static final String FUNCTEST_PACKAGE_EXISTS = "packageExists";
		public static final String FUNCTEST_EXEC = "functestexec";

		private functionTest() {
		}
	}

	public static class LifeCycleTest {
		public static final String LIFECYCLE_TEST_URL = "/openoapi/nslcm/v1/vnfpackage";
		public static final String LIFECYCLE_TEST_OPERTYPE_ID = "lifecycletest";
		public static final String LIFECYCLE_TEST_EXEC = "lifecycleTestexec";

		private LifeCycleTest() {
		}
	}

	public static class HttpContext {

		public static final String CONTENT_TYPE = "Content-Type";

		public static final String MEDIA_TYPE_JSON = "application/json;charset=UTF-8";

		public static final String URL = "url";

		public static final String METHOD_TYPE = "methodType";

		private HttpContext() {
		}
	}

	public static class MethodType {

		public static final String POST = "post";

		public static final String DELETE = "delete";

		public static final String PUT = "put";

		public static final String GET = "get";

		private MethodType() {
		}
	}

	public static class MsbRegisterCode {

		public static final int MSDB_REGISTER_RETRIES = 12;
		public static final int MSDB_REGISTER_RETRY_SLEEP = 10000;

		public static final int MSDB_REGISTER_FILE_NOT_EXISTS = 2;
		public static final int MSDB_REGISTER_SUCESS = 0;
		public static final int MSDB_REGISTER_FAILED = -1;

		private MsbRegisterCode() {
		}
	}
}