Entities
Common
Common type definitions for SDP config entity models.
- class ska_sdp_config.entity.common.KafkaUrl(uri: str)[source]
Kafka client specific URL for connecting to bootstrap servers.
Supports initialization using either a URL or bootstrap address.
>>> from ska_sdp_config.entity.common import KafkaUrl >>> from pydantic import TypeAdapter >>> assert TypeAdapter(KafkaUrl).validate_python( ... "kafka://localhost:9092" ... ).bootstrap_address == "localhost:9092" >>> assert TypeAdapter(KafkaUrl).validate_python( ... "localhost:9092" ... ).bootstrap_address == "localhost:9092"
- property bootstrap_address
Bootstrap address format used by python Consumer and Producers.
- class ska_sdp_config.entity.common.PVCPath(*, k8s_namespaces: str | Sequence[str], k8s_pvc_name: str, pvc_mount_path: Annotated[PurePath, PlainValidator(func=_validate_pure_path, json_schema_input_type=str), PlainSerializer(func=str, return_type=str, when_used=always), WrapValidator(func=_validate_is_absolute, json_schema_input_type=str), PlainSerializer(func=str, return_type=str, when_used=always)], pvc_subpath: Annotated[PurePath, PlainValidator(func=_validate_pure_path, json_schema_input_type=str), PlainSerializer(func=str, return_type=str, when_used=always), WrapValidator(func=_validate_is_relative, json_schema_input_type=str), PlainSerializer(func=str, return_type=str, when_used=always)])[source]
Mounted path within a Kubernetes Persistent Volume Claim.
- k8s_namespaces: str | Sequence[str]
Kuberentes pvc namespaces.
- k8s_pvc_name: str
Kubernetes persistent volume claim name.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': False, 'strict': True, 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- property path: PlainSerializer(func=str, return_type=str, when_used=always), FieldInfo(annotation=NoneType, required=True, json_schema_extra={'format': 'path', 'type': 'string'})]
The container mounted absolute path to subpath.
- pvc_mount_path: PlainSerializer(func=str, return_type=str, when_used=always), FieldInfo(annotation=NoneType, required=True, json_schema_extra={'format': 'path', 'type': 'string'})]
Mount path of the persistent volume claim.
- pvc_subpath: PlainSerializer(func=str, return_type=str, when_used=always), FieldInfo(annotation=NoneType, required=True, json_schema_extra={'format': 'path', 'type': 'string'})]
Subpath within the persistent volume claim.
- class ska_sdp_config.entity.common.TangoAttributeUrl(url: str)[source]
Tango URL to an attribute on a device instance. Supported expressions are of the form:
tango://<device_domain>[:<port>]/<device_family>/<device_member>/<device_attribute>[#nodb=yes|no]
For more information see: https://tango-controls.readthedocs.io/en/9.2.5/manual/C-naming.html
- property attribute_name: str
The attribute name part of the URL.
- property device_name: str
The device name part of the URL.
- property device_url: Annotated[AnyUrl, UrlConstraints(max_length=None, allowed_schemes=['tango'], host_required=None, default_host=None, default_port=None, default_path=None)]
The device URL.
- property family_name: str
The device family part of the URL.
- property member_name: str
The device member part of the URL.
Owner
Deployment configuration entities.
- class ska_sdp_config.entity.owner.Owner(*, pid: int, hostname: str, command: list[str])[source]
Owner information for an entity, uniquely identifying the process owning the entity on a distributed system.
- command: list[str]
The command line used to start the process
- hostname: str
The name of the host where the process is running
- pid: int
The process ID of the entity’s owner
Execution Block
Execution block configuration entities.
- class ska_sdp_config.entity.eb.ExecutionBlock(*, key: ~typing.Annotated[str, _PydanticGeneralMetadata(pattern='^eb\\-[a-z0-9]+\\-[0-9]{8}\\-[a-z0-9]+$')], beams: list = <factory>, channels: list = <factory>, context: dict = <factory>, fields: list = <factory>, max_length: float | None = None, pb_batch: list[~typing.Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^pb\\-[a-z0-9]+\\-[0-9]{8}\\-[a-z0-9]+$')])]] = <factory>, pb_realtime: list[~typing.Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^pb\\-[a-z0-9]+\\-[0-9]{8}\\-[a-z0-9]+$')])]] = <factory>, polarisations: list = <factory>, resources: dict = <factory>, scan_types: list = <factory>, subarray_id: ~types.Annotated[str | None, _PydanticGeneralMetadata(pattern='^[0-9]+$')] = None)[source]
Execution block entity.
Collects configuration information relating to an execution block for the SDP.
- beams: Annotated[list, FieldInfo(annotation=NoneType, required=False, default_factory=list)]
Beam parameters for the purpose of the Science Data Processor
- channels: Annotated[list, FieldInfo(annotation=NoneType, required=False, default_factory=list)]
Channels. This is basically a list of spectral windows per channel configuration.
- context: Annotated[dict, FieldInfo(annotation=NoneType, required=False, default_factory=dict)]
Free-form information from OET to describe the observing context
- fields: Annotated[list, FieldInfo(annotation=NoneType, required=False, default_factory=list)]
List of fields/targets
- key: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^eb\\-[a-z0-9]+\\-[0-9]{8}\\-[a-z0-9]+$')])]
ID of the Execution Block
- max_length: Annotated[float | None, FieldInfo(annotation=NoneType, required=False, default=None)]
Maximum duration of the execution block in seconds.
- pb_batch: Annotated[list[Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^pb\\-[a-z0-9]+\\-[0-9]{8}\\-[a-z0-9]+$')])]], FieldInfo(annotation=NoneType, required=False, default_factory=list)]
Batch processing blocks.
- pb_realtime: Annotated[list[Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^pb\\-[a-z0-9]+\\-[0-9]{8}\\-[a-z0-9]+$')])]], FieldInfo(annotation=NoneType, required=False, default_factory=list)]
Real-time processing blocks.
- polarisations: Annotated[list, FieldInfo(annotation=NoneType, required=False, default_factory=list)]
Polarisation definitions
- resources: Annotated[dict, FieldInfo(annotation=NoneType, required=False, default_factory=dict)]
Free-form Resources allocated to the execution block.
- scan_types: Annotated[list, FieldInfo(annotation=NoneType, required=False, default_factory=list)]
Scan types. Associates scans with per-beam fields & channel configurations
- subarray_id: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, metadata=[_PydanticGeneralMetadata(pattern='^[0-9]+$')])]
Subarray with which this EB is associated.
Processing Block
Processing block configuration entities.
- class ska_sdp_config.entity.pb.PBDependency(*, kind: list[str], pb_id: Annotated[str, _PydanticGeneralMetadata(pattern='^pb\\-[a-z0-9]+\\-[0-9]{8}\\-[a-z0-9]+$')])[source]
A Processing Block dependency.
- kind: list[str]
How this dependency is meant to be interpreted.
- pb_id: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^pb\\-[a-z0-9]+\\-[0-9]{8}\\-[a-z0-9]+$')])]
The ID of the Processing Block that is depended on.
- class ska_sdp_config.entity.pb.ProcessingBlock(*, key: ~typing.Annotated[str, _PydanticGeneralMetadata(pattern='^pb\\-[a-z0-9]+\\-[0-9]{8}\\-[a-z0-9]+$')], eb_id: ~typing.Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^eb\\-[a-z0-9]+\\-[0-9]{8}\\-[a-z0-9]+$')])] | None, script: ~ska_sdp_config.entity.script.Script.Key, parameters: dict = <factory>, dependencies: list[~ska_sdp_config.entity.pb.PBDependency] = <factory>)[source]
Processing block entity.
Collects configuration information relating to a processing job for the SDP. This might be either real-time (supporting a running observation) or batch (to process data after the fact).
Actual execution of processing steps will be performed by a (parameterised) processing script interpreting processing block information.
- dependencies: Annotated[list[PBDependency], FieldInfo(annotation=NoneType, required=False, default_factory=list)]
Dependencies of this Processing Block on others.
- eb_id: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^eb\\-[a-z0-9]+\\-[0-9]{8}\\-[a-z0-9]+$')])] | None
ID of the Execution Block associated with this Processing Block, if any.
- key: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^pb\\-[a-z0-9]+\\-[0-9]{8}\\-[a-z0-9]+$')])]
The primary key to this entity.
- parameters: Annotated[dict, FieldInfo(annotation=NoneType, required=False, default_factory=dict)]
Parameters for the Processing Block.
Deployment
Deployment configuration entities.
- class ska_sdp_config.entity.deployment.Deployment(*, key: Annotated[str, _PydanticGeneralMetadata(pattern='^[A-Za-z0-9\\-]{1,96}$')], kind: Literal['helm', 'slurm'], args: dict)[source]
Deployment entity.
Collects configuration information relating to a cluster configuration change.
- args: dict
A dictionary of values used to customise the deployment. In the case of helm deployments, these are Helm values. For slurm deployment these are used to construct a Slurm script.
- key: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^[A-Za-z0-9\\-]{1,96}$')])]
The primary key to this entity.
- kind: Literal['helm', 'slurm']
The kind of deployment, currently “helm” and “slurm” are supported.
Script
Script model.
- class ska_sdp_config.entity.script.Script(*, key: ~ska_sdp_config.entity.script.Script.Key, image: ~typing.Annotated[str, _PydanticGeneralMetadata(pattern='^[a-zA-Z0-9_:\\./-]+$')], parameters: dict = <factory>, sdp_version: ~types.Annotated[str | None, _PydanticGeneralMetadata(pattern='^(?:[><]=?|==)\\d+\\.\\d+\\.\\d+(?:,\\s*(?:[><]=?|==)\\d+\\.\\d+\\.\\d+)*$')] = None)[source]
An SDP Script.
- class Key(*, kind: Annotated[str, _PydanticGeneralMetadata(pattern='^(realtime)|(batch)$')], name: Annotated[str, _PydanticGeneralMetadata(pattern='^[a-zA-Z0-9_-]+$')], version: Annotated[str, _PydanticGeneralMetadata(pattern='^[a-zA-Z0-9_\\.-]+$')])[source]
An SDP Script primary key.
- kind: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^(realtime)|(batch)$')])]
The kind of this script (realtime or batch).
- name: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^[a-zA-Z0-9_-]+$')])]
The name of this script.
- version: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^[a-zA-Z0-9_\\.-]+$')])]
The version of this script.
- image: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^[a-zA-Z0-9_:\\./-]+$')])]
The OCI image used to launch this script.
- key: Annotated[Key, FieldInfo(annotation=NoneType, required=True, exclude=True)]
The primary key to this entity.
- parameters: Annotated[dict, FieldInfo(annotation=NoneType, required=False, default_factory=dict)]
Parameters for the script.
- sdp_version: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^(?:[><]=?|==)\\d+\\.\\d+\\.\\d+(?:,\\s*(?:[><]=?|==)\\d+\\.\\d+\\.\\d+)*$')])]
The range of SDP versions this script is compatible with.
Flow
Flow entity Model and related sub-entities.
- ska_sdp_config.entity.flow.BeamId
Observation Beam ID.
alias of
Annotated
[str
, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern=’^[a-z0-9]+$’)])]
- ska_sdp_config.entity.flow.ChannelAddressMapping
A contiguous, ordered mapping of observation channels to receivers.
dict[start_channel, (receiver_id, port_start, port_increment)), e.g.
>>> from pydantic import TypeAdapter >>> from ska_sdp_config.entity.flow import ChannelAddressMapping >>> channel_map = TypeAdapter(ChannelAddressMapping).validate_python({ ... 0: (0, 8000, 1), ... 400: (1, 8000, 1), ... 800: (2, 8000, 1), ... })
- ska_sdp_config.entity.flow.ChannelMap
A contiguous, ordered mapping of channels to a value. Tuples represent (start_channel, value), e.g.
>>> from ipaddress import IPv4Address >>> from pydantic import TypeAdapter >>> from ska_sdp_config.entity.flow import ChannelMap >>> channel_map = TypeAdapter(ChannelMap[IPv4Address]).validate_python([ ... (0, '192.168.0.1'), ... (400, '192.168.0.2') ... ])
alias of
Sequence
[tuple
[Annotated
[int
,Ge
(ge=0)],_T
]]
- class ska_sdp_config.entity.flow.DataProduct(*, kind: Literal['data-product'] = 'data-product', data_dir: PlainSerializer(func=str, return_type=str, when_used=always), FieldInfo(annotation=NoneType, required=True, json_schema_extra={'format': 'path', 'type': 'string'})], _PydanticGeneralMetadata(union_mode='left_to_right')], paths: list[~pathlib.Annotated[~pathlib.PurePath, ~pydantic.functional_validators.PlainValidator(func=~ska_sdp_config.entity.common.path._validate_pure_path, json_schema_input_type=str), ~pydantic.functional_serializers.PlainSerializer(func=str, return_type=str, when_used=always), FieldInfo(annotation=NoneType, required=True, json_schema_extra={'format': 'path', 'type': 'string'})]])[source]
Data Product flow entity e.g. Measurement Set.
- data_dir: Annotated[PVCPath | AnyPurePath, Field(union_mode='left_to_right')]
Output directory of data products.
- kind: Literal['data-product']
- paths: list[AnyPurePath]
Channel mapping of output data products relative to the persistent volume directory.
- class ska_sdp_config.entity.flow.DataQueue(*, kind: Literal['data-queue'] = 'data-queue', topics: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^[A-Za-z0-9-_.]+$')])] | Sequence[tuple[Annotated[int, Ge(ge=0)], Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^[A-Za-z0-9-_.]+$')])]]], host: KafkaUrl, format: Literal['json', 'npy', 'npz', 'msgpack_numpy'])[source]
Data Queue flow entity e.g. Kafka topic.
- format: Literal['json', 'npy', 'npz', 'msgpack_numpy']
The data encoded format.
- kind: Literal['data-queue']
- topics: KafkaTopicName | ChannelMap[KafkaTopicName]
The topic names.
- class ska_sdp_config.entity.flow.Display(*, kind: Literal['display'] = 'display', widget: str, endpoint: AnyUrl)[source]
Data Display flow entity e.g. QA Display.
- endpoint: AnyUrl
The display URL endpoint.
- kind: Literal['display']
- widget: str
The type of display widget.
- class ska_sdp_config.entity.flow.Flow(*, key: Key, sink: TelModel | SharedMem | DataQueue | Display | DataProduct | TangoAttribute | TangoAttributeMap | SpeadStream, sources: list[FlowSource], data_model: Annotated[str, _PydanticGeneralMetadata(pattern='^[A-Za-z0-9\\,\\[\\]]+$')])[source]
Flow datastream entity.
Contains configuration information relating to streaming data connections related to a processing job for SDP. Flows are associated with and persist for the lifetime of a ProcessingBlock.
- class Key(*, pb_id: Annotated[str, _PydanticGeneralMetadata(pattern='^pb\\-[a-z0-9]+\\-[0-9]{8}\\-[a-z0-9]+$')], kind: Annotated[str | None, _PydanticGeneralMetadata(pattern='^[A-Za-z0-9-]{1,96}$')] = None, name: Annotated[str, _PydanticGeneralMetadata(pattern='^[A-Za-z0-9-]{1,96}$')])[source]
An SDP Flow primary key.
- kind: Annotated[str | None, Field(pattern='^[A-Za-z0-9-]{1,96}$')]
The kind of sink this flow moves data to.
- name: Annotated[str, Field(pattern='^[A-Za-z0-9-]{1,96}$')]
The name of this flow.
- pb_id: ProcessingBlockId
The ID of the Processing Block that this flow belongs to.
- data_model: Annotated[str, Field(pattern='^[A-Za-z0-9\\,\\[\\]]+$')]
The DataModel that the flow data represents.
- model_post_init(context: Any, /) None [source]
Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.
- sink: Annotated[TelModel | SharedMem | DataQueue | Display | DataProduct | TangoAttribute | TangoAttributeMap | SpeadStream, Field(discriminator='kind')]
The Flow output definition for data to be streamed to.
- sources: list[FlowSource]
A list containing sources of flow data.
- class ska_sdp_config.entity.flow.FlowSource[source]
A generic flow source pointing to either: - an existing flow entry in the configuration database - external source, such as a tango attribute - an external url
- function: str | None
Python function, class or OCI image that will flow data from source to sink
- parameters: dict | None
Function, class or OCI image parameters
- uri: Annotated[Flow.Key | TangoAttributeUrl | AnyUrl, Field(union_mode='left_to_right')]
Reference to the data source: - Flow.Key: key of a data flow entry - TangoAttributeUrl: tango attribute reference - AnyURL: url of any other kind
- ska_sdp_config.entity.flow.KafkaTopicName
A Kafka topic name. Legal characters including alphanumeric, -, _, and .
alias of
Annotated
[str
, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern=’^[A-Za-z0-9-_.]+$’)])]
- ska_sdp_config.entity.flow.ReceiverId
SPEAD Receiver ID.
alias of
Annotated
[int
,Ge
(ge=0)]
- ska_sdp_config.entity.flow.ScanTypeId
Observation ScanType ID.
alias of
Annotated
[str
, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern=’^[a-z0-9-:]+$’)])]
Shared Memory flow entity e.g. Plasma.
The Path of the shared memory socket.
The shared memory implementation.
- class ska_sdp_config.entity.flow.SpeadStream(*, kind: Literal['spead'] = 'spead', channel_map: dict[Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^[a-z0-9-:]+$')])], dict[Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^[a-z0-9]+$')])], dict[Annotated[int, Ge(ge=0)], tuple[Annotated[int, Ge(ge=0)], Annotated[int, Ge(ge=0)], Annotated[int, Ge(ge=0)]]]]], receiver_version: str, streams: int = 1, transport_protocol: Literal['tcp', 'udp'] = 'udp', continuous_mode: bool = False)[source]
A SPEAD flow entity.
- channel_map: dict[ScanTypeId, dict[BeamId, ChannelAddressMapping]]
The channel to network address mapping for scans and beams.
- continuous_mode: bool
Flag for enabling receivers to re-create the streams and resume receiving data after all end of streams are reached.
- property instances: int
Number of receiver instances required for all scans.
- kind: Literal['spead']
- receiver_version: str
Receiver OCI image version.
- streams: int
Total number of streams per receiver.
- transport_protocol: Literal['tcp', 'udp']
The spead stream transport protocol.
- class ska_sdp_config.entity.flow.TangoAttribute(*, kind: Literal['tango'] = 'tango', attribute_url: TangoAttributeUrl, dtype: Literal['DevEncoded', 'DevString', 'DevBoolean', 'DevUChar', 'DevUShort', 'DevULong', 'DevULong64', 'DevShort', 'DevLong', 'DevLong64', 'DevFloat', 'DevDouble'], max_dim_x: Annotated[int, Ge(ge=0)] = 0, max_dim_y: Annotated[int, Ge(ge=0)] = 0, default_value: tuple[str, bytes] | int | float | bool | str = '')[source]
Tango attribute flow entity.
This entity instructs to flow data into a single Tango attribute.
- attribute_url: TangoAttributeUrl
Fully qualified tango attribute URL, e.g. “tango://mid-sdp/subarray/01/some_attribute”.
- default_value: TangoDataType
Default attribute value at creation casted to the selected dtype.
- dtype: TangoArgType
Attribute data type corresponding to a tango.ArgType.
- kind: Literal['tango']
- max_dim_x: NonNegativeInt
Size of the slowest changing dimension.
- max_dim_y: NonNegativeInt
Size of the fastest changing dimension.
- class ska_sdp_config.entity.flow.TangoAttributeMap(*, kind: Literal['tangomap'] = 'tangomap', attributes: list[tuple[TangoAttribute, DataQuery]])[source]
Tango attribute map flow entity.
This entity instructs to flow data into multiple Tango attributes.
- class DataQuery(*, when: str | None = None, select: str = '@')[source]
Decomposed JMESPath query for locating data within a data model.
- select: str
JMESPath select query clause on the flow data model.
- when: str | None
JMESPath when query clause on the flow data model.
- attributes: list[tuple[TangoAttribute, DataQuery]]
Mapping of TangoAttributes with unique attribute URL to a data query.
- kind: Literal['tangomap']
Resource Management
Entities related to resource management.
- class ska_sdp_config.entity.resource_management.Allocation(*, key: Key, amount: Annotated[int, Ge(ge=0)] = 0, units: Annotated[str, _PydanticGeneralMetadata(pattern='^[A-Za-z0-9-]{1,96}$')], resource_link: AnyUrl | None = None, request_link: AnyUrl | None = None)[source]
Allocation for a resource request, created by the processing controller.
- class Key(*, pb_id: Annotated[str, _PydanticGeneralMetadata(pattern='^pb\\-[a-z0-9]+\\-[0-9]{8}\\-[a-z0-9]+$')], kind: Annotated[str, _PydanticGeneralMetadata(pattern='^[A-Za-z0-9-]{1,96}$')], request_type: Annotated[str, _PydanticGeneralMetadata(pattern='^[A-Za-z0-9-]{1,96}$')])[source]
An allocation primary key.
- kind: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^[A-Za-z0-9-]{1,96}$')])]
The kind/class of the request the allocation is connected to (e.g. capacity or performance).
- pb_id: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^pb\\-[a-z0-9]+\\-[0-9]{8}\\-[a-z0-9]+$')])]
The ID of the Processing Block that this allocation belongs to.
- request_type: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^[A-Za-z0-9-]{1,96}$')])]
The type of the request the allowcation is connected to (e.g. buffer storage).
- amount: Annotated[int, Ge(ge=0)]
Allocated space amount.
- key: Annotated[Key, FieldInfo(annotation=NoneType, required=True, exclude=True)]
The primary key to this entity.
- request_link: AnyUrl | None
Request link url.
- resource_link: AnyUrl | None
Resource link url.
- units: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^[A-Za-z0-9-]{1,96}$')])]
Unit of the request amount.
- class ska_sdp_config.entity.resource_management.Request(*, key: Key, amount: Annotated[int, Ge(ge=0)] = 0, units: Annotated[str, _PydanticGeneralMetadata(pattern='^[A-Za-z0-9-]{1,96}$')])[source]
Indicates a request for a resource. Created by processing scripts to request resources of a certain kind.
- class Key(*, pb_id: Annotated[str, _PydanticGeneralMetadata(pattern='^pb\\-[a-z0-9]+\\-[0-9]{8}\\-[a-z0-9]+$')], kind: Annotated[str, _PydanticGeneralMetadata(pattern='^[A-Za-z0-9-]{1,96}$')], request_type: Annotated[str, _PydanticGeneralMetadata(pattern='^[A-Za-z0-9-]{1,96}$')])[source]
A request primary key.
- kind: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^[A-Za-z0-9-]{1,96}$')])]
The kind/class of this particular request (e.g. capacity or performance).
- pb_id: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^pb\\-[a-z0-9]+\\-[0-9]{8}\\-[a-z0-9]+$')])]
The ID of the Processing Block that this request belongs to.
- request_type: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^[A-Za-z0-9-]{1,96}$')])]
The type of this request (e.g. buffer storage).
- amount: Annotated[int, Ge(ge=0)]
Requested space amount.
- key: Annotated[Key, FieldInfo(annotation=NoneType, required=True, exclude=True)]
The primary key to this entity.
- units: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^[A-Za-z0-9-]{1,96}$')])]
Unit of the request amount.
- class ska_sdp_config.entity.resource_management.Resource(*, key: Key, capacity: Annotated[int, Ge(ge=0)] = 0, units: Annotated[str, _PydanticGeneralMetadata(pattern='^[A-Za-z0-9-]{1,96}$')], specs: dict | None = None)[source]
Indicates platform availability of a resource. The resource manager will update free space amount and status on each cycle. Resources types can include, but not limited to: buffer, cpu, memory, nodes etc.
- class Key(*, kind: Annotated[str, _PydanticGeneralMetadata(pattern='^[A-Za-z0-9-]{1,96}$')], name: Annotated[str, _PydanticGeneralMetadata(pattern='^[A-Za-z0-9-]{1,96}$')])[source]
A resource primary key.
- kind: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^[A-Za-z0-9-]{1,96}$')])]
The kind/class of this particular resource.
- name: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^[A-Za-z0-9-]{1,96}$')])]
The name of this resource (e.g. a PVC of choice).
- capacity: Annotated[int, Ge(ge=0)]
Total amount of resource available.
- key: Annotated[Key, FieldInfo(annotation=NoneType, required=True, exclude=True)]
The primary key to this entity.
- specs: dict | None
Optional specifications such as contingency reserve
- units: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^[A-Za-z0-9-]{1,96}$')])]
Unit of the resource capacity.