Skip to content

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

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/>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions