MCPcopy Create free account
hub / github.com/F-Stack/f-stack / list_fp

Function list_fp

dpdk/usertools/dpdk-telemetry.py:88–102  ·  view source on GitHub ↗

List all available file-prefixes to user

()

Source from the content-addressed store, hash-verified

86
87
88def list_fp():
89 """ List all available file-prefixes to user """
90 path = get_dpdk_runtime_dir('')
91 sockets = glob.glob(os.path.join(path, "*", SOCKET_NAME + "*"))
92 prefixes = []
93 if not sockets:
94 print("No DPDK apps with telemetry enabled available")
95 else:
96 print("Valid file-prefixes:\n")
97 for s in sockets:
98 prefixes.append(os.path.relpath(os.path.dirname(s), start=path))
99 for p in sorted(set(prefixes)):
100 print(p)
101 print_socket_options(p, glob.glob(os.path.join(path, p,
102 SOCKET_NAME + "*")))
103
104
105def handle_socket(args, path):

Callers 2

handle_socketFunction · 0.85
dpdk-telemetry.pyFile · 0.85

Calls 4

print_socket_optionsFunction · 0.85
get_dpdk_runtime_dirFunction · 0.70
printFunction · 0.50
setFunction · 0.50

Tested by

no test coverage detected