0

As with unetstack shell we can delete a route but how to delete a route in the groovy code without using the Agent

1 Answers1

1

Refer to the documentation for Routing service in the Unet handbook for how to do this. Essentially you need to send a EditRouteReq created using the deleteRoute() constructor method, and send it to the agent providing the ROUTING service.

For example, if you want to delete all routes to node 10, this will look something like:

def router = agentForService(Services.ROUTING)
def req = EditRouteReq.deleteRoute()
req.to = 10
def rsp = router << req
// rsp will have performative AGREE if the request was successful
Mandar Chitre
  • 2,110
  • 6
  • 14