def set_namespace_gateway(port_dev, gateway_ip):
 if (not port_dev.namespace):
  tools.fail('tests should not change test machine gateway')
 port_dev.route.add_gateway(gateway_ip)

def set_namespace_gateway ( port_dev , gateway_ip ) : if ( not port_dev . namespace ) : tools . fail ( 'tests should not change test machine gateway' ) port_dev . route . add_gateway ( gateway_ip )
set gateway for the namespace associated to the port .