Upgrade SDC from Titan to Janus Graph
[sdc.git] / catalog-model / src / main / java / org / openecomp / sdc / be / model / operations / impl / HeatParametersOperation.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.be.model.operations.impl;
22
23 import fj.data.Either;
24 import org.apache.commons.lang3.tuple.ImmutablePair;
25 import org.apache.tinkerpop.gremlin.structure.Edge;
26 import org.openecomp.sdc.be.dao.graph.datatype.GraphEdge;
27 import org.openecomp.sdc.be.dao.graph.datatype.GraphRelation;
28 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphGenericDao;
29 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
30 import org.openecomp.sdc.be.dao.neo4j.GraphEdgeLabels;
31 import org.openecomp.sdc.be.dao.neo4j.GraphPropertiesDictionary;
32 import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum;
33 import org.openecomp.sdc.be.model.HeatParameterDefinition;
34 import org.openecomp.sdc.be.model.heat.HeatParameterType;
35 import org.openecomp.sdc.be.model.operations.api.IHeatParametersOperation;
36 import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
37 import org.openecomp.sdc.be.model.tosca.converters.PropertyValueConverter;
38 import org.openecomp.sdc.be.model.tosca.validators.PropertyTypeValidator;
39 import org.openecomp.sdc.be.resources.data.HeatParameterData;
40 import org.openecomp.sdc.be.resources.data.HeatParameterValueData;
41 import org.openecomp.sdc.be.resources.data.UniqueIdData;
42 import org.openecomp.sdc.common.log.wrappers.Logger;
43 import org.springframework.stereotype.Component;
44
45 import java.util.ArrayList;
46 import java.util.HashMap;
47 import java.util.List;
48 import java.util.Map;
49
50 @Component("heat-parameter-operation")
51 public class HeatParametersOperation implements IHeatParametersOperation {
52
53     public static final String EMPTY_VALUE = null;
54
55     private static final Logger log = Logger.getLogger(HeatParametersOperation.class.getName());
56
57     @javax.annotation.Resource
58     private JanusGraphGenericDao janusGraphGenericDao;
59
60     public JanusGraphGenericDao getJanusGraphGenericDao() {
61         return janusGraphGenericDao;
62     }
63
64     public void setJanusGraphGenericDao(JanusGraphGenericDao janusGraphGenericDao) {
65         this.janusGraphGenericDao = janusGraphGenericDao;
66     }
67
68     public StorageOperationStatus getHeatParametersOfNode(NodeTypeEnum nodeType, String uniqueId, List<HeatParameterDefinition> properties) {
69
70         Either<List<ImmutablePair<HeatParameterData, GraphEdge>>, JanusGraphOperationStatus> childrenNodes = janusGraphGenericDao
71             .getChildrenNodes(UniqueIdBuilder.getKeyByNodeType(nodeType), uniqueId, GraphEdgeLabels.HEAT_PARAMETER, NodeTypeEnum.HeatParameter,
72                 HeatParameterData.class);
73
74         if (childrenNodes.isRight()) {
75             JanusGraphOperationStatus status = childrenNodes.right().value();
76             if (status == JanusGraphOperationStatus.NOT_FOUND) {
77                 status = JanusGraphOperationStatus.OK;
78             }
79             return DaoStatusConverter.convertJanusGraphStatusToStorageStatus(status);
80         }
81
82         List<ImmutablePair<HeatParameterData, GraphEdge>> values = childrenNodes.left().value();
83         if (values != null) {
84
85             for (ImmutablePair<HeatParameterData, GraphEdge> immutablePair : values) {
86                 GraphEdge edge = immutablePair.getValue();
87                 String propertyName = (String) edge.getProperties().get(GraphPropertiesDictionary.NAME.getProperty());
88                 if (log.isDebugEnabled())
89                     log.debug("Property {} is associated to node {}", propertyName, uniqueId);
90                 HeatParameterData propertyData = immutablePair.getKey();
91                 HeatParameterDefinition propertyDefinition = convertParameterDataToParameterDefinition(propertyData, propertyName, uniqueId);
92
93                 properties.add(propertyDefinition);
94
95                 if (log.isTraceEnabled()) {
96                     log.trace("getHeatParametersOfNode - property {} associated to node {}", propertyDefinition, uniqueId);
97                 }
98             }
99
100         }
101
102         return StorageOperationStatus.OK;
103     }
104
105     public StorageOperationStatus getParametersValueNodes(NodeTypeEnum parentNodeType, String parentUniqueId, List<HeatParameterValueData> heatValues) {
106
107         Either<List<ImmutablePair<HeatParameterValueData, GraphEdge>>, JanusGraphOperationStatus> childrenNodes = janusGraphGenericDao
108             .getChildrenNodes(UniqueIdBuilder.getKeyByNodeType(parentNodeType), parentUniqueId, GraphEdgeLabels.PARAMETER_VALUE,
109                 NodeTypeEnum.HeatParameterValue, HeatParameterValueData.class);
110
111         if (childrenNodes.isRight()) {
112             JanusGraphOperationStatus status = childrenNodes.right().value();
113             if (status == JanusGraphOperationStatus.NOT_FOUND) {
114                 status = JanusGraphOperationStatus.OK;
115             }
116             return DaoStatusConverter.convertJanusGraphStatusToStorageStatus(status);
117         }
118
119         List<ImmutablePair<HeatParameterValueData, GraphEdge>> values = childrenNodes.left().value();
120         if (values != null) {
121
122             for (ImmutablePair<HeatParameterValueData, GraphEdge> immutablePair : values) {
123                 GraphEdge edge = immutablePair.getValue();
124                 String propertyName = (String) edge.getProperties().get(GraphPropertiesDictionary.NAME.getProperty());
125                 log.trace("Heat value {} is associated to node {}", propertyName,parentUniqueId);
126                 HeatParameterValueData propertyData = immutablePair.getKey();
127
128                 heatValues.add(propertyData);
129             }
130
131         }
132
133         return StorageOperationStatus.OK;
134     }
135
136     @Override
137     public Either<List<HeatParameterDefinition>, StorageOperationStatus> deleteAllHeatParametersAssociatedToNode(NodeTypeEnum nodeType, String uniqueId) {
138
139         List<HeatParameterDefinition> heatParams = new ArrayList<>();
140         StorageOperationStatus propertiesOfNodeRes = getHeatParametersOfNode(nodeType, uniqueId, heatParams);
141
142         if (!propertiesOfNodeRes.equals(StorageOperationStatus.OK) && !propertiesOfNodeRes.equals(StorageOperationStatus.NOT_FOUND)) {
143             return Either.right(propertiesOfNodeRes);
144         }
145
146         for (HeatParameterDefinition propertyDefinition : heatParams) {
147
148             String propertyUid = propertyDefinition.getUniqueId();
149             Either<HeatParameterData, JanusGraphOperationStatus> deletePropertyRes = deleteHeatParameterFromGraph(propertyUid);
150             if (deletePropertyRes.isRight()) {
151                 log.error("Failed to delete heat parameter with id {}", propertyUid);
152                 JanusGraphOperationStatus status = deletePropertyRes.right().value();
153                 if (status == JanusGraphOperationStatus.NOT_FOUND) {
154                     status = JanusGraphOperationStatus.INVALID_ID;
155                 }
156                 return Either.right(DaoStatusConverter.convertJanusGraphStatusToStorageStatus(status));
157             }
158
159         }
160
161         log.debug("The heat parameters deleted from node {} are {}", uniqueId, heatParams);
162         return Either.left(heatParams);
163     }
164
165     @Override
166     public StorageOperationStatus deleteAllHeatValuesAssociatedToNode(NodeTypeEnum parentNodeType, String parentUniqueId) {
167
168         List<HeatParameterValueData> heatValues = new ArrayList<>();
169         StorageOperationStatus propertiesOfNodeRes = getParametersValueNodes(parentNodeType, parentUniqueId, heatValues);
170
171         if (!propertiesOfNodeRes.equals(StorageOperationStatus.OK) && !propertiesOfNodeRes.equals(StorageOperationStatus.NOT_FOUND)) {
172             return propertiesOfNodeRes;
173         }
174
175         for (HeatParameterValueData propertyDefinition : heatValues) {
176
177             String propertyUid = (String) propertyDefinition.getUniqueId();
178             Either<HeatParameterValueData, JanusGraphOperationStatus> deletePropertyRes = deleteHeatParameterValueFromGraph(propertyUid);
179             if (deletePropertyRes.isRight()) {
180                 log.error("Failed to delete heat parameter value with id {}", propertyUid);
181                 JanusGraphOperationStatus status = deletePropertyRes.right().value();
182                 if (status == JanusGraphOperationStatus.NOT_FOUND) {
183                     status = JanusGraphOperationStatus.INVALID_ID;
184                 }
185                 return DaoStatusConverter.convertJanusGraphStatusToStorageStatus(status);
186             }
187
188         }
189
190         log.debug("The heat values deleted from node {} are {}" , parentUniqueId, heatValues);
191         return StorageOperationStatus.OK;
192     }
193
194     private Either<HeatParameterData, JanusGraphOperationStatus> deleteHeatParameterFromGraph(String propertyId) {
195         log.debug("Before deleting heat parameter from graph {}" , propertyId);
196         return janusGraphGenericDao
197             .deleteNode(UniqueIdBuilder.getKeyByNodeType(NodeTypeEnum.HeatParameter), propertyId, HeatParameterData.class);
198     }
199
200     private Either<HeatParameterValueData, JanusGraphOperationStatus> deleteHeatParameterValueFromGraph(String propertyId) {
201         log.debug("Before deleting heat parameter from graph {}" , propertyId);
202         return janusGraphGenericDao.deleteNode(UniqueIdBuilder.getKeyByNodeType(NodeTypeEnum.HeatParameterValue), propertyId, HeatParameterValueData.class);
203     }
204
205     @Override
206     public StorageOperationStatus addPropertiesToGraph(List<HeatParameterDefinition> properties, String parentId, NodeTypeEnum nodeType) {
207
208         if (properties != null) {
209             for (HeatParameterDefinition propertyDefinition : properties) {
210
211                 String propertyName = propertyDefinition.getName();
212
213                 Either<HeatParameterData, JanusGraphOperationStatus> addPropertyToGraph = addPropertyToGraph(propertyName, propertyDefinition, parentId, nodeType);
214
215                 if (addPropertyToGraph.isRight()) {
216                     return DaoStatusConverter.convertJanusGraphStatusToStorageStatus(addPropertyToGraph.right().value());
217                 }
218             }
219         }
220
221         return StorageOperationStatus.OK;
222
223     }
224
225     @Override
226     public StorageOperationStatus updateHeatParameters(List<HeatParameterDefinition> properties) {
227
228         if (properties == null) {
229             return StorageOperationStatus.OK;
230         }
231         for (HeatParameterDefinition property : properties) {
232
233             HeatParameterData heatParameterData = new HeatParameterData(property);
234             Either<HeatParameterData, JanusGraphOperationStatus> updateNode = janusGraphGenericDao
235                 .updateNode(heatParameterData, HeatParameterData.class);
236             if (updateNode.isRight()) {
237                 log.debug("failed to update heat parameter in graph. id = {}", property.getUniqueId());
238                 return DaoStatusConverter.convertJanusGraphStatusToStorageStatus(updateNode.right().value());
239             }
240         }
241
242         return StorageOperationStatus.OK;
243     }
244
245     public Either<HeatParameterData, JanusGraphOperationStatus> addPropertyToGraph(String propertyName, HeatParameterDefinition propertyDefinition, String parentId, NodeTypeEnum nodeType) {
246
247         UniqueIdData parentNode = new UniqueIdData(nodeType, parentId);
248
249         propertyDefinition.setUniqueId(UniqueIdBuilder.buildHeatParameterUniqueId(parentId, propertyName));
250         HeatParameterData propertyData = new HeatParameterData(propertyDefinition);
251
252         log.debug("Before adding property to graph {}" , propertyData);
253         Either<HeatParameterData, JanusGraphOperationStatus> createNodeResult = janusGraphGenericDao
254             .createNode(propertyData, HeatParameterData.class);
255         log.debug("After adding property to graph {}" , propertyData);
256         if (createNodeResult.isRight()) {
257             JanusGraphOperationStatus operationStatus = createNodeResult.right().value();
258             log.error("Failed to add property {} to graph. status is {}", propertyName, operationStatus);
259             return Either.right(operationStatus);
260         }
261
262         Map<String, Object> props = new HashMap<>();
263         props.put(GraphPropertiesDictionary.NAME.getProperty(), propertyName);
264         Either<GraphRelation, JanusGraphOperationStatus> createRelResult = janusGraphGenericDao
265             .createRelation(parentNode, propertyData, GraphEdgeLabels.HEAT_PARAMETER, props);
266         if (createRelResult.isRight()) {
267             JanusGraphOperationStatus operationStatus = createRelResult.right().value();
268             log.error("Failed to associate {} {} to heat parameter {} in graph. status is {}", nodeType.getName(), parentId, propertyName, operationStatus);
269             return Either.right(operationStatus);
270         }
271
272         return Either.left(createNodeResult.left().value());
273
274     }
275
276     public StorageOperationStatus validateAndUpdateProperty(HeatParameterDefinition propertyDefinition) {
277
278         log.trace("Going to validate property type and value. {}" , propertyDefinition);
279
280         String propertyType = propertyDefinition.getType();
281         HeatParameterType type = getType(propertyType);
282
283         if (type == null) {
284             log.info("The type {} of heat parameter is invalid", type);
285
286             return StorageOperationStatus.INVALID_TYPE;
287         }
288         propertyDefinition.setType(type.getType());
289
290         log.trace("After validating property type {}", propertyType);
291
292         // validate default value
293         String defaultValue = propertyDefinition.getDefaultValue();
294         boolean isValidProperty = isValidValue(type, defaultValue);
295         if (!isValidProperty) {
296             log.info("The value {} of property from type {} is invalid", defaultValue, type);
297             return StorageOperationStatus.INVALID_VALUE;
298         }
299
300         PropertyValueConverter converter = type.getConverter();
301
302         if (isEmptyValue(defaultValue)) {
303             log.debug("Default value was not sent for property {}. Set default value to {}", propertyDefinition.getName() , EMPTY_VALUE);
304
305             propertyDefinition.setDefaultValue(EMPTY_VALUE);
306         } else if (!isEmptyValue(defaultValue)) {
307             String convertedValue = converter.convert(defaultValue, null, null);
308             propertyDefinition.setDefaultValue(convertedValue);
309         }
310
311         // validate current value
312         String value = propertyDefinition.getCurrentValue();
313         isValidProperty = isValidValue(type, value);
314         if (!isValidProperty) {
315             log.info("The value {} of property from type {} is invalid", value, type);
316             return StorageOperationStatus.INVALID_VALUE;
317         }
318
319         if (isEmptyValue(value)) {
320             log.debug("Value was not sent for property {}. Set value to {}", propertyDefinition.getName(), EMPTY_VALUE);
321
322             propertyDefinition.setCurrentValue(EMPTY_VALUE);
323         } else if (!value.equals("")) {
324             String convertedValue = converter.convert(value, null, null);
325             propertyDefinition.setCurrentValue(convertedValue);
326         }
327
328         return StorageOperationStatus.OK;
329     }
330
331     public HeatParameterDefinition convertParameterDataToParameterDefinition(HeatParameterData propertyDataResult, String propertyName, String resourceId) {
332         log.debug("convert to HeatParamereDefinition {}", propertyDataResult);
333
334         HeatParameterDefinition propertyDefResult = new HeatParameterDefinition(propertyDataResult.getHeatDataDefinition());
335
336         propertyDefResult.setName(propertyName);
337
338         return propertyDefResult;
339     }
340
341     private HeatParameterType getType(String propertyType) {
342
343         return HeatParameterType.isValidType(propertyType);
344
345     }
346
347     protected boolean isValidValue(HeatParameterType type, String value) {
348         if (isEmptyValue(value)) {
349             return true;
350         }
351
352         PropertyTypeValidator validator = type.getValidator();
353
354         boolean isValid = validator.isValid(value, null, null);
355         if (isValid) {
356             return true;
357         } else {
358             return false;
359         }
360
361     }
362
363     public boolean isEmptyValue(String value) {
364         if (value == null) {
365             return true;
366         }
367         return false;
368     }
369
370     public boolean isNullParam(String value) {
371         if (value == null) {
372             return true;
373         }
374         return false;
375     }
376
377     @Override
378     public Either<HeatParameterValueData, StorageOperationStatus> updateHeatParameterValue(HeatParameterDefinition heatParam, String artifactId, String resourceInstanceId, String artifactLabel) {
379         String heatEnvId = UniqueIdBuilder.buildHeatParameterValueUniqueId(resourceInstanceId, artifactLabel, heatParam.getName());
380         Either<HeatParameterValueData, JanusGraphOperationStatus> getNode = janusGraphGenericDao
381             .getNode(GraphPropertiesDictionary.UNIQUE_ID.getProperty(), heatEnvId, HeatParameterValueData.class);
382         if (getNode.isRight() || getNode.left().value() == null) {
383             if (heatParam.getCurrentValue() == null || (heatParam.getDefaultValue() != null && heatParam.getCurrentValue().equals(heatParam.getDefaultValue()))) {
384                 log.debug("Updated heat parameter value equals default value. No need to create heat parameter value for heat parameter {}", heatParam.getUniqueId());
385                 return Either.left(null);
386             }
387             return createHeatParameterValue(heatParam, artifactId, resourceInstanceId, artifactLabel);
388         } else {
389             heatParam.setUniqueId(heatEnvId);
390             return updateHeatParameterValue(heatParam);
391         }
392     }
393
394     public Either<HeatParameterValueData, StorageOperationStatus> updateHeatParameterValue(HeatParameterDefinition heatParam) {
395         HeatParameterValueData heatParameterValue = new HeatParameterValueData();
396         heatParameterValue.setUniqueId(heatParam.getUniqueId());
397         if (heatParam.getCurrentValue() == null || (heatParam.getDefaultValue() != null && heatParam.getCurrentValue().equals(heatParam.getDefaultValue()))) {
398             Either<GraphRelation, JanusGraphOperationStatus> deleteParameterValueIncomingRelation = janusGraphGenericDao
399                 .deleteIncomingRelationByCriteria(heatParameterValue, GraphEdgeLabels.PARAMETER_VALUE, null);
400             if (deleteParameterValueIncomingRelation.isRight()) {
401                 log.debug("Failed to delete heat parameter value incoming relation on graph. id = {}", heatParameterValue.getUniqueId());
402                 return Either.right(DaoStatusConverter.convertJanusGraphStatusToStorageStatus(deleteParameterValueIncomingRelation.right().value()));
403             }
404             Either<Edge, JanusGraphOperationStatus> getOutgoingRelation = janusGraphGenericDao
405                 .getOutgoingEdgeByCriteria(GraphPropertiesDictionary.UNIQUE_ID.getProperty(), (String) heatParameterValue.getUniqueId(), GraphEdgeLabels.PARAMETER_IMPL, null);
406             if (getOutgoingRelation.isRight()) {
407                 log.debug("Failed to get heat parameter value outgoing relation from graph. id = {}", heatParameterValue.getUniqueId());
408                 return Either.right(DaoStatusConverter.convertJanusGraphStatusToStorageStatus(getOutgoingRelation.right().value()));
409             }
410             Edge edge = getOutgoingRelation.left().value();
411             if (edge == null) {
412                 log.debug("Failed to get heat parameter value outgoing relation from graph. id = {}", heatParameterValue.getUniqueId());
413                 return Either.right(StorageOperationStatus.GENERAL_ERROR);
414             }
415             edge.remove();
416
417             Either<HeatParameterValueData, JanusGraphOperationStatus> deleteNode = janusGraphGenericDao
418                 .deleteNode(heatParameterValue, HeatParameterValueData.class);
419             if (deleteNode.isRight()) {
420                 log.debug("Failed to delete heat parameter value on graph. id = {}", heatParameterValue.getUniqueId());
421                 return Either.right(DaoStatusConverter.convertJanusGraphStatusToStorageStatus(deleteNode.right().value()));
422             }
423             return Either.left(deleteNode.left().value());
424         }
425         heatParameterValue.setValue(heatParam.getCurrentValue());
426         Either<HeatParameterValueData, JanusGraphOperationStatus> updateNode = janusGraphGenericDao
427             .updateNode(heatParameterValue, HeatParameterValueData.class);
428         if (updateNode.isRight()) {
429             log.debug("Failed to update heat parameter value in graph. id = {}", heatParameterValue.getUniqueId());
430             return Either.right(DaoStatusConverter.convertJanusGraphStatusToStorageStatus(updateNode.right().value()));
431         }
432         return Either.left(updateNode.left().value());
433     }
434
435     public Either<HeatParameterValueData, StorageOperationStatus> createHeatParameterValue(HeatParameterDefinition heatParam, String artifactId, String resourceInstanceId, String artifactLabel) {
436
437         Either<HeatParameterValueData, JanusGraphOperationStatus> addHeatValueToGraph = addHeatValueToGraph(heatParam, artifactLabel, artifactId, resourceInstanceId);
438         if (addHeatValueToGraph.isRight()) {
439             log.debug("Failed to create heat parameters value on graph for artifact {}", artifactId);
440             return Either.right(DaoStatusConverter.convertJanusGraphStatusToStorageStatus(addHeatValueToGraph.right().value()));
441         }
442         return Either.left(addHeatValueToGraph.left().value());
443     }
444
445     public Either<HeatParameterValueData, JanusGraphOperationStatus> addHeatValueToGraph(HeatParameterDefinition heatParameter, String artifactLabel, String artifactId, String resourceInstanceId) {
446
447         UniqueIdData heatEnvNode = new UniqueIdData(NodeTypeEnum.ArtifactRef, artifactId);
448         HeatParameterValueData heatValueData = new HeatParameterValueData();
449         heatValueData.setUniqueId(UniqueIdBuilder.buildHeatParameterValueUniqueId(resourceInstanceId, artifactLabel, heatParameter.getName()));
450         heatValueData.setValue(heatParameter.getCurrentValue());
451
452         log.debug("Before adding property to graph {}", heatValueData);
453         Either<HeatParameterValueData, JanusGraphOperationStatus> createNodeResult = janusGraphGenericDao
454             .createNode(heatValueData, HeatParameterValueData.class);
455         log.debug("After adding property to graph {}", heatValueData);
456         if (createNodeResult.isRight()) {
457             JanusGraphOperationStatus operationStatus = createNodeResult.right().value();
458             log.error("Failed to add heat value {} to graph. status is {}", heatValueData.getUniqueId(), operationStatus);
459             return Either.right(operationStatus);
460         }
461
462         Map<String, Object> props = new HashMap<>();
463         props.put(GraphPropertiesDictionary.NAME.getProperty(), heatParameter.getName());
464         Either<GraphRelation, JanusGraphOperationStatus> createRelResult = janusGraphGenericDao
465             .createRelation(heatEnvNode, heatValueData, GraphEdgeLabels.PARAMETER_VALUE, props);
466         if (createRelResult.isRight()) {
467             JanusGraphOperationStatus operationStatus = createRelResult.right().value();
468             log.error("Failed to associate heat value {} to heat env artifact {} in graph. status is {}", heatValueData.getUniqueId(), artifactId, operationStatus);
469             return Either.right(operationStatus);
470         }
471         UniqueIdData heatParameterNode = new UniqueIdData(NodeTypeEnum.HeatParameter, heatParameter.getUniqueId());
472         Either<GraphRelation, JanusGraphOperationStatus> createRel2Result = janusGraphGenericDao
473             .createRelation(heatValueData, heatParameterNode, GraphEdgeLabels.PARAMETER_IMPL, null);
474         if (createRel2Result.isRight()) {
475             JanusGraphOperationStatus operationStatus = createRel2Result.right().value();
476             log.error("Failed to associate heat value {} to heat parameter {} in graph. status is {}", heatValueData.getUniqueId(), heatParameter.getName(), operationStatus);
477             return Either.right(operationStatus);
478         }
479
480         return Either.left(createNodeResult.left().value());
481
482     }
483
484 }