mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-24 17:38:37 -06:00
Docs updates
This commit is contained in:
parent
cb0dbc0769
commit
305d330391
@ -63,6 +63,15 @@ The order in which the variable fields should appear. This is optional, however
|
|||||||
fields = ['var1', 'var2', 'var3']
|
fields = ['var1', 'var2', 'var3']
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Reading Data from Files
|
||||||
|
|
||||||
|
The Script class provides two convenience methods for reading data from files:
|
||||||
|
|
||||||
|
* `load_yaml`
|
||||||
|
* `load_json`
|
||||||
|
|
||||||
|
These two methods will load data in YAML or JSON format, respectively, from files within the local path (i.e. `SCRIPTS_ROOT`).
|
||||||
|
|
||||||
## Logging
|
## Logging
|
||||||
|
|
||||||
The Script object provides a set of convenient functions for recording messages at different severity levels:
|
The Script object provides a set of convenient functions for recording messages at different severity levels:
|
||||||
@ -73,7 +82,7 @@ The Script object provides a set of convenient functions for recording messages
|
|||||||
* `log_warning`
|
* `log_warning`
|
||||||
* `log_failure`
|
* `log_failure`
|
||||||
|
|
||||||
Log messages are returned to the user upon execution of the script.
|
Log messages are returned to the user upon execution of the script. Markdown rendering is supported for log messages.
|
||||||
|
|
||||||
## Variable Reference
|
## Variable Reference
|
||||||
|
|
||||||
@ -87,6 +96,10 @@ Stores a string of characters (i.e. a line of text). Options include:
|
|||||||
|
|
||||||
Note: `min_length` and `max_length` can be set to the same number to effect a fixed-length field.
|
Note: `min_length` and `max_length` can be set to the same number to effect a fixed-length field.
|
||||||
|
|
||||||
|
### TextVar
|
||||||
|
|
||||||
|
Arbitrary text of any length. Renders as multi-line text input field.
|
||||||
|
|
||||||
### IntegerVar
|
### IntegerVar
|
||||||
|
|
||||||
Stored a numeric integer. Options include:
|
Stored a numeric integer. Options include:
|
||||||
|
Loading…
Reference in New Issue
Block a user