Documentation
¶
Index ¶
- func AccessList(c *gin.Context)
- func ActivityStream(c *gin.Context)
- func AddJTemplate(c *gin.Context)
- func GetJTemplate(c *gin.Context)
- func GetJTemplates(c *gin.Context)
- func Jobs(c *gin.Context)
- func Launch(c *gin.Context)
- func LaunchInfo(c *gin.Context)
- func Middleware(c *gin.Context)
- func ObjectRoles(c *gin.Context)
- func PatchJTemplate(c *gin.Context)
- func RemoveJTemplate(c *gin.Context)
- func UpdateJTemplate(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccessList ¶
func ActivityStream ¶
ActivityStream returns serialized list of Activity models associated with the Job Template Resulting data structure contains:
{ "count\": 99, "next\": null, "previous\": null, "results\": [ ... ] }
The `count` field indicates the total number of activity streams found for the given query. The `next` and `previous` fields provides links to additional results if there are more than will fit on a single page. The `results` list contains zero or more activity stream records. success returns 200 status code failure reruns 500 status code
func AddJTemplate ¶
AddJTemplate creates a new Job Template fields to create a new job template: name: Name of this job template. string, required description: Optional description of this job template. string, default="" job_type: choice
- `run: Run default
- `check: Check
- `scan: Scan
inventory: bson.ObjectId, default=nil project: bson.ObjectId, default=nil playbook: string, default="" credential: bson.ObjectId, default=nil cloud_credential: bson.ObjectId, default=nil network_credential: bson.ObjectId, default=nil forks: integer, default=0 limit: string, default="" verbosity: choice
- 0: 0 Normal default
- 1: 1 Verbose
- 2: 2 More Verbose
- 3: 3 Debug
- 4: 4 Connection Debug
- 5: 5 WinRM Debug
extra_vars: string, default="" job_tags: string, default="" force_handlers: boolean, default=False skip_tags: string, default="" start_at_task: string, default="" host_config_key: string, default="" ask_variables_on_launch: boolean, default=False ask_limit_on_launch: boolean, default=False ask_tags_on_launch: boolean, default=False ask_skip_tags_on_launch: boolean, default=False ask_job_type_on_launch: boolean, default=False ask_inventory_on_launch: boolean, default=False ask_credential_on_launch: boolean, default=False become_enabled: boolean, default=False allow_simultaneous: boolean, default=False
func GetJTemplate ¶
GetJTemplate returns a single Job Template as serialized JSON A success will return 200 status code A failure will return 500 status code
func GetJTemplates ¶
GetJTemplates returns Job Templates as a serialized JSON The resulting data structure contains:
{ "count\": 99, "next\": null, "previous\": null, "results\": [ ... ]
The `count` field indicates the total number of job templates found for the given query. The `next` and `previous` fields provides links to additional results if there are more than will fit on a single page. The `results` list contains zero or more job template records. A success returns 200 status code A failure returns 500 status code
func Jobs ¶
Jobs returns list of jobs associated with the Job Template Resulting data structure contains:
{ "count\": 99, "next\": null, "previous\": null, "results\": [ ... ] }
The `count` field indicates the total number of jobs found for the given query. The `next` and `previous` fields provides links to additional results if there are more than will fit on a single page. The `results` list contains zero or more job records.
func Launch ¶
Launch creates a new job and adds the job into job queue. If any passwords, inventory, or extra variables (extra_vars) are required, they must be passed via POST data, with extra_vars given as a JSON string. If `credential_needed_to_start` is `true` then the `credential` field is required and if the `inventory_needed_to_start` is `True` then the `inventory` is required as well. success returns JSON serialized Job model with 201 status code if the request body is invalid returns JSON serialized Error model with 400 status code
func LaunchInfo ¶
LaunchInfo returns JSON serialized launch information to determine if the job_template can be launched and whether any passwords are required to launch the job_template.
ask_variables_on_launch: Flag indicating whether the job template is configured to prompt for variables upon launch ask_tags_on_launch: Flag indicating whether the job template is configured to prompt for tags upon launch ask_skip_tags_on_launch: Flag indicating whether the job template is configured to prompt for skip_tags upon launch ask_job_type_on_launch: Flag indicating whether the job template is configured to prompt for job_type upon launch ask_limit_on_launch: Flag indicating whether the job template is configured to prompt for limit upon launch ask_inventory_on_launch: Flag indicating whether the job template is configured to prompt for inventory upon launch ask_credential_on_launch: Flag indicating whether the job template is configured to prompt for credential upon launch can_start_without_user_input: Flag indicating if the job template can be launched without user-input variables_needed_to_start: Required variable names required to launch the job_template credential_needed_to_start: Flag indicating the presence of a credential associated with the job template. If not then one should be supplied when launching the job inventory_needed_to_start: Flag indicating the presence of an inventory associated with the job template. If not then one should be supplied when launching the job
func Middleware ¶
Middleware is the middleware for job templates. Which takes _CTX_JOB_TEMPLATE_ID parameter form the request, fetches the Job Template and set it under key _CTX_JOB_TEMPLATE in gin.Context
func ObjectRoles ¶
func PatchJTemplate ¶
PatchJTemplate updates the Job Template and returns updated JSON serialized Job Template patch will only update feilds which included in the POST body A success returns 200 status code A failure returns 500 status code if the request body is invalid returns serialized Error model with 400 status code
func RemoveJTemplate ¶
RemoveJTemplate removes the Job Template from the db.DBC_JOB_TEMPLATES collection A success returns 204 status code A failure returns 500 status code
func UpdateJTemplate ¶
UpdateJTemplate updates the Job Template and returns updated JSON serialized Job Template A success returns 200 status code A failure returns 500 status code if the request body is invalid returns serialized Error model with 400 status code
Types ¶
This section is empty.