2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.openecomp.core.validation.errors;
23 public enum Messages {
24 INVALID_ZIP_FILE("Invalid zip file"),
27 //NO_ZIP_UPLOADED("No zip file was uploaded or zip file doesn't exist"),
28 ZIP_SHOULD_NOT_CONTAIN_FOLDERS("Zip file should not contain folders"),
29 MANIFEST_NOT_EXIST("Manifest doesn't exist"),
30 NO_ZIP_FILE_WAS_UPLOADED_OR_ZIP_NOT_EXIST("no zip file was uploaded or zip file doesn't exist"),
34 MISSING_FILE_IN_ZIP("Missing file in zip"),
35 MISSING_FILE_IN_MANIFEST("Missing file in manifest"),
36 MISSING_FILE_NAME_IN_MANIFEST("Missing file name in manifest - %s"),
37 MISSING_NESTED_FILE("Missing nested file - %s"),
38 MISSING_ARTIFACT("Missing artifact - %s"),
39 WRONG_HEAT_FILE_EXTENSION("Wrong HEAT file extension - %s"),
40 WRONG_ENV_FILE_EXTENSION("Wrong ENV file extension - %s"),
41 INVALID_MANIFEST_FILE("invalid manifest file"),
42 INVALID_FILE_TYPE("Missing or Unknown file type in Manifest"),
43 ENV_NOT_ASSOCIATED_TO_HEAT("ENV file must be associated to a HEAT file"),
46 INVALID_YAML_FORMAT("Invalid YAML format - %s"),
47 INVALID_YAML_FORMAT_REASON("Invalid YAML format Problem - [%s]"),
48 EMPTY_YAML_FILE("empty yaml"),
49 GENERAL_YAML_PARSER_ERROR("general parser error"),
50 GENERAL_HEAT_PARSER_ERROR("general parser error"),
51 INVALID_HEAT_FORMAT_REASON("Invalid HEAT format problem - [%s]"),
52 MISSING_RESOURCE_IN_DEPENDS_ON("a Missing resource in depend On Missing Resource ID [%s]"),
53 REFERENCED_PARAMETER_NOT_FOUND("Referenced parameter - %s - not found, used in resource - %s"),
54 GET_ATTR_NOT_FOUND("get_attr attribute not found - %s in resource %s"),
55 MISSING_PARAMETER_IN_NESTED(
56 "Referenced parameter not found in nested file - %s, resource name - %s, "
57 + "parameter name - %s"),
58 NESTED_LOOP("Nested files loop - %s"),
59 MORE_THAN_ONE_BIND_FROM_NOVA_TO_PORT("Resource Port %s exceed allowed relations from NovaServer"),
60 SERVER_NOT_DEFINED_FROM_NOVA("Missing server group definition - %s, %s"),
61 WRONG_POLICY_IN_SERVER_GROUP("Wrong policy in server group - %s"),
62 MISSING_IMAGE_AND_FLAVOR("Missing both Image and Flavor in NOVA Server - %s"),
63 ENV_INCLUDES_PARAMETER_NOT_IN_HEAT("Env file %s includes a parameter not in HEAT - %s"),
64 PARAMETER_ENV_VALUE_NOT_ALIGN_WITH_TYPE("Parameter env value %s not align with type"),
65 PARAMETER_DEFAULT_VALUE_NOT_ALIGN_WITH_TYPE(
66 "Parameter - %s default value not align with type %s"),
67 INVALID_RESOURCE_TYPE("A resource has an invalid or unsupported type - %s, Resource ID [%s]"),
68 ARTIFACT_FILE_NOT_REFERENCED("Artifact file is not referenced."),
69 SERVER_OR_SECURITY_GROUP_NOT_IN_USE("%s not in use, Resource Id [%s]"),
70 PORT_NO_BIND_TO_ANY_NOVA_SERVER("Port not bind to any NOVA Server, Resource Id [%s]"),
71 INVALID_GET_RESOURCE_SYNTAX(
72 "invalid get_resource syntax is in use - %s , get_resource function should"
73 + " get the resource id of the referenced resource"),
74 INVALID_RESOURCE_GROUP_TYPE(
75 "OS::Heat::ResourceGroup resource with resource_def which is not "
76 + "pointing to nested heat file is not supported,"
77 + " Resource ID [%s], resource_def type [%s]"),
80 REFERENCED_RESOURCE_NOT_FOUND("Referenced resource - %s not found"),
81 MISSING_GET_PARAM("Missing get_param in %s, Resource Id [%s]"),
84 MISSING_NOVA_SERVER_METADATA("Missing Nova Server Metadata property Resource id [%s]"),
85 MISSING_NOVA_SERVER_VNF_ID("Missing VNF_ID Resource id [%s]"),
86 MISSING_NOVA_SERVER_VF_MODULE_ID("Missing VF_MODULE_ID, Resource id [%s]"),
87 NETWORK_PARAM_NOT_ALIGNED_WITH_GUIDE_LINE(
88 "Network Parameter Name not aligned with Guidelines Parameter Name [%s] Resource ID [%s]"),
89 MISSIN_BASE_HEAT_FILE(
90 "Missing Base HEAT. Pay attention that without Base HEAT, there will be no shared resources"),
91 MULTI_BASE_HEAT_FILE("Multi Base HEAT. Expected only one. Files %s."),
92 RESOURCE_NOT_DEFINED_IN_OUTPUT(
93 "Resource is not defined as output and thus cannot be Shared. resource id - %s"),
94 RESOURCE_CONNECTED_TO_TWO_EXTERNAL_NETWORKS_WITH_SAME_ROLE(
95 "A resource is connected twice to the same network role Resource ID [%s] Network Role [%s]."),
96 VOLUME_HEAT_NOT_EXPOSED("Volume is not defined as output and thus cannot be attached %s"),
97 FLOATING_IP_NOT_IN_USE("OS::Neutron::FloatingIP is in use, Resource ID [%s]"),
98 FIXED_IPS_NOT_ALIGNED_WITH_GUIDE_LINES("Fixed_IPS not aligned with Guidelines, Resource ID [%s]"),
99 NOVA_SERVER_NAME_NOT_ALIGNED_WITH_GUIDE_LINES(
100 "Server Name not aligned with Guidelines, Resource ID [%s]"),
101 AVAILABILITY_ZONE_NOT_ALIGNED_WITH_GUIDE_LINES(
102 "Server Availability Zone not aligned with Guidelines, Resource ID [%s]"),
103 WRONG_IMAGE_OR_FLAVOR_NAME_NOVA_SERVER("Wrong %s name format in NOVA Server, Resource ID [%s]");
106 private String errorMessage;
108 Messages(String errorMessage) {
109 this.errorMessage = errorMessage;
112 public String getErrorMessage() {