Replaces mox with mock in api's unit tests

OpenStack is moving unit tests from mox to mock for python3.3 compatibility.
This replaces mox with mock in api's unit tests.

It also fixes a slight problem with ..test_nodes.TestPut.test_power_state_in_progress().
mox was generating the exception (due to a second call to .update_node()), not
the ironic code. This is because objects.Node.get_by_uuid() returns a different
node (that gets its state changed) and the original node never gets the change.
When it is mocked to return the same node, the expected exception is raised by
ironic.api.controllers.v1.node.NodePowerStateController.put().

Change-Id: If734fb4c9a4a386ccc37a1336dbd41e3121a5ef4
Fix power_state set to python object repr

Change-Id: I096bc58bc1e6349d1a0f87dbad4b8ce40dc2cc09
Closes-Bug: #1237678
Improve error message for ssh

This message was always returning "SSHPowerDriver unknown virt_type
(None)", it was suppose to at least shows the inputed virt_type value
by the user. This patch fix it making the message more user-friendly by
showing what was the valued inputed by the user + the supported values
by that module.

Change-Id: I92a78dfe065d9a38fab718bbc710b1adf933ee41
Merge "Fix power_state set to python object repr"
Merge "Improve error message for ssh"
Merge "Replaces mox with mock in api's unit tests"
Fix policies

Policy file contained malformed content so the policy
engine failed to parse it. That was the reason of rejecting
all requests, if authentication was enabled.

This patch also updates policies to get rid of unused policies
and use GenericCheck to check for admin API.

After changes mentioned above some unused code appeared in
ironic.common.policy and so it was cleaned up.

Closes-bug: #1236371
Change-Id: Ie1dbda11561a9e7068d240a19f9fb98eae121c94
Merge "Fix policies"