mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-23 12:31:54 +00:00
feat(inventory): rename inventory to scan-inventory
This commit is contained in:
@@ -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
@@ -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()
|
||||
|
||||
|
||||
@@ -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.",
|
||||
|
||||
@@ -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 = {}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user