saltstack/salt — pull request #9329 by terminalmage (2013-12-17 22:36:51+00:00)
Title: Allow '_in' requisites to match both on ID and name

Under the hood, all '_in' requisites match are changed to extends of
their corresponding type. For example, a require_in for a given state
extends the target of the require_in with a 'require' requisite,
pointing back at the state where the require_in was located.

When these extends are reconciled, only the ID declarations are examined
to see if there is a state matching the requisite's target, meaning that
these '_in' requisites cannot point to a 'name' override in the same way
as their counterparts are able to. For more info, see https://github.com/saltstack/salt/issues/9061.

This commit modifies the extend reconciliation behavior. If there is no
ID declaration matching the requisite's target, then
salt.state.find_name() is used to search the high data for an ID
declaration with a 'name' param matching the requisite target. If a
match is found, then the extend is reconciled against that matching ID.
If no match is found, then the requisite is not found the appropriate
error is returned.

Fixes #9061.