aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/shared/storeUtil/utils/relatedVnfMember/relatedVnfMember.actions.ts
blob: faa7a52d318dc63d1dd0486ddc7bcda79eebd7a5 (plain)
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
import {Action, ActionCreator} from "redux";

export enum RelatedVnfActions {
  CREATE_RELATED_VNF_MEMBER_INSTANCE = "CREATE_RELATED_VNF_MEMBER_INSTANCE",
  REMOVE_RELATED_VNF_MEMBER_INSTANCE = "REMOVE_RELATED_VNF_MEMBER_INSTANCE",
  DELETE_ACTION_RELATED_VNF_MEMBER_INSTANCE = "DELETE_ACTION_RELATED_VNF_MEMBER_INSTANCE",
  UNDO_DELETE_ACTION_RELATED_VNF_MEMBER_INSTANCE = "UNDO_DELETE_ACTION_RELATED_VNF_MEMBER_INSTANCE"
}

export interface RemoveRelatedVnfMemebrInstance extends Action {
  vnfGroupStoreKey: string;
  relatedVnfMemeberStoreKey: string;
  serviceId?: string;
}

export interface DeleteRelatedVnfMemebrInstanceAction extends Action {
  vnfGroupStoreKey: string;
  relatedVnfMemeberStoreKey: string;
  serviceId?: string;
}

export interface DeleteActionRelatedVnfMemeberInstanceAction extends Action {
  vnfGroupStoreKey: string;
  relatedVnfMemeberStoreKey: string;
  serviceId?: string;
}

export interface UndoDeleteActionRelatedVnfMemeberInstanceAction extends Action {
  vnfGroupStoreKey: string;
  relatedVnfMemeberStoreKey: string;
  serviceId?: string;
}

export interface CreateRelatedVnfMemeberInstanceAction extends Action {
  relatedVnfMember: any;
  vnfGroupStoreKey: string;
  serviceId?: string;
}


export const removeRelatedVnfMemberInstance: ActionCreator<RemoveRelatedVnfMemebrInstance> = (vnfGroupStoreKey, relatedVnfMemeberStoreKey, serviceId) => ({
  type: RelatedVnfActions.REMOVE_RELATED_VNF_MEMBER_INSTANCE,
  vnfGroupStoreKey: vnfGroupStoreKey,
  relatedVnfMemeberStoreKey: relatedVnfMemeberStoreKey,
  serviceId: serviceId
});

export const deleteActionRelatedVnfMemberInstance: ActionCreator<DeleteActionRelatedVnfMemeberInstanceAction> = (vnfGroupStoreKey, relatedVnfMemeberStoreKey, serviceId) => ({
  type: RelatedVnfActions.DELETE_ACTION_RELATED_VNF_MEMBER_INSTANCE,
  vnfGroupStoreKey: vnfGroupStoreKey,
  relatedVnfMemeberStoreKey: relatedVnfMemeberStoreKey,
  serviceId: serviceId
});

export const undoDeleteActionRelatedVnfMemberInstance: ActionCreator<UndoDeleteActionRelatedVnfMemeberInstanceAction> = (vnfGroupStoreKey, relatedVnfMemeberStoreKey, serviceId) => ({
  type: RelatedVnfActions.UNDO_DELETE_ACTION_RELATED_VNF_MEMBER_INSTANCE,
  vnfGroupStoreKey: vnfGroupStoreKey,
  relatedVnfMemeberStoreKey: relatedVnfMemeberStoreKey,
  serviceId: serviceId
});


export const createRelatedVnfMemberInstance: ActionCreator<CreateRelatedVnfMemeberInstanceAction> = (vnfGroupStoreKey, serviceId, relatedVnfMember) => ({
  type: RelatedVnfActions.CREATE_RELATED_VNF_MEMBER_INSTANCE,
  relatedVnfMember: relatedVnfMember,
  vnfGroupStoreKey: vnfGroupStoreKey,
  serviceId: serviceId
});