Repetition of optional variables in custom scripts

Merge the repeated sentences to the second instance.
This commit is contained in:
bluikko 2021-06-23 11:32:51 +07:00 committed by GitHub
parent 742804ecb8
commit 340424c177
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,7 +19,7 @@ class MyScript(Script):
... ...
``` ```
Scripts comprise two core components: a set of variables and a `run()` method. Variables allow your script to accept user input via the NetBox UI, but they are optional: If your script does not require any user input, there is no need to define any variables. Scripts comprise two core components: a set of variables and a `run()` method.
The `run()` method is where your script's execution logic lives. (Note that your script can have as many methods as needed: this is merely the point of invocation for NetBox.) The `run()` method is where your script's execution logic lives. (Note that your script can have as many methods as needed: this is merely the point of invocation for NetBox.)
@ -41,7 +41,7 @@ The `run()` method should accept two arguments:
!!! note !!! note
The `commit` argument was introduced in NetBox v2.7.8. Backward compatibility is maintained for scripts which accept only the `data` argument, however beginning with v2.10 NetBox will require the `run()` method of every script to accept both arguments. (Either argument may still be ignored within the method.) The `commit` argument was introduced in NetBox v2.7.8. Backward compatibility is maintained for scripts which accept only the `data` argument, however beginning with v2.10 NetBox will require the `run()` method of every script to accept both arguments. (Either argument may still be ignored within the method.)
Defining script variables is optional: You may create a script with only a `run()` method if no user input is needed. Variables allow your script to accept user input via the NetBox UI, but they are optional: If your script does not require any user input, there is no need to define any variables and you may create a script with only a `run()` method.
Any output generated by the script during its execution will be displayed under the "output" tab in the UI. Any output generated by the script during its execution will be displayed under the "output" tab in the UI.