Configuring life cycle actions

Created by Ekaterina Zayats, Modified on Mon, 19 Sep 2022 at 04:02 PM by Boyko Cholakov

The list of available life-cycle action templates is configured by adding API objects to API libraries (see Adding API objects). 


To add a life-cycle action to your lab:


  1. Log in to your SIT Alemira Virtual Lab account.
  2. In the Labs menu, open your lab.
  3. Click Configuration.
  4. In the Life-Cycle Actions section, click Add action.
  5. Specify the following parameters:

    • Name — the name of the life-cycle action.

    • Type — the type of life-cycle action:

      • after — the phase in the lab flow, when to execute the action: after which VM state this action will be executed.

      • reset — the type used to reset the VM settings to default.


    • Target state — for the after type, the VM session state:

      • active — the VM is running.

      • cleaned — the VM is cleaned after performing a lab.

      • finished — the lab is completed, after this state all data can be cleaned.

      • inreview — the VM is reviewed by the instructor.

      • paused — the VM is suspended.

      • prepared — the initial VM state before it can run.


  6. Click Add action and specify these parameters:

    • Template — the action template. Templates are defined by API calls configured in API library (see Adding API objects). 

    If the selected action template requires input parameters, specify them in the Input field in the JSON format.
    Note: If samples of the input and output of an action are set in the API library, they will be displayed after selecting the action in Sample input and Sample output. You can copy the structure and paste it to Input.

    • Input — the structure of parameters passed in the API request to the external system.

    • Output — the structure of parameters passed in the API response from the external system.

    Note: The Input and Output must use parameters specified by the Sample input and Sample output. If you specify a non-existent parameter, the execution of the life-cycle actions will result in an error.

    • Name of the output variable — the name of the variable that is used in the lab for the output data. The variable will contain the whole output structure as a value.


Note: To refer to this variable in a lab task you will need to use this format: {Name of the output variable}.


  1. Click Save.


 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article