Support a replacement pattern of %{...} to look up arbitrary keys from the given metadata and use the respective values. Change-Id: I2cc6c791629ed494b32e3352a555298c3b9cb4fc