My environment is setup as follows:
Default MAAS-provided image: Ubuntu 22.04
Other image(s): RHEL 7 (uploaded via boot-resource command)
When trying to deploy a machine with RHEL 7 from the UI or through deploy command, machine is deployed successfully.
maas local boot-resources create name='rhel/7' title='RHEL 7' architecture='amd64/generic' filetype='tgz' content@=rhel7.tar.gz
However, on using the API endpoint POST /MAAS/api/2.0/machines/{system_id}/op-deploy
with distro_series as rhel/7, Ubuntu 22.04 is deployed instead of RHEL 7.