# How to combine manifest_maintenance.yaml (left) and manifest_sensors.yaml (right).
op: merge_manifests

# 1. A device's `serial` fills a machine's `serial_number`.
canonical_maps:
    right: {properties: {Device: {serial: serial_number}}}

# 2. Machines and devices are one type, named Machine, and this is how records
#    from both sides find each other.
vertex_equivalences:
-   left: Machine
    right: Device
    into: Machine
    identity:
    -   name: match_key
        sources:
            register: {input: [serial_number]}
            devices: {input: [serial]}
    -   local_key:
            register: {field: asset_id, tag: maintenance}
            devices: {field: device_id, tag: sensors}
