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

Function ParsePattern

extras/packetforge/packetforge.py:197–208  ·  view source on GitHub ↗
(pattern)

Source from the content-addressed store, hash-verified

195
196
197def ParsePattern(pattern):
198 # create json template
199 json_tmp = {"type": "path", "stack": []}
200
201 items = pattern.split("/")
202 for item in items:
203 stack = ParseFields(item)
204 if stack == None:
205 return None
206 json_tmp["stack"].append(stack)
207
208 return json_tmp

Callers 1

ForgeFunction · 0.85

Calls 2

ParseFieldsFunction · 0.85
appendMethod · 0.80

Tested by

no test coverage detected