diff --git a/ParProcCo/__init__.py b/ParProcCo/__init__.py index 1853194..0d5696f 100644 --- a/ParProcCo/__init__.py +++ b/ParProcCo/__init__.py @@ -1,2 +1,2 @@ -version_info = (2, 1, 2) +version_info = (2, 2, 0) __version__ = ".".join(str(c) for c in version_info) diff --git a/ParProcCo/job_scheduler.py b/ParProcCo/job_scheduler.py index 925b9a5..0f9487c 100644 --- a/ParProcCo/job_scheduler.py +++ b/ParProcCo/job_scheduler.py @@ -20,8 +20,8 @@ JobSubmitReq, JobStateEnum, StringArray, - Uint32NoVal, - Uint64NoVal, + Uint32NoValStruct, + Uint64NoValStruct, ) from .utils import check_jobscript_is_readable @@ -151,7 +151,7 @@ def fetch_and_update_state( job_id = job_info.job_id if job_id is None or job_id < 0: raise ValueError(f"Job info has invalid job id: {job_info}") - state = job_info.job_state + state = job_info.job_state.root slurm_state = SLURMSTATE[state[0].value] if state else None start_time = ( @@ -327,23 +327,24 @@ def make_job_submission( cpus_per_task=job_scheduling_info.job_resources.cpu_cores, tres_per_task=f"gres/gpu:{job_scheduling_info.job_resources.gpus}", tasks=1, - time_limit=Uint32NoVal( + time_limit=Uint32NoValStruct( number=int((job_scheduling_info.timeout.total_seconds() + 59) // 60), set=True, ), environment=StringArray(root=env_list), - memory_per_cpu=Uint64NoVal( + memory_per_cpu=Uint64NoValStruct( number=job_scheduling_info.job_resources.memory, set=True ), current_working_directory=str(job_scheduling_info.working_directory), standard_output=str(job_scheduling_info.get_stdout_path()), standard_error=str(job_scheduling_info.get_stderr_path()), + script=job_script_command, ) if job_scheduling_info.job_resources.extra_properties: for k, v in job_scheduling_info.job_resources.extra_properties.items(): setattr(job, k, v) - return JobSubmitReq(script=job_script_command, job=job) + return JobSubmitReq(job=job) def wait_all_jobs( self, diff --git a/ParProcCo/slurm/generate_models.py b/ParProcCo/slurm/generate_models.py index e838c28..b09ae20 100755 --- a/ParProcCo/slurm/generate_models.py +++ b/ParProcCo/slurm/generate_models.py @@ -4,46 +4,47 @@ import yaml -def replace_refs(in_dict: dict, version_prefix: str, db_version_prefix: str): +def filter_refs(in_dict: dict, version_prefix: str, all_refs: set): + sind = len("#/components/schemas/") for k, v in in_dict.items(): if isinstance(v, dict): - replace_refs(v, version_prefix, db_version_prefix) + filter_refs(v, version_prefix, all_refs) elif isinstance(v, list): for i in v: if isinstance(i, dict): - replace_refs(i, version_prefix, db_version_prefix) + filter_refs(i, version_prefix, all_refs) if k == "$ref": # and isinstance(v, str): assert isinstance(v, str) - nv = v.replace(db_version_prefix, "db").replace(version_prefix, "") - in_dict[k] = nv + if version_prefix in v: + nv = v.replace(version_prefix, "") + all_refs.add(nv[sind:]) + in_dict[k] = nv def filter_paths(paths: dict, version: str, slurm_only: bool): new_dict = {} + path_head = "slurm" if slurm_only else "slurmdb" for k, v in paths.items(): - kparts = k.split("/") + kparts = k.split( + "/" + ) # '/slurm/v0.0.40/shares' => ['', 'slurm', 'v0.0.40', 'shares'] kp1 = kparts[1] if len(kparts) > 2: - if kparts[2] == version: - if (slurm_only and kp1 == "slurm") or ( - not slurm_only and kp1 == "slurmdb" - ): - new_dict[k] = v - else: + if kp1 == path_head and kparts[2] == version: + new_dict[k] = v + else: # global paths new_dict[k] = v print(new_dict.keys()) return new_dict -def filter_components(components: dict, version: str, slurm_only: bool): +def filter_components(components: dict, version_prefix: str, all_refs: dict): new_dict = {} - if not slurm_only: - version = f"db{version}" - vind = len(version) + 1 - kp = "" if slurm_only else "db_" + vind = len(version_prefix) for k, v in components.items(): - if k.startswith(version): - new_dict[kp + k[vind:]] = v + if k.startswith(version_prefix): + filter_refs(v, version_prefix, all_refs) + new_dict[k[vind:]] = v return new_dict @@ -52,10 +53,18 @@ def generate_slurm_models(input_file: str, version: str, slurm_only: bool): schema = json.load(f) schema["paths"] = filter_paths(schema["paths"], version, slurm_only) - schema["components"]["schemas"] = filter_components( - schema["components"]["schemas"], version, slurm_only + all_refs = set() + version_prefix = f"{version}_" + filter_refs(schema["paths"], version_prefix, all_refs) + all_schemas = filter_components( + schema["components"]["schemas"], version_prefix, all_refs ) - replace_refs(schema, f"{version}_", f"db{version}") + print( + "Removing these unreferenced schema parts:", set(all_schemas.keys()) - all_refs + ) + schema["components"]["schemas"] = { + k: s for k, s in all_schemas.items() if k in all_refs + } return schema diff --git a/ParProcCo/slurm/slurm_client.py b/ParProcCo/slurm/slurm_client.py index b5e2768..92c5b86 100644 --- a/ParProcCo/slurm/slurm_client.py +++ b/ParProcCo/slurm/slurm_client.py @@ -10,14 +10,13 @@ from .slurm_rest import ( JobInfo, - JobSubmitResponseMsg, JobSubmitReq, OpenapiJobInfoResp, OpenapiJobSubmitResponse, - OpenapiResp, + OpenapiKillJobResp, ) -_SLURM_VERSION = "v0.0.40" +_SLURM_VERSION = "v0.0.42" def get_slurm_token() -> str: @@ -77,7 +76,7 @@ def _get_response_json(self, response: requests.Response) -> dict: def _has_openapi_errors( self, heading: str, - oar: OpenapiResp | OpenapiJobInfoResp | OpenapiJobSubmitResponse, + oar: OpenapiJobInfoResp | OpenapiJobSubmitResponse | OpenapiKillJobResp, ) -> bool: if oar.warnings and oar.warnings.root: logging.warning(heading) @@ -111,7 +110,7 @@ def get_job(self, job_id: int) -> JobInfo: raise ValueError(f"Multiple jobs returned {jobs}") raise ValueError(f"No job info found for job id {job_id}") - def submit_job(self, job_submission: JobSubmitReq) -> JobSubmitResponseMsg: + def submit_job(self, job_submission: JobSubmitReq) -> OpenapiJobSubmitResponse: response = self._post("job/submit", job_submission) if not response.ok: logging.error(job_submission.model_dump(exclude_defaults=True)) @@ -119,13 +118,13 @@ def submit_job(self, job_submission: JobSubmitReq) -> JobSubmitResponseMsg: self._get_response_json(response) ) self._has_openapi_errors( - f"Job submit {ojsr.result.job_id if ojsr.result else 'None'}:", ojsr + f"Job submit {ojsr.job_id if ojsr.job_id else 'None'}:", ojsr ) response.raise_for_status() - assert ojsr.result - return ojsr.result + assert ojsr.job_id is not None + return ojsr def cancel_job(self, job_id: int) -> bool: response = self._delete(f"job/{job_id}") - oar = OpenapiResp.model_validate(self._get_response_json(response)) - return not self._has_openapi_errors(f"Job query {job_id}:", oar) + oar = OpenapiKillJobResp.model_validate(self._get_response_json(response)) + return not self._has_openapi_errors(f"Job delete {job_id}:", oar) diff --git a/ParProcCo/slurm/slurm_rest.py b/ParProcCo/slurm/slurm_rest.py index a849791..e3295f8 100644 --- a/ParProcCo/slurm/slurm_rest.py +++ b/ParProcCo/slurm/slurm_rest.py @@ -1,22 +1,31 @@ # generated by datamodel-codegen: # filename: slurm-rest.yaml -# timestamp: 2024-02-12T15:21:57+00:00 +# timestamp: 2025-03-20T16:17:28+00:00 from __future__ import annotations from enum import Enum +from typing import Any from pydantic import BaseModel, Field, RootModel -class Flag(Enum): +class AccountFlag(Enum): DELETED = "DELETED" + WithAssociations = "WithAssociations" + WithCoordinators = "WithCoordinators" + NoUsersAreCoords = "NoUsersAreCoords" + UsersAreCoords = "UsersAreCoords" + + +class AccountFlags(RootModel[list[AccountFlag]]): + root: list[AccountFlag] class AccountShort(BaseModel): description: str | None = None """ - An arbitrary string describing an account + Arbitrary string describing the account """ organization: str | None = None """ @@ -26,48 +35,83 @@ class AccountShort(BaseModel): class Allocated(BaseModel): seconds: int | None = None + """ + Number of seconds allocated + """ -class Default(BaseModel): - qos: str | None = None +class AcctGatherProfileEnum(Enum): + NOT_SET = "NOT_SET" + NONE = "NONE" + ENERGY = "ENERGY" + LUSTRE = "LUSTRE" + NETWORK = "NETWORK" + TASK = "TASK" -class Fairshare(BaseModel): - factor: float | None = None - """ - fairshare factor - """ - level: float | None = None +class AcctGatherProfile(RootModel[list[AcctGatherProfileEnum]]): + root: list[AcctGatherProfileEnum] + + +class AdminLvlEnum(Enum): + Not_Set = "Not Set" + None_ = "None" + Operator = "Operator" + Administrator = "Administrator" + + +class AdminLvl(RootModel[list[AdminLvlEnum]]): + root: list[AdminLvlEnum] + + +class Default(BaseModel): + qos: str | None = None """ - fairshare factor at this level. stored on an assoc as a long double, but that is not needed for display in sshare + Default QOS """ -class TypeEnum(Enum): +class AssocFlag(Enum): + DELETED = "DELETED" + NoUpdate = "NoUpdate" + Exact = "Exact" + NoUsersAreCoords = "NoUsersAreCoords" + UsersAreCoords = "UsersAreCoords" + + +class AssocFlags(RootModel[list[AssocFlag]]): + root: list[AssocFlag] + + +class AssocSharesObjWrapTypeEnum(Enum): USER = "USER" ASSOCIATION = "ASSOCIATION" +class AssocSharesObjWrapType(RootModel[list[AssocSharesObjWrapTypeEnum]]): + root: list[AssocSharesObjWrapTypeEnum] + + class AssocShort(BaseModel): account: str | None = None """ - Association account (if assigned) + Account name """ cluster: str | None = None """ - Association cluster (if assigned) + Cluster name """ id: int | None = None """ - Numeric Association ID (if known) + Numeric association ID """ partition: str | None = None """ - Association partition (if assigned) + Partition name """ user: str """ - Assocation user (if assigned) + User name """ @@ -77,36 +121,86 @@ class AssocShortList(RootModel[list[AssocShort]]): class BfExitFields(BaseModel): bf_max_job_start: int | None = None + """ + Reached number of jobs allowed to start + """ bf_max_job_test: int | None = None + """ + Reached number of jobs allowed to be tested + """ bf_max_time: int | None = None + """ + Reached maximum allowed scheduler time + """ bf_node_space_size: int | None = None + """ + Reached table size limit + """ end_job_queue: int | None = None + """ + Reached end of queue + """ state_changed: int | None = None + """ + System state changed + """ class Associations(BaseModel): root: AssocShort | None = None + """ + Root association information + """ class Controller(BaseModel): host: str | None = None + """ + ControlHost + """ port: int | None = None + """ + ControlPort + """ -class Flag2(Enum): +class ClusterRecFlag(Enum): REGISTERING = "REGISTERING" MULTIPLE_SLURMD = "MULTIPLE_SLURMD" FRONT_END = "FRONT_END" - CRAY_NATIVE = "CRAY_NATIVE" FEDERATION = "FEDERATION" EXTERNAL = "EXTERNAL" +class ClusterRecFlags(RootModel[list[ClusterRecFlag]]): + root: list[ClusterRecFlag] + + class ControllerPing(BaseModel): hostname: str | None = None + """ + Target for ping + """ latency: int | None = None + """ + Number of microseconds it took to successfully ping or timeout + """ mode: str | None = None + """ + The operating mode of the responding slurmctld + """ pinged: str | None = None + """ + Ping result + """ + primary: bool + """ + Is responding slurmctld the primary controller + """ + responding: bool + """ + If ping RPC responded with pong from controller + """ class ControllerPingArray(RootModel[list[ControllerPing]]): @@ -115,58 +209,95 @@ class ControllerPingArray(RootModel[list[ControllerPing]]): class Coord(BaseModel): direct: bool | None = None + """ + Indicates whether the coordinator was directly assigned to this account + """ name: str + """ + User name + """ class CoordList(RootModel[list[Coord]]): root: list[Coord] -class Flag3(Enum): - WILD_MINUTE = "WILD_MINUTE" - WILD_HOUR = "WILD_HOUR" - WILD_DAY_OF_MONTH = "WILD_DAY_OF_MONTH" - WILD_MONTH = "WILD_MONTH" - WILD_DAY_OF_WEEK = "WILD_DAY_OF_WEEK" +class CpuBindingFlag(Enum): + CPU_BIND_TO_THREADS = "CPU_BIND_TO_THREADS" + CPU_BIND_TO_CORES = "CPU_BIND_TO_CORES" + CPU_BIND_TO_SOCKETS = "CPU_BIND_TO_SOCKETS" + CPU_BIND_TO_LDOMS = "CPU_BIND_TO_LDOMS" + CPU_BIND_NONE = "CPU_BIND_NONE" + CPU_BIND_RANK = "CPU_BIND_RANK" + CPU_BIND_MAP = "CPU_BIND_MAP" + CPU_BIND_MASK = "CPU_BIND_MASK" + CPU_BIND_LDRANK = "CPU_BIND_LDRANK" + CPU_BIND_LDMAP = "CPU_BIND_LDMAP" + CPU_BIND_LDMASK = "CPU_BIND_LDMASK" + VERBOSE = "VERBOSE" + CPU_BIND_ONE_THREAD_PER_CORE = "CPU_BIND_ONE_THREAD_PER_CORE" + + +class CpuBindingFlags(RootModel[list[CpuBindingFlag]]): + root: list[CpuBindingFlag] + + +class CrTypeEnum(Enum): + CPU = "CPU" + SOCKET = "SOCKET" + CORE = "CORE" + BOARD = "BOARD" + MEMORY = "MEMORY" + ONE_TASK_PER_CORE = "ONE_TASK_PER_CORE" + PACK_NODES = "PACK_NODES" + CORE_DEFAULT_DIST_BLOCK = "CORE_DEFAULT_DIST_BLOCK" + LLN = "LLN" + LINEAR = "LINEAR" + + +class CrType(RootModel[list[CrTypeEnum]]): + root: list[CrTypeEnum] class Line(BaseModel): end: int | None = None + """ + End of this entry in file + """ start: int | None = None + """ + Start of this entry in file + """ -class CronEntry(BaseModel): - command: str | None = None - day_of_month: str | None = None - day_of_week: str | None = None - flags: list[Flag3] | None = None - hour: str | None = None - line: Line | None = None - minute: str | None = None - month: str | None = None - specification: str | None = None +class CronEntryFlag(Enum): + WILD_MINUTE = "WILD_MINUTE" + WILD_HOUR = "WILD_HOUR" + WILD_DAY_OF_MONTH = "WILD_DAY_OF_MONTH" + WILD_MONTH = "WILD_MONTH" + WILD_DAY_OF_WEEK = "WILD_DAY_OF_WEEK" + + +class CronEntryFlags(RootModel[list[CronEntryFlag]]): + root: list[CronEntryFlag] class CsvString(RootModel[list[str]]): root: list[str] -class Float64NoVal(BaseModel): - """ - 64 bit floating point number with flags - """ - +class Float64NoValStruct(BaseModel): infinite: bool | None = None """ - True if number has been set to infinite. "set" and "number" will be ignored. + True if number has been set to infinite; "set" and "number" will be ignored """ number: float | None = None """ - If set is True the number will be set with value. Otherwise ignore number contents. + If "set" is True the number will be set with value; otherwise ignore number contents """ - set: bool | None = False + set: bool | None = None """ - True if number has been set. False if number is unset + True if number has been set; False if number is unset """ @@ -180,15 +311,36 @@ class HostlistString(RootModel[list[str]]): class Time(BaseModel): time_end: int | None = None + """ + When the instance will end (UNIX timestamp) + """ time_start: int | None = None + """ + When the instance will start (UNIX timestamp) + """ class Instance(BaseModel): cluster: str | None = None + """ + Cluster name + """ extra: str | None = None + """ + Arbitrary string used for node filtering if extra constraints are enabled + """ instance_id: str | None = None + """ + Cloud instance ID + """ instance_type: str | None = None + """ + Cloud instance type + """ node_name: str | None = None + """ + NodeName + """ time: Time | None = None @@ -198,6 +350,9 @@ class InstanceList(RootModel[list[Instance]]): class Running(BaseModel): tasks: int | None = None + """ + Maximum number of simultaneously running tasks, 0 if no limit + """ class Max1(BaseModel): @@ -210,78 +365,68 @@ class Limits(BaseModel): class Comment(BaseModel): administrator: str | None = None + """ + Arbitrary comment made by administrator + """ job: str | None = None + """ + Arbitrary comment made by user + """ system: str | None = None - - -class Flag4(Enum): - NONE = "NONE" - CLEAR_SCHEDULING = "CLEAR_SCHEDULING" - NOT_SET = "NOT_SET" - STARTED_ON_SUBMIT = "STARTED_ON_SUBMIT" - STARTED_ON_SCHEDULE = "STARTED_ON_SCHEDULE" - STARTED_ON_BACKFILL = "STARTED_ON_BACKFILL" - START_RECEIVED = "START_RECEIVED" + """ + Arbitrary comment from slurmctld + """ class Mcs(BaseModel): label: str | None = None + """ + Multi-Category Security label on the job + """ class Reservation(BaseModel): id: int | None = None + """ + Unique identifier of requested reservation + """ name: str | None = None - - -class CurrentEnum(Enum): - PENDING = "PENDING" - RUNNING = "RUNNING" - SUSPENDED = "SUSPENDED" - COMPLETED = "COMPLETED" - CANCELLED = "CANCELLED" - FAILED = "FAILED" - TIMEOUT = "TIMEOUT" - NODE_FAIL = "NODE_FAIL" - PREEMPTED = "PREEMPTED" - BOOT_FAIL = "BOOT_FAIL" - DEADLINE = "DEADLINE" - OUT_OF_MEMORY = "OUT_OF_MEMORY" - LAUNCH_FAILED = "LAUNCH_FAILED" - UPDATE_DB = "UPDATE_DB" - REQUEUED = "REQUEUED" - REQUEUE_HOLD = "REQUEUE_HOLD" - SPECIAL_EXIT = "SPECIAL_EXIT" - RESIZING = "RESIZING" - CONFIGURING = "CONFIGURING" - COMPLETING = "COMPLETING" - STOPPED = "STOPPED" - RECONFIG_FAIL = "RECONFIG_FAIL" - POWER_UP_NODE = "POWER_UP_NODE" - REVOKED = "REVOKED" - REQUEUE_FED = "REQUEUE_FED" - RESV_DEL_HOLD = "RESV_DEL_HOLD" - SIGNALING = "SIGNALING" - STAGE_OUT = "STAGE_OUT" - - -class State(BaseModel): - current: list[CurrentEnum] | None = None - reason: str | None = None + """ + Name of reservation to use + """ class System(BaseModel): microseconds: int | None = None + """ + System CPU time used by the job in microseconds + """ seconds: int | None = None + """ + System CPU time used by the job in seconds + """ class Total(BaseModel): microseconds: int | None = None + """ + Sum of System and User CPU time used by the job in microseconds + """ seconds: int | None = None + """ + Sum of System and User CPU time used by the job in seconds + """ class User(BaseModel): microseconds: int | None = None + """ + User CPU time used by the job in microseconds + """ seconds: int | None = None + """ + User CPU time used by the job in seconds + """ class JobArrayResponseMsgEntry(BaseModel): @@ -295,11 +440,11 @@ class JobArrayResponseMsgEntry(BaseModel): """ job_id: int | None = None """ - JobId for updated Job + Job ID for updated job """ step_id: str | None = None """ - StepId for updated Job + Step ID for updated job """ why: str | None = None """ @@ -307,30 +452,7 @@ class JobArrayResponseMsgEntry(BaseModel): """ -class CpuBindingFlag(Enum): - CPU_BIND_TO_THREADS = "CPU_BIND_TO_THREADS" - CPU_BIND_TO_CORES = "CPU_BIND_TO_CORES" - CPU_BIND_TO_SOCKETS = "CPU_BIND_TO_SOCKETS" - CPU_BIND_TO_LDOMS = "CPU_BIND_TO_LDOMS" - CPU_BIND_NONE = "CPU_BIND_NONE" - CPU_BIND_RANK = "CPU_BIND_RANK" - CPU_BIND_MAP = "CPU_BIND_MAP" - CPU_BIND_MASK = "CPU_BIND_MASK" - CPU_BIND_LDRANK = "CPU_BIND_LDRANK" - CPU_BIND_LDMAP = "CPU_BIND_LDMAP" - CPU_BIND_LDMASK = "CPU_BIND_LDMASK" - VERBOSE = "VERBOSE" - CPU_BIND_ONE_THREAD_PER_CORE = "CPU_BIND_ONE_THREAD_PER_CORE" - - -class ExclusiveEnum(Enum): - true = "true" - false = "false" - user = "user" - mcs = "mcs" - - -class Flag5(Enum): +class JobFlag(Enum): KILL_INVALID_DEPENDENCY = "KILL_INVALID_DEPENDENCY" NO_KILL_INVALID_DEPENDENCY = "NO_KILL_INVALID_DEPENDENCY" HAS_STATE_DIRECTORY = "HAS_STATE_DIRECTORY" @@ -349,7 +471,7 @@ class Flag5(Enum): TESTING_WHOLE_NODE_BACKFILL = "TESTING_WHOLE_NODE_BACKFILL" TOP_PRIORITY_JOB = "TOP_PRIORITY_JOB" ACCRUE_COUNT_CLEARED = "ACCRUE_COUNT_CLEARED" - GRED_BINDING_DISABLED = "GRED_BINDING_DISABLED" + GRES_BINDING_DISABLED = "GRES_BINDING_DISABLED" JOB_WAS_RUNNING = "JOB_WAS_RUNNING" JOB_ACCRUE_TIME_RESET = "JOB_ACCRUE_TIME_RESET" CRON_JOB = "CRON_JOB" @@ -363,23 +485,22 @@ class Flag5(Enum): PARTITION_ASSIGNED = "PARTITION_ASSIGNED" BACKFILL_ATTEMPTED = "BACKFILL_ATTEMPTED" SCHEDULING_ATTEMPTED = "SCHEDULING_ATTEMPTED" - SAVE_BATCH_SCRIPT = "SAVE_BATCH_SCRIPT" + STEPMGR_ENABLED = "STEPMGR_ENABLED" -class KillWarningFlag(Enum): - BATCH_JOB = "BATCH_JOB" - ARRAY_TASK = "ARRAY_TASK" - FULL_STEPS_ONLY = "FULL_STEPS_ONLY" - FULL_JOB = "FULL_JOB" - FEDERATION_REQUEUE = "FEDERATION_REQUEUE" - HURRY = "HURRY" - OUT_OF_MEMORY = "OUT_OF_MEMORY" - NO_SIBLING_JOBS = "NO_SIBLING_JOBS" - RESERVATION_JOB = "RESERVATION_JOB" - WARNING_SENT = "WARNING_SENT" +class JobFlags(RootModel[list[JobFlag]]): + root: list[JobFlag] + + +class Power(BaseModel): + flags: list | None = None + + +class JobInfoGresDetail(RootModel[list[str]]): + root: list[str] -class MailTypeEnum(Enum): +class JobMailFlag(Enum): BEGIN = "BEGIN" END = "END" FAIL = "FAIL" @@ -393,47 +514,53 @@ class MailTypeEnum(Enum): INVALID_DEPENDENCY = "INVALID_DEPENDENCY" -class MemoryBindingTypeEnum(Enum): - NONE = "NONE" - RANK = "RANK" - MAP = "MAP" - MASK = "MASK" - LOCAL = "LOCAL" - VERBOSE = "VERBOSE" - SORT = "SORT" - PREFER = "PREFER" +class JobMailFlags(RootModel[list[JobMailFlag]]): + root: list[JobMailFlag] -class OpenModeEnum(Enum): - APPEND = "APPEND" - TRUNCATE = "TRUNCATE" +class JobResCoreStatu(Enum): + INVALID = "INVALID" + UNALLOCATED = "UNALLOCATED" + ALLOCATED = "ALLOCATED" + IN_USE = "IN_USE" -class PowerFlag(Enum): - EQUAL_POWER = "EQUAL_POWER" +class JobResCoreStatus(RootModel[list[JobResCoreStatu]]): + root: list[JobResCoreStatu] -class ProfileEnum(Enum): - NOT_SET = "NOT_SET" - NONE = "NONE" - ENERGY = "ENERGY" - LUSTRE = "LUSTRE" - NETWORK = "NETWORK" - TASK = "TASK" +class Cpus(BaseModel): + count: int | None = None + """ + Total number of CPUs assigned to job + """ + used: int | None = None + """ + Total number of CPUs used by job + """ + +class Memory(BaseModel): + allocated: int | None = None + """ + Total memory (MiB) allocated to job + """ + used: int | None = None + """ + Total memory (MiB) used by job + """ -class SharedEnum(Enum): + +class JobSharedEnum(Enum): none = "none" oversubscribe = "oversubscribe" user = "user" mcs = "mcs" + topo = "topo" -class X11Enum(Enum): - FORWARD_ALL_NODES = "FORWARD_ALL_NODES" - BATCH_NODE = "BATCH_NODE" - FIRST_NODE = "FIRST_NODE" - LAST_NODE = "LAST_NODE" +class JobShared(RootModel[list[JobSharedEnum]]): + root: list[JobSharedEnum] class JobStateEnum(Enum): @@ -450,7 +577,6 @@ class JobStateEnum(Enum): DEADLINE = "DEADLINE" OUT_OF_MEMORY = "OUT_OF_MEMORY" LAUNCH_FAILED = "LAUNCH_FAILED" - UPDATE_DB = "UPDATE_DB" REQUEUED = "REQUEUED" REQUEUE_HOLD = "REQUEUE_HOLD" SPECIAL_EXIT = "SPECIAL_EXIT" @@ -467,98 +593,105 @@ class JobStateEnum(Enum): STAGE_OUT = "STAGE_OUT" -class Flag7(Enum): - EQUAL_POWER = "EQUAL_POWER" - - -class Power(BaseModel): - flags: list[Flag7] | None = None - - -class ShowFlag(Enum): - ALL = "ALL" - DETAIL = "DETAIL" - MIXED = "MIXED" - LOCAL = "LOCAL" - SIBLING = "SIBLING" - FEDERATION = "FEDERATION" - FUTURE = "FUTURE" +class JobState(RootModel[list[JobStateEnum]]): + root: list[JobStateEnum] -class JobInfoGresDetail(RootModel[list[str]]): +class KillJobsMsgJobsArray(RootModel[list[str]]): root: list[str] -class JobResNodes(RootModel[list]): +class Error(BaseModel): + code: int | None = None """ - job node resources + Numeric error encountered signaling job """ - - root: list + message: str | None = None """ - job node resources + Error message why signaling job failed + """ + string: str | None = None + """ + String error encountered signaling job """ -class JobSubmitResponseMsg(BaseModel): - error: str | None = None - error_code: int | None = None - job_id: int | None = None - job_submit_user_msg: str | None = None - step_id: str | None = None +class Federation(BaseModel): + sibling: str | None = None + """ + Name of federation sibling (may be empty for non-federation) + """ class License(BaseModel): Free: int | None = None + """ + Number of licenses currently available + """ LastConsumed: int | None = None + """ + Last known number of licenses that were consumed in the license manager (Remote Only) + """ LastDeficit: int | None = None + """ + Number of "missing licenses" from the cluster's perspective + """ LastUpdate: int | None = None + """ + When the license information was last updated (UNIX Timestamp) + """ LicenseName: str | None = None + """ + Name of the license + """ Remote: bool | None = None + """ + Indicates whether licenses are served by the database + """ Reserved: int | None = None + """ + Number of licenses reserved + """ Total: int | None = None + """ + Total number of licenses present + """ Used: int | None = None + """ + Number of licenses in use + """ class Licenses(RootModel[list[License]]): root: list[License] -class NextStateAfterRebootEnum(Enum): - INVALID = "INVALID" - UNKNOWN = "UNKNOWN" - DOWN = "DOWN" - IDLE = "IDLE" - ALLOCATED = "ALLOCATED" - ERROR = "ERROR" - MIXED = "MIXED" - FUTURE = "FUTURE" - PERFCTRS = "PERFCTRS" +class MemoryBindingTypeEnum(Enum): + NONE = "NONE" + RANK = "RANK" + MAP = "MAP" + MASK = "MASK" + LOCAL = "LOCAL" + VERBOSE = "VERBOSE" + SORT = "SORT" + PREFER = "PREFER" + + +class MemoryBindingType(RootModel[list[MemoryBindingTypeEnum]]): + root: list[MemoryBindingTypeEnum] + + +class NodeCrTypeEnum(Enum): + AVAILABLE = "AVAILABLE" + ONE_ROW = "ONE_ROW" RESERVED = "RESERVED" - UNDRAIN = "UNDRAIN" - CLOUD = "CLOUD" - RESUME = "RESUME" - DRAIN = "DRAIN" - COMPLETING = "COMPLETING" - NOT_RESPONDING = "NOT_RESPONDING" - POWERED_DOWN = "POWERED_DOWN" - FAIL = "FAIL" - POWERING_UP = "POWERING_UP" - MAINTENANCE = "MAINTENANCE" - REBOOT_REQUESTED = "REBOOT_REQUESTED" - REBOOT_CANCELED = "REBOOT_CANCELED" - POWERING_DOWN = "POWERING_DOWN" - DYNAMIC_FUTURE = "DYNAMIC_FUTURE" - REBOOT_ISSUED = "REBOOT_ISSUED" - PLANNED = "PLANNED" - INVALID_REG = "INVALID_REG" - POWER_DOWN = "POWER_DOWN" - POWER_UP = "POWER_UP" - POWER_DRAIN = "POWER_DRAIN" - DYNAMIC_NORM = "DYNAMIC_NORM" -class StateEnum(Enum): +class NodeCrType(RootModel[list[NodeCrTypeEnum]]): + root: list[NodeCrTypeEnum] + + +class NodeState(Enum): INVALID = "INVALID" UNKNOWN = "UNKNOWN" DOWN = "DOWN" @@ -567,7 +700,6 @@ class StateEnum(Enum): ERROR = "ERROR" MIXED = "MIXED" FUTURE = "FUTURE" - PERFCTRS = "PERFCTRS" RESERVED = "RESERVED" UNDRAIN = "UNDRAIN" CLOUD = "CLOUD" @@ -592,6 +724,19 @@ class StateEnum(Enum): DYNAMIC_NORM = "DYNAMIC_NORM" +class NodeStates(RootModel[list[NodeState]]): + root: list[NodeState] + + +class OpenModeEnum(Enum): + APPEND = "APPEND" + TRUNCATE = "TRUNCATE" + + +class OpenMode(RootModel[list[OpenModeEnum]]): + root: list[OpenModeEnum] + + class OpenapiError(BaseModel): description: str | None = None """ @@ -691,68 +836,141 @@ class OpenapiWarnings(RootModel[list[OpenapiWarning]]): root: list[OpenapiWarning] +class OversubscribeFlag(Enum): + force = "force" + + +class OversubscribeFlags(RootModel[list[OversubscribeFlag]]): + root: list[OversubscribeFlag] + + +class PartPrio(BaseModel): + partition: str | None = None + """ + Partition name + """ + priority: int | None = None + """ + Prospective job priority if it runs in this partition + """ + + class Accounts(BaseModel): allowed: str | None = None + """ + AllowAccounts + """ deny: str | None = None + """ + DenyAccounts + """ -class Cpus(BaseModel): +class Cpus1(BaseModel): task_binding: int | None = None + """ + CpuBind + """ total: int | None = None + """ + TotalCPUs + """ class Groups(BaseModel): allowed: str | None = None - - -class Flag8(Enum): - force = "force" + """ + AllowGroups + """ class Oversubscribe(BaseModel): - flags: list[Flag8] | None = None + flags: OversubscribeFlags | None = None + """ + Flags applicable to the OverSubscribe setting + """ jobs: int | None = None + """ + Maximum number of jobs allowed to oversubscribe resources + """ class Minimums(BaseModel): nodes: int | None = None + """ + MinNodes + """ -class Nodes1(BaseModel): +class Nodes2(BaseModel): allowed_allocation: str | None = None + """ + AllocNodes + """ configured: str | None = None + """ + Nodes + """ total: int | None = None - - -class StateEnum1(Enum): - INACTIVE = "INACTIVE" - UNKNOWN = "UNKNOWN" - UP = "UP" - DOWN = "DOWN" - DRAIN = "DRAIN" - - -class Partition(BaseModel): - state: list[StateEnum1] | None = None + """ + TotalNodes + """ class Priority(BaseModel): job_factor: int | None = None + """ + PriorityJobFactor + """ tier: int | None = None + """ + PriorityTier + """ class Qos(BaseModel): allowed: str | None = None + """ + AllowQOS + """ assigned: str | None = None + """ + QOS + """ deny: str | None = None + """ + DenyQOS + """ class Tres4(BaseModel): billing_weights: str | None = None + """ + TRESBillingWeights + """ configured: str | None = None + """ + TRES + """ + + +class PartitionState(Enum): + INACTIVE = "INACTIVE" + UNKNOWN = "UNKNOWN" + UP = "UP" + DOWN = "DOWN" + DRAIN = "DRAIN" + +class PartitionStates(RootModel[list[PartitionState]]): + root: list[PartitionState] -class StatusEnum(Enum): + +class PriorityByPartition(RootModel[list[PartPrio]]): + root: list[PartPrio] + + +class ProcessExitCodeStatu(Enum): INVALID = "INVALID" PENDING = "PENDING" SUCCESS = "SUCCESS" @@ -761,7 +979,11 @@ class StatusEnum(Enum): CORE_DUMPED = "CORE_DUMPED" -class Flag9(Enum): +class ProcessExitCodeStatus(RootModel[list[ProcessExitCodeStatu]]): + root: list[ProcessExitCodeStatu] + + +class QosFlag(Enum): NOT_SET = "NOT_SET" ADD = "ADD" REMOVE = "REMOVE" @@ -778,7 +1000,15 @@ class Flag9(Enum): RELATIVE = "RELATIVE" -class ModeEnum(Enum): +class QosFlags(RootModel[list[QosFlag]]): + root: list[QosFlag] + + +class QosPreemptList(RootModel[list[str]]): + root: list[str] + + +class QosPreemptMode(Enum): DISABLED = "DISABLED" SUSPEND = "SUSPEND" REQUEUE = "REQUEUE" @@ -786,8 +1016,8 @@ class ModeEnum(Enum): GANG = "GANG" -class QosPreemptList(RootModel[list[str]]): - root: list[str] +class QosPreemptModes(RootModel[list[QosPreemptMode]]): + root: list[QosPreemptMode] class QosStringIdList(RootModel[list[str]]): @@ -803,10 +1033,16 @@ class QosStringIdList(RootModel[list[str]]): class ReservationCoreSpec(BaseModel): core: str | None = None + """ + IDs of reserved cores + """ node: str | None = None + """ + Name of reserved node + """ -class Flag10(Enum): +class ReservationFlag(Enum): MAINT = "MAINT" NO_MAINT = "NO_MAINT" DAILY = "DAILY" @@ -840,72 +1076,131 @@ class Flag10(Enum): SKIP = "SKIP" HOURLY = "HOURLY" NO_HOURLY = "NO_HOURLY" + USER_DELETE = "USER_DELETE" + NO_USER_DELETE = "NO_USER_DELETE" REOCCURRING = "REOCCURRING" +class ReservationFlags(RootModel[list[ReservationFlag]]): + root: list[ReservationFlag] + + class ReservationInfoCoreSpec(RootModel[list[ReservationCoreSpec]]): root: list[ReservationCoreSpec] -class Type(Enum): +class Duration(BaseModel): + last: int | None = None """ - type + Total time spent doing daily daily rollup (seconds) + """ + max: int | None = None + """ + Longest daily rollup time (seconds) + """ + time: int | None = None + """ + Total time spent doing daily rollups (seconds) """ - - internal = "internal" - user = "user" - unknown = "unknown" -class RollupStat(BaseModel): +class Daily(BaseModel): + count: int | None = None """ - recorded rollup statistics + Number of daily rollups since last_run """ - - last_run: int | None = Field(None, alias="last run") + duration: Duration | None = None + last_run: int | None = None """ - Last time rollup ran (UNIX timestamp) + Last time daily rollup ran (UNIX timestamp) """ - max_cycle: int | None = None + + +class Duration1(BaseModel): + last: int | None = None """ - longest rollup time (seconds) + Total time spent doing last daily rollup (seconds) """ - mean_cycles: int | None = None + max: int | None = None """ - average time for rollup (seconds) + Longest hourly rollup time (seconds) """ - total_cycles: int | None = None + time: int | None = None """ - number of rollups since last_run + Total time spent doing hourly rollups (seconds) """ - total_time: int | None = None + + +class Hourly(BaseModel): + count: int | None = None """ - total time spent doing rollups (seconds) + Number of hourly rollups since last_run """ - type: Type | None = None + duration: Duration1 | None = None + last_run: int | None = None """ - type + Last time hourly rollup ran (UNIX timestamp) """ -class RollupStats(RootModel[list[RollupStat]]): +class Duration2(BaseModel): + last: int | None = None + """ + Total time spent doing monthly daily rollup (seconds) + """ + max: int | None = None + """ + Longest monthly rollup time (seconds) + """ + time: int | None = None """ - list of recorded rollup statistics + Total time spent doing monthly rollups (seconds) """ - root: list[RollupStat] + +class Monthly(BaseModel): + count: int | None = None + """ + Number of monthly rollups since last_run + """ + duration: Duration2 | None = None + last_run: int | None = None """ - list of recorded rollup statistics + Last time monthly rollup ran (UNIX timestamp) """ +class RollupStats(BaseModel): + daily: Daily | None = None + hourly: Hourly | None = None + monthly: Monthly | None = None + + class ScheduleExitFields(BaseModel): default_queue_depth: int | None = None + """ + Reached number of jobs allowed to be tested + """ end_job_queue: int | None = None + """ + Reached end of queue + """ licenses: int | None = None + """ + Blocked on licenses + """ max_job_start: int | None = None + """ + Reached number of jobs allowed to start + """ max_rpc_cnt: int | None = None + """ + Reached RPC limit + """ max_sched_time: int | None = None + """ + Reached maximum allowed scheduler time + """ class SharesFloat128Tres(BaseModel): @@ -923,90 +1218,115 @@ class SharesFloat128TresList(RootModel[list[SharesFloat128Tres]]): root: list[SharesFloat128Tres] -class StatsMsgRpcsByTypeItem(BaseModel): - """ - RPC - """ +class SlurmdbJobFlag(Enum): + NONE = "NONE" + CLEAR_SCHEDULING = "CLEAR_SCHEDULING" + NOT_SET = "NOT_SET" + STARTED_ON_SUBMIT = "STARTED_ON_SUBMIT" + STARTED_ON_SCHEDULE = "STARTED_ON_SCHEDULE" + STARTED_ON_BACKFILL = "STARTED_ON_BACKFILL" + START_RECEIVED = "START_RECEIVED" - average_time: int | None = None - """ - Average time spent processing RPC in seconds - """ - count: int | None = None + +class SlurmdbJobFlags(RootModel[list[SlurmdbJobFlag]]): + root: list[SlurmdbJobFlag] + + +class SlurmdbdPing(BaseModel): + hostname: str """ - Number of RPCs received + Target for ping """ - message_type: str | None = None + latency: int """ - Message type as string + Number of microseconds it took to successfully ping or timeout """ - total_time: int | None = None + primary: bool """ - Total time spent processing RPC in seconds + Is responding slurmdbd the primary controller """ - type_id: int | None = None + responding: bool """ - Message type as integer + If ping RPC responded with pong from slurmdbd """ -class StatsMsgRpcsByType(RootModel[list[StatsMsgRpcsByTypeItem]]): - """ - RPCs by message type - """ +class SlurmdbdPingArray(RootModel[list[SlurmdbdPing]]): + root: list[SlurmdbdPing] - root: list[StatsMsgRpcsByTypeItem] + +class StatsMsgRpcDump(BaseModel): + count: HostlistString """ - RPCs by message type + Number of RPCs received """ - - -class StatsMsgRpcsByUserItem(BaseModel): + message_type: str """ - user + Message type as string + """ + type_id: int + """ + Message type as integer """ - average_time: int | None = None + +class StatsMsgRpcQueue(BaseModel): + count: int """ - Average time spent processing RPC in seconds + Number of pending RPCs queued """ - count: int | None = None + message_type: str """ - Number of RPCs received + Message type as string """ - total_time: int | None = None + type_id: int """ - Total time spent processing RPC in seconds + Message type as integer """ - user: str | None = None + + +class StatsMsgRpcsDump(RootModel[list[StatsMsgRpcDump]]): """ - user name + Pending RPCs by hostlist """ - user_id: int | None = None + + root: list[StatsMsgRpcDump] """ - user id (numeric) + Pending RPCs by hostlist """ -class StatsMsgRpcsByUser(RootModel[list[StatsMsgRpcsByUserItem]]): +class StatsMsgRpcsQueue(RootModel[list[StatsMsgRpcQueue]]): """ - RPCs by user + Pending RPCs """ - root: list[StatsMsgRpcsByUserItem] + root: list[StatsMsgRpcQueue] """ - RPCs by user + Pending RPCs """ class Time2(BaseModel): average: int | None = None + """ + Average RPC processing time in microseconds + """ total: int | None = None + """ + Total RPC processing time in microseconds + """ class StatsRpc(BaseModel): count: int | None = None + """ + Number of RPCs processed + """ rpc: str | None = None + """ + RPC type + """ time: Time2 | None = None @@ -1016,69 +1336,98 @@ class StatsRpcList(RootModel[list[StatsRpc]]): class StatsUser(BaseModel): count: int | None = None + """ + Number of RPCs processed + """ time: Time2 | None = None user: str | None = None + """ + User ID + """ class StatsUserList(RootModel[list[StatsUser]]): root: list[StatsUser] -class Nodes2(BaseModel): +class Nodes3(BaseModel): count: int | None = None + """ + Number of nodes in the job step + """ list: Hostlist | None = None + """ + List of nodes used by the step + """ range: str | None = None - - -class StateEnum2(Enum): - PENDING = "PENDING" - RUNNING = "RUNNING" - SUSPENDED = "SUSPENDED" - COMPLETED = "COMPLETED" - CANCELLED = "CANCELLED" - FAILED = "FAILED" - TIMEOUT = "TIMEOUT" - NODE_FAIL = "NODE_FAIL" - PREEMPTED = "PREEMPTED" - BOOT_FAIL = "BOOT_FAIL" - DEADLINE = "DEADLINE" - OUT_OF_MEMORY = "OUT_OF_MEMORY" - LAUNCH_FAILED = "LAUNCH_FAILED" - UPDATE_DB = "UPDATE_DB" - REQUEUED = "REQUEUED" - REQUEUE_HOLD = "REQUEUE_HOLD" - SPECIAL_EXIT = "SPECIAL_EXIT" - RESIZING = "RESIZING" - CONFIGURING = "CONFIGURING" - COMPLETING = "COMPLETING" - STOPPED = "STOPPED" - RECONFIG_FAIL = "RECONFIG_FAIL" - POWER_UP_NODE = "POWER_UP_NODE" - REVOKED = "REVOKED" - REQUEUE_FED = "REQUEUE_FED" - RESV_DEL_HOLD = "RESV_DEL_HOLD" - SIGNALING = "SIGNALING" - STAGE_OUT = "STAGE_OUT" + """ + Node(s) allocated to the job step + """ class CPU1(BaseModel): actual_frequency: int | None = None + """ + Average weighted CPU frequency of all tasks in kHz + """ class Step1(BaseModel): id: str | None = None """ - Slurm Job StepId + Step ID """ name: str | None = None + """ + Step name + """ class Task(BaseModel): distribution: str | None = None + """ + The layout of the step was when it was running + """ class Tasks(BaseModel): count: int | None = None + """ + Total number of tasks + """ + + +class System1(BaseModel): + microseconds: int | None = None + """ + System CPU time used by the step in microseconds + """ + seconds: int | None = None + """ + System CPU time used by the step in seconds + """ + + +class Total1(BaseModel): + microseconds: int | None = None + """ + Total CPU time used by the step in microseconds + """ + seconds: int | None = None + """ + Total CPU time used by the step in seconds + """ + + +class User1(BaseModel): + microseconds: int | None = None + """ + User CPU time used by the step in microseconds + """ + seconds: int | None = None + """ + User CPU time used by the step in seconds + """ class StringArray(RootModel[list[str]]): @@ -1091,214 +1440,203 @@ class StringList(RootModel[list[str]]): class Tres(BaseModel): count: int | None = None + """ + TRES count (0 if listed generically) + """ id: int | None = None + """ + ID used in the database + """ name: str | None = None + """ + TRES name (if applicable) + """ type: str + """ + TRES type (CPU, MEM, etc) + """ class TresList(RootModel[list[Tres]]): root: list[Tres] -class Uint16NoVal(BaseModel): - """ - Integer number with flags - """ - +class Uint16NoValStruct(BaseModel): infinite: bool | None = None """ - True if number has been set to infinite. "set" and "number" will be ignored. + True if number has been set to infinite; "set" and "number" will be ignored """ number: int | None = None """ - If set is True the number will be set with value. Otherwise ignore number contents. + If "set" is True the number will be set with value; otherwise ignore number contents """ - set: bool | None = False + set: bool | None = None """ - True if number has been set. False if number is unset + True if number has been set; False if number is unset """ -class Uint32NoVal(BaseModel): - """ - Integer number with flags - """ - +class Uint32NoValStruct(BaseModel): infinite: bool | None = None """ - True if number has been set to infinite. "set" and "number" will be ignored. + True if number has been set to infinite; "set" and "number" will be ignored """ number: int | None = None """ - If set is True the number will be set with value. Otherwise ignore number contents. + If "set" is True the number will be set with value; otherwise ignore number contents """ - set: bool | None = False + set: bool | None = None """ - True if number has been set. False if number is unset + True if number has been set; False if number is unset """ -class Uint64NoVal(BaseModel): - """ - Integer number with flags - """ - +class Uint64NoValStruct(BaseModel): infinite: bool | None = None """ - True if number has been set to infinite. "set" and "number" will be ignored. + True if number has been set to infinite; "set" and "number" will be ignored """ number: int | None = None """ - If set is True the number will be set with value. Otherwise ignore number contents. + If "set" is True the number will be set with value; otherwise ignore number contents """ - set: bool | None = False + set: bool | None = None """ - True if number has been set. False if number is unset + True if number has been set; False if number is unset """ -class StateEnum3(Enum): - INVALID = "INVALID" - UNKNOWN = "UNKNOWN" - DOWN = "DOWN" - IDLE = "IDLE" - ALLOCATED = "ALLOCATED" - ERROR = "ERROR" - MIXED = "MIXED" - FUTURE = "FUTURE" - PERFCTRS = "PERFCTRS" - RESERVED = "RESERVED" - UNDRAIN = "UNDRAIN" - CLOUD = "CLOUD" - RESUME = "RESUME" - DRAIN = "DRAIN" - COMPLETING = "COMPLETING" - NOT_RESPONDING = "NOT_RESPONDING" - POWERED_DOWN = "POWERED_DOWN" - FAIL = "FAIL" - POWERING_UP = "POWERING_UP" - MAINTENANCE = "MAINTENANCE" - REBOOT_REQUESTED = "REBOOT_REQUESTED" - REBOOT_CANCELED = "REBOOT_CANCELED" - POWERING_DOWN = "POWERING_DOWN" - DYNAMIC_FUTURE = "DYNAMIC_FUTURE" - REBOOT_ISSUED = "REBOOT_ISSUED" - PLANNED = "PLANNED" - INVALID_REG = "INVALID_REG" - POWER_DOWN = "POWER_DOWN" - POWER_UP = "POWER_UP" - POWER_DRAIN = "POWER_DRAIN" - DYNAMIC_NORM = "DYNAMIC_NORM" - - class UpdateNodeMsg(BaseModel): address: HostlistString | None = None """ - communication name + NodeAddr, used to establish a communication path """ comment: str | None = None """ - arbitrary comment + Arbitrary comment """ cpu_bind: int | None = None """ - default CPU binding type + Default method for binding tasks to allocated CPUs """ extra: str | None = None """ - arbitrary string + Arbitrary string used for node filtering if extra constraints are enabled """ features: CsvString | None = None """ - new available feature for node + Available features """ features_act: CsvString | None = None """ - new active feature for node + Currently active features """ gres: str | None = None """ - new generic resources for node + Generic resources """ hostname: HostlistString | None = None """ - node's hostname + NodeHostname """ name: HostlistString | None = None """ - node to update + NodeName """ reason: str | None = None """ - reason for node being DOWN or DRAINING + Reason for node being DOWN or DRAINING """ reason_uid: str | None = None """ - user ID of sending (needed if user root is sending message) + User ID to associate with the reason (needed if user root is sending message) """ - resume_after: Uint32NoVal | None = None + resume_after: Uint32NoValStruct | None = None """ - automatically resume DOWN or DRAINED node after this amount of seconds + Number of seconds after which to automatically resume DOWN or DRAINED node """ - state: list[StateEnum3] | None = None + state: NodeStates | None = None """ - assign new node state + New state to assign to the node """ - weight: Uint32NoVal | None = None + weight: Uint32NoValStruct | None = None """ - new weight for node + Weight of the node for scheduling purposes """ -class AdministratorLevelEnum(Enum): - Not_Set = "Not Set" - None_ = "None" - Operator = "Operator" - Administrator = "Administrator" - - class Default1(BaseModel): account: str | None = None + """ + Default account + """ wckey: str | None = None + """ + Default WCKey + """ -class Flag11(Enum): +class UserFlag(Enum): NONE = "NONE" DELETED = "DELETED" -class AdminlevelEnum(Enum): - Not_Set = "Not Set" - None_ = "None" - Operator = "Operator" - Administrator = "Administrator" +class UserFlags(RootModel[list[UserFlag]]): + root: list[UserFlag] class UserShort(BaseModel): - adminlevel: list[AdminlevelEnum] | None = None + adminlevel: AdminLvl | None = None """ - Admin level of user. Valid levels are None, Operator, and Admin. + AdminLevel granted to the user """ defaultaccount: str | None = None """ - Identify the default bank account name to be used for a job if none is specified at submission time. + Default account """ defaultwckey: str | None = None """ - Identify the default Workload Characterization Key. + Default WCKey """ -class Flag12(Enum): +class WarnFlag(Enum): + BATCH_JOB = "BATCH_JOB" + ARRAY_TASK = "ARRAY_TASK" + FULL_STEPS_ONLY = "FULL_STEPS_ONLY" + FULL_JOB = "FULL_JOB" + FEDERATION_REQUEUE = "FEDERATION_REQUEUE" + HURRY = "HURRY" + OUT_OF_MEMORY = "OUT_OF_MEMORY" + NO_SIBLING_JOBS = "NO_SIBLING_JOBS" + RESERVATION_JOB = "RESERVATION_JOB" + VERBOSE = "VERBOSE" + CRON_JOBS = "CRON_JOBS" + WARNING_SENT = "WARNING_SENT" + + +class WarnFlags(RootModel[list[WarnFlag]]): + root: list[WarnFlag] + + +class WckeyFlag(Enum): DELETED = "DELETED" -class Flag13(Enum): +class WckeyFlags(RootModel[list[WckeyFlag]]): + root: list[WckeyFlag] + + +class WckeyTagFlag(Enum): ASSIGNED_DEFAULT = "ASSIGNED_DEFAULT" +class WckeyTagFlags(RootModel[list[WckeyTagFlag]]): + root: list[WckeyTagFlag] + + class WckeyTagStruct(BaseModel): - flags: list[Flag13] + flags: WckeyTagFlags """ Active flags """ @@ -1308,13 +1646,42 @@ class WckeyTagStruct(BaseModel): """ +class X11Flag(Enum): + FORWARD_ALL_NODES = "FORWARD_ALL_NODES" + BATCH_NODE = "BATCH_NODE" + FIRST_NODE = "FIRST_NODE" + LAST_NODE = "LAST_NODE" + + +class X11Flags(RootModel[list[X11Flag]]): + root: list[X11Flag] + + class Account(BaseModel): associations: AssocShortList | None = None + """ + Associations involving this account (only populated if requested) + """ coordinators: CoordList | None = None + """ + List of users that are a coordinator of this account (only populated if requested) + """ description: str - flags: list[Flag] | None = None + """ + Arbitrary string describing the account + """ + flags: AccountFlags | None = None + """ + Flags associated with this account + """ name: str + """ + Account name + """ organization: str + """ + Organization to which the account belongs + """ class AccountList(RootModel[list[Account]]): @@ -1323,9 +1690,22 @@ class AccountList(RootModel[list[Account]]): class Accounting(BaseModel): TRES: Tres | None = None + """ + Trackable resources + """ allocated: Allocated | None = None id: int | None = None + """ + Association ID or Workload characterization key ID + """ + id_alt: int | None = None + """ + Alternate ID (not currently used) + """ start: int | None = None + """ + When the record was started (UNIX timestamp) + """ class AccountingList(RootModel[list[Accounting]]): @@ -1334,29 +1714,71 @@ class AccountingList(RootModel[list[Accounting]]): class AcctGatherEnergy(BaseModel): average_watts: int | None = None + """ + Average power consumption, in watts + """ base_consumed_energy: int | None = None + """ + The energy consumed between when the node was powered on and the last time it was registered by slurmd, in joules + """ consumed_energy: int | None = None - current_watts: Uint32NoVal | None = None + """ + The energy consumed between the last time the node was registered by the slurmd daemon and the last node energy accounting sample, in joules + """ + current_watts: Uint32NoValStruct | None = None + """ + The instantaneous power consumption at the time of the last node energy accounting sample, in watts + """ last_collected: int | None = None + """ + Time when energy data was last retrieved (UNIX timestamp) + """ previous_consumed_energy: int | None = None + """ + Previous value of consumed_energy + """ class Per(BaseModel): - accruing: Uint32NoVal | None = None - count: Uint32NoVal | None = None - submitted: Uint32NoVal | None = None - wall_clock: Uint32NoVal | None = None + accruing: Uint32NoValStruct | None = None + """ + GrpJobsAccrue + """ + count: Uint32NoValStruct | None = None + """ + GrpJobs + """ + submitted: Uint32NoValStruct | None = None + """ + GrpSubmitJobs + """ + wall_clock: Uint32NoValStruct | None = None + """ + MaxWallDurationPerJob + """ class Jobs(BaseModel): - accruing: Uint32NoVal | None = None - active: Uint32NoVal | None = None + accruing: Uint32NoValStruct | None = None + """ + MaxJobsAccrue + """ + active: Uint32NoValStruct | None = None + """ + MaxJobs + """ per: Per | None = None - total: Uint32NoVal | None = None + total: Uint32NoValStruct | None = None + """ + MaxSubmitJobs + """ class Account1(BaseModel): - wall_clock: Uint32NoVal | None = None + wall_clock: Uint32NoValStruct | None = None + """ + GrpWall + """ class Per1(BaseModel): @@ -1365,21 +1787,39 @@ class Per1(BaseModel): class Group(BaseModel): active: TresList | None = None + """ + GrpTRESRunMins + """ minutes: TresList | None = None + """ + GrpTRESMins + """ class Per2(BaseModel): job: TresList | None = None + """ + MaxTRESMinsPerJob + """ class Minutes(BaseModel): per: Per2 | None = None total: TresList | None = None + """ + MaxTRESMinsPerJob + """ class Per3(BaseModel): job: TresList | None = None + """ + MaxTRESPerJob + """ node: TresList | None = None + """ + MaxTRESPerNode + """ class Tres1(BaseModel): @@ -1387,6 +1827,9 @@ class Tres1(BaseModel): minutes: Minutes | None = None per: Per3 | None = None total: TresList | None = None + """ + GrpTRES + """ class Max(BaseModel): @@ -1396,27 +1839,42 @@ class Max(BaseModel): class Min(BaseModel): - priority_threshold: Uint32NoVal | None = None - + priority_threshold: Uint32NoValStruct | None = None + """ + MinPrioThreshold + """ + class Assoc(BaseModel): account: str | None = None + """ + Account name + """ accounting: AccountingList | None = None """ - Usage accounting + Accounting records containing related resource usage """ cluster: str | None = None + """ + Cluster name + """ comment: str | None = None """ - comment for the association + Arbitrary comment """ default: Default | None = None - flags: list[Flag] | None = None - id: AssocShort | None = None + flags: AssocFlags | None = None """ - Association ID + Flags on the association + """ + id: int | None = None + """ + Unique ID """ is_default: bool | None = None + """ + Is default association for user + """ lineage: str | None = None """ Complete path up the hierarchy to the root association @@ -1424,14 +1882,29 @@ class Assoc(BaseModel): max: Max | None = None min: Min | None = None parent_account: str | None = None + """ + Name of parent account + """ partition: str | None = None - priority: Uint32NoVal | None = None + """ + Partition name + """ + priority: Uint32NoValStruct | None = None + """ + Association priority factor + """ qos: QosStringIdList | None = None """ - List of QOS names + List of available QOS names """ shares_raw: int | None = None + """ + Allocated shares used for fairshare calculation + """ user: str + """ + User name + """ class AssocList(RootModel[list[Assoc]]): @@ -1441,139 +1914,257 @@ class AssocList(RootModel[list[Assoc]]): class AssocRecSet(BaseModel): comment: str | None = None """ - Comment for the association + Arbitrary comment """ defaultqos: str | None = None """ - Which QOS id is this association default + Default QOS """ fairshare: int | None = None """ - Number of shares allocated to this association + Allocated shares used for fairshare calculation """ - grpjobs: Uint32NoVal | None = None + grpjobs: Uint32NoValStruct | None = None """ - Max number of jobs the underlying group of associations can run at one time + Maximum number of running jobs in this association and its children """ - grpjobsaccrue: Uint32NoVal | None = None + grpjobsaccrue: Uint32NoValStruct | None = None """ - Max number of jobs the underlying group of associations can have accruing priority at one time + Maximum number of pending jobs able to accrue age priority in this association and its children """ - grpsubmitjobs: Uint32NoVal | None = None + grpsubmitjobs: Uint32NoValStruct | None = None """ - Max number of jobs the underlying group of associations can submit at one time + Maximum number of jobs which can be in a pending or running state at any time in this association and its children """ grptres: TresList | None = None + """ + Maximum number of TRES able to be allocated by running jobs in this association and its children + """ grptresmins: TresList | None = None """ - Max number of cpu minutes the underlying group of associations can run for + Total number of TRES minutes that can possibly be used by past, present and future jobs in this association and its children """ grptresrunmins: TresList | None = None """ - Max number of cpu minutes the underlying group of associations can having running at one time + Maximum number of TRES minutes able to be allocated by running jobs in this association and its children """ - grpwall: Uint32NoVal | None = None + grpwall: Uint32NoValStruct | None = None """ - Total time in minutes the underlying group of associations can run for + Maximum wall clock time in minutes able to be allocated by running jobs in this association and its children """ - maxjobs: Uint32NoVal | None = None + maxjobs: Uint32NoValStruct | None = None """ - Max number of jobs this association can run at one time + Maximum number of running jobs per user in this association """ - maxjobsaccrue: Uint32NoVal | None = None + maxjobsaccrue: Uint32NoValStruct | None = None """ - Max number of jobs this association can have accruing priority time + Maximum number of pending jobs able to accrue age priority at any given time in this association """ - maxsubmitjobs: Uint32NoVal | None = None + maxsubmitjobs: Uint32NoValStruct | None = None """ - Max number of jobs that can be submitted by association + Maximum number of jobs which can be in a pending or running state at any time in this association """ maxtresminsperjob: TresList | None = None """ - Max number of cpu minutes this association can have per job + Maximum number of TRES minutes each job is able to use in this association """ maxtresperjob: TresList | None = None """ - Max number of cpus this association can allocate per job + Maximum number of TRES each job is able to use in this association """ maxtrespernode: TresList | None = None """ - Max number of TRES this association can allocate per node + Maximum number of TRES each node is able to use """ maxtresrunmins: TresList | None = None """ - Max number of cpu minutes this association can having running at one time + Maximum number of TRES minutes able to be allocated by running jobs in this association """ - maxwalldurationperjob: Uint32NoVal | None = None + maxwalldurationperjob: Uint32NoValStruct | None = None """ - Longest time this association can run a job + Maximum wall clock time each job is able to use in this association """ - minpriothresh: Uint32NoVal | None = None + minpriothresh: Uint32NoValStruct | None = None """ - Don't reserve resources for pending jobs unless they have a priority equal to or higher than this + Minimum priority required to reserve resources when scheduling """ parent: str | None = None """ Name of parent account """ - priority: Uint32NoVal | None = None + priority: Uint32NoValStruct | None = None """ - Association priority + Association priority factor """ qoslevel: QosStringIdList | None = None """ - List of QOS names + List of available QOS names + """ + + +class Fairshare(BaseModel): + factor: Float64NoValStruct | None = None + """ + Fairshare factor + """ + level: Float64NoValStruct | None = None + """ + Fairshare factor at this level; stored on an assoc as a long double, but that is not needed for display in sshare """ class ClusterRec(BaseModel): associations: Associations | None = None controller: Controller | None = None - flags: list[Flag2] | None = None + flags: ClusterRecFlags | None = None + """ + Flags + """ name: str | None = None + """ + ClusterName + """ nodes: str | None = None + """ + Node names + """ rpc_version: int | None = None + """ + RPC version used in the cluster + """ select_plugin: str | None = None tres: TresList | None = None + """ + Trackable resources + """ class ClusterRecList(RootModel[list[ClusterRec]]): root: list[ClusterRec] -class ExtSensorsData(BaseModel): - consumed_energy: Uint64NoVal | None = None - current_watts: int | None = None - energy_update_time: int | None = None - temperature: Uint32NoVal | None = None +class CronEntry(BaseModel): + command: str | None = None + """ + Command to run + """ + day_of_month: str | None = None + """ + Ranged string specifying eligible day of month values (e.g. 0-10,29) + """ + day_of_week: str | None = None + """ + Ranged string specifying eligible day of week values (e.g.0-3,7) + """ + flags: CronEntryFlags | None = None + """ + Flags + """ + hour: str | None = None + """ + Ranged string specifying eligible hour values (e.g. 0-5,23) + """ + line: Line | None = None + minute: str | None = None + """ + Ranged string specifying eligible minute values (e.g. 0-10,50) + """ + month: str | None = None + """ + Ranged string specifying eligible month values (e.g. 0-5,12) + """ + specification: str | None = None + """ + Complete time specification (* means valid for all allowed values) - minute hour day_of_month month day_of_week + """ class Array(BaseModel): job_id: int | None = None + """ + Job ID of job array, or 0 if N/A + """ limits: Limits | None = None task: str | None = None - task_id: Uint32NoVal | None = None + """ + String expression of task IDs in this record + """ + task_id: Uint32NoValStruct | None = None + """ + Task ID of this task in job array + """ class Het(BaseModel): job_id: int | None = None - job_offset: Uint32NoVal | None = None + """ + Heterogeneous job ID, if applicable + """ + job_offset: Uint32NoValStruct | None = None + """ + Unique sequence number applied to this component of the heterogeneous job + """ class Required(BaseModel): CPUs: int | None = None - memory_per_cpu: Uint64NoVal | None = None - memory_per_node: Uint64NoVal | None = None + """ + Minimum number of CPUs required + """ + memory_per_cpu: Uint64NoValStruct | None = None + """ + Minimum memory in megabytes per allocated CPU + """ + memory_per_node: Uint64NoValStruct | None = None + """ + Minimum memory in megabytes per allocated node + """ + + +class State(BaseModel): + current: JobState | None = None + """ + Current state + """ + reason: str | None = None + """ + Reason for previous Pending or Failed state + """ class Time1(BaseModel): elapsed: int | None = None + """ + Elapsed time in seconds + """ eligible: int | None = None + """ + Time when the job became eligible to run (UNIX timestamp) + """ end: int | None = None - limit: Uint32NoVal | None = None + """ + End time (UNIX timestamp) + """ + limit: Uint32NoValStruct | None = None + """ + Maximum run time in minutes + """ + planned: Uint64NoValStruct | None = None + """ + Time required to start job after becoming eligible to run in seconds + """ start: int | None = None + """ + Time execution began (UNIX timestamp) + """ submission: int | None = None + """ + Time when the job was submitted (UNIX timestamp) + """ suspended: int | None = None + """ + Total time in suspended state in seconds + """ system: System | None = None total: Total | None = None user: User | None = None @@ -1581,7 +2172,13 @@ class Time1(BaseModel): class Tres3(BaseModel): allocated: TresList | None = None + """ + Trackable resources allocated to the job + """ requested: TresList | None = None + """ + Trackable resources requested by job + """ class JobArrayResponseArray(RootModel[list[JobArrayResponseMsgEntry]]): @@ -1589,175 +2186,537 @@ class JobArrayResponseArray(RootModel[list[JobArrayResponseMsgEntry]]): class Rlimits(BaseModel): - as_: Uint64NoVal | None = Field(None, alias="as") + as_: Uint64NoValStruct | None = Field(None, alias="as") """ - Address space limit. + Address space limit """ - core: Uint64NoVal | None = None + core: Uint64NoValStruct | None = None """ - Largest core file that can be created, in bytes. + Largest core file that can be created, in bytes """ - cpu: Uint64NoVal | None = None + cpu: Uint64NoValStruct | None = None """ - Per-process CPU limit, in seconds. + Per-process CPU limit, in seconds """ - data: Uint64NoVal | None = None + data: Uint64NoValStruct | None = None """ - Maximum size of data segment, in bytes. + Maximum size of data segment, in bytes """ - fsize: Uint64NoVal | None = None + fsize: Uint64NoValStruct | None = None """ - Largest file that can be created, in bytes. + Largest file that can be created, in bytes """ - memlock: Uint64NoVal | None = None + memlock: Uint64NoValStruct | None = None """ Locked-in-memory address space """ - nofile: Uint64NoVal | None = None + nofile: Uint64NoValStruct | None = None """ - Number of open files. + Number of open files """ - nproc: Uint64NoVal | None = None + nproc: Uint64NoValStruct | None = None """ - Number of processes. + Number of processes """ - rss: Uint64NoVal | None = None + rss: Uint64NoValStruct | None = None """ - Largest resident set size, in bytes. This affects swapping; processes that are exceeding their resident set size will be more likely to have physical memory taken from them. + Largest resident set size, in bytes. This affects swapping; processes that are exceeding their resident set size will be more likely to have physical memory taken from them """ - stack: Uint64NoVal | None = None + stack: Uint64NoValStruct | None = None """ - Maximum size of stack segment, in bytes. + Maximum size of stack segment, in bytes """ class JobDescMsg(BaseModel): account: str | None = None + """ + Account associated with the job + """ account_gather_frequency: str | None = None + """ + Job accounting and profiling sampling intervals in seconds + """ admin_comment: str | None = None + """ + Arbitrary comment made by administrator + """ allocation_node_list: str | None = None + """ + Local node making the resource allocation + """ allocation_node_port: int | None = None + """ + Port to send allocation confirmation to + """ argv: StringArray | None = None + """ + Arguments to the script. Note: The slurmstepd always overrides argv[0] with the path to the created script file. If this option is used, argv[0] should be a throwaway value. + """ array: str | None = None + """ + Job array index value specification + """ batch_features: str | None = None - begin_time: Uint64NoVal | None = None + """ + Features required for batch script's node + """ + begin_time: Uint64NoValStruct | None = None + """ + Defer the allocation of the job until the specified time (UNIX timestamp) + """ burst_buffer: str | None = None + """ + Burst buffer specifications + """ cluster_constraint: str | None = None + """ + Required features that a federated cluster must have to have a sibling job submitted to it + """ clusters: str | None = None + """ + Clusters that a federated job can run on + """ comment: str | None = None + """ + Arbitrary comment made by user + """ constraints: str | None = None + """ + Comma separated list of features that are required + """ container: str | None = None + """ + Absolute path to OCI container bundle + """ container_id: str | None = None + """ + OCI container ID + """ contiguous: bool | None = None + """ + True if job requires contiguous nodes + """ core_specification: int | None = None + """ + Specialized core count + """ cpu_binding: str | None = None - cpu_binding_flags: list[CpuBindingFlag] | None = None + """ + Method for binding tasks to allocated CPUs + """ + cpu_binding_flags: CpuBindingFlags | None = None + """ + Flags for CPU binding + """ cpu_frequency: str | None = None + """ + Requested CPU frequency range [-p2][:p3] + """ cpus_per_task: int | None = None + """ + Number of CPUs required by each task + """ cpus_per_tres: str | None = None + """ + Semicolon delimited list of TRES=# values values indicating how many CPUs should be allocated for each specified TRES (currently only used for gres/gpu) + """ crontab: CronEntry | None = None + """ + Specification for scrontab job + """ current_working_directory: str | None = None + """ + Working directory to use for the job + """ deadline: int | None = None + """ + Latest time that the job may start (UNIX timestamp) + """ delay_boot: int | None = None + """ + Number of seconds after job eligible start that nodes will be rebooted to satisfy feature specification + """ dependency: str | None = None + """ + Other jobs that must meet certain criteria before this job can start + """ distribution: str | None = None - distribution_plane_size: int | None = None + """ + Layout + """ + distribution_plane_size: Uint16NoValStruct | None = None + """ + Plane size specification when distribution specifies plane + """ end_time: int | None = None + """ + Expected end time (UNIX timestamp) + """ environment: StringArray | None = None + """ + Environment variables to be set for the job + """ excluded_nodes: CsvString | None = None - exclusive: list[ExclusiveEnum] | None = None + """ + Comma separated list of nodes that may not be used + """ extra: str | None = None - flags: list[Flag5] | None = None + """ + Arbitrary string used for node filtering if extra constraints are enabled + """ + flags: JobFlags | None = None + """ + Job flags + """ group_id: str | None = None + """ + Group ID of the user that owns the job + """ hetjob_group: int | None = None + """ + Unique sequence number applied to this component of the heterogeneous job + """ + hold: bool | None = None + """ + Hold (true) or release (false) job + """ immediate: bool | None = None + """ + If true, exit if resources are not available within the time period specified + """ job_id: int | None = None + """ + Job ID + """ kill_on_node_fail: bool | None = None - kill_warning_delay: Uint16NoVal | None = None - kill_warning_flags: list[KillWarningFlag] | None = None + """ + If true, kill job on node failure + """ + kill_warning_delay: Uint16NoValStruct | None = None + """ + Number of seconds before end time to send the warning signal + """ + kill_warning_flags: WarnFlags | None = None + """ + Flags related to job signals + """ kill_warning_signal: str | None = None + """ + Signal to send when approaching end time (e.g. "10" or "USR1") + """ licenses: str | None = None - mail_type: list[MailTypeEnum] | None = None + """ + License(s) required by the job + """ + mail_type: JobMailFlags | None = None + """ + Mail event type(s) + """ mail_user: str | None = None + """ + User to receive email notifications + """ maximum_cpus: int | None = None + """ + Maximum number of CPUs required + """ maximum_nodes: int | None = None + """ + Maximum node count + """ mcs_label: str | None = None + """ + Multi-Category Security label on the job + """ memory_binding: str | None = None - memory_binding_type: list[MemoryBindingTypeEnum] | None = None - memory_per_cpu: Uint64NoVal | None = None - memory_per_node: Uint64NoVal | None = None + """ + Binding map for map/mask_cpu + """ + memory_binding_type: MemoryBindingType | None = None + """ + Method for binding tasks to memory + """ + memory_per_cpu: Uint64NoValStruct | None = None + """ + Minimum memory in megabytes per allocated CPU + """ + memory_per_node: Uint64NoValStruct | None = None + """ + Minimum memory in megabytes per allocated node + """ memory_per_tres: str | None = None + """ + Semicolon delimited list of TRES=# values indicating how much memory in megabytes should be allocated for each specified TRES (currently only used for gres/gpu) + """ minimum_boards_per_node: int | None = None + """ + Boards per node required + """ minimum_cpus: int | None = None + """ + Minimum number of CPUs required + """ minimum_cpus_per_node: int | None = None + """ + Minimum number of CPUs per node + """ minimum_nodes: int | None = None + """ + Minimum node count + """ minimum_sockets_per_board: int | None = None + """ + Sockets per board required + """ name: str | None = None + """ + Job name + """ network: str | None = None + """ + Network specs for job step + """ nice: int | None = None + """ + Requested job priority change + """ nodes: str | None = None + """ + Node count range specification (e.g. 1-15:4) + """ ntasks_per_tres: int | None = None - open_mode: list[OpenModeEnum] | None = None + """ + Number of tasks that can access each GPU + """ + oom_kill_step: int | None = None + """ + Kill whole step in case of OOM in one of the tasks + """ + open_mode: OpenMode | None = None + """ + Open mode used for stdout and stderr files + """ overcommit: bool | None = None - oversubscribe: bool | None = None + """ + Overcommit resources + """ partition: str | None = None - power_flags: list[PowerFlag] | None = None + """ + Partition assigned to the job + """ + power_flags: list | None = None prefer: str | None = None - priority: Uint32NoVal | None = None - profile: list[ProfileEnum] | None = None - qos: str | None = None - reboot: bool | None = None - requeue: bool | None = None - required_nodes: CsvString | None = None - required_switches: Uint32NoVal | None = None + """ + Comma separated list of features that are preferred but not required + """ + priority: Uint32NoValStruct | None = None + """ + Request specific job priority + """ + profile: AcctGatherProfile | None = None + """ + Profile used by the acct_gather_profile plugin + """ + qos: str | None = None + """ + Quality of Service assigned to the job + """ + reboot: bool | None = None + """ + Node reboot requested before start + """ + requeue: bool | None = None + """ + Determines whether the job may be requeued + """ + required_nodes: CsvString | None = None + """ + Comma separated list of required nodes + """ + required_switches: Uint32NoValStruct | None = None + """ + Maximum number of switches + """ reservation: str | None = None + """ + Name of reservation to use + """ reserve_ports: int | None = None + """ + Port to send various notification msg to + """ rlimits: Rlimits | None = None script: str | None = None + """ + Job batch script; only the first component in a HetJob is populated or honored + """ + segment_size: Uint16NoValStruct | None = None + """ + Segment size for topology/block + """ selinux_context: str | None = None - shared: list[SharedEnum] | None = None + """ + SELinux context + """ + shared: JobShared | None = None + """ + How the job can share resources with other jobs, if at all + """ site_factor: int | None = None + """ + Site-specific priority factor + """ sockets_per_node: int | None = None + """ + Sockets per node required + """ spank_environment: StringArray | None = None + """ + Environment variables for job prolog/epilog scripts as set by SPANK plugins + """ standard_error: str | None = None + """ + Path to stderr file + """ standard_input: str | None = None + """ + Path to stdin file + """ standard_output: str | None = None + """ + Path to stdout file + """ tasks: int | None = None + """ + Number of tasks + """ tasks_per_board: int | None = None + """ + Number of tasks to invoke on each board + """ tasks_per_core: int | None = None + """ + Number of tasks to invoke on each core + """ tasks_per_node: int | None = None + """ + Number of tasks to invoke on each node + """ tasks_per_socket: int | None = None + """ + Number of tasks to invoke on each socket + """ temporary_disk_per_node: int | None = None + """ + Minimum tmp disk space required per node + """ thread_specification: int | None = None + """ + Specialized thread count + """ threads_per_core: int | None = None - time_limit: Uint32NoVal | None = None - time_minimum: Uint32NoVal | None = None + """ + Threads per core required + """ + time_limit: Uint32NoValStruct | None = None + """ + Maximum run time in minutes + """ + time_minimum: Uint32NoValStruct | None = None + """ + Minimum run time in minutes + """ tres_bind: str | None = None + """ + Task to TRES binding directives + """ tres_freq: str | None = None + """ + TRES frequency directives + """ tres_per_job: str | None = None + """ + Comma separated list of TRES=# values to be allocated for every job + """ tres_per_node: str | None = None + """ + Comma separated list of TRES=# values to be allocated for every node + """ tres_per_socket: str | None = None + """ + Comma separated list of TRES=# values to be allocated for every socket + """ tres_per_task: str | None = None + """ + Comma separated list of TRES=# values to be allocated for every task + """ user_id: str | None = None + """ + User ID that owns the job + """ wait_all_nodes: bool | None = None + """ + If true, wait to start until after all nodes have booted + """ wait_for_switch: int | None = None + """ + Maximum time to wait for switches in seconds + """ wckey: str | None = None - x11: list[X11Enum] | None = None + """ + Workload characterization key + """ + x11: X11Flags | None = None + """ + X11 forwarding options + """ x11_magic_cookie: str | None = None + """ + Magic cookie for X11 forwarding + """ x11_target_host: str | None = None + """ + Hostname or UNIX socket if x11_target_port=0 + """ x11_target_port: int | None = None + """ + TCP port + """ class JobDescMsgList(RootModel[list[JobDescMsg]]): root: list[JobDescMsg] -class JobRes(BaseModel): - allocated_cores: int | None = None - allocated_cpus: int | None = None - allocated_hosts: int | None = None - allocated_nodes: JobResNodes | None = None - nodes: str | None = None +class JobResCore(BaseModel): + index: int + """ + Core index + """ + status: JobResCoreStatus + """ + Core status + """ + + +class JobResCoreArray(RootModel[list[JobResCore]]): + root: list[JobResCore] + + +class JobResSocket(BaseModel): + cores: JobResCoreArray + """ + Core in socket + """ + index: int + """ + Core index + """ + + +class JobResSocketArray(RootModel[list[JobResSocket]]): + root: list[JobResSocket] class JobSubmitReq(BaseModel): @@ -1771,836 +2730,1926 @@ class JobSubmitReq(BaseModel): """ script: str | None = None """ - batch job script + Deprecated; Populate script field in jobs[0] or job """ -class OpenapiMeta(BaseModel): - client: Client | None = None - command: StringArray | None = None +class KillJobsMsg(BaseModel): + account: str | None = None """ - CLI command (if applicable) + Filter jobs to a specific account """ - plugin: Plugin | None = None - slurm: Slurm | None = None - - -class OpenapiPingArrayResp(BaseModel): - errors: OpenapiErrors | None = None + flags: WarnFlags | None = None """ - Query errors + Filter jobs according to flags """ - meta: OpenapiMeta | None = None + job_name: str | None = None """ - Slurm meta values + Filter jobs to a specific name """ - pings: ControllerPingArray + job_state: JobState | None = None """ - pings + Filter jobs to a specific state """ - warnings: OpenapiWarnings | None = None + jobs: KillJobsMsgJobsArray | None = None """ - Query warnings + List of jobs to signal """ - - -class OpenapiResp(BaseModel): - errors: OpenapiErrors | None = None + nodes: HostlistString | None = None """ - Query errors + Filter jobs to a set of nodes """ - meta: OpenapiMeta | None = None + partition: str | None = None """ - Slurm meta values + Filter jobs to a specific partition """ - warnings: OpenapiWarnings | None = None + qos: str | None = None """ - Query warnings + Filter jobs to a specific QOS """ - - -class OpenapiSlurmdbdQosRemovedResp(BaseModel): - errors: OpenapiErrors | None = None + reservation: str | None = None """ - Query errors + Filter jobs to a specific reservation """ - meta: OpenapiMeta | None = None + signal: str | None = None """ - Slurm meta values + Signal to send to jobs """ - removed_qos: StringList + user_id: str | None = None """ - removed QOS + Filter jobs to a specific numeric user id """ - warnings: OpenapiWarnings | None = None + user_name: str | None = None """ - Query warnings + Filter jobs to a specific user name + """ + wckey: str | None = None + """ + Filter jobs to a specific wckey """ -class OpenapiTresResp(BaseModel): - TRES: TresList +class KillJobsRespJob(BaseModel): + error: Error | None = None + federation: Federation | None = None + job_id: Uint32NoValStruct """ - TRES + Job ID that signaling failed """ - errors: OpenapiErrors | None = None + step_id: str """ - Query errors + Job or Step ID that signaling failed """ - meta: OpenapiMeta | None = None + + +class KillJobsRespMsg(RootModel[list[KillJobsRespJob]]): """ - Slurm meta values + List of jobs signal responses """ - warnings: OpenapiWarnings | None = None + + root: list[KillJobsRespJob] """ - Query warnings + List of jobs signal responses """ -class OpenapiUsersAddCondRespStr(BaseModel): - added_users: str +class Node(BaseModel): + active_features: CsvString | None = None """ - added_users + Currently active features """ - errors: OpenapiErrors | None = None + address: str | None = None """ - Query errors + NodeAddr, used to establish a communication path """ - meta: OpenapiMeta | None = None + alloc_cpus: int | None = None """ - Slurm meta values + Total number of CPUs currently allocated for jobs """ - warnings: OpenapiWarnings | None = None + alloc_idle_cpus: int | None = None """ - Query warnings + Total number of idle CPUs """ - - -class OpenapiWckeyRemovedResp(BaseModel): - deleted_wckeys: StringList + alloc_memory: int | None = None """ - deleted wckeys + Total memory in MB currently allocated for jobs """ - errors: OpenapiErrors | None = None + architecture: str | None = None """ - Query errors + Computer architecture """ - meta: OpenapiMeta | None = None + boards: int | None = None """ - Slurm meta values + Number of Baseboards in nodes with a baseboard controller """ - warnings: OpenapiWarnings | None = None + boot_time: Uint64NoValStruct | None = None """ - Query warnings + Time when the node booted (UNIX timestamp) """ - - -class Defaults(BaseModel): - job: str | None = None - memory_per_cpu: int | None = None - partition_memory_per_cpu: Uint64NoVal | None = None - partition_memory_per_node: Uint64NoVal | None = None - time: Uint32NoVal | None = None - - -class Maximums(BaseModel): - cpus_per_node: Uint32NoVal | None = None - cpus_per_socket: Uint32NoVal | None = None - memory_per_cpu: int | None = None - nodes: Uint32NoVal | None = None - over_time_limit: Uint16NoVal | None = None - oversubscribe: Oversubscribe | None = None - partition_memory_per_cpu: Uint64NoVal | None = None - partition_memory_per_node: Uint64NoVal | None = None - shares: int | None = None - time: Uint32NoVal | None = None - - -class Timeouts(BaseModel): - resume: Uint16NoVal | None = None - suspend: Uint16NoVal | None = None - - -class PartitionInfo(BaseModel): - accounts: Accounts | None = None - alternate: str | None = None - cluster: str | None = None - cpus: Cpus | None = None - defaults: Defaults | None = None - grace_time: int | None = None - groups: Groups | None = None - maximums: Maximums | None = None - minimums: Minimums | None = None - name: str | None = None - node_sets: str | None = None - nodes: Nodes1 | None = None - partition: Partition | None = None - priority: Priority | None = None - qos: Qos | None = None - suspend_time: Uint32NoVal | None = None - timeouts: Timeouts | None = None - tres: Tres4 | None = None - - -class PartitionInfoMsg(RootModel[list[PartitionInfo]]): - root: list[PartitionInfo] - - -class PowerMgmtData(BaseModel): - current_watts: int | None = None - lowest_watts: int | None = None - maximum_watts: Uint32NoVal | None = None - new_job_time: Uint64NoVal | None = None - new_maximum_watts: int | None = None - peak_watts: int | None = None - state: int | None = None - time_start_day: int | None = None - total_energy: int | None = None - - -class Signal(BaseModel): - id: Uint16NoVal | None = None + burstbuffer_network_address: str | None = None """ - Signal sent to process (numeric) + Alternate network path to be used for sbcast network traffic """ - name: str | None = None + cluster_name: str | None = None """ - Signal sent to process + Cluster name (only set in federated environments) """ - - -class ProcessExitCodeVerbose(BaseModel): - return_code: Uint32NoVal | None = None + comment: str | None = None """ - Process return code (numeric) + Arbitrary comment """ - signal: Signal | None = None - status: list[StatusEnum] | None = None + cores: int | None = None """ - Status given by return code + Number of cores in a single physical processor socket """ + cpu_binding: int | None = None + """ + Default method for binding tasks to allocated CPUs + """ + cpu_load: int | None = None + """ + CPU load as reported by the OS + """ + cpus: int | None = None + """ + Total CPUs, including cores and threads + """ + effective_cpus: int | None = None + """ + Number of effective CPUs (excluding specialized CPUs) + """ + energy: AcctGatherEnergy | None = None + """ + Energy usage data + """ + external_sensors: dict[str, Any] | None = None + extra: str | None = None + """ + Arbitrary string used for node filtering if extra constraints are enabled + """ + features: CsvString | None = None + """ + Available features + """ + free_mem: Uint64NoValStruct | None = None + """ + Total memory in MB currently free as reported by the OS + """ + gpu_spec: str | None = None + """ + CPU cores reserved for jobs that also use a GPU + """ + gres: str | None = None + """ + Generic resources + """ + gres_drained: str | None = None + """ + Drained generic resources + """ + gres_used: str | None = None + """ + Generic resources currently in use + """ + hostname: str | None = None + """ + NodeHostname + """ + instance_id: str | None = None + """ + Cloud instance ID + """ + instance_type: str | None = None + """ + Cloud instance type + """ + last_busy: Uint64NoValStruct | None = None + """ + Time when the node was last busy (UNIX timestamp) + """ + mcs_label: str | None = None + """ + Multi-Category Security label + """ + name: str | None = None + """ + NodeName + """ + next_state_after_reboot: NodeStates | None = None + """ + The state the node will be assigned after rebooting + """ + operating_system: str | None = None + """ + Operating system reported by the node + """ + owner: str | None = None + """ + User allowed to run jobs on this node (unset if no restriction) + """ + partitions: CsvString | None = None + """ + Partitions containing this node + """ + port: int | None = None + """ + TCP port number of the slurmd + """ + power: dict[str, Any] | None = None + real_memory: int | None = None + """ + Total memory in MB on the node + """ + reason: str | None = None + """ + Describes why the node is in a "DOWN", "DRAINED", "DRAINING", "FAILING" or "FAIL" state + """ + reason_changed_at: Uint64NoValStruct | None = None + """ + When the reason changed (UNIX timestamp) + """ + reason_set_by_user: str | None = None + """ + User who set the reason + """ + res_cores_per_gpu: int | None = None + """ + Number of CPU cores per GPU restricted to GPU jobs + """ + reservation: str | None = None + """ + Name of reservation containing this node + """ + resume_after: Uint64NoValStruct | None = None + """ + Number of seconds after the node's state is updated to "DOWN" or "DRAIN" before scheduling a node state resume + """ + slurmd_start_time: Uint64NoValStruct | None = None + """ + Time when the slurmd started (UNIX timestamp) + """ + sockets: int | None = None + """ + Number of physical processor sockets/chips on the node + """ + specialized_cores: int | None = None + """ + Number of cores reserved for system use + """ + specialized_cpus: str | None = None + """ + Abstract CPU IDs on this node reserved for exclusive use by slurmd and slurmstepd + """ + specialized_memory: int | None = None + """ + Combined memory limit, in MB, for Slurm compute node daemons + """ + state: NodeStates | None = None + """ + Node state(s) applicable to this node + """ + temporary_disk: int | None = None + """ + Total size in MB of temporary disk storage in TmpFS + """ + threads: int | None = None + """ + Number of logical threads in a single physical core + """ + tres: str | None = None + """ + Configured trackable resources + """ + tres_used: str | None = None + """ + Trackable resources currently allocated for jobs + """ + tres_weighted: float | None = None + """ + Weighted number of billable trackable resources allocated + """ + version: str | None = None + """ + Slurmd version + """ + weight: int | None = None + """ + Weight of the node for scheduling purposes + """ + + +class Nodes1(RootModel[list[Node]]): + root: list[Node] + + +class OpenapiMeta(BaseModel): + client: Client | None = None + command: StringArray | None = None + """ + CLI command (if applicable) + """ + plugin: Plugin | None = None + slurm: Slurm | None = None + + +class OpenapiNodesResp(BaseModel): + errors: OpenapiErrors | None = None + """ + Query errors + """ + last_update: Uint64NoValStruct + """ + Time of last node change (UNIX timestamp) + """ + meta: OpenapiMeta | None = None + """ + Slurm meta values + """ + nodes: Nodes1 + """ + List of nodes + """ + warnings: OpenapiWarnings | None = None + """ + Query warnings + """ + + +class OpenapiPingArrayResp(BaseModel): + errors: OpenapiErrors | None = None + """ + Query errors + """ + meta: OpenapiMeta | None = None + """ + Slurm meta values + """ + pings: ControllerPingArray + """ + pings + """ + warnings: OpenapiWarnings | None = None + """ + Query warnings + """ + + +class OpenapiResp(BaseModel): + errors: OpenapiErrors | None = None + """ + Query errors + """ + meta: OpenapiMeta | None = None + """ + Slurm meta values + """ + warnings: OpenapiWarnings | None = None + """ + Query warnings + """ + + +class Defaults(BaseModel): + job: str | None = None + """ + JobDefaults + """ + memory_per_cpu: int | None = None + """ + DefMemPerCPU or DefMemPerNode + """ + partition_memory_per_cpu: Uint64NoValStruct | None = None + """ + DefMemPerCPU + """ + partition_memory_per_node: Uint64NoValStruct | None = None + """ + DefMemPerNode + """ + time: Uint32NoValStruct | None = None + """ + DefaultTime in minutes + """ + + +class Maximums(BaseModel): + cpus_per_node: Uint32NoValStruct | None = None + """ + MaxCPUsPerNode + """ + cpus_per_socket: Uint32NoValStruct | None = None + """ + MaxCPUsPerSocket + """ + memory_per_cpu: int | None = None + """ + MaxMemPerCPU or MaxMemPerNode + """ + nodes: Uint32NoValStruct | None = None + """ + MaxNodes + """ + over_time_limit: Uint16NoValStruct | None = None + """ + OverTimeLimit + """ + oversubscribe: Oversubscribe | None = None + partition_memory_per_cpu: Uint64NoValStruct | None = None + """ + MaxMemPerCPU + """ + partition_memory_per_node: Uint64NoValStruct | None = None + """ + MaxMemPerNode + """ + shares: int | None = None + """ + OverSubscribe + """ + time: Uint32NoValStruct | None = None + """ + MaxTime + """ + + +class Partition(BaseModel): + state: PartitionStates | None = None + """ + Current state(s) + """ + + +class Timeouts(BaseModel): + resume: Uint16NoValStruct | None = None + """ + ResumeTimeout (GLOBAL if both set and infinite are false) + """ + suspend: Uint16NoValStruct | None = None + """ + SuspendTimeout (GLOBAL if both set and infinite are false) + """ + + +class PartitionInfo(BaseModel): + accounts: Accounts | None = None + alternate: str | None = None + """ + Alternate + """ + cluster: str | None = None + """ + Cluster name + """ + cpus: Cpus1 | None = None + defaults: Defaults | None = None + grace_time: int | None = None + """ + GraceTime + """ + groups: Groups | None = None + maximums: Maximums | None = None + minimums: Minimums | None = None + name: str | None = None + """ + PartitionName + """ + node_sets: str | None = None + """ + NodeSets + """ + nodes: Nodes2 | None = None + partition: Partition | None = None + priority: Priority | None = None + qos: Qos | None = None + select_type: CrType | None = None + """ + Scheduler consumable resource selection type + """ + suspend_time: Uint32NoValStruct | None = None + """ + SuspendTime (GLOBAL if both set and infinite are false) + """ + timeouts: Timeouts | None = None + tres: Tres4 | None = None + + +class PartitionInfoMsg(RootModel[list[PartitionInfo]]): + root: list[PartitionInfo] + + +class Signal(BaseModel): + id: Uint16NoValStruct | None = None + """ + Signal sent to process (numeric) + """ + name: str | None = None + """ + Signal sent to process (name) + """ + + +class ProcessExitCodeVerbose(BaseModel): + return_code: Uint32NoValStruct | None = None + """ + Process return code (numeric) + """ + signal: Signal | None = None + status: ProcessExitCodeStatus | None = None + """ + Status given by return code + """ + + +class Per4(BaseModel): + account: Uint32NoValStruct | None = None + """ + MaxJobsAccruePerAccount + """ + user: Uint32NoValStruct | None = None + """ + MaxJobsAccruePerUser + """ + + +class Accruing(BaseModel): + per: Per4 | None = None + + +class ActiveJobs(BaseModel): + accruing: Uint32NoValStruct | None = None + """ + GrpJobsAccrue + """ + count: Uint32NoValStruct | None = None + """ + GrpJobs + """ + + +class Per5(BaseModel): + account: Uint32NoValStruct | None = None + """ + MaxJobsPerAccount + """ + user: Uint32NoValStruct | None = None + """ + MaxJobsPerUser + """ + + +class ActiveJobs1(BaseModel): + per: Per5 | None = None + + +class Per6(BaseModel): + account: Uint32NoValStruct | None = None + """ + MaxSubmitJobsPerAccount + """ + user: Uint32NoValStruct | None = None + """ + MaxSubmitJobsPerUser + """ + + +class Jobs1(BaseModel): + active_jobs: ActiveJobs1 | None = None + count: Uint32NoValStruct | None = None + """ + GrpSubmitJobs + """ + per: Per6 | None = None + + +class Per7(BaseModel): + account: TresList | None = None + """ + MaxTRESRunMinsPerAccount + """ + job: TresList | None = None + """ + MaxTRESMinsPerJob + """ + qos: TresList | None = None + """ + GrpTRESRunMins + """ + user: TresList | None = None + """ + MaxTRESRunMinsPerUser + """ + + +class Minutes1(BaseModel): + per: Per7 | None = None + total: TresList | None = None + """ + GrpTRESMins + """ + + +class Per8(BaseModel): + account: TresList | None = None + """ + MaxTRESPerAccount + """ + job: TresList | None = None + """ + MaxTRESPerJob + """ + node: TresList | None = None + """ + MaxTRESPerNode + """ + user: TresList | None = None + """ + MaxTRESPerUser + """ + + +class Tres5(BaseModel): + minutes: Minutes1 | None = None + per: Per8 | None = None + total: TresList | None = None + """ + GrpTRES + """ + + +class Per9(BaseModel): + job: Uint32NoValStruct | None = None + """ + MaxWallDurationPerJob + """ + qos: Uint32NoValStruct | None = None + """ + GrpWall + """ + + +class WallClock(BaseModel): + per: Per9 | None = None + + +class Max2(BaseModel): + accruing: Accruing | None = None + active_jobs: ActiveJobs | None = None + jobs: Jobs1 | None = None + tres: Tres5 | None = None + wall_clock: WallClock | None = None + + +class Per10(BaseModel): + job: TresList | None = None + """ + MinTRES + """ + + +class Tres6(BaseModel): + per: Per10 | None = None + + +class Min1(BaseModel): + priority_threshold: Uint32NoValStruct | None = None + """ + MinPrioThreshold + """ + tres: Tres6 | None = None + + +class Limits1(BaseModel): + factor: Float64NoValStruct | None = None + """ + LimitFactor + """ + grace_time: int | None = None + """ + GraceTime + """ + max: Max2 | None = None + min: Min1 | None = None + + +class Preempt(BaseModel): + exempt_time: Uint32NoValStruct | None = None + """ + PreemptExemptTime + """ + list: QosPreemptList | None = None + """ + Other QOS's this QOS can preempt + """ + mode: QosPreemptModes | None = None + """ + PreemptMode + """ + + +class Qos1(BaseModel): + description: str | None = None + """ + Arbitrary description + """ + flags: QosFlags | None = None + """ + Flags, to avoid modifying current values specify NOT_SET + """ + id: int | None = None + """ + Unique ID + """ + limits: Limits1 | None = None + name: str | None = None + """ + Name + """ + preempt: Preempt | None = None + priority: Uint32NoValStruct | None = None + """ + Priority + """ + usage_factor: Float64NoValStruct | None = None + """ + UsageFactor + """ + usage_threshold: Float64NoValStruct | None = None + """ + UsageThreshold + """ + + +class QosList(RootModel[list[Qos1]]): + root: list[Qos1] + + +class PurgeCompleted(BaseModel): + time: Uint32NoValStruct | None = None + """ + If PURGE_COMP flag is set, the number of seconds this reservation will sit idle until it is revoked + """ + + +class ReservationInfo(BaseModel): + accounts: str | None = None + """ + Comma separated list of permitted accounts + """ + burst_buffer: str | None = None + """ + BurstBuffer + """ + core_count: int | None = None + """ + CoreCnt + """ + core_specializations: ReservationInfoCoreSpec | None = None + """ + Reserved cores specification + """ + end_time: Uint64NoValStruct | None = None + """ + EndTime (UNIX timestamp) + """ + features: str | None = None + """ + Features + """ + flags: ReservationFlags | None = None + """ + Flags associated with this reservation + """ + groups: str | None = None + """ + Groups + """ + licenses: str | None = None + """ + Licenses + """ + max_start_delay: int | None = None + """ + MaxStartDelay in seconds + """ + name: str | None = None + """ + ReservationName + """ + node_count: int | None = None + """ + NodeCnt + """ + node_list: str | None = None + """ + Nodes + """ + partition: str | None = None + """ + PartitionName + """ + purge_completed: PurgeCompleted | None = None + start_time: Uint64NoValStruct | None = None + """ + StartTime (UNIX timestamp) + """ + tres: str | None = None + """ + Comma separated list of required TRES + """ + users: str | None = None + """ + Comma separated list of permitted users + """ + watts: Uint32NoValStruct | None = None + """ + 32 bit integer number with flags + """ + + +class ReservationInfoMsg(RootModel[list[ReservationInfo]]): + root: list[ReservationInfo] + + +class SharesUint64Tres(BaseModel): + name: str | None = None + """ + TRES name + """ + value: Uint64NoValStruct | None = None + """ + TRES value + """ + + +class SharesUint64TresList(RootModel[list[SharesUint64Tres]]): + root: list[SharesUint64Tres] + + +class StatsMsgRpcType(BaseModel): + average_time: Uint64NoValStruct + """ + Average time spent processing RPC in seconds + """ + count: int + """ + Number of RPCs received + """ + cycle_last: int + """ + Number of RPCs processed within the last RPC queue cycle + """ + cycle_max: int + """ + Maximum number of RPCs processed within a RPC queue cycle since start + """ + dropped: int + """ + Number of RPCs dropped + """ + message_type: str + """ + Message type as string + """ + queued: int + """ + Number of RPCs queued + """ + total_time: int + """ + Total time spent processing RPC in seconds + """ + type_id: int + """ + Message type as integer + """ + + +class StatsMsgRpcUser(BaseModel): + average_time: Uint64NoValStruct + """ + Average time spent processing RPC in seconds + """ + count: int + """ + Number of RPCs received + """ + total_time: int + """ + Total time spent processing RPC in seconds + """ + user: str + """ + User name + """ + user_id: int + """ + User ID (numeric) + """ + + +class StatsMsgRpcsByType(RootModel[list[StatsMsgRpcType]]): + """ + RPCs by type + """ + + root: list[StatsMsgRpcType] + """ + RPCs by type + """ + + +class StatsMsgRpcsByUser(RootModel[list[StatsMsgRpcUser]]): + """ + RPCs by user + """ + + root: list[StatsMsgRpcUser] + """ + RPCs by user + """ + + +class StatsRec(BaseModel): + RPCs: StatsRpcList | None = None + """ + List of RPCs sent to the slurmdbd + """ + rollups: RollupStats | None = None + """ + Rollup statistics + """ + time_start: int | None = None + """ + When data collection started (UNIX timestamp) + """ + users: StatsUserList | None = None + """ + List of users that issued RPCs + """ + + +class RequestedFrequency(BaseModel): + max: Uint32NoValStruct | None = None + """ + Maximum requested CPU frequency in kHz + """ + min: Uint32NoValStruct | None = None + """ + Minimum requested CPU frequency in kHz + """ + + +class CPU(BaseModel): + governor: str | None = None + """ + Requested CPU frequency governor in kHz + """ + requested_frequency: RequestedFrequency | None = None -class Per4(BaseModel): - account: Uint32NoVal | None = None - user: Uint32NoVal | None = None - - -class Accruing(BaseModel): - per: Per4 | None = None - - -class ActiveJobs(BaseModel): - accruing: Uint32NoVal | None = None - count: Uint32NoVal | None = None - - -class ActiveJobs1(BaseModel): - per: Per4 | None = None - - -class Jobs1(BaseModel): - active_jobs: ActiveJobs1 | None = None - per: Per4 | None = None - - -class Per7(BaseModel): - account: TresList | None = None - job: TresList | None = None - qos: TresList | None = None - user: TresList | None = None +class Energy(BaseModel): + consumed: Uint64NoValStruct | None = None + """ + Total energy consumed by all tasks in a job in joules + """ -class Minutes1(BaseModel): - per: Per7 | None = None +class Statistics(BaseModel): + CPU: CPU1 | None = None + energy: Energy | None = None -class Per8(BaseModel): - account: TresList | None = None - job: TresList | None = None - node: TresList | None = None - user: TresList | None = None +class Time4(BaseModel): + elapsed: int | None = None + """ + Elapsed time in seconds + """ + end: Uint64NoValStruct | None = None + """ + End time (UNIX timestamp) + """ + start: Uint64NoValStruct | None = None + """ + Time execution began (UNIX timestamp) + """ + suspended: int | None = None + """ + Total time in suspended state in seconds + """ + system: System1 | None = None + total: Total1 | None = None + user: User1 | None = None -class Tres5(BaseModel): - minutes: Minutes1 | None = None - per: Per8 | None = None - total: TresList | None = None +class StepTresReqMax(RootModel[list[Tres]]): + root: list[Tres] -class Per9(BaseModel): - job: Uint32NoVal | None = None - qos: Uint32NoVal | None = None +class StepTresReqMin(RootModel[list[Tres]]): + root: list[Tres] -class WallClock(BaseModel): - per: Per9 | None = None +class StepTresUsageMax(RootModel[list[Tres]]): + root: list[Tres] -class Max2(BaseModel): - accruing: Accruing | None = None - active_jobs: ActiveJobs | None = None - jobs: Jobs1 | None = None - tres: Tres5 | None = None - wall_clock: WallClock | None = None +class StepTresUsageMin(RootModel[list[Tres]]): + root: list[Tres] -class Per10(BaseModel): - job: TresList | None = None +class UsersAddCond(BaseModel): + accounts: StringList | None = None + """ + CSV accounts list + """ + association: AssocRecSet | None = None + """ + Association limits and options + """ + clusters: StringList | None = None + """ + CSV clusters list + """ + partitions: StringList | None = None + """ + CSV partitions list + """ + users: StringList + """ + CSV users list + """ + wckeys: StringList | None = None + """ + CSV WCKeys list + """ -class Tres6(BaseModel): - per: Per10 | None = None +class Wckey(BaseModel): + accounting: AccountingList | None = None + """ + Accounting records containing related resource usage + """ + cluster: str + """ + Cluster name + """ + flags: WckeyFlags | None = None + """ + Flags associated with this WCKey + """ + id: int | None = None + """ + Unique ID for this user-cluster-wckey combination + """ + name: str + """ + WCKey name + """ + user: str + """ + User name + """ -class Min1(BaseModel): - priority_threshold: Uint32NoVal | None = None - tres: Tres6 | None = None +class WckeyList(RootModel[list[Wckey]]): + root: list[Wckey] -class Limits1(BaseModel): - factor: Float64NoVal | None = None - grace_time: int | None = None - max: Max2 | None = None - min: Min1 | None = None +class AccountsAddCond(BaseModel): + accounts: StringList + """ + CSV accounts list + """ + association: AssocRecSet | None = None + """ + Association limits and options + """ + clusters: StringList | None = None + """ + CSV clusters list + """ -class Preempt(BaseModel): - exempt_time: Uint32NoVal | None = None - list_: QosPreemptList | None = Field(default=None, alias="list") - mode: list[ModeEnum] | None = None +class Tres2(BaseModel): + group_minutes: SharesUint64TresList | None = None + """ + TRES-minute limit + """ + run_seconds: SharesUint64TresList | None = None + """ + Currently running tres-secs = grp_used_tres_run_secs + """ + usage: SharesFloat128TresList | None = None + """ + Measure of each TRES usage + """ -class Qos1(BaseModel): - description: str | None = None - flags: list[Flag9] | None = None +class AssocSharesObjWrap(BaseModel): + cluster: str | None = None + """ + Cluster name + """ + effective_usage: Float64NoValStruct | None = None + """ + Effective, normalized usage + """ + fairshare: Fairshare | None = None id: int | None = None - limits: Limits1 | None = None + """ + Association ID + """ name: str | None = None - preempt: Preempt | None = None - priority: Uint32NoVal | None = None - usage_factor: Float64NoVal | None = None - usage_threshold: Float64NoVal | None = None + """ + Share name + """ + parent: str | None = None + """ + Parent name + """ + partition: str | None = None + """ + Partition name + """ + shares: Uint32NoValStruct | None = None + """ + Number of shares allocated + """ + shares_normalized: Float64NoValStruct | None = None + """ + Normalized shares + """ + tres: Tres2 | None = None + type: AssocSharesObjWrapType | None = None + """ + User or account association + """ + usage: int | None = None + """ + Measure of tresbillableunits usage + """ + usage_normalized: Float64NoValStruct | None = None + """ + Normalized usage + """ -class QosList(RootModel[list[Qos1]]): - root: list[Qos1] +class JobAllocReq(BaseModel): + hetjob: JobDescMsgList | None = None + """ + HetJob description + """ + job: JobDescMsg | None = None + """ + Job description + """ -class PurgeCompleted(BaseModel): - time: Uint32NoVal | None = None +class JobResNode(BaseModel): + cpus: Cpus | None = None + index: int + """ + Node index + """ + memory: Memory | None = None + name: str + """ + Node name + """ + sockets: JobResSocketArray + """ + Socket allocations in node + """ + + +class JobResNodes(RootModel[list[JobResNode]]): + """ + Job resources for a node + """ + + root: list[JobResNode] + """ + Job resources for a node + """ + + +class OpenapiJobAllocResp(BaseModel): + errors: OpenapiErrors | None = None + """ + Query errors + """ + job_id: int | None = None + """ + Submitted Job ID + """ + job_submit_user_msg: str | None = None + """ + Job submission user message + """ + meta: OpenapiMeta | None = None + """ + Slurm meta values + """ + warnings: OpenapiWarnings | None = None + """ + Query warnings + """ + + +class OpenapiJobPostResponse(BaseModel): + errors: OpenapiErrors | None = None + """ + Query errors + """ + meta: OpenapiMeta | None = None + """ + Slurm meta values + """ + results: JobArrayResponseArray | None = None + """ + Job update results + """ + warnings: OpenapiWarnings | None = None + """ + Query warnings + """ + + +class OpenapiJobSubmitResponse(BaseModel): + errors: OpenapiErrors | None = None + """ + Query errors + """ + job_id: int | None = None + """ + submitted Job ID + """ + job_submit_user_msg: str | None = None + """ + Job submission user message + """ + meta: OpenapiMeta | None = None + """ + Slurm meta values + """ + step_id: str | None = None + """ + submitted Step ID + """ + warnings: OpenapiWarnings | None = None + """ + Query warnings + """ + + +class OpenapiKillJobResp(BaseModel): + errors: OpenapiErrors | None = None + """ + Query errors + """ + meta: OpenapiMeta | None = None + """ + Slurm meta values + """ + status: KillJobsRespMsg + """ + resultant status of signal request + """ + warnings: OpenapiWarnings | None = None + """ + Query warnings + """ -class ReservationInfo(BaseModel): - accounts: str | None = None - burst_buffer: str | None = None - core_count: int | None = None - core_specializations: ReservationInfoCoreSpec | None = None - end_time: Uint64NoVal | None = None - features: str | None = None - flags: list[Flag10] | None = None - groups: str | None = None - licenses: str | None = None - max_start_delay: int | None = None - name: str | None = None - node_count: int | None = None - node_list: str | None = None - partition: str | None = None - purge_completed: PurgeCompleted | None = None - start_time: Uint64NoVal | None = None - tres: str | None = None - users: str | None = None - watts: Uint32NoVal | None = None +class OpenapiKillJobsResp(BaseModel): + errors: OpenapiErrors | None = None + """ + Query errors + """ + meta: OpenapiMeta | None = None + """ + Slurm meta values + """ + status: KillJobsRespMsg + """ + resultant status of signal request + """ + warnings: OpenapiWarnings | None = None + """ + Query warnings + """ -class ReservationInfoMsg(RootModel[list[ReservationInfo]]): - root: list[ReservationInfo] +class OpenapiLicensesResp(BaseModel): + errors: OpenapiErrors | None = None + """ + Query errors + """ + last_update: Uint64NoValStruct + """ + Time of last licenses change (UNIX timestamp) + """ + licenses: Licenses + """ + List of licenses + """ + meta: OpenapiMeta | None = None + """ + Slurm meta values + """ + warnings: OpenapiWarnings | None = None + """ + Query warnings + """ -class SharesUint64Tres(BaseModel): - name: str | None = None +class OpenapiPartitionResp(BaseModel): + errors: OpenapiErrors | None = None """ - TRES name + Query errors """ - value: Uint64NoVal | None = None + last_update: Uint64NoValStruct """ - TRES value + Time of last partition change (UNIX timestamp) + """ + meta: OpenapiMeta | None = None + """ + Slurm meta values + """ + partitions: PartitionInfoMsg + """ + List of partitions + """ + warnings: OpenapiWarnings | None = None + """ + Query warnings """ -class SharesUint64TresList(RootModel[list[SharesUint64Tres]]): - root: list[SharesUint64Tres] +class OpenapiReservationResp(BaseModel): + errors: OpenapiErrors | None = None + """ + Query errors + """ + last_update: Uint64NoValStruct + """ + Time of last reservation change (UNIX timestamp) + """ + meta: OpenapiMeta | None = None + """ + Slurm meta values + """ + reservations: ReservationInfoMsg + """ + List of reservations + """ + warnings: OpenapiWarnings | None = None + """ + Query warnings + """ class StatsMsg(BaseModel): agent_count: int | None = None + """ + Number of agent threads + """ agent_queue_size: int | None = None + """ + Number of enqueued outgoing RPC requests in an internal retry list + """ agent_thread_count: int | None = None + """ + Total number of active threads created by all agent threads + """ bf_active: bool | None = None + """ + Backfill scheduler currently running + """ bf_backfilled_het_jobs: int | None = None + """ + Number of heterogeneous job components started through backfilling since last Slurm start + """ bf_backfilled_jobs: int | None = None + """ + Number of jobs started through backfilling since last slurm start + """ bf_cycle_counter: int | None = None + """ + Number of backfill scheduling cycles since last reset + """ bf_cycle_last: int | None = None + """ + Execution time in microseconds of last backfill scheduling cycle + """ + bf_cycle_max: int | None = None + """ + Execution time in microseconds of longest backfill scheduling cycle + """ bf_cycle_mean: int | None = None + """ + Mean time in microseconds of backfilling scheduling cycles since last reset + """ bf_cycle_sum: int | None = None + """ + Total time in microseconds of backfilling scheduling cycles since last reset + """ bf_depth_mean: int | None = None + """ + Mean number of eligible to run jobs processed during all backfilling scheduling cycles since last reset + """ bf_depth_mean_try: int | None = None + """ + The subset of Depth Mean that the backfill scheduler attempted to schedule + """ bf_depth_sum: int | None = None + """ + Total number of jobs processed during all backfilling scheduling cycles since last reset + """ bf_depth_try_sum: int | None = None + """ + Subset of bf_depth_sum that the backfill scheduler attempted to schedule + """ bf_exit: BfExitFields | None = None + """ + Reasons for which the backfill scheduling cycle exited since last reset + """ bf_last_backfilled_jobs: int | None = None + """ + Number of jobs started through backfilling since last reset + """ bf_last_depth: int | None = None + """ + Number of processed jobs during last backfilling scheduling cycle + """ bf_last_depth_try: int | None = None + """ + Number of processed jobs during last backfilling scheduling cycle that had a chance to start using available resources + """ bf_queue_len: int | None = None + """ + Number of jobs pending to be processed by backfilling algorithm + """ bf_queue_len_mean: int | None = None + """ + Mean number of jobs pending to be processed by backfilling algorithm + """ bf_queue_len_sum: int | None = None + """ + Total number of jobs pending to be processed by backfilling algorithm since last reset + """ bf_table_size: int | None = None + """ + Number of different time slots tested by the backfill scheduler in its last iteration + """ bf_table_size_mean: int | None = None - bf_when_last_cycle: Uint64NoVal | None = None + """ + Mean number of different time slots tested by the backfill scheduler + """ + bf_table_size_sum: int | None = None + """ + Total number of different time slots tested by the backfill scheduler + """ + bf_when_last_cycle: Uint64NoValStruct | None = None + """ + When the last backfill scheduling cycle happened (UNIX timestamp) + """ dbd_agent_queue_size: int | None = None + """ + Number of messages for SlurmDBD that are queued + """ gettimeofday_latency: int | None = None - job_states_ts: Uint64NoVal | None = None + """ + Latency of 1000 calls to the gettimeofday() syscall in microseconds, as measured at controller startup + """ + job_states_ts: Uint64NoValStruct | None = None + """ + When the job state counts were gathered (UNIX timestamp) + """ jobs_canceled: int | None = None + """ + Number of jobs canceled since the last reset + """ jobs_completed: int | None = None + """ + Number of jobs completed since last reset + """ jobs_failed: int | None = None + """ + Number of jobs failed due to slurmd or other internal issues since last reset + """ jobs_pending: int | None = None + """ + Number of jobs pending at the time of listed in job_state_ts + """ jobs_running: int | None = None + """ + Number of jobs running at the time of listed in job_state_ts + """ jobs_started: int | None = None + """ + Number of jobs started since last reset + """ jobs_submitted: int | None = None + """ + Number of jobs submitted since last reset + """ parts_packed: int | None = None - req_time: Uint64NoVal | None = None - req_time_start: Uint64NoVal | None = None + """ + Zero if only RPC statistic included + """ + pending_rpcs: StatsMsgRpcsQueue | None = None + """ + Pending RPC statistics + """ + pending_rpcs_by_hostlist: StatsMsgRpcsDump | None = None + """ + Pending RPCs hostlists + """ + req_time: Uint64NoValStruct | None = None + """ + When the request was made (UNIX timestamp) + """ + req_time_start: Uint64NoValStruct | None = None + """ + When the data in the report started (UNIX timestamp) + """ rpcs_by_message_type: StatsMsgRpcsByType | None = None + """ + Most frequently issued remote procedure calls (RPCs) + """ rpcs_by_user: StatsMsgRpcsByUser | None = None + """ + RPCs issued by user ID + """ + schedule_cycle_depth: int | None = None + """ + Total number of jobs processed in scheduling cycles + """ schedule_cycle_last: int | None = None + """ + Time in microseconds for last scheduling cycle + """ schedule_cycle_max: int | None = None + """ + Max time of any scheduling cycle in microseconds since last reset + """ schedule_cycle_mean: int | None = None + """ + Mean time in microseconds for all scheduling cycles since last reset + """ schedule_cycle_mean_depth: int | None = None + """ + Mean of the number of jobs processed in a scheduling cycle + """ schedule_cycle_per_minute: int | None = None + """ + Number of scheduling executions per minute + """ + schedule_cycle_sum: int | None = None + """ + Total run time in microseconds for all scheduling cycles since last reset + """ schedule_cycle_total: int | None = None + """ + Number of scheduling cycles since last reset + """ schedule_exit: ScheduleExitFields | None = None + """ + Reasons for which the scheduling cycle exited since last reset + """ schedule_queue_length: int | None = None - server_thread_count: int | None = None - - -class StatsRec(BaseModel): - RPCs: StatsRpcList | None = None - rollups: RollupStats | None = None - time_start: int | None = None - users: StatsUserList | None = None - - -class RequestedFrequency(BaseModel): - max: Uint32NoVal | None = None - min: Uint32NoVal | None = None - - -class CPU(BaseModel): - governor: str | None = None - requested_frequency: RequestedFrequency | None = None - - -class Energy(BaseModel): - consumed: Uint64NoVal | None = None - - -class Statistics(BaseModel): - CPU: CPU1 | None = None - energy: Energy | None = None - - -class Time4(BaseModel): - elapsed: int | None = None - end: Uint64NoVal | None = None - start: Uint64NoVal | None = None - suspended: int | None = None - system: System | None = None - total: Total | None = None - user: User | None = None - - -class StepTresReqMax(RootModel[list[Tres]]): - root: list[Tres] - - -class StepTresReqMin(RootModel[list[Tres]]): - root: list[Tres] - - -class StepTresUsageMax(RootModel[list[Tres]]): - root: list[Tres] - - -class StepTresUsageMin(RootModel[list[Tres]]): - root: list[Tres] - - -class UsersAddCond(BaseModel): - accounts: StringList | None = None """ - CSV accounts list + Number of jobs pending in queue """ - association: AssocRecSet | None = None + server_thread_count: int | None = None """ - Association limits and options + Number of current active slurmctld threads """ - clusters: StringList | None = None + + +class Consumed(BaseModel): + average: TresList | None = None """ - CSV clusters list + Average TRES usage consumed among all tasks """ - partitions: StringList | None = None + max: StepTresUsageMax | None = None """ - CSV partitions list + Maximum TRES usage consumed among all tasks """ - users: StringList + min: StepTresUsageMin | None = None """ - CSV users list + Minimum TRES usage consumed among all tasks """ - wckeys: StringList | None = None + total: TresList | None = None """ - CSV WCKeys list + Total TRES usage consumed among all tasks """ -class Wckey(BaseModel): - accounting: AccountingList | None = None - cluster: str - flags: list[Flag12] | None = None - id: int | None = None - name: str - user: str - - -class WckeyList(RootModel[list[Wckey]]): - root: list[Wckey] - - -class AccountsAddCond(BaseModel): - accounts: StringList +class Requested(BaseModel): + average: TresList | None = None """ - CSV accounts list + Average TRES usage requested among all tasks """ - association: AssocRecSet | None = None + max: StepTresReqMax | None = None """ - Association limits and options + Maximum TRES usage requested among all tasks """ - clusters: StringList | None = None + min: StepTresReqMin | None = None """ - CSV clusters list + Minimum TRES usage requested among all tasks + """ + total: TresList | None = None + """ + Total TRES usage requested among all tasks """ -class Tres2(BaseModel): - group_minutes: SharesUint64TresList | None = None +class Tres7(BaseModel): + allocated: TresList | None = None """ - tres-minute limit + Trackable resources allocated to the step """ - run_seconds: SharesUint64TresList | None = None + consumed: Consumed | None = None + requested: Requested | None = None + + +class Step(BaseModel): + CPU_: CPU | None = None + exit_code: ProcessExitCodeVerbose | None = None """ - currently running tres-secs = grp_used_tres_run_secs + Exit code """ - usage: SharesFloat128TresList | None = None + kill_request_user: str | None = None + """ + User ID that requested termination of the step + """ + nodes: Nodes3 | None = None + pid: str | None = None + """ + Deprecated; Process ID """ - measure of each tres usage + state: JobState | None = None """ + Current state + """ + statistics: Statistics | None = None + step: Step1 | None = None + task: Task | None = None + tasks: Tasks | None = None + time: Time4 | None = None + tres: Tres7 | None = None -class AssocSharesObjWrap(BaseModel): - cluster: str | None = None +class StepList(RootModel[list[Step]]): + root: list[Step] + + +class User2(BaseModel): + administrator_level: AdminLvl | None = None """ - cluster name + AdminLevel granted to the user """ - effective_usage: float | None = None + associations: AssocShortList | None = None """ - effective, normalized usage + Associations created for this user """ - fairshare: Fairshare | None = None - id: int | None = None + coordinators: CoordList | None = None """ - assocation id + Accounts this user is a coordinator for """ - name: str | None = None + default: Default1 | None = None + flags: UserFlags | None = None """ - share name + Flags associated with this user """ - parent: str | None = None + name: str """ - parent name + User name """ - partition: str | None = None + old_name: str | None = None """ - partition name + Previous user name """ - shares: Uint32NoVal | None = None + wckeys: WckeyList | None = None """ - number of shares allocated + List of available WCKeys """ - shares_normalized: Float64NoVal | None = None + + +class UserList(RootModel[list[User2]]): + root: list[User2] + + +class AssocSharesObjList(RootModel[list[AssocSharesObjWrap]]): + root: list[AssocSharesObjWrap] + + +class Job(BaseModel): + account: str | None = None """ - normalized shares + Account the job ran under """ - tres: Tres2 | None = None - type: list[TypeEnum] | None = None + allocation_nodes: int | None = None """ - user or account association + List of nodes allocated to the job """ - usage: int | None = None + array: Array | None = None + association: AssocShort | None = None """ - measure of tresbillableunits usage + Unique identifier for the association """ - usage_normalized: Float64NoVal | None = None + block: str | None = None """ - normalized usage + The name of the block to be used (used with Blue Gene systems) """ - - -class JobInfo(BaseModel): - account: str | None = None - accrue_time: Uint64NoVal | None = None - admin_comment: str | None = None - allocating_node: str | None = None - array_job_id: Uint32NoVal | None = None - array_max_tasks: Uint32NoVal | None = None - array_task_id: Uint32NoVal | None = None - array_task_string: str | None = None - association_id: int | None = None - batch_features: str | None = None - batch_flag: bool | None = None - batch_host: str | None = None - billable_tres: Float64NoVal | None = None - burst_buffer: str | None = None - burst_buffer_state: str | None = None cluster: str | None = None - cluster_features: str | None = None - command: str | None = None - comment: str | None = None + """ + Cluster name + """ + comment: Comment | None = None + constraints: str | None = None + """ + Feature(s) the job requested as a constraint + """ container: str | None = None - container_id: str | None = None - contiguous: bool | None = None - core_spec: int | None = None - cores_per_socket: Uint16NoVal | None = None - cpu_frequency_governor: Uint32NoVal | None = None - cpu_frequency_maximum: Uint32NoVal | None = None - cpu_frequency_minimum: Uint32NoVal | None = None - cpus: Uint32NoVal | None = None - cpus_per_task: Uint16NoVal | None = None - cpus_per_tres: str | None = None - cron: str | None = None - current_working_directory: str | None = None - deadline: Uint64NoVal | None = None - delay_boot: Uint32NoVal | None = None - dependency: str | None = None + """ + Absolute path to OCI container bundle + """ derived_exit_code: ProcessExitCodeVerbose | None = None """ - return code returned by process + Highest exit code of all job steps """ - eligible_time: Uint64NoVal | None = None - end_time: Uint64NoVal | None = None - excluded_nodes: str | None = None - exclusive: list[ExclusiveEnum] | None = None exit_code: ProcessExitCodeVerbose | None = None """ - return code returned by process + Exit code """ extra: str | None = None + """ + Arbitrary string used for node filtering if extra constraints are enabled + """ failed_node: str | None = None - features: str | None = None - federation_origin: str | None = None - federation_siblings_active: str | None = None - federation_siblings_viable: str | None = None - flags: list[Flag5] | None = None - gres_detail: JobInfoGresDetail | None = None - group_id: int | None = None - group_name: str | None = None - het_job_id: Uint32NoVal | None = None - het_job_id_set: str | None = None - het_job_offset: Uint32NoVal | None = None + """ + Name of node that caused job failure + """ + flags: SlurmdbJobFlags | None = None + """ + Flags associated with this job + """ + group: str | None = None + """ + Group ID of the user that owns the job + """ + het: Het | None = None + hold: bool | None = None + """ + Hold (true) or release (false) job + """ job_id: int | None = None - job_resources: JobRes | None = None - job_size_str: CsvString | None = None - job_state: list[JobStateEnum] | None = None - last_sched_evaluation: Uint64NoVal | None = None + """ + Job ID + """ + kill_request_user: str | None = None + """ + User ID that requested termination of the job + """ licenses: str | None = None - mail_type: list[MailTypeEnum] | None = None - mail_user: str | None = None - max_cpus: Uint32NoVal | None = None - max_nodes: Uint32NoVal | None = None - maximum_switch_wait_time: int | None = None - mcs_label: str | None = None - memory_per_cpu: Uint64NoVal | None = None - memory_per_node: Uint64NoVal | None = None - memory_per_tres: str | None = None - minimum_cpus_per_node: Uint16NoVal | None = None - minimum_switches: int | None = None - minimum_tmp_disk_per_node: Uint32NoVal | None = None - name: str | None = None - network: str | None = None - nice: int | None = None - node_count: Uint32NoVal | None = None - nodes: str | None = None - oversubscribe: bool | None = None - partition: str | None = None - power: Power | None = None - pre_sus_time: Uint64NoVal | None = None - preempt_time: Uint64NoVal | None = None - preemptable_time: Uint64NoVal | None = None - prefer: str | None = None - priority: Uint32NoVal | None = None - profile: list[ProfileEnum] | None = None - qos: str | None = None - reboot: bool | None = None - requeue: bool | None = None - required_nodes: str | None = None - resize_time: Uint64NoVal | None = None - restart_cnt: int | None = None - resv_name: str | None = None - scheduled_nodes: str | None = None - selinux_context: str | None = None - shared: list[SharedEnum] | None = None - show_flags: list[ShowFlag] | None = None - sockets_per_board: int | None = None - sockets_per_node: Uint16NoVal | None = None - standard_error: str | None = None - standard_input: str | None = None - standard_output: str | None = None - start_time: Uint64NoVal | None = None - state_description: str | None = None - state_reason: str | None = None - submit_time: Uint64NoVal | None = None - suspend_time: Uint64NoVal | None = None - system_comment: str | None = None - tasks: Uint32NoVal | None = None - tasks_per_board: Uint16NoVal | None = None - tasks_per_core: Uint16NoVal | None = None - tasks_per_node: Uint16NoVal | None = None - tasks_per_socket: Uint16NoVal | None = None - tasks_per_tres: Uint16NoVal | None = None - thread_spec: int | None = None - threads_per_core: Uint16NoVal | None = None - time_limit: Uint32NoVal | None = None - time_minimum: Uint32NoVal | None = None - tres_alloc_str: str | None = None - tres_bind: str | None = None - tres_freq: str | None = None - tres_per_job: str | None = None - tres_per_node: str | None = None - tres_per_socket: str | None = None - tres_per_task: str | None = None - tres_req_str: str | None = None - user_id: int | None = None - user_name: str | None = None - wckey: str | None = None - - -class JobInfoMsg(RootModel[list[JobInfo]]): - root: list[JobInfo] - - -class Node(BaseModel): - active_features: CsvString | None = None - address: str | None = None - alloc_cpus: int | None = None - alloc_idle_cpus: int | None = None - alloc_memory: int | None = None - architecture: str | None = None - boards: int | None = None - boot_time: Uint64NoVal | None = None - burstbuffer_network_address: str | None = None - cluster_name: str | None = None - comment: str | None = None - cores: int | None = None - cpu_binding: int | None = None - cpu_load: int | None = None - cpus: int | None = None - effective_cpus: int | None = None - energy: AcctGatherEnergy | None = None - external_sensors: ExtSensorsData | None = None - extra: str | None = None - features: CsvString | None = None - free_mem: Uint64NoVal | None = None - gres: str | None = None - gres_drained: str | None = None - gres_used: str | None = None - hostname: str | None = None - instance_id: str | None = None - instance_type: str | None = None - last_busy: Uint64NoVal | None = None - mcs_label: str | None = None - name: str | None = None - next_state_after_reboot: list[NextStateAfterRebootEnum] | None = None - operating_system: str | None = None - owner: str | None = None - partitions: CsvString | None = None - port: int | None = None - power: PowerMgmtData | None = None - real_memory: int | None = None - reason: str | None = None - reason_changed_at: Uint64NoVal | None = None - reason_set_by_user: str | None = None - reservation: str | None = None - resume_after: Uint64NoVal | None = None - slurmd_start_time: Uint64NoVal | None = None - sockets: int | None = None - specialized_cores: int | None = None - specialized_cpus: str | None = None - specialized_memory: int | None = None - state: list[StateEnum] | None = None - temporary_disk: int | None = None - threads: int | None = None - tres: str | None = None - tres_used: str | None = None - tres_weighted: float | None = None - version: str | None = None - weight: int | None = None + """ + License(s) required by the job + """ + mcs: Mcs | None = None + name: str | None = None + """ + Job name + """ + nodes: str | None = None + """ + Node(s) allocated to the job + """ + partition: str | None = None + """ + Partition assigned to the job + """ + priority: Uint32NoValStruct | None = None + """ + Request specific job priority + """ + qos: str | None = None + """ + Quality of Service assigned to the job + """ + qosreq: str | None = None + """ + Requested QOS + """ + required: Required | None = None + reservation: Reservation | None = None + restart_cnt: int | None = None + """ + How many times this job has been requeued/restarted + """ + script: str | None = None + """ + Job batch script; only the first component in a HetJob is populated or honored + """ + state: State | None = None + stderr: str | None = None + """ + Path to stderr file + """ + stderr_expanded: str | None = None + """ + Job stderr with expanded fields + """ + stdin: str | None = None + """ + Path to stdin file + """ + stdin_expanded: str | None = None + """ + Job stdin with expanded fields + """ + stdout: str | None = None + """ + Path to stdout file + """ + stdout_expanded: str | None = None + """ + Job stdout with expanded fields + """ + steps: StepList | None = None + """ + Individual steps in the job + """ + submit_line: str | None = None + """ + Command used to submit the job + """ + time: Time1 | None = None + tres: Tres3 | None = None + used_gres: str | None = None + """ + Generic resources used by job + """ + user: str | None = None + """ + User that owns the job + """ + wckey: WckeyTagStruct | None = None + """ + Workload characterization key + """ + working_directory: str | None = None + """ + Path to current working directory + """ -class Nodes(RootModel[list[Node]]): - root: list[Node] +class JobList(RootModel[list[Job]]): + root: list[Job] -class OpenapiAccountsAddCondResp(BaseModel): - account: AccountShort | None = None +class Nodes(BaseModel): + allocation: JobResNodes | None = None """ - Account organization and description + Allocated node resources """ - association_condition: AccountsAddCond | None = None + count: int | None = None """ - CSV list of accounts, association limits and options, CSV list of clusters + Number of allocated nodes """ - errors: OpenapiErrors | None = None + list: str | None = None """ - Query errors + Node(s) allocated to the job """ - meta: OpenapiMeta | None = None + select_type: NodeCrType | None = None """ - Slurm meta values + Node scheduling selection method """ - warnings: OpenapiWarnings | None = None + whole: bool | None = None """ - Query warnings + Whether whole nodes were allocated """ -class OpenapiAccountsAddCondRespStr(BaseModel): - added_accounts: str - """ - added_accounts - """ - errors: OpenapiErrors | None = None +class JobRes(BaseModel): + cpus: int """ - Query errors + Number of allocated CPUs """ - meta: OpenapiMeta | None = None + nodes: Nodes | None = None + select_type: CrType """ - Slurm meta values + Scheduler consumable resource selection type """ - warnings: OpenapiWarnings | None = None + threads_per_core: Uint16NoValStruct """ - Query warnings + Number of processor threads per CPU core """ -class OpenapiAccountsRemovedResp(BaseModel): +class OpenapiDiagResp(BaseModel): errors: OpenapiErrors | None = None """ Query errors @@ -2609,9 +4658,9 @@ class OpenapiAccountsRemovedResp(BaseModel): """ Slurm meta values """ - removed_accounts: StringList + statistics: StatsMsg """ - removed_accounts + statistics """ warnings: OpenapiWarnings | None = None """ @@ -2619,607 +4668,557 @@ class OpenapiAccountsRemovedResp(BaseModel): """ -class OpenapiAccountsResp(BaseModel): - accounts: AccountList +class SharesRespMsg(BaseModel): + shares: AssocSharesObjList | None = None """ - accounts + Association shares """ - errors: OpenapiErrors | None = None + total_shares: int | None = None """ - Query errors + Total number of shares """ - meta: OpenapiMeta | None = None + + +class JobInfo(BaseModel): + account: str | None = None """ - Slurm meta values + Account associated with the job """ - warnings: OpenapiWarnings | None = None + accrue_time: Uint64NoValStruct | None = None """ - Query warnings + When the job started accruing age priority (UNIX timestamp) """ - - -class OpenapiAssocsRemovedResp(BaseModel): - errors: OpenapiErrors | None = None + admin_comment: str | None = None """ - Query errors + Arbitrary comment made by administrator """ - meta: OpenapiMeta | None = None + allocating_node: str | None = None """ - Slurm meta values + Local node making the resource allocation """ - removed_associations: StringList + array_job_id: Uint32NoValStruct | None = None """ - removed_associations + Job ID of job array, or 0 if N/A """ - warnings: OpenapiWarnings | None = None + array_max_tasks: Uint32NoValStruct | None = None """ - Query warnings + Maximum number of simultaneously running array tasks, 0 if no limit """ - - -class OpenapiAssocsResp(BaseModel): - associations: AssocList + array_task_id: Uint32NoValStruct | None = None """ - associations + Task ID of this task in job array """ - errors: OpenapiErrors | None = None + array_task_string: str | None = None """ - Query errors + String expression of task IDs in this record """ - meta: OpenapiMeta | None = None + association_id: int | None = None """ - Slurm meta values + Unique identifier for the association """ - warnings: OpenapiWarnings | None = None + batch_features: str | None = None """ - Query warnings + Features required for batch script's node """ - - -class OpenapiClustersRemovedResp(BaseModel): - deleted_clusters: StringList + batch_flag: bool | None = None """ - deleted_clusters + True if batch job """ - errors: OpenapiErrors | None = None + batch_host: str | None = None """ - Query errors + Name of host running batch script """ - meta: OpenapiMeta | None = None + billable_tres: Float64NoValStruct | None = None """ - Slurm meta values + Billable TRES """ - warnings: OpenapiWarnings | None = None + burst_buffer: str | None = None """ - Query warnings + Burst buffer specifications """ - - -class OpenapiClustersResp(BaseModel): - clusters: ClusterRecList + burst_buffer_state: str | None = None """ - clusters + Burst buffer state details """ - errors: OpenapiErrors | None = None + cluster: str | None = None """ - Query errors + Cluster name """ - meta: OpenapiMeta | None = None + cluster_features: str | None = None """ - Slurm meta values + List of required cluster features """ - warnings: OpenapiWarnings | None = None + command: str | None = None """ - Query warnings + Executed command """ - - -class OpenapiDiagResp(BaseModel): - errors: OpenapiErrors | None = None + comment: str | None = None """ - Query errors + Arbitrary comment """ - meta: OpenapiMeta | None = None + container: str | None = None """ - Slurm meta values + Absolute path to OCI container bundle """ - statistics: StatsMsg + container_id: str | None = None """ - statistics + OCI container ID """ - warnings: OpenapiWarnings | None = None + contiguous: bool | None = None """ - Query warnings + True if job requires contiguous nodes """ - - -class OpenapiInstancesResp(BaseModel): - errors: OpenapiErrors | None = None + core_spec: int | None = None """ - Query errors + Specialized core count """ - instances: InstanceList + cores_per_socket: Uint16NoValStruct | None = None """ - instances + Cores per socket required """ - meta: OpenapiMeta | None = None + cpu_frequency_governor: Uint32NoValStruct | None = None """ - Slurm meta values + CPU frequency governor """ - warnings: OpenapiWarnings | None = None + cpu_frequency_maximum: Uint32NoValStruct | None = None """ - Query warnings + Maximum CPU frequency """ - - -class OpenapiJobInfoResp(BaseModel): - errors: OpenapiErrors | None = None + cpu_frequency_minimum: Uint32NoValStruct | None = None """ - Query errors + Minimum CPU frequency """ - jobs: JobInfoMsg + cpus: Uint32NoValStruct | None = None """ - list of jobs + Minimum number of CPUs required """ - last_backfill: Uint64NoVal + cpus_per_task: Uint16NoValStruct | None = None """ - time of last backfill scheduler run (UNIX timestamp) + Number of CPUs required by each task """ - last_update: Uint64NoVal + cpus_per_tres: str | None = None """ - time of last job change (UNIX timestamp) + Semicolon delimited list of TRES=# values indicating how many CPUs should be allocated for each specified TRES (currently only used for gres/gpu) """ - meta: OpenapiMeta | None = None + cron: str | None = None """ - Slurm meta values + Time specification for scrontab job """ - warnings: OpenapiWarnings | None = None + current_working_directory: str | None = None """ - Query warnings + Working directory to use for the job """ - - -class OpenapiJobPostResponse(BaseModel): - errors: OpenapiErrors | None = None + deadline: Uint64NoValStruct | None = None """ - Query errors + Latest time that the job may start (UNIX timestamp) """ - job_id: str | None = None + delay_boot: Uint32NoValStruct | None = None """ - First updated JobId - Use results instead + Number of seconds after job eligible start that nodes will be rebooted to satisfy feature specification """ - job_submit_user_msg: str | None = None + dependency: str | None = None """ - First updated Job submision user message - Use results instead + Other jobs that must meet certain criteria before this job can start """ - meta: OpenapiMeta | None = None + derived_exit_code: ProcessExitCodeVerbose | None = None """ - Slurm meta values + Highest exit code of all job steps """ - results: JobArrayResponseArray | None = None + eligible_time: Uint64NoValStruct | None = None """ - Job update results + Time when the job became eligible to run (UNIX timestamp) """ - step_id: str | None = None + end_time: Uint64NoValStruct | None = None """ - First updated StepID - Use results instead + End time, real or expected (UNIX timestamp) """ - warnings: OpenapiWarnings | None = None + excluded_nodes: str | None = None + """ + Comma separated list of nodes that may not be used + """ + exit_code: ProcessExitCodeVerbose | None = None + """ + Exit code of the job + """ + extra: str | None = None + """ + Arbitrary string used for node filtering if extra constraints are enabled + """ + failed_node: str | None = None + """ + Name of node that caused job failure + """ + features: str | None = None + """ + Comma separated list of features that are required + """ + federation_origin: str | None = None + """ + Origin cluster's name (when using federation) + """ + federation_siblings_active: str | None = None + """ + Active sibling job names + """ + federation_siblings_viable: str | None = None + """ + Viable sibling job names + """ + flags: JobFlags | None = None + """ + Job flags + """ + gres_detail: JobInfoGresDetail | None = None + """ + List of GRES index and counts allocated per node + """ + group_id: int | None = None + """ + Group ID of the user that owns the job + """ + group_name: str | None = None + """ + Group name of the user that owns the job + """ + het_job_id: Uint32NoValStruct | None = None + """ + Heterogeneous job ID, if applicable + """ + het_job_id_set: str | None = None + """ + Job ID range for all heterogeneous job components + """ + het_job_offset: Uint32NoValStruct | None = None + """ + Unique sequence number applied to this component of the heterogeneous job + """ + hold: bool | None = None + """ + Hold (true) or release (false) job + """ + job_id: int | None = None + """ + Job ID + """ + job_resources: JobRes | None = None + """ + Resources used by the job + """ + job_size_str: CsvString | None = None + """ + Number of nodes (in a range) required for this job + """ + job_state: JobState | None = None + """ + Current state + """ + last_sched_evaluation: Uint64NoValStruct | None = None + """ + Last time job was evaluated for scheduling (UNIX timestamp) + """ + licenses: str | None = None + """ + License(s) required by the job + """ + mail_type: JobMailFlags | None = None + """ + Mail event type(s) + """ + mail_user: str | None = None + """ + User to receive email notifications + """ + max_cpus: Uint32NoValStruct | None = None + """ + Maximum number of CPUs usable by the job + """ + max_nodes: Uint32NoValStruct | None = None """ - Query warnings + Maximum number of nodes usable by the job """ - - -class OpenapiJobSubmitResponse(BaseModel): - errors: OpenapiErrors | None = None + maximum_switch_wait_time: int | None = None """ - Query errors + Maximum time to wait for switches in seconds """ - job_id: int | None = None + mcs_label: str | None = None """ - submited JobId + Multi-Category Security label on the job """ - job_submit_user_msg: str | None = None + memory_per_cpu: Uint64NoValStruct | None = None """ - job submision user message + Minimum memory in megabytes per allocated CPU """ - meta: OpenapiMeta | None = None + memory_per_node: Uint64NoValStruct | None = None """ - Slurm meta values + Minimum memory in megabytes per allocated node """ - result: JobSubmitResponseMsg | None = None + memory_per_tres: str | None = None """ - Job submission + Semicolon delimited list of TRES=# values indicating how much memory in megabytes should be allocated for each specified TRES (currently only used for gres/gpu) """ - step_id: str | None = None + minimum_cpus_per_node: Uint16NoValStruct | None = None """ - submited StepID + Minimum number of CPUs per node """ - warnings: OpenapiWarnings | None = None + minimum_tmp_disk_per_node: Uint32NoValStruct | None = None """ - Query warnings + Minimum tmp disk space required per node """ - - -class OpenapiLicensesResp(BaseModel): - errors: OpenapiErrors | None = None + name: str | None = None """ - Query errors + Job name """ - last_update: Uint64NoVal + network: str | None = None """ - time of last licenses change (UNIX timestamp) + Network specs for the job """ - licenses: Licenses + nice: int | None = None """ - list of licenses + Requested job priority change """ - meta: OpenapiMeta | None = None + node_count: Uint32NoValStruct | None = None """ - Slurm meta values + Minimum number of nodes required """ - warnings: OpenapiWarnings | None = None + nodes: str | None = None """ - Query warnings + Node(s) allocated to the job """ - - -class OpenapiNodesResp(BaseModel): - errors: OpenapiErrors | None = None + partition: str | None = None """ - Query errors + Partition assigned to the job """ - last_update: Uint64NoVal + power: Power | None = None + pre_sus_time: Uint64NoValStruct | None = None """ - time of last node change (UNIX timestamp) + Total run time prior to last suspend in seconds """ - meta: OpenapiMeta | None = None + preempt_time: Uint64NoValStruct | None = None """ - Slurm meta values + Time job received preemption signal (UNIX timestamp) """ - nodes: Nodes + preemptable_time: Uint64NoValStruct | None = None """ - list of nodes + Time job becomes eligible for preemption (UNIX timestamp) """ - warnings: OpenapiWarnings | None = None + prefer: str | None = None """ - Query warnings + Feature(s) the job requested but that are not required """ - - -class OpenapiPartitionResp(BaseModel): - errors: OpenapiErrors | None = None + priority: Uint32NoValStruct | None = None """ - Query errors + Request specific job priority """ - last_update: Uint64NoVal + priority_by_partition: PriorityByPartition | None = None """ - time of last partition change (UNIX timestamp) + Prospective job priority in each partition that may be used by this job """ - meta: OpenapiMeta | None = None + profile: AcctGatherProfile | None = None """ - Slurm meta values + Profile used by the acct_gather_profile plugin """ - partitions: PartitionInfoMsg + qos: str | None = None """ - list of partitions + Quality of Service assigned to the job, if pending the QOS requested """ - warnings: OpenapiWarnings | None = None + reboot: bool | None = None """ - Query warnings + Node reboot requested before start """ - - -class OpenapiReservationResp(BaseModel): - errors: OpenapiErrors | None = None + requeue: bool | None = None """ - Query errors + Determines whether the job may be requeued """ - last_update: Uint64NoVal + required_nodes: str | None = None """ - time of last reservation change (UNIX timestamp) + Comma separated list of required nodes """ - meta: OpenapiMeta | None = None + required_switches: int | None = None """ - Slurm meta values + Maximum number of switches """ - reservations: ReservationInfoMsg + resize_time: Uint64NoValStruct | None = None """ - list of reservations + Time of last size change (UNIX timestamp) """ - warnings: OpenapiWarnings | None = None + restart_cnt: int | None = None """ - Query warnings + Number of job restarts """ - - -class OpenapiSlurmdbdQosResp(BaseModel): - errors: OpenapiErrors | None = None + resv_name: str | None = None """ - Query errors + Name of reservation to use """ - meta: OpenapiMeta | None = None + scheduled_nodes: str | None = None """ - Slurm meta values + List of nodes scheduled to be used for the job """ - qos: QosList + selinux_context: str | None = None """ - List of QOS + SELinux context """ - warnings: OpenapiWarnings | None = None + shared: JobShared | None = None """ - Query warnings + How the job can share resources with other jobs, if at all """ - - -class OpenapiSlurmdbdStatsResp(BaseModel): - errors: OpenapiErrors | None = None + sockets_per_board: int | None = None """ - Query errors + Number of sockets per board required """ - meta: OpenapiMeta | None = None + sockets_per_node: Uint16NoValStruct | None = None """ - Slurm meta values + Number of sockets per node required """ - statistics: StatsRec + standard_error: str | None = None """ - statistics + Path to stderr file """ - warnings: OpenapiWarnings | None = None + standard_input: str | None = None """ - Query warnings + Path to stdin file """ - - -class OpenapiUsersAddCondResp(BaseModel): - association_condition: UsersAddCond | None = None + standard_output: str | None = None """ - Filters to select associations for users + Path to stdout file """ - errors: OpenapiErrors | None = None + start_time: Uint64NoValStruct | None = None """ - Query errors + Time execution began, or is expected to begin (UNIX timestamp) """ - meta: OpenapiMeta | None = None + state_description: str | None = None """ - Slurm meta values + Optional details for state_reason """ - user: UserShort | None = None + state_reason: str | None = None """ - Admin level of user, DefaultAccount, DefaultWCKey + Reason for current Pending or Failed state """ - warnings: OpenapiWarnings | None = None + submit_time: Uint64NoValStruct | None = None """ - Query warnings + Time when the job was submitted (UNIX timestamp) """ - - -class OpenapiWckeyResp(BaseModel): - errors: OpenapiErrors | None = None + suspend_time: Uint64NoValStruct | None = None """ - Query errors + Time the job was last suspended or resumed (UNIX timestamp) """ - meta: OpenapiMeta | None = None + system_comment: str | None = None """ - Slurm meta values + Arbitrary comment from slurmctld """ - warnings: OpenapiWarnings | None = None + tasks: Uint32NoValStruct | None = None """ - Query warnings + Number of tasks """ - wckeys: WckeyList + tasks_per_board: Uint16NoValStruct | None = None """ - wckeys + Number of tasks invoked on each board """ - - -class Consumed(BaseModel): - average: TresList | None = None - max: StepTresUsageMax | None = None - min: StepTresUsageMin | None = None - total: TresList | None = None - - -class Requested(BaseModel): - average: TresList | None = None - max: StepTresReqMax | None = None - min: StepTresReqMin | None = None - total: TresList | None = None - - -class Tres7(BaseModel): - allocated: TresList | None = None - consumed: Consumed | None = None - requested: Requested | None = None - - -class Step(BaseModel): - CPU_: CPU | None = Field(default=None, alias="CPU") - exit_code: ProcessExitCodeVerbose | None = None + tasks_per_core: Uint16NoValStruct | None = None """ - return code returned by process + Number of tasks invoked on each core """ - kill_request_user: str | None = None - nodes: Nodes2 | None = None - pid: str | None = None - state: list[StateEnum2] | None = None - statistics: Statistics | None = None - step: Step1 | None = None - task: Task | None = None - tasks: Tasks | None = None - time: Time4 | None = None - tres: Tres7 | None = None - - -class StepList(RootModel[list[Step]]): - root: list[Step] - - -class User2(BaseModel): - administrator_level: list[AdministratorLevelEnum] | None = None - associations: AssocShortList | None = None - coordinators: CoordList | None = None - default: Default1 | None = None - flags: list[Flag11] | None = None - name: str - old_name: str | None = None - wckeys: WckeyList | None = None - - -class UserList(RootModel[list[User2]]): - root: list[User2] - - -class AssocSharesObjList(RootModel[list[AssocSharesObjWrap]]): - root: list[AssocSharesObjWrap] - - -class Job(BaseModel): - account: str | None = None - allocation_nodes: int | None = None - array: Array | None = None - association: AssocShort | None = None - block: str | None = None - cluster: str | None = None - comment: Comment | None = None - constraints: str | None = None - container: str | None = None - derived_exit_code: ProcessExitCodeVerbose | None = None + tasks_per_node: Uint16NoValStruct | None = None """ - return code returned by process + Number of tasks invoked on each node """ - exit_code: ProcessExitCodeVerbose | None = None + tasks_per_socket: Uint16NoValStruct | None = None """ - return code returned by process + Number of tasks invoked on each socket """ - extra: str | None = None - failed_node: str | None = None - flags: list[Flag4] | None = None - group: str | None = None - het: Het | None = None - job_id: int | None = None - kill_request_user: str | None = None - licenses: str | None = None - mcs: Mcs | None = None - name: str | None = None - nodes: str | None = None - partition: str | None = None - priority: Uint32NoVal | None = None - qos: str | None = None - required: Required | None = None - reservation: Reservation | None = None - script: str | None = None - state: State | None = None - steps: StepList | None = None - submit_line: str | None = None - time: Time1 | None = None - tres: Tres3 | None = None - used_gres: str | None = None - user: str | None = None - wckey: WckeyTagStruct | None = None + tasks_per_tres: Uint16NoValStruct | None = None """ - WCKey ID with tagging + Number of tasks that can assess each GPU """ - working_directory: str | None = None - - -class JobList(RootModel[list[Job]]): - root: list[Job] - - -class OpenapiSlurmdbdConfigResp(BaseModel): - accounts: AccountList | None = None + thread_spec: int | None = None """ - accounts + Specialized thread count """ - associations: AssocList | None = None + threads_per_core: Uint16NoValStruct | None = None """ - associations + Number of processor threads per CPU core required """ - clusters: ClusterRecList | None = None + time_limit: Uint32NoValStruct | None = None """ - clusters + Maximum run time in minutes """ - errors: OpenapiErrors | None = None + time_minimum: Uint32NoValStruct | None = None """ - Query errors + Minimum run time in minutes """ - instances: InstanceList | None = None + tres_alloc_str: str | None = None """ - instances + TRES used by the job """ - meta: OpenapiMeta | None = None + tres_bind: str | None = None """ - Slurm meta values + Task to TRES binding directives """ - qos: QosList | None = None + tres_freq: str | None = None """ - qos + TRES frequency directives """ - tres: TresList | None = None + tres_per_job: str | None = None """ - tres + Comma separated list of TRES=# values to be allocated per job """ - users: UserList | None = None + tres_per_node: str | None = None """ - users + Comma separated list of TRES=# values to be allocated per node """ - warnings: OpenapiWarnings | None = None + tres_per_socket: str | None = None """ - Query warnings + Comma separated list of TRES=# values to be allocated per socket """ - wckeys: WckeyList | None = None + tres_per_task: str | None = None """ - wckeys + Comma separated list of TRES=# values to be allocated per task """ - - -class OpenapiSlurmdbdJobsResp(BaseModel): - errors: OpenapiErrors | None = None + tres_req_str: str | None = None """ - Query errors + TRES requested by the job """ - jobs: JobList + user_id: int | None = None """ - jobs + User ID that owns the job """ - meta: OpenapiMeta | None = None + user_name: str | None = None """ - Slurm meta values + User name that owns the job """ - warnings: OpenapiWarnings | None = None + wckey: str | None = None """ - Query warnings + Workload characterization key """ -class OpenapiUsersResp(BaseModel): +class JobInfoMsg(RootModel[list[JobInfo]]): + root: list[JobInfo] + + +class OpenapiJobInfoResp(BaseModel): errors: OpenapiErrors | None = None """ Query errors """ - meta: OpenapiMeta | None = None + jobs: JobInfoMsg """ - Slurm meta values + List of jobs """ - users: UserList + last_backfill: Uint64NoValStruct """ - users + Time of last backfill scheduler run (UNIX timestamp) """ - warnings: OpenapiWarnings | None = None + last_update: Uint64NoValStruct """ - Query warnings + Time of last job change (UNIX timestamp) """ - - -class SharesRespMsg(BaseModel): - shares: AssocSharesObjList | None = None + meta: OpenapiMeta | None = None """ - Assocation shares + Slurm meta values """ - total_shares: int | None = None + warnings: OpenapiWarnings | None = None """ - Total number of shares + Query warnings """ diff --git a/ParProcCo/slurm/slurmdb_rest.py b/ParProcCo/slurm/slurmdb_rest.py index e02c05f..ef49686 100644 --- a/ParProcCo/slurm/slurmdb_rest.py +++ b/ParProcCo/slurm/slurmdb_rest.py @@ -1,1859 +1,5253 @@ # generated by datamodel-codegen: # filename: slurmdb-rest.yaml -# timestamp: 2023-08-18T16:27:32+00:00 -# ruff: noqa: E501 # ignore long lines +# timestamp: 2025-03-20T16:17:44+00:00 from __future__ import annotations +from enum import Enum from typing import Any from pydantic import BaseModel, Field, RootModel +class AccountFlag(Enum): + DELETED = "DELETED" + WithAssociations = "WithAssociations" + WithCoordinators = "WithCoordinators" + NoUsersAreCoords = "NoUsersAreCoords" + UsersAreCoords = "UsersAreCoords" + + +class AccountFlags(RootModel[list[AccountFlag]]): + root: list[AccountFlag] + + +class AccountShort(BaseModel): + description: str | None = None + """ + Arbitrary string describing the account + """ + organization: str | None = None + """ + Organization to which the account belongs + """ + + +class Allocated(BaseModel): + seconds: int | None = None + """ + Number of seconds allocated + """ + + +class AcctGatherProfileEnum(Enum): + NOT_SET = "NOT_SET" + NONE = "NONE" + ENERGY = "ENERGY" + LUSTRE = "LUSTRE" + NETWORK = "NETWORK" + TASK = "TASK" + + +class AcctGatherProfile(RootModel[list[AcctGatherProfileEnum]]): + root: list[AcctGatherProfileEnum] + + +class AdminLvlEnum(Enum): + Not_Set = "Not Set" + None_ = "None" + Operator = "Operator" + Administrator = "Administrator" + + +class AdminLvl(RootModel[list[AdminLvlEnum]]): + root: list[AdminLvlEnum] + + class Default(BaseModel): + qos: str | None = None + """ + Default QOS + """ + + +class AssocFlag(Enum): + DELETED = "DELETED" + NoUpdate = "NoUpdate" + Exact = "Exact" + NoUsersAreCoords = "NoUsersAreCoords" + UsersAreCoords = "UsersAreCoords" + + +class AssocFlags(RootModel[list[AssocFlag]]): + root: list[AssocFlag] + + +class AssocSharesObjWrapTypeEnum(Enum): + USER = "USER" + ASSOCIATION = "ASSOCIATION" + + +class AssocSharesObjWrapType(RootModel[list[AssocSharesObjWrapTypeEnum]]): + root: list[AssocSharesObjWrapTypeEnum] + + +class AssocShort(BaseModel): + account: str | None = None + """ + Account name + """ + cluster: str | None = None + """ + Cluster name + """ + id: int | None = None + """ + Numeric association ID + """ + partition: str | None = None + """ + Partition name + """ + user: str + """ + User name + """ + + +class AssocShortList(RootModel[list[AssocShort]]): + root: list[AssocShort] + + +class BfExitFields(BaseModel): + bf_max_job_start: int | None = None + """ + Reached number of jobs allowed to start + """ + bf_max_job_test: int | None = None + """ + Reached number of jobs allowed to be tested + """ + bf_max_time: int | None = None + """ + Reached maximum allowed scheduler time + """ + bf_node_space_size: int | None = None + """ + Reached table size limit + """ + end_job_queue: int | None = None + """ + Reached end of queue + """ + state_changed: int | None = None + """ + System state changed + """ + + +class Associations(BaseModel): + root: AssocShort | None = None + """ + Root association information + """ + + +class Controller(BaseModel): + host: str | None = None + """ + ControlHost + """ + port: int | None = None + """ + ControlPort + """ + + +class ClusterRecFlag(Enum): + REGISTERING = "REGISTERING" + MULTIPLE_SLURMD = "MULTIPLE_SLURMD" + FRONT_END = "FRONT_END" + FEDERATION = "FEDERATION" + EXTERNAL = "EXTERNAL" + + +class ClusterRecFlags(RootModel[list[ClusterRecFlag]]): + root: list[ClusterRecFlag] + + +class ControllerPing(BaseModel): + hostname: str | None = None + """ + Target for ping + """ + latency: int | None = None + """ + Number of microseconds it took to successfully ping or timeout + """ + mode: str | None = None + """ + The operating mode of the responding slurmctld + """ + pinged: str | None = None + """ + Ping result + """ + primary: bool + """ + Is responding slurmctld the primary controller + """ + responding: bool + """ + If ping RPC responded with pong from controller + """ + + +class ControllerPingArray(RootModel[list[ControllerPing]]): + root: list[ControllerPing] + + +class Coord(BaseModel): + direct: bool | None = None + """ + Indicates whether the coordinator was directly assigned to this account + """ + name: str + """ + User name + """ + + +class CoordList(RootModel[list[Coord]]): + root: list[Coord] + + +class CpuBindingFlag(Enum): + CPU_BIND_TO_THREADS = "CPU_BIND_TO_THREADS" + CPU_BIND_TO_CORES = "CPU_BIND_TO_CORES" + CPU_BIND_TO_SOCKETS = "CPU_BIND_TO_SOCKETS" + CPU_BIND_TO_LDOMS = "CPU_BIND_TO_LDOMS" + CPU_BIND_NONE = "CPU_BIND_NONE" + CPU_BIND_RANK = "CPU_BIND_RANK" + CPU_BIND_MAP = "CPU_BIND_MAP" + CPU_BIND_MASK = "CPU_BIND_MASK" + CPU_BIND_LDRANK = "CPU_BIND_LDRANK" + CPU_BIND_LDMAP = "CPU_BIND_LDMAP" + CPU_BIND_LDMASK = "CPU_BIND_LDMASK" + VERBOSE = "VERBOSE" + CPU_BIND_ONE_THREAD_PER_CORE = "CPU_BIND_ONE_THREAD_PER_CORE" + + +class CpuBindingFlags(RootModel[list[CpuBindingFlag]]): + root: list[CpuBindingFlag] + + +class CrTypeEnum(Enum): + CPU = "CPU" + SOCKET = "SOCKET" + CORE = "CORE" + BOARD = "BOARD" + MEMORY = "MEMORY" + ONE_TASK_PER_CORE = "ONE_TASK_PER_CORE" + PACK_NODES = "PACK_NODES" + CORE_DEFAULT_DIST_BLOCK = "CORE_DEFAULT_DIST_BLOCK" + LLN = "LLN" + LINEAR = "LINEAR" + + +class CrType(RootModel[list[CrTypeEnum]]): + root: list[CrTypeEnum] + + +class Line(BaseModel): + end: int | None = None + """ + End of this entry in file + """ + start: int | None = None + """ + Start of this entry in file + """ + + +class CronEntryFlag(Enum): + WILD_MINUTE = "WILD_MINUTE" + WILD_HOUR = "WILD_HOUR" + WILD_DAY_OF_MONTH = "WILD_DAY_OF_MONTH" + WILD_MONTH = "WILD_MONTH" + WILD_DAY_OF_WEEK = "WILD_DAY_OF_WEEK" + + +class CronEntryFlags(RootModel[list[CronEntryFlag]]): + root: list[CronEntryFlag] + + +class CsvString(RootModel[list[str]]): + root: list[str] + + +class Float64NoValStruct(BaseModel): + infinite: bool | None = None + """ + True if number has been set to infinite; "set" and "number" will be ignored + """ + number: float | None = None + """ + If "set" is True the number will be set with value; otherwise ignore number contents + """ + set: bool | None = None + """ + True if number has been set; False if number is unset + """ + + +class Hostlist(RootModel[list[str]]): + root: list[str] + + +class HostlistString(RootModel[list[str]]): + root: list[str] + + +class Time(BaseModel): + time_end: int | None = None + """ + When the instance will end (UNIX timestamp) + """ + time_start: int | None = None + """ + When the instance will start (UNIX timestamp) + """ + + +class Instance(BaseModel): + cluster: str | None = None + """ + Cluster name + """ + extra: str | None = None + """ + Arbitrary string used for node filtering if extra constraints are enabled + """ + instance_id: str | None = None + """ + Cloud instance ID + """ + instance_type: str | None = None + """ + Cloud instance type + """ + node_name: str | None = None + """ + NodeName + """ + time: Time | None = None + + +class InstanceList(RootModel[list[Instance]]): + root: list[Instance] + + +class Running(BaseModel): + tasks: int | None = None + """ + Maximum number of simultaneously running tasks, 0 if no limit + """ + + +class Max1(BaseModel): + running: Running | None = None + + +class Limits(BaseModel): + max: Max1 | None = None + + +class Comment(BaseModel): + administrator: str | None = None + """ + Arbitrary comment made by administrator + """ + job: str | None = None + """ + Arbitrary comment made by user + """ + system: str | None = None + """ + Arbitrary comment from slurmctld + """ + + +class Mcs(BaseModel): + label: str | None = None + """ + Multi-Category Security label on the job + """ + + +class Reservation(BaseModel): + id: int | None = None + """ + Unique identifier of requested reservation + """ + name: str | None = None + """ + Name of reservation to use + """ + + +class System(BaseModel): + microseconds: int | None = None + """ + System CPU time used by the job in microseconds + """ + seconds: int | None = None + """ + System CPU time used by the job in seconds + """ + + +class Total(BaseModel): + microseconds: int | None = None + """ + Sum of System and User CPU time used by the job in microseconds + """ + seconds: int | None = None + """ + Sum of System and User CPU time used by the job in seconds + """ + + +class User(BaseModel): + microseconds: int | None = None + """ + User CPU time used by the job in microseconds + """ + seconds: int | None = None + """ + User CPU time used by the job in seconds + """ + + +class JobArrayResponseMsgEntry(BaseModel): + error: str | None = None + """ + Verbose update status or error + """ + error_code: int | None = None + """ + Verbose update status or error + """ + job_id: int | None = None + """ + Job ID for updated job + """ + step_id: str | None = None + """ + Step ID for updated job + """ + why: str | None = None + """ + Update response message + """ + + +class JobFlag(Enum): + KILL_INVALID_DEPENDENCY = "KILL_INVALID_DEPENDENCY" + NO_KILL_INVALID_DEPENDENCY = "NO_KILL_INVALID_DEPENDENCY" + HAS_STATE_DIRECTORY = "HAS_STATE_DIRECTORY" + TESTING_BACKFILL = "TESTING_BACKFILL" + GRES_BINDING_ENFORCED = "GRES_BINDING_ENFORCED" + TEST_NOW_ONLY = "TEST_NOW_ONLY" + SEND_JOB_ENVIRONMENT = "SEND_JOB_ENVIRONMENT" + SPREAD_JOB = "SPREAD_JOB" + PREFER_MINIMUM_NODE_COUNT = "PREFER_MINIMUM_NODE_COUNT" + JOB_KILL_HURRY = "JOB_KILL_HURRY" + SKIP_TRES_STRING_ACCOUNTING = "SKIP_TRES_STRING_ACCOUNTING" + SIBLING_CLUSTER_UPDATE_ONLY = "SIBLING_CLUSTER_UPDATE_ONLY" + HETEROGENEOUS_JOB = "HETEROGENEOUS_JOB" + EXACT_TASK_COUNT_REQUESTED = "EXACT_TASK_COUNT_REQUESTED" + EXACT_CPU_COUNT_REQUESTED = "EXACT_CPU_COUNT_REQUESTED" + TESTING_WHOLE_NODE_BACKFILL = "TESTING_WHOLE_NODE_BACKFILL" + TOP_PRIORITY_JOB = "TOP_PRIORITY_JOB" + ACCRUE_COUNT_CLEARED = "ACCRUE_COUNT_CLEARED" + GRES_BINDING_DISABLED = "GRES_BINDING_DISABLED" + JOB_WAS_RUNNING = "JOB_WAS_RUNNING" + JOB_ACCRUE_TIME_RESET = "JOB_ACCRUE_TIME_RESET" + CRON_JOB = "CRON_JOB" + EXACT_MEMORY_REQUESTED = "EXACT_MEMORY_REQUESTED" + USING_DEFAULT_ACCOUNT = "USING_DEFAULT_ACCOUNT" + USING_DEFAULT_PARTITION = "USING_DEFAULT_PARTITION" + USING_DEFAULT_QOS = "USING_DEFAULT_QOS" + USING_DEFAULT_WCKEY = "USING_DEFAULT_WCKEY" + DEPENDENT = "DEPENDENT" + MAGNETIC = "MAGNETIC" + PARTITION_ASSIGNED = "PARTITION_ASSIGNED" + BACKFILL_ATTEMPTED = "BACKFILL_ATTEMPTED" + SCHEDULING_ATTEMPTED = "SCHEDULING_ATTEMPTED" + STEPMGR_ENABLED = "STEPMGR_ENABLED" + + +class JobFlags(RootModel[list[JobFlag]]): + root: list[JobFlag] + + +class Power(BaseModel): + flags: list | None = None + + +class JobInfoGresDetail(RootModel[list[str]]): + root: list[str] + + +class JobMailFlag(Enum): + BEGIN = "BEGIN" + END = "END" + FAIL = "FAIL" + REQUEUE = "REQUEUE" + TIME_100_ = "TIME=100%" + TIME_90_ = "TIME=90%" + TIME_80_ = "TIME=80%" + TIME_50_ = "TIME=50%" + STAGE_OUT = "STAGE_OUT" + ARRAY_TASKS = "ARRAY_TASKS" + INVALID_DEPENDENCY = "INVALID_DEPENDENCY" + + +class JobMailFlags(RootModel[list[JobMailFlag]]): + root: list[JobMailFlag] + + +class JobResCoreStatu(Enum): + INVALID = "INVALID" + UNALLOCATED = "UNALLOCATED" + ALLOCATED = "ALLOCATED" + IN_USE = "IN_USE" + + +class JobResCoreStatus(RootModel[list[JobResCoreStatu]]): + root: list[JobResCoreStatu] + + +class Cpus(BaseModel): + count: int | None = None + """ + Total number of CPUs assigned to job + """ + used: int | None = None + """ + Total number of CPUs used by job + """ + + +class Memory(BaseModel): + allocated: int | None = None + """ + Total memory (MiB) allocated to job + """ + used: int | None = None + """ + Total memory (MiB) used by job + """ + + +class JobSharedEnum(Enum): + none = "none" + oversubscribe = "oversubscribe" + user = "user" + mcs = "mcs" + topo = "topo" + + +class JobShared(RootModel[list[JobSharedEnum]]): + root: list[JobSharedEnum] + + +class JobStateEnum(Enum): + PENDING = "PENDING" + RUNNING = "RUNNING" + SUSPENDED = "SUSPENDED" + COMPLETED = "COMPLETED" + CANCELLED = "CANCELLED" + FAILED = "FAILED" + TIMEOUT = "TIMEOUT" + NODE_FAIL = "NODE_FAIL" + PREEMPTED = "PREEMPTED" + BOOT_FAIL = "BOOT_FAIL" + DEADLINE = "DEADLINE" + OUT_OF_MEMORY = "OUT_OF_MEMORY" + LAUNCH_FAILED = "LAUNCH_FAILED" + REQUEUED = "REQUEUED" + REQUEUE_HOLD = "REQUEUE_HOLD" + SPECIAL_EXIT = "SPECIAL_EXIT" + RESIZING = "RESIZING" + CONFIGURING = "CONFIGURING" + COMPLETING = "COMPLETING" + STOPPED = "STOPPED" + RECONFIG_FAIL = "RECONFIG_FAIL" + POWER_UP_NODE = "POWER_UP_NODE" + REVOKED = "REVOKED" + REQUEUE_FED = "REQUEUE_FED" + RESV_DEL_HOLD = "RESV_DEL_HOLD" + SIGNALING = "SIGNALING" + STAGE_OUT = "STAGE_OUT" + + +class JobState(RootModel[list[JobStateEnum]]): + root: list[JobStateEnum] + + +class KillJobsMsgJobsArray(RootModel[list[str]]): + root: list[str] + + +class Error(BaseModel): + code: int | None = None + """ + Numeric error encountered signaling job + """ + message: str | None = None + """ + Error message why signaling job failed + """ + string: str | None = None + """ + String error encountered signaling job + """ + + +class Federation(BaseModel): + sibling: str | None = None + """ + Name of federation sibling (may be empty for non-federation) + """ + + +class License(BaseModel): + Free: int | None = None + """ + Number of licenses currently available + """ + LastConsumed: int | None = None + """ + Last known number of licenses that were consumed in the license manager (Remote Only) + """ + LastDeficit: int | None = None + """ + Number of "missing licenses" from the cluster's perspective + """ + LastUpdate: int | None = None + """ + When the license information was last updated (UNIX Timestamp) + """ + LicenseName: str | None = None + """ + Name of the license + """ + Remote: bool | None = None + """ + Indicates whether licenses are served by the database + """ + Reserved: int | None = None + """ + Number of licenses reserved + """ + Total: int | None = None + """ + Total number of licenses present + """ + Used: int | None = None + """ + Number of licenses in use + """ + + +class Licenses(RootModel[list[License]]): + root: list[License] + + +class MemoryBindingTypeEnum(Enum): + NONE = "NONE" + RANK = "RANK" + MAP = "MAP" + MASK = "MASK" + LOCAL = "LOCAL" + VERBOSE = "VERBOSE" + SORT = "SORT" + PREFER = "PREFER" + + +class MemoryBindingType(RootModel[list[MemoryBindingTypeEnum]]): + root: list[MemoryBindingTypeEnum] + + +class NodeCrTypeEnum(Enum): + AVAILABLE = "AVAILABLE" + ONE_ROW = "ONE_ROW" + RESERVED = "RESERVED" + + +class NodeCrType(RootModel[list[NodeCrTypeEnum]]): + root: list[NodeCrTypeEnum] + + +class NodeState(Enum): + INVALID = "INVALID" + UNKNOWN = "UNKNOWN" + DOWN = "DOWN" + IDLE = "IDLE" + ALLOCATED = "ALLOCATED" + ERROR = "ERROR" + MIXED = "MIXED" + FUTURE = "FUTURE" + RESERVED = "RESERVED" + UNDRAIN = "UNDRAIN" + CLOUD = "CLOUD" + RESUME = "RESUME" + DRAIN = "DRAIN" + COMPLETING = "COMPLETING" + NOT_RESPONDING = "NOT_RESPONDING" + POWERED_DOWN = "POWERED_DOWN" + FAIL = "FAIL" + POWERING_UP = "POWERING_UP" + MAINTENANCE = "MAINTENANCE" + REBOOT_REQUESTED = "REBOOT_REQUESTED" + REBOOT_CANCELED = "REBOOT_CANCELED" + POWERING_DOWN = "POWERING_DOWN" + DYNAMIC_FUTURE = "DYNAMIC_FUTURE" + REBOOT_ISSUED = "REBOOT_ISSUED" + PLANNED = "PLANNED" + INVALID_REG = "INVALID_REG" + POWER_DOWN = "POWER_DOWN" + POWER_UP = "POWER_UP" + POWER_DRAIN = "POWER_DRAIN" + DYNAMIC_NORM = "DYNAMIC_NORM" + + +class NodeStates(RootModel[list[NodeState]]): + root: list[NodeState] + + +class OpenModeEnum(Enum): + APPEND = "APPEND" + TRUNCATE = "TRUNCATE" + + +class OpenMode(RootModel[list[OpenModeEnum]]): + root: list[OpenModeEnum] + + +class OpenapiError(BaseModel): + description: str | None = None + """ + Long form error description + """ + error: str | None = None + """ + Short form error description + """ + error_number: int | None = None + """ + Slurm numeric error identifier + """ + source: str | None = None + """ + Source of error or where error was first detected + """ + + +class OpenapiErrors(RootModel[list[OpenapiError]]): + root: list[OpenapiError] + + +class Client(BaseModel): + group: str | None = None + """ + Client group (if known) + """ + source: str | None = None + """ + Client source description + """ + user: str | None = None + """ + Client user (if known) + """ + + +class Plugin(BaseModel): + accounting_storage: str | None = None + """ + Slurm accounting plugin + """ + data_parser: str | None = None + """ + Slurm data_parser plugin + """ + name: str | None = None + """ + Slurm plugin name (if applicable) + """ + type: str | None = None + """ + Slurm plugin type (if applicable) + """ + + +class Version(BaseModel): + major: str | None = None + """ + Slurm release major version + """ + micro: str | None = None + """ + Slurm release micro version + """ + minor: str | None = None + """ + Slurm release minor version + """ + + +class Slurm(BaseModel): + cluster: str | None = None + """ + Slurm cluster name + """ + release: str | None = None + """ + Slurm release string + """ + version: Version | None = None + + +class OpenapiWarning(BaseModel): + description: str | None = None + """ + Long form warning description + """ + source: str | None = None + """ + Source of warning or where warning was first detected + """ + + +class OpenapiWarnings(RootModel[list[OpenapiWarning]]): + root: list[OpenapiWarning] + + +class OversubscribeFlag(Enum): + force = "force" + + +class OversubscribeFlags(RootModel[list[OversubscribeFlag]]): + root: list[OversubscribeFlag] + + +class PartPrio(BaseModel): + partition: str | None = None + """ + Partition name + """ + priority: int | None = None + """ + Prospective job priority if it runs in this partition + """ + + +class Accounts(BaseModel): + allowed: str | None = None + """ + AllowAccounts + """ + deny: str | None = None + """ + DenyAccounts + """ + + +class Cpus1(BaseModel): + task_binding: int | None = None + """ + CpuBind + """ + total: int | None = None + """ + TotalCPUs + """ + + +class Groups(BaseModel): + allowed: str | None = None + """ + AllowGroups + """ + + +class Oversubscribe(BaseModel): + flags: OversubscribeFlags | None = None + """ + Flags applicable to the OverSubscribe setting + """ + jobs: int | None = None + """ + Maximum number of jobs allowed to oversubscribe resources + """ + + +class Minimums(BaseModel): + nodes: int | None = None + """ + MinNodes + """ + + +class Nodes2(BaseModel): + allowed_allocation: str | None = None + """ + AllocNodes + """ + configured: str | None = None + """ + Nodes + """ + total: int | None = None + """ + TotalNodes + """ + + +class Priority(BaseModel): + job_factor: int | None = None + """ + PriorityJobFactor + """ + tier: int | None = None + """ + PriorityTier + """ + + +class Qos(BaseModel): + allowed: str | None = None + """ + AllowQOS + """ + assigned: str | None = None + """ + QOS + """ + deny: str | None = None + """ + DenyQOS + """ + + +class Tres4(BaseModel): + billing_weights: str | None = None + """ + TRESBillingWeights + """ + configured: str | None = None + """ + TRES + """ + + +class PartitionState(Enum): + INACTIVE = "INACTIVE" + UNKNOWN = "UNKNOWN" + UP = "UP" + DOWN = "DOWN" + DRAIN = "DRAIN" + + +class PartitionStates(RootModel[list[PartitionState]]): + root: list[PartitionState] + + +class PriorityByPartition(RootModel[list[PartPrio]]): + root: list[PartPrio] + + +class ProcessExitCodeStatu(Enum): + INVALID = "INVALID" + PENDING = "PENDING" + SUCCESS = "SUCCESS" + ERROR = "ERROR" + SIGNALED = "SIGNALED" + CORE_DUMPED = "CORE_DUMPED" + + +class ProcessExitCodeStatus(RootModel[list[ProcessExitCodeStatu]]): + root: list[ProcessExitCodeStatu] + + +class QosFlag(Enum): + NOT_SET = "NOT_SET" + ADD = "ADD" + REMOVE = "REMOVE" + PARTITION_MINIMUM_NODE = "PARTITION_MINIMUM_NODE" + PARTITION_MAXIMUM_NODE = "PARTITION_MAXIMUM_NODE" + PARTITION_TIME_LIMIT = "PARTITION_TIME_LIMIT" + ENFORCE_USAGE_THRESHOLD = "ENFORCE_USAGE_THRESHOLD" + NO_RESERVE = "NO_RESERVE" + REQUIRED_RESERVATION = "REQUIRED_RESERVATION" + DENY_LIMIT = "DENY_LIMIT" + OVERRIDE_PARTITION_QOS = "OVERRIDE_PARTITION_QOS" + NO_DECAY = "NO_DECAY" + USAGE_FACTOR_SAFE = "USAGE_FACTOR_SAFE" + RELATIVE = "RELATIVE" + + +class QosFlags(RootModel[list[QosFlag]]): + root: list[QosFlag] + + +class QosPreemptList(RootModel[list[str]]): + root: list[str] + + +class QosPreemptMode(Enum): + DISABLED = "DISABLED" + SUSPEND = "SUSPEND" + REQUEUE = "REQUEUE" + CANCEL = "CANCEL" + GANG = "GANG" + + +class QosPreemptModes(RootModel[list[QosPreemptMode]]): + root: list[QosPreemptMode] + + +class QosStringIdList(RootModel[list[str]]): + """ + List of QOS names + """ + + root: list[str] + """ + List of QOS names + """ + + +class ReservationCoreSpec(BaseModel): + core: str | None = None + """ + IDs of reserved cores + """ + node: str | None = None + """ + Name of reserved node + """ + + +class ReservationFlag(Enum): + MAINT = "MAINT" + NO_MAINT = "NO_MAINT" + DAILY = "DAILY" + NO_DAILY = "NO_DAILY" + WEEKLY = "WEEKLY" + NO_WEEKLY = "NO_WEEKLY" + IGNORE_JOBS = "IGNORE_JOBS" + NO_IGNORE_JOBS = "NO_IGNORE_JOBS" + ANY_NODES = "ANY_NODES" + STATIC = "STATIC" + NO_STATIC = "NO_STATIC" + PART_NODES = "PART_NODES" + NO_PART_NODES = "NO_PART_NODES" + OVERLAP = "OVERLAP" + SPEC_NODES = "SPEC_NODES" + TIME_FLOAT = "TIME_FLOAT" + REPLACE = "REPLACE" + ALL_NODES = "ALL_NODES" + PURGE_COMP = "PURGE_COMP" + WEEKDAY = "WEEKDAY" + NO_WEEKDAY = "NO_WEEKDAY" + WEEKEND = "WEEKEND" + NO_WEEKEND = "NO_WEEKEND" + FLEX = "FLEX" + NO_FLEX = "NO_FLEX" + DURATION_PLUS = "DURATION_PLUS" + DURATION_MINUS = "DURATION_MINUS" + NO_HOLD_JOBS_AFTER_END = "NO_HOLD_JOBS_AFTER_END" + NO_PURGE_COMP = "NO_PURGE_COMP" + MAGNETIC = "MAGNETIC" + SKIP = "SKIP" + HOURLY = "HOURLY" + NO_HOURLY = "NO_HOURLY" + USER_DELETE = "USER_DELETE" + NO_USER_DELETE = "NO_USER_DELETE" + REOCCURRING = "REOCCURRING" + + +class ReservationFlags(RootModel[list[ReservationFlag]]): + root: list[ReservationFlag] + + +class ReservationInfoCoreSpec(RootModel[list[ReservationCoreSpec]]): + root: list[ReservationCoreSpec] + + +class Duration(BaseModel): + last: int | None = None + """ + Total time spent doing daily daily rollup (seconds) + """ + max: int | None = None + """ + Longest daily rollup time (seconds) + """ + time: int | None = None + """ + Total time spent doing daily rollups (seconds) + """ + + +class Daily(BaseModel): + count: int | None = None + """ + Number of daily rollups since last_run + """ + duration: Duration | None = None + last_run: int | None = None + """ + Last time daily rollup ran (UNIX timestamp) + """ + + +class Duration1(BaseModel): + last: int | None = None + """ + Total time spent doing last daily rollup (seconds) + """ + max: int | None = None + """ + Longest hourly rollup time (seconds) + """ + time: int | None = None + """ + Total time spent doing hourly rollups (seconds) + """ + + +class Hourly(BaseModel): + count: int | None = None + """ + Number of hourly rollups since last_run + """ + duration: Duration1 | None = None + last_run: int | None = None + """ + Last time hourly rollup ran (UNIX timestamp) + """ + + +class Duration2(BaseModel): + last: int | None = None + """ + Total time spent doing monthly daily rollup (seconds) + """ + max: int | None = None + """ + Longest monthly rollup time (seconds) + """ + time: int | None = None + """ + Total time spent doing monthly rollups (seconds) + """ + + +class Monthly(BaseModel): + count: int | None = None + """ + Number of monthly rollups since last_run + """ + duration: Duration2 | None = None + last_run: int | None = None + """ + Last time monthly rollup ran (UNIX timestamp) + """ + + +class RollupStats(BaseModel): + daily: Daily | None = None + hourly: Hourly | None = None + monthly: Monthly | None = None + + +class ScheduleExitFields(BaseModel): + default_queue_depth: int | None = None + """ + Reached number of jobs allowed to be tested + """ + end_job_queue: int | None = None + """ + Reached end of queue + """ + licenses: int | None = None + """ + Blocked on licenses + """ + max_job_start: int | None = None + """ + Reached number of jobs allowed to start + """ + max_rpc_cnt: int | None = None + """ + Reached RPC limit + """ + max_sched_time: int | None = None + """ + Reached maximum allowed scheduler time + """ + + +class SharesFloat128Tres(BaseModel): + name: str | None = None + """ + TRES name + """ + value: float | None = None + """ + TRES value + """ + + +class SharesFloat128TresList(RootModel[list[SharesFloat128Tres]]): + root: list[SharesFloat128Tres] + + +class SlurmdbJobFlag(Enum): + NONE = "NONE" + CLEAR_SCHEDULING = "CLEAR_SCHEDULING" + NOT_SET = "NOT_SET" + STARTED_ON_SUBMIT = "STARTED_ON_SUBMIT" + STARTED_ON_SCHEDULE = "STARTED_ON_SCHEDULE" + STARTED_ON_BACKFILL = "STARTED_ON_BACKFILL" + START_RECEIVED = "START_RECEIVED" + + +class SlurmdbJobFlags(RootModel[list[SlurmdbJobFlag]]): + root: list[SlurmdbJobFlag] + + +class SlurmdbdPing(BaseModel): + hostname: str + """ + Target for ping + """ + latency: int + """ + Number of microseconds it took to successfully ping or timeout + """ + primary: bool + """ + Is responding slurmdbd the primary controller + """ + responding: bool + """ + If ping RPC responded with pong from slurmdbd + """ + + +class SlurmdbdPingArray(RootModel[list[SlurmdbdPing]]): + root: list[SlurmdbdPing] + + +class StatsMsgRpcDump(BaseModel): + count: HostlistString + """ + Number of RPCs received + """ + message_type: str + """ + Message type as string + """ + type_id: int + """ + Message type as integer + """ + + +class StatsMsgRpcQueue(BaseModel): + count: int + """ + Number of pending RPCs queued + """ + message_type: str + """ + Message type as string + """ + type_id: int + """ + Message type as integer + """ + + +class StatsMsgRpcsDump(RootModel[list[StatsMsgRpcDump]]): + """ + Pending RPCs by hostlist + """ + + root: list[StatsMsgRpcDump] + """ + Pending RPCs by hostlist + """ + + +class StatsMsgRpcsQueue(RootModel[list[StatsMsgRpcQueue]]): + """ + Pending RPCs + """ + + root: list[StatsMsgRpcQueue] + """ + Pending RPCs + """ + + +class Time2(BaseModel): + average: int | None = None + """ + Average RPC processing time in microseconds + """ + total: int | None = None + """ + Total RPC processing time in microseconds + """ + + +class StatsRpc(BaseModel): + count: int | None = None + """ + Number of RPCs processed + """ + rpc: str | None = None + """ + RPC type + """ + time: Time2 | None = None + + +class StatsRpcList(RootModel[list[StatsRpc]]): + root: list[StatsRpc] + + +class StatsUser(BaseModel): + count: int | None = None + """ + Number of RPCs processed + """ + time: Time2 | None = None + user: str | None = None + """ + User ID + """ + + +class StatsUserList(RootModel[list[StatsUser]]): + root: list[StatsUser] + + +class Nodes3(BaseModel): + count: int | None = None + """ + Number of nodes in the job step + """ + list: Hostlist | None = None + """ + List of nodes used by the step + """ + range: str | None = None + """ + Node(s) allocated to the job step + """ + + +class CPU1(BaseModel): + actual_frequency: int | None = None + """ + Average weighted CPU frequency of all tasks in kHz + """ + + +class Step1(BaseModel): + id: str | None = None + """ + Step ID + """ + name: str | None = None + """ + Step name + """ + + +class Task(BaseModel): + distribution: str | None = None + """ + The layout of the step was when it was running + """ + + +class Tasks(BaseModel): + count: int | None = None + """ + Total number of tasks + """ + + +class System1(BaseModel): + microseconds: int | None = None + """ + System CPU time used by the step in microseconds + """ + seconds: int | None = None + """ + System CPU time used by the step in seconds + """ + + +class Total1(BaseModel): + microseconds: int | None = None + """ + Total CPU time used by the step in microseconds + """ + seconds: int | None = None + """ + Total CPU time used by the step in seconds + """ + + +class User1(BaseModel): + microseconds: int | None = None + """ + User CPU time used by the step in microseconds + """ + seconds: int | None = None + """ + User CPU time used by the step in seconds + """ + + +class StringArray(RootModel[list[str]]): + root: list[str] + + +class StringList(RootModel[list[str]]): + root: list[str] + + +class Tres(BaseModel): + count: int | None = None + """ + TRES count (0 if listed generically) + """ + id: int | None = None + """ + ID used in the database + """ + name: str | None = None + """ + TRES name (if applicable) + """ + type: str + """ + TRES type (CPU, MEM, etc) + """ + + +class TresList(RootModel[list[Tres]]): + root: list[Tres] + + +class Uint16NoValStruct(BaseModel): + infinite: bool | None = None + """ + True if number has been set to infinite; "set" and "number" will be ignored + """ + number: int | None = None + """ + If "set" is True the number will be set with value; otherwise ignore number contents + """ + set: bool | None = None + """ + True if number has been set; False if number is unset + """ + + +class Uint32NoValStruct(BaseModel): + infinite: bool | None = None + """ + True if number has been set to infinite; "set" and "number" will be ignored + """ + number: int | None = None + """ + If "set" is True the number will be set with value; otherwise ignore number contents + """ + set: bool | None = None + """ + True if number has been set; False if number is unset + """ + + +class Uint64NoValStruct(BaseModel): + infinite: bool | None = None + """ + True if number has been set to infinite; "set" and "number" will be ignored + """ + number: int | None = None + """ + If "set" is True the number will be set with value; otherwise ignore number contents + """ + set: bool | None = None + """ + True if number has been set; False if number is unset + """ + + +class Default1(BaseModel): + account: str | None = None + """ + Default account + """ + wckey: str | None = None + """ + Default WCKey + """ + + +class UserFlag(Enum): + NONE = "NONE" + DELETED = "DELETED" + + +class UserFlags(RootModel[list[UserFlag]]): + root: list[UserFlag] + + +class UserShort(BaseModel): + adminlevel: AdminLvl | None = None + """ + AdminLevel granted to the user + """ + defaultaccount: str | None = None + """ + Default account + """ + defaultwckey: str | None = None + """ + Default WCKey + """ + + +class WarnFlag(Enum): + BATCH_JOB = "BATCH_JOB" + ARRAY_TASK = "ARRAY_TASK" + FULL_STEPS_ONLY = "FULL_STEPS_ONLY" + FULL_JOB = "FULL_JOB" + FEDERATION_REQUEUE = "FEDERATION_REQUEUE" + HURRY = "HURRY" + OUT_OF_MEMORY = "OUT_OF_MEMORY" + NO_SIBLING_JOBS = "NO_SIBLING_JOBS" + RESERVATION_JOB = "RESERVATION_JOB" + VERBOSE = "VERBOSE" + CRON_JOBS = "CRON_JOBS" + WARNING_SENT = "WARNING_SENT" + + +class WarnFlags(RootModel[list[WarnFlag]]): + root: list[WarnFlag] + + +class WckeyFlag(Enum): + DELETED = "DELETED" + + +class WckeyFlags(RootModel[list[WckeyFlag]]): + root: list[WckeyFlag] + + +class WckeyTagFlag(Enum): + ASSIGNED_DEFAULT = "ASSIGNED_DEFAULT" + + +class WckeyTagFlags(RootModel[list[WckeyTagFlag]]): + root: list[WckeyTagFlag] + + +class WckeyTagStruct(BaseModel): + flags: WckeyTagFlags + """ + Active flags + """ + wckey: str + """ + WCKey name + """ + + +class X11Flag(Enum): + FORWARD_ALL_NODES = "FORWARD_ALL_NODES" + BATCH_NODE = "BATCH_NODE" + FIRST_NODE = "FIRST_NODE" + LAST_NODE = "LAST_NODE" + + +class X11Flags(RootModel[list[X11Flag]]): + root: list[X11Flag] + + +class Account(BaseModel): + associations: AssocShortList | None = None + """ + Associations involving this account (only populated if requested) + """ + coordinators: CoordList | None = None + """ + List of users that are a coordinator of this account (only populated if requested) + """ + description: str + """ + Arbitrary string describing the account + """ + flags: AccountFlags | None = None + """ + Flags associated with this account + """ + name: str + """ + Account name + """ + organization: str + """ + Organization to which the account belongs + """ + + +class AccountList(RootModel[list[Account]]): + root: list[Account] + + +class Accounting(BaseModel): + TRES: Tres | None = None + """ + Trackable resources + """ + allocated: Allocated | None = None + id: int | None = None + """ + Association ID or Workload characterization key ID + """ + id_alt: int | None = None + """ + Alternate ID (not currently used) + """ + start: int | None = None + """ + When the record was started (UNIX timestamp) + """ + + +class AccountingList(RootModel[list[Accounting]]): + root: list[Accounting] + + +class AcctGatherEnergy(BaseModel): + average_watts: int | None = None + """ + Average power consumption, in watts + """ + base_consumed_energy: int | None = None + """ + The energy consumed between when the node was powered on and the last time it was registered by slurmd, in joules + """ + consumed_energy: int | None = None + """ + The energy consumed between the last time the node was registered by the slurmd daemon and the last node energy accounting sample, in joules + """ + current_watts: Uint32NoValStruct | None = None + """ + The instantaneous power consumption at the time of the last node energy accounting sample, in watts + """ + last_collected: int | None = None + """ + Time when energy data was last retrieved (UNIX timestamp) + """ + previous_consumed_energy: int | None = None + """ + Previous value of consumed_energy + """ + + +class Per(BaseModel): + accruing: Uint32NoValStruct | None = None + """ + GrpJobsAccrue + """ + count: Uint32NoValStruct | None = None + """ + GrpJobs + """ + submitted: Uint32NoValStruct | None = None + """ + GrpSubmitJobs + """ + wall_clock: Uint32NoValStruct | None = None + """ + MaxWallDurationPerJob + """ + + +class Jobs(BaseModel): + accruing: Uint32NoValStruct | None = None + """ + MaxJobsAccrue + """ + active: Uint32NoValStruct | None = None + """ + MaxJobs + """ + per: Per | None = None + total: Uint32NoValStruct | None = None + """ + MaxSubmitJobs + """ + + +class Account1(BaseModel): + wall_clock: Uint32NoValStruct | None = None + """ + GrpWall + """ + + +class Per1(BaseModel): + account: Account1 | None = None + + +class Group(BaseModel): + active: TresList | None = None + """ + GrpTRESRunMins + """ + minutes: TresList | None = None + """ + GrpTRESMins + """ + + +class Per2(BaseModel): + job: TresList | None = None + """ + MaxTRESMinsPerJob + """ + + +class Minutes(BaseModel): + per: Per2 | None = None + total: TresList | None = None + """ + MaxTRESMinsPerJob + """ + + +class Per3(BaseModel): + job: TresList | None = None + """ + MaxTRESPerJob + """ + node: TresList | None = None + """ + MaxTRESPerNode + """ + + +class Tres1(BaseModel): + group: Group | None = None + minutes: Minutes | None = None + per: Per3 | None = None + total: TresList | None = None + """ + GrpTRES + """ + + +class Max(BaseModel): + jobs: Jobs | None = None + per: Per1 | None = None + tres: Tres1 | None = None + + +class Min(BaseModel): + priority_threshold: Uint32NoValStruct | None = None + """ + MinPrioThreshold + """ + + +class Assoc(BaseModel): + account: str | None = None + """ + Account name + """ + accounting: AccountingList | None = None + """ + Accounting records containing related resource usage + """ + cluster: str | None = None + """ + Cluster name + """ + comment: str | None = None + """ + Arbitrary comment + """ + default: Default | None = None + flags: AssocFlags | None = None + """ + Flags on the association + """ + id: int | None = None + """ + Unique ID + """ + is_default: bool | None = None + """ + Is default association for user + """ + lineage: str | None = None + """ + Complete path up the hierarchy to the root association + """ + max: Max | None = None + min: Min | None = None + parent_account: str | None = None + """ + Name of parent account + """ + partition: str | None = None + """ + Partition name + """ + priority: Uint32NoValStruct | None = None + """ + Association priority factor + """ + qos: QosStringIdList | None = None + """ + List of available QOS names + """ + shares_raw: int | None = None + """ + Allocated shares used for fairshare calculation + """ + user: str + """ + User name + """ + + +class AssocList(RootModel[list[Assoc]]): + root: list[Assoc] + + +class AssocRecSet(BaseModel): + comment: str | None = None + """ + Arbitrary comment + """ + defaultqos: str | None = None + """ + Default QOS + """ + fairshare: int | None = None + """ + Allocated shares used for fairshare calculation + """ + grpjobs: Uint32NoValStruct | None = None + """ + Maximum number of running jobs in this association and its children + """ + grpjobsaccrue: Uint32NoValStruct | None = None + """ + Maximum number of pending jobs able to accrue age priority in this association and its children + """ + grpsubmitjobs: Uint32NoValStruct | None = None + """ + Maximum number of jobs which can be in a pending or running state at any time in this association and its children + """ + grptres: TresList | None = None + """ + Maximum number of TRES able to be allocated by running jobs in this association and its children + """ + grptresmins: TresList | None = None + """ + Total number of TRES minutes that can possibly be used by past, present and future jobs in this association and its children + """ + grptresrunmins: TresList | None = None + """ + Maximum number of TRES minutes able to be allocated by running jobs in this association and its children + """ + grpwall: Uint32NoValStruct | None = None + """ + Maximum wall clock time in minutes able to be allocated by running jobs in this association and its children + """ + maxjobs: Uint32NoValStruct | None = None + """ + Maximum number of running jobs per user in this association + """ + maxjobsaccrue: Uint32NoValStruct | None = None + """ + Maximum number of pending jobs able to accrue age priority at any given time in this association + """ + maxsubmitjobs: Uint32NoValStruct | None = None + """ + Maximum number of jobs which can be in a pending or running state at any time in this association + """ + maxtresminsperjob: TresList | None = None + """ + Maximum number of TRES minutes each job is able to use in this association + """ + maxtresperjob: TresList | None = None + """ + Maximum number of TRES each job is able to use in this association + """ + maxtrespernode: TresList | None = None + """ + Maximum number of TRES each node is able to use + """ + maxtresrunmins: TresList | None = None + """ + Maximum number of TRES minutes able to be allocated by running jobs in this association + """ + maxwalldurationperjob: Uint32NoValStruct | None = None + """ + Maximum wall clock time each job is able to use in this association + """ + minpriothresh: Uint32NoValStruct | None = None + """ + Minimum priority required to reserve resources when scheduling + """ + parent: str | None = None + """ + Name of parent account + """ + priority: Uint32NoValStruct | None = None + """ + Association priority factor + """ + qoslevel: QosStringIdList | None = None + """ + List of available QOS names + """ + + +class Fairshare(BaseModel): + factor: Float64NoValStruct | None = None + """ + Fairshare factor + """ + level: Float64NoValStruct | None = None + """ + Fairshare factor at this level; stored on an assoc as a long double, but that is not needed for display in sshare + """ + + +class ClusterRec(BaseModel): + associations: Associations | None = None + controller: Controller | None = None + flags: ClusterRecFlags | None = None + """ + Flags + """ + name: str | None = None + """ + ClusterName + """ + nodes: str | None = None + """ + Node names + """ + rpc_version: int | None = None + """ + RPC version used in the cluster + """ + select_plugin: str | None = None + tres: TresList | None = None + """ + Trackable resources + """ + + +class ClusterRecList(RootModel[list[ClusterRec]]): + root: list[ClusterRec] + + +class CronEntry(BaseModel): + command: str | None = None + """ + Command to run + """ + day_of_month: str | None = None + """ + Ranged string specifying eligible day of month values (e.g. 0-10,29) + """ + day_of_week: str | None = None + """ + Ranged string specifying eligible day of week values (e.g.0-3,7) + """ + flags: CronEntryFlags | None = None + """ + Flags + """ + hour: str | None = None + """ + Ranged string specifying eligible hour values (e.g. 0-5,23) + """ + line: Line | None = None + minute: str | None = None + """ + Ranged string specifying eligible minute values (e.g. 0-10,50) + """ + month: str | None = None + """ + Ranged string specifying eligible month values (e.g. 0-5,12) + """ + specification: str | None = None + """ + Complete time specification (* means valid for all allowed values) - minute hour day_of_month month day_of_week + """ + + +class Array(BaseModel): + job_id: int | None = None + """ + Job ID of job array, or 0 if N/A + """ + limits: Limits | None = None + task: str | None = None + """ + String expression of task IDs in this record + """ + task_id: Uint32NoValStruct | None = None + """ + Task ID of this task in job array + """ + + +class Het(BaseModel): + job_id: int | None = None + """ + Heterogeneous job ID, if applicable + """ + job_offset: Uint32NoValStruct | None = None + """ + Unique sequence number applied to this component of the heterogeneous job + """ + + +class Required(BaseModel): + CPUs: int | None = None + """ + Minimum number of CPUs required + """ + memory_per_cpu: Uint64NoValStruct | None = None + """ + Minimum memory in megabytes per allocated CPU + """ + memory_per_node: Uint64NoValStruct | None = None + """ + Minimum memory in megabytes per allocated node + """ + + +class State(BaseModel): + current: JobState | None = None + """ + Current state + """ + reason: str | None = None + """ + Reason for previous Pending or Failed state + """ + + +class Time1(BaseModel): + elapsed: int | None = None + """ + Elapsed time in seconds + """ + eligible: int | None = None + """ + Time when the job became eligible to run (UNIX timestamp) + """ + end: int | None = None + """ + End time (UNIX timestamp) + """ + limit: Uint32NoValStruct | None = None + """ + Maximum run time in minutes + """ + planned: Uint64NoValStruct | None = None + """ + Time required to start job after becoming eligible to run in seconds + """ + start: int | None = None + """ + Time execution began (UNIX timestamp) + """ + submission: int | None = None + """ + Time when the job was submitted (UNIX timestamp) + """ + suspended: int | None = None + """ + Total time in suspended state in seconds + """ + system: System | None = None + total: Total | None = None + user: User | None = None + + +class Tres3(BaseModel): + allocated: TresList | None = None + """ + Trackable resources allocated to the job + """ + requested: TresList | None = None + """ + Trackable resources requested by job + """ + + +class JobArrayResponseArray(RootModel[list[JobArrayResponseMsgEntry]]): + root: list[JobArrayResponseMsgEntry] + + +class Rlimits(BaseModel): + as_: Uint64NoValStruct | None = Field(None, alias="as") + """ + Address space limit + """ + core: Uint64NoValStruct | None = None + """ + Largest core file that can be created, in bytes + """ + cpu: Uint64NoValStruct | None = None + """ + Per-process CPU limit, in seconds + """ + data: Uint64NoValStruct | None = None + """ + Maximum size of data segment, in bytes + """ + fsize: Uint64NoValStruct | None = None + """ + Largest file that can be created, in bytes + """ + memlock: Uint64NoValStruct | None = None + """ + Locked-in-memory address space + """ + nofile: Uint64NoValStruct | None = None + """ + Number of open files + """ + nproc: Uint64NoValStruct | None = None + """ + Number of processes + """ + rss: Uint64NoValStruct | None = None + """ + Largest resident set size, in bytes. This affects swapping; processes that are exceeding their resident set size will be more likely to have physical memory taken from them + """ + stack: Uint64NoValStruct | None = None + """ + Maximum size of stack segment, in bytes + """ + + +class JobDescMsg(BaseModel): + account: str | None = None + """ + Account associated with the job + """ + account_gather_frequency: str | None = None + """ + Job accounting and profiling sampling intervals in seconds + """ + admin_comment: str | None = None + """ + Arbitrary comment made by administrator + """ + allocation_node_list: str | None = None + """ + Local node making the resource allocation + """ + allocation_node_port: int | None = None + """ + Port to send allocation confirmation to + """ + argv: StringArray | None = None + """ + Arguments to the script. Note: The slurmstepd always overrides argv[0] with the path to the created script file. If this option is used, argv[0] should be a throwaway value. + """ + array: str | None = None + """ + Job array index value specification + """ + batch_features: str | None = None + """ + Features required for batch script's node + """ + begin_time: Uint64NoValStruct | None = None + """ + Defer the allocation of the job until the specified time (UNIX timestamp) + """ + burst_buffer: str | None = None + """ + Burst buffer specifications + """ + cluster_constraint: str | None = None + """ + Required features that a federated cluster must have to have a sibling job submitted to it + """ + clusters: str | None = None + """ + Clusters that a federated job can run on + """ + comment: str | None = None + """ + Arbitrary comment made by user + """ + constraints: str | None = None + """ + Comma separated list of features that are required + """ + container: str | None = None + """ + Absolute path to OCI container bundle + """ + container_id: str | None = None + """ + OCI container ID + """ + contiguous: bool | None = None + """ + True if job requires contiguous nodes + """ + core_specification: int | None = None + """ + Specialized core count + """ + cpu_binding: str | None = None + """ + Method for binding tasks to allocated CPUs + """ + cpu_binding_flags: CpuBindingFlags | None = None + """ + Flags for CPU binding + """ + cpu_frequency: str | None = None + """ + Requested CPU frequency range [-p2][:p3] + """ + cpus_per_task: int | None = None + """ + Number of CPUs required by each task + """ + cpus_per_tres: str | None = None + """ + Semicolon delimited list of TRES=# values values indicating how many CPUs should be allocated for each specified TRES (currently only used for gres/gpu) + """ + crontab: CronEntry | None = None + """ + Specification for scrontab job + """ + current_working_directory: str | None = None + """ + Working directory to use for the job + """ + deadline: int | None = None + """ + Latest time that the job may start (UNIX timestamp) + """ + delay_boot: int | None = None + """ + Number of seconds after job eligible start that nodes will be rebooted to satisfy feature specification + """ + dependency: str | None = None + """ + Other jobs that must meet certain criteria before this job can start + """ + distribution: str | None = None + """ + Layout + """ + distribution_plane_size: Uint16NoValStruct | None = None + """ + Plane size specification when distribution specifies plane + """ + end_time: int | None = None + """ + Expected end time (UNIX timestamp) + """ + environment: StringArray | None = None + """ + Environment variables to be set for the job + """ + excluded_nodes: CsvString | None = None + """ + Comma separated list of nodes that may not be used + """ + extra: str | None = None + """ + Arbitrary string used for node filtering if extra constraints are enabled + """ + flags: JobFlags | None = None + """ + Job flags + """ + group_id: str | None = None + """ + Group ID of the user that owns the job + """ + hetjob_group: int | None = None + """ + Unique sequence number applied to this component of the heterogeneous job + """ + hold: bool | None = None + """ + Hold (true) or release (false) job + """ + immediate: bool | None = None + """ + If true, exit if resources are not available within the time period specified + """ + job_id: int | None = None + """ + Job ID + """ + kill_on_node_fail: bool | None = None + """ + If true, kill job on node failure + """ + kill_warning_delay: Uint16NoValStruct | None = None + """ + Number of seconds before end time to send the warning signal + """ + kill_warning_flags: WarnFlags | None = None + """ + Flags related to job signals + """ + kill_warning_signal: str | None = None + """ + Signal to send when approaching end time (e.g. "10" or "USR1") + """ + licenses: str | None = None + """ + License(s) required by the job + """ + mail_type: JobMailFlags | None = None + """ + Mail event type(s) + """ + mail_user: str | None = None + """ + User to receive email notifications + """ + maximum_cpus: int | None = None + """ + Maximum number of CPUs required + """ + maximum_nodes: int | None = None + """ + Maximum node count + """ + mcs_label: str | None = None + """ + Multi-Category Security label on the job + """ + memory_binding: str | None = None + """ + Binding map for map/mask_cpu + """ + memory_binding_type: MemoryBindingType | None = None + """ + Method for binding tasks to memory + """ + memory_per_cpu: Uint64NoValStruct | None = None + """ + Minimum memory in megabytes per allocated CPU + """ + memory_per_node: Uint64NoValStruct | None = None + """ + Minimum memory in megabytes per allocated node + """ + memory_per_tres: str | None = None + """ + Semicolon delimited list of TRES=# values indicating how much memory in megabytes should be allocated for each specified TRES (currently only used for gres/gpu) + """ + minimum_boards_per_node: int | None = None + """ + Boards per node required + """ + minimum_cpus: int | None = None + """ + Minimum number of CPUs required + """ + minimum_cpus_per_node: int | None = None + """ + Minimum number of CPUs per node + """ + minimum_nodes: int | None = None + """ + Minimum node count + """ + minimum_sockets_per_board: int | None = None + """ + Sockets per board required + """ + name: str | None = None + """ + Job name + """ + network: str | None = None + """ + Network specs for job step + """ + nice: int | None = None + """ + Requested job priority change + """ + nodes: str | None = None + """ + Node count range specification (e.g. 1-15:4) + """ + ntasks_per_tres: int | None = None + """ + Number of tasks that can access each GPU + """ + oom_kill_step: int | None = None + """ + Kill whole step in case of OOM in one of the tasks + """ + open_mode: OpenMode | None = None + """ + Open mode used for stdout and stderr files + """ + overcommit: bool | None = None + """ + Overcommit resources + """ + partition: str | None = None + """ + Partition assigned to the job + """ + power_flags: list | None = None + prefer: str | None = None + """ + Comma separated list of features that are preferred but not required + """ + priority: Uint32NoValStruct | None = None + """ + Request specific job priority + """ + profile: AcctGatherProfile | None = None + """ + Profile used by the acct_gather_profile plugin + """ + qos: str | None = None + """ + Quality of Service assigned to the job + """ + reboot: bool | None = None + """ + Node reboot requested before start + """ + requeue: bool | None = None + """ + Determines whether the job may be requeued + """ + required_nodes: CsvString | None = None + """ + Comma separated list of required nodes + """ + required_switches: Uint32NoValStruct | None = None + """ + Maximum number of switches + """ + reservation: str | None = None + """ + Name of reservation to use + """ + reserve_ports: int | None = None + """ + Port to send various notification msg to + """ + rlimits: Rlimits | None = None + script: str | None = None + """ + Job batch script; only the first component in a HetJob is populated or honored + """ + segment_size: Uint16NoValStruct | None = None + """ + Segment size for topology/block + """ + selinux_context: str | None = None + """ + SELinux context + """ + shared: JobShared | None = None + """ + How the job can share resources with other jobs, if at all + """ + site_factor: int | None = None + """ + Site-specific priority factor + """ + sockets_per_node: int | None = None + """ + Sockets per node required + """ + spank_environment: StringArray | None = None + """ + Environment variables for job prolog/epilog scripts as set by SPANK plugins + """ + standard_error: str | None = None + """ + Path to stderr file + """ + standard_input: str | None = None + """ + Path to stdin file + """ + standard_output: str | None = None + """ + Path to stdout file + """ + tasks: int | None = None + """ + Number of tasks + """ + tasks_per_board: int | None = None + """ + Number of tasks to invoke on each board + """ + tasks_per_core: int | None = None + """ + Number of tasks to invoke on each core + """ + tasks_per_node: int | None = None + """ + Number of tasks to invoke on each node + """ + tasks_per_socket: int | None = None + """ + Number of tasks to invoke on each socket + """ + temporary_disk_per_node: int | None = None + """ + Minimum tmp disk space required per node + """ + thread_specification: int | None = None + """ + Specialized thread count + """ + threads_per_core: int | None = None + """ + Threads per core required + """ + time_limit: Uint32NoValStruct | None = None + """ + Maximum run time in minutes + """ + time_minimum: Uint32NoValStruct | None = None + """ + Minimum run time in minutes + """ + tres_bind: str | None = None + """ + Task to TRES binding directives + """ + tres_freq: str | None = None + """ + TRES frequency directives + """ + tres_per_job: str | None = None + """ + Comma separated list of TRES=# values to be allocated for every job + """ + tres_per_node: str | None = None + """ + Comma separated list of TRES=# values to be allocated for every node + """ + tres_per_socket: str | None = None + """ + Comma separated list of TRES=# values to be allocated for every socket + """ + tres_per_task: str | None = None + """ + Comma separated list of TRES=# values to be allocated for every task + """ + user_id: str | None = None + """ + User ID that owns the job + """ + wait_all_nodes: bool | None = None + """ + If true, wait to start until after all nodes have booted + """ + wait_for_switch: int | None = None + """ + Maximum time to wait for switches in seconds + """ + wckey: str | None = None + """ + Workload characterization key + """ + x11: X11Flags | None = None + """ + X11 forwarding options + """ + x11_magic_cookie: str | None = None + """ + Magic cookie for X11 forwarding + """ + x11_target_host: str | None = None + """ + Hostname or UNIX socket if x11_target_port=0 + """ + x11_target_port: int | None = None + """ + TCP port + """ + + +class JobDescMsgList(RootModel[list[JobDescMsg]]): + root: list[JobDescMsg] + + +class JobResCore(BaseModel): + index: int + """ + Core index + """ + status: JobResCoreStatus + """ + Core status + """ + + +class JobResCoreArray(RootModel[list[JobResCore]]): + root: list[JobResCore] + + +class JobResSocket(BaseModel): + cores: JobResCoreArray + """ + Core in socket + """ + index: int + """ + Core index + """ + + +class JobResSocketArray(RootModel[list[JobResSocket]]): + root: list[JobResSocket] + + +class KillJobsRespJob(BaseModel): + error: Error | None = None + federation: Federation | None = None + job_id: Uint32NoValStruct + """ + Job ID that signaling failed + """ + step_id: str + """ + Job or Step ID that signaling failed + """ + + +class KillJobsRespMsg(RootModel[list[KillJobsRespJob]]): + """ + List of jobs signal responses + """ + + root: list[KillJobsRespJob] + """ + List of jobs signal responses + """ + + +class Node(BaseModel): + active_features: CsvString | None = None + """ + Currently active features + """ + address: str | None = None + """ + NodeAddr, used to establish a communication path + """ + alloc_cpus: int | None = None + """ + Total number of CPUs currently allocated for jobs + """ + alloc_idle_cpus: int | None = None + """ + Total number of idle CPUs + """ + alloc_memory: int | None = None + """ + Total memory in MB currently allocated for jobs + """ + architecture: str | None = None + """ + Computer architecture + """ + boards: int | None = None + """ + Number of Baseboards in nodes with a baseboard controller + """ + boot_time: Uint64NoValStruct | None = None + """ + Time when the node booted (UNIX timestamp) + """ + burstbuffer_network_address: str | None = None + """ + Alternate network path to be used for sbcast network traffic + """ + cluster_name: str | None = None + """ + Cluster name (only set in federated environments) + """ + comment: str | None = None + """ + Arbitrary comment + """ + cores: int | None = None + """ + Number of cores in a single physical processor socket + """ + cpu_binding: int | None = None + """ + Default method for binding tasks to allocated CPUs + """ + cpu_load: int | None = None + """ + CPU load as reported by the OS + """ + cpus: int | None = None + """ + Total CPUs, including cores and threads + """ + effective_cpus: int | None = None + """ + Number of effective CPUs (excluding specialized CPUs) + """ + energy: AcctGatherEnergy | None = None + """ + Energy usage data + """ + external_sensors: dict[str, Any] | None = None + extra: str | None = None + """ + Arbitrary string used for node filtering if extra constraints are enabled + """ + features: CsvString | None = None + """ + Available features + """ + free_mem: Uint64NoValStruct | None = None + """ + Total memory in MB currently free as reported by the OS + """ + gpu_spec: str | None = None + """ + CPU cores reserved for jobs that also use a GPU + """ + gres: str | None = None + """ + Generic resources + """ + gres_drained: str | None = None + """ + Drained generic resources + """ + gres_used: str | None = None + """ + Generic resources currently in use + """ + hostname: str | None = None + """ + NodeHostname + """ + instance_id: str | None = None + """ + Cloud instance ID + """ + instance_type: str | None = None + """ + Cloud instance type + """ + last_busy: Uint64NoValStruct | None = None + """ + Time when the node was last busy (UNIX timestamp) + """ + mcs_label: str | None = None + """ + Multi-Category Security label + """ + name: str | None = None + """ + NodeName + """ + next_state_after_reboot: NodeStates | None = None + """ + The state the node will be assigned after rebooting + """ + operating_system: str | None = None + """ + Operating system reported by the node + """ + owner: str | None = None + """ + User allowed to run jobs on this node (unset if no restriction) + """ + partitions: CsvString | None = None + """ + Partitions containing this node + """ + port: int | None = None + """ + TCP port number of the slurmd + """ + power: dict[str, Any] | None = None + real_memory: int | None = None + """ + Total memory in MB on the node + """ + reason: str | None = None + """ + Describes why the node is in a "DOWN", "DRAINED", "DRAINING", "FAILING" or "FAIL" state + """ + reason_changed_at: Uint64NoValStruct | None = None + """ + When the reason changed (UNIX timestamp) + """ + reason_set_by_user: str | None = None + """ + User who set the reason + """ + res_cores_per_gpu: int | None = None + """ + Number of CPU cores per GPU restricted to GPU jobs + """ + reservation: str | None = None + """ + Name of reservation containing this node + """ + resume_after: Uint64NoValStruct | None = None + """ + Number of seconds after the node's state is updated to "DOWN" or "DRAIN" before scheduling a node state resume + """ + slurmd_start_time: Uint64NoValStruct | None = None + """ + Time when the slurmd started (UNIX timestamp) + """ + sockets: int | None = None + """ + Number of physical processor sockets/chips on the node + """ + specialized_cores: int | None = None + """ + Number of cores reserved for system use + """ + specialized_cpus: str | None = None + """ + Abstract CPU IDs on this node reserved for exclusive use by slurmd and slurmstepd + """ + specialized_memory: int | None = None + """ + Combined memory limit, in MB, for Slurm compute node daemons + """ + state: NodeStates | None = None + """ + Node state(s) applicable to this node + """ + temporary_disk: int | None = None + """ + Total size in MB of temporary disk storage in TmpFS + """ + threads: int | None = None + """ + Number of logical threads in a single physical core + """ + tres: str | None = None + """ + Configured trackable resources + """ + tres_used: str | None = None + """ + Trackable resources currently allocated for jobs + """ + tres_weighted: float | None = None + """ + Weighted number of billable trackable resources allocated + """ + version: str | None = None + """ + Slurmd version + """ + weight: int | None = None + """ + Weight of the node for scheduling purposes + """ + + +class Nodes1(RootModel[list[Node]]): + root: list[Node] + + +class OpenapiMeta(BaseModel): + client: Client | None = None + command: StringArray | None = None + """ + CLI command (if applicable) + """ + plugin: Plugin | None = None + slurm: Slurm | None = None + + +class OpenapiResp(BaseModel): + errors: OpenapiErrors | None = None + """ + Query errors + """ + meta: OpenapiMeta | None = None + """ + Slurm meta values + """ + warnings: OpenapiWarnings | None = None + """ + Query warnings + """ + + +class OpenapiSlurmdbdPingResp(BaseModel): + errors: OpenapiErrors | None = None + """ + Query errors + """ + meta: OpenapiMeta | None = None + """ + Slurm meta values + """ + pings: SlurmdbdPingArray + """ + pings + """ + warnings: OpenapiWarnings | None = None + """ + Query warnings + """ + + +class OpenapiSlurmdbdQosRemovedResp(BaseModel): + errors: OpenapiErrors | None = None + """ + Query errors + """ + meta: OpenapiMeta | None = None + """ + Slurm meta values + """ + removed_qos: StringList + """ + removed QOS + """ + warnings: OpenapiWarnings | None = None + """ + Query warnings + """ + + +class OpenapiTresResp(BaseModel): + TRES: TresList + """ + TRES + """ + errors: OpenapiErrors | None = None + """ + Query errors + """ + meta: OpenapiMeta | None = None + """ + Slurm meta values + """ + warnings: OpenapiWarnings | None = None + """ + Query warnings + """ + + +class OpenapiUsersAddCondRespStr(BaseModel): + added_users: str + """ + added_users + """ + errors: OpenapiErrors | None = None + """ + Query errors + """ + meta: OpenapiMeta | None = None + """ + Slurm meta values + """ + warnings: OpenapiWarnings | None = None + """ + Query warnings + """ + + +class OpenapiWckeyRemovedResp(BaseModel): + deleted_wckeys: StringList + """ + deleted wckeys + """ + errors: OpenapiErrors | None = None + """ + Query errors + """ + meta: OpenapiMeta | None = None + """ + Slurm meta values + """ + warnings: OpenapiWarnings | None = None + """ + Query warnings + """ + + +class Defaults(BaseModel): + job: str | None = None + """ + JobDefaults + """ + memory_per_cpu: int | None = None + """ + DefMemPerCPU or DefMemPerNode + """ + partition_memory_per_cpu: Uint64NoValStruct | None = None + """ + DefMemPerCPU + """ + partition_memory_per_node: Uint64NoValStruct | None = None + """ + DefMemPerNode + """ + time: Uint32NoValStruct | None = None + """ + DefaultTime in minutes + """ + + +class Maximums(BaseModel): + cpus_per_node: Uint32NoValStruct | None = None + """ + MaxCPUsPerNode + """ + cpus_per_socket: Uint32NoValStruct | None = None + """ + MaxCPUsPerSocket + """ + memory_per_cpu: int | None = None + """ + MaxMemPerCPU or MaxMemPerNode + """ + nodes: Uint32NoValStruct | None = None + """ + MaxNodes + """ + over_time_limit: Uint16NoValStruct | None = None + """ + OverTimeLimit + """ + oversubscribe: Oversubscribe | None = None + partition_memory_per_cpu: Uint64NoValStruct | None = None + """ + MaxMemPerCPU + """ + partition_memory_per_node: Uint64NoValStruct | None = None + """ + MaxMemPerNode + """ + shares: int | None = None + """ + OverSubscribe + """ + time: Uint32NoValStruct | None = None + """ + MaxTime + """ + + +class Partition(BaseModel): + state: PartitionStates | None = None + """ + Current state(s) + """ + + +class Timeouts(BaseModel): + resume: Uint16NoValStruct | None = None + """ + ResumeTimeout (GLOBAL if both set and infinite are false) + """ + suspend: Uint16NoValStruct | None = None + """ + SuspendTimeout (GLOBAL if both set and infinite are false) + """ + + +class PartitionInfo(BaseModel): + accounts: Accounts | None = None + alternate: str | None = None + """ + Alternate + """ + cluster: str | None = None + """ + Cluster name + """ + cpus: Cpus1 | None = None + defaults: Defaults | None = None + grace_time: int | None = None + """ + GraceTime + """ + groups: Groups | None = None + maximums: Maximums | None = None + minimums: Minimums | None = None + name: str | None = None + """ + PartitionName + """ + node_sets: str | None = None + """ + NodeSets + """ + nodes: Nodes2 | None = None + partition: Partition | None = None + priority: Priority | None = None + qos: Qos | None = None + select_type: CrType | None = None + """ + Scheduler consumable resource selection type + """ + suspend_time: Uint32NoValStruct | None = None + """ + SuspendTime (GLOBAL if both set and infinite are false) + """ + timeouts: Timeouts | None = None + tres: Tres4 | None = None + + +class PartitionInfoMsg(RootModel[list[PartitionInfo]]): + root: list[PartitionInfo] + + +class Signal(BaseModel): + id: Uint16NoValStruct | None = None + """ + Signal sent to process (numeric) + """ + name: str | None = None + """ + Signal sent to process (name) + """ + + +class ProcessExitCodeVerbose(BaseModel): + return_code: Uint32NoValStruct | None = None + """ + Process return code (numeric) + """ + signal: Signal | None = None + status: ProcessExitCodeStatus | None = None + """ + Status given by return code + """ + + +class Per4(BaseModel): + account: Uint32NoValStruct | None = None + """ + MaxJobsAccruePerAccount + """ + user: Uint32NoValStruct | None = None + """ + MaxJobsAccruePerUser + """ + + +class Accruing(BaseModel): + per: Per4 | None = None + + +class ActiveJobs(BaseModel): + accruing: Uint32NoValStruct | None = None + """ + GrpJobsAccrue + """ + count: Uint32NoValStruct | None = None + """ + GrpJobs + """ + + +class Per5(BaseModel): + account: Uint32NoValStruct | None = None + """ + MaxJobsPerAccount + """ + user: Uint32NoValStruct | None = None + """ + MaxJobsPerUser + """ + + +class ActiveJobs1(BaseModel): + per: Per5 | None = None + + +class Per6(BaseModel): + account: Uint32NoValStruct | None = None + """ + MaxSubmitJobsPerAccount + """ + user: Uint32NoValStruct | None = None + """ + MaxSubmitJobsPerUser + """ + + +class Jobs1(BaseModel): + active_jobs: ActiveJobs1 | None = None + count: Uint32NoValStruct | None = None + """ + GrpSubmitJobs + """ + per: Per6 | None = None + + +class Per7(BaseModel): + account: TresList | None = None + """ + MaxTRESRunMinsPerAccount + """ + job: TresList | None = None + """ + MaxTRESMinsPerJob + """ + qos: TresList | None = None + """ + GrpTRESRunMins + """ + user: TresList | None = None + """ + MaxTRESRunMinsPerUser + """ + + +class Minutes1(BaseModel): + per: Per7 | None = None + total: TresList | None = None + """ + GrpTRESMins + """ + + +class Per8(BaseModel): + account: TresList | None = None + """ + MaxTRESPerAccount + """ + job: TresList | None = None + """ + MaxTRESPerJob + """ + node: TresList | None = None + """ + MaxTRESPerNode + """ + user: TresList | None = None + """ + MaxTRESPerUser + """ + + +class Tres5(BaseModel): + minutes: Minutes1 | None = None + per: Per8 | None = None + total: TresList | None = None + """ + GrpTRES + """ + + +class Per9(BaseModel): + job: Uint32NoValStruct | None = None + """ + MaxWallDurationPerJob + """ + qos: Uint32NoValStruct | None = None + """ + GrpWall + """ + + +class WallClock(BaseModel): + per: Per9 | None = None + + +class Max2(BaseModel): + accruing: Accruing | None = None + active_jobs: ActiveJobs | None = None + jobs: Jobs1 | None = None + tres: Tres5 | None = None + wall_clock: WallClock | None = None + + +class Per10(BaseModel): + job: TresList | None = None """ - Default settings + MinTRES """ - qos: str | None = None + +class Tres6(BaseModel): + per: Per10 | None = None + + +class Min1(BaseModel): + priority_threshold: Uint32NoValStruct | None = None """ - Default QOS + MinPrioThreshold """ + tres: Tres6 | None = None -class Per(BaseModel): +class Limits1(BaseModel): + factor: Float64NoValStruct | None = None """ - Max jobs per settings + LimitFactor """ - - wall_clock: int | None = None + grace_time: int | None = None """ - Max wallclock per job + GraceTime """ + max: Max2 | None = None + min: Min1 | None = None -class Jobs(BaseModel): +class Preempt(BaseModel): + exempt_time: Uint32NoValStruct | None = None """ - Max jobs settings + PreemptExemptTime """ - - per: Per | None = None + list: QosPreemptList | None = None + """ + Other QOS's this QOS can preempt + """ + mode: QosPreemptModes | None = None """ - Max jobs per settings + PreemptMode """ -class Account(BaseModel): +class Qos1(BaseModel): + description: str | None = None """ - Max per accounting settings + Arbitrary description """ - - wall_clock: int | None = None + flags: QosFlags | None = None """ - Max wallclock per account + Flags, to avoid modifying current values specify NOT_SET """ - - -class Per1(BaseModel): + id: int | None = None """ - Max per settings + Unique ID """ - - account: Account | None = None + limits: Limits1 | None = None + name: str | None = None + """ + Name + """ + preempt: Preempt | None = None + priority: Uint32NoValStruct | None = None + """ + Priority + """ + usage_factor: Float64NoValStruct | None = None """ - Max per accounting settings + UsageFactor + """ + usage_threshold: Float64NoValStruct | None = None + """ + UsageThreshold """ -class Min(BaseModel): +class QosList(RootModel[list[Qos1]]): + root: list[Qos1] + + +class PurgeCompleted(BaseModel): + time: Uint32NoValStruct | None = None """ - Min settings + If PURGE_COMP flag is set, the number of seconds this reservation will sit idle until it is revoked """ - priority_threshold: int | None = None + +class ReservationInfo(BaseModel): + accounts: str | None = None + """ + Comma separated list of permitted accounts + """ + burst_buffer: str | None = None + """ + BurstBuffer + """ + core_count: int | None = None + """ + CoreCnt + """ + core_specializations: ReservationInfoCoreSpec | None = None + """ + Reserved cores specification + """ + end_time: Uint64NoValStruct | None = None + """ + EndTime (UNIX timestamp) + """ + features: str | None = None + """ + Features + """ + flags: ReservationFlags | None = None + """ + Flags associated with this reservation + """ + groups: str | None = None + """ + Groups + """ + licenses: str | None = None + """ + Licenses + """ + max_start_delay: int | None = None """ - Min priority threshold + MaxStartDelay in seconds """ + name: str | None = None + """ + ReservationName + """ + node_count: int | None = None + """ + NodeCnt + """ + node_list: str | None = None + """ + Nodes + """ + partition: str | None = None + """ + PartitionName + """ + purge_completed: PurgeCompleted | None = None + start_time: Uint64NoValStruct | None = None + """ + StartTime (UNIX timestamp) + """ + tres: str | None = None + """ + Comma separated list of required TRES + """ + users: str | None = None + """ + Comma separated list of permitted users + """ + watts: Uint32NoValStruct | None = None + """ + 32 bit integer number with flags + """ + + +class ReservationInfoMsg(RootModel[list[ReservationInfo]]): + root: list[ReservationInfo] -class Usage(BaseModel): +class SharesUint64Tres(BaseModel): + name: str | None = None """ - Association usage + TRES name """ - - accrue_job_count: int | None = None + value: Uint64NoValStruct | None = None """ - Jobs accuring priority + TRES value """ - effective_normalized_usage: float | None = None + + +class SharesUint64TresList(RootModel[list[SharesUint64Tres]]): + root: list[SharesUint64Tres] + + +class StatsMsgRpcType(BaseModel): + average_time: Uint64NoValStruct """ - Effective normalized usage + Average time spent processing RPC in seconds """ - fairshare_factor: float | None = None + count: int """ - Fairshare factor + Number of RPCs received """ - fairshare_level: float | None = None + cycle_last: int """ - Fairshare level + Number of RPCs processed within the last RPC queue cycle """ - fairshare_shares: int | None = None + cycle_max: int """ - Fairshare shares + Maximum number of RPCs processed within a RPC queue cycle since start """ - group_used_wallclock: float | None = None + dropped: int """ - Group used wallclock time (s) + Number of RPCs dropped """ - job_count: int | None = None + message_type: str """ - Total jobs submitted + Message type as string """ - normalized_priority: int | None = None + queued: int """ - Currently active jobs + Number of RPCs queued """ - normalized_shares: float | None = None + total_time: int """ - Normalized shares + Total time spent processing RPC in seconds """ - raw_usage: int | None = None + type_id: int """ - Raw usage + Message type as integer """ -class DbAssociationShortInfo(BaseModel): - account: str | None = None +class StatsMsgRpcUser(BaseModel): + average_time: Uint64NoValStruct """ - Account name + Average time spent processing RPC in seconds """ - cluster: str | None = None + count: int """ - Cluster name + Number of RPCs received """ - partition: str | None = None + total_time: int """ - Partition name (optional) + Total time spent processing RPC in seconds """ - user: str | None = None + user: str """ User name """ + user_id: int + """ + User ID (numeric) + """ -class Associations(BaseModel): +class StatsMsgRpcsByType(RootModel[list[StatsMsgRpcType]]): """ - Information about associations + RPCs by type """ - root: DbAssociationShortInfo | None = None + root: list[StatsMsgRpcType] + """ + RPCs by type + """ -class Controller(BaseModel): +class StatsMsgRpcsByUser(RootModel[list[StatsMsgRpcUser]]): """ - Information about controller + RPCs by user """ - host: str | None = None + root: list[StatsMsgRpcUser] """ - Hostname + RPCs by user """ - port: int | None = None + + +class StatsRec(BaseModel): + RPCs: StatsRpcList | None = None + """ + List of RPCs sent to the slurmdbd + """ + rollups: RollupStats | None = None + """ + Rollup statistics """ - Port number + time_start: int | None = None + """ + When data collection started (UNIX timestamp) + """ + users: StatsUserList | None = None + """ + List of users that issued RPCs """ -class DbCoordinatorInfo(BaseModel): - direct: int | None = None +class RequestedFrequency(BaseModel): + max: Uint32NoValStruct | None = None """ - If user is coordinator of this account directly or coordinator status was inherited from a higher account in the tree + Maximum requested CPU frequency in kHz """ - name: str | None = None + min: Uint32NoValStruct | None = None """ - Name of user + Minimum requested CPU frequency in kHz """ -class Time(BaseModel): +class CPU(BaseModel): + governor: str | None = None """ - Time values + Requested CPU frequency governor in kHz """ + requested_frequency: RequestedFrequency | None = None - average: int | None = None + +class Energy(BaseModel): + consumed: Uint64NoValStruct | None = None """ - Average time spent processing this RPC type + Total energy consumed by all tasks in a job in joules """ - total: int | None = None + + +class Statistics(BaseModel): + CPU: CPU1 | None = None + energy: Energy | None = None + + +class Time4(BaseModel): + elapsed: int | None = None + """ + Elapsed time in seconds + """ + end: Uint64NoValStruct | None = None + """ + End time (UNIX timestamp) """ - Total time spent processing this RPC type + start: Uint64NoValStruct | None = None """ + Time execution began (UNIX timestamp) + """ + suspended: int | None = None + """ + Total time in suspended state in seconds + """ + system: System1 | None = None + total: Total1 | None = None + user: User1 | None = None + + +class StepTresReqMax(RootModel[list[Tres]]): + root: list[Tres] + +class StepTresReqMin(RootModel[list[Tres]]): + root: list[Tres] -class RPC(BaseModel): + +class StepTresUsageMax(RootModel[list[Tres]]): + root: list[Tres] + + +class StepTresUsageMin(RootModel[list[Tres]]): + root: list[Tres] + + +class UsersAddCond(BaseModel): + accounts: StringList | None = None + """ + CSV accounts list + """ + association: AssocRecSet | None = None + """ + Association limits and options """ - Statistics by RPC type + clusters: StringList | None = None + """ + CSV clusters list + """ + partitions: StringList | None = None + """ + CSV partitions list + """ + users: StringList + """ + CSV users list + """ + wckeys: StringList | None = None + """ + CSV WCKeys list """ - count: int | None = None + +class Wckey(BaseModel): + accounting: AccountingList | None = None """ - Number of RPCs + Accounting records containing related resource usage """ - rpc: str | None = None + cluster: str """ - RPC type + Cluster name """ - time: Time | None = None + flags: WckeyFlags | None = None + """ + Flags associated with this WCKey + """ + id: int | None = None + """ + Unique ID for this user-cluster-wckey combination + """ + name: str + """ + WCKey name """ - Time values + user: str """ + User name + """ + + +class WckeyList(RootModel[list[Wckey]]): + root: list[Wckey] -class Rollup(BaseModel): +class AccountsAddCond(BaseModel): + accounts: StringList """ - Rollup statistics + CSV accounts list + """ + association: AssocRecSet | None = None + """ + Association limits and options + """ + clusters: StringList | None = None """ + CSV clusters list + """ + - last_cycle: int | None = None +class Tres2(BaseModel): + group_minutes: SharesUint64TresList | None = None """ - Timestamp of last cycle + TRES-minute limit """ - last_run: int | None = None + run_seconds: SharesUint64TresList | None = None """ - Timestamp of last rollup + Currently running tres-secs = grp_used_tres_run_secs """ - max_cycle: int | None = None + usage: SharesFloat128TresList | None = None """ - Max time of all cycles + Measure of each TRES usage """ - mean_cycles: int | None = None + + +class AssocSharesObjWrap(BaseModel): + cluster: str | None = None + """ + Cluster name + """ + effective_usage: Float64NoValStruct | None = None """ - Average time (s) of cycle + Effective, normalized usage """ - total_time: int | None = None + fairshare: Fairshare | None = None + id: int | None = None """ - Total time (s) spent doing rollup + Association ID """ - type: str | None = None + name: str | None = None + """ + Share name + """ + parent: str | None = None + """ + Parent name + """ + partition: str | None = None + """ + Partition name + """ + shares: Uint32NoValStruct | None = None + """ + Number of shares allocated + """ + shares_normalized: Float64NoValStruct | None = None + """ + Normalized shares + """ + tres: Tres2 | None = None + type: AssocSharesObjWrapType | None = None + """ + User or account association + """ + usage: int | None = None """ - Type of rollup + Measure of tresbillableunits usage + """ + usage_normalized: Float64NoValStruct | None = None + """ + Normalized usage """ -class Time1(BaseModel): +class JobResNode(BaseModel): + cpus: Cpus | None = None + index: int + """ + Node index """ - Time values + memory: Memory | None = None + name: str + """ + Node name + """ + sockets: JobResSocketArray + """ + Socket allocations in node """ - average: int | None = None + +class JobResNodes(RootModel[list[JobResNode]]): """ - Average time spent processing each user RPC + Job resources for a node """ - total: int | None = None + + root: list[JobResNode] """ - Total time spent processing each user RPC + Job resources for a node """ -class User(BaseModel): +class OpenapiAccountsAddCondResp(BaseModel): + account: AccountShort | None = None + """ + Account organization and description + """ + association_condition: AccountsAddCond | None = None + """ + CSV list of accounts, association limits and options, CSV list of clusters + """ + errors: OpenapiErrors | None = None """ - Statistics by user RPCs + Query errors + """ + meta: OpenapiMeta | None = None + """ + Slurm meta values + """ + warnings: OpenapiWarnings | None = None + """ + Query warnings """ - count: int | None = None + +class OpenapiAccountsAddCondRespStr(BaseModel): + added_accounts: str """ - Number of RPCs + added_accounts """ - time: Time1 | None = None + errors: OpenapiErrors | None = None """ - Time values + Query errors """ - user: str | None = None + meta: OpenapiMeta | None = None """ - User name + Slurm meta values + """ + warnings: OpenapiWarnings | None = None + """ + Query warnings """ -class Statistics(BaseModel): - RPCs: list[RPC] | None = None - rollups: list[Rollup] | None = None - time_start: int | None = None +class OpenapiAccountsRemovedResp(BaseModel): + errors: OpenapiErrors | None = None + """ + Query errors + """ + meta: OpenapiMeta | None = None + """ + Slurm meta values """ - Unix timestamp of start time + removed_accounts: StringList + """ + removed_accounts + """ + warnings: OpenapiWarnings | None = None + """ + Query warnings """ - users: list[User] | None = None -class DbError(BaseModel): - description: str | None = None +class OpenapiAccountsResp(BaseModel): + accounts: AccountList """ - Explaination of cause of error + accounts """ - error: str | None = None + errors: OpenapiErrors | None = None """ - Error message + Query errors """ - error_number: int | None = None + meta: OpenapiMeta | None = None + """ + Slurm meta values + """ + warnings: OpenapiWarnings | None = None + """ + Query warnings + """ + + +class OpenapiAssocsRemovedResp(BaseModel): + errors: OpenapiErrors | None = None + """ + Query errors + """ + meta: OpenapiMeta | None = None + """ + Slurm meta values + """ + removed_associations: StringList """ - Slurm internal error number + removed_associations """ - source: str | None = None + warnings: OpenapiWarnings | None = None """ - Where error occured in the source + Query warnings """ -class DbErrors(RootModel): +class OpenapiAssocsResp(BaseModel): + associations: AssocList """ - Slurm errors + associations """ - - root: list[DbError] + errors: OpenapiErrors | None = None """ - Slurm errors + Query errors """ - - -class Running(BaseModel): + meta: OpenapiMeta | None = None """ - Limits on array settings + Slurm meta values """ - - tasks: int | None = None + warnings: OpenapiWarnings | None = None """ - Max running tasks in array at any one time + Query warnings """ -class Max1(BaseModel): +class OpenapiClustersRemovedResp(BaseModel): + deleted_clusters: StringList """ - Limits on array settings + deleted_clusters """ - - running: Running | None = None + errors: OpenapiErrors | None = None """ - Limits on array settings + Query errors """ - - -class Limits(BaseModel): + meta: OpenapiMeta | None = None """ - Limits on array settings + Slurm meta values """ - - max: Max1 | None = None + warnings: OpenapiWarnings | None = None """ - Limits on array settings + Query warnings """ -class Array(BaseModel): - """ - Array properties (optional) - """ - - job_id: int | None = None +class OpenapiClustersResp(BaseModel): + clusters: ClusterRecList """ - Job id of array + clusters """ - limits: Limits | None = None + errors: OpenapiErrors | None = None """ - Limits on array settings + Query errors """ - task: str | None = None + meta: OpenapiMeta | None = None """ - Array task + Slurm meta values """ - task_id: int | None = None + warnings: OpenapiWarnings | None = None """ - Array task id + Query warnings """ -class Comment(BaseModel): +class OpenapiInstancesResp(BaseModel): + errors: OpenapiErrors | None = None """ - Job comments by type + Query errors """ - - administrator: str | None = None + instances: InstanceList """ - Administrator set comment + instances """ - job: str | None = None + meta: OpenapiMeta | None = None """ - Job comment + Slurm meta values """ - system: str | None = None + warnings: OpenapiWarnings | None = None """ - System set comment + Query warnings """ -class Het(BaseModel): +class OpenapiSlurmdbdQosResp(BaseModel): + errors: OpenapiErrors | None = None """ - Heterogeneous Job details (optional) + Query errors """ - - job_id: int | None = None + meta: OpenapiMeta | None = None """ - Parent HetJob id + Slurm meta values """ - job_offset: int | None = None + qos: QosList """ - Offset of this job to parent + List of QOS """ - - -class Mcs(BaseModel): + warnings: OpenapiWarnings | None = None """ - Multi-Category Security + Query warnings """ - label: str | None = None + +class OpenapiSlurmdbdStatsResp(BaseModel): + errors: OpenapiErrors | None = None """ - Assigned MCS label + Query errors """ - - -class Required(BaseModel): + meta: OpenapiMeta | None = None """ - Job run requirements + Slurm meta values """ - - CPUs: int | None = None + statistics: StatsRec """ - Required number of CPUs + statistics """ - memory: int | None = None + warnings: OpenapiWarnings | None = None """ - Required amount of memory (MiB) + Query warnings """ -class Reservation(BaseModel): +class OpenapiUsersAddCondResp(BaseModel): + association_condition: UsersAddCond """ - Reservation usage details + Filters to select associations for users """ - - id: int | None = None + errors: OpenapiErrors | None = None + """ + Query errors """ - Database id of reservation + meta: OpenapiMeta | None = None """ - name: int | None = None + Slurm meta values """ - Name of reservation + user: UserShort + """ + Admin level of user, DefaultAccount, DefaultWCKey + """ + warnings: OpenapiWarnings | None = None + """ + Query warnings """ -class State(BaseModel): +class OpenapiWckeyResp(BaseModel): + errors: OpenapiErrors | None = None """ - State properties of job + Query errors """ - - current: str | None = None + meta: OpenapiMeta | None = None """ - Current state of job + Slurm meta values """ - reason: str | None = None + warnings: OpenapiWarnings | None = None + """ + Query warnings + """ + wckeys: WckeyList """ - Last reason job didn't run + wckeys """ -class System(BaseModel): +class StatsMsg(BaseModel): + agent_count: int | None = None """ - System time values + Number of agent threads """ - - microseconds: int | None = None + agent_queue_size: int | None = None """ - Total number of CPU-seconds used by the system on behalf of the process (in kernel mode), in microseconds + Number of enqueued outgoing RPC requests in an internal retry list """ - seconds: int | None = None + agent_thread_count: int | None = None """ - Total number of CPU-seconds used by the system on behalf of the process (in kernel mode), in seconds + Total number of active threads created by all agent threads """ - - -class Total(BaseModel): + bf_active: bool | None = None """ - System time values + Backfill scheduler currently running """ - - microseconds: int | None = None + bf_backfilled_het_jobs: int | None = None """ - Total number of CPU-seconds used by the job, in microseconds + Number of heterogeneous job components started through backfilling since last Slurm start """ - seconds: int | None = None + bf_backfilled_jobs: int | None = None """ - Total number of CPU-seconds used by the job, in seconds + Number of jobs started through backfilling since last slurm start """ - - -class User1(BaseModel): + bf_cycle_counter: int | None = None """ - User land time values + Number of backfill scheduling cycles since last reset """ - - microseconds: int | None = None + bf_cycle_last: int | None = None """ - Total number of CPU-seconds used by the job in user land, in microseconds + Execution time in microseconds of last backfill scheduling cycle """ - seconds: int | None = None + bf_cycle_max: int | None = None """ - Total number of CPU-seconds used by the job in user land, in seconds + Execution time in microseconds of longest backfill scheduling cycle """ - - -class Time2(BaseModel): + bf_cycle_mean: int | None = None """ - Time properties + Mean time in microseconds of backfilling scheduling cycles since last reset """ - - elapsed: int | None = None + bf_cycle_sum: int | None = None """ - Total time elapsed + Total time in microseconds of backfilling scheduling cycles since last reset """ - eligible: int | None = None + bf_depth_mean: int | None = None """ - Total time eligible to run + Mean number of eligible to run jobs processed during all backfilling scheduling cycles since last reset """ - end: int | None = None + bf_depth_mean_try: int | None = None """ - Timestamp of when job ended + The subset of Depth Mean that the backfill scheduler attempted to schedule """ - limit: int | None = None + bf_depth_sum: int | None = None """ - Job wall clock time limit + Total number of jobs processed during all backfilling scheduling cycles since last reset """ - start: int | None = None + bf_depth_try_sum: int | None = None """ - Timestamp of when job started + Subset of bf_depth_sum that the backfill scheduler attempted to schedule """ - submission: int | None = None + bf_exit: BfExitFields | None = None """ - Timestamp of when job submitted + Reasons for which the backfill scheduling cycle exited since last reset """ - suspended: int | None = None + bf_last_backfilled_jobs: int | None = None """ - Timestamp of when job last suspended + Number of jobs started through backfilling since last reset """ - system: System | None = None + bf_last_depth: int | None = None """ - System time values + Number of processed jobs during last backfilling scheduling cycle """ - total: Total | None = None + bf_last_depth_try: int | None = None """ - System time values + Number of processed jobs during last backfilling scheduling cycle that had a chance to start using available resources """ - user: User1 | None = None + bf_queue_len: int | None = None """ - User land time values + Number of jobs pending to be processed by backfilling algorithm """ - - -class Wckey(BaseModel): + bf_queue_len_mean: int | None = None """ - Job assigned wckey details + Mean number of jobs pending to be processed by backfilling algorithm """ - - flags: list[str] | None = None + bf_queue_len_sum: int | None = None """ - wckey flags + Total number of jobs pending to be processed by backfilling algorithm since last reset """ - wckey: str | None = None + bf_table_size: int | None = None """ - Job assigned wckey + Number of different time slots tested by the backfill scheduler in its last iteration """ - - -class Signal(BaseModel): + bf_table_size_mean: int | None = None """ - Signal details (if signaled) + Mean number of different time slots tested by the backfill scheduler """ - - name: str | None = None + bf_table_size_sum: int | None = None """ - Name of signal received + Total number of different time slots tested by the backfill scheduler """ - signal_id: int | None = None + bf_when_last_cycle: Uint64NoValStruct | None = None """ - Signal number process received + When the last backfill scheduling cycle happened (UNIX timestamp) """ - - -class DbJobExitCode(BaseModel): - return_code: int | None = None + dbd_agent_queue_size: int | None = None """ - Return code from parent process + Number of messages for SlurmDBD that are queued """ - signal: Signal | None = None + gettimeofday_latency: int | None = None """ - Signal details (if signaled) + Latency of 1000 calls to the gettimeofday() syscall in microseconds, as measured at controller startup """ - status: str | None = None + job_states_ts: Uint64NoValStruct | None = None """ - Job exit status + When the job state counts were gathered (UNIX timestamp) """ - - -class RequestedFrequency(BaseModel): + jobs_canceled: int | None = None """ - CPU frequency requested + Number of jobs canceled since the last reset """ - - max: int | None = None + jobs_completed: int | None = None """ - Max CPU frequency + Number of jobs completed since last reset """ - min: int | None = None + jobs_failed: int | None = None """ - Min CPU frequency + Number of jobs failed due to slurmd or other internal issues since last reset """ - - -class CPU(BaseModel): + jobs_pending: int | None = None """ - CPU properties + Number of jobs pending at the time of listed in job_state_ts """ - - governor: list[str] | None = None + jobs_running: int | None = None """ - CPU governor + Number of jobs running at the time of listed in job_state_ts """ - requested_frequency: RequestedFrequency | None = None + jobs_started: int | None = None """ - CPU frequency requested + Number of jobs started since last reset """ - - -class Nodes(BaseModel): + jobs_submitted: int | None = None """ - Node details + Number of jobs submitted since last reset """ - - count: int | None = None + parts_packed: int | None = None """ - Total number of nodes in step + Zero if only RPC statistic included """ - range: str | None = None + pending_rpcs: StatsMsgRpcsQueue | None = None """ - Nodes in step + Pending RPC statistics """ - - -class CPU1(BaseModel): + pending_rpcs_by_hostlist: StatsMsgRpcsDump | None = None """ - Statistics of CPU + Pending RPCs hostlists """ - - actual_frequency: int | None = None + req_time: Uint64NoValStruct | None = None """ - Actual frequency of CPU during step + When the request was made (UNIX timestamp) """ - - -class Energy(BaseModel): + req_time_start: Uint64NoValStruct | None = None """ - Statistics of energy + When the data in the report started (UNIX timestamp) """ - - consumed: int | None = None + rpcs_by_message_type: StatsMsgRpcsByType | None = None """ - Energy consumed during step + Most frequently issued remote procedure calls (RPCs) """ - - -class Statistics1(BaseModel): + rpcs_by_user: StatsMsgRpcsByUser | None = None """ - Statistics of job step + RPCs issued by user ID """ - - CPU: CPU1 | None = None + schedule_cycle_depth: int | None = None """ - Statistics of CPU + Total number of jobs processed in scheduling cycles """ - energy: Energy | None = None + schedule_cycle_last: int | None = None """ - Statistics of energy + Time in microseconds for last scheduling cycle """ - - -class Het1(BaseModel): + schedule_cycle_max: int | None = None """ - Heterogeneous job details + Max time of any scheduling cycle in microseconds since last reset """ - - component: int | None = None + schedule_cycle_mean: int | None = None """ - Parent HetJob component id + Mean time in microseconds for all scheduling cycles since last reset """ - - -class Step(BaseModel): + schedule_cycle_mean_depth: int | None = None """ - Step details + Mean of the number of jobs processed in a scheduling cycle """ - - het: Het1 | None = None + schedule_cycle_per_minute: int | None = None """ - Heterogeneous job details + Number of scheduling executions per minute """ - id: str | None = None + schedule_cycle_sum: int | None = None """ - Step id + Total run time in microseconds for all scheduling cycles since last reset """ - job_id: int | None = None + schedule_cycle_total: int | None = None """ - Parent job id + Number of scheduling cycles since last reset """ - name: str | None = None + schedule_exit: ScheduleExitFields | None = None """ - Step name + Reasons for which the scheduling cycle exited since last reset """ - - -class Tasks(BaseModel): + schedule_queue_length: int | None = None """ - Task properties + Number of jobs pending in queue """ - - count: int | None = None + server_thread_count: int | None = None """ - Number of tasks in step + Number of current active slurmctld threads """ -class Time3(BaseModel): +class Consumed(BaseModel): + average: TresList | None = None """ - Time properties + Average TRES usage consumed among all tasks """ - - elapsed: int | None = None + max: StepTresUsageMax | None = None """ - Total time elapsed + Maximum TRES usage consumed among all tasks """ - end: int | None = None + min: StepTresUsageMin | None = None """ - Timestamp of when job ended + Minimum TRES usage consumed among all tasks """ - start: int | None = None + total: TresList | None = None """ - Timestamp of when job started + Total TRES usage consumed among all tasks """ - suspended: int | None = None + + +class Requested(BaseModel): + average: TresList | None = None """ - Timestamp of when job last suspended + Average TRES usage requested among all tasks """ - system: System | None = None + max: StepTresReqMax | None = None """ - System time values + Maximum TRES usage requested among all tasks """ - total: Total | None = None + min: StepTresReqMin | None = None """ - System time values + Minimum TRES usage requested among all tasks """ - user: User1 | None = None + total: TresList | None = None """ - User land time values + Total TRES usage requested among all tasks """ -class Version(BaseModel): - major: int | None = None - micro: int | None = None - minor: int | None = None - - -class Slurm(BaseModel): - """ - Slurm information - """ - - release: str | None = None +class Tres7(BaseModel): + allocated: TresList | None = None """ - version specifier + Trackable resources allocated to the step """ - version: Version | None = None - - -class Plugin(BaseModel): - name: str | None = None - type: str | None = None + consumed: Consumed | None = None + requested: Requested | None = None -class DbMeta(BaseModel): - slurm: Slurm | None = Field(None, validation_alias="Slurm") +class Step(BaseModel): + CPU_: CPU | None = None + exit_code: ProcessExitCodeVerbose | None = None """ - Slurm information + Exit code """ - plugin: Plugin | None = None - - -class Per4(BaseModel): + kill_request_user: str | None = None """ - Max accuring priority per setting + User ID that requested termination of the step """ - - account: int | None = None + nodes: Nodes3 | None = None + pid: str | None = None """ - Max accuring priority per account + Deprecated; Process ID """ - user: int | None = None + state: JobState | None = None """ - Max accuring priority per user + Current state """ + statistics: Statistics | None = None + step: Step1 | None = None + task: Task | None = None + tasks: Tasks | None = None + time: Time4 | None = None + tres: Tres7 | None = None -class Accruing(BaseModel): +class StepList(RootModel[list[Step]]): + root: list[Step] + + +class User2(BaseModel): + administrator_level: AdminLvl | None = None """ - Limits on accruing priority + AdminLevel granted to the user """ - - per: Per4 | None = None + associations: AssocShortList | None = None """ - Max accuring priority per setting + Associations created for this user """ - - -class Per5(BaseModel): + coordinators: CoordList | None = None """ - Limits on active jobs per settings + Accounts this user is a coordinator for """ - - account: int | None = None + default: Default1 | None = None + flags: UserFlags | None = None """ - Max jobs per account + Flags associated with this user """ - user: int | None = None + name: str """ - Max jobs per user + User name """ - - -class ActiveJobs(BaseModel): + old_name: str | None = None """ - Limits on active jobs settings + Previous user name """ - - per: Per5 | None = None + wckeys: WckeyList | None = None """ - Limits on active jobs per settings + List of available WCKeys """ -class Jobs1(BaseModel): +class UserList(RootModel[list[User2]]): + root: list[User2] + + +class AssocSharesObjList(RootModel[list[AssocSharesObjWrap]]): + root: list[AssocSharesObjWrap] + + +class Job(BaseModel): + account: str | None = None """ - Limits on jobs settings + Account the job ran under """ - - active_jobs: ActiveJobs | None = None + allocation_nodes: int | None = None """ - Limits on active jobs settings + List of nodes allocated to the job """ - - -class Per8(BaseModel): + array: Array | None = None + association: AssocShort | None = None """ - Limit on wallclock per settings + Unique identifier for the association """ - - job: int | None = None + block: str | None = None """ - Max wallclock per job + The name of the block to be used (used with Blue Gene systems) """ - qos: int | None = None + cluster: str | None = None """ - Max wallclock per QOS + Cluster name """ - - -class WallClock(BaseModel): + comment: Comment | None = None + constraints: str | None = None """ - Limit on wallclock settings + Feature(s) the job requested as a constraint """ - - per: Per8 | None = None + container: str | None = None """ - Limit on wallclock per settings + Absolute path to OCI container bundle """ - - -class Preempt(BaseModel): + derived_exit_code: ProcessExitCodeVerbose | None = None """ - Preemption settings + Highest exit code of all job steps """ - - exempt_time: int | None = None + exit_code: ProcessExitCodeVerbose | None = None """ - Grace period (s) before jobs can preempted + Exit code """ - qos: list[str] | None = Field(None, validation_alias="list") + extra: str | None = None """ - List of preemptable QOS + Arbitrary string used for node filtering if extra constraints are enabled """ - mode: list[str] | None = None + failed_node: str | None = None """ - List of preemption modes + Name of node that caused job failure """ - - -class DbTresListItem(BaseModel): - count: int | None = None + flags: SlurmdbJobFlags | None = None """ - count of TRES + Flags associated with this job """ - id: int | None = None + group: str | None = None """ - database id + Group ID of the user that owns the job """ - name: str | None = None + het: Het | None = None + hold: bool | None = None """ - TRES name (optional) + Hold (true) or release (false) job """ - type: str | None = None + job_id: int | None = None """ - TRES type + Job ID """ - - -class DbTresList(RootModel): + kill_request_user: str | None = None """ - TRES list of attributes + User ID that requested termination of the job """ - - root: list[DbTresListItem] + licenses: str | None = None """ - TRES list of attributes + License(s) required by the job """ - - -class DbTresUpdate(BaseModel): - tres: DbTresList | None = None - - -class Default1(BaseModel): + mcs: Mcs | None = None + name: str | None = None """ - Default settings + Job name """ - - account: str | None = None + nodes: str | None = None """ - Default account name + Node(s) allocated to the job """ - wckey: str | None = None + partition: str | None = None """ - Default wckey + Partition assigned to the job """ - - -class DbUser(BaseModel): + priority: Uint32NoValStruct | None = None """ - User description + Request specific job priority """ - - administrator_level: str | None = None + qos: str | None = None + """ + Quality of Service assigned to the job + """ + qosreq: str | None = None """ - Description of administrator level + Requested QOS """ - associations: list[DbAssociationShortInfo] | None = None + required: Required | None = None + reservation: Reservation | None = None + restart_cnt: int | None = None """ - Assigned associations + How many times this job has been requeued/restarted """ - coordinators: list[DbCoordinatorInfo] | None = None + script: str | None = None """ - List of assigned coordinators + Job batch script; only the first component in a HetJob is populated or honored """ - default: Default1 | None = None + state: State | None = None + stderr: str | None = None """ - Default settings + Path to stderr file """ - flags: list[str] | None = None + stderr_expanded: str | None = None """ - List of properties of user + Job stderr with expanded fields """ - name: str | None = None + stdin: str | None = None """ - User name + Path to stdin file """ - - -class Meta(RootModel): - root: Any - - -class DbAccount(BaseModel): + stdin_expanded: str | None = None """ - Account description + Job stdin with expanded fields """ - - associations: list[DbAssociationShortInfo] | None = None + stdout: str | None = None """ - List of assigned associations + Path to stdout file """ - coordinators: list[DbCoordinatorInfo] | None = None + stdout_expanded: str | None = None """ - List of assigned coordinators + Job stdout with expanded fields """ - description: str | None = None + steps: StepList | None = None """ - Description of account + Individual steps in the job """ - flags: list[str] | None = None + submit_line: str | None = None """ - List of properties of account + Command used to submit the job """ - name: str | None = None + time: Time1 | None = None + tres: Tres3 | None = None + used_gres: str | None = None """ - Name of account + Generic resources used by job """ - organization: str | None = None + user: str | None = None """ - Assigned organization of account + User that owns the job """ - - -class DbAccountInfo(BaseModel): - accounts: list[DbAccount] | None = None + wckey: WckeyTagStruct | None = None """ - List of accounts + Workload characterization key """ - errors: list[DbError] | None = None + working_directory: str | None = None """ - Slurm errors + Path to current working directory """ - meta: Meta | None = None -class DbAccountResponse(BaseModel): - errors: list[DbError] | None = None - """ - Slurm errors - """ - meta: Meta | None = None +class JobList(RootModel[list[Job]]): + root: list[Job] -class DbAccounting(BaseModel): - TRES: DbTresList | None = None - allocated: int | None = None +class Nodes(BaseModel): + allocation: JobResNodes | None = None """ - total seconds allocated + Allocated node resources """ - id: int | None = None + count: int | None = None """ - association/wckey ID + Number of allocated nodes """ - start: int | None = None + list: str | None = None """ - UNIX timestamp when accounting period started + Node(s) allocated to the job """ - - -class Per2(BaseModel): + select_type: NodeCrType | None = None """ - Max TRES minutes per settings + Node scheduling selection method + """ + whole: bool | None = None + """ + Whether whole nodes were allocated """ - - job: DbTresList | None = None -class Minutes(BaseModel): +class JobRes(BaseModel): + cpus: int """ - Max TRES minutes settings + Number of allocated CPUs """ - - per: Per2 | None = None + nodes: Nodes | None = None + select_type: CrType """ - Max TRES minutes per settings + Scheduler consumable resource selection type """ - total: DbTresList | None = None - - -class Per3(BaseModel): + threads_per_core: Uint16NoValStruct """ - Max TRES per settings + Number of processor threads per CPU core """ - job: DbTresList | None = None - node: DbTresList | None = None - -class Tres(BaseModel): +class OpenapiSlurmdbdConfigResp(BaseModel): + accounts: AccountList | None = None """ - Max TRES settings + Accounts """ - - minutes: Minutes | None = None + associations: AssocList | None = None """ - Max TRES minutes settings + Associations """ - per: Per3 | None = None + clusters: ClusterRecList | None = None """ - Max TRES per settings + Clusters """ - total: DbTresList | None = None - - -class Max(BaseModel): + errors: OpenapiErrors | None = None """ - Max settings + Query errors """ - - jobs: Jobs | None = None + instances: InstanceList | None = None """ - Max jobs settings + Instances """ - per: Per1 | None = None + meta: OpenapiMeta | None = None """ - Max per settings + Slurm meta values """ - tres: Tres | None = None + qos: QosList | None = None """ - Max TRES settings + QOS """ - - -class DbAssociation(BaseModel): + tres: TresList | None = None """ - Association description + TRES """ - - QOS: list[str] | None = None + users: UserList | None = None """ - Assigned QOS + Users """ - account: str | None = None + warnings: OpenapiWarnings | None = None """ - Assigned account + Query warnings """ - cluster: str | None = None + wckeys: WckeyList | None = None """ - Assigned cluster + WCKeys """ - default: Default | None = None + + +class OpenapiSlurmdbdJobsResp(BaseModel): + errors: OpenapiErrors | None = None """ - Default settings + Query errors """ - flags: list[str] | None = None + jobs: JobList """ - List of properties of association + jobs """ - max: Max | None = None + meta: OpenapiMeta | None = None """ - Max settings + Slurm meta values """ - min: Min | None = None + warnings: OpenapiWarnings | None = None """ - Min settings + Query warnings """ - parent_account: str | None = None + + +class OpenapiUsersResp(BaseModel): + errors: OpenapiErrors | None = None """ - Parent account name + Query errors """ - partition: str | None = None + meta: OpenapiMeta | None = None """ - Assigned partition + Slurm meta values """ - priority: int | None = None + users: UserList """ - Assigned priority + users """ - shares_raw: int | None = None + warnings: OpenapiWarnings | None = None """ - Raw fairshare shares + Query warnings """ - usage: Usage | None = None + + +class SharesRespMsg(BaseModel): + shares: AssocSharesObjList | None = None """ - Association usage + Association shares """ - user: str | None = None + total_shares: int | None = None """ - Assigned user + Total number of shares """ -class DbAssociationsInfo(BaseModel): - associations: list[DbAssociation] | None = None +class JobInfo(BaseModel): + account: str | None = None """ - Array of associations + Account associated with the job """ - errors: list[DbError] | None = None + accrue_time: Uint64NoValStruct | None = None """ - Slurm errors + When the job started accruing age priority (UNIX timestamp) """ - meta: Meta | None = None - - -class DbConfigResponse(BaseModel): - errors: list[DbError] | None = None + admin_comment: str | None = None """ - Slurm errors + Arbitrary comment made by administrator """ - meta: Meta | None = None - - -class DbDiag(BaseModel): - errors: list[DbError] | None = None + allocating_node: str | None = None """ - Slurm errors + Local node making the resource allocation """ - meta: Meta | None = None - statistics: Statistics | None = None - - -class Tres1(BaseModel): + array_job_id: Uint32NoValStruct | None = None """ - TRES settings + Job ID of job array, or 0 if N/A """ - - allocated: DbTresList | None = None - requested: DbTresList | None = None - - -class Consumed(BaseModel): + array_max_tasks: Uint32NoValStruct | None = None """ - TRES requested for job + Maximum number of simultaneously running array tasks, 0 if no limit """ - - average: DbTresList | None = None - max: DbTresList | None = None - min: DbTresList | None = None - total: DbTresList | None = None - - -class Requested(BaseModel): + array_task_id: Uint32NoValStruct | None = None """ - TRES requested for job + Task ID of this task in job array """ - - average: DbTresList | None = None - max: DbTresList | None = None - min: DbTresList | None = None - total: DbTresList | None = None - - -class Tres2(BaseModel): + array_task_string: str | None = None """ - TRES usage + String expression of task IDs in this record """ - - allocated: DbTresList | None = None - consumed: Consumed | None = None + association_id: int | None = None """ - TRES requested for job + Unique identifier for the association """ - requested: Requested | None = None + batch_features: str | None = None """ - TRES requested for job + Features required for batch script's node """ - - -class DbJobStep(BaseModel): - cpu: CPU | None = Field(None, validation_alias="CPU") + batch_flag: bool | None = None """ - CPU properties + True if batch job """ - exit_code: DbJobExitCode | None = None - kill_request_user: str | None = None + batch_host: str | None = None """ - User who requested job killed + Name of host running batch script """ - nodes: Nodes | None = None + billable_tres: Float64NoValStruct | None = None """ - Node details + Billable TRES """ - pid: str | None = None + burst_buffer: str | None = None """ - First process PID + Burst buffer specifications """ - state: str | None = None + burst_buffer_state: str | None = None """ - State of job step + Burst buffer state details """ - statistics: Statistics1 | None = None + cluster: str | None = None """ - Statistics of job step + Cluster name """ - step: Step | None = None + cluster_features: str | None = None """ - Step details + List of required cluster features """ - task: str | None = None + command: str | None = None """ - Task distribution properties + Executed command """ - tasks: Tasks | None = None + comment: str | None = None """ - Task properties + Arbitrary comment """ - time: Time3 | None = None + container: str | None = None """ - Time properties + Absolute path to OCI container bundle """ - tres: Tres2 | None = None + container_id: str | None = None """ - TRES usage + OCI container ID """ - - -class Per6(BaseModel): + contiguous: bool | None = None """ - Max TRES minutes per settings + True if job requires contiguous nodes """ - - account: DbTresList | None = None - job: DbTresList | None = None - qos: DbTresList | None = None - user: DbTresList | None = None - - -class Minutes1(BaseModel): + core_spec: int | None = None """ - Max TRES minutes settings + Specialized core count """ - - per: Per6 | None = None + cores_per_socket: Uint16NoValStruct | None = None """ - Max TRES minutes per settings + Cores per socket required """ - - -class Per7(BaseModel): + cpu_frequency_governor: Uint32NoValStruct | None = None """ - Max TRES per settings + CPU frequency governor """ - - account: DbTresList | None = None - job: DbTresList | None = None - node: DbTresList | None = None - user: DbTresList | None = None - - -class Tres3(BaseModel): + cpu_frequency_maximum: Uint32NoValStruct | None = None """ - Limits on TRES + Maximum CPU frequency """ - - minutes: Minutes1 | None = None + cpu_frequency_minimum: Uint32NoValStruct | None = None """ - Max TRES minutes settings + Minimum CPU frequency """ - per: Per7 | None = None + cpus: Uint32NoValStruct | None = None """ - Max TRES per settings + Minimum number of CPUs required """ - - -class Max2(BaseModel): + cpus_per_task: Uint16NoValStruct | None = None """ - Limits on max settings + Number of CPUs required by each task """ - - accruing: Accruing | None = None + cpus_per_tres: str | None = None """ - Limits on accruing priority + Semicolon delimited list of TRES=# values indicating how many CPUs should be allocated for each specified TRES (currently only used for gres/gpu) """ - jobs: Jobs1 | None = None + cron: str | None = None """ - Limits on jobs settings + Time specification for scrontab job """ - tres: Tres3 | None = None + current_working_directory: str | None = None """ - Limits on TRES + Working directory to use for the job """ - wall_clock: WallClock | None = None + deadline: Uint64NoValStruct | None = None """ - Limit on wallclock settings + Latest time that the job may start (UNIX timestamp) """ - - -class Per9(BaseModel): + delay_boot: Uint32NoValStruct | None = None """ - Min tres per settings + Number of seconds after job eligible start that nodes will be rebooted to satisfy feature specification """ - - job: DbTresList | None = None - - -class Tres4(BaseModel): + dependency: str | None = None """ - Min tres settings + Other jobs that must meet certain criteria before this job can start """ - - per: Per9 | None = None + derived_exit_code: ProcessExitCodeVerbose | None = None """ - Min tres per settings + Highest exit code of all job steps """ - - -class Min1(BaseModel): + eligible_time: Uint64NoValStruct | None = None """ - Min limit settings + Time when the job became eligible to run (UNIX timestamp) """ - - priority_threshold: int | None = None + end_time: Uint64NoValStruct | None = None """ - Min priority threshold + End time, real or expected (UNIX timestamp) """ - tres: Tres4 | None = None + excluded_nodes: str | None = None """ - Min tres settings + Comma separated list of nodes that may not be used """ - - -class Limits1(BaseModel): + exit_code: ProcessExitCodeVerbose | None = None """ - Assigned limits + Exit code of the job """ - - factor: float | None = None + extra: str | None = None """ - factor to apply to TRES count for associations using this QOS + Arbitrary string used for node filtering if extra constraints are enabled """ - max: Max2 | None = None + failed_node: str | None = None """ - Limits on max settings + Name of node that caused job failure """ - min: Min1 | None = None + features: str | None = None """ - Min limit settings + Comma separated list of features that are required """ - - -class DbQos(BaseModel): + federation_origin: str | None = None """ - QOS description + Origin cluster's name (when using federation) """ - - description: str | None = None + federation_siblings_active: str | None = None """ - QOS description + Active sibling job names """ - flags: list[str] | None = None + federation_siblings_viable: str | None = None """ - List of properties of QOS + Viable sibling job names """ - id: str | None = None + flags: JobFlags | None = None """ - Database id + Job flags """ - limits: Limits1 | None = None + gres_detail: JobInfoGresDetail | None = None """ - Assigned limits + List of GRES index and counts allocated per node """ - name: str | None = None + group_id: int | None = None """ - Assigned name of QOS + Group ID of the user that owns the job """ - preempt: Preempt | None = None + group_name: str | None = None """ - Preemption settings + Group name of the user that owns the job """ - priority: int | None = None + het_job_id: Uint32NoValStruct | None = None """ - QOS priority + Heterogeneous job ID, if applicable """ - usage_factor: float | None = None + het_job_id_set: str | None = None """ - Usage factor + Job ID range for all heterogeneous job components """ - usage_threshold: float | None = None + het_job_offset: Uint32NoValStruct | None = None """ - Usage threshold + Unique sequence number applied to this component of the heterogeneous job """ - - -class DbQosInfo(BaseModel): - errors: list[DbError] | None = None + hold: bool | None = None """ - Slurm errors + Hold (true) or release (false) job """ - meta: Meta | None = None - qos: list[DbQos] | None = None + job_id: int | None = None """ - Array of QOS + Job ID """ - - -class DbResponseAccountDelete(BaseModel): - errors: list[DbError] | None = None + job_resources: JobRes | None = None """ - Slurm errors + Resources used by the job """ - meta: Meta | None = None - - -class DbResponseAssociations(BaseModel): - errors: list[DbError] | None = None + job_size_str: CsvString | None = None """ - Slurm errors + Number of nodes (in a range) required for this job """ - meta: Meta | None = None - - -class DbResponseAssociationsDelete(BaseModel): - errors: list[DbError] | None = None + job_state: JobState | None = None """ - Slurm errors + Current state """ - meta: Meta | None = None - removed_associations: list[str] | None = None + last_sched_evaluation: Uint64NoValStruct | None = None """ - the associations + Last time job was evaluated for scheduling (UNIX timestamp) """ - - -class DbResponseClusterAdd(BaseModel): - errors: list[DbError] | None = None + licenses: str | None = None """ - Slurm errors + License(s) required by the job """ - meta: Meta | None = None - - -class DbResponseClusterDelete(BaseModel): - errors: list[DbError] | None = None + mail_type: JobMailFlags | None = None """ - Slurm errors + Mail event type(s) """ - meta: Meta | None = None - - -class DbResponseQos(BaseModel): - errors: list[DbError] | None = None + mail_user: str | None = None """ - Slurm errors + User to receive email notifications """ - meta: Meta | None = None - - -class DbResponseQosDelete(BaseModel): - errors: list[DbError] | None = None + max_cpus: Uint32NoValStruct | None = None """ - Slurm errors + Maximum number of CPUs usable by the job """ - meta: Meta | None = None - - -class DbResponseTres(BaseModel): - errors: list[DbError] | None = None + max_nodes: Uint32NoValStruct | None = None """ - Slurm errors + Maximum number of nodes usable by the job """ - meta: Meta | None = None - - -class DbResponseUserDelete(BaseModel): - errors: list[DbError] | None = None + maximum_switch_wait_time: int | None = None """ - Slurm errors + Maximum time to wait for switches in seconds """ - meta: Meta | None = None - - -class DbResponseUserUpdate(BaseModel): - errors: list[DbError] | None = None + mcs_label: str | None = None """ - Slurm errors + Multi-Category Security label on the job """ - meta: Meta | None = None - - -class DbResponseWckeyAdd(BaseModel): - errors: list[DbError] | None = None + memory_per_cpu: Uint64NoValStruct | None = None """ - Slurm errors + Minimum memory in megabytes per allocated CPU """ - meta: Meta | None = None - - -class DbResponseWckeyDelete(BaseModel): - errors: list[DbError] | None = None + memory_per_node: Uint64NoValStruct | None = None """ - Slurm errors + Minimum memory in megabytes per allocated node """ - meta: Meta | None = None - - -class DbTresInfo(BaseModel): - errors: list[DbError] | None = None + memory_per_tres: str | None = None """ - Slurm errors + Semicolon delimited list of TRES=# values indicating how much memory in megabytes should be allocated for each specified TRES (currently only used for gres/gpu) """ - meta: Meta | None = None - tres: DbTresList | None = None - - -class DbUpdateAccount(BaseModel): - accounts: list[DbAccount] | None = None - - -class DbUpdateQos(BaseModel): - qos: list[DbQos] | None = None - - -class DbUpdateUsers(BaseModel): - users: list[DbUser] | None = None - - -class DbUserInfo(BaseModel): - errors: list[DbError] | None = None + minimum_cpus_per_node: Uint16NoValStruct | None = None """ - Slurm errors + Minimum number of CPUs per node """ - meta: Meta | None = None - users: list[DbUser] | None = None + minimum_tmp_disk_per_node: Uint32NoValStruct | None = None """ - Array of users + Minimum tmp disk space required per node """ - - -class DbWckey(BaseModel): - accounting: list[DbAccounting] | None = None + name: str | None = None """ - List of accounting records + Job name """ - cluster: str | None = None + network: str | None = None """ - Cluster name + Network specs for the job """ - flags: list[str] | None = None + nice: int | None = None """ - List of properties of wckey + Requested job priority change """ - id: int | None = None + node_count: Uint32NoValStruct | None = None """ - wckey database unique id + Minimum number of nodes required """ - name: str | None = None + nodes: str | None = None """ - wckey name + Node(s) allocated to the job """ - user: str | None = None + partition: str | None = None """ - wckey user + Partition assigned to the job """ - - -class DbWckeyInfo(BaseModel): - errors: list[DbError] | None = None + power: Power | None = None + pre_sus_time: Uint64NoValStruct | None = None """ - Slurm errors + Total run time prior to last suspend in seconds """ - meta: Meta | None = None - wckeys: list[DbWckey] | None = None + preempt_time: Uint64NoValStruct | None = None """ - List of wckeys + Time job received preemption signal (UNIX timestamp) """ - - -class DbClusterInfo(BaseModel): - associations: Associations | None = None + preemptable_time: Uint64NoValStruct | None = None """ - Information about associations + Time job becomes eligible for preemption (UNIX timestamp) """ - controller: Controller | None = None + prefer: str | None = None """ - Information about controller + Feature(s) the job requested but that are not required """ - flags: list[str] | None = None + priority: Uint32NoValStruct | None = None """ - List of properties of cluster + Request specific job priority """ - name: str | None = None + priority_by_partition: PriorityByPartition | None = None """ - Cluster name + Prospective job priority in each partition that may be used by this job """ - nodes: str | None = None + profile: AcctGatherProfile | None = None """ - Assigned nodes + Profile used by the acct_gather_profile plugin """ - rpc_version: int | None = None + qos: str | None = None """ - Number rpc version + Quality of Service assigned to the job, if pending the QOS requested """ - select_plugin: str | None = None + reboot: bool | None = None """ - Configured select plugin + Node reboot requested before start """ - tres: list[DbResponseTres] | None = None + requeue: bool | None = None """ - List of TRES in cluster + Determines whether the job may be requeued """ - - -class DbClustersProperties(BaseModel): - clusters: DbClusterInfo | None = None - - -class DbConfigInfo(BaseModel): - accounts: list[DbAccount] | None = None + required_nodes: str | None = None """ - Array of accounts + Comma separated list of required nodes """ - associations: list[DbAssociation] | None = None + required_switches: int | None = None """ - Array of associations + Maximum number of switches """ - errors: list[DbError] | None = None + resize_time: Uint64NoValStruct | None = None """ - Slurm errors + Time of last size change (UNIX timestamp) """ - meta: Meta | None = None - qos: list[DbQos] | None = None + restart_cnt: int | None = None """ - Array of qos + Number of job restarts """ - tres: list[DbTresList] | None = None + resv_name: str | None = None """ - Array of TRES + Name of reservation to use """ - users: list[DbUser] | None = None + scheduled_nodes: str | None = None """ - Array of users + List of nodes scheduled to be used for the job """ - wckeys: list[DbWckey] | None = None + selinux_context: str | None = None """ - Array of wckeys + SELinux context """ - - -class DbJob(BaseModel): + shared: JobShared | None = None """ - Single job description + How the job can share resources with other jobs, if at all """ - - account: str | None = None + sockets_per_board: int | None = None """ - Account charged by job + Number of sockets per board required """ - allocation_nodes: str | None = None + sockets_per_node: Uint16NoValStruct | None = None """ - Nodes allocated to job + Number of sockets per node required """ - array: Array | None = None + standard_error: str | None = None """ - Array properties (optional) + Path to stderr file """ - association: DbAssociationShortInfo | None = None - cluster: str | None = None + standard_input: str | None = None """ - Assigned cluster + Path to stdin file """ - comment: Comment | None = None + standard_output: str | None = None """ - Job comments by type + Path to stdout file """ - constraints: str | None = None + start_time: Uint64NoValStruct | None = None """ - Constraints on job + Time execution began, or is expected to begin (UNIX timestamp) """ - container: str | None = None + state_description: str | None = None """ - absolute path to OCI container bundle + Optional details for state_reason """ - derived_exit_code: DbJobExitCode | None = None - exit_code: DbJobExitCode | None = None - flags: list[str] | None = None + state_reason: str | None = None """ - List of properties of job + Reason for current Pending or Failed state """ - group: str | None = None + submit_time: Uint64NoValStruct | None = None """ - User's group to run job + Time when the job was submitted (UNIX timestamp) """ - het: Het | None = None + suspend_time: Uint64NoValStruct | None = None """ - Heterogeneous Job details (optional) + Time the job was last suspended or resumed (UNIX timestamp) """ - job_id: int | None = None + system_comment: str | None = None """ - Job id + Arbitrary comment from slurmctld """ - kill_request_user: str | None = None + tasks: Uint32NoValStruct | None = None """ - User who requested job killed + Number of tasks """ - mcs: Mcs | None = None + tasks_per_board: Uint16NoValStruct | None = None """ - Multi-Category Security + Number of tasks invoked on each board """ - name: str | None = None + tasks_per_core: Uint16NoValStruct | None = None """ - Assigned job name + Number of tasks invoked on each core """ - nodes: str | None = None + tasks_per_node: Uint16NoValStruct | None = None """ - List of nodes allocated for job + Number of tasks invoked on each node """ - partition: str | None = None + tasks_per_socket: Uint16NoValStruct | None = None """ - Assigned job's partition + Number of tasks invoked on each socket """ - priority: int | None = None + tasks_per_tres: Uint16NoValStruct | None = None """ - Priority + Number of tasks that can assess each GPU """ - qos: str | None = None + thread_spec: int | None = None """ - Assigned qos name + Specialized thread count """ - required: Required | None = None + threads_per_core: Uint16NoValStruct | None = None """ - Job run requirements + Number of processor threads per CPU core required """ - reservation: Reservation | None = None + time_limit: Uint32NoValStruct | None = None """ - Reservation usage details + Maximum run time in minutes """ - state: State | None = None + time_minimum: Uint32NoValStruct | None = None """ - State properties of job + Minimum run time in minutes """ - steps: list[DbJobStep] | None = None + tres_alloc_str: str | None = None """ - Job step description + TRES used by the job """ - time: Time2 | None = None + tres_bind: str | None = None """ - Time properties + Task to TRES binding directives """ - tres: Tres1 | None = None + tres_freq: str | None = None """ - TRES settings + TRES frequency directives """ - user: str | None = None + tres_per_job: str | None = None """ - Job user + Comma separated list of TRES=# values to be allocated per job """ - wckey: Wckey | None = None + tres_per_node: str | None = None """ - Job assigned wckey details + Comma separated list of TRES=# values to be allocated per node """ - working_directory: str | None = None + tres_per_socket: str | None = None """ - Directory where job was initially started + Comma separated list of TRES=# values to be allocated per socket """ - - -class DbJobInfo(BaseModel): - errors: list[DbError] | None = None + tres_per_task: str | None = None + """ + Comma separated list of TRES=# values to be allocated per task + """ + tres_req_str: str | None = None + """ + TRES requested by the job """ - Slurm errors + user_id: int | None = None """ - jobs: list[DbJob] | None = None + User ID that owns the job + """ + user_name: str | None = None + """ + User name that owns the job + """ + wckey: str | None = None """ - Array of jobs + Workload characterization key """ - meta: Meta | None = None -class DbSetConfig(BaseModel): - TRES: list[DbTresList] | None = None - accounts: list[DbUpdateAccount] | None = None - associations: list[DbAssociation] | None = None - clusters: list[DbClustersProperties] | None = None - qos: list[DbQos] | None = None - users: list[DbUser] | None = None - wckeys: list[DbWckey] | None = None +class JobInfoMsg(RootModel[list[JobInfo]]): + root: list[JobInfo] diff --git a/tests/test_job_scheduler.py b/tests/test_job_scheduler.py index 0c22352..6610b69 100644 --- a/tests/test_job_scheduler.py +++ b/tests/test_job_scheduler.py @@ -21,8 +21,8 @@ JobInfo, JobSubmitReq, StringArray, - Uint32NoVal, - Uint64NoVal, + Uint32NoValStruct, + Uint64NoValStruct, ) from ParProcCo.test import TemporaryDirectory from tests.utils import ( @@ -104,21 +104,21 @@ def test_create_job_submission(self, _name, gpus) -> None: env_list = [f"{k}={v}" for k, v in jsi.job_env.items()] env_list.append(f"USER={getpass.getuser()}") expected = JobSubmitReq( - script=expected_command, job=JobDescMsg( name="create_template_test", partition=PARTITION, cpus_per_task=5, tres_per_task=f"gres/gpu:{gpus}", tasks=1, - time_limit=Uint32NoVal( + time_limit=Uint32NoValStruct( number=int((jsi.timeout.total_seconds() + 59) // 60), set=True ), environment=StringArray(root=env_list), - memory_per_cpu=Uint64NoVal(number=jsi.job_resources.memory, set=True), + memory_per_cpu=Uint64NoValStruct(number=jsi.job_resources.memory, set=True), current_working_directory=str(working_directory), standard_output=str(jsi_list[0].get_stdout_path()), standard_error=str(jsi_list[0].get_stderr_path()), + script=expected_command, ), jobs=None, ) diff --git a/tests/test_nxdata_aggregator.py b/tests/test_nxdata_aggregator.py index abb779f..953e224 100644 --- a/tests/test_nxdata_aggregator.py +++ b/tests/test_nxdata_aggregator.py @@ -18,6 +18,7 @@ slurm_rest_url = get_slurm_rest_url() gh_testing = slurm_rest_url is None +TEST_DATA_DIR="/dls/science/groups/das/ExampleData/i07/old_data/" class TestNXdataAggregator(unittest.TestCase): def setUp(self) -> None: @@ -51,16 +52,16 @@ def test_decode_to_string_input_is_bytes(self): def test_renormalise(self) -> None: output_file_paths = [ Path( - "/dls/science/groups/das/ExampleData/i07/i07-394487-applied-halfa.nxs" + TEST_DATA_DIR, "i07-394487-applied-halfa.nxs" ), Path( - "/dls/science/groups/das/ExampleData/i07/i07-394487-applied-halfb.nxs" + TEST_DATA_DIR, "i07-394487-applied-halfb.nxs" ), ] aggregator = NXdataAggregator() aggregator._renormalise(output_file_paths) with h5py.File( - "/dls/science/groups/das/ExampleData/i07/i07-394487-applied-whole.nxs", "r" + TEST_DATA_DIR + "i07-394487-applied-whole.nxs", "r" ) as f: volumes_array = NXdataAggregator._require_dataset( f, "processed/reciprocal_space/volume" @@ -81,10 +82,10 @@ def test_initialise_arrays_applied_data(self) -> None: aggregator.data_dimensions = 3 aggregator.data_files = [ Path( - "/dls/science/groups/das/ExampleData/i07/i07-394487-applied-halfa.nxs" + TEST_DATA_DIR, "i07-394487-applied-halfa.nxs" ), Path( - "/dls/science/groups/das/ExampleData/i07/i07-394487-applied-halfb.nxs" + TEST_DATA_DIR, "i07-394487-applied-halfb.nxs" ), ] aggregator.nxentry_name = "processed" @@ -267,10 +268,10 @@ def test_initialise_arrays( def test_get_nxdata_applied_data(self) -> None: output_data_files = [ Path( - "/dls/science/groups/das/ExampleData/i07/i07-394487-applied-halfa.nxs" + TEST_DATA_DIR, "i07-394487-applied-halfa.nxs" ), Path( - "/dls/science/groups/das/ExampleData/i07/i07-394487-applied-halfb.nxs" + TEST_DATA_DIR, "i07-394487-applied-halfb.nxs" ), ] aggregator = NXdataAggregator() @@ -987,10 +988,10 @@ def test_accumulate_volumes_applied_data(self) -> None: aggregator = NXdataAggregator() aggregator.data_files = [ Path( - "/dls/science/groups/das/ExampleData/i07/i07-394487-applied-halfa.nxs" + TEST_DATA_DIR, "i07-394487-applied-halfa.nxs" ), Path( - "/dls/science/groups/das/ExampleData/i07/i07-394487-applied-halfb.nxs" + TEST_DATA_DIR, "i07-394487-applied-halfb.nxs" ), ] aggregator.nxentry_name = "processed" @@ -1021,7 +1022,7 @@ def test_accumulate_volumes_applied_data(self) -> None: aggregator._accumulate_volumes() with h5py.File( - "/dls/science/groups/das/ExampleData/i07/i07-394487-applied-whole.nxs", "r" + TEST_DATA_DIR + "i07-394487-applied-whole.nxs", "r" ) as f: volumes_array = NXdataAggregator._require_dataset( f, "processed/reciprocal_space/volume" @@ -1041,10 +1042,10 @@ def test_accumulate_volumes_applied_data(self) -> None: def test_write_aggregation_file(self) -> None: sliced_data_files = [ Path( - "/dls/science/groups/das/ExampleData/i07/i07-394487-applied-halfa.nxs" + TEST_DATA_DIR, "i07-394487-applied-halfa.nxs" ), Path( - "/dls/science/groups/das/ExampleData/i07/i07-394487-applied-halfb.nxs" + TEST_DATA_DIR, "i07-394487-applied-halfb.nxs" ), ] with TemporaryDirectory(prefix="test_dir_") as working_directory: @@ -1058,7 +1059,7 @@ def test_write_aggregation_file(self) -> None: aggregation_file, sliced_data_files ) with h5py.File( - "/dls/science/groups/das/ExampleData/i07/i07-394487-applied-whole.nxs", + TEST_DATA_DIR + "i07-394487-applied-whole.nxs", "r", ) as f: volumes_array = NXdataAggregator._require_dataset(