Feature Request
Currently, the --hardware CLI option for tmt run provision accepts key-value pairs like --hardware hostname=foo.example.com. However, there is no way to pass a full hardware specification as a JSON string on the command line.
This would be useful for integrations (such as Testing Farm) that need to pass complex hardware requirements from their API directly to tmt, especially in multihost scenarios where each guest may have different hardware constraints.
Use case
Testing Farm receives hardware requirements via its API as structured JSON objects, for example:
{
"hostname": "=~storageqe-60.rhts.eng.pek2.redhat.com"
}
Currently, these cannot be forwarded directly to tmt's --hardware option in their full structured form. Supporting a JSON string input would allow seamless passthrough of hardware specifications.
Proposed behavior
Allow --hardware to accept a JSON string, e.g.:
tmt run provision -h beaker --hardware '{"hostname": "=~storageqe-60.rhts.eng.pek2.redhat.com"}'
This should be equivalent to:
tmt run provision -h beaker --hardware hostname="=~storageqe-60.rhts.eng.pek2.redhat.com"
Jira reference
TFT-4171 - Support passing hardware from API to tmt for multihost
Feature Request
Currently, the
--hardwareCLI option fortmt run provisionaccepts key-value pairs like--hardware hostname=foo.example.com. However, there is no way to pass a full hardware specification as a JSON string on the command line.This would be useful for integrations (such as Testing Farm) that need to pass complex hardware requirements from their API directly to tmt, especially in multihost scenarios where each guest may have different hardware constraints.
Use case
Testing Farm receives hardware requirements via its API as structured JSON objects, for example:
{ "hostname": "=~storageqe-60.rhts.eng.pek2.redhat.com" }Currently, these cannot be forwarded directly to tmt's
--hardwareoption in their full structured form. Supporting a JSON string input would allow seamless passthrough of hardware specifications.Proposed behavior
Allow
--hardwareto accept a JSON string, e.g.:tmt run provision -h beaker --hardware '{"hostname": "=~storageqe-60.rhts.eng.pek2.redhat.com"}'This should be equivalent to:
tmt run provision -h beaker --hardware hostname="=~storageqe-60.rhts.eng.pek2.redhat.com"Jira reference
TFT-4171 - Support passing hardware from API to tmt for multihost