Fix crash in quantumapi if no network or port id is specified

The existing code assumes that if no port id or fixed ip was specified,
that the network id passed in is valid. This is not necessarily the case,
and results in adding None to the list of network ids, which later
causes a check to see if the network id list is empty to fail.

This only adds the network id to the list if it was specified, and
adds a more explicit check to the region that previously fell through
without finding a matching network so that a similar case would be
easier to debug in the future.

Addresses bug #1131264

Change-Id: I7a8aaea5772707b8bd6313249e74b1302eedefe8
Adds API Sample tests for Volume Attachments

Partially implements bp nova-api-samples
Fixes Bug 1126204

Change-Id: I4b061f1916d688ad97c6a6ba4011dd13431a4fcb
Merge "Adds API Sample tests for Volume Attachments"
Merge "Fix crash in quantumapi if no network or port id is specified"