New N2VC interface + updated libjuju
This commit introduces the Python3 N2VC module, which acts as a standard
interface to the VCA.
The goal of this is to provide a common way for modules to interface
with the VCA.
- Updated libjuju from 0.6.1 to 0.7.3
Signed-off-by: Adam Israel <adam.israel@canonical.com>
Change-Id: Ide70fb5ae5797eb6486de24653dc09a23f9c009e
diff --git a/modules/libjuju/docs/api/juju.client.rst b/modules/libjuju/docs/api/juju.client.rst
index 6a699c0..dad691f 100644
--- a/modules/libjuju/docs/api/juju.client.rst
+++ b/modules/libjuju/docs/api/juju.client.rst
@@ -1,5 +1,5 @@
-juju\.client package
-====================
+Internal APIs
+=============
These packages are for internal use in communicating with the low-level
API. You should use the object oriented API instead. They are documented
diff --git a/modules/libjuju/docs/api/modules.rst b/modules/libjuju/docs/api/modules.rst
index bf06f26..9722a6a 100644
--- a/modules/libjuju/docs/api/modules.rst
+++ b/modules/libjuju/docs/api/modules.rst
@@ -1,5 +1,5 @@
-juju
-====
+Public APIs
+===========
It is recommended that you start with :doc:`juju.model` or :doc:`juju.controller`.
If you need helpers to manage the asyncio loop, try :doc:`juju.loop`.
diff --git a/modules/libjuju/docs/changelog.rst b/modules/libjuju/docs/changelog.rst
index d3d2e91..caf778e 100644
--- a/modules/libjuju/docs/changelog.rst
+++ b/modules/libjuju/docs/changelog.rst
@@ -1,5 +1,54 @@
-Change Log
-----------
+Changelog
+---------
+
+0.7.3
+^^^^^
+Tuesday Feb 20 2018
+
+* Full macaroon bakery support (#206)
+* Fix regression with deploying local charm, add test case (#209)
+* Expose a machines series (#208)
+* Automated test runner fixes (#205)
+
+0.7.2
+^^^^^
+Friday Feb 9 2018
+
+* Support deploying bundle YAML file directly (rather than just directory) (#202)
+
+0.7.1
+^^^^^
+Monday Dec 18 2017
+
+* Fix missed renames of model_uuids (#197)
+
+0.7.0
+^^^^^
+Fri Dec 15 2017
+
+* Fix race condition in adding relations (#192)
+* Fix race condition in connection monitor test (#183)
+* Fix example in README (#178)
+* Fix rare hang during Unit.run (#177)
+* Fix licensing quirks (#176)
+* Refactor model handling (#171)
+* Refactor users handling, add get_users (#170)
+* Upload credential to controller when adding model (#168)
+* Support 'applications' key in bundles (#165)
+* Improve handling of thread error handling for loop.run() (#169)
+* Fix encoding when using to_json() (#166)
+* Fix intermittent test failures (#167)
+
+0.6.1
+^^^^^
+Fri Sept 29 2017
+
+* Fix failure when controller supports newer facade version (#145)
+* Fix test failures (#163)
+* Fix SSH key handling when adding a new model (#161)
+* Make Application.upgrade_charm upgrade resources (#158)
+* Expand integration tests to use stable/edge versions of juju (#155)
+* Move docs to ReadTheDocs (https://pythonlibjuju.readthedocs.io/en/latest/)
0.6.1
^^^^^
diff --git a/modules/libjuju/docs/index.rst b/modules/libjuju/docs/index.rst
index b4b075f..2dd55cb 100644
--- a/modules/libjuju/docs/index.rst
+++ b/modules/libjuju/docs/index.rst
@@ -11,17 +11,30 @@
-----------------
.. toctree::
+ :caption: Overview
:glob:
:maxdepth: 3
narrative/index
- API Docs <api/modules>
- Internal API Docs <api/juju.client>
+
+
+.. toctree::
+ :caption: API Documentation
+ :glob:
+ :maxdepth: 3
+
+ api/modules
+ api/juju.client
+
+.. toctree::
+ :caption: Project
+ :glob:
+ :maxdepth: 3
+
upstream-updates/index
+ changelog
-.. include:: changelog.rst
-
Indices and tables
==================
diff --git a/modules/libjuju/docs/narrative/index.rst b/modules/libjuju/docs/narrative/index.rst
index eb77e4c..b1684a0 100644
--- a/modules/libjuju/docs/narrative/index.rst
+++ b/modules/libjuju/docs/narrative/index.rst
@@ -1,5 +1,4 @@
-Narrative Docs
-==============
+**Overview**
.. toctree::
:glob:
diff --git a/modules/libjuju/docs/readme.rst b/modules/libjuju/docs/readme.rst
index ecfbc5a..886550d 100644
--- a/modules/libjuju/docs/readme.rst
+++ b/modules/libjuju/docs/readme.rst
@@ -46,10 +46,10 @@
.. code:: python
- #!/usr/bin/python3.5
+ #!/usr/bin/python3
- import asyncio
import logging
+ import sys
from juju import loop
from juju.model import Model
@@ -63,26 +63,28 @@
# Connect to the currently active Juju model
await model.connect_current()
- # Deploy a single unit of the ubuntu charm, using revision 0 from the
- # stable channel of the Charm Store.
- ubuntu_app = await model.deploy(
- 'ubuntu-0',
- application_name='ubuntu',
- series='xenial',
- channel='stable',
- )
+ try:
+ # Deploy a single unit of the ubuntu charm, using the latest revision
+ # from the stable channel of the Charm Store.
+ ubuntu_app = await model.deploy(
+ 'ubuntu',
+ application_name='ubuntu',
+ series='xenial',
+ channel='stable',
+ )
- # Disconnect from the api server and cleanup.
- model.disconnect()
+ if '--wait' in sys.argv:
+ # optionally block until the application is ready
+ await model.block_until(lambda: ubuntu_app.status == 'active')
+ finally:
+ # Disconnect from the api server and cleanup.
+ await model.disconnect()
def main():
- # Set logging level to debug so we can see verbose output from the
- # juju library.
- logging.basicConfig(level=logging.DEBUG)
+ logging.basicConfig(level=logging.INFO)
- # Quiet logging from the websocket library. If you want to see
- # everything sent over the wire, set this to DEBUG.
+ # If you want to see everything sent over the wire, set this to DEBUG.
ws_logger = logging.getLogger('websockets.protocol')
ws_logger.setLevel(logging.INFO)
diff --git a/modules/libjuju/docs/requirements.txt b/modules/libjuju/docs/requirements.txt
index 06377bf..dabf3a0 100644
--- a/modules/libjuju/docs/requirements.txt
+++ b/modules/libjuju/docs/requirements.txt
@@ -1,7 +1,5 @@
-websockets
-pyyaml
-theblues
-python-dateutil
-sphinx
+pytz<2018.0,>=2017.2 # conflict between sphinx and macaroonbakery
+pymacaroons>=0.13.0,<1.0 # force new version with pynacl instead of libnacl
+sphinx==1.6.5
sphinxcontrib-asyncio
sphinx_rtd_theme
diff --git a/modules/libjuju/docs/upstream-updates/index.rst b/modules/libjuju/docs/upstream-updates/index.rst
index 52099e6..7082a6e 100644
--- a/modules/libjuju/docs/upstream-updates/index.rst
+++ b/modules/libjuju/docs/upstream-updates/index.rst
@@ -1,5 +1,5 @@
-Upstream Updates
-================
+Syncing Upstream Updates
+========================
Updating the facade and definitions code generated from the schema
to reflect changes in upstream Juju consists of two steps: