Update changelog for 0.2.0
[osm/N2VC.git] / docs / narrative / application.rst
index 630ce85..1565e5f 100644 (file)
@@ -1,5 +1,6 @@
 Applications
 ============
+For api docs, see :class:`juju.application.Application`.
 
 
 Deploying
@@ -31,6 +32,26 @@ To deploy a new application, connect a model and then call its
   )
 
 
+Deploying a Local Charm
+-----------------------
+To deploy a local charm, pass the charm directory path to
+`Model.deploy()`.
+
+.. code:: python
+
+  from juju.model import Model
+
+  model = Model()
+  await model.connect_current()
+
+  # Deploy a local charm using a path to the charm directory
+  await model.deploy(
+      '/home/tvansteenburgh/src/charms/ubuntu',
+      application_name='ubuntu',
+      series='trusty',
+  )
+
+
 Adding Units
 ------------
 To add units to a deployed application, use the
@@ -39,14 +60,14 @@ added units (:class:`~juju.unit.Unit` objects) is returned.
 
 .. code:: python
 
-    ubuntu_app = await model.deploy(
-        'ubuntu',
-        application_name='ubuntu',
-        series='trusty',
-        channel='stable',
-    )
+  ubuntu_app = await model.deploy(
+      'ubuntu',
+      application_name='ubuntu',
+      series='trusty',
+      channel='stable',
+  )
 
-    unit_a, unit_b = await ubuntu_app.add_units(count=2)
+  unit_a, unit_b = await ubuntu_app.add_units(count=2)
 
 
 Updating Config and Constraints