Creation of Multiple service templates was possible all along. The code allowed to define a unique name and version to create and store multiple tosca service templates in the DB. The issue comes from handling the data that has been created with a unique name and version instead of the default one.
You can currently remove the default concept by calling the public deleteServiceTemplate(PfDao dao, String name, String version) method in the AuthorativeToscaProvider class. The given concept name and concept version are ignored and replaced with the default name and version. There is no additional verification of the relationship between the concepts.
This makes it hard to delete uniquely named tosca service templates using rest methods, and can only interact with them using a DB.
we should modify AuthorativeToscaProvider to allow interaction with the created policy template.
The proposed change should:
- take into account the given name and version
- check if the concept with the given name and version has no child concepts
- check if the given name and concept version is not listed as a parent for other concepts
- check if the concept is not deployed.