saltstack/salt — pull request #6968 by s0undt3ch (2013-08-30 18:20:35+00:00)
Title: State calls now fail if non-supported arguments are used. Fixes #6962.

* Removed `format_call` from `salt.state.State` since it was almost a one to one copy of `salt.utils.format_call`.
* The `format_call` in `salt.utils` was modified to accept initial return data(to provide the functionality from the removed `State.format_call`.
* While the function arguments are being queried/matched, those used are removed from a copy of the passed data. Once finished, any remaining keyword arguments which do not match those allowed on the `expected_extra_kws` keyword argument to `format_call` will raise a `SaltInvocationError`.

This will prevent any future bogus bug searching like what happened on #6912 because the wrong state function argument was being passed.