mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-07 04:27:27 -06:00
Compare commits
989 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9dab3a0d79 | ||
|
|
54622b5f92 | ||
|
|
cdce500d90 | ||
|
|
e11991c7a4 | ||
|
|
6ef333ea68 | ||
|
|
7fc69f3945 | ||
|
|
8aeb31751a | ||
|
|
0b2162569f | ||
|
|
93175888f0 | ||
|
|
4d686e8162 | ||
|
|
0e873a01b8 | ||
|
|
f7b0e48a09 | ||
|
|
c5f71c0c19 | ||
|
|
36e0bf0490 | ||
|
|
28b939c001 | ||
|
|
55e31ef984 | ||
|
|
85e351146d | ||
|
|
d03bfe89c0 | ||
|
|
c8cbced55e | ||
|
|
928a34674e | ||
|
|
96cf95d176 | ||
|
|
2e9586523f | ||
|
|
a81924ac0f | ||
|
|
74c1f7a176 | ||
|
|
22a0ce3f76 | ||
|
|
43235f143d | ||
|
|
e7851399c6 | ||
|
|
82cd6c5f4c | ||
|
|
210879d380 | ||
|
|
01d9e0afb6 | ||
|
|
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 | ||
|
|
d5be59ef67 | ||
|
|
0ad88e2431 | ||
|
|
c65b2a080f | ||
|
|
0f44f7eb20 | ||
|
|
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 | ||
|
|
65417dbf9e | ||
|
|
37d0135cab | ||
|
|
699edd049c | ||
|
|
95b2acb603 | ||
|
|
98a2f3e497 | ||
|
|
fb2771370c | ||
|
|
a137cd6cbe | ||
|
|
10e27cfa00 | ||
|
|
46ede62f3f | ||
|
|
e7ad6eeb74 | ||
|
|
892fd95b5f | ||
|
|
0da518e83d | ||
|
|
fbc9fea0a5 | ||
|
|
ccc108a217 | ||
|
|
22a9df82e6 | ||
|
|
9cb75e9834 | ||
|
|
55b1549895 | ||
|
|
6f74c5ec03 | ||
|
|
b8de9c0875 | ||
|
|
d5ccda355f | ||
|
|
b79a2976f7 | ||
|
|
39087d10eb | ||
|
|
6a793087b4 | ||
|
|
0f9a303963 | ||
|
|
eca624b13d | ||
|
|
a4d8169df8 | ||
|
|
5f7e310305 | ||
|
|
d5e6829eff | ||
|
|
504800a7db | ||
|
|
97723b1f96 | ||
|
|
5911041777 | ||
|
|
fcd0481b09 | ||
|
|
cc350165dd | ||
|
|
db7e1b8a97 | ||
|
|
188f773081 | ||
|
|
6271f81cff | ||
|
|
4bfc3bf412 | ||
|
|
d5a92104d1 | ||
|
|
ddd4f805a5 | ||
|
|
a1c1b19482 | ||
|
|
426bc15065 | ||
|
|
df5febf6e7 | ||
|
|
9e09e46700 | ||
|
|
ba0e9bb1d2 | ||
|
|
19da92b510 | ||
|
|
beb1f4e172 | ||
|
|
fb3d1ef399 | ||
|
|
d7c37d9dd6 | ||
|
|
24de404fbc | ||
|
|
8565d175f9 | ||
|
|
8d9e151030 | ||
|
|
758c5347fb | ||
|
|
1e54eee631 | ||
|
|
448760a2fe | ||
|
|
e44b22f7d1 | ||
|
|
30379c3f52 | ||
|
|
8729d60c1c | ||
|
|
effcdb8723 | ||
|
|
1354947434 | ||
|
|
864ce0088e | ||
|
|
93ac0b77c9 | ||
|
|
ea327e6b37 | ||
|
|
f7b85ab941 | ||
|
|
ce9933da85 | ||
|
|
0662f0dab4 | ||
|
|
0669fda1fd | ||
|
|
b88fcb6625 | ||
|
|
69be24cd5f | ||
|
|
35273cc87f | ||
|
|
5af73e9bf7 | ||
|
|
128ccb4330 | ||
|
|
07df622b59 | ||
|
|
5d22260589 | ||
|
|
39985ebdd1 | ||
|
|
92ec06c694 | ||
|
|
04137e887e | ||
|
|
e940f00c01 | ||
|
|
1c72a80d9a | ||
|
|
b9f8370097 | ||
|
|
1c636ea127 | ||
|
|
e1169e7ea6 | ||
|
|
5975dbcb07 | ||
|
|
08a419ec7a | ||
|
|
d417168805 | ||
|
|
ccb2966c4c | ||
|
|
b7cdbd3d41 | ||
|
|
ae440c9edf | ||
|
|
b6cd099117 | ||
|
|
98f57f2dba | ||
|
|
735fa4aa31 | ||
|
|
c7108bb3f7 | ||
|
|
98b3fc03b8 | ||
|
|
92da2fe082 | ||
|
|
bfab3a26bc | ||
|
|
b35b33e798 | ||
|
|
db5c2a379e | ||
|
|
3675ad2539 | ||
|
|
27c71b8ec0 | ||
|
|
0058c7749c | ||
|
|
f882dcabf7 | ||
|
|
c8f4a7c742 | ||
|
|
ed366c5ab2 | ||
|
|
2738da2d39 | ||
|
|
9f15ca2d90 | ||
|
|
e4f5407c70 | ||
|
|
951f82b428 | ||
|
|
f8685ad7aa | ||
|
|
c59d527664 | ||
|
|
77423e7bb1 | ||
|
|
ba12675267 | ||
|
|
def3ccfaee | ||
|
|
bbc68f9484 | ||
|
|
93685d92a4 | ||
|
|
b2bf613895 | ||
|
|
80ced6b782 | ||
|
|
47dfb89c52 | ||
|
|
064e3ff605 | ||
|
|
fb27803ab0 | ||
|
|
5e32b39f25 | ||
|
|
b9888d6f86 | ||
|
|
96a796ebde | ||
|
|
996e73d5d8 | ||
|
|
5c969a8caf | ||
|
|
68faab8196 | ||
|
|
b3693099dc | ||
|
|
9bb9ac3dec | ||
|
|
a57378e780 | ||
|
|
41f631b65b | ||
|
|
2db668f5cc | ||
|
|
aacf606999 | ||
|
|
e338f7cfe3 | ||
|
|
758030733c | ||
|
|
ad78f9e075 | ||
|
|
3468e8c8ae | ||
|
|
13d39a28ce | ||
|
|
8809fc949b | ||
|
|
860805ba82 | ||
|
|
1e0b024609 | ||
|
|
8486d47d17 | ||
|
|
407365888a | ||
|
|
2ad1db0c64 | ||
|
|
83a0576ca4 | ||
|
|
0b100b8fc8 | ||
|
|
2b12138c41 | ||
|
|
97aa40f7a8 | ||
|
|
b2f34cec19 | ||
|
|
3bc9586b0c | ||
|
|
4297c65f87 | ||
|
|
62b0f034e7 | ||
|
|
6ffd8aa320 | ||
|
|
d53ddd611b | ||
|
|
080a001118 | ||
|
|
5a77791f9d | ||
|
|
ab9c253310 | ||
|
|
35596ddcbc | ||
|
|
0cacac82ee | ||
|
|
780997a568 | ||
|
|
d2d60c0607 | ||
|
|
d4d8d00d01 | ||
|
|
cb52d9c84e | ||
|
|
db61e57893 | ||
|
|
52cf9086a5 | ||
|
|
db7590df1a | ||
|
|
ee03f3d584 | ||
|
|
2577f3a786 | ||
|
|
826a1714c3 | ||
|
|
d0e0c2ff8b | ||
|
|
fb407e9076 | ||
|
|
85c60670dc | ||
|
|
f2f36c67f6 | ||
|
|
281934cf34 | ||
|
|
00d72f18cf | ||
|
|
b36afdc924 | ||
|
|
4ed45e4031 | ||
|
|
cf0258204f | ||
|
|
3bd560add8 | ||
|
|
9e51a8d9d2 | ||
|
|
f59c6699f6 | ||
|
|
39732fa861 | ||
|
|
80f5eeacdd | ||
|
|
f56e3eb784 | ||
|
|
c3dcd8937f | ||
|
|
b1da374df2 | ||
|
|
dc1da0a738 | ||
|
|
1946e8f053 | ||
|
|
4623858849 | ||
|
|
9c5891f1b6 | ||
|
|
d5538c1ca3 | ||
|
|
90f15b8d55 | ||
|
|
4e27e8d3dd | ||
|
|
150cb772fe | ||
|
|
e494d7bb22 | ||
|
|
9774bb46ce | ||
|
|
84c0c45da9 | ||
|
|
46e3883f19 | ||
|
|
3a89a676cd | ||
|
|
0885333b11 | ||
|
|
c287641363 | ||
|
|
de9646d096 | ||
|
|
dd2520d675 | ||
|
|
3a5914827b | ||
|
|
cf55e96241 | ||
|
|
bd29d15814 | ||
|
|
d3911e2a4c | ||
|
|
eb591731ef | ||
|
|
ae11419045 | ||
|
|
43bbd42d3c | ||
|
|
d4a231585a | ||
|
|
977b79ecee | ||
|
|
5202d0add9 | ||
|
|
ebf555e1fb | ||
|
|
f411c4f439 | ||
|
|
216d8d24b8 | ||
|
|
cb2b256934 | ||
|
|
2f96fdd135 | ||
|
|
e40e2550a6 | ||
|
|
bfda5d9011 | ||
|
|
62a80c46a8 | ||
|
|
ceec1055e0 | ||
|
|
540bba4544 | ||
|
|
44c248e6c2 | ||
|
|
3a62fd49e6 | ||
|
|
a2007a4728 | ||
|
|
316c3808f7 | ||
|
|
928d880f0e | ||
|
|
c6930e3ea8 | ||
|
|
db77e9428f | ||
|
|
80f5c96af3 | ||
|
|
de1b346da0 | ||
|
|
96818cacf0 | ||
|
|
0c0c848597 | ||
|
|
23077821f6 | ||
|
|
87fd09ca8b | ||
|
|
0bcc59a1e9 | ||
|
|
87727c71f7 | ||
|
|
23c0ca456f | ||
|
|
d9d25ff4e7 | ||
|
|
6f8a7fdbe3 | ||
|
|
640fd8045d | ||
|
|
4230162294 | ||
|
|
355678274d | ||
|
|
ecf5304a14 | ||
|
|
94dd07e1e6 | ||
|
|
1b707e07f2 | ||
|
|
564884a774 | ||
|
|
7401fd7050 | ||
|
|
42e9dc0da7 | ||
|
|
a5308ea28e | ||
|
|
27bf7b4a9a | ||
|
|
a57c937aaa | ||
|
|
4a95cfd1c4 | ||
|
|
cd8943144b | ||
|
|
8400509358 | ||
|
|
d971131198 | ||
|
|
5729a06348 | ||
|
|
6eba5d4d96 | ||
|
|
2cc2d2cc37 | ||
|
|
b374351154 | ||
|
|
d59d23e308 | ||
|
|
3d1501e8fd | ||
|
|
c854c29016 | ||
|
|
33d8f8e5e7 | ||
|
|
653acbf62c | ||
|
|
93e7457e0d | ||
|
|
93e241e8f3 | ||
|
|
43da786016 | ||
|
|
ea6d86e6c4 | ||
|
|
fe73e90b7b | ||
|
|
f68c7fb188 | ||
|
|
ad40d42dc4 | ||
|
|
cdeb65e2fb | ||
|
|
271d524687 | ||
|
|
bc6b5bc4be | ||
|
|
e2f5ee661a | ||
|
|
6b2deaeced | ||
|
|
13afc52617 | ||
|
|
e7f54c5867 | ||
|
|
4ebcdd2b8f | ||
|
|
07730ccd33 | ||
|
|
0ad7ae2837 | ||
|
|
8fb91a1f8c | ||
|
|
3b0a84969b | ||
|
|
81c0dce5a3 | ||
|
|
816fedb78d | ||
|
|
484efdaf75 | ||
|
|
ea61a540cd | ||
|
|
0b24d3d892 | ||
|
|
2af8891f70 | ||
|
|
4e39021b6f | ||
|
|
2cd5fce62d | ||
|
|
ade307bc03 | ||
|
|
c8be4ef8e2 | ||
|
|
816214361d | ||
|
|
d1970ca85b | ||
|
|
8001694a4c | ||
|
|
10e258739f | ||
|
|
f3fdf03661 | ||
|
|
44814f759c | ||
|
|
4f5caa5ed2 | ||
|
|
aa7f04bf1b | ||
|
|
aaf1ea52b7 | ||
|
|
7990cfb078 | ||
|
|
675a5f8687 | ||
|
|
a25ee66150 | ||
|
|
13c27b00d3 | ||
|
|
867af61875 | ||
|
|
8f4fa065f9 | ||
|
|
7b5f5ca6bb | ||
|
|
a176e9452f | ||
|
|
cb815ede60 | ||
|
|
d773f4e62a | ||
|
|
dbe66596f9 | ||
|
|
ec4e2a8e16 | ||
|
|
7e7f68923d | ||
|
|
edb5220228 | ||
|
|
ac373d2376 | ||
|
|
16919cc1d9 | ||
|
|
7a155407f6 | ||
|
|
9e8234bb45 | ||
|
|
c4dcd34ce9 | ||
|
|
18332bdbf1 | ||
|
|
f1a7bceef2 | ||
|
|
eac2ace80b | ||
|
|
174ba6cf0f | ||
|
|
658c9347f3 | ||
|
|
7b3ef2ade5 | ||
|
|
2a62b628cf | ||
|
|
d8c07abd68 | ||
|
|
8d486c5838 | ||
|
|
eb91934d70 | ||
|
|
01654765e8 | ||
|
|
91c6bbcd78 | ||
|
|
b2e2e3be35 | ||
|
|
9628dead07 | ||
|
|
4c504870e0 | ||
|
|
3d687a6c2d | ||
|
|
5d56d95fda | ||
|
|
5e5228ff12 | ||
|
|
72ba57052a | ||
|
|
ed2f7f1236 | ||
|
|
893925436d | ||
|
|
96c4696417 | ||
|
|
e7659a5f99 | ||
|
|
53c9c3cf8d | ||
|
|
f60312febf | ||
|
|
bd79a27e4d | ||
|
|
7505baf3a1 | ||
|
|
4f95c5a72c | ||
|
|
85a4b1f881 | ||
|
|
33c6142365 | ||
|
|
10e874039f | ||
|
|
060ee2dd96 | ||
|
|
43d1182b4b | ||
|
|
d53da57f63 | ||
|
|
028b4b7ea7 | ||
|
|
4cb0230878 | ||
|
|
2fe8df3cbb | ||
|
|
64d67e3b00 | ||
|
|
83ff99a130 | ||
|
|
52faeb6f60 | ||
|
|
f797b5ed97 | ||
|
|
e143038df8 | ||
|
|
074082d1f1 | ||
|
|
d647983003 | ||
|
|
1d9808a92a | ||
|
|
a44eed5001 | ||
|
|
f2407afc9f | ||
|
|
99cf1b1671 | ||
|
|
aaf829898b | ||
|
|
8481cf66e3 | ||
|
|
bb150379a2 | ||
|
|
cc811e5a56 | ||
|
|
e8c5a4724a | ||
|
|
9ca4c7315b | ||
|
|
ffce5d968d | ||
|
|
656f0b7d82 | ||
|
|
ef0b455b05 | ||
|
|
679a9e839b | ||
|
|
53c8a48244 | ||
|
|
3f37914b3c | ||
|
|
b0ba9bd83d | ||
|
|
a3dbf4023c | ||
|
|
053c97b7a8 | ||
|
|
1fc8de85a3 | ||
|
|
5e1a0733e4 | ||
|
|
bfe26b46a6 | ||
|
|
4c999daacd | ||
|
|
663652f45e | ||
|
|
10bb8fa10a | ||
|
|
a0bae06ff7 | ||
|
|
0d7851ed9d | ||
|
|
664d5db5eb | ||
|
|
a1cc15a604 | ||
|
|
24ba840be7 | ||
|
|
a9e583a693 | ||
|
|
3a3ff474cb | ||
|
|
cc00789d35 | ||
|
|
689f11a573 | ||
|
|
c481a1b6a2 | ||
|
|
ae90ad1fb7 | ||
|
|
5e37f82b2f | ||
|
|
eabd405845 | ||
|
|
81d99a0061 | ||
|
|
b227757b9a | ||
|
|
568e0c7ff6 | ||
|
|
a454a3f74e | ||
|
|
f7860138c7 | ||
|
|
0607295081 | ||
|
|
d4a7af8a89 | ||
|
|
5c1417c4c7 | ||
|
|
dc522a0135 | ||
|
|
ac7db3cc88 | ||
|
|
5cc55d1e99 | ||
|
|
10352ff5ad | ||
|
|
97d561ac33 | ||
|
|
204c10c053 | ||
|
|
af8bb0c4b9 | ||
|
|
ada5c58acf | ||
|
|
d486fa8452 | ||
|
|
c95ad5b208 | ||
|
|
5382ac20b6 | ||
|
|
3fbd514417 | ||
|
|
d0465242a3 | ||
|
|
db90b084cf | ||
|
|
00d2dcda68 | ||
|
|
20e3fdc782 | ||
|
|
ad6a7086c4 | ||
|
|
e977333177 | ||
|
|
1d4f828b93 | ||
|
|
c349e06346 | ||
|
|
7ff2cb75a8 | ||
|
|
f51415cf2c | ||
|
|
ec6457bcd3 | ||
|
|
6016e1b15d | ||
|
|
d08d5620da | ||
|
|
7deb9fde9e | ||
|
|
b134d2a7b0 | ||
|
|
36f31228ff | ||
|
|
8103ad3b9e | ||
|
|
10cb3c2c3d | ||
|
|
5ce805db2e | ||
|
|
3eeb31d577 | ||
|
|
e11d594122 | ||
|
|
600c437af5 | ||
|
|
0280ddcbe9 | ||
|
|
5a018afbc4 | ||
|
|
06dea8ef3f | ||
|
|
cbb3378d10 | ||
|
|
e074570b8f | ||
|
|
a5421ae170 | ||
|
|
5d07f2c837 | ||
|
|
e95708fe08 | ||
|
|
c8671ce8e8 | ||
|
|
ed3d04c7ba | ||
|
|
25ac1edb48 | ||
|
|
824b4e0923 | ||
|
|
1eb0e5d307 | ||
|
|
4208dbd514 | ||
|
|
6a9274a95f | ||
|
|
87af94a7d2 | ||
|
|
cd5581aada | ||
|
|
ce6bf9e5c1 | ||
|
|
27d72746ca |
3
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
3
.github/ISSUE_TEMPLATE/bug_report.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.3.5
|
placeholder: v3.5.4
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: dropdown
|
- type: dropdown
|
||||||
@@ -25,6 +25,7 @@ body:
|
|||||||
- "3.8"
|
- "3.8"
|
||||||
- "3.9"
|
- "3.9"
|
||||||
- "3.10"
|
- "3.10"
|
||||||
|
- "3.11"
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
|
|||||||
11
.github/ISSUE_TEMPLATE/config.yml
vendored
11
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -3,10 +3,13 @@ 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: 💡 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
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
|
||||||
14
.github/ISSUE_TEMPLATE/documentation_change.yaml
vendored
14
.github/ISSUE_TEMPLATE/documentation_change.yaml
vendored
@@ -19,11 +19,15 @@ body:
|
|||||||
label: Area
|
label: Area
|
||||||
description: To what section of the documentation does this change primarily pertain?
|
description: To what section of the documentation does this change primarily pertain?
|
||||||
options:
|
options:
|
||||||
- Installation instructions
|
- Features
|
||||||
- Configuration parameters
|
- Installation/upgrade
|
||||||
- Functionality/features
|
- Getting started
|
||||||
- REST API
|
- Configuration
|
||||||
- Administration/development
|
- Customization
|
||||||
|
- Integrations/API
|
||||||
|
- Plugins
|
||||||
|
- Administration
|
||||||
|
- Development
|
||||||
- Other
|
- Other
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|||||||
2
.github/ISSUE_TEMPLATE/feature_request.yaml
vendored
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.3.5
|
placeholder: v3.5.4
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: dropdown
|
- type: dropdown
|
||||||
|
|||||||
9
.github/PULL_REQUEST_TEMPLATE.md
vendored
9
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1,13 +1,14 @@
|
|||||||
<!--
|
<!--
|
||||||
Thank you for your interest in contributing to NetBox! Please note that
|
Thank you for your interest in contributing to NetBox! Please note that
|
||||||
our contribution policy requires that a feature request or bug report be
|
our contribution policy requires that a feature request or bug report be
|
||||||
approved and assigned prior to filing a pull request. This helps avoid
|
approved and assigned prior to opening a pull request. This helps avoid
|
||||||
wasting time and effort on something that we might not be able to accept.
|
waste time and effort on a proposed change that we might not be able to
|
||||||
|
accept.
|
||||||
|
|
||||||
IF YOUR PULL REQUEST DOES NOT REFERENCE AN ISSUE WHICH HAS BEEN ASSIGNED
|
IF YOUR PULL REQUEST DOES NOT REFERENCE AN ISSUE WHICH HAS BEEN ASSIGNED
|
||||||
TO YOU, IT WE BE CLOSED AUTOMATICALLY.
|
TO YOU, IT WILL BE CLOSED AUTOMATICALLY.
|
||||||
|
|
||||||
Specify your assigned issue number on the line below.
|
Please specify your assigned issue number on the line below.
|
||||||
-->
|
-->
|
||||||
### Fixes: #1234
|
### Fixes: #1234
|
||||||
|
|
||||||
|
|||||||
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -9,7 +9,7 @@ jobs:
|
|||||||
NETBOX_CONFIGURATION: netbox.configuration_testing
|
NETBOX_CONFIGURATION: netbox.configuration_testing
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: ['3.8', '3.9', '3.10']
|
python-version: ['3.8', '3.9', '3.10', '3.11']
|
||||||
node-version: ['14.x']
|
node-version: ['14.x']
|
||||||
services:
|
services:
|
||||||
redis:
|
redis:
|
||||||
|
|||||||
2
.github/workflows/stale.yml
vendored
2
.github/workflows/stale.yml
vendored
@@ -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
|
||||||
|
|||||||
227
CONTRIBUTING.md
227
CONTRIBUTING.md
@@ -1,188 +1,115 @@
|
|||||||
## Getting Help
|
**Looking for help?** NetBox has a vast, active community of fellow users that may be able to provide assistance. Just [start a discussion](https://github.com/netbox-community/netbox/discussions/new) right here on GitHub! Or if you'd prefer to chat, join us live in the `#netbox` channel on the [NetDev Community Slack](https://netdev.chat/)!
|
||||||
|
|
||||||
If you encounter any issues installing or using NetBox, try one of the
|
<div align="center">
|
||||||
following resources to get assistance. Please **do not** open a GitHub issue
|
<h3>
|
||||||
except to report bugs or request features.
|
:bug: <a href="#bug-reporting-bugs">Report a bug</a> ·
|
||||||
|
:bulb: <a href="#bulb-feature-requests">Suggest a feature</a> ·
|
||||||
|
:arrow_heading_up: <a href="#arrow_heading_up-submitting-pull-requests">Submit a pull request</a>
|
||||||
|
</h3>
|
||||||
|
<h3>
|
||||||
|
:jigsaw: <a href="#jigsaw-creating-plugins">Create a plugin</a> ·
|
||||||
|
:rescue_worker_helmet: <a href="#rescue_worker_helmet-become-a-maintainer">Become a maintainer</a> ·
|
||||||
|
:heart: <a href="#heart-other-ways-to-contribute">Other ideas</a>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
<h3></h3>
|
||||||
|
|
||||||
### GitHub Discussions
|
Some general tips for engaging here on GitHub:
|
||||||
|
|
||||||
GitHub's discussions are the best place to get help or propose rough ideas for
|
* Register for a free [GitHub account](https://github.com/signup) if you haven't already.
|
||||||
new functionality. Their integration with GitHub allows for easily cross-
|
* 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.
|
||||||
referencing and converting posts to issues as needed. There are several
|
* 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.)
|
||||||
categories for discussions:
|
* Please avoid pinging members with `@` unless they've previously expressed interest or involvement with that particular issue.
|
||||||
|
|
||||||
* **General** - General community discussion
|
## :bug: Reporting Bugs
|
||||||
* **Ideas** - Ideas for new functionality that isn't yet ready for a formal
|
|
||||||
feature request
|
|
||||||
* **Q&A** - Request help with installing or using NetBox
|
|
||||||
|
|
||||||
### Slack
|
* 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.
|
||||||
|
|
||||||
For real-time chat, you can join the **#netbox** Slack channel on [NetDev Community](https://netdev.chat/).
|
* 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.
|
||||||
Unfortunately, the Slack channel does not provide long-term retention of chat
|
|
||||||
history, so try to avoid it for any discussions would benefit from being
|
|
||||||
preserved for future reference.
|
|
||||||
|
|
||||||
## Reporting Bugs
|
* If you can't find any existing issues (open or closed) that seem to match yours, you're welcome to [submit a new bug report](https://github.com/netbox-community/netbox/issues/new?label=type%3A+bug&template=bug_report.yaml). Be sure to complete the entire report template, including detailed steps that someone triaging your issue can follow to confirm the reported behavior. (If we're not able to replicate the bug based on the information provided, we'll ask for additional detail.)
|
||||||
|
|
||||||
* First, ensure that you're running the [latest stable version](https://github.com/netbox-community/netbox/releases)
|
* Some other tips to keep in mind:
|
||||||
of NetBox. If you're running an older version, it's possible that the bug has
|
* Error messages and screenshots are especially helpful.
|
||||||
already been fixed.
|
* Don't prepend your issue title with a label like `[Bug]`; the proper label will be assigned automatically.
|
||||||
|
* Ensure that your reproduction instructions don't reference data in our [demo instance](https://demo.netbox.dev/), which gets rebuilt nightly.
|
||||||
* Next, check the GitHub [issues list](https://github.com/netbox-community/netbox/issues)
|
* Verify that you have GitHub notifications enabled and are subscribed to your issue after submitting.
|
||||||
to see if the bug you've found has already been reported. If you think you may
|
* We appreciate your patience as bugs are prioritized by their severity, impact, and difficulty to resolve.
|
||||||
be experiencing a reported issue that hasn't already been resolved, please
|
|
||||||
click "add a reaction" in the top right corner of the issue and add a thumbs
|
|
||||||
up (+1). You might also want to add a comment describing how it's affecting your
|
|
||||||
installation. This will allow us to prioritize bugs based on how many users are
|
|
||||||
affected.
|
|
||||||
|
|
||||||
* When submitting an issue, please be as descriptive as possible. Be sure to
|
|
||||||
provide all information request in the issue template, including:
|
|
||||||
|
|
||||||
* The environment in which NetBox is running
|
|
||||||
* The exact steps that can be taken to reproduce the issue
|
|
||||||
* Expected and observed behavior
|
|
||||||
* Any error messages generated
|
|
||||||
* Screenshots (if applicable)
|
|
||||||
|
|
||||||
* Please avoid prepending any sort of tag (e.g. "[Bug]") to the issue title.
|
|
||||||
The issue will be reviewed by a maintainer after submission and the appropriate
|
|
||||||
labels will be applied for categorization.
|
|
||||||
|
|
||||||
* Keep in mind that we prioritize bugs based on their severity and how much
|
|
||||||
work is required to resolve them. It may take some time for someone to address
|
|
||||||
your issue.
|
|
||||||
|
|
||||||
* For more information on how bug reports are handled, please see our [issue
|
* For more information on how bug reports are handled, please see our [issue
|
||||||
intake policy](https://github.com/netbox-community/netbox/wiki/Issue-Intake-Policy).
|
intake policy](https://github.com/netbox-community/netbox/wiki/Issue-Intake-Policy).
|
||||||
|
|
||||||
## Feature Requests
|
## :bulb: Feature Requests
|
||||||
|
|
||||||
* First, check the GitHub [issues list](https://github.com/netbox-community/netbox/issues)
|
* First, check the GitHub [issues list](https://github.com/netbox-community/netbox/issues?q=is%3Aissue) to see if the feature you have in mind has already been proposed. If you happen to find an open feature request that matches your idea, click "add a reaction" in the top right corner of the issue and add a thumbs up (:thumbsup:). This ensures that the issue has a better chance of receiving attention. Also feel free to add a comment with any additional justification for the feature.
|
||||||
to see if the feature you're requesting is already listed. (Be sure to search
|
|
||||||
closed issues as well, since some feature requests have been rejected.) If the
|
|
||||||
feature you'd like to see has already been requested and is open, click "add a
|
|
||||||
reaction" in the top right corner of the issue and add a thumbs up (+1). This
|
|
||||||
ensures that the issue has a better chance of receiving attention. Also feel
|
|
||||||
free to add a comment with any additional justification for the feature.
|
|
||||||
(However, note that comments with no substance other than a "+1" will be
|
|
||||||
deleted. Please use GitHub's reactions feature to indicate your support.)
|
|
||||||
|
|
||||||
* Before filing a new feature request, consider raising your idea in a
|
* If you have a rough idea that's not quite ready for formal submission yet, start a [GitHub discussion](https://github.com/netbox-community/netbox/discussions) instead. This is a great way to test the viability and narrow down the scope of a new feature prior to submitting a formal proposal, and can serve to generate interest in your idea from other community members.
|
||||||
[GitHub discussion](https://github.com/netbox-community/netbox/discussions)
|
|
||||||
first. Feedback you receive there will help validate and shape the proposed
|
|
||||||
feature before filing a formal issue.
|
|
||||||
|
|
||||||
* Good feature requests are very narrowly defined. Be sure to thoroughly
|
* Once you're ready, submit a feature request [using this template](https://github.com/netbox-community/netbox/issues/new?label=type%3A+feature&template=feature_request.yaml). Be sure to provide sufficient context and detail to convey exactly what you're proposing and why. The stronger your use case, the better chance your proposal has of being accepted.
|
||||||
describe the functionality and data model(s) being proposed. The more effort
|
|
||||||
you put into writing a feature request, the better its chance is of being
|
|
||||||
implemented. Overly broad feature requests will be closed.
|
|
||||||
|
|
||||||
* When submitting a feature request on GitHub, be sure to include all
|
* Some other tips to keep in mind:
|
||||||
information requested by the issue template, including:
|
* Don't prepend your issue title with a label like `[Feature]`; the proper label will be assigned automatically.
|
||||||
|
* Try to anticipate any likely questions about your proposal and provide that information proactively.
|
||||||
|
* Verify that you have GitHub notifications enabled and are subscribed to your issue after submitting.
|
||||||
|
* You're welcome to volunteer to implement your FR, but don't submit a pull request until it has been approved.
|
||||||
|
|
||||||
* A detailed description of the proposed functionality
|
* For more information on how feature requests are handled, please see our [issue intake policy](https://github.com/netbox-community/netbox/wiki/Issue-Intake-Policy).
|
||||||
* A use case for the feature; who would use it and what value it would add
|
|
||||||
to NetBox
|
|
||||||
* A rough description of changes necessary to the database schema (if
|
|
||||||
applicable)
|
|
||||||
* Any third-party libraries or other resources which would be involved
|
|
||||||
|
|
||||||
* Please avoid prepending any sort of tag (e.g. "[Feature]") to the issue
|
## :arrow_heading_up: Submitting Pull Requests
|
||||||
title. The issue will be reviewed by a moderator after submission and the
|
|
||||||
appropriate labels will be applied for categorization.
|
|
||||||
|
|
||||||
* For more information on how feature requests are handled, please see our
|
* [Pull requests](https://docs.github.com/en/pull-requests) (a feature of GitHub) are used to propose changes to NetBox's code base. Our process generally goes like this:
|
||||||
[issue intake policy](https://github.com/netbox-community/netbox/wiki/Issue-Intake-Policy).
|
* A user opens a new issue (bug report or feature request)
|
||||||
|
* A maintainer triages the issue and may mark it as needing an owner
|
||||||
|
* The issue's author can volunteer to own it, or someone else can
|
||||||
|
* A maintainer assigns the issue to whomever volunteers
|
||||||
|
* The issue owner submits a pull request that will resolve the issue
|
||||||
|
* A maintainer reviews and merges the pull request, closing the issue
|
||||||
|
|
||||||
## Submitting Pull Requests
|
* It's very important that you not submit a pull request until a relevant issue has been opened **and** assigned to you. Otherwise, you risk wasting time on work that may ultimately not be needed.
|
||||||
|
|
||||||
* If you're interested in contributing to NetBox, be sure to check out our
|
* New pull requests should generally be based off of the `develop` branch, rather than `master`. The `develop` branch is used for ongoing development, while `master` is used for tracking stable releases. (If you're developing for an upcoming minor release, use `feature` instead.)
|
||||||
[getting started](https://docs.netbox.dev/en/stable/development/getting-started/)
|
|
||||||
documentation for tips on setting up your development environment.
|
|
||||||
|
|
||||||
* Be sure to open an issue and wait for it to be assigned to you **before**
|
* In most cases, it is not necessary to add a changelog entry: A maintainer will take care of this when the PR is merged. (This helps avoid merge conflicts resulting from multiple PRs being submitted simultaneously.)
|
||||||
starting work on a pull request, and discuss your idea with the NetBox
|
|
||||||
maintainers before beginning work. This will help prevent wasting time on
|
|
||||||
proposed changes that we might not be able to accept. When suggesting a new
|
|
||||||
feature, also make sure it won't conflict with any work that's already in
|
|
||||||
progress.
|
|
||||||
|
|
||||||
* Once you've opened or identified an issue you'd like to work on, ask that it
|
|
||||||
be assigned to you so that others are aware it's being worked on. If it meets
|
|
||||||
the acceptance criteria, a maintainer will then mark the issue as "accepted"
|
|
||||||
and assign it to you. (Note that GitHub requires that a user first comment on
|
|
||||||
an issue before it can be assigned to that user.)
|
|
||||||
|
|
||||||
* Any pull request which does not relate to an **assigned** issue will be
|
|
||||||
closed.
|
|
||||||
|
|
||||||
* All new functionality must include relevant tests where applicable.
|
|
||||||
|
|
||||||
* When submitting a pull request, please be sure to work off of the `develop`
|
|
||||||
branch, rather than `master`. The `develop` branch is used for ongoing
|
|
||||||
development, while `master` is used for tagging stable releases. (If you're
|
|
||||||
developing for the next minor release, use `feature` instead.)
|
|
||||||
|
|
||||||
* In most cases, it is not necessary to add a changelog entry: A maintainer will
|
|
||||||
take care of this when the PR is merged. (This helps avoid merge conflicts
|
|
||||||
resulting from multiple PRs being submitted simultaneously.)
|
|
||||||
|
|
||||||
* All code submissions should meet the following criteria (CI will enforce
|
|
||||||
these checks):
|
|
||||||
|
|
||||||
|
* All code submissions should meet the following criteria (CI will enforce these checks):
|
||||||
* Python syntax is valid
|
* Python syntax is valid
|
||||||
* All tests pass when run with `./manage.py test`
|
* All tests pass when run with `./manage.py test`
|
||||||
* PEP 8 compliance is enforced, with the exception that lines may be
|
* PEP 8 compliance is enforced, with the exception that lines may be
|
||||||
greater than 80 characters in length
|
greater than 80 characters in length
|
||||||
|
|
||||||
## Commenting
|
* Some other tips to keep in mind:
|
||||||
|
* If you'd like to volunteer for someone else's issue, please post a comment on that issue letting us know. (This will allow the maintainers to assign it to you.)
|
||||||
|
* Check out our [developer docs](https://docs.netbox.dev/en/stable/development/getting-started/) for tips on setting up your development environment.
|
||||||
|
* All new functionality must include relevant tests where applicable.
|
||||||
|
|
||||||
Only comment on an issue if you are sharing a relevant idea or constructive
|
## :jigsaw: Creating Plugins
|
||||||
feedback. **Do not** comment on an issue just to show your support (give the
|
|
||||||
top post a :+1: instead) or to ask for an update. Doing so generates
|
|
||||||
unnecessary noise in the discussion, and is especially annoying for people who
|
|
||||||
have subscribed to updates for the issue. Any comments without substance
|
|
||||||
relevant to the discussion will be deleted.
|
|
||||||
|
|
||||||
## Issue Lifecycle
|
Do you have an idea for something you'd like to build in NetBox, but might not be right for the core project? NetBox includes a powerful and extensive [plugins framework](https://docs.netbox.dev/en/stable/plugins/) that enables users to develop their own custom data models and integrations.
|
||||||
|
|
||||||
New issues are handled according to our [issue intake policy](https://github.com/netbox-community/netbox/wiki/Issue-Intake-Policy).
|
Check out our [plugin development tutorial](https://github.com/netbox-community/netbox-plugin-tutorial) to get started!
|
||||||
Maintainers will assign label(s) and/or close new issues as the policy
|
|
||||||
dictates. This helps ensure a productive development environment and avoid
|
|
||||||
accumulating a large backlog of work.
|
|
||||||
|
|
||||||
The core maintainers group has chosen to make use of GitHub's [Stale bot](https://github.com/apps/stale)
|
## :rescue_worker_helmet: Become a Maintainer
|
||||||
to aid in issue management.
|
|
||||||
|
|
||||||
* Issues will be marked as stale after 60 days of no activity.
|
We're always looking for motivated individuals to join the maintainers team and help drive NetBox's long-term development. Some of our most sought-after skills include:
|
||||||
* If the stable label is not removed in the following 30 days, the issue will
|
|
||||||
be closed automatically.
|
|
||||||
* Any issue bearing one of the following labels will be exempt from all Stale
|
|
||||||
bot actions:
|
|
||||||
* `status: accepted`
|
|
||||||
* `status: blocked`
|
|
||||||
* `status: needs milestone`
|
|
||||||
|
|
||||||
It is natural that some new issues get more attention than others. The stale
|
* Python development with a strong focus on the [Django](https://www.djangoproject.com/) framework
|
||||||
bot helps bring renewed attention to potentially valuable issues that may have
|
* Expertise working with PostgreSQL databases
|
||||||
been overlooked. **Do not** comment on a stale issue merely to "bump" it in an
|
* Javascript & TypeScript proficiency
|
||||||
effort to circumvent the bot: This will result in the immediate closure of the
|
* A knack for web application design (HTML & CSS)
|
||||||
issue, and you may be barred from participating in future discussions.
|
* Familiarity with git and software development best practices
|
||||||
|
* Excellent attention to detail
|
||||||
|
* Working experience in the field of network operations & engineering
|
||||||
|
|
||||||
## Maintainer Guidance
|
We generally ask that maintainers dedicate around four hours of work to the project each week on average, which includes both hands-on development and project management tasks such as issue triage. Maintainers are also encouraged (but not required) to attend our bi-weekly Zoom call to catch up on recent items.
|
||||||
|
|
||||||
* Maintainers are expected to contribute at least four hours per week to the
|
Many maintainers petition their employer to grant some of their paid time to work on NetBox. In doing so, your employer becomes eligible to be featured as a [NetBox sponsor](https://github.com/netbox-community/netbox/wiki/Sponsorship).
|
||||||
project on average. This can be employer-sponsored or individual time, with
|
|
||||||
the understanding that all contributions are submitted under the Apache 2.0
|
|
||||||
license and that your employer may not make claim to any contributions.
|
|
||||||
Contributions include code work, issue management, and community support. All
|
|
||||||
development must be in accordance with our [development guidance](https://docs.netbox.dev/en/stable/development/).
|
|
||||||
|
|
||||||
* Maintainers are expected to attend (where feasible) our biweekly ~30-minute
|
Interested? You can contact our lead maintainer, Jeremy Stretch, at jeremy@netbox.dev or on the [NetDev Community Slack](https://netdev.chat/). We'd love to have you on the team!
|
||||||
sync to review agenda items. This meeting provides opportunity to present and
|
|
||||||
discuss pressing topics. Meetings are held as virtual audio/video conferences.
|
|
||||||
|
|
||||||
* Maintainers with no substantial recorded activity in a 60-day period will be
|
## :heart: Other Ways to Contribute
|
||||||
removed from the project.
|
|
||||||
|
You don't have to be a developer to contribute to NetBox: There are plenty of other ways you can add value to the community! Below are just a few examples:
|
||||||
|
|
||||||
|
* Help answer questions and provide feedback in our [GitHub discussions](https://github.com/netbox-community/netbox/discussions) and on [Slack](https://netdev.chat/).
|
||||||
|
* Write a blog article or record a YouTube video demonstrating how NetBox is used at your organization.
|
||||||
|
* Help grow our [library of device & module type definitions](https://github.com/netbox-community/devicetype-library).
|
||||||
|
|||||||
133
README.md
133
README.md
@@ -1,107 +1,79 @@
|
|||||||
<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>The premiere source of truth powering network automation</p>
|
||||||
|
<img src="https://github.com/netbox-community/netbox/workflows/CI/badge.svg?branch=master" alt="CI status" />
|
||||||
|
<p></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
NetBox is the leading solution for modeling and documenting modern networks. By
|
NetBox is the leading solution for modeling and documenting modern networks. By
|
||||||
combining the traditional disciplines of IP address management (IPAM) and
|
combining the traditional disciplines of IP address management (IPAM) and
|
||||||
datacenter infrastructure management (DCIM) with powerful APIs and extensions,
|
datacenter infrastructure management (DCIM) with powerful APIs and extensions,
|
||||||
NetBox provides the ideal "source of truth" to power network automation.
|
NetBox provides the ideal "source of truth" to power network automation.
|
||||||
Available as open source software under the Apache 2.0 license, NetBox is
|
Available as open source software under the Apache 2.0 license, NetBox serves
|
||||||
employed by thousands of organizations around the world.
|
as the cornerstone for network automation in thousands of organizations.
|
||||||
|
|
||||||

|
* **Physical infrastructure:** Accurately model the physical world, from global regions down to individual racks of gear. Then connect everything - network, console, and power!
|
||||||
|
* **Modern IPAM:** All the standard IPAM functionality you expect, plus VRF import/export tracking, VLAN management, and overlay support.
|
||||||
|
* **Data circuits:** Confidently manage the delivery of critical circuits from various service providers, modeled seamlessly alongside your own infrastructure.
|
||||||
|
* **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!
|
||||||
|
|
||||||
[](https://github.com/netbox-community/netbox/commits)
|

|
||||||
[](https://github.com/netbox-community/netbox/issues)
|
|
||||||
[](https://github.com/netbox-community/netbox/pulls)
|
|
||||||
[](https://github.com/netbox-community/netbox/graphs/contributors)
|
|
||||||
<br />Stats via [Repography](https://repography.com)
|
|
||||||
|
|
||||||
## About NetBox
|
## Getting Started
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
Myriad infrastructure components can be modeled in NetBox, including:
|
|
||||||
|
|
||||||
* Hierarchical regions, site groups, sites, and locations
|
|
||||||
* Racks, devices, and device components
|
|
||||||
* Cables and wireless connections
|
|
||||||
* Power distribution
|
|
||||||
* Data circuits and providers
|
|
||||||
* Virtual machines and clusters
|
|
||||||
* IP prefixes, ranges, and addresses
|
|
||||||
* VRFs and route targets
|
|
||||||
* L2VPN and overlays
|
|
||||||
* FHRP groups (VRRP, HSRP, etc.)
|
|
||||||
* AS numbers
|
|
||||||
* VLANs and scoped VLAN groups
|
|
||||||
* Organizational tenants and contacts
|
|
||||||
|
|
||||||
In addition to its extensive built-in models and functionality, NetBox can be
|
|
||||||
customized and extended through the use of:
|
|
||||||
|
|
||||||
* Custom fields
|
|
||||||
* Custom links
|
|
||||||
* Configuration contexts
|
|
||||||
* Custom model validation rules
|
|
||||||
* Reports
|
|
||||||
* Custom scripts
|
|
||||||
* Export templates
|
|
||||||
* Conditional webhooks
|
|
||||||
* Plugins
|
|
||||||
* Single sign-on (SSO) authentication
|
|
||||||
* NAPALM integration
|
|
||||||
* Detailed change logging
|
|
||||||
|
|
||||||
NetBox also features a complete REST API as well as a GraphQL API for easily
|
|
||||||
integrating with other tools and systems.
|
|
||||||
|
|
||||||
The complete documentation for NetBox can be found at [docs.netbox.dev](https://docs.netbox.dev/).
|
|
||||||
A public demo instance is available at [demo.netbox.dev](https://demo.netbox.dev).
|
|
||||||
|
|
||||||
NetBox runs as a web application atop the [Django](https://www.djangoproject.com/)
|
|
||||||
Python framework with a [PostgreSQL](https://www.postgresql.org/) database. For a
|
|
||||||
complete list of requirements, see `requirements.txt`. The code is available
|
|
||||||
[on GitHub](https://github.com/netbox-community/netbox).
|
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<h3>Thank you to our sponsors!</h3>
|
|
||||||
|
|
||||||
[](https://try.digitalocean.com/developer-cloud)
|
[](https://github.com/netbox-community/netbox)
|
||||||
|
|
||||||
[](https://metal.equinix.com/)
|
[](https://github.com/netbox-community/netbox-docker)
|
||||||
|
|
||||||
[](https://ns1.com/)
|
[](https://netboxlabs.com/netbox-cloud/)
|
||||||
<br />
|
|
||||||
[](https://sentry.io/)
|
|
||||||
|
|
||||||
[](https://stellar.tech/)
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
### Discussion
|
* 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.
|
||||||
|
* Check out [our wiki](https://github.com/netbox-community/netbox/wiki/Community-Contributions) for even more projects to get the most out of NetBox!
|
||||||
|
|
||||||
* [GitHub Discussions](https://github.com/netbox-community/netbox/discussions) - Discussion forum hosted by GitHub; ideal for Q&A and other structured discussions
|
## Get Involved
|
||||||
* [Slack](https://netdev.chat/) - Real-time chat hosted by the NetDev Community; best for unstructured discussion or just hanging out
|
|
||||||
|
|
||||||
### Installation
|
* 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/)!
|
||||||
|
* 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.
|
||||||
|
|
||||||
Please see [the documentation](https://docs.netbox.dev/) for
|
## Project Stats
|
||||||
instructions on installing NetBox. To upgrade NetBox, please download the
|
|
||||||
[latest release](https://github.com/netbox-community/netbox/releases) and
|
|
||||||
run `upgrade.sh`.
|
|
||||||
|
|
||||||
### Providing Feedback
|
<div 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/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/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/graphs/contributors"><img src="https://images.repography.com/29023055/netbox-community/netbox/recent-activity/31db894eee74b8a5475e3af307a81b6c_users.svg" alt="Top contributors"></a>
|
||||||
|
<br />Stats via <a href="https://repography.com">Repography</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
The best platform for general feedback, assistance, and other discussion is our
|
## Sponsors
|
||||||
[GitHub discussions](https://github.com/netbox-community/netbox/discussions).
|
|
||||||
To report a bug or request a specific feature, please open a GitHub issue using
|
|
||||||
the [appropriate template](https://github.com/netbox-community/netbox/issues/new/choose).
|
|
||||||
|
|
||||||
If you are interested in contributing to the development of NetBox, please read
|
<div align="center">
|
||||||
our [contributing guide](CONTRIBUTING.md) prior to beginning any work.
|
|
||||||
|
|
||||||
### Screenshots
|
[](https://netboxlabs.com)
|
||||||
|
|
||||||
|
[](https://try.digitalocean.com/developer-cloud)
|
||||||
|
<br />
|
||||||
|
[](https://sentry.io)
|
||||||
|
|
||||||
|
[](https://metal.equinix.com)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
## Screenshots
|
||||||
|
|
||||||
")
|
")
|
||||||
|
|
||||||
@@ -110,8 +82,3 @@ our [contributing guide](CONTRIBUTING.md) prior to beginning any work.
|
|||||||

|

|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### Related projects
|
|
||||||
|
|
||||||
Please see [our wiki](https://github.com/netbox-community/netbox/wiki/Community-Contributions)
|
|
||||||
for a list of relevant community projects.
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ If you believe you've uncovered a security vulnerability and wish to report it c
|
|||||||
|
|
||||||
Please note that we **DO NOT** accept reports generated by automated tooling which merely suggest that a file or file(s) _may_ be vulnerable under certain conditions, as these are most often innocuous.
|
Please note that we **DO NOT** accept reports generated by automated tooling which merely suggest that a file or file(s) _may_ be vulnerable under certain conditions, as these are most often innocuous.
|
||||||
|
|
||||||
If you believe that you've found a vulnerability which meets all of these conditions, please email a brief description of the suspected bug and instructions for reproduction to **security@netbox.dev**. For any security concerns regarding NetBox deployed via Docker, please see the [netbox-docker](https://github.com/netbox-community/netbox-docker) project.
|
If you believe that you've found a vulnerability which meets all of these conditions, please [submit a draft security advisory](https://github.com/netbox-community/netbox/security/advisories/new) on GitHub, or email a brief description of the suspected bug and instructions for reproduction to **security@netbox.dev**. For any security concerns regarding NetBox deployed via Docker, please see the [netbox-docker](https://github.com/netbox-community/netbox-docker) project.
|
||||||
|
|
||||||
### Bug Bounties
|
### Bug Bounties
|
||||||
|
|
||||||
|
|||||||
@@ -1,57 +1,61 @@
|
|||||||
# HTML sanitizer
|
# HTML sanitizer
|
||||||
# https://github.com/mozilla/bleach
|
# https://github.com/mozilla/bleach/blob/main/CHANGES
|
||||||
bleach
|
bleach
|
||||||
|
|
||||||
|
# Python client for Amazon AWS API
|
||||||
|
# https://github.com/boto/boto3/blob/develop/CHANGELOG.rst
|
||||||
|
boto3
|
||||||
|
|
||||||
# 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.1
|
Django<4.2
|
||||||
|
|
||||||
# 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
|
# https://github.com/django-mptt/django-mptt/blob/main/CHANGELOG.rst
|
||||||
django-mptt
|
django-mptt
|
||||||
|
|
||||||
# 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,27 +63,40 @@ 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
|
||||||
|
|
||||||
|
# Git client for file sync
|
||||||
|
# https://github.com/jelmer/dulwich/releases
|
||||||
|
dulwich
|
||||||
|
|
||||||
|
# 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<3.0
|
# 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/change_log/
|
||||||
# mkdocs currently requires Markdown v3.3
|
# mkdocs currently requires Markdown v3.3
|
||||||
Markdown<3.4
|
Markdown<3.4
|
||||||
|
|
||||||
@@ -88,49 +105,49 @@ Markdown<3.4
|
|||||||
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://www.psycopg.org/docs/news.html
|
||||||
psycopg2-binary
|
psycopg2-binary
|
||||||
|
|
||||||
# YAML rendering library
|
# YAML rendering library
|
||||||
# https://github.com/yaml/pyyaml
|
# https://github.com/yaml/pyyaml/blob/master/CHANGES
|
||||||
PyYAML
|
PyYAML
|
||||||
|
|
||||||
# Sentry SDK
|
# Sentry SDK
|
||||||
# https://github.com/getsentry/sentry-python
|
# https://github.com/getsentry/sentry-python/blob/master/CHANGELOG.md
|
||||||
sentry-sdk
|
sentry-sdk
|
||||||
|
|
||||||
# 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
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# The IP address (typically localhost) and port that the Netbox WSGI process should listen on
|
# The IP address (typically localhost) and port that the NetBox WSGI process should listen on
|
||||||
bind = '127.0.0.1:8001'
|
bind = '127.0.0.1:8001'
|
||||||
|
|
||||||
# Number of gunicorn workers to spawn. This should typically be 2n+1, where
|
# Number of gunicorn workers to spawn. This should typically be 2n+1, where
|
||||||
|
|||||||
17
contrib/netbox-housekeeping.service
Normal file
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
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
95605
contrib/openapi2.json
Normal file
File diff suppressed because it is too large
Load Diff
69695
contrib/openapi2.yaml
Normal file
69695
contrib/openapi2.yaml
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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,7 +4,7 @@
|
|||||||
|
|
||||||
### 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, simply set `SENTRY_ENABLED` to True in `configuration.py`. Errors will be sent to a Sentry ingestor maintained by the NetBox team for analysis.
|
||||||
|
|
||||||
```python
|
```python
|
||||||
SENTRY_ENABLED = True
|
SENTRY_ENABLED = True
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -58,9 +58,11 @@ The following model fields support configurable choices:
|
|||||||
* `circuits.Circuit.status`
|
* `circuits.Circuit.status`
|
||||||
* `dcim.Device.status`
|
* `dcim.Device.status`
|
||||||
* `dcim.Location.status`
|
* `dcim.Location.status`
|
||||||
|
* `dcim.Module.status`
|
||||||
* `dcim.PowerFeed.status`
|
* `dcim.PowerFeed.status`
|
||||||
* `dcim.Rack.status`
|
* `dcim.Rack.status`
|
||||||
* `dcim.Site.status`
|
* `dcim.Site.status`
|
||||||
|
* `dcim.VirtualDeviceContext.status`
|
||||||
* `extras.JournalEntry.kind`
|
* `extras.JournalEntry.kind`
|
||||||
* `ipam.IPAddress.status`
|
* `ipam.IPAddress.status`
|
||||||
* `ipam.IPRange.status`
|
* `ipam.IPRange.status`
|
||||||
@@ -68,6 +70,7 @@ The following model fields support configurable choices:
|
|||||||
* `ipam.VLAN.status`
|
* `ipam.VLAN.status`
|
||||||
* `virtualization.Cluster.status`
|
* `virtualization.Cluster.status`
|
||||||
* `virtualization.VirtualMachine.status`
|
* `virtualization.VirtualMachine.status`
|
||||||
|
* `wireless.WirelessLAN.status`
|
||||||
|
|
||||||
The following colors are supported:
|
The following colors are supported:
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,50 @@
|
|||||||
# 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': 2,
|
||||||
|
'title': 'Organization',
|
||||||
|
'config': {
|
||||||
|
'models': [
|
||||||
|
'dcim.site',
|
||||||
|
'tenancy.tenant',
|
||||||
|
'tenancy.contact',
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'widget': 'extras.ObjectCountsWidget',
|
||||||
|
'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.
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -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"
|
||||||
@@ -69,6 +90,14 @@ By default, NetBox will permit users to create duplicate prefixes and IP address
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## `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.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## GRAPHQL_ENABLED
|
## GRAPHQL_ENABLED
|
||||||
|
|
||||||
!!! tip "Dynamic Configuration Parameter"
|
!!! tip "Dynamic Configuration Parameter"
|
||||||
@@ -79,14 +108,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 +140,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.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -141,6 +172,22 @@ When determining the primary IP address for a device, IPv6 is preferred over IPv
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## QUEUE_MAPPINGS
|
||||||
|
|
||||||
|
Allows changing which queues are used internally for background tasks.
|
||||||
|
|
||||||
|
```python
|
||||||
|
QUEUE_MAPPINGS = {
|
||||||
|
'webhook': 'low',
|
||||||
|
'report': 'high',
|
||||||
|
'script': 'high',
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
If no queue is defined the queue named `default` will be used.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## RELEASE_CHECK_URL
|
## RELEASE_CHECK_URL
|
||||||
|
|
||||||
Default: None (disabled)
|
Default: None (disabled)
|
||||||
@@ -157,3 +204,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,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 10 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 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:
|
||||||
|
|
||||||
* `NAME` - Database name
|
* `NAME` - Database name
|
||||||
* `USER` - PostgreSQL username
|
* `USER` - PostgreSQL username
|
||||||
@@ -33,11 +33,13 @@ NetBox requires access to a PostgreSQL 10 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,6 +52,9 @@ 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
|
||||||
@@ -63,6 +68,7 @@ Redis is configured using a configuration setting similar to `DATABASE` and thes
|
|||||||
|
|
||||||
* `HOST` - Name or IP address of the Redis server (use `localhost` if running locally)
|
* `HOST` - Name or IP address of the Redis server (use `localhost` if running locally)
|
||||||
* `PORT` - TCP port of the Redis service; leave blank for default port (6379)
|
* `PORT` - TCP port of the Redis service; leave blank for default port (6379)
|
||||||
|
* `USERNAME` - Redis username (if set)
|
||||||
* `PASSWORD` - Redis password (if set)
|
* `PASSWORD` - Redis password (if set)
|
||||||
* `DATABASE` - Numeric database ID
|
* `DATABASE` - Numeric database ID
|
||||||
* `SSL` - Use SSL connection to Redis
|
* `SSL` - Use SSL connection to Redis
|
||||||
@@ -75,6 +81,7 @@ REDIS = {
|
|||||||
'tasks': {
|
'tasks': {
|
||||||
'HOST': 'redis.example.com',
|
'HOST': 'redis.example.com',
|
||||||
'PORT': 1234,
|
'PORT': 1234,
|
||||||
|
'USERNAME': 'netbox'
|
||||||
'PASSWORD': 'foobar',
|
'PASSWORD': 'foobar',
|
||||||
'DATABASE': 0,
|
'DATABASE': 0,
|
||||||
'SSL': False,
|
'SSL': False,
|
||||||
@@ -82,6 +89,7 @@ REDIS = {
|
|||||||
'caching': {
|
'caching': {
|
||||||
'HOST': 'localhost',
|
'HOST': 'localhost',
|
||||||
'PORT': 6379,
|
'PORT': 6379,
|
||||||
|
'USERNAME': ''
|
||||||
'PASSWORD': '',
|
'PASSWORD': '',
|
||||||
'DATABASE': 1,
|
'DATABASE': 1,
|
||||||
'SSL': False,
|
'SSL': False,
|
||||||
@@ -141,8 +149,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.
|
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
# Security & Authentication Parameters
|
# Security & Authentication Parameters
|
||||||
|
|
||||||
|
## ALLOW_TOKEN_RETRIEVAL
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## ALLOWED_URL_SCHEMES
|
## ALLOWED_URL_SCHEMES
|
||||||
|
|
||||||
!!! tip "Dynamic Configuration Parameter"
|
!!! tip "Dynamic Configuration Parameter"
|
||||||
@@ -59,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
|
||||||
@@ -129,6 +143,25 @@ The lifetime (in seconds) of the authentication cookie issued to a NetBox user u
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## LOGOUT_REDIRECT_URL
|
||||||
|
|
||||||
|
Default: `'home'`
|
||||||
|
|
||||||
|
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`
|
||||||
@@ -137,6 +170,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
|
||||||
|
|||||||
@@ -12,6 +12,17 @@ BASE_PATH = 'netbox/'
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## DEFAULT_LANGUAGE
|
||||||
|
|
||||||
|
Default: `en-us` (US English)
|
||||||
|
|
||||||
|
Defines the default preferred language/locale for requests that do not specify one. This is used to alter e.g. the display of dates and numbers to fit the user's locale. See [this list](http://www.i18nguy.com/unicode/language-identifiers.html) of standard language codes. (This parameter maps to Django's [`LANGUAGE_CODE`](https://docs.djangoproject.com/en/stable/ref/settings/#language-code) internal setting.)
|
||||||
|
|
||||||
|
!!! note
|
||||||
|
Altering this parameter will *not* change the language used in NetBox. We hope to provide translation support in a future NetBox release.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## DOCS_ROOT
|
## DOCS_ROOT
|
||||||
|
|
||||||
Default: `$INSTALL_ROOT/docs/`
|
Default: `$INSTALL_ROOT/docs/`
|
||||||
@@ -27,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)
|
||||||
@@ -54,6 +65,22 @@ Email is sent from NetBox only for critical events or if configured for [logging
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## ENABLE_LOCALIZATION
|
||||||
|
|
||||||
|
Default: False
|
||||||
|
|
||||||
|
Determines if localization features are enabled or not. This should only be enabled for development or testing purposes as netbox is not yet fully localized. Turning this on will localize numeric and date formats (overriding what is set for DATE_FORMAT) based on the browser locale as well as translate certain strings from third party modules.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 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
|
||||||
@@ -157,6 +184,14 @@ The file path to the location where [custom scripts](../customization/custom-scr
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## SEARCH_BACKEND
|
||||||
|
|
||||||
|
Default: `'netbox.search.backends.CachedValueSearchBackend'`
|
||||||
|
|
||||||
|
The dotted path to the desired search backend class. `CachedValueSearchBackend` is currently the only search backend provided in NetBox, however this setting can be used to enable a custom backend.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## STORAGE_BACKEND
|
## STORAGE_BACKEND
|
||||||
|
|
||||||
Default: None (local storage)
|
Default: None (local storage)
|
||||||
|
|||||||
@@ -13,8 +13,10 @@ Custom fields may be created by navigating to Customization > Custom Fields. Net
|
|||||||
* Text: Free-form text (intended for single-line use)
|
* Text: Free-form text (intended for single-line use)
|
||||||
* Long text: Free-form of any length; supports Markdown rendering
|
* Long text: Free-form of any length; supports Markdown rendering
|
||||||
* Integer: A whole number (positive or negative)
|
* Integer: A whole number (positive or negative)
|
||||||
|
* 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
|
||||||
@@ -34,18 +36,12 @@ 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
|
||||||
|
|
||||||
!!! note
|
|
||||||
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, there are three options for UI visibility. These control how and whether the custom field is displayed within the NetBox UI.
|
||||||
|
|
||||||
* **Read/write** (default): The custom field is included when viewing and editing objects.
|
* **Read/write** (default): The custom field is included when viewing and editing objects.
|
||||||
|
|||||||
@@ -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:
|
||||||
@@ -142,6 +156,19 @@ obj.full_clean()
|
|||||||
obj.save()
|
obj.save()
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Error handling
|
||||||
|
|
||||||
|
Sometimes things go wrong and a script will run into an `Exception`. If that happens and an uncaught exception is raised by the custom script, the execution is aborted and a full stack trace is reported.
|
||||||
|
|
||||||
|
Although this is helpful for debugging, in some situations it might be required to cleanly abort the execution of a custom script (e.g. because of invalid input data) and thereby make sure no changes are performed on the database. In this case the script can throw an `AbortScript` exception, which will prevent the stack trace from being reported, but still terminating the script's execution and reporting a given error message.
|
||||||
|
|
||||||
|
```python
|
||||||
|
from utilities.exceptions import AbortScript
|
||||||
|
|
||||||
|
if some_error:
|
||||||
|
raise AbortScript("Some meaningful error message")
|
||||||
|
```
|
||||||
|
|
||||||
## Variable Reference
|
## Variable Reference
|
||||||
|
|
||||||
### Default Options
|
### Default Options
|
||||||
@@ -267,7 +294,7 @@ An IPv4 or IPv6 network with a mask. Returns a `netaddr.IPNetwork` object. Two a
|
|||||||
|
|
||||||
### Via the Web UI
|
### Via the Web UI
|
||||||
|
|
||||||
Custom scripts can be run via the web UI by navigating to the script, completing any required form data, and clicking the "run script" button.
|
Custom scripts can be run via the web UI by navigating to the script, completing any required form data, and clicking the "run script" button. It is possible to schedule a script to be executed at specified time in the future. A scheduled script can be canceled by deleting the associated job result object.
|
||||||
|
|
||||||
### Via the API
|
### Via the API
|
||||||
|
|
||||||
@@ -282,6 +309,8 @@ http://netbox/api/extras/scripts/example.MyReport/ \
|
|||||||
--data '{"data": {"foo": "somevalue", "bar": 123}, "commit": true}'
|
--data '{"data": {"foo": "somevalue", "bar": 123}, "commit": true}'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Optionally `schedule_at` can be passed in the form data with a datetime string to schedule a script at the specified date and time.
|
||||||
|
|
||||||
### Via the CLI
|
### Via the CLI
|
||||||
|
|
||||||
Scripts can be run on the CLI by invoking the management command:
|
Scripts can be run on the CLI by invoking the management command:
|
||||||
@@ -349,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}")
|
||||||
|
|
||||||
@@ -362,6 +392,7 @@ class NewBranchScript(Script):
|
|||||||
status=DeviceStatusChoices.STATUS_PLANNED,
|
status=DeviceStatusChoices.STATUS_PLANNED,
|
||||||
device_role=switch_role
|
device_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}")
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ class DeviceConnectionsReport(Report):
|
|||||||
# Check that every console port for every active device has a connection defined.
|
# Check that every console port for every active device has a connection defined.
|
||||||
active = DeviceStatusChoices.STATUS_ACTIVE
|
active = DeviceStatusChoices.STATUS_ACTIVE
|
||||||
for console_port in ConsolePort.objects.prefetch_related('device').filter(device__status=active):
|
for console_port in ConsolePort.objects.prefetch_related('device').filter(device__status=active):
|
||||||
if console_port.connected_endpoint is None:
|
if not console_port.connected_endpoints:
|
||||||
self.log_failure(
|
self.log_failure(
|
||||||
console_port.device,
|
console_port.device,
|
||||||
"No console connection defined for {}".format(console_port.name)
|
"No console connection defined for {}".format(console_port.name)
|
||||||
@@ -64,7 +64,7 @@ class DeviceConnectionsReport(Report):
|
|||||||
for device in Device.objects.filter(status=DeviceStatusChoices.STATUS_ACTIVE):
|
for device in Device.objects.filter(status=DeviceStatusChoices.STATUS_ACTIVE):
|
||||||
connected_ports = 0
|
connected_ports = 0
|
||||||
for power_port in PowerPort.objects.filter(device=device):
|
for power_port in PowerPort.objects.filter(device=device):
|
||||||
if power_port.connected_endpoint is not None:
|
if power_port.connected_endpoints:
|
||||||
connected_ports += 1
|
connected_ports += 1
|
||||||
if not power_port.path.is_active:
|
if not power_port.path.is_active:
|
||||||
self.log_warning(
|
self.log_warning(
|
||||||
@@ -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:
|
||||||
@@ -132,11 +134,11 @@ Once you have created a report, it will appear in the reports list. Initially, r
|
|||||||
!!! 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 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.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### Via the Web UI
|
### Via the Web UI
|
||||||
|
|
||||||
Reports can be run via the web UI by navigating to the report and clicking the "run report" button at top right. Once a report has been run, its associated results will be included in the report view.
|
Reports can be run via the web UI by navigating to the report and clicking the "run report" button at top right. Once a report has been run, its associated results will be included in the report view. It is possible to schedule a report to be executed at specified time in the future. A scheduled report can be canceled by deleting the associated job result object.
|
||||||
|
|
||||||
### Via the API
|
### Via the API
|
||||||
|
|
||||||
@@ -152,6 +154,8 @@ Our example report above would be called as:
|
|||||||
POST /api/extras/reports/devices.DeviceConnectionsReport/run/
|
POST /api/extras/reports/devices.DeviceConnectionsReport/run/
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Optionally `schedule_at` can be passed in the form data with a datetime string to schedule a script at the specified date and time.
|
||||||
|
|
||||||
### Via the CLI
|
### Via the CLI
|
||||||
|
|
||||||
Reports can be run on the CLI by invoking the management command:
|
Reports can be run on the CLI by invoking the management command:
|
||||||
|
|||||||
@@ -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,14 @@ The registry can be inspected by importing `registry` from `extras.registry`.
|
|||||||
|
|
||||||
## Stores
|
## Stores
|
||||||
|
|
||||||
|
### `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:
|
||||||
@@ -20,38 +28,23 @@ A dictionary of particular features (e.g. custom fields) mapped to the NetBox mo
|
|||||||
...
|
...
|
||||||
},
|
},
|
||||||
'webhooks': {
|
'webhooks': {
|
||||||
...
|
'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:
|
### `plugins`
|
||||||
|
|
||||||
```python
|
This store maintains all registered items for plugins, such as navigation menus, template extensions, etc.
|
||||||
{
|
|
||||||
'Plugin A': (
|
|
||||||
<MenuItem>, <MenuItem>, <MenuItem>,
|
|
||||||
),
|
|
||||||
'Plugin B': (
|
|
||||||
<MenuItem>, <MenuItem>, <MenuItem>,
|
|
||||||
),
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### `plugin_template_extensions`
|
### `search`
|
||||||
|
|
||||||
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:
|
A dictionary mapping each model (identified by its app and label) to its search index class, if one has been registered for it.
|
||||||
|
|
||||||
```python
|
### `views`
|
||||||
{
|
|
||||||
'dcim.site': [
|
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()`.
|
||||||
<TemplateExtension>, <TemplateExtension>, <TemplateExtension>,
|
|
||||||
],
|
|
||||||
'dcim.rack': [
|
|
||||||
<TemplateExtension>, <TemplateExtension>,
|
|
||||||
],
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|||||||
@@ -56,11 +56,15 @@ If the new field should be filterable, add it to the `FilterSet` for the model.
|
|||||||
|
|
||||||
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 UI templates
|
## 8. Update the SearchIndex
|
||||||
|
|
||||||
|
Where applicable, add the new field to the model's SearchIndex for inclusion in global search.
|
||||||
|
|
||||||
|
## 9. 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.
|
||||||
|
|
||||||
## 9. Create/extend test cases
|
## 10. 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:
|
||||||
|
|
||||||
@@ -72,6 +76,6 @@ Create or extend the relevant test cases to verify that the new field and any ac
|
|||||||
|
|
||||||
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 of the relevant test suites are adapted or extended as necessary to test any new functionality.
|
||||||
|
|
||||||
## 10. Update the model's documentation
|
## 11. 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.
|
||||||
|
|||||||
@@ -2,54 +2,61 @@
|
|||||||
|
|
||||||
## 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 |
|
||||||
|
| [Webhooks](../integrations/webhooks.md) | `WebhooksMixin` | `webhooks` | NetBox is capable of generating outgoing webhooks for these objects |
|
||||||
|
|
||||||
## 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)
|
||||||
* [dcim.RackReservation](../models/dcim/rackreservation.md)
|
* [dcim.RackReservation](../models/dcim/rackreservation.md)
|
||||||
* [dcim.Site](../models/dcim/site.md)
|
* [dcim.Site](../models/dcim/site.md)
|
||||||
* [dcim.VirtualChassis](../models/dcim/virtualchassis.md)
|
* [dcim.VirtualChassis](../models/dcim/virtualchassis.md)
|
||||||
|
* [dcim.VirtualDeviceContext](../models/dcim/virtualdevicecontext.md)
|
||||||
* [ipam.Aggregate](../models/ipam/aggregate.md)
|
* [ipam.Aggregate](../models/ipam/aggregate.md)
|
||||||
* [ipam.ASN](../models/ipam/asn.md)
|
* [ipam.ASN](../models/ipam/asn.md)
|
||||||
* [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.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)
|
||||||
@@ -61,6 +68,8 @@ The Django [content types](https://docs.djangoproject.com/en/stable/ref/contrib/
|
|||||||
|
|
||||||
### 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)
|
||||||
@@ -75,6 +84,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)
|
||||||
@@ -84,12 +95,15 @@ 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)
|
||||||
@@ -97,11 +111,15 @@ The Django [content types](https://docs.djangoproject.com/en/stable/ref/contrib/
|
|||||||
|
|
||||||
### 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 webhooks.
|
||||||
|
|
||||||
* [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)
|
||||||
|
|||||||
37
docs/development/search.md
Normal file
37
docs/development/search.md
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
# Search
|
||||||
|
|
||||||
|
NetBox v3.4 introduced a new global search mechanism, which employs the `extras.CachedValue` model to store discrete field values from many models in a single table.
|
||||||
|
|
||||||
|
## SearchIndex
|
||||||
|
|
||||||
|
To enable search support for a model, declare and register a subclass of `netbox.search.SearchIndex` for it. Typically, this will be done within an app's `search.py` module.
|
||||||
|
|
||||||
|
```python
|
||||||
|
from netbox.search import SearchIndex, register_search
|
||||||
|
|
||||||
|
@register_search
|
||||||
|
class MyModelIndex(SearchIndex):
|
||||||
|
model = MyModel
|
||||||
|
fields = (
|
||||||
|
('name', 100),
|
||||||
|
('description', 500),
|
||||||
|
('comments', 5000),
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
### Field Weight Guidance
|
||||||
|
|
||||||
|
| Weight | Field Role | Examples |
|
||||||
|
|--------|--------------------------------------------------|----------------------------------------------------|
|
||||||
|
| 50 | Unique serialized attribute | Device.asset_tag |
|
||||||
|
| 60 | Unique serialized attribute (per related object) | Device.serial |
|
||||||
|
| 100 | Primary human identifier | Device.name, Circuit.cid, Cable.label |
|
||||||
|
| 110 | Slug | Site.slug |
|
||||||
|
| 200 | Secondary identifier | ProviderAccount.account, DeviceType.part_number |
|
||||||
|
| 300 | Highly unique descriptive attribute | CircuitTermination.xconnect_id, IPAddress.dns_name |
|
||||||
|
| 500 | Description | Site.description |
|
||||||
|
| 1000 | Custom field default | - |
|
||||||
|
| 2000 | Other discrete attribute | CircuitTermination.port_speed |
|
||||||
|
| 5000 | Comment field | Site.comments |
|
||||||
@@ -30,12 +30,6 @@ A webhook is a mechanism for conveying to some external system a change that too
|
|||||||
|
|
||||||
To learn more about this feature, check out the [webhooks documentation](../integrations/webhooks.md).
|
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
|
||||||
|
|
||||||
NetBox includes a special `/metrics` view which exposes metrics for a [Prometheus](https://prometheus.io/) scraper, powered by the open source [django-prometheus](https://github.com/korfuri/django-prometheus) library. To learn more about this feature, check out the [Prometheus metrics documentation](../integrations/prometheus-metrics.md).
|
NetBox includes a special `/metrics` view which exposes metrics for a [Prometheus](https://prometheus.io/) scraper, powered by the open source [django-prometheus](https://github.com/korfuri/django-prometheus) library. To learn more about this feature, check out the [Prometheus metrics documentation](../integrations/prometheus-metrics.md).
|
||||||
|
|||||||
13
docs/features/background-jobs.md
Normal file
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.
|
||||||
|
|
||||||
|
|||||||
81
docs/features/configuration-rendering.md
Normal file
81
docs/features/configuration-rendering.md
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
# Configuration Rendering
|
||||||
|
|
||||||
|
!!! info "This feature was introduced in NetBox v3.5."
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
## 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.
|
||||||
|
|
||||||
|
### 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 |
|
||||||
|
|||||||
@@ -71,13 +71,13 @@ To learn more about this feature, check out the [export template documentation](
|
|||||||
|
|
||||||
NetBox administrators can install custom Python scripts, known as _reports_, which run within NetBox and can be executed and analyzed within the NetBox UI. Reports are a great way to evaluate NetBox objects against a set of arbitrary rules. For example, you could write a report to check that every router has a loopback interface with an IP address assigned, or that every site has a minimum set of VLANs defined.
|
NetBox administrators can install custom Python scripts, known as _reports_, which run within NetBox and can be executed and analyzed within the NetBox UI. Reports are a great way to evaluate NetBox objects against a set of arbitrary rules. For example, you could write a report to check that every router has a loopback interface with an IP address assigned, or that every site has a minimum set of VLANs defined.
|
||||||
|
|
||||||
When a report runs, its logs messages pertaining to the operations being performed, and will ultimately result in either a pass or fail. Reports can be executed via the UI, REST API, or CLI (as a management command).
|
When a report runs, its logs messages pertaining to the operations being performed, and will ultimately result in either a pass or fail. Reports can be executed via the UI, REST API, or CLI (as a management command). They can be run immediately or scheduled to run at a future time.
|
||||||
|
|
||||||
To learn more about this feature, check out the [documentation for reports](../customization/reports.md).
|
To learn more about this feature, check out the [documentation for reports](../customization/reports.md).
|
||||||
|
|
||||||
## Custom Scripts
|
## Custom Scripts
|
||||||
|
|
||||||
Custom scripts are similar to reports, but more powerful. A custom script can prompt the user for input via a form (or API data), and is built to do much more than just reporting. Custom scripts are generally used to automate tasks, such as the population of new objects in NetBox, or exchanging data with external systems.
|
Custom scripts are similar to reports, but more powerful. A custom script can prompt the user for input via a form (or API data), and is built to do much more than just reporting. Custom scripts are generally used to automate tasks, such as the population of new objects in NetBox, or exchanging data with external systems. As with reports, they can be run via the UI, REST API, or CLI, and be scheduled to execute at a future time.
|
||||||
|
|
||||||
The complete Python environment is available to a custom script, including all of NetBox's internal mechanisms: There are no artificial restrictions on what a script can do. As such, custom scripting is considered an advanced feature and requires sufficient familiarity with Python and NetBox's data model.
|
The complete Python environment is available to a custom script, including all of NetBox's internal mechanisms: There are no artificial restrictions on what a script can do. As such, custom scripting is considered an advanced feature and requires sufficient familiarity with Python and NetBox's data model.
|
||||||
|
|
||||||
|
|||||||
@@ -65,6 +65,10 @@ Each device can have an operational status, functional role, and software platfo
|
|||||||
|
|
||||||
Sometimes it is necessary to model a set of physical devices as sharing a single management plane. Perhaps the most common example of such a scenario is stackable switches. These can be modeled as virtual chassis in NetBox, with one device acting as the chassis master and the rest as members. All components of member devices will appear on the master.
|
Sometimes it is necessary to model a set of physical devices as sharing a single management plane. Perhaps the most common example of such a scenario is stackable switches. These can be modeled as virtual chassis in NetBox, with one device acting as the chassis master and the rest as members. All components of member devices will appear on the master.
|
||||||
|
|
||||||
|
### Virtual Device Contexts
|
||||||
|
|
||||||
|
A virtual device context (VDC) is a logical partition within a device. Each VDC operates autonomously but shares a common pool of resources. Each interface can be assigned to one or more VDCs on its device.
|
||||||
|
|
||||||
## Module Types & Modules
|
## Module Types & Modules
|
||||||
|
|
||||||
Much like device types and devices, module types can instantiate discrete modules, which are hardware components installed within devices. Modules often have their own child components, which become available to the parent device. For example, when modeling a chassis-based switch with multiple line cards in NetBox, the chassis would be created (from a device type) as a device, and each of its line cards would be instantiated from a module type as a module installed in one of the device's module bays.
|
Much like device types and devices, module types can instantiate discrete modules, which are hardware components installed within devices. Modules often have their own child components, which become available to the parent device. For example, when modeling a chassis-based switch with multiple line cards in NetBox, the chassis would be created (from a device type) as a device, and each of its line cards would be instantiated from a module type as a module installed in one of the device's module bays.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Journaling
|
# Journaling
|
||||||
|
|
||||||
All primary objects in NetBox support journaling. A journal is a collection of human-generated notes and comments about an object maintained for historical context. It supplements NetBox's change log to provide additional information about why changes have been made or to convey events which occur outside NetBox. Unlike the change log, in which records typically expire after a configurable period of time, journal entries persist for the life of their associated object.
|
All primary and organizational models in NetBox support journaling. A journal is a collection of human-generated notes and comments about an object maintained for historical context. It supplements NetBox's change log to provide additional information about why changes have been made or to convey events which occur outside NetBox. Unlike the change log, in which records typically expire after a configurable period of time, journal entries persist for the life of their associated object.
|
||||||
|
|
||||||
Each journal entry has a selectable kind (info, success, warning, or danger) and a user-populated `comments` field. Each entry automatically records the date, time, and associated user upon being created.
|
Each journal entry has a selectable kind (info, success, warning, or danger) and a user-populated `comments` field. Each entry automatically records the date, time, and associated user upon being created.
|
||||||
|
|||||||
27
docs/features/search.md
Normal file
27
docs/features/search.md
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
# Search
|
||||||
|
|
||||||
|
## Global Search
|
||||||
|
|
||||||
|
NetBox includes a powerful global search engine, providing a single convenient interface to search across its complex data model. Relevant fields on each model are indexed according to their precedence, so that the most relevant results are returned first. When objects are created or modified, the search index is updated immediately, ensuring real-time accuracy.
|
||||||
|
|
||||||
|
When entering a search query, the user can choose a specific lookup type: exact match, partial match, etc. When a partial match is found, the matching portion of the applicable field value is included with each result so that the user can easily determine its relevance.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
## 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.
|
||||||
|
|
||||||
|
For example, suppose you often need to locate all planned devices of a certain type within a region. The applicable filters can be applied and then saved as custom named filter for reuse, such that
|
||||||
|
|
||||||
|
```
|
||||||
|
?status=planned&device_type_id=78®ion_id=12
|
||||||
|
```
|
||||||
|
|
||||||
|
becomes
|
||||||
|
|
||||||
|
```
|
||||||
|
?filter=my-custom-filter
|
||||||
|
```
|
||||||
|
|
||||||
|
These saved filters can be used both within the UI and for API queries.
|
||||||
23
docs/features/synchronized-data.md
Normal file
23
docs/features/synchronized-data.md
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# Synchronized Data
|
||||||
|
|
||||||
|
!!! info "This feature was introduced in NetBox v3.5."
|
||||||
|
|
||||||
|
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 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.)
|
||||||
|
|
||||||
|
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.
|
||||||
@@ -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
|
||||||
|
|||||||
@@ -20,12 +20,14 @@ To create a new object in NetBox, find the object type in the navigation menu an
|
|||||||
|
|
||||||
## Bulk Import (CSV/YAML)
|
## Bulk Import (CSV/YAML)
|
||||||
|
|
||||||
NetBox supports the bulk import of new objects using CSV-formatted data. This method can be ideal for importing spreadsheet data, which is very easy to convert to CSV data. CSV data can be imported either as raw text using the form field, or by uploading a properly formatted CSV file.
|
NetBox supports the bulk import of new objects, and updating of existing objects using CSV-formatted data. This method can be ideal for importing spreadsheet data, which is very easy to convert to CSV data. CSV data can be imported either as raw text using the form field, or by uploading a properly formatted CSV file.
|
||||||
|
|
||||||
When viewing the CSV import form for an object type, you'll notice that the headers for the required columns have been pre-populated. Each form has a table beneath it titled "CSV Field Options," which lists _all_ supported columns for your reference. (Generally, these map to the fields you see in the corresponding creation form for individual objects.)
|
When viewing the CSV import form for an object type, you'll notice that the headers for the required columns have been pre-populated. Each form has a table beneath it titled "CSV Field Options," which lists _all_ supported columns for your reference. (Generally, these map to the fields you see in the corresponding creation form for individual objects.)
|
||||||
|
|
||||||
<!-- TODO: Screenshot -->
|
<!-- TODO: Screenshot -->
|
||||||
|
|
||||||
|
If an "id" field is added the data will be used to update existing records instead of importing new objects.
|
||||||
|
|
||||||
Note that some models (namely device types and module types) do not support CSV import. Instead, they accept YAML-formatted data to facilitate the import of both the parent object as well as child components.
|
Note that some models (namely device types and module types) do not support CSV import. Instead, they accept YAML-formatted data to facilitate the import of both the parent object as well as child components.
|
||||||
|
|
||||||
## Scripting
|
## Scripting
|
||||||
|
|||||||
@@ -52,4 +52,4 @@ NetBox is built on the enormously popular [Django](http://www.djangoproject.com/
|
|||||||
* Try out our [public demo](https://demo.netbox.dev/) if you want to jump right in
|
* Try out our [public demo](https://demo.netbox.dev/) if you want to jump right in
|
||||||
* The [installation guide](./installation/index.md) will help you get your own deployment up and running
|
* The [installation guide](./installation/index.md) will help you get your own deployment up and running
|
||||||
* Or try the community [Docker image](https://github.com/netbox-community/netbox-docker) for a low-touch approach
|
* Or try the community [Docker image](https://github.com/netbox-community/netbox-docker) for a low-touch approach
|
||||||
* [NetBox Cloud](https://www.getnetbox.io/) is a hosted solution offered by NS1
|
* [NetBox Cloud](https://netboxlabs.com/netbox-cloud) is a managed solution offered by [NetBox Labs](https://netboxlabs.com/)
|
||||||
|
|||||||
@@ -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 10 or later required"
|
!!! warning "PostgreSQL 11 or later required"
|
||||||
NetBox requires PostgreSQL 10 or later. Please note that MySQL and other relational databases are **not** supported.
|
NetBox requires PostgreSQL 11 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 10 or later:
|
Before continuing, verify that you have installed PostgreSQL 11 or later:
|
||||||
|
|
||||||
```no-highlight
|
```no-highlight
|
||||||
psql -V
|
psql -V
|
||||||
@@ -54,7 +54,7 @@ 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;
|
||||||
```
|
```
|
||||||
|
|
||||||
!!! 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
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ This section of the documentation discusses installing and configuring the NetBo
|
|||||||
Begin by installing all system packages required by NetBox and its dependencies.
|
Begin by installing all system packages required by NetBox and its dependencies.
|
||||||
|
|
||||||
!!! warning "Python 3.8 or later required"
|
!!! warning "Python 3.8 or later required"
|
||||||
NetBox requires Python 3.8, 3.9, or 3.10.
|
NetBox requires Python 3.8, 3.9, 3.10 or 3.11.
|
||||||
|
|
||||||
=== "Ubuntu"
|
=== "Ubuntu"
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ This documentation provides two options for installing NetBox: from a downloadab
|
|||||||
Download the [latest stable release](https://github.com/netbox-community/netbox/releases) from GitHub as a tarball or ZIP archive and extract it to your desired path. In this example, we'll use `/opt/netbox` as the NetBox root.
|
Download the [latest stable release](https://github.com/netbox-community/netbox/releases) from GitHub as a tarball or ZIP archive and extract it to your desired path. In this example, we'll use `/opt/netbox` as the NetBox root.
|
||||||
|
|
||||||
```no-highlight
|
```no-highlight
|
||||||
sudo wget https://github.com/netbox-community/netbox/archive/vX.Y.Z.tar.gz
|
sudo wget https://github.com/netbox-community/netbox/archive/refs/tags/vX.Y.Z.tar.gz
|
||||||
sudo tar -xzf vX.Y.Z.tar.gz -C /opt
|
sudo tar -xzf vX.Y.Z.tar.gz -C /opt
|
||||||
sudo ln -s /opt/netbox-X.Y.Z/ /opt/netbox
|
sudo ln -s /opt/netbox-X.Y.Z/ /opt/netbox
|
||||||
```
|
```
|
||||||
@@ -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`.
|
||||||
@@ -225,6 +221,9 @@ Once NetBox has been configured, we're ready to proceed with the actual installa
|
|||||||
* Builds the documentation locally (for offline use)
|
* Builds the documentation locally (for offline use)
|
||||||
* Aggregate static resource files on disk
|
* Aggregate static resource files on disk
|
||||||
|
|
||||||
|
!!! warning
|
||||||
|
If you still have a Python virtual environment active from a previous installation step, disable it now by running the `deactivate` command. This will avoid errors on systems where `sudo` has been configured to preserve the user's current environment.
|
||||||
|
|
||||||
```no-highlight
|
```no-highlight
|
||||||
sudo /opt/netbox/upgrade.sh
|
sudo /opt/netbox/upgrade.sh
|
||||||
```
|
```
|
||||||
@@ -269,7 +268,10 @@ See the [housekeeping documentation](../administration/housekeeping.md) for furt
|
|||||||
|
|
||||||
## Test the Application
|
## Test the Application
|
||||||
|
|
||||||
At this point, we should be able to run NetBox's development server for testing. We can check by starting a development instance:
|
At this point, we should be able to run NetBox's development server for testing. We can check by starting a development instance locally.
|
||||||
|
|
||||||
|
!!! tip
|
||||||
|
Check that the Python virtual environment is still active before attempting to run the server.
|
||||||
|
|
||||||
```no-highlight
|
```no-highlight
|
||||||
python3 manage.py runserver 0.0.0.0:8000 --insecure
|
python3 manage.py runserver 0.0.0.0:8000 --insecure
|
||||||
|
|||||||
@@ -14,7 +14,10 @@ While the provided configuration should suffice for most initial installations,
|
|||||||
|
|
||||||
## systemd Setup
|
## systemd Setup
|
||||||
|
|
||||||
We'll use systemd to control both gunicorn and NetBox's background worker process. First, copy `contrib/netbox.service` and `contrib/netbox-rq.service` to the `/etc/systemd/system/` directory and reload the systemd daemon:
|
We'll use systemd to control both gunicorn and NetBox's background worker process. First, copy `contrib/netbox.service` and `contrib/netbox-rq.service` to the `/etc/systemd/system/` directory and reload the systemd daemon.
|
||||||
|
|
||||||
|
!!! warning "Check user & group assignment"
|
||||||
|
The stock service configuration files packaged with NetBox assume that the service will run with the `netbox` user and group names. If these differ on your installation, be sure to update the service files accordingly.
|
||||||
|
|
||||||
```no-highlight
|
```no-highlight
|
||||||
sudo cp -v /opt/netbox/contrib/*.service /etc/systemd/system/
|
sudo cp -v /opt/netbox/contrib/*.service /etc/systemd/system/
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -46,7 +46,7 @@ Next, create a file in the same directory as `configuration.py` (typically `/opt
|
|||||||
### General Server Configuration
|
### General Server Configuration
|
||||||
|
|
||||||
!!! info
|
!!! info
|
||||||
When using Windows Server 2012 you may need to specify a port on `AUTH_LDAP_SERVER_URI`. Use `3269` for secure, or `3268` for non-secure.
|
When using Active Directory you may need to specify a port on `AUTH_LDAP_SERVER_URI` to authenticate users from all domains in the forest. Use `3269` for secure, or `3268` for non-secure access to the GC (Global Catalog).
|
||||||
|
|
||||||
```python
|
```python
|
||||||
import ldap
|
import ldap
|
||||||
@@ -67,6 +67,16 @@ AUTH_LDAP_BIND_PASSWORD = "demo"
|
|||||||
# Note that this is a NetBox-specific setting which sets:
|
# 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.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_NEVER)
|
||||||
LDAP_IGNORE_CERT_ERRORS = True
|
LDAP_IGNORE_CERT_ERRORS = True
|
||||||
|
|
||||||
|
# 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'
|
||||||
```
|
```
|
||||||
|
|
||||||
STARTTLS can be configured by setting `AUTH_LDAP_START_TLS = True` and using the `ldap://` URI scheme.
|
STARTTLS can be configured by setting `AUTH_LDAP_START_TLS = True` and using the `ldap://` URI scheme.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# 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.
|
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 +18,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 | 10 |
|
| PostgreSQL | 11 |
|
||||||
| 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:
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ NetBox v3.0 and later require the following:
|
|||||||
| Dependency | Minimum Version |
|
| Dependency | Minimum Version |
|
||||||
|------------|-----------------|
|
|------------|-----------------|
|
||||||
| Python | 3.8 |
|
| Python | 3.8 |
|
||||||
| PostgreSQL | 10 |
|
| PostgreSQL | 11 |
|
||||||
| Redis | 4.0 |
|
| Redis | 4.0 |
|
||||||
|
|
||||||
## 3. Install the Latest Release
|
## 3. Install the Latest Release
|
||||||
@@ -28,16 +28,15 @@ NetBox v3.0 and later require the following:
|
|||||||
As with the initial installation, you can upgrade NetBox by either downloading the latest release package or by cloning the `master` branch of the git repository.
|
As with the initial installation, you can upgrade NetBox by either downloading the latest release package or by cloning the `master` branch of the git repository.
|
||||||
|
|
||||||
!!! warning
|
!!! warning
|
||||||
Use the same method as you used to install Netbox originally
|
Use the same method as you used to install NetBox originally
|
||||||
|
|
||||||
If you are not sure how Netbox was installed originally, check with this
|
If you are not sure how NetBox was installed originally, check with this command:
|
||||||
command:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
ls -ld /opt/netbox /opt/netbox/.git
|
ls -ld /opt/netbox /opt/netbox/.git
|
||||||
```
|
```
|
||||||
|
|
||||||
If Netbox was installed from a release package, then `/opt/netbox` will be a
|
If NetBox was installed from a release package, then `/opt/netbox` will be a
|
||||||
symlink pointing to the current version, and `/opt/netbox/.git` will not
|
symlink pointing to the current version, and `/opt/netbox/.git` will not
|
||||||
exist. If it was installed from git, then `/opt/netbox` and
|
exist. If it was installed from git, then `/opt/netbox` and
|
||||||
`/opt/netbox/.git` will both exist as normal directories.
|
`/opt/netbox/.git` will both exist as normal directories.
|
||||||
@@ -98,7 +97,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
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ NetBox provides both a singular and plural query field for each object type:
|
|||||||
|
|
||||||
For example, query `device(id:123)` to fetch a specific device (identified by its unique ID), and query `device_list` (with an optional set of filters) to fetch all devices.
|
For example, query `device(id:123)` to fetch a specific device (identified by its unique ID), and query `device_list` (with an optional set of filters) to fetch all devices.
|
||||||
|
|
||||||
For more detail on constructing GraphQL queries, see the [Graphene documentation](https://docs.graphene-python.org/en/latest/).
|
For more detail on constructing GraphQL queries, see the [Graphene documentation](https://docs.graphene-python.org/en/latest/) as well as the [GraphQL queries documentation](https://graphql.org/learn/queries/).
|
||||||
|
|
||||||
## Filtering
|
## Filtering
|
||||||
|
|
||||||
@@ -56,6 +56,47 @@ The GraphQL API employs the same filtering logic as the UI and REST API. Filters
|
|||||||
```
|
```
|
||||||
{"query": "query {site_list(region:\"north-carolina\", status:\"active\") {name}}"}
|
{"query": "query {site_list(region:\"north-carolina\", status:\"active\") {name}}"}
|
||||||
```
|
```
|
||||||
|
In addition, filtering can be done on list of related objects as shown in the following query:
|
||||||
|
|
||||||
|
```
|
||||||
|
{
|
||||||
|
device_list {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
interfaces(enabled: true) {
|
||||||
|
name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Multiple Return Types
|
||||||
|
|
||||||
|
Certain queries can return multiple types of objects, for example cable terminations can return circuit terminations, console ports and many others. These can be queried using [inline fragments](https://graphql.org/learn/schema/#union-types) as shown below:
|
||||||
|
|
||||||
|
```
|
||||||
|
{
|
||||||
|
cable_list {
|
||||||
|
id
|
||||||
|
a_terminations {
|
||||||
|
... on CircuitTerminationType {
|
||||||
|
id
|
||||||
|
class_type
|
||||||
|
}
|
||||||
|
... on ConsolePortType {
|
||||||
|
id
|
||||||
|
class_type
|
||||||
|
}
|
||||||
|
... on ConsoleServerPortType {
|
||||||
|
id
|
||||||
|
class_type
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
The field "class_type" is an easy way to distinguish what type of object it is when viewing the returned data, or when filtering. It contains the class name, for example "CircuitTermination" or "ConsoleServerPort".
|
||||||
|
|
||||||
## Authentication
|
## Authentication
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
@@ -579,13 +579,21 @@ By default, a token can be used to perform all actions via the API that a user w
|
|||||||
|
|
||||||
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.
|
||||||
|
|
||||||
#### Client IP Restriction
|
!!! warning "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.
|
||||||
|
|
||||||
!!! note
|
#### Client IP Restriction
|
||||||
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 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
|
||||||
|
|
||||||
@@ -630,7 +638,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"
|
||||||
}'
|
}'
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -654,3 +662,28 @@ 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`
|
||||||
|
|
||||||
|
!!! info "This feature was introduced in NetBox v3.5."
|
||||||
|
|
||||||
|
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.
|
||||||
|
|||||||
9
docs/integrations/synchronized-data.md
Normal file
9
docs/integrations/synchronized-data.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# 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).
|
||||||
|
|
||||||
|
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)
|
||||||
@@ -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,6 +17,7 @@ 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
|
||||||
* Power distribution modeling
|
* Power distribution modeling
|
||||||
* Data circuit and provider tracking
|
* Data circuit and provider tracking
|
||||||
@@ -29,13 +30,13 @@ 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 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
|
||||||
|
|
||||||
## What NetBox Is Not
|
## What NetBox Is Not
|
||||||
|
|
||||||
@@ -74,6 +75,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 10+ |
|
| Database | PostgreSQL 11+ |
|
||||||
| Task queuing | Redis/django-rq |
|
| Task queuing | Redis/django-rq |
|
||||||
| Live device access | NAPALM (optional) |
|
|
||||||
|
|||||||
BIN
docs/media/admin_ui_grant_permission.png
Normal file
BIN
docs/media/admin_ui_grant_permission.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 174 KiB After Width: | Height: | Size: 173 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 173 KiB After Width: | Height: | Size: 171 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.
|
||||||
|
|||||||
19
docs/models/circuits/provideraccount.md
Normal file
19
docs/models/circuits/provideraccount.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# Provider Accounts
|
||||||
|
|
||||||
|
!!! info "This model was introduced in NetBox v3.5."
|
||||||
|
|
||||||
|
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
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
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
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.
|
||||||
@@ -72,6 +72,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.
|
||||||
|
|||||||
@@ -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.
|
||||||
@@ -41,6 +45,10 @@ Indicates whether this is a parent type (capable of housing child devices), a ch
|
|||||||
|
|
||||||
The default direction in which airflow circulates within the device chassis. This may be configured differently for instantiated devices (e.g. because of different fan modules).
|
The default direction in which airflow circulates within the device chassis. This may be configured differently for instantiated devices (e.g. because of different fan modules).
|
||||||
|
|
||||||
|
### Weight
|
||||||
|
|
||||||
|
The numeric weight of the device, including a unit designation (e.g. 10 kilograms or 20 pounds).
|
||||||
|
|
||||||
### Front & Rear Images
|
### Front & Rear Images
|
||||||
|
|
||||||
Users can upload illustrations of the device's front and rear panels. If present, these will be used to render the device in [rack](./rack.md) elevation diagrams.
|
Users can upload illustrations of the device's front and rear panels. If present, these will be used to render the device in [rack](./rack.md) elevation diagrams.
|
||||||
|
|||||||
@@ -18,6 +18,13 @@ The [module bay](./modulebay.md) into which the module is installed.
|
|||||||
|
|
||||||
The [module type](./moduletype.md) which represents the physical make & model of hardware. By default, module components will be instantiated automatically from the module type when creating a new module.
|
The [module type](./moduletype.md) which represents the physical make & model of hardware. By default, module components will be instantiated automatically from the module type when creating a new module.
|
||||||
|
|
||||||
|
### Status
|
||||||
|
|
||||||
|
The module's operational status.
|
||||||
|
|
||||||
|
!!! tip
|
||||||
|
Additional statuses may be defined by setting `Module.status` under the [`FIELD_CHOICES`](../../configuration/data-validation.md#field_choices) configuration parameter.
|
||||||
|
|
||||||
### Serial Number
|
### Serial Number
|
||||||
|
|
||||||
The unique physical serial number assigned to this module by its manufacturer.
|
The unique physical serial number assigned to this module by its manufacturer.
|
||||||
|
|||||||
@@ -35,3 +35,7 @@ The model number assigned to this module type by its manufacturer. Must be uniqu
|
|||||||
### Part Number
|
### Part Number
|
||||||
|
|
||||||
An alternative part number to uniquely identify the module type.
|
An alternative part number to uniquely identify the module type.
|
||||||
|
|
||||||
|
### Weight
|
||||||
|
|
||||||
|
The numeric weight of the module, including a unit designation (e.g. 3 kilograms or 1 pound).
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ A platform defines the type of software running on a [device](./device.md) or [v
|
|||||||
|
|
||||||
Platforms may optionally be limited by [manufacturer](./manufacturer.md): If a platform is assigned to a particular manufacturer, it can only be assigned to devices with a type belonging to that manufacturer.
|
Platforms may optionally be limited by [manufacturer](./manufacturer.md): If a platform is assigned to a particular manufacturer, it can only be assigned to devices with a type belonging to that manufacturer.
|
||||||
|
|
||||||
The platform model is also used to indicate which [NAPALM driver](../../integrations/napalm.md) (if any) and any associated arguments NetBox should use when connecting to a remote device. The name of the driver along with optional parameters are stored with the platform.
|
|
||||||
|
|
||||||
The assignment of platforms to devices is an optional feature, and may be disregarded if not desired.
|
The assignment of platforms to devices is an optional feature, and may be disregarded if not desired.
|
||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
@@ -22,10 +20,20 @@ A unique URL-friendly identifier. (This value can be used for filtering.)
|
|||||||
|
|
||||||
If designated, this platform will be available for use only to devices assigned to this [manufacturer](./manufacturer.md). This can be handy e.g. for limiting network operating systems to use on hardware produced by the relevant vendor. However, it should not be used when defining general-purpose software platforms.
|
If designated, this platform will be available for use only to devices assigned to this [manufacturer](./manufacturer.md). This can be handy e.g. for limiting network operating systems to use on hardware produced by the relevant vendor. However, it should not be used when defining general-purpose software platforms.
|
||||||
|
|
||||||
|
### Configuration Template
|
||||||
|
|
||||||
|
The default [configuration template](../extras/configtemplate.md) for devices assigned to this platform.
|
||||||
|
|
||||||
### NAPALM Driver
|
### NAPALM Driver
|
||||||
|
|
||||||
|
!!! warning "Deprecated Field"
|
||||||
|
NAPALM integration was removed from NetBox core in v3.5 and is now available as a [plugin](https://github.com/netbox-community/netbox-napalm). This field will be removed in NetBox v3.6.
|
||||||
|
|
||||||
The [NAPALM driver](https://napalm.readthedocs.io/en/latest/support/index.html) associated with this platform.
|
The [NAPALM driver](https://napalm.readthedocs.io/en/latest/support/index.html) associated with this platform.
|
||||||
|
|
||||||
### NAPALM Arguments
|
### NAPALM Arguments
|
||||||
|
|
||||||
|
!!! warning "Deprecated Field"
|
||||||
|
NAPALM integration was removed from NetBox core in v3.5 and is now available as a [plugin](https://github.com/netbox-community/netbox-napalm). This field will be removed in NetBox v3.6.
|
||||||
|
|
||||||
Any additional arguments to send when invoking the NAPALM driver assigned to this platform.
|
Any additional arguments to send when invoking the NAPALM driver assigned to this platform.
|
||||||
|
|||||||
@@ -65,6 +65,18 @@ The height of the rack, measured in units.
|
|||||||
|
|
||||||
The external width and depth of the rack can be tracked to aid in floorplan calculations. These measurements must be designated in either millimeters or inches.
|
The external width and depth of the rack can be tracked to aid in floorplan calculations. These measurements must be designated in either millimeters or inches.
|
||||||
|
|
||||||
|
### Mounting Depth
|
||||||
|
|
||||||
|
The maximum depth of a mounted device that the rack can accommodate, in millimeters. For four-post frames or cabinets, this is the horizontal distance between the front and rear vertical rails. (Note that this measurement does _not_ include space between the rails and the cabinet doors.)
|
||||||
|
|
||||||
|
### Weight
|
||||||
|
|
||||||
|
The numeric weight of the rack, including a unit designation (e.g. 10 kilograms or 20 pounds).
|
||||||
|
|
||||||
|
### Maximum Weight
|
||||||
|
|
||||||
|
The maximum total weight capacity for all installed devices, inclusive of the rack itself.
|
||||||
|
|
||||||
### Descending Units
|
### Descending Units
|
||||||
|
|
||||||
If selected, the rack's elevation will display unit 1 at the top of the rack. (Most racks use asceneding numbering, with unit 1 assigned to the bottommost position.)
|
If selected, the rack's elevation will display unit 1 at the top of the rack. (Most racks use ascending numbering, with unit 1 assigned to the bottommost position.)
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ Each site can have multiple [AS numbers](../ipam/asn.md) assigned to it.
|
|||||||
|
|
||||||
### Time Zone
|
### Time Zone
|
||||||
|
|
||||||
The site's local time zone. (Time zones are provided by the [pytz](https://pypi.org/project/pytz/) package.)
|
The site's local time zone. (Time zones are provided by the [zoneinfo](https://docs.python.org/3/library/zoneinfo.html) library.)
|
||||||
|
|
||||||
### Physical Address
|
### Physical Address
|
||||||
|
|
||||||
|
|||||||
33
docs/models/dcim/virtualdevicecontext.md
Normal file
33
docs/models/dcim/virtualdevicecontext.md
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
# Virtual Device Context
|
||||||
|
|
||||||
|
A virtual device context (VDC) represents a logical partition within a physical device, to which interfaces from the parent device can be allocated. Each VDC effectively provides an isolated control plane, but relies on shared resources of the parent device. A VDC is somewhat similar to a virtual machine in that it effects isolation between various components, but stops short of delivering a fully virtualized environment.
|
||||||
|
|
||||||
|
Each VDC must be assigned to a device upon creation, after which interfaces belonging to that device can be assigned to one or more of its VDCs. A VDC can have any number of interfaces assigned to it, and an interface can belong to any number of VDCs.
|
||||||
|
|
||||||
|
!!! info "A VDC by Any Other Name"
|
||||||
|
Network vendors use differing names for this concept. Cisco uses the term VDC, whereas Juniper refers to it as a _Virtual Routing Instance_, and Fortinet uses _Virtual Domain_, for instance. While there may be some nuance among the vendors' unique implementations, the general concept remains the same for each.
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
### Device
|
||||||
|
|
||||||
|
The device to which this VDC belongs.
|
||||||
|
|
||||||
|
### Name
|
||||||
|
|
||||||
|
The VDC's configured name. Must be unique to the assigned device.
|
||||||
|
|
||||||
|
### Status
|
||||||
|
|
||||||
|
The operational status of the VDC.
|
||||||
|
|
||||||
|
### Identifier
|
||||||
|
|
||||||
|
A vendor-prescribed unique identifier for the VDC (optional). Must be unique to the assigned device if defined.
|
||||||
|
|
||||||
|
### Primary IPv4 & IPv6 Addresses
|
||||||
|
|
||||||
|
Each VDC may designate one primary IPv4 address and/or one primary IPv6 address for management purposes.
|
||||||
|
|
||||||
|
!!! tip
|
||||||
|
NetBox will prefer IPv6 addresses over IPv4 addresses by default. This can be changed by setting the `PREFER_IPV4` configuration parameter.
|
||||||
13
docs/models/extras/branch.md
Normal file
13
docs/models/extras/branch.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# Branches
|
||||||
|
|
||||||
|
A branch is a collection of related [staged changes](./stagedchange.md) that have been prepared for merging into the active database. A branch can be merged by executing its `commit()` method. Deleting a branch will delete all its related changes.
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
### Name
|
||||||
|
|
||||||
|
The branch's name.
|
||||||
|
|
||||||
|
### User
|
||||||
|
|
||||||
|
The user to which the branch belongs (optional).
|
||||||
@@ -18,6 +18,10 @@ A numeric value which influences the order in which context data is merged. Cont
|
|||||||
|
|
||||||
The context data expressed in JSON format.
|
The context data expressed in JSON format.
|
||||||
|
|
||||||
|
### Data File
|
||||||
|
|
||||||
|
Config context data may optionally be sourced from a remote [data file](../core/datafile.md), which is synchronized from a remote data source. When designating a data file, there is no need to specify local data for the config context: It will be populated automatically from the data file.
|
||||||
|
|
||||||
### Is Active
|
### Is Active
|
||||||
|
|
||||||
If not selected, this config context will be excluded from rendering. This can be convenient to temporarily disable a config context.
|
If not selected, this config context will be excluded from rendering. This can be convenient to temporarily disable a config context.
|
||||||
|
|||||||
29
docs/models/extras/configtemplate.md
Normal file
29
docs/models/extras/configtemplate.md
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
# Configuration Templates
|
||||||
|
|
||||||
|
Configuration templates can be used to render [device](../dcim/device.md) configurations from [context data](../../features/context-data.md). Templates are written in the [Jinja2 language](https://jinja.palletsprojects.com/) and can be associated with devices roles, platforms, and/or individual devices.
|
||||||
|
|
||||||
|
Context data is made available to [devices](../dcim/device.md) and/or [virtual machines](../virtualization/virtualmachine.md) based on their relationships to other objects in NetBox. For example, context data can be associated only with devices assigned to a particular site, or only to virtual machines in a certain cluster.
|
||||||
|
|
||||||
|
See the [configuration rendering documentation](../../features/configuration-rendering.md) for more information.
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
### Name
|
||||||
|
|
||||||
|
A unique human-friendly name.
|
||||||
|
|
||||||
|
### Weight
|
||||||
|
|
||||||
|
A numeric value which influences the order in which context data is merged. Contexts with a lower weight are merged before those with a higher weight.
|
||||||
|
|
||||||
|
### Data File
|
||||||
|
|
||||||
|
Template code may optionally be sourced from a remote [data file](../core/datafile.md), which is synchronized from a remote data source. When designating a data file, there is no need to specify template code: It will be populated automatically from the data file.
|
||||||
|
|
||||||
|
### Template Code
|
||||||
|
|
||||||
|
Jinja2 template code, if being defined locally rather than replicated from a data file.
|
||||||
|
|
||||||
|
### Environment Parameters
|
||||||
|
|
||||||
|
A dictionary of any additional parameters to pass when instantiating the [Jinja2 environment](https://jinja.palletsprojects.com/en/3.1.x/api/#jinja2.Environment). Jinja2 supports various optional parameters which can be used to modify its default behavior.
|
||||||
@@ -69,10 +69,11 @@ Defines how filters are evaluated against custom field values.
|
|||||||
Controls how and whether the custom field is displayed within the NetBox user interface.
|
Controls how and whether the custom field is displayed within the NetBox user interface.
|
||||||
|
|
||||||
| Option | Description |
|
| Option | Description |
|
||||||
|------------|--------------------------------------|
|
|-------------------|--------------------------------------------------|
|
||||||
| Read/write | Display and permit editing (default) |
|
| Read/write | Display and permit editing (default) |
|
||||||
| Read-only | Display field but disallow editing |
|
| Read-only | Display field but disallow editing |
|
||||||
| Hidden | Do not display field in the UI |
|
| Hidden | Do not display field in the UI |
|
||||||
|
| Hidden (if unset) | Display in the UI only when a value has been set |
|
||||||
|
|
||||||
### Default
|
### Default
|
||||||
|
|
||||||
@@ -82,6 +83,10 @@ The default value to populate for the custom field when creating new objects (op
|
|||||||
|
|
||||||
For choice and multi-choice custom fields only. A comma-delimited list of the available choices.
|
For choice and multi-choice custom fields only. A comma-delimited list of the available choices.
|
||||||
|
|
||||||
|
### Cloneable
|
||||||
|
|
||||||
|
If enabled, values from this field will be automatically pre-populated when cloning existing objects.
|
||||||
|
|
||||||
### Minimum Value
|
### Minimum Value
|
||||||
|
|
||||||
For numeric custom fields only. The minimum valid value (optional).
|
For numeric custom fields only. The minimum valid value (optional).
|
||||||
|
|||||||
@@ -12,6 +12,10 @@ The name of the export template. This will appear in the "export" dropdown list
|
|||||||
|
|
||||||
The type of NetBox object to which the export template applies.
|
The type of NetBox object to which the export template applies.
|
||||||
|
|
||||||
|
### Data File
|
||||||
|
|
||||||
|
Template code may optionally be sourced from a remote [data file](../core/datafile.md), which is synchronized from a remote data source. When designating a data file, there is no need to specify local content for the template: It will be populated automatically from the data file.
|
||||||
|
|
||||||
### Template Code
|
### Template Code
|
||||||
|
|
||||||
Jinja2 template code for rendering the exported data.
|
Jinja2 template code for rendering the exported data.
|
||||||
|
|||||||
47
docs/models/extras/savedfilter.md
Normal file
47
docs/models/extras/savedfilter.md
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
# Saved Filters
|
||||||
|
|
||||||
|
When filtering lists of objects in NetBox, users can save applied filters for future use. This is handy for complex filter strategies involving multiple discrete filters. For example, you might want to find all planned devices within a region that have a specific platform. Once you've applied the desired filters to the object list, simply create a saved filter with name and optional description. This filter can then be applied directly for future queries via both the UI and REST API.
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
### Name
|
||||||
|
|
||||||
|
The filter's human-friendly name.
|
||||||
|
|
||||||
|
### Slug
|
||||||
|
|
||||||
|
The unique identifier by which this filter will be referenced during application (e.g. `?filter=my-slug`).
|
||||||
|
|
||||||
|
### User
|
||||||
|
|
||||||
|
The user to which this filter belongs. The current user will be assigned automatically when creating saved filters via the UI, and cannot be changed.
|
||||||
|
|
||||||
|
### Weight
|
||||||
|
|
||||||
|
A numeric weight used to override alphabetic ordering of filters by name. Saved filters with a lower weight will be listed before those with a higher weight.
|
||||||
|
|
||||||
|
### Enabled
|
||||||
|
|
||||||
|
Determines whether this filter can be used. Disabled filters will not appear as options in the UI, however they will be included in API results.
|
||||||
|
|
||||||
|
### Shared
|
||||||
|
|
||||||
|
Determines whether this filter is intended for use by all users or only its owner. Note that disabling this field does **not** hide the filter from other users; it is merely excluded from the list of available filters in UI object list views.
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
The query parameters to apply when the filter is active. These must be specified as JSON data. For example, the URL query string
|
||||||
|
|
||||||
|
```
|
||||||
|
?status=active®ion_id=51&tag=alpha&tag=bravo
|
||||||
|
```
|
||||||
|
|
||||||
|
is represented in JSON as
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"tag": ["alpha", "bravo"],
|
||||||
|
"status": "active",
|
||||||
|
"region_id": 51
|
||||||
|
}
|
||||||
|
```
|
||||||
26
docs/models/extras/stagedchange.md
Normal file
26
docs/models/extras/stagedchange.md
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
# Staged Changes
|
||||||
|
|
||||||
|
A staged change represents the creation of a new object or the modification or deletion of an existing object to be performed at some future point. Each change must be assigned to a [branch](./branch.md).
|
||||||
|
|
||||||
|
Changes can be applied individually via the `apply()` method, however it is recommended to apply changes in bulk using the parent branch's `commit()` method.
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
!!! warning
|
||||||
|
Staged changes are not typically created or manipulated directly, but rather effected through the use of the [`checkout()`](../../plugins/development/staged-changes.md) context manager.
|
||||||
|
|
||||||
|
### Branch
|
||||||
|
|
||||||
|
The [branch](./branch.md) to which this change belongs.
|
||||||
|
|
||||||
|
### Action
|
||||||
|
|
||||||
|
The type of action this change represents: `create`, `update`, or `delete`.
|
||||||
|
|
||||||
|
### Object
|
||||||
|
|
||||||
|
A generic foreign key referencing the existing object to which this change applies.
|
||||||
|
|
||||||
|
### Data
|
||||||
|
|
||||||
|
JSON representation of the changes being made to the object (not applicable for deletions).
|
||||||
@@ -23,10 +23,12 @@ If not selected, the webhook will be inactive.
|
|||||||
The events which will trigger the webhook. At least one event type must be selected.
|
The events which will trigger the webhook. At least one event type must be selected.
|
||||||
|
|
||||||
| Name | Description |
|
| Name | Description |
|
||||||
|-----------|--------------------------------------|
|
|------------|--------------------------------------|
|
||||||
| Creations | A new object has been created |
|
| Creations | A new object has been created |
|
||||||
| Updates | An existing object has been modified |
|
| Updates | An existing object has been modified |
|
||||||
| Deletions | An object has been deleted |
|
| Deletions | An object has been deleted |
|
||||||
|
| Job starts | A job for an object starts |
|
||||||
|
| Job ends | A job for an object terminates |
|
||||||
|
|
||||||
### URL
|
### URL
|
||||||
|
|
||||||
@@ -58,6 +60,10 @@ Jinja2 template for a custom request body, if desired. If not defined, NetBox wi
|
|||||||
|
|
||||||
A secret string used to prove authenticity of the request (optional). This will append a `X-Hook-Signature` header to the request, consisting of a HMAC (SHA-512) hex digest of the request body using the secret as the key.
|
A secret string used to prove authenticity of the request (optional). This will append a `X-Hook-Signature` header to the request, consisting of a HMAC (SHA-512) hex digest of the request body using the secret as the key.
|
||||||
|
|
||||||
|
### Conditions
|
||||||
|
|
||||||
|
A set of [prescribed conditions](../../reference/conditions.md) against which the triggering object will be evaluated. If the conditions are defined but not met by the object, the webhook will not be sent. A webhook that does not define any conditions will _always_ trigger.
|
||||||
|
|
||||||
### SSL Verification
|
### SSL Verification
|
||||||
|
|
||||||
Controls whether validation of the receiver's SSL certificate is enforced when HTTPS is used.
|
Controls whether validation of the receiver's SSL certificate is enforced when HTTPS is used.
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
# ASN
|
# ASNs
|
||||||
|
|
||||||
An Autonomous System Number (ASN) is a numeric identifier used in the BGP protocol to identify which [autonomous system](https://en.wikipedia.org/wiki/Autonomous_system_%28Internet%29) a particular prefix is originating and transiting through. NetBox support both 32- and 64- ASNs.
|
An Autonomous System Number (ASN) is a numeric identifier used in the BGP protocol to identify which [autonomous system](https://en.wikipedia.org/wiki/Autonomous_system_%28Internet%29) a particular prefix is originating and transiting through. NetBox support both 32- and 64- ASNs.
|
||||||
|
|
||||||
ASNs must be globally unique within NetBox, must each may be assigned to multiple [sites](../dcim/site.md).
|
ASNs must be globally unique within NetBox, and may be allocated from within a [defined range](./asnrange.md). Each ASN may be assigned to multiple [sites](../dcim/site.md).
|
||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
|
|||||||
23
docs/models/ipam/asnrange.md
Normal file
23
docs/models/ipam/asnrange.md
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# ASN Ranges
|
||||||
|
|
||||||
|
!!! info "This model was introduced in NetBox v3.5."
|
||||||
|
|
||||||
|
Ranges can be defined to group [AS numbers](./asn.md) numerically and to facilitate their automatic provisioning. Each range must be assigned to a [RIR](./rir.md).
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
### Name
|
||||||
|
|
||||||
|
A unique human-friendly name for the range.
|
||||||
|
|
||||||
|
### Slug
|
||||||
|
|
||||||
|
A unique URL-friendly identifier. (This value can be used for filtering.)
|
||||||
|
|
||||||
|
### RIR
|
||||||
|
|
||||||
|
The [Regional Internet Registry](./rir.md) or similar authority responsible for the allocation of AS numbers within this range.
|
||||||
|
|
||||||
|
### Start & End
|
||||||
|
|
||||||
|
The starting and ending numeric boundaries of the range (inclusive).
|
||||||
@@ -19,6 +19,10 @@ The wire protocol employed by cooperating servers to maintain the virtual [IP ad
|
|||||||
|
|
||||||
The group's numeric identifier.
|
The group's numeric identifier.
|
||||||
|
|
||||||
|
### Name
|
||||||
|
|
||||||
|
An optional name for the FHRP group.
|
||||||
|
|
||||||
### Authentication Type
|
### Authentication Type
|
||||||
|
|
||||||
The type of authentication employed by group nodes, if any.
|
The type of authentication employed by group nodes, if any.
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ The IPv4 or IPv6 address and mask, in CIDR notation (e.g. `192.0.2.0/24`).
|
|||||||
The operational status of the IP address.
|
The operational status of the IP address.
|
||||||
|
|
||||||
!!! tip
|
!!! tip
|
||||||
Additional statuses may be defined by setting `IPAddress.status` under the [`FIELD_CHOICES`](../../configuration/data-validation.md#field_choices) configuration parameter.
|
Additional statuses may be defined by setting `ipam.IPAddress.status` under the [`FIELD_CHOICES`](../../configuration/data-validation.md#field_choices) configuration parameter.
|
||||||
|
|
||||||
### Role
|
### Role
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user