projects
/
osm
/
N2VC.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implement Model.get_status
[osm/N2VC.git]
/
juju
/
model.py
diff --git
a/juju/model.py
b/juju/model.py
index
1177f00
..
63c306b
100644
(file)
--- a/
juju/model.py
+++ b/
juju/model.py
@@
-1305,15
+1305,17
@@
class Model(object):
"""
raise NotImplementedError()
"""
raise NotImplementedError()
-
def get_status(self, filter_
=None, utc=False):
+
async def get_status(self, filters
=None, utc=False):
"""Return the status of the model.
"""Return the status of the model.
- :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 ('*').
:param bool utc: Display time as UTC in RFC3339 format
"""
:param bool utc: Display time as UTC in RFC3339 format
"""
- raise NotImplementedError()
- status = get_status
+ client_facade = client.ClientFacade()
+ client_facade.connect(self.connection)
+ return await client_facade.FullStatus(filters)
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,
@@
-1650,14
+1652,18
@@
class BundleHandler(object):
"""
# resolve indirect references
charm = self.resolve(charm)
"""
# resolve indirect references
charm = self.resolve(charm)
- # stringify all config values for API
+ # stringify all config values for API
, and convert to YAML
options = {k: str(v) for k, v in options.items()}
options = {k: str(v) for k, v in options.items()}
+ options = yaml.dump({application: options}, default_flow_style=False)
# build param object
app = client.ApplicationDeploy(
charm_url=charm,
series=series,
application=application,
# build param object
app = client.ApplicationDeploy(
charm_url=charm,
series=series,
application=application,
- config=options,
+ # Pass options to config-yaml rather than config, as
+ # config-yaml invokes a newer codepath that better handles
+ # empty strings in the options values.
+ config_yaml=options,
constraints=parse_constraints(constraints),
storage=storage,
endpoint_bindings=endpoint_bindings,
constraints=parse_constraints(constraints),
storage=storage,
endpoint_bindings=endpoint_bindings,