# A shared vocabulary calls machines and production lines Equipment; only
# machines are matched with devices.
op: merge_manifests

# 1. The vocabulary: both register types are Equipment, and a device's
#    `serial` is a `serial_number`.
canonical_maps:
    left:
        vertices: {Machine: Equipment, ProductionLine: Equipment}
        allow_merges: true
    right: {properties: {Device: {serial: serial_number}}}

# 2. Machines and devices are one type. The vocabulary already makes production
#    lines Equipment too, so they join it without being listed here, and `into`
#    comes from the vocabulary.
vertex_equivalences:
-   left: Machine
    right: Device
    identity:
    -   name: match_key
        sources:
            register: {Machine: {input: [serial_number]}}
            devices: {input: [serial]}
    -   local_key:
            register: {Machine: {field: asset_id, tag: maintenance}}
            devices: {field: device_id, tag: sensors}
