Fetch Hostname from a script and publish into discovery rule hostname field

Problem: We have a script (that makes a call to another system that generates hostname and returns back to the script, which stores hostname in a variable and sets it as a hostname during the kickstart process) within the kickstart file for any newly imaged systems via PXE. Is there a way that i can set this hostname within the discovery rule in the hostname field instead of the default (mac address)?

Expected outcome: Basically i want the hostname field in the discovery rule to fetch the hostname from a script that generates the hostname we want.

Foreman and Proxy versions: 1.22

Foreman and Proxy plugin versions:

Other relevant data:
[e.g. logs from Foreman and/or the Proxy, modified templates, commands issued, etc]
(for logs, surround with three back-ticks to get proper formatting, e.g.)


That is not possible, we are currently redesigning how discovery new generation will look like and that will be possible in the future.