From 6078a411ef612be8bad012aa404f34ebd74a1fd7 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Wed, 13 Oct 2021 11:07:09 -0600 Subject: [PATCH] add initial schema doc --- jc/parsers/lsusb.py | 83 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 79 insertions(+), 4 deletions(-) diff --git a/jc/parsers/lsusb.py b/jc/parsers/lsusb.py index 31e9d28b..5e8baac4 100644 --- a/jc/parsers/lsusb.py +++ b/jc/parsers/lsusb.py @@ -19,9 +19,84 @@ Schema: [ { - "lsusb": string, - "bar": boolean, - "baz": integer + "bus": string, + "device": string, + "id": string, + "description": string, + "device_descriptor": { + "attribute": { + "value": string, + "description": string + }, + "configuration_descriptor": { + "attribute": { + "value": string, + "description": string + }, + "interface_association": { + "value": string, + "description": string + }, + "interface_descriptors": [ + { + "attribute": { + "value": string, + "description": string + }, + "cdc_header": { + "attribute": { + "value": string, + "description": string + } + }, + "cdc_call_management": { + "attribute": { + "value": string, + "description": string + } + }, + "cdc_acm": { + "attribute": { + "value": string, + "description": string + } + }, + "cdc_union": { + "attribute": { + "value": string, + "description": string + } + }, + "endpoint_descriptors": [ + { + "attribute": { + "value": string, + "description": string + } + } + ] + } + ] + } + }, + "hub_descriptor": { + "attribute": { + "value": string, + "description": string + }, + "hub_port_status": { + "attribute": { + "value": string, + "description": string + } + } + }, + "device_status": { + "attribute": { + "value": string, + "description": string + } + } } ] @@ -35,7 +110,7 @@ Examples: """ import jc.utils from jc.parsers.universal import sparse_table_parse -from rich import print +# from rich import print class info():