BaseWmsService

class lsst.ctrl.bps.BaseWmsService(config)

Bases: object

Interface for interactions with a specific WMS.

Parameters
configBpsConfig

Configuration needed by the WMS service.

Methods Summary

cancel(wms_id[, pass_thru])

Cancel submitted workflows/jobs.

list_submitted_jobs([wms_id, user, …])

Query WMS for list of submitted WMS workflows/jobs.

prepare(config, generic_workflow[, out_prefix])

Create submission for a generic workflow for a specific WMS.

report([wms_workflow_id, user, hist, pass_thru])

Query WMS for status of submitted WMS workflows.

submit(workflow)

Submit a single WMS workflow

Methods Documentation

cancel(wms_id, pass_thru=None)

Cancel submitted workflows/jobs.

Parameters
wms_idstr

ID or path of job that should be canceled.

pass_thrustr, optional

Information to pass through to WMS.

Returns
deletedbool

Whether successful deletion or not. Currently, if any doubt or any individual jobs not deleted, return False.

messagestr

Any message from WMS (e.g., error details).

list_submitted_jobs(wms_id=None, user=None, require_bps=True, pass_thru=None)

Query WMS for list of submitted WMS workflows/jobs.

This should be a quick lookup function to create list of jobs for other functions.

Parameters
wms_idint or str, optional

Id or path that can be used by WMS service to look up job.

userstr, optional

User whose submitted jobs should be listed.

require_bpsbool, optional

Whether to require jobs returned in list to be bps-submitted jobs.

pass_thrustr, optional

Information to pass through to WMS.

Returns
job_idslist of Any

Only job ids to be used by cancel and other functions. Typically this means top-level jobs (i.e., not children jobs).

prepare(config, generic_workflow, out_prefix=None)

Create submission for a generic workflow for a specific WMS.

Parameters
configBpsConfig

BPS configuration.

generic_workflowGenericWorkflow

Generic representation of a single workflow

out_prefixstr

Prefix for all WMS output files

Returns
wms_workflowBaseWmsWorkflow

Prepared WMS Workflow to submit for execution

report(wms_workflow_id=None, user=None, hist=0, pass_thru=None)

Query WMS for status of submitted WMS workflows.

Parameters
wms_workflow_idint or str, optional

Id that can be used by WMS service to look up status.

userstr, optional

Limit report to submissions by this particular user.

histint, optional

Number of days to expand report to include finished WMS workflows.

pass_thrustr, optional

Additional arguments to pass through to the specific WMS service.

Returns
run_reportsdict of BaseWmsReport

Status information for submitted WMS workflows.

messagestr

Message to user on how to find more status information specific to this particular WMS.

submit(workflow)

Submit a single WMS workflow

Parameters
workflowBaseWmsWorkflow

Prepared WMS Workflow to submit for execution