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:
f706324
)
Updated juju.controller.destroy_models(), prepend 'model-' to UUID and pass a single...
author
Sean Feole
<sfeole@gmail.com>
Wed, 23 Nov 2016 15:23:04 +0000
(10:23 -0500)
committer
Sean Feole
<sfeole@gmail.com>
Wed, 23 Nov 2016 15:23:04 +0000
(10:23 -0500)
juju/controller.py
patch
|
blob
|
history
diff --git
a/juju/controller.py
b/juju/controller.py
index
2d8b4fa
..
f0ef3b9
100644
(file)
--- a/
juju/controller.py
+++ b/
juju/controller.py
@@
-67,15
+67,27
@@
class Controller(object):
"""Destroy a model to this controller.
"""Destroy a model to this controller.
- :param str : model-<UUID>
+ :param str : <UUID> of the Model
+ param accepts string of <UUID> only OR `model-<UUID>`
+
"""
model_facade = client.ModelManagerFacade()
model_facade.connect(self.connection)
"""
model_facade = client.ModelManagerFacade()
model_facade.connect(self.connection)
- for arg in args:
+ #Generate list of args, pre-pend 'model-'
+ prependarg = list(args)
+ for index, item in enumerate(prependarg):
+ if not item.startswith('model-'):
+ prependarg[index]="model-%s" % item
+
+ #Create list of objects to pass to DestroyModels()
+ arglist = []
+ for arg in prependarg:
+ arglist.append(client.Entity(arg))
log.debug('Destroying Model %s', arg)
log.debug('Destroying Model %s', arg)
- await model_facade.DestroyModels([client.Entity(arg)])
+
+ await model_facade.DestroyModels(arglist)
def add_user(self, username, display_name=None, acl=None, models=None):
"""Add a user to this controller.
def add_user(self, username, display_name=None, acl=None, models=None):
"""Add a user to this controller.