Skip to content

Commit f5356b8

Browse files
Merge pull request #7730 from netbox-community/develop
Release v3.0.9
2 parents 2c161c0 + 1bf100b commit f5356b8

File tree

37 files changed

+493
-168
lines changed

37 files changed

+493
-168
lines changed

.github/ISSUE_TEMPLATE/bug_report.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ body:
1717
What version of NetBox are you currently running? (If you don't have access to the most
1818
recent NetBox release, consider testing on our [demo instance](https://demo.netbox.dev/)
1919
before opening a bug report to see if your issue has already been addressed.)
20-
placeholder: v3.0.8
20+
placeholder: v3.0.9
2121
validations:
2222
required: true
2323
- type: dropdown

.github/ISSUE_TEMPLATE/feature_request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ body:
1414
attributes:
1515
label: NetBox version
1616
description: What version of NetBox are you currently running?
17-
placeholder: v3.0.8
17+
placeholder: v3.0.9
1818
validations:
1919
required: true
2020
- type: dropdown

docs/core-functionality/power.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55

66
# Example Power Topology
77

8-
![Power distribution model](/media/power_distribution.png)
8+
![Power distribution model](../media/power_distribution.png)

docs/customization/custom-scripts.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ An IPv4 or IPv6 network with a mask. Returns a `netaddr.IPNetwork` object. Two a
240240
!!! note
241241
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.
242242

243-
![Adding the run action to a permission](/media/admin_ui_run_permission.png)
243+
![Adding the run action to a permission](../media/admin_ui_run_permission.png)
244244

245245
### Via the Web UI
246246

@@ -259,6 +259,22 @@ http://netbox/api/extras/scripts/example.MyReport/ \
259259
--data '{"data": {"foo": "somevalue", "bar": 123}, "commit": true}'
260260
```
261261

262+
### Via the CLI
263+
264+
Scripts can be run on the CLI by invoking the management command:
265+
266+
```
267+
python3 manage.py runscript [--commit] [--loglevel {debug,info,warning,error,critical}] [--data "<data>"] <module>.<script>
268+
```
269+
270+
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+
262278
## Example
263279

264280
Below is an example script that creates new objects for a planned site. The user is prompted for three variables:

docs/models/dcim/cable.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ A cable may be traced from either of its endpoints by clicking the "trace" butto
2525

2626
In the example below, three individual cables comprise a path between devices A and D:
2727

28-
![Cable path](/media/models/dcim_cable_trace.png)
28+
![Cable path](../media/models/dcim_cable_trace.png)
2929

3030
Traced from Interface 1 on Device A, NetBox will show the following path:
3131

docs/release-notes/version-3.0.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
# NetBox v3.0
22

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
23+
24+
---
25+
326
## v3.0.8 (2021-10-20)
427

528
### Enhancements

netbox/circuits/signals.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ def update_circuit(instance, **kwargs):
1111
When a CircuitTermination has been modified, update its parent Circuit.
1212
"""
1313
termination_name = f'termination_{instance.term_side.lower()}'
14+
instance.circuit.refresh_from_db()
1415
setattr(instance.circuit, termination_name, instance)
1516
instance.circuit.save()
1617

netbox/circuits/tables.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ class ProviderTable(BaseTable):
4444
class Meta(BaseTable.Meta):
4545
model = Provider
4646
fields = (
47-
'pk', 'name', 'asn', 'account', 'portal_url', 'noc_contact', 'admin_contact', 'circuit_count', 'comments',
48-
'tags',
47+
'pk', 'id', 'name', 'asn', 'account', 'portal_url', 'noc_contact', 'admin_contact', 'circuit_count',
48+
'comments', 'tags',
4949
)
5050
default_columns = ('pk', 'name', 'asn', 'account', 'circuit_count')
5151

@@ -69,7 +69,7 @@ class ProviderNetworkTable(BaseTable):
6969

7070
class Meta(BaseTable.Meta):
7171
model = ProviderNetwork
72-
fields = ('pk', 'name', 'provider', 'description', 'comments', 'tags')
72+
fields = ('pk', 'id', 'name', 'provider', 'description', 'comments', 'tags')
7373
default_columns = ('pk', 'name', 'provider', 'description')
7474

7575

@@ -89,7 +89,7 @@ class CircuitTypeTable(BaseTable):
8989

9090
class Meta(BaseTable.Meta):
9191
model = CircuitType
92-
fields = ('pk', 'name', 'circuit_count', 'description', 'slug', 'actions')
92+
fields = ('pk', 'id', 'name', 'circuit_count', 'description', 'slug', 'actions')
9393
default_columns = ('pk', 'name', 'circuit_count', 'description', 'slug', 'actions')
9494

9595

@@ -101,7 +101,7 @@ class CircuitTable(BaseTable):
101101
pk = ToggleColumn()
102102
cid = tables.Column(
103103
linkify=True,
104-
verbose_name='ID'
104+
verbose_name='Circuit ID'
105105
)
106106
provider = tables.Column(
107107
linkify=True
@@ -124,7 +124,7 @@ class CircuitTable(BaseTable):
124124
class Meta(BaseTable.Meta):
125125
model = Circuit
126126
fields = (
127-
'pk', 'cid', 'provider', 'type', 'status', 'tenant', 'termination_a', 'termination_z', 'install_date',
127+
'pk', 'id', 'cid', 'provider', 'type', 'status', 'tenant', 'termination_a', 'termination_z', 'install_date',
128128
'commit_rate', 'description', 'comments', 'tags',
129129
)
130130
default_columns = (

netbox/dcim/tables/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class ConsoleConnectionTable(BaseTable):
4343
class Meta(BaseTable.Meta):
4444
model = ConsolePort
4545
fields = ('device', 'name', 'console_server', 'console_server_port', 'reachable')
46+
exclude = ('id', )
4647

4748

4849
class PowerConnectionTable(BaseTable):
@@ -73,6 +74,7 @@ class PowerConnectionTable(BaseTable):
7374
class Meta(BaseTable.Meta):
7475
model = PowerPort
7576
fields = ('device', 'name', 'pdu', 'outlet', 'reachable')
77+
exclude = ('id', )
7678

7779

7880
class InterfaceConnectionTable(BaseTable):
@@ -106,3 +108,4 @@ class InterfaceConnectionTable(BaseTable):
106108
class Meta(BaseTable.Meta):
107109
model = Interface
108110
fields = ('device_a', 'interface_a', 'device_b', 'interface_b', 'reachable')
111+
exclude = ('id', )

netbox/dcim/tables/cables.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616

1717
class CableTable(BaseTable):
1818
pk = ToggleColumn()
19-
id = tables.Column(
20-
linkify=True,
21-
verbose_name='ID'
22-
)
2319
termination_a_parent = tables.TemplateColumn(
2420
template_code=CABLE_TERMINATION_PARENT,
2521
accessor=Accessor('termination_a'),

0 commit comments

Comments
 (0)