I was looking to get started with python-libjuju, mostly to help a customer with their python-libjuju issues.
I have been out of python for a number of years, so all the async stuff is new for me.
One of the things that had been asked for was how to deal with facades for elements supported in the API but not yet supported in python-libjuju.
In particular two parts were asked about:
- juju trust
I thought it would be fun to start with a first hack at getting the annotations out for an application.
First I needed an application that had some annotations. Bundles allow setting them, so quickly created a simple bundle and deployed it.
applications: ubuntu: charm: cs:~jameinel/ubuntu-lite num_units: 1 annotations: foo: bar
Next was a bunch of messing around with python and libraries.
pip3 install juju to get the juju library. If there is a better way, we should document it somewhere.
From there I created a file called
juju-annotation so I could use
juju annotation to run it.
Put it up on github: https://github.com/howbazaar/juju-annotations
My next TODOs are:
- support setting annotations
- support machine annotations
- support unit annotations
- support model annotations
I would also like to get better annotation support into the native python-libjuju objects too.