mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-07-13 01:20:24 +02:00
change 'group_list' to 'members'
This commit is contained in:
@ -17,19 +17,19 @@ Examples:
|
|||||||
"group_name": "nobody",
|
"group_name": "nobody",
|
||||||
"password": "*",
|
"password": "*",
|
||||||
"gid": -2,
|
"gid": -2,
|
||||||
"group_list": []
|
"members": []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"group_name": "nogroup",
|
"group_name": "nogroup",
|
||||||
"password": "*",
|
"password": "*",
|
||||||
"gid": -1,
|
"gid": -1,
|
||||||
"group_list": []
|
"members": []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"group_name": "wheel",
|
"group_name": "wheel",
|
||||||
"password": "*",
|
"password": "*",
|
||||||
"gid": 0,
|
"gid": 0,
|
||||||
"group_list": [
|
"members": [
|
||||||
"root"
|
"root"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -37,7 +37,7 @@ Examples:
|
|||||||
"group_name": "certusers",
|
"group_name": "certusers",
|
||||||
"password": "*",
|
"password": "*",
|
||||||
"gid": 29,
|
"gid": 29,
|
||||||
"group_list": [
|
"members": [
|
||||||
"root",
|
"root",
|
||||||
"_jabber",
|
"_jabber",
|
||||||
"_postfix",
|
"_postfix",
|
||||||
@ -55,7 +55,7 @@ Examples:
|
|||||||
"group_name": "nobody",
|
"group_name": "nobody",
|
||||||
"password": "*",
|
"password": "*",
|
||||||
"gid": "-2",
|
"gid": "-2",
|
||||||
"group_list": [
|
"members": [
|
||||||
""
|
""
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -63,7 +63,7 @@ Examples:
|
|||||||
"group_name": "nogroup",
|
"group_name": "nogroup",
|
||||||
"password": "*",
|
"password": "*",
|
||||||
"gid": "-1",
|
"gid": "-1",
|
||||||
"group_list": [
|
"members": [
|
||||||
""
|
""
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -71,7 +71,7 @@ Examples:
|
|||||||
"group_name": "wheel",
|
"group_name": "wheel",
|
||||||
"password": "*",
|
"password": "*",
|
||||||
"gid": "0",
|
"gid": "0",
|
||||||
"group_list": [
|
"members": [
|
||||||
"root"
|
"root"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -79,7 +79,7 @@ Examples:
|
|||||||
"group_name": "certusers",
|
"group_name": "certusers",
|
||||||
"password": "*",
|
"password": "*",
|
||||||
"gid": "29",
|
"gid": "29",
|
||||||
"group_list": [
|
"members": [
|
||||||
"root",
|
"root",
|
||||||
"_jabber",
|
"_jabber",
|
||||||
"_postfix",
|
"_postfix",
|
||||||
@ -116,7 +116,7 @@ Returns:
|
|||||||
"group_name": string,
|
"group_name": string,
|
||||||
"password": string,
|
"password": string,
|
||||||
"gid": integer,
|
"gid": integer,
|
||||||
"group_list": [
|
"members": [
|
||||||
string
|
string
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -16,19 +16,19 @@ Examples:
|
|||||||
"group_name": "nobody",
|
"group_name": "nobody",
|
||||||
"password": "*",
|
"password": "*",
|
||||||
"gid": -2,
|
"gid": -2,
|
||||||
"group_list": []
|
"members": []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"group_name": "nogroup",
|
"group_name": "nogroup",
|
||||||
"password": "*",
|
"password": "*",
|
||||||
"gid": -1,
|
"gid": -1,
|
||||||
"group_list": []
|
"members": []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"group_name": "wheel",
|
"group_name": "wheel",
|
||||||
"password": "*",
|
"password": "*",
|
||||||
"gid": 0,
|
"gid": 0,
|
||||||
"group_list": [
|
"members": [
|
||||||
"root"
|
"root"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -36,7 +36,7 @@ Examples:
|
|||||||
"group_name": "certusers",
|
"group_name": "certusers",
|
||||||
"password": "*",
|
"password": "*",
|
||||||
"gid": 29,
|
"gid": 29,
|
||||||
"group_list": [
|
"members": [
|
||||||
"root",
|
"root",
|
||||||
"_jabber",
|
"_jabber",
|
||||||
"_postfix",
|
"_postfix",
|
||||||
@ -54,7 +54,7 @@ Examples:
|
|||||||
"group_name": "nobody",
|
"group_name": "nobody",
|
||||||
"password": "*",
|
"password": "*",
|
||||||
"gid": "-2",
|
"gid": "-2",
|
||||||
"group_list": [
|
"members": [
|
||||||
""
|
""
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -62,7 +62,7 @@ Examples:
|
|||||||
"group_name": "nogroup",
|
"group_name": "nogroup",
|
||||||
"password": "*",
|
"password": "*",
|
||||||
"gid": "-1",
|
"gid": "-1",
|
||||||
"group_list": [
|
"members": [
|
||||||
""
|
""
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -70,7 +70,7 @@ Examples:
|
|||||||
"group_name": "wheel",
|
"group_name": "wheel",
|
||||||
"password": "*",
|
"password": "*",
|
||||||
"gid": "0",
|
"gid": "0",
|
||||||
"group_list": [
|
"members": [
|
||||||
"root"
|
"root"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -78,7 +78,7 @@ Examples:
|
|||||||
"group_name": "certusers",
|
"group_name": "certusers",
|
||||||
"password": "*",
|
"password": "*",
|
||||||
"gid": "29",
|
"gid": "29",
|
||||||
"group_list": [
|
"members": [
|
||||||
"root",
|
"root",
|
||||||
"_jabber",
|
"_jabber",
|
||||||
"_postfix",
|
"_postfix",
|
||||||
@ -124,7 +124,7 @@ def process(proc_data):
|
|||||||
"group_name": string,
|
"group_name": string,
|
||||||
"password": string,
|
"password": string,
|
||||||
"gid": integer,
|
"gid": integer,
|
||||||
"group_list": [
|
"members": [
|
||||||
string
|
string
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -140,8 +140,8 @@ def process(proc_data):
|
|||||||
except (ValueError):
|
except (ValueError):
|
||||||
entry[key] = None
|
entry[key] = None
|
||||||
|
|
||||||
if entry['group_list'] == ['']:
|
if entry['members'] == ['']:
|
||||||
entry['group_list'] = []
|
entry['members'] = []
|
||||||
|
|
||||||
return proc_data
|
return proc_data
|
||||||
|
|
||||||
@ -180,7 +180,7 @@ def parse(data, raw=False, quiet=False):
|
|||||||
output_line['group_name'] = fields[0]
|
output_line['group_name'] = fields[0]
|
||||||
output_line['password'] = fields[1]
|
output_line['password'] = fields[1]
|
||||||
output_line['gid'] = fields[2]
|
output_line['gid'] = fields[2]
|
||||||
output_line['group_list'] = fields[3].split(',')
|
output_line['members'] = fields[3].split(',')
|
||||||
|
|
||||||
raw_output.append(output_line)
|
raw_output.append(output_line)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user