def _nova_to_osvif_route(route):
 obj = objects.route.Route(cidr=route['cidr'])
 if (route['interface'] is not None):
  obj.interface = route['interface']
 if ((route['gateway'] is not None) and (route['gateway']['address'] is not None)):
  obj.gateway = route['gateway']['address']
 return obj

def _nova_to_osvif_route ( route ) : obj = objects . route . Route ( cidr = route [ 'cidr' ] ) if ( route [ 'interface' ] is not None ) : obj . interface = route [ 'interface' ] if ( ( route [ 'gateway' ] is not None ) and ( route [ 'gateway' ] [ 'address' ] is not None ) ) : obj . gateway = route [ 'gateway' ] [ 'address' ] return obj
convert nova route object into os_vif object .