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:
896db9f
)
Fix invalid model name if already contains username
author
Cory Johns
<johnsca@gmail.com>
Thu, 2 Mar 2017 14:40:39 +0000
(09:40 -0500)
committer
Cory Johns
<johnsca@gmail.com>
Fri, 3 Mar 2017 16:33:39 +0000
(11:33 -0500)
juju/client/connection.py
patch
|
blob
|
history
diff --git
a/juju/client/connection.py
b/juju/client/connection.py
index
3011a8a
..
dbd48c6
100644
(file)
--- a/
juju/client/connection.py
+++ b/
juju/client/connection.py
@@
-273,7
+273,8
@@
class Connection:
username = accounts['user']
password = accounts.get('password')
models = jujudata.models()[controller_name]
- model_name = '{}/{}'.format(username, model_name)
+ if '/' not in model_name:
+ model_name = '{}/{}'.format(username, model_name)
model_uuid = models['models'][model_name]['uuid']
macaroons = get_macaroons() if not password else None