From 35e20d156d5071eeea921bbd19337011e259f713 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 21 Mar 2024 09:05:34 -0400 Subject: [PATCH 01/14] Add link to NetBox Enterprise --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a81e41854..8d2efed23 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ NetBox automatically logs the creation, modification, and deletion of all manage

NetBox Cloud
- Looking for an enterprise solution? Check out NetBox Cloud! + Looking for a managed solution? Check out NetBox Cloud or NetBox Enterprise!

## Get Involved From 6f9f1d9d43a407d57408ad841a86d7946ccb4872 Mon Sep 17 00:00:00 2001 From: Arthur Date: Thu, 14 Mar 2024 13:50:38 -0700 Subject: [PATCH 02/14] 14799 dont cache report member names --- netbox/extras/models/reports.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/extras/models/reports.py b/netbox/extras/models/reports.py index f6228ef24..d28a3aec6 100644 --- a/netbox/extras/models/reports.py +++ b/netbox/extras/models/reports.py @@ -52,7 +52,7 @@ class ReportModule(PythonModuleMixin, JobsMixin, ManagedFile): def __str__(self): return self.python_name - @cached_property + @property def reports(self): def _get_name(cls): From 59e12e73c2964e716be7b7e52cb1e6086c82a805 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Mon, 25 Mar 2024 09:55:21 -0400 Subject: [PATCH 03/14] Clean up GitHub actions --- .github/workflows/{stale.yml => close-stale-issues.yml} | 5 ++--- .github/workflows/{lock.yml => lock-threads.yml} | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) rename .github/workflows/{stale.yml => close-stale-issues.yml} (96%) rename .github/workflows/{lock.yml => lock-threads.yml} (95%) diff --git a/.github/workflows/stale.yml b/.github/workflows/close-stale-issues.yml similarity index 96% rename from .github/workflows/stale.yml rename to .github/workflows/close-stale-issues.yml index 22de146a2..a1bbb0b7e 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/close-stale-issues.yml @@ -1,5 +1,5 @@ # close-stale-issues (https://github.com/marketplace/actions/close-stale-issues) -name: 'Close stale issues/PRs' +name: Close stale issues/PRs on: schedule: @@ -12,10 +12,9 @@ permissions: jobs: stale: - runs-on: ubuntu-latest steps: - - uses: actions/stale@v8 + - uses: actions/stale@v9 with: close-issue-message: > This issue has been automatically closed due to lack of activity. In an diff --git a/.github/workflows/lock.yml b/.github/workflows/lock-threads.yml similarity index 95% rename from .github/workflows/lock.yml rename to .github/workflows/lock-threads.yml index ad3bf5d75..0f3636784 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock-threads.yml @@ -1,5 +1,5 @@ # lock-threads (https://github.com/marketplace/actions/lock-threads) -name: 'Lock threads' +name: Lock threads on: schedule: From 710f9e3c46159c18fbcea8bef39d3a26327a9bdd Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Mon, 25 Mar 2024 09:57:13 -0400 Subject: [PATCH 04/14] Add auto-assign-issue GitHub action --- .github/workflows/auto-assign-issue.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/auto-assign-issue.yml diff --git a/.github/workflows/auto-assign-issue.yml b/.github/workflows/auto-assign-issue.yml new file mode 100644 index 000000000..154f5f0a8 --- /dev/null +++ b/.github/workflows/auto-assign-issue.yml @@ -0,0 +1,20 @@ +# auto-assign-issue (https://github.com/marketplace/actions/auto-assign-issue) +name: Issue assignment + +on: + issues: + types: [opened] + +permissions: + issues: write + +jobs: + auto-assign: + runs-on: ubuntu-latest + steps: + - uses: pozil/auto-assign-issue@v1 + with: + # Some assignees are listed multiple times to effect a weighted rotation + assignees: jeremystretch,jeremystretch,jeremystretch,jeremystretch,arthanson,arthanson,arthanson,arthanson,DanSheps,abhi1693 + numOfAssignee: 1 + abortIfPreviousAssignees: true From d2fee886001e4abbcb1b4d9ed3fd32521c820be9 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Mon, 25 Mar 2024 10:39:17 -0400 Subject: [PATCH 05/14] Apply "needs triage" label to new issues by default --- .github/ISSUE_TEMPLATE/bug_report.yaml | 2 +- .github/ISSUE_TEMPLATE/documentation_change.yaml | 2 +- .github/ISSUE_TEMPLATE/feature_request.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 612d01d89..44c797241 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -1,7 +1,7 @@ --- name: πŸ› Bug Report description: Report a reproducible bug in the current release of NetBox -labels: ["type: bug"] +labels: ["type: bug", "needs triage"] body: - type: markdown attributes: diff --git a/.github/ISSUE_TEMPLATE/documentation_change.yaml b/.github/ISSUE_TEMPLATE/documentation_change.yaml index cb097d579..0f80f1716 100644 --- a/.github/ISSUE_TEMPLATE/documentation_change.yaml +++ b/.github/ISSUE_TEMPLATE/documentation_change.yaml @@ -1,7 +1,7 @@ --- name: πŸ“– Documentation Change description: Suggest an addition or modification to the NetBox documentation -labels: ["type: documentation"] +labels: ["type: documentation", "needs triage"] body: - type: dropdown attributes: diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml index 8eb47180d..a550bff57 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -1,7 +1,7 @@ --- name: ✨ Feature Request description: Propose a new NetBox feature or enhancement -labels: ["type: feature"] +labels: ["type: feature", "needs triage"] body: - type: markdown attributes: From da6a1ef03e9889a116738eb3080ff8cced83c120 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Tue, 26 Mar 2024 16:26:47 -0400 Subject: [PATCH 06/14] Clean up the Markdown reference guide --- docs/reference/markdown.md | 541 +++++++++++++++---------------------- 1 file changed, 221 insertions(+), 320 deletions(-) diff --git a/docs/reference/markdown.md b/docs/reference/markdown.md index 0759fa2ec..cff3f0943 100644 --- a/docs/reference/markdown.md +++ b/docs/reference/markdown.md @@ -1,353 +1,254 @@ ---- -hide: - - toc ---- - # Markdown -NetBox supports markdown rendering for certain text fields. +NetBox supports Markdown rendering for certain text fields. Some common examples are provided below. For a complete Markdown reference, please see [Markdownguide.org](https://www.markdownguide.org/basic-syntax/). -## Syntax - -##### Table of Contents -[Headers](#headers) -[Emphasis](#emphasis) -[Lists](#lists) -[Links](#links) -[Images](#images) -[Code Blocks](#code) -[Tables](#tables) -[Blockquotes](#blockquotes) -[Inline HTML](#html) -[Horizontal Rule](#hr) -[Line Breaks](#lines) - - - -## Headers +## Headings ```no-highlight -# H1 -## H2 -### H3 -#### H4 -##### H5 -###### H6 +# Heading 1 +## Heading 2 +### Heading 3 +#### Heading 4 +##### Heading 5 +###### Heading 6 +``` + +

Heading 1

+

Heading 2

+

Heading 3

+

Heading 4

+
Heading 5
+
Heading 6
Alternatively, for H1 and H2, an underline-ish style: -Alt-H1 -====== +```no-highlight +Heading 1 +========= -Alt-H2 ------- +Heading 2 +--------- ``` -# H1 -## H2 -### H3 -#### H4 -##### H5 -###### H6 +

Heading 1

+

Heading 2

- - -## Emphasis +## Text ```no-highlight -Emphasis, aka italics, with *asterisks* or _underscores_. - -Strong emphasis, aka bold, with **asterisks** or __underscores__. - -Combined emphasis with **asterisks and _underscores_**. - -Strikethrough uses two tildes. ~~Scratch this.~~ +Italicize text with *asterisks* or _underscores_. ``` -Emphasis, aka italics, with *asterisks* or _underscores_. - -Strong emphasis, aka bold, with **asterisks** or __underscores__. - -Combined emphasis with **asterisks and _underscores_**. - -Strikethrough uses two tildes. ~~Scratch this.~~ - - - - -## Lists - -(In this example, leading and trailing spaces are shown with with dots: β‹…) +Italicize text with *asterisks* or _underscores_. ```no-highlight -1. First ordered list item -2. Another item -β‹…β‹…* Unordered sub-list. -1. Actual numbers don't matter, just that it's a number -β‹…β‹…1. Ordered sub-list -4. And another item. - -β‹…β‹…β‹…You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we'll use three here to also align the raw Markdown). - -β‹…β‹…β‹…To have a line break without a paragraph, you will need to use two trailing spaces.β‹…β‹… -β‹…β‹…β‹…Note that this line is separate, but within the same paragraph.β‹…β‹… -β‹…β‹…β‹…(This is contrary to the typical GFM line break behaviour, where trailing spaces are not required.) - -* Unordered list can use asterisks -- Or minuses -+ Or pluses +Bold text with two **asterisks** or __underscores__. ``` -1. First ordered list item -2. Another item - * Unordered sub-list. -1. Actual numbers don't matter, just that it's a number - 1. Ordered sub-list -4. And another item. - - You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we'll use three here to also align the raw Markdown). - - To have a line break without a paragraph, you will need to use two trailing spaces. - Note that this line is separate, but within the same paragraph. - (This is contrary to the typical GFM line break behaviour, where trailing spaces are not required.) - -* Unordered list can use asterisks -- Or minuses -+ Or pluses - - - -## Links - -There are two ways to create links. +Bold text with two **asterisks** or __underscores__. ```no-highlight -[I'm an inline-style link](https://www.google.com) - -[I'm an inline-style link with title](https://www.google.com "Google's Homepage") - -[I'm a reference-style link][Arbitrary case-insensitive reference text] - -[You can use numbers for reference-style link definitions][1] - -Or leave it empty and use the [link text itself]. - -URLs and URLs in angle brackets will automatically get turned into links. -http://www.example.com or and sometimes -example.com (but not on Github, for example). - -Some text to show that the reference links can follow later. - -[arbitrary case-insensitive reference text]: https://www.mozilla.org -[1]: http://slashdot.org -[link text itself]: http://www.reddit.com +Strike text with two tildes. ~~Deleted text.~~ ``` -[I'm an inline-style link](https://www.google.com) - -[I'm an inline-style link with title](https://www.google.com "Google's Homepage") - -[I'm a reference-style link][Arbitrary case-insensitive reference text] - -[You can use numbers for reference-style link definitions][1] - -Or leave it empty and use the [link text itself]. - -URLs and URLs in angle brackets will automatically get turned into links. -http://www.example.com or and sometimes -example.com (but not on Github, for example). - -Some text to show that the reference links can follow later. - -[arbitrary case-insensitive reference text]: https://www.mozilla.org -[1]: http://slashdot.org -[link text itself]: http://www.reddit.com - - - -## Images - -``` -Here's the NetBox logo (hover to see the title text): - -Inline-style: -![alt text](/media/misc/netbox_logo.png "Logo Title Text 1") - -Reference-style: -![alt text][logo] - -[logo]: /media/misc/netbox_logo.png "Logo Title Text 2" -``` - -Here's the NetBox logo (hover to see the title text): - -Inline-style: -![alt text](../media/misc/netbox_logo.png "Logo Title Text 1") - -Reference-style: -![alt text][logo] - -[logo]: ../media/misc/netbox_logo.png "Logo Title Text 2" - - - -## Code blocks - -``` -Inline `code` has `back-ticks around` it. -``` - -Inline `code` has `back-ticks around` it. - -Blocks of code are fenced by lines with three back-ticks ``` - -```` -``` -var s = "Code block"; -alert(s); -``` -```` - -``` -var s = "Code block"; -alert(s); -``` - - - -## Tables - -```no-highlight -Colons can be used to align columns. - -| Tables | Are | Cool | -| ------------- |:-------------:| -----:| -| col 3 is | right-aligned | $1600 | -| col 2 is | centered | $12 | -| zebra stripes | are neat | $1 | - -There must be at least 3 dashes separating each header cell. -The outer pipes (|) are optional, and you don't need to make the -raw Markdown line up prettily. You can also use inline Markdown. - -Markdown | Less | Pretty ---- | --- | --- -*Still* | `renders` | **nicely** -1 | 2 | 3 -``` - -Colons can be used to align columns. - -| Tables | Are | Cool | -| ------------- |:-------------:| -----:| -| col 3 is | right-aligned | $1600 | -| col 2 is | centered | $12 | -| zebra stripes | are neat | $1 | - -There must be at least 3 dashes separating each header cell. The outer pipes (|) are optional, and you don't need to make the raw Markdown line up prettily. You can also use inline Markdown. - -Markdown | Less | Pretty ---- | --- | --- -*Still* | `renders` | **nicely** -1 | 2 | 3 - - - -## Blockquotes - -```no-highlight -> Blockquotes are very handy in email to emulate reply text. -> This line is part of the same quote. - -Quote break. - -> This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can *put* **Markdown** into a blockquote. -``` - -> Blockquotes are very handy in email to emulate reply text. -> This line is part of the same quote. - -Quote break. - -> This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can *put* **Markdown** into a blockquote. - - - -## Inline HTML - -You can also use raw HTML in your Markdown, and it'll mostly work pretty well. - -```no-highlight -
-
Definition list
-
Is something people use sometimes.
- -
Markdown in HTML
-
Does *not* work **very** well. Use HTML tags.
-
-``` - -
-
Definition list
-
Is something people use sometimes.
- -
Markdown in HTML
-
Does *not* work **very** well. Use HTML tags.
-
- - - -## Horizontal Rule - -``` -Three or more... - ---- - -Hyphens - -*** - -Asterisks - -___ - -Underscores -``` - -Three or more... - ---- - -Hyphens - -*** - -Asterisks - -___ - -Underscores - - +Strike text with two tildes. ~~Deleted text.~~ ## Line Breaks +By default, Markdown will remove line breaks between successive lines of text. For example: -``` -Here's a line for us to start with. - -This line is separated from the one above by two newlines, so it will be a *separate paragraph*. - -This line is also a separate paragraph, but... -This line is only separated by a single newline, so it's a separate line in the *same paragraph*. +```no-highlight +This is one line. +And this is another line. +One more line here. ``` -Here's a line for us to start with. +This is one line. +And this is another line. +One more line here. -This line is separated from the one above by two newlines, so it will be a *separate paragraph*. +To preserve line breaks, append two spaces to each line (represented below with the `β‹…` character). -This line is also begins a separate paragraph, but... -This line is only separated by a single newline, so it's a separate line in the *same paragraph*. +```no-highlight +This is one line.β‹…β‹… +And this is another line.β‹…β‹… +One more line here. +``` -Based on [Markdown-Cheatsheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) by [adam-p](https://github.com/adam-p) licensed under [CC-BY](https://creativecommons.org/licenses/by/3.0/) \ No newline at end of file +This is one line. +And this is another line. +One more line here. + +## Lists + +Use asterisks or hyphens for unordered lists. Indent items by four spaces to start a child list. + +```no-highlight +* Alpha +* Bravo +* Charlie + * Child item 1 + * Child item 2 +* Delta +``` + +* Alpha +* Bravo +* Charlie + * Child item 1 + * Child item 2 +* Delta + +Use digits followed by periods for ordered (numbered) lists. + +```no-highlight +1. Red +2. Green +3. Blue + 1. Light blue + 2. Dark blue +4. Orange +``` + +1. Red +2. Green +3. Blue + 1. Light blue + 2. Dark blue +4. Orange + +## Links + +Text can be rendered as a hyperlink by encasing it in square brackets, followed by a URL in parentheses. A title (text displayed on hover) may optionally be included as well. + +```no-highlight +Here's an [example](https://www.example.com) of a link. + +And here's [another link](https://www.example.com "Click me!"), this time with a title. +``` + +Here's an [example](https://www.example.com) of a link. + +And here's [another link](https://www.example.com "Click me!"), with a title. + +## Images + +The syntax for embedding an image is very similar to that used for a hyperlink. Alternate text should always be provided; this will be displayed if the image fails to load. As with hyperlinks, title text is optional. + +```no-highlight +![Alternate text](/path/to/image.png "Image title text") +``` + +## Code Blocks + +Single backticks can be used to annotate code inline. Text enclosed by lines of three backticks will be displayed as a code block. + +```no-highlight +Paragraphs are rendered in HTML using `

` and `

` tags. +``` + +Paragraphs are rendered in HTML using `

` and `

` tags. + +```` +``` +def my_func(foo, bar): + # Do something + return foo * bar +``` +```` + +```no-highlight +def my_func(foo, bar): + # Do something + return foo * bar +``` + +## Tables + +Simple tables can be constructed using the pipe character (`|`) to denote columns, and hyphens (`-`) to denote the heading. Inline Markdown can be used to style text within columns. + +```no-highlight +| Heading 1 | Heading 2 | Heading 3 | +|-----------|-----------|-----------| +| Row 1 | Alpha | Red | +| Row 2 | **Bravo** | Green | +| Row 3 | Charlie | ~~Blue~~ | +``` + +| Heading 1 | Heading 2 | Heading 3 | +|-----------|-----------|-----------| +| _Row 1_ | Alpha | Red | +| Row 2 | **Bravo** | Green | +| Row 3 | Charlie | ~~Blue~~ | + +Colons can be used to align text to the left or right side of a column. + +```no-highlight +| Left-aligned | Centered | Right-aligned | +|:-------------|:--------:|--------------:| +| Text | Text | Text | +| Text | Text | Text | +| Text | Text | Text | +``` + +| Left-aligned | Centered | Right-aligned | +|:-------------|:--------:|--------------:| +| Text | Text | Text | +| Text | Text | Text | +| Text | Text | Text | + +## Blockquotes + +Text can be wrapped in a blockquote by prepending a right angle bracket (`>`) before each line. + +```no-highlight +> I think that I shall never see +> a graph more lovely than a tree. +> A tree whose crucial property +> is loop-free connectivity. +``` + +> I think that I shall never see +> a graph more lovely than a tree. +> A tree whose crucial property +> is loop-free connectivity. + +Markdown removes line breaks by default. To preserve line breaks, append two spaces to each line (represented below with the `β‹…` character). + +```no-highlight +> I think that I shall never seeβ‹…β‹… +> a graph more lovely than a tree.β‹…β‹… +> A tree whose crucial propertyβ‹…β‹… +> is loop-free connectivity. +``` + +> I think that I shall never see +> a graph more lovely than a tree. +> A tree whose crucial property +> is loop-free connectivity. + +## Horizontal Rule + +A horizontal rule is a single line rendered across the width of the page using a series of three or more hyphens or asterisks. It can be useful for separating sections of content. + +```no-highlight +Content + +--- + +More content + +*** + +Final content +``` + +Content + +--- + +More content + +*** + +Final content From 69c0aac1051015660133b2ae3c86607dabd8084b Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 28 Mar 2024 11:48:15 -0400 Subject: [PATCH 07/14] Add Jeff; remove duplicate entries from rotation (not supported) --- .github/workflows/auto-assign-issue.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/auto-assign-issue.yml b/.github/workflows/auto-assign-issue.yml index 154f5f0a8..5af9d0dbc 100644 --- a/.github/workflows/auto-assign-issue.yml +++ b/.github/workflows/auto-assign-issue.yml @@ -14,7 +14,6 @@ jobs: steps: - uses: pozil/auto-assign-issue@v1 with: - # Some assignees are listed multiple times to effect a weighted rotation - assignees: jeremystretch,jeremystretch,jeremystretch,jeremystretch,arthanson,arthanson,arthanson,arthanson,DanSheps,abhi1693 + assignees: abhi1693,arthanson,DanSheps,jeffgdotorg,jeremystretch numOfAssignee: 1 abortIfPreviousAssignees: true From d37a6210fa370b97b9ddb64f54d091a83e039b82 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 28 Mar 2024 14:14:34 -0400 Subject: [PATCH 08/14] Limit auto-assignment to bug reports & feature requests --- .github/workflows/auto-assign-issue.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/auto-assign-issue.yml b/.github/workflows/auto-assign-issue.yml index 5af9d0dbc..20e054806 100644 --- a/.github/workflows/auto-assign-issue.yml +++ b/.github/workflows/auto-assign-issue.yml @@ -13,6 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: pozil/auto-assign-issue@v1 + if: "contains(github.event.issue.labels.*.name, 'type: bug') || contains(github.event.issue.labels.*.name, 'type: feature')" with: assignees: abhi1693,arthanson,DanSheps,jeffgdotorg,jeremystretch numOfAssignee: 1 From 3cb68e4bc032f0270c5c12a08811d2c1ae3913c7 Mon Sep 17 00:00:00 2001 From: teapot Date: Fri, 29 Mar 2024 02:01:08 +0900 Subject: [PATCH 09/14] Fixes #15567: Correct typo in help text Fixes #15567: Correct typo in help text --- netbox/extras/models/tags.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/extras/models/tags.py b/netbox/extras/models/tags.py index 3aba6df60..97b9087c5 100644 --- a/netbox/extras/models/tags.py +++ b/netbox/extras/models/tags.py @@ -37,7 +37,7 @@ class Tag(CloningMixin, ExportTemplatesMixin, ChangeLoggedModel, TagBase): to='contenttypes.ContentType', related_name='+', blank=True, - help_text=_("The object type(s) to which this this tag can be applied.") + help_text=_("The object type(s) to which this tag can be applied.") ) clone_fields = ( From 699dd7259761da0d70f1a1bf94b088d44090f56d Mon Sep 17 00:00:00 2001 From: "Daniel W. Anner" Date: Wed, 27 Mar 2024 20:56:56 +0000 Subject: [PATCH 10/14] Adding JSON schema changes to implement and within the generated schema template per issue #15555 --- contrib/generated_schema.json | 2 ++ netbox/templates/extras/schema/devicetype_schema.jinja2 | 2 ++ 2 files changed, 4 insertions(+) diff --git a/contrib/generated_schema.json b/contrib/generated_schema.json index 1164f2e48..b6632dd4c 100644 --- a/contrib/generated_schema.json +++ b/contrib/generated_schema.json @@ -1,5 +1,7 @@ { "type": "object", + "$id": "urn:devicetype-library:generated-schema", + "$schema": "https://json-schema.org/draft/2020-12/schema", "additionalProperties": false, "definitions": { "airflow": { diff --git a/netbox/templates/extras/schema/devicetype_schema.jinja2 b/netbox/templates/extras/schema/devicetype_schema.jinja2 index b08ab24de..19cacab69 100644 --- a/netbox/templates/extras/schema/devicetype_schema.jinja2 +++ b/netbox/templates/extras/schema/devicetype_schema.jinja2 @@ -1,5 +1,7 @@ { "type": "object", + "$id": "urn:devicetype-library:generated-schema", + "$schema": "https://json-schema.org/draft/2020-12/schema", "additionalProperties": false, "definitions": { "airflow": { From d285edc0c72f2913e02aa9c42bb968805ed95724 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markku=20Leini=C3=B6?= Date: Wed, 3 Apr 2024 14:58:46 +0300 Subject: [PATCH 11/14] Fixes #15583: Update API token provisioning example response (#15584) * Fixes #15583: Update API token provisioning example response * Fix 'display' field output --- docs/integrations/rest-api.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/integrations/rest-api.md b/docs/integrations/rest-api.md index 03a34abf4..437f652b7 100644 --- a/docs/integrations/rest-api.md +++ b/docs/integrations/rest-api.md @@ -647,18 +647,20 @@ Note that we are _not_ passing an existing REST API token with this request. If { "id": 6, "url": "https://netbox/api/users/tokens/6/", - "display": "3c9cb9 (hankhill)", + "display": "**********************************3c9cb9", "user": { "id": 2, "url": "https://netbox/api/users/users/2/", "display": "hankhill", "username": "hankhill" }, - "created": "2021-06-11T20:09:13.339367Z", + "created": "2024-03-11T20:09:13.339367Z", "expires": null, + "last_used": null, "key": "9fc9b897abec9ada2da6aec9dbc34596293c9cb9", "write_enabled": true, - "description": "" + "description": "", + "allowed_ips": [] } ``` From bbd7ddb7aad0bf2097776523f03827b314a6737b Mon Sep 17 00:00:00 2001 From: tobiWu <42635628+tobiWu@users.noreply.github.com> Date: Wed, 3 Apr 2024 14:05:47 +0200 Subject: [PATCH 12/14] Fix #15506 Update documentation for plugins index.md (#15518) * Update documentation for plugins index.md You should restart netbox-rq workers if you added a plugin. Otherwise you can't load modules from plugin to custom scripts later. * Update docs/plugins/index.md --------- Co-authored-by: Jeremy Stretch --- docs/plugins/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/plugins/index.md b/docs/plugins/index.md index 0658ed402..39314187b 100644 --- a/docs/plugins/index.md +++ b/docs/plugins/index.md @@ -82,10 +82,10 @@ Plugins may package static files to be served directly by the HTTP front end. En ### Restart WSGI Service -Restart the WSGI service to load the new plugin: +Restart the WSGI service and RQ workers to load the new plugin: ```no-highlight -# sudo systemctl restart netbox +# sudo systemctl restart netbox netbox-rq ``` ## Removing Plugins From 7d5435714685359a68473fc52e1e59849d334387 Mon Sep 17 00:00:00 2001 From: Daniel Sheppard Date: Fri, 22 Mar 2024 10:24:43 -0500 Subject: [PATCH 13/14] Fixes: #15502 - Correct exception on IP import form when VM is target --- netbox/ipam/forms/bulk_import.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/ipam/forms/bulk_import.py b/netbox/ipam/forms/bulk_import.py index 0627a6765..bfff1f4f4 100644 --- a/netbox/ipam/forms/bulk_import.py +++ b/netbox/ipam/forms/bulk_import.py @@ -378,7 +378,7 @@ class IPAddressImportForm(NetBoxModelImportForm): # Set as primary for device/VM if self.cleaned_data.get('is_primary'): - parent = self.cleaned_data['device'] or self.cleaned_data['virtual_machine'] + parent = self.cleaned_data.get('device') or self.cleaned_data.get('virtual_machine') if self.instance.address.version == 4: parent.primary_ip4 = ipaddress elif self.instance.address.version == 6: From bb4930b62fcca5b92e59c029f665f66abf274708 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Wed, 3 Apr 2024 08:15:44 -0400 Subject: [PATCH 14/14] Change log for #14799, #15502 --- docs/release-notes/version-3.7.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/release-notes/version-3.7.md b/docs/release-notes/version-3.7.md index 9724c4488..0e4bcfc5b 100644 --- a/docs/release-notes/version-3.7.md +++ b/docs/release-notes/version-3.7.md @@ -2,6 +2,11 @@ ## v3.7.5 (FUTURE) +### Bug Fixes + +* [#14799](https://github.com/netbox-community/netbox/issues/14799) - Avoid caching modified reports & scripts +* [#15502](https://github.com/netbox-community/netbox/issues/15502) - Fix KeyError exception when modifying an IP address assigned to a virtual machine + --- ## v3.7.4 (2024-03-13)