AERPAW-Platform-Control / aerpaw-portal

AERPAW Portal v2
0 stars 2 forks source link

API endpoint /sessions #9

Open mjstealey opened 2 years ago

mjstealey commented 2 years ago

/sessions

Endpoints

Functions

Fields

--- /sessions
end_date_time:       - string
ended_by:            - int
experiment_id:       - int
session_id:          - int
session_type:        - string
start_date_time:     - string
started_by:          - int
--- /sessions/{int:pk}
created_by           - string
end_date_time:       - string
ended_by:            - int
experiment_id:       - int
is_active            - bool
session_id:          - int
session_type:        - string
start_date_time:     - string
started_by:          - int

Notes

Experiment states and sessions

Define the session create/activate, start, stop and deactivate criterea for each state transition

class SessionType(models.TextChoices):
    DEVELOPMENT = 'development', _('Development')
    EMULATION = 'emulation', _('Emulation')
    SANDBOX = 'sandbox', _('Sandbox')
    TESTBED = 'testbed', _('Testbed')

Possible states - session(s)

Possible state transitions

ACTIVE_DEVELOPMENT

ACTIVE_EMULATION

ACTIVE_SANDBOX

ACTIVE_TESTBED

SAVED

WAIT_DEVELOPMENT_DEPLOY

WAIT_EMULATION_DEPLOY

WAIT_EMULATION_SCHEDULE

WAIT_SANDBOX_DEPLOY

WAIT_TESTBED_DEPLOY

WAIT_TESTBED_SCHEDULE