Giter Club home page Giter Club logo

netbox-community / netbox Goto Github PK

View Code? Open in Web Editor NEW
15.0K 408.0 2.4K 91.82 MB

The premier source of truth powering network automation. Open source under Apache 2. Public demo: https://demo.netbox.dev

Home Page: http://netboxlabs.com/oss/netbox/

License: Apache License 2.0

Python 93.06% JavaScript 0.05% HTML 5.19% Shell 0.06% SCSS 0.53% TypeScript 1.08% Jinja 0.02%
dcim ipam netbox network-automation sysadmin python infrastructure-management sot cabling network

netbox's Introduction

NetBox logo

The cornerstone of every automated network

Latest release License Contributors GitHub stars Languages supported CI status

NetBox exists to empower network engineers. Since its release in 2016, it has become the go-to solution for modeling and documenting network infrastructure for thousands of organizations worldwide. As a successor to legacy IPAM and DCIM applications, NetBox provides a cohesive, extensive, and accessible data model for all things networked. By providing a single robust user interface and programmable APIs for everything from cable maps to device configurations, NetBox serves as the central source of truth for the modern network.

NetBox's Role | Why NetBox? | Getting Started | Get Involved | Project Stats | Screenshots

NetBox user interface screenshot

NetBox's Role

NetBox functions as the source of truth for your network infrastructure. Its job is to define and validate the intended state of all network components and resources. NetBox does not interact with network nodes directly; rather, it makes this data available programmatically to purpose-built automation, monitoring, and assurance tools. This separation of duties enables the construction of a robust yet flexible automation system.

Reference network automation architecture

The diagram above illustrates the recommended deployment architecture for an automated network, leveraging NetBox as the central authority for network state. This approach allows your team to swap out individual tools to meet changing needs while retaining a predictable, modular workflow.

Why NetBox?

Comprehensive Data Model

Racks, devices, cables, IP addresses, VLANs, circuits, power, VPNs, and lots more: NetBox is built for networks. Its comprehensive and thoroughly inter-linked data model provides for natural and highly structured modeling of myriad network primitives that just isn't possible using general-purpose tools. And there's no need to waste time contemplating how to build out a database: Everything is ready to go upon installation.

Focused Development

NetBox strives to meet a singular goal: Provide the best available solution for making network infrastructure programmatically accessible. Unlike "all-in-one" tools which awkwardly bolt on half-baked features in an attempt to check every box, NetBox is committed to its core function. NetBox provides the best possible solution for modeling network infrastructure, and provides rich APIs for integrating with tools that excel in other areas of network automation.

Extensible and Customizable

No two networks are exactly the same. Users are empowered to extend NetBox's native data model with custom fields and tags to best suit their unique needs. You can even write your own plugins to introduce entirely new objects and functionality!

Flexible Permissions

NetBox includes a fully customizable permission system, which affords administrators incredible granularity when assigning roles to users and groups. Want to restrict certain users to working only with cabling and not be able to change IP addresses? Or maybe each team should have access only to a particular tenant? NetBox enables you to craft roles as you see fit.

Custom Validation & Protection Rules

The data you put into NetBox is crucial to network operations. In addition to its robust native validation rules, NetBox provides mechanisms for administrators to define their own custom validation rules for objects. Custom validation can be used both to ensure new or modified objects adhere to a set of rules, and to prevent the deletion of objects which don't meet certain criteria. (For example, you might want to prevent the deletion of a device with an "active" status.)

Device Configuration Rendering

NetBox can render user-created Jinja2 templates to generate device configurations from its own data. Configuration templates can be uploaded individually or pulled automatically from an external source, such as a git repository. Rendered configurations can be retrieved via the REST API for application directly to network devices via a provisioning tool such as Ansible or Salt.

Custom Scripts

Complex workflows, such as provisioning a new branch office, can be tedious to carry out via the user interface. NetBox allows you to write and upload custom scripts that can be run directly from the UI. Scripts prompt users for input and then automate the necessary tasks to greatly simplify otherwise burdensome processes.

Automated Events

Users can define event rules to automatically trigger a custom script or outbound webhook in response to a NetBox event. For example, you might want to automatically update a network monitoring service whenever a new device is added to NetBox, or update a DHCP server when an IP range is allocated.

Comprehensive Change Logging

NetBox automatically logs the creation, modification, and deletion of all managed objects, providing a thorough change history. Changes can be attributed to the executing user, and related changes are grouped automatically by request ID.

Note

A complete list of NetBox's myriad features can be found in the introductory documentation.

Getting Started

NetBox Cloud
Looking for a managed solution? Check out NetBox Cloud or NetBox Enterprise!

Get Involved

Project Stats

Timeline graph Issues graph Pull requests graph Top contributors
Stats via Repography

Screenshots

NetBox Dashboard (Light Mode)
NetBox dashboard (light mode)

NetBox Dashboard (Dark Mode)
NetBox dashboard (dark mode)

Prefixes List
Prefixes list

Rack View
Rack view

Cable Trace
Cable trace

netbox's People

Contributors

abhi1693 avatar abigley avatar arthanson avatar atownson avatar bellwood avatar bluikko avatar candlerb avatar danner26 avatar dansheps avatar glennmatthews avatar hellerve avatar hsaria avatar huntabyte avatar jeremystretch avatar jsenecal avatar kkthxbye-code avatar kobayashi avatar lampwins avatar markkuleinio avatar mdlayher avatar minitriga avatar peelman avatar pv2b avatar rhyser9 avatar ryanbreaker avatar steffann avatar thatmattlove avatar tobiasge avatar tyler-8 avatar ypid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

netbox's Issues

Adding complex interfaces results in server error

When attempting to add interfaces:

xe-[0-1]/[0-3]/0

Results in a modal and server error which kicks me back to the homepage

There was a problem with your request. This error has been logged and administrative staff have been notified. Please return to the home page and try again.

Typo in /dcim/views.py

Line 356:

messages.success(request, "Added {} compontent(s) to {}".format(len(component_templates), devicetype))

compontent -> component

Improve interface ordering

We need to come up with a better way of sorting arbitrary interface IDs. The current approach works well for simple cases (e.g. formats Gi0/1 and xe-0/0/1) but falls apart when faced with more exotic IDs, such as Junos' channelized interfaces (e.g. xe-0/0/33:[0-3]).

Rack Groups - not visible in Sites

Hi There,

When viewing like we do
Site -> Rack Group -> Rack -> Device

The rack group is not visible in the site view.

I suggest to display a table which would show either a rack group if specified and if site does not have any specified rack groups but has racks then show listing of racks for the site.

This could be below the comments/topology boxes.

Thanks
Shaun

Add a configuration option to allow/disallow duplicate prefixes and IPs within a VRF

Currently, a user can create duplicate prefixes and IP addresses within a VRF (or the global table). A warning is displayed when duplicate objects are found, but no action is otherwise taken.

It should be fairly easy to implement a configuration option to disallow a user from creating duplicate prefixes or IP addresses within a VRF.

Add support for tracking physical cable plants

Currently, NetBox does not support any concept of physical cable plant installations. We can connect one interface to another, but there is no way too associate that connection with information about the physical path taken by the cabling.

Ideally, NetBox should support the construction of physical cable paths to be associated with data (and perhaps console) connections. This would entail the tracking of individual path panels and cables, as well as the ability to support bundles of cabling (e.g. MPO fiber trunks).

The database schema necessary to support this feature will take quite a bit of thought. However, once that schema has been devised and agreed upon, it should be relatively easy to incorporate in NetBox.

Utilization Improvements

I'd like to see some improvements to the utilization measurements.

  1. The utilization bar should be shown not only under aggregate but under each Prefix and Child Prefix.
    This helps with the fact that currently the aggregate view will show 100% if you have completely subnetted out that aggregate prefix. This is nice but its not a real accurate representation of that utilization.
  2. I'd like to see an option where you could change the above to either show the utilization based off of the aggregate utilization of the prefixes rather than if you have subnetted the aggregate.

This can be annoying if you make an aggregate prefix called 192.168.0.0/21. Carve up two prefixes 192.168.0.0/22 and 192.168.4.0/22 because one will be for SITE1 and the other for SITE2. Mark those both containers. Now, my /21 shows 100% utilization because I've made containers to contain my child prefixes of 192.168.0.0/24 and 192.168.4.0/24, etc.

Prefixes with children, caret doesnt expand list

I have a /20 prefix with 16 child prefixes underneath

When I view my prefix table this /20 shows a caret that should expand to show me my 16 /24's (the screenshots show this is how it should work)

In both the latest Chrome and Safari I am not able to expand the view by clicking the caret

Allow exporting all data from UI

I'm running netbox in a dev VPS right now and have entered a sizable amount of data.

I'm going to want to move this to a production server and would really prefer not to have multiple exports (not sure if everything exports?)

Add some screenshots of the interface to the README

Adding a few screenshots which showcase the NetBox front end might help to quickly demonstrate what it is and encourage new users to try it out. These should be taken from a demo instance to avoid capturing any real-world data.

Problem with moving device in rack

Create a device for example something that has 5RU in height and you add it to a rack.

Say for example you assigned the device RU 10-15 but after adding the device you realise it should have been RU11-16.

If you then want to move this device up 1RU in the rack you have to move the device completely out of the 5RU allocated for the device. Save changes then go back and edit the device and move it to the correct RU location.

This does not work when the rack is near full - you would have to remove the device and then re-allocate the device to the rack.

Enable subnetting child prefixes when adding child prefixes

Let's say I add a /18 prefix and assign it's status as container.

Now let's say I want to add the 64 /24 child prefixes under it.

Could there be an option when adding a child prefix to:

(radio option) enter manually

(radio option) subnet container prefix into (drop down)[30,29,28,27,26,25,24]'s

Where "enter manually" is the current system in place.

This would allow a much quicker workflow for subnetting and breaking up IP space

Clarification on devices, device types and how interfaces work

I've added a device type for one of my edge routers and added all the line card ports.

When I add the actual device and associate it to the device type I am left needing to define all the ports again.

What is the purpose of populating ports on the device type if I'll need to redefine the ports when creating the device?

I presumed device type was a template such that when associating it to an actual device the interfaces would be there by default?

Thanks =)

Enable extensibility using plugins

Here is an example of how I might want to extend Netbox - to generate DNS records.

  • for each IPAM address entry, add a "DNS name" field
  • use this data to export zone files (both forward and reverse)
  • this requires:
    • adding a new column to ipam_ipaddress
    • corresponding new data entry field in IP Address add/edit/import
    • a separate web area for other DNS operations (e.g. export zone file, adding other DNS records like MX and CNAME)
    • optional triggers for provisioning (e.g. queue list of DNS changes to push)

However, making this part of Netbox core might not suit how everyone wants to manage their DNS. So would it be better instead for Netbox to support such extensions as plugins, so they remain optional?

The issue of modifying the ipam_ipaddress table can be dealt with by having a separate linked table, but the DNS code would still need some way to hook into the UI. At simplest, the DNS plugin could ask for a "DNS" button to appear on the IP address page, and that would link to a separate page or pop-up.

I can see other possible plugins to:

  • Auto-populate serial number, interfaces and IP addresses from SNMP queries
  • Connect to iKVM, serial console; control power via PDU; control console and power via IPMI
  • Manage VMs via ESXi, Openstack, Ganeti etc
  • Configure monitoring
  • Collect interface stats, ARP tables, bridge forwarding tables
  • Record fibre strands and cables

These probably belong in separate projects, given the large number of different devices which need to be supported - but they will still want to integrate into the UI somehow.

P.S. If there is a discussion list please point me at it :-)

MultipleObjectsReturned: get() returned more than one Aggregate

Netbox 66a16dd under Ubuntu 14.04

What I did was:

  • Create a device with interface 1.2.3.4/24
  • Create an aggregate 1.2.3.0/24
  • Create a prefix 1.2.3.0/24
  • Create an aggregate 1.0.0.0/8

When I browse to the outer aggregate http://x.x.x.x:8000/ipam/aggregates/2/ (1.0.0.0/8) it shows the "child prefixes" inside it, including 1.2.3.0/24 "active". But when I click on this, which takes me to http://x.x.x.x:8000/ipam/prefixes/1/, I get a 500 "Server error"

No error is shown in the console output apart from:

[28/Jun/2016 09:35:28] "GET /ipam/prefixes/1/ HTTP/1.1" 500 1026

But after setting DEBUG = True in configuration.py, I get this:

Internal Server Error: /ipam/prefixes/1/
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 149, in get_response
    response = self.process_exception_by_middleware(e, request)
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 147, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/opt/netbox/netbox/ipam/views.py", line 273, in prefix
    aggregate = Aggregate.objects.get(prefix__net_contains_or_equals=str(prefix.prefix))
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/manager.py", line 122, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 391, in get
    (self.model._meta.object_name, num)
MultipleObjectsReturned: get() returned more than one Aggregate -- it returned 2!

Possibly the problem is that I can't have both an aggregate and a prefix which are the same (but then Netbox should stop me getting into this situation in the first place?)

Issue 2: I tried to delete the aggregate 1.2.3.0/24, but what it actually did was to delete the prefix! Then I deleted the aggregate, then recreated the prefix, and it was OK.

Issue 3: given that I still have an aggregate 1.0.0.0/8 it now doesn't allow me to create an aggregate 1.2.3.0/24 again: it says "1.2.3.0/24 is already covered by an existing aggregate (1.0.0.0/8)"

This may be true, but if one aggregate is not allowed to contain another aggregate, this needs to be enforced in the opposite direction too (i.e. it allowed me to create aggregate 1.0.0.0/8 after creating aggregate 1.2.3.0/24, but not the other way round)

This leads onto:

Issue 4: it should be made clearer in the documentation about whether aggregates can be nested, and/or prefixes can be nested.

Based on experimentation, it looks like prefixes can be nested, but aggregates cannot / should not, correct?

For example: I may have 192.0.0.0/22 from my registry, but I divide that up to 192.0.0.0/24 for data centre 1 and 192.0.1.0/24 for data centre 2, and then from within those ranges I allocate subnets for each data centre. So I believe the correct approach in Netbox is to create an aggregate 192.0.0.0/22, prefixes 192.0.0.0/24 and 192.0.1.0/24, and child prefixes within those prefixes to represent the actual subnets on router interfaces - is that right?

Show rack preview when adding new devices

When on the add device page.

http://XXX/dcim/devices/add/

It would be beneficial to be able to preview the rack itself showing available placement after selecting the rack from the drop down list.

It would also be great once selected the RU location to show the device pending placement location in the rack being shown and then only committing to that location once it has been saved.

Create new Rack in Rack Group

Can we please have a button that allows you to create a new rack while in the rack group view.

Saves exiting that view itself.

Thanks
Shaun

css override on "container" causes issues

the css override for "container" set to:

.container {
    width: 1340px;
}

(base.css line 11)

...causes overflow issues on smaller screens, namely my 13" macbook pro and commenting this out allows the container content inside .wrapper to behave much better automatically but doesnt address the header and footer

changing .container to .container-fluid in the navbar, footer and wrapper makes everything work nicely

Add support for reserving rack space

Currently, space within a rack can only be either unoccupied or occupied (having been consumed by a device). It would be helpful to allow users to reserve arbitrary swaths of rack space with a comment indicating its intended use. This could also be used to designate unallocated rack space (for instance, because the rack has been damaged).

Return user to previous query after performing a bulk action

Currently, after performing a bulk action such as adding an interface to a set of devices, the user is redirected back to the default device list, and must re-apply any filters to return the original set of objects.

Instead, the user should be redirected to the previous list view with all its associated filters already applied.

Automatic reservation of subnets and ip addresses

In our setup a central function of an ipam system is to handle the reservation of free ip addresses and subnets, this is crucial for fully automated server provisioning workflows. So please have a look at the ip reservation functions of tools like phpipam and especially nipap and generously steal concepts from them and adapt them accordingly ;)

Integration with PHPIPam

Hi There,

We use phpipam for all our ip / vlan / dns management.

It would be great if we could link the systems together so we can provision from netbox and have it talk back to phpipam to link both systems together.

This would allow for the following to take place as an example;

  1. Create customer in rack space
  2. Assign device to rack space.
  3. Allocate IP / Subnet / Vlan to device which makes a call back to phpipam API
  4. Phpipam then allocates the subnet and it has connections from there to manage DNS so it would if setup like ours will auto provision PTR records etc for that device.

A scenario like this would allow for primary management to be handled by netbox rather than phpipam with netbox having more control and functionality other than being (for how we are using it) an asset system at the moment.

Fantastic what you have done - really great project :)

Regards
Shaun

Development instance throwing dot_parser error

I'm trying to install Netbox on a minimal Centos 7 system and having some issues when I go to launch the development instance. It launches and says no issues were identified however it throws a 'Couldn't import dot_parser, loading of dot files will not be possible.' error. When I browse to the website, I get a Bad Request (400) error.

sudo ./manage.py runserver 0.0.0.0:8000 --insecure
Performing system checks...

Couldn't import dot_parser, loading of dot files will not be possible.
System check identified no issues (0 silenced).
June 27, 2016 - 19:07:50
Django version 1.9.7, using settings 'netbox.settings'
Starting development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.
[27/Jun/2016 19:07:51] "GET / HTTP/1.1" 400 26
[27/Jun/2016 19:07:52] "GET /favicon.ico HTTP/1.1" 400 26
[27/Jun/2016 19:07:53] "GET / HTTP/1.1" 400 26
[27/Jun/2016 19:07:53] "GET /favicon.ico HTTP/1.1" 400 26

In order to get to this point, I had to install additional dependencies such as gcc, openssl-devel, and postgresql-devel at which point I got past pip install section. Not sure what to troubleshoot at this point.

Allow secrets to be associated with multiple devices

Proposal for discussion: that the same secret can be associated with multiple devices; and that secrets are versioned.

Current: (device, secret role, username, secret)

router1,SNMP community,,abc123
router2,SNMP community,,abc123
router3,SNMP community,,def456
ups1,SNMP community,,p@ssw0rd

Proposed: (device, secret role, username, secret class, secret version)

router1,SNMP community,,SNMP core,1
router2,SNMP community,,SNMP core,1
router3,SNMP community,,SNMP core,2
ups1,SNMP community,,SNMP UPS,1

Secrets: (class, version, secret, timestamp, comment)

SNMP core,1,abc123,20160112,Initial version
SNMP core,2,def456,20160628,Rotated after staff change
SNMP UPS,1,p@ssw0rd,20160112,Initial version

Secret classes can have an overall description:

SNMP core,Community for core routers
SNMP UPS,Community for vendor-managed UPS equipment

This would mean:

  • fewer encrypted items stored in the database
  • the ability to add a new device and select from existing secrets in a drop-down menu, without having to type in the secret itself each time
  • easier to report on which devices are using out-of-date secrets
  • GPG-encrypted secrets could be used, eliminating the need to handle private keys in the browser (aside: could also export them to a passwordstore filetree)

Since secrets are shared they should be immutable, at least if in use by more than one device. To rotate a password you would create a new version of the secret and then assign the new version to each device as you update it. This could be offered as a bulk-change operation in the GUI.

The above design allows the same secret to be used for any role, which is most flexible, but alternatively each secret class could be linked to a single role (to restrict the drop-down choices to relevant ones only)

Backwards-compatibility: may need to allow both per-device and shared secrets. May also be helpful when some oddball devices have ad-hoc passwords.

Allow connection of devices between remote sites

not sure if this is by design or a bug - but I am unable to connect devices together that are not in the same location.

Also on the circuits management stuff - it would be good if you could have an A-Port and a B-Port - as we have several leased lines that go between facilities

LDAP authentication

This project is looking so good!

I'd love the option for LDAP authentication built in (With permissions etc). I'm sure many others will too.
This would make it more appealing for larger organisations.

Thanks,

"Secrets" not working

Netbox 66a16dd under Ubuntu 14.04, built according to getting-started.md

I tried to create a secret for a device. It told me I needed to create a user key and navigated me to that place. So I generated a user key within the browser, and copy-pasted the private key to a local file.

I then tried again to add a secret to a device. It prompted me to paste my private key into the web interface - I did so.

But from then on, attempting to add a secret to a device just says:

"Invalid RSA key. Please ensure that your key is in PEM (base64) format."

I have tried:

  • Logging out and logging back in
  • Quitting and restarting the browser (Chrome under OSX)
  • Regenerating and re-activating my user key

I have never been prompted to paste my private key in again, but I still get the "Invalid RSA key" message. Inspecting the HTML page shows that the private key is in a hidden form variable. I'm not sure how this is being kept "sticky", but at very least logging out should clear it and require it to be re-entered when required.

Side issue: I would be a lot happier if this used GPG keys, not RSA keys. GPG is robustly-designed, whereas it's very easy to make an insecure system from low-level crypto primitives. I'm particularly unhappy about private keys being constantly pasted back-and-forth between web client and server.

GPG allows the same document to be encrypted for multiple recipients: effectively there is no global "master key" but rather each document contains its own session key, encrypted with multiple public keys.

This in turn means that it would be unnecessary to provide your private key into the web interface when adding a new device secret.

Viewing devices "'MultipleObjectsReturned' object is not callable"

This occurred after I assigned a /32 "Primary IP" to the fxp0 interfaces on both my edge routers (devices 2 and 3)

TypeError at /dcim/devices/2/
'MultipleObjectsReturned' object is not callable
Request Method: GET
Request URL:    http://x.x.x.x/dcim/devices/2/
Django Version: 1.9.7
Exception Type: TypeError
Exception Value:    
'MultipleObjectsReturned' object is not callable
Exception Location: /opt/netbox/netbox/dcim/models.py in get_connected_interface, line 785
Python Executable:  /usr/bin/python
Python Version: 2.7.6
Python Path:    
['/opt/netbox/netbox/netbox',
 '/opt/netbox/netbox',
 '/usr/bin',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-x86_64-linux-gnu',
 '/usr/lib/python2.7/lib-tk',
 '/usr/lib/python2.7/lib-old',
 '/usr/lib/python2.7/lib-dynload',
 '/usr/local/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages']
Server time:    Tue, 28 Jun 2016 12:27:50 +0000
Error during template rendering

In template /opt/netbox/netbox/templates/dcim/device.html, error at line 0
'MultipleObjectsReturned' object is not callable
1   {% extends '_base.html' %}
2   {% load static from staticfiles %}
3   {% load render_table from django_tables2 %}
4   {% load helpers %}
5   
6   {% block title %}{{ device }}{% endblock %}
7   
8   {% block content %}
9   {% include 'dcim/inc/_device_header.html' with active_tab='info' %}
10  <div class="row">
Environment:


Request Method: GET
Request URL: http://x.x.x.x/dcim/devices/2/

Django Version: 1.9.7
Python Version: 2.7.6
Installed Applications:
('django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.humanize',
 'debug_toolbar',
 'django_tables2',
 'rest_framework',
 'rest_framework_swagger',
 'circuits',
 'dcim',
 'ipam',
 'extras',
 'secrets',
 'users',
 'utilities')
Installed Middleware:
(u'debug_toolbar.middleware.DebugToolbarMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'django.middleware.security.SecurityMiddleware',
 'utilities.middleware.LoginRequiredMiddleware')


Template error:
In template /opt/netbox/netbox/templates/dcim/device.html, error at line 0
   'MultipleObjectsReturned' object is not callable   1 : {% extends '_base.html' %}
   2 : {% load static from staticfiles %}
   3 : {% load render_table from django_tables2 %}
   4 : {% load helpers %}
   5 : 
   6 : {% block title %}{{ device }}{% endblock %}
   7 : 
   8 : {% block content %}
   9 : {% include 'dcim/inc/_device_header.html' with active_tab='info' %}
   10 : <div class="row">


Traceback:

File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
  149.                     response = self.process_exception_by_middleware(e, request)

File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
  147.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/opt/netbox/netbox/dcim/views.py" in device
  542.         'related_devices': related_devices,

File "/usr/local/lib/python2.7/dist-packages/django/shortcuts.py" in render
  67.             template_name, context, request=request, using=using)

File "/usr/local/lib/python2.7/dist-packages/django/template/loader.py" in render_to_string
  97.         return template.render(context, request)

File "/usr/local/lib/python2.7/dist-packages/django/template/backends/django.py" in render
  95.             return self.template.render(context)

File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in render
  206.                     return self._render(context)

File "/usr/local/lib/python2.7/dist-packages/django/test/utils.py" in instrumented_test_render
  92.     return self.nodelist.render(context)

File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in render
  992.                 bit = node.render_annotated(context)

File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in render_annotated
  959.             return self.render(context)

File "/usr/local/lib/python2.7/dist-packages/django/template/loader_tags.py" in render
  173.         return compiled_parent._render(context)

File "/usr/local/lib/python2.7/dist-packages/django/test/utils.py" in instrumented_test_render
  92.     return self.nodelist.render(context)

File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in render
  992.                 bit = node.render_annotated(context)

File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in render_annotated
  959.             return self.render(context)

File "/usr/local/lib/python2.7/dist-packages/django/template/loader_tags.py" in render
  69.                 result = block.nodelist.render(context)

File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in render
  992.                 bit = node.render_annotated(context)

File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in render_annotated
  959.             return self.render(context)

File "/usr/local/lib/python2.7/dist-packages/django/template/defaulttags.py" in render
  326.                 return nodelist.render(context)

File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in render
  992.                 bit = node.render_annotated(context)

File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in render_annotated
  959.             return self.render(context)

File "/usr/local/lib/python2.7/dist-packages/django/template/defaulttags.py" in render
  220.                     nodelist.append(node.render_annotated(context))

File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in render_annotated
  959.             return self.render(context)

File "/usr/local/lib/python2.7/dist-packages/django/template/loader_tags.py" in render
  209.                 return template.render(context)

File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in render
  208.                 return self._render(context)

File "/usr/local/lib/python2.7/dist-packages/django/test/utils.py" in instrumented_test_render
  92.     return self.nodelist.render(context)

File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in render
  992.                 bit = node.render_annotated(context)

File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in render_annotated
  959.             return self.render(context)

File "/usr/local/lib/python2.7/dist-packages/django/template/defaulttags.py" in render
  326.                 return nodelist.render(context)

File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in render
  992.                 bit = node.render_annotated(context)

File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in render_annotated
  959.             return self.render(context)

File "/usr/local/lib/python2.7/dist-packages/django/template/defaulttags.py" in render
  582.                   six.iteritems(self.extra_context)}

File "/usr/local/lib/python2.7/dist-packages/django/template/defaulttags.py" in <dictcomp>
  581.         values = {key: val.resolve(context) for key, val in

File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in resolve
  709.                 obj = self.var.resolve(context)

File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in resolve
  850.             value = self._resolve_lookup(context)

File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in _resolve_lookup
  913.                             current = current()

File "/opt/netbox/netbox/dcim/models.py" in get_connected_interface
  785.             raise e("Multiple connections found for {0} interface {1}!".format(self.device, self))

Exception Type: TypeError at /dcim/devices/2/
Exception Value: 'MultipleObjectsReturned' object is not callable

Adding Rack > Edit Rack Name > Server Error

When Adding a rack to a site - I edit the friendly org name and it fails.

There was a problem with your request. This error has been logged and administrative staff have been notified. Please return to the home page and try again.

Process to fault
0. Login as super user

  1. Sites > Add a Site
  2. Racks > Add a Rack > Provide Name "Active"
  3. Racks > Racks > Click "Active" > Edit this rack
  4. Change name from "Active" to "ORGACTIVE" > Update
  5. See Error

Device import RU size field.

Under 'Devices' -> 'Import Devices', can you please have a field for height type.
This would drastically reduce my time in manually having to go into each device and specify the height of each device.
Currently importing 1000's of devices and without this, it is going to be a time-consuming process.

got to say a very good job! Thanks again for taking the time to make this.

Invalid rack group when importing

When trying to use the text box for CSV to import racks I get:

Record 1 (group): Invalid rack group (site01 - group01)

So I manually added a single rack to the group, exported it, then tried re-importing it only to face the same issue.

site01,group01,r00,site01.r00,42

getting-started.md improvements

First off, my apologies this isn't in a pull request

  1. "ALLOWED_HOSTS"

I had to add 127.0.0.1 as nginx is calling it for the proxy

  1. gunicorn Configuration

You may want to elude to the command path needing to be checked, my path was sans local:

command = '/usr/bin/gunicorn'

Power outlets vs Power ports - Clarification?

For an APC 0U strip with 24 outlets am I guessing correctly that customer assignable outlets are just that, "Power outlets" and that the "power port" would be the breaker the PDU is interlocked with?

If you have a slack channel or another way you wish to handle general discussion versus opening issues I'm all ears.

Thanks =)

Add capability to clone items

It would be nice to be able to duplicate items where in only the name or other small bit of information is different.

Use case, I have a few different 0U PDU's all with 24 ports, being able to dupe them would be nice

Track available power per rack

Power Connections feels like an afterthought right now. There is no interface to add a PDU with a # of outlets, but you can import this information.

I think there should be a separate Power tab that is tied back to the individual rack. This would help greatly with tracking power circuits per rack (30A phase, etc) and their IDs.

Cannot Edit Rack after creation

Hi There,

If you try to edit a rack after it has been created - even without making a change and just hitting the save button we get the following error on the screen

image

Add a "select all" option when bulk editing/deleting objects

The current object list allows the user to select only the objects displayed on the current page, which is usually a subset of the total list matching the user's query. In order to apply a change to a number of objects greater than the pagination limit, the user needs to apply the change once per page in the query.

We should implement an option to select all of the objects returned by the user's query regardless of whether they are displayed on the current page.

Python3 Readiness

Some dependencies currently block this, but having a branch ready to go when those clear would be nice.

Add multitenancy support

Many entities which might use NetBox, particularly service providers, manage networks for many different customers. Currently, NetBox does not have any concept of distinct customers or organizations. This makes it very difficult to track which devices and other resources belong to which customer.

It should be fairly easy to extend NetBox's schema to include a Tenant object. Devices, Prefixes, and other objects could then optionally be associated with a Tenant via a ForeignKey field to track multitenant installations.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.