mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-19 00:17:51 +02:00
formatting and doc update
This commit is contained in:
@ -25,7 +25,7 @@ Schema:
|
|||||||
"filesystem": string,
|
"filesystem": string,
|
||||||
"mount_point": string,
|
"mount_point": string,
|
||||||
"type": string,
|
"type": string,
|
||||||
"access": [
|
"options": [
|
||||||
string
|
string
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -39,7 +39,7 @@ Example:
|
|||||||
"filesystem": "sysfs",
|
"filesystem": "sysfs",
|
||||||
"mount_point": "/sys",
|
"mount_point": "/sys",
|
||||||
"type": "sysfs",
|
"type": "sysfs",
|
||||||
"access": [
|
"options": [
|
||||||
"rw",
|
"rw",
|
||||||
"nosuid",
|
"nosuid",
|
||||||
"nodev",
|
"nodev",
|
||||||
@ -51,7 +51,7 @@ Example:
|
|||||||
"filesystem": "proc",
|
"filesystem": "proc",
|
||||||
"mount_point": "/proc",
|
"mount_point": "/proc",
|
||||||
"type": "proc",
|
"type": "proc",
|
||||||
"access": [
|
"options": [
|
||||||
"rw",
|
"rw",
|
||||||
"nosuid",
|
"nosuid",
|
||||||
"nodev",
|
"nodev",
|
||||||
@ -63,7 +63,7 @@ Example:
|
|||||||
"filesystem": "udev",
|
"filesystem": "udev",
|
||||||
"mount_point": "/dev",
|
"mount_point": "/dev",
|
||||||
"type": "devtmpfs",
|
"type": "devtmpfs",
|
||||||
"access": [
|
"options": [
|
||||||
"rw",
|
"rw",
|
||||||
"nosuid",
|
"nosuid",
|
||||||
"relatime",
|
"relatime",
|
||||||
@ -96,6 +96,6 @@ Returns:
|
|||||||
List of Dictionaries. Raw or processed structured data.
|
List of Dictionaries. Raw or processed structured data.
|
||||||
|
|
||||||
### Parser Information
|
### Parser Information
|
||||||
Compatibility: linux, darwin, freebsd
|
Compatibility: linux, darwin, freebsd, aix
|
||||||
|
|
||||||
Version 1.7 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
Version 1.8 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||||
|
@ -20,7 +20,7 @@ Schema:
|
|||||||
"filesystem": string,
|
"filesystem": string,
|
||||||
"mount_point": string,
|
"mount_point": string,
|
||||||
"type": string,
|
"type": string,
|
||||||
"access": [
|
"options": [
|
||||||
string
|
string
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -34,7 +34,7 @@ Example:
|
|||||||
"filesystem": "sysfs",
|
"filesystem": "sysfs",
|
||||||
"mount_point": "/sys",
|
"mount_point": "/sys",
|
||||||
"type": "sysfs",
|
"type": "sysfs",
|
||||||
"access": [
|
"options": [
|
||||||
"rw",
|
"rw",
|
||||||
"nosuid",
|
"nosuid",
|
||||||
"nodev",
|
"nodev",
|
||||||
@ -46,7 +46,7 @@ Example:
|
|||||||
"filesystem": "proc",
|
"filesystem": "proc",
|
||||||
"mount_point": "/proc",
|
"mount_point": "/proc",
|
||||||
"type": "proc",
|
"type": "proc",
|
||||||
"access": [
|
"options": [
|
||||||
"rw",
|
"rw",
|
||||||
"nosuid",
|
"nosuid",
|
||||||
"nodev",
|
"nodev",
|
||||||
@ -58,7 +58,7 @@ Example:
|
|||||||
"filesystem": "udev",
|
"filesystem": "udev",
|
||||||
"mount_point": "/dev",
|
"mount_point": "/dev",
|
||||||
"type": "devtmpfs",
|
"type": "devtmpfs",
|
||||||
"access": [
|
"options": [
|
||||||
"rw",
|
"rw",
|
||||||
"nosuid",
|
"nosuid",
|
||||||
"relatime",
|
"relatime",
|
||||||
@ -75,7 +75,7 @@ import jc.utils
|
|||||||
|
|
||||||
class info():
|
class info():
|
||||||
"""Provides parser metadata (version, author, etc.)"""
|
"""Provides parser metadata (version, author, etc.)"""
|
||||||
version = '1.7'
|
version = '1.8'
|
||||||
description = '`mount` command parser'
|
description = '`mount` command parser'
|
||||||
author = 'Kelly Brazil'
|
author = 'Kelly Brazil'
|
||||||
author_email = 'kellyjonbrazil@gmail.com'
|
author_email = 'kellyjonbrazil@gmail.com'
|
||||||
@ -138,10 +138,7 @@ def _linux_parse(data):
|
|||||||
output_line['filesystem'] = parsed_line[0]
|
output_line['filesystem'] = parsed_line[0]
|
||||||
output_line['mount_point'] = parsed_line[2]
|
output_line['mount_point'] = parsed_line[2]
|
||||||
output_line['type'] = parsed_line[4]
|
output_line['type'] = parsed_line[4]
|
||||||
|
output_line['options'] = parsed_line[5].lstrip('(').rstrip(')').split(',')
|
||||||
options = parsed_line[5].lstrip('(').rstrip(')').split(',')
|
|
||||||
|
|
||||||
output_line['options'] = options
|
|
||||||
|
|
||||||
output.append(output_line)
|
output.append(output_line)
|
||||||
|
|
||||||
@ -172,11 +169,7 @@ def _aix_parse(data):
|
|||||||
output_line['filesystem'] = parsed_line[0]
|
output_line['filesystem'] = parsed_line[0]
|
||||||
output_line['mount_point'] = parsed_line[1]
|
output_line['mount_point'] = parsed_line[1]
|
||||||
output_line['type'] = parsed_line[2]
|
output_line['type'] = parsed_line[2]
|
||||||
|
output_line['options'] = parsed_line[6].lstrip('(').rstrip(')').split(',')
|
||||||
# options = {}
|
|
||||||
options = parsed_line[6].lstrip('(').rstrip(')').split(',')
|
|
||||||
|
|
||||||
output_line['options'] = options
|
|
||||||
|
|
||||||
output.append(output_line)
|
output.append(output_line)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user