0eda3d65ea
Ironic already has support for automatically setting a lessee on deployment, but it is only supported for direct deployments with Ironic, as it uses request context which is not preserved in the Nova driver. Now, when combined with the related Nova change, Ironic can support this behavior for fully integrated installations. On deploy time, Nova will set several fields -- including project_id -- in instance info. If enabled, Ironic will then use that project_id as the automatic lessee. The previous behavior of using the project_id from the request context is still supported as a fallback. This is being tracked in nova as blueprint ironic-guest-metadata. Closes-Bug: #2063352 Change-Id: Id381a3d201c2f1b137279decc0e32096d4d95012