Skip to content

Commit

Permalink
fix: many small corrections in docs
Browse files Browse the repository at this point in the history
Thanks @dimaqq

Co-authored-by: Dima Tisnek <[email protected]>
  • Loading branch information
james-garner-canonical and dimaqq authored Dec 19, 2024
1 parent 6947cf0 commit 705522e
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 13 deletions.
4 changes: 2 additions & 2 deletions docs/howto/manage-applications.rst
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,14 @@ Manage constraints for an application

.. code:: python
await my_model.deploy(..., constraints={, 'arch': 'amd64', 'mem': 256}, ...)
await my_model.deploy(..., constraints={'arch': 'amd64', 'mem': 256}, ...)
* To set constraints post deployment, you may use the `Application.set_contraints()` method, similar to passing constraints in the deploy call above:

.. code:: python
await my_app.set_constraints(constraints={, 'arch': 'amd64', 'mem': 256})
await my_app.set_constraints(constraints={'arch': 'amd64', 'mem': 256})
**Get values.** To see what constraints are set on an application, use the `Application.get_constraints()` method:
Expand Down
2 changes: 1 addition & 1 deletion docs/howto/manage-credentials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ To update a credential, on a connected `Controller` object, use the `Controller.
from juju.client import client as jujuclient
my_controller.add_credential("my-credential",
jujuclient.CloudCredential(auth_type="jsonfile", attrs={'file':'path_to_cred_file'})
jujuclient.CloudCredential(auth_type="jsonfile", attrs={'file':'path_to_cred_file'}))
> See more: `add_credential (method) <https://pythonlibjuju.readthedocs.io/en/latest/api/juju.controller.html#juju.controller.Controller.add_credential>`_
4 changes: 2 additions & 2 deletions docs/howto/manage-secret-backends.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ To add a secret backend to a controller, on a connected Controller, use the `add
await my_controller.add_secret_backends("1001", "myvault", "vault", {"endpoint": vault_url, "token": keys["root_token"]})
> See more: `add_secret_backend() <https://pythonlibjuju.readthedocs.io/en/latest/api/juju.controller.html#juju.controller.Controller.add_secret_backends>`_, `Controller (module) <https://pythonlibjuju.readthedocs.io/en/latest/narrative/controller.html>`_
> See more: `add_secret_backends() <https://pythonlibjuju.readthedocs.io/en/latest/api/juju.controller.html#juju.controller.Controller.add_secret_backends>`_, `Controller (module) <https://pythonlibjuju.readthedocs.io/en/latest/narrative/controller.html>`_


View all the secret backends available on a controller
Expand Down Expand Up @@ -46,7 +46,7 @@ To update a secret backend on the controller, on a connected Controller, use the
Check out the documentation for the full list of arguments.

> See more: `update_secret_backend() <https://pythonlibjuju.readthedocs.io/en/latest/api/juju.controller.html#juju.controller.Controller.update_secret_backends>`_, `Controller (module) <https://pythonlibjuju.readthedocs.io/en/latest/narrative/controller.html>`_
> See more: `update_secret_backends() <https://pythonlibjuju.readthedocs.io/en/latest/api/juju.controller.html#juju.controller.Controller.update_secret_backends>`_, `Controller (module) <https://pythonlibjuju.readthedocs.io/en/latest/narrative/controller.html>`_

Remove a secret backend
-----------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/howto/manage-ssh-keys.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ To add a public `ssh` key to a model, on a connected Model object, use the `add_
await my_model.add_ssh_key('admin', SSH_KEY)
> See more: `add_ssh_key() `https://pythonlibjuju.readthedocs.io/en/latest/api/juju.model.html#juju.model.Model.add_ssh_key>`_, `Model (module) <https://pythonlibjuju.readthedocs.io/en/latest/narrative/model.html>`_
> See more: `add_ssh_key() https://pythonlibjuju.readthedocs.io/en/latest/api/juju.model.html#juju.model.Model.add_ssh_key>`_, `Model (module) <https://pythonlibjuju.readthedocs.io/en/latest/narrative/model.html>`_


View the available SSH keys
Expand Down
2 changes: 1 addition & 1 deletion docs/howto/manage-storage-pools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ To update an existing storage pool attributes, on a connected Model object, use
await my_model.update_storage_pool(
"operator-storage",
attributes={"volume-type":"provisioned-iops", "iops"="40"})
attributes={"volume-type": "provisioned-iops", "iops": "40"})
> See more: `update_storage_pool() <https://pythonlibjuju.readthedocs.io/en/latest/api/juju.model.html#juju.model.Model.update_storage_pool>`_, `Model (module) <https://pythonlibjuju.readthedocs.io/en/latest/narrative/model.html>`_

Expand Down
3 changes: 1 addition & 2 deletions docs/howto/manage-storage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ To detach a storage instance from a unit, on a Unit object, use the `detach_stor
await my_unit.detach_storage("osd-devices/2")
> See more: `detach_storage() <https://pythonlibjuju.readthedocs.io/en/latest/api/juju.unit.html#juju.unit.Unit.detach_storage>`_, `Unit (module) <https://pythonlibjuju.readthedocs.io/en/latest/narrative/unit.html)>`_
> See more: `detach_storage() <https://pythonlibjuju.readthedocs.io/en/latest/api/juju.unit.html#juju.unit.Unit.detach_storage>`_, `Unit (module) <https://pythonlibjuju.readthedocs.io/en/latest/narrative/unit.html>`_


Attach storage
Expand Down
6 changes: 3 additions & 3 deletions docs/howto/manage-units.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ If you're on an IAAS system (machine applications):
Show details about a unit
-------------------------

Too see details about a unit in `python-libjuju` client, you can use various fields and methods of a `Unit` object. For example, to get the `public_address` of a unit:
To see details about a unit in `python-libjuju` client, you can use various fields and methods of a `Unit` object. For example, to get the `public_address` of a unit:

.. code:: python
Expand Down Expand Up @@ -81,9 +81,9 @@ To mark unit errors as resolved in the `python-libjuju` client, you can call the

.. code:: python
my_unit.resolved()
await my_unit.resolved()
> See more: `Unit.resolved()`
> See more: `Unit.resolved() https://pythonlibjuju.readthedocs.io/en/latest/api/juju.unit.html#juju.unit.Unit.resolved`_


Remove a unit
Expand Down
2 changes: 1 addition & 1 deletion docs/howto/manage-users.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ To enable or disable a user, on a User object, use the `enable()` and `disable()
await user_object.disable()
You can also check if a user is enabled or disabled using the `enabled` and `disabled` properties on the Unit object.
You can also check if a user is enabled or disabled using the `enabled` and `disabled` properties on the User object.

.. code:: python
Expand Down

0 comments on commit 705522e

Please sign in to comment.