From 705522e6336164b4cc9434355720457c1fddd171 Mon Sep 17 00:00:00 2001 From: James Garner Date: Fri, 20 Dec 2024 10:26:24 +1300 Subject: [PATCH] fix: many small corrections in docs Thanks @dimaqq Co-authored-by: Dima Tisnek --- docs/howto/manage-applications.rst | 4 ++-- docs/howto/manage-credentials.rst | 2 +- docs/howto/manage-secret-backends.rst | 4 ++-- docs/howto/manage-ssh-keys.rst | 2 +- docs/howto/manage-storage-pools.rst | 2 +- docs/howto/manage-storage.rst | 3 +-- docs/howto/manage-units.rst | 6 +++--- docs/howto/manage-users.rst | 2 +- 8 files changed, 12 insertions(+), 13 deletions(-) diff --git a/docs/howto/manage-applications.rst b/docs/howto/manage-applications.rst index 11aab74d..91e0b58c 100644 --- a/docs/howto/manage-applications.rst +++ b/docs/howto/manage-applications.rst @@ -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: diff --git a/docs/howto/manage-credentials.rst b/docs/howto/manage-credentials.rst index 1ebe2493..2e908bbf 100644 --- a/docs/howto/manage-credentials.rst +++ b/docs/howto/manage-credentials.rst @@ -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) `_ diff --git a/docs/howto/manage-secret-backends.rst b/docs/howto/manage-secret-backends.rst index bb4e28d8..5eeba1ce 100644 --- a/docs/howto/manage-secret-backends.rst +++ b/docs/howto/manage-secret-backends.rst @@ -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() `_, `Controller (module) `_ +> See more: `add_secret_backends() `_, `Controller (module) `_ View all the secret backends available on a controller @@ -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() `_, `Controller (module) `_ +> See more: `update_secret_backends() `_, `Controller (module) `_ Remove a secret backend ----------------------- diff --git a/docs/howto/manage-ssh-keys.rst b/docs/howto/manage-ssh-keys.rst index df42df5a..d4cc2352 100644 --- a/docs/howto/manage-ssh-keys.rst +++ b/docs/howto/manage-ssh-keys.rst @@ -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) `_ +> See more: `add_ssh_key() https://pythonlibjuju.readthedocs.io/en/latest/api/juju.model.html#juju.model.Model.add_ssh_key>`_, `Model (module) `_ View the available SSH keys diff --git a/docs/howto/manage-storage-pools.rst b/docs/howto/manage-storage-pools.rst index ce5db748..826e3c61 100644 --- a/docs/howto/manage-storage-pools.rst +++ b/docs/howto/manage-storage-pools.rst @@ -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() `_, `Model (module) `_ diff --git a/docs/howto/manage-storage.rst b/docs/howto/manage-storage.rst index 77495582..f5385b76 100644 --- a/docs/howto/manage-storage.rst +++ b/docs/howto/manage-storage.rst @@ -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() `_, `Unit (module) `_ +> See more: `detach_storage() `_, `Unit (module) `_ Attach storage diff --git a/docs/howto/manage-units.rst b/docs/howto/manage-units.rst index c37bb492..c1db85df 100644 --- a/docs/howto/manage-units.rst +++ b/docs/howto/manage-units.rst @@ -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 @@ -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 diff --git a/docs/howto/manage-users.rst b/docs/howto/manage-users.rst index 1d4a1316..d7dfc360 100644 --- a/docs/howto/manage-users.rst +++ b/docs/howto/manage-users.rst @@ -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