feat(inventory): rename inventory to scan-inventory

This commit is contained in:
pedrooot
2024-10-01 13:57:52 -06:00
parent c5929efc99
commit 2b51cf8fca
6 changed files with 9 additions and 6 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ Prowler allows you to execute a quick inventory to extract the number of resourc
Currently, it is only available for AWS provider.
- You can use option `-i`/`--inventory` to execute it:
- You can use option `-i`/`--scan-inventory` to execute it:
```sh
prowler <provider> -i
```
+1 -1
View File
@@ -684,7 +684,7 @@ def prowler():
remove_custom_checks_module(checks_folder, provider)
# Run the quick inventory for the provider if available
if hasattr(args, "inventory") and args.inventory:
if hasattr(args, "scan_inventory") and args.scan_inventory:
run_prowler_inventory(checks_to_execute, args.provider)
sys.exit()
+4 -2
View File
@@ -380,9 +380,11 @@ Detailed documentation at https://docs.prowler.com
)
def __init_inventory_parser__(self):
inventory_parser = self.common_providers_parser.add_argument_group("Inventory")
inventory_parser = self.common_providers_parser.add_argument_group(
"ScanInventory"
)
inventory_parser.add_argument(
"--inventory",
"--scan-inventory",
action="store_true",
help="Run Prowler in inventory mode",
)
@@ -95,7 +95,7 @@ def init_parser(self):
# AWS Quick Inventory
aws_quick_inventory_subparser = aws_parser.add_argument_group("Inventory")
aws_quick_inventory_subparser.add_argument(
"--inventory",
"--scan-inventory",
"-i",
action="store_true",
help="Run Prowler Inventory. The inventory will be stored in an output json file.",
+1
View File
@@ -10,6 +10,7 @@ from tqdm import tqdm
def run_prowler_inventory(checks_to_execute, provider):
print(f"\nRunning scan inventory for {provider}")
output_folder_path = f"./output/inventory/{provider}"
meta_json_file = {}
+1 -1
View File
@@ -974,7 +974,7 @@ class Test_Parser:
assert parsed.quick_inventory
def test_aws_parser_quick_inventory_long(self):
argument = "--inventory"
argument = "--scan-inventory"
command = [prowler_command, argument]
parsed = self.parser.parse(command)
assert parsed.quick_inventory