Commissioning Failure
Updated Template Failed to Upload
Status code: { await response.status }: { response.statusText }
Response Text: { await response.text() }
);
}
},
updateTemplate: async (userAddedCommonPropValues, fullToscaTemplate) => {
const nodeTemplates = fullToscaTemplate.topology_template.node_templates
const commonPropertyDataEntries = Object.entries(userAddedCommonPropValues)
// This replaces the values for properties in the full tosca template
// that will be sent up to the api with the entries the user provided.
commonPropertyDataEntries.forEach(([templateKey, values]) => {
Object.entries(values).forEach(([propKey, propVal]) => {
nodeTemplates[templateKey].properties[propKey] = propVal
})
})
fullToscaTemplate.topology_template.node_templates = nodeTemplates
alert('Changes saved. Commission When Ready...')
return fullToscaTemplate
}
}
export default CommissioningUtils;