X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=examples%2Frelate.py;h=1952ffea06afc6e44ff31050cc381e4668838adc;hb=4c1f68ce9871fa965fe9683aeeb5ddd66b42a5bc;hp=241d1a69411325790e14f0197edfbe3ef45221d3;hpb=7fdf96510e9aa6960d6c956a7178585cb65caefe;p=osm%2FN2VC.git diff --git a/examples/relate.py b/examples/relate.py index 241d1a6..1952ffe 100644 --- a/examples/relate.py +++ b/examples/relate.py @@ -68,6 +68,11 @@ async def run(): lambda delta, old_unit, new_unit, model: print('Unit removed: {}'.format(old_unit.entity_id)) )) + unit_a, unit_b = await ubuntu_app.add_units(count=2) + unit_a.on_change(asyncio.coroutine( + lambda delta, old_unit, new_unit, model: + print('Unit changed: {}'.format(new_unit.entity_id)) + )) await model.deploy( 'nrpe', service_name='nrpe',