Skip to content

profile

Profile

Bases: SQLModel

Profile table.

Source code in fractal_server/app/models/v2/profile.py
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
class Profile(SQLModel, table=True):
    """
    Profile table.
    """

    id: int | None = Field(default=None, primary_key=True)

    resource_id: int = Field(foreign_key="resource.id", ondelete="RESTRICT")

    resource_type: str
    """
    Type of resource (either `local`, `slurm_sudo` or `slurm_ssh`).
    """

    name: str = Field(unique=True)
    """
    Profile name.
    """

    username: str | None = None
    """
    Username to be impersonated, either via `sudo -u` or via `ssh`.
    """

    ssh_key_path: str | None = None
    """
    Path to the private SSH key of user `username` (only relevant if
    `resource_type="slurm_ssh"`).
    """

    jobs_remote_dir: str | None = None
    """
    Remote path of the job folder (only relevant if
    `resource_type="slurm_ssh"`).
    """

    tasks_remote_dir: str | None = None
    """
    Remote path of the task folder (only relevant if
    `resource_type="slurm_ssh"`).
    """

jobs_remote_dir = None class-attribute instance-attribute

Remote path of the job folder (only relevant if resource_type="slurm_ssh").

name = Field(unique=True) class-attribute instance-attribute

Profile name.

resource_type instance-attribute

Type of resource (either local, slurm_sudo or slurm_ssh).

ssh_key_path = None class-attribute instance-attribute

Path to the private SSH key of user username (only relevant if resource_type="slurm_ssh").

tasks_remote_dir = None class-attribute instance-attribute

Remote path of the task folder (only relevant if resource_type="slurm_ssh").

username = None class-attribute instance-attribute

Username to be impersonated, either via sudo -u or via ssh.