Ajout detail usage commandes import/export acl
This commit is contained in:
parent
3855386c65
commit
3183b0c40f
@ -43,7 +43,16 @@ def extract_acls(vmid_min, vmid_max, output_file, remove_acl=False, append=False
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
if len(sys.argv) < 4:
|
if len(sys.argv) < 4:
|
||||||
print(f"Usage: {sys.argv[0]} <vmid_min> <vmid_max> <output_file> --remove --append")
|
print(f"Usage: {sys.argv[0]} <vmid_min> <vmid_max> <output_file> [--remove] [--append]")
|
||||||
|
print("""
|
||||||
|
Arguments:
|
||||||
|
vmid_min - Minimum VMID to extract ACLs from
|
||||||
|
vmid_max - Maximum VMID to extract ACLs from
|
||||||
|
output_file - File to save the extracted ACLs to
|
||||||
|
|
||||||
|
Options (order doesn't matter but must be after the arguments):
|
||||||
|
--remove - Remove the ACLs after extracting them
|
||||||
|
--append - Append to the output file instead of overwriting it""")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
vmid_min = int(sys.argv[1])
|
vmid_min = int(sys.argv[1])
|
@ -29,6 +29,14 @@ def import_acls(input_file):
|
|||||||
def main():
|
def main():
|
||||||
if len(sys.argv) != 2:
|
if len(sys.argv) != 2:
|
||||||
print(f"Usage: {sys.argv[0]} <input_file>")
|
print(f"Usage: {sys.argv[0]} <input_file>")
|
||||||
|
print("""
|
||||||
|
Arguments:
|
||||||
|
input_file - File containing ACLs to import
|
||||||
|
|
||||||
|
Input file format:
|
||||||
|
<acl-path> <user>@<realm> <role>
|
||||||
|
<acl-path> <user>@<realm> <role>
|
||||||
|
...""")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
input_file = sys.argv[1]
|
input_file = sys.argv[1]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user