Fix exception if no "networks" in server creation
Fix exception if no "networks" in server creation

1.What is the problem:
If 'networks' is not carried in the request to Nova API-GW,
then in current implementation, server_body['networks'] will
not be initialized before it is used in the "nics = [ {'port-id':
_port['port']} for _port in server_body['networks']]" clause,
then exception will happen, and return error to the API caller.
In fact, it should works, no exception should happen.

2.What's need to be fixed:
Move the server_body['networks'] initialization outside
the "if  'networks' in kw['server']" clause will ensure
server_body['networks'] being initialized before it is used
later, and eliminate the exception happened in "nics = ...
for _port in server_body['networks']]" clause.

3.What is the purpose of this patch set:
Eliminate the unusual exception happened in server creation

Change-Id: I50a6ac8e6bba78233e063bcfc24c0a1d4663e9f6
Signed-off-by: joehuang <a9255ab284bb421be02744591ccbe1d599fb05d5@huawei.com>

stackforge/tricircle,openstack/tricircle,stackforge/tricircle,openstack/tricircle