Allow passing image_ref, image_ref_alt, and network_gateway_id

Incorrect logic prevented the passing of these values.

Tests added for passing one, the other, and both pairs of each
parameter.

Change-Id: I7fe1e71f437a032f9a98c07214a1261a8001f7d8