From 7e1577676af755dc93782a3818a858d08290c972 Mon Sep 17 00:00:00 2001 From: Ti Chiapuzio-Wong <16353697+tchiapuziowong@users.noreply.github.com> Date: Tue, 14 Mar 2023 13:57:48 -0700 Subject: [PATCH] fix doc and examples for issue#51 - the example in .md for aoscx_upload_config is incorrect and the wording is incorrect for some parameters - the wording and example needs to be modified for clarity in aoscx_upload_config.py (cherry picked from commit 07f7e7eb08527d32d7a4f3234d93cd500b7a189c) --- docs/aoscx_upload_config.md | 22 +++++++++++----------- plugins/modules/aoscx_upload_config.py | 6 +++--- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/aoscx_upload_config.md b/docs/aoscx_upload_config.md index 4304d17..26f5563 100644 --- a/docs/aoscx_upload_config.md +++ b/docs/aoscx_upload_config.md @@ -7,26 +7,26 @@ or it can also upload the configuration from a TFTP server. ```YAML config_name: - description: "Config file or checkpoint to be uploaded to. When using TFTP - only running-config or startup-config can be used" + description: > + Switch config file to be uploaded to, only running-config or startup-config can be used type: str default: 'running-config' required: false config_json: - description: "JSON file name and path for locally uploading configuration, - only JSON version of configuration can be uploaded" + description: > + JSON file name and path for locally uploading configuration, only JSON version of configuration can be uploaded type: str required: false config_file: - description: "File name and path for locally uploading configuration, - will be converted to JSON, - only JSON version of configuration can be uploaded" + description: > + File name and path of JSON formatted config for locally + uploading configuration, will be converted to JSON, CLI NOT SUPPORTED type: str required: false remote_config_file_tftp_path: - description: "TFTP server address and path for uploading configuration, - can be JSON or CLI format, must be reachable through provided vrf - ex) tftp://192.168.1.2/config.txt" + description: > + TFTP server address and path for uploading configuration, + can be JSON or CLI format, must be reachable through provided vrf ex) tftp://192.168.1.2/config.txt type: str required: false vrf: @@ -43,7 +43,7 @@ or it can also upload the configuration from a TFTP server. - name: Copy Running Config from local JSON file as JSON aoscx_upload_config: config_name: 'running-config' - remote_config_file_tftp_path: '/user/admin/running.json' + config_file: '/user/admin/running.json' - name: Copy Running Config from TFTP server as JSON aoscx_upload_config: diff --git a/plugins/modules/aoscx_upload_config.py b/plugins/modules/aoscx_upload_config.py index f065eb9..e3cd032 100644 --- a/plugins/modules/aoscx_upload_config.py +++ b/plugins/modules/aoscx_upload_config.py @@ -27,8 +27,8 @@ options: config_name: description: > - Config file or checkpoint to be uploaded to. When using TFTP only - running-config or startup-config can be used. + Switch config file to be uploaded to, only running-config or + startup-config can be used type: str default: 'running-config' required: false @@ -62,7 +62,7 @@ - name: Copy Running Config from local JSON file as JSON aoscx_upload_config: config_name: 'running-config' - config_json: '/user/admin/running.json' + config_file: '/user/admin/running.json' - name: Copy Running Config from TFTP server as JSON aoscx_upload_config: