X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=juju%2Fmodel.py;h=52721a714f3fa363fb8d8e97e5cc0e84db9a90db;hb=55ae2c120ce031f57ac210f3d7bd203db739f1e9;hp=cc9ee95136146aff0221bc90b2055e1f833df326;hpb=01df4afcb5ff210724d9e8702539aee811a36092;p=osm%2FN2VC.git diff --git a/juju/model.py b/juju/model.py index cc9ee95..52721a7 100644 --- a/juju/model.py +++ b/juju/model.py @@ -759,9 +759,6 @@ class Model(object): - series is required; how do we pick a default? """ - if constraints: - constraints = client.Value(**constraints) - if to: placement = [ client.Placement(**p) for p in to @@ -791,8 +788,11 @@ class Model(object): if pending_apps: # new apps will usually be in the model by now, but if some # haven't made it yet we'll need to wait on them to be added - await asyncio.wait([self._wait_for_new('application', app_name) - for app_name in pending_apps]) + await asyncio.gather(*[ + asyncio.ensure_future( + self.model._wait_for_new('application', app_name)) + for app_name in pending_apps + ]) return [app for name, app in self.applications.items() if name in handler.applications] else: @@ -815,7 +815,7 @@ class Model(object): ) await app_facade.Deploy([app]) - return [await self._wait_for_new('application', service_name)] + return await self._wait_for_new('application', service_name) def destroy(self): """Terminate all machines and resources for this model.