Step 2: Inspect The Path
Then use those attachment switches to query the path between them.
You can also run the example script:
python3 inspect_path.py of:0000000000000001 of:0000000000000002
The Python logic looks like this:
import requests
BASE = 'http://localhost:8181/onos/v1'
AUTH = ('onos', 'rocks')
paths = requests.get(
f'{BASE}/paths/of:0000000000000001/of:0000000000000002',
auth=AUTH
).json()['paths']
for link in paths[0]['links']:
print(link['src']['device'], link['src']['port'], '->',
link['dst']['device'], link['dst']['port'])
What to look for You are turning ONOS topology state into a concrete device-and-port path.