X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=juju%2Fapplication.py;h=42dae71c44df1d0b881f3c5edbbb56dac545fdaa;hb=55ae2c120ce031f57ac210f3d7bd203db739f1e9;hp=c12af858774ac15f702dc2e3bfe10aa4cf6b4772;hpb=a2e4fb16474673b676d49b807e7bf1e14701991f;p=osm%2FN2VC.git diff --git a/juju/application.py b/juju/application.py index c12af85..42dae71 100644 --- a/juju/application.py +++ b/juju/application.py @@ -171,17 +171,29 @@ class Application(model.ModelEntity): return await app_facade.Expose(self.name) - def get_config(self): - """Return the configuration settings for this application. + async def get_config(self): + """Return the configuration settings dict for this application. """ - pass + app_facade = client.ApplicationFacade() + app_facade.connect(self.connection) + + log.debug( + 'Getting config for %s', self.name) + + return (await app_facade.Get(self.name)).config - def get_constraints(self): - """Return the machine constraints for this application. + async def get_constraints(self): + """Return the machine constraints dict for this application. """ - pass + app_facade = client.ApplicationFacade() + app_facade.connect(self.connection) + + log.debug( + 'Getting constraints for %s', self.name) + + return vars((await app_facade.Get(self.name)).constraints) def get_actions(self, schema=False): """Get actions defined for this application.