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 private HeatToToscaLogConstants() {
83 //Hiding implicit constructor