projects
/
osm
/
N2VC.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
77cdb18
)
Add Model.connect() for connecting to arbitrary endpoint
author
Tim Van Steenburgh
<tvansteenburgh@gmail.com>
Thu, 17 Nov 2016 14:56:01 +0000
(09:56 -0500)
committer
Tim Van Steenburgh
<tvansteenburgh@gmail.com>
Thu, 17 Nov 2016 14:56:01 +0000
(09:56 -0500)
juju/model.py
patch
|
blob
|
history
diff --git
a/juju/model.py
b/juju/model.py
index
db65b7d
..
5ca7422
100644
(file)
--- a/
juju/model.py
+++ b/
juju/model.py
@@
-349,6
+349,16
@@
class Model(object):
self._watch_received = asyncio.Event(loop=loop)
self._charmstore = CharmStore(self.loop)
+ async def connect(self, *args, **kw):
+ """Connect to an arbitrary Juju model.
+
+ args and kw are passed through to Connection.connect()
+
+ """
+ self.connection = await connection.Connection.connect(*args, **kw)
+ self._watch()
+ await self._watch_received.wait()
+
async def connect_current(self):
"""Connect to the current Juju model.