Lines Matching defs:json
3 import json as _json
172 def tool(name, args, json=None, ns=None, host=None):
174 if json:
175 cmd_str += '--json '
178 if json:
183 def bpftool(args, json=None, ns=None, host=None):
184 return tool('bpftool', args, json=json, ns=ns, host=host)
187 def ip(args, json=None, ns=None, host=None):
190 return tool('ip', args, json=json, host=host)
193 def ethtool(args, json=None, ns=None, host=None):
194 return tool('ethtool', args, json=json, ns=ns, host=host)
197 def bpftrace(expr, json=None, ns=None, host=None, timeout=None):
199 Run bpftrace and return map data (if json=True).
208 # Throw in --quiet if json, otherwise the output has two objects
209 if json:
210 cmd_arr += ['-f', 'json', '-q']
215 if json: