- self._watch_shutdown = asyncio.Event(loop=loop)
- self._watch_received = asyncio.Event(loop=loop)
+ self._watch_shutdown = asyncio.Event(loop=self.loop)
+ self._watch_received = asyncio.Event(loop=self.loop)
self._charmstore = CharmStore(self.loop)
async def connect(self, *args, **kw):
self._charmstore = CharmStore(self.loop)
async def connect(self, *args, **kw):
self.connection = await connection.Connection.connect(*args, **kw)
await self._after_connect()
self.connection = await connection.Connection.connect(*args, **kw)
await self._after_connect()
await self._after_connect()
async def connect_model(self, model_name):
await self._after_connect()
async def connect_model(self, model_name):
- await asyncio.sleep(wait_period)
- await asyncio.wait_for(_block(), timeout)
+ await asyncio.sleep(wait_period, loop=self.loop)
+ await asyncio.wait_for(_block(), timeout, loop=self.loop)
- self._notify_observers(delta, old_obj, new_obj))
+ self._notify_observers(delta, old_obj, new_obj),
+ loop=self.loop)
- asyncio.ensure_future(o(delta, old_obj, new_obj, self))
+ asyncio.ensure_future(o(delta, old_obj, new_obj, self),
+ loop=self.loop)
async def _wait(self, entity_type, entity_id, action, predicate=None):
"""
async def _wait(self, entity_type, entity_id, action, predicate=None):
"""
return [app for name, app in self.applications.items()
if name in handler.applications]
else:
return [app for name, app in self.applications.items()
if name in handler.applications]
else:
- :param str filter_: Service or unit name or wildcard ('*')
+ :param str filters: Optional list of applications, units, or machines
+ to include, which can use wildcards ('*').
def sync_tools(
self, all_=False, destination=None, dry_run=False, public=False,
def sync_tools(
self, all_=False, destination=None, dry_run=False, public=False,
# Update the 'charm:' entry for each app with the new 'local:' url.
for app_name, charm_url in zip(apps, charm_urls):
bundle['services'][app_name]['charm'] = charm_url
# Update the 'charm:' entry for each app with the new 'local:' url.
for app_name, charm_url in zip(apps, charm_urls):
bundle['services'][app_name]['charm'] = charm_url