Upgrade SDC from Titan to Janus Graph
[sdc.git] / common-app-api / src / main / java / org / openecomp / sdc / common / config / EcompErrorCode.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.openecomp.sdc.common.config;
22
23 public enum EcompErrorCode {
24
25         E_100("Authentication problem towards U-EB server. Reason: %s",
26                         "An Authentication failure occured during access to UEB server. Please check that UEB keys are configured correctly in ASDC BE distribution configuration."), E_199(
27                                         "Internal authentication problem. Description: %s"),
28
29         E_200("ASDC Backend probably lost connectivity to either one of the following components: JanusGraph DB, Cassandra, Onboarding, UEB Cluster. Please check the logs for more information."), E_201(
30                         "ASDC Backend probably lost connectivity to JanusGraph DB. Please check the logs for more information."), E_202(
31                                         "ASDC Backend probably lost connectivity to ElasticSearch. Please check the logs for more information."), E_203(
32                                                         "ASDC Backend probably lost connectivity to UEB Cluster. Please check the logs for more information.",
33                                                         "Check connectivity to UEB cluster which is configured under parameter uebServers in distribution-configuration.yaml."), E_204(
34                                                                         "Unable to connect to a valid ASDC Backend Server",
35                                                                         "Please check connectivity from this FE instance towards BE or BE Load Balancer. Please check that parameters in FE configuration.yaml: beHost,     beHttpPort and beSslPort point to a valid host and port values."),
36
37         E_205("ASDC Backend Recovery to either one of the following components: JanusGraph DB, Cassandra, Onboarding, UEB Cluster."), E_206(
38                         "ASDC Backend connection recovery to JanusGraph DB."), E_207(
39                                         "ASDC Backend connection recovery to ElasticSearch."), E_208(
40                                                         "ASDC Backend connection recovery to UEB Cluster."), E_209(
41                                                                         "Connectivity to ASDC BE Server is recovered."), E_210(
42                                                                                         "Connection problem towards U-EB server. Reason: %s",
43                                                                                         "Please check that that parameter uebServers in distribution-configuration.yaml points to a valid UEB Cluster."), E_211(
44                                                                                                         "Connection problem towards U-EB server. Cannot reach host %s",
45                                                                                                         "Please check that that parameter uebServers in distribution-configuration.yaml points to a valid UEB Cluster."), E_212(
46                                                                                                                         "Couldn't resolve hostIP. Desciption: %s"), E_213(
47                                                                                                                                         "Site switch over was done. Site is now in %s mode"), E_214(
48                                                                                                                                                                 "Dmaap Connection problem."), E_299(
49                                                                                                                                                                                                 "Internal Connection problem. Description: %s"),
50
51         // [resource/service/product]
52         E_300("Mandatory %s Component %s cannot be found in repository"),
53         // [SERVICE/RESOURCE/PRODUCT] [id] is not valid. Cannot be found in graph.
54         E_301("%s Component %s is not valid. Cannot be found in graph."), E_302(
55                         "Configuration parameter %s is invalid. Value configured is %s."), E_303(
56                                         "Error occured during access to U-EB Server. Data not found: %s",
57                                         "An error occured during access to UEB Server, ASDC failed to either register or unregister to/from UEB topic."), E_304(
58                                                         "The artifact type %s does not appear in the list of valid artifacts %s"), E_305(
59                                                                         "Configuration parameter %s is missing"), E_306(
60                                                                                         "Configuration parameter %s is invalid. At least %s values shall be configured"), E_307(
61                                                                                                         "Invalid configuration in YAML file. %s"), E_308(
62                                                                                                                         "Artifact uploaded has missing information. Missing %s"), E_309(
63                                                                                                                                         "Artifact %s requested is not found"), E_310(
64                                                                                                                                                         "User %s requested is not found"), E_311(
65                                                                                                                                                                         "Ecomp error description params mismatch between code and YAML or wrong format, name: %s"), E_312(
66                                                                                                                                                                                         "Ecomp error element  not found in YAML, name: %s"),
67
68         E_399("Internal Invalid Object. Description: %s"),
69
70         E_400("The type %s of %s is invalid"), E_401("The value %s of %s from type %s is invalid"), E_402(
71                         "Payload of artifact uploaded is invalid (invalid MD5 or encryption)"), E_403(
72                                         "Input for artifact metadata is invalid"), E_404("%s %s required is missing"), E_405(
73                                                         "Failed to convert json input to object"), E_406("Distribution %s required is missing"),
74
75         E_499("Invalid input. Description: %s"),
76
77         E_500("Catalog-BE was not initialized properly"), E_501(
78                         "Failed to add resource instance of resource %s to service %s"), E_502(
79                                         "Error occured during access to U-EB Server. Operation: %s",
80                                         "An error occured in ASDC distribution mechanism. Please check the logs for more information."), E_503(
81                                                         "Error occured in Distribution Engine. Failed operation: %s",
82                                                         "System Error occured in ASDC Distribution Engine. Please check ASDC logs for more details."), E_504(
83                                                                         "Failed adding node of type %s to graph."), E_505(
84                                                                                         "Operation towards database failed.",
85                                                                                         "Please check JanusGraph DB health or look at the logs for more details."), E_506(
86                                                                                                         "Unexpected error during operation"), E_507(
87                                                                                                                         "Going to execute rollback on graph."), E_508(
88                                                                                                                                         "Failed to lock object for update. Type = %s, Id = %s"), E_509(
89                                                                                                                                                         "Failed to create node %s on graph. status is %s"), E_510(
90                                                                                                                                                                         "Failed to update node %s on graph. Status is %s"), E_511(
91                                                                                                                                                                                         "Failed to delete node %s on graph. Status is %s"), E_512(
92                                                                                                                                                                                                         "Failed to retrieve node %s from graph. Status is %s"), E_513(
93                                                                                                                                                                                                                         "Failed to find parent node of %s on graph. Status is %s"), E_514(
94                                                                                                                                                                                                                                         "Failed to fetch all nodes with type %s of parent node %s . Status is %s"), E_515(
95                                                                                                                                                                                                                                                         "Cannot find node with type %s associated with node %s . Status is %s"), E_516(
96                                                                                                                                                                                                                                                                         "Error occured in Component Cleaner Task. Failed operation: %s"), E_517(
97                                                                                                                                                                                                                                                                                         "Error when logging FE HTTP request/response"), E_518(
98                                                                                                                                                                                                                                                                                                         "Error when trying to access FE Portal page"),
99
100         E_599("Internal flow error. Operation: %s"),
101
102         E_900("Unexpected error during BE REST API execution"), E_901("General error during FE Health Check"), E_999(
103                         "Unexpected error. Description: %s");
104
105         /*
106          * 100-199 Security/Permission Related - Authentication problems (from
107          * external client, to external server) - Certification errors -
108          * 
109          * 200-299 Availability/Timeout Related - connectivity error - connection
110          * timeout
111          * 
112          * 300-399 Data Access/Integrity Related - Data in graph in invalid(E.g. no
113          * creator is found for service) - Artifact is missing in ES, but exists in
114          * graph.
115          * 
116          * 400-499 Schema Interface Type/Validation - received payload checksum is
117          * inavlid - received json is not valid
118          * 
119          * 500-599 Business/Flow Processing Related - check out to service is not
120          * allowed - rollback is done - failed to generate heat file
121          * 
122          * 
123          * 600-899 Reserved – do not use
124          * 
125          * 900-999 Unknown Errors - unexpected exception
126          */
127
128         String description;
129         String resolution;
130
131         EcompErrorCode(String description, String resolution) {
132                 this.description = description;
133                 this.resolution = resolution;
134         }
135
136         EcompErrorCode(String description) {
137                 this.description = description;
138         }
139
140         public String getDescription() {
141                 return description;
142         }
143
144         public void setDescription(String description) {
145                 this.description = description;
146         }
147
148         public String getResolution() {
149                 return resolution;
150         }
151
152         public void setResolution(String resolution) {
153                 this.resolution = resolution;
154         }
155
156 }