Openstack Horizon workflows

来源:互联网 发布:sql三大范式 编辑:程序博客网 时间:2024/05/18 22:10
class Workflow(html.HTMLElement):    """A Workflow is a collection of Steps. Its interface is very    straightforward, but it is responsible for handling some very    important tasks such as:    * Handling the injection, removal, and ordering of arbitrary steps.    * Determining if the workflow can be completed by a given user at runtime      based on all available information.    * Dispatching connections between steps to ensure that when context data      changes all the applicable callback functions are executed.    * Verifying/validating the overall data integrity and subsequently      triggering the final method to complete the workflow.    The ``Workflow`` class has the following attributes:    .. attribute:: name        The verbose name for this workflow which will be displayed to the user.        Defaults to the class name.    .. attribute:: slug        The unique slug for this workflow. Required.    .. attribute:: steps        Read-only access to the final ordered set of step instances for        this workflow.    .. attribute:: default_steps        A list of :class:`~horizon.workflows.Step` classes which serve as the        starting point for this workflow's ordered steps. Defaults to an empty        list (``[]``).    .. attribute:: finalize_button_name        The name which will appear on the submit button for the workflow's        form. Defaults to ``"Save"``.    .. attribute:: success_message        A string which will be displayed to the user upon successful completion        of the workflow. Defaults to        ``"{{ workflow.name }} completed successfully."``    .. attribute:: failure_message        A string which will be displayed to the user upon failure to complete        the workflow. Defaults to ``"{{ workflow.name }} did not complete."``    .. attribute:: depends_on        A roll-up list of all the ``depends_on`` values compiled from the        workflow's steps.    .. attribute:: contributions        A roll-up list of all the ``contributes`` values compiled from the        workflow's steps.    .. attribute:: template_name        Path to the template which should be used to render this workflow.        In general the default common template should be used. Default:        ``"horizon/common/_workflow.html"``.    .. attribute:: entry_point        The slug of the step which should initially be active when the        workflow is rendered. This can be passed in upon initialization of        the workflow, or set anytime after initialization but before calling        either ``get_entry_point`` or ``render``.    .. attribute:: redirect_param_name        The name of a parameter used for tracking the URL to redirect to upon        completion of the workflow. Defaults to ``"next"``.    .. attribute:: object        The object (if any) which this workflow relates to. In the case of        a workflow which creates a new resource the object would be the created        resource after the relevant creation steps have been undertaken. In        the case of a workflow which updates a resource it would be the        resource being updated after it has been retrieved.    .. attribute:: wizard        Whether to present the workflow as a wizard, with "prev" and "next"        buttons and validation after every step.    .. attribute:: fullscreen        If the workflow is presented in a modal, and this attribute is        set to True, then the ``fullscreen`` css class will be added so        the modal can take advantage of the available screen estate.        Defaults to ``False``.
0 0
原创粉丝点击