Addressed PR comment.

This commit is contained in:
Julio-Oliveira-Encora 2024-06-10 10:41:47 -03:00
parent 4fa0c6d4ee
commit cfc87a7056
2 changed files with 10 additions and 1 deletions

View File

@ -139,7 +139,7 @@ These two methods will load data in YAML or JSON format, respectively, from file
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:
* `log_debug(message, object=None)` * `log_debug(message, object=None)`
* `log_success(message, object=None)` * `log_success(message=None, object=None)`
* `log_info(message, object=None)` * `log_info(message, object=None)`
* `log_warning(message, object=None)` * `log_warning(message, object=None)`
* `log_failure(message, object=None)` * `log_failure(message, object=None)`

View File

@ -54,6 +54,15 @@ self.log_failure(
) )
``` ```
### Logging Success Note
If you want to increase the success counter without generating a log message, choose one of the following options:
```python
log_success(None, None)
log_success("", None)
log_sucess()
```
### Other Notes ### Other Notes
Existing reports will be converted to scripts automatically upon upgrading to NetBox v4.0, and previous job history will be retained. However, users are advised to convert legacy reports into custom scripts at the earliest opportunity, as support for legacy reports will be removed in a future release. Existing reports will be converted to scripts automatically upon upgrading to NetBox v4.0, and previous job history will be retained. However, users are advised to convert legacy reports into custom scripts at the earliest opportunity, as support for legacy reports will be removed in a future release.