1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
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
});
|