Print an error message and fail if network could not be found by name

When obtaining a network by name, assert that we actually obtain one
instead of failing on a key error.

Related-bug: #1438415

Change-Id: I0e7f487c5d644f178fc770926333cb1e88749b4a
1 file changed