X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=juju%2Fmodel.py;h=63c306ba14b823e07a4c3531dad4a6f5f0f3bee4;hb=2a8a35b260385c6a0c0014f0f3e62975aff8b113;hp=1177f001cf981b5da8938a20eaa85731debd485e;hpb=ca170102476524e17c37d2efac3ce60f6ac6f326;p=osm%2FN2VC.git diff --git a/juju/model.py b/juju/model.py index 1177f00..63c306b 100644 --- a/juju/model.py +++ b/juju/model.py @@ -1305,15 +1305,17 @@ class Model(object): """ 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. - :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 """ - 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, @@ -1650,14 +1652,18 @@ class BundleHandler(object): """ # 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 = yaml.dump({application: options}, default_flow_style=False) # 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,