Compare commits
1103 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
61739a0bc5 | ||
|
|
66db4f3874 | ||
|
|
5de2dea8a6 | ||
|
|
621c3ccfa4 | ||
|
|
530a15e906 | ||
|
|
1235b496b4 | ||
|
|
70dd8f17b6 | ||
|
|
c173c26e35 | ||
|
|
bb806e21f7 | ||
|
|
c5cbb99bf0 | ||
|
|
3d941411d4 | ||
|
|
c4c1ddf68d | ||
|
|
3645bd770f | ||
|
|
0f4c25fe49 | ||
|
|
2221a9d71f | ||
|
|
edc2e3809d | ||
|
|
9603644ca2 | ||
|
|
e1e198ec4f | ||
|
|
5223486fd8 | ||
|
|
ea5d33f358 | ||
|
|
c78a792ccc | ||
|
|
109daca203 | ||
|
|
982ef3045d | ||
|
|
7b90481fc9 | ||
|
|
d99e6510e1 | ||
|
|
7c4b939b59 | ||
|
|
c1ff74894c | ||
|
|
33af942571 | ||
|
|
224484ebb6 | ||
|
|
d9c1ba8972 | ||
|
|
d930c4e36e | ||
|
|
d5c1cb0ef6 | ||
|
|
0c0672550a | ||
|
|
199685d98b | ||
|
|
3ef2db81e8 | ||
|
|
3bacee16bd | ||
|
|
45c646dcec | ||
|
|
fedcbaf4c8 | ||
|
|
359c0cf3a0 | ||
|
|
11bc460551 | ||
|
|
1f2f0860fe | ||
|
|
46b933a5aa | ||
|
|
07da3f6d33 | ||
|
|
4eadc8cfe4 | ||
|
|
0613e8e95c | ||
|
|
113c60a44a | ||
|
|
8a237561ef | ||
|
|
cc0fc03ec3 | ||
|
|
b955751349 | ||
|
|
d6c8d1581c | ||
|
|
e6642b5f5b | ||
|
|
a67236fc3c | ||
|
|
634681a72e | ||
|
|
031b7540b3 | ||
|
|
43909ee33f | ||
|
|
99467e8f66 | ||
|
|
00807d1e52 | ||
|
|
0d08205ab1 | ||
|
|
c289dda649 | ||
|
|
169207058f | ||
|
|
e5c565cbf4 | ||
|
|
f0b9008529 | ||
|
|
8dfec7e2b2 | ||
|
|
c1cf037eaf | ||
|
|
3f4a65cc5c | ||
|
|
58f925c261 | ||
|
|
326b54b7e0 | ||
|
|
3905ddf163 | ||
|
|
3cd2432aa1 | ||
|
|
12beac4f1a | ||
|
|
a233dc91fe | ||
|
|
b794bd6fb8 | ||
|
|
96878cfca6 | ||
|
|
25e67eb555 | ||
|
|
ec245b968f | ||
|
|
f1d4011b40 | ||
|
|
4cdc30a7c5 | ||
|
|
8d39181842 | ||
|
|
3068f2a075 | ||
|
|
224d64007a | ||
|
|
c81869c795 | ||
|
|
929d4d2c95 | ||
|
|
d14e4ab52b | ||
|
|
8a4233aca1 | ||
|
|
5508e125ba | ||
|
|
69bf1472d2 | ||
|
|
b93735861d | ||
|
|
6939ae4a47 | ||
|
|
81fa4265da | ||
|
|
965f2de34b | ||
|
|
35be4f05ef | ||
|
|
d428dd172c | ||
|
|
2ef023a160 | ||
|
|
9d7192202d | ||
|
|
95a8415e2d | ||
|
|
b532435a6d | ||
|
|
2d1f882724 | ||
|
|
e59ee3e01e | ||
|
|
5d2f499ffb | ||
|
|
92bdaa2120 | ||
|
|
fe3f21105c | ||
|
|
32264ac3e3 | ||
|
|
b34daeaacb | ||
|
|
d2c3a39ebb | ||
|
|
d10ac9b4a7 | ||
|
|
b21ed6a334 | ||
|
|
f58d80643c | ||
|
|
1afac47178 | ||
|
|
8db1093fdc | ||
|
|
9f1283f0fa | ||
|
|
2b7cc1e6fa | ||
|
|
115111df9e | ||
|
|
deadde8700 | ||
|
|
5d57e9863d | ||
|
|
cfc20f910e | ||
|
|
625825d482 | ||
|
|
c0512e2c36 | ||
|
|
5b0b366b82 | ||
|
|
3faf4857cb | ||
|
|
42ab8ee0a2 | ||
|
|
bf182158a7 | ||
|
|
e893ffcee4 | ||
|
|
0c9919a5e8 | ||
|
|
0340a5e8d6 | ||
|
|
7a63e11a70 | ||
|
|
dcd3f098ce | ||
|
|
7cec4e9e22 | ||
|
|
e4824db40b | ||
|
|
2ed261e9c2 | ||
|
|
dea5f94d97 | ||
|
|
85ab7adca6 | ||
|
|
4fc0a999ea | ||
|
|
b812a50ca2 | ||
|
|
a38a38218b | ||
|
|
b83fcc6077 | ||
|
|
9d09916f6e | ||
|
|
28080e9b14 | ||
|
|
04fd45581d | ||
|
|
0a8eb7fcbe | ||
|
|
ac3fc25dfd | ||
|
|
82591ad8a1 | ||
|
|
6dddb6c9d2 | ||
|
|
290aae592d | ||
|
|
ff021a8e4e | ||
|
|
3a3d43911c | ||
|
|
c43c63a817 | ||
|
|
792b353f64 | ||
|
|
01ba4ce129 | ||
|
|
fc7d6e1387 | ||
|
|
080da68b6a | ||
|
|
7d413ea3c2 | ||
|
|
40763b58bd | ||
|
|
d2fea4edc4 | ||
|
|
8e7146cd06 | ||
|
|
e4989300de | ||
|
|
6678880db5 | ||
|
|
975a647d9a | ||
|
|
18422e1d26 | ||
|
|
a73ba00aa0 | ||
|
|
549b0ea107 | ||
|
|
e13bf48a35 | ||
|
|
e767fec5cc | ||
|
|
e15647a2ce | ||
|
|
69a4c31072 | ||
|
|
840b7d804c | ||
|
|
3d20276f55 | ||
|
|
2562c8745c | ||
|
|
ac91d4e5e5 | ||
|
|
d52a6d3b10 | ||
|
|
6ac25eeb65 | ||
|
|
41eae1bc19 | ||
|
|
351aaf8397 | ||
|
|
5c27d29b08 | ||
|
|
e1bedb8350 | ||
|
|
dd5e20aa1a | ||
|
|
217a9edb4c | ||
|
|
ad95760ead | ||
|
|
57bf2a2f00 | ||
|
|
e5c38e0829 | ||
|
|
6b89da2233 | ||
|
|
092f2b06ab | ||
|
|
6900097e2d | ||
|
|
5000564430 | ||
|
|
95519b42a0 | ||
|
|
dfef89ab88 | ||
|
|
0603dd1be4 | ||
|
|
1203d761f4 | ||
|
|
d2c727c0a2 | ||
|
|
ac4b46b502 | ||
|
|
6e8ee9db89 | ||
|
|
94858ac13f | ||
|
|
b0f2de5bd7 | ||
|
|
60e98324c3 | ||
|
|
66b9cdf141 | ||
|
|
8dcbd66de6 | ||
|
|
22e474ff96 | ||
|
|
b3fb393490 | ||
|
|
f6338abf14 | ||
|
|
944008d475 | ||
|
|
c2d1988cb3 | ||
|
|
77208bf5f3 | ||
|
|
7323668dd0 | ||
|
|
edc4a35296 | ||
|
|
c4e765c4a8 | ||
|
|
30ce9edf1c | ||
|
|
7274e75b26 | ||
|
|
ae447bd187 | ||
|
|
450790ab4a | ||
|
|
3f40ee5501 | ||
|
|
5b2f29480a | ||
|
|
809b049590 | ||
|
|
2a0a7d45aa | ||
|
|
7efbfabc0b | ||
|
|
d195f9c6ea | ||
|
|
de298224f1 | ||
|
|
3fd8e48fac | ||
|
|
ab9de43447 | ||
|
|
51ef4fb920 | ||
|
|
7983c2590e | ||
|
|
d77d45e795 | ||
|
|
a24864bc6d | ||
|
|
c671ac2f28 | ||
|
|
18a813aa39 | ||
|
|
14447befb9 | ||
|
|
06ed7ac8a5 | ||
|
|
72f01b3e89 | ||
|
|
2522056bd1 | ||
|
|
01c894e625 | ||
|
|
4286c1cde2 | ||
|
|
383285fb94 | ||
|
|
e23b246d46 | ||
|
|
a543bd469a | ||
|
|
d03859b27b | ||
|
|
bbb133019d | ||
|
|
285187542d | ||
|
|
4d13f4d252 | ||
|
|
e4a9cad756 | ||
|
|
b93b331d86 | ||
|
|
a46255ddda | ||
|
|
6093debb71 | ||
|
|
6dc560596d | ||
|
|
5cb1a6b790 | ||
|
|
ef460a38ed | ||
|
|
786f0cc7f3 | ||
|
|
ccc9e89e1a | ||
|
|
9e35cefaf2 | ||
|
|
1a00765b72 | ||
|
|
4dd229e73a | ||
|
|
db40119faa | ||
|
|
f65744faee | ||
|
|
1ad6d94dc3 | ||
|
|
b759d694ee | ||
|
|
3cb41bbe3a | ||
|
|
099aff5ebe | ||
|
|
f9ceaad284 | ||
|
|
e67624f042 | ||
|
|
27297c7556 | ||
|
|
685ac5f571 | ||
|
|
0ce2b1b779 | ||
|
|
04796a6ac6 | ||
|
|
a8a4bd7c21 | ||
|
|
a0e5e69283 | ||
|
|
df46198b91 | ||
|
|
b670a1e22c | ||
|
|
9b325f4b86 | ||
|
|
952be24365 | ||
|
|
b57a47475d | ||
|
|
4f05cf55a5 | ||
|
|
5dcf8502af | ||
|
|
7a21541ed6 | ||
|
|
ae4ea3443e | ||
|
|
f5dd7d853a | ||
|
|
a1e42dad10 | ||
|
|
6e4b4a553b | ||
|
|
7a410dfd00 | ||
|
|
6fb980349f | ||
|
|
8e251ac33c | ||
|
|
35bcc2ce9d | ||
|
|
69215c411b | ||
|
|
a08b5793f6 | ||
|
|
252bf03525 | ||
|
|
b9b9bb134f | ||
|
|
68966db23d | ||
|
|
9aa7444bf9 | ||
|
|
b0541be107 | ||
|
|
3d1f668235 | ||
|
|
940c947d3f | ||
|
|
c7dd4206c8 | ||
|
|
79bf12a8fe | ||
|
|
2dfbd72f10 | ||
|
|
487827c776 | ||
|
|
6939bf8aed | ||
|
|
e4cb0c3cc2 | ||
|
|
cf2f39a0a8 | ||
|
|
b7cfb2f7d9 | ||
|
|
39cb9c32d6 | ||
|
|
75b71890a4 | ||
|
|
2ffa6d0188 | ||
|
|
026386db50 | ||
|
|
b5125e512f | ||
|
|
a8a36c0a8f | ||
|
|
99ab054ea0 | ||
|
|
90ab4b3c86 | ||
|
|
bb6b4d01c1 | ||
|
|
2d1457b94b | ||
|
|
9d851924c8 | ||
|
|
9be5918c83 | ||
|
|
6db6616892 | ||
|
|
004daca862 | ||
|
|
559f65f6b2 | ||
|
|
c38884fa11 | ||
|
|
7848beedce | ||
|
|
296166da95 | ||
|
|
679cc8fdda | ||
|
|
0cdc26e013 | ||
|
|
2503568875 | ||
|
|
78966e12a9 | ||
|
|
f962fb3b53 | ||
|
|
2544e2bf18 | ||
|
|
06f2c6f867 | ||
|
|
272d2c54d4 | ||
|
|
cb93abb0f4 | ||
|
|
316d991b33 | ||
|
|
46f734eba2 | ||
|
|
671a56100a | ||
|
|
dfcfbe240d | ||
|
|
b040fdcf2c | ||
|
|
8525f994c0 | ||
|
|
eb9a804914 | ||
|
|
210d7bb573 | ||
|
|
dc85476b9e | ||
|
|
1854a6b76b | ||
|
|
aebf3288d1 | ||
|
|
065a40dfb3 | ||
|
|
83536fbb23 | ||
|
|
420090dc6c | ||
|
|
4ab0eb570c | ||
|
|
2a4e3dd09f | ||
|
|
0dbfbf6941 | ||
|
|
d515530277 | ||
|
|
4343e0566b | ||
|
|
8555269f7e | ||
|
|
f42a2ac10c | ||
|
|
4ea3a29c0e | ||
|
|
29877c9abe | ||
|
|
480f83c42d | ||
|
|
faf89350ac | ||
|
|
d9c3ce935f | ||
|
|
8d8f57e8b8 | ||
|
|
0a3be0b7ea | ||
|
|
00ebdfe0df | ||
|
|
d79fa131bb | ||
|
|
be2b24a155 | ||
|
|
03b341dbfd | ||
|
|
ca5e69897d | ||
|
|
3090dd4934 | ||
|
|
1f1d1ee502 | ||
|
|
1c2cf11f47 | ||
|
|
08961e751d | ||
|
|
88bf82be05 | ||
|
|
506884bc4d | ||
|
|
646fa341ab | ||
|
|
d73f7b1943 | ||
|
|
a75e8416a4 | ||
|
|
f743f2cfb8 | ||
|
|
7d7e8127f5 | ||
|
|
3c0a3ca703 | ||
|
|
45062697c5 | ||
|
|
66e4e31209 | ||
|
|
c86cfe3cbf | ||
|
|
28e112743f | ||
|
|
229007082b | ||
|
|
4004966b16 | ||
|
|
fe95cb434a | ||
|
|
5709bc3b2b | ||
|
|
af06510921 | ||
|
|
b4acbb5e16 | ||
|
|
b96e437e2b | ||
|
|
16e2283d19 | ||
|
|
c46536f469 | ||
|
|
0457520f51 | ||
|
|
44f8a777df | ||
|
|
9450ce4c3a | ||
|
|
1c9a8ec6bd | ||
|
|
8f5005efd5 | ||
|
|
e61795d5c6 | ||
|
|
892c10b1f0 | ||
|
|
752e26c7de | ||
|
|
ea107b6b86 | ||
|
|
b9b9c065cc | ||
|
|
b583770765 | ||
|
|
37d6f6abca | ||
|
|
be3f48c677 | ||
|
|
5de9d3f15f | ||
|
|
8593715149 | ||
|
|
40afe6cf36 | ||
|
|
9fd07b594c | ||
|
|
dc7411e4c5 | ||
|
|
315c4bb1ac | ||
|
|
1ff1b4dc89 | ||
|
|
a332adf962 | ||
|
|
856cc0f885 | ||
|
|
89d8f7aa70 | ||
|
|
4d2ef0a8b5 | ||
|
|
23b3f72dee | ||
|
|
ff59845821 | ||
|
|
914588f55d | ||
|
|
72e1e8fab1 | ||
|
|
8b01c30c51 | ||
|
|
dcdb4d27ec | ||
|
|
9b1406a1a7 | ||
|
|
545769ad88 | ||
|
|
16bcb1dbb0 | ||
|
|
5dce5563ab | ||
|
|
4e8a3e0a6f | ||
|
|
646d52d498 | ||
|
|
cd5012bd59 | ||
|
|
4bb0388118 | ||
|
|
f255fe507d | ||
|
|
f5a1f83f9f | ||
|
|
36072f17a9 | ||
|
|
f9648d8544 | ||
|
|
2236b86c35 | ||
|
|
0dd319d0c8 | ||
|
|
53615944c5 | ||
|
|
88562d7dcf | ||
|
|
01bb09db67 | ||
|
|
f1c182bb65 | ||
|
|
43ce453938 | ||
|
|
2afce6c94b | ||
|
|
14e23c3d00 | ||
|
|
7f22c6bf12 | ||
|
|
93a862cded | ||
|
|
9cc295827b | ||
|
|
14988fc91c | ||
|
|
31f41855f4 | ||
|
|
caedc8dbe3 | ||
|
|
24ffaf09d4 | ||
|
|
d9f3637e25 | ||
|
|
a807cca29e | ||
|
|
57860f26b7 | ||
|
|
ab916a1819 | ||
|
|
a68831d3a1 | ||
|
|
04a2543e68 | ||
|
|
82c959570d | ||
|
|
354dc4398a | ||
|
|
a698a93938 | ||
|
|
04c5e62d2b | ||
|
|
aa747c3954 | ||
|
|
1937c1fad6 | ||
|
|
bf20611668 | ||
|
|
8f271151a7 | ||
|
|
0bb86f1e7d | ||
|
|
a4c9cbc6dd | ||
|
|
79030ecab2 | ||
|
|
ccb7568462 | ||
|
|
6208e0f7f6 | ||
|
|
e64289e791 | ||
|
|
699b4dfade | ||
|
|
a89cec72a1 | ||
|
|
1cc78be6ca | ||
|
|
7b998cfeb4 | ||
|
|
cbf4b43b35 | ||
|
|
c1ca8d5d8d | ||
|
|
43e6308d90 | ||
|
|
e625a5667c | ||
|
|
e284cd7e54 | ||
|
|
34a960505d | ||
|
|
b7a9649269 | ||
|
|
83bebc1bd2 | ||
|
|
80376abedf | ||
|
|
9c6c3d3dd4 | ||
|
|
ab0442bd5c | ||
|
|
36f95f7842 | ||
|
|
07f68ae579 | ||
|
|
ca634be7ad | ||
|
|
2a0d76d564 | ||
|
|
0b10131564 | ||
|
|
7c17d2e932 | ||
|
|
cf1b1a83eb | ||
|
|
9d3bb585a2 | ||
|
|
d52c18ce38 | ||
|
|
006c353d46 | ||
|
|
6c53ca8909 | ||
|
|
4f984c0831 | ||
|
|
d9dc6cec3a | ||
|
|
90146941b5 | ||
|
|
9d0457fe1a | ||
|
|
2aa51d0d94 | ||
|
|
7158360dfa | ||
|
|
c89193d331 | ||
|
|
eeb069048f | ||
|
|
3e12fbe367 | ||
|
|
4b2922312a | ||
|
|
0276f29067 | ||
|
|
1d52627f71 | ||
|
|
bba4fe437c | ||
|
|
0ab3f979e0 | ||
|
|
5a3d46ac8d | ||
|
|
d075e7a66a | ||
|
|
8b8adfbbbb | ||
|
|
0c2e3ff898 | ||
|
|
83c092f685 | ||
|
|
0f9fe96192 | ||
|
|
1bcfcad9db | ||
|
|
5b5444f414 | ||
|
|
daa8f71bb6 | ||
|
|
9b6e32896d | ||
|
|
154b8236a2 | ||
|
|
7600d7b344 | ||
|
|
149a496011 | ||
|
|
a4acb50edd | ||
|
|
96ea0ac9c7 | ||
|
|
837be4d45f | ||
|
|
0f0cf683c4 | ||
|
|
ec0dbe33d3 | ||
|
|
1c30a44b4e | ||
|
|
252cc37f97 | ||
|
|
f6fcf776a4 | ||
|
|
73348ee435 | ||
|
|
cab7b76220 | ||
|
|
bc7678c716 | ||
|
|
63c33ff4be | ||
|
|
da239aea13 | ||
|
|
53a75a3dd7 | ||
|
|
74fb707ad3 | ||
|
|
ecb4a084cc | ||
|
|
7419a8e112 | ||
|
|
62bdb90f61 | ||
|
|
8143c6e03b | ||
|
|
ffe4558ec5 | ||
|
|
16ee42ac38 | ||
|
|
860be780ad | ||
|
|
5f0922713f | ||
|
|
4355ee6407 | ||
|
|
07ae7c8a6e | ||
|
|
63ba9fb38c | ||
|
|
3307bd200c | ||
|
|
f69d99ea67 | ||
|
|
3754e00ee0 | ||
|
|
dd6d9bf6e3 | ||
|
|
183c7deb81 | ||
|
|
0a60a3fd2a | ||
|
|
6e222f8dce | ||
|
|
b13f9d27d9 | ||
|
|
6b01b1df40 | ||
|
|
34d32374a8 | ||
|
|
c99e565426 | ||
|
|
16d5107b71 | ||
|
|
f1858a7c23 | ||
|
|
290ffd408a | ||
|
|
74d9fe1ea2 | ||
|
|
d131d9b310 | ||
|
|
32fe9fe8ec | ||
|
|
882f29192c | ||
|
|
27e850a68d | ||
|
|
c83b2499f0 | ||
|
|
79c8219202 | ||
|
|
49af70a77d | ||
|
|
7f96c7fee7 | ||
|
|
13315f36d4 | ||
|
|
1056e513b1 | ||
|
|
69b818ed33 | ||
|
|
148278a74a | ||
|
|
48b2ab3587 | ||
|
|
9fa1411d74 | ||
|
|
eff4a3741c | ||
|
|
518fd8cca6 | ||
|
|
bace24b68e | ||
|
|
e7edccd9ba | ||
|
|
70c2b358ad | ||
|
|
9dab3a0d79 | ||
|
|
54622b5f92 | ||
|
|
cdce500d90 | ||
|
|
e11991c7a4 | ||
|
|
6ef333ea68 | ||
|
|
7fc69f3945 | ||
|
|
8aeb31751a | ||
|
|
0b2162569f | ||
|
|
93175888f0 | ||
|
|
e635f0defd | ||
|
|
b4a3156046 | ||
|
|
4f76dcd2ea | ||
|
|
4d686e8162 | ||
|
|
0e873a01b8 | ||
|
|
f7b0e48a09 | ||
|
|
c5f71c0c19 | ||
|
|
36e0bf0490 | ||
|
|
28b939c001 | ||
|
|
55e31ef984 | ||
|
|
85e351146d | ||
|
|
d03bfe89c0 | ||
|
|
c8cbced55e | ||
|
|
928a34674e | ||
|
|
96cf95d176 | ||
|
|
2e9586523f | ||
|
|
a81924ac0f | ||
|
|
74c1f7a176 | ||
|
|
22a0ce3f76 | ||
|
|
43235f143d | ||
|
|
e7851399c6 | ||
|
|
82cd6c5f4c | ||
|
|
210879d380 | ||
|
|
01d9e0afb6 | ||
|
|
2e2ff09822 | ||
|
|
4a88d5e3d9 | ||
|
|
9fb52be85c | ||
|
|
46d1d5a44a | ||
|
|
dee4aec62d | ||
|
|
9f70407c7d | ||
|
|
852026bf7b | ||
|
|
e7f689bc52 | ||
|
|
1349a25e34 | ||
|
|
dbd3c6de24 | ||
|
|
3e77daff01 | ||
|
|
bd88ee7063 | ||
|
|
a9b0b49ef9 | ||
|
|
8b051ea2f3 | ||
|
|
bca9d0fa8a | ||
|
|
9b8ab1c1f7 | ||
|
|
b3bd03a1e9 | ||
|
|
18c863e393 | ||
|
|
d7ca453f26 | ||
|
|
9b9a559e0c | ||
|
|
1f71d3570a | ||
|
|
5a5fcf7d37 | ||
|
|
5869894a48 | ||
|
|
e2f9a3c07a | ||
|
|
b64b19a3f4 | ||
|
|
24a51dd86e | ||
|
|
bf1c191b2e | ||
|
|
b31b086a4d | ||
|
|
6160e03426 | ||
|
|
c9b79ca579 | ||
|
|
fbc7811f56 | ||
|
|
005e3fd692 | ||
|
|
078893e034 | ||
|
|
80fc8db514 | ||
|
|
fa3bedb947 | ||
|
|
c8d9a3b4eb | ||
|
|
311dce0b5f | ||
|
|
23b21246f0 | ||
|
|
92c49669f9 | ||
|
|
2204735e9f | ||
|
|
0df6a5793a | ||
|
|
eeb15ab5d1 | ||
|
|
4208b79514 | ||
|
|
d5be59ef67 | ||
|
|
0ad88e2431 | ||
|
|
c65b2a080f | ||
|
|
0f44f7eb20 | ||
|
|
02db0bcc2e | ||
|
|
e40e9cb406 | ||
|
|
21f4761335 | ||
|
|
39fd64b2ef | ||
|
|
567285d36a | ||
|
|
ff874a24dd | ||
|
|
9b80ec22ba | ||
|
|
cc0c985fec | ||
|
|
4eb5e90ccc | ||
|
|
e71a98499f | ||
|
|
011a936a56 | ||
|
|
556beeee6c | ||
|
|
b7f028fba3 | ||
|
|
2d0ac213c7 | ||
|
|
6b19f15a7b | ||
|
|
57156f0e94 | ||
|
|
4e49f4a434 | ||
|
|
c55c14ea4c | ||
|
|
e1b7a3aeb6 | ||
|
|
2b2c559a37 | ||
|
|
1af3ba9496 | ||
|
|
cb6852bf7a | ||
|
|
259d0e96f2 | ||
|
|
9eeca06115 | ||
|
|
da781b8d28 | ||
|
|
896b19eaa3 | ||
|
|
12bef7623c | ||
|
|
e96cfadd22 | ||
|
|
5f184f2435 | ||
|
|
56a4d0333e | ||
|
|
6794742213 | ||
|
|
a29a07ed26 | ||
|
|
42c80f69e6 | ||
|
|
ca0e7be637 | ||
|
|
42346702a1 | ||
|
|
9909213c0d | ||
|
|
7a38f601de | ||
|
|
abdcfdecf5 | ||
|
|
9d62174e1e | ||
|
|
a96b76a8d1 | ||
|
|
ab69faab87 | ||
|
|
f3826e6235 | ||
|
|
3eba65b5c2 | ||
|
|
683ef30af4 | ||
|
|
46914d9479 | ||
|
|
ea8a0135ad | ||
|
|
25142e037a | ||
|
|
93b912c2da | ||
|
|
4df517e4da | ||
|
|
2c756873aa | ||
|
|
01fa6e28cd | ||
|
|
5036020dc0 | ||
|
|
78ec3a6411 | ||
|
|
24650d9118 | ||
|
|
b14a514b47 | ||
|
|
7aa8434575 | ||
|
|
fbcf4c268b | ||
|
|
a566a56a64 | ||
|
|
cc3b95bdb0 | ||
|
|
2099cd0fdc | ||
|
|
3bdbf67b8f | ||
|
|
20f0464824 | ||
|
|
1952707702 | ||
|
|
9319cffb1c | ||
|
|
261f5e4995 | ||
|
|
8cede0daf8 | ||
|
|
139ef7ef4c | ||
|
|
47f3023401 | ||
|
|
a0f0b29432 | ||
|
|
f86f4f9257 | ||
|
|
3fc7c0edc7 | ||
|
|
528fb21a7e | ||
|
|
6206d226ae | ||
|
|
aabaeec1d7 | ||
|
|
25dc7e234d | ||
|
|
eac7d01977 | ||
|
|
a5bc9d4a2d | ||
|
|
b3efb14176 | ||
|
|
a2f4fce5b3 | ||
|
|
6109bef700 | ||
|
|
72767fb5b7 | ||
|
|
84089ab8c5 | ||
|
|
9a788349a9 | ||
|
|
b7140a0e4a | ||
|
|
d39c796828 | ||
|
|
4a92f6867a | ||
|
|
4355085124 | ||
|
|
5d4ef5e9e5 | ||
|
|
f49e4ee512 | ||
|
|
f867cb3ae0 | ||
|
|
a49fdad5e1 | ||
|
|
1ad029712e | ||
|
|
d87235af2f | ||
|
|
99af126fac | ||
|
|
83cea218b5 | ||
|
|
9eb38ab7b2 | ||
|
|
d3206d9bf9 | ||
|
|
adb9673f09 | ||
|
|
b693123f6e | ||
|
|
e7663b7e39 | ||
|
|
053be952ba | ||
|
|
390619ca99 | ||
|
|
b1130ff9b6 | ||
|
|
89fa546a14 | ||
|
|
c8988bac8a | ||
|
|
55385dd0db | ||
|
|
38a0ed5e24 | ||
|
|
15d80f4e1b | ||
|
|
2fe5592c3c | ||
|
|
8cf0a79dee | ||
|
|
183c5ca667 | ||
|
|
d5c4b1e27c | ||
|
|
2fcdc0ae6a | ||
|
|
12bb0ec1fe | ||
|
|
8b7ee0a0db | ||
|
|
274cd5d56c | ||
|
|
ab3531558a | ||
|
|
dda56f21f3 | ||
|
|
31c909c368 | ||
|
|
164b2a5016 | ||
|
|
7b374e4cf6 | ||
|
|
13625325f5 | ||
|
|
b84ac184c2 | ||
|
|
d5d2431cbd | ||
|
|
c08c7dda50 | ||
|
|
b807198e6d | ||
|
|
9caa7f6b7c | ||
|
|
4452f57f90 | ||
|
|
b167153186 | ||
|
|
197c6a1cbf | ||
|
|
014a5d10d1 | ||
|
|
86d185fe05 | ||
|
|
9ef1fb1e3a | ||
|
|
7ecf3be33c | ||
|
|
a0893c2e8b | ||
|
|
8b040ff930 | ||
|
|
d470848b29 | ||
|
|
59a6b3e71b | ||
|
|
c1c98f9883 | ||
|
|
dd8112c30e | ||
|
|
3c91331e16 | ||
|
|
eef38257b9 | ||
|
|
bb9a125934 | ||
|
|
8de252e34e | ||
|
|
9e305c6181 | ||
|
|
97ed6439ce | ||
|
|
15a615d3a3 | ||
|
|
3528aaee2c | ||
|
|
46d7bf02ac | ||
|
|
6820796c10 | ||
|
|
4a331b560f | ||
|
|
4c9cf9032c | ||
|
|
ada01b39cc | ||
|
|
b41f8755df | ||
|
|
2c07762b7a | ||
|
|
f68a63255b | ||
|
|
278f2b173a | ||
|
|
00714b23a2 | ||
|
|
768d6f624e | ||
|
|
1146aaff89 | ||
|
|
5a4feb7099 | ||
|
|
589d51e028 | ||
|
|
a6fd0ab09a | ||
|
|
08017c51f6 | ||
|
|
9f71cf79e6 | ||
|
|
c26fe266cc | ||
|
|
085cfc58f4 | ||
|
|
63a0ec7a79 | ||
|
|
ccfdc216a5 | ||
|
|
2bf9acfb19 | ||
|
|
74d8baea30 | ||
|
|
f8d40ae824 | ||
|
|
41c92483a0 | ||
|
|
6d6299f0cb | ||
|
|
f44a2ba0ee | ||
|
|
29fbe6e4ee | ||
|
|
94c2a2e56c | ||
|
|
0a2ae90411 | ||
|
|
1b5f926e17 | ||
|
|
13cbb33c98 | ||
|
|
b032742418 | ||
|
|
8a684adf66 | ||
|
|
bca00cd97a | ||
|
|
2883fa14de | ||
|
|
56d2a9aa11 | ||
|
|
53abcc0f5c | ||
|
|
0676ed45c7 | ||
|
|
872b70c2b5 | ||
|
|
2805633b16 | ||
|
|
f245f07fd9 | ||
|
|
e966d1df47 | ||
|
|
e4b2d87ce6 | ||
|
|
b3a347e6fb | ||
|
|
e7d1a43541 | ||
|
|
5ff9483d13 | ||
|
|
ac07b33602 | ||
|
|
8d6c591535 | ||
|
|
6a85c5b3ce | ||
|
|
bd38b50e5e | ||
|
|
eb77c0e920 | ||
|
|
198c004c1d | ||
|
|
730eb2e83b | ||
|
|
cdad50e051 | ||
|
|
3264636b7a | ||
|
|
fbc23424a6 | ||
|
|
6f08c4a4be | ||
|
|
0ac8419005 | ||
|
|
f18f6e2856 | ||
|
|
99b914689a | ||
|
|
b0f6cea4f3 | ||
|
|
bfd8e012dc | ||
|
|
ecd0c56554 | ||
|
|
1be626e5ee | ||
|
|
f36dfe3a11 | ||
|
|
90527b799d | ||
|
|
6e6e8fa2d9 | ||
|
|
e467589730 | ||
|
|
424b336536 | ||
|
|
06dec6a2d9 | ||
|
|
f965608791 | ||
|
|
c4891fe105 | ||
|
|
715592547c | ||
|
|
177668dca5 | ||
|
|
9d709c84e7 | ||
|
|
d2a694a878 | ||
|
|
15590f1f48 | ||
|
|
0330c652bd | ||
|
|
5a6005cdfa | ||
|
|
4eaba7993f | ||
|
|
2840f9d71d | ||
|
|
9946ae2981 | ||
|
|
420ec6791f | ||
|
|
47234f1607 | ||
|
|
b058bd9cea | ||
|
|
5b03636c88 | ||
|
|
be55bb43ad | ||
|
|
293afab730 | ||
|
|
6b622fd9bf | ||
|
|
7280dfacab | ||
|
|
4428a446d0 | ||
|
|
2eedcac383 | ||
|
|
35af1d7b61 | ||
|
|
1b92958870 | ||
|
|
795669113f | ||
|
|
de57446f36 | ||
|
|
3b13cef0c8 | ||
|
|
497f3145fa | ||
|
|
f597b76ddc | ||
|
|
ebaac82560 | ||
|
|
371764fecd | ||
|
|
f67deb0dea | ||
|
|
d3c5f1e744 | ||
|
|
b12551c64b | ||
|
|
9995fad513 | ||
|
|
1d2335d578 | ||
|
|
ad03061edf | ||
|
|
87eabdbffb | ||
|
|
19787dd21d | ||
|
|
7d64e5bc62 | ||
|
|
a2c7452f90 | ||
|
|
654e32cbbe | ||
|
|
879aabe2f9 | ||
|
|
835af32213 | ||
|
|
571d33e660 | ||
|
|
61e2073775 | ||
|
|
82080ef491 | ||
|
|
b3d2020045 | ||
|
|
34236ff468 | ||
|
|
7b258dc11f | ||
|
|
40572b543f | ||
|
|
669cfe8952 | ||
|
|
37aa07eea1 | ||
|
|
ea1801bad3 | ||
|
|
5c0ce96b6f | ||
|
|
f7a2eb8aef | ||
|
|
96eb89a469 | ||
|
|
9c5f4163af | ||
|
|
c57d71a9db | ||
|
|
e176c7d906 | ||
|
|
a098c3b0c1 | ||
|
|
2fc79af4c7 | ||
|
|
00088cba6d | ||
|
|
d6afc125e5 | ||
|
|
c35e7b8ee5 | ||
|
|
1e493f6f28 | ||
|
|
402d5d955f | ||
|
|
64f6eea579 | ||
|
|
9ce29f9edc | ||
|
|
ecb8f1599d | ||
|
|
2b3b9517d2 | ||
|
|
08bdb54cb4 | ||
|
|
13d604d44e | ||
|
|
9219397208 | ||
|
|
6e93c3574c | ||
|
|
0455654f71 | ||
|
|
3b9fda0169 | ||
|
|
8d25d7812c | ||
|
|
0ddd7b0e45 | ||
|
|
206d578bc3 | ||
|
|
a864e8127b | ||
|
|
fc482ed096 | ||
|
|
6e4c4c4342 | ||
|
|
5b81986bb3 | ||
|
|
85f40bcbe0 | ||
|
|
e7ed280790 | ||
|
|
3d14a79428 | ||
|
|
d93a24d0bb | ||
|
|
43bba935c3 | ||
|
|
da7293524e | ||
|
|
cacc418cd5 | ||
|
|
4286d74d44 | ||
|
|
5cd3ad0b12 | ||
|
|
f7150645a1 | ||
|
|
ef7c66de34 | ||
|
|
1446b07f8c | ||
|
|
8bd0a2ef9d | ||
|
|
af63ac693e | ||
|
|
6a696d9ed7 | ||
|
|
d1f76bec37 | ||
|
|
016eff52c0 | ||
|
|
2a9178af12 | ||
|
|
6b6ea36b4c | ||
|
|
520493c714 | ||
|
|
e459c46dad | ||
|
|
a71a59c088 | ||
|
|
267a14264b | ||
|
|
065738473e | ||
|
|
f698c42c41 | ||
|
|
ab303db3dd | ||
|
|
07b0b93256 | ||
|
|
a717ddf5e6 | ||
|
|
d880875e67 | ||
|
|
fa60f9d2a8 | ||
|
|
e015da9e4c | ||
|
|
4de64d783e | ||
|
|
a8c331f88a | ||
|
|
697feed257 | ||
|
|
3260ae76f1 | ||
|
|
a74ae46f86 | ||
|
|
33286aad39 | ||
|
|
d48a8770de | ||
|
|
ee5b707e68 | ||
|
|
d29a4a60f9 | ||
|
|
07b39fe44a | ||
|
|
e270cb20ba | ||
|
|
c44eb65993 | ||
|
|
6640fc9eb7 | ||
|
|
189668fbfb | ||
|
|
536b46158a | ||
|
|
8a08d3621b | ||
|
|
5517963b24 | ||
|
|
7994073687 | ||
|
|
c9e5a4c996 | ||
|
|
ed5fd140eb | ||
|
|
4f12eccde6 | ||
|
|
1f0db6d2fa | ||
|
|
eed6990b39 | ||
|
|
a554164d1d | ||
|
|
6ea30798bf | ||
|
|
3418b7adf6 | ||
|
|
88d5119c59 | ||
|
|
6e7d2f53aa | ||
|
|
559a318584 | ||
|
|
67499cbf06 | ||
|
|
0744ff2fa0 | ||
|
|
cfa6b28ceb | ||
|
|
ed77c03830 | ||
|
|
e4e4d0c0ec | ||
|
|
64291f731b | ||
|
|
084a2cc52c | ||
|
|
36771e821c | ||
|
|
927371b908 | ||
|
|
561f1eadfc | ||
|
|
6638fd88b4 | ||
|
|
c280ca35d6 | ||
|
|
3586cf79d4 | ||
|
|
972ba7bfdc | ||
|
|
5a4d8a7107 | ||
|
|
3e946c78d0 | ||
|
|
0855ff8b42 | ||
|
|
574b5551a0 | ||
|
|
c109daf1d8 | ||
|
|
c84f0de8f8 | ||
|
|
368e774ceb | ||
|
|
73a7a2d27a | ||
|
|
db4e00d394 | ||
|
|
b9bd96f0c7 | ||
|
|
c73829fe92 | ||
|
|
81b8046d1d | ||
|
|
a1c9f7a2c6 | ||
|
|
62509c20da | ||
|
|
96a79c2126 | ||
|
|
8d68b6a2e6 | ||
|
|
c8faca01f1 | ||
|
|
b267cbae36 | ||
|
|
ac87ce733d | ||
|
|
678a7d17df | ||
|
|
664132281e | ||
|
|
0be633d624 | ||
|
|
d8784d4155 | ||
|
|
e65b2a9fb3 | ||
|
|
7accdd52d8 | ||
|
|
2669068429 | ||
|
|
157bf89e89 | ||
|
|
6e264562ee | ||
|
|
2525eefefd | ||
|
|
0f6995e92a | ||
|
|
8f7c100e22 | ||
|
|
48e5b395b2 | ||
|
|
94797bb956 | ||
|
|
91b81d51da | ||
|
|
0c9e7aa074 | ||
|
|
48d6d7279d | ||
|
|
8e94eb67d2 | ||
|
|
1a2dae3471 | ||
|
|
f74a2536f1 | ||
|
|
ef3ac25406 | ||
|
|
0b4ea14e9a | ||
|
|
2381317eb3 | ||
|
|
e19ce69238 | ||
|
|
cd09501d4d | ||
|
|
e635e3e959 | ||
|
|
9efc4689cc | ||
|
|
25278becef | ||
|
|
fc7cb106c1 | ||
|
|
18ea7d1e13 | ||
|
|
eed1b8f412 | ||
|
|
a61e7e7c04 | ||
|
|
ce166b12ce | ||
|
|
315371bf7c | ||
|
|
afc752b4ce | ||
|
|
126f9ba05f | ||
|
|
c031951f4b | ||
|
|
c36e7a1d0b | ||
|
|
3a4fee4e6e | ||
|
|
2db181ea49 | ||
|
|
eee1a0e10a | ||
|
|
9594049804 | ||
|
|
c78022a74c | ||
|
|
3150c1f8b3 | ||
|
|
9f91b89467 | ||
|
|
d748851027 | ||
|
|
df499ea8ac | ||
|
|
b5da383a17 | ||
|
|
f9237285fd | ||
|
|
3c970c331c | ||
|
|
91705aa9fd | ||
|
|
56c7a238a4 | ||
|
|
3f28d6aef3 | ||
|
|
edbd597bf2 | ||
|
|
5e1bb20f32 | ||
|
|
7ebfa4c1d1 |
15
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
@@ -10,16 +10,25 @@ body:
|
|||||||
installation. If you're having trouble with installation or just looking for
|
installation. If you're having trouble with installation or just looking for
|
||||||
assistance with using NetBox, please visit our
|
assistance with using NetBox, please visit our
|
||||||
[discussion forum](https://github.com/netbox-community/netbox/discussions) instead.
|
[discussion forum](https://github.com/netbox-community/netbox/discussions) instead.
|
||||||
|
- type: dropdown
|
||||||
|
attributes:
|
||||||
|
label: Deployment Type
|
||||||
|
description: How are you running NetBox?
|
||||||
|
options:
|
||||||
|
- Self-hosted
|
||||||
|
- NetBox Cloud
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
- type: input
|
- type: input
|
||||||
attributes:
|
attributes:
|
||||||
label: NetBox version
|
label: NetBox Version
|
||||||
description: What version of NetBox are you currently running?
|
description: What version of NetBox are you currently running?
|
||||||
placeholder: v3.4.4
|
placeholder: v3.7.1
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: dropdown
|
- type: dropdown
|
||||||
attributes:
|
attributes:
|
||||||
label: Python version
|
label: Python Version
|
||||||
description: What version of Python are you currently running?
|
description: What version of Python are you currently running?
|
||||||
options:
|
options:
|
||||||
- "3.8"
|
- "3.8"
|
||||||
|
|||||||
14
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -3,10 +3,16 @@ blank_issues_enabled: false
|
|||||||
contact_links:
|
contact_links:
|
||||||
- name: 📖 Contributing Policy
|
- name: 📖 Contributing Policy
|
||||||
url: https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md
|
url: https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md
|
||||||
about: "Please read through our contributing policy before opening an issue or pull request"
|
about: "Please read through our contributing policy before opening an issue or pull request."
|
||||||
- name: ❓ Discussion
|
- name: ❓ Discussion
|
||||||
url: https://github.com/netbox-community/netbox/discussions
|
url: https://github.com/netbox-community/netbox/discussions
|
||||||
about: "If you're just looking for help, try starting a discussion instead"
|
about: "If you're just looking for help, try starting a discussion instead."
|
||||||
|
- name: 🌎 Correct a Translation
|
||||||
|
url: https://explore.transifex.com/netbox-community/netbox/
|
||||||
|
about: "Spot an incorrect translation? You can propose a fix on Transifex."
|
||||||
|
- name: 💡 Plugin Idea
|
||||||
|
url: https://plugin-ideas.netbox.dev
|
||||||
|
about: "Have an idea for a plugin? Head over to the ideas board!"
|
||||||
- name: 💬 Community Slack
|
- name: 💬 Community Slack
|
||||||
url: https://netdev.chat/
|
url: https://netdev.chat
|
||||||
about: "Join #netbox on the NetDev Community Slack for assistance with installation issues and other problems"
|
about: "Join #netbox on the NetDev Community Slack for assistance with installation issues and other problems."
|
||||||
|
|||||||
24
.github/ISSUE_TEMPLATE/deprecation.yaml
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
---
|
||||||
|
name: 🗑️ Deprecation
|
||||||
|
description: The removal of an existing feature or resource
|
||||||
|
labels: ["type: deprecation"]
|
||||||
|
body:
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Proposed Changes
|
||||||
|
description: >
|
||||||
|
Describe in detail the proposed changes. What is being removed?
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Justification
|
||||||
|
description: Please provide justification for the proposed change(s).
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Impact
|
||||||
|
description: List all areas of the application that will be affected by this change.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
2
.github/ISSUE_TEMPLATE/feature_request.yaml
vendored
@@ -14,7 +14,7 @@ body:
|
|||||||
attributes:
|
attributes:
|
||||||
label: NetBox version
|
label: NetBox version
|
||||||
description: What version of NetBox are you currently running?
|
description: What version of NetBox are you currently running?
|
||||||
placeholder: v3.4.4
|
placeholder: v3.7.1
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: dropdown
|
- type: dropdown
|
||||||
|
|||||||
37
.github/ISSUE_TEMPLATE/translation.yaml
vendored
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
---
|
||||||
|
name: 🌍 Translation
|
||||||
|
description: Request support for a new language in the user interface
|
||||||
|
labels: ["type: translation"]
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: >
|
||||||
|
**NOTE:** This template is used only for proposing the addition of *new* languages. Please do
|
||||||
|
not use it to request changes to existing translations.
|
||||||
|
- type: input
|
||||||
|
attributes:
|
||||||
|
label: Language
|
||||||
|
description: What is the name of the language in English?
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: input
|
||||||
|
attributes:
|
||||||
|
label: ISO 639-1 code
|
||||||
|
description: >
|
||||||
|
What is the two-letter [ISO 639-1 code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)
|
||||||
|
assigned to the language?
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: dropdown
|
||||||
|
attributes:
|
||||||
|
label: Volunteer
|
||||||
|
description: Are you a fluent speaker of this language **and** willing to contribute a translation map?
|
||||||
|
options:
|
||||||
|
- "Yes"
|
||||||
|
- "No"
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Comments
|
||||||
|
description: Any other notes you would like to share
|
||||||
8
.github/workflows/ci.yml
vendored
@@ -31,15 +31,15 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repo
|
- name: Check out repo
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
|
|
||||||
@@ -47,7 +47,7 @@ jobs:
|
|||||||
run: npm install -g yarn
|
run: npm install -g yarn
|
||||||
|
|
||||||
- name: Setup Node.js with Yarn Caching
|
- name: Setup Node.js with Yarn Caching
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
cache: yarn
|
cache: yarn
|
||||||
|
|||||||
2
.github/workflows/lock.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
|||||||
lock:
|
lock:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: dessant/lock-threads@v3
|
- uses: dessant/lock-threads@v4
|
||||||
with:
|
with:
|
||||||
issue-inactive-days: 90
|
issue-inactive-days: 90
|
||||||
pr-inactive-days: 30
|
pr-inactive-days: 30
|
||||||
|
|||||||
4
.github/workflows/stale.yml
vendored
@@ -15,7 +15,7 @@ jobs:
|
|||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v6
|
- uses: actions/stale@v8
|
||||||
with:
|
with:
|
||||||
close-issue-message: >
|
close-issue-message: >
|
||||||
This issue has been automatically closed due to lack of activity. In an
|
This issue has been automatically closed due to lack of activity. In an
|
||||||
@@ -24,7 +24,7 @@ jobs:
|
|||||||
necessary.
|
necessary.
|
||||||
close-pr-message: >
|
close-pr-message: >
|
||||||
This PR has been automatically closed due to lack of activity.
|
This PR has been automatically closed due to lack of activity.
|
||||||
days-before-stale: 60
|
days-before-stale: 90
|
||||||
days-before-close: 30
|
days-before-close: 30
|
||||||
exempt-issue-labels: 'status: accepted,status: blocked,status: needs milestone'
|
exempt-issue-labels: 'status: accepted,status: blocked,status: needs milestone'
|
||||||
operations-per-run: 100
|
operations-per-run: 100
|
||||||
|
|||||||
@@ -14,15 +14,30 @@
|
|||||||
</div>
|
</div>
|
||||||
<h3></h3>
|
<h3></h3>
|
||||||
|
|
||||||
Some general tips for engaging here on GitHub:
|
## :information_source: Welcome to the Stadium!
|
||||||
|
|
||||||
|
In her book [Working in Public](https://www.amazon.com/Working-Public-Making-Maintenance-Software/dp/0578675862), Nadia Eghbal defines four production models for open source projects, categorized by contributor and user growth: federations, clubs, toys, and stadiums. The NetBox project fits her definition of a stadium very well:
|
||||||
|
|
||||||
|
> Stadiums are projects with low contributor growth and high user growth. While they may receive casual contributions, their regular contributor base does not grow proportionately to their users. As a result, they tend to be powered by one or a few developers.
|
||||||
|
|
||||||
|
The bulk of NetBox's development is carried out by a handful of core maintainers, with occasional contributions from collaborators in the community. We find the stadium analogy very useful in conveying the roles and obligations of both contributors and users.
|
||||||
|
|
||||||
|
If you're a contributor, actively working on the center stage, you have an obligation to produce quality content that will benefit the project as a whole. Conversely, if you're in the audience consuming the work being produced, you have the option of making requests and suggestions, but must also recognize that contributors are under no obligation to act on them.
|
||||||
|
|
||||||
|
NetBox users are welcome to participate in either role, on stage or in the crowd. We ask only that you acknowledge the role you've chosen and respect the roles of others.
|
||||||
|
|
||||||
|
### General Tips for Working on GitHub
|
||||||
|
|
||||||
* Register for a free [GitHub account](https://github.com/signup) if you haven't already.
|
* Register for a free [GitHub account](https://github.com/signup) if you haven't already.
|
||||||
* You can use [GitHub Markdown](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax) for formatting text and adding images.
|
* You can use [GitHub Markdown](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax) for formatting text and adding images.
|
||||||
* To help mitigate notification spam, please avoid "bumping" issues with no activity. (To vote an issue up or down, use a :thumbsup: or :thumbsdown: reaction.)
|
* To help mitigate notification spam, please avoid "bumping" issues with no activity. (To vote an issue up or down, use a :thumbsup: or :thumbsdown: reaction.)
|
||||||
* Please avoid pinging members with `@` unless they've previously expressed interest or involvement with that particular issue.
|
* Please avoid pinging members with `@` unless they've previously expressed interest or involvement with that particular issue.
|
||||||
|
* Familiarize yourself with [this list of discussion anti-patterns](https://github.com/bradfitz/issue-tracker-behaviors) and make every effort to avoid them.
|
||||||
|
|
||||||
## :bug: Reporting Bugs
|
## :bug: Reporting Bugs
|
||||||
|
|
||||||
|
:warning: Bug reports are used to call attention to some unintended or unexpected behavior in NetBox, such as when an error occurs or when the result of taking some action is inconsistent with the documentation. **Bug reports may not be used to suggest new functionality**; please see "feature requests" below if that is your goal.
|
||||||
|
|
||||||
* First, ensure that you're running the [latest stable version](https://github.com/netbox-community/netbox/releases) of NetBox. If you're running an older version, it's likely that the bug has already been fixed.
|
* First, ensure that you're running the [latest stable version](https://github.com/netbox-community/netbox/releases) of NetBox. If you're running an older version, it's likely that the bug has already been fixed.
|
||||||
|
|
||||||
* Next, search our [issues list](https://github.com/netbox-community/netbox/issues?q=is%3Aissue) to see if the bug you've found has already been reported. If you come across a bug report that seems to match, please click "add a reaction" in the top right corner of the issue and add a thumbs up (:thumbsup:). This will help draw more attention to it. Any comments you can add to provide additional information or context would also be much appreciated.
|
* Next, search our [issues list](https://github.com/netbox-community/netbox/issues?q=is%3Aissue) to see if the bug you've found has already been reported. If you come across a bug report that seems to match, please click "add a reaction" in the top right corner of the issue and add a thumbs up (:thumbsup:). This will help draw more attention to it. Any comments you can add to provide additional information or context would also be much appreciated.
|
||||||
|
|||||||
153
README.md
@@ -1,78 +1,129 @@
|
|||||||
<div align="center">
|
<div align="center">
|
||||||
<img src="https://raw.githubusercontent.com/netbox-community/netbox/develop/docs/netbox_logo.svg" width="400" alt="NetBox logo" />
|
<img src="https://raw.githubusercontent.com/netbox-community/netbox/develop/docs/netbox_logo.svg" width="400" alt="NetBox logo" />
|
||||||
|
<p><strong>The cornerstone of every automated network</strong></p>
|
||||||
The premiere source of truth powering network automation
|
<a href="https://github.com/netbox-community/netbox/releases"><img src="https://img.shields.io/github/v/release/netbox-community/netbox" alt="Latest release" /></a>
|
||||||
|
<a href="https://github.com/netbox-community/netbox/blob/master/LICENSE.txt"><img src="https://img.shields.io/badge/license-Apache_2.0-blue.svg" alt="License" /></a>
|
||||||
|
<a href="https://github.com/netbox-community/netbox/graphs/contributors"><img src="https://img.shields.io/github/contributors/netbox-community/netbox?color=blue" alt="Contributors" /></a>
|
||||||
|
<a href="https://github.com/netbox-community/netbox/stargazers"><img src="https://img.shields.io/github/stars/netbox-community/netbox?style=flat" alt="GitHub stars" /></a>
|
||||||
|
<a href="https://explore.transifex.com/netbox-community/netbox/"><img src="https://img.shields.io/badge/languages-4-blue" alt="Languages supported" /></a>
|
||||||
|
<a href="https://github.com/netbox-community/netbox/actions/workflows/ci.yml"><img src="https://github.com/netbox-community/netbox/workflows/CI/badge.svg?branch=master" alt="CI status" /></a>
|
||||||
|
<p></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||

|
NetBox exists to empower network engineers. Since its release in 2016, it has become the go-to solution for modeling and documenting network infrastructure for thousands of organizations worldwide. As a successor to legacy IPAM and DCIM applications, NetBox provides a cohesive, extensive, and accessible data model for all things networked. By providing a single robust user interface and programmable APIs for everything from cable maps to device configurations, NetBox serves as the central source of truth for the modern network.
|
||||||
|
|
||||||
NetBox is the leading solution for modeling and documenting modern networks. By
|
<p align="center">
|
||||||
combining the traditional disciplines of IP address management (IPAM) and
|
<a href="#netboxs-role">NetBox's Role</a> |
|
||||||
datacenter infrastructure management (DCIM) with powerful APIs and extensions,
|
<a href="#why-netbox">Why NetBox?</a> |
|
||||||
NetBox provides the ideal "source of truth" to power network automation.
|
<a href="#getting-started">Getting Started</a> |
|
||||||
Available as open source software under the Apache 2.0 license, NetBox serves
|
<a href="#get-involved">Get Involved</a> |
|
||||||
as the cornerstone for network automation in thousands of organizations.
|
<a href="#project-stats">Project Stats</a> |
|
||||||
|
<a href="#screenshots">Screenshots</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
* **Physical infrasucture:** Accurately model the physical world, from global regions down to individual racks of gear. Then connect everything - network, console, and power!
|
<p align="center">
|
||||||
* **Modern IPAM:** All the standard IPAM functionality you expect, plus VRF import/export tracking, VLAN management, and overlay support.
|
<img src="docs/media/screenshots/home-light.png" width="600" alt="NetBox user interface screenshot" />
|
||||||
* **Data circuits:** Confidently manage the delivery of crtical circuits from various service providers, modeled seamlessly alongside your own infrastructure.
|
</p>
|
||||||
* **Power tracking:** Map the distribution of power from upstream sources to individual feeds and outlets.
|
|
||||||
* **Organization:** Manage tenant and contact assignments natively.
|
|
||||||
* **Powerful search:** Easily find anything you need using a single global search function.
|
|
||||||
* **Comprehensive logging:** Leverage both automatic change logging and user-submitted journal entries to track your network's growth over time.
|
|
||||||
* **Endless customization:** Custom fields, custom links, tags, export templates, custom validation, reports, scripts, and more!
|
|
||||||
* **Flexible permissions:** An advanced permissions systems enables very flexible delegation of permissions.
|
|
||||||
* **Integrations:** Easily connect NetBox to your other tooling via its REST & GraphQL APIs.
|
|
||||||
* **Plugins:** Not finding what you need in the core application? Try one of many community plugins - or build your own!
|
|
||||||
|
|
||||||

|
## NetBox's Role
|
||||||
|
|
||||||
|
NetBox functions as the **source of truth** for your network infrastructure. Its job is to define and validate the _intended state_ of all network components and resources. NetBox does not interact with network nodes directly; rather, it makes this data available programmatically to purpose-built automation, monitoring, and assurance tools. This separation of duties enables the construction of a robust yet flexible automation system.
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<img src="docs/media/misc/reference_architecture.png" alt="Reference network automation architecture" />
|
||||||
|
</p>
|
||||||
|
|
||||||
|
The diagram above illustrates the recommended deployment architecture for an automated network, leveraging NetBox as the central authority for network state. This approach allows your team to swap out individual tools to meet changing needs while retaining a predictable, modular workflow.
|
||||||
|
|
||||||
|
## Why NetBox?
|
||||||
|
|
||||||
|
### Comprehensive Data Model
|
||||||
|
|
||||||
|
Racks, devices, cables, IP addresses, VLANs, circuits, power, VPNs, and lots more: NetBox is built for networks. Its comprehensive and thoroughly inter-linked data model provides for natural and highly structured modeling of myriad network primitives that just isn't possible using general-purpose tools. And there's no need to waste time contemplating how to build out a database: Everything is ready to go upon installation.
|
||||||
|
|
||||||
|
### Focused Development
|
||||||
|
|
||||||
|
NetBox strives to meet a singular goal: Provide the best available solution for making network infrastructure programmatically accessible. Unlike "all-in-one" tools which awkwardly bolt on half-baked features in an attempt to check every box, NetBox is committed to its core function. NetBox provides the best possible solution for modeling network infrastructure, and provides rich APIs for integrating with tools that excel in other areas of network automation.
|
||||||
|
|
||||||
|
### Extensible and Customizable
|
||||||
|
|
||||||
|
No two networks are exactly the same. Users are empowered to extend NetBox's native data model with custom fields and tags to best suit their unique needs. You can even write your own plugins to introduce entirely new objects and functionality!
|
||||||
|
|
||||||
|
### Flexible Permissions
|
||||||
|
|
||||||
|
NetBox includes a fully customizable permission system, which affords administrators incredible granularity when assigning roles to users and groups. Want to restrict certain users to working only with cabling and not be able to change IP addresses? Or maybe each team should have access only to a particular tenant? NetBox enables you to craft roles as you see fit.
|
||||||
|
|
||||||
|
### Custom Validation & Protection Rules
|
||||||
|
|
||||||
|
The data you put into NetBox is crucial to network operations. In addition to its robust native validation rules, NetBox provides mechanisms for administrators to define their own custom validation rules for objects. Custom validation can be used both to ensure new or modified objects adhere to a set of rules, and to prevent the deletion of objects which don't meet certain criteria. (For example, you might want to prevent the deletion of a device with an "active" status.)
|
||||||
|
|
||||||
|
### Device Configuration Rendering
|
||||||
|
|
||||||
|
NetBox can render user-created Jinja2 templates to generate device configurations from its own data. Configuration templates can be uploaded individually or pulled automatically from an external source, such as a git repository. Rendered configurations can be retrieved via the REST API for application directly to network devices via a provisioning tool such as Ansible or Salt.
|
||||||
|
|
||||||
|
### Custom Scripts
|
||||||
|
|
||||||
|
Complex workflows, such as provisioning a new branch office, can be tedious to carry out via the user interface. NetBox allows you to write and upload custom scripts that can be run directly from the UI. Scripts prompt users for input and then automate the necessary tasks to greatly simplify otherwise burdensome processes.
|
||||||
|
|
||||||
|
### Automated Events
|
||||||
|
|
||||||
|
Users can define event rules to automatically trigger a custom script or outbound webhook in response to a NetBox event. For example, you might want to automatically update a network monitoring service whenever a new device is added to NetBox, or update a DHCP server when an IP range is allocated.
|
||||||
|
|
||||||
|
### Comprehensive Change Logging
|
||||||
|
|
||||||
|
NetBox automatically logs the creation, modification, and deletion of all managed objects, providing a thorough change history. Changes can be attributed to the executing user, and related changes are grouped automatically by request ID.
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> A complete list of NetBox's myriad features can be found in [the introductory documentation](https://docs.netbox.dev/en/stable/introduction/).
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
* Just want to explore? Check out [our public demo](https://demo.netbox.dev/) right now!
|
* Just want to explore? Check out [our public demo](https://demo.netbox.dev/) right now!
|
||||||
* The [official documentation](https://docs.netbox.dev) offers a comprehensive introduction.
|
* The [official documentation](https://docs.netbox.dev) offers a comprehensive introduction.
|
||||||
* Choose your deployment: [self-hosted](https://github.com/netbox-community/netbox), [Docker](https://github.com/netbox-community/netbox-docker), or [NetBox Cloud](https://netboxlabs.com/netbox-cloud/).
|
|
||||||
* Check out [our wiki](https://github.com/netbox-community/netbox/wiki/Community-Contributions) for even more projects to get the most out of NetBox!
|
* Check out [our wiki](https://github.com/netbox-community/netbox/wiki/Community-Contributions) for even more projects to get the most out of NetBox!
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://netboxlabs.com/netbox-cloud/"><img src="docs/media/misc/netbox_cloud.png" alt="NetBox Cloud" /></a><br />
|
||||||
|
Looking for an enterprise solution? Check out <strong><a href="https://netboxlabs.com/netbox-cloud/">NetBox Cloud</a></strong>!
|
||||||
|
</p>
|
||||||
|
|
||||||
## Get Involved
|
## Get Involved
|
||||||
|
|
||||||
* Follow [@NetBoxOfficial](https://twitter.com/NetBoxOfficial) on Twitter!
|
* Follow [@NetBoxOfficial](https://twitter.com/NetBoxOfficial) on Twitter!
|
||||||
* Join the conversation on [the discussion forum](https://github.com/netbox-community/netbox/discussions) and [Slack](https://netdev.chat/)!
|
* Join the conversation on [the discussion forum](https://github.com/netbox-community/netbox/discussions) and [Slack](https://netdev.chat/)!
|
||||||
* Already a power user? You can [suggest a feature](https://github.com/netbox-community/netbox/issues/new?assignees=&labels=type%3A+feature&template=feature_request.yaml) or [report a bug](https://github.com/netbox-community/netbox/issues/new?assignees=&labels=type%3A+bug&template=bug_report.yaml) on GitHub.
|
* Already a power user? You can [suggest a feature](https://github.com/netbox-community/netbox/issues/new?assignees=&labels=type%3A+feature&template=feature_request.yaml) or [report a bug](https://github.com/netbox-community/netbox/issues/new?assignees=&labels=type%3A+bug&template=bug_report.yaml) on GitHub.
|
||||||
* Contributions from the community are encouraged and appreciated! Check out our [contributing guide](CONTRIBUTING.md) to get started.
|
* Contributions from the community are encouraged and appreciated! Check out our [contributing guide](CONTRIBUTING.md) to get started.
|
||||||
|
* [Share your idea](https://plugin-ideas.netbox.dev/) for a new plugin, or [learn how to build one](https://github.com/netbox-community/netbox-plugin-tutorial) yourself!
|
||||||
|
|
||||||
## Project Stats
|
## Project Stats
|
||||||
|
|
||||||
<div align="center">
|
<p align="center">
|
||||||
<a href="https://github.com/netbox-community/netbox/commits"><img src="https://images.repography.com/29023055/netbox-community/netbox/recent-activity/31db894eee74b8a5475e3af307a81b6c_timeline.svg" alt="Timeline graph"></a>
|
<a href="https://github.com/netbox-community/netbox/commits"><img src="https://images.repography.com/29023055/netbox-community/netbox/recent-activity/whQtEr_TGD9PhW1BPlhlEQ5jnrgQ0KJpm-LlGtpoGO0/3Kx_iWUSBRJ5-AI4QwJEJWrUDEz3KrX2lvh8aYE0WXY_timeline.svg" alt="Timeline graph"></a>
|
||||||
<a href="https://github.com/netbox-community/netbox/issues"><img src="https://images.repography.com/29023055/netbox-community/netbox/recent-activity/31db894eee74b8a5475e3af307a81b6c_issues.svg" alt="Issues graph"></a>
|
<a href="https://github.com/netbox-community/netbox/issues"><img src="https://images.repography.com/29023055/netbox-community/netbox/recent-activity/whQtEr_TGD9PhW1BPlhlEQ5jnrgQ0KJpm-LlGtpoGO0/3Kx_iWUSBRJ5-AI4QwJEJWrUDEz3KrX2lvh8aYE0WXY_issues.svg" alt="Issues graph"></a>
|
||||||
<a href="https://github.com/netbox-community/netbox/pulls"><img src="https://images.repography.com/29023055/netbox-community/netbox/recent-activity/31db894eee74b8a5475e3af307a81b6c_prs.svg" alt="Pull requests graph"></a>
|
<a href="https://github.com/netbox-community/netbox/pulls"><img src="https://images.repography.com/29023055/netbox-community/netbox/recent-activity/whQtEr_TGD9PhW1BPlhlEQ5jnrgQ0KJpm-LlGtpoGO0/3Kx_iWUSBRJ5-AI4QwJEJWrUDEz3KrX2lvh8aYE0WXY_prs.svg" alt="Pull requests graph"></a>
|
||||||
<a href="https://github.com/netbox-community/netbox/graphs/contributors"><img src="https://images.repography.com/29023055/netbox-community/netbox/recent-activity/31db894eee74b8a5475e3af307a81b6c_users.svg" alt="Top contributors"></a>
|
<a href="https://github.com/netbox-community/netbox/graphs/contributors"><img src="https://images.repography.com/29023055/netbox-community/netbox/recent-activity/whQtEr_TGD9PhW1BPlhlEQ5jnrgQ0KJpm-LlGtpoGO0/3Kx_iWUSBRJ5-AI4QwJEJWrUDEz3KrX2lvh8aYE0WXY_users.svg" alt="Top contributors"></a>
|
||||||
<br />Stats via <a href="https://repography.com">Repography</a>
|
<br />Stats via <a href="https://repography.com">Repography</a>
|
||||||
</div>
|
</p>
|
||||||
|
|
||||||
## Sponsors
|
|
||||||
|
|
||||||
<div align="center">
|
|
||||||
|
|
||||||
[](https://netboxlabs.com)
|
|
||||||
|
|
||||||
[](https://try.digitalocean.com/developer-cloud)
|
|
||||||
|
|
||||||
[](https://ns1.com)
|
|
||||||
<br />
|
|
||||||
[](https://sentry.io)
|
|
||||||
|
|
||||||
[](https://metal.equinix.com)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||
")
|
<p align="center">
|
||||||
|
<strong>NetBox Dashboard (Light Mode)</strong><br />
|
||||||

|
<img src="docs/media/screenshots/home-light.png" width="600" alt="NetBox dashboard (light mode)" />
|
||||||
|
</p>
|
||||||

|
<p align="center">
|
||||||
|
<strong>NetBox Dashboard (Dark Mode)</strong><br />
|
||||||

|
<img src="docs/media/screenshots/home-dark.png" width="600" alt="NetBox dashboard (dark mode)" />
|
||||||
|
</p>
|
||||||
|
<p align="center">
|
||||||
|
<strong>Prefixes List</strong><br />
|
||||||
|
<img src="docs/media/screenshots/prefixes-list.png" width="600" alt="Prefixes list" />
|
||||||
|
</p>
|
||||||
|
<p align="center">
|
||||||
|
<strong>Rack View</strong><br />
|
||||||
|
<img src="docs/media/screenshots/rack.png" width="600" alt="Rack view" />
|
||||||
|
</p>
|
||||||
|
<p align="center">
|
||||||
|
<strong>Cable Trace</strong><br />
|
||||||
|
<img src="docs/media/screenshots/cable-trace.png" width="600" alt="Cable trace" />
|
||||||
|
</p>
|
||||||
|
|||||||
@@ -1,57 +1,58 @@
|
|||||||
# HTML sanitizer
|
# HTML sanitizer
|
||||||
# https://github.com/mozilla/bleach
|
# https://github.com/mozilla/bleach/blob/main/CHANGES
|
||||||
bleach<6.0
|
bleach
|
||||||
|
|
||||||
# The Python web framework on which NetBox is built
|
# The Python web framework on which NetBox is built
|
||||||
# https://github.com/django/django
|
# https://docs.djangoproject.com/en/stable/releases/
|
||||||
Django<4.2
|
Django<5.0
|
||||||
|
|
||||||
# Django middleware which permits cross-domain API requests
|
# Django middleware which permits cross-domain API requests
|
||||||
# https://github.com/OttoYiu/django-cors-headers
|
# https://github.com/adamchainz/django-cors-headers/blob/main/CHANGELOG.rst
|
||||||
django-cors-headers
|
django-cors-headers
|
||||||
|
|
||||||
# Runtime UI tool for debugging Django
|
# Runtime UI tool for debugging Django
|
||||||
# https://github.com/jazzband/django-debug-toolbar
|
# https://github.com/jazzband/django-debug-toolbar/blob/main/docs/changes.rst
|
||||||
django-debug-toolbar
|
django-debug-toolbar
|
||||||
|
|
||||||
# Library for writing reusable URL query filters
|
# Library for writing reusable URL query filters
|
||||||
# https://github.com/carltongibson/django-filter
|
# https://github.com/carltongibson/django-filter/blob/main/CHANGES.rst
|
||||||
django-filter
|
django-filter
|
||||||
|
|
||||||
# Django debug toolbar extension with support for GraphiQL
|
# Django debug toolbar extension with support for GraphiQL
|
||||||
# https://github.com/flavors/django-graphiql-debug-toolbar/
|
# https://github.com/flavors/django-graphiql-debug-toolbar/blob/main/CHANGES.rst
|
||||||
django-graphiql-debug-toolbar
|
django-graphiql-debug-toolbar
|
||||||
|
|
||||||
# Modified Preorder Tree Traversal (recursive nesting of objects)
|
# Modified Preorder Tree Traversal (recursive nesting of objects)
|
||||||
# https://github.com/django-mptt/django-mptt
|
# Pinned to 0.14.0; 0.15.0 requires Python 3.9+
|
||||||
django-mptt
|
# https://github.com/django-mptt/django-mptt/blob/main/CHANGELOG.rst
|
||||||
|
django-mptt==0.14.0
|
||||||
|
|
||||||
# Context managers for PostgreSQL advisory locks
|
# Context managers for PostgreSQL advisory locks
|
||||||
# https://github.com/Xof/django-pglocks
|
# https://github.com/Xof/django-pglocks/blob/master/CHANGES.txt
|
||||||
django-pglocks
|
django-pglocks
|
||||||
|
|
||||||
# Prometheus metrics library for Django
|
# Prometheus metrics library for Django
|
||||||
# https://github.com/korfuri/django-prometheus
|
# https://github.com/korfuri/django-prometheus/blob/master/CHANGELOG.md
|
||||||
django-prometheus
|
django-prometheus
|
||||||
|
|
||||||
# Django caching backend using Redis
|
# Django caching backend using Redis
|
||||||
# https://github.com/jazzband/django-redis
|
# https://github.com/jazzband/django-redis/blob/master/CHANGELOG.rst
|
||||||
django-redis
|
django-redis
|
||||||
|
|
||||||
# Django extensions for Rich (terminal text rendering)
|
# Django extensions for Rich (terminal text rendering)
|
||||||
# https://github.com/adamchainz/django-rich
|
# https://github.com/adamchainz/django-rich/blob/main/CHANGELOG.rst
|
||||||
django-rich
|
django-rich
|
||||||
|
|
||||||
# Django integration for RQ (Reqis queuing)
|
# Django integration for RQ (Reqis queuing)
|
||||||
# https://github.com/rq/django-rq
|
# https://github.com/rq/django-rq/blob/master/CHANGELOG.md
|
||||||
django-rq
|
django-rq
|
||||||
|
|
||||||
# Abstraction models for rendering and paginating HTML tables
|
# Abstraction models for rendering and paginating HTML tables
|
||||||
# https://github.com/jieter/django-tables2
|
# https://github.com/jieter/django-tables2/blob/master/CHANGELOG.md
|
||||||
django-tables2
|
django-tables2
|
||||||
|
|
||||||
# User-defined tags for objects
|
# User-defined tags for objects
|
||||||
# https://github.com/alex/django-taggit
|
# https://github.com/jazzband/django-taggit/blob/master/CHANGELOG.rst
|
||||||
django-taggit
|
django-taggit
|
||||||
|
|
||||||
# A Django field for representing time zones
|
# A Django field for representing time zones
|
||||||
@@ -59,78 +60,86 @@ django-taggit
|
|||||||
django-timezone-field
|
django-timezone-field
|
||||||
|
|
||||||
# A REST API framework for Django projects
|
# A REST API framework for Django projects
|
||||||
# https://github.com/encode/django-rest-framework
|
# https://www.django-rest-framework.org/community/release-notes/
|
||||||
djangorestframework
|
djangorestframework
|
||||||
|
|
||||||
# Swagger/OpenAPI schema generation for REST APIs
|
# Sane and flexible OpenAPI 3 schema generation for Django REST framework.
|
||||||
# https://github.com/axnsan12/drf-yasg
|
# https://github.com/tfranzel/drf-spectacular/blob/master/CHANGELOG.rst
|
||||||
drf-yasg[validation]
|
drf-spectacular
|
||||||
|
|
||||||
|
# Serve self-contained distribution builds of Swagger UI and Redoc with Django.
|
||||||
|
# https://github.com/tfranzel/drf-spectacular-sidecar
|
||||||
|
drf-spectacular-sidecar
|
||||||
|
|
||||||
|
# RSS feed parser
|
||||||
|
# https://github.com/kurtmckee/feedparser/blob/develop/CHANGELOG.rst
|
||||||
|
feedparser
|
||||||
|
|
||||||
# Django wrapper for Graphene (GraphQL support)
|
# Django wrapper for Graphene (GraphQL support)
|
||||||
# https://github.com/graphql-python/graphene-django
|
# https://github.com/graphql-python/graphene-django/releases
|
||||||
graphene_django
|
# Pinned to v3.0.0 for GraphiQL UI issue (see #12762)
|
||||||
|
graphene_django==3.0.0
|
||||||
|
|
||||||
# WSGI HTTP server
|
# WSGI HTTP server
|
||||||
# https://gunicorn.org/
|
# https://docs.gunicorn.org/en/latest/news.html
|
||||||
gunicorn
|
gunicorn
|
||||||
|
|
||||||
# Platform-agnostic template rendering engine
|
# Platform-agnostic template rendering engine
|
||||||
# https://github.com/pallets/jinja
|
# https://jinja.palletsprojects.com/changes/
|
||||||
Jinja2
|
Jinja2
|
||||||
|
|
||||||
# Simple markup language for rendering HTML
|
# Simple markup language for rendering HTML
|
||||||
# https://github.com/Python-Markdown/markdown
|
# https://python-markdown.github.io/changelog/
|
||||||
# mkdocs currently requires Markdown v3.3
|
Markdown
|
||||||
Markdown<3.4
|
|
||||||
|
|
||||||
# File inclusion plugin for Python-Markdown
|
# File inclusion plugin for Python-Markdown
|
||||||
# https://github.com/cmacmackin/markdown-include
|
# https://github.com/cmacmackin/markdown-include
|
||||||
markdown-include
|
markdown-include
|
||||||
|
|
||||||
# MkDocs Material theme (for documentation build)
|
# MkDocs Material theme (for documentation build)
|
||||||
# https://github.com/squidfunk/mkdocs-material
|
# https://squidfunk.github.io/mkdocs-material/changelog/
|
||||||
mkdocs-material
|
mkdocs-material
|
||||||
|
|
||||||
# Introspection for embedded code
|
# Introspection for embedded code
|
||||||
# https://github.com/mkdocstrings/mkdocstrings
|
# https://github.com/mkdocstrings/mkdocstrings/blob/master/CHANGELOG.md
|
||||||
mkdocstrings[python-legacy]
|
mkdocstrings[python-legacy]
|
||||||
|
|
||||||
# Library for manipulating IP prefixes and addresses
|
# Library for manipulating IP prefixes and addresses
|
||||||
# https://github.com/netaddr/netaddr
|
# https://github.com/netaddr/netaddr/blob/master/CHANGELOG
|
||||||
netaddr
|
netaddr
|
||||||
|
|
||||||
# Fork of PIL (Python Imaging Library) for image processing
|
# Fork of PIL (Python Imaging Library) for image processing
|
||||||
# https://github.com/python-pillow/Pillow
|
# https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst
|
||||||
Pillow
|
Pillow
|
||||||
|
|
||||||
# PostgreSQL database adapter for Python
|
# PostgreSQL database adapter for Python
|
||||||
# https://github.com/psycopg/psycopg2
|
# https://github.com/psycopg/psycopg/blob/master/docs/news.rst
|
||||||
psycopg2-binary
|
psycopg[binary,pool]
|
||||||
|
|
||||||
# YAML rendering library
|
# YAML rendering library
|
||||||
# https://github.com/yaml/pyyaml
|
# https://github.com/yaml/pyyaml/blob/master/CHANGES
|
||||||
PyYAML
|
PyYAML
|
||||||
|
|
||||||
# Sentry SDK
|
# Requests
|
||||||
# https://github.com/getsentry/sentry-python
|
# https://github.com/psf/requests/blob/main/HISTORY.md
|
||||||
sentry-sdk
|
requests
|
||||||
|
|
||||||
# Social authentication framework
|
# Social authentication framework
|
||||||
# https://github.com/python-social-auth/social-core
|
# https://github.com/python-social-auth/social-core/blob/master/CHANGELOG.md
|
||||||
social-auth-core
|
social-auth-core
|
||||||
|
|
||||||
# Django app for social-auth-core
|
# Django app for social-auth-core
|
||||||
# https://github.com/python-social-auth/social-app-django
|
# https://github.com/python-social-auth/social-app-django/blob/master/CHANGELOG.md
|
||||||
social-auth-app-django
|
social-auth-app-django
|
||||||
|
|
||||||
# SVG image rendering (used for rack elevations)
|
# SVG image rendering (used for rack elevations)
|
||||||
# https://github.com/mozman/svgwrite
|
# hhttps://github.com/mozman/svgwrite/blob/master/NEWS.rst
|
||||||
svgwrite
|
svgwrite
|
||||||
|
|
||||||
# Tabular dataset library (for table-based exports)
|
# Tabular dataset library (for table-based exports)
|
||||||
# https://github.com/jazzband/tablib
|
# https://github.com/jazzband/tablib/blob/master/HISTORY.md
|
||||||
tablib
|
tablib
|
||||||
|
|
||||||
# Timezone data (required by django-timezone-field on Python 3.9+)
|
# Timezone data (required by django-timezone-field on Python 3.9+)
|
||||||
# https://github.com/python/tzdata
|
# https://github.com/python/tzdata/blob/master/NEWS.md
|
||||||
tzdata
|
tzdata
|
||||||
|
|||||||
@@ -1,3 +1,12 @@
|
|||||||
|
<VirtualHost *:80>
|
||||||
|
# CHANGE THIS TO YOUR SERVER'S NAME
|
||||||
|
ServerName netbox.example.com
|
||||||
|
|
||||||
|
RewriteEngine On
|
||||||
|
RewriteCond %{HTTPS} !=on
|
||||||
|
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
|
||||||
|
</VirtualHost>
|
||||||
|
|
||||||
<VirtualHost *:443>
|
<VirtualHost *:443>
|
||||||
ProxyPreserveHost On
|
ProxyPreserveHost On
|
||||||
|
|
||||||
|
|||||||
564
contrib/generated_schema.json
Normal file
@@ -0,0 +1,564 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"definitions": {
|
||||||
|
"airflow": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"front-to-rear",
|
||||||
|
"rear-to-front",
|
||||||
|
"left-to-right",
|
||||||
|
"right-to-left",
|
||||||
|
"side-to-rear",
|
||||||
|
"passive",
|
||||||
|
"mixed"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"weight-unit": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"kg",
|
||||||
|
"g",
|
||||||
|
"lb",
|
||||||
|
"oz"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"subdevice-role": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"parent",
|
||||||
|
"child"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"console-port": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"de-9",
|
||||||
|
"db-25",
|
||||||
|
"rj-11",
|
||||||
|
"rj-12",
|
||||||
|
"rj-45",
|
||||||
|
"mini-din-8",
|
||||||
|
"usb-a",
|
||||||
|
"usb-b",
|
||||||
|
"usb-c",
|
||||||
|
"usb-mini-a",
|
||||||
|
"usb-mini-b",
|
||||||
|
"usb-micro-a",
|
||||||
|
"usb-micro-b",
|
||||||
|
"usb-micro-ab",
|
||||||
|
"other"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"console-server-port": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"de-9",
|
||||||
|
"db-25",
|
||||||
|
"rj-11",
|
||||||
|
"rj-12",
|
||||||
|
"rj-45",
|
||||||
|
"mini-din-8",
|
||||||
|
"usb-a",
|
||||||
|
"usb-b",
|
||||||
|
"usb-c",
|
||||||
|
"usb-mini-a",
|
||||||
|
"usb-mini-b",
|
||||||
|
"usb-micro-a",
|
||||||
|
"usb-micro-b",
|
||||||
|
"usb-micro-ab",
|
||||||
|
"other"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"power-port": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"iec-60320-c6",
|
||||||
|
"iec-60320-c8",
|
||||||
|
"iec-60320-c14",
|
||||||
|
"iec-60320-c16",
|
||||||
|
"iec-60320-c20",
|
||||||
|
"iec-60320-c22",
|
||||||
|
"iec-60309-p-n-e-4h",
|
||||||
|
"iec-60309-p-n-e-6h",
|
||||||
|
"iec-60309-p-n-e-9h",
|
||||||
|
"iec-60309-2p-e-4h",
|
||||||
|
"iec-60309-2p-e-6h",
|
||||||
|
"iec-60309-2p-e-9h",
|
||||||
|
"iec-60309-3p-e-4h",
|
||||||
|
"iec-60309-3p-e-6h",
|
||||||
|
"iec-60309-3p-e-9h",
|
||||||
|
"iec-60309-3p-n-e-4h",
|
||||||
|
"iec-60309-3p-n-e-6h",
|
||||||
|
"iec-60309-3p-n-e-9h",
|
||||||
|
"iec-60906-1",
|
||||||
|
"nbr-14136-10a",
|
||||||
|
"nbr-14136-20a",
|
||||||
|
"nema-1-15p",
|
||||||
|
"nema-5-15p",
|
||||||
|
"nema-5-20p",
|
||||||
|
"nema-5-30p",
|
||||||
|
"nema-5-50p",
|
||||||
|
"nema-6-15p",
|
||||||
|
"nema-6-20p",
|
||||||
|
"nema-6-30p",
|
||||||
|
"nema-6-50p",
|
||||||
|
"nema-10-30p",
|
||||||
|
"nema-10-50p",
|
||||||
|
"nema-14-20p",
|
||||||
|
"nema-14-30p",
|
||||||
|
"nema-14-50p",
|
||||||
|
"nema-14-60p",
|
||||||
|
"nema-15-15p",
|
||||||
|
"nema-15-20p",
|
||||||
|
"nema-15-30p",
|
||||||
|
"nema-15-50p",
|
||||||
|
"nema-15-60p",
|
||||||
|
"nema-l1-15p",
|
||||||
|
"nema-l5-15p",
|
||||||
|
"nema-l5-20p",
|
||||||
|
"nema-l5-30p",
|
||||||
|
"nema-l5-50p",
|
||||||
|
"nema-l6-15p",
|
||||||
|
"nema-l6-20p",
|
||||||
|
"nema-l6-30p",
|
||||||
|
"nema-l6-50p",
|
||||||
|
"nema-l10-30p",
|
||||||
|
"nema-l14-20p",
|
||||||
|
"nema-l14-30p",
|
||||||
|
"nema-l14-50p",
|
||||||
|
"nema-l14-60p",
|
||||||
|
"nema-l15-20p",
|
||||||
|
"nema-l15-30p",
|
||||||
|
"nema-l15-50p",
|
||||||
|
"nema-l15-60p",
|
||||||
|
"nema-l21-20p",
|
||||||
|
"nema-l21-30p",
|
||||||
|
"nema-l22-30p",
|
||||||
|
"cs6361c",
|
||||||
|
"cs6365c",
|
||||||
|
"cs8165c",
|
||||||
|
"cs8265c",
|
||||||
|
"cs8365c",
|
||||||
|
"cs8465c",
|
||||||
|
"ita-c",
|
||||||
|
"ita-e",
|
||||||
|
"ita-f",
|
||||||
|
"ita-ef",
|
||||||
|
"ita-g",
|
||||||
|
"ita-h",
|
||||||
|
"ita-i",
|
||||||
|
"ita-j",
|
||||||
|
"ita-k",
|
||||||
|
"ita-l",
|
||||||
|
"ita-m",
|
||||||
|
"ita-n",
|
||||||
|
"ita-o",
|
||||||
|
"usb-a",
|
||||||
|
"usb-b",
|
||||||
|
"usb-c",
|
||||||
|
"usb-mini-a",
|
||||||
|
"usb-mini-b",
|
||||||
|
"usb-micro-a",
|
||||||
|
"usb-micro-b",
|
||||||
|
"usb-micro-ab",
|
||||||
|
"usb-3-b",
|
||||||
|
"usb-3-micro-b",
|
||||||
|
"dc-terminal",
|
||||||
|
"saf-d-grid",
|
||||||
|
"neutrik-powercon-20",
|
||||||
|
"neutrik-powercon-32",
|
||||||
|
"neutrik-powercon-true1",
|
||||||
|
"neutrik-powercon-true1-top",
|
||||||
|
"ubiquiti-smartpower",
|
||||||
|
"hardwired",
|
||||||
|
"other"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"power-outlet": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"iec-60320-c5",
|
||||||
|
"iec-60320-c7",
|
||||||
|
"iec-60320-c13",
|
||||||
|
"iec-60320-c15",
|
||||||
|
"iec-60320-c19",
|
||||||
|
"iec-60320-c21",
|
||||||
|
"iec-60309-p-n-e-4h",
|
||||||
|
"iec-60309-p-n-e-6h",
|
||||||
|
"iec-60309-p-n-e-9h",
|
||||||
|
"iec-60309-2p-e-4h",
|
||||||
|
"iec-60309-2p-e-6h",
|
||||||
|
"iec-60309-2p-e-9h",
|
||||||
|
"iec-60309-3p-e-4h",
|
||||||
|
"iec-60309-3p-e-6h",
|
||||||
|
"iec-60309-3p-e-9h",
|
||||||
|
"iec-60309-3p-n-e-4h",
|
||||||
|
"iec-60309-3p-n-e-6h",
|
||||||
|
"iec-60309-3p-n-e-9h",
|
||||||
|
"iec-60906-1",
|
||||||
|
"nbr-14136-10a",
|
||||||
|
"nbr-14136-20a",
|
||||||
|
"nema-1-15r",
|
||||||
|
"nema-5-15r",
|
||||||
|
"nema-5-20r",
|
||||||
|
"nema-5-30r",
|
||||||
|
"nema-5-50r",
|
||||||
|
"nema-6-15r",
|
||||||
|
"nema-6-20r",
|
||||||
|
"nema-6-30r",
|
||||||
|
"nema-6-50r",
|
||||||
|
"nema-10-30r",
|
||||||
|
"nema-10-50r",
|
||||||
|
"nema-14-20r",
|
||||||
|
"nema-14-30r",
|
||||||
|
"nema-14-50r",
|
||||||
|
"nema-14-60r",
|
||||||
|
"nema-15-15r",
|
||||||
|
"nema-15-20r",
|
||||||
|
"nema-15-30r",
|
||||||
|
"nema-15-50r",
|
||||||
|
"nema-15-60r",
|
||||||
|
"nema-l1-15r",
|
||||||
|
"nema-l5-15r",
|
||||||
|
"nema-l5-20r",
|
||||||
|
"nema-l5-30r",
|
||||||
|
"nema-l5-50r",
|
||||||
|
"nema-l6-15r",
|
||||||
|
"nema-l6-20r",
|
||||||
|
"nema-l6-30r",
|
||||||
|
"nema-l6-50r",
|
||||||
|
"nema-l10-30r",
|
||||||
|
"nema-l14-20r",
|
||||||
|
"nema-l14-30r",
|
||||||
|
"nema-l14-50r",
|
||||||
|
"nema-l14-60r",
|
||||||
|
"nema-l15-20r",
|
||||||
|
"nema-l15-30r",
|
||||||
|
"nema-l15-50r",
|
||||||
|
"nema-l15-60r",
|
||||||
|
"nema-l21-20r",
|
||||||
|
"nema-l21-30r",
|
||||||
|
"nema-l22-30r",
|
||||||
|
"CS6360C",
|
||||||
|
"CS6364C",
|
||||||
|
"CS8164C",
|
||||||
|
"CS8264C",
|
||||||
|
"CS8364C",
|
||||||
|
"CS8464C",
|
||||||
|
"ita-e",
|
||||||
|
"ita-f",
|
||||||
|
"ita-g",
|
||||||
|
"ita-h",
|
||||||
|
"ita-i",
|
||||||
|
"ita-j",
|
||||||
|
"ita-k",
|
||||||
|
"ita-l",
|
||||||
|
"ita-m",
|
||||||
|
"ita-n",
|
||||||
|
"ita-o",
|
||||||
|
"ita-multistandard",
|
||||||
|
"usb-a",
|
||||||
|
"usb-micro-b",
|
||||||
|
"usb-c",
|
||||||
|
"dc-terminal",
|
||||||
|
"hdot-cx",
|
||||||
|
"saf-d-grid",
|
||||||
|
"neutrik-powercon-20a",
|
||||||
|
"neutrik-powercon-32a",
|
||||||
|
"neutrik-powercon-true1",
|
||||||
|
"neutrik-powercon-true1-top",
|
||||||
|
"ubiquiti-smartpower",
|
||||||
|
"hardwired",
|
||||||
|
"other"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"feed-leg": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"A",
|
||||||
|
"B",
|
||||||
|
"C"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"interface": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"virtual",
|
||||||
|
"bridge",
|
||||||
|
"lag",
|
||||||
|
"100base-fx",
|
||||||
|
"100base-lfx",
|
||||||
|
"100base-tx",
|
||||||
|
"100base-t1",
|
||||||
|
"1000base-t",
|
||||||
|
"2.5gbase-t",
|
||||||
|
"5gbase-t",
|
||||||
|
"10gbase-t",
|
||||||
|
"10gbase-cx4",
|
||||||
|
"1000base-x-gbic",
|
||||||
|
"1000base-x-sfp",
|
||||||
|
"10gbase-x-sfpp",
|
||||||
|
"10gbase-x-xfp",
|
||||||
|
"10gbase-x-xenpak",
|
||||||
|
"10gbase-x-x2",
|
||||||
|
"25gbase-x-sfp28",
|
||||||
|
"50gbase-x-sfp56",
|
||||||
|
"40gbase-x-qsfpp",
|
||||||
|
"50gbase-x-sfp28",
|
||||||
|
"100gbase-x-cfp",
|
||||||
|
"100gbase-x-cfp2",
|
||||||
|
"200gbase-x-cfp2",
|
||||||
|
"400gbase-x-cfp2",
|
||||||
|
"100gbase-x-cfp4",
|
||||||
|
"100gbase-x-cxp",
|
||||||
|
"100gbase-x-cpak",
|
||||||
|
"100gbase-x-dsfp",
|
||||||
|
"100gbase-x-sfpdd",
|
||||||
|
"100gbase-x-qsfp28",
|
||||||
|
"100gbase-x-qsfpdd",
|
||||||
|
"200gbase-x-qsfp56",
|
||||||
|
"200gbase-x-qsfpdd",
|
||||||
|
"400gbase-x-qsfp112",
|
||||||
|
"400gbase-x-qsfpdd",
|
||||||
|
"400gbase-x-osfp",
|
||||||
|
"400gbase-x-osfp-rhs",
|
||||||
|
"400gbase-x-cdfp",
|
||||||
|
"400gbase-x-cfp8",
|
||||||
|
"800gbase-x-qsfpdd",
|
||||||
|
"800gbase-x-osfp",
|
||||||
|
"1000base-kx",
|
||||||
|
"10gbase-kr",
|
||||||
|
"10gbase-kx4",
|
||||||
|
"25gbase-kr",
|
||||||
|
"40gbase-kr4",
|
||||||
|
"50gbase-kr",
|
||||||
|
"100gbase-kp4",
|
||||||
|
"100gbase-kr2",
|
||||||
|
"100gbase-kr4",
|
||||||
|
"ieee802.11a",
|
||||||
|
"ieee802.11g",
|
||||||
|
"ieee802.11n",
|
||||||
|
"ieee802.11ac",
|
||||||
|
"ieee802.11ad",
|
||||||
|
"ieee802.11ax",
|
||||||
|
"ieee802.11ay",
|
||||||
|
"ieee802.15.1",
|
||||||
|
"other-wireless",
|
||||||
|
"gsm",
|
||||||
|
"cdma",
|
||||||
|
"lte",
|
||||||
|
"sonet-oc3",
|
||||||
|
"sonet-oc12",
|
||||||
|
"sonet-oc48",
|
||||||
|
"sonet-oc192",
|
||||||
|
"sonet-oc768",
|
||||||
|
"sonet-oc1920",
|
||||||
|
"sonet-oc3840",
|
||||||
|
"1gfc-sfp",
|
||||||
|
"2gfc-sfp",
|
||||||
|
"4gfc-sfp",
|
||||||
|
"8gfc-sfpp",
|
||||||
|
"16gfc-sfpp",
|
||||||
|
"32gfc-sfp28",
|
||||||
|
"64gfc-qsfpp",
|
||||||
|
"128gfc-qsfp28",
|
||||||
|
"infiniband-sdr",
|
||||||
|
"infiniband-ddr",
|
||||||
|
"infiniband-qdr",
|
||||||
|
"infiniband-fdr10",
|
||||||
|
"infiniband-fdr",
|
||||||
|
"infiniband-edr",
|
||||||
|
"infiniband-hdr",
|
||||||
|
"infiniband-ndr",
|
||||||
|
"infiniband-xdr",
|
||||||
|
"t1",
|
||||||
|
"e1",
|
||||||
|
"t3",
|
||||||
|
"e3",
|
||||||
|
"xdsl",
|
||||||
|
"docsis",
|
||||||
|
"gpon",
|
||||||
|
"xg-pon",
|
||||||
|
"xgs-pon",
|
||||||
|
"ng-pon2",
|
||||||
|
"epon",
|
||||||
|
"10g-epon",
|
||||||
|
"cisco-stackwise",
|
||||||
|
"cisco-stackwise-plus",
|
||||||
|
"cisco-flexstack",
|
||||||
|
"cisco-flexstack-plus",
|
||||||
|
"cisco-stackwise-80",
|
||||||
|
"cisco-stackwise-160",
|
||||||
|
"cisco-stackwise-320",
|
||||||
|
"cisco-stackwise-480",
|
||||||
|
"cisco-stackwise-1t",
|
||||||
|
"juniper-vcp",
|
||||||
|
"extreme-summitstack",
|
||||||
|
"extreme-summitstack-128",
|
||||||
|
"extreme-summitstack-256",
|
||||||
|
"extreme-summitstack-512",
|
||||||
|
"other"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"poe_mode": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"pd",
|
||||||
|
"pse"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"poe_type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"type1-ieee802.3af",
|
||||||
|
"type2-ieee802.3at",
|
||||||
|
"type3-ieee802.3bt",
|
||||||
|
"type4-ieee802.3bt",
|
||||||
|
"passive-24v-2pair",
|
||||||
|
"passive-24v-4pair",
|
||||||
|
"passive-48v-2pair",
|
||||||
|
"passive-48v-4pair"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"front-port": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"8p8c",
|
||||||
|
"8p6c",
|
||||||
|
"8p4c",
|
||||||
|
"8p2c",
|
||||||
|
"6p6c",
|
||||||
|
"6p4c",
|
||||||
|
"6p2c",
|
||||||
|
"4p4c",
|
||||||
|
"4p2c",
|
||||||
|
"gg45",
|
||||||
|
"tera-4p",
|
||||||
|
"tera-2p",
|
||||||
|
"tera-1p",
|
||||||
|
"110-punch",
|
||||||
|
"bnc",
|
||||||
|
"f",
|
||||||
|
"n",
|
||||||
|
"mrj21",
|
||||||
|
"fc",
|
||||||
|
"lc",
|
||||||
|
"lc-pc",
|
||||||
|
"lc-upc",
|
||||||
|
"lc-apc",
|
||||||
|
"lsh",
|
||||||
|
"lsh-pc",
|
||||||
|
"lsh-upc",
|
||||||
|
"lsh-apc",
|
||||||
|
"lx5",
|
||||||
|
"lx5-pc",
|
||||||
|
"lx5-upc",
|
||||||
|
"lx5-apc",
|
||||||
|
"mpo",
|
||||||
|
"mtrj",
|
||||||
|
"sc",
|
||||||
|
"sc-pc",
|
||||||
|
"sc-upc",
|
||||||
|
"sc-apc",
|
||||||
|
"st",
|
||||||
|
"cs",
|
||||||
|
"sn",
|
||||||
|
"sma-905",
|
||||||
|
"sma-906",
|
||||||
|
"urm-p2",
|
||||||
|
"urm-p4",
|
||||||
|
"urm-p8",
|
||||||
|
"splice",
|
||||||
|
"other"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rear-port": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"8p8c",
|
||||||
|
"8p6c",
|
||||||
|
"8p4c",
|
||||||
|
"8p2c",
|
||||||
|
"6p6c",
|
||||||
|
"6p4c",
|
||||||
|
"6p2c",
|
||||||
|
"4p4c",
|
||||||
|
"4p2c",
|
||||||
|
"gg45",
|
||||||
|
"tera-4p",
|
||||||
|
"tera-2p",
|
||||||
|
"tera-1p",
|
||||||
|
"110-punch",
|
||||||
|
"bnc",
|
||||||
|
"f",
|
||||||
|
"n",
|
||||||
|
"mrj21",
|
||||||
|
"fc",
|
||||||
|
"lc",
|
||||||
|
"lc-pc",
|
||||||
|
"lc-upc",
|
||||||
|
"lc-apc",
|
||||||
|
"lsh",
|
||||||
|
"lsh-pc",
|
||||||
|
"lsh-upc",
|
||||||
|
"lsh-apc",
|
||||||
|
"lx5",
|
||||||
|
"lx5-pc",
|
||||||
|
"lx5-upc",
|
||||||
|
"lx5-apc",
|
||||||
|
"mpo",
|
||||||
|
"mtrj",
|
||||||
|
"sc",
|
||||||
|
"sc-pc",
|
||||||
|
"sc-upc",
|
||||||
|
"sc-apc",
|
||||||
|
"st",
|
||||||
|
"cs",
|
||||||
|
"sn",
|
||||||
|
"sma-905",
|
||||||
|
"sma-906",
|
||||||
|
"urm-p2",
|
||||||
|
"urm-p4",
|
||||||
|
"urm-p8",
|
||||||
|
"splice",
|
||||||
|
"other"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
17
contrib/netbox-housekeeping.service
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=NetBox Housekeeping Service
|
||||||
|
Documentation=https://docs.netbox.dev/
|
||||||
|
After=network-online.target
|
||||||
|
Wants=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
|
||||||
|
User=netbox
|
||||||
|
Group=netbox
|
||||||
|
WorkingDirectory=/opt/netbox
|
||||||
|
|
||||||
|
ExecStart=/opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py housekeeping
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
13
contrib/netbox-housekeeping.timer
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=NetBox Housekeeping Timer
|
||||||
|
Documentation=https://docs.netbox.dev/
|
||||||
|
After=network-online.target
|
||||||
|
Wants=network-online.target
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=daily
|
||||||
|
AccuracySec=1h
|
||||||
|
Persistent=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
95605
contrib/openapi2.json
Normal file
69695
contrib/openapi2.yaml
Normal file
@@ -73,7 +73,7 @@ You should be redirected to Microsoft's authentication portal. Enter the usernam
|
|||||||
|
|
||||||
If successful, you will be redirected back to the NetBox UI, and will be logged in as the AD user. You can verify this by navigating to your profile (using the button at top right).
|
If successful, you will be redirected back to the NetBox UI, and will be logged in as the AD user. You can verify this by navigating to your profile (using the button at top right).
|
||||||
|
|
||||||
This user account has been replicated locally to NetBox, and can now be assigned groups and permissions within the NetBox admin UI.
|
This user account has been replicated locally to NetBox, and can now be assigned groups and permissions by navigating to Admin > Permissions.
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
|
|||||||
@@ -67,4 +67,4 @@ You should be redirected to Okta's authentication portal. Enter the username/ema
|
|||||||
|
|
||||||
If successful, you will be redirected back to the NetBox UI, and will be logged in as the Okta user. You can verify this by navigating to your profile (using the button at top right).
|
If successful, you will be redirected back to the NetBox UI, and will be logged in as the Okta user. You can verify this by navigating to your profile (using the button at top right).
|
||||||
|
|
||||||
This user account has been replicated locally to NetBox, and can now be assigned groups and permissions within the NetBox admin UI.
|
This user account has been replicated locally to NetBox, and can now be assigned groups and permissions by navigating to Admin > Permissions.
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
## Local Authentication
|
## Local Authentication
|
||||||
|
|
||||||
Local user accounts and groups can be created in NetBox under the "Authentication and Authorization" section of the administrative user interface. This interface is available only to users with the "staff" permission enabled.
|
Local user accounts and groups can be created in NetBox under the "Authentication" section in the "Admin" menu. This section is available only to users with the "staff" permission enabled.
|
||||||
|
|
||||||
At a minimum, each user account must have a username and password set. User accounts may also denote a first name, last name, and email address. [Permissions](../permissions.md) may also be assigned to users and/or groups within the admin UI.
|
At a minimum, each user account must have a username and password set. User accounts may also denote a first name, last name, and email address. [Permissions](../permissions.md) may also be assigned to users and/or groups under Admin > Permissions.
|
||||||
|
|
||||||
## Remote Authentication
|
## Remote Authentication
|
||||||
|
|
||||||
@@ -26,6 +26,8 @@ REMOTE_AUTH_BACKEND = 'netbox.authentication.RemoteUserBackend'
|
|||||||
|
|
||||||
Another option for remote authentication in NetBox is to enable HTTP header-based user assignment. The front end HTTP server (e.g. nginx or Apache) performs client authentication as a process external to NetBox, and passes information about the authenticated user via HTTP headers. By default, the user is assigned via the `REMOTE_USER` header, but this can be customized via the `REMOTE_AUTH_HEADER` configuration parameter.
|
Another option for remote authentication in NetBox is to enable HTTP header-based user assignment. The front end HTTP server (e.g. nginx or Apache) performs client authentication as a process external to NetBox, and passes information about the authenticated user via HTTP headers. By default, the user is assigned via the `REMOTE_USER` header, but this can be customized via the `REMOTE_AUTH_HEADER` configuration parameter.
|
||||||
|
|
||||||
|
Optionally, user profile information can be supplied by `REMOTE_USER_FIRST_NAME`, `REMOTE_USER_LAST_NAME` and `REMOTE_USER_EMAIL` headers. These are saved to the users profile during the authentication process. These headers can be customized like the `REMOTE_USER` header.
|
||||||
|
|
||||||
### Single Sign-On (SSO)
|
### Single Sign-On (SSO)
|
||||||
|
|
||||||
```python
|
```python
|
||||||
|
|||||||
@@ -4,27 +4,15 @@
|
|||||||
|
|
||||||
### Enabling Error Reporting
|
### Enabling Error Reporting
|
||||||
|
|
||||||
NetBox v3.2.3 and later support native integration with [Sentry](https://sentry.io/) for automatic error reporting. To enable this functionality, simply set `SENTRY_ENABLED` to True in `configuration.py`. Errors will be sent to a Sentry ingestor maintained by the NetBox team for analysis.
|
NetBox supports native integration with [Sentry](https://sentry.io/) for automatic error reporting. To enable this functionality, set `SENTRY_ENABLED` to True and define your unique [data source name (DSN)](https://docs.sentry.io/product/sentry-basics/concepts/dsn-explainer/) in `configuration.py`.
|
||||||
|
|
||||||
```python
|
|
||||||
SENTRY_ENABLED = True
|
|
||||||
```
|
|
||||||
|
|
||||||
### Using a Custom DSN
|
|
||||||
|
|
||||||
If you prefer instead to use your own Sentry ingestor, you'll need to first create a new project under your Sentry account to represent your NetBox deployment and obtain its corresponding data source name (DSN). This looks like a URL similar to the example below:
|
|
||||||
|
|
||||||
```
|
|
||||||
https://examplePublicKey@o0.ingest.sentry.io/0
|
|
||||||
```
|
|
||||||
|
|
||||||
Once you have obtained a DSN, configure Sentry in NetBox's `configuration.py` file with the following parameters:
|
|
||||||
|
|
||||||
```python
|
```python
|
||||||
SENTRY_ENABLED = True
|
SENTRY_ENABLED = True
|
||||||
SENTRY_DSN = "https://examplePublicKey@o0.ingest.sentry.io/0"
|
SENTRY_DSN = "https://examplePublicKey@o0.ingest.sentry.io/0"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Setting `SENTRY_ENABLED` to False will disable the Sentry integration.
|
||||||
|
|
||||||
### Assigning Tags
|
### Assigning Tags
|
||||||
|
|
||||||
You can optionally attach one or more arbitrary tags to the outgoing error reports if desired by setting the `SENTRY_TAGS` parameter:
|
You can optionally attach one or more arbitrary tags to the outgoing error reports if desired by setting the `SENTRY_TAGS` parameter:
|
||||||
|
|||||||
@@ -4,9 +4,16 @@ NetBox includes a `housekeeping` management command that should be run nightly.
|
|||||||
|
|
||||||
* Clearing expired authentication sessions from the database
|
* Clearing expired authentication sessions from the database
|
||||||
* Deleting changelog records older than the configured [retention time](../configuration/miscellaneous.md#changelog_retention)
|
* Deleting changelog records older than the configured [retention time](../configuration/miscellaneous.md#changelog_retention)
|
||||||
* Deleting job result records older than the configured [retention time](../configuration/miscellaneous.md#jobresult_retention)
|
* Deleting job result records older than the configured [retention time](../configuration/miscellaneous.md#job_retention)
|
||||||
|
* Check for new NetBox releases (if [`RELEASE_CHECK_URL`](../configuration/miscellaneous.md#release_check_url) is set)
|
||||||
|
|
||||||
This command can be invoked directly, or by using the shell script provided at `/opt/netbox/contrib/netbox-housekeeping.sh`. This script can be linked from your cron scheduler's daily jobs directory (e.g. `/etc/cron.daily`) or referenced directly within the cron configuration file.
|
This command can be invoked directly, or by using the shell script provided at `/opt/netbox/contrib/netbox-housekeeping.sh`.
|
||||||
|
|
||||||
|
## Scheduling
|
||||||
|
|
||||||
|
### Using Cron
|
||||||
|
|
||||||
|
This script can be linked from your cron scheduler's daily jobs directory (e.g. `/etc/cron.daily`) or referenced directly within the cron configuration file.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo ln -s /opt/netbox/contrib/netbox-housekeeping.sh /etc/cron.daily/netbox-housekeeping
|
sudo ln -s /opt/netbox/contrib/netbox-housekeeping.sh /etc/cron.daily/netbox-housekeeping
|
||||||
@@ -15,4 +22,28 @@ sudo ln -s /opt/netbox/contrib/netbox-housekeeping.sh /etc/cron.daily/netbox-hou
|
|||||||
!!! note
|
!!! note
|
||||||
On Debian-based systems, be sure to omit the `.sh` file extension when linking to the script from within a cron directory. Otherwise, the task may not run.
|
On Debian-based systems, be sure to omit the `.sh` file extension when linking to the script from within a cron directory. Otherwise, the task may not run.
|
||||||
|
|
||||||
The `housekeeping` command can also be run manually at any time: Running the command outside scheduled execution times will not interfere with its operation.
|
### Using Systemd
|
||||||
|
|
||||||
|
First, create symbolic links for the systemd service and timer files. Link the existing service and timer files from the `/opt/netbox/contrib/` directory to the `/etc/systemd/system/` directory:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo ln -s /opt/netbox/contrib/netbox-housekeeping.service /etc/systemd/system/netbox-housekeeping.service
|
||||||
|
sudo ln -s /opt/netbox/contrib/netbox-housekeeping.timer /etc/systemd/system/netbox-housekeeping.timer
|
||||||
|
```
|
||||||
|
|
||||||
|
Then, reload the systemd configuration and enable the timer to start automatically at boot:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo systemctl daemon-reload
|
||||||
|
sudo systemctl enable --now netbox-housekeeping.timer
|
||||||
|
```
|
||||||
|
|
||||||
|
Check the status of your timer by running:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo systemctl list-timers --all
|
||||||
|
```
|
||||||
|
|
||||||
|
This command will show a list of all timers, including your `netbox-housekeeping.timer`. Make sure the timer is active and properly scheduled.
|
||||||
|
|
||||||
|
That's it! Your NetBox housekeeping service is now configured to run daily using systemd.
|
||||||
|
|||||||
@@ -153,15 +153,10 @@ New objects can be created by instantiating the desired model, defining values f
|
|||||||
```
|
```
|
||||||
>>> lab1 = Site.objects.get(pk=7)
|
>>> lab1 = Site.objects.get(pk=7)
|
||||||
>>> myvlan = VLAN(vid=123, name='MyNewVLAN', site=lab1)
|
>>> myvlan = VLAN(vid=123, name='MyNewVLAN', site=lab1)
|
||||||
|
>>> myvlan.full_clean()
|
||||||
>>> myvlan.save()
|
>>> myvlan.save()
|
||||||
```
|
```
|
||||||
|
|
||||||
Alternatively, the above can be performed as a single operation. (Note, however, that `save()` does _not_ return the new instance for reuse.)
|
|
||||||
|
|
||||||
```
|
|
||||||
>>> VLAN(vid=123, name='MyNewVLAN', site=Site.objects.get(pk=7)).save()
|
|
||||||
```
|
|
||||||
|
|
||||||
To modify an existing object, we retrieve it, update the desired field(s), and call `save()` again.
|
To modify an existing object, we retrieve it, update the desired field(s), and call `save()` again.
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -169,6 +164,7 @@ To modify an existing object, we retrieve it, update the desired field(s), and c
|
|||||||
>>> vlan.name
|
>>> vlan.name
|
||||||
'MyNewVLAN'
|
'MyNewVLAN'
|
||||||
>>> vlan.name = 'BetterName'
|
>>> vlan.name = 'BetterName'
|
||||||
|
>>> vlan.full_clean()
|
||||||
>>> vlan.save()
|
>>> vlan.save()
|
||||||
>>> VLAN.objects.get(pk=1280).name
|
>>> VLAN.objects.get(pk=1280).name
|
||||||
'BetterName'
|
'BetterName'
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Object-Based Permissions
|
# Object-Based Permissions
|
||||||
|
|
||||||
NetBox v2.9 introduced a new object-based permissions framework, which replaces Django's built-in permissions model. Object-based permissions enable an administrator to grant users or groups the ability to perform an action on arbitrary subsets of objects in NetBox, rather than all objects of a certain type. For example, it is possible to grant a user permission to view only sites within a particular region, or to modify only VLANs with a numeric ID within a certain range.
|
NetBox employs a new object-based permissions framework, which replaces Django's built-in permissions model. Object-based permissions enable an administrator to grant users or groups the ability to perform an action on arbitrary subsets of objects in NetBox, rather than all objects of a certain type. For example, it is possible to grant a user permission to view only sites within a particular region, or to modify only VLANs with a numeric ID within a certain range.
|
||||||
|
|
||||||
A permission in NetBox represents a relationship shared by several components:
|
A permission in NetBox represents a relationship shared by several components:
|
||||||
|
|
||||||
@@ -20,7 +20,7 @@ There are four core actions that can be permitted for each type of object within
|
|||||||
* **Change** - Modify an existing object
|
* **Change** - Modify an existing object
|
||||||
* **Delete** - Delete an existing object
|
* **Delete** - Delete an existing object
|
||||||
|
|
||||||
In addition to these, permissions can also grant custom actions that may be required by a specific model or plugin. For example, the `napalm_read` permission on the device model allows a user to execute NAPALM queries on a device via NetBox's REST API. These can be specified when granting a permission in the "additional actions" field.
|
In addition to these, permissions can also grant custom actions that may be required by a specific model or plugin. For example, the `run` permission for scripts allows a user to execute custom scripts. These can be specified when granting a permission in the "additional actions" field.
|
||||||
|
|
||||||
!!! note
|
!!! note
|
||||||
Internally, all actions granted by a permission (both built-in and custom) are stored as strings in an array field named `actions`.
|
Internally, all actions granted by a permission (both built-in and custom) are stored as strings in an array field named `actions`.
|
||||||
@@ -58,8 +58,6 @@ Additionally, where multiple permissions have been assigned for an object type,
|
|||||||
|
|
||||||
### User Token
|
### User Token
|
||||||
|
|
||||||
!!! info "This feature was introduced in NetBox v3.3"
|
|
||||||
|
|
||||||
When defining a permission constraint, administrators may use the special token `$user` to reference the current user at the time of evaluation. This can be helpful to restrict users to editing only their own journal entries, for example. Such a constraint might be defined as:
|
When defining a permission constraint, administrators may use the special token `$user` to reference the current user at the time of evaluation. This can be helpful to restrict users to editing only their own journal entries, for example. Such a constraint might be defined as:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
@@ -70,8 +68,13 @@ When defining a permission constraint, administrators may use the special token
|
|||||||
|
|
||||||
The `$user` token can be used only as a constraint value, or as an item within a list of values. It cannot be modified or extended to reference specific user attributes.
|
The `$user` token can be used only as a constraint value, or as an item within a list of values. It cannot be modified or extended to reference specific user attributes.
|
||||||
|
|
||||||
|
### Default Permissions
|
||||||
|
|
||||||
#### Example Constraint Definitions
|
!!! info "This feature was introduced in NetBox v3.6."
|
||||||
|
|
||||||
|
While permissions are typically assigned to specific groups and/or users, it is also possible to define a set of default permissions that are applied to _all_ authenticated users. This is done using the [`DEFAULT_PERMISSIONS`](../configuration/security.md#default_permissions) configuration parameter. Note that statically configuring permissions for specific users or groups is **not** supported.
|
||||||
|
|
||||||
|
### Example Constraint Definitions
|
||||||
|
|
||||||
| Constraints | Description |
|
| Constraints | Description |
|
||||||
| ----------- | ----------- |
|
| ----------- | ----------- |
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ pg_dump --username netbox --password --host localhost -s netbox > netbox_schema.
|
|||||||
By default, NetBox stores uploaded files (such as image attachments) in its media directory. To fully replicate an instance of NetBox, you'll need to copy both the database and the media files.
|
By default, NetBox stores uploaded files (such as image attachments) in its media directory. To fully replicate an instance of NetBox, you'll need to copy both the database and the media files.
|
||||||
|
|
||||||
!!! note
|
!!! note
|
||||||
These operations are not necessary if your installation is utilizing a [remote storage backend](../../configuration/optional-settings/#storage_backend).
|
These operations are not necessary if your installation is utilizing a [remote storage backend](../configuration/system.md#storage_backend).
|
||||||
|
|
||||||
### Archive the Media Directory
|
### Archive the Media Directory
|
||||||
|
|
||||||
|
|||||||
@@ -87,3 +87,24 @@ The following colors are supported:
|
|||||||
* `gray`
|
* `gray`
|
||||||
* `black`
|
* `black`
|
||||||
* `white`
|
* `white`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## PROTECTION_RULES
|
||||||
|
|
||||||
|
!!! tip "Dynamic Configuration Parameter"
|
||||||
|
|
||||||
|
This is a mapping of models to [custom validators](../customization/custom-validation.md) against which an object is evaluated immediately prior to its deletion. If validation fails, the object is not deleted. An example is provided below:
|
||||||
|
|
||||||
|
```python
|
||||||
|
PROTECTION_RULES = {
|
||||||
|
"dcim.site": [
|
||||||
|
{
|
||||||
|
"status": {
|
||||||
|
"eq": "decommissioning"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"my_plugin.validators.Validator1",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|||||||
@@ -1,5 +1,52 @@
|
|||||||
# Default Value Parameters
|
# Default Value Parameters
|
||||||
|
|
||||||
|
## DEFAULT_DASHBOARD
|
||||||
|
|
||||||
|
This parameter controls the content and layout of user's default dashboard. Once the dashboard has been created, the user is free to customize it as they please by adding, removing, and reconfiguring widgets.
|
||||||
|
|
||||||
|
This parameter must specify an iterable of dictionaries, each representing a discrete dashboard widget and its configuration. The follow widget attributes are supported:
|
||||||
|
|
||||||
|
* `widget`: Dotted path to the Python class (required)
|
||||||
|
* `width`: Default widget width (between 1 and 12, inclusive)
|
||||||
|
* `height`: Default widget height, in rows
|
||||||
|
* `title`: Widget title
|
||||||
|
* `color`: Color of the widget's title bar, specified by name
|
||||||
|
* `config`: Dictionary mapping of any widget configuration parameters
|
||||||
|
|
||||||
|
A brief example configuration is provided below.
|
||||||
|
|
||||||
|
```python
|
||||||
|
DEFAULT_DASHBOARD = [
|
||||||
|
{
|
||||||
|
'widget': 'extras.ObjectCountsWidget',
|
||||||
|
'width': 4,
|
||||||
|
'height': 3,
|
||||||
|
'title': 'Organization',
|
||||||
|
'config': {
|
||||||
|
'models': [
|
||||||
|
'dcim.site',
|
||||||
|
'tenancy.tenant',
|
||||||
|
'tenancy.contact',
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'widget': 'extras.ObjectCountsWidget',
|
||||||
|
'width': 4,
|
||||||
|
'height': 3,
|
||||||
|
'title': 'IPAM',
|
||||||
|
'color': 'blue',
|
||||||
|
'config': {
|
||||||
|
'models': [
|
||||||
|
'ipam.prefix',
|
||||||
|
'ipam.iprange',
|
||||||
|
'ipam.ipaddress',
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
## DEFAULT_USER_PREFERENCES
|
## DEFAULT_USER_PREFERENCES
|
||||||
|
|
||||||
!!! tip "Dynamic Configuration Parameter"
|
!!! tip "Dynamic Configuration Parameter"
|
||||||
|
|||||||
@@ -18,4 +18,4 @@ interface.
|
|||||||
|
|
||||||
Default: False
|
Default: False
|
||||||
|
|
||||||
This parameter serves as a safeguard to prevent some potentially dangerous behavior, such as generating new database schema migrations. Set this to `True` **only** if you are actively developing the NetBox code base.
|
This parameter serves as a safeguard to prevent some potentially dangerous behavior, such as generating new database schema migrations. Additionally, enabling this setting disables the debug warning banner in the UI. Set this to `True` **only** if you are actively developing the NetBox code base.
|
||||||
|
|||||||
@@ -18,6 +18,9 @@ Default: False
|
|||||||
|
|
||||||
Set to True to enable automatic error reporting via [Sentry](https://sentry.io/).
|
Set to True to enable automatic error reporting via [Sentry](https://sentry.io/).
|
||||||
|
|
||||||
|
!!! note
|
||||||
|
The `sentry-sdk` Python package is required to enable Sentry integration.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## SENTRY_SAMPLE_RATE
|
## SENTRY_SAMPLE_RATE
|
||||||
|
|||||||
@@ -26,14 +26,10 @@ Some configuration parameters are primarily controlled via NetBox's admin interf
|
|||||||
* [`DEFAULT_USER_PREFERENCES`](./default-values.md#default_user_preferences)
|
* [`DEFAULT_USER_PREFERENCES`](./default-values.md#default_user_preferences)
|
||||||
* [`ENFORCE_GLOBAL_UNIQUE`](./miscellaneous.md#enforce_global_unique)
|
* [`ENFORCE_GLOBAL_UNIQUE`](./miscellaneous.md#enforce_global_unique)
|
||||||
* [`GRAPHQL_ENABLED`](./miscellaneous.md#graphql_enabled)
|
* [`GRAPHQL_ENABLED`](./miscellaneous.md#graphql_enabled)
|
||||||
* [`JOBRESULT_RETENTION`](./miscellaneous.md#jobresult_retention)
|
* [`JOB_RETENTION`](./miscellaneous.md#job_retention)
|
||||||
* [`MAINTENANCE_MODE`](./miscellaneous.md#maintenance_mode)
|
* [`MAINTENANCE_MODE`](./miscellaneous.md#maintenance_mode)
|
||||||
* [`MAPS_URL`](./miscellaneous.md#maps_url)
|
* [`MAPS_URL`](./miscellaneous.md#maps_url)
|
||||||
* [`MAX_PAGE_SIZE`](./miscellaneous.md#max_page_size)
|
* [`MAX_PAGE_SIZE`](./miscellaneous.md#max_page_size)
|
||||||
* [`NAPALM_ARGS`](./napalm.md#napalm_args)
|
|
||||||
* [`NAPALM_PASSWORD`](./napalm.md#napalm_password)
|
|
||||||
* [`NAPALM_TIMEOUT`](./napalm.md#napalm_timeout)
|
|
||||||
* [`NAPALM_USERNAME`](./napalm.md#napalm_username)
|
|
||||||
* [`PAGINATE_COUNT`](./default-values.md#paginate_count)
|
* [`PAGINATE_COUNT`](./default-values.md#paginate_count)
|
||||||
* [`POWERFEED_DEFAULT_AMPERAGE`](./default-values.md#powerfeed_default_amperage)
|
* [`POWERFEED_DEFAULT_AMPERAGE`](./default-values.md#powerfeed_default_amperage)
|
||||||
* [`POWERFEED_DEFAULT_MAX_UTILIZATION`](./default-values.md#powerfeed_default_max_utilization)
|
* [`POWERFEED_DEFAULT_MAX_UTILIZATION`](./default-values.md#powerfeed_default_max_utilization)
|
||||||
@@ -50,4 +46,4 @@ The configuration file may be modified at any time. However, the WSGI service (e
|
|||||||
$ sudo systemctl restart netbox
|
$ sudo systemctl restart netbox
|
||||||
```
|
```
|
||||||
|
|
||||||
Configuration parameters which are set via the admin UI (those listed under "dynamic settings") take effect immediately.
|
Dynamic configuration parameters (those which can be modified via the UI) take effect immediately.
|
||||||
|
|||||||
@@ -29,6 +29,17 @@ This defines custom content to be displayed on the login page above the login fo
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## BANNER_MAINTENANCE
|
||||||
|
|
||||||
|
!!! tip "Dynamic Configuration Parameter"
|
||||||
|
|
||||||
|
!!! note
|
||||||
|
This parameter was added in NetBox v3.5.
|
||||||
|
|
||||||
|
This adds a banner to the top of every page when maintenance mode is enabled. HTML is allowed.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## BANNER_TOP
|
## BANNER_TOP
|
||||||
|
|
||||||
!!! tip "Dynamic Configuration Parameter"
|
!!! tip "Dynamic Configuration Parameter"
|
||||||
@@ -45,6 +56,16 @@ Sets content for the top banner in the user interface.
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## CENSUS_REPORTING_ENABLED
|
||||||
|
|
||||||
|
Default: True
|
||||||
|
|
||||||
|
Enables anonymous census reporting. To opt out of census reporting, set this to False.
|
||||||
|
|
||||||
|
This data enables the project maintainers to estimate how many NetBox deployments exist and track the adoption of new versions over time. Census reporting effects a single HTTP request each time a worker starts. The only data reported by this function are the NetBox version, Python version, and a pseudorandom unique identifier.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## CHANGELOG_RETENTION
|
## CHANGELOG_RETENTION
|
||||||
|
|
||||||
!!! tip "Dynamic Configuration Parameter"
|
!!! tip "Dynamic Configuration Parameter"
|
||||||
@@ -59,13 +80,43 @@ changes in the database indefinitely.
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## CHANGELOG_SKIP_EMPTY_CHANGES
|
||||||
|
|
||||||
|
Default: True
|
||||||
|
|
||||||
|
If enabled, a change log record will not be created when an object is updated without any changes to its existing field values.
|
||||||
|
|
||||||
|
!!! note
|
||||||
|
The object's `last_updated` field will always reflect the time of the most recent update, regardless of this parameter.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## DATA_UPLOAD_MAX_MEMORY_SIZE
|
||||||
|
|
||||||
|
Default: `2621440` (2.5 MB)
|
||||||
|
|
||||||
|
The maximum size (in bytes) of an incoming HTTP request (i.e. `GET` or `POST` data). Requests which exceed this size will raise a `RequestDataTooBig` exception.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## ENFORCE_GLOBAL_UNIQUE
|
## ENFORCE_GLOBAL_UNIQUE
|
||||||
|
|
||||||
!!! tip "Dynamic Configuration Parameter"
|
!!! tip "Dynamic Configuration Parameter"
|
||||||
|
|
||||||
Default: False
|
Default: True
|
||||||
|
|
||||||
By default, NetBox will permit users to create duplicate prefixes and IP addresses in the global table (that is, those which are not assigned to any VRF). This behavior can be disabled by setting `ENFORCE_GLOBAL_UNIQUE` to True.
|
By default, NetBox will prevent the creation of duplicate prefixes and IP addresses in the global table (that is, those which are not assigned to any VRF). This validation can be disabled by setting `ENFORCE_GLOBAL_UNIQUE` to False.
|
||||||
|
|
||||||
|
!!! info "Changed in v3.7"
|
||||||
|
The default value for this parameter was changed from False to True in NetBox v3.7.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## FILE_UPLOAD_MAX_MEMORY_SIZE
|
||||||
|
|
||||||
|
Default: `2621440` (2.5 MB)
|
||||||
|
|
||||||
|
The maximum amount (in bytes) of uploaded data that will be held in memory before being written to the filesystem. Changing this setting can be useful for example to be able to upload files bigger than 2.5MB to custom scripts for processing.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -79,14 +130,16 @@ Setting this to False will disable the GraphQL API.
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## JOBRESULT_RETENTION
|
## JOB_RETENTION
|
||||||
|
|
||||||
!!! tip "Dynamic Configuration Parameter"
|
!!! tip "Dynamic Configuration Parameter"
|
||||||
|
|
||||||
|
!!! note
|
||||||
|
This parameter was renamed from `JOBRESULT_RETENTION` in NetBox v3.5.
|
||||||
|
|
||||||
Default: 90
|
Default: 90
|
||||||
|
|
||||||
The number of days to retain job results (scripts and reports). Set this to `0` to retain
|
The number of days to retain job results (scripts and reports). Set this to `0` to retain job results in the database indefinitely.
|
||||||
job results in the database indefinitely.
|
|
||||||
|
|
||||||
!!! warning
|
!!! warning
|
||||||
If enabling indefinite job results retention, it is recommended to periodically delete old entries. Otherwise, the database may eventually exceed capacity.
|
If enabling indefinite job results retention, it is recommended to periodically delete old entries. Otherwise, the database may eventually exceed capacity.
|
||||||
@@ -109,7 +162,7 @@ Setting this to True will display a "maintenance mode" banner at the top of ever
|
|||||||
|
|
||||||
Default: `https://maps.google.com/?q=` (Google Maps)
|
Default: `https://maps.google.com/?q=` (Google Maps)
|
||||||
|
|
||||||
This specifies the URL to use when presenting a map of a physical location by street address or GPS coordinates. The URL must accept either a free-form street address or a comma-separated pair of numeric coordinates appended to it.
|
This specifies the URL to use when presenting a map of a physical location by street address or GPS coordinates. The URL must accept either a free-form street address or a comma-separated pair of numeric coordinates appended to it. Set this to `None` to disable the "map it" button within the UI.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -173,3 +226,25 @@ This parameter defines the URL of the repository that will be checked for new Ne
|
|||||||
Default: `300`
|
Default: `300`
|
||||||
|
|
||||||
The maximum execution time of a background task (such as running a custom script), in seconds.
|
The maximum execution time of a background task (such as running a custom script), in seconds.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## RQ_RETRY_INTERVAL
|
||||||
|
|
||||||
|
!!! note
|
||||||
|
This parameter was added in NetBox v3.5.
|
||||||
|
|
||||||
|
Default: `60`
|
||||||
|
|
||||||
|
This parameter controls how frequently a failed job is retried, up to the maximum number of times specified by `RQ_RETRY_MAX`. This must be either an integer specifying the number of seconds to wait between successive attempts, or a list of such values. For example, `[60, 300, 3600]` will retry the task after 1 minute, 5 minutes, and 1 hour.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## RQ_RETRY_MAX
|
||||||
|
|
||||||
|
!!! note
|
||||||
|
This parameter was added in NetBox v3.5.
|
||||||
|
|
||||||
|
Default: `0` (retries disabled)
|
||||||
|
|
||||||
|
The maximum number of times a background task will be retried before being marked as failed.
|
||||||
|
|||||||
@@ -1,51 +0,0 @@
|
|||||||
# NAPALM Parameters
|
|
||||||
|
|
||||||
## NAPALM_USERNAME
|
|
||||||
|
|
||||||
## NAPALM_PASSWORD
|
|
||||||
|
|
||||||
!!! tip "Dynamic Configuration Parameter"
|
|
||||||
|
|
||||||
NetBox will use these credentials when authenticating to remote devices via the supported [NAPALM integration](../integrations/napalm.md), if installed. Both parameters are optional.
|
|
||||||
|
|
||||||
!!! note
|
|
||||||
If SSH public key authentication has been set up on the remote device(s) for the system account under which NetBox runs, these parameters are not needed.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## NAPALM_ARGS
|
|
||||||
|
|
||||||
!!! tip "Dynamic Configuration Parameter"
|
|
||||||
|
|
||||||
A dictionary of optional arguments to pass to NAPALM when instantiating a network driver. See the NAPALM documentation for a [complete list of optional arguments](https://napalm.readthedocs.io/en/latest/support/#optional-arguments). An example:
|
|
||||||
|
|
||||||
```python
|
|
||||||
NAPALM_ARGS = {
|
|
||||||
'api_key': '472071a93b60a1bd1fafb401d9f8ef41',
|
|
||||||
'port': 2222,
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Some platforms (e.g. Cisco IOS) require an argument named `secret` to be passed in addition to the normal password. If desired, you can use the configured `NAPALM_PASSWORD` as the value for this argument:
|
|
||||||
|
|
||||||
```python
|
|
||||||
NAPALM_USERNAME = 'username'
|
|
||||||
NAPALM_PASSWORD = 'MySecretPassword'
|
|
||||||
NAPALM_ARGS = {
|
|
||||||
'secret': NAPALM_PASSWORD,
|
|
||||||
# Include any additional args here
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## NAPALM_TIMEOUT
|
|
||||||
|
|
||||||
!!! tip "Dynamic Configuration Parameter"
|
|
||||||
|
|
||||||
Default: 30 seconds
|
|
||||||
|
|
||||||
The amount of time (in seconds) to wait for NAPALM to connect to a device.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
Default: Empty
|
Default: Empty
|
||||||
|
|
||||||
A list of installed [NetBox plugins](../../plugins/) to enable. Plugins will not take effect unless they are listed here.
|
A list of installed [NetBox plugins](../plugins/index.md) to enable. Plugins will not take effect unless they are listed here.
|
||||||
|
|
||||||
!!! warning
|
!!! warning
|
||||||
Plugins extend NetBox by allowing external code to run with the same access and privileges as NetBox itself. Only install plugins from trusted sources. The NetBox maintainers make absolutely no guarantees about the integrity or security of your installation with plugins enabled.
|
Plugins extend NetBox by allowing external code to run with the same access and privileges as NetBox itself. Only install plugins from trusted sources. The NetBox maintainers make absolutely no guarantees about the integrity or security of your installation with plugins enabled.
|
||||||
|
|||||||
@@ -4,6 +4,14 @@ The configuration parameters listed here control remote authentication for NetBo
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## REMOTE_AUTH_AUTO_CREATE_GROUPS
|
||||||
|
|
||||||
|
Default: `False`
|
||||||
|
|
||||||
|
If true, NetBox will automatically create groups specified in the `REMOTE_AUTH_GROUP_HEADER` header if they don't already exist. (Requires `REMOTE_AUTH_ENABLED`.)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## REMOTE_AUTH_AUTO_CREATE_USER
|
## REMOTE_AUTH_AUTO_CREATE_USER
|
||||||
|
|
||||||
Default: `False`
|
Default: `False`
|
||||||
@@ -16,7 +24,7 @@ If true, NetBox will automatically create local accounts for users authenticated
|
|||||||
|
|
||||||
Default: `'netbox.authentication.RemoteUserBackend'`
|
Default: `'netbox.authentication.RemoteUserBackend'`
|
||||||
|
|
||||||
This is the Python path to the custom [Django authentication backend](https://docs.djangoproject.com/en/stable/topics/auth/customizing/) to use for external user authentication. NetBox provides two built-in backends (listed below), though custom authentication backends may also be provided by other packages or plugins.
|
This is the Python path to the custom [Django authentication backend](https://docs.djangoproject.com/en/stable/topics/auth/customizing/) to use for external user authentication. NetBox provides two built-in backends (listed below), though custom authentication backends may also be provided by other packages or plugins. Provide a string for a single backend, or an iterable for multiple backends, which will be attempted in the order given.
|
||||||
|
|
||||||
* `netbox.authentication.RemoteUserBackend`
|
* `netbox.authentication.RemoteUserBackend`
|
||||||
* `netbox.authentication.LDAPBackend`
|
* `netbox.authentication.LDAPBackend`
|
||||||
@@ -79,6 +87,30 @@ When remote user authentication is in use, this is the name of the HTTP header w
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## REMOTE_AUTH_USER_EMAIL
|
||||||
|
|
||||||
|
Default: `'HTTP_REMOTE_USER_EMAIL'`
|
||||||
|
|
||||||
|
When remote user authentication is in use, this is the name of the HTTP header which informs NetBox of the email address of the currently authenticated user. For example, to use the request header `X-Remote-User-Email` it needs to be set to `HTTP_X_REMOTE_USER_EMAIL`. (Requires `REMOTE_AUTH_ENABLED`.)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## REMOTE_AUTH_USER_FIRST_NAME
|
||||||
|
|
||||||
|
Default: `'HTTP_REMOTE_USER_FIRST_NAME'`
|
||||||
|
|
||||||
|
When remote user authentication is in use, this is the name of the HTTP header which informs NetBox of the first name of the currently authenticated user. For example, to use the request header `X-Remote-User-First-Name` it needs to be set to `HTTP_X_REMOTE_USER_FIRST_NAME`. (Requires `REMOTE_AUTH_ENABLED`.)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## REMOTE_AUTH_USER_LAST_NAME
|
||||||
|
|
||||||
|
Default: `'HTTP_REMOTE_USER_LAST_NAME'`
|
||||||
|
|
||||||
|
When remote user authentication is in use, this is the name of the HTTP header which informs NetBox of the last name of the currently authenticated user. For example, to use the request header `X-Remote-User-Last-Name` it needs to be set to `HTTP_X_REMOTE_USER_LAST_NAME`. (Requires `REMOTE_AUTH_ENABLED`.)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## REMOTE_AUTH_SUPERUSER_GROUPS
|
## REMOTE_AUTH_SUPERUSER_GROUPS
|
||||||
|
|
||||||
Default: `[]` (Empty list)
|
Default: `[]` (Empty list)
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ ALLOWED_HOSTS = ['*']
|
|||||||
|
|
||||||
## DATABASE
|
## DATABASE
|
||||||
|
|
||||||
NetBox requires access to a PostgreSQL 11 or later database service to store data. This service can run locally on the NetBox server or on a remote system. The following parameters must be defined within the `DATABASE` dictionary:
|
NetBox requires access to a PostgreSQL 12 or later database service to store data. This service can run locally on the NetBox server or on a remote system. The following parameters must be defined within the `DATABASE` dictionary:
|
||||||
|
|
||||||
* `NAME` - Database name
|
* `NAME` - Database name
|
||||||
* `USER` - PostgreSQL username
|
* `USER` - PostgreSQL username
|
||||||
@@ -33,11 +33,13 @@ NetBox requires access to a PostgreSQL 11 or later database service to store dat
|
|||||||
* `HOST` - Name or IP address of the database server (use `localhost` if running locally)
|
* `HOST` - Name or IP address of the database server (use `localhost` if running locally)
|
||||||
* `PORT` - TCP port of the PostgreSQL service; leave blank for default port (TCP/5432)
|
* `PORT` - TCP port of the PostgreSQL service; leave blank for default port (TCP/5432)
|
||||||
* `CONN_MAX_AGE` - Lifetime of a [persistent database connection](https://docs.djangoproject.com/en/stable/ref/databases/#persistent-connections), in seconds (300 is the default)
|
* `CONN_MAX_AGE` - Lifetime of a [persistent database connection](https://docs.djangoproject.com/en/stable/ref/databases/#persistent-connections), in seconds (300 is the default)
|
||||||
|
* `ENGINE` - The database backend to use; must be a PostgreSQL-compatible backend (e.g. `django.db.backends.postgresql`)
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
DATABASE = {
|
DATABASE = {
|
||||||
|
'ENGINE': 'django.db.backends.postgresql',
|
||||||
'NAME': 'netbox', # Database name
|
'NAME': 'netbox', # Database name
|
||||||
'USER': 'netbox', # PostgreSQL username
|
'USER': 'netbox', # PostgreSQL username
|
||||||
'PASSWORD': 'J5brHrAXFLQSif0K', # PostgreSQL password
|
'PASSWORD': 'J5brHrAXFLQSif0K', # PostgreSQL password
|
||||||
@@ -50,14 +52,14 @@ DATABASE = {
|
|||||||
!!! note
|
!!! note
|
||||||
NetBox supports all PostgreSQL database options supported by the underlying Django framework. For a complete list of available parameters, please see [the Django documentation](https://docs.djangoproject.com/en/stable/ref/settings/#databases).
|
NetBox supports all PostgreSQL database options supported by the underlying Django framework. For a complete list of available parameters, please see [the Django documentation](https://docs.djangoproject.com/en/stable/ref/settings/#databases).
|
||||||
|
|
||||||
|
!!! warning
|
||||||
|
Make sure to use a PostgreSQL-compatible backend for the ENGINE setting. If you don't specify an ENGINE, the default will be django.db.backends.postgresql.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## REDIS
|
## REDIS
|
||||||
|
|
||||||
[Redis](https://redis.io/) is an in-memory data store similar to memcached. While Redis has been an optional component of
|
[Redis](https://redis.io/) is a lightweight in-memory data store similar to memcached. NetBox employs Redis for background task queuing and other features.
|
||||||
NetBox since the introduction of webhooks in version 2.4, it is required starting in 2.6 to support NetBox's caching
|
|
||||||
functionality (as well as other planned features). In 2.7, the connection settings were broken down into two sections for
|
|
||||||
task queuing and caching, allowing the user to connect to different Redis instances/databases per feature.
|
|
||||||
|
|
||||||
Redis is configured using a configuration setting similar to `DATABASE` and these settings are the same for both of the `tasks` and `caching` subsections:
|
Redis is configured using a configuration setting similar to `DATABASE` and these settings are the same for both of the `tasks` and `caching` subsections:
|
||||||
|
|
||||||
@@ -76,7 +78,7 @@ REDIS = {
|
|||||||
'tasks': {
|
'tasks': {
|
||||||
'HOST': 'redis.example.com',
|
'HOST': 'redis.example.com',
|
||||||
'PORT': 1234,
|
'PORT': 1234,
|
||||||
'USERNAME': 'netbox'
|
'USERNAME': 'netbox',
|
||||||
'PASSWORD': 'foobar',
|
'PASSWORD': 'foobar',
|
||||||
'DATABASE': 0,
|
'DATABASE': 0,
|
||||||
'SSL': False,
|
'SSL': False,
|
||||||
@@ -84,7 +86,7 @@ REDIS = {
|
|||||||
'caching': {
|
'caching': {
|
||||||
'HOST': 'localhost',
|
'HOST': 'localhost',
|
||||||
'PORT': 6379,
|
'PORT': 6379,
|
||||||
'USERNAME': ''
|
'USERNAME': '',
|
||||||
'PASSWORD': '',
|
'PASSWORD': '',
|
||||||
'DATABASE': 1,
|
'DATABASE': 1,
|
||||||
'SSL': False,
|
'SSL': False,
|
||||||
@@ -144,8 +146,6 @@ REDIS = {
|
|||||||
|
|
||||||
## SECRET_KEY
|
## SECRET_KEY
|
||||||
|
|
||||||
This is a secret, random string used to assist in the creation new cryptographic hashes for passwords and HTTP cookies. The key defined here should not be shared outside of the configuration file. `SECRET_KEY` can be changed at any time, however be aware that doing so will invalidate all existing sessions.
|
This is a secret, pseudorandom string used to assist in the creation new cryptographic hashes for passwords and HTTP cookies. The key defined here should not be shared outside the configuration file. `SECRET_KEY` can be changed at any time without impacting stored data, however be aware that doing so will invalidate all existing user sessions. NetBox deployments comprising multiple nodes must have the same secret key configured on all nodes.
|
||||||
|
|
||||||
Please note that this key is **not** used directly for hashing user passwords or for the encrypted storage of secret data in NetBox.
|
`SECRET_KEY` **must** be at least 50 characters in length, and should contain a mix of letters, digits, and symbols. The script located at `$INSTALL_ROOT/netbox/generate_secret_key.py` may be used to generate a suitable key. Please note that this key is **not** used directly for hashing user passwords or for the encrypted storage of secret data in NetBox.
|
||||||
|
|
||||||
`SECRET_KEY` should be at least 50 characters in length and contain a random mix of letters, digits, and symbols. The script located at `$INSTALL_ROOT/netbox/generate_secret_key.py` may be used to generate a suitable key.
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
Default: True
|
Default: True
|
||||||
|
|
||||||
If disabled, the values of API tokens will not be displayed after each token's initial creation. A user **must** record the value of a token immediately upon its creation, or it will be lost. Note that this affects _all_ users, regardless of assigned permissions.
|
If disabled, the values of API tokens will not be displayed after each token's initial creation. A user **must** record the value of a token prior to its creation, or it will be lost. Note that this affects _all_ users, regardless of assigned permissions.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -67,6 +67,12 @@ The name of the cookie to use for the cross-site request forgery (CSRF) authenti
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## CSRF_COOKIE_SECURE
|
||||||
|
|
||||||
|
Default: False
|
||||||
|
|
||||||
|
If true, the cookie employed for cross-site request forgery (CSRF) protection will be marked as secure, meaning that it can only be sent across an HTTPS connection.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## CSRF_TRUSTED_ORIGINS
|
## CSRF_TRUSTED_ORIGINS
|
||||||
@@ -84,6 +90,38 @@ CSRF_TRUSTED_ORIGINS = (
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## DEFAULT_PERMISSIONS
|
||||||
|
|
||||||
|
!!! info "This parameter was introduced in NetBox v3.6."
|
||||||
|
|
||||||
|
Default:
|
||||||
|
|
||||||
|
```python
|
||||||
|
{
|
||||||
|
'users.view_token': ({'user': '$user'},),
|
||||||
|
'users.add_token': ({'user': '$user'},),
|
||||||
|
'users.change_token': ({'user': '$user'},),
|
||||||
|
'users.delete_token': ({'user': '$user'},),
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
This parameter defines object permissions that are applied automatically to _any_ authenticated user, regardless of what permissions have been defined in the database. By default, this parameter is defined to allow all users to manage their own API tokens, however it can be overriden for any purpose.
|
||||||
|
|
||||||
|
For example, to allow all users to create a device role beginning with the word "temp," you could configure the following:
|
||||||
|
|
||||||
|
```python
|
||||||
|
DEFAULT_PERMISSIONS = {
|
||||||
|
'dcim.add_devicerole': (
|
||||||
|
{'name__startswith': 'temp'},
|
||||||
|
)
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
!!! warning
|
||||||
|
Setting a custom value for this parameter will overwrite the default permission mapping shown above. If you want to retain the default mapping, be sure to reproduce it in your custom configuration.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## EXEMPT_VIEW_PERMISSIONS
|
## EXEMPT_VIEW_PERMISSIONS
|
||||||
|
|
||||||
Default: Empty list
|
Default: Empty list
|
||||||
@@ -145,6 +183,17 @@ The view name or URL to which a user is redirected after logging out.
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## SECURE_SSL_REDIRECT
|
||||||
|
|
||||||
|
Default: False
|
||||||
|
|
||||||
|
If true, all non-HTTPS requests will be automatically redirected to use HTTPS.
|
||||||
|
|
||||||
|
!!! warning
|
||||||
|
Ensure that your frontend HTTP daemon has been configured to forward the HTTP scheme correctly before enabling this option. An incorrectly configured frontend may result in a looping redirect.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## SESSION_COOKIE_NAME
|
## SESSION_COOKIE_NAME
|
||||||
|
|
||||||
Default: `sessionid`
|
Default: `sessionid`
|
||||||
@@ -153,6 +202,14 @@ The name used for the session cookie. See the [Django documentation](https://doc
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## SESSION_COOKIE_SECURE
|
||||||
|
|
||||||
|
Default: False
|
||||||
|
|
||||||
|
If true, the cookie employed for session authentication will be marked as secure, meaning that it can only be sent across an HTTPS connection.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## SESSION_FILE_PATH
|
## SESSION_FILE_PATH
|
||||||
|
|
||||||
Default: None
|
Default: None
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ In order to send email, NetBox needs an email server configured. The following i
|
|||||||
* `SERVER` - Hostname or IP address of the email server (use `localhost` if running locally)
|
* `SERVER` - Hostname or IP address of the email server (use `localhost` if running locally)
|
||||||
* `PORT` - TCP port to use for the connection (default: `25`)
|
* `PORT` - TCP port to use for the connection (default: `25`)
|
||||||
* `USERNAME` - Username with which to authenticate
|
* `USERNAME` - Username with which to authenticate
|
||||||
* `PASSSWORD` - Password with which to authenticate
|
* `PASSWORD` - Password with which to authenticate
|
||||||
* `USE_SSL` - Use SSL when connecting to the server (default: `False`)
|
* `USE_SSL` - Use SSL when connecting to the server (default: `False`)
|
||||||
* `USE_TLS` - Use TLS when connecting to the server (default: `False`)
|
* `USE_TLS` - Use TLS when connecting to the server (default: `False`)
|
||||||
* `SSL_CERTFILE` - Path to the PEM-formatted SSL certificate file (optional)
|
* `SSL_CERTFILE` - Path to the PEM-formatted SSL certificate file (optional)
|
||||||
@@ -73,6 +73,14 @@ Determines if localization features are enabled or not. This should only be enab
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## GIT_PATH
|
||||||
|
|
||||||
|
Default: `git`
|
||||||
|
|
||||||
|
The system path to the `git` executable, used by the synchronization backend for remote git repositories.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## HTTP_PROXIES
|
## HTTP_PROXIES
|
||||||
|
|
||||||
Default: None
|
Default: None
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ Custom fields may be created by navigating to Customization > Custom Fields. Net
|
|||||||
* Decimal: A fixed-precision decimal number (4 decimal places)
|
* Decimal: A fixed-precision decimal number (4 decimal places)
|
||||||
* Boolean: True or false
|
* Boolean: True or false
|
||||||
* Date: A date in ISO 8601 format (YYYY-MM-DD)
|
* Date: A date in ISO 8601 format (YYYY-MM-DD)
|
||||||
|
* Date & time: A date and time in ISO 8601 format (YYYY-MM-DD HH:MM:SS)
|
||||||
* URL: This will be presented as a link in the web UI
|
* URL: This will be presented as a link in the web UI
|
||||||
* JSON: Arbitrary data stored in JSON format
|
* JSON: Arbitrary data stored in JSON format
|
||||||
* Selection: A selection of one of several pre-defined custom choices
|
* Selection: A selection of one of several pre-defined custom choices
|
||||||
@@ -35,24 +36,26 @@ The filter logic controls how values are matched when filtering objects by the c
|
|||||||
|
|
||||||
### Grouping
|
### Grouping
|
||||||
|
|
||||||
!!! note
|
|
||||||
This feature was introduced in NetBox v3.3.
|
|
||||||
|
|
||||||
Related custom fields can be grouped together within the UI by assigning each the same group name. When at least one custom field for an object type has a group defined, it will appear under the group heading within the custom fields panel under the object view. All custom fields with the same group name will appear under that heading. (Note that the group names must match exactly, or each will appear as a separate heading.)
|
Related custom fields can be grouped together within the UI by assigning each the same group name. When at least one custom field for an object type has a group defined, it will appear under the group heading within the custom fields panel under the object view. All custom fields with the same group name will appear under that heading. (Note that the group names must match exactly, or each will appear as a separate heading.)
|
||||||
|
|
||||||
This parameter has no effect on the API representation of custom field data.
|
This parameter has no effect on the API representation of custom field data.
|
||||||
|
|
||||||
### Visibility
|
### Visibility & Editing
|
||||||
|
|
||||||
!!! note
|
!!! info "This feature was improved in NetBox v3.7."
|
||||||
This feature was introduced in NetBox v3.3.
|
|
||||||
|
|
||||||
When creating a custom field, there are three options for UI visibility. These control how and whether the custom field is displayed within the NetBox UI.
|
When creating a custom field, users can control the conditions under which it may be displayed and edited within the NetBox user interface. The following choices are available for controlling the display of a custom field on an object:
|
||||||
|
|
||||||
* **Read/write** (default): The custom field is included when viewing and editing objects.
|
* **Always** (default): The custom field is included when viewing an object.
|
||||||
* **Read-only**: The custom field is displayed when viewing an object, but it cannot be edited via the UI. (It will appear in the form as a read-only field.)
|
* **If Set**: The custom field is included only if a value has been defined for the object.
|
||||||
* **Hidden**: The custom field will never be displayed within the UI. This option is recommended for fields which are not intended for use by human users.
|
* **Hidden**: The custom field will never be displayed within the UI. This option is recommended for fields which are not intended for use by human users.
|
||||||
|
|
||||||
|
Additionally, the following options are available for controlling whether custom field values can be altered within the NetBox UI:
|
||||||
|
|
||||||
|
* **Yes** (default): The custom field's value may be modified when editing an object.
|
||||||
|
* **No**: The custom field is displayed for reference when editing an object, but its value may not be modified.
|
||||||
|
* **Hidden**: The custom field is not displayed when editing an object.
|
||||||
|
|
||||||
Note that this setting has no impact on the REST or GraphQL APIs: Custom field data will always be available via either API.
|
Note that this setting has no impact on the REST or GraphQL APIs: Custom field data will always be available via either API.
|
||||||
|
|
||||||
### Validation
|
### Validation
|
||||||
@@ -65,7 +68,7 @@ NetBox supports limited custom validation for custom field values. Following are
|
|||||||
|
|
||||||
### Custom Selection Fields
|
### Custom Selection Fields
|
||||||
|
|
||||||
Each custom selection field must have at least two choices. These are specified as a comma-separated list. Choices appear in forms in the order they are listed. Note that choice values are saved exactly as they appear, so it's best to avoid superfluous punctuation or symbols where possible.
|
Each custom selection field must designate a [choice set](../models/extras/customfieldchoiceset.md) containing at least two choices. These are specified as a comma-separated list.
|
||||||
|
|
||||||
If a default value is specified for a selection field, it must exactly match one of the provided choices. The value of a multiple selection field will always return a list, even if only one value is selected.
|
If a default value is specified for a selection field, it must exactly match one of the provided choices. The value of a multiple selection field will always return a list, even if only one value is selected.
|
||||||
|
|
||||||
|
|||||||
@@ -2,12 +2,12 @@
|
|||||||
|
|
||||||
Custom links allow users to display arbitrary hyperlinks to external content within NetBox object views. These are helpful for cross-referencing related records in systems outside NetBox. For example, you might create a custom link on the device view which links to the current device in a Network Monitoring System (NMS).
|
Custom links allow users to display arbitrary hyperlinks to external content within NetBox object views. These are helpful for cross-referencing related records in systems outside NetBox. For example, you might create a custom link on the device view which links to the current device in a Network Monitoring System (NMS).
|
||||||
|
|
||||||
Custom links are created by navigating to Customization > Custom Links. Each link is associated with a particular NetBox object type (site, device, prefix, etc.) and will be displayed on relevant views. Each link has display text and a URL, and data from the NetBox item being viewed can be included in the link using [Jinja2 template code](https://jinja2docs.readthedocs.io/en/stable/) through the variable `obj`, and custom fields through `obj.cf`.
|
Custom links are created by navigating to Customization > Custom Links. Each link is associated with a particular NetBox object type (site, device, prefix, etc.) and will be displayed on relevant views. Each link has display text and a URL, and data from the NetBox item being viewed can be included in the link using [Jinja2 template code](https://jinja2docs.readthedocs.io/en/stable/) through the variable `object`, and custom fields through `object.cf`.
|
||||||
|
|
||||||
For example, you might define a link like this:
|
For example, you might define a link like this:
|
||||||
|
|
||||||
* Text: `View NMS`
|
* Text: `View NMS`
|
||||||
* URL: `https://nms.example.com/nodes/?name={{ obj.name }}`
|
* URL: `https://nms.example.com/nodes/?name={{ object.name }}`
|
||||||
|
|
||||||
When viewing a device named Router4, this link would render as:
|
When viewing a device named Router4, this link would render as:
|
||||||
|
|
||||||
@@ -27,7 +27,6 @@ The following context data is available within the template when rendering a cus
|
|||||||
| Variable | Description |
|
| Variable | Description |
|
||||||
|-----------|-------------------------------------------------------------------------------------------------------------------|
|
|-----------|-------------------------------------------------------------------------------------------------------------------|
|
||||||
| `object` | The NetBox object being displayed |
|
| `object` | The NetBox object being displayed |
|
||||||
| `obj` | Same as `object`; maintained for backward compatability until NetBox v3.5 |
|
|
||||||
| `debug` | A boolean indicating whether debugging is enabled |
|
| `debug` | A boolean indicating whether debugging is enabled |
|
||||||
| `request` | The current WSGI request |
|
| `request` | The current WSGI request |
|
||||||
| `user` | The current user (if authenticated) |
|
| `user` | The current user (if authenticated) |
|
||||||
@@ -44,7 +43,7 @@ Only links which render with non-empty text are included on the page. You can em
|
|||||||
For example, if you only want to display a link for active devices, you could set the link text to
|
For example, if you only want to display a link for active devices, you could set the link text to
|
||||||
|
|
||||||
```jinja2
|
```jinja2
|
||||||
{% if obj.status == 'active' %}View NMS{% endif %}
|
{% if object.status == 'active' %}View NMS{% endif %}
|
||||||
```
|
```
|
||||||
|
|
||||||
The link will not appear when viewing a device with any status other than "active."
|
The link will not appear when viewing a device with any status other than "active."
|
||||||
@@ -52,7 +51,7 @@ The link will not appear when viewing a device with any status other than "activ
|
|||||||
As another example, if you wanted to show only devices belonging to a certain manufacturer, you could do something like this:
|
As another example, if you wanted to show only devices belonging to a certain manufacturer, you could do something like this:
|
||||||
|
|
||||||
```jinja2
|
```jinja2
|
||||||
{% if obj.device_type.manufacturer.name == 'Cisco' %}View NMS{% endif %}
|
{% if object.device_type.manufacturer.name == 'Cisco' %}View NMS{% endif %}
|
||||||
```
|
```
|
||||||
|
|
||||||
The link will only appear when viewing a device with a manufacturer name of "Cisco."
|
The link will only appear when viewing a device with a manufacturer name of "Cisco."
|
||||||
|
|||||||
@@ -35,12 +35,9 @@ class MyScript(Script):
|
|||||||
|
|
||||||
The `run()` method should accept two arguments:
|
The `run()` method should accept two arguments:
|
||||||
|
|
||||||
* `data` - A dictionary containing all of the variable data passed via the web form.
|
* `data` - A dictionary containing all the variable data passed via the web form.
|
||||||
* `commit` - A boolean indicating whether database changes will be committed.
|
* `commit` - A boolean indicating whether database changes will be committed.
|
||||||
|
|
||||||
!!! note
|
|
||||||
The `commit` argument was introduced in NetBox v2.7.8. Backward compatibility is maintained for scripts which accept only the `data` argument, however beginning with v2.10 NetBox will require the `run()` method of every script to accept both arguments. (Either argument may still be ignored within the method.)
|
|
||||||
|
|
||||||
Defining script variables is optional: You may create a script with only a `run()` method if no user input is needed.
|
Defining script variables is optional: You may create a script with only a `run()` method if no user input is needed.
|
||||||
|
|
||||||
Any output generated by the script during its execution will be displayed under the "output" tab in the UI.
|
Any output generated by the script during its execution will be displayed under the "output" tab in the UI.
|
||||||
@@ -79,7 +76,22 @@ A human-friendly description of what your script does.
|
|||||||
|
|
||||||
### `field_order`
|
### `field_order`
|
||||||
|
|
||||||
By default, script variables will be ordered in the form as they are defined in the script. `field_order` may be defined as an iterable of field names to determine the order in which variables are rendered. Any fields not included in this iterable be listed last.
|
By default, script variables will be ordered in the form as they are defined in the script. `field_order` may be defined as an iterable of field names to determine the order in which variables are rendered within a default "Script Data" group. Any fields not included in this iterable be listed last. If `fieldsets` is defined, `field_order` will be ignored. A fieldset group for "Script Execution Parameters" will be added to the end of the form by default for the user.
|
||||||
|
|
||||||
|
### `fieldsets`
|
||||||
|
|
||||||
|
`fieldsets` may be defined as an iterable of field groups and their field names to determine the order in which variables are group and rendered. Any fields not included in this iterable will not be displayed in the form. If `fieldsets` is defined, `field_order` will be ignored. A fieldset group for "Script Execution Parameters" will be added to the end of the fieldsets by default for the user.
|
||||||
|
|
||||||
|
An example fieldset definition is provided below:
|
||||||
|
|
||||||
|
```python
|
||||||
|
class MyScript(Script):
|
||||||
|
class Meta:
|
||||||
|
fieldsets = (
|
||||||
|
('First group', ('field1', 'field2', 'field3')),
|
||||||
|
('Second group', ('field4', 'field5')),
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
### `commit_default`
|
### `commit_default`
|
||||||
|
|
||||||
@@ -89,12 +101,14 @@ The checkbox to commit database changes when executing a script is checked by de
|
|||||||
commit_default = False
|
commit_default = False
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### `scheduling_enabled`
|
||||||
|
|
||||||
|
By default, a script can be scheduled for execution at a later time. Setting `scheduling_enabled` to False disables this ability: Only immediate execution will be possible. (This also disables the ability to set a recurring execution interval.)
|
||||||
|
|
||||||
### `job_timeout`
|
### `job_timeout`
|
||||||
|
|
||||||
Set the maximum allowed runtime for the script. If not set, `RQ_DEFAULT_TIMEOUT` will be used.
|
Set the maximum allowed runtime for the script. If not set, `RQ_DEFAULT_TIMEOUT` will be used.
|
||||||
|
|
||||||
!!! info "This feature was introduced in v3.2.1"
|
|
||||||
|
|
||||||
## Accessing Request Data
|
## Accessing Request Data
|
||||||
|
|
||||||
Details of the current HTTP request (the one being made to execute the script) are available as the instance attribute `self.request`. This can be used to infer, for example, the user executing the script and the client IP address:
|
Details of the current HTTP request (the one being made to execute the script) are available as the instance attribute `self.request`. This can be used to infer, for example, the user executing the script and the client IP address:
|
||||||
@@ -274,9 +288,9 @@ An IPv4 or IPv6 network with a mask. Returns a `netaddr.IPNetwork` object. Two a
|
|||||||
## Running Custom Scripts
|
## Running Custom Scripts
|
||||||
|
|
||||||
!!! note
|
!!! note
|
||||||
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.
|
To run a custom script, a user must be assigned permissions for `Extras > Script`, `Extras > Script Module`, and `Core > Managed File` objects. They must also 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 "Permissions" as shown below.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### Via the Web UI
|
### Via the Web UI
|
||||||
|
|
||||||
@@ -302,7 +316,7 @@ Optionally `schedule_at` can be passed in the form data with a datetime string t
|
|||||||
Scripts can be run on the CLI by invoking the management command:
|
Scripts can be run on the CLI by invoking the management command:
|
||||||
|
|
||||||
```
|
```
|
||||||
python3 manage.py runscript [--commit] [--loglevel {debug,info,warning,error,critical}] [--data "<data>"] <module>.<script>
|
python3 manage.py runscript [--commit] [--loglevel {debug,info,warning,error,critical}] [--data "<data>"] <module>.<script>
|
||||||
```
|
```
|
||||||
|
|
||||||
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.
|
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.
|
||||||
@@ -364,6 +378,7 @@ class NewBranchScript(Script):
|
|||||||
slug=slugify(data['site_name']),
|
slug=slugify(data['site_name']),
|
||||||
status=SiteStatusChoices.STATUS_PLANNED
|
status=SiteStatusChoices.STATUS_PLANNED
|
||||||
)
|
)
|
||||||
|
site.full_clean()
|
||||||
site.save()
|
site.save()
|
||||||
self.log_success(f"Created new site: {site}")
|
self.log_success(f"Created new site: {site}")
|
||||||
|
|
||||||
@@ -375,8 +390,9 @@ class NewBranchScript(Script):
|
|||||||
name=f'{site.slug}-switch{i}',
|
name=f'{site.slug}-switch{i}',
|
||||||
site=site,
|
site=site,
|
||||||
status=DeviceStatusChoices.STATUS_PLANNED,
|
status=DeviceStatusChoices.STATUS_PLANNED,
|
||||||
device_role=switch_role
|
role=switch_role
|
||||||
)
|
)
|
||||||
|
switch.full_clean()
|
||||||
switch.save()
|
switch.save()
|
||||||
self.log_success(f"Created new switch: {switch}")
|
self.log_success(f"Created new switch: {switch}")
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ The `CustomValidator` class supports several validation types:
|
|||||||
* `regex`: Application of a [regular expression](https://en.wikipedia.org/wiki/Regular_expression)
|
* `regex`: Application of a [regular expression](https://en.wikipedia.org/wiki/Regular_expression)
|
||||||
* `required`: A value must be specified
|
* `required`: A value must be specified
|
||||||
* `prohibited`: A value must _not_ be specified
|
* `prohibited`: A value must _not_ be specified
|
||||||
|
* `eq`: A value must be equal to the specified value
|
||||||
|
* `neq`: A value must _not_ be equal to the specified value
|
||||||
|
|
||||||
The `min` and `max` types should be defined for numeric values, whereas `min_length`, `max_length`, and `regex` are suitable for character strings (text values). The `required` and `prohibited` validators may be used for any field, and should be passed a value of `True`.
|
The `min` and `max` types should be defined for numeric values, whereas `min_length`, `max_length`, and `regex` are suitable for character strings (text values). The `required` and `prohibited` validators may be used for any field, and should be passed a value of `True`.
|
||||||
|
|
||||||
|
|||||||
@@ -91,12 +91,14 @@ As you can see, reports are completely customizable. Validation logic can be as
|
|||||||
|
|
||||||
A human-friendly description of what your report does.
|
A human-friendly description of what your report does.
|
||||||
|
|
||||||
|
### `scheduling_enabled`
|
||||||
|
|
||||||
|
By default, a report can be scheduled for execution at a later time. Setting `scheduling_enabled` to False disables this ability: Only immediate execution will be possible. (This also disables the ability to set a recurring execution interval.)
|
||||||
|
|
||||||
### `job_timeout`
|
### `job_timeout`
|
||||||
|
|
||||||
Set the maximum allowed runtime for the report. If not set, `RQ_DEFAULT_TIMEOUT` will be used.
|
Set the maximum allowed runtime for the report. If not set, `RQ_DEFAULT_TIMEOUT` will be used.
|
||||||
|
|
||||||
!!! info "This feature was introduced in v3.2.1"
|
|
||||||
|
|
||||||
## Logging
|
## Logging
|
||||||
|
|
||||||
The following methods are available to log results within a report:
|
The following methods are available to log results within a report:
|
||||||
@@ -109,7 +111,7 @@ The following methods are available to log results within a report:
|
|||||||
|
|
||||||
The recording of one or more failure messages will automatically flag a report as failed. It is advised to log a success for each object that is evaluated so that the results will reflect how many objects are being reported on. (The inclusion of a log message is optional for successes.) Messages recorded with `log()` will appear in a report's results but are not associated with a particular object or status. Log messages also support using markdown syntax and will be rendered on the report result page.
|
The recording of one or more failure messages will automatically flag a report as failed. It is advised to log a success for each object that is evaluated so that the results will reflect how many objects are being reported on. (The inclusion of a log message is optional for successes.) Messages recorded with `log()` will appear in a report's results but are not associated with a particular object or status. Log messages also support using markdown syntax and will be rendered on the report result page.
|
||||||
|
|
||||||
To perform additional tasks, such as sending an email or calling a webhook, before or after a report is run, extend the `pre_run()` and/or `post_run()` methods, respectively. The status of a completed report is available as `self.failed` and the results object is `self.result`.
|
To perform additional tasks, such as sending an email or calling a webhook, before or after a report is run, extend the `pre_run()` and/or `post_run()` methods, respectively.
|
||||||
|
|
||||||
By default, reports within a module are ordered alphabetically in the reports list page. To return reports in a specific order, you can define the `report_order` variable at the end of your module. The `report_order` variable is a tuple which contains each Report class in the desired order. Any reports that are omitted from this list will be listed last.
|
By default, reports within a module are ordered alphabetically in the reports list page. To return reports in a specific order, you can define the `report_order` variable at the end of your module. The `report_order` variable is a tuple which contains each Report class in the desired order. Any reports that are omitted from this list will be listed last.
|
||||||
|
|
||||||
@@ -130,9 +132,9 @@ Once you have created a report, it will appear in the reports list. Initially, r
|
|||||||
## Running Reports
|
## Running Reports
|
||||||
|
|
||||||
!!! note
|
!!! note
|
||||||
To run a report, a user must be assigned the `extras.run_report` permission. This is achieved by assigning the user (or group) a permission on the Report object and specifying the `run` action in the admin UI as shown below.
|
To run a report, a user must be assigned permissions for `Extras > Report`, `Extras > Report Module`, and `Core > Managed File` objects. They must also be assigned the `extras.run_report` permission. This is achieved by assigning the user (or group) a permission on the Report object and specifying the `run` action in "Permissions" as shown below.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### Via the Web UI
|
### Via the Web UI
|
||||||
|
|
||||||
|
|||||||
@@ -54,15 +54,19 @@ Each model should have a corresponding FilterSet class defined. This is used to
|
|||||||
|
|
||||||
Create a table class for the model in `tables.py` by subclassing `utilities.tables.BaseTable`. Under the table's `Meta` class, be sure to list both the fields and default columns.
|
Create a table class for the model in `tables.py` by subclassing `utilities.tables.BaseTable`. Under the table's `Meta` class, be sure to list both the fields and default columns.
|
||||||
|
|
||||||
## 9. Create the object template
|
## 9. Create a SearchIndex subclass
|
||||||
|
|
||||||
|
If this model will be included in global search results, create a subclass of `netbox.search.SearchIndex` for it and specify the fields to be indexed.
|
||||||
|
|
||||||
|
## 10. Create the object template
|
||||||
|
|
||||||
Create the HTML template for the object view. (The other views each typically employ a generic template.) This template should extend `generic/object.html`.
|
Create the HTML template for the object view. (The other views each typically employ a generic template.) This template should extend `generic/object.html`.
|
||||||
|
|
||||||
## 10. Add the model to the navigation menu
|
## 11. Add the model to the navigation menu
|
||||||
|
|
||||||
Add the relevant navigation menu items in `netbox/netbox/navigation/menu.py`.
|
Add the relevant navigation menu items in `netbox/netbox/navigation/menu.py`.
|
||||||
|
|
||||||
## 11. REST API components
|
## 12. REST API components
|
||||||
|
|
||||||
Create the following for each model:
|
Create the following for each model:
|
||||||
|
|
||||||
@@ -71,13 +75,13 @@ Create the following for each model:
|
|||||||
* API view in `api/views.py`
|
* API view in `api/views.py`
|
||||||
* Endpoint route in `api/urls.py`
|
* Endpoint route in `api/urls.py`
|
||||||
|
|
||||||
## 12. GraphQL API components
|
## 13. GraphQL API components
|
||||||
|
|
||||||
Create a Graphene object type for the model in `graphql/types.py` by subclassing the appropriate class from `netbox.graphql.types`.
|
Create a Graphene object type for the model in `graphql/types.py` by subclassing the appropriate class from `netbox.graphql.types`.
|
||||||
|
|
||||||
Also extend the schema class defined in `graphql/schema.py` with the individual object and object list fields per the established convention.
|
Also extend the schema class defined in `graphql/schema.py` with the individual object and object list fields per the established convention.
|
||||||
|
|
||||||
## 13. Add tests
|
## 14. Add tests
|
||||||
|
|
||||||
Add tests for the following:
|
Add tests for the following:
|
||||||
|
|
||||||
@@ -85,7 +89,7 @@ Add tests for the following:
|
|||||||
* API views
|
* API views
|
||||||
* Filter sets
|
* Filter sets
|
||||||
|
|
||||||
## 14. Documentation
|
## 15. Documentation
|
||||||
|
|
||||||
Create a new documentation page for the model in `docs/models/<app_label>/<model_name>.md`. Include this file under the "features" documentation where appropriate.
|
Create a new documentation page for the model in `docs/models/<app_label>/<model_name>.md`. Include this file under the "features" documentation where appropriate.
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,18 @@ The registry can be inspected by importing `registry` from `extras.registry`.
|
|||||||
|
|
||||||
## Stores
|
## Stores
|
||||||
|
|
||||||
|
### `counter_fields`
|
||||||
|
|
||||||
|
A dictionary mapping of models to foreign keys with which cached counter fields are associated.
|
||||||
|
|
||||||
|
### `data_backends`
|
||||||
|
|
||||||
|
A dictionary mapping data backend types to their respective classes. These are used to interact with [remote data sources](../models/core/datasource.md).
|
||||||
|
|
||||||
|
### `denormalized_fields`
|
||||||
|
|
||||||
|
Stores registration made using `netbox.denormalized.register()`. For each model, a list of related models and their field mappings is maintained to facilitate automatic updates.
|
||||||
|
|
||||||
### `model_features`
|
### `model_features`
|
||||||
|
|
||||||
A dictionary of particular features (e.g. custom fields) mapped to the NetBox models which support them, arranged by app. For example:
|
A dictionary of particular features (e.g. custom fields) mapped to the NetBox models which support them, arranged by app. For example:
|
||||||
@@ -19,39 +31,32 @@ A dictionary of particular features (e.g. custom fields) mapped to the NetBox mo
|
|||||||
'dcim': ['site', 'rack', 'devicetype', ...],
|
'dcim': ['site', 'rack', 'devicetype', ...],
|
||||||
...
|
...
|
||||||
},
|
},
|
||||||
'webhooks': {
|
'event_rules': {
|
||||||
...
|
'extras': ['configcontext', 'tag', ...],
|
||||||
|
'dcim': ['site', 'rack', 'devicetype', ...],
|
||||||
},
|
},
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### `plugin_menu_items`
|
Supported model features are listed in the [features matrix](./models.md#features-matrix).
|
||||||
|
|
||||||
Navigation menu items provided by NetBox plugins. Each plugin is registered as a key with the list of menu items it provides. An example:
|
### `models`
|
||||||
|
|
||||||
```python
|
This key lists all models which have been registered in NetBox which are not designated for private use. (Setting `_netbox_private` to True on a model excludes it from this list.) As with individual features under `model_features`, models are organized by app label.
|
||||||
{
|
|
||||||
'Plugin A': (
|
|
||||||
<MenuItem>, <MenuItem>, <MenuItem>,
|
|
||||||
),
|
|
||||||
'Plugin B': (
|
|
||||||
<MenuItem>, <MenuItem>, <MenuItem>,
|
|
||||||
),
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### `plugin_template_extensions`
|
### `plugins`
|
||||||
|
|
||||||
Plugin content that gets embedded into core NetBox templates. The store comprises NetBox models registered as dictionary keys, each pointing to a list of applicable template extension classes that exist. An example:
|
This store maintains all registered items for plugins, such as navigation menus, template extensions, etc.
|
||||||
|
|
||||||
```python
|
### `search`
|
||||||
{
|
|
||||||
'dcim.site': [
|
A dictionary mapping each model (identified by its app and label) to its search index class, if one has been registered for it.
|
||||||
<TemplateExtension>, <TemplateExtension>, <TemplateExtension>,
|
|
||||||
],
|
### `tables`
|
||||||
'dcim.rack': [
|
|
||||||
<TemplateExtension>, <TemplateExtension>,
|
A dictionary mapping table classes to lists of extra columns that have been registered by plugins using the `register_table_column()` utility function. Each column is defined as a tuple of name and column instance.
|
||||||
],
|
|
||||||
}
|
### `views`
|
||||||
```
|
|
||||||
|
A hierarchical mapping of registered views for each model. Mappings are added using the `register_model_view()` decorator, and URLs paths can be generated from these using `get_model_urls()`.
|
||||||
|
|||||||
@@ -2,12 +2,25 @@
|
|||||||
|
|
||||||
Below is a list of tasks to consider when adding a new field to a core model.
|
Below is a list of tasks to consider when adding a new field to a core model.
|
||||||
|
|
||||||
## 1. Generate and run database migrations
|
## 1. Add the field to the model class
|
||||||
|
|
||||||
|
Add the field to the model, taking care to address any of the following conditions.
|
||||||
|
|
||||||
|
* When adding a GenericForeignKey field, also add an index under `Meta` for its two concrete fields. For example:
|
||||||
|
|
||||||
|
```python
|
||||||
|
class Meta:
|
||||||
|
indexes = (
|
||||||
|
models.Index(fields=('object_type', 'object_id')),
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
## 2. Generate and run database migrations
|
||||||
|
|
||||||
[Django migrations](https://docs.djangoproject.com/en/stable/topics/migrations/) are used to express changes to the database schema. In most cases, Django can generate these automatically, however very complex changes may require manual intervention. Always remember to specify a short but descriptive name when generating a new migration.
|
[Django migrations](https://docs.djangoproject.com/en/stable/topics/migrations/) are used to express changes to the database schema. In most cases, Django can generate these automatically, however very complex changes may require manual intervention. Always remember to specify a short but descriptive name when generating a new migration.
|
||||||
|
|
||||||
```
|
```
|
||||||
./manage.py makemigrations <app> -n <name>
|
./manage.py makemigrations <app> -n <name> --no-header
|
||||||
./manage.py migrate
|
./manage.py migrate
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -16,7 +29,7 @@ Where possible, try to merge related changes into a single migration. For exampl
|
|||||||
!!! warning "Do not alter existing migrations"
|
!!! warning "Do not alter existing migrations"
|
||||||
Migrations can only be merged within a release. Once a new release has been published, its migrations cannot be altered (other than for the purpose of correcting a bug).
|
Migrations can only be merged within a release. Once a new release has been published, its migrations cannot be altered (other than for the purpose of correcting a bug).
|
||||||
|
|
||||||
## 2. Add validation logic to `clean()`
|
## 3. Add validation logic to `clean()`
|
||||||
|
|
||||||
If the new field introduces additional validation requirements (beyond what's included with the field itself), implement them in the model's `clean()` method. Remember to call the model's original method using `super()` before or after your custom validation as appropriate:
|
If the new field introduces additional validation requirements (beyond what's included with the field itself), implement them in the model's `clean()` method. Remember to call the model's original method using `super()` before or after your custom validation as appropriate:
|
||||||
|
|
||||||
@@ -31,15 +44,15 @@ class Foo(models.Model):
|
|||||||
raise ValidationError()
|
raise ValidationError()
|
||||||
```
|
```
|
||||||
|
|
||||||
## 3. Update relevant querysets
|
## 4. Update relevant querysets
|
||||||
|
|
||||||
If you're adding a relational field (e.g. `ForeignKey`) and intend to include the data when retrieving a list of objects, be sure to include the field using `prefetch_related()` as appropriate. This will optimize the view and avoid extraneous database queries.
|
If you're adding a relational field (e.g. `ForeignKey`) and intend to include the data when retrieving a list of objects, be sure to include the field using `prefetch_related()` as appropriate. This will optimize the view and avoid extraneous database queries.
|
||||||
|
|
||||||
## 4. Update API serializer
|
## 5. Update API serializer
|
||||||
|
|
||||||
Extend the model's API serializer in `<app>.api.serializers` to include the new field. In most cases, it will not be necessary to also extend the nested serializer, which produces a minimal representation of the model.
|
Extend the model's API serializer in `<app>.api.serializers` to include the new field. In most cases, it will not be necessary to also extend the nested serializer, which produces a minimal representation of the model.
|
||||||
|
|
||||||
## 5. Add fields to forms
|
## 6. Add fields to forms
|
||||||
|
|
||||||
Extend any forms to include the new field(s) as appropriate. These are found under the `forms/` directory within each app. Common forms include:
|
Extend any forms to include the new field(s) as appropriate. These are found under the `forms/` directory within each app. Common forms include:
|
||||||
|
|
||||||
@@ -48,23 +61,23 @@ Extend any forms to include the new field(s) as appropriate. These are found und
|
|||||||
* **CSV import** - The form used when bulk importing objects in CSV format
|
* **CSV import** - The form used when bulk importing objects in CSV format
|
||||||
* **Filter** - Displays the options available for filtering a list of objects (both UI and API)
|
* **Filter** - Displays the options available for filtering a list of objects (both UI and API)
|
||||||
|
|
||||||
## 6. Extend object filter set
|
## 7. Extend object filter set
|
||||||
|
|
||||||
If the new field should be filterable, add it to the `FilterSet` for the model. If the field should be searchable, remember to query it in the FilterSet's `search()` method.
|
If the new field should be filterable, add it to the `FilterSet` for the model. If the field should be searchable, remember to query it in the FilterSet's `search()` method.
|
||||||
|
|
||||||
## 7. Add column to object table
|
## 8. Add column to object table
|
||||||
|
|
||||||
If the new field will be included in the object list view, add a column to the model's table. For simple fields, adding the field name to `Meta.fields` will be sufficient. More complex fields may require declaring a custom column. Also add the field name to `default_columns` if the column should be present in the table by default.
|
If the new field will be included in the object list view, add a column to the model's table. For simple fields, adding the field name to `Meta.fields` will be sufficient. More complex fields may require declaring a custom column. Also add the field name to `default_columns` if the column should be present in the table by default.
|
||||||
|
|
||||||
## 8. Update the SearchIndex
|
## 9. Update the SearchIndex
|
||||||
|
|
||||||
Where applicable, add the new field to the model's SearchIndex for inclusion in global search.
|
Where applicable, add the new field to the model's SearchIndex for inclusion in global search.
|
||||||
|
|
||||||
## 9. Update the UI templates
|
## 10. Update the UI templates
|
||||||
|
|
||||||
Edit the object's view template to display the new field. There may also be a custom add/edit form template that needs to be updated.
|
Edit the object's view template to display the new field. There may also be a custom add/edit form template that needs to be updated.
|
||||||
|
|
||||||
## 10. Create/extend test cases
|
## 11. Create/extend test cases
|
||||||
|
|
||||||
Create or extend the relevant test cases to verify that the new field and any accompanying validation logic perform as expected. This is especially important for relational fields. NetBox incorporates various test suites, including:
|
Create or extend the relevant test cases to verify that the new field and any accompanying validation logic perform as expected. This is especially important for relational fields. NetBox incorporates various test suites, including:
|
||||||
|
|
||||||
@@ -74,8 +87,8 @@ Create or extend the relevant test cases to verify that the new field and any ac
|
|||||||
* Model tests
|
* Model tests
|
||||||
* View tests
|
* View tests
|
||||||
|
|
||||||
Be diligent to ensure all of the relevant test suites are adapted or extended as necessary to test any new functionality.
|
Be diligent to ensure all the relevant test suites are adapted or extended as necessary to test any new functionality.
|
||||||
|
|
||||||
## 11. Update the model's documentation
|
## 12. Update the model's documentation
|
||||||
|
|
||||||
Each model has a dedicated page in the documentation, at `models/<app>/<model>.md`. Update this file to include any relevant information about the new field.
|
Each model has a dedicated page in the documentation, at `models/<app>/<model>.md`. Update this file to include any relevant information about the new field.
|
||||||
|
|||||||
123
docs/development/internationalization.md
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
# Internationalization
|
||||||
|
|
||||||
|
Beginning with NetBox v4.0, NetBox will leverage [Django's automatic translation](https://docs.djangoproject.com/en/stable/topics/i18n/translation/) to support languages other than English. This page details the areas of the project which require special attention to ensure functioning translation support. Briefly, these include:
|
||||||
|
|
||||||
|
* The `verbose_name` and `verbose_name_plural` Meta attributes for each model
|
||||||
|
* The `verbose_name` and (if defined) `help_text` for each model field
|
||||||
|
* The `label` for each form field
|
||||||
|
* Headers for `fieldsets` on each form class
|
||||||
|
* The `verbose_name` for each table column
|
||||||
|
* All human-readable strings within templates must be wrapped with `{% trans %}` or `{% blocktrans %}`
|
||||||
|
|
||||||
|
The rest of this document elaborates on each of the items above.
|
||||||
|
|
||||||
|
## General Guidance
|
||||||
|
|
||||||
|
* Wrap human-readable strings with Django's `gettext()` or `gettext_lazy()` utility functions to enable automatic translation. Generally, `gettext_lazy()` is preferred (and sometimes required) to defer translation until the string is displayed.
|
||||||
|
|
||||||
|
* By convention, the preferred translation function is typically imported as an underscore (`_`) to minimize boilerplate code. Thus, you will often see translation as e.g. `_("Some text")`. It is still an option to import and use alternative translation functions (e.g. `pgettext()` and `ngettext()`) normally as needed.
|
||||||
|
|
||||||
|
* Avoid passing markup and other non-natural language where possible. Everything wrapped by a translation function gets exported to a messages file for translation by a human.
|
||||||
|
|
||||||
|
* Where the intended meaning of the translated string may not be obvious, use `pgettext()` or `pgettext_lazy()` to include assisting context for the translator. For example:
|
||||||
|
|
||||||
|
```python
|
||||||
|
# Context, string
|
||||||
|
pgettext("month name", "May")
|
||||||
|
```
|
||||||
|
|
||||||
|
* **Format strings do not support translation.** Avoid "f" strings for messages that must support translation. Instead, use `format()` to accomplish variable replacement:
|
||||||
|
|
||||||
|
```python
|
||||||
|
# Translation will not work
|
||||||
|
f"There are {count} objects"
|
||||||
|
|
||||||
|
# Do this instead
|
||||||
|
"There are {count} objects".format(count=count)
|
||||||
|
```
|
||||||
|
|
||||||
|
## Models
|
||||||
|
|
||||||
|
1. Import `gettext_lazy` as `_`.
|
||||||
|
2. Ensure both `verbose_name` and `verbose_name_plural` are defined under the model's `Meta` class and wrapped with the `gettext_lazy()` shortcut.
|
||||||
|
3. Ensure each model field specifies a `verbose_name` wrapped with `gettext_lazy()`.
|
||||||
|
4. Ensure any `help_text` attributes on model fields are also wrapped with `gettext_lazy()`.
|
||||||
|
|
||||||
|
```python
|
||||||
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
|
class Circuit(PrimaryModel):
|
||||||
|
commit_rate = models.PositiveIntegerField(
|
||||||
|
...
|
||||||
|
verbose_name=_('commit rate (Kbps)'),
|
||||||
|
help_text=_("Committed rate")
|
||||||
|
)
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
verbose_name = _('circuit')
|
||||||
|
verbose_name_plural = _('circuits')
|
||||||
|
```
|
||||||
|
|
||||||
|
## Forms
|
||||||
|
|
||||||
|
1. Import `gettext_lazy` as `_`.
|
||||||
|
2. All form fields must specify a `label` wrapped with `gettext_lazy()`.
|
||||||
|
3. All headers under a form's `fieldsets` property must be wrapped with `gettext_lazy()`.
|
||||||
|
|
||||||
|
```python
|
||||||
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
|
class CircuitBulkEditForm(NetBoxModelBulkEditForm):
|
||||||
|
description = forms.CharField(
|
||||||
|
label=_('Description'),
|
||||||
|
...
|
||||||
|
)
|
||||||
|
|
||||||
|
fieldsets = (
|
||||||
|
(_('Circuit'), ('provider', 'type', 'status', 'description')),
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
## Tables
|
||||||
|
|
||||||
|
1. Import `gettext_lazy` as `_`.
|
||||||
|
2. All table columns must specify a `verbose_name` wrapped with `gettext_lazy()`.
|
||||||
|
|
||||||
|
```python
|
||||||
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
|
class CircuitTable(TenancyColumnsMixin, ContactsColumnMixin, NetBoxTable):
|
||||||
|
provider = tables.Column(
|
||||||
|
verbose_name=_('Provider'),
|
||||||
|
...
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
## Templates
|
||||||
|
|
||||||
|
1. Ensure translation support is enabled by including `{% load i18n %}` at the top of the template.
|
||||||
|
2. Use the [`{% trans %}`](https://docs.djangoproject.com/en/stable/topics/i18n/translation/#translate-template-tag) tag (short for "translate") to wrap short strings.
|
||||||
|
3. Longer strings may be enclosed between [`{% blocktrans %}`](https://docs.djangoproject.com/en/stable/topics/i18n/translation/#blocktranslate-template-tag) and `{% endblocktrans %}` tags to improve readability and to enable variable replacement. (Remember to include the `trimmed` argument to trim whitespace between the tags.)
|
||||||
|
4. Avoid passing HTML within translated strings where possible, as this can complicate the work needed of human translators to develop message maps.
|
||||||
|
|
||||||
|
```
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
|
{# A short string #}
|
||||||
|
<h5 class="card-header">{% trans "Circuit List" %}</h5>
|
||||||
|
|
||||||
|
{# A longer string with a context variable #}
|
||||||
|
{% blocktrans trimmed with count=object.circuits.count %}
|
||||||
|
There are {count} circuits. Would you like to continue?
|
||||||
|
{% endblocktrans %}
|
||||||
|
```
|
||||||
|
|
||||||
|
!!! warning
|
||||||
|
The `{% blocktrans %}` tag supports only **limited variable replacement**, comparable to the `format()` method on Python strings. It does not permit access to object attributes or the use of other template tags or filters inside it. Ensure that any necessary context is passed as simple variables.
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The `{% trans %}` and `{% blocktrans %}` support the inclusion of contextual hints for translators using the `context` argument:
|
||||||
|
|
||||||
|
```nohighlight
|
||||||
|
{% trans "May" context "month name" %}
|
||||||
|
```
|
||||||
@@ -2,38 +2,44 @@
|
|||||||
|
|
||||||
## Model Types
|
## Model Types
|
||||||
|
|
||||||
A NetBox model represents a discrete object type such as a device or IP address. Per [Django convention](https://docs.djangoproject.com/en/stable/topics/db/models/), each model is defined as a Python class and has its own SQL table. All NetBox data models can be categorized by type.
|
A NetBox model represents a discrete object type such as a device or IP address. Per [Django convention](https://docs.djangoproject.com/en/stable/topics/db/models/), each model is defined as a Python class and has its own table in the PostgreSQL database. All NetBox data models can be categorized by type.
|
||||||
|
|
||||||
The Django [content types](https://docs.djangoproject.com/en/stable/ref/contrib/contenttypes/) framework can be used to reference models within the database. A ContentType instance references a model by its `app_label` and `name`: For example, the Site model is referred to as `dcim.site`. The content type combined with an object's primary key form a globally unique identifier for the object (e.g. `dcim.site:123`).
|
The Django [content types](https://docs.djangoproject.com/en/stable/ref/contrib/contenttypes/) framework is used to map Django models to database tables. A ContentType instance references a model by its `app_label` and `name`: For example, the Site model within the DCIM app is referred to as `dcim.site`. The content type combined with an object's primary key form a globally unique identifier for the object (e.g. `dcim.site:123`).
|
||||||
|
|
||||||
### Features Matrix
|
### Features Matrix
|
||||||
|
|
||||||
* [Change logging](../features/change-logging.md) - Changes to these objects are automatically recorded in the change log
|
Depending on its classification, each NetBox model may support various features which enhance its operation. Each feature is enabled by inheriting from its designated mixin class, and some features also make use of the [application registry](./application-registry.md#model_features).
|
||||||
* [Webhooks](../integrations/webhooks.md) - NetBox is capable of generating outgoing webhooks for these objects
|
|
||||||
* [Custom fields](../customization/custom-fields.md) - These models support the addition of user-defined fields
|
|
||||||
* [Export templates](../customization/export-templates.md) - Users can create custom export templates for these models
|
|
||||||
* [Tagging](../models/extras/tag.md) - The models can be tagged with user-defined tags
|
|
||||||
* [Journaling](../features/journaling.md) - These models support persistent historical commentary
|
|
||||||
* Nesting - These models can be nested recursively to create a hierarchy
|
|
||||||
|
|
||||||
| Type | Change Logging | Webhooks | Custom Fields | Export Templates | Tags | Journaling | Nesting |
|
| Feature | Feature Mixin | Registry Key | Description |
|
||||||
| ------------------ | ---------------- | ---------------- |------------------| ---------------- | ---------------- | ---------------- | ---------------- |
|
|------------------------------------------------------------|-------------------------|--------------------|-----------------------------------------------------------------------------------------|
|
||||||
| Primary | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: | |
|
| [Change logging](../features/change-logging.md) | `ChangeLoggingMixin` | - | Changes to these objects are automatically recorded in the change log |
|
||||||
| Organizational | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: | | |
|
| Cloning | `CloningMixin` | - | Provides the `clone()` method to prepare a copy |
|
||||||
| Nested Group | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: | | :material-check: |
|
| [Custom fields](../customization/custom-fields.md) | `CustomFieldsMixin` | `custom_fields` | These models support the addition of user-defined fields |
|
||||||
| Component | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: | | |
|
| [Custom links](../customization/custom-links.md) | `CustomLinksMixin` | `custom_links` | These models support the assignment of custom links |
|
||||||
| Component Template | :material-check: | :material-check: | | | | | |
|
| [Custom validation](../customization/custom-validation.md) | `CustomValidationMixin` | - | Supports the enforcement of custom validation rules |
|
||||||
|
| [Export templates](../customization/export-templates.md) | `ExportTemplatesMixin` | `export_templates` | Users can create custom export templates for these models |
|
||||||
|
| [Job results](../features/background-jobs.md) | `JobsMixin` | `jobs` | Users can create custom export templates for these models |
|
||||||
|
| [Journaling](../features/journaling.md) | `JournalingMixin` | `journaling` | These models support persistent historical commentary |
|
||||||
|
| [Synchronized data](../integrations/synchronized-data.md) | `SyncedDataMixin` | `synced_data` | Certain model data can be automatically synchronized from a remote data source |
|
||||||
|
| [Tagging](../models/extras/tag.md) | `TagsMixin` | `tags` | The models can be tagged with user-defined tags |
|
||||||
|
| [Event rules](../features/event-rules.md) | `EventRulesMixin` | `event_rules` | Event rules can send webhooks or run custom scripts automatically in response to events |
|
||||||
|
|
||||||
## Models Index
|
## Models Index
|
||||||
|
|
||||||
### Primary Models
|
### Primary Models
|
||||||
|
|
||||||
|
These are considered the "core" application models which are used to model network infrastructure.
|
||||||
|
|
||||||
* [circuits.Circuit](../models/circuits/circuit.md)
|
* [circuits.Circuit](../models/circuits/circuit.md)
|
||||||
* [circuits.Provider](../models/circuits/provider.md)
|
* [circuits.Provider](../models/circuits/provider.md)
|
||||||
|
* [circuits.ProviderAccount](../models/circuits/provideraccount.md)
|
||||||
* [circuits.ProviderNetwork](../models/circuits/providernetwork.md)
|
* [circuits.ProviderNetwork](../models/circuits/providernetwork.md)
|
||||||
|
* [core.DataSource](../models/core/datasource.md)
|
||||||
* [dcim.Cable](../models/dcim/cable.md)
|
* [dcim.Cable](../models/dcim/cable.md)
|
||||||
* [dcim.Device](../models/dcim/device.md)
|
* [dcim.Device](../models/dcim/device.md)
|
||||||
* [dcim.DeviceType](../models/dcim/devicetype.md)
|
* [dcim.DeviceType](../models/dcim/devicetype.md)
|
||||||
|
* [dcim.Module](../models/dcim/module.md)
|
||||||
|
* [dcim.ModuleType](../models/dcim/moduletype.md)
|
||||||
* [dcim.PowerFeed](../models/dcim/powerfeed.md)
|
* [dcim.PowerFeed](../models/dcim/powerfeed.md)
|
||||||
* [dcim.PowerPanel](../models/dcim/powerpanel.md)
|
* [dcim.PowerPanel](../models/dcim/powerpanel.md)
|
||||||
* [dcim.Rack](../models/dcim/rack.md)
|
* [dcim.Rack](../models/dcim/rack.md)
|
||||||
@@ -46,27 +52,36 @@ The Django [content types](https://docs.djangoproject.com/en/stable/ref/contrib/
|
|||||||
* [ipam.FHRPGroup](../models/ipam/fhrpgroup.md)
|
* [ipam.FHRPGroup](../models/ipam/fhrpgroup.md)
|
||||||
* [ipam.IPAddress](../models/ipam/ipaddress.md)
|
* [ipam.IPAddress](../models/ipam/ipaddress.md)
|
||||||
* [ipam.IPRange](../models/ipam/iprange.md)
|
* [ipam.IPRange](../models/ipam/iprange.md)
|
||||||
* [ipam.L2VPN](../models/ipam/l2vpn.md)
|
|
||||||
* [ipam.L2VPNTermination](../models/ipam/l2vpntermination.md)
|
|
||||||
* [ipam.Prefix](../models/ipam/prefix.md)
|
* [ipam.Prefix](../models/ipam/prefix.md)
|
||||||
* [ipam.RouteTarget](../models/ipam/routetarget.md)
|
* [ipam.RouteTarget](../models/ipam/routetarget.md)
|
||||||
* [ipam.Service](../models/ipam/service.md)
|
* [ipam.Service](../models/ipam/service.md)
|
||||||
|
* [ipam.ServiceTemplate](../models/ipam/servicetemplate.md)
|
||||||
* [ipam.VLAN](../models/ipam/vlan.md)
|
* [ipam.VLAN](../models/ipam/vlan.md)
|
||||||
* [ipam.VRF](../models/ipam/vrf.md)
|
* [ipam.VRF](../models/ipam/vrf.md)
|
||||||
* [tenancy.Contact](../models/tenancy/contact.md)
|
* [tenancy.Contact](../models/tenancy/contact.md)
|
||||||
* [tenancy.Tenant](../models/tenancy/tenant.md)
|
* [tenancy.Tenant](../models/tenancy/tenant.md)
|
||||||
* [virtualization.Cluster](../models/virtualization/cluster.md)
|
* [virtualization.Cluster](../models/virtualization/cluster.md)
|
||||||
* [virtualization.VirtualMachine](../models/virtualization/virtualmachine.md)
|
* [virtualization.VirtualMachine](../models/virtualization/virtualmachine.md)
|
||||||
|
* [vpn.IKEPolicy](../models/vpn/ikepolicy.md)
|
||||||
|
* [vpn.IKEProposal](../models/vpn/ikeproposal.md)
|
||||||
|
* [vpn.IPSecPolicy](../models/vpn/ipsecpolicy.md)
|
||||||
|
* [vpn.IPSecProfile](../models/vpn/ipsecprofile.md)
|
||||||
|
* [vpn.IPSecProposal](../models/vpn/ipsecproposal.md)
|
||||||
|
* [vpn.L2VPN](../models/vpn/l2vpn.md)
|
||||||
|
* [vpn.Tunnel](../models/vpn/tunnel.md)
|
||||||
* [wireless.WirelessLAN](../models/wireless/wirelesslan.md)
|
* [wireless.WirelessLAN](../models/wireless/wirelesslan.md)
|
||||||
* [wireless.WirelessLink](../models/wireless/wirelesslink.md)
|
* [wireless.WirelessLink](../models/wireless/wirelesslink.md)
|
||||||
|
|
||||||
### Organizational Models
|
### Organizational Models
|
||||||
|
|
||||||
|
Organization models are used to organize and classify primary models.
|
||||||
|
|
||||||
* [circuits.CircuitType](../models/circuits/circuittype.md)
|
* [circuits.CircuitType](../models/circuits/circuittype.md)
|
||||||
* [dcim.DeviceRole](../models/dcim/devicerole.md)
|
* [dcim.DeviceRole](../models/dcim/devicerole.md)
|
||||||
* [dcim.Manufacturer](../models/dcim/manufacturer.md)
|
* [dcim.Manufacturer](../models/dcim/manufacturer.md)
|
||||||
* [dcim.Platform](../models/dcim/platform.md)
|
* [dcim.Platform](../models/dcim/platform.md)
|
||||||
* [dcim.RackRole](../models/dcim/rackrole.md)
|
* [dcim.RackRole](../models/dcim/rackrole.md)
|
||||||
|
* [ipam.ASNRange](../models/ipam/asnrange.md)
|
||||||
* [ipam.RIR](../models/ipam/rir.md)
|
* [ipam.RIR](../models/ipam/rir.md)
|
||||||
* [ipam.Role](../models/ipam/role.md)
|
* [ipam.Role](../models/ipam/role.md)
|
||||||
* [ipam.VLANGroup](../models/ipam/vlangroup.md)
|
* [ipam.VLANGroup](../models/ipam/vlangroup.md)
|
||||||
@@ -76,6 +91,8 @@ The Django [content types](https://docs.djangoproject.com/en/stable/ref/contrib/
|
|||||||
|
|
||||||
### Nested Group Models
|
### Nested Group Models
|
||||||
|
|
||||||
|
Nested group models behave like organizational model, but self-nest within a recursive hierarchy. For example, the Region model can be used to represent a hierarchy of countries, states, and cities.
|
||||||
|
|
||||||
* [dcim.Location](../models/dcim/location.md) (formerly RackGroup)
|
* [dcim.Location](../models/dcim/location.md) (formerly RackGroup)
|
||||||
* [dcim.Region](../models/dcim/region.md)
|
* [dcim.Region](../models/dcim/region.md)
|
||||||
* [dcim.SiteGroup](../models/dcim/sitegroup.md)
|
* [dcim.SiteGroup](../models/dcim/sitegroup.md)
|
||||||
@@ -85,24 +102,32 @@ The Django [content types](https://docs.djangoproject.com/en/stable/ref/contrib/
|
|||||||
|
|
||||||
### Component Models
|
### Component Models
|
||||||
|
|
||||||
|
Component models represent individual physical or virtual components belonging to a device or virtual machine.
|
||||||
|
|
||||||
* [dcim.ConsolePort](../models/dcim/consoleport.md)
|
* [dcim.ConsolePort](../models/dcim/consoleport.md)
|
||||||
* [dcim.ConsoleServerPort](../models/dcim/consoleserverport.md)
|
* [dcim.ConsoleServerPort](../models/dcim/consoleserverport.md)
|
||||||
* [dcim.DeviceBay](../models/dcim/devicebay.md)
|
* [dcim.DeviceBay](../models/dcim/devicebay.md)
|
||||||
* [dcim.FrontPort](../models/dcim/frontport.md)
|
* [dcim.FrontPort](../models/dcim/frontport.md)
|
||||||
* [dcim.Interface](../models/dcim/interface.md)
|
* [dcim.Interface](../models/dcim/interface.md)
|
||||||
* [dcim.InventoryItem](../models/dcim/inventoryitem.md)
|
* [dcim.InventoryItem](../models/dcim/inventoryitem.md)
|
||||||
|
* [dcim.ModuleBay](../models/dcim/modulebay.md)
|
||||||
* [dcim.PowerOutlet](../models/dcim/poweroutlet.md)
|
* [dcim.PowerOutlet](../models/dcim/poweroutlet.md)
|
||||||
* [dcim.PowerPort](../models/dcim/powerport.md)
|
* [dcim.PowerPort](../models/dcim/powerport.md)
|
||||||
* [dcim.RearPort](../models/dcim/rearport.md)
|
* [dcim.RearPort](../models/dcim/rearport.md)
|
||||||
|
* [virtualization.VirtualDisk](../models/virtualization/virtualdisk.md)
|
||||||
* [virtualization.VMInterface](../models/virtualization/vminterface.md)
|
* [virtualization.VMInterface](../models/virtualization/vminterface.md)
|
||||||
|
|
||||||
### Component Template Models
|
### Component Template Models
|
||||||
|
|
||||||
|
These function as templates to effect the replication of device and virtual machine components. Component template models support a limited feature set, including change logging, custom validation, and event rules.
|
||||||
|
|
||||||
* [dcim.ConsolePortTemplate](../models/dcim/consoleporttemplate.md)
|
* [dcim.ConsolePortTemplate](../models/dcim/consoleporttemplate.md)
|
||||||
* [dcim.ConsoleServerPortTemplate](../models/dcim/consoleserverporttemplate.md)
|
* [dcim.ConsoleServerPortTemplate](../models/dcim/consoleserverporttemplate.md)
|
||||||
* [dcim.DeviceBayTemplate](../models/dcim/devicebaytemplate.md)
|
* [dcim.DeviceBayTemplate](../models/dcim/devicebaytemplate.md)
|
||||||
* [dcim.FrontPortTemplate](../models/dcim/frontporttemplate.md)
|
* [dcim.FrontPortTemplate](../models/dcim/frontporttemplate.md)
|
||||||
* [dcim.InterfaceTemplate](../models/dcim/interfacetemplate.md)
|
* [dcim.InterfaceTemplate](../models/dcim/interfacetemplate.md)
|
||||||
|
* [dcim.InventoryItemTemplate](../models/dcim/inventoryitemtemplate.md)
|
||||||
|
* [dcim.ModuleBayTemplate](../models/dcim/modulebaytemplate.md)
|
||||||
* [dcim.PowerOutletTemplate](../models/dcim/poweroutlettemplate.md)
|
* [dcim.PowerOutletTemplate](../models/dcim/poweroutlettemplate.md)
|
||||||
* [dcim.PowerPortTemplate](../models/dcim/powerporttemplate.md)
|
* [dcim.PowerPortTemplate](../models/dcim/powerporttemplate.md)
|
||||||
* [dcim.RearPortTemplate](../models/dcim/rearporttemplate.md)
|
* [dcim.RearPortTemplate](../models/dcim/rearporttemplate.md)
|
||||||
|
|||||||
@@ -43,10 +43,22 @@ Follow these instructions to perform a new installation of NetBox in a temporary
|
|||||||
|
|
||||||
Submit a pull request to merge the `feature` branch into the `develop` branch in preparation for its release. Once it has been merged, continue with the section for patch releases below.
|
Submit a pull request to merge the `feature` branch into the `develop` branch in preparation for its release. Once it has been merged, continue with the section for patch releases below.
|
||||||
|
|
||||||
|
### Rebuild Demo Data (After Release)
|
||||||
|
|
||||||
|
After the release of a new minor version, generate a new demo data snapshot compatible with the new release. See the [`netbox-demo-data`](https://github.com/netbox-community/netbox-demo-data) repository for instructions.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Patch Releases
|
## Patch Releases
|
||||||
|
|
||||||
|
### Notify netbox-docker Project of Any Relevant Changes
|
||||||
|
|
||||||
|
Notify the [`netbox-docker`](https://github.com/netbox-community/netbox-docker) maintainers (in **#netbox-docker**) of any changes that may be relevant to their build process, including:
|
||||||
|
|
||||||
|
* Significant changes to `upgrade.sh`
|
||||||
|
* Increases in minimum versions for service dependencies (PostgreSQL, Redis, etc.)
|
||||||
|
* Any changes to the reference installation
|
||||||
|
|
||||||
### Update Requirements
|
### Update Requirements
|
||||||
|
|
||||||
Before each release, update each of NetBox's Python dependencies to its most recent stable version. These are defined in `requirements.txt`, which is updated from `base_requirements.txt` using `pip`. To do this:
|
Before each release, update each of NetBox's Python dependencies to its most recent stable version. These are defined in `requirements.txt`, which is updated from `base_requirements.txt` using `pip`. To do this:
|
||||||
@@ -58,6 +70,28 @@ Before each release, update each of NetBox's Python dependencies to its most rec
|
|||||||
|
|
||||||
In cases where upgrading a dependency to its most recent release is breaking, it should be constrained to its current minor version in `base_requirements.txt` with an explanatory comment and revisited for the next major NetBox release (see the [Address Constrained Dependencies](#address-constrained-dependencies) section above).
|
In cases where upgrading a dependency to its most recent release is breaking, it should be constrained to its current minor version in `base_requirements.txt` with an explanatory comment and revisited for the next major NetBox release (see the [Address Constrained Dependencies](#address-constrained-dependencies) section above).
|
||||||
|
|
||||||
|
### Rebuild the Device Type Definition Schema
|
||||||
|
|
||||||
|
Run the following command to update the device type definition validation schema:
|
||||||
|
|
||||||
|
```nohighlight
|
||||||
|
./manage.py buildschema --write
|
||||||
|
```
|
||||||
|
|
||||||
|
This will automatically update the schema file at `contrib/generated_schema.json`.
|
||||||
|
|
||||||
|
### Update & Compile Translations
|
||||||
|
|
||||||
|
Log into [Transifex](https://app.transifex.com/netbox-community/netbox/dashboard/) to download the updated string maps. Download the resource (portable object, or `.po`) file for each language and save them to `netbox/translations/$lang/LC_MESSAGES/django.po`, overwriting the current files. (Be sure to click the **Download for use** link.)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Once the resource files for all languages have been updated, compile the machine object (`.mo`) files using the `compilemessages` management command:
|
||||||
|
|
||||||
|
```nohighlight
|
||||||
|
./manage.py compilemessages
|
||||||
|
```
|
||||||
|
|
||||||
### Update Version and Changelog
|
### Update Version and Changelog
|
||||||
|
|
||||||
* Update the `VERSION` constant in `settings.py` to the new release version.
|
* Update the `VERSION` constant in `settings.py` to the new release version.
|
||||||
@@ -68,7 +102,7 @@ Commit these changes to the `develop` branch and push upstream.
|
|||||||
|
|
||||||
### Verify CI Build Status
|
### Verify CI Build Status
|
||||||
|
|
||||||
Ensure that continuous integration testing on the `develop` branch is completing successfully. If it fails, take action to correct the failure before proceding with the release.
|
Ensure that continuous integration testing on the `develop` branch is completing successfully. If it fails, take action to correct the failure before proceeding with the release.
|
||||||
|
|
||||||
### Submit a Pull Request
|
### Submit a Pull Request
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ class MyModelIndex(SearchIndex):
|
|||||||
('description', 500),
|
('description', 500),
|
||||||
('comments', 5000),
|
('comments', 5000),
|
||||||
)
|
)
|
||||||
|
display_attrs = ('site', 'device', 'status', 'description')
|
||||||
```
|
```
|
||||||
|
|
||||||
A SearchIndex subclass defines both its model and a list of two-tuples specifying which model fields to be indexed and the weight (precedence) associated with each. Guidance on weight assignment for fields is provided below.
|
A SearchIndex subclass defines both its model and a list of two-tuples specifying which model fields to be indexed and the weight (precedence) associated with each. Guidance on weight assignment for fields is provided below.
|
||||||
@@ -29,7 +30,7 @@ A SearchIndex subclass defines both its model and a list of two-tuples specifyin
|
|||||||
| 60 | Unique serialized attribute (per related object) | Device.serial |
|
| 60 | Unique serialized attribute (per related object) | Device.serial |
|
||||||
| 100 | Primary human identifier | Device.name, Circuit.cid, Cable.label |
|
| 100 | Primary human identifier | Device.name, Circuit.cid, Cable.label |
|
||||||
| 110 | Slug | Site.slug |
|
| 110 | Slug | Site.slug |
|
||||||
| 200 | Secondary identifier | Provider.account, DeviceType.part_number |
|
| 200 | Secondary identifier | ProviderAccount.account, DeviceType.part_number |
|
||||||
| 300 | Highly unique descriptive attribute | CircuitTermination.xconnect_id, IPAddress.dns_name |
|
| 300 | Highly unique descriptive attribute | CircuitTermination.xconnect_id, IPAddress.dns_name |
|
||||||
| 500 | Description | Site.description |
|
| 500 | Description | Site.description |
|
||||||
| 1000 | Custom field default | - |
|
| 1000 | Custom field default | - |
|
||||||
|
|||||||
@@ -9,3 +9,27 @@ This signal is sent by models which inherit from `CustomValidationMixin` at the
|
|||||||
### Receivers
|
### Receivers
|
||||||
|
|
||||||
* `extras.signals.run_custom_validators()`
|
* `extras.signals.run_custom_validators()`
|
||||||
|
|
||||||
|
## core.job_start
|
||||||
|
|
||||||
|
This signal is sent whenever a [background job](../features/background-jobs.md) is started.
|
||||||
|
|
||||||
|
### Receivers
|
||||||
|
|
||||||
|
* `extras.signals.process_job_start_event_rules()`
|
||||||
|
|
||||||
|
## core.job_end
|
||||||
|
|
||||||
|
This signal is sent whenever a [background job](../features/background-jobs.md) is terminated.
|
||||||
|
|
||||||
|
### Receivers
|
||||||
|
|
||||||
|
* `extras.signals.process_job_end_event_rules()`
|
||||||
|
|
||||||
|
## core.pre_sync
|
||||||
|
|
||||||
|
This signal is sent when the [DataSource](../models/core/datasource.md) model's `sync()` method is called.
|
||||||
|
|
||||||
|
## core.post_sync
|
||||||
|
|
||||||
|
This signal is sent when a [DataSource](../models/core/datasource.md) finishes synchronizing.
|
||||||
|
|||||||
30
docs/development/translations.md
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
# Translations
|
||||||
|
|
||||||
|
NetBox coordinates all translation work using the [Transifex](https://explore.transifex.com/netbox-community/netbox/) platform. Signing up for a Transifex account is free.
|
||||||
|
|
||||||
|
All language translations in NetBox are generated from the source file found at `netbox/translations/en/LC_MESSAGES/django.po`. This file contains the original English strings with empty mappings, and is generated as part of NetBox's release process. Transifex updates source strings from this file on a recurring basis, so new translation strings will appear in the platform automatically as it is updated in the code base.
|
||||||
|
|
||||||
|
Reviewers log into Transifex and navigate to their designated language(s) to translate strings. The initial translation for most strings will be machine-generated via the AWS Translate service. Human reviewers are responsible for reviewing these translations and making corrections where necessary.
|
||||||
|
|
||||||
|
Immediately prior to each NetBox release, the translation maps for all completed languages will be downloaded from Transifex, compiled, and checked into the NetBox code base by a maintainer.
|
||||||
|
|
||||||
|
## Updating Translation Sources
|
||||||
|
|
||||||
|
To update the English `.po` file from which all translations are derived, use the `makemessages` management command:
|
||||||
|
|
||||||
|
```nohighlight
|
||||||
|
./manage.py makemessages -l en
|
||||||
|
```
|
||||||
|
|
||||||
|
Then, commit the change and push to the `develop` branch on GitHub. After some time, any new strings will appear for translation on Transifex automatically.
|
||||||
|
|
||||||
|
## Proposing New Languages
|
||||||
|
|
||||||
|
If you'd like to add support for a new language to NetBox, the first step is to [submit a GitHub issue](https://github.com/netbox-community/netbox/issues/new?assignees=&labels=type%3A+translation&projects=&template=translation.yaml) to capture the proposal. While we'd like to add as many languages as possible, we do need to limit the rate at which new languages are added. New languages will be selected according to community interest and the number of volunteers who sign up as translators.
|
||||||
|
|
||||||
|
Once a proposed language has been approved, a NetBox maintainer will:
|
||||||
|
|
||||||
|
* Add it to the Transifex platform
|
||||||
|
* Designate one or more reviewers
|
||||||
|
* Create the initial machine-generated translations for review
|
||||||
|
* Add it to the list of supported languages
|
||||||
@@ -26,15 +26,9 @@ To learn more about this feature, check out the [GraphQL API documentation](../i
|
|||||||
|
|
||||||
## Webhooks
|
## Webhooks
|
||||||
|
|
||||||
A webhook is a mechanism for conveying to some external system a change that took place in NetBox. For example, you may want to notify a monitoring system whenever the status of a device is updated in NetBox. This can be done by creating a webhook for the device model in NetBox and identifying the webhook receiver. When NetBox detects a change to a device, an HTTP request containing the details of the change and who made it be sent to the specified receiver. Webhooks are an excellent mechanism for building event-based automation processes.
|
A webhook is a mechanism for conveying to some external system a change that has taken place in NetBox. For example, you may want to notify a monitoring system whenever the status of a device is updated in NetBox. To do this, first create a [webhook](../models/extras/webhook.md) identifying the remote receiver (URL), HTTP method, and any other necessary parameters. Then, define an [event rule](../models/extras/eventrule.md) which is triggered by device changes to transmit the webhook.
|
||||||
|
|
||||||
To learn more about this feature, check out the [webhooks documentation](../integrations/webhooks.md).
|
When NetBox detects a change to a device, an HTTP request containing the details of the change and who made it be sent to the specified receiver. Webhooks are an excellent mechanism for building event-based automation processes. To learn more about this feature, check out the [webhooks documentation](../integrations/webhooks.md).
|
||||||
|
|
||||||
## NAPALM
|
|
||||||
|
|
||||||
[NAPALM](https://github.com/napalm-automation/napalm) is a Python library which enables direct interaction with network devices of various platforms. When configured, NetBox supports fetching live operational and status data directly from network devices to be compared to what has been defined in NetBox. This allows for easily validating the device's operational state against its desired state. Additionally, NetBox's REST API can act as a sort of proxy for NAPALM commands, allowing external clients to interact with network devices by sending HTTP requests to the appropriate API endpoint.
|
|
||||||
|
|
||||||
To learn more about this feature, check out the [NAPALM documentation](../integrations/napalm.md).
|
|
||||||
|
|
||||||
## Prometheus Metrics
|
## Prometheus Metrics
|
||||||
|
|
||||||
|
|||||||
13
docs/features/background-jobs.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# Background Jobs
|
||||||
|
|
||||||
|
NetBox includes the ability to execute certain functions as background tasks. These include:
|
||||||
|
|
||||||
|
* [Report](../customization/reports.md) execution
|
||||||
|
* [Custom script](../customization/custom-scripts.md) execution
|
||||||
|
* Synchronization of [remote data sources](../integrations/synchronized-data.md)
|
||||||
|
|
||||||
|
Additionally, NetBox plugins can enqueue their own background tasks. This is accomplished using the [Job model](../models/core/job.md). Background tasks are executed by the `rqworker` process(es).
|
||||||
|
|
||||||
|
## Scheduled Jobs
|
||||||
|
|
||||||
|
Background jobs can be configured to run immediately, or at a set time in the future. Scheduled jobs can also be configured to repeat at a set interval.
|
||||||
@@ -1,9 +1,13 @@
|
|||||||
# Change Logging
|
# Change Logging
|
||||||
|
|
||||||
Every time an object in NetBox is created, updated, or deleted, a serialized copy of that object taken both before and after the change is saved to the database, along with meta data including the current time and the user associated with the change. These records form a persistent record of changes both for each individual object as well as NetBox as a whole. The global change log can be viewed by navigating to Other > Change Log.
|
Every time an object in NetBox is created, updated, or deleted, a serialized copy of that object taken both before and after the change is saved to the database, along with metadata including the current time and the user associated with the change. These records form a persistent record of changes both for each individual object as well as NetBox as a whole. The global change log can be viewed by navigating to Other > Change Log.
|
||||||
|
|
||||||
A serialized representation of the instance being modified is included in JSON format. This is similar to how objects are conveyed within the REST API, but does not include any nested representations. For instance, the `tenant` field of a site will record only the tenant's ID, not a representation of the tenant.
|
A serialized representation of the instance being modified is included in JSON format. This is similar to how objects are conveyed within the REST API, but does not include any nested representations. For instance, the `tenant` field of a site will record only the tenant's ID, not a representation of the tenant.
|
||||||
|
|
||||||
When a request is made, a UUID is generated and attached to any change records resulting from that request. For example, editing three objects in bulk will create a separate change record for each (three in total), and each of those objects will be associated with the same UUID. This makes it easy to identify all the change records resulting from a particular request.
|
When a request is made, a UUID is generated and attached to any change records resulting from that request. For example, editing three objects in bulk will create a separate change record for each (three in total), and each of those objects will be associated with the same UUID. This makes it easy to identify all the change records resulting from a particular request.
|
||||||
|
|
||||||
Change records are exposed in the API via the read-only endpoint `/api/extras/object-changes/`. They may also be exported via the web UI in CSV format.
|
Change records are exposed in the API via the read-only endpoint `/api/extras/object-changes/`. They may also be exported via the web UI in CSV format.
|
||||||
|
|
||||||
|
## Correlating Changes by Request
|
||||||
|
|
||||||
|
Every request made to NetBox is assigned a random unique ID that can be used to correlate change records. For example, if you change the status of three sites using the UI's bulk edit feature, you will see three new change records (one for each site) all referencing the same request ID. This shows that all three changes were made as part of the same request.
|
||||||
|
|||||||
@@ -5,13 +5,15 @@ NetBox is ideal for managing your network's transit and peering providers and ci
|
|||||||
```mermaid
|
```mermaid
|
||||||
flowchart TD
|
flowchart TD
|
||||||
ASN --> Provider
|
ASN --> Provider
|
||||||
Provider --> ProviderNetwork & Circuit
|
Provider --> ProviderNetwork & ProviderAccount & Circuit
|
||||||
|
ProviderAccount --> Circuit
|
||||||
CircuitType --> Circuit
|
CircuitType --> Circuit
|
||||||
|
|
||||||
click ASN "../../models/circuits/asn/"
|
click ASN "../../models/circuits/asn/"
|
||||||
click Circuit "../../models/circuits/circuit/"
|
click Circuit "../../models/circuits/circuit/"
|
||||||
click CircuitType "../../models/circuits/circuittype/"
|
click CircuitType "../../models/circuits/circuittype/"
|
||||||
click Provider "../../models/circuits/provider/"
|
click Provider "../../models/circuits/provider/"
|
||||||
|
click ProviderAccount "../../models/circuits/provideraccount/"
|
||||||
click ProviderNetwork "../../models/circuits/providernetwork/"
|
click ProviderNetwork "../../models/circuits/providernetwork/"
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -25,7 +27,7 @@ Sometimes you'll need to model provider networks into which you don't have full
|
|||||||
|
|
||||||
A circuit is a physical connection between two points, which is installed and maintained by an external provider. For example, an Internet connection delivered as a fiber optic cable would be modeled as a circuit in NetBox.
|
A circuit is a physical connection between two points, which is installed and maintained by an external provider. For example, an Internet connection delivered as a fiber optic cable would be modeled as a circuit in NetBox.
|
||||||
|
|
||||||
Each circuit is associated with a provider and assigned a circuit ID, which must be unique to that provider. A circuit is also assigned a user-defined type, operational status, and various other operating characteristics.
|
Each circuit is associated with a provider and assigned a circuit ID, which must be unique to that provider. A circuit is also assigned a user-defined type, operational status, and various other operating characteristics. Provider accounts can also be employed to further categorize circuits belonging to a common provider: These may represent different business units or technologies.
|
||||||
|
|
||||||
Each circuit may have up to two terminations (A and Z) defined. Each termination can be associated with a particular site or provider network. In the case of the former, a cable can be connected between the circuit termination and a device component to map its physical connectivity.
|
Each circuit may have up to two terminations (A and Z) defined. Each termination can be associated with a particular site or provider network. In the case of the former, a cable can be connected between the circuit termination and a device component to map its physical connectivity.
|
||||||
|
|
||||||
|
|||||||
92
docs/features/configuration-rendering.md
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
# Configuration Rendering
|
||||||
|
|
||||||
|
One of the critical aspects of operating a network is ensuring that every network node is configured correctly. By leveraging configuration templates and [context data](./context-data.md), NetBox can render complete configuration files for each device on your network.
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
flowchart TD
|
||||||
|
ConfigContext & ConfigTemplate --> Config{{Rendered configuration}}
|
||||||
|
|
||||||
|
click ConfigContext "../../models/extras/configcontext/"
|
||||||
|
click ConfigTemplate "../../models/extras/configtemplate/"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Configuration Templates
|
||||||
|
|
||||||
|
Configuration templates are written in the [Jinja2 templating language](https://jinja.palletsprojects.com/), and may be automatically populated from remote data sources. Context data is applied to a template during rendering to output a complete configuration file. Below is an example Jinja2 template which renders a simple network switch configuration file.
|
||||||
|
|
||||||
|
```jinja2
|
||||||
|
{% extends 'base.j2' %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
system {
|
||||||
|
host-name {{ device.name }};
|
||||||
|
domain-name example.com;
|
||||||
|
time-zone UTC;
|
||||||
|
authentication-order [ password radius ];
|
||||||
|
ntp {
|
||||||
|
{% for server in ntp_servers %}
|
||||||
|
server {{ server }};
|
||||||
|
{% endfor %}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{% for interface in device.interfaces.all() %}
|
||||||
|
{% include 'common/interface.j2' %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endblock %}
|
||||||
|
```
|
||||||
|
|
||||||
|
When rendered for a specific NetBox device, the template's `device` variable will be populated with the device instance, and `ntp_servers` will be pulled from the device's available context data. The resulting output will be a valid configuration segment that can be applied directly to a compatible network device.
|
||||||
|
|
||||||
|
### Context Data
|
||||||
|
|
||||||
|
The object for which the configuration is being rendered is made available as template context as `device` or `virtualmachine` for devices and virtual machines, respectively. Additionally, NetBox model classes can be accessed by the app or plugin in which they reside. For example:
|
||||||
|
|
||||||
|
```
|
||||||
|
There are {{ dcim.Site.objects.count() }} sites.
|
||||||
|
```
|
||||||
|
|
||||||
|
## Rendering Templates
|
||||||
|
|
||||||
|
### Device Configurations
|
||||||
|
|
||||||
|
NetBox provides a REST API endpoint specifically for rendering the default configuration template for a specific device. This is accomplished by sending a POST request to the device's unique URL, optionally including additional context data.
|
||||||
|
|
||||||
|
```no-highlight
|
||||||
|
curl -X POST \
|
||||||
|
-H "Authorization: Token $TOKEN" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-H "Accept: application/json; indent=4" \
|
||||||
|
http://netbox:8000/api/dcim/devices/123/render-config/ \
|
||||||
|
--data '{
|
||||||
|
"extra_data": "abc123"
|
||||||
|
}'
|
||||||
|
```
|
||||||
|
|
||||||
|
This request will trigger resolution of the device's preferred config template in the following order:
|
||||||
|
|
||||||
|
* The config template assigned to the individual device
|
||||||
|
* The config template assigned to the device's role
|
||||||
|
* The config template assigned to the device's platform
|
||||||
|
|
||||||
|
If no config template has been assigned to any of these three objects, the request will fail.
|
||||||
|
|
||||||
|
The configuration can be rendered as JSON or as plaintext by setting the `Accept:` HTTP header. For example:
|
||||||
|
|
||||||
|
* `Accept: application/json`
|
||||||
|
* `Accept: text/plain`
|
||||||
|
|
||||||
|
### General Purpose Use
|
||||||
|
|
||||||
|
NetBox config templates can also be rendered without being tied to any specific device, using a separate general purpose REST API endpoint. Any data included with a POST request to this endpoint will be passed as context data for the template.
|
||||||
|
|
||||||
|
```no-highlight
|
||||||
|
curl -X POST \
|
||||||
|
-H "Authorization: Token $TOKEN" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-H "Accept: application/json; indent=4" \
|
||||||
|
http://netbox:8000/api/extras/config-templates/123/render/ \
|
||||||
|
--data '{
|
||||||
|
"foo": "abc",
|
||||||
|
"bar": 123
|
||||||
|
}'
|
||||||
|
```
|
||||||
@@ -31,6 +31,7 @@ The following models support the assignment of contacts:
|
|||||||
|
|
||||||
* circuits.Circuit
|
* circuits.Circuit
|
||||||
* circuits.Provider
|
* circuits.Provider
|
||||||
|
* circuits.ProviderAccount
|
||||||
* dcim.Device
|
* dcim.Device
|
||||||
* dcim.Location
|
* dcim.Location
|
||||||
* dcim.Manufacturer
|
* dcim.Manufacturer
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ Configuration context data (or "config contexts" for short) is a powerful featur
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Context data can be consumed by remote API clients, or it can be employed natively to render [configuration templates](./configuration-rendering.md).
|
||||||
|
|
||||||
Config contexts can be computed for objects based on the following criteria:
|
Config contexts can be computed for objects based on the following criteria:
|
||||||
|
|
||||||
| Type | Devices | Virtual Machines |
|
| Type | Devices | Virtual Machines |
|
||||||
|
|||||||
@@ -18,6 +18,12 @@ The `tag` filter can be specified multiple times to match only objects which hav
|
|||||||
GET /api/dcim/devices/?tag=monitored&tag=deprecated
|
GET /api/dcim/devices/?tag=monitored&tag=deprecated
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Bookmarks
|
||||||
|
|
||||||
|
!!! info "This feature was introduced in NetBox v3.6."
|
||||||
|
|
||||||
|
Users can bookmark their most commonly visited objects for convenient access. Bookmarks are listed under a user's profile, and can be displayed with custom filtering and ordering on the user's personal dashboard.
|
||||||
|
|
||||||
## Custom Fields
|
## Custom Fields
|
||||||
|
|
||||||
While NetBox provides a rather extensive data model out of the box, the need may arise to store certain additional data associated with NetBox objects. For example, you might need to record the invoice ID alongside an installed device, or record an approving authority when creating a new IP prefix. NetBox administrators can create custom fields on built-in objects to meet these needs.
|
While NetBox provides a rather extensive data model out of the box, the need may arise to store certain additional data associated with NetBox objects. For example, you might need to record the invoice ID alongside an installed device, or record an approving authority when creating a new IP prefix. NetBox administrators can create custom fields on built-in objects to meet these needs.
|
||||||
|
|||||||
31
docs/features/event-rules.md
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
# Event Rules
|
||||||
|
|
||||||
|
NetBox includes the ability to execute certain functions in response to internal object changes. These include:
|
||||||
|
|
||||||
|
* [Scripts](../customization/custom-scripts.md) execution
|
||||||
|
* [Webhooks](../integrations/webhooks.md) execution
|
||||||
|
|
||||||
|
For example, suppose you want to automatically configure a monitoring system to start monitoring a device when its operational status is changed to active, and remove it from monitoring for any other status. You can create a webhook in NetBox for the device model and craft its content and destination URL to effect the desired change on the receiving system. You can then associate an event rule with this webhook and the webhook will be sent automatically by NetBox whenever the configured constraints are met.
|
||||||
|
|
||||||
|
Each event must be associated with at least one NetBox object type and at least one event (e.g. create, update, or delete).
|
||||||
|
|
||||||
|
## Conditional Event Rules
|
||||||
|
|
||||||
|
An event rule may include a set of conditional logic expressed in JSON used to control whether an event triggers for a specific object. For example, you may wish to trigger an event for devices only when the `status` field of an object is "active":
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"and": [
|
||||||
|
{
|
||||||
|
"attr": "status.value",
|
||||||
|
"value": "active"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
For more detail, see the reference documentation for NetBox's [conditional logic](../reference/conditions.md).
|
||||||
|
|
||||||
|
## Event Rule Processing
|
||||||
|
|
||||||
|
When a change is detected, any resulting events are placed into a Redis queue for processing. This allows the user's request to complete without needing to wait for the outgoing event(s) to be processed. The events are then extracted from the queue by the `rqworker` process. The current event queue and any failed events can be inspected in the admin UI under System > Background Tasks.
|
||||||
@@ -38,7 +38,7 @@ An example hierarchy might look like this:
|
|||||||
* 100.64.16.1/24 (address)
|
* 100.64.16.1/24 (address)
|
||||||
* 100.64.16.2/24 (address)
|
* 100.64.16.2/24 (address)
|
||||||
* 100.64.16.3/24 (address)
|
* 100.64.16.3/24 (address)
|
||||||
* 100.64.16.9/24 (prefix)
|
* 100.64.19.0/24 (prefix)
|
||||||
* 100.64.32.0/20 (prefix)
|
* 100.64.32.0/20 (prefix)
|
||||||
* 100.64.32.1/24 (address)
|
* 100.64.32.1/24 (address)
|
||||||
* 100.64.32.10-99/24 (range)
|
* 100.64.32.10-99/24 (range)
|
||||||
|
|||||||
@@ -8,6 +8,9 @@ When entering a search query, the user can choose a specific lookup type: exact
|
|||||||
|
|
||||||
Custom fields defined by NetBox administrators are also included in search results if configured with a search weight. Additionally, NetBox plugins can register their own custom models for inclusion alongside core models.
|
Custom fields defined by NetBox administrators are also included in search results if configured with a search weight. Additionally, NetBox plugins can register their own custom models for inclusion alongside core models.
|
||||||
|
|
||||||
|
!!! note
|
||||||
|
NetBox does not index any static choice field's (including custom fields of type "Selection" or "Multiple selection").
|
||||||
|
|
||||||
## Saved Filters
|
## Saved Filters
|
||||||
|
|
||||||
Each type of object in NetBox is accompanied by an extensive set of filters, each tied to a specific attribute, which enable the creation of complex queries. Often you'll find that certain queries are used routinely to apply some set of prescribed conditions to a query. Once a set of filters has been applied, NetBox offers the option to save it for future use.
|
Each type of object in NetBox is accompanied by an extensive set of filters, each tied to a specific attribute, which enable the creation of complex queries. Often you'll find that certain queries are used routinely to apply some set of prescribed conditions to a query. Once a set of filters has been applied, NetBox offers the option to save it for future use.
|
||||||
|
|||||||
27
docs/features/synchronized-data.md
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
# Synchronized Data
|
||||||
|
|
||||||
|
Several models in NetBox support the automatic synchronization of local data from a designated remote source. For example, [configuration templates](./configuration-rendering.md) defined in NetBox can source their content from text files stored in a remote git repository. This is accomplished using the core [data source](../models/core/datasource.md) and [data file](../models/core/datafile.md) models.
|
||||||
|
|
||||||
|
To enable remote data synchronization, the NetBox administrator first designates one or more remote data sources. NetBox currently supports the following source types:
|
||||||
|
|
||||||
|
* Git repository
|
||||||
|
* Amazon S3 bucket (or compatible product)
|
||||||
|
* Local disk path
|
||||||
|
|
||||||
|
(Local disk paths are considered "remote" in this context as they exist outside NetBox's database. These paths could also be mapped to external network shares.)
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
Data backends which connect to external sources typically require the installation of one or more supporting Python libraries. The Git backend requires the [`dulwich`](https://www.dulwich.io/) package, and the S3 backend requires the [`boto3`](https://boto3.amazonaws.com/v1/documentation/api/latest/index.html) package. These must be installed within NetBox's environment to enable these backends.
|
||||||
|
|
||||||
|
Each type of remote source has its own configuration parameters. For instance, a git source will ask the user to specify a branch and authentication credentials. Once the source has been created, a synchronization job is run to automatically replicate remote files in the local database.
|
||||||
|
|
||||||
|
The following NetBox models can be associated with replicated data files:
|
||||||
|
|
||||||
|
* Config contexts
|
||||||
|
* Config templates
|
||||||
|
* Export templates
|
||||||
|
|
||||||
|
Once a data has been designated for a local instance, its data will be replaced with the content of the replicated file. When the replicated file is updated in the future (via synchronization jobs), the local instance will be flagged as having out-of-date data. A user can then synchronize these objects individually or in bulk to effect the update. This two-stage process ensures that automated synchronization tasks do not immediately affect production data.
|
||||||
|
|
||||||
|
!!! note "Permissions"
|
||||||
|
A user must be assigned the `core.sync_datasource` permission in order to synchronize local files from a remote data source.
|
||||||
49
docs/features/vpn-tunnels.md
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
# Tunnels
|
||||||
|
|
||||||
|
NetBox can model private tunnels formed among virtual termination points across your network. Typical tunnel implementations include GRE, IP-in-IP, and IPSec. A tunnel may be terminated to two or more device or virtual machine interfaces. For convenient organization, tunnels may be assigned to user-defined groups.
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
flowchart TD
|
||||||
|
Termination1[TunnelTermination]
|
||||||
|
Termination2[TunnelTermination]
|
||||||
|
Interface1[Interface]
|
||||||
|
Interface2[Interface]
|
||||||
|
Tunnel --> Termination1 & Termination2
|
||||||
|
Termination1 --> Interface1
|
||||||
|
Termination2 --> Interface2
|
||||||
|
Interface1 --> Device
|
||||||
|
Interface2 --> VirtualMachine
|
||||||
|
|
||||||
|
click Tunnel "../../models/vpn/tunnel/"
|
||||||
|
click TunnelTermination1 "../../models/vpn/tunneltermination/"
|
||||||
|
click TunnelTermination2 "../../models/vpn/tunneltermination/"
|
||||||
|
```
|
||||||
|
|
||||||
|
# IPSec & IKE
|
||||||
|
|
||||||
|
NetBox includes robust support for modeling IPSec & IKE policies. These are used to define encryption and authentication parameters for IPSec tunnels.
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
flowchart TD
|
||||||
|
subgraph IKEProposals[Proposals]
|
||||||
|
IKEProposal1[IKEProposal]
|
||||||
|
IKEProposal2[IKEProposal]
|
||||||
|
end
|
||||||
|
subgraph IPSecProposals[Proposals]
|
||||||
|
IPSecProposal1[IPSecProposal]
|
||||||
|
IPSecProposal2[IPSecProposal]
|
||||||
|
end
|
||||||
|
IKEProposals --> IKEPolicy
|
||||||
|
IPSecProposals --> IPSecPolicy
|
||||||
|
IKEPolicy & IPSecPolicy--> IPSecProfile
|
||||||
|
IPSecProfile --> Tunnel
|
||||||
|
|
||||||
|
click IKEProposal1 "../../models/vpn/ikeproposal/"
|
||||||
|
click IKEProposal2 "../../models/vpn/ikeproposal/"
|
||||||
|
click IKEPolicy "../../models/vpn/ikepolicy/"
|
||||||
|
click IPSecProposal1 "../../models/vpn/ipsecproposal/"
|
||||||
|
click IPSecProposal2 "../../models/vpn/ipsecproposal/"
|
||||||
|
click IPSecPolicy "../../models/vpn/ipsecpolicy/"
|
||||||
|
click IPSecProfile "../../models/vpn/ipsecprofile/"
|
||||||
|
click Tunnel "../../models/vpn/tunnel/"
|
||||||
|
```
|
||||||
@@ -56,7 +56,7 @@ Below is the (rough) recommended order in which NetBox objects should be created
|
|||||||
4. Manufacturers, device types, and module types
|
4. Manufacturers, device types, and module types
|
||||||
5. Platforms and device roles
|
5. Platforms and device roles
|
||||||
6. Devices and modules
|
6. Devices and modules
|
||||||
7. Providers and provider networks
|
7. Providers, provider accounts, and provider networks
|
||||||
8. Circuit types and circuits
|
8. Circuit types and circuits
|
||||||
9. Wireless LAN groups and wireless LANs
|
9. Wireless LAN groups and wireless LANs
|
||||||
10. Route targets and VRFs
|
10. Route targets and VRFs
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
{style="height: 100px; margin-bottom: 3em"}
|
{style="height: 100px; margin-bottom: 3em"}
|
||||||
|
|
||||||
# The Premiere Network Source of Truth
|
# The Premier Network Source of Truth
|
||||||
|
|
||||||
NetBox is the leading solution for modeling and documenting modern networks. By combining the traditional disciplines of IP address management (IPAM) and datacenter infrastructure management (DCIM) with powerful APIs and extensions, NetBox provides the ideal "source of truth" to power network automation. Read on to discover why thousands of organizations worldwide put NetBox at the heart of their infrastructure.
|
NetBox is the leading solution for modeling and documenting modern networks. By combining the traditional disciplines of IP address management (IPAM) and datacenter infrastructure management (DCIM) with powerful APIs and extensions, NetBox provides the ideal "source of truth" to power network automation. Read on to discover why thousands of organizations worldwide put NetBox at the heart of their infrastructure.
|
||||||
|
|
||||||
[](./media/screenshots/netbox-ui.png)
|
[](./media/screenshots/home-light.png)
|
||||||
|
|
||||||
## :material-server-network: Built for Networks
|
## :material-server-network: Built for Networks
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@ In addition to its expansive and robust data model, NetBox offers myriad mechani
|
|||||||
* Custom fields
|
* Custom fields
|
||||||
* Custom model validation
|
* Custom model validation
|
||||||
* Export templates
|
* Export templates
|
||||||
* Webhooks
|
* Event rules
|
||||||
* Plugins
|
* Plugins
|
||||||
* REST & GraphQL APIs
|
* REST & GraphQL APIs
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
This section entails the installation and configuration of a local PostgreSQL database. If you already have a PostgreSQL database service in place, skip to [the next section](2-redis.md).
|
This section entails the installation and configuration of a local PostgreSQL database. If you already have a PostgreSQL database service in place, skip to [the next section](2-redis.md).
|
||||||
|
|
||||||
!!! warning "PostgreSQL 11 or later required"
|
!!! warning "PostgreSQL 12 or later required"
|
||||||
NetBox requires PostgreSQL 11 or later. Please note that MySQL and other relational databases are **not** supported.
|
NetBox requires PostgreSQL 12 or later. Please note that MySQL and other relational databases are **not** supported.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
@@ -28,14 +28,14 @@ This section entails the installation and configuration of a local PostgreSQL da
|
|||||||
host all all ::1/128 md5
|
host all all ::1/128 md5
|
||||||
```
|
```
|
||||||
|
|
||||||
Once PostgreSQL has been installed, start the service and enable it to run at boot:
|
Once PostgreSQL has been installed, start the service and enable it to run at boot:
|
||||||
|
|
||||||
```no-highlight
|
```no-highlight
|
||||||
sudo systemctl start postgresql
|
sudo systemctl start postgresql
|
||||||
sudo systemctl enable postgresql
|
sudo systemctl enable postgresql
|
||||||
```
|
```
|
||||||
|
|
||||||
Before continuing, verify that you have installed PostgreSQL 11 or later:
|
Before continuing, verify that you have installed PostgreSQL 12 or later:
|
||||||
|
|
||||||
```no-highlight
|
```no-highlight
|
||||||
psql -V
|
psql -V
|
||||||
@@ -54,7 +54,10 @@ Within the shell, enter the following commands to create the database and user (
|
|||||||
```postgresql
|
```postgresql
|
||||||
CREATE DATABASE netbox;
|
CREATE DATABASE netbox;
|
||||||
CREATE USER netbox WITH PASSWORD 'J5brHrAXFLQSif0K';
|
CREATE USER netbox WITH PASSWORD 'J5brHrAXFLQSif0K';
|
||||||
GRANT ALL PRIVILEGES ON DATABASE netbox TO netbox;
|
ALTER DATABASE netbox OWNER TO netbox;
|
||||||
|
-- the next two commands are needed on PostgreSQL 15 and later
|
||||||
|
\connect netbox;
|
||||||
|
GRANT CREATE ON SCHEMA public TO netbox;
|
||||||
```
|
```
|
||||||
|
|
||||||
!!! danger "Use a strong password"
|
!!! danger "Use a strong password"
|
||||||
|
|||||||
@@ -4,9 +4,6 @@
|
|||||||
|
|
||||||
[Redis](https://redis.io/) is an in-memory key-value store which NetBox employs for caching and queuing. This section entails the installation and configuration of a local Redis instance. If you already have a Redis service in place, skip to [the next section](3-netbox.md).
|
[Redis](https://redis.io/) is an in-memory key-value store which NetBox employs for caching and queuing. This section entails the installation and configuration of a local Redis instance. If you already have a Redis service in place, skip to [the next section](3-netbox.md).
|
||||||
|
|
||||||
!!! warning "Redis v4.0 or later required"
|
|
||||||
NetBox v2.9.0 and later require Redis v4.0 or higher. If your distribution does not offer a recent enough release, you will need to build Redis from source. Please see [the Redis installation documentation](https://github.com/redis/redis) for further details.
|
|
||||||
|
|
||||||
=== "Ubuntu"
|
=== "Ubuntu"
|
||||||
|
|
||||||
```no-highlight
|
```no-highlight
|
||||||
|
|||||||
@@ -100,6 +100,8 @@ Create a system user account named `netbox`. We'll configure the WSGI and HTTP s
|
|||||||
```
|
```
|
||||||
sudo adduser --system --group netbox
|
sudo adduser --system --group netbox
|
||||||
sudo chown --recursive netbox /opt/netbox/netbox/media/
|
sudo chown --recursive netbox /opt/netbox/netbox/media/
|
||||||
|
sudo chown --recursive netbox /opt/netbox/netbox/reports/
|
||||||
|
sudo chown --recursive netbox /opt/netbox/netbox/scripts/
|
||||||
```
|
```
|
||||||
|
|
||||||
=== "CentOS"
|
=== "CentOS"
|
||||||
@@ -108,6 +110,8 @@ Create a system user account named `netbox`. We'll configure the WSGI and HTTP s
|
|||||||
sudo groupadd --system netbox
|
sudo groupadd --system netbox
|
||||||
sudo adduser --system -g netbox netbox
|
sudo adduser --system -g netbox netbox
|
||||||
sudo chown --recursive netbox /opt/netbox/netbox/media/
|
sudo chown --recursive netbox /opt/netbox/netbox/media/
|
||||||
|
sudo chown --recursive netbox /opt/netbox/netbox/reports/
|
||||||
|
sudo chown --recursive netbox /opt/netbox/netbox/scripts/
|
||||||
```
|
```
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
@@ -199,14 +203,6 @@ When you have finished modifying the configuration, remember to save the file.
|
|||||||
|
|
||||||
All Python packages required by NetBox are listed in `requirements.txt` and will be installed automatically. NetBox also supports some optional packages. If desired, these packages must be listed in `local_requirements.txt` within the NetBox root directory.
|
All Python packages required by NetBox are listed in `requirements.txt` and will be installed automatically. NetBox also supports some optional packages. If desired, these packages must be listed in `local_requirements.txt` within the NetBox root directory.
|
||||||
|
|
||||||
### NAPALM
|
|
||||||
|
|
||||||
Integration with the [NAPALM automation](../integrations/napalm.md) library allows NetBox to fetch live data from devices and return it to a requester via its REST API. The `NAPALM_USERNAME` and `NAPALM_PASSWORD` configuration parameters define the credentials to be used when connecting to a device.
|
|
||||||
|
|
||||||
```no-highlight
|
|
||||||
sudo sh -c "echo 'napalm' >> /opt/netbox/local_requirements.txt"
|
|
||||||
```
|
|
||||||
|
|
||||||
### Remote File Storage
|
### Remote File Storage
|
||||||
|
|
||||||
By default, NetBox will use the local filesystem to store uploaded files. To use a remote filesystem, install the [`django-storages`](https://django-storages.readthedocs.io/en/stable/) library and configure your [desired storage backend](../configuration/system.md#storage_backend) in `configuration.py`.
|
By default, NetBox will use the local filesystem to store uploaded files. To use a remote filesystem, install the [`django-storages`](https://django-storages.readthedocs.io/en/stable/) library and configure your [desired storage backend](../configuration/system.md#storage_backend) in `configuration.py`.
|
||||||
@@ -215,6 +211,33 @@ By default, NetBox will use the local filesystem to store uploaded files. To use
|
|||||||
sudo sh -c "echo 'django-storages' >> /opt/netbox/local_requirements.txt"
|
sudo sh -c "echo 'django-storages' >> /opt/netbox/local_requirements.txt"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Remote Data Sources
|
||||||
|
|
||||||
|
NetBox supports integration with several remote data sources via configurable backends. Each of these requires the installation of one or more additional libraries.
|
||||||
|
|
||||||
|
* Amazon S3: [`boto3`](https://boto3.amazonaws.com/v1/documentation/api/latest/index.html)
|
||||||
|
* Git: [`dulwich`](https://www.dulwich.io/)
|
||||||
|
|
||||||
|
For example, to enable the Amazon S3 backend, add `boto3` to your local requirements file:
|
||||||
|
|
||||||
|
```no-highlight
|
||||||
|
sudo sh -c "echo 'boto3' >> /opt/netbox/local_requirements.txt"
|
||||||
|
```
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
These packages were previously required in NetBox v3.5 but now are optional.
|
||||||
|
|
||||||
|
### Sentry Integration
|
||||||
|
|
||||||
|
NetBox may be configured to send error reports to [Sentry](../administration/error-reporting.md) for analysis. This integration requires installation of the `sentry-sdk` Python library.
|
||||||
|
|
||||||
|
```no-highlight
|
||||||
|
sudo sh -c "echo 'sentry-sdk' >> /opt/netbox/local_requirements.txt"
|
||||||
|
```
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
Sentry integration was previously included by default in NetBox v3.6 but is now optional.
|
||||||
|
|
||||||
## Run the Upgrade Script
|
## Run the Upgrade Script
|
||||||
|
|
||||||
Once NetBox has been configured, we're ready to proceed with the actual installation. We'll run the packaged upgrade script (`upgrade.sh`) to perform the following actions:
|
Once NetBox has been configured, we're ready to proceed with the actual installation. We'll run the packaged upgrade script (`upgrade.sh`) to perform the following actions:
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ sudo cp /opt/netbox/contrib/apache.conf /etc/apache2/sites-available/netbox.conf
|
|||||||
Finally, ensure that the required Apache modules are enabled, enable the `netbox` site, and reload Apache:
|
Finally, ensure that the required Apache modules are enabled, enable the `netbox` site, and reload Apache:
|
||||||
|
|
||||||
```no-highlight
|
```no-highlight
|
||||||
sudo a2enmod ssl proxy proxy_http headers
|
sudo a2enmod ssl proxy proxy_http headers rewrite
|
||||||
sudo a2ensite netbox
|
sudo a2ensite netbox
|
||||||
sudo systemctl restart apache2
|
sudo systemctl restart apache2
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ sudo apt install -y libldap2-dev libsasl2-dev libssl-dev
|
|||||||
On CentOS:
|
On CentOS:
|
||||||
|
|
||||||
```no-highlight
|
```no-highlight
|
||||||
sudo yum install -y openldap-devel
|
sudo yum install -y openldap-devel python3-devel
|
||||||
```
|
```
|
||||||
|
|
||||||
### Install django-auth-ldap
|
### Install django-auth-ldap
|
||||||
@@ -148,6 +148,126 @@ AUTH_LDAP_CACHE_TIMEOUT = 3600
|
|||||||
!!! warning
|
!!! warning
|
||||||
Authentication will fail if the groups (the distinguished names) do not exist in the LDAP directory.
|
Authentication will fail if the groups (the distinguished names) do not exist in the LDAP directory.
|
||||||
|
|
||||||
|
## Authenticating with Active Directory
|
||||||
|
|
||||||
|
Integrating Active Directory for authentication can be a bit challenging as it may require handling different login formats. This solution will allow users to log in either using their full User Principal Name (UPN) or their username alone, by filtering the DN according to either the `sAMAccountName` or the `userPrincipalName`. The following configuration options will allow your users to enter their usernames in the format `username` or `username@domain.tld`.
|
||||||
|
|
||||||
|
Just as before, the configuration options are defined in the file ldap_config.py. First, modify the `AUTH_LDAP_USER_SEARCH` option to match the following:
|
||||||
|
|
||||||
|
```python
|
||||||
|
AUTH_LDAP_USER_SEARCH = LDAPSearch(
|
||||||
|
"ou=Users,dc=example,dc=com",
|
||||||
|
ldap.SCOPE_SUBTREE,
|
||||||
|
"(|(userPrincipalName=%(user)s)(sAMAccountName=%(user)s))"
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
In addition, `AUTH_LDAP_USER_DN_TEMPLATE` should be set to `None` as described in the previous sections. Next, modify `AUTH_LDAP_USER_ATTR_MAP` to match the following:
|
||||||
|
|
||||||
|
```python
|
||||||
|
AUTH_LDAP_USER_ATTR_MAP = {
|
||||||
|
"username": "sAMAccountName",
|
||||||
|
"email": "mail",
|
||||||
|
"first_name": "givenName",
|
||||||
|
"last_name": "sn",
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Finally, we need to add one more configuration option, `AUTH_LDAP_USER_QUERY_FIELD`. The following should be added to your LDAP configuration file:
|
||||||
|
|
||||||
|
```python
|
||||||
|
AUTH_LDAP_USER_QUERY_FIELD = "username"
|
||||||
|
```
|
||||||
|
|
||||||
|
With these configuration options, your users will be able to log in either with or without the UPN suffix.
|
||||||
|
|
||||||
|
### Example Configuration
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
This configuration is intended to serve as a template, but may need to be modified in accordance with your environment.
|
||||||
|
|
||||||
|
```python
|
||||||
|
import ldap
|
||||||
|
from django_auth_ldap.config import LDAPSearch, NestedGroupOfNamesType
|
||||||
|
|
||||||
|
# Server URI
|
||||||
|
AUTH_LDAP_SERVER_URI = "ldaps://ad.example.com:3269"
|
||||||
|
|
||||||
|
# The following may be needed if you are binding to Active Directory.
|
||||||
|
AUTH_LDAP_CONNECTION_OPTIONS = {
|
||||||
|
ldap.OPT_REFERRALS: 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# Set the DN and password for the NetBox service account.
|
||||||
|
AUTH_LDAP_BIND_DN = "CN=NETBOXSA,OU=Service Accounts,DC=example,DC=com"
|
||||||
|
AUTH_LDAP_BIND_PASSWORD = "demo"
|
||||||
|
|
||||||
|
# Include this setting if you want to ignore certificate errors. This might be needed to accept a self-signed cert.
|
||||||
|
# Note that this is a NetBox-specific setting which sets:
|
||||||
|
# ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_NEVER)
|
||||||
|
LDAP_IGNORE_CERT_ERRORS = False
|
||||||
|
|
||||||
|
# Include this setting if you want to validate the LDAP server certificates against a CA certificate directory on your server
|
||||||
|
# Note that this is a NetBox-specific setting which sets:
|
||||||
|
# ldap.set_option(ldap.OPT_X_TLS_CACERTDIR, LDAP_CA_CERT_DIR)
|
||||||
|
LDAP_CA_CERT_DIR = '/etc/ssl/certs'
|
||||||
|
|
||||||
|
# Include this setting if you want to validate the LDAP server certificates against your own CA.
|
||||||
|
# Note that this is a NetBox-specific setting which sets:
|
||||||
|
# ldap.set_option(ldap.OPT_X_TLS_CACERTFILE, LDAP_CA_CERT_FILE)
|
||||||
|
LDAP_CA_CERT_FILE = '/path/to/example-CA.crt'
|
||||||
|
|
||||||
|
# This search matches users with the sAMAccountName equal to the provided username. This is required if the user's
|
||||||
|
# username is not in their DN (Active Directory).
|
||||||
|
AUTH_LDAP_USER_SEARCH = LDAPSearch(
|
||||||
|
"ou=Users,dc=example,dc=com",
|
||||||
|
ldap.SCOPE_SUBTREE,
|
||||||
|
"(|(userPrincipalName=%(user)s)(sAMAccountName=%(user)s))"
|
||||||
|
)
|
||||||
|
|
||||||
|
# If a user's DN is producible from their username, we don't need to search.
|
||||||
|
AUTH_LDAP_USER_DN_TEMPLATE = None
|
||||||
|
|
||||||
|
# You can map user attributes to Django attributes as so.
|
||||||
|
AUTH_LDAP_USER_ATTR_MAP = {
|
||||||
|
"username": "sAMAccountName",
|
||||||
|
"email": "mail",
|
||||||
|
"first_name": "givenName",
|
||||||
|
"last_name": "sn",
|
||||||
|
}
|
||||||
|
|
||||||
|
AUTH_LDAP_USER_QUERY_FIELD = "username"
|
||||||
|
|
||||||
|
# This search ought to return all groups to which the user belongs. django_auth_ldap uses this to determine group
|
||||||
|
# hierarchy.
|
||||||
|
AUTH_LDAP_GROUP_SEARCH = LDAPSearch(
|
||||||
|
"dc=example,dc=com",
|
||||||
|
ldap.SCOPE_SUBTREE,
|
||||||
|
"(objectClass=group)"
|
||||||
|
)
|
||||||
|
AUTH_LDAP_GROUP_TYPE = NestedGroupOfNamesType()
|
||||||
|
|
||||||
|
# Define a group required to login.
|
||||||
|
AUTH_LDAP_REQUIRE_GROUP = "CN=NETBOX_USERS,DC=example,DC=com"
|
||||||
|
|
||||||
|
# Mirror LDAP group assignments.
|
||||||
|
AUTH_LDAP_MIRROR_GROUPS = True
|
||||||
|
|
||||||
|
# Define special user types using groups. Exercise great caution when assigning superuser status.
|
||||||
|
AUTH_LDAP_USER_FLAGS_BY_GROUP = {
|
||||||
|
"is_active": "cn=active,ou=groups,dc=example,dc=com",
|
||||||
|
"is_staff": "cn=staff,ou=groups,dc=example,dc=com",
|
||||||
|
"is_superuser": "cn=superuser,ou=groups,dc=example,dc=com"
|
||||||
|
}
|
||||||
|
|
||||||
|
# For more granular permissions, we can map LDAP groups to Django groups.
|
||||||
|
AUTH_LDAP_FIND_GROUP_PERMS = True
|
||||||
|
|
||||||
|
# Cache groups for one hour to reduce LDAP traffic
|
||||||
|
AUTH_LDAP_CACHE_TIMEOUT = 3600
|
||||||
|
AUTH_LDAP_ALWAYS_UPDATE_USER = True
|
||||||
|
```
|
||||||
|
|
||||||
## Troubleshooting LDAP
|
## Troubleshooting LDAP
|
||||||
|
|
||||||
`systemctl restart netbox` restarts the NetBox service, and initiates any changes made to `ldap_config.py`. If there are syntax errors present, the NetBox process will not spawn an instance, and errors should be logged to `/var/log/messages`.
|
`systemctl restart netbox` restarts the NetBox service, and initiates any changes made to `ldap_config.py`. If there are syntax errors present, the NetBox process will not spawn an instance, and errors should be logged to `/var/log/messages`.
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
# Installation
|
# Installation
|
||||||
|
|
||||||
The installation instructions provided here have been tested to work on Ubuntu 20.04 and CentOS 8.3. The particular commands needed to install dependencies on other distributions may vary significantly. Unfortunately, this is outside the control of the NetBox maintainers. Please consult your distribution's documentation for assistance with any errors.
|
!!! info "NetBox Cloud"
|
||||||
|
The instructions below are for installing NetBox as a standalone, self-hosted application. For a Cloud-delivered solution, check out [NetBox Cloud](https://netboxlabs.com/netbox-cloud/) by NetBox Labs.
|
||||||
|
|
||||||
|
The installation instructions provided here have been tested to work on Ubuntu 22.04 and CentOS 8.3. The particular commands needed to install dependencies on other distributions may vary significantly. Unfortunately, this is outside the control of the NetBox maintainers. Please consult your distribution's documentation for assistance with any errors.
|
||||||
|
|
||||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/_y5JRiW_PLM" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
<iframe width="560" height="315" src="https://www.youtube.com/embed/_y5JRiW_PLM" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
||||||
|
|
||||||
@@ -18,7 +21,7 @@ The following sections detail how to set up a new instance of NetBox:
|
|||||||
| Dependency | Minimum Version |
|
| Dependency | Minimum Version |
|
||||||
|------------|-----------------|
|
|------------|-----------------|
|
||||||
| Python | 3.8 |
|
| Python | 3.8 |
|
||||||
| PostgreSQL | 11 |
|
| PostgreSQL | 12 |
|
||||||
| Redis | 4.0 |
|
| Redis | 4.0 |
|
||||||
|
|
||||||
Below is a simplified overview of the NetBox application stack for reference:
|
Below is a simplified overview of the NetBox application stack for reference:
|
||||||
|
|||||||
@@ -15,12 +15,12 @@ Prior to upgrading your NetBox instance, be sure to carefully review all [releas
|
|||||||
|
|
||||||
## 2. Update Dependencies to Required Versions
|
## 2. Update Dependencies to Required Versions
|
||||||
|
|
||||||
NetBox v3.0 and later require the following:
|
NetBox requires the following dependencies:
|
||||||
|
|
||||||
| Dependency | Minimum Version |
|
| Dependency | Minimum Version |
|
||||||
|------------|-----------------|
|
|------------|-----------------|
|
||||||
| Python | 3.8 |
|
| Python | 3.8 |
|
||||||
| PostgreSQL | 11 |
|
| PostgreSQL | 12 |
|
||||||
| Redis | 4.0 |
|
| Redis | 4.0 |
|
||||||
|
|
||||||
## 3. Install the Latest Release
|
## 3. Install the Latest Release
|
||||||
@@ -48,36 +48,40 @@ Download the [latest stable release](https://github.com/netbox-community/netbox/
|
|||||||
Download and extract the latest version:
|
Download and extract the latest version:
|
||||||
|
|
||||||
```no-highlight
|
```no-highlight
|
||||||
wget https://github.com/netbox-community/netbox/archive/vX.Y.Z.tar.gz
|
# Set $NEWVER to the NetBox version being installed
|
||||||
sudo tar -xzf vX.Y.Z.tar.gz -C /opt
|
NEWVER=3.5.0
|
||||||
sudo ln -sfn /opt/netbox-X.Y.Z/ /opt/netbox
|
wget https://github.com/netbox-community/netbox/archive/v$NEWVER.tar.gz
|
||||||
|
sudo tar -xzf v$NEWVER.tar.gz -C /opt
|
||||||
|
sudo ln -sfn /opt/netbox-$NEWVER/ /opt/netbox
|
||||||
```
|
```
|
||||||
|
|
||||||
Copy `local_requirements.txt`, `configuration.py`, and `ldap_config.py` (if present) from the current installation to the new version:
|
Copy `local_requirements.txt`, `configuration.py`, and `ldap_config.py` (if present) from the current installation to the new version:
|
||||||
|
|
||||||
```no-highlight
|
```no-highlight
|
||||||
sudo cp /opt/netbox-X.Y.Z/local_requirements.txt /opt/netbox/
|
# Set $OLDVER to the NetBox version currently installed
|
||||||
sudo cp /opt/netbox-X.Y.Z/netbox/netbox/configuration.py /opt/netbox/netbox/netbox/
|
OLDVER=3.4.9
|
||||||
sudo cp /opt/netbox-X.Y.Z/netbox/netbox/ldap_config.py /opt/netbox/netbox/netbox/
|
sudo cp /opt/netbox-$OLDVER/local_requirements.txt /opt/netbox/
|
||||||
|
sudo cp /opt/netbox-$OLDVER/netbox/netbox/configuration.py /opt/netbox/netbox/netbox/
|
||||||
|
sudo cp /opt/netbox-$OLDVER/netbox/netbox/ldap_config.py /opt/netbox/netbox/netbox/
|
||||||
```
|
```
|
||||||
|
|
||||||
Be sure to replicate your uploaded media as well. (The exact action necessary will depend on where you choose to store your media, but in general moving or copying the media directory will suffice.)
|
Be sure to replicate your uploaded media as well. (The exact action necessary will depend on where you choose to store your media, but in general moving or copying the media directory will suffice.)
|
||||||
|
|
||||||
```no-highlight
|
```no-highlight
|
||||||
sudo cp -pr /opt/netbox-X.Y.Z/netbox/media/ /opt/netbox/netbox/
|
sudo cp -pr /opt/netbox-$OLDVER/netbox/media/ /opt/netbox/netbox/
|
||||||
```
|
```
|
||||||
|
|
||||||
Also make sure to copy or link any custom scripts and reports that you've made. Note that if these are stored outside the project root, you will not need to copy them. (Check the `SCRIPTS_ROOT` and `REPORTS_ROOT` parameters in the configuration file above if you're unsure.)
|
Also make sure to copy or link any custom scripts and reports that you've made. Note that if these are stored outside the project root, you will not need to copy them. (Check the `SCRIPTS_ROOT` and `REPORTS_ROOT` parameters in the configuration file above if you're unsure.)
|
||||||
|
|
||||||
```no-highlight
|
```no-highlight
|
||||||
sudo cp -r /opt/netbox-X.Y.Z/netbox/scripts /opt/netbox/netbox/
|
sudo cp -r /opt/netbox-$OLDVER/netbox/scripts /opt/netbox/netbox/
|
||||||
sudo cp -r /opt/netbox-X.Y.Z/netbox/reports /opt/netbox/netbox/
|
sudo cp -r /opt/netbox-$OLDVER/netbox/reports /opt/netbox/netbox/
|
||||||
```
|
```
|
||||||
|
|
||||||
If you followed the original installation guide to set up gunicorn, be sure to copy its configuration as well:
|
If you followed the original installation guide to set up gunicorn, be sure to copy its configuration as well:
|
||||||
|
|
||||||
```no-highlight
|
```no-highlight
|
||||||
sudo cp /opt/netbox-X.Y.Z/gunicorn.py /opt/netbox/
|
sudo cp /opt/netbox-$OLDVER/gunicorn.py /opt/netbox/
|
||||||
```
|
```
|
||||||
|
|
||||||
### Option B: Clone the Git Repository
|
### Option B: Clone the Git Repository
|
||||||
@@ -97,7 +101,7 @@ sudo git pull origin master
|
|||||||
|
|
||||||
## 4. Run the Upgrade Script
|
## 4. Run the Upgrade Script
|
||||||
|
|
||||||
Once the new code is in place, verify that any optional Python packages required by your deployment (e.g. `napalm` or `django-auth-ldap`) are listed in `local_requirements.txt`. Then, run the upgrade script:
|
Once the new code is in place, verify that any optional Python packages required by your deployment (e.g. `django-auth-ldap`) are listed in `local_requirements.txt`. Then, run the upgrade script:
|
||||||
|
|
||||||
```no-highlight
|
```no-highlight
|
||||||
sudo ./upgrade.sh
|
sudo ./upgrade.sh
|
||||||
|
|||||||
@@ -1,74 +0,0 @@
|
|||||||
# NAPALM
|
|
||||||
|
|
||||||
NetBox supports integration with the [NAPALM automation](https://github.com/napalm-automation/napalm) library. NAPALM allows NetBox to serve a proxy for operational data, fetching live data from network devices and returning it to a requester via its REST API. Note that NetBox does not store any NAPALM data locally.
|
|
||||||
|
|
||||||
The NetBox UI will display tabs for status, LLDP neighbors, and configuration under the device view if the following conditions are met:
|
|
||||||
|
|
||||||
* Device status is "Active"
|
|
||||||
* A primary IP has been assigned to the device
|
|
||||||
* A platform with a NAPALM driver has been assigned
|
|
||||||
* The authenticated user has the `dcim.napalm_read_device` permission
|
|
||||||
|
|
||||||
!!! note
|
|
||||||
To enable this integration, the NAPALM library must be installed. See [installation steps](../../installation/3-netbox/#napalm) for more information.
|
|
||||||
|
|
||||||
Below is an example REST API request and response:
|
|
||||||
|
|
||||||
```no-highlight
|
|
||||||
GET /api/dcim/devices/1/napalm/?method=get_environment
|
|
||||||
|
|
||||||
{
|
|
||||||
"get_environment": {
|
|
||||||
...
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
!!! note
|
|
||||||
To make NAPALM requests via the NetBox REST API, a NetBox user must have assigned a permission granting the `napalm_read` action for the device object type.
|
|
||||||
|
|
||||||
## Authentication
|
|
||||||
|
|
||||||
By default, the [`NAPALM_USERNAME`](../configuration/napalm.md#napalm_username) and [`NAPALM_PASSWORD`](../configuration/napalm.md#napalm_password) configuration parameters are used for NAPALM authentication. They can be overridden for an individual API call by specifying the `X-NAPALM-Username` and `X-NAPALM-Password` headers.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ curl "http://localhost/api/dcim/devices/1/napalm/?method=get_environment" \
|
|
||||||
-H "Authorization: Token $TOKEN" \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
-H "Accept: application/json; indent=4" \
|
|
||||||
-H "X-NAPALM-Username: foo" \
|
|
||||||
-H "X-NAPALM-Password: bar"
|
|
||||||
```
|
|
||||||
|
|
||||||
## Method Support
|
|
||||||
|
|
||||||
The list of supported NAPALM methods depends on the [NAPALM driver](https://napalm.readthedocs.io/en/latest/support/index.html#general-support-matrix) configured for the platform of a device. Because there is no granular mechanism in place for limiting potentially disruptive requests, NetBox supports only read-only [get](https://napalm.readthedocs.io/en/latest/support/index.html#getters-support-matrix) methods.
|
|
||||||
|
|
||||||
## Multiple Methods
|
|
||||||
|
|
||||||
It is possible to request the output of multiple NAPALM methods in a single API request by passing multiple `method` parameters. For example:
|
|
||||||
|
|
||||||
```no-highlight
|
|
||||||
GET /api/dcim/devices/1/napalm/?method=get_ntp_servers&method=get_ntp_peers
|
|
||||||
|
|
||||||
{
|
|
||||||
"get_ntp_servers": {
|
|
||||||
...
|
|
||||||
},
|
|
||||||
"get_ntp_peers": {
|
|
||||||
...
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## Optional Arguments
|
|
||||||
|
|
||||||
The behavior of NAPALM drivers can be adjusted according to the [optional arguments](https://napalm.readthedocs.io/en/latest/support/index.html#optional-arguments). NetBox exposes those arguments using headers prefixed with `X-NAPALM-`. For example, the SSH port is changed to 2222 in this API call:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ curl "http://localhost/api/dcim/devices/1/napalm/?method=get_environment" \
|
|
||||||
-H "Authorization: Token $TOKEN" \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
-H "Accept: application/json; indent=4" \
|
|
||||||
-H "X-NAPALM-port: 2222"
|
|
||||||
```
|
|
||||||
@@ -63,7 +63,7 @@ Each attribute of the IP address is expressed as an attribute of the JSON object
|
|||||||
|
|
||||||
## Interactive Documentation
|
## Interactive Documentation
|
||||||
|
|
||||||
Comprehensive, interactive documentation of all REST API endpoints is available on a running NetBox instance at `/api/docs/`. This interface provides a convenient sandbox for researching and experimenting with specific endpoints and request types. The API itself can also be explored using a web browser by navigating to its root at `/api/`.
|
Comprehensive, interactive documentation of all REST API endpoints is available on a running NetBox instance at `/api/schema/swagger-ui/`. This interface provides a convenient sandbox for researching and experimenting with specific endpoints and request types. The API itself can also be explored using a web browser by navigating to its root at `/api/`.
|
||||||
|
|
||||||
## Endpoint Hierarchy
|
## Endpoint Hierarchy
|
||||||
|
|
||||||
@@ -570,25 +570,29 @@ The NetBox REST API primarily employs token-based authentication. For convenienc
|
|||||||
|
|
||||||
A token is a unique identifier mapped to a NetBox user account. Each user may have one or more tokens which he or she can use for authentication when making REST API requests. To create a token, navigate to the API tokens page under your user profile.
|
A token is a unique identifier mapped to a NetBox user account. Each user may have one or more tokens which he or she can use for authentication when making REST API requests. To create a token, navigate to the API tokens page under your user profile.
|
||||||
|
|
||||||
!!! note
|
By default, all users can create and manage their own REST API tokens under the user control panel in the UI or via the REST API. This ability can be disabled by overriding the [`DEFAULT_PERMISSIONS`](../configuration/security.md#default_permissions) configuration parameter.
|
||||||
All users can create and manage REST API tokens under the user control panel in the UI. The ability to view, add, change, or delete tokens via the REST API itself is controlled by the relevant model permissions, assigned to users and/or groups in the admin UI. These permissions should be used with great care to avoid accidentally permitting a user to create tokens for other user accounts.
|
|
||||||
|
|
||||||
Each token contains a 160-bit key represented as 40 hexadecimal characters. When creating a token, you'll typically leave the key field blank so that a random key will be automatically generated. However, NetBox allows you to specify a key in case you need to restore a previously deleted token to operation.
|
Each token contains a 160-bit key represented as 40 hexadecimal characters. When creating a token, you'll typically leave the key field blank so that a random key will be automatically generated. However, NetBox allows you to specify a key in case you need to restore a previously deleted token to operation.
|
||||||
|
|
||||||
By default, a token can be used to perform all actions via the API that a user would be permitted to do via the web UI. Deselecting the "write enabled" option will restrict API requests made with the token to read operations (e.g. GET) only.
|
|
||||||
|
|
||||||
Additionally, a token can be set to expire at a specific time. This can be useful if an external client needs to be granted temporary access to NetBox.
|
Additionally, a token can be set to expire at a specific time. This can be useful if an external client needs to be granted temporary access to NetBox.
|
||||||
|
|
||||||
!!! warning "Restricting Token Retrieval"
|
!!! info "Restricting Token Retrieval"
|
||||||
The ability to retrieve the key value of a previously-created API token can be restricted by disabling the [`ALLOW_TOKEN_RETRIEVAL`](../configuration/security.md#allow_token_retrieval) configuration parameter.
|
The ability to retrieve the key value of a previously-created API token can be restricted by disabling the [`ALLOW_TOKEN_RETRIEVAL`](../configuration/security.md#allow_token_retrieval) configuration parameter.
|
||||||
|
|
||||||
|
### Restricting Write Operations
|
||||||
|
|
||||||
|
By default, a token can be used to perform all actions via the API that a user would be permitted to do via the web UI. Deselecting the "write enabled" option will restrict API requests made with the token to read operations (e.g. GET) only.
|
||||||
|
|
||||||
#### Client IP Restriction
|
#### Client IP Restriction
|
||||||
|
|
||||||
!!! note
|
|
||||||
This feature was introduced in NetBox v3.3.
|
|
||||||
|
|
||||||
Each API token can optionally be restricted by client IP address. If one or more allowed IP prefixes/addresses is defined for a token, authentication will fail for any client connecting from an IP address outside the defined range(s). This enables restricting the use a token to a specific client. (By default, any client IP address is permitted.)
|
Each API token can optionally be restricted by client IP address. If one or more allowed IP prefixes/addresses is defined for a token, authentication will fail for any client connecting from an IP address outside the defined range(s). This enables restricting the use a token to a specific client. (By default, any client IP address is permitted.)
|
||||||
|
|
||||||
|
#### Creating Tokens for Other Users
|
||||||
|
|
||||||
|
It is possible to provision authentication tokens for other users via the REST API. To do, so the requesting user must have the `users.grant_token` permission assigned. While all users have inherent permission by default to create their own tokens, this permission is required to enable the creation of tokens for other users.
|
||||||
|
|
||||||
|
!!! warning "Exercise Caution"
|
||||||
|
The ability to create tokens on behalf of other users enables the requestor to access the created token. This ability is intended e.g. for the provisioning of tokens by automated services, and should be used with extreme caution to avoid a security compromise.
|
||||||
|
|
||||||
### Authenticating to the API
|
### Authenticating to the API
|
||||||
|
|
||||||
@@ -622,7 +626,7 @@ When a token is used to authenticate a request, its `last_updated` time updated
|
|||||||
|
|
||||||
### Initial Token Provisioning
|
### Initial Token Provisioning
|
||||||
|
|
||||||
Ideally, each user should provision his or her own REST API token(s) via the web UI. However, you may encounter where a token must be created by a user via the REST API itself. NetBox provides a special endpoint to provision tokens using a valid username and password combination.
|
Ideally, each user should provision his or her own API token(s) via the web UI. However, you may encounter a scenario where a token must be created by a user via the REST API itself. NetBox provides a special endpoint to provision tokens using a valid username and password combination. (Note that the user must have permission to create API tokens regardless of the interface used.)
|
||||||
|
|
||||||
To provision a token via the REST API, make a `POST` request to the `/api/users/tokens/provision/` endpoint:
|
To provision a token via the REST API, make a `POST` request to the `/api/users/tokens/provision/` endpoint:
|
||||||
|
|
||||||
@@ -633,7 +637,7 @@ $ curl -X POST \
|
|||||||
https://netbox/api/users/tokens/provision/ \
|
https://netbox/api/users/tokens/provision/ \
|
||||||
--data '{
|
--data '{
|
||||||
"username": "hankhill",
|
"username": "hankhill",
|
||||||
"password": "I<3C3H8",
|
"password": "I<3C3H8"
|
||||||
}'
|
}'
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -657,3 +661,26 @@ Note that we are _not_ passing an existing REST API token with this request. If
|
|||||||
"description": ""
|
"description": ""
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## HTTP Headers
|
||||||
|
|
||||||
|
### `API-Version`
|
||||||
|
|
||||||
|
This header specifies the API version in use. This will always match the version of NetBox installed. For example, NetBox v3.4.2 will report an API version of `3.4`.
|
||||||
|
|
||||||
|
### `X-Request-ID`
|
||||||
|
|
||||||
|
This header specifies the unique ID assigned to the received API request. It can be very handy for correlating a request with change records. For example, after creating several new objects, you can filter against the object changes API endpoint to retrieve the resulting change records:
|
||||||
|
|
||||||
|
```
|
||||||
|
GET /api/extras/object-changes/?request_id=e39c84bc-f169-4d5f-bc1c-94487a1b18b5
|
||||||
|
```
|
||||||
|
|
||||||
|
The request ID can also be used to filter many objects directly, to return those created or updated by a certain request:
|
||||||
|
|
||||||
|
```
|
||||||
|
GET /api/dcim/sites/?created_by_request=e39c84bc-f169-4d5f-bc1c-94487a1b18b5
|
||||||
|
```
|
||||||
|
|
||||||
|
!!! note
|
||||||
|
This header is included with _all_ NetBox responses, although it is most practical when working with an API.
|
||||||
|
|||||||
12
docs/integrations/synchronized-data.md
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# Synchronized Data
|
||||||
|
|
||||||
|
Some NetBox models support automatic synchronization of certain attributes from remote [data sources](../models/core/datasource.md), such as a git repository hosted on GitHub or GitLab. Data from the authoritative remote source is synchronized locally in NetBox as [data files](../models/core/datafile.md).
|
||||||
|
|
||||||
|
!!! note "Permissions"
|
||||||
|
A user must be assigned the `core.sync_datasource` permission in order to synchronize local files from a remote data source. This is accomplished by creating a permission for the "Core > Data Source" object type with the `sync` action, and assigning it to the desired user and/or group.
|
||||||
|
|
||||||
|
The following features support the use of synchronized data:
|
||||||
|
|
||||||
|
* [Configuration templates](../features/configuration-rendering.md)
|
||||||
|
* [Configuration context data](../features/context-data.md)
|
||||||
|
* [Export templates](../customization/export-templates.md)
|
||||||
@@ -1,11 +1,9 @@
|
|||||||
# Webhooks
|
# Webhooks
|
||||||
|
|
||||||
NetBox can be configured to transmit outgoing webhooks to remote systems in response to internal object changes. The receiver can act on the data in these webhook messages to perform related tasks.
|
NetBox can be configured via [Event Rules](../features/event-rules.md) to transmit outgoing webhooks to remote systems in response to internal object changes. The receiver can act on the data in these webhook messages to perform related tasks.
|
||||||
|
|
||||||
For example, suppose you want to automatically configure a monitoring system to start monitoring a device when its operational status is changed to active, and remove it from monitoring for any other status. You can create a webhook in NetBox for the device model and craft its content and destination URL to effect the desired change on the receiving system. Webhooks will be sent automatically by NetBox whenever the configured constraints are met.
|
For example, suppose you want to automatically configure a monitoring system to start monitoring a device when its operational status is changed to active, and remove it from monitoring for any other status. You can create a webhook in NetBox for the device model and craft its content and destination URL to effect the desired change on the receiving system. Webhooks will be sent automatically by NetBox whenever the configured constraints are met.
|
||||||
|
|
||||||
Each webhook must be associated with at least one NetBox object type and at least one event (create, update, or delete). Users can specify the receiver URL, HTTP request type (`GET`, `POST`, etc.), content type, and headers. A request body can also be specified; if left blank, this will default to a serialized representation of the affected object.
|
|
||||||
|
|
||||||
!!! warning "Security Notice"
|
!!! warning "Security Notice"
|
||||||
Webhooks support the inclusion of user-submitted code to generate the URL, custom headers, and payloads, which may pose security risks under certain conditions. Only grant permission to create or modify webhooks to trusted users.
|
Webhooks support the inclusion of user-submitted code to generate the URL, custom headers, and payloads, which may pose security risks under certain conditions. Only grant permission to create or modify webhooks to trusted users.
|
||||||
|
|
||||||
@@ -70,26 +68,12 @@ If no body template is specified, the request body will be populated with a JSON
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Conditional Webhooks
|
!!! note
|
||||||
|
The setting of conditional webhooks has been moved to [Event Rules](../features/event-rules.md) since NetBox 3.7
|
||||||
A webhook may include a set of conditional logic expressed in JSON used to control whether a webhook triggers for a specific object. For example, you may wish to trigger a webhook for devices only when the `status` field of an object is "active":
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"and": [
|
|
||||||
{
|
|
||||||
"attr": "status.value",
|
|
||||||
"value": "active"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
For more detail, see the reference documentation for NetBox's [conditional logic](../reference/conditions.md).
|
|
||||||
|
|
||||||
## Webhook Processing
|
## Webhook Processing
|
||||||
|
|
||||||
When a change is detected, any resulting webhooks are placed into a Redis queue for processing. This allows the user's request to complete without needing to wait for the outgoing webhook(s) to be processed. The webhooks are then extracted from the queue by the `rqworker` process and HTTP requests are sent to their respective destinations. The current webhook queue and any failed webhooks can be inspected in the admin UI under System > Background Tasks.
|
Using [Event Rules](../features/event-rules.md), when a change is detected, any resulting webhooks are placed into a Redis queue for processing. This allows the user's request to complete without needing to wait for the outgoing webhook(s) to be processed. The webhooks are then extracted from the queue by the `rqworker` process and HTTP requests are sent to their respective destinations. The current webhook queue and any failed webhooks can be inspected in the admin UI under System > Background Tasks.
|
||||||
|
|
||||||
A request is considered successful if the response has a 2XX status code; otherwise, the request is marked as having failed. Failed requests may be retried manually via the admin UI.
|
A request is considered successful if the response has a 2XX status code; otherwise, the request is marked as having failed. Failed requests may be retried manually via the admin UI.
|
||||||
|
|
||||||
@@ -122,6 +106,6 @@ Content-Type: application/x-www-form-urlencoded
|
|||||||
------------
|
------------
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that `webhook_receiver` does not actually _do_ anything with the information received: It merely prints the request headers and body for inspection.
|
Note that `webhook_receiver` does not actually _do_ anything with the information received: It merely prints the request headers and body for inspection. If you don't see any output, check that the `rqworker` process is running and that webhook events are being placed into the queue.
|
||||||
|
|
||||||
Now, when the NetBox webhook is triggered and processed, you should see its headers and content appear in the terminal where the webhook receiver is listening. If you don't, check that the `rqworker` process is running and that webhook events are being placed into the queue (visible under the NetBox admin UI).
|
Webhook results can be found in the NetBox admin UI under the Background Tasks section. You can see any finished or failed runs, as well as the error log for failed webhooks.
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
NetBox was originally developed by its lead maintainer, [Jeremy Stretch](https://github.com/jeremystretch), while he was working as a network engineer at [DigitalOcean](https://www.digitalocean.com/) in 2015 as part of an effort to automate their network provisioning. Recognizing the new tool's potential, DigitalOcean agreed to release it as an open source project in June 2016.
|
NetBox was originally developed by its lead maintainer, [Jeremy Stretch](https://github.com/jeremystretch), while he was working as a network engineer at [DigitalOcean](https://www.digitalocean.com/) in 2015 as part of an effort to automate their network provisioning. Recognizing the new tool's potential, DigitalOcean agreed to release it as an open source project in June 2016.
|
||||||
|
|
||||||
Since then, thousands of organizations around the world have embraced NetBox as their central network source of truth to empower both network operators and automation.
|
Since then, thousands of organizations around the world have embraced NetBox as their central network source of truth to empower both network operators and automation. Today, the open source project is stewarded by [NetBox Labs](https://netboxlabs.com/) and a team of volunteer maintainers. Beyond the core product, myriad [plugins](https://netbox.dev/plugins/) have been developed by the NetBox community to enhance and expand its feature set.
|
||||||
|
|
||||||
## Key Features
|
## Key Features
|
||||||
|
|
||||||
@@ -17,11 +17,15 @@ NetBox was built specifically to serve the needs of network engineers and operat
|
|||||||
* AS number (ASN) management
|
* AS number (ASN) management
|
||||||
* Rack elevations with SVG rendering
|
* Rack elevations with SVG rendering
|
||||||
* Device modeling using pre-defined types
|
* Device modeling using pre-defined types
|
||||||
|
* Virtual chassis and device contexts
|
||||||
* Network, power, and console cabling with SVG traces
|
* Network, power, and console cabling with SVG traces
|
||||||
|
* Breakout cables
|
||||||
* Power distribution modeling
|
* Power distribution modeling
|
||||||
* Data circuit and provider tracking
|
* Data circuit and provider tracking
|
||||||
* Wireless LAN and point-to-point links
|
* Wireless LAN and point-to-point links
|
||||||
* L2 VPN overlays
|
* VPN tunnels
|
||||||
|
* IKE & IPSec policies
|
||||||
|
* Layer 2 VPN overlays
|
||||||
* FHRP groups (VRRP, HSRP, etc.)
|
* FHRP groups (VRRP, HSRP, etc.)
|
||||||
* Application service bindings
|
* Application service bindings
|
||||||
* Virtual machines & clusters
|
* Virtual machines & clusters
|
||||||
@@ -29,13 +33,14 @@ NetBox was built specifically to serve the needs of network engineers and operat
|
|||||||
* Tenant ownership assignment
|
* Tenant ownership assignment
|
||||||
* Device & VM configuration contexts for advanced configuration rendering
|
* Device & VM configuration contexts for advanced configuration rendering
|
||||||
* Custom fields for data model extension
|
* Custom fields for data model extension
|
||||||
* Support for custom validation rules
|
* Custom validation & protection rules
|
||||||
* Custom reports & scripts executable directly within the UI
|
* Custom reports & scripts executable directly within the UI
|
||||||
* Extensive plugin framework for adding custom functionality
|
* Extensive plugin framework for adding custom functionality
|
||||||
* Single sign-on (SSO) authentication
|
* Single sign-on (SSO) authentication
|
||||||
* Robust object-based permissions
|
* Robust object-based permissions
|
||||||
* Detailed, automatic change logging
|
* Detailed, automatic change logging
|
||||||
* NAPALM integration
|
* Global search engine
|
||||||
|
* Event-driven scripts & webhooks
|
||||||
|
|
||||||
## What NetBox Is Not
|
## What NetBox Is Not
|
||||||
|
|
||||||
@@ -74,6 +79,5 @@ NetBox is built on the [Django](https://djangoproject.com/) Python framework and
|
|||||||
| HTTP service | nginx or Apache |
|
| HTTP service | nginx or Apache |
|
||||||
| WSGI service | gunicorn or uWSGI |
|
| WSGI service | gunicorn or uWSGI |
|
||||||
| Application | Django/Python |
|
| Application | Django/Python |
|
||||||
| Database | PostgreSQL 11+ |
|
| Database | PostgreSQL 12+ |
|
||||||
| Task queuing | Redis/django-rq |
|
| Task queuing | Redis/django-rq |
|
||||||
| Live device access | NAPALM (optional) |
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 8.0 KiB |
BIN
docs/media/development/transifex_download.png
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
docs/media/misc/netbox_cloud.png
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
BIN
docs/media/misc/netbox_logo.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
docs/media/misc/reference_architecture.png
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
docs/media/run_permission.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 207 KiB |
|
Before Width: | Height: | Size: 174 KiB After Width: | Height: | Size: 316 KiB |
BIN
docs/media/screenshots/home-light.png
Normal file
|
After Width: | Height: | Size: 309 KiB |
|
Before Width: | Height: | Size: 173 KiB |
|
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 356 KiB |
|
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 235 KiB |
@@ -8,6 +8,10 @@ A circuit represents a physical point-to-point data connection, typically used t
|
|||||||
|
|
||||||
The [provider](./provider.md) to which this circuit belongs.
|
The [provider](./provider.md) to which this circuit belongs.
|
||||||
|
|
||||||
|
### Provider Account
|
||||||
|
|
||||||
|
Circuits may optionally be assigned to a specific [provider account](./provideraccount.md).
|
||||||
|
|
||||||
### Circuit ID
|
### Circuit ID
|
||||||
|
|
||||||
An identifier for this circuit. This must be unique to the assigned provider. (Circuits assigned to different providers may have the same circuit ID.)
|
An identifier for this circuit. This must be unique to the assigned provider. (Circuits assigned to different providers may have the same circuit ID.)
|
||||||
|
|||||||
@@ -12,21 +12,10 @@ A unique human-friendly name.
|
|||||||
|
|
||||||
A unique URL-friendly identifier. (This value can be used for filtering.)
|
A unique URL-friendly identifier. (This value can be used for filtering.)
|
||||||
|
|
||||||
### ASN
|
|
||||||
|
|
||||||
The AS number assigned to this provider.
|
|
||||||
|
|
||||||
!!! warning "Legacy field"
|
|
||||||
This field is being removed in NetBox v3.4. Users are highly encouraged to use the [ASN model](../ipam/asn.md) to track AS number assignment for providers.
|
|
||||||
|
|
||||||
### ASNs
|
### ASNs
|
||||||
|
|
||||||
The [AS numbers](../ipam/asn.md) assigned to this provider (optional).
|
The [AS numbers](../ipam/asn.md) assigned to this provider (optional).
|
||||||
|
|
||||||
### Account Number
|
|
||||||
|
|
||||||
The administrative account identifier tied to this provider for your organization.
|
|
||||||
|
|
||||||
### Portal URL
|
### Portal URL
|
||||||
|
|
||||||
The URL for the provider's customer service portal.
|
The URL for the provider's customer service portal.
|
||||||
|
|||||||
17
docs/models/circuits/provideraccount.md
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# Provider Accounts
|
||||||
|
|
||||||
|
This model can be used to represent individual accounts associated with a provider.
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
### Provider
|
||||||
|
|
||||||
|
The [provider](./provider.md) the account belongs to.
|
||||||
|
|
||||||
|
### Name
|
||||||
|
|
||||||
|
A human-friendly name, unique to the provider.
|
||||||
|
|
||||||
|
### Account Number
|
||||||
|
|
||||||
|
The administrative account identifier tied to this provider for your organization.
|
||||||
25
docs/models/core/datafile.md
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# Data Files
|
||||||
|
|
||||||
|
A data file object is the representation in NetBox's database of some file belonging to a remote [data source](./datasource.md). Data files are synchronized automatically, and cannot be modified locally (although they can be deleted).
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
### Source
|
||||||
|
|
||||||
|
The [data source](./datasource.md) to which this file belongs.
|
||||||
|
|
||||||
|
### Path
|
||||||
|
|
||||||
|
The path to the file, relative to its source's URL. For example, a file at `/opt/config-data/routing/bgp/peer.yaml` with a source URL of `file:///opt/config-data/` would have its path set to `routing/bgp/peer.yaml`.
|
||||||
|
|
||||||
|
### Last Updated
|
||||||
|
|
||||||
|
The date and time at which the file most recently updated from its source. Note that this attribute is updated only when the file's contents have been modified. Re-synchronizing the data source will not update this timestamp if the upstream file's data has not changed.
|
||||||
|
|
||||||
|
### Size
|
||||||
|
|
||||||
|
The file's size, in bytes.
|
||||||
|
|
||||||
|
### Hash
|
||||||
|
|
||||||
|
A [SHA256 hash](https://en.wikipedia.org/wiki/SHA-2) of the file's data. This can be compared to a hash taken from the original file to determine whether any changes have been made.
|
||||||
49
docs/models/core/datasource.md
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
# Data Sources
|
||||||
|
|
||||||
|
A data source represents some external repository of data which NetBox can consume, such as a git repository. Files within the data source are synchronized to NetBox by saving them in the database as [data file](./datafile.md) objects.
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
### Name
|
||||||
|
|
||||||
|
The data source's human-friendly name.
|
||||||
|
|
||||||
|
### Type
|
||||||
|
|
||||||
|
The type of data source. Supported options include:
|
||||||
|
|
||||||
|
* Local directory
|
||||||
|
* git repository
|
||||||
|
* Amazon S3 bucket
|
||||||
|
|
||||||
|
### URL
|
||||||
|
|
||||||
|
The URL identifying the remote source. Some examples are included below.
|
||||||
|
|
||||||
|
| Type | Example URL |
|
||||||
|
|-----------|----------------------------------------------------|
|
||||||
|
| Local | file:///path/to/my/data/ |
|
||||||
|
| git | https://github.com/my-organization/my-repo |
|
||||||
|
| Amazon S3 | https://s3.us-east-2.amazonaws.com/my-bucket-name/ |
|
||||||
|
|
||||||
|
### Status
|
||||||
|
|
||||||
|
The source's current synchronization status. Note that this cannot be set manually: It is updated automatically when the source is synchronized.
|
||||||
|
|
||||||
|
### Enabled
|
||||||
|
|
||||||
|
If false, synchronization will be disabled.
|
||||||
|
|
||||||
|
### Ignore Rules
|
||||||
|
|
||||||
|
A set of rules (one per line) identifying filenames to ignore during synchronization. Some examples are provided below. See Python's [`fnmatch()` documentation](https://docs.python.org/3/library/fnmatch.html) for a complete reference.
|
||||||
|
|
||||||
|
| Rule | Description |
|
||||||
|
|----------------|------------------------------------------|
|
||||||
|
| `README` | Ignore any files named `README` |
|
||||||
|
| `*.txt` | Ignore any files with a `.txt` extension |
|
||||||
|
| `data???.json` | Ignore e.g. `data123.json` |
|
||||||
|
|
||||||
|
### Last Synced
|
||||||
|
|
||||||
|
The date and time at which the source was most recently synchronized successfully.
|
||||||
54
docs/models/core/job.md
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
# Jobs
|
||||||
|
|
||||||
|
The Job model is used to schedule and record the execution of [background tasks](../../features/background-jobs.md).
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
### Name
|
||||||
|
|
||||||
|
The name or other identifier of the NetBox object with which the job is associated.
|
||||||
|
|
||||||
|
## Object Type
|
||||||
|
|
||||||
|
The type of object (model) associated with this job.
|
||||||
|
|
||||||
|
### Created
|
||||||
|
|
||||||
|
The date and time at which the job itself was created.
|
||||||
|
|
||||||
|
### Scheduled
|
||||||
|
|
||||||
|
The date and time at which the job is/was scheduled to execute (if not submitted for immediate execution at the time of creation).
|
||||||
|
|
||||||
|
### Interval
|
||||||
|
|
||||||
|
The interval (in minutes) at which a scheduled job should re-execute.
|
||||||
|
|
||||||
|
### Completed
|
||||||
|
|
||||||
|
The date and time at which the job completed (if complete).
|
||||||
|
|
||||||
|
### User
|
||||||
|
|
||||||
|
The user who created the job.
|
||||||
|
|
||||||
|
### Status
|
||||||
|
|
||||||
|
The job's current status. Potential values include:
|
||||||
|
|
||||||
|
| Value | Description |
|
||||||
|
|-------|-------------|
|
||||||
|
| Pending | Awaiting execution by an RQ worker process |
|
||||||
|
| Scheduled | Scheduled for a future date/time |
|
||||||
|
| Running | Currently executing |
|
||||||
|
| Completed | Successfully completed |
|
||||||
|
| Failed | The job did not complete successfully |
|
||||||
|
| Errored | An unexpected error was encountered during execution |
|
||||||
|
|
||||||
|
### Data
|
||||||
|
|
||||||
|
Any data associated with the execution of the job, such as log output.
|
||||||
|
|
||||||
|
### Job ID
|
||||||
|
|
||||||
|
The job's UUID, used for unique identification within a queue.
|
||||||
@@ -61,6 +61,10 @@ If installed in a rack, this field indicates the base rack unit in which the dev
|
|||||||
!!! tip
|
!!! tip
|
||||||
Devices with a height of more than one rack unit should be set to the lowest-numbered rack unit that they occupy.
|
Devices with a height of more than one rack unit should be set to the lowest-numbered rack unit that they occupy.
|
||||||
|
|
||||||
|
### Latitude & Longitude
|
||||||
|
|
||||||
|
GPS coordinates of the device for geolocation.
|
||||||
|
|
||||||
### Status
|
### Status
|
||||||
|
|
||||||
The device's operational status.
|
The device's operational status.
|
||||||
@@ -72,6 +76,10 @@ The device's operational status.
|
|||||||
|
|
||||||
A device may be associated with a particular [platform](./platform.md) to indicate its operating system. Note that only platforms assigned to the associated manufacturer (or to no manufacturer) will be available for selection.
|
A device may be associated with a particular [platform](./platform.md) to indicate its operating system. Note that only platforms assigned to the associated manufacturer (or to no manufacturer) will be available for selection.
|
||||||
|
|
||||||
|
### Configuration Template
|
||||||
|
|
||||||
|
The [configuration template](../extras/configtemplate.md) from which the configuration for this device can be rendered. If set, this will override any config template referenced by the device's role or platform.
|
||||||
|
|
||||||
### Primary IPv4 & IPv6 Addresses
|
### Primary IPv4 & IPv6 Addresses
|
||||||
|
|
||||||
Each device may designate one primary IPv4 address and/or one primary IPv6 address for management purposes.
|
Each device may designate one primary IPv4 address and/or one primary IPv6 address for management purposes.
|
||||||
@@ -79,6 +87,10 @@ Each device may designate one primary IPv4 address and/or one primary IPv6 addre
|
|||||||
!!! tip
|
!!! tip
|
||||||
NetBox will prefer IPv6 addresses over IPv4 addresses by default. This can be changed by setting the `PREFER_IPV4` configuration parameter.
|
NetBox will prefer IPv6 addresses over IPv4 addresses by default. This can be changed by setting the `PREFER_IPV4` configuration parameter.
|
||||||
|
|
||||||
|
### Out-of-band (OOB) IP Address
|
||||||
|
|
||||||
|
Each device may designate its out-of-band IP address. Out-of-band IPs are typically used to access network infrastructure via a physically separate management network.
|
||||||
|
|
||||||
### Cluster
|
### Cluster
|
||||||
|
|
||||||
If this device will serve as a host for a virtualization [cluster](../virtualization/cluster.md), it can be assigned here. (Host devices can also be assigned by editing the cluster.)
|
If this device will serve as a host for a virtualization [cluster](../virtualization/cluster.md), it can be assigned here. (Host devices can also be assigned by editing the cluster.)
|
||||||
|
|||||||
@@ -19,3 +19,7 @@ The color used when displaying the role in the NetBox UI.
|
|||||||
### VM Role
|
### VM Role
|
||||||
|
|
||||||
If selected, this role may be assigned to [virtual machines](../virtualization/virtualmachine.md)
|
If selected, this role may be assigned to [virtual machines](../virtualization/virtualmachine.md)
|
||||||
|
|
||||||
|
### Configuration Template
|
||||||
|
|
||||||
|
The default [configuration template](../extras/configtemplate.md) for devices assigned to this role.
|
||||||
|
|||||||
@@ -21,6 +21,10 @@ The model number assigned to this device type by its manufacturer. Must be uniqu
|
|||||||
|
|
||||||
A unique URL-friendly representation of the model identifier. (This value can be used for filtering.)
|
A unique URL-friendly representation of the model identifier. (This value can be used for filtering.)
|
||||||
|
|
||||||
|
### Default Platform
|
||||||
|
|
||||||
|
If defined, devices instantiated from this type will automatically inherit the selected platform. (This assignment can be changed after the device has been created.)
|
||||||
|
|
||||||
### Part Number
|
### Part Number
|
||||||
|
|
||||||
An alternative part number to uniquely identify the device type.
|
An alternative part number to uniquely identify the device type.
|
||||||
|
|||||||
@@ -77,6 +77,9 @@ If selected, this component will be treated as if a cable has been connected.
|
|||||||
|
|
||||||
Virtual interfaces can be bound to a physical parent interface. This is helpful for modeling virtual interfaces which employ encapsulation on a physical interface, such as an 802.1Q VLAN-tagged subinterface.
|
Virtual interfaces can be bound to a physical parent interface. This is helpful for modeling virtual interfaces which employ encapsulation on a physical interface, such as an 802.1Q VLAN-tagged subinterface.
|
||||||
|
|
||||||
|
!!! note
|
||||||
|
An interface with one or more child interfaces assigned cannot be deleted until all its child interfaces have been deleted or reassigned.
|
||||||
|
|
||||||
### Bridged Interface
|
### Bridged Interface
|
||||||
|
|
||||||
Interfaces can be bridged to other interfaces on a device in two manners: symmetric or grouped.
|
Interfaces can be bridged to other interfaces on a device in two manners: symmetric or grouped.
|
||||||
|
|||||||