Remove "undefined name" pyflake errors

A number of places tried to use undefined names. This included one
powervm test which turned out to not check anything at all (used
fake implementation of tested method) and needed to be moved.

Make sure that this class of errors causes run_pep8 failure in the
future.

Change-Id: I82ccb63bbc6f6d2b20ecb7f06b2fc22f8f034a33
Merge "Remove "undefined name" pyflake errors"
Merge remote-tracking branch 'm_src_repo/citrix-fixes' into build-temp