google.cloud.forseti.services.server module

Forseti Server program.

check_args(args)[source]

Make sure the required args are present and valid.

The exit codes are arbitrary and just serve the purpose of facilitating distinction betweeen the various error cases.

Parameters:args (dict) – the command line args
Returns:2-tuple with an exit code and error message.
Return type:tuple
main()[source]

Run.

serve(endpoint, services, forseti_db_connect_string, config_file_path, log_level, enable_console_log, max_workers=32, wait_shutdown_secs=3)[source]

Instantiate the services and serves them via gRPC.

Parameters:
  • endpoint (str) – the server channel endpoint
  • services (list) – services to register on the server
  • forseti_db_connect_string (str) – Forseti database string
  • config_file_path (str) – Path to Forseti configuration file.
  • log_level (str) – Sets the threshold for Forseti’s logger.
  • enable_console_log (bool) – Enable console logging.
  • max_workers (int) – maximum number of workers for the crawler
  • wait_shutdown_secs (int) – seconds to wait before shutdown
Raises:

Exception – No services to start