Create new scenarios

from utils.rc.client.requests import Requests
from utils.rc.client.auth import AuthClient

from utils.rc.dtos.scenario import Scenario

import logging
from utils.utils.log_util import LogUtil
LogUtil.set_basic_config(format='%(levelname)s:%(message)s', level=logging.INFO)
Requests.setRootHost("https://staging.dev.rapidcanvas.net/api/")
AuthClient.setToken() #you can find your token in RapidCanvas UI under tools/token

Scenarios

A scenario is created with in a project and allows to run a pipeline when certain conditions are met.

Shared Variables

Shared variables are local to a scenario and can be used to execute a pipeline with value of a defined shared variable.

Shared variables take priority over global variables.

scenario_1 = project.add_scenario(
    name='scenario_1',
    description='Scenario 1 example',
    shared_variables=dict(variable1="variable_value")
)