1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-19 00:17:51 +02:00

add info class

This commit is contained in:
Kelly Brazil
2019-12-13 20:01:51 -08:00
parent 17b6f3f6d6
commit fe9bdd4811
31 changed files with 384 additions and 219 deletions

View File

@ -133,6 +133,16 @@ Examples:
import jc.utils
class info():
version = '1.1'
description = 'iptables parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
# compatible options: linux, darwin, cygwin, win32, aix, freebsd
compatible = ['linux']
def process(proc_data):
"""
Final processing to conform to the schema.
@ -222,12 +232,8 @@ def parse(data, raw=False, quiet=False):
dictionary raw or processed structured data
"""
# compatible options: linux, darwin, cygwin, win32, aix, freebsd
compatible = ['linux']
if not quiet:
jc.utils.compatibility(__name__, compatible)
jc.utils.compatibility(__name__, info.compatible)
raw_output = []
chain = {}