Fix gvnfm juju compile problem
[vfc/nfvo/driver/vnfm/gvnfm.git] / juju / juju-vnfmadapter / Juju-vnfmadapterService / service / src / main / java / org / onap / vfc / nfvo / vnfm / gvnfm / jujuvnfmadapter / service / constant / Constant.java
1 /*
2  * Copyright 2016 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.vfc.nfvo.vnfm.gvnfm.jujuvnfmadapter.service.constant;
18
19 import java.util.Arrays;
20 import java.util.Collections;
21 import java.util.List;
22
23 /**
24  * Constant class.<br>
25  * <p>
26  * </p>
27  * 
28  * @author
29  * @version     NFVO 0.5  Sep 12, 2016
30  */
31 public class Constant {
32
33     public static final String VNFM_APP = "VnfmDriver";
34
35     public static final String VNFM_DB = "vnfmdb";
36
37     public static final String VNFM_ID = "vnfmId";
38
39     public static final String POST = "post";
40
41     public static final String PUT = "put";
42
43     public static final String DELETE = "delete";
44
45     public static final String GET = "get";
46
47     public static final String HEAD = "head";
48
49     public static final String ASYNCPOST = "asyncPost";
50
51     public static final String ASYNCGET = "asyncGet";
52
53     public static final String ASYNCPUT = "asyncPut";
54
55     public static final String ASYNCDELETE = "asyncDelete";
56
57     public static final String RESPONSE_CONTENT = "responseContent";
58
59     public static final String STATUS_CODE = "statusCode";
60
61     public static final String RETURN_CODE = "retCode";
62
63     public static final String REASON = "reason";
64
65     public static final int ERROR_STATUS_CODE = -1;
66
67     public static final String ENCODEING = "utf-8";
68
69     public static final String COOKIE = "Cookie";
70
71     public static final String ACCESSSESSION = "bspsession=";
72
73     public static final String CONTENT_TYPE = "Content-Type";
74
75     public static final String METHOD_TYPE = "methodType";
76
77     public static final String AUTH_MODE = "authMode";
78
79     public static final String APPLICATION = "application/json";
80
81     public static final String APP_NAME = "appName";
82
83     public static final String HEADER_SUBJECT_TOKEN = "X-Subject-Token";
84
85     public static final String HEADER_AUTH_TOKEN = "X-Auth-Token";
86
87     public static final String CSM = "csm";
88
89     public static final int ERROR_CODE = -1;
90
91     public static final int HTTP_OK = 200;
92
93     public static final int HTTP_CREATED = 201;
94
95     public static final int HTTP_ACCEPTED = 202;
96
97     public static final int UNREG_SUCCESS = 204;
98
99     public static final int HTTP_BAD_REQUEST = 400;
100
101     public static final int HTTP_UNAUTHORIZED = 401;
102
103     public static final int HTTP_NOTFOUND = 404;
104
105     public static final int HTTP_CONFLICT = 409;
106     
107     public static final int INVALID_PARAMETERS = 415;
108
109     public static final int HTTP_INNERERROR = 500;
110     
111     public static final int REPEAT_REG_TIME = 60 * 1000;
112     
113     public static final String JUJUADAPTERINFO = "jujuadapterinfo.json";
114
115     public static final String FILE_SEPARATOR = "file.separator";
116
117     public static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
118
119     public static final List<String> AUTHLIST =
120             Collections.unmodifiableList(Arrays.asList(AuthenticationMode.ANONYMOUS, AuthenticationMode.CERTIFICATE));
121
122     public static final int INTERNAL_EXCEPTION = 600;
123
124     public static final int TOKEN_HEAD_NULL = 601;
125
126     public static final int TOKEN_USER_NULL = 602;
127
128     public static final int SERVICE_URL_ERROR = 603;
129
130     public static final int ACCESS_OBJ_NULL = 604;
131
132     public static final int CONNECT_NOT_FOUND = 605;
133
134     public static final int VCENTER_PARA_ERROR = 606;
135
136     public static final int TYPE_PARA_ERROR = 607;
137
138     public static final int CONNECT_FAIL = 608;
139
140     public static final int DIS_CONNECT_FAIL = 609;
141
142     public static final int HANDSHAKE_FAIL = 610;
143
144     public static final int MIN_PWD_LENGTH = 6;
145
146     public static final int MAX_PWD_LENGTH = 160;
147
148     public static final int MIN_URL_LENGTH = 7;
149
150     public static final int MAX_VNFM_NAME_LENGTH = 64;
151
152     public static final int MIN_VNFM_NAME_LENGTH = 1;
153
154     public static final int MAX_URL_LENGTH = 256;
155
156     public static final int MAX_SAMPLE_NUM = 1;
157
158     public static final int MAX_VERSION_LENGTH = 160;
159
160     public static final int MIN_VERSION_LENGTH = 1;
161
162     public static final String HANDSHAKE = "handShake";
163
164     public static final String INACTIVE = "inactive";
165
166     public static final String ACTIVE = "active";
167
168     public static final String RESOURCE_PATH = "";
169
170     public static final int REST_SUCCESS = 1;
171
172     public static final int REST_PART_SUCCESS = 0;
173
174     public static final int DEFAULT_COLLECTION_SIZE = 10;
175
176     public static final int REST_FAIL = -1;
177
178     public static final String ROARAND = "?roarand=%s";
179     
180     public static final long PROCESS_WAIT_MILLIS = 30000;
181     
182     public static final String CSARINFO="csarinfo.json";
183     
184     public static final String DOWNLOADCSAR_SUCCESS = "Success";
185
186     public static final String DOWNLOADCSAR_FAIL = "FAIL";
187
188     public static final int UNZIP_SUCCESS = 0;
189
190     public static final int UNZIP_FAIL = -1;
191
192     /**
193      * Constructor<br/>
194      * <p>
195      * </p>
196      */
197     private Constant() {
198         // Private Constructor
199     }
200
201     /**
202      * Authentication mode.<br>
203      * <p>
204      * </p>
205      * 
206      * @author
207      * @version     NFVO 0.5  Sep 12, 2016
208      */
209     public static class AuthenticationMode {
210
211         public static final String ANONYMOUS = "Anonymous";
212
213         public static final String CERTIFICATE = "Certificate";
214
215         private AuthenticationMode() {
216             
217         }
218     }
219 }