Compare commits

...

1680 Commits

Author SHA1 Message Date
Jeremy Stretch
7d1614b933 Merge pull request #4589 from netbox-community/develop
Release v2.8.2
2020-05-06 15:14:45 -04:00
Jeremy Stretch
c9d0293bd0 Release v2.8.2 2020-05-06 15:04:01 -04:00
Jeremy Stretch
2e25f6b217 Update release notes index 2020-05-06 15:03:35 -04:00
Jeremy Stretch
cd0eb0d8ce Fixes #4588: Restore ability to add/remove tags on services, virtual chassis in bulk 2020-05-06 15:00:01 -04:00
Jeremy Stretch
a4dbd2dae5 Closes #3064: Include tags in object lists as a toggleable table column 2020-05-06 14:42:51 -04:00
Jeremy Stretch
fbc8b46d13 Cosmetic tweaks to the user area 2020-05-06 13:25:17 -04:00
Jeremy Stretch
881b0a6add Changelog for #4584 2020-05-06 12:49:04 -04:00
Jeremy Stretch
5378f01462 Merge pull request #4586 from netbox-community/4584-id-filters
Fixes #4584
2020-05-06 12:47:38 -04:00
Jeremy Stretch
3baf983e86 Updated REST API documentation 2020-05-06 12:46:24 -04:00
Jeremy Stretch
1ccb3162ff Ensure all model FilterSets support the 'id' field 2020-05-06 12:33:52 -04:00
Jeremy Stretch
4d5d298ee1 Update super() call for get_filters() 2020-05-06 11:47:05 -04:00
Jeremy Stretch
b1aa7fa7f8 Changelog for #3147 2020-05-06 10:16:23 -04:00
Jeremy Stretch
9312dea2b2 Merge pull request #4564 from netbox-community/3147-csv-import-fields
Closes #3147: Allow dynamic access to related objects during CSV import
2020-05-06 10:15:00 -04:00
Jeremy Stretch
270d61ce1b Remove boilerplate error messages from CSV model choice fields 2020-05-06 09:58:12 -04:00
Jeremy Stretch
70d0a5f665 Introduce CSVModelChoiceField to provide better validation for CSV model choices 2020-05-06 09:43:10 -04:00
Jeremy Stretch
607744813a Extend tests for CSV import 2020-05-05 16:49:16 -04:00
Jeremy Stretch
839e999a71 Introduce CSVModelForm for dynamic CSV imports 2020-05-05 16:15:09 -04:00
Jeremy Stretch
0239be9be5 Fixes #4578: Prevent setting 0U height on device type with racked instances 2020-05-05 13:41:23 -04:00
Jeremy Stretch
6e2c68ef42 Fixes #4652: Update repo RPM link for PosgtreSQL on CentOS 2020-05-05 13:05:54 -04:00
Jeremy Stretch
d85d963842 Remove example choices from CSV import form 2020-05-04 16:30:21 -04:00
Jeremy Stretch
3d8001ae1c Changelog for #492 2020-05-04 15:14:52 -04:00
Jeremy Stretch
80f08e6830 Merge pull request #4555 from netbox-community/492-table-column-ordering
Closes #492: Table column ordering
2020-05-04 15:12:29 -04:00
Jeremy Stretch
7c4d634ae6 Fix group column on RackTable 2020-05-04 14:56:29 -04:00
Jeremy Stretch
51ccbdf6c4 Remove descriptions from interface connections list 2020-05-04 14:10:40 -04:00
Jeremy Stretch
b0478a7e5b Enable dynamic queryset field prefetching based on table columns 2020-05-04 14:08:11 -04:00
koratfood
e6598fac20 Replace supervisord with systemd in LDAP troubleshooting (#4569)
Update the LDAP troubleshooting steps so that they are consistent with the rest of the documentaiton, which nowadays expects us to be running netbox via systemd instead of supervisord. Fixes #4504.
2020-05-04 09:56:03 -04:00
Jeremy Stretch
f9f7c19d81 Clean up CSV import table 2020-05-01 16:01:55 -04:00
Jeremy Stretch
4486957b9a Clean up comments 2020-05-01 16:01:30 -04:00
Jeremy Stretch
718ff4a743 Update help_texts for models, import forms 2020-05-01 15:40:34 -04:00
Jeremy Stretch
fa630c048c Overhaul CSV import template 2020-05-01 14:26:04 -04:00
Jeremy Stretch
4b8ef6b09a Removed FlexibleModelChoiceField 2020-05-01 13:40:52 -04:00
Jeremy Stretch
61ae4be16a Add tests for CSVDataField 2020-05-01 13:32:28 -04:00
Jeremy Stretch
34a17d4571 Enable the specifcation of related objects by arbitrary attribute during CSV import 2020-05-01 12:18:04 -04:00
Jeremy Stretch
6ab046ba8f Fix tests for #4502 2020-04-30 15:43:33 -04:00
Jeremy Stretch
05cb47e650 Closes #4502: Enable configuration of proxies for outbound HTTP requests 2020-04-30 14:59:13 -04:00
Jeremy Stretch
e75c4c012d Closes #4554: Add HDOT Cx power outlet type 2020-04-30 13:39:12 -04:00
Jeremy Stretch
bcb7899b04 Fixes #4548: Fix tracing cables through a single RearPort 2020-04-29 16:32:30 -04:00
Jeremy Stretch
81ffa0811e Closes #4556: Update form for adding devices to clusters 2020-04-29 15:50:16 -04:00
Jeremy Stretch
f8060ce112 Ignore clearing of invalid user config keys 2020-04-29 15:05:29 -04:00
Jeremy Stretch
3b6d9dc552 Add button to select all columns 2020-04-29 14:56:22 -04:00
Jeremy Stretch
c096232cb1 #492: Extend virtualization tables 2020-04-29 11:42:44 -04:00
Jeremy Stretch
33c44c2dd9 #492: Extend tenancy tables 2020-04-29 11:34:51 -04:00
Jeremy Stretch
cd0ee4cd69 #492: Extend secrets tables 2020-04-29 11:32:53 -04:00
Jeremy Stretch
6e9e6af2f0 #492: Extend IPAM tables 2020-04-29 11:29:30 -04:00
Jeremy Stretch
7ad27a2b65 #492: Extend extras tables 2020-04-29 11:03:49 -04:00
Jeremy Stretch
e3cfc9ad80 #492: Extend DCIM tables 2020-04-29 10:58:08 -04:00
Jeremy Stretch
88687608e7 Always include the 'actions' column, if present 2020-04-29 10:17:52 -04:00
Jeremy Stretch
ed21ff52ee Merge branch 'develop' into 492-table-column-ordering 2020-04-29 10:08:56 -04:00
Jeremy Stretch
f98a236a5b Changelog for #4545 2020-04-29 09:46:24 -04:00
Jeremy Stretch
5f8970e6bf Merge pull request #4552 from netbox-community/4545-remove-squashed-migrations
Fixes #4545: Remove squashed migrations
2020-04-29 09:45:09 -04:00
Jeremy Stretch
f535ef4924 Update development docs to remove squashing instructions 2020-04-29 09:44:41 -04:00
Jeremy Stretch
6e832de4a9 Remove squashed migrations 2020-04-29 09:31:52 -04:00
Jeremy Stretch
3226e7f6df Merge pull request #4550 from kobayashi/4549-webhook-utf8
Fix: #4549 encode webhook body in utf-8
2020-04-29 08:57:17 -04:00
kobayashi
39ea14202e Fix 4549 webhook body encode in utf-8 2020-04-29 01:48:53 -04:00
Jeremy Stretch
55b40d92d4 Extend DCIM tables (WIP) 2020-04-28 17:06:16 -04:00
Jeremy Stretch
8ec2e3cc7b Introduce default_columns Meta parameter to reduce boilerplate 2020-04-28 16:33:06 -04:00
Jeremy Stretch
725e3cdbf3 Extend circuits tables to include all relevant model fields 2020-04-28 16:20:11 -04:00
Jeremy Stretch
96eafe6dc1 Document table columns preference 2020-04-28 14:32:32 -04:00
Jeremy Stretch
f51e7519dc Enable reordering table columns 2020-04-28 14:27:27 -04:00
Jeremy Stretch
3442ec77a7 Enable setting/clearing of table column prefs 2020-04-28 13:21:58 -04:00
Jeremy Stretch
e8d493578b Create form for setting table preferences 2020-04-28 12:14:51 -04:00
Jeremy Stretch
0ee1112d9d Initial support for table column reordering 2020-04-27 16:56:25 -04:00
Jeremy Stretch
4971054c34 Standardize import statement as django_rq is no longer optional 2020-04-24 15:43:58 -04:00
Jeremy Stretch
d8cb58c746 #4416: Add bulk edit & delete views for VirtualChassis 2020-04-24 15:20:52 -04:00
Jeremy Stretch
eb14c08cab #4416: Enable custom links for virtual chassis 2020-04-24 15:01:23 -04:00
Jeremy Stretch
fed9408b90 #4416: Establish a dedicated view for VirtualChassis objects 2020-04-24 14:59:38 -04:00
Jeremy Stretch
ffba1c1d43 Add extras.configcontext.format to preferences doc 2020-04-24 13:11:01 -04:00
Jeremy Stretch
bdbf21b3e2 Closes #4421: Retain user's preference for config context format 2020-04-24 12:01:41 -04:00
Jeremy Stretch
f019c8d2ce Fixes #4527: Fix assignment of certain tags to config contexts 2020-04-24 11:31:01 -04:00
Jeremy Stretch
ad099d79f2 Changelog for #3294, #4531 2020-04-24 11:03:14 -04:00
Jeremy Stretch
7feaa896e5 Merge pull request #4532 from netbox-community/3294-user-prefs
Closes #3294: User preference tracking
2020-04-24 11:00:48 -04:00
Jeremy Stretch
178052b2f6 Prepare for merge into 2.8 2020-04-24 10:38:09 -04:00
Jeremy Stretch
dc9617c7aa Fix returning default for unknown userconfig key 2020-04-24 10:37:02 -04:00
Jeremy Stretch
587339bea0 Add page for user to view/clear preferences 2020-04-24 10:29:06 -04:00
Jeremy Stretch
7c8c85e435 Add all() method to UserConfig 2020-04-24 09:50:26 -04:00
Jeremy Stretch
d8494e44e7 Document available user preferences 2020-04-24 09:46:02 -04:00
Jeremy Stretch
30c3d6ee40 Remember user's per_page preference (POC for UserConfig) 2020-04-23 16:48:13 -04:00
Jeremy Stretch
f3012ed839 Automatically create UserConfig for users 2020-04-23 16:46:36 -04:00
Jeremy Stretch
afa0565a44 Show user config in admin UI 2020-04-23 15:53:43 -04:00
Jeremy Stretch
750deac2cf Initial implementation of UserConfig model 2020-04-23 15:34:32 -04:00
Jeremy Stretch
c0b1ae4923 Initialize v2.9 development 2020-04-23 11:02:35 -04:00
Jeremy Stretch
14b9a12a2f Post-release version bump 2020-04-23 10:27:33 -04:00
Jeremy Stretch
a77d1e502c Merge pull request #4528 from netbox-community/develop
Release v2.8.1
2020-04-23 10:24:08 -04:00
Jeremy Stretch
e5e5725a24 Fix typo in validation error message 2020-04-23 10:12:56 -04:00
Jeremy Stretch
92343469e7 Correct release date 2020-04-23 10:11:11 -04:00
Jeremy Stretch
3ece4f137f Release v2.8.1 2020-04-23 10:09:13 -04:00
Sander Steffann
70b8b9ecdb Fix minor typo 2020-04-23 14:10:58 +02:00
John Anderson
11ee6f417f fix #4459 - Fix caching issue resulting in erroneous nested data for regions, rack groups, and tenant groups 2020-04-22 16:45:26 -04:00
Jeremy Stretch
5ea92dda4b Changelog for #4139 2020-04-22 14:15:41 -04:00
Jeremy Stretch
ca08125d55 Merge pull request #4524 from netbox-community/4139-component-bulk-create
Fixes #4139: Extend forms for bulk device component creation
2020-04-22 14:11:07 -04:00
Jeremy Stretch
7b50f2b0eb Fix tag assignment when bulk creating components 2020-04-22 14:05:27 -04:00
Jeremy Stretch
6a61f0911d Update InterfaceBulkCreateForm for VMs 2020-04-22 12:09:40 -04:00
Jeremy Stretch
e975f1b216 Update device component bulk edit forms to use form_from_model() 2020-04-22 11:47:26 -04:00
Jeremy Stretch
62cdf0d928 Add bulk creation view for rear ports 2020-04-22 11:26:04 -04:00
Jeremy Stretch
97b8e73716 Introduce model-specific bulk create forms for device components 2020-04-22 11:15:39 -04:00
Jeremy Stretch
131d2c97ca Fixes #4336: Ensure interfaces without a subinterface ID are ordered before subinterface zero 2020-04-21 16:13:34 -04:00
Jeremy Stretch
ada55dfdfb Fixes #4510: Enforce address family for device primary IPv4/v6 addresses 2020-04-21 14:50:15 -04:00
Jeremy Stretch
cc721efe97 Fixes #3356: Correct Swagger schema specification for the available prefixes/IPs API endpoints 2020-04-21 14:12:49 -04:00
Jeremy Stretch
b362c6a967 Fixes #2994: Prevent modifying termination points of existing cable to ensure end-to-end path integrity 2020-04-21 13:41:38 -04:00
Jeremy Stretch
5eef6bc527 Changelog for #4388 2020-04-21 12:51:43 -04:00
Jeremy Stretch
8a3a5a8cb1 Merge pull request #4521 from netbox-community/4388-cable-tracing
Fixes #4388: Improve connection endpoint detection
2020-04-21 12:49:48 -04:00
Jeremy Stretch
ca762588ca Pretty-up cable trace template 2020-04-21 11:59:14 -04:00
Jeremy Stretch
26c335fc68 Extend tests for #4388 2020-04-21 10:53:21 -04:00
Jeremy Stretch
f80eb16060 Closes #4505: Fix typo in application stack diagram 2020-04-20 11:06:52 -04:00
Jeremy Stretch
8ea611df44 Changelog for #4464 2020-04-20 11:04:15 -04:00
Jeremy Stretch
3db83dd3a2 Merge pull request #4501 from toerb/develop
add rack width of 21 inches for ETSI racks
2020-04-20 11:03:09 -04:00
Jeremy Stretch
29707cd496 Adapt tracing view to account for split ends (WIP) 2020-04-15 17:09:04 -04:00
Jeremy Stretch
5205c4963f Refactor cable tracing logic 2020-04-15 15:46:41 -04:00
Jeremy Stretch
5aadfff1de Merge pull request #4492 from kobayashi/4361-type-connection_status
Fix #4361 Set correct type of connection_status in swagger schema
2020-04-15 09:45:39 -04:00
Jeremy Stretch
cb84e3bb2e Closes #4491: Update docs to indicate support for nesting objects 2020-04-15 09:41:57 -04:00
Jeremy Stretch
e0f819691f Fixes #4496: Fix exception when validating certain models via REST API 2020-04-15 09:37:30 -04:00
kobayashi
1ce0191a74 Fixes #4361: Set correct type of connection_state 2020-04-15 01:02:11 -04:00
Jeremy Stretch
788909de94 Fixes #4489: Fix display of parent/child role on device type view 2020-04-14 12:13:05 -04:00
Jeremy Stretch
2dbc04c6fb Fix typo 2020-04-14 10:03:02 -04:00
Jeremy Stretch
fc1feec8bf Fix format string 2020-04-14 09:43:12 -04:00
Jeremy Stretch
819f842cf1 Call out requirement for Python 3.6 or later 2020-04-13 14:38:26 -04:00
Jeremy Stretch
0ffc74c669 Fix link to logging configuration docs 2020-04-13 14:37:11 -04:00
Jeremy Stretch
9ed0494b45 Clarify requirement for Python 3.6 or later 2020-04-13 14:22:17 -04:00
Jeremy Stretch
d37a74846a Remove format strings to ensure compilation under old Python releases 2020-04-13 14:07:44 -04:00
Jeremy Stretch
e97205922c Fixes #4481: Remove extraneous material from example configuration file 2020-04-13 13:49:34 -04:00
Jeremy Stretch
8b57a888e7 Post-release version bump 2020-04-13 11:31:16 -04:00
Jeremy Stretch
d79ed76d80 Merge pull request #4479 from netbox-community/develop
Release v2.8.0
2020-04-13 11:29:33 -04:00
Jeremy Stretch
488129d7ad Release v2.8.0 2020-04-13 11:21:33 -04:00
Jeremy Stretch
dc9f991e5f Update dependencies for v2.8 release 2020-04-13 11:09:39 -04:00
Jeremy Stretch
c691ec843d Fixes #4476: Correct typo in slugs for Infiniband interface types 2020-04-13 10:51:25 -04:00
Jeremy Stretch
67f2cdc921 Fixes #4474: Fix population of device types when bulk editing devices 2020-04-13 10:34:44 -04:00
Jeremy Stretch
ee51dae73f Merge pull request #4473 from netbox-community/develop-2.8
Merge v2.8 work into develop
2020-04-13 10:17:27 -04:00
Jeremy Stretch
0316063ba9 Update v2.8 release notes 2020-04-10 11:56:52 -04:00
Jeremy Stretch
8939d4de92 Use packaging.version.parse directly 2020-04-10 11:18:01 -04:00
Jeremy Stretch
5de085d83d Tweak PluginMenuButton icon_class to require additional "fa" class 2020-04-10 10:36:03 -04:00
Jeremy Stretch
19a10cee82 Rename base template 2020-04-10 10:21:02 -04:00
Jeremy Stretch
db70f04447 Minor tweaks to plugins development doc 2020-04-10 10:20:36 -04:00
Jeremy Stretch
d5dbd5ccf1 Update bug report template to denote disabling plugins 2020-04-09 15:55:17 -04:00
Jeremy Stretch
b5aff1575d Add plugins settings to example config 2020-04-09 15:45:38 -04:00
Jeremy Stretch
884d648cc2 Set X_FRAME_OPTIONS to SAMEORIGIN (changed in Django 3.0) 2020-04-09 15:31:18 -04:00
Jeremy Stretch
ed05198c45 Add static file collection to plugins installation doc 2020-04-09 14:52:18 -04:00
Jeremy Stretch
c593eca936 Minor improvements to installation docs 2020-04-09 14:43:22 -04:00
Jeremy Stretch
cfc09bfcc8 Merge pull request #4471 from qaxi/patch-2
#4470 correct Ubuntu package name
2020-04-09 10:06:35 -04:00
Petr Klíma
2daf1e2004 #4470 wrong Ubuntu package name 2020-04-09 16:02:57 +02:00
Jeremy Stretch
5266bf93a3 Merge branch 'develop' into develop-2.8 2020-04-08 13:50:15 -04:00
Jeremy Stretch
e04a5dc81f Post-release version bump 2020-04-08 13:34:36 -04:00
Jeremy Stretch
ccf8059452 Merge pull request #4467 from netbox-community/develop
Release v2.7.12
2020-04-08 13:31:49 -04:00
Jeremy Stretch
b86c61dcdb Release v2.7.12 2020-04-08 13:26:33 -04:00
toerb
f7e7699d93 add rack width of 21 inches for ETSI racks 2020-04-08 09:30:14 +02:00
Jeremy Stretch
eb2e960af4 Merge pull request #4462 from netbox-community/4460-webhook-listener
Closes #4460: Add a webhook listener for troubleshooting
2020-04-07 13:56:35 -04:00
Jeremy Stretch
2357928e72 Add documentation for webhook_receiver 2020-04-07 13:51:20 -04:00
Jeremy Stretch
ae58af4bb7 Added webhook_receiver management command 2020-04-07 13:37:48 -04:00
Jeremy Stretch
902b1b2c32 Fixes #4458: Remove custom admin site to avoid conflict with django-rq 2.3.0 2020-04-07 10:17:34 -04:00
Daniel Sheppard
225ba4cc35 Fixes: #4395 - Fix typing on interface serializer 2020-04-07 08:36:13 -05:00
Daniel Sheppard
fe088dba7a Fixes: #4396 - Fix typing on interface serializer 2020-04-07 08:33:00 -05:00
Jeremy Stretch
46b896b2cf Merge branch 'develop' into develop-2.8 2020-04-06 13:51:05 -04:00
Jeremy Stretch
52ef488208 Fix nav menu w/plugins enabled 2020-04-06 13:27:41 -04:00
Jeremy Stretch
34c33549b8 Add tests for plugins caching config 2020-04-06 12:00:28 -04:00
Jeremy Stretch
76230cad53 Remove extraneous plugin config 2020-04-06 11:51:03 -04:00
Jeremy Stretch
9ffc404027 Add tests for plugin configuration, min/max version 2020-04-06 11:44:38 -04:00
Jeremy Stretch
58442b1af6 Correct author name parameter 2020-04-06 11:43:52 -04:00
Jeremy Stretch
5f6b63e978 Remove extraneous package from Apache installation instructions 2020-04-03 16:03:50 -04:00
Jeremy Stretch
ad08935c57 Move nginx/Apache configs to discrete files 2020-04-03 15:46:48 -04:00
Jeremy Stretch
af405a8ab2 Closes #4391: Extend installation docs to include enabling SSL 2020-04-03 15:35:45 -04:00
Jeremy Stretch
1ffbeba181 #4439: Fix null integer field display 2020-04-03 13:47:58 -04:00
Jeremy Stretch
630788731e Closes #4448: Allow connecting cables between two circuit terminations 2020-04-03 13:44:41 -04:00
Jeremy Stretch
721368ea8d Closes #4147: Use absolute URLs in rack elevation SVG renderings 2020-04-03 13:16:35 -04:00
Jeremy Stretch
1f3a21ba20 Fixes #4449: Fix reservation edit/delete button URLs on rack view 2020-04-03 12:13:36 -04:00
Jeremy Stretch
6cfd68d9fb Merge pull request #4446 from netbox-community/plugin-testing
Plugin testing
2020-04-03 09:24:44 -04:00
Jeremy Stretch
6413d47fb2 Skip PluginTest if dummy_plugin not in PLUGINS list 2020-04-02 16:13:15 -04:00
Jeremy Stretch
9e0aa0d11e Naming tweaks 2020-04-02 15:43:23 -04:00
Jeremy Stretch
ee4c5ef64a Fix CI tests 2020-04-02 15:11:19 -04:00
Jeremy Stretch
4ab3854d66 Fixes #4438: Fix exception when disconnecting a cable from a power feed 2020-04-02 10:19:50 -04:00
Jeremy Stretch
354f87c888 Fixes #4439: Tweak display of unset custom integer fields 2020-04-02 10:06:01 -04:00
Jeremy Stretch
92fc28aa09 Remove errant references to external plugin 2020-04-01 17:18:15 -04:00
Jeremy Stretch
30e330c887 Initial implementation of tests for plugins framework 2020-04-01 17:08:47 -04:00
Jeremy Stretch
093181c186 Correct path to test configuration file 2020-04-01 13:29:54 -04:00
Jeremy Stretch
f316958943 Establish a separate configuration file for testing 2020-04-01 13:23:29 -04:00
Jeremy Stretch
0432b1a6f9 Move default caching_config to PluginConfig class 2020-04-01 12:10:19 -04:00
Jeremy Stretch
b2f4ef06c7 Merge pull request #4433 from netbox-community/plugins-list
Change PLUGINS_ENABLED to a list of specific plugins (PLUGINS)
2020-04-01 11:44:41 -04:00
Jeremy Stretch
f469c794ce Change PLUGINS_ENABLED to a list of specific plugins (PLUGINS) 2020-04-01 10:10:29 -04:00
Jeremy Stretch
221e014a25 Remove survey notification from README 2020-03-31 11:36:53 -04:00
Jeremy Stretch
fb2868f8bb Fixes #4418: Fail cleanly when trying to import multiple device types simultaneously 2020-03-30 16:44:04 -04:00
Jeremy Stretch
aa38dcf490 Closes #3676: Reference VRF by name rather than RD during IP/prefix import 2020-03-30 15:54:35 -04:00
Jeremy Stretch
06116cdde7 Add developer docs for application registry 2020-03-30 15:31:13 -04:00
Jeremy Stretch
5f1329c71c Changelog for #3351 2020-03-30 13:09:10 -04:00
Jeremy Stretch
613e37837b Update Python dependencies for v2.8 release 2020-03-30 12:39:45 -04:00
Jeremy Stretch
a914a7c438 Update serializer context assignment for DRF 3.11 2020-03-30 12:39:15 -04:00
Jeremy Stretch
8c7b3a1f9b Merge pull request #4385 from netbox-community/3351-plugins
Implements 3351 plugins
2020-03-27 14:19:11 -04:00
Jeremy Stretch
9c16d5a747 Misc cleanup of PluginConfig processing logic 2020-03-27 13:57:11 -04:00
Jeremy Stretch
0d9d0b0446 Convert installed_plugins_admin_view to a class-based view 2020-03-27 13:35:25 -04:00
Jeremy Stretch
cb344a3792 Clean up plugin URL registration 2020-03-27 13:26:53 -04:00
Jeremy Stretch
dd9fc4173d Expose regsitry in templates using existing context processor for settings 2020-03-27 13:18:51 -04:00
Jeremy Stretch
fd6739f0cc Improved menu item/button validation 2020-03-27 13:12:58 -04:00
Jeremy Stretch
fa83750e72 Merge branch 'develop-2.8' into 3351-plugins 2020-03-27 13:05:34 -04:00
Jeremy Stretch
a72d5c899e Merge branch 'develop' into develop-2.8 2020-03-27 12:53:55 -04:00
Jeremy Stretch
5cf872d000 Post-release version bump 2020-03-27 12:49:48 -04:00
Jeremy Stretch
3d3d1bc623 Merge pull request #4417 from netbox-community/develop
Release v2.7.11
2020-03-27 12:47:28 -04:00
Jeremy Stretch
59e6386361 Release v2.7.11 2020-03-27 12:40:21 -04:00
Jeremy Stretch
9c1eda0d9a Closes #4404: Add cable trace button for circuit terminations 2020-03-27 12:35:36 -04:00
Daniel Sheppard
785119f5bb Fixes: #4415 - Add site on validate_unique() for device model 2020-03-27 08:37:48 -05:00
Jeremy Stretch
8a3ebf64bc Rename obj to object; clean up docstrings 2020-03-26 21:46:56 -04:00
Jeremy Stretch
af302d8368 Avoid instantiating PluginTemplateExtension subclasses when the specified method has not been defined 2020-03-26 21:25:10 -04:00
Jeremy Stretch
f03cc96050 Restrict context data available to PluginTemplateExtensions 2020-03-26 16:50:55 -04:00
Jeremy Stretch
e7f7b14214 Extend menu items and buttons to accept a list of required permissions 2020-03-26 16:04:12 -04:00
Jeremy Stretch
84d2db0d35 Tweak variable naming 2020-03-26 13:37:52 -04:00
Jeremy Stretch
74e56a890c Remove unused PluginSignal class 2020-03-26 12:26:58 -04:00
Jeremy Stretch
b94ef39a51 Standardize naming of menu items 2020-03-26 12:25:36 -04:00
Jeremy Stretch
877417d68f Rename PluginTemplateContent to PluginTemplateExtension 2020-03-26 12:18:58 -04:00
Jeremy Stretch
62f14f0473 Convert PluginConfig attrs list to a table 2020-03-26 12:03:10 -04:00
Jeremy Stretch
66a99e13bb Fix up styling of tables in documentation 2020-03-26 11:54:58 -04:00
Jeremy Stretch
d316d8ac61 Rename PluginNavMenuButton to PluginMenuButton 2020-03-26 11:30:42 -04:00
Jeremy Stretch
40574b65af Rename PluginNavMenuLink to PluginMenuItem 2020-03-26 11:29:05 -04:00
Jeremy Stretch
81c9177c09 Add a default button color 2020-03-26 11:26:11 -04:00
Jeremy Stretch
68ef5dd2a4 Revised plugins documentation 2020-03-26 11:09:20 -04:00
Jeremy Stretch
59815ea53d Merge pull request #4407 from netbox-community/4402-plugins-template-content
Closes #4402: Rework template content registration for plugins
2020-03-26 09:05:07 -04:00
Jeremy Stretch
5540079e81 Add documentation for PluginTemplateContent 2020-03-25 16:32:16 -04:00
Jeremy Stretch
68a0e76ca6 Rework template content registration to work like menu items 2020-03-25 16:06:00 -04:00
Jeremy Stretch
1d9fbeed81 Merge pull request #4403 from netbox-community/4401-plugins-navlinks
Closes #4401: Simplify registration process for pluin menu items
2020-03-25 14:55:21 -04:00
Jeremy Stretch
d0edd9d5c1 Update documentation for #4401 2020-03-25 14:33:32 -04:00
Jeremy Stretch
9ea30c057f Replace get_menu_items() with static attribute 2020-03-25 13:51:37 -04:00
Jeremy Stretch
c1f2ad90ef Simplify the mechanism for plugins to register navigation menu items 2020-03-25 11:32:50 -04:00
Jeremy Stretch
2a47bb8b54 Rename url_slug to base_url 2020-03-24 16:20:47 -04:00
Jeremy Stretch
b6686a5fcb Merge pull request #4397 from netbox-community/plugins-docs
Add documentation for the plugins framework
2020-03-24 15:55:14 -04:00
Jeremy Stretch
16b8a45ed6 Get menu header via apps.get_config 2020-03-24 15:24:14 -04:00
Jeremy Stretch
579c365808 Extend plugins docs to include nav menu links 2020-03-24 15:22:57 -04:00
Jeremy Stretch
745ac294a5 Tweak plugin template docs 2020-03-24 14:21:08 -04:00
Jeremy Stretch
eedda6e648 Incorporate John's feedback 2020-03-24 09:42:24 -04:00
Jeremy Stretch
5ec1b31804 Add disclaimer/warning to PLUGINS_ENABLED 2020-03-24 09:41:46 -04:00
Jeremy Stretch
8e661c34e9 Merge branch '3351-plugins' into plugins-docs 2020-03-23 14:03:35 -04:00
Jeremy Stretch
ce0b1733fe Derive API URLs app_name for plugins from url_slug 2020-03-23 14:03:04 -04:00
Jeremy Stretch
0a8b09a11a Add docs for plugin API endpoints 2020-03-23 13:58:45 -04:00
Jeremy Stretch
0b77702626 Add docs for plugin models, views 2020-03-23 13:28:56 -04:00
Jeremy Stretch
a4382f0b27 Merge branch '3351-plugins' into plugins-docs 2020-03-23 12:02:18 -04:00
Jeremy Stretch
2732e7c3d9 Specify path to PluginConfig in INSTALLED_APPS 2020-03-23 12:01:24 -04:00
Jeremy Stretch
2188b0982c More work on plugins development docs 2020-03-23 12:00:10 -04:00
Jeremy Stretch
eeb9633854 Merge branch '3351-plugins' into plugins-docs 2020-03-23 10:20:53 -04:00
John Anderson
60b6c48775 remove duplicate import 2020-03-20 22:21:00 -04:00
John Anderson
4e84e8048f added admin and api views for listing all plugins, and refactored urls import 2020-03-20 20:10:02 -04:00
John Anderson
e220c38b97 Merge pull request #4392 from netbox-community/refactor-plugins-import
Refactor plugins import
2020-03-20 17:04:33 -04:00
Jeremy Stretch
ad1522f428 Update plugin URL loading logic 2020-03-20 15:51:14 -04:00
Jeremy Stretch
bc50c2aa55 Introduce PluginConfig 2020-03-20 15:50:47 -04:00
Jeremy Stretch
28b5e88c50 Rename entry point group; simplify import 2020-03-20 14:35:54 -04:00
Jeremy Stretch
33ca352fd9 Initial documentation for plugins framework 2020-03-20 14:21:49 -04:00
Jeremy Stretch
058c78d8be Closes #4389: Add a bulk edit view for device bays 2020-03-19 16:32:08 -04:00
Jeremy Stretch
05fdf5e9a0 Closes #4386: Update admin links for Django RQ to reflect multiple queues 2020-03-19 13:54:49 -04:00
Jeremy Stretch
533521b29d Changelog for #4255 2020-03-19 11:03:35 -04:00
Jeremy Stretch
2dff093305 Merge pull request #4258 from netbox-community/4255-dynamic_object_vars
Fixes: #4255 - Modify script ObjectVars to utilize DynamicModelChoiceField
2020-03-19 11:02:07 -04:00
Jeremy Stretch
ba6ce07759 Changelog for #3193 2020-03-19 10:56:42 -04:00
Jeremy Stretch
33eb5e11de Merge pull request #4387 from netbox-community/3193-cable-tracing
Fixes #3193: Fix cable tracing across multiple rear ports
2020-03-19 10:55:24 -04:00
Jeremy Stretch
8d3801896f Rewrite and extend cabling logic tests 2020-03-19 10:43:51 -04:00
Jeremy Stretch
f1236e9bf7 Tweak tracing logic to ensure consistent behavior 2020-03-19 10:42:53 -04:00
dansheps
fa1548f3ce Remove extraneous import 2020-03-19 08:11:14 -05:00
dansheps
0995e10d87 Modify script ObjectVars to use DynamicModelChoiceFields 2020-03-19 08:09:31 -05:00
Jeremy Stretch
e143158f12 Remove unused follow_circuits arg for cable tracing 2020-03-18 21:14:53 -04:00
Jeremy Stretch
40bfb55370 Improved cable tracing logic 2020-03-18 20:47:27 -04:00
John Anderson
dab313897e Merge branch 'develop-2.8' into 3351-plugins 2020-03-18 18:30:47 -04:00
John Anderson
c7fb2ff894 add version contraints and cacheops config 2020-03-18 18:28:27 -04:00
Jeremy Stretch
ced6fe313a Fix RackGroupForm field 2020-03-18 15:41:23 -04:00
Jeremy Stretch
7f5571200c Closes #4382: Enable custom links for rack reservations 2020-03-18 14:50:49 -04:00
John Anderson
fd879c7cf5 Merge branch 'develop-2.8' into 3351-plugins 2020-03-18 14:48:11 -04:00
Jeremy Stretch
a9d04547d1 Closes #4381: Enable export templates for rack reservations 2020-03-18 14:46:23 -04:00
John Anderson
09e09e43ba Merge branch 'develop' into develop-2.8 2020-03-18 14:44:18 -04:00
Jeremy Stretch
87f0b19dc0 Closes #4380: Enable webhooks for rack reservations 2020-03-18 14:43:19 -04:00
Jeremy Stretch
eab79faaeb Changelog for #738 2020-03-18 14:02:24 -04:00
Jeremy Stretch
dbbb2cdaba Merge pull request #4366 from netbox-community/738-detect-new-releases
Closes #738: Automatically detect new releases
2020-03-18 14:00:01 -04:00
Jeremy Stretch
7246fd667e Move releases.py to netbox/ 2020-03-18 13:54:41 -04:00
Jeremy Stretch
fe4f4bddc8 Tweaked logging; renamed release config parameters 2020-03-18 13:46:47 -04:00
Jeremy Stretch
f7ba766de3 Merge pull request #4379 from netbox-community/refactor-registry
Refactor registry to behave as a dictionary
2020-03-18 13:21:55 -04:00
Jeremy Stretch
70c29051b3 Raise specific exceptions 2020-03-18 13:15:22 -04:00
Jeremy Stretch
043b1c28d2 Refactor the registry into a dictionary object 2020-03-18 12:00:31 -04:00
Jeremy Stretch
022653f446 Fix Python 3.5 compatability for tests 2020-03-17 15:07:45 -04:00
Jeremy Stretch
1706db38df Fix Python 3.5 compatability for tests 2020-03-17 15:00:39 -04:00
Jeremy Stretch
81287833ee Update tests 2020-03-17 14:44:49 -04:00
Jeremy Stretch
2f12d09663 Clean up URL damping 2020-03-17 12:14:17 -04:00
Jeremy Stretch
3ace83c5aa Cache only the most recent NetBox release 2020-03-17 11:58:17 -04:00
Jeremy Stretch
356de985d2 Tweak release template variables 2020-03-17 11:49:45 -04:00
Jeremy Stretch
ab93606e4a Check for an existing job before queuing a new one 2020-03-17 11:37:35 -04:00
Jeremy Stretch
ec2dc8d7a4 Fix template logic 2020-03-17 11:28:35 -04:00
Jeremy Stretch
a2eb2e7da6 Introduce a new 'check_releases' RQ queue 2020-03-17 11:22:56 -04:00
Jeremy Stretch
3590ed378d Rename 'webhooks' REDIS config to 'tasks' 2020-03-17 10:22:56 -04:00
John Anderson
2f37357a1b added support for prepending elements to middleware 2020-03-17 02:35:34 -04:00
John Anderson
981c982237 added support for plugin nav bar links 2020-03-17 02:35:12 -04:00
John Anderson
457354c244 inject origional context as obj_context 2020-03-17 00:03:58 -04:00
Jeremy Stretch
00afe7aa94 Merge pull request #4375 from netbox-community/4374-dynamic-fields-api-url
Closes #4374: Automatically derive API endpoint for dynamic choice fields
2020-03-16 16:02:25 -04:00
Jeremy Stretch
450615e0bb Change IPAddressForm.nat_vrf to DynamicModelChoiceField 2020-03-16 14:29:01 -04:00
Jeremy Stretch
73881ad1e0 Change CircuitTerminationForm.site to a DynamicModelChoiceField 2020-03-16 14:24:17 -04:00
John Anderson
2522b88fc6 Merge branch 'develop-2.8' into 3351-plugins 2020-03-16 14:21:05 -04:00
Jeremy Stretch
0068108c57 Remove APISelect widget/api_url argument from dynamic fields 2020-03-16 14:08:48 -04:00
Jeremy Stretch
400f6fc5fb Dynamically resolve the API URL for dynamic choice fields 2020-03-16 13:30:35 -04:00
John Anderson
901143b72a Merge branch 'develop' into develop-2.8 2020-03-16 12:17:00 -04:00
John Anderson
9a38586e13 rename FeatureQuery class 2020-03-16 11:58:35 -04:00
Jeremy Stretch
62ad7734b2 Merge pull request #4373 from kobayashi/2769-validate-prefixlength
Fixes #2769: improve prefix_length validations
2020-03-16 10:44:13 -04:00
kobayashi
7ef9a6c0a7 Fixes #2769: improve prefix_length validations 2020-03-16 03:20:15 -04:00
John Anderson
8364694fb4 added plugin template content injection to primary model detail views 2020-03-15 23:45:18 -04:00
John Anderson
683c5a22db Merge branch 'develop-2.8' into 3351-plugins 2020-03-15 00:55:25 -04:00
John Anderson
0574ac7530 fixed migration order 2020-03-15 00:48:05 -04:00
John Anderson
a955f90a7e Merge branch 'develop-2.8' into 3351-plugins 2020-03-15 00:26:33 -04:00
John Anderson
2dc31c0edd Revert "implemented registry for extras model functionality"
This reverts commit 235d99021b.
2020-03-15 00:25:46 -04:00
John Anderson
6ea15cec6f Revert "refactor extras registry"
This reverts commit c189895f6c.
2020-03-15 00:24:05 -04:00
John Anderson
9df238c5f2 Merge branch 'develop' into develop-2.8 2020-03-15 00:18:32 -04:00
John Anderson
9466802a95 closes #4368 - extras features model registration 2020-03-14 03:03:22 -04:00
Jeremy Stretch
36130965f2 Merge pull request #4370 from netbox-community/4078-standardize-fields
Closes #4078: Standardize description fields
2020-03-13 17:07:07 -04:00
Jeremy Stretch
d4f6909859 Rename Tag.comments to description 2020-03-13 17:00:00 -04:00
Jeremy Stretch
1a8554fd32 Changelog for #4078 2020-03-13 16:42:47 -04:00
Jeremy Stretch
9f5b138b0f Add migrations for description fields 2020-03-13 16:35:36 -04:00
Jeremy Stretch
cebe580484 Add a description field to all organizational models 2020-03-13 16:33:28 -04:00
Jeremy Stretch
3b4ec5926d Standardize existing description fields to a length of 200 chars 2020-03-13 15:49:58 -04:00
Jeremy Stretch
c5776d9da4 Closes #4369: Add a dedicated view for rack reservations 2020-03-13 13:53:44 -04:00
Jeremy Stretch
9e45cafac4 Cleaned up new release notification banner 2020-03-13 12:20:00 -04:00
Jeremy Stretch
2033d15b2f Tweak UPDATE_REPO_URL to convey the full URL 2020-03-13 12:14:27 -04:00
Jeremy Stretch
e2123f4a9e Clean up logging 2020-03-13 11:55:06 -04:00
Jeremy Stretch
f6dfd2fa43 Simplify update repo URL validation 2020-03-13 10:20:09 -04:00
Jeremy Stretch
1f382f9252 Merge branch 'develop' into 738-detect-new-releases 2020-03-13 10:05:24 -04:00
Jeremy Stretch
459bcd88a9 Fixes #4365: Fix exception raised on IP address bulk add view 2020-03-13 09:07:03 -04:00
Jeremy Stretch
1487b5004d Closes #4309: Add descriptive tooltip to custom fields on object views 2020-03-12 21:43:34 -04:00
Jeremy Stretch
a28509019a Closes #4363: Standardize secret creation URL 2020-03-12 21:14:14 -04:00
John Anderson
c189895f6c refactor extras registry 2020-03-12 18:12:12 -04:00
Jeremy Stretch
5e971994ff Closes #4362: Standardize URL for creation of RackReservations 2020-03-12 17:43:11 -04:00
Jeremy Stretch
f108049142 Remove outdated TODOs 2020-03-12 11:57:26 -04:00
Jeremy Stretch
9fc1e88d9f Update minimum Python version to 3.6 2020-03-12 11:46:11 -04:00
Jeremy Stretch
2cd44d0234 Changelog for #3416 2020-03-12 11:38:39 -04:00
Jeremy Stretch
16bc262a4f Merge pull request #4359 from netbox-community/3416-remove-API-choices
Closes #3416: Remove API _choices endpoints
2020-03-12 11:29:31 -04:00
Jeremy Stretch
ef5c20dc6f Update documentation 2020-03-12 11:14:27 -04:00
Jeremy Stretch
a53f854187 Remove tests for API _choices endpoints 2020-03-12 10:48:53 -04:00
Jeremy Stretch
ea9de37dd1 Remove FieldChoicesViewSet 2020-03-12 10:48:17 -04:00
John Anderson
235d99021b implemented registry for extras model functionality 2020-03-12 04:07:54 -04:00
John Anderson
8af4cf87b5 Merge branch 'develop-2.8' into 3351-plugins 2020-03-12 01:19:15 -04:00
Jeremy Stretch
997247ee77 Update changelog for #1754, #3939 2020-03-11 21:22:06 -04:00
Jeremy Stretch
b92e518370 Merge pull request #4353 from netbox-community/3939-nested-tenantgroups
Closes #3939: Nested tenant groups
2020-03-11 21:20:14 -04:00
Jeremy Stretch
b5d57262f9 Update tests for nested TenantGroups 2020-03-11 21:14:53 -04:00
Jeremy Stretch
45f6ea211d Implement support for nested TenantGroups 2020-03-11 21:12:55 -04:00
Jeremy Stretch
a4a276083a Merge pull request #4351 from netbox-community/1754-nested-rackgroups
Closes #1754: Nested rack groups
2020-03-11 20:03:50 -04:00
Jeremy Stretch
c42613cf4d Update filter fields 2020-03-11 14:57:48 -04:00
Jeremy Stretch
84de0458aa Implement nested RackGroups 2020-03-11 14:40:29 -04:00
Jeremy Stretch
2b33e91e2c Changelog for #2328 2020-03-11 11:27:47 -04:00
Jeremy Stretch
71c363ebc8 Merge pull request #4299 from netbox-community/2328-external-authentication
Closes #2328: External user authentication
2020-03-11 11:17:40 -04:00
Jeremy Stretch
7ffc00159e Tweak settings/middleware to support testing; improve tests 2020-03-11 11:10:26 -04:00
Jeremy Stretch
79aba5edf2 Fixes #4343: Fix Markdown support for tables 2020-03-11 09:52:02 -04:00
John Anderson
a504f5f309 closes #4340 - Enforce unique constraints for device and virtual machine names in the API 2020-03-10 19:15:24 -04:00
Jeremy Stretch
90144ccd9a Add tests for remote authentication configuration 2020-03-10 16:57:34 -04:00
Jeremy Stretch
8c6d35645d Remote auth cleanup 2020-03-10 16:56:57 -04:00
John Anderson
0706c65ce6 Merge branch 'develop-2.8' into 3351-plugins 2020-03-10 15:15:23 -04:00
Jeremy Stretch
0dc3a72912 Merge branch 'develop-2.8' into 2328-external-authentication 2020-03-10 15:07:19 -04:00
Jeremy Stretch
0de857bf7a Merge branch 'develop' into develop-2.8 2020-03-10 15:06:37 -04:00
Jeremy Stretch
55558cb272 Post-release version bump 2020-03-10 14:03:22 -04:00
Jeremy Stretch
e66d065b6d Merge pull request #4339 from netbox-community/develop
Release v2.7.10
2020-03-10 13:59:50 -04:00
Jeremy Stretch
7bf1420463 Release v2.7.10 2020-03-10 13:50:17 -04:00
Jeremy Stretch
3a0b28144f Force mkdocs to v1.1 for RTD build 2020-03-10 13:37:31 -04:00
Jeremy Stretch
bc19072dc6 Update upgrade documentation for non-git installations 2020-03-10 13:24:10 -04:00
Jeremy Stretch
1eddac4066 Fixes #4338: Catch AddrFormatError exception when filtering aggregates/prefixes by an invalid prefix 2020-03-10 11:58:34 -04:00
Jeremy Stretch
2571f22ae5 Revert initial fix for #4336 2020-03-10 11:43:00 -04:00
Jeremy Stretch
5346efe009 Fixes #4337: Allow bulk editing/deletion of all device components matching a query 2020-03-10 10:18:48 -04:00
Jeremy Stretch
bb3f37ca35 Fixes #4336: Ensure interfaces without a channel/unit are ordered before a channel/unit of zero 2020-03-10 10:03:42 -04:00
Jeremy Stretch
0e49a7a1fd Closes #4332: Redirect to a user-friendly error page when CSS/JS resources fail to load 2020-03-09 15:33:57 -04:00
Jeremy Stretch
93159fec4b Update changelog 2020-03-09 14:28:06 -04:00
Jeremy Stretch
ab2ea5697f Closes #4322: Introduce and document local_requirements.txt support for installation/upgrade of optional dependencies 2020-03-09 14:22:27 -04:00
Jeremy Stretch
0eaec6bd83 Merge pull request #4335 from netbox-community/4325-rack-reservation-import
Closes #4325: Add suport for rack reservations CSV import
2020-03-09 13:45:38 -04:00
Jeremy Stretch
8cca22d79c Add nav menu entry for rack reservations import 2020-03-09 13:39:12 -04:00
Jeremy Stretch
e364a25e46 Add test for RackReservation import 2020-03-09 13:35:44 -04:00
Jeremy Stretch
049da81bf2 Convert units to SimpleArrayField 2020-03-09 12:46:12 -04:00
Jeremy Stretch
947affd78f Extend BulkImportView._save_obj to pass request context 2020-03-09 12:39:07 -04:00
Jeremy Stretch
cdcbf20d6a Merge pull request #4334 from netbox-community/4320-clean-up-template-tags-filters
Closes #4320: Clean up template tags filters
2020-03-09 10:56:41 -04:00
Jeremy Stretch
15ab30d0c6 Replace model_name and model_name_verbose filters with meta 2020-03-09 10:50:46 -04:00
Jeremy Stretch
16d3cebf3e Update markdown filter name 2020-03-09 10:42:32 -04:00
Jeremy Stretch
1069ad21d8 Remove unused contains filter 2020-03-09 10:38:29 -04:00
Jeremy Stretch
1423fd9024 Rename gfm filter to render_markdown 2020-03-09 10:31:29 -04:00
Jeremy Stretch
0439be2870 Remove unused getlist and getkey filters 2020-03-09 10:24:37 -04:00
Jeremy Stretch
22246353e2 Remove oneline filter 2020-03-09 10:22:30 -04:00
Jeremy Stretch
02bf6bd3a6 Changelog for #4217 2020-03-09 10:15:18 -04:00
Jeremy Stretch
8d511b0f72 Merge pull request #4333 from netbox-community/4217-contextual-docs
Closes #4217: Implement contextual documentation for models
2020-03-09 10:13:14 -04:00
Jeremy Stretch
4edd0b1fd6 Merge branch 'develop' into 4217-contextual-docs 2020-03-09 09:56:14 -04:00
Jeremy Stretch
f9073a2f07 Fixes #4326: Exclude Python modules without Script classes from scripts list 2020-03-06 20:59:32 -05:00
Jeremy Stretch
ad9dfec894 Started on #4325 (WIP) 2020-03-06 17:14:26 -05:00
Jeremy Stretch
9a829500cd Fix typo 2020-03-06 16:40:00 -05:00
Jeremy Stretch
9fa5004a35 Closes #4324: Add CSV import view for services 2020-03-06 16:33:43 -05:00
Jeremy Stretch
2a5bf2a222 Fixes #4323: Add bulk edit view for power panels 2020-03-06 16:05:26 -05:00
Jeremy Stretch
b22bf0c4b0 Fix upgrade.sh to show virtualenv warning only when needed 2020-03-06 15:07:29 -05:00
Jeremy Stretch
17c76e413d Install wheel before NetBox dependencies 2020-03-06 13:59:19 -05:00
Jeremy Stretch
803287a514 Closes #4313: Remove id__in filters 2020-03-06 12:05:53 -05:00
Jeremy Stretch
1a89e35729 Merge branch 'develop' into develop-2.8 2020-03-06 11:34:01 -05:00
Jeremy Stretch
5950bedfae Post-release version bump 2020-03-06 11:26:59 -05:00
Jeremy Stretch
c1ef87e009 Merge pull request #4321 from netbox-community/develop
Release v2.7.9
2020-03-06 11:23:42 -05:00
Jeremy Stretch
09298dab7a Release v2.7.9 2020-03-06 11:17:17 -05:00
Jeremy Stretch
afcd9b801f Delete squashed migration to avoid 'pending trigger events' exception under certain conditions 2020-03-06 10:32:12 -05:00
Jeremy Stretch
12bedac28a Tweak upgrade script to exit immediately if any individual tasks fail 2020-03-06 10:26:12 -05:00
Jeremy Stretch
c50714ec42 Introduce DOCS_ROOT configuration parameter 2020-03-06 09:35:58 -05:00
kobayashi
9f8d1d2436 Merge pull request #4063 from deathbeam/issue-4062
List choices for choice fields as enums in Swagger openapi spec
2020-03-05 23:58:43 -05:00
kobayashi
920078a738 set fix#4062 to release note 2020-03-05 23:52:33 -05:00
Tomas Slusny
4136a5fd5e List choices for choice fields as enums
Fixes #4062

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2020-03-05 23:44:37 -05:00
Jeremy Stretch
7d236b607e Tweak navigation max depth 2020-03-05 17:30:55 -05:00
Jeremy Stretch
f2d1c7d82a Update release notes navigation; ditch v1.x release notes 2020-03-05 17:27:59 -05:00
Jeremy Stretch
a7c133daa6 Reset documentation hierarchy 2020-03-05 17:23:56 -05:00
Jeremy Stretch
f89773f4a3 Cleaned up model documentation hierarchy 2020-03-05 17:03:03 -05:00
Jeremy Stretch
363c4acadc Drop GitHub-flavored Markdown (py-gfm) 2020-03-05 16:30:12 -05:00
Jeremy Stretch
b9d66f010f Add missing nav link for device types 2020-03-05 16:26:23 -05:00
Jeremy Stretch
57df250128 Add doc pages for device component templates 2020-03-05 15:24:02 -05:00
Jeremy Stretch
1657d6a0b8 Add missing docs page for tags 2020-03-05 15:16:15 -05:00
Jeremy Stretch
3b200bbffc Remove title from docs modal 2020-03-05 14:54:48 -05:00
Jeremy Stretch
121c7ada1f Add admonition support for embedded docs 2020-03-05 14:49:52 -05:00
Jeremy Stretch
25f4cae3ff Add model doc modal to object add/edit template 2020-03-05 13:56:03 -05:00
Jeremy Stretch
9f42bce16a Update modal template 2020-03-05 13:55:27 -05:00
Jeremy Stretch
defe59d79e Introduce get_docs() template filter for models 2020-03-05 13:52:34 -05:00
Jeremy Stretch
8a23811831 Add missing model doc pages 2020-03-05 13:48:47 -05:00
Jeremy Stretch
5190710aef Refactored device component docs 2020-03-05 11:44:18 -05:00
Jeremy Stretch
04ddc0487a Standardize circuits page 2020-03-05 11:26:10 -05:00
Jeremy Stretch
f9c9cf9ad2 Refactor virtualization docs 2020-03-05 11:24:57 -05:00
Jeremy Stretch
b8b02c7b25 Refactor tenancy docs 2020-03-05 11:21:52 -05:00
Jeremy Stretch
a061a03860 Refactor service docs 2020-03-05 11:20:10 -05:00
Jeremy Stretch
7793f281c5 Refactor secrets docs 2020-03-05 11:18:57 -05:00
Jeremy Stretch
593374764d Refactor IPAM docs 2020-03-05 11:16:54 -05:00
Jeremy Stretch
a320b54c2f Refactor power docs 2020-03-05 11:13:06 -05:00
Jeremy Stretch
6ba24c3296 Refactor site/rack docs 2020-03-05 11:10:09 -05:00
Jeremy Stretch
92949ddcdb Refactor device docs 2020-03-05 11:05:48 -05:00
Jeremy Stretch
b2bc1bf74a Refactor circuits docs 2020-03-05 10:52:56 -05:00
Jeremy Stretch
70397461eb Enable support for Markdown inclusions 2020-03-05 10:47:12 -05:00
Jeremy Stretch
aefed0df89 Add user survey note to README 2020-03-05 08:51:03 -05:00
John Anderson
bc954bc7be Merge branch 'develop-2.8' into 3351-plugins 2020-03-04 22:17:14 -05:00
Jeremy Stretch
e4cfeb1977 Add reminder to reload systemctl daemon if needed 2020-03-04 17:19:16 -05:00
Jeremy Stretch
e4e4af1b2d Delete obsolete old_requirements.txt 2020-03-04 16:07:19 -05:00
Jeremy Stretch
2bd3f1fcc3 Merge pull request #4315 from netbox-community/4195-application-logging
Closes #4195: Application logging
2020-03-04 14:39:12 -05:00
Jeremy Stretch
7454efe648 Documentation and changelog for #4195 2020-03-04 14:33:55 -05:00
Jeremy Stretch
9df2769383 Enable system logging for reports 2020-03-04 14:22:30 -05:00
Jeremy Stretch
36cbbac870 Enable system logging for custom scripts 2020-03-04 14:05:59 -05:00
Jeremy Stretch
406b88777c Add logging for DRF views 2020-03-04 13:32:45 -05:00
Jeremy Stretch
113313e000 Merge pull request #4001 from steffann/738-automatically-check-for-new-releases
Fixes: #738: Automatically check for new versions
2020-03-04 12:22:57 -05:00
Jeremy Stretch
f7c6df6e6a Improved verbosity of upgrade script 2020-03-04 12:20:06 -05:00
Jeremy Stretch
9e92520266 Changelog for #4121 2020-03-04 11:53:53 -05:00
Jeremy Stretch
1dd07337fd Merge pull request #4189 from netbox-community/4121-filter-lookup-expressions
4121 filter lookup expressions
2020-03-04 11:51:19 -05:00
Jeremy Stretch
746bfd8bca Closes #4119: Extend upgrade script to clear expired user sessions 2020-03-04 10:29:22 -05:00
Jeremy Parker
10dee9b57b Fix typo in caching.md (#4310)
Co-authored-by: Jeremy Stretch <jeremy.stretch@networktocode.com>
2020-03-04 10:07:58 -05:00
Jeremy Stretch
31e5d9ffe6 Changelog for #4298 2020-03-04 10:03:39 -05:00
Jeremy Stretch
a45b18b335 Merge pull request #4311 from netbox-community/4298-custom-fields-api
Fixes #4298: Bulk creation of objects with custom fields via API
2020-03-04 10:02:23 -05:00
Jeremy Stretch
57b6ac7cb1 Finish work on improved custom fields API tests 2020-03-04 09:53:49 -05:00
Jeremy Stretch
4611536ca9 Revise custom field API tests to check for single/multiple objects with/without custom field values 2020-03-03 17:07:43 -05:00
Jeremy Stretch
e4abfd192e Introduce CustomFieldDefaultValues class to handle default custom field values 2020-03-03 14:54:48 -05:00
Jeremy Stretch
c85bcbcf31 Merge branch 'develop' into develop-2.8 2020-03-03 13:20:00 -05:00
Jeremy Stretch
cb7932ecda Merge pull request #4308 from kobayashi/4229-docs-python-version
Fix #4229: Describe supported Python version
2020-03-03 12:14:10 -05:00
Jeremy Stretch
e4fc37e91a Merge pull request #4304 from dstarner/4288-incorrect-swagger-type
Set local_context_data serializer on Device and VM to method
2020-03-03 12:13:06 -05:00
Jeremy Stretch
74821c2c17 Closes #4218: Allow negative voltage for DC power feeds 2020-03-03 12:10:08 -05:00
Dan Starner
e6ee9803d4 use FieldInspector for JSONField type 2020-03-03 12:04:46 -05:00
kobayashi
fa992853b0 Describe supported Python version 2020-03-03 10:52:56 -05:00
Jeremy Stretch
1e4dd102bd Closes #4290: Include device name in tooltip on rack elevations 2020-03-03 10:35:07 -05:00
Jeremy Stretch
0f9c37fbc7 Closes #4284: Add MRJ21 port and cable types 2020-03-03 10:13:21 -05:00
Jeremy Stretch
a261060e5c Closes #4305: Add 10-inch option for rack width 2020-03-03 10:07:20 -05:00
Jeremy Stretch
78a1aad6c0 Fixes #4306: Fix toggling of device images for all racks in elevations view 2020-03-03 10:04:35 -05:00
Jeremy Stretch
7b6bd75c22 #4295 follow-up: Tweak handling of initial data for bulk edit forms 2020-03-03 09:43:56 -05:00
Jeremy Stretch
c983dac771 Add logging output to login/logout views 2020-03-02 17:04:54 -05:00
Jeremy Stretch
7a10748355 Add logging output to API viewsets 2020-03-02 16:52:21 -05:00
Jeremy Stretch
ca1186dca1 Add logging output to utility views 2020-03-02 16:38:51 -05:00
Daniel Starner
3070c7e991 fix linting mistake 2020-03-02 15:45:58 -05:00
Dan Starner
406708218b set local_context_data serializer on device and vm to method 2020-03-02 13:47:07 -05:00
Jeremy Stretch
c7b74b2090 Fixes #4300: Pass "commit" argument when executing scripts via REST API 2020-03-02 13:29:32 -05:00
Jeremy Stretch
1b38f3ad3a Merge pull request #4303 from kobayashi/4274-prefix-schema
Fix #4274: Set correct value schema for int typed ChoiceField
2020-03-02 13:14:04 -05:00
Jeremy Stretch
1e1c6526b2 Add BaseFilterSetTest to validate automatic generation of filters 2020-03-02 12:25:21 -05:00
kobayashi
0be5488104 Fix #4274: Set correct value schema for int typed ChoiceField 2020-03-02 11:26:56 -05:00
Jeremy Stretch
13fcdc0c1e Fixes #4301: Fix exception when deleting device type with components 2020-03-02 09:41:37 -05:00
John Anderson
5f5edbc10e added config option to disable plugins 2020-03-01 03:42:05 -05:00
John Anderson
71a8a13644 add api urls and signals interface for detail route buttons 2020-03-01 03:24:17 -05:00
John Anderson
a17c22746d initial work on #3351 2020-02-29 02:23:01 -05:00
John Anderson
e5f8f15293 added lookup map for treenode filter 2020-02-28 19:58:06 -05:00
Jeremy Stretch
22ec11c766 Fix up CentOS installation instructions; add troubleshooting guide 2020-02-28 17:31:51 -05:00
Jeremy Stretch
1b6f721e50 Extend installation docs to include creation of a specific netbox user 2020-02-28 16:25:43 -05:00
Jeremy Stretch
9c88f12abe Add note about Redis config to installation instructions 2020-02-28 15:58:55 -05:00
Jeremy Stretch
e285d0b547 Remove obsolete querydict_to_dict() utility function 2020-02-28 15:47:59 -05:00
Jeremy Stretch
5dc956fbe1 First stab at external authentication support 2020-02-28 15:16:31 -05:00
Jeremy Stretch
1449dfc966 Fixes #4295: Fix assignment of parent LAG during interface bulk edit 2020-02-28 09:44:41 -05:00
Sander Steffann
fcf3b14712 Add unittests 2020-02-27 21:54:43 +01:00
Sander Steffann
28473fa3e0 Disable update check by default 2020-02-27 19:40:06 +01:00
Sander Steffann
8ce106cb4b Move request to background task 2020-02-27 19:36:02 +01:00
Jeremy Stretch
bdf9857e6f Closes #4294: Add tenancy filter tests for all models 2020-02-27 13:28:08 -05:00
Sander Steffann
22ac9f63a1 Don't overwrite the header block, append to it 2020-02-27 18:27:36 +01:00
Sander Steffann
0de7f4712f Fix check for permissions 2020-02-27 18:27:36 +01:00
Sander Steffann
8d92089487 Improve comments and error message on invalid characters in URL 2020-02-27 18:27:36 +01:00
Sander Steffann
3a0849699f Rename settings to be more generic, not GitHub-only 2020-02-27 18:27:36 +01:00
Sander Steffann
008fc5623e Full URL for API, more consistent naming, only enabled for staff and better configuration validation 2020-02-27 18:27:36 +01:00
Sander Steffann
9d66ac4a6a Refactor the code to be more readable 2020-02-27 18:26:15 +01:00
Sander Steffann
405d93c6f2 Update versions.py 2020-02-27 18:26:15 +01:00
Sander Steffann
2fcdc90d3f Automatically check for new versions 2020-02-27 18:26:15 +01:00
dansheps
27e3b6f377 Remove second variables, make widget mandatory on ObjectVar and MultiObjectVar 2020-02-27 07:45:11 -06:00
Jeremy Stretch
faf676e6e0 Closes #4281: Allow filtering device component list views by type 2020-02-26 17:22:53 -05:00
Jeremy Stretch
624566b04e Fixes #4282: Fix label on export button for device types 2020-02-26 16:49:39 -05:00
Jeremy Stretch
5a00939512 Fixes #4285: Include A/Z termination sites in provider circuits table 2020-02-26 16:41:59 -05:00
Jeremy Stretch
4431259cd8 Merge pull request #4287 from netbox-community/3949-virtualenv-install
Closes #3949: Revise installation docs to use a Python virtual environment
2020-02-26 16:04:51 -05:00
Jeremy Stretch
87c914bece Reorganize .gitignore; add /venv/ 2020-02-26 15:59:26 -05:00
Jeremy Stretch
56c26f80b3 Changelog for #3949 2020-02-26 15:56:26 -05:00
Jeremy Stretch
215dbef7a0 Improved formatting of upgrade script messages 2020-02-26 15:40:05 -05:00
Jeremy Stretch
64c9bf27c1 Fix exit statement in upgrade script 2020-02-26 15:34:42 -05:00
Jeremy Stretch
1abc82e718 Update upgrade script & instructions to better accomodate moving to a venv 2020-02-26 15:26:12 -05:00
Jeremy Stretch
be9df3c07d Simplify the systemctl commands 2020-02-26 14:38:25 -05:00
Jeremy Stretch
798ecfc8f0 Clean up the upgrade guide 2020-02-26 14:09:54 -05:00
Jeremy Stretch
015a339202 Update systemd migration guide 2020-02-26 14:09:27 -05:00
Jeremy Stretch
2ee06c13f9 Remove Python 2 migration guide 2020-02-26 13:56:44 -05:00
Jeremy Stretch
0851b97ba5 Update the upgrade script & instructions to use a virtual environment 2020-02-26 13:54:07 -05:00
Jeremy Stretch
1b64f67f2b Update installation instructions to use a Python virtual environment 2020-02-26 12:28:35 -05:00
John Anderson
c908f132ec Merge branch 'develop' into 4121-filter-lookup-expressions 2020-02-26 12:05:27 -05:00
Jeremy Stretch
c78df40cb0 Refactor installtion docs 2020-02-26 11:40:31 -05:00
Jeremy Stretch
5a61bbec26 Fixes #4277: Fix filtering of clusters by tenant 2020-02-26 09:11:38 -05:00
John Anderson
3b4607d30d refactor lookup map logic 2020-02-25 15:16:27 -05:00
Jeremy Stretch
5befe66aa5 Post-release version bump 2020-02-25 15:11:04 -05:00
Jeremy Stretch
3c249a40a0 Merge pull request #4275 from netbox-community/develop
Release v2.7.8
2020-02-25 15:09:41 -05:00
Jeremy Stretch
7e81d5fe11 Release v2.7.8 2020-02-25 15:04:08 -05:00
Jeremy Stretch
6b4858303b Fix object list table width when no filter_form is present 2020-02-25 15:03:27 -05:00
Jeremy Stretch
5000f7f8d7 Extend custom scripts to pass the 'commit' value via run() 2020-02-25 14:49:41 -05:00
Jeremy Stretch
f643af13d7 Fix field label for Prefix.vrf 2020-02-25 14:12:53 -05:00
John Anderson
afc8c9bfe9 fix tenancy filterset bases 2020-02-25 13:50:31 -05:00
Jeremy Stretch
a6e859d9b7 Remove extraneous prefetches from racks queryset 2020-02-25 12:35:27 -05:00
Jeremy Stretch
5bf68493df Changelog & cleanup for #4267 2020-02-25 12:34:48 -05:00
Jeremy Stretch
43f3488270 Merge pull request #4271 from ananace/4267-rack-roles-in-elevations
Fixes #4267: Display rack roles in elevation list view
2020-02-25 12:18:31 -05:00
Jeremy Stretch
62efe0621f Fixes #4272: Interface type should be required by API serializer 2020-02-25 11:20:43 -05:00
Jeremy Stretch
161f03217e Merge pull request #4269 from hSaria/4227-omit-private-changelog
Fixes #4227: Omit internal fields from the change log data
2020-02-25 11:02:22 -05:00
Jeremy Stretch
40b56d7f62 Merge branch 'develop' into 4227-omit-private-changelog 2020-02-25 11:02:11 -05:00
Jeremy Stretch
4eb731cfae Merge pull request #4263 from netbox-community/4237-custom-webhooks
Closes #4237: Enable custom templating for webhook request content
2020-02-25 10:54:30 -05:00
Jeremy Stretch
35786966c6 Changelog for #4237 2020-02-25 10:46:16 -05:00
Jeremy Stretch
c3b64164ba Always use a JSON object to convey change data when no body template is present 2020-02-25 10:43:14 -05:00
Jeremy Stretch
644b4aa42d Revised webhook documentation 2020-02-25 10:24:27 -05:00
Alexander Olofsson
838291c3f3 Display rack roles in elevation list view 2020-02-25 16:00:21 +01:00
Saria Hajjar
3296298d21 Fixes #4227: Omit internal fields from the change log data 2020-02-25 14:48:11 +00:00
Jeremy Stretch
211311be9f Add http_method field to Webhook 2020-02-24 20:42:24 -05:00
Jeremy Stretch
9a532b1eb2 Extend templatization ability to additional_headers field 2020-02-24 17:47:17 -05:00
Jeremy Stretch
1fbd3a2c26 Convert additional_headers to a TextField 2020-02-24 16:59:35 -05:00
Jeremy Stretch
99038ffc44 Enable custom templating for webhook request content 2020-02-24 16:12:46 -05:00
John Anderson
67565ca191 added docs and more tests 2020-02-24 15:03:07 -05:00
Jeremy Stretch
81d001d49e Add a note about X-Frame-Options to the HTTP daemon instructions 2020-02-24 14:30:03 -05:00
Jeremy Stretch
cc4a22b2d1 Merge pull request #4261 from netbox-community/3145-cable-status-decommissioning
Closes #3145: Add a "decommissioning" status for cables
2020-02-24 14:24:34 -05:00
Jeremy Stretch
4d1749cc71 Remove CONNECTION_STATUS_CONNECTED and CONNECTION_STATUS_PLANNED constants 2020-02-24 14:18:19 -05:00
Jeremy Stretch
f7b620c6a2 Closes #3145: Add 'decommissioning' status for cables 2020-02-24 14:09:36 -05:00
Jeremy Stretch
76138f3080 Fixes #4222: Escape double quotes on encapsulated values during CSV export 2020-02-24 13:29:00 -05:00
Jeremy Stretch
36f8d6d259 Disconnect post_save & pre_delete signals after the response has been received 2020-02-24 12:42:51 -05:00
Jeremy Stretch
909971f237 Fixes #4221: Fix exception when deleting a device with interface connections when an interfaces webhook is defined 2020-02-24 12:41:55 -05:00
Jeremy Stretch
4e76e4ec9c Merge pull request #4253 from hSaria/3612-update-screenshots
Fixes #3612: Update screenshots
2020-02-24 11:45:15 -05:00
Saria Hajjar
87d90adaef Downscaled pictures to 50% (~1600 x ~1000) 2020-02-24 16:41:32 +00:00
dansheps
8ed0d0400f Add tests 2020-02-24 10:30:57 -06:00
Jeremy Stretch
cfd813772d Merge pull request #4257 from netbox-community/4250-extend-view-tests
Extend ViewTestCases for create/edit/delete/import views
2020-02-24 11:30:01 -05:00
Jeremy Stretch
2b484955aa Extend ViewTestCases for create/edit/delete/import views to also check non-data-bound GET requests 2020-02-24 11:23:42 -05:00
dansheps
a5853427d4 Update __all__ for #4255 2020-02-24 10:21:17 -06:00
dansheps
d0bd1ad25b Fixes: #4255 - Add new script variable types based on dynamic model fields 2020-02-24 10:18:19 -06:00
dansheps
d9dcc92300 Update release notes for #4230 2020-02-24 09:31:52 -06:00
Daniel Sheppard
d0c82c23bd Merge pull request #4244 from netbox-community/4230-filter_rack_unit_on_elevations
Fixes: #4230 - Fixes rack units filtering on elevation endpoint
2020-02-24 09:25:42 -06:00
Saria Hajjar
6cdb86931e Added separators between screenshots 2020-02-24 15:22:33 +00:00
Saria Hajjar
23d0241865 Updated screenshots with v2.7.7 2020-02-24 15:21:17 +00:00
Jeremy Stretch
61c0a4cc61 Fixes #4252: Fix power port assignment for power outlet templates created via REST API 2020-02-24 10:13:47 -05:00
Jeremy Stretch
b97d3b0716 Fixes #4246: Fix duplication of field attributes when multiple IPNetworkVars are present in a script 2020-02-24 10:01:31 -05:00
Jeremy Stretch
25d126d4ff Call prepare_value() to avoid passing model instances directly to the filterset 2020-02-24 09:31:31 -05:00
Dan Sheppard
2b75e05ea7 Fixes: #4230 - Fixes filtering by position on elevation endpoint
* Add tests for rack elevation filtering
* Add q variable to serializers for RackElevationDetailFilterSerializer
* Add code to allow filtering of position on the rack elevation
2020-02-22 08:24:26 -06:00
Jeremy Stretch
1a997610c7 Fixes #4241: Correct IP address hyperlinks on interface view 2020-02-21 21:43:04 -05:00
Jeremy Stretch
04ee55a40c Fixes #4240: Fix exception when filtering foreign keys by NULL 2020-02-21 21:38:25 -05:00
Jeremy Stretch
1c72d75b62 Fixes #4239: Fix exception when selecting all filtered objects during bulk edit 2020-02-21 20:44:53 -05:00
Jeremy Stretch
9128dc961c Closes #4173: Return graceful error message when webhook queuing fails 2020-02-21 17:21:04 -05:00
Jeremy Stretch
28e3b7af18 Merge branch 'develop' into develop-2.8 2020-02-21 15:26:55 -05:00
Jeremy Stretch
12602a95ea All fields on RenderedGraphSerializer should be read-only 2020-02-21 14:45:07 -05:00
Jeremy Stretch
11d012de4e Fixes #4235: Fix API representation of content_type for export templates 2020-02-21 14:38:38 -05:00
Jeremy Stretch
45cdac6f36 Changelog for #4228 2020-02-21 14:19:02 -05:00
Jeremy Stretch
2c4136f514 Merge pull request #4233 from netbox-community/4228-rack-elevation-images
Fixes #4228: Fix display of device images in rack elevations
2020-02-21 13:55:32 -05:00
Jeremy Stretch
a14c7980f6 Fixes #4232: Enforce consistent background striping in rack elevations 2020-02-21 13:49:28 -05:00
Jeremy Stretch
329740d2a7 Add "Save SVG" link beneath rack elevation display 2020-02-21 13:28:18 -05:00
Jeremy Stretch
8ffba6a279 Clean up rack view CSS 2020-02-21 13:19:45 -05:00
Jeremy Stretch
5a02dc457c Fixes #4228: Fit device images to rack unit; tweak default aspect ratio 2020-02-21 12:43:24 -05:00
Jeremy Stretch
cf312e9690 Changelog for #4224 2020-02-21 09:42:07 -05:00
Jeremy Stretch
20b36f910f Merge pull request #4225 from LuPo/develop
rear rack face doesn't draw if full-height device type assigned only front image
2020-02-21 09:40:23 -05:00
LuPo
0b3111c47f Fix drawing rear elevation when full-height device has been assigned only front image 2020-02-21 13:42:52 +02:00
Jeremy Stretch
493d68a57a Post-release version bump 2020-02-20 14:59:00 -05:00
Jeremy Stretch
5092641157 Merge pull request #4216 from netbox-community/develop
Release v2.7.7
2020-02-20 14:56:27 -05:00
Jeremy Stretch
2b134ea0f0 Release v2.7.7 2020-02-20 14:48:23 -05:00
Jeremy Stretch
58ff08be4e #1529: Add front/rear image fields to DeviceType serializer 2020-02-20 14:37:08 -05:00
Jeremy Stretch
682fd40fff Changelog for #4206 2020-02-20 14:27:26 -05:00
Jeremy Stretch
cdcc63fdf6 Merge pull request #4208 from wtinetworkgear/rj11add
Added serial console_port type rj-11 for a POTS modem connection
2020-02-20 14:26:24 -05:00
Jeremy Stretch
c0052eb416 Closes #4209: Enable filtering interfaces list view by enabled 2020-02-20 14:24:22 -05:00
Jeremy Stretch
74e3e2e5e1 Changelog for #4213 2020-02-20 14:17:18 -05:00
Jeremy Stretch
214470fb84 Rearrange powerfeed view 2020-02-20 14:16:18 -05:00
Jeremy Stretch
e76ea2a03c Merge pull request #4214 from ironick09/develop
Fix Power Feed page to render Custom Fields and Tags
2020-02-20 14:14:57 -05:00
Jeremy Stretch
6c272adb0e Clean up rack headers and border 2020-02-20 14:10:48 -05:00
Jeremy Stretch
51f7b7a5bf Changelog for #1529 2020-02-20 13:49:34 -05:00
Jeremy Stretch
b81622222d Merge pull request #4215 from netbox-community/1529-rack-elevation-images
Closes #1529: Rack elevation images
2020-02-20 13:48:44 -05:00
Jeremy Stretch
e8a8b39c47 Tweak gitignore to include devicetype-images directory 2020-02-20 13:42:23 -05:00
Jeremy Stretch
c78d30d47e Enable toggling of device images on elevations list 2020-02-20 13:20:58 -05:00
Jeremy Stretch
ba6562a5db Add ability to toggle the inclusion of device images when rendering a rack elevation SVG 2020-02-20 13:09:43 -05:00
Josh Niec
b28729baff Fix rendering for powerfeeds_list to show any added custom fields or tags on object
Signed-off-by: Josh Niec <ironick09@gmail.com>
2020-02-20 12:03:09 -06:00
Jeremy Stretch
adf9221bab Refactor rack elevation mixin to RackElevationSVG 2020-02-20 12:48:44 -05:00
Jeremy Stretch
d2157a3423 Add front/rear images for device types; include in rack elevations 2020-02-20 12:11:59 -05:00
Jeremy Stretch
e07ed3de93 Ignore media files 2020-02-20 11:22:04 -05:00
Jeremy Stretch
584539d0a3 #3810: Fix bug in Javascript 2020-02-20 10:20:19 -05:00
Jeremy Stretch
322b328584 Fixes #4211: Include trailing text when naturalizing interface names 2020-02-20 09:49:15 -05:00
Jeremy Stretch
b38eeaebc9 Clarify ciphertext length calculation; remove Python 2 compatibility 2020-02-19 21:14:56 -05:00
Jeremy Stretch
66fa79741d Add min/max length tests for secrets 2020-02-19 21:06:21 -05:00
Ken Partridge
09805ddc4a Added serial console_port type rj-11 for a POTS modem connection 2020-02-19 15:39:53 -08:00
Jeremy Stretch
1130f6b9f0 Remove dependency on RawSQL from IPAddress manager 2020-02-19 17:17:41 -05:00
Jeremy Stretch
38ff01e874 Merge pull request #4207 from netbox-community/3848-django-3.0
Closes #3848: Django 3.0
2020-02-19 15:41:39 -05:00
Jeremy Stretch
be23230938 Update tests to match new string representation of ContentTypes 2020-02-19 15:31:15 -05:00
Jeremy Stretch
7b93155b06 Fix form field ordering; self.fields no longer an OrderedDict 2020-02-19 15:08:15 -05:00
Jeremy Stretch
b7d41bc42c Rename MPTT migration 2020-02-19 14:46:53 -05:00
Jeremy Stretch
e17597a0a9 Update CI build to Python 3.6 and PostgreSQL 9.6 2020-02-19 14:30:49 -05:00
Jeremy Stretch
7a53e24f97 Closes #3810: Preserve slug value when editing existing objects 2020-02-19 13:53:11 -05:00
Jeremy Stretch
f05c7be394 Fixes #4204: Fix assignment of mask length when bulk editing prefixes 2020-02-19 13:28:07 -05:00
Jeremy Stretch
2cf990bd92 Standardize on two-word form of "change log" 2020-02-19 12:45:52 -05:00
Jeremy Stretch
21473548a5 Merge pull request #4181 from hSaria/2511-change-diff
Fixes #2511: Compare object change to the previous change
2020-02-19 12:41:24 -05:00
Jeremy Stretch
626513a8b2 Fixes #4202: Prevent reassignment to master device when bulk editing VC member interfaces 2020-02-19 11:29:42 -05:00
Jeremy Stretch
5871640701 Closes #4199: Update example report to use ChoiceSet 2020-02-19 10:31:10 -05:00
Jeremy Stretch
f1b0421805 Temporary hack to avoid name collision without renaming the secrets app 2020-02-18 18:00:00 -05:00
Jeremy Stretch
8cfb5ac5c6 Fixes #3967: Fix missing migration for interface templates of type "other" 2020-02-18 16:56:50 -05:00
Jeremy Stretch
ae1767b5d0 Remove obsolete InterfaceManager 2020-02-18 16:22:17 -05:00
Jeremy Stretch
84d078a539 Fixes #4196: Fix exception when viewing LLDP neighbors page 2020-02-18 16:21:50 -05:00
Jeremy Stretch
01b9d1a493 Closes #3848: Upgrade to Django 3.0 2020-02-18 16:03:28 -05:00
Jeremy Stretch
2a1de0202f Add helpful links to "new issue" page 2020-02-18 11:43:47 -05:00
Jeremy Stretch
4ea8967c2d Fixes #4194: Role field should not be required when searching/filtering secrets 2020-02-18 11:14:37 -05:00
Jeremy Stretch
a456cbb26c Fixes #4179: Site is required when creating a rack group or power panel 2020-02-18 11:08:16 -05:00
Jeremy Stretch
5b505b21c8 Fixes #4183: Fix representation of NaturalOrderingField values in change log 2020-02-18 10:50:14 -05:00
John Anderson
9116d74cf7 merge develop 2020-02-18 00:39:30 -05:00
John Anderson
a136a0788c #4121 - dynamic filter lookup expressions 2020-02-18 00:32:58 -05:00
Saria Hajjar
89ab6553d6 Changelog for #2511 2020-02-15 23:55:03 +00:00
Saria Hajjar
faa22cb637 Fixes #2511: Compare object change to the previous change 2020-02-15 22:39:08 +00:00
Jeremy Stretch
d6ccf13167 Changelog for #4081 2020-02-14 15:44:52 -05:00
Jeremy Stretch
f6cbce65fa Merge pull request #4178 from netbox-community/4081-drop-ip-family
Closes #4081: Drop the family column from IP objects
2020-02-14 15:42:19 -05:00
Jeremy Stretch
f0ced98dc6 Delete unused test data 2020-02-14 15:17:04 -05:00
Jeremy Stretch
fcdb05238c Restore filters 2020-02-14 15:16:18 -05:00
Jeremy Stretch
8687226cc7 Update family filters in querysets 2020-02-14 15:11:12 -05:00
Jeremy Stretch
047f13ac5d Update tests 2020-02-14 15:10:34 -05:00
Jeremy Stretch
b475a575e4 Drop family column from Aggregate, Prefix, and IPAddress models 2020-02-14 15:04:33 -05:00
Jeremy Stretch
1a8eea5aa9 Fixes #4175: Fix potential exception when bulk editing objects from a filtered list 2020-02-14 14:27:47 -05:00
Jeremy Stretch
8cb6aed8fa Closes #3753: Remove rack units endpoint (replaced with elevation) 2020-02-14 13:59:07 -05:00
Jeremy Stretch
926b1fadf2 Merge branch 'develop' into develop-2.8 2020-02-14 13:44:10 -05:00
Jeremy Stretch
2de8d8b73d Merge pull request #4174 from netbox-community/4164-object-list-template
Closes #4164: Consolidate object list templates
2020-02-14 13:31:25 -05:00
Jeremy Stretch
440f754fec Clean up TODO notes 2020-02-14 13:30:53 -05:00
Jeremy Stretch
815a46bfbe Convert device and VM list views to use obj_list.html 2020-02-14 13:21:32 -05:00
Jeremy Stretch
182fddddd2 Merge branch 'develop' into 4164-object-list-template 2020-02-14 13:11:30 -05:00
Jeremy Stretch
ce89fa74b9 Closes #4170: Improve color contrast in rack elevation drawings 2020-02-14 13:09:01 -05:00
Jeremy Stretch
7ce1289bb2 Clean up unused imports 2020-02-14 12:04:56 -05:00
Jeremy Stretch
e4df02887b Changelog for #3840 2020-02-14 12:04:35 -05:00
Jeremy Stretch
6bc7be7ba5 Merge pull request #3925 from hSaria/3840-limit-vlan-choices
Fixes #3840: Only show valid interface VLAN choices
2020-02-14 11:48:29 -05:00
Saria Hajjar
7aba8e3ec4 Added back clean 2020-02-14 16:43:42 +00:00
Jeremy Stretch
8d5ea5d005 Merge pull request #4169 from dstarner/redis-sentinel-conn-check
[Corollary to #4161] Redis Connection Check when Using Sentinel
2020-02-14 11:43:04 -05:00
Dan Starner
ec0f45e20d remove redis conn check from extras AppConfig 2020-02-14 11:16:59 -05:00
Jeremy Stretch
0c8ad45976 Merge pull request #4172 from dstarner/4171-required-settings-documentation-format
[Fix #4171] fix extraneous formatting of notice boxes in required settings doc
2020-02-14 10:47:40 -05:00
Dan Starner
e431ef09e5 fix extraneous formatting of notice boxes in required settings doc 2020-02-14 10:29:09 -05:00
Dan Starner
03a7f6bbda ammend redis conn check to acccount for sentinel 2020-02-14 09:39:01 -05:00
Jeremy Stretch
a4705fa73a Changelog for #2519 2020-02-14 09:35:43 -05:00
Jeremy Stretch
0a8d39cfe4 Merge pull request #3726 from eSentire/fix-2519
Fix race condition in available-prefix/ip APIs
2020-02-14 09:32:51 -05:00
Jeremy Stretch
1d72436bfc Fixes #4168: Role is not required when creating a virtual machine 2020-02-14 09:13:05 -05:00
Jeremy Stretch
598d23fc03 Post-release version bump 2020-02-13 21:51:03 -05:00
Jeremy Stretch
472a45ddec Merge pull request #4167 from netbox-community/develop
Release v2.7.6
2020-02-13 21:50:44 -05:00
Jeremy Stretch
0863145c7f Release v2.7.6 2020-02-13 21:46:03 -05:00
Jeremy Stretch
909323663e Fixes #4166: Fix schema migrations to enforce maximum character length for naturalized fields 2020-02-13 21:41:00 -05:00
Jeremy Stretch
8212c8f6fc Convert IPAM list views to extend standard template 2020-02-13 17:22:17 -05:00
Jeremy Stretch
8df9bb6fb4 Convert change log view to extend standard template 2020-02-13 17:11:39 -05:00
Jeremy Stretch
ff952fb221 Migrate extras views to use common object list template 2020-02-13 16:39:38 -05:00
John Anderson
9ead2635c5 merge develop 2020-02-13 16:00:07 -05:00
Jeremy Stretch
4d50cad6ed Post-release version bump 2020-02-13 15:39:08 -05:00
Jeremy Stretch
120cbb0159 Merge pull request #4165 from netbox-community/develop
Release v2.7.5
2020-02-13 15:36:50 -05:00
Jeremy Stretch
08ce024473 Release v2.7.5 2020-02-13 15:32:09 -05:00
Jeremy Stretch
807c2f048d Changelog for #3984 2020-02-13 15:16:07 -05:00
Jeremy Stretch
fafcdf7def Merge pull request #4161 from dstarner/issue-3984-redis-sentinel-conn
Fixes #3984: Allow for Redis Sentinel Connection Configuration
2020-02-13 15:14:42 -05:00
Jeremy Stretch
92fab048d1 Add tests for naturalization functions 2020-02-13 15:13:43 -05:00
Jeremy Stretch
6884404957 Migrate virtualization views to use common object list template 2020-02-13 14:24:22 -05:00
Jeremy Stretch
88c917231d Migrate tenancy views to use common object list template 2020-02-13 14:21:14 -05:00
Jeremy Stretch
a054aff3c4 Migrate secrets views to use common object list template 2020-02-13 14:19:14 -05:00
Jeremy Stretch
8fd809ac5e Migrate IPAM views to use common object list template 2020-02-13 14:17:13 -05:00
Jeremy Stretch
fff657cd5a Migrate DCIM views to use common object list template 2020-02-13 14:07:15 -05:00
Jeremy Stretch
4ef15e4dc8 Migrate circuits views to use common object list template 2020-02-13 13:31:04 -05:00
Jeremy Stretch
c5f74cce80 Introduce a common template for object list views 2020-02-13 13:29:50 -05:00
Jeremy Stretch
35498c17d7 Updated the style guide 2020-02-13 11:04:07 -05:00
Jeremy Stretch
874e59b01a Closes #4060: Move secrets panel on home page to righthand column 2020-02-13 10:30:12 -05:00
Dan Starner
72f0e31b84 fixed extraneous linting error 2020-02-13 10:27:56 -05:00
Dan Starner
ba9a2956a8 documentation on redis sentinel 2020-02-13 10:26:03 -05:00
Dan Starner
3538eeda14 allow for redis sentinel connection 2020-02-13 10:26:03 -05:00
Jeremy Stretch
0c89534bfb Closes #4160: Link to full database configuration parameters in configuration docs 2020-02-13 10:08:10 -05:00
Jeremy Stretch
47b15aacef Changelog for #4159 2020-02-13 09:48:12 -05:00
Jeremy Stretch
3e0ab79977 Merge pull request #4162 from netbox-community/4159-caching_redis_using_wrong_key
Fixes: #4159 - Corrects settings.py to use CACHING_REDIS
2020-02-13 09:46:41 -05:00
Jeremy Stretch
344fa72357 renaturalize command should not skip any values 2020-02-13 09:33:01 -05:00
Daniel Sheppard
617fc7659f Fixes: #4159 - Corrects settings.py to use CACHING_REDIS instead of WEBHOOKS_REDIS 2020-02-13 08:26:47 -06:00
Jeremy Stretch
0d91b6b74b Merge pull request #4102 from kobayashi/4093-vm-status-choice
Fixes #4093: Additional status choices for vms
2020-02-12 22:58:43 -05:00
kobayashi
335343642b additional status choices for vms 2020-02-12 22:43:40 -05:00
kobayashi
bc7f5fb33a Modify offline status color for vm 2020-02-12 22:19:17 -05:00
kobayashi
ca56fc709a Fixes #4093: Add decommissioning for vms 2020-02-12 22:19:17 -05:00
Jeremy Stretch
a08ee68033 Exempt pull requests from stalebot 2020-02-12 21:56:23 -05:00
Jeremy Stretch
0d57cb0033 Changelog & docs for #3766 2020-02-12 16:54:40 -05:00
Jeremy Stretch
53804d39bb Merge pull request #4142 from netbox-community/3766-enable_widgets_in_script_fields
Fixes: #3766 - Enable widget usage in scripts
2020-02-12 16:48:08 -05:00
Jeremy Stretch
1e221cd9bb Update changelog 2020-02-12 16:28:19 -05:00
Jeremy Stretch
0c942f18c1 Merge pull request #4068 from netbox-community/4034-prefix_ordering_tests
Fixes: #4034 - Adds Prefix & IPAddress Ordering Tests
2020-02-12 16:27:02 -05:00
Jeremy Stretch
00d32f0a7d Merge pull request #4156 from netbox-community/4153-renaturalize-command
Closes #4153: Add a "renaturalize" management command
2020-02-12 16:20:52 -05:00
Jeremy Stretch
df3fef8bb1 Merge pull request #4154 from netbox-community/4138-device_bays_in_rack_elevations
Fixes: #4138 - Add Device Bay count to rack elevation
2020-02-12 16:19:57 -05:00
Jeremy Stretch
5cc24c055b Tweak docs link for send_mail() to reference stable; formatting 2020-02-12 16:18:08 -05:00
Jeremy Stretch
4064c32a7f Fix nav menu link for configcontext_add 2020-02-12 16:16:23 -05:00
Joshua Corrick
6d7c5d51fe Add email testing example (#4152)
* Add email testing example

Includes an example provided by  Jeremy

* Updated with suggestions

Co-authored-by: Jeremy Stretch <jeremy.stretch@networktocode.com>
2020-02-12 16:15:05 -05:00
Jeremy Stretch
64c0059dd8 Merge pull request #4155 from hSaria/4150-yaml-nested-tags
Fixes #4150: Replace OrderedDict with Dict when rendering YAML
2020-02-12 16:13:32 -05:00
Jeremy Stretch
d0ece2e48d Merge pull request #4144 from netbox-community/3986-rack_positions_svg
Fixes: #3986 - Convert rack units to part of SVG rendered document
2020-02-12 16:06:05 -05:00
Jeremy Stretch
139f18b2e5 Closes #4153: Add a management command to manually renaturalize applicable objects (from #3799) 2020-02-12 15:59:37 -05:00
Saria Hajjar
8eea0331bf Fixes #4150: Replace OrderedDict with Dict when rendering YAML 2020-02-12 19:59:04 +00:00
Daniel Sheppard
62d6e02d6b Modify _draw_elevations
* Add legend_width argument, variable & constant
* Applied legend_width variable where required
* Removed U prefix
2020-02-12 13:15:29 -06:00
Jeremy Stretch
a8601bb1fd Merge pull request #4151 from netbox-community/4146-secretrole-enforcement
Fixes #4146: Fix SecretRole permissions enforcement
2020-02-12 13:51:44 -05:00
Daniel Sheppard
fe452735be Add Device Bay count to rack elevation names 2020-02-12 12:48:13 -06:00
Jeremy Stretch
3b1128f8f3 Establish standard test cases for all models 2020-02-12 13:25:56 -05:00
Daniel Sheppard
0402323ef9 Fixes: #4130
Corrects service name for the RQ worker service in docs/installation/upgrading.md
2020-02-12 11:26:40 -06:00
Jeremy Stretch
5bf85597ed Fixes #4146: Fix SecretRole permissions enforcement 2020-02-12 11:13:32 -05:00
Jeremy Stretch
e4b910fe87 Fixes #4148: Remove dead link to topology maps docs page 2020-02-12 09:44:30 -05:00
Jeremy Stretch
24db573764 Merge pull request #3997 from hSaria/3995-navbar-overflow
Fixes #3995: Navbar scroll when overflowing
2020-02-12 09:41:48 -05:00
Jeremy Stretch
5befa533c6 Merge branch 'develop' into 3995-navbar-overflow 2020-02-12 09:40:31 -05:00
Dan Sheppard
15bc731f61 Convert rack units to part of SVG rendered document 2020-02-11 23:31:51 -06:00
Dan Sheppard
8fb4988fa1 Fix typo in docstring 2020-02-11 21:01:43 -06:00
Daniel Sheppard
ab378ed218 Fixes: #4130
Corrects service name for the RQ worker service in docs/installation/upgrading.md
2020-02-11 20:39:50 -06:00
Daniel Sheppard
56bb053146 Fix test error 2020-02-11 20:27:02 -06:00
Daniel Sheppard
3c3cca8ec1 Enable widget usage (APISelect, APIMultipleSelect, StaticSelect2, etc) in scripts 2020-02-11 20:12:02 -06:00
Dan Sheppard
908586c93a Fix PEP8 errors 2020-02-11 18:21:58 -06:00
Matt Olenik
2e83ce76ed Fix race condition in available-prefix/ip APIs
Implement advisory lock to prevent duplicate records being inserted
when making simultaneous calls. Fixes #2519
2020-02-11 13:36:52 -08:00
Jeremy Stretch
2ab382eec5 Fixes #4137: Disable occupied terminations when connecting a cable to a circuit 2020-02-11 14:56:02 -05:00
Jeremy Stretch
2503978555 Add navigation menu link for adding config contexts 2020-02-11 14:32:41 -05:00
Anton Tokarev
55886d6793 fix typo (#4135)
Co-authored-by: Jeremy Stretch <jeremy.stretch@networktocode.com>
2020-02-11 14:22:32 -05:00
Jeremy Stretch
009c0ba31c Fixes #4134: Device power ports and outlets should inherit type from the parent device type 2020-02-11 14:18:45 -05:00
Jeremy Stretch
ec53e1c74c Merge pull request #4136 from netbox-community/3912-remove-chained-fields
Closes #3912: Remove chained form fields
2020-02-11 14:01:55 -05:00
Jeremy Stretch
7177fcfa61 Use DynamicModelChoiceField for all fields using APISelect 2020-02-11 12:25:40 -05:00
Jeremy Stretch
fb56d5bc66 Account for initial data when binding a DynamicModelChoiceField 2020-02-11 10:21:44 -05:00
Jeremy Stretch
221805a63e Use TreeNode choice fields for region assignment 2020-02-11 09:50:33 -05:00
Jeremy Stretch
da68968d75 Replace FilterChoiceField with DynamicModelMultipleChoiceField 2020-02-11 09:33:41 -05:00
Dan Sheppard
ca795f729f Merge branch '4034-prefix_ordering_tests' of https://github.com/netbox-community/netbox into 4034-prefix_ordering_tests
 Conflicts:
	netbox/ipam/tests/test_ordering.py
2020-02-10 21:38:53 -06:00
Dan Sheppard
ff4e6bd166 Update tests
Add docstrings
Consolidate tests
2020-02-10 21:37:40 -06:00
Jeremy Stretch
5ea30c8628 Replace ChainedModelChoiceField with DynamicModelChoiceField 2020-02-10 17:23:52 -05:00
Jeremy Stretch
a54fcda781 Merge pull request #4133 from netbox-community/4083-serializer-null-choices
Fixes #4083: Permit nullifying applicable choice fields via API requests
2020-02-10 15:16:38 -05:00
Jeremy Stretch
7388fa3556 Fixes #4083: Permit nullifying applicable choice fields via API requests 2020-02-10 15:10:33 -05:00
Jeremy Stretch
a966a4c8ac Closes #4129: Add individual deletion views for device type components 2020-02-10 11:43:51 -05:00
Jeremy Stretch
ebef48e472 Merge pull request #4075 from kobayashi/3507-filter-by-devices
Fixes #3507: Filtering IP by multiple devices
2020-02-10 11:11:18 -05:00
Jeremy Stretch
26ca6b4a84 #4108: Fix null choice population 2020-02-10 10:57:23 -05:00
Jeremy Stretch
3da6f22479 Merge pull request #4128 from netbox-community/4108-apiselect-performance
Closes #4108: Extraneous queryset evaluation by FilterChoiceFields
2020-02-10 10:26:49 -05:00
Jeremy Stretch
d4789b7c9e Changelog for #4108 2020-02-10 10:20:06 -05:00
Jeremy Stretch
5008526db1 Set a default self.to_field_name for FilterChoiceField 2020-02-10 10:08:20 -05:00
Jeremy Stretch
009fc4f301 Remove custom template for APISelect widget 2020-02-10 10:02:42 -05:00
Jeremy Stretch
55f5ede970 Standardize usage of FilterChoiceField 2020-02-10 09:58:33 -05:00
Jeremy Stretch
5ddfde2214 Clean up unneeded code relevant to FilterChoiceField 2020-02-10 09:44:19 -05:00
John Anderson
9284e83270 py3.5 compatibility 2020-02-09 21:32:45 -05:00
John Anderson
a6b43b30e9 functional dynamic filter lookups 2020-02-09 17:46:21 -05:00
John Anderson
a311002141 initial work on dynamic lookup expressions 2020-02-09 03:20:59 -05:00
kobayashi
505cb9cab8 Enabled filtering virtual chassis devices 2020-02-09 00:58:54 -05:00
kobayashi
d5c4a9d159 Fixes #3507: Filtering IP by multiple devices 2020-02-09 00:42:01 -05:00
Saria Hajjar
26ddd96e30 Cleaned duplicate code 2020-02-08 16:18:58 +00:00
Saria Hajjar
f0c83e168e Merge branch 'develop' into 3840-limit-vlan-choices 2020-02-08 16:14:10 +00:00
Jeremy Stretch
885ea8a4d5 Override get_bound_field() on FilterChoiceFieldMixin to restrict the queryset of bound fields 2020-02-07 18:04:40 -05:00
Jeremy Stretch
202a0a0e73 Merge pull request #4122 from netbox-community/3799-natural-ordering-field
Closes #3799: Remove NaturalOrderingManager
2020-02-07 16:26:45 -05:00
Jeremy Stretch
5bfd65b5fe Changelog for #3799 2020-02-07 16:18:15 -05:00
Jeremy Stretch
7c74d2ca65 Convert interface models to use NaturalOrderingField 2020-02-07 15:58:03 -05:00
Jeremy Stretch
9adeed55fb Update table field ordering 2020-02-07 12:44:51 -05:00
Jeremy Stretch
12c7d83a91 Fix PowerOutlet migrations 2020-02-07 12:43:53 -05:00
Jeremy Stretch
dc1b7874ff Store empty names as null 2020-02-07 12:24:38 -05:00
Jeremy Stretch
c72a353733 Enable reverse migration 2020-02-07 12:23:52 -05:00
Jeremy Stretch
35511cfdc1 Remove NaturalOrderingManager 2020-02-07 11:59:32 -05:00
Jeremy Stretch
099c446f38 Convert remaining DCIM models to use NaturalOrderingField 2020-02-07 11:59:16 -05:00
Jeremy Stretch
705c352885 Convert device component templates to use NaturalOrderingField 2020-02-07 11:42:12 -05:00
Jeremy Stretch
12d09e2274 Convert device components to use NaturalOrderingField 2020-02-07 11:36:58 -05:00
Jeremy Stretch
b271fd32bd Introduce NaturalOrderingField 2020-02-07 11:36:22 -05:00
Jeremy Stretch
b3c2b78e8a Chnagelog for #4100 2020-02-07 09:24:51 -05:00
Jeremy Stretch
97a89948c8 Merge pull request #4115 from hSaria/4100-interface-filter-device
Fixes #4100: Added device field to device components filter forms
2020-02-07 09:20:49 -05:00
Jeremy Stretch
1e61fcb485 Merge pull request #4117 from netbox-community/4116-component-bulk-actions
Closes #4116: Enable bulk edit and delete functions for device component list views
2020-02-06 22:03:25 -05:00
Jeremy Stretch
4cc9f2f67d Changelog for #4116 2020-02-06 21:52:10 -05:00
Jeremy Stretch
52257467c3 Tweak bulk edit views to dynamically remove device-dependent fields 2020-02-06 21:44:28 -05:00
Jeremy Stretch
4563749fd9 Enable bulk edit/delete views for all device components 2020-02-06 20:58:14 -05:00
Jeremy Stretch
6d242ec348 Correct typo 2020-02-06 20:46:19 -05:00
Saria Hajjar
d0e00162ed Account for header height 2020-02-07 00:14:05 +00:00
Saria Hajjar
21f2e0b131 Changed navbar scrollbar to auto 2020-02-06 23:30:58 +00:00
hSaria
6ac8d41323 Merge branch 'develop' into 3995-navbar-overflow 2020-02-06 23:18:24 +00:00
Saria Hajjar
bb9e1ad857 Fixes #4100: Added device field to device components filter forms 2020-02-06 23:10:38 +00:00
Jeremy Stretch
98de88de90 Standardize URL paths for VM interfaces 2020-02-06 17:40:04 -05:00
Jeremy Stretch
c571aa68be Changelog for #4113 2020-02-06 16:05:30 -05:00
Jeremy Stretch
091d860ae5 Merge pull request #4114 from netbox-community/4113-component-bulk-editing
Closes #4113: Add bulk edit functionality for device type components
2020-02-06 16:03:37 -05:00
Jeremy Stretch
b5344b0aa7 Fix table links for adding new components 2020-02-06 15:54:52 -05:00
Jeremy Stretch
17e0054941 Fix up bulk editing forms 2020-02-06 15:51:51 -05:00
Jeremy Stretch
1b5969a5ee Add tests for DeviceType component bulk edit views 2020-02-06 15:33:47 -05:00
Jeremy Stretch
3378287b0c Add bulk edit views for DeviceType components 2020-02-06 15:29:10 -05:00
Jeremy Stretch
077d692d6d Merge pull request #4112 from netbox-community/4109-devicetype-component-tests
Closes #4109: Add view tests for device component templates
2020-02-06 14:57:10 -05:00
Jeremy Stretch
5620fdc63e Add tests for device type component views 2020-02-06 14:39:36 -05:00
Jeremy Stretch
f7ca97d51f Fix bulk edit buttons 2020-02-06 13:19:25 -05:00
Jeremy Stretch
d400f92ee8 Overhaul device component template creation views/URLs 2020-02-06 13:13:40 -05:00
Jeremy Stretch
c1792653cc Rename device component edit URLs 2020-02-06 12:18:53 -05:00
Jeremy Stretch
aebfb143e0 Rename component template deletion URLs 2020-02-06 12:16:28 -05:00
Jeremy Stretch
ef4ea06f5d Reorganized device component URLs (again) 2020-02-06 11:51:27 -05:00
Jeremy Stretch
85729f3df8 Simplify help_text for ExpandableNameField 2020-02-06 11:44:29 -05:00
Jeremy Stretch
a2475ee501 Remove obsolete ComponentForm 2020-02-06 11:36:25 -05:00
Jeremy Stretch
71601aad39 Replace HiddenInput widget on device component creation forms with APISelect 2020-02-06 11:29:50 -05:00
Jeremy Stretch
c1c8b5e816 Introduce InventoryItemCreateView to bring inventory items up to par with other components 2020-02-06 10:59:13 -05:00
Jeremy Stretch
2296cdc222 Fixes #4090: Render URL custom fields as links under object view 2020-02-05 17:08:39 -05:00
Jeremy Stretch
070b41e694 Reduce number of changelog entries to improve page loading time 2020-02-05 17:01:46 -05:00
Jeremy Stretch
d04626e75f Fixes #4099: Linkify interfaces on global interfaces list 2020-02-05 16:52:42 -05:00
Jeremy Stretch
68738e683a Fixes #4091: Fix filtering of objects by custom fields using UI search form 2020-02-05 16:39:42 -05:00
Jeremy Stretch
3f2c74f5e7 Merge pull request #4096 from elju/patch-1
Updated forms.py to match current naming (Fix for #4095)
2020-02-05 16:25:34 -05:00
Jeremy Stretch
a58bbccfd3 Fixes #4094: Convert unnecessary regular expressions to strings in URL patterns 2020-02-05 16:12:48 -05:00
Jeremy Stretch
b1e78fa3c4 Merge pull request #4098 from netbox-community/4086-device-component-urls
Closes #4086: Rename device component create/edit/delete URLs
2020-02-05 16:03:14 -05:00
Jeremy Stretch
0d3ff664b6 Move model_to_dict() into assertInstanceEqual(); clean up test data 2020-02-05 15:47:50 -05:00
Jeremy Stretch
b0c0ad7c82 Adapt component creation forms to infer parent device/VM from initial or bound data 2020-02-05 15:31:30 -05:00
Jeremy Stretch
0ad613e6b4 Enable bulk creation tests for device components 2020-02-05 15:22:57 -05:00
Jeremy Stretch
75906f7591 Move component bulk creation views to new URLs 2020-02-05 12:36:38 -05:00
El Ju
c49d977379 Updated forms.py to match current naming 2020-02-05 17:26:44 +01:00
Jeremy Stretch
6b9fa5e76f Enable tests for component bulk edit views 2020-02-05 11:14:07 -05:00
Jeremy Stretch
57a0cf0a33 Fix component bulk edit views 2020-02-05 10:28:39 -05:00
Jeremy Stretch
f8ce67c69f Tweak BulkEditView to improve handling of initial PK values 2020-02-05 09:56:49 -05:00
Jeremy Stretch
d0295f089d Fixes #4089: Selection of power outlet type during bulk update is optional 2020-02-04 20:49:42 -05:00
Jeremy Stretch
f805b57778 Adapt BulkEditView to not require a parent object for device components 2020-02-04 18:08:40 -05:00
Jeremy Stretch
3e79b9d26a Add InterfaceTestCase for virtual machines 2020-02-04 16:40:18 -05:00
Jeremy Stretch
c1639b7781 Move component bulk delete views to new URLs 2020-02-04 16:06:55 -05:00
Jeremy Stretch
fca347e49e Reorder URLs 2020-02-04 15:41:15 -05:00
Jeremy Stretch
32623148dc Post-release version bump 2020-02-04 15:06:58 -05:00
Jeremy Stretch
68fbd9b017 Merge pull request #4088 from netbox-community/develop
Release v2.7.4
2020-02-04 15:04:34 -05:00
Jeremy Stretch
11d67509e0 Release v2.7.4 2020-02-04 14:57:12 -05:00
Jeremy Stretch
c96fc6e21a Merge pull request #4087 from netbox-community/4085-dcim-component-view-tests
Closes #4085: Standardize device component view tests
2020-02-04 14:51:48 -05:00
Jeremy Stretch
763d9b9cf7 Convert all DCIM component view tests to use StandardTestCases 2020-02-04 14:25:02 -05:00
Jeremy Stretch
bece1155ee Introduce create_test_device() to reduce test setup boilerplate 2020-02-04 11:58:52 -05:00
Jeremy Stretch
cbe090cd3c Fixes #4084: Fix exception when creating an interface with tagged VLANs 2020-02-04 11:47:14 -05:00
Jeremy Stretch
c3a6a4520a #3894 follow-up 2020-02-04 10:09:22 -05:00
Jeremy Stretch
67e427403f Merge pull request #3894 from hSaria/2921-tags-select2
Fixes #2921: Replace tags filter with Select2 widget
2020-02-04 09:38:14 -05:00
Jeremy Stretch
0d41d12267 Merge branch 'develop' into 2921-tags-select2 2020-02-04 09:37:31 -05:00
Jeremy Stretch
efb7f151ec Changelog for #3313 2020-02-03 16:20:29 -05:00
Jeremy Stretch
fe22a8d0af Merge pull request #4011 from hSaria/3313-config-context-gui
Fixes #3313: YAML-format the config context in the GUI
2020-02-03 16:13:58 -05:00
Jeremy Stretch
ed99158391 Merge branch 'develop' into 3313-config-context-gui 2020-02-03 16:07:15 -05:00
Jeremy Stretch
b0f7feefa8 Changelog for #3886 2020-02-03 16:04:25 -05:00
Jeremy Stretch
fcd8e93e2e Merge pull request #4014 from hSaria/3886-config-context-cluster
Fixes #3886: Config context cluster (group)
2020-02-03 16:02:56 -05:00
Jeremy Stretch
173c530fab Merge pull request #4064 from netbox-community/3961-change-systemd-instructions
Fixes: #3961 - Update migrate-to-systemd.md documentation
2020-02-03 15:46:20 -05:00
Jeremy Stretch
0a87df48ab Update GitHub issue templates 2020-02-03 14:45:36 -05:00
Jeremy Stretch
eef79e1443 Fixes #4079: Fix assignment of power panel when bulk editing power feeds 2020-02-03 14:34:47 -05:00
Jeremy Stretch
91929aae1b Merge pull request #4080 from netbox-community/4077-view-tests
Closes #4077: Add tests for bulk edit/delete views
2020-02-03 14:32:56 -05:00
Jeremy Stretch
3f13441a5d Add view tests for power panels and power feeds 2020-02-03 14:25:06 -05:00
Jeremy Stretch
7b4f3e8261 Correct view for PowerFeed creation URL 2020-02-03 14:24:32 -05:00
Jeremy Stretch
d431efb7d4 Add bulk edit view tests 2020-02-03 13:53:19 -05:00
Jeremy Stretch
4aa694f044 Skip non-model fields when applying bulk changes 2020-02-03 13:07:46 -05:00
Jeremy Stretch
c3bd1881f5 Correct nullable_fields for ServiceBulkEditForm 2020-02-03 12:25:20 -05:00
Jeremy Stretch
a4aadf730c Correct default_return_url for TagBulkEditView 2020-02-03 11:59:43 -05:00
Jeremy Stretch
24ab082674 Add bulk delete view tests 2020-02-03 10:04:09 -05:00
Saria Hajjar
bceaa4a9a4 Corrected models for cluster and cluster group fields 2020-02-02 23:37:01 +00:00
Jeremy Stretch
5386ed438e Extend standard view test case to validate built-in CSV export 2020-01-31 17:09:50 -05:00
Jeremy Stretch
2ea95941e2 Removed obsolete CSV headers from DeviceType (export is now YAML-based) 2020-01-31 17:08:38 -05:00
Jeremy Stretch
f632b5bc29 Fixes #4067: Correct permission checked when creating a rack (vs. editing) 2020-01-31 16:12:46 -05:00
Jeremy Stretch
cea1e3d090 Fixes #4071: Enforce "view tag" permission on individual tag view 2020-01-31 16:10:16 -05:00
Jeremy Stretch
ce081a6e15 Merge pull request #4072 from netbox-community/4000-view-tests
Closes #4000: Add tests for the create, edit, and delete views of all models
2020-01-31 16:07:32 -05:00
Jeremy Stretch
eb9538d6da Clean up imports 2020-01-31 15:59:26 -05:00
Jeremy Stretch
e50eab2342 Convert virtualization view tests to use StandardTestCases 2020-01-31 15:57:33 -05:00
Jeremy Stretch
5517145ae3 Convert tenancy view tests to use StandardTestCases 2020-01-31 15:44:10 -05:00
Jeremy Stretch
e8e39dc5e3 Convert secrets view tests to use StandardTestCases 2020-01-31 15:37:58 -05:00
Jeremy Stretch
b361cb00f2 Convert IPAM view tests to use StandardTestCases 2020-01-31 15:19:10 -05:00
Jeremy Stretch
3668aa21fe Fix DeviceTypeTestCase permissions assignment for custom tests 2020-01-31 14:29:56 -05:00
Jeremy Stretch
8881bba696 Suppress tag view test until #4071 is fixed 2020-01-31 14:22:56 -05:00
Jeremy Stretch
250bda2bf6 Extend and correct evaluation of view permissions 2020-01-31 14:13:30 -05:00
Jeremy Stretch
936e3424bb Refactor model_to_dict() to better handle tags 2020-01-31 14:12:48 -05:00
Jeremy Stretch
ab7b921641 Convert extras view tests to StandardTestCases 2020-01-31 13:45:09 -05:00
Jeremy Stretch
c9d0dcecf3 model_to_dict(): Convert object lists to PK lists 2020-01-31 13:44:34 -05:00
Jeremy Stretch
86ef739c12 Migrate (most) DCIM view tests to use StandardTestCases 2020-01-31 12:32:33 -05:00
Jeremy Stretch
c14496d0c4 DeviceForm.manufacturer should not be a required field 2020-01-31 12:28:50 -05:00
Jeremy Stretch
a208cbdf0b model_to_dict(): Remove fields that start with an underscore 2020-01-31 12:14:51 -05:00
Jeremy Stretch
6a17be740b post_data(): Ignore iterables 2020-01-31 11:50:12 -05:00
Daniel Sheppard
8e9a0eeef0 Fix PEP8 errors and document functions 2020-01-31 10:05:57 -06:00
Daniel Sheppard
d746448d7d Fixes: #3961 - Edit migrate-to-systemd.md to closely match installation instructions under 3-http-daemon.md 2020-01-31 09:39:27 -06:00
Jeremy Stretch
7daf1df22d Add _get_url() for View test case 2020-01-31 10:30:13 -05:00
Jeremy Stretch
78d43a5d66 Move form/CSV data declaration under setUpTestData 2020-01-31 09:27:41 -05:00
Jeremy Stretch
939b5f2e29 Reorganize test classes to prevent unittest from running the base TestCases 2020-01-31 09:00:01 -05:00
Saria Hajjar
0d18c296a9 Set default config context format to JSON to maintain existing behavior 2020-01-31 11:11:42 +00:00
Jeremy Stretch
98cce7eee4 Added ViewTestCase (WIP) 2020-01-30 21:57:20 -05:00
Jeremy Stretch
e01c984c01 Introduced a custom model_to_dict() 2020-01-30 20:48:26 -05:00
Jeremy Stretch
4522a285e0 Fix headings 2020-01-30 20:05:27 -05:00
Jeremy Stretch
a44c4d14e4 Convert view tests under extras to the new TestCase 2020-01-30 18:13:02 -05:00
Jeremy Stretch
67fafb2b9d Use assertHttpStatus for evaluating HTTP response codes 2020-01-30 18:08:25 -05:00
Jeremy Stretch
179abcc79d Refactor APITestCase to subclass TestCase 2020-01-30 17:57:34 -05:00
Jeremy Stretch
316c0b6168 Merge pull request #4053 from netbox-community/4051-disable-makemigrations
Closes #4051: Disable the makemigrations management command
2020-01-30 16:50:40 -05:00
Jeremy Stretch
ac27759250 Merge branch 'develop' into 4051-disable-makemigrations 2020-01-30 16:49:15 -05:00
Jeremy Stretch
c8c9f78829 Documented the new DEVELOPER configuration parameter 2020-01-30 16:47:44 -05:00
Jeremy Stretch
61ac7c44ba Migrate view tests to use new TestCase class 2020-01-30 16:37:40 -05:00
Jeremy Stretch
43b2c36066 Introduced a custom TestCase 2020-01-30 16:19:51 -05:00
Jeremy Stretch
1a25f5a7f2 Fixes #4030: Fix exception when bulk editing interfaces (revised) 2020-01-30 15:12:10 -05:00
Jeremy Stretch
b9765b857d Merge pull request #4050 from netbox-community/568-customfield-csv-import
Closes #568: Extend CSV import to support custom fields
2020-01-30 14:04:57 -05:00
agrrajag
d0d2af4cab Update 3-http-daemon.md (#4055)
There was no documentation to move back into the netbox folder after installing/configuring nginx. You would move into nginx on line 42 then try and figure out why you couldn't copy gunicorn on line 113.
2020-01-30 14:00:37 -05:00
Jeremy Stretch
4b02d294ce Fixes #4052: Fix error when bulk importing interfaces to virtual machines 2020-01-30 13:55:39 -05:00
Jeremy Stretch
d9b8bc0422 Fix VM interfaces table header alignment 2020-01-30 13:39:50 -05:00
Saria Hajjar
ace8fac2c1 Removed changelog to avoid merge conflicts 2020-01-30 18:29:08 +00:00
Saria Hajjar
ae95b159bc Virtualization interfaces VLAN filtering 2020-01-30 18:26:30 +00:00
Saria Hajjar
ff822743cc Corrected linter warning 2020-01-30 18:10:39 +00:00
Saria Hajjar
7897ebb2ed Corrected changelog 2020-01-30 17:52:30 +00:00
Saria Hajjar
52f7ef4864 Merge branch 'develop' into 2921-tags-select2 2020-01-30 17:51:55 +00:00
Saria Hajjar
5879671971 Avoid overriding private attribute in super 2020-01-30 17:49:42 +00:00
Saria Hajjar
2375d66f75 Added TagFilterField to device components' filter forms 2020-01-30 17:45:03 +00:00
Jeremy Stretch
923c2728b3 Fixes #4056: Repair schema migration for Rack.outer_unit (from #3569) 2020-01-30 12:08:40 -05:00
Jeremy Stretch
4ba2579936 Closes #4051: Disable the makemigrations management command 2020-01-30 10:12:53 -05:00
John Anderson
8274903985 version bump for v2.8.0 2020-01-29 16:46:44 -05:00
Jeremy Stretch
03087e9d01 Fixes #4049: Restore missing tags field in IPAM service serializer 2020-01-29 16:22:06 -05:00
Jeremy Stretch
eafeaab014 Add tests for invalid import data 2020-01-29 16:07:32 -05:00
Jeremy Stretch
c75315fda6 Extend CSV import test 2020-01-29 15:34:55 -05:00
Jeremy Stretch
193435b554 Enable CSV import for custom fields 2020-01-29 14:29:47 -05:00
Dan Sheppard
d30d79b4e3 Cleanup Imports 2020-01-29 12:55:19 -06:00
Dan Sheppard
23155551d1 Remove complex ordering for IP addresses
After review complex ordering does not appear to be required
2020-01-29 12:54:55 -06:00
Jeremy Stretch
e6b018909d Introduced CustomFieldModelCSVForm 2020-01-29 13:53:26 -05:00
Dan Sheppard
22228b58f1 #4034 - Create tests for addresses 2020-01-29 12:52:48 -06:00
Jeremy Stretch
35f2291edc Fix assignment of initial CustomField values when editing an object 2020-01-29 13:31:36 -05:00
Jeremy Stretch
c3f86456d6 Remove get_custom_fields_for_model() 2020-01-29 12:12:47 -05:00
Jeremy Stretch
585ea71d1a Move form field generation logic to CustomField class 2020-01-29 11:44:37 -05:00
Jeremy Stretch
9929a05bfe Update release notes 2020-01-29 11:00:46 -05:00
Jeremy Stretch
f12199dcb5 Rename and simplify CustomFieldChoiceField 2020-01-29 11:00:03 -05:00
Jeremy Stretch
bc7cf63958 Rename and refactor CustomFieldForm 2020-01-29 10:59:18 -05:00
Jeremy Stretch
db3b4505c1 Merge pull request #3885 from hSaria/568-csv-import-cf
Fixes #568: CSV import/export of custom fields
2020-01-29 10:11:40 -05:00
Jeremy Stretch
943c644dc9 Merge pull request #4037 from newlandk/patch-1
Fixes #4039: LDAP Documentation
2020-01-29 10:09:07 -05:00
Jeremy Stretch
e0d538ad31 Fixes #4043: Fix toggling of required fields in custom scripts 2020-01-29 09:40:17 -05:00
Jeremy Stretch
1849473469 Merge pull request #4023 from smutel/UpdateDoc
Fixes #4024: Update nginx documentation
2020-01-29 09:29:50 -05:00
Dan Sheppard
084a68f6d1 #4034 - Create tests for prefixes 2020-01-28 22:11:31 -06:00
Kevin Newland
6fefa3c7dd update ldap documentation
use new ldap cache configuration in documentation
https://github.com/netbox-community/netbox/blob/develop/netbox/netbox/settings.py#L360
2020-01-28 18:34:26 -06:00
Jeremy Stretch
4629cda9ad Post-release version bump 2020-01-28 16:42:33 -05:00
Jeremy Stretch
3143f75a38 Merge pull request #4035 from netbox-community/develop
Release v2.7.3
2020-01-28 16:39:09 -05:00
Jeremy Stretch
be716a3345 Release v2.7.3 2020-01-28 16:33:55 -05:00
Jeremy Stretch
8de9f52151 Fixes #4033: Restore missing comments field label of various bulk edit forms 2020-01-28 16:09:10 -05:00
Jeremy Stretch
0a11fc1221 Fixes #4030: Fix exception when setting interfaces to tagged mode in bulk 2020-01-28 14:19:29 -05:00
Jeremy Stretch
ede576a2ae Changelog for #4022 2020-01-28 13:55:44 -05:00
Jeremy Stretch
12cf69f7e1 Merge pull request #4022 from hSaria/4010-interface-ip-filter
Fixes #4010: Fixes IP addresses table when filtering interfaces
2020-01-28 13:54:21 -05:00
Jeremy Stretch
2a4ccae113 Merge pull request #4031 from kobayashi/3978-add-vrf-filter
Fixes #3978: VRF filtering for NAT IP search
2020-01-28 13:46:54 -05:00
Jeremy Stretch
77292050d4 Changelog for #4025 2020-01-28 13:38:03 -05:00
Jeremy Stretch
e7ef142620 Merge pull request #4026 from hSaria/4025-cable-status-class
Fixes #4025: Cable status class
2020-01-28 13:34:46 -05:00
Jeremy Stretch
07d8476cf5 Merge pull request #4032 from netbox-community/4027-ipaddress-migration
Fixes #4027: Repair schema migration for IP addresses with DHCP status
2020-01-28 13:32:17 -05:00
Jeremy Stretch
9b9e568446 Fixes #4027: Repair schema migration for #3569 to convert IP addresses with DHCP status 2020-01-28 12:49:00 -05:00
Saria Hajjar
8849f4b0a5 Added cluster groups and clusters to serializers 2020-01-28 17:30:26 +00:00
kobayashi
3c5346f60a Fixes #3978: VRF filtering for NAT IP search 2020-01-28 10:22:28 -05:00
Jeremy Stretch
8d547e9906 Fixes #4028: Correct URL patterns to match Unicode characters in tag slugs 2020-01-28 09:47:33 -05:00
Saria Hajjar
720bd87292 Fixed interface mark connected/planned buttons 2020-01-27 22:56:25 +00:00
Saria Hajjar
8306976b3e Removed erroneous double-space 2020-01-27 22:49:36 +00:00
Saria Hajjar
3bce8e9716 Fixes #4025: Cable status class 2020-01-27 22:44:38 +00:00
Jeremy Stretch
9c4f1d5795 Changelog for #3338 2020-01-27 17:24:00 -05:00
Jeremy Stretch
93fa00b673 #3338: Prefetch termination devices to avoid extra database queries 2020-01-27 17:22:31 -05:00
Jeremy Stretch
49a6332d37 Merge pull request #4012 from hSaria/3338-api-circuit-term
Fixes #3338: Added termination A and Z to the circuit
2020-01-27 17:14:40 -05:00
Saria Hajjar
5c5b9c95aa Interface selector restricted to only interface 2020-01-27 22:07:42 +00:00
Jeremy Stretch
7abcc7acaa Merge pull request #3993 from hSaria/3935-swagger-default-info
Fixes #3935: Swagger DEFAULT_INFO
2020-01-27 16:58:03 -05:00
Saria Hajjar
d0f127e575 Fixes #3338: Added termination A and Z to the circuit 2020-01-27 21:53:10 +00:00
Samuel Mutel
73b35e72d8 Update nginx documentation 2020-01-27 21:10:10 +01:00
Jeremy Stretch
00b50f9c65 Remove obsolete constants 2020-01-27 12:34:52 -05:00
Saria Hajjar
46d0e88da3 Fixes #4010: Fixes IP addresses table when filtering interfaces 2020-01-27 15:49:15 +00:00
Jeremy Stretch
1901f63b4c Update changelog 2020-01-27 09:45:18 -05:00
Jeremy Stretch
2662bd0ad8 Merge pull request #4017 from hSaria/4016-duplicate-tenant-field
Fixes #4016: Removed duplicate tenant field for cluster edit form
2020-01-27 09:36:36 -05:00
Jeremy Stretch
27d70b6b51 Merge pull request #4021 from hellerve/veit/fix-4019
SVG Elevation: Add borders on the rear of devices as well
2020-01-27 09:32:53 -05:00
hellerve
011280b0bf dcim: add borders on the rear of devices as well 2020-01-27 13:13:07 +01:00
Saria Hajjar
4e4a05d3b9 Fixes #4016: Removed duplicate tenant field for cluster edit form 2020-01-26 12:52:18 +00:00
Saria Hajjar
4abd3866ab Fixes #3886: Config context cluster (group) 2020-01-26 10:53:58 +00:00
Saria Hajjar
7cfdc5188c Corrected ConfigContext data 2020-01-25 17:55:01 +00:00
Saria Hajjar
265d5c87e7 Format for local and source contexts 2020-01-25 16:12:37 +00:00
Saria Hajjar
724d3b8894 Fixes #3313: YAML-format the config context in the GUI 2020-01-25 15:56:24 +00:00
Saria Hajjar
8ec0ad96bd Formatting 2020-01-24 22:20:41 +00:00
Saria Hajjar
c22024b618 Added CSV import test 2020-01-24 22:15:09 +00:00
Jeremy Stretch
7a548e806d Merge pull request #4009 from netbox-community/4006-remove-fixtures
Closes #4006: remove test fixtures
2020-01-24 16:36:41 -05:00
Jeremy Stretch
47962ea732 Adapt form tests to work without fixture data 2020-01-24 16:30:43 -05:00
Jeremy Stretch
eb4c2e5d7f Remove obsolete fixtures files 2020-01-24 16:29:23 -05:00
hSaria
ca035a72bd Merge branch 'develop' into 2921-tags-select2 2020-01-24 20:56:36 +00:00
hSaria
deb653cbf3 Merge branch 'develop' into 3840-limit-vlan-choices 2020-01-24 20:54:56 +00:00
Jeremy Stretch
a13bddde58 Refactor prefix and IP mask length choice generation to reference constants 2020-01-24 15:50:45 -05:00
Jeremy Stretch
66330418cb Remove obsolete IP_FAMILY_CHOICES constant 2020-01-24 15:40:03 -05:00
Jeremy Stretch
151943bfbc Merge pull request #4007 from netbox-community/3880-use-constants
Closes #3880: Define constants for arbitrary values
2020-01-24 15:29:38 -05:00
Jeremy Stretch
35cbee5107 Fixes #4008: Toggle rack elevation face using front/rear strings 2020-01-24 15:28:15 -05:00
Jeremy Stretch
c6473d654d Add explanatory text for constants 2020-01-24 15:03:38 -05:00
Jeremy Stretch
096814dc33 #3880: Define constants for arbitrary values 2020-01-24 14:42:57 -05:00
Jeremy Stretch
45b66b174c Merge pull request #3955 from kobayashi/3950-not-retain-device-type
Fixes: #3950 "Create and Add Another" does retain device type
2020-01-24 13:49:46 -05:00
Jeremy Stretch
0ec091ffe1 Merge branch 'develop' into 3950-not-retain-device-type 2020-01-24 13:49:30 -05:00
Jeremy Stretch
f24e7652a8 Add changelog for #3982 2020-01-24 12:10:38 -05:00
Jeremy Stretch
9f58c27fcf Merge pull request #4002 from hellerve/veit/fix-3982
Read reserved tooltip on rack elevations
2020-01-24 12:09:39 -05:00
Jeremy Stretch
d3463b596a Closes #4005: Include timezone context in webhook timestamps 2020-01-24 12:00:24 -05:00
kobayashi
66d5cc47a5 Fixes #3950: Cloned Device Form does not retain device type 2020-01-24 03:30:24 -05:00
kobayashi
9694bacb69 3950 not retain device type 2020-01-24 03:13:50 -05:00
hellerve
fcba2baf42 dcim: fix #3982 by readding reserved tooltip 2020-01-24 08:45:55 +01:00
Jeremy Stretch
629712142f Fixes #3999: Do not filter child results by null if non-required parent fields are blank 2020-01-23 17:11:45 -05:00
Jeremy Stretch
cdecf93f00 Add tests for ChoiceSet 2020-01-23 16:19:34 -05:00
Jeremy Stretch
fe402331f2 Handle grouped choices when returning ChoiceSet values 2020-01-23 16:16:52 -05:00
Jeremy Stretch
fcbbb36afc Add tests for home and search views 2020-01-23 15:41:09 -05:00
hSaria
6ce38ffa0f Merge branch 'develop' into 3995-navbar-overflow 2020-01-23 20:36:35 +00:00
Saria Hajjar
09faaff849 Fixes #3995: Navbar scroll when overflowing 2020-01-23 20:34:06 +00:00
hSaria
06398a9ac6 Merge branch 'develop' into 568-csv-import-cf 2020-01-23 20:27:07 +00:00
Saria Hajjar
bed08a7b07 Use model's get_custom_fields 2020-01-23 20:26:21 +00:00
Jeremy Stretch
2e69037c29 Closes #3952: Add test for webhooks_worker; introduce generate_signature() 2020-01-23 15:05:27 -05:00
Saria Hajjar
8f86244b4f Cleaned the CustomField choice field 2020-01-23 18:54:37 +00:00
Saria Hajjar
0a5eecd0e3 Explicitly use the value of the choice, instead of relying on __str__ 2020-01-23 17:37:51 +00:00
Saria Hajjar
0ab19d723d Moved the header join logic after the custom fields are added 2020-01-23 17:18:58 +00:00
Saria Hajjar
9128435113 Removed CustomFieldForm class from models without custom fields 2020-01-23 17:03:14 +00:00
Saria Hajjar
1b26afdfbb Fixes #3935: Swagger DEFAULT_INFO 2020-01-23 14:26:04 +00:00
Jeremy Stretch
7b517abdb6 Fixes #3989: Correct HTTP content type assignment for webhooks 2020-01-22 20:33:57 -05:00
Jeremy Stretch
2445d1896b Merge pull request #3988 from netbox-community/3509-ipaddress-script-vars
Closes #3509: Add IP address vars for custom scripts
2020-01-22 17:56:00 -05:00
Jeremy Stretch
72d1fe0cd7 Changelog for #3509 2020-01-22 17:49:03 -05:00
Jeremy Stretch
b7e71f9f39 Add tests for IP address vars 2020-01-22 17:48:03 -05:00
Jeremy Stretch
f41564b578 Introduce IPAddressVar and IPAddressWithMaskVar 2020-01-22 17:16:40 -05:00
Jeremy Stretch
aa56c020ab Move prefix_validator() to ipam.validators 2020-01-22 16:33:34 -05:00
Jeremy Stretch
ba6df87d10 Move min/max prefix length validators to ipam.validators 2020-01-22 16:26:06 -05:00
Jeremy Stretch
5e7fbc4e42 Merge pull request #3987 from netbox-community/3310-cableform-initial-data
Closes #3310: Pre-select site/rack for B side when creating a new cable
2020-01-22 16:14:17 -05:00
Jeremy Stretch
f826e15603 Closes #3310: Pre-select site/rack for B side when creating a new cable 2020-01-22 16:07:09 -05:00
Jeremy Stretch
b7dea5a9f7 Fixes #3983: Permit the creation of multiple unnamed devices 2020-01-22 09:26:49 -05:00
Jeremy Stretch
ddd9f86031 Add tests for rack elevation API endpoint 2020-01-21 17:36:38 -05:00
Jeremy Stretch
1c13a79961 Suppress extraneous test output 2020-01-21 17:23:50 -05:00
Jeremy Stretch
03436b729d Add test for device graphs API endpoint 2020-01-21 17:11:26 -05:00
Jeremy Stretch
d123664503 Add tests for front/rear port API endpoints 2020-01-21 17:00:30 -05:00
hSaria
bdfead6265 Merge branch 'develop' into 568-csv-import-cf 2020-01-21 21:30:38 +00:00
hSaria
77c8bcef6d Merge branch 'develop' into 2921-tags-select2 2020-01-21 21:29:21 +00:00
hSaria
2684f86594 Merge branch 'develop' into 3840-limit-vlan-choices 2020-01-21 21:27:42 +00:00
Jeremy Stretch
10917123fd Add tests for cable tracing endpoints 2020-01-21 16:24:03 -05:00
Jeremy Stretch
b06bed368b Post-release version bump 2020-01-21 15:13:49 -05:00
Jeremy Stretch
e13d4ffe60 Merge pull request #3980 from netbox-community/develop
Release v2.7.2
2020-01-21 15:12:00 -05:00
Jeremy Stretch
2581a55214 Release v2.7.2 2020-01-21 15:04:09 -05:00
Jeremy Stretch
aa4b89f751 Changelog for #3965 2020-01-21 13:56:25 -05:00
Jeremy Stretch
838aaffc4b Merge pull request #3971 from hellerve/veit/fix-3965
Display occupied rack units correctly
2020-01-21 13:53:21 -05:00
Jeremy Stretch
9dfd0e5b40 Merge pull request #3957 from kobayashi/3923-validate-key-format
Fixes: #3923 validate key format
2020-01-21 13:27:35 -05:00
Jeremy Stretch
3357c050c4 Merge pull request #3959 from hSaria/3135-document-power
Fixes #3135: Documented power modelling
2020-01-21 13:15:57 -05:00
Jeremy Stretch
60c5418516 Add tests for device component filtering by region/site 2020-01-21 12:28:22 -05:00
Jeremy Stretch
48b4695ebe Fixes #3966: Fix filtering of device components by region/site 2020-01-21 12:27:52 -05:00
Jeremy Stretch
737b05d12b Changelog for #3964 2020-01-21 11:41:44 -05:00
Jeremy Stretch
1d0546b3d1 Merge pull request #3972 from hellerve/veit/fix-3964
Display borders around devices in rack elevations
2020-01-21 11:40:20 -05:00
Jeremy Stretch
a7a166a9cb Merge branch 'develop' into veit/fix-3964 2020-01-21 11:39:45 -05:00
Jeremy Stretch
74e1c08324 Changelog for #3963 2020-01-21 11:35:05 -05:00
Jeremy Stretch
007de40ada Merge pull request #3973 from hellerve/veit/fix-3963
dcim: fix tooltips in svg rack display
2020-01-21 11:33:14 -05:00
hellerve
e184eb3521 dcim: make pep happy 2020-01-21 17:01:48 +01:00
hellerve
e421c15bdd dcim: merge elevations as necessary 2020-01-21 16:56:06 +01:00
hellerve
469a088874 dcim: fix tooltips in svg rack display 2020-01-21 16:23:59 +01:00
Jeremy Stretch
63dbee16cc Changelog for #3962 2020-01-21 10:11:27 -05:00
hellerve
5f3f21215a dcim: fix #3964 by moving away from properties to inline styles 2020-01-21 16:06:15 +01:00
Jeremy Stretch
cdd7ed21ee Merge pull request #3970 from hellerve/veit/fix-3962
Display device correctly in SVG
2020-01-21 10:05:37 -05:00
hellerve
255d12309a dcim: fix #3965 by adding an option to get_rack_units 2020-01-21 15:50:38 +01:00
Jeremy Stretch
856d14aaa6 Merge pull request #3969 from kobayashi/3960-legacy-device-status
Fixes: #3960 legacy device status
2020-01-21 09:47:16 -05:00
Jeremy Stretch
134cf38a84 Merge branch 'develop' into 3960-legacy-device-status 2020-01-21 09:47:07 -05:00
Jeremy Stretch
1a56a5561c Add systemd migration doc to pages list 2020-01-21 09:41:55 -05:00
hellerve
eb7fbe4b3a dcim: fix #3962 by moving away from device.name 2020-01-21 15:33:17 +01:00
Jeremy Stretch
9d3215e806 Fixes #3967: Resolve migration of "other" interface type 2020-01-21 09:32:51 -05:00
kobayashi
9e855ac6cd 3960 legacy device status 2020-01-21 00:30:47 -05:00
Saria Hajjar
a6fde3168b Minor corrections 2020-01-20 11:37:51 +00:00
Saria Hajjar
939a7bbe50 Fixes #3135: Documented power modelling 2020-01-19 15:43:31 +00:00
kobayashi
c6d18da2eb 3923 validate key format 2020-01-19 02:19:03 -05:00
Jeremy Stretch
606f3dacbb Fixes #3721: Allow Unicode characters in tag slugs 2020-01-17 17:25:46 -05:00
Jeremy Stretch
aa73a7ad02 Closes #3954: Add device_bays filter for devices and device types 2020-01-17 16:39:31 -05:00
Jeremy Stretch
a4687be5e5 Closes #3842: Add 802.11ax interface type 2020-01-17 16:20:11 -05:00
Jeremy Stretch
302f87e108 Fixes #3937: Suppress warning messages in tests for requests expected to yield a 4XX response 2020-01-17 14:53:33 -05:00
Jeremy Stretch
439fa731ba Fixes #3953: Fix validation error when creating child devices 2020-01-17 14:22:58 -05:00
Jeremy Stretch
c6eb40daa8 #3951: Add tests for webhook queuing 2020-01-17 12:39:14 -05:00
Jeremy Stretch
f15cde0275 Fixes #3951: Fix exception in webhook worker due to missing constant 2020-01-17 11:28:50 -05:00
Jeremy Stretch
83427d5585 Closes #3949: Add tests for IPAM model methods 2020-01-17 11:15:05 -05:00
hSaria
b11224a8b4 Merge branch 'develop' into 568-csv-import-cf 2020-01-17 11:47:01 +00:00
hSaria
8b02cd47fb Merge branch 'develop' into 2921-tags-select2 2020-01-17 11:45:13 +00:00
hSaria
f052b90ec3 Merge branch 'develop' into 3840-limit-vlan-choices 2020-01-17 11:42:15 +00:00
Jeremy Stretch
d3f278400e Post-release version bump 2020-01-16 23:47:38 -05:00
Jeremy Stretch
295d4f0394 Merge pull request #3946 from netbox-community/develop
Release v2.7.1
2020-01-16 23:46:40 -05:00
Jeremy Stretch
8aad11b8d2 Release v2.7.1 2020-01-16 23:43:32 -05:00
Jeremy Stretch
0a1dd64b94 Fixes #3943: Prevent rack elevation links from opening new tabs/windows 2020-01-16 23:41:52 -05:00
Jeremy Stretch
f220b3f128 Merge pull request #3942 from hSaria/3941-ip-assign-exception
Fixes #3941: AttributeError when searching on IP assign
2020-01-16 21:43:15 -05:00
Jeremy Stretch
1c0e0fec4c Merge branch 'develop' into 3941-ip-assign-exception 2020-01-16 21:42:27 -05:00
Jeremy Stretch
5369aef971 Fixes #3944: Fix AttributeError exception when viewing prefixes list 2020-01-16 21:39:46 -05:00
Saria Hajjar
9f569d4b1b Fixes #3941: AttributeError when searching on IP assign 2020-01-16 23:03:16 +00:00
hSaria
c0a3285b8b Merge branch 'develop' into 568-csv-import-cf 2020-01-16 22:47:10 +00:00
hSaria
a30e50ecc4 Merge branch 'develop' into 3840-limit-vlan-choices 2020-01-16 22:45:23 +00:00
hSaria
42962db263 Merge branch 'develop' into 2921-tags-select2 2020-01-16 21:52:14 +00:00
Saria Hajjar
c31c8b1a25 Moved into v2.7.1 2020-01-16 21:51:37 +00:00
Saria Hajjar
e05cecb481 Moved into v2.7.1 2020-01-16 21:51:01 +00:00
Jeremy Stretch
604924231a Post-release version bump 2020-01-16 14:47:55 -05:00
Jeremy Stretch
ea91e09a1b Merge pull request #3938 from netbox-community/develop
Release v2.7.0
2020-01-16 13:03:42 -05:00
Jeremy Stretch
0f1518e4c5 Release v2.7.0 2020-01-16 12:58:17 -05:00
Jeremy Stretch
4cb1facb6a Add PyYAML as a required package 2020-01-16 12:23:36 -05:00
Jeremy Stretch
e640f413ab Revise v2.7 release notes 2020-01-16 11:28:54 -05:00
Saria Hajjar
9f68f8d1a6 Update component CSV forms 2020-01-16 16:07:24 +00:00
Saria Hajjar
a2d5aca1d9 Moved changelog to v2.7 2020-01-16 16:05:45 +00:00
Saria Hajjar
89e6de3652 Merge branch 'develop' into 568-csv-import-cf 2020-01-16 16:05:01 +00:00
Jeremy Stretch
fecbb60c36 Use assertHttpStatus() when evaluating HTTP response status 2020-01-16 10:47:45 -05:00
Saria Hajjar
26ebed0182 Removed legacy work regarding inc/tags_panel.html 2020-01-16 15:42:31 +00:00
Saria Hajjar
2c0f321456 Merge branch '2921-tags-select2' of https://github.com/hSaria/netbox into 2921-tags-select2 2020-01-16 15:34:56 +00:00
Saria Hajjar
8f91e9b079 Added #2921 changelog 2020-01-16 15:34:11 +00:00
Saria Hajjar
2949bfaaa7 Merge branch 'develop' into 2921-tags-select2 2020-01-16 15:33:42 +00:00
Jeremy Stretch
c0f1910493 Update requriements for v2.7 release 2020-01-16 10:16:23 -05:00
Saria Hajjar
c8997868ce Added #3840 changelog 2020-01-16 15:10:25 +00:00
Saria Hajjar
02cf39c85b Merge branch 'develop' into 3840-limit-vlan-choices 2020-01-16 15:09:39 +00:00
Jeremy Stretch
3eb2d45e8d Merge pull request #3936 from netbox-community/develop-2.7
Merge v2.7 changes
2020-01-16 09:52:46 -05:00
Jeremy Stretch
4556eac780 Fix IPAddressTestCase 2020-01-16 09:47:46 -05:00
Jeremy Stretch
c955aeebeb Merge branch 'develop' into develop-2.7 2020-01-16 09:38:23 -05:00
Jeremy Stretch
8bd67b2c17 Add tests for browsable API endpoints 2020-01-15 17:47:55 -05:00
Jeremy Stretch
4073dedff8 Merge pull request #3932 from netbox-community/3892-contenttype-filtering
Closes #3892: Robust ContentType filtering
2020-01-15 16:37:50 -05:00
Jeremy Stretch
bc696f2e11 Make filter test logic more obvious 2020-01-15 16:25:26 -05:00
Jeremy Stretch
c28684a8b3 Remove obsolete utility function model_names_to_filter_dict() 2020-01-15 16:21:41 -05:00
Jeremy Stretch
215b4d0b3f #3892: Convert WEBHOOK_MODELS to a Q object 2020-01-15 16:18:47 -05:00
Jeremy Stretch
d9437a08f0 #3892: Convert EXPORTTEMPLATE_MODELS to a Q object 2020-01-15 16:11:44 -05:00
Jeremy Stretch
f81e7d30e2 #3892: Convert GRAPH_MODELS to a Q object 2020-01-15 16:08:19 -05:00
Jeremy Stretch
09bee75cb3 #3892: Convert CUSTOMLINK_MODELS to a Q object 2020-01-15 16:04:41 -05:00
Jeremy Stretch
9c4ab79bea #3892: Convert CUSTOMFIELD_MODELS to a Q object 2020-01-15 16:00:54 -05:00
Jeremy Stretch
f8dad1744c #3892: Convert CABLE_TERMINATION_TYPES to a Q object 2020-01-15 15:51:51 -05:00
Jeremy Stretch
b98ac64ac2 Fix reference to obsolete constant IFACE_MODE_TAGGED 2020-01-15 14:54:46 -05:00
Jeremy Stretch
88267e9d05 Move BGP_ASN_MIN and BGP_ASN_MAX to ipam.constants 2020-01-15 14:53:46 -05:00
Jeremy Stretch
caf7d02637 Remove obsolete constant CABLE_TERMINATION_TYPE_CHOICES 2020-01-15 14:49:52 -05:00
Jeremy Stretch
aefe2b4196 Move rack elevation CSS to project-static/rack_elevation.css 2020-01-15 14:05:44 -05:00
Jeremy Stretch
fdf8211e9a Fixes #3930: Fix API rendering of the family field for aggregates 2020-01-15 13:56:37 -05:00
Jeremy Stretch
73d1a2df3d Merge pull request #3929 from netbox-community/3830-api-pagination
Fixes #3830: Update model ordering parameters to ensure deterministic ordering
2020-01-15 13:29:27 -05:00
Jeremy Stretch
0893d32665 Clarify naming constraints related to rack groups 2020-01-15 13:27:46 -05:00
Jeremy Stretch
c5ec470a00 Changelog for #3830 2020-01-15 13:25:07 -05:00
Jeremy Stretch
28350d84f9 Update model ordering parameters to ensure deterministic ordering 2020-01-15 13:20:44 -05:00
Jeremy Stretch
1055faf734 Merge pull request #3920 from hSaria/3919-utilization-bar-width
Fixes #3919: Utilization graph bar bounds
2020-01-15 10:55:39 -05:00
Jeremy Stretch
351a6e005e Merge branch 'develop' into 3919-utilization-bar-width 2020-01-15 10:55:28 -05:00
Jeremy Stretch
e5ebe6cebc Fix breadcrumbs for changelog entries for deleted objects 2020-01-15 10:48:30 -05:00
Jeremy Stretch
0053aa2d2e Fix objectchange related changes panel styling 2020-01-15 10:44:31 -05:00
Jeremy Stretch
dda9a2ee1c Fixes #3927: Fix exception when deleting devices with secrets assigned 2020-01-15 10:39:23 -05:00
Jeremy Stretch
1ea820a50e Fixes #3900: Fix exception when deleting device types 2020-01-15 10:23:07 -05:00
Jeremy Stretch
c202c1325b Add test for VM interface type choices 2020-01-15 10:04:12 -05:00
Jeremy Stretch
49f027fae7 Refactor FieldChoicesViewSet; add Interface.type to virtualization _choices endpoint 2020-01-15 09:59:44 -05:00
Jeremy Stretch
deec10efe7 Rename ExportTemplateLanguageChoices to TemplateLanguageChoices 2020-01-15 09:40:05 -05:00
Jeremy Stretch
826f4d313d Move unpack_grouped_choices() to utilities.choices 2020-01-15 09:36:39 -05:00
Jeremy Stretch
685cf50268 Closes #3926: Extend upgrade script to invalidate cache data 2020-01-15 08:57:00 -05:00
Jeremy Stretch
e0ea5b0e0b Allow the Lock bot to lock existing closed issues 2020-01-15 08:49:50 -05:00
Saria Hajjar
201416ba52 Semicolons for completeness 2020-01-15 12:38:09 +00:00
Saria Hajjar
9d846d7b87 Fixes #3840: Only show valid interface VLAN choices 2020-01-15 12:23:34 +00:00
hSaria
a7e87eeadc Merge branch 'develop' into 2921-tags-select2 2020-01-15 09:30:51 +00:00
Jeremy Stretch
b538495a29 Merge pull request #3922 from netbox-community/3921-choices-tests
Closes #3921: Add tests for API _choices endpoints
2020-01-14 16:42:28 -05:00
Jeremy Stretch
8df53eac91 Add tests for dynamic choices 2020-01-14 16:38:14 -05:00
Jeremy Stretch
857e04e90b Add _choices endpoint tests for all apps 2020-01-14 16:13:11 -05:00
Jeremy Stretch
3f37cc461d Reorder operations to avoid "pending trigger events" SQL error 2020-01-14 14:37:50 -05:00
Jeremy Stretch
823e1280d2 Add guide for squashing schema migrations 2020-01-14 14:14:54 -05:00
Saria Hajjar
a9e1e7fc78 Fixes #3919: Utilization graph bar bounds 2020-01-14 18:23:31 +00:00
Jeremy Stretch
f27e06e619 Move utility functions for secrets to secrets/utils.py 2020-01-14 12:13:58 -05:00
Jeremy Stretch
c084547dca Move IPAddressManager to a separate file 2020-01-14 12:07:45 -05:00
Jeremy Stretch
6959785cd1 Define __all__ for models.py within each app 2020-01-14 12:01:23 -05:00
Jeremy Stretch
26a257b794 Don't import constants from inside a migration 2020-01-14 11:47:28 -05:00
Jeremy Stretch
2615906526 Squashed all migrations 2020-01-14 11:06:05 -05:00
Jeremy Stretch
d96f474a5f Merge pull request #3847 from kobayashi/3525
Fixes #3525: Filter muiltiple ipaddress terms
2020-01-14 09:20:39 -05:00
Jeremy Stretch
d33e10b4ce Merge branch 'develop' into 3525 2020-01-14 09:20:02 -05:00
Jeremy Stretch
e536f363f9 Merge pull request #3915 from hSaria/3914-interface-filter-no-user
Fixes #3914: Interface filter field when unauthenticated
2020-01-14 08:53:59 -05:00
Saria Hajjar
e10333bf2b Fetch choices during form initialization 2020-01-14 08:22:27 +00:00
Saria Hajjar
9d0da0f45a Fixes #3914: Interface filter field when unauthenticated 2020-01-14 06:08:19 +00:00
Jeremy Stretch
7b8e82f321 Fix typo in release notes 2020-01-13 17:30:16 -05:00
Jeremy Stretch
5c047faa1d Delete old squashed migrations 2020-01-13 17:01:54 -05:00
hSaria
d075bf5882 Merge branch 'develop' into 568-csv-import-cf 2020-01-13 21:17:29 +00:00
Jeremy Stretch
8f636d9636 Merge pull request #3911 from netbox-community/3801-devicetype-yaml
Closes #3801: Change DeviceType export from CSV to YAML
2020-01-13 15:43:20 -05:00
Jeremy Stretch
ce0e351d76 Changelog for #3801 2020-01-13 15:42:49 -05:00
Jeremy Stretch
f170a579de Add test for DeviceType YAML export 2020-01-13 15:35:01 -05:00
hSaria
83ee83142a Merge branch 'develop' into 2921-tags-select2 2020-01-13 20:17:34 +00:00
Saria Hajjar
865e3e7c9f Updated changelog 2020-01-13 20:17:47 +00:00
Saria Hajjar
2f28dec891 Tag filter field for filter forms 2020-01-13 20:16:13 +00:00
Jeremy Stretch
0dad9f8901 Change DeviceType export from CSV to YAML 2020-01-13 15:10:16 -05:00
Saria Hajjar
a8d9fe799b Removed tags filter field from view 2020-01-13 19:06:05 +00:00
Jeremy Stretch
473d67354f Merge branch 'develop' into develop-2.7 2020-01-13 13:49:22 -05:00
Jeremy Stretch
5d7af0fae9 Post-release version bump 2020-01-13 13:26:50 -05:00
Jeremy Stretch
946779000f Merge pull request #3908 from netbox-community/develop
Release v2.6.12
2020-01-13 13:25:21 -05:00
Jeremy Stretch
c3c3000a53 Release v2.6.12 2020-01-13 13:17:43 -05:00
Jeremy Stretch
66daeda85f Merge pull request #3887 from hSaria/3021-cable-tenant-filter
Fixes #3021: Added tenancy filter for cables
2020-01-13 12:09:53 -05:00
Jeremy Stretch
0fd0e76183 Merge pull request #3888 from hSaria/3491-webhook-error-message
Fixes #3491: Include content of webhook error response
2020-01-13 11:33:25 -05:00
Jeremy Stretch
cf480375f6 Merge pull request #3899 from hSaria/3898-cable-str-pk
Fixes #3898: Call str of cable on delete to save PK in id_string
2020-01-13 11:31:18 -05:00
hSaria
736cd709d9 Merge branch 'develop' into 3898-cable-str-pk 2020-01-13 15:40:22 +00:00
Jeremy Stretch
0f42219b4b Merge pull request #3906 from hSaria/3905-powerfeed-divide-by-zero
Fixes #3905: divide by zero on power feeds with low values
2020-01-13 10:32:59 -05:00
Jeremy Stretch
b64f4b93eb Merge pull request #3903 from hSaria/3902-relax-connect
Fixes #3902: relax non-essential required fields
2020-01-13 10:32:09 -05:00
Saria Hajjar
32ffc1b54b Fixes #3905: divide by zero on power feeds with low values 2020-01-13 15:31:35 +00:00
Saria Hajjar
608006ee77 Set the private pk after super save 2020-01-13 15:21:37 +00:00
Saria Hajjar
3d78a67343 Store a private copy of the pk during init and use that with __str__ 2020-01-13 14:57:21 +00:00
Jeremy Stretch
2f98f133bb Merge pull request #3896 from hSaria/3895-elevations-keyerror
Fixes #3895: Elevations filter regression
2020-01-13 09:44:57 -05:00
Saria Hajjar
fe0fbeab49 Fixes #3902: relax non-essential required fields 2020-01-13 12:05:06 +00:00
kobayashi
e3aacb183b optimize query 2020-01-12 16:44:15 -05:00
Saria Hajjar
49fa243b4f Added post-delete cable ID test 2020-01-12 11:21:02 +00:00
Saria Hajjar
a2308b9c99 Fixes #3898: Call str of cable on delete to save PK in id_string 2020-01-12 11:08:13 +00:00
Saria Hajjar
422c6bad5b Fixes #3895: Elevations filter regression 2020-01-11 15:36:58 +00:00
Saria Hajjar
834fd408bd Fixes #2921: Replace tags filter with Select2 widget 2020-01-11 15:18:27 +00:00
Jeremy Stretch
db57d3830f Merge pull request #3890 from netbox-community/3092-reorganize-models
Closes #3092: Refactor dcim/models.py
2020-01-10 15:44:07 -05:00
Jeremy Stretch
b7e78028ce Closes #3891: Add local_context_data filter for virtual machines 2020-01-10 15:34:38 -05:00
Jeremy Stretch
ca13045515 Closes #3092: Split DCIM models into separate files for easier management 2020-01-10 14:22:22 -05:00
kobayashi
2e9f21e222 Filter muiltiple ipaddress terms 2020-01-10 14:09:25 -05:00
Jeremy Stretch
9f627fd0d3 Merge branch 'develop' into develop-2.7 2020-01-10 13:33:51 -05:00
Jeremy Stretch
509a115f68 Extend section regarding test adaptation 2020-01-10 12:24:47 -05:00
Jeremy Stretch
69a696a8d6 Fix graph:type choices under /api/extras/_choices/ 2020-01-10 12:18:56 -05:00
Jeremy Stretch
830a51d9f5 Merge pull request #3889 from netbox-community/3520-graph-template-language
Fixes #3520: Add template_language to extras.Graph
2020-01-10 11:59:05 -05:00
Jeremy Stretch
3c247ac47d Changelog for #3520 2020-01-10 11:53:29 -05:00
Jeremy Stretch
123a58bf7d Add tests for Graph rendering 2020-01-10 11:51:14 -05:00
Saria Hajjar
f20d16f188 Fixes #3491: include content of webhook error response 2020-01-10 16:42:02 +00:00
Jeremy Stretch
9399652dd0 Add template_language field to Graph 2020-01-10 11:28:50 -05:00
Saria Hajjar
f4514034b8 Fixes #3021: Added tenancy filter to cables 2020-01-10 15:59:56 +00:00
Jeremy Stretch
6bc8f2e50b Fixes #3882: Fix filtering of devices by rack group 2020-01-10 10:21:11 -05:00
Jeremy Stretch
fc1245c49d Merge pull request #3867 from hSaria/3668-address-assign-dns-filter
Fixes #3668: use `q` to search when assigning IP
2020-01-10 10:08:31 -05:00
Saria Hajjar
de1355e6bc Changelog #568 2020-01-10 15:00:57 +00:00
Saria Hajjar
37322fc100 Fixed import choice name 2020-01-10 14:58:15 +00:00
Jeremy Stretch
4be7ca0c78 Merge branch 'develop' into 3668-address-assign-dns-filter 2020-01-10 09:43:35 -05:00
Jeremy Stretch
cb91c9231d Merge pull request #3865 from hSaria/3623-interface-word-expansion
Fixes #3623: Word expansion for interfaces
2020-01-10 09:41:42 -05:00
Saria Hajjar
f1d5e28f13 CSV import/export custom fields 2020-01-10 14:26:39 +00:00
Jeremy Stretch
03b22594e8 Merge pull request #3881 from netbox-community/3729-filterset-naming
Fixes #3729: Standardize FilterSet names
2020-01-10 08:58:17 -05:00
hSaria
a5413a5484 Merge branch 'develop' into 3623-interface-word-expansion 2020-01-10 11:55:27 +00:00
Saria Hajjar
71120d9899 Added tests for alphanumeric 2020-01-10 11:54:43 +00:00
Saria Hajjar
acb66c7dc0 Negative tests for expand_ipaddress_pattern 2020-01-10 11:21:37 +00:00
Saria Hajjar
2eba84dad5 Added tests for IPv6 2020-01-10 11:06:01 +00:00
Saria Hajjar
fe89982d4e Removed redundant list call 2020-01-10 10:26:46 +00:00
Jeremy Stretch
528b345f57 Move TenancyFilterSet to filters.py 2020-01-09 21:05:38 -05:00
Jeremy Stretch
e3807a8937 Update filterset naming for global search view 2020-01-09 21:02:14 -05:00
Jeremy Stretch
da0ac4ff1e Rename filter variables for utility views 2020-01-09 20:57:13 -05:00
Jeremy Stretch
49a6a36f4c Renamed virtualization FilterSets 2020-01-09 20:42:32 -05:00
Jeremy Stretch
a77fadd114 Renamed tenancy FilterSets 2020-01-09 20:40:32 -05:00
Jeremy Stretch
15e1f62919 Renamed secrets FilterSets 2020-01-09 20:38:59 -05:00
Jeremy Stretch
83c0d1ef44 Renamed ipam FilterSets 2020-01-09 20:37:26 -05:00
Jeremy Stretch
97654b7585 Renamed extras FilterSets 2020-01-09 20:35:07 -05:00
Jeremy Stretch
0767de205e Renamed dcim FilterSets 2020-01-09 20:30:40 -05:00
Jeremy Stretch
847cf9d038 Renamed circuits FilterSets 2020-01-09 20:25:33 -05:00
Jeremy Stretch
0296aa240a Clean up Stale bot config formatting 2020-01-09 20:14:31 -05:00
Jeremy Stretch
d88b3456c4 Add configuration file for GitHub Stale bot 2020-01-09 20:13:21 -05:00
Jeremy Stretch
789cf827f2 Merge pull request #3879 from hSaria/3876-asn-field-bounds
Fixes #3876: Min/max values for ASN field
2020-01-09 17:03:29 -05:00
Saria Hajjar
6c19c88e99 Replaced ASN bounds with constants 2020-01-09 21:58:38 +00:00
Jeremy Stretch
c1ed2b6068 Merge pull request #3875 from hSaria/3393-provider-circuit-paginate
Fixes #3393: Paginate circuits at the provider details view
2020-01-09 16:52:19 -05:00
Jeremy Stretch
790cfd7b5b Fix CableTable status coloring 2020-01-09 16:19:47 -05:00
Jeremy Stretch
dc5f5efcfe Fixes #3878: Fix database migration for cable status field 2020-01-09 16:16:24 -05:00
Saria Hajjar
4eacc57522 Fixes #3876: set min and max values for ASN field 2020-01-09 21:12:35 +00:00
Jeremy Stretch
0527626709 Update filter tests for v2.7 2020-01-09 16:03:41 -05:00
Jeremy Stretch
a2ead6af94 Merge branch 'develop' into develop-2.7 2020-01-09 15:27:06 -05:00
Saria Hajjar
1e740a70f7 Corrected placement of changelog 2020-01-09 20:23:16 +00:00
Saria Hajjar
94a7d8e493 Hid the provider column 2020-01-09 20:15:22 +00:00
Saria Hajjar
883655ce71 Fixes #3393: Paginate circuits at the provider details view 2020-01-09 20:10:51 +00:00
Jeremy Stretch
1d3651e255 Use ChoiceSet.values() for access to raw values 2020-01-09 14:56:33 -05:00
Jeremy Stretch
fe490d144a Fixes #3868: Fix creation of interfaces for virtual machines 2020-01-09 14:54:25 -05:00
Jeremy Stretch
40fe6666e3 Closes #3841: Add California-style power connectors 2020-01-09 14:10:37 -05:00
Jeremy Stretch
2a2bc66841 Closes #3842: Add RJ-12 console port type 2020-01-09 13:58:41 -05:00
Jeremy Stretch
6019260374 Merge pull request #3873 from hSaria/3872-limit-related-ips
Fixes #3872: Limit related IPs table
2020-01-09 13:53:59 -05:00
Jeremy Stretch
e5c5a1a101 Fixes #3849: Fix ordering of models when dumping data to JSON 2020-01-09 13:28:39 -05:00
Saria Hajjar
c13b9d8798 Added tests for IPv4 2020-01-09 18:26:10 +00:00
hSaria
03b10b6f73 Merge branch 'develop' into 3872-limit-related-ips 2020-01-09 17:18:42 +00:00
Saria Hajjar
67f4d8fab5 Replaced with pagination 2020-01-09 17:16:58 +00:00
Jeremy Stretch
7e0073d6f5 Merge pull request #3863 from hSaria/2113-napalm-settings
Fixes #2113: NAPALM driver settings
2020-01-09 11:56:32 -05:00
Jeremy Stretch
c66dca399b Merge pull request #3860 from hSaria/1982-swagger-napalm
Fixes #1982: Swagger NAPALM documentation
2020-01-09 11:53:20 -05:00
Saria Hajjar
9d085ad83a Changed NAPALM- prefix to X-NAPALM- 2020-01-09 16:48:26 +00:00
Saria Hajjar
ad565e55f1 Removed exception for empty methods
I'll create a seperate ticket for that
2020-01-09 16:40:13 +00:00
Saria Hajjar
46c712e735 Moved NAPALM parameter to decorator 2020-01-09 16:39:13 +00:00
Jeremy Stretch
989d6f5af3 Merge pull request #3871 from hSaria/3864-disallow-0-masks
Fixes #3864: Disallow /0 masks
2020-01-09 11:37:19 -05:00
Saria Hajjar
86865b91f8 Added changelog for 3009
again as I accidentally removed it while merging
2020-01-09 16:32:01 +00:00
hSaria
b53480dd6a Merge branch 'develop' into 3668-address-assign-dns-filter 2020-01-09 16:31:09 +00:00
Saria Hajjar
581ed52b24 Added changelog for 3009 2020-01-09 16:30:13 +00:00
Saria Hajjar
472486acd6 Changed to q filter 2020-01-09 16:26:11 +00:00
Jeremy Stretch
92ec4bd22f Merge pull request #3859 from hSaria/3440-total-cable-length
Fixes #3440: Total cable trace length
2020-01-09 10:55:30 -05:00
Jeremy Stretch
959a0da0ed Merge pull request #3838 from hSaria/3090-interface-filtering
Fixes #3090: Interface filtering
2020-01-09 10:05:04 -05:00
hSaria
b23eaeca54 Merge branch 'develop' into 3090-interface-filtering 2020-01-09 14:56:36 +00:00
hSaria
4f9271e9ff Merge branch 'develop' into 3440-total-cable-length 2020-01-09 14:55:34 +00:00
hSaria
094553dbe7 Merge branch 'develop' into 3623-interface-word-expansion 2020-01-09 14:54:58 +00:00
hSaria
60e4812b32 Merge branch 'develop' into 2113-napalm-settings 2020-01-09 14:54:31 +00:00
hSaria
40625d1299 Merge branch 'develop' into 3668-address-assign-dns-filter 2020-01-09 14:53:32 +00:00
Jeremy Stretch
c9ec8b71e0 Merge pull request #3821 from hSaria/2365-show-available-toggle
Fixes #2598: Toggle for showing available prefixes/ip addresses
2020-01-09 09:52:10 -05:00
Saria Hajjar
73e456495f Fixes #3872: Limit related IPs table 2020-01-09 14:48:21 +00:00
Jeremy Stretch
54227ca9c7 Fixes #3851: Allow passing initial data to custom script forms 2020-01-09 09:41:10 -05:00
hSaria
f3b323536e Merge branch 'develop' into 3864-disallow-0-masks 2020-01-09 14:35:26 +00:00
Saria Hajjar
6537f35176 Fixes #3864: Disallow /0 masks 2020-01-09 14:33:49 +00:00
Jeremy Stretch
b36d0ca3fc Merge pull request #3858 from hSaria/3857-group-custom-link
Fixes #3857: Fix group custom links rendering
2020-01-09 09:28:03 -05:00
Jeremy Stretch
99809109ab Merge pull request #3866 from netbox-community/3834-filter-tests
Add FilterSet tests for all apps
2020-01-09 08:57:27 -05:00
Saria Hajjar
1cdbfd6d60 Fixes #3668: search address by DNS name when assigning 2020-01-09 10:00:02 +00:00
Jeremy Stretch
4030e5ec24 Add filter tests for extras 2020-01-08 21:41:32 -05:00
Jeremy Stretch
4151e52802 Clean up filter imports 2020-01-08 17:20:31 -05:00
Jeremy Stretch
b1e8145ffb Standardize usage of self.filterset for test cases 2020-01-08 17:06:39 -05:00
Jeremy Stretch
c04d8ca5a7 Add tests for PowerPanel and PowerFeed filters 2020-01-08 15:56:42 -05:00
Jeremy Stretch
e312c30822 Add CableFilter test 2020-01-08 15:30:56 -05:00
Jeremy Stretch
40c30baffa Add tests for InventoryItem, VirtualChassis filters 2020-01-08 14:31:59 -05:00
Jeremy Stretch
bca7435a5a Add remaining tests for device component filters 2020-01-08 14:01:31 -05:00
Saria Hajjar
396bb28967 Added example and handled invalid ranges gracefully 2020-01-08 17:28:31 +00:00
Saria Hajjar
eb40275427 Fixes #3623: Word expansion for interfaces 2020-01-08 17:23:09 +00:00
hSaria
8519f546a6 Merge branch 'develop' into 3857-group-custom-link 2020-01-08 16:47:57 +00:00
Jeremy Stretch
e9b2ad9f5c Fix DeviceTestCase.test_cluster 2020-01-08 11:22:07 -05:00
Jeremy Stretch
39fba4f05d Fix InterfaceTestCase.test_mac_address 2020-01-08 11:19:13 -05:00
Jeremy Stretch
38c16d71b4 Merge branch 'develop' into 3834-filter-tests 2020-01-08 11:14:52 -05:00
Jeremy Stretch
8fef6edb27 Fixes #3862: Allow filtering device components by multiple device names 2020-01-08 11:12:44 -05:00
Jeremy Stretch
5cac900380 Add console port, console server port filter tests 2020-01-08 11:04:50 -05:00
Saria Hajjar
f49467bcb5 Corrected optional arg assignment 2020-01-08 16:01:18 +00:00
Saria Hajjar
98a66f7fbe NAPALM settings changelog 2020-01-08 15:55:36 +00:00
Saria Hajjar
ce8d470860 Added NAPALM documentation 2020-01-08 15:54:09 +00:00
Saria Hajjar
dc475f4755 Fixes #2113: Adjust NAPALM settings with headers 2020-01-08 15:53:48 +00:00
Jeremy Stretch
a7982bb0e1 Add device filter tests 2020-01-08 09:50:22 -05:00
Saria Hajjar
ea05b5b606 Fixes #1982: Swagger NAPALM documentation 2020-01-08 13:34:46 +00:00
Saria Hajjar
996d49de67 Fixes #3440: Total cable trace length 2020-01-08 10:49:58 +00:00
Saria Hajjar
74997a18a5 Fixes #3857: Fix group custom links rendering 2020-01-08 10:14:48 +00:00
Jeremy Stretch
832fd49339 Add DeviceType filter tests 2020-01-07 17:13:05 -05:00
Jeremy Stretch
acb2f32304 Add tests for DCIM filters 2020-01-07 13:53:26 -05:00
Saria Hajjar
32f39e10c9 Changed default to showing available 2020-01-07 17:58:30 +00:00
hSaria
190e683654 Removed cookie-based storage; now based on request 2020-01-07 17:18:36 +00:00
Jeremy Stretch
770f4c962c Fixes #3856: Allow filtering VM interfaces by multiple MAC addresses 2020-01-07 10:31:44 -05:00
Jeremy Stretch
227921e0a0 Add tests for virtualization filters 2020-01-07 10:19:21 -05:00
Jeremy Stretch
39d0261d8a Add tests for tenancy filters 2020-01-07 09:41:43 -05:00
Jeremy Stretch
f267a532f6 Add filter tests for secrets 2020-01-07 09:35:22 -05:00
Jeremy Stretch
e7ee4486a5 Fixes #3853: Fix device role link on config context view 2020-01-07 09:08:31 -05:00
Saria Hajjar
6a3cd83efc Moved regex note to tooltip 2020-01-07 11:09:39 +00:00
Saria Hajjar
a7ec0c14f7 Move toggles js code to static 2020-01-07 11:09:31 +00:00
Jeremy Stretch
05bfe94d3e Add remaining IPAM filter tests 2020-01-06 21:35:34 -05:00
Jeremy Stretch
8d0aaa4ec1 Add IPAM filter tests (WIP) 2020-01-06 17:42:17 -05:00
Jeremy Stretch
4b5c4b7be5 Initial work on filter tests 2020-01-06 15:39:02 -05:00
Saria Hajjar
18333973aa Merge branch '3090-interface-filtering' of https://github.com/hSaria/netbox into 3090-interface-filtering 2020-01-06 20:05:25 +00:00
Saria Hajjar
07a1baef13 Limit toggle selector to visible input fields 2020-01-06 20:05:07 +00:00
Jeremy Stretch
15545b70d6 Merge pull request #3814 from hSaria/3589-interface-tagged-vlans
Fixes #3589: Interface VLAN filtering
2020-01-06 13:20:14 -05:00
hSaria
cfb8b3cf56 Merge branch 'develop' into 3090-interface-filtering 2020-01-06 15:19:46 +00:00
hSaria
206732eb62 Merge branch 'develop' into 2365-show-available-toggle 2020-01-06 15:18:57 +00:00
Jeremy Stretch
258cc4b50e Merge pull request #3846 from hSaria/2050-image-preview
Fixes #2050: Image preview
2020-01-06 10:18:18 -05:00
hSaria
d1f81783ef Merge branch 'develop' into 3589-interface-tagged-vlans 2020-01-06 15:18:06 +00:00
Jeremy Stretch
9bd2af48a3 Merge branch 'develop' into 2050-image-preview 2020-01-06 10:12:13 -05:00
Jeremy Stretch
d4df965f46 Merge pull request #3845 from hSaria/3187-elevation-rack-filter
Fixes #3187: Elevation rack filter
2020-01-06 10:06:20 -05:00
Saria Hajjar
7dddd4734c Updated changelog 2020-01-05 09:11:58 +00:00
Saria Hajjar
c45daca5f2 Removed changes that will be covered in #3840 2020-01-05 09:10:46 +00:00
Saria Hajjar
067af26892 Changelog (may conflict with other merges) 2020-01-04 18:19:05 +00:00
Saria Hajjar
792f38334a Fixes #2050: Image preview for attachments 2020-01-04 18:17:41 +00:00
Saria Hajjar
dba40cd6bc Changelog (may conflict because adding headers) 2020-01-04 13:32:07 +00:00
Saria Hajjar
4b19073b8b Fixed #3187: Rack multi-selection field 2020-01-04 13:30:31 +00:00
Saria Hajjar
28eca9a026 Forgot le seperator 2020-01-03 20:12:21 +00:00
Saria Hajjar
3556051d14 Height was a touch off 2020-01-03 19:58:41 +00:00
Saria Hajjar
e1d1f522ff Closes #3090: Filter field for interface 2020-01-03 19:38:51 +00:00
Saria Hajjar
04f3e58ab4 Line seperator 2020-01-03 19:27:02 +00:00
Jeremy Stretch
1f175031bd #3455: Make ClusterFilterForm a TenancyFilterForm 2020-01-03 14:26:53 -05:00
Saria Hajjar
e1c61c5019 Changelog 2020-01-03 19:25:33 +00:00
Saria Hajjar
1c0de0093b Merge remote-tracking branch 'netbox-community/develop' into 2365-show-available-toggle 2020-01-03 19:24:44 +00:00
Saria Hajjar
9d8ab81e3a Removed changelog (temporarily while merging) 2020-01-03 19:24:39 +00:00
Jeremy Stretch
6e49a0ba6e Merge branch 'develop' into develop-2.7 2020-01-03 14:21:53 -05:00
Saria Hajjar
fa55571503 Merge remote-tracking branch 'netbox-community/develop' into 3589-interface-tagged-vlans 2020-01-03 19:19:12 +00:00
Jeremy Stretch
feb04f0401 Post-release version bump 2020-01-03 14:01:10 -05:00
Jeremy Stretch
5c07b6dc1d Merge pull request #3837 from netbox-community/develop
Release v2.6.11
2020-01-03 14:00:10 -05:00
Jeremy Stretch
e3b448b7ad Release v2.6.11 2020-01-03 13:55:43 -05:00
Jeremy Stretch
57f199f899 Fixes #3833: Add region and region_id filters where missing (#3836) 2020-01-03 13:52:50 -05:00
Jeremy Stretch
b38bb64c81 Fixes #3831: Fix API-driven filter field rendering (#3812 regression) 2020-01-03 11:25:22 -05:00
Jeremy Stretch
1d63a30b7a Merge branch 'develop' into develop-2.7 2020-01-02 17:21:15 -05:00
Jeremy Stretch
c2dc243c7c Post-release version bump 2020-01-02 17:08:04 -05:00
Jeremy Stretch
25c3c1b431 Merge pull request #3829 from netbox-community/develop
Fix v2.6.10 release date
2020-01-02 17:05:21 -05:00
Jeremy Stretch
156fbae7d3 Fix v2.6.10 release date 2020-01-02 17:04:20 -05:00
Jeremy Stretch
a0ae7a227d Merge pull request #3828 from netbox-community/develop
Release v2.6.10
2020-01-02 17:02:52 -05:00
Jeremy Stretch
9ef3e68479 Release v2.6.10 2020-01-02 17:01:05 -05:00
Jeremy Stretch
435d248645 #3122: Allow multiple selections 2020-01-02 16:56:14 -05:00
Jeremy Stretch
53db5090c1 #3827: Fix erroneous filter class 2020-01-02 16:55:36 -05:00
Jeremy Stretch
caa062c8ba Merge pull request #3826 from hSaria/3122-connection-device-select2
Fixes #3122: Select2 for device field
2020-01-02 16:39:50 -05:00
Saria Hajjar
240bbc2944 Select2 site widget 2020-01-02 21:28:06 +00:00
Saria Hajjar
a3861ed492 Update device filters to use IDs 2020-01-02 21:21:52 +00:00
Saria Hajjar
82c70302fd Merge branch 'develop' into 3122-connection-device-select2 2020-01-02 20:40:19 +00:00
Jeremy Stretch
80d1f80b61 Fixes #3827: Allow filtering console/power/interface connections by device ID 2020-01-02 13:44:18 -05:00
hSaria
d3c6caf8a8 Limit tagged validation to tagged interfaces
Co-Authored-By: Jeremy Stretch <jeremy.stretch@networktocode.com>
2020-01-02 17:52:22 +00:00
Saria Hajjar
a707204f98 Select2 for device field 2020-01-02 17:46:37 +00:00
Jeremy Stretch
523a1388db Correct release notes 2020-01-02 11:56:29 -05:00
Jeremy Stretch
970586b07b Merge pull request #3818 from hSaria/2233-move-inventoryitem
Closes #2233: Ability to move inventory items between devices
2020-01-02 11:55:18 -05:00
Saria Hajjar
28ae6849b4 Templatized show_available toggle 2020-01-02 16:29:11 +00:00
Saria Hajjar
8e3a371688 Added default to cookie 2020-01-02 16:19:12 +00:00
Saria Hajjar
2a219eff23 is not None not needed as the value 'false' is a string 2020-01-02 16:13:47 +00:00
Saria Hajjar
f81641ae96 Corrected ticket number 2020-01-02 15:48:30 +00:00
Jeremy Stretch
4f0d3e6b32 Merge pull request #3820 from hSaria/3819-cf-boolean-select2
Select2 for custom fields
2020-01-02 10:11:32 -05:00
Jeremy Stretch
77d1ac8b07 Merge pull request #3817 from hSaria/2988-group-create-warn
Closes #2988
2020-01-02 10:10:11 -05:00
Jeremy Stretch
5d0ac02704 Merge pull request #3816 from hSaria/3815-select2-width
Fixes #3815: Select2 width handling via theme
2020-01-02 10:08:56 -05:00
Jeremy Stretch
fc5d07bb13 Merge pull request #3813 from hSaria/3812-optimize-select-api
Fixes #3812: Only preload selected options for API-based select
2020-01-02 10:05:06 -05:00
Jeremy Stretch
395f23e1d3 Fix for #3822 2020-01-02 09:47:02 -05:00
Jeremy Stretch
dd85448451 Fixes #3822: Fix exception when editing a device bay (regression from #3596) 2020-01-02 09:26:38 -05:00
hSaria
6a7af22dea Merge branch 'develop' into 2365-show-available-toggle 2020-01-02 09:18:53 +00:00
Saria Hajjar
37bc17d3a2 Fixes #2365: Toggle for showing available prefixes/ip addresses 2020-01-02 09:16:18 +00:00
Saria Hajjar
ca131e5b2a Select2 for custom fields 2020-01-01 23:46:51 +00:00
Saria Hajjar
c75795ceda Ability to move inventory items between devices 2020-01-01 23:28:20 +00:00
Saria Hajjar
7dc0591e3e Note about the group existance 2020-01-01 22:38:02 +00:00
Saria Hajjar
cfa078c929 Added theme to select2 of tags 2020-01-01 21:14:38 +00:00
Saria Hajjar
57ea73db46 Turn off Select2 static width calculation 2020-01-01 21:01:08 +00:00
Saria Hajjar
7ad9e8a2fb More informative error message 2020-01-01 19:53:13 +00:00
Saria Hajjar
1a57120b78 3589 changelog 2020-01-01 17:43:39 +00:00
Saria Hajjar
d267aeb621 Filter VLANs to only those in the current site or global 2020-01-01 17:34:26 +00:00
Saria Hajjar
a110b0badb Removed no-longer-used choices (now handled via API-based select) 2020-01-01 16:43:21 +00:00
Saria Hajjar
242ae9eb91 Comment clarification 2020-01-01 16:04:08 +00:00
Saria Hajjar
53625e0dea Fixes #3812: Only preload selected options for API-based select 2020-01-01 15:54:00 +00:00
Saria Hajjar
aa4f73ffbf Removed trailing space 2020-01-01 12:09:51 +00:00
Jeremy Stretch
8c7b0cf670 Close #2892: Extend admin UI to allow deleting old report results 2019-12-31 16:11:47 -05:00
Saria Hajjar
05570ae4ad Clean tagged VLANs 2019-12-31 20:47:13 +00:00
Jeremy Stretch
0cf94cff16 Closes #3062: Add assigned_to_interface filter for IP addresses 2019-12-31 15:24:00 -05:00
Jeremy Stretch
b5455ed882 Closes #3461: Fail gracefully on custom link rendering exception 2019-12-31 15:04:56 -05:00
Jeremy Stretch
8a4293a4cc Introduce render_jinja2() convenience function 2019-12-31 14:00:55 -05:00
Jeremy Stretch
f649b9f04f Fixes #3106: Restrict queryset of chained fields when form validation fails 2019-12-31 12:41:02 -05:00
Jeremy Stretch
5caa04ef2b Fixes #3811: Fix filtering of racks by group on device list 2019-12-31 11:35:18 -05:00
Jeremy Stretch
f2c49063f8 Fixes #3809: Filter platform by manufacturer when editing devices 2019-12-31 11:25:42 -05:00
Jeremy Stretch
ea2351e902 Merge pull request #3804 from hSaria/3803-svg-logo
Fixes 3803
2019-12-30 14:12:44 -05:00
hSaria
8effb54c89 Converted text to path 2019-12-30 18:28:39 +00:00
hSaria
66c99acb9e Converted text to path 2019-12-30 18:28:12 +00:00
Jeremy Stretch
2e5a326315 Merge pull request #3802 from hSaria/3762-datetime-selectors
Fixes 3762
2019-12-30 12:32:08 -05:00
Jeremy Stretch
b5177c608d Merge branch 'develop' into 3762-datetime-selectors 2019-12-30 12:31:50 -05:00
Jeremy Stretch
be7d5a2310 Merge pull request #3807 from hSaria/3712-scroll-offset
Fixes 3712
2019-12-30 11:40:43 -05:00
Jeremy Stretch
65444899af Merge pull request #3798 from steffann/3797-802.1q-vlan-fields
Fix values of mode field
2019-12-30 11:26:15 -05:00
Jeremy Stretch
5230127fde Merge pull request #3800 from kobayashi/3788
implement 3788
2019-12-30 11:23:51 -05:00
Saria Hajjar
405320d8ab Changelog 2019-12-29 21:22:14 +00:00
Saria Hajjar
2f2e193cf9 Account for the header when hash-scrolling 2019-12-29 21:20:02 +00:00
Saria Hajjar
1fc206b9c5 Replace doc logo with svg 2019-12-29 14:10:31 +00:00
Saria Hajjar
44e1a477f2 Fixed Y-coordinate off by 10 2019-12-29 14:06:41 +00:00
Saria Hajjar
e62302c979 Fixes #3803 2019-12-29 13:41:00 +00:00
Saria Hajjar
51b0fe4596 Changelog for 3762 2019-12-29 08:50:08 +00:00
Saria Hajjar
7399aa0c5e Add datetime widgets 2019-12-28 22:55:00 +00:00
Saria Hajjar
aa4588f9ba Load flatpickr using selectors (classes) 2019-12-28 21:33:07 +00:00
Saria Hajjar
4c2e2e0fa3 Include Flatpickr library globally 2019-12-28 21:32:40 +00:00
Saria Hajjar
6dea8ddbce Flatpickr library statics 2019-12-28 21:31:21 +00:00
kobayashi
e6623a6ca8 implement 3788 2019-12-27 16:17:17 -05:00
Sander Steffann
020e485196 Fix values of mode field 2019-12-27 20:42:16 +01:00
Jeremy Stretch
0c5f535689 Merge pull request #3793 from struppinet/develop
Closes #3663: add Filter Tests
2019-12-27 14:14:55 -05:00
Jeremy Stretch
ae9d0d894a Fixes #3695: Include A/Z termination sites for circuits in global search 2019-12-27 14:04:03 -05:00
Jeremy Stretch
14401c30b6 Update contributing guide to reference the issue intake policy 2019-12-27 13:48:41 -05:00
struppi
fbb93c72d0 Closes #3663: improve tests 2019-12-26 22:21:05 +01:00
Jeremy Stretch
280f31955a Merge branch 'master' into develop-2.7 2019-12-26 10:39:07 -05:00
Jeremy Stretch
5fedcd1f4e Fixes #3789: Typo 2019-12-26 10:19:32 -05:00
Jeremy Stretch
adeee0bf5c Docs & changelog for #3705 2019-12-26 10:16:53 -05:00
Jeremy Stretch
84a2b726f5 Merge pull request #3775 from steffann/3705-make-current-user-available-in-custom-scripts
Add request to Custom Script run, if receiver supports it
2019-12-26 10:04:07 -05:00
struppi
407a60dcc4 Closes #3663: fix PEP errors 2019-12-26 12:26:41 +01:00
struppi
d31507985b Closes #3663: add Filter Tests 2019-12-25 18:41:59 +01:00
Sander Steffann
0174c9747b Implement request passing as a property of Script 2019-12-19 23:35:18 +01:00
Jeremy Stretch
55b503da5b Fixes #3780: Fix AttributeError exception in API docs 2019-12-19 14:04:18 -05:00
Jeremy Stretch
aff4ad0f97 Post-release version bump 2019-12-16 16:33:31 -05:00
Jeremy Stretch
50df3acd26 Merge pull request #3774 from netbox-community/develop
Release v2.6.9
2019-12-16 16:32:00 -05:00
Jeremy Stretch
e53e1e31de Release v2.6.9 2019-12-16 16:30:20 -05:00
Daniel Sheppard
70b09446b6 Merge pull request #3768 from markkuleinio/gunicorn-conf
Change gunicorn.conf remains to gunicorn.py
2019-12-15 21:46:21 -06:00
Markku Leiniö
3a18d1df8c Fix gunicorn.conf remains to gunicorn.py 2019-12-14 21:14:48 +02:00
Jeremy Stretch
01883f92d9 Merge pull request #3765 from netbox-community/3760-template-buttons
Introduce clone, edit, and delete button templatetags
2019-12-13 15:59:33 -05:00
Jeremy Stretch
1acdf58a4b Merge pull request #3764 from kobayashi/3679
fix 3757
2019-12-13 15:57:13 -05:00
Jeremy Stretch
8acd3d0a72 Introduced clone, edit, and delete buttons 2019-12-13 15:54:50 -05:00
kobayashi
1d1cb867cd fix 3679 2019-12-13 14:42:10 -05:00
Jeremy Stretch
b46bfaebc1 Merge pull request #3763 from hSaria/3761-token-copy-button
Fixes #3761: copy button for tokens
2019-12-13 14:16:41 -05:00
Jeremy Stretch
a22c7c1539 Fixes #2358: Respect custom field default values when creating objects via the REST API 2019-12-13 14:15:48 -05:00
hSaria
ea51aa97b7 Update version-2.6.md 2019-12-13 18:08:34 +00:00
hSaria
6a6959d041 Fixes #3761: copy button for tokens 2019-12-13 18:06:14 +00:00
Jeremy Stretch
462cede863 Fixes #2170: Prevent the deletion of a virtual chassis when a cross-member LAG is present 2019-12-13 11:36:31 -05:00
Jeremy Stretch
85c11bbd83 Closes #3441: Move virtual machine results near devices in global search 2019-12-13 10:37:58 -05:00
Jeremy Stretch
77e0564d13 Closes #3152: Include direct link to rack elevations on site view 2019-12-13 10:12:46 -05:00
Jeremy Stretch
85563e21db Remove obsolete initial_data fixtures (no longer maintained) 2019-12-12 14:30:43 -05:00
Jeremy Stretch
9352867cec Fix up the installation docs 2019-12-12 14:27:12 -05:00
Jeremy Stretch
93837c5b9e Merge pull request #3756 from netbox-community/csv-import-tests
CSV import tests
2019-12-12 12:09:31 -05:00
Jeremy Stretch
aaf5523378 Add view tests for device components 2019-12-12 11:58:57 -05:00
Jeremy Stretch
8a22f83bc0 Add virtualization CSV import tests 2019-12-12 11:34:02 -05:00
Jeremy Stretch
7550d53d02 Add tenancy CSV import tests 2019-12-12 11:29:41 -05:00
Jeremy Stretch
821cd58825 Add secrets CSV import tests 2019-12-12 11:26:48 -05:00
Jeremy Stretch
526412a1ba Add IPAM CSV import tests 2019-12-12 10:51:17 -05:00
Jeremy Stretch
fae2469dd7 Add DCIM CSV import tests 2019-12-12 10:30:15 -05:00
Jeremy Stretch
27fd351fc2 Add CSV import tests for circuits 2019-12-12 10:08:49 -05:00
John Anderson
ea5c9df095 fixed svg gradient scaling and css flickering issue 2019-12-12 00:30:22 -05:00
Jeremy Stretch
5aa17bc42a Closes #3706: Increase available_power maximum value on PowerFeed 2019-12-11 21:12:18 -05:00
Jeremy Stretch
7bbd9be389 Tweak elevation font 2019-12-11 21:03:24 -05:00
Jeremy Stretch
dbf9a2b452 Fix bug with rendering devices taller than 1U 2019-12-11 20:19:01 -05:00
Jeremy Stretch
e4b8ea8905 Change render_format to render 2019-12-11 20:05:16 -05:00
Jeremy Stretch
fd8913f09b Fix bug in migration 2019-12-11 20:01:10 -05:00
John Anderson
645383509b change render_format to render for svg elevations 2019-12-11 17:33:58 -05:00
Jeremy Stretch
77a5f6ef81 Touched up the release notes 2019-12-11 17:22:41 -05:00
Jeremy Stretch
2ec7259a69 Rack elevation endpoint should return JSON by default; fix typo 2019-12-11 17:17:20 -05:00
Jeremy Stretch
b6f8c248de Addressed lingering TODOs 2019-12-11 17:07:56 -05:00
Jeremy Stretch
b16be577e3 CSVChoiceField should default to a blank string instead of None 2019-12-11 17:04:48 -05:00
Jeremy Stretch
590bbbce7f Fix bug left over from work on #3569 2019-12-11 16:16:14 -05:00
Jeremy Stretch
577b4593de Changelog for #3664 2019-12-11 16:14:41 -05:00
Jeremy Stretch
44e5a63a2a Merge pull request #3755 from netbox-community/3664-configcontext-tags
3664 configcontext tags
2019-12-11 16:10:48 -05:00
Jeremy Stretch
19363add30 Represent and assign ConfigContext tags by their slugs 2019-12-11 16:04:43 -05:00
Jeremy Stretch
fd88ba65b2 Cleanup for #3664 2019-12-11 15:55:33 -05:00
Jeremy Stretch
ce4a5a38a3 Introduce is_taggable utility function for identifying taggable models 2019-12-11 15:52:35 -05:00
John Anderson
05938d60f0 Merge pull request #3754 from netbox-community/2248-svg-rack-elevations
2248 svg rack elevations
2019-12-11 14:26:32 -05:00
Jeremy Stretch
8b189abd58 Merge pull request #3752 from kobayashi/3664
implement 3664
2019-12-11 14:14:48 -05:00
John Anderson
7f788eaa06 review updates to svg rendering 2019-12-11 13:39:10 -05:00
Jeremy Stretch
9f204f72ef Changelog and documentation for #1814 2019-12-11 11:01:31 -05:00
Jeremy Stretch
e02ac133eb Added import error handling and config vlaidation warning for store config 2019-12-11 10:51:32 -05:00
John Anderson
c09aefd509 updated changelog with deprecation notice of rack units endpoint 2019-12-11 10:39:46 -05:00
John Anderson
e0c81fd837 changelog for #2248 2019-12-11 10:34:44 -05:00
Jeremy Stretch
9a8c8012be Merge pull request #3666 from steffann/1814-Ability_to_use_object_store_for_images
Add support for S3 storage for media
2019-12-11 10:20:09 -05:00
Sander Steffann
f1e75b0fbb Implement storage configuration as suggested by @jeremystretch 2019-12-11 16:09:32 +01:00
John Anderson
b4d724b5ae drf-yasg updates for rack elevations 2019-12-11 09:45:08 -05:00
Sander Steffann
f7a1595ce5 Merge branch '1814-Ability_to_use_object_store_for_images' of github.com:steffann/netbox into 1814-Ability_to_use_object_store_for_images 2019-12-11 15:23:47 +01:00
Sander Steffann
378883df2b Fix code for PEP8 2019-12-11 15:19:32 +01:00
Sander Steffann
dafa2513e3 Add support for S3 storage for media 2019-12-11 15:19:32 +01:00
Jeremy Stretch
3b03d68ac7 Merge pull request #3751 from hSaria/3749-attribute-error
Fixes 3749 attribute error
2019-12-11 08:50:09 -05:00
kobayashi
5710f297f1 implement 3664 2019-12-11 04:58:42 -05:00
hSaria
b57d64c72d Changelog for #3751 2019-12-11 07:24:44 +00:00
hSaria
3b76e0203a Fixes 3749 attribute error 2019-12-11 07:03:39 +00:00
Jeremy Stretch
0d8fd45587 Updated static resources 2019-12-10 15:56:52 -05:00
Jeremy Stretch
01b6e73f9b Update dependency versions for DRF & drf_yasg 2019-12-10 15:39:57 -05:00
Jeremy Stretch
b0fb474aa2 Update dependency versions for v2.7 2019-12-10 15:16:20 -05:00
Jeremy Stretch
0787713298 Add deprecation warning for Python 3.5 2019-12-10 13:44:45 -05:00
Jeremy Stretch
6221bc8f43 Merge pull request #3750 from netbox-community/3655-role-descriptions
Add description field to organizational role models
2019-12-10 13:29:44 -05:00
Jeremy Stretch
a6904dc5d5 Add description field to CircuitType (#3655) 2019-12-10 13:25:14 -05:00
Jeremy Stretch
3d5fb2491a Chnagelog for #3655 2019-12-10 13:09:41 -05:00
Jeremy Stretch
24bdd10b4f Add description field to SecretRole model (#3655) 2019-12-10 13:03:09 -05:00
Jeremy Stretch
7845d9b25f Add description field to Role model (#3655) 2019-12-10 12:59:10 -05:00
Jeremy Stretch
1f288175e4 Add description field to RackRole and DeviceRole models (#3655) 2019-12-10 12:53:28 -05:00
Jeremy Stretch
f0a6c881bc Fix inclusion of legacy IDs on choice fields 2019-12-10 12:07:54 -05:00
Jeremy Stretch
9452cebc6a Merge branch 'develop' into develop-2.7 2019-12-10 11:51:10 -05:00
Jeremy Stretch
3c36bec298 Post-release version bump 2019-12-10 10:50:46 -05:00
Jeremy Stretch
425670f52a Merge pull request #3745 from netbox-community/develop
Release v2.6.8
2019-12-10 10:47:48 -05:00
Jeremy Stretch
6a2651991a Release v2.6.8 2019-12-10 10:42:48 -05:00
Jeremy Stretch
12657ebd7c Cable.status to slug (#3569) 2019-12-10 09:55:10 -05:00
John Anderson
d8dd5f00c1 removed rack elevations viewset 2019-12-10 03:19:26 -05:00
John Anderson
1ec191db92 initial cleanup of rack elevations 2019-12-10 03:18:10 -05:00
John Anderson
20c8abe8da Merge branch 'develop-2.7' into 2248-svg-rack-elevations 2019-12-10 02:59:04 -05:00
Jeremy Stretch
086813fc3e Changelog for #2669 2019-12-09 17:28:21 -05:00
Jeremy Stretch
606a73a547 Merge pull request #3740 from netbox-community/2669-device-vm-names
Allow non-unique device and VM names
2019-12-09 17:26:32 -05:00
Jeremy Stretch
f25e2a1922 Fixes #3644: Fix exception when connecting a cable to a RearPort with no corresponding FrontPort 2019-12-09 15:42:04 -05:00
Jeremy Stretch
740cc8b601 Remove deprecated context parameter from from_db_value 2019-12-09 12:32:51 -05:00
Jeremy Stretch
5ac4a3ba79 Omit default uniqueness validator from VirtualMachineSerializer, which implies required fields 2019-12-09 12:11:42 -05:00
Jeremy Stretch
2e37b19e9f #2269: Allow non-unique VirtualMachine names 2019-12-09 11:59:30 -05:00
Jeremy Stretch
a8dd060e32 #2269: Allow non-unique Device names 2019-12-09 11:41:03 -05:00
Jeremy Stretch
95edec5448 #3722: Tweak ordering of permitted characters to avoid creating a regex range 2019-12-09 10:02:56 -05:00
John Anderson
b0adce998b Merge pull request #3702 from hellerve/rack-elevations-api
Rack elevations API
2019-12-09 01:02:40 -05:00
John Anderson
6fe1b9b37c update openapi field type for choice field value fields to string 2019-12-09 00:41:43 -05:00
hellerve
44b042e3fc dcim api: fix face default value in rackviewset 2019-12-08 18:24:13 +01:00
hellerve
e5b49e25b9 dcim api: add feedback from @jeremystretch to rack elevations api 2019-12-08 18:14:59 +01:00
hellerve
b54a05d255 dcim: make linter happy 2019-12-08 17:59:40 +01:00
hellerve
66b6f586f1 tests: update to reflect absence of utility functions 2019-12-08 17:59:40 +01:00
hellerve
82819d5429 dcim: remove elevation getters 2019-12-08 17:59:38 +01:00
hellerve
bc859c6139 css: purge outdated rack styling 2019-12-08 17:58:36 +01:00
hellerve
e1fdc7773a requirements: fix svgwrite version 2019-12-08 17:58:35 +01:00
hellerve
5d5b7e0dd9 dcim: refactor reservations and make them resizable 2019-12-08 17:58:21 +01:00
hellerve
77890ad775 dcim: add inline stylesheet to rack elevation api view 2019-12-08 17:58:21 +01:00
hellerve
1a9b9f50d8 dcim: fix fonts & texts in svg 2019-12-08 17:58:21 +01:00
hellerve
808f5c95e3 dcim: make front and rear work (references #2248) 2019-12-08 17:58:21 +01:00
hellerve
d11de6d021 dcim: add rack-elevations api endpoint (references #2248) 2019-12-08 17:58:20 +01:00
Jeremy Stretch
88c7d95b08 ClusterForm should inherit from TenancyForm 2019-12-06 16:47:29 -05:00
Jeremy Stretch
2956eff051 Closes #648: Pre-populate forms when selecting "create and add another" 2019-12-06 16:40:39 -05:00
Jeremy Stretch
b05566e96f Implement tag replication for #33 2019-12-06 16:22:56 -05:00
Jeremy Stretch
446acbdf82 Closes #33: Add ability to clone objects (pre-populate form fields) 2019-12-06 16:13:52 -05:00
Jeremy Stretch
f2076c9572 Fixed git commit hook 2019-12-06 12:54:13 -05:00
Jeremy Stretch
d71e6698f4 Extend git commit hook to check for missing schema migrations 2019-12-06 12:42:59 -05:00
Jeremy Stretch
9b26225fdd #3720: Update migration to add powerfeeds to termination_type limit list (does not impact database) 2019-12-06 12:29:31 -05:00
Jeremy Stretch
f8c5ca942a #3722: Update migration with new validator (does not impact database) 2019-12-06 12:19:29 -05:00
Jeremy Stretch
47fefbec07 Default to localhost in example Redis configs (needed for CI to work) 2019-12-06 12:00:51 -05:00
Jeremy Stretch
45917f8014 Closes #3408: Remove WEBHOOKS_ENABLE configuration setting 2019-12-06 11:52:28 -05:00
Jeremy Stretch
dd3e7397a4 Add ITA plug/outlet types (#792) 2019-12-06 11:26:44 -05:00
Jeremy Stretch
7518174374 Closes #3731: Change Graph.type to a ContentType foreign key field 2019-12-06 10:32:59 -05:00
Sander Steffann
02a009b7a7 Don't redefine exception but split the code 2019-12-06 16:32:18 +01:00
Jeremy Stretch
16353ce63c Correct stalebot config file name 2019-12-05 21:43:22 -05:00
Jeremy Stretch
7a4b202064 Fixes #3725: Enforce client validation for minimum service port number 2019-12-05 21:22:34 -05:00
Jeremy Stretch
a97ebc6d4c Fixes #3722: Allow the underscore character in IPAddress DNS names 2019-12-05 21:14:29 -05:00
Jeremy Stretch
9e765b1704 Fixes #3730: Add link to docs page for custom links 2019-12-05 21:07:43 -05:00
Jeremy Stretch
ec9443edb8 Changelog updates 2019-12-05 20:52:30 -05:00
Jeremy Stretch
dcb2c4722c Merge pull request #3732 from netbox-community/3569-api-choice-slugs
Replace API integer API choice values with slugs
2019-12-05 17:53:47 -05:00
Jeremy Stretch
b0c0adf6e7 Adapt device component import forms from #3711 2019-12-05 17:49:44 -05:00
Jeremy Stretch
17898a4c57 Merge branch 'develop-2.7' into 3569-api-choice-slugs 2019-12-05 17:43:11 -05:00
Jeremy Stretch
edbf562803 Annotate all migration operation lists 2019-12-05 17:42:33 -05:00
Jeremy Stretch
5d772d7055 Webhook.http_content_type to slug (#3569) 2019-12-05 17:11:59 -05:00
Daniel Sheppard
8cbd2f5c2d Add list view for device components (#3719)
* Initial Work on #3564

* #3564 - Fixup issue with filter on interface

* #3564 - Fix PEP8 errors

* #3564 - Finalize fields, readjust order, reduce repetition

* #3564 - Update Changelog

* #3564 - Fix extra space

* #3564 - Change interface table ordering

* #3564 - Minor cleanup

* #3564 - Add Import Links

* Fix PEP8
2019-12-05 17:10:49 -05:00
Jeremy Stretch
89e720cb77 ExportTemplate.template_language to slug (#3569) 2019-12-05 17:01:00 -05:00
Jeremy Stretch
2583823e5f Delete obsolete user action types 2019-12-05 16:50:44 -05:00
Jeremy Stretch
33890e6b97 Remain consistent with original action strings (e.g. 'created' instead of 'create') 2019-12-05 16:42:10 -05:00
Jeremy Stretch
a2b0da2608 Fix changelog table action labels 2019-12-05 16:37:22 -05:00
Jeremy Stretch
2bcbcd3458 ObjectChange.action to slug (#3569) 2019-12-05 16:30:15 -05:00
Jeremy Stretch
8efde811e9 Fix PowerFeed field defaults 2019-12-05 16:05:45 -05:00
Jeremy Stretch
4e1ee270cf Extend CustomField migration to update CustomFieldChoice.field.limit_choices_to 2019-12-05 16:02:52 -05:00
Jeremy Stretch
7a3c725f51 Convert BUTTON_CLASS_CHOICES to a ChoiceSet 2019-12-05 15:59:16 -05:00
Jeremy Stretch
fe2c682dc3 Changelog updates 2019-12-05 15:54:29 -05:00
Sander Steffann
adb25fd7d7 822 bulk import of device components (#3711)
Closes #822: CSV import for device components

* Implement CSV import for netbox-community#822

* Comment out default_return_url until there is a proper target

* Fix the default value of `enabled` when not included in the import

* rear_port is definitely required here

* Power Ports don't have a type (yet)

* Add import for console-ports and console-server-ports

* Add import for device-bays
2019-12-05 15:36:11 -05:00
Jeremy Stretch
bfea77baa5 CustomField.filter_logic to slug 2019-12-04 21:09:02 -05:00
Jeremy Stretch
3ff22bea56 CustomField.type to slug 2019-12-04 21:01:50 -05:00
Jeremy Stretch
ca11b9a2f5 VirtualMachine.status to slug 2019-12-04 20:40:18 -05:00
John Anderson
1048d3909b fixes #3724 - allow filtering interfaces by more than one device name 2019-12-04 02:00:08 -05:00
Jeremy Stretch
4ecbfc4e5e Service.protocol to slug (#3569) 2019-11-27 22:27:06 -05:00
Jeremy Stretch
213bd1555a VLAN.status to slug (#3569) 2019-11-27 22:15:59 -05:00
Jeremy Stretch
14a7a33cc2 IPAddress.role to slug (#3569) 2019-11-27 22:09:16 -05:00
Jeremy Stretch
ba8f324b12 IPAddress.status to slug (#3569) 2019-11-27 21:54:01 -05:00
Jeremy Stretch
929c0648d0 Prefix.status to slug (#3569) 2019-11-27 21:46:53 -05:00
Jeremy Stretch
21fe5902a8 PowerOutlet.feed_leg to slug (#3569) 2019-11-27 21:30:11 -05:00
Jeremy Stretch
b2caaa6733 Fixes #3312: Fix validation error when editing power cables in bulk 2019-11-27 09:19:34 -05:00
Jeremy Stretch
15722c1871 Fixes #3720: Correctly indicate power feed terminations on cable list 2019-11-26 16:56:11 -05:00
Jeremy Stretch
1d18948307 Fixes #3709: Prevent exception when importing an invalid cable definition 2019-11-26 16:46:51 -05:00
Jeremy Stretch
8c7f6c62b0 PowerFeed.status to slug (#3569) 2019-11-25 21:22:14 -05:00
Jeremy Stretch
2dc07ca30d PowerFeed.phase to slug (#3569) 2019-11-25 21:14:04 -05:00
Jeremy Stretch
bb8b012397 PowerFeed.supply to slug (#3569) 2019-11-25 21:08:34 -05:00
Jeremy Stretch
62494f295e PowerFeed.type to slug (#3569) 2019-11-25 21:03:11 -05:00
Jeremy Stretch
9872a46583 Rack.outer_unit to slug (#3569) 2019-11-25 20:54:24 -05:00
Jeremy Stretch
4846557d61 Cable.length_unit to slug (#3569) 2019-11-25 20:40:29 -05:00
Jeremy Stretch
79a40e22c9 Cable.type to slug (#3569) 2019-11-25 19:57:13 -05:00
Jeremy Stretch
dead5b42be Front/RearPort.type to slug (#3569) 2019-11-25 19:39:25 -05:00
Jeremy Stretch
bcc34f6099 Device.face to slug (#3569) 2019-11-25 19:23:43 -05:00
Jeremy Stretch
6a451e0c0e Merge pull request #3701 from hSaria/3697-custom-scripts-example-typo
Fixes #3697: Correct field_order attribute name
2019-11-22 08:45:21 -05:00
Jeremy Stretch
5c95927a43 Site.status to slug (#3569) 2019-11-21 22:54:01 -05:00
Jeremy Stretch
3fa4ceadb0 Interface.mode to slug (#3569) 2019-11-21 22:50:01 -05:00
Jeremy Stretch
f93cd17fee Consolidate #3569 field migrations by model 2019-11-21 22:26:35 -05:00
Jeremy Stretch
5f5081f719 Interface.type to slug (#3569) 2019-11-21 22:11:02 -05:00
Jeremy Stretch
180d3d0029 Resolved migration discrepancies when dealing with NULL values 2019-11-21 21:44:30 -05:00
Jeremy Stretch
4e2863e4ec Move CircuitTermination.term_side choices to a ChoiceSet 2019-11-21 21:28:59 -05:00
hSaria
b46e52eccc Fixed #3697: Correct field_order attribute name 2019-11-20 17:03:12 +00:00
Jeremy Stretch
f3a41df395 #3455: Correct related_name on Cluster.tenant 2019-11-18 22:12:29 -05:00
Jeremy Stretch
afd82fd9d3 DeviceType.subdevice_role to slug (#3569) 2019-11-18 22:08:33 -05:00
Jeremy Stretch
fbd12e1887 Create a separate migration for each field 2019-11-18 21:41:04 -05:00
Jeremy Stretch
4f0d82ac16 Standardize migration names for #3569 2019-11-18 21:04:12 -05:00
Jeremy Stretch
88b8cf3360 Tweak migrations to handle NULL values 2019-11-18 20:56:22 -05:00
Jeremy Stretch
a8db07e0a8 Device.face to slug (#3569) 2019-11-16 21:46:07 -05:00
Jeremy Stretch
c79c29e769 Rack.status to slug (#3569) 2019-11-15 22:03:41 -05:00
Jeremy Stretch
e1e09bff9b Correct Rack.type migration logic 2019-11-15 21:50:33 -05:00
Jeremy Stretch
07aa036fe8 Convert RACK_WIDTH_CHOICES to ChoiceSet 2019-11-15 21:33:56 -05:00
Jeremy Stretch
8d27b62114 Rack.status to slug (#3569) 2019-11-15 21:31:57 -05:00
Jeremy Stretch
62b45494b6 Convert all DCIM choice classes to ChoiceSets 2019-11-15 21:17:01 -05:00
Jeremy Stretch
de986ec392 Merge pull request #3687 from kobayashi/3679
fix url expressions
2019-11-14 22:03:03 -05:00
Jeremy Stretch
4b415caad2 Changelog for #3663 2019-11-14 22:01:37 -05:00
Jeremy Stretch
bfede60f3d Rename CreatedUpdatedFilter to CreatedUpdatedFilterSet 2019-11-14 22:00:12 -05:00
Jeremy Stretch
03b8759597 'base_name' deprecated in DRF v3.9.0 2019-11-14 21:58:37 -05:00
Jeremy Stretch
bdd623f82c Merge pull request #3680 from struppinet/develop
Closes #3663: API filter by created, last_updated
2019-11-14 21:57:26 -05:00
kobayashi
3c8083ed7f fix url expressions 2019-11-13 00:48:47 -05:00
kobayashi
5904f1f8ee Changelog for #3329 2019-11-12 09:47:31 -05:00
kobayashi
cc848a3f01 Merge pull request #3684 from bbock/docs-remove-p3p
Docs: Remove obsolete P3P policy
2019-11-12 09:38:46 -05:00
Bernhard Bock
1aaa101fb5 Docs: Remove obsolete P3P policy
P3P is obsolete (https://www.w3.org/TR/P3P11/), therefore the HTTP header
should be removed from the recommended config in the installation docs.
2019-11-08 15:13:32 +01:00
struppi
0319450643 Closes #3663: rename filter class 2019-11-07 22:41:09 +01:00
struppi
099774d667 Closes #3663: PEP8 fixes 2019-11-07 22:38:51 +01:00
Jeremy Stretch
e09ad6915f Circuit.status (#3569) 2019-11-07 11:11:10 -05:00
Jeremy Stretch
a2a6b754be Introduce ChoiceSet class for field choices 2019-11-07 10:33:10 -05:00
Jeremy Stretch
d392982fe7 Extend DeviceType import test with power port/outlet types 2019-11-06 16:59:01 -05:00
Jeremy Stretch
8cb7eb0382 Convert console port types to slugs (#3569) 2019-11-06 16:56:46 -05:00
Jeremy Stretch
48dcd2d2b9 Merge pull request #3675 from netbox-community/792-power-types
Introduce power port and outlet types
2019-11-06 16:12:37 -05:00
Jeremy Stretch
6ccaa0d9bd Initial work on #792 2019-11-06 15:30:54 -05:00
Jeremy Stretch
b1761f7856 #3139: Add a message indicating why the user is redirected 2019-11-06 10:01:42 -05:00
Jeremy Stretch
1bc38f66ae Changelog entries for #3139 and #3457 2019-11-06 09:58:30 -05:00
Jeremy Stretch
b4433a8471 Merge pull request #3667 from steffann/3139-disable-user-password-change-if-come-in-with-ldap-auth
Hide password change page when user is logged in using LDAP
2019-11-06 09:57:25 -05:00
Jeremy Stretch
053f49c76a Merge pull request #3673 from ananace/cable-color-display
3457 Display cable colors in device interface list
2019-11-06 09:53:59 -05:00
Jeremy Stretch
fbde6187ea Fixes #3669: Include weight field in prefix/VLAN role form 2019-11-06 09:39:21 -05:00
Jeremy Stretch
5eb5c4bac5 Fixes #3674: Include comments on PowerFeed view 2019-11-06 09:26:49 -05:00
Jeremy Stretch
fb4283ed53 Move alternative installations to the GitHub wiki 2019-11-06 09:05:12 -05:00
Alexander Olofsson
bbd65988f9 3457 Display cable colors in device interface list 2019-11-06 10:15:55 +01:00
struppi
a11fa44170 Closes #3663: fix inheritance error 2019-11-04 21:00:44 +01:00
struppi
99a542e4e4 Closes #3663: API filter by created, last_updated 2019-11-04 20:51:56 +01:00
Sander Steffann
a6f2d5b414 Fix code for PEP8 2019-11-03 16:12:39 +03:00
Sander Steffann
7f779e3942 Hide password change page when user is logged in using LDAP 2019-11-03 16:05:53 +03:00
Sander Steffann
7306d56902 Add support for S3 storage for media 2019-11-03 14:16:12 +03:00
Jeremy Stretch
b8f1585976 Merge branch 'develop' into develop-2.7 2019-11-01 16:19:36 -04:00
Jeremy Stretch
a2a83a4a4c Post-release version bump 2019-11-01 15:54:17 -04:00
Jeremy Stretch
9f7313e492 Merge pull request #3661 from netbox-community/develop
Release v2.6.7
2019-11-01 15:43:38 -04:00
Jeremy Stretch
f6fbf66c8c Merge branch 'master' into develop 2019-11-01 15:39:24 -04:00
Jeremy Stretch
3deedfd177 Release v2.6.7 2019-11-01 15:37:05 -04:00
Jeremy Stretch
e9d5ff095c Suppress migration messages during tests; fix typo 2019-11-01 15:08:59 -04:00
Jeremy Stretch
43d6bfa15f Corrected test 2019-11-01 15:08:20 -04:00
Jeremy Stretch
875e09013c Move TreeNodeMultipleChoiceFilter tests to utilities (follow-up to #3616) 2019-11-01 15:01:24 -04:00
Jeremy Stretch
ee854eff2c Changelog for #3357 2019-11-01 14:31:03 -04:00
Jeremy Stretch
b176e0fafd Merge pull request #3616 from kobayashi/3357
allow null region filtering
2019-11-01 14:29:32 -04:00
Jeremy Stretch
fb24a4d420 Merge pull request #3660 from tyler-8/gunicorn_options
Add max_requests details to example config
2019-11-01 12:32:39 -04:00
Jeremy Stretch
391c42300e Closes #3659: Add filtering for objects in admin UI 2019-11-01 12:22:39 -04:00
Tyler Bigler
2a8fa01a57 Increase request counts for max_requests 2019-11-01 12:09:44 -04:00
Jeremy Stretch
bd4b496d14 Tweak PR template to indicate placement of issue number 2019-11-01 11:52:43 -04:00
Jeremy Stretch
cf5c24ee2d Add new Interface type from #3619 2019-11-01 11:49:17 -04:00
Jeremy Stretch
66f4aac0e8 Changelog for #3619 2019-11-01 11:45:22 -04:00
Jeremy Stretch
267caa348e Merge pull request #3657 from Netnod/3619-new-400G-osfp-interface-type
3619 new 400 g osfp interface type
2019-11-01 11:43:43 -04:00
Tyler Bigler
7bf09a3085 Remove redundant word 2019-11-01 10:26:53 -04:00
Tyler Bigler
a0de0696c5 Add max_requests details to example config 2019-11-01 10:23:25 -04:00
Jeremy Stretch
a63383dc08 Reorganized navigation menu 2019-10-30 16:39:32 -04:00
Jeremy Stretch
0ad19081ac Move slug-based choices to choices.py 2019-10-30 16:31:04 -04:00
Emil Palm
aa6b2b8407 Merge remote-tracking branch 'upstream/develop' into 3619-new-400G-osfp-interface-type 2019-10-30 14:31:17 -05:00
Emil Palm
3e6726ff97 Add IFACE_TYPE_400GE_OSPF 2019-10-30 14:30:23 -05:00
Jeremy Stretch
bb30f64252 Closes #1865: Add console port and console server port types 2019-10-30 14:25:55 -04:00
Jeremy Stretch
c4dd76a748 Updated v2.7 release notes 2019-10-30 10:34:26 -04:00
Jeremy Stretch
56a248e601 Merge pull request #3654 from netbox-community/3538-scripts-api
3538: Add custom script API endpoints
2019-10-30 09:35:22 -04:00
Jeremy Stretch
0f65cf23a5 Only use module.name for human-facing display 2019-10-30 09:13:26 -04:00
Jeremy Stretch
fd3f718a0a Add tests for custom script API 2019-10-29 16:54:27 -04:00
Jeremy Stretch
93d28e6a72 Improve script output serialization 2019-10-29 16:17:59 -04:00
Jeremy Stretch
60ec3fde9d Closes #3652: Limit next/previous rack by assigned rack group 2019-10-29 15:17:00 -04:00
Jeremy Stretch
1cfb8aea23 Initial work on #3538: script execution API 2019-10-28 15:02:21 -04:00
Jeremy Stretch
846acf7e9d Changelog for #3629 2019-10-28 13:19:01 -04:00
kobayashi
fb9279cc74 Merge pull request #3645 from BegBlev/llpd-port-id
Retrieve port-id in LLDP tab
2019-10-28 12:19:10 -04:00
kobayashi
d2aa9b8e79 filtering multiple regions with null 2019-10-28 02:24:44 -04:00
Tyler Bigler
eaeb52de20 Add CONN_MAX_AGE to documentation (#3642)
* Add CONN_MAX_AGE to sample configurations

* Correct alignment

* Restore ghost space

* Correct alignment.

* Use stable docs url
2019-10-25 13:11:48 -04:00
Jeremy Stretch
fdbf41e9fd Fixes #3643: Update all Django documentation links to 'stable' version 2019-10-25 11:09:30 -04:00
Jeremy Stretch
092346c819 Changelog for #3309 2019-10-25 09:57:17 -04:00
Jeremy Stretch
5a5f51fe48 Merge pull request #3632 from netbox-community/3309-changelog-middleware
Rewrite change logging middleware
2019-10-25 09:47:32 -04:00
Jeremy Stretch
800df1ebbe Fixes #3636: Add missing rack_group field to PowerFeed CSV export 2019-10-25 09:27:33 -04:00
John Anderson
8eec67e73a #3635 changelog 2019-10-24 23:31:06 -04:00
John Anderson
33b420652d Merge pull request #3639 from sdktr/patch-1
Fix #3635 - cache circuits.*
2019-10-24 21:16:28 -04:00
Stefan de Kooter
42b679d9a3 Fix #3635 - cache circuits.*
Enable caching for items under the circuits app
2019-10-25 00:46:05 +02:00
Jeremy Stretch
ae4f17264f Fixes #3460: Extend upgrade script to validate Python dependencies 2019-10-23 17:12:32 -04:00
Jeremy Stretch
c7d8083ac6 Closes #3594: Add ChoiceVar for custom scripts 2019-10-23 15:59:27 -04:00
Jeremy Stretch
95fec1a87c Merge pull request #3627 from bdlamprecht/pg_dump-documentation
Adding note on invalidating cache
2019-10-23 12:24:27 -04:00
Jeremy Stretch
657a7aef42 Changelog for #3455 2019-10-23 11:55:45 -04:00
Jeremy Stretch
ea0d232169 Merge pull request #3572 from frelon/cluster-tenant
Add tenancy to cluster
2019-10-23 11:53:22 -04:00
Jeremy Stretch
7467347af1 Fixes #3596: Prevent server error when reassigning a device to a new device bay 2019-10-23 09:28:00 -04:00
Jeremy Stretch
0ebc2e4ac0 Fix reporting of custom fields in webhook data on object deletion 2019-10-22 16:12:25 -04:00
Jeremy Stretch
ccb9f7bfe2 Rewrote ObjectChangeMiddleware to remove the curried handle_deleted_object() function 2019-10-22 15:10:49 -04:00
kobayashi
766b5dff24 allow null region filtering 2019-10-22 00:41:49 -04:00
Vincent Catros
68e0329c1b Retrieve port-id in LLDP tab 2019-10-21 11:57:23 +02:00
Brady Lamprecht
fd99994fdb Adding note on invalidating cache 2019-10-18 14:59:55 -06:00
Jeremy Stretch
f21a63382c Changelog for #3340 2019-10-18 09:08:56 -04:00
Jeremy Stretch
6f0581598b Merge pull request #3613 from kobayashi/3340
modified front port connection type list
2019-10-18 09:07:22 -04:00
kobayashi
244e85e836 modify patch panel port connection type list 2019-10-18 00:01:21 -04:00
Jeremy Stretch
1df6713ad5 Minor improvements pertaining to CII best practices 2019-10-17 20:56:37 -04:00
Jeremy Stretch
c6893731ad Merge pull request #3621 from netbox-community/451-devicetype-import
Enable YAML/JSON-based DeviceType import
2019-10-17 16:43:15 -04:00
Jeremy Stretch
2ffbced47e Rework InterfaceTypes and PortTypes classes 2019-10-17 16:38:31 -04:00
Jeremy Stretch
bfce177a07 Merge pull request #3604 from netbox-community/3282-seperate-redis-config
implements #3282 - seperate webhooks and caching redis configs
2019-10-17 16:03:26 -04:00
Jeremy Stretch
8ca182571c Rebase schema migrations 2019-10-17 15:53:10 -04:00
Jeremy Stretch
801dd384d8 Merge branch 'develop' into develop-2.7 2019-10-17 15:51:33 -04:00
Jeremy Stretch
adc96702db Deleted errant import of graphviz 2019-10-17 15:43:49 -04:00
Jeremy Stretch
af73ce75ce Merge pull request #3607 from netbox-community/3606-stale-bot
implemented #3606 - added stale bot config
2019-10-17 14:32:40 -04:00
Jeremy Stretch
f08968da49 Exempt issues tagged with "status: blocked" 2019-10-17 14:28:27 -04:00
Fredrik Lönnegren
18e0bd8937 Fix typo 2019-10-16 08:22:06 +02:00
John Anderson
24344ccfaf Merge pull request #3615 from markkuleinio/develop
Update examples in webhooks.md
2019-10-15 14:27:20 -04:00
Markku Leiniö
91f045a2e4 Update examples in webhooks.md 2019-10-15 20:51:57 +03:00
Jeremy Stretch
050dfb279d Merge pull request #3597 from dgarros/patch-1
Update pillow version to 6.2.0
2019-10-15 11:54:44 -04:00
Jeremy Stretch
f9b7f18be6 Merge pull request #3609 from ScanPlusGmbH/missing-variable
Add SCRIPTS_ROOT to configuration.example.py
2019-10-14 11:58:28 -04:00
Tobias Genannt
a7380ba353 Add SCRIPTS_ROOT to configuration.example.py
Fixes #3608 by adding the new variable to the example configuration.
2019-10-14 09:29:04 +02:00
John Anderson
b8feba1070 implemented #3606 - added stale bot config 2019-10-13 04:12:58 -04:00
John Anderson
64575fec42 Merge pull request #3605 from netbox-community/3445-webhooks-additional-headers
implemented #3445 - Add support for additional user defined headers t…
2019-10-13 03:15:43 -04:00
John Anderson
c7d9bf839e implemented #3445 - Add support for additional user defined headers to be added to webhook requests 2019-10-13 03:09:58 -04:00
John Anderson
0d15ac15ae implements #3282 - seperate webhooks and caching redis configs 2019-10-13 02:49:54 -04:00
John Anderson
b013a60b12 Merge branch 'develop' into develop-2.7 2019-10-13 02:03:16 -04:00
John Anderson
8480c0da53 Merge pull request #3603 from netbox-community/3499-webhooks-ca-filepath
implemented #3499 - Add  to Webhook model to support user supplied CA certificate verification of webhook requests
2019-10-13 01:50:10 -04:00
John Anderson
5e88313276 typo in change log 2019-10-13 01:45:20 -04:00
John Anderson
09d7d38b04 implemented #3499 - Add to Webhook model to support user supplied CA certificate verrification of webhook requests 2019-10-13 01:43:08 -04:00
Damien Garros
4cc29729f9 Update pillow version to 6.2.0
A new CVE just got reporter regarding Pillow 
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-16865
it's affecting all version prior to 6.2.0
2019-10-11 13:45:37 -04:00
Jeremy Stretch
d787c353f3 Added slug choices for interface and port types 2019-10-10 23:24:44 -04:00
Jeremy Stretch
553fe0fe97 Merge branch 'develop' into 451-devicetype-import 2019-10-10 13:50:57 -04:00
Jeremy Stretch
aeeb49a6a7 Merge branch 'develop' into develop-2.7 2019-10-10 13:41:10 -04:00
Jeremy Stretch
b25faec159 Post-release version bump 2019-10-10 12:42:57 -04:00
Fredrik Lönnegren
3262805938 Add tenancy to cluster
fix pep8
2019-10-07 16:20:14 +02:00
Jeremy Stretch
807d849657 PEP8 fix 2019-10-01 17:07:17 -04:00
Jeremy Stretch
6892b79366 Enforce object creation permissions 2019-10-01 16:54:10 -04:00
Jeremy Stretch
88d61db384 Fix YAMLLoadWarning 2019-10-01 16:39:11 -04:00
Jeremy Stretch
ee4e68b082 Rewrote test for DeviceType import 2019-10-01 16:36:31 -04:00
Jeremy Stretch
edc1b52f65 Adopted a different approach to importing related objects 2019-09-27 16:51:12 -04:00
Jeremy Stretch
36d4f0d259 Fix typo 2019-09-25 16:39:04 -04:00
Jeremy Stretch
5f3528cf74 Capture MultiObjectField default form field values 2019-09-25 16:19:22 -04:00
Jeremy Stretch
47f1febfc9 Capture import form field default values 2019-09-25 16:06:09 -04:00
Jeremy Stretch
93154abb31 Merge branch 'develop' into 451-devicetype-import 2019-09-25 13:44:48 -04:00
Jeremy Stretch
778e5bed3c Merge branch 'develop' into develop-2.7 2019-09-25 13:44:29 -04:00
Jeremy Stretch
0615d368f2 Force validation of individual objects within a MultiObjectField 2019-09-24 16:51:59 -04:00
Jeremy Stretch
30ee232654 Move JSON/YAML data valdiation to ImportForm 2019-09-24 16:13:52 -04:00
Jeremy Stretch
2621f17cde Remove legacy CSV-based DeviceType import 2019-09-24 16:03:10 -04:00
Jeremy Stretch
15b2a7eab0 Fix form rendering; enable toggling of redirect to imported object 2019-09-24 15:58:23 -04:00
Jeremy Stretch
5049c6c0a1 Add test for DeviceType import 2019-09-20 15:57:44 -04:00
Jeremy Stretch
60b70b6c7b Add RearPortTemplate power_port field 2019-09-20 15:16:14 -04:00
Jeremy Stretch
5266fc67c9 Extend DeviceType import to include related objects 2019-09-20 14:02:14 -04:00
Jeremy Stretch
56dcadb69b Merged v2.6.4 2019-09-20 08:35:14 -04:00
Jeremy Stretch
f8fdca4968 Initial work on JSON/YAML-based DeviceType import 2019-09-13 16:18:29 -04:00
Daniel Sheppard
9e258dd31e Fixes: #2902 - Implements systemd (#3017)
* Closes #2902 - Migrate to systemd from supervisord
* Closes #2902 - Migrate to systemd from supervisord

* Update systemd unit and environment file
* Add gunicorn.conf
* Update documentation and CHANGELOG.  Moved parameters around on service file
* Update Gitignore
2019-09-06 11:46:35 -05:00
Jeremy Stretch
480db83f39 Renumber remove_topology_maps migration 2019-09-05 10:25:44 -04:00
Jeremy Stretch
cc0f0c4843 Merge v2.6.3 2019-09-04 16:45:33 -04:00
John Anderson
a6511632ad closes #3407 - Added code coverage reporting to the CI pipeline 2019-08-14 20:28:23 -04:00
Jeremy Stretch
15b55f5e62 Remove deprecated form_factor accessor on Interface and InterfaceTemplate 2019-08-08 21:35:59 -04:00
Jeremy Stretch
dccda62f2d Closes #2745: Remove topology maps 2019-08-08 21:33:20 -04:00
Jeremy Stretch
ef432754ee Started 2.7 branch 2019-08-08 21:19:14 -04:00
1397 changed files with 117300 additions and 22062 deletions

View File

@@ -5,7 +5,9 @@ about: Report a reproducible bug in the current release of NetBox
---
<!--
NOTE: This form is only for reproducible bugs. If you need assistance with
NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED.
This form is only for reproducible bugs. If you need assistance with
NetBox installation, or if you have a general question, DO NOT open an
issue. Instead, post to our mailing list:
@@ -13,22 +15,23 @@ about: Report a reproducible bug in the current release of NetBox
Please describe the environment in which you are running NetBox. Be sure
that you are running an unmodified instance of the latest stable release
before submitting a bug report.
before submitting a bug report, and that any plugins have been disabled.
-->
### Environment
* Python version: <!-- Example: 3.5.4 -->
* NetBox version: <!-- Example: 2.5.2 -->
* Python version:
* NetBox version:
<!--
Describe in detail the exact steps that someone else can take to reproduce
this bug using the current stable release of NetBox (or the current beta
release where applicable). Begin with the creation of any necessary
database objects and call out every operation being performed explicitly.
If reporting a bug in the REST API, be sure to reconstruct the raw HTTP
request(s) being made: Don't rely on a wrapper like pynetbox.
this bug using the current stable release of NetBox. Begin with the
creation of any necessary database objects and call out every operation
being performed explicitly. If reporting a bug in the REST API, be sure to
reconstruct the raw HTTP request(s) being made: Don't rely on a client
library such as pynetbox.
-->
### Steps to Reproduce
1.
1. Disable any installed plugins by commenting out the `PLUGINS` setting in
`configuration.py`.
2.
3.

9
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,9 @@
# Reference: https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository#configuring-the-template-chooser
blank_issues_enabled: false
contact_links:
- name: 📖 Contributing Policy
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
- name: 💬 Discussion Group
url: https://groups.google.com/forum/#!forum/netbox-discuss
about: Join our discussion group for assistance with installation issues and other problems

View File

@@ -5,6 +5,8 @@ about: Suggest an addition or modification to the NetBox documentation
---
<!--
NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED.
Please indicate the nature of the change by placing an X in one of the
boxes below.
-->
@@ -14,5 +16,13 @@ about: Suggest an addition or modification to the NetBox documentation
[ ] Deprecation
[ ] Cleanup (formatting, typos, etc.)
### Area
[ ] Installation instructions
[ ] Configuration parameters
[ ] Functionality/features
[ ] REST API
[ ] Administration/development
[ ] Other
<!-- Describe the proposed change(s). -->
### Proposed Changes

View File

@@ -5,7 +5,9 @@ about: Propose a new NetBox feature or enhancement
---
<!--
NOTE: This form is only for proposing specific new features or enhancements.
NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED.
This form is only for proposing specific new features or enhancements.
If you have a general idea or question, please post to our mailing list
instead of opening an issue:
@@ -19,8 +21,8 @@ about: Propose a new NetBox feature or enhancement
before submitting a bug report.
-->
### Environment
* Python version: <!-- Example: 3.5.4 -->
* NetBox version: <!-- Example: 2.3.6 -->
* Python version: <!-- Example: 3.6.9 -->
* NetBox version: <!-- Example: 2.7.3 -->
<!--
Describe in detail the new functionality you are proposing. Include any

View File

@@ -1,14 +1,13 @@
---
name: 🏡 Housekeeping
about: A change pertaining to the codebase itself
about: A change pertaining to the codebase itself (developers only)
---
<!--
NOTE: This type of issue should be opened only by those reasonably familiar
with NetBox's code base and interested in contributing to its development.
Describe the proposed change(s) in detail.
NOTE: This template is for use by maintainers only. Please do not submit
an issue using this template unless you have been specifically asked to
do so.
-->
### Proposed Changes

View File

@@ -9,8 +9,7 @@
IF YOUR PULL REQUEST DOES NOT REFERENCE AN ACCEPTED BUG REPORT OR
FEATURE REQUEST, IT WILL BE MARKED AS INVALID AND CLOSED.
-->
### Fixes:
### Fixes: <ISSUE NUMBER GOES HERE>
<!--
Please include a summary of the proposed changes below.
-->

23
.github/lock.yml vendored Normal file
View File

@@ -0,0 +1,23 @@
# Configuration for Lock (https://github.com/apps/lock)
# Number of days of inactivity before a closed issue or pull request is locked
daysUntilLock: 90
# Skip issues and pull requests created before a given timestamp. Timestamp must
# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable
skipCreatedBefore: false
# Issues and pull requests with these labels will be ignored. Set to `[]` to disable
exemptLabels: []
# Label to add before locking, such as `outdated`. Set to `false` to disable
lockLabel: false
# Comment to post before locking. Set to `false` to disable
lockComment: false
# Assign `resolved` as the reason for locking. Set to `false` to disable
setLockReason: true
# Limit to only `issues` or `pulls`
# only: issues

33
.github/stale.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
# Configuration for Stale (https://github.com/apps/stale)
# Pull requests are exempt from being marked as stale
only: issues
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 14
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- "status: accepted"
- "status: gathering feedback"
- "status: blocked"
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. NetBox
is governed by a small group of core maintainers which means not all opened
issues may receive direct feedback. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: >
This issue has been automatically closed due to lack of activity. In an
effort to reduce noise, please do not comment any further. Note that the
core maintainers may elect to reopen this issue at a later date if deemed
necessary.

10
.gitignore vendored
View File

@@ -1,4 +1,5 @@
*.pyc
*.swp
/netbox/netbox/configuration.py
/netbox/netbox/ldap_config.py
/netbox/reports/*
@@ -6,11 +7,14 @@
/netbox/scripts/*
!/netbox/scripts/__init__.py
/netbox/static
.idea
/venv/
/*.sh
!upgrade.sh
fabfile.py
*.swp
gunicorn_config.py
gunicorn.py
netbox.log
netbox.pid
.DS_Store
.idea
.coverage
.vscode

View File

@@ -3,13 +3,15 @@ services:
- postgresql
- redis-server
addons:
postgresql: "9.4"
postgresql: "9.6"
language: python
python:
- "3.5"
- "3.6"
- "3.7"
install:
- pip install -r requirements.txt
- pip install pycodestyle
- pip install coverage
before_script:
- psql --version
- psql -U postgres -c 'SELECT version();'

View File

@@ -16,7 +16,7 @@ For real-time discussion, you can join the #netbox Slack channel on [NetworkToCo
## Reporting Bugs
* First, ensure that you've installed the [latest stable version](https://github.com/netbox-community/netbox/releases)
* 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 possible that the bug has
already been fixed.
@@ -24,31 +24,30 @@ already been fixed.
to see if the bug you've found has already been reported. If you think you may
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 mightalso want to add a comment describing how it's affecting your
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.
* If you haven't found an existing issue that describes your suspected bug,
please inquire about it on the mailing list. **Do not** file an issue until you
have received confirmation that it is in fact a bug. Invalid issues are very
distracting and slow the pace at which NetBox is developed.
* When submitting an issue, please be as descriptive as possible. Be sure to
include:
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 (if applicable)
* 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 moderator after submission and the appropriate
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
intake policy](https://github.com/netbox-community/netbox/wiki/Issue-Intake-Policy).
## Feature Requests
* First, check the GitHub [issues list](https://github.com/netbox-community/netbox/issues)
@@ -61,10 +60,10 @@ 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.)
* Due to an excessive backlog of feature requests, we are not currently
accepting any proposals which substantially extend NetBox's functionality
beyond its current feature set. This includes the introduction of any new views
or models which have not already been proposed in an existing feature request.
* Due to a large backlog of feature requests, we are not currently accepting
any proposals which substantially extend NetBox's functionality beyond its
current feature set. This includes the introduction of any new views or models
which have not already been proposed in an existing feature request.
* Before filing a new feature request, consider raising your idea on the
mailing list first. Feedback you receive there will help validate and shape the
@@ -75,8 +74,8 @@ 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 the
following:
* When submitting a feature request on GitHub, be sure to include all
information requested by the issue template, including:
* A detailed description of the proposed functionality
* A use case for the feature; who would use it and what value it would add
@@ -89,6 +88,9 @@ following:
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
[issue intake policy](https://github.com/netbox-community/netbox/wiki/Issue-Intake-Policy).
## Submitting Pull Requests
* Be sure to open an issue **before** starting work on a pull request, and
@@ -99,9 +101,11 @@ any work that's already in progress.
* Any pull request which does _not_ relate to an accepted issue will be closed.
* All major 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 new stable releases.
development, while `master` is used for tagging stable releases.
* All code submissions should meet the following criteria (CI will enforce
these checks):
@@ -118,6 +122,29 @@ feedback. **Do not** comment on an issue just to show your support (give the
top post a :+1: instead) or ask for an ETA. These comments will be deleted to
reduce noise in the discussion.
## Issue Lifecycle
New issues are handled according to our [issue intake policy](https://github.com/netbox-community/netbox/wiki/Issue-Intake-Policy).
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)
to aid in issue management.
* Issues will be marked as stale after 14 days of no activity.
* Then after 7 more days of inactivity, the issue will be closed.
* Any issue bearing one of the following labels will be exempt from all Stale
bot actions:
* `status: accepted`
* `status: gathering feedback`
* `status: blocked`
It is natural that some new issues get more attention than others. Often this
is a metric of an issues's overall value to the project. In other cases in
which issues merely get lost in the shuffle, notifications from Stale bot can
bring renewed attention to potentially meaningful issues.
## Maintainer Guidance
* Maintainers are expected to contribute at least four hours per week to the

View File

@@ -1,9 +1,10 @@
![NetBox](docs/netbox_logo.png "NetBox logo")
![NetBox](docs/netbox_logo.svg "NetBox logo")
NetBox is an IP address management (IPAM) and data center infrastructure
management (DCIM) tool. Initially conceived by the network engineering team at
[DigitalOcean](https://www.digitalocean.com/), NetBox was developed specifically
to address the needs of network and infrastructure engineers.
to address the needs of network and infrastructure engineers. It is intended to
function as a domain-specific source of truth for network operations.
NetBox runs as a web application atop the [Django](https://www.djangoproject.com/)
Python framework with a [PostgreSQL](http://www.postgresql.org/) database. For a
@@ -21,27 +22,33 @@ or join us in the #netbox Slack channel on [NetworkToCode](https://networktocode
| **master** | [![Build Status](https://travis-ci.org/netbox-community/netbox.svg?branch=master)](https://travis-ci.com/netbox-community/netbox/) |
| **develop** | [![Build Status](https://travis-ci.org/netbox-community/netbox.svg?branch=develop)](https://travis-ci.com/netbox-community/netbox/) |
## Screenshots
### Screenshots
![Screenshot of main page](docs/media/screenshot1.png "Main page")
---
![Screenshot of rack elevation](docs/media/screenshot2.png "Rack elevation")
---
![Screenshot of prefix hierarchy](docs/media/screenshot3.png "Prefix hierarchy")
# Installation
## Installation
Please see [the documentation](http://netbox.readthedocs.io/en/stable/) for
instructions on installing NetBox. To upgrade NetBox, please download the [latest release](https://github.com/netbox-community/netbox/releases)
and run `upgrade.sh`.
## Alternative Installations
## Providing Feedback
* [Docker container](https://github.com/netbox-community/netbox-docker) (via [@cimnine](https://github.com/cimnine))
* [Vagrant deployment](https://github.com/ryanmerolle/netbox-vagrant) (via [@ryanmerolle](https://github.com/ryanmerolle))
* [Ansible deployment](https://github.com/lae/ansible-role-netbox) (via [@lae](https://github.com/lae))
* [Kubernetes deployment](https://github.com/CENGN/netbox-kubernetes) (via [@CENGN](https://github.com/CENGN))
Feature requests and bug reports must be submitted as GiHub issues. (Please be
sure to use the [appropriate template](https://github.com/netbox-community/netbox/issues/new/choose).)
For general discussion, please consider joining our [mailing list](https://groups.google.com/forum/#!forum/netbox-discuss).
# Related projects
If you are interested in contributing to the development of NetBox, please read
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.

View File

@@ -22,14 +22,18 @@ django-filter
# https://github.com/django-mptt/django-mptt
django-mptt
# Django integration for RQ (Reqis queuing)
# https://github.com/rq/django-rq
django-rq
# Context managers for PostgreSQL advisory locks
# https://github.com/Xof/django-pglocks
django-pglocks
# Prometheus metrics library for Django
# https://github.com/korfuri/django-prometheus
django-prometheus
# Django integration for RQ (Reqis queuing)
# https://github.com/rq/django-rq
django-rq
# Abstraction models for rendering and paginating HTML tables
# https://github.com/jieter/django-tables2
django-tables2
@@ -54,14 +58,17 @@ djangorestframework
# https://github.com/axnsan12/drf-yasg
drf-yasg[validation]
# Python interface to the graphviz graph rendering utility
# https://github.com/xflr6/graphviz
graphviz
# WSGI HTTP server
# https://gunicorn.org/
gunicorn
# Platform-agnostic template rendering engine
# https://github.com/pallets/jinja
Jinja2
# Simple markup language for rendering HTML
# https://github.com/Python-Markdown/markdown
# py-gfm requires Markdown<3.0
Markdown<3.0
Markdown
# Library for manipulating IP prefixes and addresses
# https://github.com/drkjam/netaddr
@@ -75,10 +82,18 @@ Pillow
# https://github.com/psycopg/psycopg2
psycopg2-binary
# GitHub-flavored Markdown extensions
# https://github.com/zopieux/py-gfm
py-gfm
# Extensive cryptographic library (fork of pycrypto)
# https://github.com/Legrandin/pycryptodome
pycryptodome
# YAML rendering library
# https://github.com/yaml/pyyaml
PyYAML
# In-memory key/value store used for caching and queuing
# https://github.com/andymccurdy/redis-py
redis
# SVG image rendering (used for rack elevations)
# https://github.com/mozman/svgwrite
svgwrite

26
contrib/apache.conf Normal file
View File

@@ -0,0 +1,26 @@
<VirtualHost *:443>
ProxyPreserveHost On
# CHANGE THIS TO YOUR SERVER'S NAME
ServerName netbox.example.com
SSLEngine on
SSLCertificateFile /etc/ssl/certs/netbox.crt
SSLCertificateKeyFile /etc/ssl/private/netbox.key
Alias /static /opt/netbox/netbox/static
<Directory /opt/netbox/netbox/static>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Require all granted
</Directory>
<Location /static>
ProxyPass !
</Location>
RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
ProxyPass / http://127.0.0.1:8001/
ProxyPassReverse / http://127.0.0.1:8001/
</VirtualHost>

16
contrib/gunicorn.py Normal file
View File

@@ -0,0 +1,16 @@
# The IP address (typically localhost) and port that the Netbox WSGI process should listen on
bind = '127.0.0.1:8001'
# Number of gunicorn workers to spawn. This should typically be 2n+1, where
# n is the number of CPU cores present.
workers = 5
# Number of threads per worker process
threads = 3
# Timeout (in seconds) for a request to complete
timeout = 120
# The maximum number of requests a worker can handle before being respawned
max_requests = 5000
max_requests_jitter = 500

21
contrib/netbox-rq.service Normal file
View File

@@ -0,0 +1,21 @@
[Unit]
Description=NetBox Request Queue Worker
Documentation=https://netbox.readthedocs.io/en/stable/
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=netbox
Group=netbox
WorkingDirectory=/opt/netbox
ExecStart=/opt/netbox/venv/bin/python3 /opt/netbox/netbox/manage.py rqworker
Restart=on-failure
RestartSec=30
PrivateTmp=true
[Install]
WantedBy=multi-user.target

22
contrib/netbox.service Normal file
View File

@@ -0,0 +1,22 @@
[Unit]
Description=NetBox WSGI Service
Documentation=https://netbox.readthedocs.io/en/stable/
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=netbox
Group=netbox
PIDFile=/var/tmp/netbox.pid
WorkingDirectory=/opt/netbox
ExecStart=/opt/netbox/venv/bin/gunicorn --pid /var/tmp/netbox.pid --pythonpath /opt/netbox/netbox --config /opt/netbox/gunicorn.py netbox.wsgi
Restart=on-failure
RestartSec=30
PrivateTmp=true
[Install]
WantedBy=multi-user.target

29
contrib/nginx.conf Normal file
View File

@@ -0,0 +1,29 @@
server {
listen 443 ssl;
# CHANGE THIS TO YOUR SERVER'S NAME
server_name netbox.example.com;
ssl_certificate /etc/ssl/certs/netbox.crt;
ssl_certificate_key /etc/ssl/private/netbox.key;
client_max_body_size 25m;
location /static/ {
alias /opt/netbox/netbox/static/;
}
location / {
proxy_pass http://127.0.0.1:8001;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
server {
# Redirect HTTP traffic to HTTPS
listen 80;
server_name _;
return 301 https://$host$request_uri;
}

View File

@@ -3,7 +3,7 @@
To improve performance, NetBox supports caching for most object and list views. Caching is implemented using Redis,
and [django-cacheops](https://github.com/Suor/django-cacheops)
Several management commands are avaliable for administrators to manaully invalidate cache entries in extenuating circumstances.
Several management commands are avaliable for administrators to manually invalidate cache entries in extenuating circumstances.
To invalidate a specifc model instance (for example a Device with ID 34):
```

View File

@@ -1,5 +1,3 @@
# Contextual Configuration Data
# Context Data
Sometimes it is desirable to associate arbitrary data with a group of devices to aid in their configuration. For example, you might want to associate a set of syslog servers for all devices at a particular site. Context data enables the association of arbitrary data to devices and virtual machines grouped by region, site, role, platform, and/or tenant. Context data is arranged hierarchically, so that data with a higher weight can be entered to override more general lower-weight data. Multiple instances of data are automatically merged by NetBox to present a single dictionary for each object.
Devices and Virtual Machines may also have a local config context defined. This local context will always overwrite the rendered config context objects for the Device/VM. This is useful in situations were the device requires a one-off value different from the rest of the environment.
{!docs/models/extras/configcontext.md!}

View File

@@ -27,11 +27,17 @@ class MyScript(Script):
var2 = IntegerVar(...)
var3 = ObjectVar(...)
def run(self, data):
def run(self, data, commit):
...
```
The `run()` method is passed a single argument: a dictionary containing all of the variable data passed via the web form. Your script can reference this data during execution.
The `run()` method should accept two arguments:
* `data` - A dictionary containing all of the variable data passed via the web form.
* `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 moving forward scripts should accept both arguments.
Defining variables is optional: You may create a script with only a `run()` method if no user input is needed.
@@ -57,7 +63,7 @@ A human-friendly description of what your script does.
### `field_order`
A list of field names indicating the order in which the form fields should appear. This is optional, however on Python 3.5 and earlier the fields will appear in random order. (Declarative ordering is preserved on Python 3.6 and above.) For example:
A list of field names indicating the order in which the form fields should appear. This is optional, and should not be required on Python 3.6 and above. For example:
```
field_order = ['var1', 'var2', 'var3']
@@ -71,6 +77,18 @@ The checkbox to commit database changes when executing a script is checked by de
commit_default = False
```
## 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:
```python
username = self.request.user.username
ip_address = self.request.META.get('HTTP_X_FORWARDED_FOR') or self.request.META.get('REMOTE_ADDR')
self.log_info("Running as user {} (IP: {})...".format(username, ip_address))
```
For a complete list of available request parameters, please see the [Django documentation](https://docs.djangoproject.com/en/stable/ref/request-response/).
## Reading Data from Files
The Script class provides two convenience methods for reading data from files:
@@ -112,13 +130,30 @@ Arbitrary text of any length. Renders as multi-line text input field.
Stored a numeric integer. Options include:
* `min_value:` - Minimum value
* `min_value` - Minimum value
* `max_value` - Maximum value
### BooleanVar
A true/false flag. This field has no options beyond the defaults.
### ChoiceVar
A set of choices from which the user can select one.
* `choices` - A list of `(value, label)` tuples representing the available choices. For example:
```python
CHOICES = (
('n', 'North'),
('s', 'South'),
('e', 'East'),
('w', 'West')
)
direction = ChoiceVar(choices=CHOICES)
```
### ObjectVar
A NetBox object. The list of available objects is defined by the queryset parameter. Each instance of this variable is limited to a single object type.
@@ -129,18 +164,30 @@ A NetBox object. The list of available objects is defined by the queryset parame
An uploaded file. Note that uploaded files are present in memory only for the duration of the script's execution: They will not be save for future use.
### IPAddressVar
An IPv4 or IPv6 address, without a mask. Returns a `netaddr.IPAddress` object.
### IPAddressWithMaskVar
An IPv4 or IPv6 address with a mask. Returns a `netaddr.IPNetwork` object which includes the mask.
### IPNetworkVar
An IPv4 or IPv6 network with a mask.
An IPv4 or IPv6 network with a mask. Returns a `netaddr.IPNetwork` object. Two attributes are available to validate the provided mask:
* `min_prefix_length` - Minimum length of the mask (default: none)
* `max_prefix_length` - Maximum length of the mask (default: none)
### Default Options
All variables support the following default options:
* `label` - The name of the form field
* `description` - A brief description of the field
* `default` - The field's default value
* `description` - A brief description of the field
* `label` - The name of the form field
* `required` - Indicates whether the field is mandatory (default: true)
* `widget` - The class of form widget to use (see the [Django documentation](https://docs.djangoproject.com/en/stable/ref/forms/widgets/))
## Example
@@ -155,7 +202,7 @@ These variables are presented as a web form to be completed by the user. Once su
```
from django.utils.text import slugify
from dcim.constants import *
from dcim.choices import DeviceStatusChoices, SiteStatusChoices
from dcim.models import Device, DeviceRole, DeviceType, Site
from extras.scripts import *
@@ -165,7 +212,7 @@ class NewBranchScript(Script):
class Meta:
name = "New Branch"
description = "Provision a new branch site"
fields = ['site_name', 'switch_count', 'switch_model']
field_order = ['site_name', 'switch_count', 'switch_model']
site_name = StringVar(
description="Name of the new site"
@@ -181,13 +228,13 @@ class NewBranchScript(Script):
)
)
def run(self, data):
def run(self, data, commit):
# Create the new site
site = Site(
name=data['site_name'],
slug=slugify(data['site_name']),
status=SITE_STATUS_PLANNED
status=SiteStatusChoices.STATUS_PLANNED
)
site.save()
self.log_success("Created new site: {}".format(site))
@@ -199,7 +246,7 @@ class NewBranchScript(Script):
device_type=data['switch_model'],
name='{}-switch{}'.format(site.slug, i),
site=site,
status=DEVICE_STATUS_PLANNED,
status=DeviceStatusChoices.STATUS_PLANNED,
device_role=switch_role
)
switch.save()

View File

@@ -4,7 +4,7 @@ NetBox allows users to define custom templates that can be used when exporting o
Each export template is associated with a certain type of object. For instance, if you create an export template for VLANs, your custom template will appear under the "Export" button on the VLANs list.
Export templates are written in [Django's template language](https://docs.djangoproject.com/en/1.9/ref/templates/language/), which is very similar to Jinja2. The list of objects returned from the database is stored in the `queryset` variable, which you'll typically want to iterate through using a `for` loop. Object properties can be access by name. For example:
Export templates are written in [Django's template language](https://docs.djangoproject.com/en/stable/ref/templates/language/), which is very similar to Jinja2. The list of objects returned from the database is stored in the `queryset` variable, which you'll typically want to iterate through using a `for` loop. Object properties can be access by name. For example:
```
{% for rack in queryset %}

View File

@@ -8,6 +8,11 @@ NetBox does not have the ability to generate graphs natively, but this feature a
* **Source URL:** The source of the image to be embedded. The associated object will be available as a template variable named `obj`.
* **Link URL (optional):** A URL to which the graph will be linked. The associated object will be available as a template variable named `obj`.
Graph names and links can be rendered using the Django or Jinja2 template languages.
!!! warning
Support for the Django templating language will be removed in NetBox v2.8. Jinja2 is recommended.
## Examples
You only need to define one graph object for each graph you want to include when viewing an object. For example, if you want to include a graph of traffic through an interface over the past five minutes, your graph source might looks like this:

View File

@@ -0,0 +1,65 @@
# NAPALM
NetBox supports integration with the [NAPALM automation](https://napalm-automation.net/) library. NAPALM allows NetBox to fetch live data from devices and return it to a requester via its REST API.
!!! info
To enable the integration, the NAPALM library must be installed. See [installation steps](../../installation/3-netbox/#napalm-automation-optional) for more information.
```
GET /api/dcim/devices/1/napalm/?method=get_environment
{
"get_environment": {
...
}
}
```
## Authentication
By default, the [`NAPALM_USERNAME`](../../configuration/optional-settings/#napalm_username) and [`NAPALM_PASSWORD`](../../configuration/optional-settings/#napalm_password) are used for NAPALM authentication. They can be overridden for an individual API call through the `X-NAPALM-Username` and `X-NAPALM-Password` headers.
```
$ curl "http://localhost/api/dcim/devices/1/napalm/?method=get_environment" \
-H "Authorization: Token f4b378553dacfcfd44c5a0b9ae49b57e29c552b5" \
-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. NetBox only supports [get](https://napalm.readthedocs.io/en/latest/support/index.html#getters-support-matrix) methods.
## Multiple Methods
More than one method in an API call can be invoked by adding multiple `method` parameters. For example:
```
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 instance, 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 f4b378553dacfcfd44c5a0b9ae49b57e29c552b5" \
-H "Content-Type: application/json" \
-H "Accept: application/json; indent=4" \
-H "X-NAPALM-port: 2222"
```

View File

@@ -32,7 +32,8 @@ class DeviceIPsReport(Report):
Within each report class, we'll create a number of test methods to execute our report's logic. In DeviceConnectionsReport, for instance, we want to ensure that every live device has a console connection, an out-of-band management connection, and two power connections.
```
from dcim.constants import CONNECTION_STATUS_PLANNED, DEVICE_STATUS_ACTIVE
from dcim.choices import DeviceStatusChoices
from dcim.constants import CONNECTION_STATUS_PLANNED
from dcim.models import ConsolePort, Device, PowerPort
from extras.reports import Report
@@ -43,7 +44,8 @@ class DeviceConnectionsReport(Report):
def test_console_connection(self):
# Check that every console port for every active device has a connection defined.
for console_port in ConsolePort.objects.prefetch_related('device').filter(device__status=DEVICE_STATUS_ACTIVE):
active = DeviceStatusChoices.STATUS_ACTIVE
for console_port in ConsolePort.objects.prefetch_related('device').filter(device__status=active):
if console_port.connected_endpoint is None:
self.log_failure(
console_port.device,
@@ -60,7 +62,7 @@ class DeviceConnectionsReport(Report):
def test_power_connections(self):
# Check that every active device has at least two connected power supplies.
for device in Device.objects.filter(status=DEVICE_STATUS_ACTIVE):
for device in Device.objects.filter(status=DeviceStatusChoices.STATUS_ACTIVE):
connected_ports = 0
for power_port in PowerPort.objects.filter(device=device):
if power_port.connected_endpoint is not None:

View File

@@ -1,24 +1,3 @@
# Tags
# Tagging
Tags are free-form text labels which can be applied to a variety of objects within NetBox. Tags are created on-demand as they are assigned to objects. Use commas to separate tags when adding multiple tags to an object (for example: `Inventoried, Monitored`). Use double quotes around a multi-word tag when adding only one tag, e.g. `"Core Switch"`.
Each tag has a label and a URL-friendly slug. For example, the slug for a tag named "Dunder Mifflin, Inc." would be `dunder-mifflin-inc`. The slug is generated automatically and makes tags easier to work with as URL parameters.
Objects can be filtered by the tags they have applied. For example, the following API request will retrieve all devices tagged as "monitored":
```
GET /api/dcim/devices/?tag=monitored
```
Tags are included in the API representation of an object as a list of plain strings:
```
{
...
"tags": [
"Core Switch",
"Monitored"
],
...
}
```
{!docs/models/extras/tag.md!}

View File

@@ -1,17 +0,0 @@
# Topology Maps
NetBox can generate simple topology maps from the physical network connections recorded in its database. First, you'll need to create a topology map definition under the admin UI at Extras > Topology Maps.
Each topology map is associated with a site. A site can have multiple topology maps, which might each illustrate a different aspect of its infrastructure (for example, production versus backend infrastructure).
To define the scope of a topology map, decide which devices you want to include. The map will only include interface connections with both points terminated on an included device. Specify the devices to include in the **device patterns** field by entering a list of [regular expressions](https://en.wikipedia.org/wiki/Regular_expression) matching device names. For example, if you wanted to include "mgmt-switch1" through "mgmt-switch99", you might use the regex `mgmt-switch\d+`.
Each line of the **device patterns** field represents a hierarchical layer within the topology map. For example, you might map a traditional network with core, distribution, and access tiers like this:
```
core-switch-[abcd]
dist-switch\d
access-switch\d+;oob-switch\d+
```
Note that you can combine multiple regexes onto one line using semicolons. The order in which regexes are listed on a line is significant: devices matching the first regex will be rendered first, and subsequent groups will be rendered to the right of those.

View File

@@ -1,57 +1,106 @@
# Webhooks
A webhook defines an HTTP request that is sent to an external application when certain types of objects are created, updated, and/or deleted in NetBox. When a webhook is triggered, a POST request is sent to its configured URL. This request will include a full representation of the object being modified for consumption by the receiver. Webhooks are configured via the admin UI under Extras > Webhooks.
A webhook is a mechanism for conveying to some external system a change that took place in NetBox. For example, you may want to notify a monitoring system whenever a device status is changed in NetBox. This can be done by creating a webhook for the device model in NetBox. When NetBox detects a change to a device, an HTTP request containing the details of the change and who made it be sent to the specified receiver. Webhooks are configured in the admin UI under Extras > Webhooks.
An optional secret key can be configured for each webhook. 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. This digest can be used by the receiver to authenticate the request's content.
## Configuration
## Requests
* **Name** - A unique name for the webhook. The name is not included with outbound messages.
* **Object type(s)** - The type or types of NetBox object that will trigger the webhook.
* **Enabled** - If unchecked, the webhook will be inactive.
* **Events** - A webhook may trigger on any combination of create, update, and delete events. At least one event type must be selected.
* **HTTP method** - The type of HTTP request to send. Options include GET, POST, PUT, PATCH, and DELETE.
* **URL** - The fuly-qualified URL of the request to be sent. This may specify a destination port number if needed.
* **HTTP content type** - The value of the request's `Content-Type` header. (Defaults to `application/json`)
* **Additional headers** - Any additional headers to include with the request (optional). Add one header per line in the format `Name: Value`. Jinja2 templating is supported for this field (see below).
* **Body template** - The content of the request being sent (optional). Jinja2 templating is supported for this field (see below). If blank, NetBox will populate the request body with a raw dump of the webhook context. (If the HTTP cotent type is set to `application/json`, this will be formatted as a JSON object.)
* **Secret** - 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.
* **SSL verification** - Uncheck this option to disable validation of the receiver's SSL certificate. (Disable with caution!)
* **CA file path** - The file path to a particular certificate authority (CA) file to use when validating the receiver's SSL certificate (optional).
The webhook POST request is structured as so (assuming `application/json` as the Content-Type):
## Jinja2 Template Support
[Jinja2 templating](https://jinja.palletsprojects.com/) is supported for the `additional_headers` and `body_template` fields. This enables the user to convey change data in the request headers as well as to craft a customized request body. Request content can be crafted to enable the direct interaction with external systems by ensuring the outgoing message is in a format the receiver expects and understands.
For example, you might create a NetBox webhook to [trigger a Slack message](https://api.slack.com/messaging/webhooks) any time an IP address is created. You can accomplish this using the following configuration:
* Object type: IPAM > IP address
* HTTP method: POST
* URL: <Slack incoming webhook URL>
* HTTP content type: `application/json`
* Body template: `{"text": "IP address {{ data['address'] }} was created by {{ username }}!"}`
### Available Context
The following data is available as context for Jinja2 templates:
* `event` - The type of event which triggered the webhook: created, updated, or deleted.
* `model` - The NetBox model which triggered the change.
* `timestamp` - The time at which the event occurred (in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format).
* `username` - The name of the user account associated with the change.
* `request_id` - The unique request ID. This may be used to correlate multiple changes associated with a single request.
* `data` - A serialized representation of the object _after_ the change was made. This is typically equivalent to the model's representation in NetBox's REST API.
### Default Request Body
If no body template is specified, the request body will be populated with a JSON object containing the context data. For example, a newly created site might appear as follows:
```no-highlight
{
"event": "created",
"signal_received_timestamp": 1508769597,
"model": "Site"
"timestamp": "2020-02-25 15:10:26.010582+00:00",
"model": "site",
"username": "jstretch",
"request_id": "fdbca812-3142-4783-b364-2e2bd5c16c6a",
"data": {
"id": 19,
"name": "Site 1",
"slug": "site-1",
"status":
"value": "active",
"label": "Active",
"id": 1
},
"region": null,
...
}
}
```
`data` is the serialized representation of the model instance(s) from the event. The same serializers from the NetBox API are used. So an example of the payload for a Site delete event would be:
## Webhook Processing
When a change is detected, any resulting webhooks are placed into a Redis queue for processing. This allows the user's request to complete without needing to wait for the outgoing webhook(s) to be processed. The webhooks are then extracted from the queue by the `rqworker` process and HTTP requests are sent to their respective destinations. The current webhook queue and any failed webhooks can be inspected in the admin UI under Django RQ > Queues.
A request is considered successful if the response has a 2XX status code; otherwise, the request is marked as having failed. Failed requests may be retried manually via the admin UI.
## Troubleshooting
To assist with verifying that the content of outgoing webhooks is rendered correctly, NetBox provides a simple HTTP listener that can be run locally to receive and display webhook requests. First, modify the target URL of the desired webhook to `http://localhost:9000/`. This will instruct NetBox to send the request to the local server on TCP port 9000. Then, start the webhook receiver service from the NetBox root directory:
```no-highlight
{
"event": "deleted",
"signal_received_timestamp": 1508781858.544069,
"model": "Site",
"data": {
"asn": None,
"comments": "",
"contact_email": "",
"contact_name": "",
"contact_phone": "",
"count_circuits": 0,
"count_devices": 0,
"count_prefixes": 0,
"count_racks": 0,
"count_vlans": 0,
"custom_fields": {},
"facility": "",
"id": 54,
"name": "test",
"physical_address": "",
"region": None,
"shipping_address": "",
"slug": "test",
"tenant": None
}
}
$ python netbox/manage.py webhook_receiver
Listening on port http://localhost:9000. Stop with CONTROL-C.
```
A request is considered successful if the response status code is any one of a list of "good" statuses defined in the [requests library](https://github.com/requests/requests/blob/205755834d34a8a6ecf2b0b5b2e9c3e6a7f4e4b6/requests/models.py#L688), otherwise the request is marked as having failed. The user may manually retry a failed request.
You can test the receiver itself by sending any HTTP request to it. For example:
## Backend Status
```no-highlight
$ curl -X POST http://localhost:9000 --data '{"foo": "bar"}'
```
Django-rq includes a status page in the admin site which can be used to view the result of processed webhooks and manually retry any failed webhooks. Access it from http://netbox.local/admin/webhook-backend-status/.
The server will print output similar to the following:
```no-highlight
[1] Tue, 07 Apr 2020 17:44:02 GMT 127.0.0.1 "POST / HTTP/1.1" 200 -
Host: localhost:9000
User-Agent: curl/7.58.0
Accept: */*
Content-Length: 14
Content-Type: application/x-www-form-urlencoded
{"foo": "bar"}
------------
```
Note that `webhook_receiver` does not actually _do_ anything with the information received: It merely prints the request headers and body for inspection.
Now, when the NetBox webhook is triggered and processed, you should see its headers and content appear in the terminal where the webhook receiver is listening. If you don't, check that the `rqworker` process is running and that webhook events are being placed into the queue (visible under the NetBox admin UI).

View File

@@ -1,15 +1,17 @@
# The NetBox Python Shell
NetBox includes a Python shell within which objects can be directly queried, created, modified, and deleted. To enter the shell, run the following command:
```
./manage.py nbshell
```
This will launch a customized version of [the built-in Django shell](https://docs.djangoproject.com/en/dev/ref/django-admin/#shell) with all relevant NetBox models pre-loaded. (If desired, the stock Django shell is also available by executing `./manage.py shell`.)
This will launch a customized version of [the built-in Django shell](https://docs.djangoproject.com/en/stable/ref/django-admin/#shell) with all relevant NetBox models pre-loaded. (If desired, the stock Django shell is also available by executing `./manage.py shell`.)
```
$ ./manage.py nbshell
### NetBox interactive shell (jstretch-laptop)
### Python 3.5.2 | Django 2.0.8 | NetBox 2.4.3
### NetBox interactive shell (localhost)
### Python 3.6.9 | Django 2.2.11 | NetBox 2.7.10
### lsmodels() will show available models. Use help(<model>) for more info.
```
@@ -28,7 +30,7 @@ DCIM:
## Querying Objects
Objects are retrieved by forming a [Django queryset](https://docs.djangoproject.com/en/dev/topics/db/queries/#retrieving-objects). The base queryset for an object takes the form `<model>.objects.all()`, which will return a (truncated) list of all objects of that type.
Objects are retrieved by forming a [Django queryset](https://docs.djangoproject.com/en/stable/topics/db/queries/#retrieving-objects). The base queryset for an object takes the form `<model>.objects.all()`, which will return a (truncated) list of all objects of that type.
```
>>> Device.objects.all()
@@ -99,7 +101,7 @@ This approach can span multiple levels of relations. For example, the following
```
!!! note
While the above query is functional, it is very inefficient. There are ways to optimize such requests, however they are out of the scope of this document. For more information, see the [Django queryset method reference](https://docs.djangoproject.com/en/dev/ref/models/querysets/) documentation.
While the above query is functional, it is very inefficient. There are ways to optimize such requests, however they are out of the scope of this document. For more information, see the [Django queryset method reference](https://docs.djangoproject.com/en/stable/ref/models/querysets/) documentation.
Reverse relationships can be traversed as well. For example, the following will find all devices with an interface named "em0":
@@ -137,7 +139,7 @@ To return the inverse of a filtered queryset, use `exclude()` instead of `filter
```
!!! info
The examples above are intended only to provide a cursory introduction to queryset filtering. For an exhaustive list of the available filters, please consult the [Django queryset API docs](https://docs.djangoproject.com/en/dev/ref/models/querysets/).
The examples above are intended only to provide a cursory introduction to queryset filtering. For an exhaustive list of the available filters, please consult the [Django queryset API docs](https://docs.djangoproject.com/en/stable/ref/models/querysets/).
## Creating and Updating Objects

View File

@@ -1,11 +1,13 @@
# Replicating the Database
# Replicating NetBox
## Replicating the Database
NetBox uses [PostgreSQL](https://www.postgresql.org/) for its database, so general PostgreSQL best practices will apply to NetBox. You can dump and restore the database using the `pg_dump` and `psql` utilities, respectively.
!!! note
The examples below assume that your database is named `netbox`.
## Export the Database
### Export the Database
Use the `pg_dump` utility to export the entire database to a file:
@@ -19,7 +21,7 @@ When replicating a production database for development purposes, you may find it
pg_dump --exclude-table-data=extras_objectchange netbox > netbox.sql
```
## Load an Exported Database
### Load an Exported Database
!!! warning
This will destroy and replace any existing instance of the database.
@@ -32,21 +34,26 @@ psql netbox < netbox.sql
Keep in mind that PostgreSQL user accounts and permissions are not included with the dump: You will need to create those manually if you want to fully replicate the original database (see the [installation docs](../installation/1-postgresql.md)). When setting up a development instance of NetBox, it's strongly recommended to use different credentials anyway.
## Export the Database Schema
### Export the Database Schema
If you want to export only the database schema, and not the data itself (e.g. for development reference), do the following:
```no-highlight
pg_dump -s netbox > netbox_schema.sql
```
If you are migrating your instance of NetBox to a different machine, please make sure you invalidate the cache by performing this command:
```no-highlight
python3 manage.py invalidate all
```
---
# Replicating Media
## Replicating Media
NetBox stored uploaded files (such as image attachments) in its media directory. To fully replicate an instance of NetBox, you'll need to copy both the database and the media files.
## Archive the Media Directory
### Archive the Media Directory
Execute the following command from the root of the NetBox installation path (typically `/opt/netbox`):
@@ -54,7 +61,7 @@ Execute the following command from the root of the NetBox installation path (typ
tar -czf netbox_media.tar.gz netbox/media/
```
## Restore the Media Directory
### Restore the Media Directory
To extract the saved archive into a new installation, run the following from the installation root:

View File

@@ -1,6 +1,8 @@
# REST API Authentication
The NetBox API employs token-based authentication. For convenience, cookie authentication can also be used when navigating the browsable API.
# Tokens
## Tokens
A token is a unique identifier that identifies a user to the API. Each user in NetBox may have one or more tokens which he or she can use to authenticate to the API. To create a token, navigate to the API tokens page at `/user/api-tokens/`.
@@ -13,7 +15,7 @@ By default, a token can be used for all operations available via the API. Desele
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.
# Authenticating to the API
## Authenticating to the API
By default, read operations will be available without authentication. In this case, a token may be included in the request, but is not necessary.

View File

@@ -14,7 +14,7 @@ To authenticate a request, attach your token in an `Authorization` header:
curl -H "Authorization: Token d2f763479f703d80de0ec15254237bc651f9cdc0"
```
### Retrieving a list of sites
## Retrieving a list of sites
Send a `GET` request to the object list endpoint. The response contains a paginated list of JSON objects.
@@ -51,7 +51,7 @@ $ curl -H "Accept: application/json; indent=4" http://localhost/api/dcim/sites/
}
```
### Retrieving a single site by ID
## Retrieving a single site by ID
Send a `GET` request to the object detail endpoint. The response contains a single JSON object.
@@ -80,7 +80,7 @@ $ curl -H "Accept: application/json; indent=4" http://localhost/api/dcim/sites/6
}
```
### Creating a new site
## Creating a new site
Send a `POST` request to the site list endpoint with token authentication and JSON-formatted data. Only mandatory fields are required. This example includes one non required field, "region."
@@ -104,7 +104,7 @@ $ curl -X POST -H "Authorization: Token d2f763479f703d80de0ec15254237bc651f9cdc0
```
Note that in this example we are creating a site bound to a region with the ID of 5. For write API actions (`POST`, `PUT`, and `PATCH`) the integer ID value is used for `ForeignKey` (related model) relationships, instead of the nested representation that is used in the `GET` (list) action.
### Modify an existing site
## Modify an existing site
Make an authenticated `PUT` request to the site detail endpoint. As with a create (`POST`) request, all mandatory fields must be included.
@@ -112,14 +112,14 @@ Make an authenticated `PUT` request to the site detail endpoint. As with a creat
$ curl -X PUT -H "Authorization: Token d2f763479f703d80de0ec15254237bc651f9cdc0" -H "Content-Type: application/json" -H "Accept: application/json; indent=4" http://localhost:8000/api/dcim/sites/16/ --data '{"name": "Renamed Site", "slug": "renamed-site"}'
```
### Modify an object by changing a field
## Modify an object by changing a field
Make an authenticated `PATCH` request to the device endpoint. With `PATCH`, unlike `POST` and `PUT`, we only specify the field that is being changed. In this example, we add a serial number to a device.
```
$ curl -X PATCH -H "Authorization: Token d2f763479f703d80de0ec15254237bc651f9cdc0" -H "Content-Type: application/json" -H "Accept: application/json; indent=4" http://localhost:8000/api/dcim/devices/2549/ --data '{"serial": "FTX1123A090"}'
```
### Delete an existing site
## Delete an existing site
Send an authenticated `DELETE` request to the site detail endpoint.

71
docs/api/filtering.md Normal file
View File

@@ -0,0 +1,71 @@
# API Filtering
The NetBox API supports robust filtering of results based on the fields of each model.
Generally speaking you are able to filter based on the attributes (fields) present in
the response body. Please note however that certain read-only or metadata fields are not
filterable.
Filtering is achieved by passing HTTP query parameters and the parameter name is the
name of the field you wish to filter on and the value is the field value.
E.g. filtering based on a device's name:
```
/api/dcim/devices/?name=DC-SPINE-1
```
## Multi Value Logic
While you are able to filter based on an arbitrary number of fields, you are also able to
pass multiple values for the same field. In most cases filtering on multiple values is
implemented as a logical OR operation. A notable exception is the `tag` filter which
is a logical AND. Passing multiple values for one field, can be combined with other fields.
For example, filtering for devices with either the name of DC-SPINE-1 _or_ DC-LEAF-4:
```
/api/dcim/devices/?name=DC-SPINE-1&name=DC-LEAF-4
```
Filtering for devices with tag `router` and `customer-a` will return only devices with
_both_ of those tags applied:
```
/api/dcim/devices/?tag=router&tag=customer-a
```
## Lookup Expressions
Certain model fields also support filtering using additional lookup expressions. This allows
for negation and other context specific filtering.
These lookup expressions can be applied by adding a suffix to the desired field's name.
E.g. `mac_address__n`. In this case, the filter expression is for negation and it is separated
by two underscores. Below are the lookup expressions that are supported across different field
types.
### Numeric Fields
Numeric based fields (ASN, VLAN ID, etc) support these lookup expressions:
- `n` - not equal (negation)
- `lt` - less than
- `lte` - less than or equal
- `gt` - greater than
- `gte` - greater than or equal
### String Fields
String based (char) fields (Name, Address, etc) support these lookup expressions:
- `n` - not equal (negation)
- `ic` - case insensitive contains
- `nic` - negated case insensitive contains
- `isw` - case insensitive starts with
- `nisw` - negated case insensitive starts with
- `iew` - case insensitive ends with
- `niew` - negated case insensitive ends with
- `ie` - case sensitive exact match
- `nie` - negated case sensitive exact match
### Foreign Keys & Other Fields
Certain other fields, namely foreign key relationships support just the negation
expression: `n`.

View File

@@ -1,4 +1,6 @@
# What is a REST API?
# The NetBox REST API
## What is a REST API?
REST stands for [representational state transfer](https://en.wikipedia.org/wiki/Representational_state_transfer). It's a particular type of API which employs HTTP to create, retrieve, update, and delete objects from a database. (This set of operations is commonly referred to as CRUD.) Each type of operation is associated with a particular HTTP verb:
@@ -32,11 +34,11 @@ $ curl -s http://localhost:8000/api/ipam/ip-addresses/2954/ | jq '.'
Each attribute of the NetBox object is expressed as a field in the dictionary. Fields may include their own nested objects, as in the case of the `status` field above. Every object includes a primary key named `id` which uniquely identifies it in the database.
# Interactive Documentation
## Interactive Documentation
Comprehensive, interactive documentation of all API endpoints is available on a running NetBox instance at `/api/docs/`. This interface provides a convenient sandbox for researching and experimenting with NetBox's various API endpoints and different request types.
# URL Hierarchy
## URL Hierarchy
NetBox's entire API is housed under the API root at `https://<hostname>/api/`. The URL structure is divided at the root level by application: circuits, DCIM, extras, IPAM, secrets, and tenancy. Within each application, each model has its own path. For example, the provider and circuit objects are located under the "circuits" application:
@@ -62,7 +64,9 @@ Lists of objects can be filtered using a set of query parameters. For example, t
GET /api/dcim/interfaces/?device_id=123
```
# Serialization
See [filtering](filtering.md) for more details.
## Serialization
The NetBox API employs three types of serializers to represent model data:
@@ -106,7 +110,7 @@ The base serializer is used to represent the default view of a model. This inclu
}
```
## Related Objects
### Related Objects
Related objects (e.g. `ForeignKey` fields) are represented using a nested serializer. A nested serializer provides a minimal representation of an object, including only its URL and enough information to display the object to a user. When performing write API actions (`POST`, `PUT`, and `PATCH`), related objects may be specified by either numeric ID (primary key), or by a set of attributes sufficiently unique to return the desired object.
@@ -137,7 +141,7 @@ Or by a set of nested attributes used to identify the rack:
Note that if the provided parameters do not return exactly one object, a validation error is raised.
## Brief Format
### Brief Format
Most API endpoints support an optional "brief" format, which returns only a minimal representation of each object in the response. This is useful when you need only a list of the objects themselves without any related data, such as when populating a drop-down list in a form.
@@ -183,38 +187,7 @@ GET /api/ipam/prefixes/13980/?brief=1
The brief format is supported for both lists and individual objects.
## Static Choice Fields
Some model fields, such as the `status` field in the above example, utilize static integers corresponding to static choices. The available choices can be retrieved from the read-only `_choices` endpoint within each app. A specific `model:field` tuple may optionally be specified in the URL.
Each choice includes a human-friendly label and its corresponding numeric value. For example, `GET /api/ipam/_choices/prefix:status/` will return:
```
[
{
"value": 0,
"label": "Container"
},
{
"value": 1,
"label": "Active"
},
{
"value": 2,
"label": "Reserved"
},
{
"value": 3,
"label": "Deprecated"
}
]
```
Thus, to set a prefix's status to "Reserved," it would be assigned the integer `2`.
A request for `GET /api/ipam/_choices/` will return choices for _all_ fields belonging to models within the IPAM app.
# Pagination
## Pagination
API responses which contain a list of objects (for example, a request to `/api/dcim/devices/`) will be paginated to avoid unnecessary overhead. The root JSON object will contain the following attributes:
@@ -268,40 +241,45 @@ The maximum number of objects that can be returned is limited by the [`MAX_PAGE_
!!! warning
Disabling the page size limit introduces a potential for very resource-intensive requests, since one API request can effectively retrieve an entire table from the database.
# Filtering
## Filtering
A list of objects retrieved via the API can be filtered by passing one or more query parameters. The same parameters used by the web UI work for the API as well. For example, to return only prefixes with a status of "Active" (`1`):
A list of objects retrieved via the API can be filtered by passing one or more query parameters. The same parameters used by the web UI work for the API as well. For example, to return only prefixes with a status of "Active" (identified by the slug `active`):
```
GET /api/ipam/prefixes/?status=1
GET /api/ipam/prefixes/?status=active
```
The choices available for fixed choice fields such as `status` are exposed in the API under a special `_choices` endpoint for each NetBox app. For example, the available choices for `Prefix.status` are listed at `/api/ipam/_choices/` under the key `prefix:status`:
The choices available for fixed choice fields such as `status` can be retrieved by sending an `OPTIONS` API request for the desired endpoint:
```
"prefix:status": [
{
"label": "Container",
"value": 0
},
{
"label": "Active",
"value": 1
},
{
"label": "Reserved",
"value": 2
},
{
"label": "Deprecated",
"value": 3
}
],
```no-highlight
$ curl -s -X OPTIONS \
-H "Authorization: Token $TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json; indent=4" \
http://localhost:8000/api/ipam/prefixes/ | jq ".actions.POST.status.choices"
[
{
"value": "container",
"display_name": "Container"
},
{
"value": "active",
"display_name": "Active"
},
{
"value": "reserved",
"display_name": "Reserved"
},
{
"value": "deprecated",
"display_name": "Deprecated"
}
]
```
For most fields, when a filter is passed multiple times, objects matching _any_ of the provided values will be returned. For example, `GET /api/dcim/sites/?name=Foo&name=Bar` will return all sites named "Foo" _or_ "Bar". The exception to this rule is ManyToManyFields which may have multiple values assigned. Tags are the most common example of a ManyToManyField. For example, `GET /api/dcim/sites/?tag=foo&tag=bar` will return only sites tagged with both "foo" _and_ "bar".
## Custom Fields
### Custom Fields
To filter on a custom field, prepend `cf_` to the field name. For example, the following query will return only sites where a custom field named `foo` is equal to 123:

View File

@@ -1,6 +1,8 @@
# Working with Secrets
As with most other objects, the NetBox API can be used to create, modify, and delete secrets. However, additional steps are needed to encrypt or decrypt secret data.
# Generating a Session Key
## Generating a Session Key
In order to encrypt or decrypt secret data, a session key must be attached to the API request. To generate a session key, send an authenticated request to the `/api/secrets/get-session-key/` endpoint with the private RSA key which matches your [UserKey](../../core-functionality/secrets/#user-keys). The private key must be POSTed with the name `private_key`.
@@ -19,7 +21,7 @@ $ curl -X POST http://localhost:8000/api/secrets/get-session-key/ \
The request uses your private key to unlock your stored copy of the master key and generate a session key which can be attached in the `X-Session-Key` header of future API requests.
# Retrieving Secrets
## Retrieving Secrets
A session key is not needed to retrieve unencrypted secrets: The secret is returned like any normal object with its `plaintext` field set to null.
@@ -112,7 +114,7 @@ $ curl http://localhost:8000/api/secrets/secrets/?limit=3 \
}
```
# Creating Secrets
## Creating Secrets
Session keys are also used to decrypt new or modified secrets. This is done by setting the `plaintext` field of the submitted object:

View File

@@ -4,6 +4,8 @@ NetBox's local configuration is stored in `netbox/netbox/configuration.py`. An e
While NetBox has many configuration settings, only a few of them must be defined at the time of installation.
## Configuration Parameters
* [Required settings](required-settings.md)
* [Optional settings](optional-settings.md)

View File

@@ -90,6 +90,22 @@ This setting enables debugging. This should be done only during development or t
---
## DEVELOPER
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.
---
## DOCS_ROOT
Default: `$INSTALL_DIR/docs/`
The file path to NetBox's documentation. This is used when presenting context-sensitive documentation in the web UI. by default, this will be the `docs/` directory within the root NetBox installation path. (Set this to `None` to disable the embedded documentation.)
---
## EMAIL
In order to send email, NetBox needs an email server configured. The following items can be defined within the `EMAIL` setting:
@@ -101,6 +117,20 @@ In order to send email, NetBox needs an email server configured. The following i
* TIMEOUT - Amount of time to wait for a connection (seconds)
* FROM_EMAIL - Sender address for emails sent by NetBox
Email is sent from NetBox only for critical events. If you would like to test the email server configuration please use the django function [send_mail()](https://docs.djangoproject.com/en/stable/topics/email/#send-mail):
```
# python ./manage.py nbshell
>>> from django.core.mail import send_mail
>>> send_mail(
'Test Email Subject',
'Test Email Body',
'noreply-netbox@example.com',
['users@example.com'],
fail_silently=False
)
```
---
## EXEMPT_VIEW_PERMISSIONS
@@ -127,7 +157,7 @@ EXEMPT_VIEW_PERMISSIONS = ['*']
---
# ENFORCE_GLOBAL_UNIQUE
## ENFORCE_GLOBAL_UNIQUE
Default: False
@@ -135,11 +165,26 @@ Enforcement of unique IP space can be toggled on a per-VRF basis. To enforce uni
---
## HTTP_PROXIES
Default: None
A dictionary of HTTP proxies to use for outbound requests originating from NetBox (e.g. when sending webhooks). Proxies should be specified by schema as per the [Python requests library documentation](https://2.python-requests.org/en/master/user/advanced/). For example:
```python
HTTP_PROXIES = {
'http': 'http://10.10.1.10:3128',
'https': 'http://10.10.1.10:1080',
}
```
---
## LOGGING
By default, all messages of INFO severity or higher will be logged to the console. Additionally, if `DEBUG` is False and email access has been configured, ERROR and CRITICAL messages will be emailed to the users defined in `ADMINS`.
The Django framework on which NetBox runs allows for the customization of logging, e.g. to write logs to file. Please consult the [Django logging documentation](https://docs.djangoproject.com/en/1.11/topics/logging/) for more information on configuring this setting. Below is an example which will write all INFO and higher messages to a file:
The Django framework on which NetBox runs allows for the customization of logging, e.g. to write logs to file. Please consult the [Django logging documentation](https://docs.djangoproject.com/en/stable/topics/logging/) for more information on configuring this setting. Below is an example which will write all INFO and higher messages to a file:
```
LOGGING = {
@@ -161,6 +206,14 @@ LOGGING = {
}
```
### Available Loggers
* `netbox.auth.*` - Authentication events
* `netbox.api.views.*` - Views which handle business logic for the REST API
* `netbox.reports.*` - Report execution (`module.name`)
* `netbox.scripts.*` - Custom script execution (`module.name`)
* `netbox.views.*` - Views which handle business logic for the web UI
---
## LOGIN_REQUIRED
@@ -261,6 +314,39 @@ Determine how many objects to display per page within each list of objects.
---
## PLUGINS
Default: Empty
A list of installed [NetBox plugins](../../plugins/) to enable. Plugins will not take effect unless they are listed here.
!!! warning
Plugins extend NetBox by allowing external code to run with the same access and privileges as NetBox itself. Only install plugins from trusted sources. The NetBox maintainers make absolutely no guarantees about the integrity or security of your installation with plugins enabled.
---
## PLUGINS_CONFIG
Default: Empty
This parameter holds configuration settings for individual NetBox plugins. It is defined as a dictionary, with each key using the name of an installed plugin. The specific parameters supported are unique to each plugin: Reference the plugin's documentation to determine the supported parameters. An example configuration is shown below:
```python
PLUGINS_CONFIG = {
'plugin1': {
'foo': 123,
'bar': True
},
'plugin2': {
'foo': 456,
},
}
```
Note that a plugin must be listed in `PLUGINS` for its configuration to take effect.
---
## PREFER_IPV4
Default: False
@@ -269,6 +355,72 @@ When determining the primary IP address for a device, IPv6 is preferred over IPv
---
## REMOTE_AUTH_ENABLED
Default: `False`
NetBox can be configured to support remote user authentication by inferring user authentication from an HTTP header set by the HTTP reverse proxy (e.g. nginx or Apache). Set this to `True` to enable this functionality. (Local authentication will still take effect as a fallback.)
---
## REMOTE_AUTH_BACKEND
Default: `'utilities.auth_backends.RemoteUserBackend'`
Python path to the custom [Django authentication backend](https://docs.djangoproject.com/en/stable/topics/auth/customizing/) to use for external user authentication, if not using NetBox's built-in backend. (Requires `REMOTE_AUTH_ENABLED`.)
---
## REMOTE_AUTH_HEADER
Default: `'HTTP_REMOTE_USER'`
When remote user authentication is in use, this is the name of the HTTP header which informs NetBox of the currently authenticated user. (Requires `REMOTE_AUTH_ENABLED`.)
---
## REMOTE_AUTH_AUTO_CREATE_USER
Default: `True`
If true, NetBox will automatically create local accounts for users authenticated via a remote service. (Requires `REMOTE_AUTH_ENABLED`.)
---
## REMOTE_AUTH_DEFAULT_GROUPS
Default: `[]` (Empty list)
The list of groups to assign a new user account when created using remote authentication. (Requires `REMOTE_AUTH_ENABLED`.)
---
## REMOTE_AUTH_DEFAULT_PERMISSIONS
Default: `[]` (Empty list)
The list of permissions to assign a new user account when created using remote authentication. (Requires `REMOTE_AUTH_ENABLED`.)
---
## RELEASE_CHECK_TIMEOUT
Default: 86,400 (24 hours)
The number of seconds to retain the latest version that is fetched from the GitHub API before automatically invalidating it and fetching it from the API again. This must be set to at least one hour (3600 seconds).
---
## RELEASE_CHECK_URL
Default: None
The releases of this repository are checked to detect new releases, which are shown on the home page of the web interface. You can change this to your own fork of the NetBox repository, or set it to `None` to disable the check. The URL provided **must** be compatible with the GitHub API.
Use `'https://api.github.com/repos/netbox-community/netbox/releases'` to check for release in the official NetBox repository.
---
## REPORTS_ROOT
Default: $BASE_DIR/netbox/reports/
@@ -293,6 +445,26 @@ Session data is used to track authenticated users when they access NetBox. By de
---
## STORAGE_BACKEND
Default: None (local storage)
The backend storage engine for handling uploaded files (e.g. image attachments). NetBox supports integration with the [`django-storages`](https://django-storages.readthedocs.io/en/stable/) package, which provides backends for several popular file storage services. If not configured, local filesystem storage will be used.
The configuration parameters for the specified storage backend are defined under the `STORAGE_CONFIG` setting.
---
## STORAGE_CONFIG
Default: Empty
A dictionary of configuration parameters for the storage backend configured as `STORAGE_BACKEND`. The specific parameters to be used here are specific to each backend; see the [`django-storages` documentation](https://django-storages.readthedocs.io/en/stable/) for more detail.
If `STORAGE_BACKEND` is not defined, this setting will be ignored.
---
## TIME_ZONE
Default: UTC
@@ -301,17 +473,9 @@ The time zone NetBox will use when dealing with dates and times. It is recommend
---
## WEBHOOKS_ENABLED
Default: False
Enable this option to run the webhook backend. See the docs section on the webhook backend [here](../../additional-features/webhooks/) for more information on setup and use.
---
## Date and Time Formatting
You may define custom formatting for date and times. For detailed instructions on writing format strings, please see [the Django documentation](https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date).
You may define custom formatting for date and times. For detailed instructions on writing format strings, please see [the Django documentation](https://docs.djangoproject.com/en/stable/ref/templates/builtins/#date).
Defaults:

View File

@@ -2,7 +2,7 @@
## ALLOWED_HOSTS
This is a list of valid fully-qualified domain names (FQDNs) that is used to reach the NetBox service. Usually this is the same as the hostname for the NetBox server, but can also be different (e.g. when using a reverse proxy serving the NetBox website under a different FQDN than the hostname of the NetBox server). NetBox will not permit access to the server via any other hostnames (or IPs). The value of this option is also used to set `CSRF_TRUSTED_ORIGINS`, which restricts `HTTP POST` to the same set of hosts (more about this [here](https://docs.djangoproject.com/en/1.9/ref/settings/#std:setting-CSRF_TRUSTED_ORIGINS)). Keep in mind that NetBox, by default, has `USE_X_FORWARDED_HOST = True` (in `netbox/netbox/settings.py`) which means that if you're using a reverse proxy, it's the FQDN used to reach that reverse proxy which needs to be in this list (more about this [here](https://docs.djangoproject.com/en/1.9/ref/settings/#allowed-hosts)).
This is a list of valid fully-qualified domain names (FQDNs) that is used to reach the NetBox service. Usually this is the same as the hostname for the NetBox server, but can also be different (e.g. when using a reverse proxy serving the NetBox website under a different FQDN than the hostname of the NetBox server). NetBox will not permit access to the server via any other hostnames (or IPs). The value of this option is also used to set `CSRF_TRUSTED_ORIGINS`, which restricts `HTTP POST` to the same set of hosts (more about this [here](https://docs.djangoproject.com/en/stable/ref/settings/#std:setting-CSRF_TRUSTED_ORIGINS)). Keep in mind that NetBox, by default, has `USE_X_FORWARDED_HOST = True` (in `netbox/netbox/settings.py`) which means that if you're using a reverse proxy, it's the FQDN used to reach that reverse proxy which needs to be in this list (more about this [here](https://docs.djangoproject.com/en/stable/ref/settings/#allowed-hosts)).
Example:
@@ -21,59 +21,114 @@ NetBox requires access to a PostgreSQL database service to store data. This serv
* `PASSWORD` - PostgreSQL password
* `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 (5432)
* `CONN_MAX_AGE` - Lifetime of a [persistent database connection](https://docs.djangoproject.com/en/stable/ref/databases/#persistent-connections), in seconds (150-300 is recommended)
Example:
```
```python
DATABASE = {
'NAME': 'netbox', # Database name
'USER': 'netbox', # PostgreSQL username
'PASSWORD': 'J5brHrAXFLQSif0K', # PostgreSQL password
'HOST': 'localhost', # Database server
'PORT': '', # Database port (leave blank for default)
'CONN_MAX_AGE': 300, # Max database connection age
}
```
!!! 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).
---
## REDIS
[Redis](https://redis.io/) is an in-memory data store similar to memcached. While Redis has been an optional component of
NetBox since the introduction of webhooks in version 2.4, it is required starting in 2.6 to support NetBox's caching
functionality (as well as other planned features).
functionality (as well as other planned features). In 2.7, the connection settings were broken down into two sections for
task queuing and caching, allowing the user to connect to different Redis instances/databases per feature.
Redis is configured using a configuration setting similar to `DATABASE`:
Redis is configured using a configuration setting similar to `DATABASE` and these settings are the same for both of the `tasks` and `caching` subsections:
* `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)
* `PASSWORD` - Redis password (if set)
* `DATABASE` - Numeric database ID for webhooks
* `CACHE_DATABASE` - Numeric database ID for caching
* `DATABASE` - Numeric database ID
* `DEFAULT_TIMEOUT` - Connection timeout in seconds
* `SSL` - Use SSL connection to Redis
Example:
```
```python
REDIS = {
'HOST': 'localhost',
'PORT': 6379,
'PASSWORD': '',
'DATABASE': 0,
'CACHE_DATABASE': 1,
'DEFAULT_TIMEOUT': 300,
'SSL': False,
'tasks': {
'HOST': 'redis.example.com',
'PORT': 1234,
'PASSWORD': 'foobar',
'DATABASE': 0,
'DEFAULT_TIMEOUT': 300,
'SSL': False,
},
'caching': {
'HOST': 'localhost',
'PORT': 6379,
'PASSWORD': '',
'DATABASE': 1,
'DEFAULT_TIMEOUT': 300,
'SSL': False,
}
}
```
!!! note:
If you were using these settings in a prior release with webhooks, the `DATABASE` setting remains the same but
an additional `CACHE_DATABASE` setting has been added with a default value of 1 to support the caching backend. The
`DATABASE` setting will be renamed in a future release of NetBox to better relay the meaning of the setting.
!!! note
If you are upgrading from a version prior to v2.7, please note that the Redis connection configuration settings have
changed. Manual modification to bring the `REDIS` section inline with the above specification is necessary
!!! warning
It is highly recommended to keep the task and cache databases separate. Using the same database number on the
same Redis instance for both may result in queued background tasks being lost during cache flushing events.
### Using Redis Sentinel
If you are using [Redis Sentinel](https://redis.io/topics/sentinel) for high-availability purposes, there is minimal
configuration necessary to convert NetBox to recognize it. It requires the removal of the `HOST` and `PORT` keys from
above and the addition of two new keys.
* `SENTINELS`: List of tuples or tuple of tuples with each inner tuple containing the name or IP address
of the Redis server and port for each sentinel instance to connect to
* `SENTINEL_SERVICE`: Name of the master / service to connect to
Example:
```python
REDIS = {
'tasks': {
'SENTINELS': [('mysentinel.redis.example.com', 6379)],
'SENTINEL_SERVICE': 'netbox',
'PASSWORD': '',
'DATABASE': 0,
'DEFAULT_TIMEOUT': 300,
'SSL': False,
},
'caching': {
'SENTINELS': [
('mysentinel.redis.example.com', 6379),
('othersentinel.redis.example.com', 6379)
],
'SENTINEL_SERVICE': 'netbox',
'PASSWORD': '',
'DATABASE': 1,
'DEFAULT_TIMEOUT': 300,
'SSL': False,
}
}
```
!!! note
It is possible to have only one or the other Redis configurations to use Sentinel functionality. It is possible
for example to have the tasks database use sentinel via `HOST`/`PORT` and for caching to use Sentinel via
`SENTINELS`/`SENTINEL_SERVICE`.
!!! warning:
It is highly recommended to keep the webhook and cache databases seperate. Using the same database number for both may result in webhook
processing data being lost in cache flushing events.
---

View File

@@ -1,34 +1,9 @@
# Providers
# Circuits
A provider is any entity which provides some form of connectivity. While this obviously includes carriers which offer Internet and private transit service, it might also include Internet exchange (IX) points and even organizations with whom you peer directly.
Each provider may be assigned an autonomous system number (ASN), an account number, and relevant contact information.
{!docs/models/circuits/provider.md!}
---
# Circuits
A circuit represents a single _physical_ link connecting exactly two endpoints. (A circuit with more than two endpoints is a virtual circuit, which is not currently supported by NetBox.) Each circuit belongs to a provider and must be assigned a circuit ID which is unique to that provider.
## Circuit Types
Circuits are classified by type. For example, you might define circuit types for:
* Internet transit
* Out-of-band connectivity
* Peering
* Private backhaul
Circuit types are fully customizable.
## Circuit Terminations
A circuit may have one or two terminations, annotated as the "A" and "Z" sides of the circuit. A single-termination circuit can be used when you don't know (or care) about the far end of a circuit (for example, an Internet access circuit which connects to a transit provider). A dual-termination circuit is useful for tracking circuits which connect two sites.
Each circuit termination is tied to a site, and may optionally be connected via a cable to a specific device interface or pass-through port. Each termination can be assigned a separate downstream and upstream speed independent from one another. Fields are also available to track cross-connect and patch panel details.
!!! note
A circuit represents a physical link, and cannot have more than two endpoints. When modeling a multi-point topology, each leg of the topology must be defined as a discrete circuit.
!!! note
A circuit may terminate only to a physical interface. Circuits may not terminate to LAG interfaces, which are virtual interfaces: You must define each physical circuit within a service bundle separately and terminate it to its actual physical interface.
{!docs/models/circuits/circuit.md!}
{!docs/models/circuits/circuittype.md!}
{!docs/models/circuits/circuittermination.md!}

View File

@@ -0,0 +1,40 @@
# Device Types
{!docs/models/dcim/devicetype.md!}
{!docs/models/dcim/manufacturer.md!}
---
## Device Component Templates
Each device type is assigned a number of component templates which define the physical components within a device. These are:
* Console ports
* Console server ports
* Power ports
* Power outlets
* Network interfaces
* Front ports
* Rear ports
* Device bays (which house child devices)
Whenever a new device is created, its components are automatically created per the templates assigned to its device type. For example, a Juniper EX4300-48T device type might have the following component templates defined:
* One template for a console port ("Console")
* Two templates for power ports ("PSU0" and "PSU1")
* 48 templates for 1GE interfaces ("ge-0/0/0" through "ge-0/0/47")
* Four templates for 10GE interfaces ("xe-0/2/0" through "xe-0/2/3")
Once component templates have been created, every new device that you create as an instance of this type will automatically be assigned each of the components listed above.
!!! note
Assignment of components from templates occurs only at the time of device creation. If you modify the templates of a device type, it will not affect devices which have already been created. However, you always have the option of adding, modifying, or deleting components on existing devices.
{!docs/models/dcim/consoleporttemplate.md!}
{!docs/models/dcim/consoleserverporttemplate.md!}
{!docs/models/dcim/powerporttemplate.md!}
{!docs/models/dcim/poweroutlettemplate.md!}
{!docs/models/dcim/interfacetemplate.md!}
{!docs/models/dcim/frontporttemplate.md!}
{!docs/models/dcim/rearporttemplate.md!}
{!docs/models/dcim/devicebaytemplate.md!}

View File

@@ -1,152 +1,27 @@
# Device Types
# Devices and Cabling
A device type represents a particular make and model of hardware that exists in the real world. Device types define the physical attributes of a device (rack height and depth) and its individual components (console, power, and network interfaces).
Device types are instantiated as devices installed within racks. For example, you might define a device type to represent a Juniper EX4300-48T network switch with 48 Ethernet interfaces. You can then create multiple devices of this type named "switch1," "switch2," and so on. Each device will inherit the components (such as interfaces) of its device type at the time of creation. (However, changes made to a device type will **not** apply to instances of that device type retroactively.)
Some devices house child devices which share physical resources, like space and power, but which functional independently from one another. A common example of this is blade server chassis. Each device type is designated as one of the following:
* A parent device (which has device bays)
* A child device (which must be installed in a device bay)
* Neither
!!! note
This parent/child relationship is **not** suitable for modeling chassis-based devices, wherein child members share a common control plane.
For that application you should create a single Device for the chassis, and add Interfaces directly to it. Interfaces can be created in bulk using range patterns, e.g. "Gi1/[1-24]".
Add Inventory Items if you want to record the line cards themselves as separate entities. There is no explicit relationship between each interface and its line card, but it may be implied by the naming (e.g. interfaces "Gi1/x" are on line card 1)
## Manufacturers
Each device type must be assigned to a manufacturer. The model number of a device type must be unique to its manufacturer.
## Component Templates
Each device type is assigned a number of component templates which define the physical components within a device. These are:
* Console ports
* Console server ports
* Power ports
* Power outlets
* Network interfaces
* Front ports
* Rear ports
* Device bays (which house child devices)
Whenever a new device is created, its components are automatically created per the templates assigned to its device type. For example, a Juniper EX4300-48T device type might have the following component templates defined:
* One template for a console port ("Console")
* Two templates for power ports ("PSU0" and "PSU1")
* 48 templates for 1GE interfaces ("ge-0/0/0" through "ge-0/0/47")
* Four templates for 10GE interfaces ("xe-0/2/0" through "xe-0/2/3")
Once component templates have been created, every new device that you create as an instance of this type will automatically be assigned each of the components listed above.
!!! note
Assignment of components from templates occurs only at the time of device creation. If you modify the templates of a device type, it will not affect devices which have already been created. However, you always have the option of adding, modifying, or deleting components on existing devices.
{!docs/models/dcim/device.md!}
{!docs/models/dcim/devicerole.md!}
{!docs/models/dcim/platform.md!}
---
# Devices
Every piece of hardware which is installed within a rack exists in NetBox as a device. Devices are measured in rack units (U) and can be half depth or full depth. A device may have a height of 0U: These devices do not consume vertical rack space and cannot be assigned to a particular rack unit. A common example of a 0U device is a vertically-mounted PDU.
When assigning a multi-U device to a rack, it is considered to be mounted in the lowest-numbered rack unit which it occupies. For example, a 3U device which occupies U8 through U10 is said to be mounted in U8. This logic applies to racks with both ascending and descending unit numbering.
A device is said to be full depth if its installation on one rack face prevents the installation of any other device on the opposite face within the same rack unit(s). This could be either because the device is physically too deep to allow a device behind it, or because the installation of an opposing device would impede airflow.
## Device Components
There are eight types of device components which comprise all of the interconnection logic with NetBox:
* Console ports
* Console server ports
* Power ports
* Power outlets
* Network interfaces
* Front ports
* Rear ports
* Device bays
### Console
Console ports connect only to console server ports. Console connections can be marked as either *planned* or *connected*.
### Power
Power ports connect only to power outlets. Power connections can be marked as either *planned* or *connected*.
### Interfaces
Interfaces connect to one another in a symmetric manner: If interface A connects to interface B, interface B therefore connects to interface A. Each type of connection can be classified as either *planned* or *connected*.
Each interface is a assigned a type denoting its physical properties. Two special types exist: the "virtual" type can be used to designate logical interfaces (such as SVIs), and the "LAG" type can be used to desinate link aggregation groups to which physical interfaces can be assigned.
Each interface can also be enabled or disabled, and optionally designated as management-only (for out-of-band management). Fields are also provided to store an interface's MTU and MAC address.
VLANs can be assigned to each interface as either tagged or untagged. (An interface may have only one untagged VLAN.)
### Pass-through Ports
Pass-through ports are used to model physical terminations which comprise part of a longer path, such as a cable terminated to a patch panel. Each front port maps to a position on a rear port. A 24-port UTP patch panel, for instance, would have 24 front ports and 24 rear ports. Although this relationship is typically one-to-one, a rear port may have multiple front ports mapped to it. This can be useful for modeling instances where multiple paths share a common cable (for example, six different fiber connections sharing a 12-strand MPO cable).
Pass-through ports can also be used to model "bump in the wire" devices, such as a media convertor or passive tap.
### Device Bays
Device bays represent the ability of a device to house child devices. For example, you might install four blade servers into a 2U chassis. The chassis would appear in the rack elevation as a 2U device with four device bays. Each server within it would be defined as a 0U device installed in one of the device bays. Child devices do not appear within rack elevations or the "Non-Racked Devices" list within the rack view.
Child devices are first-class Devices in their own right: that is, fully independent managed entities which don't share any control plane with the parent. Just like normal devices, child devices have their own platform (OS), role, tags, and interfaces. You cannot create a LAG between interfaces in different child devices.
Therefore, Device bays are **not** suitable for modeling chassis-based switches and routers. These should instead be modeled as a single Device, with the line cards as Inventory Items.
## Device Roles
Devices can be organized by functional roles. These roles are fully customizable. For example, you might create roles for core switches, distribution switches, and access switches.
{!docs/models/dcim/consoleport.md!}
{!docs/models/dcim/consoleserverport.md!}
{!docs/models/dcim/powerport.md!}
{!docs/models/dcim/poweroutlet.md!}
{!docs/models/dcim/interface.md!}
{!docs/models/dcim/frontport.md!}
{!docs/models/dcim/rearport.md!}
{!docs/models/dcim/devicebay.md!}
{!docs/models/dcim/inventoryitem.md!}
---
# Platforms
A platform defines the type of software running on a device or virtual machine. This can be helpful when it is necessary to distinguish between, for instance, different feature sets. Note that two devices of the same type may be assigned different platforms: for example, one Juniper MX240 running Junos 14 and another running Junos 15.
The platform model is also used to indicate which [NAPALM](https://napalm-automation.net/) driver 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.
{!docs/models/dcim/virtualchassis.md!}
---
# Inventory Items
Inventory items represent hardware components installed within a device, such as a power supply or CPU or line card. Currently, these are used merely for inventory tracking, although future development might see their functionality expand. Like device types, each item can optionally be assigned a manufacturer.
---
# Virtual Chassis
A virtual chassis represents a set of devices which share a single control plane: a stack of switches which are managed as a single device, for example. Each device in the virtual chassis is assigned a position and (optionally) a priority. Exactly one device is designated the virtual chassis master: This device will typically be assigned a name, secrets, services, and other attributes related to its management.
It's important to recognize the distinction between a virtual chassis and a chassis-based device. For instance, a virtual chassis is not used to model a chassis switch with removable line cards such as the Juniper EX9208, as its line cards are _not_ physically separate devices capable of operating independently.
---
# Cables
A cable represents a physical connection between two termination points, such as between a console port and a patch panel port, or between two network interfaces. Cables can be traced through pass-through ports to form a complete path between two endpoints. In the example below, three individual cables comprise a path between the two connected endpoints.
```
|<------------------------------------------ Cable Path ------------------------------------------->|
Device A Patch Panel A Patch Panel B Device B
+-----------+ +-------------+ +-------------+ +-----------+
| Interface | --- Cable --- | Front Port | | Front Port | --- Cable --- | Interface |
+-----------+ +-------------+ +-------------+ +-----------+
+-------------+ +-------------+
| Rear Port | --- Cable --- | Rear Port |
+-------------+ +-------------+
```
All connections between device components in NetBox are represented using cables. However, defining the actual cable plant is optional: Components can be be directly connected using cables with no type or other attributes assigned.
Cables are also used to associated ports and interfaces with circuit terminations. To do this, first create the circuit termination, then navigate the desired component and connect a cable between the two.
{!docs/models/dcim/cable.md!}

View File

@@ -1,93 +1,16 @@
# Aggregates
# IP Address Management
The first step to documenting your IP space is to define its scope by creating aggregates. Aggregates establish the root of your IP address hierarchy by defining the top-level allocations that you're interested in managing. Most organizations will want to track some commonly-used private IP spaces, such as:
* 10.0.0.0/8 (RFC 1918)
* 100.64.0.0/10 (RFC 6598)
* 172.16.0.0/12 (RFC 1918)
* 192.168.0.0/16 (RFC 1918)
* One or more /48s within fd00::/8 (IPv6 unique local addressing)
In addition to one or more of these, you'll want to create an aggregate for each globally-routable space your organization has been allocated. These aggregates should match the allocations recorded in public WHOIS databases.
Each IP prefix will be automatically arranged under its parent aggregate if one exists. Note that it's advised to create aggregates only for IP ranges actually allocated to your organization (or marked for private use): There is no need to define aggregates for provider-assigned space which is only used on Internet circuits, for example.
Aggregates cannot overlap with one another: They can only exist side-by-side. For instance, you cannot define both 10.0.0.0/8 and 10.16.0.0/16 as aggregates, because they overlap. 10.16.0.0/16 in this example would be created as a prefix and automatically grouped under 10.0.0.0/8. Remember, the purpose of aggregates is to establish the root of your IP addressing hierarchy.
## Regional Internet Registries (RIRs)
[Regional Internet registries](https://en.wikipedia.org/wiki/Regional_Internet_registry) are responsible for the allocation of globally-routable address space. The five RIRs are ARIN, RIPE, APNIC, LACNIC, and AFRINIC. However, some address space has been set aside for internal use, such as defined in RFCs 1918 and 6598. NetBox considers these RFCs as a sort of RIR as well; that is, an authority which "owns" certain address space. There also exist lower-tier registries which serve a particular geographic area.
Each aggregate must be assigned to one RIR. You are free to define whichever RIRs you choose (or create your own). The RIR model includes a boolean flag which indicates whether the RIR allocates only private IP space.
For example, suppose your organization has been allocated 104.131.0.0/16 by ARIN. It also makes use of RFC 1918 addressing internally. You would first create RIRs named ARIN and RFC 1918, then create an aggregate for each of these top-level prefixes, assigning it to its respective RIR.
{!docs/models/ipam/aggregate.md!}
{!docs/models/ipam/rir.md!}
---
# Prefixes
A prefix is an IPv4 or IPv6 network and mask expressed in CIDR notation (e.g. 192.0.2.0/24). A prefix entails only the "network portion" of an IP address: All bits in the address not covered by the mask must be zero. (In other words, a prefix cannot be a specific IP address.)
Prefixes are automatically arranged by their parent aggregates. Additionally, each prefix can be assigned to a particular site and VRF (routing table). All prefixes not assigned to a VRF will appear in the "global" table.
Each prefix can be assigned a status and a role. These terms are often used interchangeably so it's important to recognize the difference between them. The **status** defines a prefix's operational state. Statuses are hard-coded in NetBox and can be one of the following:
* Container - A summary of child prefixes
* Active - Provisioned and in use
* Reserved - Designated for future use
* Deprecated - No longer in use
On the other hand, a prefix's **role** defines its function. Role assignment is optional and roles are fully customizable. For example, you might create roles to differentiate between production and development infrastructure.
A prefix may also be assigned to a VLAN. This association is helpful for identifying which prefixes are included when reviewing a list of VLANs.
The prefix model include a "pool" flag. If enabled, NetBox will treat this prefix as a range (such as a NAT pool) wherein every IP address is valid and assignable. This logic is used for identifying available IP addresses within a prefix. If this flag is disabled, NetBox will assume that the first and last (broadcast) address within the prefix are unusable.
{!docs/models/ipam/prefix.md!}
---
# IP Addresses
An IP address comprises a single host address (either IPv4 or IPv6) and its subnet mask. Its mask should match exactly how the IP address is configured on an interface in the real world.
Like prefixes, an IP address can optionally be assigned to a VRF (otherwise, it will appear in the "global" table). IP addresses are automatically organized under parent prefixes within their respective VRFs.
Also like prefixes, each IP address can be assigned a status and a role. Statuses are hard-coded in NetBox and include the following:
* Active
* Reserved
* Deprecated
* DHCP
Each IP address can optionally be assigned a special role. Roles are used to indicate some special attribute of an IP address: for example, it is used as a loopback, or is a virtual IP maintained using VRRP. (Note that this differs in purpose from a _functional_ role, and thus cannot be customized.) Available roles include:
* Loopback
* Secondary
* Anycast
* VIP
* VRRP
* HSRP
* GLBP
An IP address can be assigned to a device or virtual machine interface, and an interface may have multiple IP addresses assigned to it. Further, each device and virtual machine may have one of its interface IPs designated as its primary IP address (one for IPv4 and one for IPv6).
## Network Address Translation (NAT)
An IP address can be designated as the network address translation (NAT) inside IP address for exactly one other IP address. This is useful primarily to denote a translation between public and private IP addresses. This relationship is followed in both directions: For example, if 10.0.0.1 is assigned as the inside IP for 192.0.2.1, 192.0.2.1 will be displayed as the outside IP for 10.0.0.1.
!!! note
NetBox does not support tracking one-to-many NAT relationships (also called port address translation). This type of policy requires additional logic to model and cannot be fully represented by IP address alone.
{!docs/models/ipam/ipaddress.md!}
---
# Virtual Routing and Forwarding (VRF)
A VRF object in NetBox represents a virtual routing and forwarding (VRF) domain. Each VRF is essentially a separate routing table. VRFs are commonly used to isolate customers or organizations from one another within a network, or to route overlapping address space (e.g. multiple instances of the 10.0.0.0/8 space).
Each VRF is assigned a unique name and an optional route distinguisher (RD). The RD is expected to take one of the forms prescribed in [RFC 4364](https://tools.ietf.org/html/rfc4364#section-4.2), however its formatting is not strictly enforced.
Each prefix and IP address may be assigned to one (and only one) VRF. If you have a prefix or IP address which exists in multiple VRFs, you will need to create a separate instance of it in NetBox for each VRF. Any IP prefix or address not assigned to a VRF is said to belong to the "global" table.
By default, NetBox will allow duplicate prefixes to be assigned to a VRF. This behavior can be disabled by setting the "enforce unique" flag on the VRF model.
!!! note
Enforcement of unique IP space can be toggled for global table (non-VRF prefixes) using the `ENFORCE_GLOBAL_UNIQUE` configuration setting.
{!docs/models/ipam/vrf.md!}

View File

@@ -0,0 +1,38 @@
# Power Tracking
{!docs/models/dcim/powerpanel.md!}
{!docs/models/dcim/powerfeed.md!}
# Example Power Topology
Below is a simple diagram demonstrating how power is modeled in NetBox.
!!! note
The power feeds are connected to the same power panel for illustrative purposes; usually, you would have such feeds diversely connected to panels to avoid the single point of failure.
```
+---------------+
| Power panel 1 |
+---------------+
| |
| |
+--------------+ +--------------+
| Power feed 1 | | Power feed 2 |
+--------------+ +--------------+
| |
| |
| | <-- Power ports
+---------+ +---------+
| PDU 1 | | PDU 2 |
+---------+ +---------+
| \ / | <-- Power outlets
| \ / |
| \ / |
| X |
| / \ |
| / \ |
| / \ | <-- Power ports
+--------+ +--------+
| Server | | Router |
+--------+ +--------+
```

View File

@@ -1,41 +1,8 @@
# Secrets
A secret represents a single credential or other sensitive string of characters which must be stored securely. Each secret is assigned to a device within NetBox. The plaintext value of a secret is encrypted to a ciphertext immediately prior to storage within the database using a 256-bit AES master key. A SHA256 hash of the plaintext is also stored along with each ciphertext to validate the decrypted plaintext.
Each secret can also store an optional name parameter, which is not encrypted. This may be useful for storing user names.
## Roles
Each secret is assigned a functional role which indicates what it is used for. Secret roles are customizable. Typical roles might include:
* Login credentials
* SNMP community strings
* RADIUS/TACACS+ keys
* IKE key strings
* Routing protocol shared secrets
Roles are also used to control access to secrets. Each role is assigned an arbitrary number of groups and/or users. Only the users associated with a role have permission to decrypt the secrets assigned to that role. (A superuser has permission to decrypt all secrets, provided they have an active user key.)
{!docs/models/secrets/secret.md!}
{!docs/models/secrets/secretrole.md!}
---
# User Keys
Each user within NetBox can associate his or her account with an RSA public key. If activated by an administrator, this user key will contain a unique, encrypted copy of the AES master key needed to retrieve secret data.
User keys may be created by users individually, however they are of no use until they have been activated by a user who already possesses an active user key.
## Creating the First User Key
When NetBox is first installed, it contains no encryption keys. Before it can store secrets, a user (typically the superuser) must create a user key. This can be done by navigating to Profile > User Key.
To create a user key, you can either generate a new RSA key pair, or upload the public key belonging to a pair you already have. If generating a new key pair, **you must save the private key** locally before saving your new user key. Once your user key has been created, its public key will be displayed under your profile.
When the first user key is created in NetBox, a random master encryption key is generated automatically. This key is then encrypted using the public key provided and stored as part of your user key. **The master key cannot be recovered** without your private key.
Once a user key has been assigned an encrypted copy of the master key, it is considered activated and can now be used to encrypt and decrypt secrets.
## Creating Additional User Keys
Any user can create his or her user key by generating or uploading a public RSA key. However, a user key cannot be used to encrypt or decrypt secrets until it has been activated with an encrypted copy of the master key.
Only an administrator with an active user key can activate other user keys. To do so, access the NetBox admin UI and navigate to Secrets > User Keys. Select the user key(s) to be activated, and select "activate selected user keys" from the actions dropdown. You will need to provide your private key in order to decrypt the master key. A copy of the master key is then encrypted using the public key associated with the user key being activated.
{!docs/models/secrets/userkey.md!}

View File

@@ -1,5 +1,3 @@
# Services
# Service Mapping
A service represents a layer four TCP or UDP service available on a device or virtual machine. For example, you might want to document that an HTTP service is running on a device. Each service includes a name, protocol, and port number; for example, "SSH (TCP/22)" or "DNS (UDP/53)."
A service may optionally be bound to one or more specific IP addresses belonging to its parent device or VM. (If no IP addresses are bound, the service is assumed to be reachable via any assigned IP address.)
{!docs/models/ipam/service.md!}

View File

@@ -1,49 +1,11 @@
# Sites
# Sites and Racks
How you choose to use sites will depend on the nature of your organization, but typically a site will equate to a building or campus. For example, a chain of banks might create a site to represent each of its branches, a site for its corporate headquarters, and two additional sites for its presence in two colocation facilities.
Each site must be assigned one of the following operational statuses:
* Active
* Planned
* Retired
The site model provides a facility ID field which can be used to annotate a facility ID (such as a datacenter name) associated with the site. Each site may also have an autonomous system (AS) number and time zone associated with it. (Time zones are provided by the [pytz](https://pypi.org/project/pytz/) package.)
The site model also includes several fields for storing contact and address information.
## Regions
Sites can be arranged geographically using regions. A region might represent a continent, country, city, campus, or other area depending on your use case. Regions can be nested recursively to construct a hierarchy. For example, you might define several country regions, and within each of those several state or city regions to which sites are assigned.
{!docs/models/dcim/site.md!}
{!docs/models/dcim/region.md!}
---
# Racks
The rack model represents a physical two- or four-post equipment rack in which equipment is mounted. Each rack must be assigned to a site. Rack height is measured in *rack units* (U); racks are commonly between 42U and 48U tall, but NetBox allows you to define racks of arbitrary height. A toggle is provided to indicate whether rack units are in ascending or descending order.
Each rack is assigned a name and (optionally) a separate facility ID. This is helpful when leasing space in a data center your organization does not own: The facility will often assign a seemingly arbitrary ID to a rack (for example, "M204.313") whereas internally you refer to is simply as "R113." A unique serial number may also be associated with each rack.
A rack must be designated as one of the following types:
* 2-post frame
* 4-post frame
* 4-post cabinet
* Wall-mounted frame
* Wall-mounted cabinet
Each rack has two faces (front and rear) on which devices can be mounted. Rail-to-rail width may be 19 or 23 inches.
## Rack Groups
Racks can be arranged into groups. As with sites, how you choose to designate rack groups will depend on the nature of your organization. For example, if each site represents a campus, each group might represent a building within a campus. If each site represents a building, each rack group might equate to a floor or room.
Each rack group must be assigned to a parent site. Hierarchical recursion of rack groups is not currently supported.
## Rack Roles
Each rack can optionally be assigned a functional role. For example, you might designate a rack for compute or storage resources, or to house colocated customer devices. Rack roles are fully customizable.
## Rack Space Reservations
Users can reserve units within a rack for future use. Multiple non-contiguous rack units can be associated with a single reservation (but reservations cannot span multiple racks). A rack reservation may optionally designate a specific tenant.
{!docs/models/dcim/rack.md!}
{!docs/models/dcim/rackgroup.md!}
{!docs/models/dcim/rackrole.md!}
{!docs/models/dcim/rackreservation.md!}

View File

@@ -1,20 +1,4 @@
# Tenants
# Tenancy Assignment
A tenant represents a discrete entity for administrative purposes. Typically, tenants are used to represent individual customers or internal departments within an organization. The following objects can be assigned to tenants:
* Sites
* Racks
* Rack reservations
* Devices
* VRFs
* Prefixes
* IP addresses
* VLANs
* Circuits
* Virtual machines
Tenant assignment is used to signify ownership of an object in NetBox. As such, each object may only be owned by a single tenant. For example, if you have a firewall dedicated to a particular customer, you would assign it to the tenant which represents that customer. However, if the firewall serves multiple customers, it doesn't *belong* to any particular customer, so tenant assignment would not be appropriate.
### Tenant Groups
Tenants can be organized by custom groups. For instance, you might create one group called "Customers" and one called "Acquisitions." The assignment of tenants to groups is optional.
{!docs/models/tenancy/tenant.md!}
{!docs/models/tenancy/tenantgroup.md!}

View File

@@ -1,27 +0,0 @@
# Clusters
A cluster is a logical grouping of physical resources within which virtual machines run. A cluster must be assigned a type, and may optionally be assigned to a group and/or site.
Physical devices may be associated with clusters as hosts. This allows users to track on which host(s) a particular VM may reside. However, NetBox does not support pinning a specific VM within a cluster to a particular host device.
## Cluster Types
A cluster type represents a technology or mechanism by which a cluster is formed. For example, you might create a cluster type named "VMware vSphere" for a locally hosted cluster or "DigitalOcean NYC3" for one hosted by a cloud provider.
## Cluster Groups
Cluster groups may be created for the purpose of organizing clusters. The assignment of clusters to groups is optional.
---
# Virtual Machines
A virtual machine represents a virtual compute instance hosted within a cluster. Each VM must be associated with exactly one cluster.
Like devices, each VM can be assigned a platform and have interfaces created on it. VM interfaces behave similarly to device interfaces, and can be assigned IP addresses, VLANs, and services. However, given their virtual nature, they cannot be connected to other interfaces. Unlike physical devices, VMs cannot be assigned console or power ports, device bays, or inventory items.
The following resources can be defined for each VM:
* vCPU count
* Memory (MB)
* Disk space (GB)

View File

@@ -0,0 +1,9 @@
# Virtual Machines and Clusters
{!docs/models/virtualization/cluster.md!}
{!docs/models/virtualization/clustertype.md!}
{!docs/models/virtualization/clustergroup.md!}
---
{!docs/models/virtualization/virtualmachine.md!}

View File

@@ -1,15 +1,4 @@
# VLANs
# VLAN Management
A VLAN represents an isolated layer two domain, identified by a name and a numeric ID (1-4094) as defined in [IEEE 802.1Q](https://en.wikipedia.org/wiki/IEEE_802.1Q). Each VLAN may be assigned to a site and/or VLAN group.
Each VLAN must be assigned one of the following operational statuses:
* Active
* Reserved
* Deprecated
Each VLAN may also be assigned a functional role. Prefixes and VLANs share the same set of customizable roles.
## VLAN Groups
VLAN groups can be used to organize VLANs within NetBox. Groups can also be used to enforce uniqueness: Each VLAN within a group must have a unique ID and name. VLANs which are not assigned to a group may have overlapping names and IDs (including VLANs which belong to a common site). For example, you can create two VLANs with ID 123, but they cannot both be assigned to the same group.
{!docs/models/ipam/vlan.md!}
{!docs/models/ipam/vlangroup.md!}

View File

@@ -0,0 +1,55 @@
# Application Registry
The registry is an in-memory data structure which houses various miscellaneous application-wide parameters, such as installed plugins. It is not exposed to the user and is not intended to be modified by any code outside of NetBox core.
The registry behaves essentially like a Python dictionary, with the notable exception that once a store (key) has been declared, it cannot be deleted or overwritten. The value of a store can, however, me modified; e.g. by appending a value to a list. Store values generally do not change once the application has been initialized.
## Stores
### `model_features`
A dictionary of particular features (e.g. custom fields) mapped to the NetBox models which support them, arranged by app. For example:
```python
{
'custom_fields': {
'circuits': ['provider', 'circuit'],
'dcim': ['site', 'rack', 'devicetype', ...],
...
},
'webhooks': {
...
},
...
}
```
### `plugin_menu_items`
Navigation menu items provided by NetBox plugins. Each plugin is registered as a key with the list of menu items it provides. An example:
```python
{
'Plugin A': (
<MenuItem>, <MenuItem>, <MenuItem>,
),
'Plugin B': (
<MenuItem>, <MenuItem>, <MenuItem>,
),
}
```
### `plugin_template_extensions`
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:
```python
{
'dcim.site': [
<TemplateExtension>, <TemplateExtension>, <TemplateExtension>,
],
'dcim.rack': [
<TemplateExtension>, <TemplateExtension>,
],
}
```

View File

@@ -2,7 +2,7 @@
Below is a list of items to consider when adding a new field to a model:
### 1. Generate and run database migration
## 1. Generate and run database migration
Django migrations are used to express changes to the database schema. In most cases, Django can generate these automatically, however very complex changes may require manual intervention. Always remember to specify a short but descriptive name when generating a new migration.
@@ -16,7 +16,7 @@ Where possible, try to merge related changes into a single migration. For exampl
!!! note
Migrations can only be merged within a release. Once a new release has been published, its migrations cannot be altered.
### 2. Add validation logic to `clean()`
## 2. Add validation logic to `clean()`
If the new field introduces additional validation requirements (beyond what's included with the field itself), implement them in the model's `clean()` method. Remember to call the model's original method using `super()` before or agter your custom validation as appropriate:
@@ -32,23 +32,23 @@ class Foo(models.Model):
raise ValidationError()
```
### 3. Add CSV helpers
## 3. Add CSV helpers
Add the name of the new field to `csv_headers` and included a CSV-friendly representation of its data in the model's `to_csv()` method. These will be used when exporting objects in CSV format.
### 4. Update relevant querysets
## 4. Update relevant querysets
If you're adding a relational field (e.g. `ForeignKey`) and intend to include the data when retreiving a list of objects, be sure to include the field using `prefetch_related()` as appropriate. This will optimize the view and avoid excessive database lookups.
### 5. Update API serializer
## 5. Update API serializer
Extend the model's API serializer in `<app>.api.serializers` to include the new field. In most cases, it will not be necessary to also extend the nested serializer, which produces a minimal represenation of the model.
### 6. Add choices to API view
## 6. Add choices to API view
If the new field has static choices, add it to the `FieldChoicesViewSet` for the app.
### 7. Add field to forms
## 7. Add field to forms
Extend any forms to include the new field as appropriate. Common forms include:
@@ -57,18 +57,26 @@ Extend any forms to include the new field as appropriate. Common forms include:
* **CSV import** - The form used when bulk importing objects in CSV format
* **Filter** - Displays the options available for filtering a list of objects (both UI and API)
### 8. Extend object filter set
## 8. Extend object filter set
If the new field should be filterable, add it to the `FilterSet` for the model. If the field should be searchable, remember to reference it in the FilterSet's `search()` method.
### 9. Add column to object table
## 9. Add column to object table
If the new field will be included in the object list view, add a column to the model's table. For simple fields, adding the field name to `Meta.fields` will be sufficient. More complex fields may require explicitly declaring a new column.
### 10. Update the UI templates
## 10. Update the UI templates
Edit the object's view template to display the new field. There may also be a custom add/edit form template that needs to be updated.
### 11. Adjust API and model tests
## 11. Create/extend test cases
Extend the model and/or API tests to verify that the new field and any accompanying validation logic perform as expected. This is especially important for relational fields.
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:
* API serializer/view tests
* Filter tests
* Form tests
* Model tests
* View tests
Be diligent to ensure all of the relevant test suites are adapted or extended as necessary to test any new functionality.

View File

@@ -1,6 +1,8 @@
# Minor Version Bumps
# Release Checklist
## Update Requirements
## Minor Version Bumps
### Update Requirements
Required Python packages are maintained in two files. `base_requirements.txt` contains a list of all the packages required by NetBox. Some of them may be pinned to a specific version of the package due to a known issue. For example:
@@ -23,7 +25,7 @@ pip install -U -r base_requirements.txt
3. Run all tests and check that the UI and API function as expected.
4. Update the package versions in `requirements.txt` as appropriate.
## Update Static Libraries
### Update Static Libraries
Update the following static libraries to their most recent stable release:
@@ -33,37 +35,37 @@ Update the following static libraries to their most recent stable release:
* jQuery
* jQuery UI
## Create a new Release Notes Page
### Create a new Release Notes Page
Create a file at `/docs/release-notes/X.Y.md` to establish the release notes for the new release. Add the file to the table of contents within `mkdocs.yml`.
Create a file at `/docs/release-notes/X.Y.md` to establish the release notes for the new release. Add the file to the table of contents within `mkdocs.yml`, and point `index.md` to the new file.
## Manually Perform a New Install
### Manually Perform a New Install
Create a new installation of NetBox by following [the current documentation](http://netbox.readthedocs.io/en/latest/). This should be a manual process, so that issues with the documentation can be identified and corrected.
## Close the Release Milestone
### Close the Release Milestone
Close the release milestone on GitHub. Ensure that there are no remaining open issues associated with it.
---
# All Releases
## All Releases
## Verify CI Build Status
### Verify CI Build Status
Ensure that continuous integration testing on the `develop` branch is completing successfully.
## Update Version and Changelog
### Update Version and Changelog
Update the `VERSION` constant in `settings.py` to the new release version and annotate the current data in the release notes for the new version.
## Submit a Pull Request
### Submit a Pull Request
Submit a pull request title **"Release vX.Y.X"** to merge the `develop` branch into `master`. Include a brief change log listing the features, improvements, and/or bugs addressed in the release.
Submit a pull request title **"Release vX.Y.Z"** to merge the `develop` branch into `master`. Include a brief change log listing the features, improvements, and/or bugs addressed in the release.
Once CI has completed on the PR, merge it.
## Create a New Release
### Create a New Release
Draft a [new release](https://github.com/netbox-community/netbox/releases/new) with the following parameters.
@@ -73,7 +75,7 @@ Draft a [new release](https://github.com/netbox-community/netbox/releases/new) w
Copy the description from the pull request into the release notes.
## Update the Development Version
### Update the Development Version
On the `develop` branch, update `VERSION` in `settings.py` to point to the next release. For example, if you just released v2.3.4, set:
@@ -81,6 +83,6 @@ On the `develop` branch, update `VERSION` in `settings.py` to point to the next
VERSION = 'v2.3.5-dev'
```
## Announce the Release
### Announce the Release
Announce the release on the [mailing list](https://groups.google.com/forum/#!forum/netbox-discuss). Include a link to the release and the (HTML-formatted) release notes.

View File

@@ -1,6 +1,6 @@
# Style Guide
NetBox generally follows the [Django style guide](https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/coding-style/), which is itself based on [PEP 8](https://www.python.org/dev/peps/pep-0008/). [Pycodestyle](https://github.com/pycqa/pycodestyle) is used to validate code formatting, ignoring certain violations. See `scripts/cibuild.sh`.
NetBox generally follows the [Django style guide](https://docs.djangoproject.com/en/stable/internals/contributing/writing-code/coding-style/), which is itself based on [PEP 8](https://www.python.org/dev/peps/pep-0008/). [Pycodestyle](https://github.com/pycqa/pycodestyle) is used to validate code formatting, ignoring certain violations. See `scripts/cibuild.sh`.
## PEP 8 Exceptions
@@ -32,7 +32,7 @@ pycodestyle --ignore=W504,E501 netbox/
The introduction of a new dependency is best avoided unless it is absolutely necessary. For small features, it's generally preferable to replicate functionality within the NetBox code base rather than to introduce reliance on an external project. This reduces both the burden of tracking new releases and our exposure to outside bugs and attacks.
If there's a strong case for introducing a new depdency, it must meet the following criteria:
If there's a strong case for introducing a new dependency, it must meet the following criteria:
* Its complete source code must be published and freely accessible without registration.
* Its license must be conducive to inclusion in an open source project.
@@ -45,10 +45,18 @@ When adding a new dependency, a short description of the package and the URL of
* When in doubt, remain consistent: It is better to be consistently incorrect than inconsistently correct. If you notice in the course of unrelated work a pattern that should be corrected, continue to follow the pattern for now and open a bug so that the entire code base can be evaluated at a later point.
* Prioritize readability over concision. Python is a very flexible language that typically gives us several options for expressing a given piece of logic, but some may be more friendly to the reader than others. (List comprehensions are particularly vulnerable to over-optimization.) Always remain considerate of the future reader who may need to interpret your code without the benefit of the context within which you are writing it.
* No easter eggs. While they can be fun, NetBox must be considered as a business-critical tool. The potential, however minor, for introducing a bug caused by unnecessary logic is best avoided entirely.
* Constants (variables which generally do not change) should be declared in `constants.py` within each app. Wildcard imports from the file are acceptable.
* Every model should have a docstring. Every custom method should include an expalantion of its function.
* Every model should have a docstring. Every custom method should include an explanation of its function.
* Nested API serializers generate minimal representations of an object. These are stored separately from the primary serializers to avoid circular dependencies. Always import nested serializers from other apps directly. For example, from within the DCIM app you would write `from ipam.api.nested_serializers import NestedIPAddressSerializer`.
## Branding
* When referring to NetBox in writing, use the proper form "NetBox," with the letters N and B capitalized. The lowercase form "netbox" should be used in code, filenames, etc. But never "Netbox" or any other deviation.
* There is an SVG form of the NetBox logo at [docs/netbox_logo.svg](../netbox_logo.svg). It is preferred to use this logo for all purposes as it scales to arbitrary sizes without loss of resolution. If a raster image is required, the SVG logo should be converted to a PNG image of the prescribed size.

View File

@@ -0,0 +1,11 @@
# User Preferences
The `users.UserConfig` model holds individual preferences for each user in the form of JSON data. This page serves as a manifest of all recognized user preferences in NetBox.
## Available Preferences
| Name | Description |
| ---- | ----------- |
| extras.configcontext.format | Preferred format when rendering config context data (JSON or YAML) |
| pagination.per_page | The number of items to display per page of a paginated table |
| tables.${table_name}.columns | The ordered list of columns to display when viewing the table |

19
docs/extra.css Normal file
View File

@@ -0,0 +1,19 @@
/* Images */
img {
display: block;
margin-left: auto;
margin-right: auto;
}
/* Tables */
table {
margin-bottom: 24px;
width: 100%;
}
th {
background-color: #f0f0f0;
padding: 6px;
}
td {
padding: 6px;
}

View File

@@ -1,4 +1,4 @@
![NetBox](netbox_logo.png "NetBox logo")
![NetBox](netbox_logo.svg "NetBox logo")
# What is NetBox?
@@ -12,7 +12,7 @@ NetBox is an open source web application designed to help manage and document co
* **Data circuits** - Long-haul communications circuits and providers
* **Secrets** - Encrypted storage of sensitive credentials
# What NetBox Is Not
## What NetBox Is Not
While NetBox strives to cover many areas of network management, the scope of its feature set is necessarily limited. This ensures that development focuses on core functionality and that scope creep is reasonably contained. To that end, it might help to provide some examples of functionality that NetBox **does not** provide:
@@ -24,23 +24,23 @@ While NetBox strives to cover many areas of network management, the scope of its
That said, NetBox _can_ be used to great effect in populating external tools with the data they need to perform these functions.
# Design Philosophy
## Design Philosophy
NetBox was designed with the following tenets foremost in mind.
## Replicate the Real World
### Replicate the Real World
Careful consideration has been given to the data model to ensure that it can accurately reflect a real-world network. For instance, IP addresses are assigned not to devices, but to specific interfaces attached to a device, and an interface may have multiple IP addresses assigned to it.
## Serve as a "Source of Truth"
### Serve as a "Source of Truth"
NetBox intends to represent the _desired_ state of a network versus its _operational_ state. As such, automated import of live network state is strongly discouraged. All data created in NetBox should first be vetted by a human to ensure its integrity. NetBox can then be used to populate monitoring and provisioning systems with a high degree of confidence.
## Keep it Simple
### Keep it Simple
When given a choice between a relatively simple [80% solution](https://en.wikipedia.org/wiki/Pareto_principle) and a much more complex complete solution, the former will typically be favored. This ensures a lean codebase with a low learning curve.
# Application Stack
## Application Stack
NetBox is built on the [Django](https://djangoproject.com/) Python framework and utilizes a [PostgreSQL](https://www.postgresql.org/) database. It runs as a WSGI service behind your choice of HTTP server.
@@ -53,6 +53,10 @@ NetBox is built on the [Django](https://djangoproject.com/) Python framework and
| Task queuing | Redis/django-rq |
| Live device access | NAPALM |
# Getting Started
## Supported Python Versions
NetBox supports Python 3.6 and 3.7 environments currently. (Support for Python 3.5 was removed in NetBox v2.8.)
## Getting Started
See the [installation guide](installation/index.md) for help getting NetBox up and running quickly.

View File

@@ -1,14 +1,15 @@
NetBox requires a PostgreSQL database to store data. This can be hosted locally or on a remote server. (Please note that MySQL is not supported, as NetBox leverages PostgreSQL's built-in [network address types](https://www.postgresql.org/docs/current/static/datatype-net-types.html).)
# PostgreSQL Database Installation
!!! note
The installation instructions provided here have been tested to work on Ubuntu 18.04 and CentOS 7.5. 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.
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
NetBox v2.2 and later requires PostgreSQL 9.4 or higher.
NetBox requires PostgreSQL 9.4 or higher. Please note that MySQL and other relational databases are **not** supported.
# Installation
The installation instructions provided here have been tested to work on Ubuntu 18.04 and CentOS 7.5. 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.
**Ubuntu**
## Installation
#### Ubuntu
If a recent enough version of PostgreSQL is not available through your distribution's package manager, you'll need to install it from an official [PostgreSQL repository](https://wiki.postgresql.org/wiki/Apt).
@@ -17,13 +18,13 @@ If a recent enough version of PostgreSQL is not available through your distribut
# apt-get install -y postgresql libpq-dev
```
**CentOS**
#### CentOS
CentOS 7.5 does not ship with a recent enough version of PostgreSQL, so it will need to be installed from an external repository. The instructions below show the installation of PostgreSQL 9.6.
CentOS 7.5 does not ship with a recent enough version of PostgreSQL, so it will need to be installed from an external repository. The instructions below show the installation of PostgreSQL 9.6, however you may opt to install a more recent version.
```no-highlight
# yum install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm
# yum install postgresql96 postgresql96-server postgresql96-devel
# yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
# yum install -y postgresql96 postgresql96-server postgresql96-devel
# /usr/pgsql-9.6/bin/postgresql96-setup initdb
```
@@ -41,7 +42,7 @@ Then, start the service and enable it to run at boot:
# systemctl enable postgresql-9.6
```
# Database Creation
## Database Creation
At a minimum, we need to create a database for NetBox and assign it a username and password for authentication. This is done with the following commands.
@@ -62,6 +63,8 @@ GRANT
postgres=# \q
```
## Verify Service Status
You can verify that authentication works issuing the following command and providing the configured password. (Replace `localhost` with your database server if using a remote database.)
```no-highlight

View File

@@ -0,0 +1,31 @@
# Redis Installation
## Install Redis
[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).
### Ubuntu
```no-highlight
# apt-get install -y redis-server
```
### CentOS
```no-highlight
# yum install -y epel-release
# yum install -y redis
# systemctl start redis
# systemctl enable redis
```
You may wish to modify the Redis configuration at `/etc/redis.conf` or `/etc/redis/redis.conf`, however in most cases the default configuration is sufficient.
## Verify Service Status
Use the `redis-cli` utility to ensure the Redis service is functional:
```no-highlight
$ redis-cli ping
PONG
```

View File

@@ -1,152 +0,0 @@
We'll set up a simple WSGI front end using [gunicorn](http://gunicorn.org/) for the purposes of this guide. For web servers, we provide example configurations for both [nginx](https://www.nginx.com/resources/wiki/) and [Apache](http://httpd.apache.org/docs/2.4). (You are of course free to use whichever combination of HTTP and WSGI services you'd like.) We'll also use [supervisord](http://supervisord.org/) to enable service persistence.
!!! info
For the sake of brevity, only Ubuntu 18.04 instructions are provided here, but this sort of web server and WSGI configuration is not unique to NetBox. Please consult your distribution's documentation for assistance if needed.
# Web Server Installation
## Option A: nginx
The following will serve as a minimal nginx configuration. Be sure to modify your server name and installation path appropriately.
```no-highlight
# apt-get install -y nginx
```
Once nginx is installed, save the following configuration to `/etc/nginx/sites-available/netbox`. Be sure to replace `netbox.example.com` with the domain name or IP address of your installation. (This should match the value configured for `ALLOWED_HOSTS` in `configuration.py`.)
```nginx
server {
listen 80;
server_name netbox.example.com;
client_max_body_size 25m;
location /static/ {
alias /opt/netbox/netbox/static/;
}
location / {
proxy_pass http://127.0.0.1:8001;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
add_header P3P 'CP="ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV"';
}
}
```
Then, delete `/etc/nginx/sites-enabled/default` and create a symlink in the `sites-enabled` directory to the configuration file you just created.
```no-highlight
# cd /etc/nginx/sites-enabled/
# rm default
# ln -s /etc/nginx/sites-available/netbox
```
Restart the nginx service to use the new configuration.
```no-highlight
# service nginx restart
```
To enable SSL, consider this guide on [securing nginx with Let's Encrypt](https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04).
## Option B: Apache
```no-highlight
# apt-get install -y apache2 libapache2-mod-wsgi-py3
```
Once Apache is installed, proceed with the following configuration (Be sure to modify the `ServerName` appropriately):
```apache
<VirtualHost *:80>
ProxyPreserveHost On
ServerName netbox.example.com
Alias /static /opt/netbox/netbox/static
# Needed to allow token-based API authentication
WSGIPassAuthorization on
<Directory /opt/netbox/netbox/static>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Require all granted
</Directory>
<Location /static>
ProxyPass !
</Location>
RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
ProxyPass / http://127.0.0.1:8001/
ProxyPassReverse / http://127.0.0.1:8001/
</VirtualHost>
```
Save the contents of the above example in `/etc/apache2/sites-available/netbox.conf`, enable the `proxy` and `proxy_http` modules, and reload Apache:
```no-highlight
# a2enmod proxy
# a2enmod proxy_http
# a2enmod headers
# a2ensite netbox
# service apache2 restart
```
To enable SSL, consider this guide on [securing Apache with Let's Encrypt](https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-16-04).
# gunicorn Installation
Install gunicorn:
```no-highlight
# pip3 install gunicorn
```
Save the following configuration in the root netbox installation path as `gunicorn_config.py` (e.g. `/opt/netbox/gunicorn_config.py` per our example installation). Be sure to verify the location of the gunicorn executable on your server (e.g. `which gunicorn`) and to update the `pythonpath` variable if needed. If using CentOS/RHEL, change the username from `www-data` to `nginx` or `apache`.
```no-highlight
command = '/usr/bin/gunicorn'
pythonpath = '/opt/netbox/netbox'
bind = '127.0.0.1:8001'
workers = 3
user = 'www-data'
```
# supervisord Installation
Install supervisor:
```no-highlight
# apt-get install -y supervisor
```
Save the following as `/etc/supervisor/conf.d/netbox.conf`. Update the `command` and `directory` paths as needed. If using CentOS/RHEL, change the username from `www-data` to `nginx` or `apache`.
```no-highlight
[program:netbox]
command = gunicorn -c /opt/netbox/gunicorn_config.py netbox.wsgi
directory = /opt/netbox/netbox/
user = www-data
[program:netbox-rqworker]
command = python3 /opt/netbox/netbox/manage.py rqworker
directory = /opt/netbox/netbox/
user = www-data
```
Then, restart the supervisor service to detect and run the gunicorn service:
```no-highlight
# service supervisor restart
```
At this point, you should be able to connect to the nginx HTTP service at the server name or IP address you provided. If you are unable to connect, check that the nginx service is running and properly configured. If you receive a 502 (bad gateway) error, this indicates that gunicorn is misconfigured or not running.
!!! info
Please keep in mind that the configurations provided here are bare minimums required to get NetBox up and running. You will almost certainly want to make some changes to better suit your production environment.

View File

@@ -1,25 +1,29 @@
# Installation
# NetBox Installation
This section of the documentation discusses installing and configuring the NetBox application. Begin by installing all system packages required by NetBox and its dependencies:
This section of the documentation discusses installing and configuring the NetBox application itself.
**Ubuntu**
## Install System Packages
Begin by installing all system packages required by NetBox and its dependencies. Note that beginning with NetBox v2.8, Python 3.6 or later is required.
### Ubuntu
```no-highlight
# apt-get install -y python3 python3-pip python3-dev build-essential libxml2-dev libxslt1-dev libffi-dev graphviz libpq-dev libssl-dev redis-server zlib1g-dev
# apt-get install -y python3.6 python3-pip python3-venv python3-dev build-essential libxml2-dev libxslt1-dev libffi-dev libpq-dev libssl-dev zlib1g-dev
```
**CentOS**
### CentOS
```no-highlight
# yum install -y epel-release
# yum install -y gcc python36 python36-devel python36-setuptools libxml2-devel libxslt-devel libffi-devel graphviz openssl-devel redhat-rpm-config redis
# yum install -y gcc python36 python36-devel python36-setuptools libxml2-devel libxslt-devel libffi-devel openssl-devel redhat-rpm-config
# easy_install-3.6 pip
# ln -s /usr/bin/python36 /usr/bin/python3
```
## Download NetBox
You may opt to install NetBox either from a numbered release or by cloning the master branch of its repository on GitHub.
## Option A: Download a Release
### Option A: Download a Release
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`.
@@ -31,7 +35,7 @@ Download the [latest stable release](https://github.com/netbox-community/netbox/
# cd /opt/netbox/
```
## Option B: Clone the Git Repository
### Option B: Clone the Git Repository
Create the base directory for the NetBox installation. For this guide, we'll use `/opt/netbox`.
@@ -41,13 +45,13 @@ Create the base directory for the NetBox installation. For this guide, we'll use
If `git` is not already installed, install it:
**Ubuntu**
#### Ubuntu
```no-highlight
# apt-get install -y git
```
**CentOS**
#### CentOS
```no-highlight
# yum install -y git
@@ -66,37 +70,68 @@ Resolving deltas: 100% (1495/1495), done.
Checking connectivity... done.
```
!!! warning
Ensure that the media directory (`/opt/netbox/netbox/media/` in this example) and all its subdirectories are writable by the user account as which NetBox runs. If the NetBox process does not have permission to write to this directory, attempts to upload files (e.g. image attachments) will fail. (The appropriate user account will vary by platform.)
## Create the NetBox User
`# chown -R netbox:netbox /opt/netbox/netbox/media/`
# Install Python Packages
Install the required Python packages using pip. (If you encounter any compilation errors during this step, ensure that you've installed all of the system dependencies listed above.)
```no-highlight
# pip3 install -r requirements.txt
```
Create a system user account named `netbox`. We'll configure the WSGI and HTTP services to run under this account. We'll also assign this user ownership of the media directory. This ensures that NetBox will be able to save local files.
!!! note
If you encounter errors while installing the required packages, check that you're running a recent version of pip (v9.0.1 or higher) with the command `pip3 -V`.
CentOS users may need to create the `netbox` group first.
## NAPALM Automation (Optional)
NetBox supports integration with the [NAPALM automation](https://napalm-automation.net/) library. NAPALM allows NetBox to fetch live data from devices and return it to a requester via its REST API. Installation of NAPALM is optional. To enable it, install the `napalm` package using pip or pip3:
```no-highlight
# pip3 install napalm
```
# adduser --system --group netbox
# chown --recursive netbox /opt/netbox/netbox/media/
```
# Configuration
## Set Up Python Environment
We'll use a Python [virtual environment](https://docs.python.org/3.6/tutorial/venv.html) to ensure NetBox's required packages don't conflict with anything in the base system. This will create a directory named `venv` in our NetBox root.
```no-highlight
# python3 -m venv /opt/netbox/venv
```
Next, activate the virtual environment and install the required Python packages. You should see your console prompt change to indicate the active environment. (Activating the virtual environment updates your command shell to use the local copy of Python that we just installed for NetBox instead of the system's Python interpreter.)
```no-highlight
# source venv/bin/activate
(venv) # pip3 install -r requirements.txt
```
### NAPALM Automation (Optional)
NetBox supports integration with the [NAPALM automation](https://napalm-automation.net/) library. NAPALM allows NetBox to fetch live data from devices and return it to a requester via its REST API. Installation of NAPALM is optional. To enable it, install the `napalm` package:
```no-highlight
(venv) # pip3 install napalm
```
To ensure NAPALM is automatically re-installed during future upgrades, create a file named `local_requirements.txt` in the NetBox root directory (alongside `requirements.txt`) and list the `napalm` package:
```no-highlight
# echo napalm >> local_requirements.txt
```
### Remote File Storage (Optional)
By default, NetBox will use the local filesystem to storage uploaded files. To use a remote filesystem, install the [`django-storages`](https://django-storages.readthedocs.io/en/stable/) library and configure your [desired backend](../../configuration/optional-settings/#storage_backend) in `configuration.py`.
```no-highlight
(venv) # pip3 install django-storages
```
Don't forget to add the `django-storages` package to `local_requirements.txt` to ensure it gets re-installed during future upgrades:
```no-highlight
# echo django-storages >> local_requirements.txt
```
## Configuration
Move into the NetBox configuration directory and make a copy of `configuration.example.py` named `configuration.py`.
```no-highlight
# cd netbox/netbox/
# cp configuration.example.py configuration.py
(venv) # cd netbox/netbox/
(venv) # cp configuration.example.py configuration.py
```
Open `configuration.py` with your preferred editor and set the following variables:
@@ -106,7 +141,7 @@ Open `configuration.py` with your preferred editor and set the following variabl
* `REDIS`
* `SECRET_KEY`
## ALLOWED_HOSTS
### ALLOWED_HOSTS
This is a list of the valid hostnames by which this server can be reached. You must specify at least one name or IP address.
@@ -116,7 +151,7 @@ Example:
ALLOWED_HOSTS = ['netbox.example.com', '192.0.2.123']
```
## DATABASE
### DATABASE
This parameter holds the database configuration details. You must define the username and password used when you configured PostgreSQL. If the service is running on a remote host, replace `localhost` with its address. See the [configuration documentation](../../configuration/required-settings/#database) for more detail on individual parameters.
@@ -129,26 +164,36 @@ DATABASE = {
'PASSWORD': 'J5brHrAXFLQSif0K', # PostgreSQL password
'HOST': 'localhost', # Database server
'PORT': '', # Database port (leave blank for default)
'CONN_MAX_AGE': 300, # Max database connection age
}
```
## REDIS
### REDIS
Redis is a in-memory key-value store required as part of the NetBox installation. It is used for features such as webhooks and caching. Redis typically requires minimal configuration; the values below should suffice for most installations. See the [configuration documentation](../../configuration/required-settings/#redis) for more detail on individual parameters.
```python
REDIS = {
'HOST': 'localhost',
'PORT': 6379,
'PASSWORD': '',
'DATABASE': 0,
'CACHE_DATABASE': 1,
'DEFAULT_TIMEOUT': 300,
'SSL': False,
'tasks': {
'HOST': 'redis.example.com',
'PORT': 1234,
'PASSWORD': 'foobar',
'DATABASE': 0,
'DEFAULT_TIMEOUT': 300,
'SSL': False,
},
'caching': {
'HOST': 'localhost',
'PORT': 6379,
'PASSWORD': '',
'DATABASE': 1,
'DEFAULT_TIMEOUT': 300,
'SSL': False,
}
}
```
## SECRET_KEY
### SECRET_KEY
Generate a random secret key of at least 50 alphanumeric characters. This key must be unique to this installation and must not be shared outside the local system.
@@ -157,13 +202,13 @@ You may use the script located at `netbox/generate_secret_key.py` to generate a
!!! note
In the case of a highly available installation with multiple web servers, `SECRET_KEY` must be identical among all servers in order to maintain a persistent user session state.
# Run Database Migrations
## Run Database Migrations
Before NetBox can run, we need to install the database schema. This is done by running `python3 manage.py migrate` from the `netbox` directory (`/opt/netbox/netbox/` in our example):
```no-highlight
# cd /opt/netbox/netbox/
# python3 manage.py migrate
(venv) # cd /opt/netbox/netbox/
(venv) # python3 manage.py migrate
Operations to perform:
Apply all migrations: dcim, sessions, admin, ipam, utilities, auth, circuits, contenttypes, extras, secrets, users
Running migrations:
@@ -176,12 +221,12 @@ Running migrations:
If this step results in a PostgreSQL authentication error, ensure that the username and password created in the database match what has been specified in `configuration.py`
# Create a Super User
## Create a Super User
NetBox does not come with any predefined user accounts. You'll need to create a super user to be able to log into NetBox:
```no-highlight
# python3 manage.py createsuperuser
(venv) # python3 manage.py createsuperuser
Username: admin
Email address: admin@example.com
Password:
@@ -189,40 +234,20 @@ Password (again):
Superuser created successfully.
```
# Collect Static Files
## Collect Static Files
```no-highlight
# python3 manage.py collectstatic --no-input
(venv) # python3 manage.py collectstatic --no-input
You have requested to collect static files at the destination
location as specified in your settings:
/opt/netbox/netbox/static
This will overwrite existing files!
Are you sure you want to do this?
Type 'yes' to continue, or 'no' to cancel: yes
959 static files copied to '/opt/netbox/netbox/static'.
```
# Load Initial Data (Optional)
NetBox ships with some initial data to help you get started: RIR definitions, common devices roles, etc. You can delete any seed data that you don't want to keep.
!!! note
This step is optional. It's perfectly fine to start using NetBox without using this initial data if you'd rather create everything from scratch.
```no-highlight
# python3 manage.py loaddata initial_data
Installed 43 object(s) from 4 fixture(s)
```
# Test the Application
## Test the Application
At this point, NetBox should be able to run. We can verify this by starting a development instance:
```no-highlight
# python3 manage.py runserver 0.0.0.0:8000 --insecure
(venv) # python3 manage.py runserver 0.0.0.0:8000 --insecure
Performing system checks...
System check identified no issues (0 silenced).
@@ -236,3 +261,11 @@ Next, connect to the name or IP of the server (as defined in `ALLOWED_HOSTS`) on
!!! warning
If the test service does not run, or you cannot reach the NetBox home page, something has gone wrong. Do not proceed with the rest of this guide until the installation has been corrected.
Note that the initial UI will be locked down for non-authenticated users.
![NetBox UI as seen by a non-authenticated user](../media/installation/netbox_ui_guest.png)
After logging in as the superuser you created earlier, all areas of the UI will be available.
![NetBox UI as seen by an administrator](../media/installation/netbox_ui_admin.png)

View File

@@ -0,0 +1,135 @@
# HTTP Server Setup
We'll set up a simple WSGI front end using [gunicorn](http://gunicorn.org/) for the purposes of this guide. For web servers, we provide example configurations for both [nginx](https://www.nginx.com/resources/wiki/) and [Apache](http://httpd.apache.org/docs/2.4). (You are of course free to use whichever combination of HTTP and WSGI services you'd like.) We'll use systemd to enable service persistence.
!!! info
For the sake of brevity, only Ubuntu 18.04 instructions are provided here, but this sort of web server and WSGI configuration is not unique to NetBox. Please consult your distribution's documentation for assistance if needed.
## Obtain an SSL Certificate
To enable HTTPS access to NetBox, you'll need a valid SSL certificate. You can purchase one from a trusted commercial provider, obtain one for free from [Let's Encrypt](https://letsencrypt.org/getting-started/), or generate your own (although self-signed certificates are generally untrusted). Both the public certificate and private key files need to be installed on your NetBox server in a location that is readable by the `netbox` user.
The command below can be used to generate a self-signed certificate for testing purposes, however it is strongly recommended to use a certificate from a trusted authority in production. Two files will be created: the public certificate (`netbox.crt`) and the private key (`netbox.key`). The certificate is published to the world, whereas the private key must be kept secret at all times.
```no-highlight
# openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
-keyout /etc/ssl/private/netbox.key \
-out /etc/ssl/certs/netbox.crt
```
## HTTP Daemon Installation
### Option A: nginx
The following will serve as a minimal nginx configuration. Be sure to modify your server name and installation path appropriately.
```no-highlight
# apt-get install -y nginx
```
Once nginx is installed, copy the default nginx configuration file to `/etc/nginx/sites-available/netbox`. Be sure to replace `netbox.example.com` with the domain name or IP address of your installation. (This should match the value configured for `ALLOWED_HOSTS` in `configuration.py`.)
```no-highlight
# cp /opt/netbox/contrib/nginx.conf /etc/nginx/sites-available/netbox
```
Then, delete `/etc/nginx/sites-enabled/default` and create a symlink in the `sites-enabled` directory to the configuration file you just created.
```no-highlight
# cd /etc/nginx/sites-enabled/
# rm default
# ln -s /etc/nginx/sites-available/netbox
```
Finally, restart the `nginx` service to use the new configuration.
```no-highlight
# service nginx restart
```
### Option B: Apache
Begin by installing Apache:
```no-highlight
# apt-get install -y apache2
```
Next, copy the default configuration file to `/etc/apache2/sites-available/`. Be sure to modify the `ServerName` parameter appropriately.
```no-highlight
# 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:
```no-highlight
# a2enmod ssl proxy proxy_http headers
# a2ensite netbox
# service apache2 restart
```
!!! note
Certain components of NetBox (such as the display of rack elevation diagrams) rely on the use of embedded objects. Ensure that your HTTP server configuration does not override the `X-Frame-Options` response header set by NetBox.
## Gunicorn Configuration
Copy `/opt/netbox/contrib/gunicorn.py` to `/opt/netbox/gunicorn.py`. (We make a copy of this file to ensure that any changes to it do not get overwritten by a future upgrade.)
```no-highlight
# cd /opt/netbox
# cp contrib/gunicorn.py /opt/netbox/gunicorn.py
```
You may wish to edit this file to change the bound IP address or port number, or to make performance-related adjustments. See [the Gunicorn documentation](https://docs.gunicorn.org/en/stable/configure.html) for the available configuration parameters.
## systemd Configuration
We'll use systemd to control the daemonization of NetBox services. First, copy `contrib/netbox.service` and `contrib/netbox-rq.service` to the `/etc/systemd/system/` directory:
```no-highlight
# cp contrib/*.service /etc/systemd/system/
```
Then, start the `netbox` and `netbox-rq` services and enable them to initiate at boot time:
```no-highlight
# systemctl daemon-reload
# systemctl start netbox netbox-rq
# systemctl enable netbox netbox-rq
```
You can use the command `systemctl status netbox` to verify that the WSGI service is running:
```no-highlight
# systemctl status netbox.service
● netbox.service - NetBox WSGI Service
Loaded: loaded (/etc/systemd/system/netbox.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2019-12-12 19:23:40 UTC; 25s ago
Docs: https://netbox.readthedocs.io/en/stable/
Main PID: 11993 (gunicorn)
Tasks: 6 (limit: 2362)
CGroup: /system.slice/netbox.service
├─11993 /usr/bin/python3 /usr/local/bin/gunicorn --pid /var/tmp/netbox.pid --pythonpath /opt/netbox/...
├─12015 /usr/bin/python3 /usr/local/bin/gunicorn --pid /var/tmp/netbox.pid --pythonpath /opt/netbox/...
├─12016 /usr/bin/python3 /usr/local/bin/gunicorn --pid /var/tmp/netbox.pid --pythonpath /opt/netbox/...
...
```
At this point, you should be able to connect to the HTTP service at the server name or IP address you provided.
!!! info
Please keep in mind that the configurations provided here are bare minimums required to get NetBox up and running. You may want to make adjustments to better suit your production environment.
## Troubleshooting
If you are unable to connect to the HTTP server, check that:
* Nginx/Apache is running and configured to listen on the correct port.
* Access is not being blocked by a firewall. (Try connecting locally from the server itself.)
If you are able to connect but receive a 502 (bad gateway) error, check the following:
* The NetBox system process (gunicorn) is running: `systemctl status netbox`
* nginx/Apache is configured to connect to the port on which gunicorn is listening (default is 8001).
* SELinux is not preventing the reverse proxy connection. You may need to allow HTTP network connections with the command `setsebool -P httpd_can_network_connect 1`

View File

@@ -1,32 +1,44 @@
# LDAP Configuration
This guide explains how to implement LDAP authentication using an external server. User authentication will fall back to built-in Django users in the event of a failure.
# Requirements
## Install Requirements
## Install openldap-devel
### Install System Packages
On Ubuntu:
```no-highlight
sudo apt-get install -y libldap2-dev libsasl2-dev libssl-dev
# apt-get install -y libldap2-dev libsasl2-dev libssl-dev
```
On CentOS:
```no-highlight
sudo yum install -y openldap-devel
# yum install -y openldap-devel
```
## Install django-auth-ldap
### Install django-auth-ldap
Activate the Python virtual environment and install the `django-auth-ldap` package using pip:
```no-highlight
pip3 install django-auth-ldap
# cd /opt/netbox/
# source venv/bin/activate
(venv) # pip3 install django-auth-ldap
```
# Configuration
Once installed, add the package to `local_requirements.txt` to ensure it is re-installed during future rebuilds of the virtual environment:
```no-highlight
(venv) # echo django-auth-ldap >> local_requirements.txt
```
## Configuration
Create a file in the same directory as `configuration.py` (typically `netbox/netbox/`) named `ldap_config.py`. Define all of the parameters required below in `ldap_config.py`. Complete documentation of all `django-auth-ldap` configuration options is included in the project's [official documentation](http://django-auth-ldap.readthedocs.io/).
## General Server Configuration
### General Server Configuration
!!! 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.
@@ -54,7 +66,7 @@ LDAP_IGNORE_CERT_ERRORS = True
STARTTLS can be configured by setting `AUTH_LDAP_START_TLS = True` and using the `ldap://` URI scheme.
## User Authentication
### User Authentication
!!! info
When using Windows Server 2012, `AUTH_LDAP_USER_DN_TEMPLATE` should be set to None.
@@ -79,7 +91,8 @@ AUTH_LDAP_USER_ATTR_MAP = {
}
```
# User Groups for Permissions
### User Groups for Permissions
!!! info
When using Microsoft Active Directory, support for nested groups can be activated by using `NestedGroupOfNamesType()` instead of `GroupOfNamesType()` for `AUTH_LDAP_GROUP_TYPE`. You will also need to modify the import line to use `NestedGroupOfNamesType` instead of `GroupOfNamesType` .
@@ -109,17 +122,20 @@ AUTH_LDAP_USER_FLAGS_BY_GROUP = {
AUTH_LDAP_FIND_GROUP_PERMS = True
# Cache groups for one hour to reduce LDAP traffic
AUTH_LDAP_CACHE_GROUPS = True
AUTH_LDAP_GROUP_CACHE_TIMEOUT = 3600
AUTH_LDAP_CACHE_TIMEOUT = 3600
```
* `is_active` - All users must be mapped to at least this group to enable authentication. Without this, users cannot log in.
* `is_staff` - Users mapped to this group are enabled for access to the administration tools; this is the equivalent of checking the "staff status" box on a manually created user. This doesn't grant any specific permissions.
* `is_superuser` - Users mapped to this group will be granted superuser status. Superusers are implicitly granted all permissions.
# Troubleshooting LDAP
!!! warning
Authentication will fail if the groups (the distinguished names) do not exist in the LDAP directory.
`supervisorctl restart netbox` restarts the Netbox service, and initiates any changes made to `ldap_config.py`. If there are syntax errors present, the NetBox process will not spawn an instance, and errors should be logged to `/var/log/supervisor/`.
## Troubleshooting LDAP
`systemctl restart netbox` restarts the Netbox service, and initiates any changes made to `ldap_config.py`. If there are syntax errors present, the NetBox process will not spawn an instance, and errors should be logged to `/var/log/messages`.
For troubleshooting LDAP user/group queries, add the following lines to the start of `ldap_config.py` after `import ldap`.

View File

@@ -3,12 +3,17 @@
The following sections detail how to set up a new instance of NetBox:
1. [PostgreSQL database](1-postgresql.md)
2. [NetBox components](2-netbox.md)
3. [HTTP dameon](3-http-daemon.md)
4. [LDAP authentication](4-ldap.md) (optional)
1. [Redis](2-redis.md)
3. [NetBox components](3-netbox.md)
4. [HTTP daemon](4-http-daemon.md)
5. [LDAP authentication](5-ldap.md) (optional)
# Upgrading
Below is a simplified overview of the NetBox application stack for reference:
![NetBox UI as seen by a non-authenticated user](../media/installation/netbox_application_stack.png)
## Upgrading
If you are upgrading from an existing installation, please consult the [upgrading guide](upgrading.md).
NetBox v2.5 and later requires Python 3.5 or higher. Please see the instructions for [migrating to Python 3](migrating-to-python3.md) if you are still using Python 2.
Netbox v2.5.9 and later moved to using systemd instead of supervisord. Please see the instructions for [migrating to systemd](migrating-to-systemd.md) if you are still using supervisord.

View File

@@ -1,38 +0,0 @@
# Migration
!!! warning
As of version 2.5, NetBox no longer supports Python 2. Python 3 is required to run any 2.5 release or later.
## Ubuntu
Remove the Python2 version of gunicorn:
```no-highlight
# pip uninstall -y gunicorn
```
Install Python3 and pip3, Python's package management tool:
```no-highlight
# apt-get update
# apt-get install -y python3 python3-dev python3-setuptools
# easy_install3 pip
```
Install the Python3 packages required by NetBox:
```no-highlight
# pip3 install -r requirements.txt
```
Replace gunicorn with the Python3 version:
```no-highlight
# pip3 install gunicorn
```
If using LDAP authentication, install the `django-auth-ldap` package:
```no-highlight
# pip3 install django-auth-ldap
```

View File

@@ -0,0 +1,55 @@
# Migrating to systemd
This document contains instructions for migrating from a legacy NetBox deployment using [supervisor](http://supervisord.org/) to a systemd-based approach.
## Ubuntu
### Uninstall supervisord
```no-highlight
# apt-get remove -y supervisor
```
### Configure systemd
!!! note
These instructions assume the presence of a Python virtual environment at `/opt/netbox/venv`. If you have not created this environment, please refer to the [installation instructions](3-netbox.md#set-up-python-environment) for direction.
We'll use systemd to control the daemonization of NetBox services. First, copy `contrib/netbox.service` and `contrib/netbox-rq.service` to the `/etc/systemd/system/` directory:
```no-highlight
# cp contrib/*.service /etc/systemd/system/
```
!!! note
You may need to modify the user that the systemd service runs as. Please verify the user for httpd on your specific release and edit both files to match your httpd service under user and group. The username could be "nobody", "nginx", "apache", "www-data", or something else.
Then, start the `netbox` and `netbox-rq` services and enable them to initiate at boot time:
```no-highlight
# systemctl daemon-reload
# systemctl start netbox netbox-rq
# systemctl enable netbox netbox-rq
```
You can use the command `systemctl status netbox` to verify that the WSGI service is running:
```
# systemctl status netbox.service
● netbox.service - NetBox WSGI Service
Loaded: loaded (/etc/systemd/system/netbox.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2019-12-12 19:23:40 UTC; 25s ago
Docs: https://netbox.readthedocs.io/en/stable/
Main PID: 11993 (gunicorn)
Tasks: 6 (limit: 2362)
CGroup: /system.slice/netbox.service
├─11993 /usr/bin/python3 /usr/local/bin/gunicorn --pid /var/tmp/netbox.pid --pythonpath /opt/netbox/...
├─12015 /usr/bin/python3 /usr/local/bin/gunicorn --pid /var/tmp/netbox.pid --pythonpath /opt/netbox/...
├─12016 /usr/bin/python3 /usr/local/bin/gunicorn --pid /var/tmp/netbox.pid --pythonpath /opt/netbox/...
...
```
At this point, you should be able to connect to the HTTP service at the server name or IP address you provided. If you are unable to connect, check that the nginx service is running and properly configured. If you receive a 502 (bad gateway) error, this indicates that gunicorn is misconfigured or not running. Issue the command `journalctl -xe` to see why the services were unable to start.
!!! info
Please keep in mind that the configurations provided here are bare minimums required to get NetBox up and running. You may want to make adjustments to better suit your production environment.

View File

@@ -1,12 +1,17 @@
# Review the Release Notes
# Upgrading to a New NetBox Release
## Review the Release Notes
Prior to upgrading your NetBox instance, be sure to carefully review all [release notes](../../release-notes/) that have been published since your current version was released. Although the upgrade process typically does not involve additional work, certain releases may introduce breaking or backward-incompatible changes. These are called out in the release notes under the version in which the change went into effect.
# Install the Latest Code
!!! note
Beginning with version 2.8, NetBox requires Python 3.6 or later.
## Install the Latest Code
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.
## Option A: Download a Release
### Option A: Download a Release
Download the [latest stable release](https://github.com/netbox-community/netbox/releases) from GitHub as a tarball or ZIP archive. Extract it to your desired path. In this example, we'll use `/opt/netbox`.
@@ -25,31 +30,32 @@ Copy the 'configuration.py' you created when first installing to the new version
# cp netbox-X.Y.Z/netbox/netbox/configuration.py netbox/netbox/netbox/configuration.py
```
Also copy the LDAP configuration if using LDAP:
```no-highlight
# cp netbox-X.Y.Z/netbox/netbox/ldap_config.py netbox/netbox/netbox/ldap_config.py
```
Be sure to replicate your uploaded media as well. (The exact action necessary will depend on where you choose to store your media, but in general moving or copying the media directory will suffice.)
```no-highlight
# cp -pr netbox-X.Y.Z/netbox/media/ netbox/netbox/
```
Also make sure to copy over any reports that you've made. Note that if you made them in a separate directory (`/opt/netbox-reports` for example), then you will not need to copy them - the config file that you copied earlier will point to the correct location.
Also make sure to copy over any custom scripts and reports that you've made. Note that if these are stored outside the project root, you will not need to copy them. (Check the `SCRIPTS_ROOT` and `REPORTS_ROOT` parameters in the configuration file above if you're unsure.)
```no-highlight
# cp -r /opt/netbox-X.Y.X/netbox/reports /opt/netbox/netbox/reports/
# cp -r /opt/netbox-X.Y.Z/netbox/scripts /opt/netbox/netbox/scripts/
# cp -r /opt/netbox-X.Y.Z/netbox/reports /opt/netbox/netbox/reports/
```
If you followed the original installation guide to set up gunicorn, be sure to copy its configuration as well:
```no-highlight
# cp netbox-X.Y.Z/gunicorn_config.py netbox/gunicorn_config.py
# cp netbox-X.Y.Z/gunicorn.py netbox/gunicorn.py
```
Copy the LDAP configuration if using LDAP:
```no-highlight
# cp netbox-X.Y.Z/netbox/netbox/ldap_config.py netbox/netbox/netbox/ldap_config.py
```
## Option B: Clone the Git Repository (latest master release)
### Option B: Clone the Git Repository
This guide assumes that NetBox is installed at `/opt/netbox`. Pull down the most recent iteration of the master branch:
@@ -60,9 +66,9 @@ This guide assumes that NetBox is installed at `/opt/netbox`. Pull down the most
# git status
```
# Run the Upgrade Script
## Run the Upgrade Script
Once the new code is in place, run the upgrade script (which may need to be run as root depending on how your environment is configured).
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:
```no-highlight
# ./upgrade.sh
@@ -70,9 +76,14 @@ Once the new code is in place, run the upgrade script (which may need to be run
This script:
* Installs or upgrades any new required Python packages
* Destroys and rebuilds the Python virtual environment
* Installs all required Python packages (listed in `requirements.txt`)
* Installs any additional packages from `local_requirements.txt`
* Applies any database migrations that were included in the release
* Collects all static files to be served by the HTTP service
* Deletes stale content types from the database
* Deletes all expired user sessions from the database
* Clears all cached data to prevent conflicts with the new release
!!! note
It's possible that the upgrade script will display a notice warning of unreflected database migrations:
@@ -82,16 +93,16 @@ This script:
This may occur due to semantic differences in environment, and can be safely ignored. Never attempt to create new migrations unless you are intentionally modifying the database schema.
# Restart the WSGI Service
## Restart the NetBox Services
Finally, restart the WSGI service to run the new code. If you followed this guide for the initial installation, this is done using `supervisorctl`:
!!! warning
If you are upgrading from an installation that does not use a Python virtual environment, you'll need to update the systemd service files to reference the new Python and gunicorn executables before restarting the services. These are located in `/opt/netbox/venv/bin/`. See the example service files in `/opt/netbox/contrib/` for reference.
Finally, restart the gunicorn and RQ services:
```no-highlight
# sudo supervisorctl restart netbox
# sudo systemctl restart netbox netbox-rq
```
If using webhooks, also restart the Redis worker:
```no-highlight
# sudo supervisorctl restart netbox-rqworker
```
!!! note
It's possible you are still using supervisord instead of systemd. If so, please see the instructions for [migrating to systemd](migrating-to-systemd.md).

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 336 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 336 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 339 KiB

View File

@@ -0,0 +1,3 @@
# Circuits
A circuit represents a single _physical_ link connecting exactly two endpoints. (A circuit with more than two endpoints is a virtual circuit, which is not currently supported by NetBox.) Each circuit belongs to a provider and must be assigned a circuit ID which is unique to that provider.

View File

@@ -0,0 +1,11 @@
# Circuit Terminations
A circuit may have one or two terminations, annotated as the "A" and "Z" sides of the circuit. A single-termination circuit can be used when you don't know (or care) about the far end of a circuit (for example, an Internet access circuit which connects to a transit provider). A dual-termination circuit is useful for tracking circuits which connect two sites.
Each circuit termination is tied to a site, and may optionally be connected via a cable to a specific device interface or pass-through port. Each termination can be assigned a separate downstream and upstream speed independent from one another. Fields are also available to track cross-connect and patch panel details.
!!! note
A circuit represents a physical link, and cannot have more than two endpoints. When modeling a multi-point topology, each leg of the topology must be defined as a discrete circuit.
!!! note
A circuit may terminate only to a physical interface. Circuits may not terminate to LAG interfaces, which are virtual interfaces: You must define each physical circuit within a service bundle separately and terminate it to its actual physical interface.

View File

@@ -0,0 +1,10 @@
# Circuit Types
Circuits are classified by type. For example, you might define circuit types for:
* Internet transit
* Out-of-band connectivity
* Peering
* Private backhaul
Circuit types are fully customizable.

View File

@@ -0,0 +1,5 @@
# Providers
A provider is any entity which provides some form of connectivity. While this obviously includes carriers which offer Internet and private transit service, it might also include Internet exchange (IX) points and even organizations with whom you peer directly.
Each provider may be assigned an autonomous system number (ASN), an account number, and relevant contact information.

19
docs/models/dcim/cable.md Normal file
View File

@@ -0,0 +1,19 @@
# Cables
A cable represents a physical connection between two termination points, such as between a console port and a patch panel port, or between two network interfaces. Cables can be traced through pass-through ports to form a complete path between two endpoints. In the example below, three individual cables comprise a path between the two connected endpoints.
```
|<------------------------------------------ Cable Path ------------------------------------------->|
Device A Patch Panel A Patch Panel B Device B
+-----------+ +-------------+ +-------------+ +-----------+
| Interface | --- Cable --- | Front Port | | Front Port | --- Cable --- | Interface |
+-----------+ +-------------+ +-------------+ +-----------+
+-------------+ +-------------+
| Rear Port | --- Cable --- | Rear Port |
+-------------+ +-------------+
```
All connections between device components in NetBox are represented using cables. However, defining the actual cable plant is optional: Components can be be directly connected using cables with no type or other attributes assigned.
Cables are also used to associated ports and interfaces with circuit terminations. To do this, first create the circuit termination, then navigate the desired component and connect a cable between the two.

View File

@@ -0,0 +1,5 @@
## Console Ports
A console port provides connectivity to the physical console of a device. Console ports are typically used for temporary access by someone who is physically near the device, or for remote out-of-band access via a console server.
Console ports can be connected to console server ports.

View File

@@ -0,0 +1,3 @@
## Console Port Templates
A template for a console port that will be created on all instantiations of the parent device type.

View File

@@ -0,0 +1,5 @@
## Console Server Ports
A console server is a device which provides remote access to the local consoles of connected devices. This is typically done to provide remote out-of-band access to network devices.
Console server ports can be connected to console ports.

View File

@@ -0,0 +1,3 @@
## Console Server Port Templates
A template for a console server port that will be created on all instantiations of the parent device type.

View File

@@ -0,0 +1,7 @@
# Devices
Every piece of hardware which is installed within a rack exists in NetBox as a device. Devices are measured in rack units (U) and can be half depth or full depth. A device may have a height of 0U: These devices do not consume vertical rack space and cannot be assigned to a particular rack unit. A common example of a 0U device is a vertically-mounted PDU.
When assigning a multi-U device to a rack, it is considered to be mounted in the lowest-numbered rack unit which it occupies. For example, a 3U device which occupies U8 through U10 is said to be mounted in U8. This logic applies to racks with both ascending and descending unit numbering.
A device is said to be full depth if its installation on one rack face prevents the installation of any other device on the opposite face within the same rack unit(s). This could be either because the device is physically too deep to allow a device behind it, or because the installation of an opposing device would impede airflow.

View File

@@ -0,0 +1,7 @@
## Device Bays
Device bays represent the ability of a device to house child devices. For example, you might install four blade servers into a 2U chassis. The chassis would appear in the rack elevation as a 2U device with four device bays. Each server within it would be defined as a 0U device installed in one of the device bays. Child devices do not appear within rack elevations or the "Non-Racked Devices" list within the rack view.
Child devices are first-class Devices in their own right: that is, fully independent managed entities which don't share any control plane with the parent. Just like normal devices, child devices have their own platform (OS), role, tags, and interfaces. You cannot create a LAG between interfaces in different child devices.
Therefore, Device bays are **not** suitable for modeling chassis-based switches and routers. These should instead be modeled as a single Device, with the line cards as Inventory Items.

View File

@@ -0,0 +1,3 @@
## Device Bay Templates
A template for a device bay that will be created on all instantiations of the parent device type.

View File

@@ -0,0 +1,3 @@
# Device Roles
Devices can be organized by functional roles. These roles are fully customizable. For example, you might create roles for core switches, distribution switches, and access switches.

View File

@@ -0,0 +1,18 @@
# Device Types
A device type represents a particular make and model of hardware that exists in the real world. Device types define the physical attributes of a device (rack height and depth) and its individual components (console, power, and network interfaces).
Device types are instantiated as devices installed within racks. For example, you might define a device type to represent a Juniper EX4300-48T network switch with 48 Ethernet interfaces. You can then create multiple devices of this type named "switch1," "switch2," and so on. Each device will inherit the components (such as interfaces) of its device type at the time of creation. (However, changes made to a device type will **not** apply to instances of that device type retroactively.)
Some devices house child devices which share physical resources, like space and power, but which functional independently from one another. A common example of this is blade server chassis. Each device type is designated as one of the following:
* A parent device (which has device bays)
* A child device (which must be installed in a device bay)
* Neither
!!! note
This parent/child relationship is **not** suitable for modeling chassis-based devices, wherein child members share a common control plane.
For that application you should create a single Device for the chassis, and add Interfaces directly to it. Interfaces can be created in bulk using range patterns, e.g. "Gi1/[1-24]".
Add Inventory Items if you want to record the line cards themselves as separate entities. There is no explicit relationship between each interface and its line card, but it may be implied by the naming (e.g. interfaces "Gi1/x" are on line card 1)

View File

@@ -0,0 +1,5 @@
## Front Ports
Front ports are pass-through ports used to represent physical cable connections that comprise part of a longer path. For example, the ports on the front face of a UTP patch panel would be modeled in NetBox as front ports.
Each front port is mapped to a specific rear port on the same device. A single rear port may be mapped to multiple rear ports.

View File

@@ -0,0 +1,3 @@
## Front Port Templates
A template for a front-facing pass-through port that will be created on all instantiations of the parent device type.

View File

@@ -0,0 +1,9 @@
## Interfaces
Interfaces connect to one another in a symmetric manner: If interface A connects to interface B, interface B therefore connects to interface A. Each type of connection can be classified as either *planned* or *connected*.
Each interface is a assigned a type denoting its physical properties. Two special types exist: the "virtual" type can be used to designate logical interfaces (such as SVIs), and the "LAG" type can be used to desinate link aggregation groups to which physical interfaces can be assigned.
Each interface can also be enabled or disabled, and optionally designated as management-only (for out-of-band management). Fields are also provided to store an interface's MTU and MAC address.
VLANs can be assigned to each interface as either tagged or untagged. (An interface may have only one untagged VLAN.)

View File

@@ -0,0 +1,3 @@
## Interface Templates
A template for an interface that will be created on all instantiations of the parent device type.

View File

@@ -0,0 +1,3 @@
# Inventory Items
Inventory items represent hardware components installed within a device, such as a power supply or CPU or line card. Currently, these are used merely for inventory tracking, although future development might see their functionality expand. Like device types, each item can optionally be assigned a manufacturer.

View File

@@ -0,0 +1,3 @@
# Manufacturers
Each device type must be assigned to a manufacturer. The model number of a device type must be unique to its manufacturer.

View File

@@ -0,0 +1,7 @@
# Platforms
A platform defines the type of software running on a device or virtual machine. This can be helpful when it is necessary to distinguish between, for instance, different feature sets. Note that two devices of the same type may be assigned different platforms: for example, one Juniper MX240 running Junos 14 and another running Junos 15.
The platform model is also used to indicate which [NAPALM](https://napalm-automation.net/) driver 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.

View File

@@ -0,0 +1,8 @@
# Power Feed
A power feed identifies the power outlet/drop that goes to a rack and is terminated to a power panel. Power feeds have a supply type (AC/DC), voltage, amperage, and phase type (single/three).
Power feeds are optionally assigned to a rack. In addition, a power port and only one can connect to a power feed; in the context of a PDU, the power feed is analogous to the power outlet that a PDU's power port/inlet connects to.
!!! info
The power usage of a rack is calculated when a power feed (or multiple) is assigned to that rack and connected to a power port.

View File

@@ -0,0 +1,3 @@
## Power Outlets
Power outlets represent the ports on a PDU that supply power to other devices. Power outlets are downstream-facing towards power ports. A power outlet can be associated with a power port on the same device and a feed leg (i.e. in a case of a three-phase supply). This indicates which power port supplies power to a power outlet.

View File

@@ -0,0 +1,3 @@
## Power Outlet Templates
A template for a power outlet that will be created on all instantiations of the parent device type.

View File

@@ -0,0 +1,3 @@
# Power Panel
A power panel represents the distribution board where power circuits and their circuit breakers terminate on. If you have multiple power panels in your data center, you should model them as such in NetBox to assist you in determining the redundancy of your power allocation.

Some files were not shown because too many files have changed in this diff Show More