You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/customization/custom-scripts.md
+17-1Lines changed: 17 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -240,7 +240,7 @@ An IPv4 or IPv6 network with a mask. Returns a `netaddr.IPNetwork` object. Two a
240
240
!!! note
241
241
To run a custom script, a user must be assigned the `extras.run_script` permission. This is achieved by assigning the user (or group) a permission on the Script object and specifying the `run` action in the admin UI as shown below.
242
242
243
-

243
+

The required ``<module>.<script>`` argument is the script to run where ``<module>`` is the name of the python file in the ``scripts`` directory without the ``.py`` extension and ``<script>`` is the name of the script class in the ``<module>`` to run.
271
+
272
+
The optional ``--data "<data>"`` argument is the data to send to the script
273
+
274
+
The optional ``--loglevel`` argument is the desired logging level to output to the console.
275
+
276
+
The optional ``--commit`` argument will commit any changes in the script to the database.
277
+
262
278
## Example
263
279
264
280
Below is an example script that creates new objects for a planned site. The user is prompted for three variables:
Copy file name to clipboardExpand all lines: docs/release-notes/version-3.0.md
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,28 @@
1
1
# NetBox v3.0
2
2
3
+
## v3.0.9 (2021-11-03)
4
+
5
+
### Enhancements
6
+
7
+
*[#6529](https://github.com/netbox-community/netbox/issues/6529) - Introduce the `runscript` management command
8
+
*[#6930](https://github.com/netbox-community/netbox/issues/6930) - Add an optional "ID" column to all tables
9
+
*[#7668](https://github.com/netbox-community/netbox/issues/7668) - Add "view elevations" button to location view
10
+
11
+
### Bug Fixes
12
+
13
+
*[#7599](https://github.com/netbox-community/netbox/issues/7599) - Improve color mode preference handling
14
+
*[#7601](https://github.com/netbox-community/netbox/issues/7601) - Correct devices count for locations within global search results
15
+
*[#7612](https://github.com/netbox-community/netbox/issues/7612) - Strip HTML from custom field descriptions
16
+
*[#7628](https://github.com/netbox-community/netbox/issues/7628) - Fix `load_yaml` method for custom scripts
17
+
*[#7643](https://github.com/netbox-community/netbox/issues/7643) - Fix circuit assignment when creating multiple terminations simultaneously
18
+
*[#7644](https://github.com/netbox-community/netbox/issues/7644) - Prevent inadvertent deletion of prior change records when deleting objects (#7333 revisited)
19
+
*[#7647](https://github.com/netbox-community/netbox/issues/7647) - Require interface assignment when designating IP address as primary for device/VM during CSV import
20
+
*[#7664](https://github.com/netbox-community/netbox/issues/7664) - Preserve initial form data when bulk edit validation fails
21
+
*[#7717](https://github.com/netbox-community/netbox/issues/7717) - Restore missing tags column on IP range table
22
+
*[#7721](https://github.com/netbox-community/netbox/issues/7721) - Retain pagination preference when `MAX_PAGE_SIZE` is zero
0 commit comments