Minor improvements
[osm/N2VC.git] / juju / application.py
index 5a30235..69f412f 100644 (file)
@@ -3,6 +3,7 @@ import logging
 
 from . import model
 from .client import client
+from .placement import parse as parse_placement
 
 log = logging.getLogger(__name__)
 
@@ -40,14 +41,14 @@ class Application(model.ModelEntity):
         """Get the application status, as set by the charm's leader.
 
         """
-        return self.data['status']['current']
+        return self.safe_data['status']['current']
 
     @property
     def status_message(self):
         """Get the application status message, as set by the charm's leader.
 
         """
-        return self.data['status']['message']
+        return self.safe_data['status']['message']
 
     @property
     def tag(self):
@@ -87,7 +88,7 @@ class Application(model.ModelEntity):
 
         result = await app_facade.AddUnits(
             application=self.name,
-            placement=to,
+            placement=[parse_placement(to)] if to else None,
             num_units=count,
         )