reorder the modifier
[appc.git] / appc-core / appc-common-bundle / src / main / java / org / onap / appc / Constants.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP : APPC
4  * ================================================================================
5  * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Copyright (C) 2017 Amdocs
8  * =============================================================================
9  * Modifications Copyright (C) 2018 Samsung
10  * ================================================================================
11  * Licensed under the Apache License, Version 2.0 (the "License");
12  * you may not use this file except in compliance with the License.
13  * You may obtain a copy of the License at
14  * 
15  *      http://www.apache.org/licenses/LICENSE-2.0
16  * 
17  * Unless required by applicable law or agreed to in writing, software
18  * distributed under the License is distributed on an "AS IS" BASIS,
19  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20  * See the License for the specific language governing permissions and
21  * limitations under the License.
22  * 
23  * ============LICENSE_END=========================================================
24  */
25
26
27
28 package org.onap.appc;
29
30 /**
31  * This class contains the definitions of all constant values used in the APPC provider, adapters, and other components.
32  * These constants define properties, settings, and context variables. The context variables can be referenced from
33  * within the directed graph(s) to access information placed their by the provider and adapters.
34  * <p>
35  * Context properties are set in the graph context by the various adapters and the provider, or by the graph itself.
36  * These properties may also be accessed by the graph, adapters, or the provider. It is these properties that allow
37  * communication of state through the directed graph. All context properties have a symbolic name that starts with
38  * "CONTEXT_".
39  * </p>
40  *
41  */
42
43 public final class Constants {
44
45     /**
46      * The name for the error code attribute to be set in the context
47      */
48     @SuppressWarnings("nls")
49     public static final String ATTRIBUTE_ERROR_CODE = "error_code";
50
51     /**
52      * The name for the error message attribute to be set in the context
53      */
54     @SuppressWarnings("nls")
55     public static final String ATTRIBUTE_ERROR_MESSAGE = "error-message";
56
57     /**     
58      * The name for the error message  to be set in the context
59      */
60     @SuppressWarnings("nls")
61     public static final String CONTEXT_ERROR_MESSAGE = "org.onap.rest.result.message";
62
63     @SuppressWarnings("nls")
64     public static final String CONTEXT_AGENT_ERROR_MESSAGE = "org.onap.rest.agent.result.message";
65
66     /**
67      * The name for the error code  to be set in the context
68      */
69     @SuppressWarnings("nls")
70     public static final String CONTEXT_ERROR_CODE = "org.onap.rest.result.code";
71
72     @SuppressWarnings("nls")
73     public static final String CONTEXT_AGENT_ERROR_CODE = "org.onap.rest.agent.result.code";
74
75     /**
76      * The name for the success message attribute to be set in the context
77      */
78     @SuppressWarnings("nls")
79     public static final String ATTRIBUTE_SUCCESS_MESSAGE = "success-message";
80
81     public static final String DG_ATTRIBUTE_STATUS = "SvcLogic.status";
82     public static final String DG_OUTPUT_STATUS_CODE = "output.status.code";
83     public static final String DG_OUTPUT_STATUS_MESSAGE = "output.status.message";
84
85     /**
86      * The property that defines the name of the DG service logic to be loaded
87      */
88     public static final String PROPERTY_MODULE_NAME = "appc.service.logic.module.name";
89
90     /**
91      * The property that defines the topology restart DG version to be used
92      */
93     public static final String PROPERTY_TOPOLOGY_VERSION = "appc.topology.dg.version";
94
95     /**
96      * The method name of the DG that is used to perform topology restart operations
97      */
98     public static final String PROPERTY_TOPOLOGY_METHOD = "appc.topology.dg.method";
99
100     /**
101      * The property that supplies the application name
102      */
103     public static final String PROPERTY_APPLICATION_NAME = "appc.application.name";
104
105     /**
106      * The execution mode for the directed graph
107      */
108     public static final String SYNC_MODE = "sync";
109
110     /**
111      * The name of the property that contains the service request enumerated value in the graph's context
112      */
113     public static final String CONTEXT_SERVICE = "org.onap.appc.service";
114
115     /**
116      * The name of the property that contains the VM id value in the graph's context
117      */
118     public static final String CONTEXT_VMID = "org.onap.appc.vmid";
119
120     /**
121      * The name of the property that contains the VM id value in the graph's context
122      */
123     public static final String CONTEXT_IDENTITY_URL = "org.onap.appc.identity.url";
124
125     /**
126      * The name of the property that contains the service request id value in the graph's context
127      */
128     public static final String CONTEXT_REQID = "org.onap.appc.reqid";
129
130     /**
131      * The name of the property that indicates which method of the IaaS adapter to call
132      */
133     public static final String CONTEXT_ACTION = "org.onap.appc.action";
134
135     /**
136      * The enumerated value for restart of a VM. This is a constant for one possible value of CONTEXT_SERVICE.
137      */
138     public static final String SERVICE_RESTART = "RESTART";
139
140     /**
141      * The enumerated value for rebuild of a VM. This is a constant for one possible value of CONTEXT_SERVICE.
142      */
143     public static final String SERVICE_REBUILD = "REBUILD";
144
145     /**
146      * The name of the adapter. We get the name from a property file so that it can be changed easily if needed.
147      */
148     public static final String PROPERTY_ADAPTER_NAME = "org.onap.appc.provider.adaptor.name";
149
150     /**
151      * The minimum number of contexts to cache in each provider/tenant pool
152      */
153     public static final String PROPERTY_MIN_POOL_SIZE = "org.onap.appc.provider.min.pool";
154
155     /**
156      * The maximum number of contexts to cache in each provider/tenant pool
157      */
158     public static final String PROPERTY_MAX_POOL_SIZE = "org.onap.appc.provider.max.pool";
159
160     /**
161      * The amount of time, in seconds, that the application waits for a change of state of a server to a known valid
162      * state before giving up and failing the request.
163      */
164     public static final String PROPERTY_SERVER_STATE_CHANGE_TIMEOUT = "org.onap.appc.server.state.change.timeout";
165
166     /**
167      * The amount of time, in seconds, between subsequent polls to the openstack provider to update the state of a
168      * resource
169      */
170     public static final String PROPERTY_OPENSTACK_POLL_INTERVAL = "org.onap.appc.openstack.poll.interval";
171
172     /**
173      * The amount of time, in seconds, to wait between retry attempts when a connection to a provider fails.
174      */
175     public static final String PROPERTY_RETRY_DELAY = "org.onap.appc.provider.retry.delay";
176
177     /**
178      * The maximum number of times a connection retry will be attempted before the application fails the request
179      */
180     public static final String PROPERTY_RETRY_LIMIT = "org.onap.appc.provider.retry.limit";
181     /**
182      * The amount of time, in seconds, that the application waits for a change of state of a stacj to a known valid
183      * state before giving up and failing the request.
184      */
185     public static final String PROPERTY_STACK_STATE_CHANGE_TIMEOUT ="org.onap.appc.stack.state.change.timeout" ;
186
187     @SuppressWarnings("nls")
188     public static final String STATUS_GETTER = "status-getter";
189
190     @SuppressWarnings("nls")
191     public static final String VM_FUSION_STATUS_GETTER = "fusion-vm-status-getter";
192
193     /**
194      * The name for the status vm attribute to be set in the context when executing a vmstatuscheck.
195      */
196     @SuppressWarnings("nls")
197     public static final String STATUS_OF_VM = "status-vm";
198
199     /**
200      * Yang revision value to be used while generating YANG module
201      */
202     public static final String YANG_REVISION = "2017-03-03";
203     /**
204      * Yang revision format to be used while formatting YANG revision date
205      */
206     public static final String YANG_REVISION_FORMAT = "YYYY-MM-DD";
207
208     /**
209      * Base container for  yang that is generated to store in MD-SAL datastore
210      */
211     public static final String YANG_BASE_CONTAINER = "vnf-config-repo";
212
213     /**
214      *VNF config list for yang that is generated to store in MD-SAL datastore
215      */
216     public static final String YANG_VNF_CONFIG_LIST = "vnf-config-list";
217
218     /**
219      *Base container of VNF configuration data for yang that is generated to store in MD-SAL datastore
220      */
221     public static final String YANG_VNF_CONFIG = "vnf-config";
222
223     /**
224      * default constructor prevents instantiation
225      */
226     Constants() {
227         throw new IllegalAccessError("Constants");
228     }
229 }