diff options
Diffstat (limited to 'vid-webpack-master/src/app/shared/storeUtil/utils/vnf/vnf.actions.ts')
-rw-r--r-- | vid-webpack-master/src/app/shared/storeUtil/utils/vnf/vnf.actions.ts | 99 |
1 files changed, 99 insertions, 0 deletions
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<CreateVnfInstanceAction> = (vnfInstance, vnfModelName, serviceUuid, vnfStoreKey) => ({ + type: VNFActions.CREATE_VNF_INSTANCE, + vnfInstance: vnfInstance, + vnfModelName: vnfModelName, + serviceUuid: serviceUuid, + vnfStoreKey : vnfStoreKey +}); + + +export const updateVNFInstance: ActionCreator<UpdateVnfInstanceAction> = (vnfInstance, vnfModelName, serviceUuid, vnfStoreKey) => ({ + type: VNFActions.UPDATE_VNF_INSTANCE, + vnfInstance: vnfInstance, + vnfModelName: vnfModelName, + serviceUuid: serviceUuid, + vnfStoreKey : vnfStoreKey +}); + + +export const deleteActionVnfInstance: ActionCreator<DeleteActionVnfInstanceAction> = (vnfStoreKey, serviceId) => ({ + type: VNFActions.DELETE_ACTION_VNF_INSTANCE, + vnfStoreKey: vnfStoreKey, + serviceId: serviceId +}); + +export const undoDeleteActionVnfInstance: ActionCreator<UndoDeleteActionVnfInstanceAction> = (vnfStoreKey, serviceId) => ({ + type: VNFActions.UNDO_DELETE_ACTION_VNF_INSTANCE, + vnfStoreKey: vnfStoreKey, + serviceId: serviceId +}); + +export const removeVnfInstance: ActionCreator<RemoveVnfInstanceAction> = (vnfStoreKey, serviceId) => ({ + type: VNFActions.REMOVE_VNF_INSTANCE, + vnfStoreKey: vnfStoreKey, + serviceId: serviceId +}); + +export const updateVnfPosition: ActionCreator<UpdateVnfPosition> = (node, instanceId, vnfStoreKey) => ({ + type: VNFActions.UPDATE_VNF_POSITION, + node: node, + instanceId: instanceId, + vnfStoreKey : vnfStoreKey +}); + + + + + + + |