MCPcopy Create free account
hub / github.com/FDio/vpp / Apply

Method Apply

extras/packetforge/Edge.py:66–85  ·  view source on GitHub ↗
(self, first, second)

Source from the content-addressed store, hash-verified

64 return edgeList
65
66 def Apply(self, first, second):
67 exp = []
68
69 for i in range(len(self.actionList)):
70 act = self.actionList[i]
71
72 if act.FromStartObject == True:
73 exp.append(first.GetValue(act.FromExpression))
74 elif act.FromStartObject == False:
75 exp.append(second.GetValue(act.FromExpression))
76 else:
77 exp.append(act.FromExpression)
78
79 for i in range(len(exp)):
80 act = self.actionList[i]
81
82 if act.ToStartObject:
83 first.SetFieldAuto(act.ToExpression, exp[i])
84 else:
85 second.SetFieldAuto(act.ToExpression, exp[i])
86
87 def Actions(self):
88 return self.actionList

Callers 1

ForgeMethod · 0.80

Calls 3

appendMethod · 0.80
GetValueMethod · 0.80
SetFieldAutoMethod · 0.80

Tested by

no test coverage detected