This interface layer handles communication between OSM's RO and its clients.
To implement this relation to offer an ro:
In your charm's metadata.yaml:
provides: ro: interface: osm-ro
reactive/myro.py:
@when('ro.joined') def send_config(ro): ro.send_connection( unit_get('private-address'), get_ro_port() )
If you would like to use a rodb from your charm:
metadata.yaml:
requires: ro: interface: osm-ro
reactive/mycharm.py:
@when('ro.ready') def ro_ready(): ro = endpoint_from_flag('ro.ready') if ro: for unit in ro.ros(): add_ro(unit['host'], unit['port'])