update INFO.yaml
[sdc.git] / openecomp-be / lib / openecomp-common-lib / src / main / java / org / openecomp / sdc / common / errors / Messages.java
1 /*
2  * Copyright © 2016-2018 European Support Limited
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
18 package org.openecomp.sdc.common.errors;
19
20
21 public enum Messages {
22   CANT_LOAD_HEALING_CLASS("Can't load healing class %s."),
23
24   VERSION_UPGRADE("Item %s is of old version. A check out was made in order to get new " +
25       "functionalities"),
26
27   INVALID_ZIP_FILE("Invalid zip file"),
28   INVALID_CSAR_FILE("Invalid csar file"),
29   CSAR_FILE_NOT_FOUND("Each CSAR file must contain %s file."),
30   CSAR_DIRECTORIES_NOT_ALLOWED("Directory : %s , is not allowed."),
31   CSAR_FILES_NOT_ALLOWED("File : %s , are not allowed."),
32   MANIFEST_INVALID_LINE("Manifest contains invalid line : %s"),
33   MANIFEST_NO_METADATA("Manifest must contain metadata"),
34   MANIFEST_NO_SOURCES("Manifest must contain Source"),
35   MANIFEST_METADATA_MISSING_ENTRY("Manifest metadata missing entry %s"),
36   MANIFEST_INVALID_NAME("Manifest file %s and TOSCA definitions file %s must have the same name"),
37   MANIFEST_INVALID_EXT("Manifest file must have extension \".mf\" "),
38   MANIFEST_METADATA_INVALID_ENTRY("Manifest metadata should only have pnf or vnf entries"),
39   MANIFEST_INVALID_PNF_METADATA("%s TOSCA.meta file is applicable for VF only"),
40   MANIFEST_METADATA_DOES_NOT_MATCH_LIMIT("Manifest metadata must only have the required number [%s] of values"),
41   MANIFEST_EMPTY("Manifest must contain data"),
42   MANIFEST_PARSER_INTERNAL("Invalid manifest file"),
43   METADATA_PARSER_INTERNAL("Invalid Metadata file"),
44   METADATA_MISSING_OPTIONAL_FOLDERS("Missing folder %s in package"),
45   METADATA_UNSUPPORTED_ENTRY("Following entry not supported in TOSCA.meta %s"),
46   METADATA_INVALID_VERSION("Invalid entry %s value %s"),
47   METADATA_INVALID_VALUE("Invalid value %s in TOSCA.meta file"),
48   METADATA_MISSING_ENTRY("TOSCA.meta file in TOSCA-metadata directory missing entry %s"),
49   METADATA_NO_ENTRY_DEFINITIONS("TOSCA.meta must contain Entry Definitions"),
50   METADATA_INVALID_ENTRY_DEFINITIONS("TOSCA.meta must contain key:value entries"),
51   FAILED_TO_VALIDATE_METADATA("Failed to validate metadata file"),
52   FAILED_TO_TRANSLATE_ZIP_FILE("Failed to translate zip file"),
53   ZIP_NOT_EXIST("Zip file doesn't exist"),
54
55   PERMISSIONS_ERROR("Permissions Error. The user does not have permission to perform this action."),
56   PERMISSIONS_OWNER_ERROR("Permissions Error. Only one owner is allowed."),
57
58   ENTITY_NOT_FOUND("Incorrect item/version details provided."),
59   SUB_ENTITY_NOT_FOUND("Incorrect sub entity details provided."),
60   FAILED_TO_SYNC("Non existing version cannot be synced."),
61   FAILED_TO_PUBLISH_OUT_OF_SYNC("Publish is not allowed since the version status is Out of sync"),
62
63   DELETE_VSP_ERROR("VSP has been certified and cannot be deleted."),
64   DELETE_VLM_ERROR("VLM has been certified and cannot be deleted."),
65
66
67   ZIP_SHOULD_NOT_CONTAIN_FOLDERS("Zip file should not contain folders"),
68   VES_ZIP_SHOULD_CONTAIN_YML_ONLY(
69       "Wrong VES EVENT Artifact was uploaded - all files contained in Artifact must be YAML files" +
70           " (using .yaml/.yml extensions)"),
71   MANIFEST_NOT_EXIST("Manifest doesn't exist"),
72   MANIFEST_NOT_FOUND("Manifest file %s referenced in TOSCA.meta does not exist"),
73   FILE_TYPE_NOT_LEGAL("File type not legal as data for other file"),
74   MODULE_IN_MANIFEST_NO_YAML("Module '%s', has no yaml file reference"),
75   NO_MODULES_IN_MANIFEST("At least one Base/Module must be defined \n"),
76   MODULE_IN_MANIFEST_VOL_ENV_NO_VOL("Module '%s', has volume Env. reference with no Volume " +
77       "reference"),
78   ILLEGAL_MANIFEST("Illegal Manifest"),
79   NO_FILE_WAS_UPLOADED_OR_FILE_NOT_EXIST("no %s file was uploaded or file doesn't exist"),
80   MAPPING_OBJECTS_FAILURE("Failed to map object %s to %s. Exception message: %s"),
81   MORE_THEN_ONE_VOL_FOR_HEAT("heat contains more then one vol. selecting only first vol"),
82   FILE_CONTENT_MAP("failed to load %s content"),
83   CREATE_MANIFEST_FROM_ZIP("cannot create manifest from the attached zip file"),
84   CANDIDATE_PROCESS_FAILED("Candidate zip file process failed"),
85   FOUND_UNASSIGNED_FILES("cannot process zip since it has unassigned files"),
86   GENERATED_ARTIFACT_IN_USE("Artifact with file name %s is generated by SDC. "
87       + "Please remove this artifact from manifest and zip files"),
88
89   /* Monitor uploads related errors*/
90   ILLEGAL_MONITORING_ARTIFACT_TYPE("Illegal monitoring artifact type for component id %s, vsp id " +
91       "%s"),
92
93
94   /* manifest errors*/
95   MISSING_FILE_IN_ZIP("Missing file in zip"),
96   MISSING_FILE_IN_MANIFEST("Missing file in manifest"),
97   MISSING_FILE_NAME_IN_MANIFEST("Missing file name in manifest"),
98   MISSING_NESTED_FILE("Missing nested file - %s"),
99   MISSING_ARTIFACT("Missing artifact - %s"),
100   MISSING_MANIFEST_SOURCE("%s artifact %s referenced in manifest file does not exist"),
101   MISSING_METADATA_FILES("%s file referenced in TOSCA.meta does not exist"),
102   WRONG_HEAT_FILE_EXTENSION("Wrong HEAT file extension - %s"),
103   WRONG_ENV_FILE_EXTENSION("Wrong ENV file extension - %s"),
104   INVALID_MANIFEST_FILE("invalid manifest file"),
105   INVALID_FILE_TYPE("Missing or Unknown file type in Manifest"),
106   ENV_NOT_ASSOCIATED_TO_HEAT("ENV file must be associated to a HEAT file"),
107   CSAR_MANIFEST_FILE_NOT_EXIST("CSAR manifest file does not exist"),
108   CSAR_FAILED_TO_READ("CSAR file is not readable"),
109   TOSCA_PARSING_FAILURE("Invalid tosca file. Error code : %s, Error message : %s/"),
110
111   /*definition errors*/
112   MISSING_DEFINITION_FILE("Definition file %s referenced in TOSCA.meta does not exist"),
113   MISSING_IMPORT_FILE("Package must contain the referenced import file %s in %s directory"),
114   INVALID_IMPORT_STATEMENT("Definition file contains an invalid import statement in %s"),
115
116   /* content errors*/
117   INVALID_YAML_FORMAT("Invalid YAML format - %s"),
118   INVALID_YAML_FORMAT_REASON("Invalid YAML format Problem - [%s]"),
119   EMPTY_YAML_FILE("empty yaml"),
120   GENERAL_YAML_PARSER_ERROR("general parser error"),
121   GENERAL_HEAT_PARSER_ERROR("general parser error"),
122   INVALID_HEAT_FORMAT_REASON("Invalid HEAT format problem - [%s]"),
123   MISSING_RESOURCE_IN_DEPENDS_ON("a Missing resource in depend On, Missing Resource ID [%s]"),
124   REFERENCED_PARAMETER_NOT_FOUND("Referenced parameter - %s - not found, used in resource [%s]"),
125   GET_ATTR_NOT_FOUND("get_attr attribute not found, Attribute name [%s], Resource ID [%s]"),
126   MISSING_PARAMETER_IN_NESTED(
127       "Referenced parameter not found in nested file - %s, parameter name [%s], Resource ID [%s]"),
128   NESTED_LOOP("Nested files loop - %s"),
129   MORE_THAN_ONE_BIND_FROM_NOVA_TO_PORT("Resource Port %s exceed allowed relations from NovaServer"),
130   SERVER_NOT_DEFINED_FROM_NOVA("Missing server group definition - %s, %s"),
131   WRONG_POLICY_IN_SERVER_GROUP("Wrong policy in server group - %s"),
132   MISSING_IMAGE_AND_FLAVOR("Missing both Image and Flavor in NOVA Server, Resource ID [%s]"),
133   ENV_INCLUDES_PARAMETER_NOT_IN_HEAT("Env file %s includes a parameter not in HEAT - %s"),
134   PARAMETER_ENV_VALUE_NOT_ALIGN_WITH_TYPE("Parameter env value %s not align with type"),
135   PARAMETER_DEFAULT_VALUE_NOT_ALIGN_WITH_TYPE(
136       "Parameter - %s default value not align with type %s"),
137   INVALID_RESOURCE_TYPE("A resource has an invalid or unsupported type - %s, Resource ID [%s]"),
138   ARTIFACT_FILE_NOT_REFERENCED("Artifact file is not referenced."),
139   RESOURCE_NOT_IN_USE("%s not in use, Resource Id [%s]"),
140   PORT_NO_BIND_TO_ANY_NOVA_SERVER("Port not bind to any NOVA Server, Resource Id [%s]"),
141   INVALID_GET_RESOURCE_SYNTAX(
142       "invalid get_resource syntax is in use - %s , get_resource"
143           + " function should get the resource id of the referenced resource"),
144   INVALID_RESOURCE_GROUP_TYPE(
145       "OS::Heat::ResourceGroup resource with resource_def which is not pointing to "
146           + "nested heat file is not supported, Resource ID [%s], resource_def type [%s]"),
147   WRONG_VALUE_TYPE_ASSIGNED_NESTED_INPUT(
148       "Wrong value type assigned to a nested input parameter, nested resource [%s],"
149           + " property name [%s], nested file [%s]"),
150   NOVA_NAME_IMAGE_FLAVOR_NOT_CONSISTENT(
151       "Nova Server naming convention in image, flavor and name properties is not "
152           + "consistent, Resource ID [%s]"),
153   RESOURCE_GROUP_INVALID_INDEX_VAR(
154       "Wrong value assigned to a ResourceGroup index_var property (functions are not allowed"
155           + " but only strings), Resource ID [%s]"),
156   CONTRAIL_2_IN_USE("Contrail 2.x deprecated resource is in use, Resource ID [%s]"),
157
158   /* warnings */
159   REFERENCED_RESOURCE_NOT_FOUND("Referenced resource - %s not found"),
160   MISSING_GET_PARAM("Missing get_param in %s, Resource Id [%s]"),
161
162   /*OPENECOMP Guide lines*/
163   MISSING_NOVA_SERVER_METADATA("Missing Nova Server Metadata property, Resource ID [%s]"),
164   MISSING_NOVA_SERVER_VNF_ID("Missing VNF_ID in Metadata property, Resource ID [%s]"),
165   MISSING_NOVA_SERVER_VF_MODULE_ID("Missing VF_MODULE_ID in Metadata property, Resource id [%s]"),
166   NETWORK_PARAM_NOT_ALIGNED_WITH_GUIDE_LINE(
167       "Network Parameter Name not aligned with Guidelines, Parameter Name [%s] Resource ID [%s]"),
168   MISSIN_BASE_HEAT_FILE(
169       "Missing Base HEAT. Pay attention that without Base HEAT, there will be no shared resources"),
170   MULTI_BASE_HEAT_FILE("Multi Base HEAT. Expected only one. Files %s."),
171   RESOURCE_NOT_DEFINED_IN_OUTPUT(
172       "Resource is not defined as output and thus cannot be Shared, Resource ID [%s]"),
173   RESOURCE_CONNECTED_TO_TWO_EXTERNAL_NETWORKS_WITH_SAME_ROLE(
174       "A resource is connected twice to the same network role, Network Role [%s],"
175           + " Resource ID [%s]"),
176   VOLUME_HEAT_NOT_EXPOSED("Volume is not defined as output and thus cannot be attached %s"),
177   FORBIDDEN_RESOURCE_IN_USE("%s is in use, Resource ID [%s]"),
178   PARAMETER_NAME_NOT_ALIGNED_WITH_GUIDELINES(
179       "%s '%s' Parameter Name not aligned with Guidelines, Parameter Name [%s], Resource ID [%s]."
180           + " As a result, VF/VFC Profile may miss this information"),
181   /* Contrail validator messages*/
182   MERGE_OF_CONTRAIL2_AND_CONTRAIL3_RESOURCES(
183       "HEAT Package includes both Contrail 2 and Contrail 3 resources. "
184           + "Contrail 2 resources can be found in %s. Contrail 3 resources can be found in %s"),
185   CONTRAIL_VM_TYPE_NAME_NOT_ALIGNED_WITH_NAMING_CONVENSION(
186       "Service Template naming convention in Image and Flavor "
187           + "properties is not consistent in Resource, Resource ID %s"),
188
189   /* Notifications */
190   FAILED_TO_MARK_NOTIFICATION_AS_READ("Failed to mark notifications as read"),
191   FAILED_TO_UPDATE_LAST_SEEN_NOTIFICATION("Failed to update last seen notification for user %s");
192
193   private String errorMessage;
194
195   Messages(String errorMessage) {
196     this.errorMessage = errorMessage;
197   }
198
199   public String getErrorMessage() {
200     return errorMessage;
201   }
202
203 }