Skip to main content

Move an emulated BGP neighbor to another agent

POST
/tasks/routing/move/{id}

The same emulated router is configured on an interface of the from agent (active) and of the to agent (standby: startDisabled is on for the control plane interface). The command disables the emulator interface on from without taking the link down (the router stops answering ARP, and its BGP sessions close without messages) and enables the interface on to (ARP and ND to the gateway immediately, then the BGP sessions). Both moments are written to cp_event_logs.events (INTERFACE_DISABLED, INTERFACE_ENABLED). If the interface cannot be enabled on to, the router returns to from. The outage of plugin 45 flows to the neighbor's prefixes is measured in the background: the controller compares the last frame of each flow at the from receiver with the first one at the to receiver and writes a row to convergence_events of the to receiver (timestamp_source = move). Fields: from, to: agent ID or hostname; from_interface, to_interface: emulator interface (empty means all); measure_timeout_sec: how long to wait for the flows to arrive (120 by default, at most 900).

Contract

Parameter
Value
Sectiontasks
AuthenticationCookieAuth
Consumesapplication/json
Producesapplication/json

Parameters

2 parameters

Name
Location
Required
Type
Description
idpathyesintegerTask ID
requestbodyyesobjectfrom, to, from_interface, to_interface, measure_timeout_sec
  • {}

Responses

5 responses

Status
Description
Type
200
Response: {status: ok, move: {...}}; the measurement continues in the background, the result is in GET /tasks/routing/move/{id}object
400
Invalid task ID or request body, from or to is not a routing agent of the task, or from and to are the sameobject
401
Unauthorizedobject
409
The previous move is still being measured or a move schedule is runningobject
500
Task is not running or an agent did not execute the command (the router stays on from)object
  • {}
  • {
      "data": {},
      "error": "<string>"
    }
  • {
      "data": {},
      "error": "<string>"
    }
  • {
      "data": {},
      "error": "<string>"
    }
  • {
      "data": {},
      "error": "<string>"
    }