2 * Copyright © 2016-2018 European Support Limited
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package org.openecomp.sdc.translator.services.heattotosca;
19 public class HeatToToscaLogConstants {
20 private static final String LOG_HEAT_RESOURCE_TYPE_PREFIX = "Heat resource: '{}' with type: '{}' ";
21 private static final String LOG_UNSUPPORTED_HEAT_RESOURCE_SUFFIX =
22 "therefore this resource will be ignored in TOSCA translation.";
23 private static final String LOG_UNSUPPORTED_RESOURCE_CONNECTION_SUFFIX =
24 "therefore this connection will be ignored in TOSCA translation.";
25 private static final String LOG_UNSUPPORTED_PROPERTY_SUFFIX =
26 "therefore this property will be ignored in TOSCA translation.";
28 //Contrail Attach Policy messages
29 public static final String LOG_UNSUPPORTED_POLICY_PROPERTY_GET_ATTR = LOG_HEAT_RESOURCE_TYPE_PREFIX
30 + "include 'policy' property without 'get_attr' of 'fq_name'/'get_resource' function, "
31 + LOG_UNSUPPORTED_HEAT_RESOURCE_SUFFIX;
32 public static final String LOG_UNSUPPORTED_POLICY_RESOURCE = LOG_HEAT_RESOURCE_TYPE_PREFIX
33 + "include unsupported policy resource, " + LOG_UNSUPPORTED_HEAT_RESOURCE_SUFFIX;
34 public static final String LOG_UNSUPPORTED_POLICY_NETWORK_PROPERTY = LOG_HEAT_RESOURCE_TYPE_PREFIX
35 + "include 'network' property without 'get_resource' function, " + LOG_UNSUPPORTED_HEAT_RESOURCE_SUFFIX;
37 //Service Instance messages
38 public static final String LOG_SERVICE_TEMPLATE_PROPERTY_GET_RESOURCE = LOG_HEAT_RESOURCE_TYPE_PREFIX
39 + "include 'service_template' property without 'get_resource' function, currently not supported, "
40 + LOG_UNSUPPORTED_HEAT_RESOURCE_SUFFIX;
41 public static final String LOG_SERVICE_TEMPLATE_PROPERTY_INVALID_TYPE =
42 "Resource id '{}' with type '{} has reference to resource '{}' with type '{}' in property service_template"
43 + ". Invalid type, resource type should be type of '{}', " + LOG_UNSUPPORTED_HEAT_RESOURCE_SUFFIX;
44 public static final String LOG_SERVICE_TEMPLATE_PROPERTY_UNSUPPORTED_RESOURCE =
45 "Resource id '{}' with type '{}' has reference to unsupported resource '{}' with type '{}' in"
46 + " property 'service_template', " + LOG_UNSUPPORTED_HEAT_RESOURCE_SUFFIX;
47 public static final String LOG_MULTIPLE_SERVICE_INSTANCE_DIFF_INTERFACES =
48 "More than one ServiceInstance pointing to the same ServiceTemplate '{} ' with different number of "
49 + "interfaces., " + LOG_UNSUPPORTED_HEAT_RESOURCE_SUFFIX;
50 public static final String LOG_MISSING_VIRTUAL_NETWORK_INTERFACE_LIST = LOG_HEAT_RESOURCE_TYPE_PREFIX
51 + "missing 'virtual_network' property in 'interface_list' entry, therefore, no network connection is "
52 + "define for this entry.";
53 public static final String LOG_UNSUPPORTED_NETWORK_RESOURCE_CONNECTION = LOG_HEAT_RESOURCE_TYPE_PREFIX
54 + "has connection to invalid/not supported network resource, " + LOG_UNSUPPORTED_RESOURCE_CONNECTION_SUFFIX;
55 public static final String LOG_INVALID_NETWORK_CONNECTION = LOG_HEAT_RESOURCE_TYPE_PREFIX
56 + "include 'virtual_network' property with value '{}', the connection to this network wasn't found/not "
57 + "supported " + LOG_UNSUPPORTED_RESOURCE_CONNECTION_SUFFIX + " for this property.";
59 //Contrail v2 virtual network
60 public static final String LOG_INVALID_NETWORK_POLICY_REFS_RESOURCE = LOG_HEAT_RESOURCE_TYPE_PREFIX
61 + "property network_policy_refs is referenced to an unsupported resource "
62 + LOG_UNSUPPORTED_RESOURCE_CONNECTION_SUFFIX;
64 public static final String LOG_INVALID_PROPERTY_VALUE_FORMAT = LOG_HEAT_RESOURCE_TYPE_PREFIX
65 + "invalid format of property value, " + LOG_UNSUPPORTED_HEAT_RESOURCE_SUFFIX;
67 public static final String LOG_INVALID_PROPERTY_FORMAT_GET_ATTR_FQ_NAME = LOG_HEAT_RESOURCE_TYPE_PREFIX
68 + "has property with invalid format of 'get_attr' function with 'fq_name' value, "
69 + LOG_UNSUPPORTED_PROPERTY_SUFFIX;
70 public static final String LOG_INVALID_PROPERTY_FORMAT_GET_RESOURCE = LOG_HEAT_RESOURCE_TYPE_PREFIX
71 + "has property with invalid format of 'get_resource' function, "
72 + LOG_UNSUPPORTED_PROPERTY_SUFFIX;
74 //Contrail v2 vlan subinterface
75 public static final String LOG_MULTIPLE_INTERFACE_VALUES = LOG_HEAT_RESOURCE_TYPE_PREFIX
76 + "include '{}' property with more than one interface values, only the first interface will be connected, "
77 + "all rest will be ignored in TOSCA translation";
78 public static final String LOG_UNSUPPORTED_VLAN_RESOURCE_CONNECTION = LOG_HEAT_RESOURCE_TYPE_PREFIX
79 + "include '{}' property which is connect to unsupported/incorrect {} resource '{}' with type '{}', "
80 + LOG_UNSUPPORTED_RESOURCE_CONNECTION_SUFFIX;
82 //Security rules to port
83 public static final String LOG_UNSUPPORTED_SECURITY_RULE_PORT_CAPABILITY_CONNECTION =
84 "Nested resource '{}' property '{}' is pointing to resource with type '{}' which is not supported for "
85 + "capability '{}' connection, (security rules to port connection). Supported types are: '{}', "
86 + "therefore, this TOSCA capability will not be connected.";
89 public static final String LOG_UNSUPPORTED_RESOURCE_REQUIREMENT_CONNECTION =
90 "'{}' property of port resource('{}') is pointing to a resource of type '{}' which is not supported for "
91 + "this requirement. Supported types are: {}";
93 public static final String LOG_INVALID_INSTANCE_UUID = LOG_HEAT_RESOURCE_TYPE_PREFIX
94 + "include 'instance_uuid' property without 'get_resource' function, "
95 + LOG_UNSUPPORTED_HEAT_RESOURCE_SUFFIX;
96 public static final String LOG_UNSUPPORTED_VOLUME_ATTACHMENT_MSG =
97 "Volume attachment with id '{}' is pointing to unsupported resource type({}) through the property "
98 + "'volume_id'. The connection to the volume is ignored. Supported types are: {}";
100 //Capability/Requirement helpers
101 public static final String LOG_NESTED_RESOURCE_PROPERTY_NOT_DEFINED = "'{}' property is not define in nested "
102 + "resource '{}' for the nested heat file, therefore, '{}' TOSCA {} will not be connected.";
103 public static final String LOG_UNSUPPORTED_CAPABILITY_CONNECTION =
104 "'{}' connection to '{}' capability of type '{}' is not supported/invalid,"
105 + LOG_UNSUPPORTED_RESOURCE_CONNECTION_SUFFIX;
107 //Port to Net Resource Connection
108 public static final String LOG_UNSUPPORTED_PORT_NETWORK_REQUIREMENT_CONNECTION =
109 "Nested resource '{}' property '{}' is pointing to a resource with type '{}' which is not "
110 + "supported for requirement '{}' that connect port to network. Supported types are: '{}', "
111 + "therefore, this TOSCA requirement will not be connected.";
113 public static final String LOG_UNSUPPORTED_VOL_ATTACHMENT_VOLUME_REQUIREMENT_CONNECTION =
114 "Nested resource '{}' property '{}' is pointing to a resource with type '{}' which is not "
115 + "supported for requirement '{}' that connect VolumeAttachment to Volume. Supported "
116 + "types are: '{}', therefore, this TOSCA requirement will not be connected.";
118 //Contrail v2 vmi to net resource connection
119 public static final String LOG_MULTIPLE_VIRTUAL_NETWORK_REFS_VALUES =
120 "Heat resource: '{}' with nested heat file: '{}' has resource '{}' with "
121 + "type '{}' which include 'virtual_network_refs' property with more than one network values, "
122 + "only the first network will be translated, all rest will be ignored in TOSCA translation.";
123 public static final String LOG_UNSUPPORTED_VMI_NETWORK_REQUIREMENT_CONNECTION =
124 "Nested resource '{}' property '{}' is pointing to a resource with type '{}' which is not supported for "
125 + "requirement '{}' that connect virtual machine interface to network. Supported "
126 + "types are: '{}', therefore, this TOSCA requirement will not be connected.";
128 //Contrail v2 vlan to interface connection
129 public static final String LOG_UNSUPPORTED_VMI_VLAN_SUB_INTERFACE_REQUIREMENT_CONNECTION =
130 "Nested resource '{}' property '{}' is pointing to a {} resource with type '{}' which is not supported "
131 + "for requirement '{}' that connect vmi vlan sub interface to interface. Supported types are: "
132 + "'{}' (excluding Vlan), therefore, this TOSCA requirement will not be connected.";
134 public static final String LOG_MULTIPLE_INTERFACE_VALUES_NESTED =
135 "Heat resource: '{}' with nested heat file: '{}' has resource '{}' with type '{}' which include '{}' "
136 + "property with more than one interface values, only the first interface will be connected, all "
137 + "rest will be ignored in TOSCA translation.";
139 public static final String LOG_UNSUPPORTED_CONTRAIL_PORT_NETWORK_REQUIREMENT_CONNECTION =
140 "Nested resource '{}' property '{}' is pointing to a resource with type '{}' which is not supported"
141 + "for requirement '{}' that connect contrail port to network. Supported types "
142 + "are: '{}', therefore, this TOSCA requirement will not be connected.";
144 private HeatToToscaLogConstants() {
145 //Hiding implicit constructor