/***********************************************************
* return vfModule model
- * @param vfModuleModelId - current Model id
- * @param instance
- * @param serviceHierarchy - serviceHierarchy
+ * @param instanceModel - The model of the instance (usually extracted from
+ * serviceHierarchy store)
************************************************************/
- getModel = (vfModuleModelId: string, instance, serviceHierarchy): Partial<VfModule> => {
- const model = this._sharedTreeService.modelByIdentifier(serviceHierarchy, this.name, vfModuleModelId);
- if (!_.isNil(model)) {
- return new VfModule(model, this._featureFlagsService.getAllFlags());
+ getModel = (instanceModel: any): Partial<VfModule> => {
+ if (!_.isNil(instanceModel)) {
+ return new VfModule(instanceModel, this._featureFlagsService.getAllFlags());
}
return {};
};
},
delete: {
method: (node, serviceModelId) => {
- this._store.dispatch(deleteActionVfModuleInstance(node.data.dynamicModelName, node.parent.data.vnfStoreKey, serviceModelId))
+ this._store.dispatch(deleteActionVfModuleInstance(node.data.dynamicModelName, node.parent.data.vnfStoreKey, serviceModelId, node.data.modelName))
},
visible: (node) => this._sharedTreeService.shouldShowDelete(node, serviceModelId),
enable: (node) => this._sharedTreeService.shouldShowDelete(node, serviceModelId)