Only define resource_mapping if pyrax is installed.

Change-Id: I5c3510c62331e32b5e01273400b0aabb352c1292