From 0adece20c68949c514f62447fe57f160519c573e Mon Sep 17 00:00:00 2001 From: Sylvain Mougenot Date: Fri, 27 May 2022 12:03:13 +0200 Subject: add link to write_files format documentation Hope it can help others --- docs/automation/cloud-init.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'docs/automation') diff --git a/docs/automation/cloud-init.rst b/docs/automation/cloud-init.rst index 7d0cc036..ccfb6275 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 @@ -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 -- cgit v1.2.3 From a7fab19a17d6a412c50b4df66faa5d66b85f8d08 Mon Sep 17 00:00:00 2001 From: Viacheslav Hletenko Date: Mon, 30 May 2022 12:20:44 +0300 Subject: http-api: Add action reset and socket description --- docs/automation/vyos-api.rst | 18 ++++++++++++++++++ docs/configuration/service/https.rst | 4 ++++ 2 files changed, 22 insertions(+) (limited to 'docs/automation') 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 ====== diff --git a/docs/configuration/service/https.rst b/docs/configuration/service/https.rst index 22533db5..4ff777e9 100644 --- a/docs/configuration/service/https.rst +++ b/docs/configuration/service/https.rst @@ -28,6 +28,10 @@ Configuration Set the listen port of the local API, this has no effect on the webserver. The default is port 8080 +.. cfgcmd:: set service https api socket + + Use local socket for API + .. cfgcmd:: set service https api strict Enforce strict path checking -- cgit v1.2.3 From abac6af980f9aac22eee797e7d081f0a3d06512f Mon Sep 17 00:00:00 2001 From: zlibd <52056480+zlibd@users.noreply.github.com> Date: Wed, 29 Jun 2022 05:12:37 -0400 Subject: Fixed typo --- docs/automation/cloud-init.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/automation') diff --git a/docs/automation/cloud-init.rst b/docs/automation/cloud-init.rst index ccfb6275..2fa102b1 100644 --- a/docs/automation/cloud-init.rst +++ b/docs/automation/cloud-init.rst @@ -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. -- cgit v1.2.3 From 9e5bbd134120b9a5436665124326ddb2d5aa5f87 Mon Sep 17 00:00:00 2001 From: zlibd <52056480+zlibd@users.noreply.github.com> Date: Wed, 29 Jun 2022 05:24:01 -0400 Subject: Updated syntax to python3 --- docs/automation/command-scripting.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/automation') 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 -- cgit v1.2.3