diff options
Diffstat (limited to 'docs/automation')
-rw-r--r-- | docs/automation/cloud-init.rst | 7 | ||||
-rw-r--r-- | docs/automation/command-scripting.rst | 8 | ||||
-rw-r--r-- | docs/automation/vyos-api.rst | 18 |
3 files changed, 26 insertions, 7 deletions
diff --git a/docs/automation/cloud-init.rst b/docs/automation/cloud-init.rst index 7d0cc036..2fa102b1 100644 --- a/docs/automation/cloud-init.rst +++ b/docs/automation/cloud-init.rst @@ -50,7 +50,7 @@ In VyOS, by default, enables only two modules: * ``write_files`` - this module allows to insert any files into the filesystem before the first boot, for example, pre-generated encryption keys, - certificates, or even a whole ``config.boot`` file. + certificates, or even a whole ``config.boot`` file. The format is described in the cloudinit documentation `Cloud-init-write_files`_. * ``vyos_userdata`` - the module accepts a list of CLI configuration commands in a ``vyos_config_commands`` section, which gives an easy way to configure the @@ -267,7 +267,7 @@ Most important keys that needs to be considered: Generate qcow image ------------------- -A VyOS qcow image with cloud-init options is needed. This can be obteined +A VyOS qcow image with cloud-init options is needed. This can be obtained using `vyos-vm-images`_ repo. After clonning the repo, edit the file **qemu.yml** and comment the **download-iso** role. @@ -427,5 +427,6 @@ References .. _vyos-vm-images: https://github.com/vyos/vyos-vm-images .. _cloud-init-docs: https://docs.vyos.io/en/equuleus/automation/cloud-init.html?highlight=cloud-init#vyos-cloud-init .. _Cloud-init-Support: https://pve.proxmox.com/pve-docs/pve-admin-guide.html#qm_cloud_init +.. _Cloud-init-write_files: https://cloudinit.readthedocs.io/en/latest/topics/examples.html#writing-out-arbitrary-files -.. start_vyoslinter
\ No newline at end of file +.. start_vyoslinter diff --git a/docs/automation/command-scripting.rst b/docs/automation/command-scripting.rst index 7cf31232..db4724cd 100644 --- a/docs/automation/command-scripting.rst +++ b/docs/automation/command-scripting.rst @@ -83,10 +83,10 @@ Here is a simple example: .. code-block:: python - #!/usr/bin/env python - print "delete firewall group address-group somehosts" - print "set firewall group address-group somehosts address '192.0.2.3'" - print "set firewall group address-group somehosts address '203.0.113.55'" + #!/usr/bin/env python3 + print("delete firewall group address-group somehosts") + print("set firewall group address-group somehosts address '192.0.2.3'") + print("set firewall group address-group somehosts address '203.0.113.55'") .. code-block:: none diff --git a/docs/automation/vyos-api.rst b/docs/automation/vyos-api.rst index 8bc33d53..0cebb292 100644 --- a/docs/automation/vyos-api.rst +++ b/docs/automation/vyos-api.rst @@ -125,6 +125,24 @@ For example, get the addresses of a ``dum0`` interface. "error": null } +/reset +====== + +The ``reset`` endpoint run a ``reset`` command. + +.. code-block:: none + + curl --location --request POST 'https://vyos/reset' \ + --form data='{"op": "reset", "path": ["ip", "bgp", "192.0.2.11"]}' \ + --form key='MY-HTTPS-API-PLAINTEXT-KEY' + + respone: + { + "success": true, + "data": "", + "error": null + } + /image ====== |