Resolve "Plugin is created and persisted in the database even if the creation of a network element failed"
requested to merge 319-plugin-is-created-and-persisted-in-the-database-even-if-the-creation-of-a-network-element-failed into master
This MR handles the clean up of a started plugin if the network element creation failed.
Description
Currently we start and persist a plugin for each network element that is created. Therefore it is needed that the plugin is shut down and the corresponding files are removed if an error is thrown while a new network element is created.
For any instance in which an error could occur (if a network element is created), it is now ensured that the corresponding plugin (if already requested and started) is shut down and proberly removed.
Related Issue
Motivation and Context
There shouldn't be any idling plugins that are never used. But this was the case as soon as the creation of a network element fails.
Types of changes
-
Bug fix (non-breaking change which fixes an issue) -
New feature (non-breaking change which adds functionality) -
Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
-
My code follows the code style of this project. -
My change requires a change to the documentation. -
I have updated the documentation accordingly. -
I have read the CONTRIBUTING document. -
I have added tests to cover my changes. -
All new and existing tests passed.
Edited by Malte Bauch