Feature/api version support (#109)
[osm/N2VC.git] / examples / allwatcher.py
index c215d20..c78d689 100644 (file)
@@ -11,14 +11,13 @@ import asyncio
 import logging
 
 from juju.client.connection import Connection
-from juju.client import watcher
+from juju.client import client
 from juju import loop
 
 
 async def watch():
-    allwatcher = watcher.AllWatcher()
     conn = await Connection.connect_current()
-    allwatcher.connect(conn)
+    allwatcher = client.AllWatcherFacade.from_connection(conn)
     while True:
         change = await allwatcher.Next()
         for delta in change.deltas: