diff options
author | 2018-08-29 17:01:32 +0300 | |
---|---|---|
committer | 2019-02-18 18:35:30 +0200 | |
commit | 6f900cc45d7dd7f97430812b86b5c1d1693c8ae3 (patch) | |
tree | 936005c364dc5a7264d6304d4777c3d83494db22 /vid-webpack-master/src/app/shared/storeUtil/utils/vnf/vnf.actions.ts | |
parent | 67d99f816cc583643c35193197594cf78d8ce60a (diff) |
merge from ecomp a88f0072 - Modern UI
Issue-ID: VID-378
Change-Id: Ibcb23dd27f550cf32ce2fe0239f0f496ae014ff6
Signed-off-by: Ittay Stern <ittay.stern@att.com>
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 +}); + + + + + + + |