67d3fbe579f160ee6abee35918b6a9c97cba0ef5
[osm/N2VC.git] / docs / index.rst
1 .. libjuju documentation master file, created by
2    sphinx-quickstart on Thu May 19 11:21:38 2016.
3    You can adapt this file completely to your liking, but it should at least
4    contain the root `toctree` directive.
5
6 A Python library for Juju
7 =========================
8
9 Front Matter
10 ------------
11
12 NOTE: There is no implementation here yet. It is simply a mocked out
13 design of what this library might look like. The design itself is not
14 complete. Comments on the design, good or bad, are welcomed. Use cases
15 are also appreciated as they will shape the design.
16
17 The goal is to end up with a feature-full and officially supported
18 python library for Juju.
19
20 The focus right now is on Juju 2+ only.
21
22 Design Ideas
23 ------------
24
25 * Present an object-oriented interface to all the features of the Juju
26   CLI
27 * Do as much as possible through the API so that the library can be used
28   without actually installing Juju
29
30 Example Use Cases
31 -----------------
32
33 Please add more!
34
35 Simple bootstrap/deploy
36 +++++++++++++++++++++++
37
38 .. code:: python
39
40   from juju import Juju
41
42   juju = Juju()
43   lxd = juju.get_cloud('lxd')
44   controller = lxd.bootstrap('lxd-test')
45   model = controller.get_model('default')
46
47   # We might want an async and blocking version of deploy()?
48   model.deploy('mediawiki-single')
49
50   mediawiki = model.get_service('mediawiki')
51   mediawiki.expose()
52
53
54 Table of Contents
55 -----------------
56
57 .. toctree::
58    :maxdepth: 2
59
60    api/modules
61
62
63
64 Indices and tables
65 ==================
66
67 * :ref:`genindex`
68 * :ref:`modindex`
69 * :ref:`search`
70