google.cloud.forseti.scanner.scanners.ke_version_scanner module

Scanner for the KE version rules engine.

class KeVersionScanner(global_configs, scanner_configs, service_config, model_name, snapshot_timestamp, rules)[source]

Bases: google.cloud.forseti.scanner.scanners.base_scanner.BaseScanner

Check if the version of running KE clusters and nodes are allowed.

_abc_cache = <_weakrefset.WeakSet object>
_abc_negative_cache = <_weakrefset.WeakSet object>
_abc_negative_cache_version = 186
_abc_registry = <_weakrefset.WeakSet object>
_find_violations(ke_clusters)[source]

Find violations in the policies.

Parameters:ke_clusters (list) – Clusters to find violations in.
Returns:All violations.
Return type:list
static _flatten_violations(violations)[source]

Flatten RuleViolations into a dict for each RuleViolation member.

Parameters:violations (list) – The RuleViolations to flatten.
Yields:dict – Iterator of RuleViolations as a dict per member.
_output_results(all_violations)[source]

Output results.

Parameters:all_violations (list) – All violations
_retrieve()[source]

Runs the data collection.

Returns:KE Cluster data.
Return type:list
run()[source]

Run, the entry point for this scanner.