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