Skip to content

Handle Jinja templating in ioc.yaml and fastcs.yaml #221

@tomkane-dls

Description

@tomkane-dls

The plan is for Jinja templating to be used in the config yamls for services, and techui-builder needs to handle this to extract what it needs.

ADAravis example:

ioc_name: "{{  _global.get_env('IOC_NAME') }}"

description: auto-generated by https://github.com/epics-containers/builder2ibek

entities:
  - type: epics.EpicsEnvSet
    name: EPICS_TS_MIN_WEST
    value: "0"

  - type: epics.EpicsCaMaxArrayBytes
    max_bytes: 100000000

  - type: devIocStats.iocAdminSoft
    IOC: "{{ ioc_name | upper }}"

  - type: autosave.Autosave
    P: "{{ ioc_name | upper }}:"

(Approximate) fastcs.yaml example:

controller:
  serial_settings:
    port: "/dev/usbip-{{ _global.get_env('IOC_NAME') }}-usb-mff-tty"
transport:
  - ioc:
      pv_prefix: "{{ _global.get_env('IOC_NAME') | upper }}"
    gui:
      output_path: /epics/opi/index.bob
      title: LED Flip Mirror

techui-builder could possibly also use the output_path to locate autogenerated screens.

(in techui.yaml)

  FLIP_1:
    prefix: BL01C-EA-FLIP-01
    label: Light Source Flipper
    file: $(IOC)/$(GUI)
    macros:
      P: BL01C-EA-FLIP-01
      IOC: https://b01-1-opis.diamond.ac.uk/bl01c-ea-flip-01
      GUI: <path_after_/epics/opi/>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions