def set_networks_kwarg(network, kwargs=None):
 params = (copy.copy(kwargs) or {})
 if (kwargs and ('networks' in kwargs)):
  return params
 if network:
  if ('id' in network.keys()):
   params.update({'networks': [{'uuid': network['id']}]})
  else:
   LOG.warning('The provided network dict: %s was invalid and did not contain an id', network)
 return params

def set_networks_kwarg ( network , kwargs = None ) : params = ( copy . copy ( kwargs ) or { } ) if ( kwargs and ( 'networks' in kwargs ) ) : return params if network : if ( 'id' in network . keys ( ) ) : params . update ( { 'networks' : [ { 'uuid' : network [ 'id' ] } ] } ) else : LOG . warning ( 'The provided network dict: %s was invalid and did not contain an id' , network ) return params
set networks kwargs for a server create if missing .