Scanner for the resource location rules engine.
LocationScanner
(global_configs, scanner_configs, service_config, model_name, snapshot_timestamp, rules)[source]¶Bases: google.cloud.forseti.scanner.scanners.base_scanner.BaseScanner
Scanner for resource locations.
_abc_cache
= <_weakrefset.WeakSet object>¶_abc_negative_cache
= <_weakrefset.WeakSet object>¶_abc_negative_cache_version
= 207¶_abc_registry
= <_weakrefset.WeakSet object>¶_find_violations
(resources)[source]¶Find location violations in the given resources.
Parameters: | resources (List[resource]) – resources to check for violations in. |
---|---|
Returns: | A list of all violations. |
Return type: | List[RuleViolation] |
_flatten_violations
(violations)[source]¶Flatten violations into a dict.
Parameters: | violations (List[RuleViolation]) – The violations to flatten. |
---|---|
Yields: | Iterator[dict] – flattened violations for each violation. |
_output_results
(all_violations)[source]¶Output results.
Parameters: | all_violations (List[RuleViolation]) – A list of resource location violations. |
---|