From 6f900cc45d7dd7f97430812b86b5c1d1693c8ae3 Mon Sep 17 00:00:00 2001 From: Ittay Stern Date: Wed, 29 Aug 2018 17:01:32 +0300 Subject: merge from ecomp a88f0072 - Modern UI Issue-ID: VID-378 Change-Id: Ibcb23dd27f550cf32ce2fe0239f0f496ae014ff6 Signed-off-by: Ittay Stern --- .../app/shared/storeUtil/utils/vnf/vnf.actions.ts | 99 ++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 vid-webpack-master/src/app/shared/storeUtil/utils/vnf/vnf.actions.ts (limited to 'vid-webpack-master/src/app/shared/storeUtil/utils/vnf/vnf.actions.ts') diff --git a/vid-webpack-master/src/app/shared/storeUtil/utils/vnf/vnf.actions.ts b/vid-webpack-master/src/app/shared/storeUtil/utils/vnf/vnf.actions.ts new file mode 100644 index 000000000..b84284490 --- /dev/null +++ b/vid-webpack-master/src/app/shared/storeUtil/utils/vnf/vnf.actions.ts @@ -0,0 +1,99 @@ +import {Action, ActionCreator} from "redux"; +import {VnfInstance} from "../../../models/vnfInstance"; + +export enum VNFActions { + CREATE_VNF_INSTANCE = "CREATE_VNF_INSTANCE", + UPDATE_VNF_INSTANCE = "UPDATE_VNF_INSTANCE", + REMOVE_VNF_INSTANCE = "REMOVE_VNF_INSTANCE", + DELETE_ACTION_VNF_INSTANCE = "DELETE_VNF_INSTANCE", + UNDO_DELETE_ACTION_VNF_INSTANCE = "UNDO_DELETE_VNF_INSTANCE", + UPDATE_VNF_POSITION = "UPDATE_VNF_POISTION" +} + + +export interface CreateVnfInstanceAction extends Action { + vnfInstance?: VnfInstance; + vnfModelName?: string; + serviceUuid?: string; + vnfStoreKey?:string; +} + +export interface UpdateVnfPosition extends Action { + node: any, + instanceId : string, + vnfStoreKey?: string; +} + +export interface UpdateVnfInstanceAction extends Action { + vnfInstance?: VnfInstance; + vnfModelName?: string; + serviceUuid?: string; + vnfStoreKey?:string; +} + + + +export interface DeleteActionVnfInstanceAction extends Action { + vnfStoreKey: string; + serviceId?: string; +} + +export interface UndoDeleteActionVnfInstanceAction extends Action { + vnfStoreKey: string; + serviceId?: string; +} + +export interface RemoveVnfInstanceAction extends Action { + vnfStoreKey: string; + serviceId?: string; +} + +export const createVNFInstance: ActionCreator = (vnfInstance, vnfModelName, serviceUuid, vnfStoreKey) => ({ + type: VNFActions.CREATE_VNF_INSTANCE, + vnfInstance: vnfInstance, + vnfModelName: vnfModelName, + serviceUuid: serviceUuid, + vnfStoreKey : vnfStoreKey +}); + + +export const updateVNFInstance: ActionCreator = (vnfInstance, vnfModelName, serviceUuid, vnfStoreKey) => ({ + type: VNFActions.UPDATE_VNF_INSTANCE, + vnfInstance: vnfInstance, + vnfModelName: vnfModelName, + serviceUuid: serviceUuid, + vnfStoreKey : vnfStoreKey +}); + + +export const deleteActionVnfInstance: ActionCreator = (vnfStoreKey, serviceId) => ({ + type: VNFActions.DELETE_ACTION_VNF_INSTANCE, + vnfStoreKey: vnfStoreKey, + serviceId: serviceId +}); + +export const undoDeleteActionVnfInstance: ActionCreator = (vnfStoreKey, serviceId) => ({ + type: VNFActions.UNDO_DELETE_ACTION_VNF_INSTANCE, + vnfStoreKey: vnfStoreKey, + serviceId: serviceId +}); + +export const removeVnfInstance: ActionCreator = (vnfStoreKey, serviceId) => ({ + type: VNFActions.REMOVE_VNF_INSTANCE, + vnfStoreKey: vnfStoreKey, + serviceId: serviceId +}); + +export const updateVnfPosition: ActionCreator = (node, instanceId, vnfStoreKey) => ({ + type: VNFActions.UPDATE_VNF_POSITION, + node: node, + instanceId: instanceId, + vnfStoreKey : vnfStoreKey +}); + + + + + + + -- cgit 1.2.3-korg