Enterprise Prototypes

Sourcing Prototype (scan)

class tgt_grease.enterprise.Prototype.Scan.Scanner

Bases: tgt_grease.core.Types.Command.Command

The Scan Command

This class is the ingestion of information for GREASE. It utilizes configurations to ‘wire’ scanners together

execute(context)

Execute method of the scanner prototype

Parameters:context (dict) – Command Context

Note

This method normally will never return. As it is a prototype. So it should continue into infinity

Returns:True always unless failures occur
Return type:bool
help = "\n This command scans the environment via the node configuration. This enables GREASE to 'see' its' environment and \n schedule jobs a detection node\n \n Args:\n --loop:<int>\n How many scans you would like to go through\n --config:<filename>\n The specific config file you want to parse\n --source:<source>\n The specific source to parse all configs of\n --foreground\n Print Log messages to foreground\n "
purpose = 'Parse the configured environment for data and schedule de-duplicated data for detection'

Detection Prototype (detect)

class tgt_grease.enterprise.Prototype.Detect.Detection(Logger=None)

Bases: tgt_grease.core.Types.Command.Command

The detect command

This class is the source detection for GREASE. It utilizes the logic block of your configurations to determine if a job needs to be run

execute(context)

Execute method of the detection prototype

Parameters:context (dict) – Command Context

Note

This method normally will never return. As it is a prototype. So it should continue into infinity

Returns:True always unless failures occur
Return type:bool
help = '\n This command detects possible jobs from the scan command\n \n Args:\n --loop:<int>\n How many detection cycles to do\n --foreground\n Print log messages to the foreground\n '
purpose = 'Detect sources from scan and schedule them for job scheduling'

Scheduling Prototype (schedule)

class tgt_grease.enterprise.Prototype.Schedule.Scheduling(Logger=None)

Bases: tgt_grease.core.Types.Command.Command

The schedule command

This class is the job scheduling for GREASE. It utilizes the job and exe_env (if provided) keys of your configurations to schedule jobs for execution

execute(context)

Execute method of the scheduling

Parameters:context (dict) – Command Context

Note

This method normally will never return. As it is a prototype. So it should continue into infinity

Returns:True always unless failures occur
Return type:bool
help = '\n This command schedules jobs for execution\n \n Args:\n --loop:<int>\n How many scheduling cycles to do\n --foreground\n Print log messages to the foreground\n '
purpose = 'Schedule detected Jobs for Execution'