From 70397461eba6a44b5a2d7b33c9a25c7e8297badb Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 5 Mar 2020 10:47:12 -0500 Subject: [PATCH 01/27] Enable support for Markdown inclusions --- docs/requirements.txt | 2 ++ mkdocs.yml | 5 +++++ 2 files changed, 7 insertions(+) create mode 100644 docs/requirements.txt diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 000000000..35f116f37 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,2 @@ +mkdocs +git+https://github.com/cmacmackin/markdown-include.git diff --git a/mkdocs.yml b/mkdocs.yml index 7579a4b00..4dd560177 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,11 +1,16 @@ site_name: NetBox Documentation site_url: https://netbox.readthedocs.io/ repo_url: https://github.com/netbox-community/netbox +python: + install: + - requirements: docs/requirements.txt theme: name: readthedocs navigation_depth: 3 markdown_extensions: - admonition: + - markdown_include.include: + headingOffset: 1 nav: - Introduction: 'index.md' From b2bc1bf74ab728d0a415576a97c967957fa80f9d Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 5 Mar 2020 10:50:13 -0500 Subject: [PATCH 02/27] Refactor circuits docs --- docs/core-functionality/circuits.md | 35 ++++------------------ docs/models/circuits/circuit.md | 3 ++ docs/models/circuits/circuittermination.md | 11 +++++++ docs/models/circuits/circuittype.md | 10 +++++++ docs/models/circuits/provider.md | 5 ++++ 5 files changed, 35 insertions(+), 29 deletions(-) create mode 100644 docs/models/circuits/circuit.md create mode 100644 docs/models/circuits/circuittermination.md create mode 100644 docs/models/circuits/circuittype.md create mode 100644 docs/models/circuits/provider.md diff --git a/docs/core-functionality/circuits.md b/docs/core-functionality/circuits.md index f41c94ec6..e2c4fe614 100644 --- a/docs/core-functionality/circuits.md +++ b/docs/core-functionality/circuits.md @@ -1,34 +1,11 @@ -# 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. +Circuits are used to model communication links between sites. Each circuit is associated with a provider. -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!} diff --git a/docs/models/circuits/circuit.md b/docs/models/circuits/circuit.md new file mode 100644 index 000000000..47320495d --- /dev/null +++ b/docs/models/circuits/circuit.md @@ -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. diff --git a/docs/models/circuits/circuittermination.md b/docs/models/circuits/circuittermination.md new file mode 100644 index 000000000..a39236314 --- /dev/null +++ b/docs/models/circuits/circuittermination.md @@ -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. diff --git a/docs/models/circuits/circuittype.md b/docs/models/circuits/circuittype.md new file mode 100644 index 000000000..a9ae117b8 --- /dev/null +++ b/docs/models/circuits/circuittype.md @@ -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. \ No newline at end of file diff --git a/docs/models/circuits/provider.md b/docs/models/circuits/provider.md new file mode 100644 index 000000000..c8e19f6cd --- /dev/null +++ b/docs/models/circuits/provider.md @@ -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. From 92949ddcdb8d380c2cc999196afc11ac6a0d96b7 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 5 Mar 2020 11:05:48 -0500 Subject: [PATCH 03/27] Refactor device docs --- docs/core-functionality/devices.md | 82 ++++-------------------------- docs/models/dcim/cable.md | 19 +++++++ docs/models/dcim/device.md | 7 +++ docs/models/dcim/devicerole.md | 3 ++ docs/models/dcim/devicetype.md | 18 +++++++ docs/models/dcim/inventoryitem.md | 3 ++ docs/models/dcim/manufacutrer.md | 3 ++ docs/models/dcim/platform.md | 7 +++ docs/models/dcim/virtualchassis.md | 5 ++ 9 files changed, 76 insertions(+), 71 deletions(-) create mode 100644 docs/models/dcim/cable.md create mode 100644 docs/models/dcim/device.md create mode 100644 docs/models/dcim/devicerole.md create mode 100644 docs/models/dcim/devicetype.md create mode 100644 docs/models/dcim/inventoryitem.md create mode 100644 docs/models/dcim/manufacutrer.md create mode 100644 docs/models/dcim/platform.md create mode 100644 docs/models/dcim/virtualchassis.md diff --git a/docs/core-functionality/devices.md b/docs/core-functionality/devices.md index d170b374e..27b02e06c 100644 --- a/docs/core-functionality/devices.md +++ b/docs/core-functionality/devices.md @@ -1,27 +1,9 @@ -# Device Types +{!docs/models/dcim/devicetype.md!} +{!docs/models/dcim/manufacturer.md!} -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 +## Device Component Templates Each device type is assigned a number of component templates which define the physical components within a device. These are: @@ -48,13 +30,11 @@ Once component templates have been created, every new device that you create as --- -# Devices +{!docs/models/dcim/device.md!} +{!docs/models/dcim/devicerole.md!} +{!docs/models/dcim/platform.md!} -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 @@ -101,52 +81,12 @@ Child devices are first-class Devices in their own right: that is, fully indepen 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/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!} diff --git a/docs/models/dcim/cable.md b/docs/models/dcim/cable.md new file mode 100644 index 000000000..8b00a999d --- /dev/null +++ b/docs/models/dcim/cable.md @@ -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. diff --git a/docs/models/dcim/device.md b/docs/models/dcim/device.md new file mode 100644 index 000000000..9ec2875da --- /dev/null +++ b/docs/models/dcim/device.md @@ -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. diff --git a/docs/models/dcim/devicerole.md b/docs/models/dcim/devicerole.md new file mode 100644 index 000000000..315f81356 --- /dev/null +++ b/docs/models/dcim/devicerole.md @@ -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. diff --git a/docs/models/dcim/devicetype.md b/docs/models/dcim/devicetype.md new file mode 100644 index 000000000..1a10cee41 --- /dev/null +++ b/docs/models/dcim/devicetype.md @@ -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) diff --git a/docs/models/dcim/inventoryitem.md b/docs/models/dcim/inventoryitem.md new file mode 100644 index 000000000..b113dce1e --- /dev/null +++ b/docs/models/dcim/inventoryitem.md @@ -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. diff --git a/docs/models/dcim/manufacutrer.md b/docs/models/dcim/manufacutrer.md new file mode 100644 index 000000000..cee89291d --- /dev/null +++ b/docs/models/dcim/manufacutrer.md @@ -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. diff --git a/docs/models/dcim/platform.md b/docs/models/dcim/platform.md new file mode 100644 index 000000000..19528da13 --- /dev/null +++ b/docs/models/dcim/platform.md @@ -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. diff --git a/docs/models/dcim/virtualchassis.md b/docs/models/dcim/virtualchassis.md new file mode 100644 index 000000000..e1707918b --- /dev/null +++ b/docs/models/dcim/virtualchassis.md @@ -0,0 +1,5 @@ +# 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. From 6ba24c32968bc92544ae87310eeec5c82a8ce189 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 5 Mar 2020 11:10:09 -0500 Subject: [PATCH 04/27] Refactor site/rack docs --- docs/core-functionality/sites-and-racks.md | 54 +++------------------- docs/models/dcim/rack.md | 15 ++++++ docs/models/dcim/rackgroup.md | 7 +++ docs/models/dcim/rackreservation.md | 3 ++ docs/models/dcim/rackrole.md | 3 ++ docs/models/dcim/region.md | 3 ++ docs/models/dcim/site.md | 13 ++++++ 7 files changed, 50 insertions(+), 48 deletions(-) create mode 100644 docs/models/dcim/rack.md create mode 100644 docs/models/dcim/rackgroup.md create mode 100644 docs/models/dcim/rackreservation.md create mode 100644 docs/models/dcim/rackrole.md create mode 100644 docs/models/dcim/region.md create mode 100644 docs/models/dcim/site.md diff --git a/docs/core-functionality/sites-and-racks.md b/docs/core-functionality/sites-and-racks.md index f86e24b3e..54c65279e 100644 --- a/docs/core-functionality/sites-and-racks.md +++ b/docs/core-functionality/sites-and-racks.md @@ -1,51 +1,9 @@ -# Sites - -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. - -The name and facility ID of each rack within a group must be unique. (Racks not assigned to the same rack group may have identical names and/or facility IDs.) - -## 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!} diff --git a/docs/models/dcim/rack.md b/docs/models/dcim/rack.md new file mode 100644 index 000000000..39858b823 --- /dev/null +++ b/docs/models/dcim/rack.md @@ -0,0 +1,15 @@ +# 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. diff --git a/docs/models/dcim/rackgroup.md b/docs/models/dcim/rackgroup.md new file mode 100644 index 000000000..ad9df4eef --- /dev/null +++ b/docs/models/dcim/rackgroup.md @@ -0,0 +1,7 @@ +# 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. + +The name and facility ID of each rack within a group must be unique. (Racks not assigned to the same rack group may have identical names and/or facility IDs.) diff --git a/docs/models/dcim/rackreservation.md b/docs/models/dcim/rackreservation.md new file mode 100644 index 000000000..09de55553 --- /dev/null +++ b/docs/models/dcim/rackreservation.md @@ -0,0 +1,3 @@ +# Rack 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. diff --git a/docs/models/dcim/rackrole.md b/docs/models/dcim/rackrole.md new file mode 100644 index 000000000..63e9c1469 --- /dev/null +++ b/docs/models/dcim/rackrole.md @@ -0,0 +1,3 @@ +# 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. diff --git a/docs/models/dcim/region.md b/docs/models/dcim/region.md new file mode 100644 index 000000000..734467500 --- /dev/null +++ b/docs/models/dcim/region.md @@ -0,0 +1,3 @@ +# 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. diff --git a/docs/models/dcim/site.md b/docs/models/dcim/site.md new file mode 100644 index 000000000..b13056a99 --- /dev/null +++ b/docs/models/dcim/site.md @@ -0,0 +1,13 @@ +# Sites + +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. From a320b54c2f57228ffea82e37a7c94d1979bb1556 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 5 Mar 2020 11:13:06 -0500 Subject: [PATCH 05/27] Refactor power docs --- docs/core-functionality/power.md | 15 ++------------- .../dcim/{manufacutrer.md => manufacturer.md} | 0 docs/models/dcim/powerfeed.md | 8 ++++++++ docs/models/dcim/powerpanel.md | 3 +++ 4 files changed, 13 insertions(+), 13 deletions(-) rename docs/models/dcim/{manufacutrer.md => manufacturer.md} (100%) create mode 100644 docs/models/dcim/powerfeed.md create mode 100644 docs/models/dcim/powerpanel.md diff --git a/docs/core-functionality/power.md b/docs/core-functionality/power.md index 1eda1aa00..556e20d42 100644 --- a/docs/core-functionality/power.md +++ b/docs/core-functionality/power.md @@ -1,15 +1,5 @@ -# 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. - -# 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. +{!docs/models/dcim/powerpanel.md!} +{!docs/models/dcim/powerfeed.md!} # Power Outlet @@ -22,7 +12,6 @@ A power port is the inlet of a device where it draws its power. Power ports are !!! info If the draw of a power port is left empty, it will be dynamically calculated based on the power outlets associated with that power port. This is usually the case on the power ports of devices that supply power, like a PDU. - # Example Below is a simple diagram demonstrating how power is modelled in NetBox. diff --git a/docs/models/dcim/manufacutrer.md b/docs/models/dcim/manufacturer.md similarity index 100% rename from docs/models/dcim/manufacutrer.md rename to docs/models/dcim/manufacturer.md diff --git a/docs/models/dcim/powerfeed.md b/docs/models/dcim/powerfeed.md new file mode 100644 index 000000000..ab8621e14 --- /dev/null +++ b/docs/models/dcim/powerfeed.md @@ -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. diff --git a/docs/models/dcim/powerpanel.md b/docs/models/dcim/powerpanel.md new file mode 100644 index 000000000..3b05f8fad --- /dev/null +++ b/docs/models/dcim/powerpanel.md @@ -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. From 593374764dbb7c5e4d385da29d223414ff966325 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 5 Mar 2020 11:16:54 -0500 Subject: [PATCH 06/27] Refactor IPAM docs --- docs/core-functionality/ipam.md | 89 ++------------------------------ docs/core-functionality/vlans.md | 17 +----- docs/models/ipam/aggregate.md | 15 ++++++ docs/models/ipam/ipaddress.md | 31 +++++++++++ docs/models/ipam/prefix.md | 18 +++++++ docs/models/ipam/rir.md | 7 +++ docs/models/ipam/vlan.md | 11 ++++ docs/models/ipam/vlangroup.md | 3 ++ docs/models/ipam/vrf.md | 12 +++++ 9 files changed, 104 insertions(+), 99 deletions(-) create mode 100644 docs/models/ipam/aggregate.md create mode 100644 docs/models/ipam/ipaddress.md create mode 100644 docs/models/ipam/prefix.md create mode 100644 docs/models/ipam/rir.md create mode 100644 docs/models/ipam/vlan.md create mode 100644 docs/models/ipam/vlangroup.md create mode 100644 docs/models/ipam/vrf.md diff --git a/docs/core-functionality/ipam.md b/docs/core-functionality/ipam.md index cd95c40e6..2103ee71f 100644 --- a/docs/core-functionality/ipam.md +++ b/docs/core-functionality/ipam.md @@ -1,93 +1,14 @@ -# Aggregates - -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!} diff --git a/docs/core-functionality/vlans.md b/docs/core-functionality/vlans.md index a6babed44..03550ada4 100644 --- a/docs/core-functionality/vlans.md +++ b/docs/core-functionality/vlans.md @@ -1,15 +1,2 @@ -# VLANs - -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!} diff --git a/docs/models/ipam/aggregate.md b/docs/models/ipam/aggregate.md new file mode 100644 index 000000000..f43209619 --- /dev/null +++ b/docs/models/ipam/aggregate.md @@ -0,0 +1,15 @@ +# Aggregates + +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. diff --git a/docs/models/ipam/ipaddress.md b/docs/models/ipam/ipaddress.md new file mode 100644 index 000000000..cbe12553d --- /dev/null +++ b/docs/models/ipam/ipaddress.md @@ -0,0 +1,31 @@ +# 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. diff --git a/docs/models/ipam/prefix.md b/docs/models/ipam/prefix.md new file mode 100644 index 000000000..9ab5382a5 --- /dev/null +++ b/docs/models/ipam/prefix.md @@ -0,0 +1,18 @@ +# 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. diff --git a/docs/models/ipam/rir.md b/docs/models/ipam/rir.md new file mode 100644 index 000000000..69c34e72d --- /dev/null +++ b/docs/models/ipam/rir.md @@ -0,0 +1,7 @@ +# 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. diff --git a/docs/models/ipam/vlan.md b/docs/models/ipam/vlan.md new file mode 100644 index 000000000..48f24006c --- /dev/null +++ b/docs/models/ipam/vlan.md @@ -0,0 +1,11 @@ +# VLANs + +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. diff --git a/docs/models/ipam/vlangroup.md b/docs/models/ipam/vlangroup.md new file mode 100644 index 000000000..1fa31c522 --- /dev/null +++ b/docs/models/ipam/vlangroup.md @@ -0,0 +1,3 @@ +# 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. diff --git a/docs/models/ipam/vrf.md b/docs/models/ipam/vrf.md new file mode 100644 index 000000000..c3d3390e4 --- /dev/null +++ b/docs/models/ipam/vrf.md @@ -0,0 +1,12 @@ +# 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. From 7793f281c522982ecb575366e87f523dc4dda24c Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 5 Mar 2020 11:18:57 -0500 Subject: [PATCH 07/27] Refactor secrets docs --- docs/core-functionality/secrets.md | 55 ++---------------------------- docs/models/secrets/secret.md | 5 +++ docs/models/secrets/secretrole.md | 11 ++++++ docs/models/secrets/userkey.md | 35 +++++++++++++++++++ 4 files changed, 54 insertions(+), 52 deletions(-) create mode 100644 docs/models/secrets/secret.md create mode 100644 docs/models/secrets/secretrole.md create mode 100644 docs/models/secrets/userkey.md diff --git a/docs/core-functionality/secrets.md b/docs/core-functionality/secrets.md index 515dd8d07..64944c2d8 100644 --- a/docs/core-functionality/secrets.md +++ b/docs/core-functionality/secrets.md @@ -1,55 +1,6 @@ -# 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. - -## Supported Key Format - -Public key formats supported - -- PKCS#1 RSAPublicKey* (PEM header: BEGIN RSA PUBLIC KEY) -- X.509 SubjectPublicKeyInfo** (PEM header: BEGIN PUBLIC KEY) -- **OpenSSH line format is not supported.** - -Private key formats supported (unencrypted) - -- PKCS#1 RSAPrivateKey** (PEM header: BEGIN RSA PRIVATE KEY) -- PKCS#8 PrivateKeyInfo* (PEM header: BEGIN PRIVATE 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!} diff --git a/docs/models/secrets/secret.md b/docs/models/secrets/secret.md new file mode 100644 index 000000000..4c3482624 --- /dev/null +++ b/docs/models/secrets/secret.md @@ -0,0 +1,5 @@ +# 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. diff --git a/docs/models/secrets/secretrole.md b/docs/models/secrets/secretrole.md new file mode 100644 index 000000000..8997ed52a --- /dev/null +++ b/docs/models/secrets/secretrole.md @@ -0,0 +1,11 @@ +# Secret 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.) diff --git a/docs/models/secrets/userkey.md b/docs/models/secrets/userkey.md new file mode 100644 index 000000000..fd66c7bdb --- /dev/null +++ b/docs/models/secrets/userkey.md @@ -0,0 +1,35 @@ +# 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. + +## Supported Key Format + +Public key formats supported + +- PKCS#1 RSAPublicKey* (PEM header: BEGIN RSA PUBLIC KEY) +- X.509 SubjectPublicKeyInfo** (PEM header: BEGIN PUBLIC KEY) +- **OpenSSH line format is not supported.** + +Private key formats supported (unencrypted) + +- PKCS#1 RSAPrivateKey** (PEM header: BEGIN RSA PRIVATE KEY) +- PKCS#8 PrivateKeyInfo* (PEM header: BEGIN PRIVATE 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. From a061a038603b56bb47e1e6abc8c6182a1812ba48 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 5 Mar 2020 11:20:10 -0500 Subject: [PATCH 08/27] Refactor service docs --- docs/core-functionality/services.md | 6 +----- docs/models/ipam/service.md | 5 +++++ 2 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 docs/models/ipam/service.md diff --git a/docs/core-functionality/services.md b/docs/core-functionality/services.md index 057544a91..f7b71d296 100644 --- a/docs/core-functionality/services.md +++ b/docs/core-functionality/services.md @@ -1,5 +1 @@ -# Services - -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!} diff --git a/docs/models/ipam/service.md b/docs/models/ipam/service.md new file mode 100644 index 000000000..057544a91 --- /dev/null +++ b/docs/models/ipam/service.md @@ -0,0 +1,5 @@ +# Services + +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.) From b8b02c7b25044d671232772eccaced1910f0077d Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 5 Mar 2020 11:21:52 -0500 Subject: [PATCH 09/27] Refactor tenancy docs --- docs/core-functionality/tenancy.md | 22 ++-------------------- docs/models/tenancy/tenant.md | 16 ++++++++++++++++ docs/models/tenancy/tenantgroup.md | 3 +++ 3 files changed, 21 insertions(+), 20 deletions(-) create mode 100644 docs/models/tenancy/tenant.md create mode 100644 docs/models/tenancy/tenantgroup.md diff --git a/docs/core-functionality/tenancy.md b/docs/core-functionality/tenancy.md index e41d4a5b6..e877745ca 100644 --- a/docs/core-functionality/tenancy.md +++ b/docs/core-functionality/tenancy.md @@ -1,20 +1,2 @@ -# Tenants - -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!} diff --git a/docs/models/tenancy/tenant.md b/docs/models/tenancy/tenant.md new file mode 100644 index 000000000..f7cf68ab8 --- /dev/null +++ b/docs/models/tenancy/tenant.md @@ -0,0 +1,16 @@ +# Tenants + +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. diff --git a/docs/models/tenancy/tenantgroup.md b/docs/models/tenancy/tenantgroup.md new file mode 100644 index 000000000..48d9f4b6e --- /dev/null +++ b/docs/models/tenancy/tenantgroup.md @@ -0,0 +1,3 @@ +# 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. From f9c9cf9ad2b3e21fdd7bb99d1b4c11ae9366d595 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 5 Mar 2020 11:24:57 -0500 Subject: [PATCH 10/27] Refactor virtualization docs --- docs/core-functionality/virtual-machines.md | 28 +++----------------- docs/models/virtualization/cluster.md | 5 ++++ docs/models/virtualization/clustergroup.md | 3 +++ docs/models/virtualization/clustertype.md | 3 +++ docs/models/virtualization/virtualmachine.md | 11 ++++++++ 5 files changed, 26 insertions(+), 24 deletions(-) create mode 100644 docs/models/virtualization/cluster.md create mode 100644 docs/models/virtualization/clustergroup.md create mode 100644 docs/models/virtualization/clustertype.md create mode 100644 docs/models/virtualization/virtualmachine.md diff --git a/docs/core-functionality/virtual-machines.md b/docs/core-functionality/virtual-machines.md index 1957c114e..cb76a7885 100644 --- a/docs/core-functionality/virtual-machines.md +++ b/docs/core-functionality/virtual-machines.md @@ -1,27 +1,7 @@ -# 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. +{!docs/models/virtualization/cluster.md!} +{!docs/models/virtualization/clustertype.md!} +{!docs/models/virtualization/clustergroup.md!} --- -# 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) +{!docs/models/virtualization/virtualmachine.md!} diff --git a/docs/models/virtualization/cluster.md b/docs/models/virtualization/cluster.md new file mode 100644 index 000000000..6d8ce4214 --- /dev/null +++ b/docs/models/virtualization/cluster.md @@ -0,0 +1,5 @@ +# 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. diff --git a/docs/models/virtualization/clustergroup.md b/docs/models/virtualization/clustergroup.md new file mode 100644 index 000000000..9e1e17315 --- /dev/null +++ b/docs/models/virtualization/clustergroup.md @@ -0,0 +1,3 @@ +# Cluster Groups + +Cluster groups may be created for the purpose of organizing clusters. The assignment of clusters to groups is optional. diff --git a/docs/models/virtualization/clustertype.md b/docs/models/virtualization/clustertype.md new file mode 100644 index 000000000..cee557df3 --- /dev/null +++ b/docs/models/virtualization/clustertype.md @@ -0,0 +1,3 @@ +# 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. diff --git a/docs/models/virtualization/virtualmachine.md b/docs/models/virtualization/virtualmachine.md new file mode 100644 index 000000000..5a82f8267 --- /dev/null +++ b/docs/models/virtualization/virtualmachine.md @@ -0,0 +1,11 @@ +# 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) From 04ddc0487a8d0b9941f9d4e3a3e79aac4ce94284 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 5 Mar 2020 11:26:10 -0500 Subject: [PATCH 11/27] Standardize circuits page --- docs/core-functionality/circuits.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/core-functionality/circuits.md b/docs/core-functionality/circuits.md index e2c4fe614..63a1a5204 100644 --- a/docs/core-functionality/circuits.md +++ b/docs/core-functionality/circuits.md @@ -1,7 +1,3 @@ -# Circuits - -Circuits are used to model communication links between sites. Each circuit is associated with a provider. - {!docs/models/circuits/provider.md!} --- From 5190710aeffb05d1db10e4b9bcc7bf872e35930a Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 5 Mar 2020 11:44:18 -0500 Subject: [PATCH 12/27] Refactored device component docs --- docs/core-functionality/device-types.md | 29 +++++++++ docs/core-functionality/devices.md | 85 +++---------------------- docs/core-functionality/power.md | 15 +---- docs/models/dcim/consoleport.md | 5 ++ docs/models/dcim/consoleserverport.md | 5 ++ docs/models/dcim/devicebay.md | 7 ++ docs/models/dcim/frontport.md | 5 ++ docs/models/dcim/interface.md | 9 +++ docs/models/dcim/poweroutlet.md | 3 + docs/models/dcim/powerport.md | 6 ++ docs/models/dcim/rearport.md | 5 ++ 11 files changed, 84 insertions(+), 90 deletions(-) create mode 100644 docs/core-functionality/device-types.md create mode 100644 docs/models/dcim/consoleport.md create mode 100644 docs/models/dcim/consoleserverport.md create mode 100644 docs/models/dcim/devicebay.md create mode 100644 docs/models/dcim/frontport.md create mode 100644 docs/models/dcim/interface.md create mode 100644 docs/models/dcim/poweroutlet.md create mode 100644 docs/models/dcim/powerport.md create mode 100644 docs/models/dcim/rearport.md diff --git a/docs/core-functionality/device-types.md b/docs/core-functionality/device-types.md new file mode 100644 index 000000000..0f59ac84e --- /dev/null +++ b/docs/core-functionality/device-types.md @@ -0,0 +1,29 @@ +{!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. diff --git a/docs/core-functionality/devices.md b/docs/core-functionality/devices.md index 27b02e06c..2ceb5dc6f 100644 --- a/docs/core-functionality/devices.md +++ b/docs/core-functionality/devices.md @@ -1,86 +1,17 @@ -{!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/device.md!} {!docs/models/dcim/devicerole.md!} {!docs/models/dcim/platform.md!} --- -## 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. - +{!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!} --- diff --git a/docs/core-functionality/power.md b/docs/core-functionality/power.md index 556e20d42..b5d4ff991 100644 --- a/docs/core-functionality/power.md +++ b/docs/core-functionality/power.md @@ -1,20 +1,9 @@ {!docs/models/dcim/powerpanel.md!} {!docs/models/dcim/powerfeed.md!} -# Power Outlet +# Example Power Topology -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. - -# Power Port - -A power port is the inlet of a device where it draws its power. Power ports are upstream-facing towards power outlets. Alternatively, a power port can connect to a power feed – as mentioned in the power feed section – to indicate the power source of a PDU's inlet. - -!!! info - If the draw of a power port is left empty, it will be dynamically calculated based on the power outlets associated with that power port. This is usually the case on the power ports of devices that supply power, like a PDU. - -# Example - -Below is a simple diagram demonstrating how power is modelled in NetBox. +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. diff --git a/docs/models/dcim/consoleport.md b/docs/models/dcim/consoleport.md new file mode 100644 index 000000000..bcab4ddd0 --- /dev/null +++ b/docs/models/dcim/consoleport.md @@ -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. diff --git a/docs/models/dcim/consoleserverport.md b/docs/models/dcim/consoleserverport.md new file mode 100644 index 000000000..855084e23 --- /dev/null +++ b/docs/models/dcim/consoleserverport.md @@ -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. diff --git a/docs/models/dcim/devicebay.md b/docs/models/dcim/devicebay.md new file mode 100644 index 000000000..453b424f4 --- /dev/null +++ b/docs/models/dcim/devicebay.md @@ -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. diff --git a/docs/models/dcim/frontport.md b/docs/models/dcim/frontport.md new file mode 100644 index 000000000..5719025b6 --- /dev/null +++ b/docs/models/dcim/frontport.md @@ -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. \ No newline at end of file diff --git a/docs/models/dcim/interface.md b/docs/models/dcim/interface.md new file mode 100644 index 000000000..9d3c0b78c --- /dev/null +++ b/docs/models/dcim/interface.md @@ -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.) diff --git a/docs/models/dcim/poweroutlet.md b/docs/models/dcim/poweroutlet.md new file mode 100644 index 000000000..ef2891a97 --- /dev/null +++ b/docs/models/dcim/poweroutlet.md @@ -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. diff --git a/docs/models/dcim/powerport.md b/docs/models/dcim/powerport.md new file mode 100644 index 000000000..ef115505d --- /dev/null +++ b/docs/models/dcim/powerport.md @@ -0,0 +1,6 @@ +# Power Ports + +A power port is the inlet of a device where it draws its power. Power ports are upstream-facing towards power outlets. Alternatively, a power port can connect to a power feed – as mentioned in the power feed section – to indicate the power source of a PDU's inlet. + +!!! info + If the draw of a power port is left empty, it will be dynamically calculated based on the power outlets associated with that power port. This is usually the case on the power ports of devices that supply power, like a PDU. diff --git a/docs/models/dcim/rearport.md b/docs/models/dcim/rearport.md new file mode 100644 index 000000000..5d6171c8d --- /dev/null +++ b/docs/models/dcim/rearport.md @@ -0,0 +1,5 @@ +# Rear Ports + +Like front ports, rear ports are pass-through ports which represent the end of a particular cable segment in a path. Each rear port is defined with a number of positions: rear ports with more than one position can be mapped to multiple front ports. 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). + +Note that front and rear ports need not necessarily reside on the actual front or rear device face. This terminology is used primarily to distinguish between the two components in a pass-through port pairing. From 8a2381183146417dadc90b7a8bbd1e3c2a056a45 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 5 Mar 2020 13:48:16 -0500 Subject: [PATCH 13/27] Add missing model doc pages --- docs/additional-features/context-data.md | 6 +----- docs/models/extras/configcontext.md | 5 +++++ docs/models/ipam/role.md | 3 +++ 3 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 docs/models/extras/configcontext.md create mode 100644 docs/models/ipam/role.md diff --git a/docs/additional-features/context-data.md b/docs/additional-features/context-data.md index 465b4d2dc..62d5d63f1 100644 --- a/docs/additional-features/context-data.md +++ b/docs/additional-features/context-data.md @@ -1,5 +1 @@ -# Contextual Configuration 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!} \ No newline at end of file diff --git a/docs/models/extras/configcontext.md b/docs/models/extras/configcontext.md new file mode 100644 index 000000000..380e631d8 --- /dev/null +++ b/docs/models/extras/configcontext.md @@ -0,0 +1,5 @@ +# Configuration Contexts + +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. diff --git a/docs/models/ipam/role.md b/docs/models/ipam/role.md new file mode 100644 index 000000000..8623e5282 --- /dev/null +++ b/docs/models/ipam/role.md @@ -0,0 +1,3 @@ +# Prefix/VLAN Roles + +A role indicates the function of a prefix or VLAN. For example, you might define Data, Voice, and Security roles. Generally, a prefix will be assigned the same functional role as the VLAN to which it is assigned (if any). From defe59d79e7bbefe7de560b0d58cceb14bdd31e9 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 5 Mar 2020 13:52:34 -0500 Subject: [PATCH 14/27] Introduce get_docs() template filter for models --- netbox/utilities/templatetags/helpers.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/netbox/utilities/templatetags/helpers.py b/netbox/utilities/templatetags/helpers.py index dfeddd31a..b4578b9f9 100644 --- a/netbox/utilities/templatetags/helpers.py +++ b/netbox/utilities/templatetags/helpers.py @@ -216,6 +216,20 @@ def percentage(x, y): return round(x / y * 100) +@register.filter() +def get_docs(model): + """ + Render and return documentation for the specified model. + """ + path = '../docs/models/{}/{}.md'.format(model._meta.app_label, model._meta.model_name) + with open(path) as docfile: + content = docfile.read() + + content = markdown(content, extensions=['mdx_gfm']) + + return mark_safe(content) + + # # Tags # From 9f42bce16a5dfbf65f5ea490e067f0487171ab65 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 5 Mar 2020 13:55:27 -0500 Subject: [PATCH 15/27] Update modal template --- netbox/templates/circuits/provider.html | 2 +- netbox/templates/dcim/device.html | 2 +- netbox/templates/dcim/site.html | 2 +- netbox/templates/inc/modal.html | 14 +++++++++----- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/netbox/templates/circuits/provider.html b/netbox/templates/circuits/provider.html index e99f8b2c4..7472366c5 100644 --- a/netbox/templates/circuits/provider.html +++ b/netbox/templates/circuits/provider.html @@ -134,7 +134,7 @@ {% include 'inc/paginator.html' with paginator=circuits_table.paginator page=circuits_table.page %} -{% include 'inc/modal.html' with modal_name='graphs' %} +{% include 'inc/modal.html' with name='graphs' title='Graphs' %} {% endblock %} {% block javascript %} diff --git a/netbox/templates/dcim/device.html b/netbox/templates/dcim/device.html index 624e8d9ef..5ab28b409 100644 --- a/netbox/templates/dcim/device.html +++ b/netbox/templates/dcim/device.html @@ -873,7 +873,7 @@ {% endif %} -{% include 'inc/modal.html' with modal_name='graphs' %} +{% include 'inc/modal.html' with name='graphs' title='Graphs' %} {% include 'secrets/inc/private_key_modal.html' %} {% endblock %} diff --git a/netbox/templates/dcim/site.html b/netbox/templates/dcim/site.html index dfbf65aeb..5e26b9a22 100644 --- a/netbox/templates/dcim/site.html +++ b/netbox/templates/dcim/site.html @@ -288,7 +288,7 @@ -{% include 'inc/modal.html' with modal_name='graphs' %} +{% include 'inc/modal.html' with name='graphs' title='Graphs' %} {% endblock %} {% block javascript %} diff --git a/netbox/templates/inc/modal.html b/netbox/templates/inc/modal.html index b70b9115f..7a2ff85c2 100644 --- a/netbox/templates/inc/modal.html +++ b/netbox/templates/inc/modal.html @@ -1,11 +1,15 @@ - - {% include 'inc/modal.html' with name='docs' title='Documentation' content=obj|get_docs %} + {% include 'inc/modal.html' with name='docs' content=obj|get_docs %} {% endblock %} From 1657d6a0b86ccdbf655f38b997ea327fcba0739e Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 5 Mar 2020 15:16:15 -0500 Subject: [PATCH 19/27] Add missing docs page for tags --- docs/additional-features/context-data.md | 2 +- docs/additional-features/tags.md | 25 +----------------------- docs/models/extras/tag.md | 24 +++++++++++++++++++++++ 3 files changed, 26 insertions(+), 25 deletions(-) create mode 100644 docs/models/extras/tag.md diff --git a/docs/additional-features/context-data.md b/docs/additional-features/context-data.md index 62d5d63f1..f80203898 100644 --- a/docs/additional-features/context-data.md +++ b/docs/additional-features/context-data.md @@ -1 +1 @@ -{!docs/models/extras/configcontext.md!} \ No newline at end of file +{!docs/models/extras/configcontext.md!} diff --git a/docs/additional-features/tags.md b/docs/additional-features/tags.md index f94957616..84f0f5573 100644 --- a/docs/additional-features/tags.md +++ b/docs/additional-features/tags.md @@ -1,24 +1 @@ -# Tags - -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!} diff --git a/docs/models/extras/tag.md b/docs/models/extras/tag.md new file mode 100644 index 000000000..f94957616 --- /dev/null +++ b/docs/models/extras/tag.md @@ -0,0 +1,24 @@ +# Tags + +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" + ], + ... +} +``` From 57df250128adf6c12b0a85fed3d53b18bf8cf81a Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 5 Mar 2020 15:24:02 -0500 Subject: [PATCH 20/27] Add doc pages for device component templates --- docs/models/dcim/consoleporttemplate.md | 3 +++ docs/models/dcim/consoleserverporttemplate.md | 3 +++ docs/models/dcim/devicebaytemplate.md | 3 +++ docs/models/dcim/frontporttemplate.md | 3 +++ docs/models/dcim/interfacetemplate.md | 3 +++ docs/models/dcim/poweroutlettemplate.md | 3 +++ docs/models/dcim/powerporttemplate.md | 3 +++ docs/models/dcim/rearporttemplate.md | 3 +++ 8 files changed, 24 insertions(+) create mode 100644 docs/models/dcim/consoleporttemplate.md create mode 100644 docs/models/dcim/consoleserverporttemplate.md create mode 100644 docs/models/dcim/devicebaytemplate.md create mode 100644 docs/models/dcim/frontporttemplate.md create mode 100644 docs/models/dcim/interfacetemplate.md create mode 100644 docs/models/dcim/poweroutlettemplate.md create mode 100644 docs/models/dcim/powerporttemplate.md create mode 100644 docs/models/dcim/rearporttemplate.md diff --git a/docs/models/dcim/consoleporttemplate.md b/docs/models/dcim/consoleporttemplate.md new file mode 100644 index 000000000..3dec8d773 --- /dev/null +++ b/docs/models/dcim/consoleporttemplate.md @@ -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. diff --git a/docs/models/dcim/consoleserverporttemplate.md b/docs/models/dcim/consoleserverporttemplate.md new file mode 100644 index 000000000..66e9000cc --- /dev/null +++ b/docs/models/dcim/consoleserverporttemplate.md @@ -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. diff --git a/docs/models/dcim/devicebaytemplate.md b/docs/models/dcim/devicebaytemplate.md new file mode 100644 index 000000000..d7c29755b --- /dev/null +++ b/docs/models/dcim/devicebaytemplate.md @@ -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. diff --git a/docs/models/dcim/frontporttemplate.md b/docs/models/dcim/frontporttemplate.md new file mode 100644 index 000000000..3c036879e --- /dev/null +++ b/docs/models/dcim/frontporttemplate.md @@ -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. diff --git a/docs/models/dcim/interfacetemplate.md b/docs/models/dcim/interfacetemplate.md new file mode 100644 index 000000000..8ba2c8ee8 --- /dev/null +++ b/docs/models/dcim/interfacetemplate.md @@ -0,0 +1,3 @@ +# Interface Templates + +A template for an interface that will be created on all instantiations of the parent device type. diff --git a/docs/models/dcim/poweroutlettemplate.md b/docs/models/dcim/poweroutlettemplate.md new file mode 100644 index 000000000..9928c2345 --- /dev/null +++ b/docs/models/dcim/poweroutlettemplate.md @@ -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. diff --git a/docs/models/dcim/powerporttemplate.md b/docs/models/dcim/powerporttemplate.md new file mode 100644 index 000000000..bfaaece29 --- /dev/null +++ b/docs/models/dcim/powerporttemplate.md @@ -0,0 +1,3 @@ +# Power Port Templates + +A template for a power port that will be created on all instantiations of the parent device type. diff --git a/docs/models/dcim/rearporttemplate.md b/docs/models/dcim/rearporttemplate.md new file mode 100644 index 000000000..73415b4ff --- /dev/null +++ b/docs/models/dcim/rearporttemplate.md @@ -0,0 +1,3 @@ +# Rear Port Templates + +A template for a rear-facing pass-through port that will be created on all instantiations of the parent device type. From b9d66f010f46ffb86c8a17ae68aa54eb07902e5d Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 5 Mar 2020 16:26:23 -0500 Subject: [PATCH 21/27] Add missing nav link for device types --- mkdocs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/mkdocs.yml b/mkdocs.yml index 4dd560177..9747f450f 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -32,6 +32,7 @@ nav: - VLANs: 'core-functionality/vlans.md' - Sites and Racks: 'core-functionality/sites-and-racks.md' - Devices: 'core-functionality/devices.md' + - Device Types: 'core-functionality/device-types.md' - Virtual Machines: 'core-functionality/virtual-machines.md' - Services: 'core-functionality/services.md' - Circuits: 'core-functionality/circuits.md' From 363c4acadce894d3c534a238a1e98122dee807f1 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 5 Mar 2020 16:30:12 -0500 Subject: [PATCH 22/27] Drop GitHub-flavored Markdown (py-gfm) --- base_requirements.txt | 4 ---- netbox/utilities/forms.py | 6 +++--- netbox/utilities/templatetags/helpers.py | 11 ++++++----- requirements.txt | 3 +-- 4 files changed, 10 insertions(+), 14 deletions(-) diff --git a/base_requirements.txt b/base_requirements.txt index ab33b1c06..f5a4a8685 100644 --- a/base_requirements.txt +++ b/base_requirements.txt @@ -83,10 +83,6 @@ 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 diff --git a/netbox/utilities/forms.py b/netbox/utilities/forms.py index c57996a43..8825102d1 100644 --- a/netbox/utilities/forms.py +++ b/netbox/utilities/forms.py @@ -498,14 +498,14 @@ class ExpandableIPAddressField(forms.CharField): class CommentField(forms.CharField): """ - A textarea with support for GitHub-Flavored Markdown. Exists mostly just to add a standard help_text. + A textarea with support for Markdown rendering. Exists mostly just to add a standard help_text. """ widget = forms.Textarea default_label = '' - # TODO: Port GFM syntax cheat sheet to internal documentation + # TODO: Port Markdown cheat sheet to internal documentation default_helptext = ' '\ ''\ - 'GitHub-Flavored Markdown syntax is supported' + 'Markdown syntax is supported' def __init__(self, *args, **kwargs): required = kwargs.pop('required', False) diff --git a/netbox/utilities/templatetags/helpers.py b/netbox/utilities/templatetags/helpers.py index 4d957b63f..a57cfc66d 100644 --- a/netbox/utilities/templatetags/helpers.py +++ b/netbox/utilities/templatetags/helpers.py @@ -55,16 +55,17 @@ def getkey(value, key): return value[key] +# TODO: Rename this filter as py-gfm is no longer in use @register.filter(is_safe=True) def gfm(value): """ - Render text as GitHub-Flavored Markdown + Render text as Markdown """ # Strip HTML tags value = strip_tags(value) - # Render Markdown with GitHub-flavored extension - html = markdown(value, extensions=['gfm']) + # Render Markdown + html = markdown(value, extensions=['fenced_code']) return mark_safe(html) @@ -225,8 +226,8 @@ def get_docs(model): with open(path) as docfile: content = docfile.read() - # Render Markdown with GFM, admonition - content = markdown(content, extensions=['gfm', 'admonition']) + # Render Markdown with the admonition extension + content = markdown(content, extensions=['admonition', 'fenced_code']) return mark_safe(content) diff --git a/requirements.txt b/requirements.txt index d8e704874..459515c96 100644 --- a/requirements.txt +++ b/requirements.txt @@ -15,11 +15,10 @@ djangorestframework==3.10.3 drf-yasg[validation]==1.17.0 gunicorn==20.0.4 Jinja2==2.10.3 -Markdown==2.6.11 +Markdown==3.2.1 netaddr==0.7.19 Pillow==7.0.0 psycopg2-binary==2.8.4 -py-gfm==0.1.4 pycryptodome==3.9.4 PyYAML==5.3 redis==3.3.11 From f89773f4a305c68d2da89b7c1cad507c2f1d9330 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 5 Mar 2020 17:03:03 -0500 Subject: [PATCH 23/27] Cleaned up model documentation hierarchy --- docs/core-functionality/circuits.md | 2 ++ docs/core-functionality/device-types.md | 11 +++++++++++ docs/core-functionality/devices.md | 4 ++++ docs/core-functionality/ipam.md | 2 ++ docs/core-functionality/power.md | 2 ++ docs/core-functionality/secrets.md | 2 ++ docs/core-functionality/services.md | 2 ++ docs/core-functionality/sites-and-racks.md | 2 ++ docs/core-functionality/tenancy.md | 2 ++ .../{virtual-machines.md => virtualization.md} | 2 ++ docs/core-functionality/vlans.md | 2 ++ docs/models/dcim/consoleport.md | 2 +- docs/models/dcim/consoleporttemplate.md | 2 +- docs/models/dcim/consoleserverport.md | 2 +- docs/models/dcim/consoleserverporttemplate.md | 2 +- docs/models/dcim/devicebay.md | 2 +- docs/models/dcim/devicebaytemplate.md | 2 +- docs/models/dcim/frontport.md | 2 +- docs/models/dcim/frontporttemplate.md | 2 +- docs/models/dcim/interface.md | 2 +- docs/models/dcim/interfacetemplate.md | 2 +- docs/models/dcim/poweroutlet.md | 2 +- docs/models/dcim/poweroutlettemplate.md | 2 +- docs/models/dcim/powerport.md | 2 +- docs/models/dcim/powerporttemplate.md | 2 +- docs/models/dcim/rearport.md | 2 +- docs/models/dcim/rearporttemplate.md | 2 +- mkdocs.yml | 14 +++++++------- 28 files changed, 56 insertions(+), 23 deletions(-) rename docs/core-functionality/{virtual-machines.md => virtualization.md} (85%) diff --git a/docs/core-functionality/circuits.md b/docs/core-functionality/circuits.md index 63a1a5204..43b911308 100644 --- a/docs/core-functionality/circuits.md +++ b/docs/core-functionality/circuits.md @@ -1,3 +1,5 @@ +# Circuits + {!docs/models/circuits/provider.md!} --- diff --git a/docs/core-functionality/device-types.md b/docs/core-functionality/device-types.md index 0f59ac84e..a965f51f0 100644 --- a/docs/core-functionality/device-types.md +++ b/docs/core-functionality/device-types.md @@ -1,3 +1,5 @@ +# Device Types + {!docs/models/dcim/devicetype.md!} {!docs/models/dcim/manufacturer.md!} @@ -27,3 +29,12 @@ Once component templates have been created, every new device that you create as !!! 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!} diff --git a/docs/core-functionality/devices.md b/docs/core-functionality/devices.md index 2ceb5dc6f..96dcf866d 100644 --- a/docs/core-functionality/devices.md +++ b/docs/core-functionality/devices.md @@ -1,9 +1,13 @@ +# Devices and Cabling + {!docs/models/dcim/device.md!} {!docs/models/dcim/devicerole.md!} {!docs/models/dcim/platform.md!} --- +## Device Components + {!docs/models/dcim/consoleport.md!} {!docs/models/dcim/consoleserverport.md!} {!docs/models/dcim/powerport.md!} diff --git a/docs/core-functionality/ipam.md b/docs/core-functionality/ipam.md index 2103ee71f..38572cb25 100644 --- a/docs/core-functionality/ipam.md +++ b/docs/core-functionality/ipam.md @@ -1,3 +1,5 @@ +# IP Address Management + {!docs/models/ipam/aggregate.md!} {!docs/models/ipam/rir.md!} diff --git a/docs/core-functionality/power.md b/docs/core-functionality/power.md index b5d4ff991..026acd602 100644 --- a/docs/core-functionality/power.md +++ b/docs/core-functionality/power.md @@ -1,3 +1,5 @@ +# Power Tracking + {!docs/models/dcim/powerpanel.md!} {!docs/models/dcim/powerfeed.md!} diff --git a/docs/core-functionality/secrets.md b/docs/core-functionality/secrets.md index 64944c2d8..68771310c 100644 --- a/docs/core-functionality/secrets.md +++ b/docs/core-functionality/secrets.md @@ -1,3 +1,5 @@ +# Secrets + {!docs/models/secrets/secret.md!} {!docs/models/secrets/secretrole.md!} diff --git a/docs/core-functionality/services.md b/docs/core-functionality/services.md index f7b71d296..4d4256081 100644 --- a/docs/core-functionality/services.md +++ b/docs/core-functionality/services.md @@ -1 +1,3 @@ +# Service Mapping + {!docs/models/ipam/service.md!} diff --git a/docs/core-functionality/sites-and-racks.md b/docs/core-functionality/sites-and-racks.md index 54c65279e..073756fa1 100644 --- a/docs/core-functionality/sites-and-racks.md +++ b/docs/core-functionality/sites-and-racks.md @@ -1,3 +1,5 @@ +# Sites and Racks + {!docs/models/dcim/site.md!} {!docs/models/dcim/region.md!} diff --git a/docs/core-functionality/tenancy.md b/docs/core-functionality/tenancy.md index e877745ca..540955698 100644 --- a/docs/core-functionality/tenancy.md +++ b/docs/core-functionality/tenancy.md @@ -1,2 +1,4 @@ +# Tenancy Assignment + {!docs/models/tenancy/tenant.md!} {!docs/models/tenancy/tenantgroup.md!} diff --git a/docs/core-functionality/virtual-machines.md b/docs/core-functionality/virtualization.md similarity index 85% rename from docs/core-functionality/virtual-machines.md rename to docs/core-functionality/virtualization.md index cb76a7885..b2bab2b7d 100644 --- a/docs/core-functionality/virtual-machines.md +++ b/docs/core-functionality/virtualization.md @@ -1,3 +1,5 @@ +# Virtual Machines and Clusters + {!docs/models/virtualization/cluster.md!} {!docs/models/virtualization/clustertype.md!} {!docs/models/virtualization/clustergroup.md!} diff --git a/docs/core-functionality/vlans.md b/docs/core-functionality/vlans.md index 03550ada4..cf1c73fe3 100644 --- a/docs/core-functionality/vlans.md +++ b/docs/core-functionality/vlans.md @@ -1,2 +1,4 @@ +# VLAN Management + {!docs/models/ipam/vlan.md!} {!docs/models/ipam/vlangroup.md!} diff --git a/docs/models/dcim/consoleport.md b/docs/models/dcim/consoleport.md index bcab4ddd0..4d3a089c5 100644 --- a/docs/models/dcim/consoleport.md +++ b/docs/models/dcim/consoleport.md @@ -1,4 +1,4 @@ -# Console Ports +## 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. diff --git a/docs/models/dcim/consoleporttemplate.md b/docs/models/dcim/consoleporttemplate.md index 3dec8d773..86281cb92 100644 --- a/docs/models/dcim/consoleporttemplate.md +++ b/docs/models/dcim/consoleporttemplate.md @@ -1,3 +1,3 @@ -# Console Port Templates +## Console Port Templates A template for a console port that will be created on all instantiations of the parent device type. diff --git a/docs/models/dcim/consoleserverport.md b/docs/models/dcim/consoleserverport.md index 855084e23..55aefd733 100644 --- a/docs/models/dcim/consoleserverport.md +++ b/docs/models/dcim/consoleserverport.md @@ -1,4 +1,4 @@ -# Console Server Ports +## 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. diff --git a/docs/models/dcim/consoleserverporttemplate.md b/docs/models/dcim/consoleserverporttemplate.md index 66e9000cc..ed99adb11 100644 --- a/docs/models/dcim/consoleserverporttemplate.md +++ b/docs/models/dcim/consoleserverporttemplate.md @@ -1,3 +1,3 @@ -# Console Server Port Templates +## Console Server Port Templates A template for a console server port that will be created on all instantiations of the parent device type. diff --git a/docs/models/dcim/devicebay.md b/docs/models/dcim/devicebay.md index 453b424f4..cdcd5657d 100644 --- a/docs/models/dcim/devicebay.md +++ b/docs/models/dcim/devicebay.md @@ -1,4 +1,4 @@ -# Device Bays +## 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. diff --git a/docs/models/dcim/devicebaytemplate.md b/docs/models/dcim/devicebaytemplate.md index d7c29755b..ebf7bd63c 100644 --- a/docs/models/dcim/devicebaytemplate.md +++ b/docs/models/dcim/devicebaytemplate.md @@ -1,3 +1,3 @@ -# Device Bay Templates +## Device Bay Templates A template for a device bay that will be created on all instantiations of the parent device type. diff --git a/docs/models/dcim/frontport.md b/docs/models/dcim/frontport.md index 5719025b6..12b9cfc16 100644 --- a/docs/models/dcim/frontport.md +++ b/docs/models/dcim/frontport.md @@ -1,4 +1,4 @@ -# Front Ports +## 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. diff --git a/docs/models/dcim/frontporttemplate.md b/docs/models/dcim/frontporttemplate.md index 3c036879e..b32349519 100644 --- a/docs/models/dcim/frontporttemplate.md +++ b/docs/models/dcim/frontporttemplate.md @@ -1,3 +1,3 @@ -# Front Port Templates +## Front Port Templates A template for a front-facing pass-through port that will be created on all instantiations of the parent device type. diff --git a/docs/models/dcim/interface.md b/docs/models/dcim/interface.md index 9d3c0b78c..cbccbec8d 100644 --- a/docs/models/dcim/interface.md +++ b/docs/models/dcim/interface.md @@ -1,4 +1,4 @@ -# Interfaces +## 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*. diff --git a/docs/models/dcim/interfacetemplate.md b/docs/models/dcim/interfacetemplate.md index 8ba2c8ee8..07fc3a65b 100644 --- a/docs/models/dcim/interfacetemplate.md +++ b/docs/models/dcim/interfacetemplate.md @@ -1,3 +1,3 @@ -# Interface Templates +## Interface Templates A template for an interface that will be created on all instantiations of the parent device type. diff --git a/docs/models/dcim/poweroutlet.md b/docs/models/dcim/poweroutlet.md index ef2891a97..0ec93856e 100644 --- a/docs/models/dcim/poweroutlet.md +++ b/docs/models/dcim/poweroutlet.md @@ -1,3 +1,3 @@ -# Power Outlets +## 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. diff --git a/docs/models/dcim/poweroutlettemplate.md b/docs/models/dcim/poweroutlettemplate.md index 9928c2345..e5b54af23 100644 --- a/docs/models/dcim/poweroutlettemplate.md +++ b/docs/models/dcim/poweroutlettemplate.md @@ -1,3 +1,3 @@ -# Power Outlet Templates +## Power Outlet Templates A template for a power outlet that will be created on all instantiations of the parent device type. diff --git a/docs/models/dcim/powerport.md b/docs/models/dcim/powerport.md index ef115505d..6027fa98b 100644 --- a/docs/models/dcim/powerport.md +++ b/docs/models/dcim/powerport.md @@ -1,4 +1,4 @@ -# Power Ports +## Power Ports A power port is the inlet of a device where it draws its power. Power ports are upstream-facing towards power outlets. Alternatively, a power port can connect to a power feed – as mentioned in the power feed section – to indicate the power source of a PDU's inlet. diff --git a/docs/models/dcim/powerporttemplate.md b/docs/models/dcim/powerporttemplate.md index bfaaece29..b6e64be01 100644 --- a/docs/models/dcim/powerporttemplate.md +++ b/docs/models/dcim/powerporttemplate.md @@ -1,3 +1,3 @@ -# Power Port Templates +## Power Port Templates A template for a power port that will be created on all instantiations of the parent device type. diff --git a/docs/models/dcim/rearport.md b/docs/models/dcim/rearport.md index 5d6171c8d..8c8136338 100644 --- a/docs/models/dcim/rearport.md +++ b/docs/models/dcim/rearport.md @@ -1,4 +1,4 @@ -# Rear Ports +## Rear Ports Like front ports, rear ports are pass-through ports which represent the end of a particular cable segment in a path. Each rear port is defined with a number of positions: rear ports with more than one position can be mapped to multiple front ports. 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). diff --git a/docs/models/dcim/rearporttemplate.md b/docs/models/dcim/rearporttemplate.md index 73415b4ff..448c0befd 100644 --- a/docs/models/dcim/rearporttemplate.md +++ b/docs/models/dcim/rearporttemplate.md @@ -1,3 +1,3 @@ -# Rear Port Templates +## Rear Port Templates A template for a rear-facing pass-through port that will be created on all instantiations of the parent device type. diff --git a/mkdocs.yml b/mkdocs.yml index 9747f450f..5dc45da16 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -6,7 +6,7 @@ python: - requirements: docs/requirements.txt theme: name: readthedocs - navigation_depth: 3 + navigation_depth: 6 markdown_extensions: - admonition: - markdown_include.include: @@ -29,16 +29,16 @@ nav: - Optional Settings: 'configuration/optional-settings.md' - Core Functionality: - IP Address Management: 'core-functionality/ipam.md' - - VLANs: 'core-functionality/vlans.md' + - VLAN Management: 'core-functionality/vlans.md' - Sites and Racks: 'core-functionality/sites-and-racks.md' - - Devices: 'core-functionality/devices.md' + - Devices and Cabling: 'core-functionality/devices.md' - Device Types: 'core-functionality/device-types.md' - - Virtual Machines: 'core-functionality/virtual-machines.md' - - Services: 'core-functionality/services.md' + - Virtualization: 'core-functionality/virtualization.md' + - Service Mapping: 'core-functionality/services.md' - Circuits: 'core-functionality/circuits.md' - - Power: 'core-functionality/power.md' + - Power Tracking: 'core-functionality/power.md' - Secrets: 'core-functionality/secrets.md' - - Tenancy: 'core-functionality/tenancy.md' + - Tenancy Assignment: 'core-functionality/tenancy.md' - Additional Features: - Caching: 'additional-features/caching.md' - Change Logging: 'additional-features/change-logging.md' From a7c133daa68bf199bde7ca6fc7620657a302a3ed Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 5 Mar 2020 17:23:56 -0500 Subject: [PATCH 24/27] Reset documentation hierarchy --- docs/additional-features/context-data.md | 2 ++ docs/additional-features/tags.md | 2 ++ docs/administration/netbox-shell.md | 2 ++ docs/administration/replicating-netbox.md | 16 +++++++----- docs/api/authentication.md | 6 +++-- docs/api/examples.md | 12 ++++----- docs/api/overview.md | 22 +++++++++------- docs/api/working-with-secrets.md | 8 +++--- docs/configuration/index.md | 2 ++ docs/development/extending-models.md | 22 ++++++++-------- docs/development/release-checklist.md | 32 ++++++++++++----------- docs/index.md | 16 ++++++------ docs/installation/1-postgresql.md | 2 ++ docs/installation/2-redis.md | 8 ++++-- docs/installation/3-netbox.md | 10 ++++--- docs/installation/4-http-daemon.md | 2 ++ docs/installation/5-ldap.md | 8 +++--- docs/installation/index.md | 2 +- docs/installation/migrating-to-systemd.md | 6 +++-- docs/installation/upgrading.md | 4 ++- mkdocs.yml | 2 +- 21 files changed, 110 insertions(+), 76 deletions(-) diff --git a/docs/additional-features/context-data.md b/docs/additional-features/context-data.md index f80203898..432203f92 100644 --- a/docs/additional-features/context-data.md +++ b/docs/additional-features/context-data.md @@ -1 +1,3 @@ +# Context Data + {!docs/models/extras/configcontext.md!} diff --git a/docs/additional-features/tags.md b/docs/additional-features/tags.md index 84f0f5573..0609524f4 100644 --- a/docs/additional-features/tags.md +++ b/docs/additional-features/tags.md @@ -1 +1,3 @@ +# Tagging + {!docs/models/extras/tag.md!} diff --git a/docs/administration/netbox-shell.md b/docs/administration/netbox-shell.md index 2d0b8f307..bae4471b8 100644 --- a/docs/administration/netbox-shell.md +++ b/docs/administration/netbox-shell.md @@ -1,3 +1,5 @@ +# 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: ``` diff --git a/docs/administration/replicating-netbox.md b/docs/administration/replicating-netbox.md index 781b3d214..bb7157d45 100644 --- a/docs/administration/replicating-netbox.md +++ b/docs/administration/replicating-netbox.md @@ -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,7 +34,7 @@ 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: @@ -47,11 +49,11 @@ 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`): @@ -59,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: diff --git a/docs/api/authentication.md b/docs/api/authentication.md index 08c13eea2..8e38c4de9 100644 --- a/docs/api/authentication.md +++ b/docs/api/authentication.md @@ -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. diff --git a/docs/api/examples.md b/docs/api/examples.md index dce088cb6..1906d0db9 100644 --- a/docs/api/examples.md +++ b/docs/api/examples.md @@ -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. diff --git a/docs/api/overview.md b/docs/api/overview.md index daa4f7c63..1d8a91084 100644 --- a/docs/api/overview.md +++ b/docs/api/overview.md @@ -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:///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: @@ -64,7 +66,7 @@ GET /api/dcim/interfaces/?device_id=123 See [filtering](filtering.md) for more details. -# Serialization +## Serialization The NetBox API employs three types of serializers to represent model data: @@ -108,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. @@ -139,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. @@ -185,7 +187,7 @@ GET /api/ipam/prefixes/13980/?brief=1 The brief format is supported for both lists and individual objects. -## Static Choice Fields +### 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. @@ -216,7 +218,7 @@ Thus, to set a prefix's status to "Reserved," it would be assigned the integer ` 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: @@ -270,7 +272,7 @@ 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`): @@ -303,7 +305,7 @@ The choices available for fixed choice fields such as `status` are exposed in th 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: diff --git a/docs/api/working-with-secrets.md b/docs/api/working-with-secrets.md index 653855275..129bd0855 100644 --- a/docs/api/working-with-secrets.md +++ b/docs/api/working-with-secrets.md @@ -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: diff --git a/docs/configuration/index.md b/docs/configuration/index.md index 619af171c..26b1aa5eb 100644 --- a/docs/configuration/index.md +++ b/docs/configuration/index.md @@ -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) diff --git a/docs/development/extending-models.md b/docs/development/extending-models.md index dd44bb2ab..19f6ca023 100644 --- a/docs/development/extending-models.md +++ b/docs/development/extending-models.md @@ -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 `.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,19 +57,19 @@ 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. Create/extend test cases +## 11. Create/extend test cases Create or extend the relevant test cases to verify that the new field and any accompanying validation logic perform as expected. This is especially important for relational fields. NetBox incorporates various test suites, including: diff --git a/docs/development/release-checklist.md b/docs/development/release-checklist.md index 60be6bf61..f5244bff5 100644 --- a/docs/development/release-checklist.md +++ b/docs/development/release-checklist.md @@ -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,41 +35,41 @@ Update the following static libraries to their most recent stable release: * jQuery * jQuery UI -## Squash Schema Migrations +### Squash Schema Migrations Database schema migrations should be squashed for each new minor release. See the [squashing guide](squashing-migrations.md) for the detailed process. -## 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`. -## 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. @@ -77,7 +79,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: @@ -85,6 +87,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. diff --git a/docs/index.md b/docs/index.md index b3c367165..4db2c55f5 100644 --- a/docs/index.md +++ b/docs/index.md @@ -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,10 +53,10 @@ NetBox is built on the [Django](https://djangoproject.com/) Python framework and | Task queuing | Redis/django-rq | | Live device access | NAPALM | -## Supported Python Version +## Supported Python Versions NetBox supports Python 3.5, 3.6, and 3.7 environments currently. Python 3.5 is scheduled to be unsupported in NetBox v2.8. -# Getting Started +## Getting Started See the [installation guide](installation/index.md) for help getting NetBox up and running quickly. diff --git a/docs/installation/1-postgresql.md b/docs/installation/1-postgresql.md index d038abb44..414c3c907 100644 --- a/docs/installation/1-postgresql.md +++ b/docs/installation/1-postgresql.md @@ -1,3 +1,5 @@ +# PostgreSQL Database Installation + 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 diff --git a/docs/installation/2-redis.md b/docs/installation/2-redis.md index 421225443..83424f156 100644 --- a/docs/installation/2-redis.md +++ b/docs/installation/2-redis.md @@ -1,12 +1,16 @@ +# 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 +### Ubuntu ```no-highlight # apt-get install -y redis-server ``` -#### CentOS +### CentOS ```no-highlight # yum install -y epel-release diff --git a/docs/installation/3-netbox.md b/docs/installation/3-netbox.md index 4ea5a8302..10325f59f 100644 --- a/docs/installation/3-netbox.md +++ b/docs/installation/3-netbox.md @@ -1,14 +1,16 @@ +# 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: ## Install System Packages -#### Ubuntu +### Ubuntu ```no-highlight # apt-get install -y python3 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 gcc python36 python36-devel python36-setuptools libxml2-devel libxslt-devel libffi-devel openssl-devel redhat-rpm-config @@ -93,7 +95,7 @@ Next, activate the virtual environment and install the required Python packages. (venv) # pip3 install -r requirements.txt ``` -#### NAPALM Automation (Optional) +### 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: @@ -101,7 +103,7 @@ NetBox supports integration with the [NAPALM automation](https://napalm-automati (venv) # pip3 install napalm ``` -#### Remote File Storage (Optional) +### 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`. diff --git a/docs/installation/4-http-daemon.md b/docs/installation/4-http-daemon.md index fabb270cb..4ab28dca7 100644 --- a/docs/installation/4-http-daemon.md +++ b/docs/installation/4-http-daemon.md @@ -1,3 +1,5 @@ +# 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 diff --git a/docs/installation/5-ldap.md b/docs/installation/5-ldap.md index 0a5a4f76a..7da67e5fd 100644 --- a/docs/installation/5-ldap.md +++ b/docs/installation/5-ldap.md @@ -1,8 +1,10 @@ +# 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. ## Install Requirements -#### Install openldap-devel +### Install openldap-devel On Ubuntu: @@ -16,7 +18,7 @@ On CentOS: sudo yum install -y openldap-devel ``` -#### Install django-auth-ldap +### Install django-auth-ldap ```no-highlight pip3 install django-auth-ldap @@ -79,7 +81,7 @@ 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` . diff --git a/docs/installation/index.md b/docs/installation/index.md index 082c94ec3..b3f63bcb6 100644 --- a/docs/installation/index.md +++ b/docs/installation/index.md @@ -8,7 +8,7 @@ The following sections detail how to set up a new instance of NetBox: 4. [HTTP daemon](4-http-daemon.md) 5. [LDAP authentication](5-ldap.md) (optional) -# Upgrading +## Upgrading If you are upgrading from an existing installation, please consult the [upgrading guide](upgrading.md). diff --git a/docs/installation/migrating-to-systemd.md b/docs/installation/migrating-to-systemd.md index 34ce70bb6..a888f18aa 100644 --- a/docs/installation/migrating-to-systemd.md +++ b/docs/installation/migrating-to-systemd.md @@ -1,14 +1,16 @@ +# 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: +### Uninstall supervisord ```no-highlight # apt-get remove -y supervisord ``` -### Configure systemd: +### 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. diff --git a/docs/installation/upgrading.md b/docs/installation/upgrading.md index 79f94fd17..ca2e3a989 100644 --- a/docs/installation/upgrading.md +++ b/docs/installation/upgrading.md @@ -1,3 +1,5 @@ +# 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. @@ -49,7 +51,7 @@ Copy the LDAP configuration if using LDAP: # 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: diff --git a/mkdocs.yml b/mkdocs.yml index 5dc45da16..b415cdb74 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -58,10 +58,10 @@ nav: - NetBox Shell: 'administration/netbox-shell.md' - API: - Overview: 'api/overview.md' + - Filtering: 'api/filtering.md' - Authentication: 'api/authentication.md' - Working with Secrets: 'api/working-with-secrets.md' - Examples: 'api/examples.md' - - Filtering: 'api/filtering.md' - Development: - Introduction: 'development/index.md' - Style Guide: 'development/style-guide.md' From f2d1c7d82a659c1a06381e340dcedfd45edcbd80 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 5 Mar 2020 17:27:59 -0500 Subject: [PATCH 25/27] Update release notes navigation; ditch v1.x release notes --- docs/release-notes/version-1.0.md | 22 ----- docs/release-notes/version-1.1.md | 15 ---- docs/release-notes/version-1.2.md | 48 ----------- docs/release-notes/version-1.3.md | 54 ------------ docs/release-notes/version-1.4.md | 54 ------------ docs/release-notes/version-1.5.md | 50 ----------- docs/release-notes/version-1.6.md | 85 ------------------- docs/release-notes/version-1.7.md | 75 ---------------- docs/release-notes/version-1.8.md | 106 ----------------------- docs/release-notes/version-1.9.md | 136 ------------------------------ docs/release-notes/version-2.0.md | 74 ++++++++-------- docs/release-notes/version-2.1.md | 50 +++++------ docs/release-notes/version-2.2.md | 72 ++++++++-------- docs/release-notes/version-2.3.md | 64 +++++++------- docs/release-notes/version-2.4.md | 75 ++++++++-------- docs/release-notes/version-2.5.md | 100 +++++++++++----------- docs/release-notes/version-2.6.md | 114 +++++++++++++------------ docs/release-notes/version-2.7.md | 84 +++++++++--------- mkdocs.yml | 10 --- 19 files changed, 324 insertions(+), 964 deletions(-) delete mode 100644 docs/release-notes/version-1.0.md delete mode 100644 docs/release-notes/version-1.1.md delete mode 100644 docs/release-notes/version-1.2.md delete mode 100644 docs/release-notes/version-1.3.md delete mode 100644 docs/release-notes/version-1.4.md delete mode 100644 docs/release-notes/version-1.5.md delete mode 100644 docs/release-notes/version-1.6.md delete mode 100644 docs/release-notes/version-1.7.md delete mode 100644 docs/release-notes/version-1.8.md delete mode 100644 docs/release-notes/version-1.9.md diff --git a/docs/release-notes/version-1.0.md b/docs/release-notes/version-1.0.md deleted file mode 100644 index ae1a35d07..000000000 --- a/docs/release-notes/version-1.0.md +++ /dev/null @@ -1,22 +0,0 @@ -# v1.0.7-r1 (2016-07-05) - -* [#199](https://github.com/netbox-community/netbox/issues/199) - Correct IP address validation - ---- - -# v1.0.7 (2016-06-30) - -**Note:** If upgrading from a previous release, be sure to run ./upgrade.sh after downloading the new code. -* [#135](https://github.com/netbox-community/netbox/issues/135) - Fixed display of navigation menu on mobile screens -* [#141](https://github.com/netbox-community/netbox/issues/141) - Fixed rendering of "getting started" guide -* Modified upgrade.sh to use sudo for pip installations -* [#109](https://github.com/netbox-community/netbox/issues/109) - Hide the navigation menu from anonymous users if login is required -* [#143](https://github.com/netbox-community/netbox/issues/143) - Add help_text to Device.position -* [#136](https://github.com/netbox-community/netbox/issues/136) - Prefixes which have host bits set will trigger an error instead of being silently corrected -* [#140](https://github.com/netbox-community/netbox/issues/140) - Improved support for Unicode in object names - ---- - -# v1.0.0 (2016-06-27) - -NetBox was originally developed internally at DigitalOcean by the network development team. This release marks the debut of NetBox as an open source project. diff --git a/docs/release-notes/version-1.1.md b/docs/release-notes/version-1.1.md deleted file mode 100644 index e7c67c41e..000000000 --- a/docs/release-notes/version-1.1.md +++ /dev/null @@ -1,15 +0,0 @@ -# v1.1.0 (2016-07-07) - -## New Features - -* [#107](https://github.com/netbox-community/netbox/pull/107) - Docker support -* [#91](https://github.com/netbox-community/netbox/issues/91) - Support for subdevices within a device -* [#170](https://github.com/netbox-community/netbox/pull/170) - Added MAC address field to interfaces - -## Bug Fixes - -* [#169](https://github.com/netbox-community/netbox/issues/169) - Fix rendering of cancellation URL when editing objects -* [#183](https://github.com/netbox-community/netbox/issues/183) - Ignore vi swap files -* [#209](https://github.com/netbox-community/netbox/issues/209) - Corrected error when not confirming component template deletions -* [#214](https://github.com/netbox-community/netbox/issues/214) - Fixed redundant message on bulk interface creation -* [#68](https://github.com/netbox-community/netbox/issues/68) - Improved permissions-related error reporting for secrets diff --git a/docs/release-notes/version-1.2.md b/docs/release-notes/version-1.2.md deleted file mode 100644 index a593e774a..000000000 --- a/docs/release-notes/version-1.2.md +++ /dev/null @@ -1,48 +0,0 @@ -# v1.2.2 (2016-07-14) - -## Improvements - -* [#174](https://github.com/netbox-community/netbox/issues/174) - Added search and site filter to provider list -* [#270](https://github.com/netbox-community/netbox/issues/270) - Added the ability to filter devices by rack group - -## Bug Fixes - -* [#115](https://github.com/netbox-community/netbox/issues/115) - Fix deprecated django.core.context_processors reference -* [#268](https://github.com/netbox-community/netbox/issues/268) - Added support for entire 32-bit ASN space -* [#282](https://github.com/netbox-community/netbox/issues/282) - De-select "all" checkbox if one or more objects are deselected -* [#290](https://github.com/netbox-community/netbox/issues/290) - Always display management interfaces for a device type (even if `is_network_device` is not set) - ---- - -# v1.2.1 (2016-07-13) - -**Note:** This release introduces a new dependency ([natsort](https://pypi.python.org/pypi/natsort)). Be sure to run `upgrade.sh` if upgrading from a previous release. - -## Improvements - -* [#285](https://github.com/netbox-community/netbox/issues/285) - Added the ability to prefer IPv4 over IPv6 for primary device IPs - -## Bug Fixes - -* [#243](https://github.com/netbox-community/netbox/issues/243) - Improved ordering of device object lists -* [#271](https://github.com/netbox-community/netbox/issues/271) - Fixed primary_ip bug in secrets API -* [#274](https://github.com/netbox-community/netbox/issues/274) - Fixed primary_ip bug in DCIM admin UI -* [#275](https://github.com/netbox-community/netbox/issues/275) - Fixed bug preventing the expansion of an existing aggregate - ---- - -# v1.2.0 (2016-07-12) - -## New Features - -* [#73](https://github.com/netbox-community/netbox/issues/73) - Added optional persistent banner -* [#93](https://github.com/netbox-community/netbox/issues/73) - Ability to set both IPv4 and IPv6 primary IPs for devices -* [#203](https://github.com/netbox-community/netbox/issues/203) - Introduced support for LDAP - -## Bug Fixes - -* [#162](https://github.com/netbox-community/netbox/issues/228) - Fixed support for Unicode characters in rack/device/VLAN names -* [#228](https://github.com/netbox-community/netbox/issues/228) - Corrected conditional inclusion of device bay templates -* [#246](https://github.com/netbox-community/netbox/issues/246) - Corrected Docker build instructions -* [#260](https://github.com/netbox-community/netbox/issues/260) - Fixed error on admin UI device type list -* Miscellaneous layout improvements for mobile devices diff --git a/docs/release-notes/version-1.3.md b/docs/release-notes/version-1.3.md deleted file mode 100644 index 4974aa732..000000000 --- a/docs/release-notes/version-1.3.md +++ /dev/null @@ -1,54 +0,0 @@ -# v1.3.2 (2016-07-26) - -## Improvements - -* [#292](https://github.com/netbox-community/netbox/issues/292) - Added part_number field to DeviceType -* [#363](https://github.com/netbox-community/netbox/issues/363) - Added a description field to the VLAN model -* [#374](https://github.com/netbox-community/netbox/issues/374) - Increased VLAN name length to 64 characters -* Enabled bulk deletion of interfaces from devices - -## Bug Fixes - -* [#359](https://github.com/netbox-community/netbox/issues/359) - Corrected the DCIM API endpoint for finding related connections -* [#370](https://github.com/netbox-community/netbox/issues/370) - Notify user when secret decryption fails -* [#381](https://github.com/netbox-community/netbox/issues/381) - Fix 'u_consumed' error on rack import -* [#384](https://github.com/netbox-community/netbox/issues/384) - Fixed description field's maximum length on IPAM bulk edit forms -* [#385](https://github.com/netbox-community/netbox/issues/385) - Fixed error when deleting a user with one or more associated UserActions - ---- - -# v1.3.1 (2016-07-21) - -## Improvements - -* [#258](https://github.com/netbox-community/netbox/issues/258) - Add an API endpoint to list interface connections -* [#303](https://github.com/netbox-community/netbox/issues/303) - Improved numeric ordering of sites, racks, and devices -* [#304](https://github.com/netbox-community/netbox/issues/304) - Display utilization percentage on rack list -* [#327](https://github.com/netbox-community/netbox/issues/327) - Disable rack assignment for installed child devices - -## Bug Fixes - -* [#331](https://github.com/netbox-community/netbox/issues/331) - Add group field to VLAN bulk edit form -* Miscellaneous improvements to Unicode handling - ---- - -# v1.3.0 (2016-07-18) - -## New Features - -* [#42](https://github.com/netbox-community/netbox/issues/42) - Allow assignment of VLAN on prefix import -* [#43](https://github.com/netbox-community/netbox/issues/43) - Toggling of IP space uniqueness within a VRF -* [#111](https://github.com/netbox-community/netbox/issues/111) - Introduces VLAN groups -* [#227](https://github.com/netbox-community/netbox/issues/227) - Support for bulk import of child devices - -## Bug Fixes - -* [#301](https://github.com/netbox-community/netbox/issues/301) - Prevent deletion of DeviceBay when installed device is deleted -* [#306](https://github.com/netbox-community/netbox/issues/306) - Fixed device import to allow an unspecified rack face -* [#307](https://github.com/netbox-community/netbox/issues/307) - Catch `RelatedObjectDoesNotExist` when an invalid device type is defined during device import -* [#308](https://github.com/netbox-community/netbox/issues/308) - Update rack assignment for all child devices when moving a parent device -* [#311](https://github.com/netbox-community/netbox/issues/311) - Fix assignment of primary_ip on IP address import -* [#317](https://github.com/netbox-community/netbox/issues/317) - Rack elevation display fix for device types greater than 42U in height -* [#320](https://github.com/netbox-community/netbox/issues/320) - Disallow import of prefixes with host masks -* [#322](https://github.com/netbox-community/netbox/issues/320) - Corrected VLAN import behavior diff --git a/docs/release-notes/version-1.4.md b/docs/release-notes/version-1.4.md deleted file mode 100644 index 0408e7dbe..000000000 --- a/docs/release-notes/version-1.4.md +++ /dev/null @@ -1,54 +0,0 @@ -# v1.4.2 (2016-08-06) - -## Improvements - -* [#167](https://github.com/netbox-community/netbox/issues/167) - Added new interface form factors -* [#253](https://github.com/netbox-community/netbox/issues/253) - Added new interface form factors -* [#434](https://github.com/netbox-community/netbox/issues/434) - Restored admin UI access to user action history (however bulk deletion is disabled) -* [#435](https://github.com/netbox-community/netbox/issues/435) - Added an "add prefix" button to the VLAN view - -## Bug Fixes - -* [#425](https://github.com/netbox-community/netbox/issues/425) - Ignore leading and trailing periods when generating a slug -* [#427](https://github.com/netbox-community/netbox/issues/427) - Prevent error when duplicate IPs are present in a prefix's IP list -* [#429](https://github.com/netbox-community/netbox/issues/429) - Correct redirection of user when adding a secret to a device - ---- - -# v1.4.1 (2016-08-03) - -## Improvements - -* [#289](https://github.com/netbox-community/netbox/issues/289) - Annotate available ranges in prefix IP list -* [#412](https://github.com/netbox-community/netbox/issues/412) - Tenant group assignment is no longer mandatory -* [#422](https://github.com/netbox-community/netbox/issues/422) - CSV import now supports double-quoting values which contain commas - -## Bug Fixes - -* [#395](https://github.com/netbox-community/netbox/issues/395) - Show child prefixes from all VRFs if the parent belongs to the global table -* [#406](https://github.com/netbox-community/netbox/issues/406) - Fixed circuit list rendring when filtering on port speed or commit rate -* [#409](https://github.com/netbox-community/netbox/issues/409) - Filter IPs and prefixes by tenant slug rather than by its PK -* [#411](https://github.com/netbox-community/netbox/issues/411) - Corrected title of secret roles view -* [#419](https://github.com/netbox-community/netbox/issues/419) - Fixed a potential database performance issue when gathering tenant statistics - ---- - -# v1.4.0 (2016-08-01) - -## New Features - -### Multitenancy ([#16](https://github.com/netbox-community/netbox/issues/16)) - -NetBox now supports tenants and tenant groups. Sites, racks, devices, VRFs, prefixes, IP addresses, VLANs, and circuits can be assigned to tenants to track the allocation of these resources among customers or internal departments. If a prefix or IP address does not have a tenant assigned, it will fall back to the tenant assigned to its parent VRF (where applicable). - -## Improvements - -* [#176](https://github.com/netbox-community/netbox/issues/176) - Introduced seed data for new installs -* [#358](https://github.com/netbox-community/netbox/issues/358) - Improved search for all objects -* [#394](https://github.com/netbox-community/netbox/issues/394) - Improved VRF selection during bulk editing of prefixes and IP addresses -* Miscellaneous cosmetic improvements to the UI - -## Bug Fixes - -* [#392](https://github.com/netbox-community/netbox/issues/392) - Don't include child devices in non-racked devices table -* [#397](https://github.com/netbox-community/netbox/issues/397) - Only include child IPs which belong to the same VRF as the parent prefix diff --git a/docs/release-notes/version-1.5.md b/docs/release-notes/version-1.5.md deleted file mode 100644 index 77fbee861..000000000 --- a/docs/release-notes/version-1.5.md +++ /dev/null @@ -1,50 +0,0 @@ -# v1.5.2 (2016-08-16) - -## Bug Fixes - -* [#460](https://github.com/netbox-community/netbox/issues/460) - Corrected ordering of IP addresses with differing prefix lengths -* [#463](https://github.com/netbox-community/netbox/issues/463) - Prevent pre-population of livesearch field with '---------' -* [#467](https://github.com/netbox-community/netbox/issues/467) - Include prefixes and IPs which inherit tenancy from their VRF in tenant stats -* [#468](https://github.com/netbox-community/netbox/issues/468) - Don't allow connected interfaces to be changed to the "virtual" form factor -* [#469](https://github.com/netbox-community/netbox/issues/469) - Added missing import buttons to list views -* [#472](https://github.com/netbox-community/netbox/issues/472) - Hide the connection button for interfaces which have a circuit terminated to them - ---- - -# v1.5.1 (2016-08-11) - -## Improvements - -* [#421](https://github.com/netbox-community/netbox/issues/421) - Added an asset tag field to devices -* [#456](https://github.com/netbox-community/netbox/issues/456) - Added IP search box to home page -* Colorized rack and device roles - -## Bug Fixes - -* [#454](https://github.com/netbox-community/netbox/issues/454) - Corrected error on rack export -* [#457](https://github.com/netbox-community/netbox/issues/457) - Added role field to rack edit form - ---- - -# v1.5.0 (2016-08-10) - -## New Features - -### Rack Enhancements ([#180](https://github.com/netbox-community/netbox/issues/180), [#241](https://github.com/netbox-community/netbox/issues/241)) - -Like devices, racks can now be assigned to functional roles. This allows users to group racks by designated function as well as by physical location (rack groups). Additionally, rack can now have a defined rail-to-rail width (19 or 23 inches) and a type (two-post-rack, cabinet, etc.). - -## Improvements - -* [#149](https://github.com/netbox-community/netbox/issues/149) - Added discrete upstream speed field for circuits -* [#157](https://github.com/netbox-community/netbox/issues/157) - Added manufacturer field for device modules -* We have a logo! -* Upgraded to Django 1.10 - -## Bug Fixes - -* [#433](https://github.com/netbox-community/netbox/issues/433) - Corrected form validation when editing child devices -* [#442](https://github.com/netbox-community/netbox/issues/442) - Corrected child device import instructions -* [#443](https://github.com/netbox-community/netbox/issues/443) - Correctly display and initialize VRF for creation of new IP addresses -* [#444](https://github.com/netbox-community/netbox/issues/444) - Corrected prefix model validation -* [#445](https://github.com/netbox-community/netbox/issues/445) - Limit rack height to between 1U and 100U (inclusive) diff --git a/docs/release-notes/version-1.6.md b/docs/release-notes/version-1.6.md deleted file mode 100644 index 9c3391735..000000000 --- a/docs/release-notes/version-1.6.md +++ /dev/null @@ -1,85 +0,0 @@ -# v1.6.3 (2016-10-19) - -## Improvements - -* [#353](https://github.com/netbox-community/netbox/issues/353) - Bulk editing of device and device type interfaces -* [#527](https://github.com/netbox-community/netbox/issues/527) - Support for nullification of fields when bulk editing -* [#592](https://github.com/netbox-community/netbox/issues/592) - Allow space-delimited lists of ALLOWED_HOSTS in Docker -* [#608](https://github.com/netbox-community/netbox/issues/608) - Added "select all" button for device and device type components - -## Bug Fixes - -* [#602](https://github.com/netbox-community/netbox/issues/602) - Correct display of custom integer fields with value of 0 or 1 -* [#604](https://github.com/netbox-community/netbox/issues/604) - Correct display of unnamed devices in form selection fields -* [#611](https://github.com/netbox-community/netbox/issues/611) - Power/console/interface connection import: status field should be case-insensitive -* [#615](https://github.com/netbox-community/netbox/issues/615) - Account for BASE_PATH in static URLs and during login -* [#616](https://github.com/netbox-community/netbox/issues/616) - Correct display of custom URL fields - ---- - -# v1.6.2-r1 (2016-10-04) - -## Improvements - -* [#212](https://github.com/netbox-community/netbox/issues/212) - Introduced the `BASE_PATH` configuration setting to allow running NetBox in a URL subdirectory -* [#345](https://github.com/netbox-community/netbox/issues/345) - Bulk edit: allow user to select all objects on page or all matching query -* [#475](https://github.com/netbox-community/netbox/issues/475) - Display "add" buttons at top and bottom of all device/device type panels -* [#480](https://github.com/netbox-community/netbox/issues/480) - Improved layout on mobile devices -* [#481](https://github.com/netbox-community/netbox/issues/481) - Require interface creation before trying to assign an IP to a device -* [#575](https://github.com/netbox-community/netbox/issues/575) - Allow all valid URL schemes in custom fields -* [#579](https://github.com/netbox-community/netbox/issues/579) - Add a description field to export templates - -## Bug Fixes - -* [#466](https://github.com/netbox-community/netbox/issues/466) - Validate available free space for all instances when increasing the U height of a device type -* [#571](https://github.com/netbox-community/netbox/issues/571) - Correct rack group filter on device list -* [#576](https://github.com/netbox-community/netbox/issues/576) - Delete all relevant CustomFieldValues when deleting a CustomFieldChoice -* [#581](https://github.com/netbox-community/netbox/issues/581) - Correct initialization of custom boolean and select fields -* [#591](https://github.com/netbox-community/netbox/issues/591) - Correct display of component creation buttons in device type view - ---- - -# v1.6.1-r1 (2016-09-21) - -## Improvements -* [#415](https://github.com/netbox-community/netbox/issues/415) - Add an expand/collapse toggle button to the prefix list -* [#552](https://github.com/netbox-community/netbox/issues/552) - Allow filtering on custom select fields by "none" -* [#561](https://github.com/netbox-community/netbox/issues/561) - Make custom fields accessible from within export templates - -## Bug Fixes -* [#493](https://github.com/netbox-community/netbox/issues/493) - CSV import support for UTF-8 -* [#531](https://github.com/netbox-community/netbox/issues/531) - Order prefix list by VRF assignment -* [#542](https://github.com/netbox-community/netbox/issues/542) - Add LDAP support in Docker -* [#557](https://github.com/netbox-community/netbox/issues/557) - Add 'global' choice to VRF filter for prefixes and IP addresses -* [#558](https://github.com/netbox-community/netbox/issues/558) - Update slug field when name is populated without a key press -* [#562](https://github.com/netbox-community/netbox/issues/562) - Fixed bulk interface creation -* [#564](https://github.com/netbox-community/netbox/issues/564) - Display custom fields for all applicable objects - ---- - -# v1.6.0 (2016-09-13) - -## New Features - -### Custom Fields ([#129](https://github.com/netbox-community/netbox/issues/129)) - -Users can now create custom fields to associate arbitrary data with core NetBox objects. For example, you might want to add a geolocation tag to IP prefixes, or a ticket number to each device. Text, integer, boolean, date, URL, and selection fields are supported. - -## Improvements - -* [#489](https://github.com/netbox-community/netbox/issues/489) - Docker file now builds from a `python:2.7-wheezy` base instead of `ubuntu:14.04` -* [#540](https://github.com/netbox-community/netbox/issues/540) - Add links for VLAN roles under VLAN navigation menu -* Added new interface form factors -* Added address family filters to aggregate and prefix lists - -## Bug Fixes - -* [#476](https://github.com/netbox-community/netbox/issues/476) - Corrected rack import instructions -* [#484](https://github.com/netbox-community/netbox/issues/484) - Allow bulk deletion of >1K objects -* [#486](https://github.com/netbox-community/netbox/issues/486) - Prompt for secret key only if updating a secret's value -* [#490](https://github.com/netbox-community/netbox/issues/490) - Corrected display of circuit commit rate -* [#495](https://github.com/netbox-community/netbox/issues/495) - Include tenant in prefix and IP CSV export -* [#507](https://github.com/netbox-community/netbox/issues/507) - Corrected rendering of nav menu on screens narrower than 1200px -* [#515](https://github.com/netbox-community/netbox/issues/515) - Clarified instructions for the "face" field when importing devices -* [#522](https://github.com/netbox-community/netbox/issues/522) - Remove obsolete check for staff status when bulk deleting objects -* [#544](https://github.com/netbox-community/netbox/issues/544) - Strip CRLF-style line terminators from rendered export templates diff --git a/docs/release-notes/version-1.7.md b/docs/release-notes/version-1.7.md deleted file mode 100644 index 691cb8c92..000000000 --- a/docs/release-notes/version-1.7.md +++ /dev/null @@ -1,75 +0,0 @@ -# v1.7.3 (2016-12-08) - -## Bug Fixes - -* [#724](https://github.com/netbox-community/netbox/issues/724) - Exempt API views from LoginRequiredMiddleware to enable basic HTTP authentication when LOGIN_REQUIRED is true -* [#729](https://github.com/netbox-community/netbox/issues/729) - Corrected cancellation links when editing secondary objects -* [#732](https://github.com/netbox-community/netbox/issues/732) - Allow custom select field values to be deselected if the field is not required -* [#733](https://github.com/netbox-community/netbox/issues/733) - Fixed MAC address filter on device list -* [#734](https://github.com/netbox-community/netbox/issues/734) - Corrected display of device type when editing a device - ---- - -# v1.7.2-r1 (2016-12-06) - -## Improvements - -* [#663](https://github.com/netbox-community/netbox/issues/663) - Added MAC address search field to device list -* [#672](https://github.com/netbox-community/netbox/issues/672) - Increased the selection of available colors for rack and device roles -* [#695](https://github.com/netbox-community/netbox/issues/695) - Added is_private field to RIR - -## Bug Fixes - -* [#677](https://github.com/netbox-community/netbox/issues/677) - Fix setuptools installation error on Debian 8.6 -* [#696](https://github.com/netbox-community/netbox/issues/696) - Corrected link to VRF in prefix and IP address breadcrumbs -* [#702](https://github.com/netbox-community/netbox/issues/702) - Improved Unicode support for custom fields -* [#712](https://github.com/netbox-community/netbox/issues/712) - Corrected export of tenants which are not assigned to a group -* [#713](https://github.com/netbox-community/netbox/issues/713) - Include a label for the comments field when editing circuits, providers, or racks in bulk -* [#718](https://github.com/netbox-community/netbox/issues/718) - Restore is_primary field on IP assignment form -* [#723](https://github.com/netbox-community/netbox/issues/723) - API documentation is now accessible when using BASE_PATH -* [#727](https://github.com/netbox-community/netbox/issues/727) - Corrected error in rack elevation display (v1.7.2) - ---- - -# v1.7.1 (2016-11-15) - -## Improvements - -* [#667](https://github.com/netbox-community/netbox/issues/667) - Added prefix utilization statistics to the RIR list view -* [#685](https://github.com/netbox-community/netbox/issues/685) - When assigning an IP to a device, automatically select the interface if only one exists - -## Bug Fixes - -* [#674](https://github.com/netbox-community/netbox/issues/674) - Fix assignment of status to imported IP addresses -* [#676](https://github.com/netbox-community/netbox/issues/676) - Server error when bulk editing device types -* [#678](https://github.com/netbox-community/netbox/issues/678) - Server error on device import specifying an invalid device type -* [#691](https://github.com/netbox-community/netbox/issues/691) - Allow the assignment of power ports to PDUs -* [#692](https://github.com/netbox-community/netbox/issues/692) - Form errors are not displayed on checkbox fields - ---- - -# v1.7.0 (2016-11-03) - -## New Features - -### IP address statuses ([#87](https://github.com/netbox-community/netbox/issues/87)) - -An IP address can now be designated as active, reserved, or DHCP. The DHCP status implies that the IP address is part of a DHCP pool and may or may not be assigned to a DHCP client. - -### Top-to-bottom rack numbering ([#191](https://github.com/netbox-community/netbox/issues/191)) - -Racks can now be set to have descending rack units, with U1 at the top of the rack. When adding a device to a rack with descending units, be sure to position it in the **lowest-numbered** unit which it occupies (this will be physically the topmost unit). - -## Improvements -* [#211](https://github.com/netbox-community/netbox/issues/211) - Allow device assignment and removal from IP address view -* [#630](https://github.com/netbox-community/netbox/issues/630) - Added a custom 404 page -* [#652](https://github.com/netbox-community/netbox/issues/652) - Use password input controls when editing secrets -* [#654](https://github.com/netbox-community/netbox/issues/654) - Added Cisco FlexStack and FlexStack Plus form factors -* [#661](https://github.com/netbox-community/netbox/issues/661) - Display relevant IP addressing when viewing a circuit - -## Bug Fixes -* [#632](https://github.com/netbox-community/netbox/issues/632) - Use semicolons instead of commas to separate regexes in topology maps -* [#647](https://github.com/netbox-community/netbox/issues/647) - Extend form used when assigning an IP to a device -* [#657](https://github.com/netbox-community/netbox/issues/657) - Unicode error when adding device modules -* [#660](https://github.com/netbox-community/netbox/issues/660) - Corrected calculation of utilized space in rack list -* [#664](https://github.com/netbox-community/netbox/issues/664) - Fixed bulk creation of interfaces across multiple devices diff --git a/docs/release-notes/version-1.8.md b/docs/release-notes/version-1.8.md deleted file mode 100644 index e35b8228e..000000000 --- a/docs/release-notes/version-1.8.md +++ /dev/null @@ -1,106 +0,0 @@ -# v1.8.4 (2017-02-03) - -## Improvements - -* [#856](https://github.com/netbox-community/netbox/issues/856) - Strip whitespace from fields during CSV import - -## Bug Fixes - -* [#851](https://github.com/netbox-community/netbox/issues/851) - Resolve encoding issues during import/export (Python 3) -* [#854](https://github.com/netbox-community/netbox/issues/854) - Correct processing of get_return_url() in ObjectDeleteView -* [#859](https://github.com/netbox-community/netbox/issues/859) - Fix Javascript for connection status toggle button on device view -* [#861](https://github.com/netbox-community/netbox/issues/861) - Avoid overwriting device primary IP assignment from alternate family during bulk import of IP addresses -* [#865](https://github.com/netbox-community/netbox/issues/865) - Fix server error when attempting to delete a protected object parent (Python 3) - ---- - -# v1.8.3 (2017-01-26) - -## Improvements - -* [#782](https://github.com/netbox-community/netbox/issues/782) - Allow filtering devices list by manufacturer -* [#820](https://github.com/netbox-community/netbox/issues/820) - Add VLAN column to parent prefixes table on IP address view -* [#821](https://github.com/netbox-community/netbox/issues/821) - Support for comma separation in bulk IP/interface creation -* [#827](https://github.com/netbox-community/netbox/issues/827) - **Introduced support for Python 3** -* [#836](https://github.com/netbox-community/netbox/issues/836) - Add "deprecated" status for IP addresses -* [#841](https://github.com/netbox-community/netbox/issues/841) - Merged search and filter forms on all object lists - -## Bug Fixes - -* [#816](https://github.com/netbox-community/netbox/issues/816) - Redirect back to parent prefix view after deleting child prefixes termination -* [#817](https://github.com/netbox-community/netbox/issues/817) - Update last_updated time of a circuit when editing a child termination -* [#830](https://github.com/netbox-community/netbox/issues/830) - Redirect user to device view after editing a device component -* [#840](https://github.com/netbox-community/netbox/issues/840) - Correct API path resolution for secrets when BASE_PATH is configured -* [#844](https://github.com/netbox-community/netbox/issues/844) - Apply order_naturally() to API interfaces list -* [#845](https://github.com/netbox-community/netbox/issues/845) - Fix missing edit/delete buttons on object tables for non-superusers - ---- - -# v1.8.2 (2017-01-18) - -## Improvements - -* [#284](https://github.com/netbox-community/netbox/issues/284) - Enabled toggling of interface display order per device type -* [#760](https://github.com/netbox-community/netbox/issues/760) - Redirect user back to device view after deleting an assigned IP address -* [#783](https://github.com/netbox-community/netbox/issues/783) - Add a description field to the Circuit model -* [#797](https://github.com/netbox-community/netbox/issues/797) - Add description column to VLANs table -* [#803](https://github.com/netbox-community/netbox/issues/803) - Clarify that no child objects are deleted when deleting a prefix -* [#805](https://github.com/netbox-community/netbox/issues/805) - Linkify site column in device table - -## Bug Fixes - -* [#776](https://github.com/netbox-community/netbox/issues/776) - Prevent circuits from appearing twice while searching -* [#778](https://github.com/netbox-community/netbox/issues/778) - Corrected an issue preventing multiple interfaces with the same position ID from appearing in a device's interface list -* [#785](https://github.com/netbox-community/netbox/issues/785) - Trigger validation error when importing a prefix assigned to a nonexistent VLAN -* [#802](https://github.com/netbox-community/netbox/issues/802) - Fixed enforcement of ENFORCE_GLOBAL_UNIQUE for prefixes -* [#807](https://github.com/netbox-community/netbox/issues/807) - Redirect user back to form when adding IP addresses in bulk and "create and add another" is clicked -* [#810](https://github.com/netbox-community/netbox/issues/810) - Suppress unique IP validation on invalid IP addresses and prefixes - ---- - -# v1.8.1 (2017-01-04) - -## Improvements - -* [#771](https://github.com/netbox-community/netbox/issues/771) - Don't automatically redirect user when only one object is returned in a list - -## Bug Fixes - -* [#764](https://github.com/netbox-community/netbox/issues/764) - Encapsulate in double quotes values containing commas when exporting to CSV -* [#767](https://github.com/netbox-community/netbox/issues/767) - Fixes xconnect_id error when searching for circuits -* [#769](https://github.com/netbox-community/netbox/issues/769) - Show default value for boolean custom fields -* [#772](https://github.com/netbox-community/netbox/issues/772) - Fixes TypeError in API RackUnitListView when no device is excluded - ---- - -# v1.8.0 (2017-01-03) - -## New Features - -### Point-to-Point Circuits ([#49](https://github.com/netbox-community/netbox/issues/49)) - -Until now, NetBox has supported tracking only one end of a data circuit. This is fine for Internet connections where you don't care (or know) much about the provider side of the circuit, but many users need the ability to track inter-site circuits as well. This release expands circuit modeling so that each circuit can have an A and/or Z side. Each endpoint must be terminated to a site, and may optionally be terminated to a specific device and interface within that site. - -### L4 Services ([#539](https://github.com/netbox-community/netbox/issues/539)) - -Our first major community contribution introduces the ability to track discrete TCP and UDP services associated with a device (for example, SSH or HTTP). Each service can optionally be assigned to one or more specific IP addresses belonging to the device. Thanks to [@if-fi](https://github.com/if-fi) for the addition! - -## Improvements - -* [#122](https://github.com/netbox-community/netbox/issues/122) - Added comments field to device types -* [#181](https://github.com/netbox-community/netbox/issues/181) - Implemented support for bulk IP address creation -* [#613](https://github.com/netbox-community/netbox/issues/613) - Added prefixes column to VLAN list; added VLAN column to prefix list -* [#716](https://github.com/netbox-community/netbox/issues/716) - Add ASN field to site bulk edit form -* [#722](https://github.com/netbox-community/netbox/issues/722) - Enabled custom fields for device types -* [#743](https://github.com/netbox-community/netbox/issues/743) - Enabled bulk creation of all device components -* [#756](https://github.com/netbox-community/netbox/issues/756) - Added contact details to site model - -## Bug Fixes - -* [#563](https://github.com/netbox-community/netbox/issues/563) - Allow a device to be flipped from one rack face to the other without moving it -* [#658](https://github.com/netbox-community/netbox/issues/658) - Enabled conditional treatment of network/broadcast IPs for a prefix by defining it as a pool -* [#741](https://github.com/netbox-community/netbox/issues/741) - Hide "select all" button for users without edit permissions -* [#744](https://github.com/netbox-community/netbox/issues/744) - Fixed export of sites without an AS number -* [#747](https://github.com/netbox-community/netbox/issues/747) - Fixed natural_order_by integer cast error on large numbers -* [#751](https://github.com/netbox-community/netbox/issues/751) - Fixed python-cryptography installation issue on Debian -* [#763](https://github.com/netbox-community/netbox/issues/763) - Added missing fields to CSV exports for racks and prefixes diff --git a/docs/release-notes/version-1.9.md b/docs/release-notes/version-1.9.md deleted file mode 100644 index bcde1032c..000000000 --- a/docs/release-notes/version-1.9.md +++ /dev/null @@ -1,136 +0,0 @@ -# v1.9.6 (2017-04-21) - -## Improvements - -* [#878](https://github.com/netbox-community/netbox/issues/878) - Merged IP addresses with interfaces list on device view -* [#1001](https://github.com/netbox-community/netbox/issues/1001) - Interface assignment can be modified when editing an IP address -* [#1084](https://github.com/netbox-community/netbox/issues/1084) - Include custom fields when creating IP addresses in bulk - -## Bug Fixes - -* [#1057](https://github.com/netbox-community/netbox/issues/1057) - Corrected VLAN validation during prefix import -* [#1061](https://github.com/netbox-community/netbox/issues/1061) - Fixed potential for script injection via create/edit/delete messages -* [#1070](https://github.com/netbox-community/netbox/issues/1070) - Corrected installation instructions for Python3 on CentOS/RHEL -* [#1071](https://github.com/netbox-community/netbox/issues/1071) - Protect assigned circuit termination when an interface is deleted -* [#1072](https://github.com/netbox-community/netbox/issues/1072) - Order LAG interfaces naturally on bulk interface edit form -* [#1074](https://github.com/netbox-community/netbox/issues/1074) - Require ncclient 0.5.3 (Python 3 fix) -* [#1090](https://github.com/netbox-community/netbox/issues/1090) - Improved installation documentation for Python 3 -* [#1092](https://github.com/netbox-community/netbox/issues/1092) - Increase randomness in SECRET_KEY generation tool - ---- - -# v1.9.5 (2017-04-06) - -## Improvements - -* [#1052](https://github.com/netbox-community/netbox/issues/1052) - Added rack reservation list and bulk delete views - -## Bug Fixes - -* [#1038](https://github.com/netbox-community/netbox/issues/1038) - Suppress upgrading to Django 1.11 (will be supported in v2.0) -* [#1037](https://github.com/netbox-community/netbox/issues/1037) - Fixed error on VLAN import with duplicate VLAN group names -* [#1047](https://github.com/netbox-community/netbox/issues/1047) - Correct ordering of numbered subinterfaces -* [#1051](https://github.com/netbox-community/netbox/issues/1051) - Upgraded django-rest-swagger - ---- - -# v1.9.4-r1 (2017-04-04) - -## Improvements - -* [#362](https://github.com/netbox-community/netbox/issues/362) - Added per_page query parameter to control pagination page length - -## Bug Fixes - -* [#991](https://github.com/netbox-community/netbox/issues/991) - Correct server error on "create and connect another" interface connection -* [#1022](https://github.com/netbox-community/netbox/issues/1022) - Record user actions when creating IP addresses in bulk -* [#1027](https://github.com/netbox-community/netbox/issues/1027) - Fixed nav menu highlighting when BASE_PATH is set -* [#1034](https://github.com/netbox-community/netbox/issues/1034) - Added migration missing from v1.9.4 release - ---- - -# v1.9.3 (2017-03-23) - -## Improvements - -* [#972](https://github.com/netbox-community/netbox/issues/972) - Add ability to filter connections list by device name -* [#974](https://github.com/netbox-community/netbox/issues/974) - Added MAC address filter to API interfaces list -* [#978](https://github.com/netbox-community/netbox/issues/978) - Allow filtering device types by function and subdevice role -* [#981](https://github.com/netbox-community/netbox/issues/981) - Allow filtering primary objects by a given set of IDs -* [#983](https://github.com/netbox-community/netbox/issues/983) - Include peer device names when listing circuits in device view - -## Bug Fixes - -* [#967](https://github.com/netbox-community/netbox/issues/967) - Fix error when assigning a new interface to a LAG - ---- - -# v1.9.2 (2017-03-14) - -## Bug Fixes - -* [#950](https://github.com/netbox-community/netbox/issues/950) - Fix site_id error on child device import -* [#956](https://github.com/netbox-community/netbox/issues/956) - Correct bug affecting unnamed rackless devices -* [#957](https://github.com/netbox-community/netbox/issues/957) - Correct device site filter count to include unracked devices -* [#963](https://github.com/netbox-community/netbox/issues/963) - Fix bug in IPv6 address range expansion -* [#964](https://github.com/netbox-community/netbox/issues/964) - Fix bug when bulk editing/deleting filtered set of objects - ---- - -# v1.9.1 (2017-03-08) - -## Improvements - -* [#945](https://github.com/netbox-community/netbox/issues/945) - Display the current user in the navigation menu -* [#946](https://github.com/netbox-community/netbox/issues/946) - Disregard mask length when filtering IP addresses by a parent prefix - -## Bug Fixes - -* [#941](https://github.com/netbox-community/netbox/issues/941) - Corrected old references to rack.site on Device -* [#943](https://github.com/netbox-community/netbox/issues/943) - Child prefixes missing on Python 3 -* [#944](https://github.com/netbox-community/netbox/issues/944) - Corrected console and power connection form behavior -* [#948](https://github.com/netbox-community/netbox/issues/948) - Region name should be hyperlinked to site list - ---- - -# v1.9.0-r1 (2017-03-03) - -## New Features - -### Rack Reservations ([#36](https://github.com/netbox-community/netbox/issues/36)) - -Users can now reserve an arbitrary number of units within a rack, adding a comment noting their intentions. Reservations do not interfere with installed devices: It is possible to reserve a unit for future use even if it is currently occupied by a device. - -### Interface Groups ([#105](https://github.com/netbox-community/netbox/issues/105)) - -A new Link Aggregation Group (LAG) virtual form factor has been added. Physical interfaces can be assigned to a parent LAG interface to represent a port-channel or similar logical bundling of links. - -### Regions ([#164](https://github.com/netbox-community/netbox/issues/164)) - -A new region model has been introduced to allow for the geographic organization of sites. Regions can be nested recursively to form a hierarchy. - -### Rackless Devices ([#198](https://github.com/netbox-community/netbox/issues/198)) - -Previous releases required each device to be assigned to a particular rack within a site. This requirement has been relaxed so that devices must only be assigned to a site, and may optionally be assigned to a rack. - -### Global VLANs ([#235](https://github.com/netbox-community/netbox/issues/235)) - -Assignment of VLANs and VLAN groups to sites is now optional, allowing for the representation of a VLAN spanning multiple sites. - -## Improvements - -* [#862](https://github.com/netbox-community/netbox/issues/862) - Show both IPv6 and IPv4 primary IPs in device list -* [#894](https://github.com/netbox-community/netbox/issues/894) - Expand device name max length to 64 characters -* [#898](https://github.com/netbox-community/netbox/issues/898) - Expanded circuits list in provider view rack face -* [#901](https://github.com/netbox-community/netbox/issues/901) - Support for filtering prefixes and IP addresses by mask length - -## Bug Fixes - -* [#872](https://github.com/netbox-community/netbox/issues/872) - Fixed TypeError on bulk IP address creation (Python 3) -* [#884](https://github.com/netbox-community/netbox/issues/884) - Preserve selected rack unit when changing a device's rack face -* [#892](https://github.com/netbox-community/netbox/issues/892) - Restored missing edit/delete buttons when viewing child prefixes and IP addresses from a parent object -* [#897](https://github.com/netbox-community/netbox/issues/897) - Fixed power connections CSV export -* [#903](https://github.com/netbox-community/netbox/issues/903) - Only alert on missing critical connections if present in the parent device type -* [#935](https://github.com/netbox-community/netbox/issues/935) - Fix form validation error when connecting an interface using live search -* [#937](https://github.com/netbox-community/netbox/issues/937) - Region assignment should be optional when creating a site -* [#938](https://github.com/netbox-community/netbox/issues/938) - Provider view yields an error if one or more circuits is assigned to a tenant diff --git a/docs/release-notes/version-2.0.md b/docs/release-notes/version-2.0.md index 3cd1babf4..73754f904 100644 --- a/docs/release-notes/version-2.0.md +++ b/docs/release-notes/version-2.0.md @@ -1,6 +1,8 @@ -# v2.0.10 (2017-07-14) +# NetBox v2.0 Release Notes -## Bug Fixes +## v2.0.10 (2017-07-14) + +### Bug Fixes * [#1312](https://github.com/netbox-community/netbox/issues/1312) - Catch error when attempting to activate a user key with an invalid private key * [#1333](https://github.com/netbox-community/netbox/issues/1333) - Corrected label on is_console_server field of DeviceType bulk edit form @@ -10,24 +12,24 @@ --- -# v2.0.9 (2017-07-10) +## v2.0.9 (2017-07-10) -## Bug Fixes +### Bug Fixes * [#1319](https://github.com/netbox-community/netbox/issues/1319) - Fixed server error when attempting to create console/power connections * [#1325](https://github.com/netbox-community/netbox/issues/1325) - Retain interface attachment when editing a circuit termination --- -# v2.0.8 (2017-07-05) +## v2.0.8 (2017-07-05) -## Enhancements +### Enhancements * [#1298](https://github.com/netbox-community/netbox/issues/1298) - Calculate prefix utilization based on its status (container or non-container) * [#1303](https://github.com/netbox-community/netbox/issues/1303) - Highlight installed interface connections in green on device view * [#1315](https://github.com/netbox-community/netbox/issues/1315) - Enforce lowercase file extensions for image attachments -## Bug Fixes +### Bug Fixes * [#1279](https://github.com/netbox-community/netbox/issues/1279) - Fix primary_ip assignment during IP address import * [#1281](https://github.com/netbox-community/netbox/issues/1281) - Show LLDP neighbors tab on device view only if necessary conditions are met @@ -39,13 +41,13 @@ --- -# v2.0.7 (2017-06-15) +## v2.0.7 (2017-06-15) -## Enhancements +### Enhancements * [#626](https://github.com/netbox-community/netbox/issues/626) - Added bulk disconnect function for console/power/interface connections on device view -## Bug Fixes +### Bug Fixes * [#1238](https://github.com/netbox-community/netbox/issues/1238) - Fix error when editing an IP with a NAT assignment which has no assigned device * [#1263](https://github.com/netbox-community/netbox/issues/1263) - Differentiate add and edit permissions for objects @@ -58,9 +60,9 @@ --- -# v2.0.6 (2017-06-12) +## v2.0.6 (2017-06-12) -## Enhancements +### Enhancements * [#40](https://github.com/netbox-community/netbox/issues/40) - Added IP utilization graph to prefix list * [#704](https://github.com/netbox-community/netbox/issues/704) - Allow filtering VLANs by group when editing prefixes @@ -68,25 +70,25 @@ * [#990](https://github.com/netbox-community/netbox/issues/990) - Enable logging configuration in configuration.py * [#1180](https://github.com/netbox-community/netbox/issues/1180) - Simplified the process of finding related devices when viewing a device -## Bug Fixes +### Bug Fixes * [#1253](https://github.com/netbox-community/netbox/issues/1253) - Improved `upgrade.sh` to allow forcing Python2 --- -# v2.0.5 (2017-06-08) +## v2.0.5 (2017-06-08) -## Notes +### Notes The maximum number of objects an API consumer can request has been set to 1000 (e.g. `?limit=1000`). This limit can be modified by defining `MAX_PAGE_SIZE` in confgiuration.py. (To remove this limit, set `MAX_PAGE_SIZE=0`.) -## Enhancements +### Enhancements * [#655](https://github.com/netbox-community/netbox/issues/655) - Implemented header-based CSV import of objects * [#1190](https://github.com/netbox-community/netbox/issues/1190) - Allow partial string matching when searching on custom fields * [#1237](https://github.com/netbox-community/netbox/issues/1237) - Enabled setting limit=0 to disable pagination in API requests; added `MAX_PAGE_SIZE` configuration setting -## Bug Fixes +### Bug Fixes * [#837](https://github.com/netbox-community/netbox/issues/837) - Enforce uniqueness where applicable during bulk import of IP addresses * [#1226](https://github.com/netbox-community/netbox/issues/1226) - Improved validation for custom field values submitted via the API @@ -99,9 +101,9 @@ The maximum number of objects an API consumer can request has been set to 1000 ( --- -# v2.0.4 (2017-05-25) +## v2.0.4 (2017-05-25) -## Bug Fixes +### Bug Fixes * [#1206](https://github.com/netbox-community/netbox/issues/1206) - Fix redirection in admin UI after activating secret keys when BASE_PATH is set * [#1207](https://github.com/netbox-community/netbox/issues/1207) - Include nested LAG serializer when showing interface connections (API) @@ -115,14 +117,14 @@ The maximum number of objects an API consumer can request has been set to 1000 ( --- -# v2.0.3 (2017-05-18) +## v2.0.3 (2017-05-18) -## Enhancements +### Enhancements * [#1196](https://github.com/netbox-community/netbox/issues/1196) - Added a lag_id filter to the API interfaces view * [#1198](https://github.com/netbox-community/netbox/issues/1198) - Allow filtering unracked devices on device list -## Bug Fixes +### Bug Fixes * [#1157](https://github.com/netbox-community/netbox/issues/1157) - Hide nav menu search bar on small displays * [#1186](https://github.com/netbox-community/netbox/issues/1186) - Corrected VLAN edit form so that site assignment is not required @@ -137,9 +139,9 @@ The maximum number of objects an API consumer can request has been set to 1000 ( --- -# v2.0.2 (2017-05-15) +## v2.0.2 (2017-05-15) -## Enhancements +### Enhancements * [#1122](https://github.com/netbox-community/netbox/issues/1122) - Include NAT inside IPs in IP address list * [#1137](https://github.com/netbox-community/netbox/issues/1137) - Allow filtering devices list by rack @@ -149,7 +151,7 @@ The maximum number of objects an API consumer can request has been set to 1000 ( * [#1179](https://github.com/netbox-community/netbox/issues/1179) - Adjust topology map text color based on node background * On all object edit forms, allow filtering the tenant list by tenant group -## Bug Fixes +### Bug Fixes * [#1158](https://github.com/netbox-community/netbox/issues/1158) - Exception thrown when creating a device component with an invalid name * [#1159](https://github.com/netbox-community/netbox/issues/1159) - Only superusers can see "edit IP" buttons on the device interfaces list @@ -162,9 +164,9 @@ The maximum number of objects an API consumer can request has been set to 1000 ( --- -# v2.0.1 (2017-05-10) +## v2.0.1 (2017-05-10) -## Bug Fixes +### Bug Fixes * [#1149](https://github.com/netbox-community/netbox/issues/1149) - Port list does not populate when creating a console or power connection * [#1150](https://github.com/netbox-community/netbox/issues/1150) - Error when uploading image attachments with Unicode names under Python 2 @@ -174,27 +176,27 @@ The maximum number of objects an API consumer can request has been set to 1000 ( --- -# v2.0.0 (2017-05-09) +## v2.0.0 (2017-05-09) -## New Features +### New Features -### API 2.0 ([#113](https://github.com/netbox-community/netbox/issues/113)) +#### API 2.0 ([#113](https://github.com/netbox-community/netbox/issues/113)) The NetBox API has been completely rewritten and now features full read/write ability. -### Image Attachments ([#152](https://github.com/netbox-community/netbox/issues/152)) +#### Image Attachments ([#152](https://github.com/netbox-community/netbox/issues/152)) Users are now able to attach photos and other images to sites, racks, and devices. (Please ensure that the new `media` directory is writable by the system account NetBox runs as.) -### Global Search ([#159](https://github.com/netbox-community/netbox/issues/159)) +#### Global Search ([#159](https://github.com/netbox-community/netbox/issues/159)) NetBox now supports searching across all primary object types at once. -### Rack Elevations View ([#951](https://github.com/netbox-community/netbox/issues/951)) +#### Rack Elevations View ([#951](https://github.com/netbox-community/netbox/issues/951)) A new view has been introduced to display the elevations of multiple racks side-by-side. -## Enhancements +### Enhancements * [#154](https://github.com/netbox-community/netbox/issues/154) - Expanded device status field to include options other than active/offline * [#430](https://github.com/netbox-community/netbox/issues/430) - Include circuits when rendering topology maps @@ -202,7 +204,7 @@ A new view has been introduced to display the elevations of multiple racks side- * [#1100](https://github.com/netbox-community/netbox/issues/1100) - Add a "view all" link to completed bulk import views is_pool for prefixes) * [#1110](https://github.com/netbox-community/netbox/issues/1110) - Expand bulk edit forms to include boolean fields (e.g. toggle is_pool for prefixes) -## Bug Fixes +### Bug Fixes From v1.9.6: @@ -223,7 +225,7 @@ From beta3: * [#1126](https://github.com/netbox-community/netbox/issues/1126) - Fixed server error when editing a user key via admin UI attachment * [#1132](https://github.com/netbox-community/netbox/issues/1132) - Prompt user to unlock session key when importing secrets -## Additional Changes +### Additional Changes * The Module DCIM model has been renamed to InventoryItem to better reflect its intended function, and to make room for work on [#824](https://github.com/netbox-community/netbox/issues/824). * Redundant portions of the admin UI have been removed ([#973](https://github.com/netbox-community/netbox/issues/973)). diff --git a/docs/release-notes/version-2.1.md b/docs/release-notes/version-2.1.md index bfc4ede52..59f23c090 100644 --- a/docs/release-notes/version-2.1.md +++ b/docs/release-notes/version-2.1.md @@ -1,6 +1,8 @@ -# v2.1.6 (2017-10-11) +# NetBox v2.1 Release Notes -## Enhancements +## v2.1.6 (2017-10-11) + +### Enhancements * [#1548](https://github.com/netbox-community/netbox/issues/1548) - Automatically populate tenant assignment when adding an IP address from the prefix view * [#1561](https://github.com/netbox-community/netbox/issues/1561) - Added primary IP to the devices table in global search @@ -8,9 +10,9 @@ --- -# v2.1.5 (2017-09-25) +## v2.1.5 (2017-09-25) -## Enhancements +### Enhancements * [#1484](https://github.com/netbox-community/netbox/issues/1484) - Added individual "add VLAN" buttons on the VLAN groups list * [#1485](https://github.com/netbox-community/netbox/issues/1485) - Added `BANNER_LOGIN` configuration setting to display a banner on the login page @@ -18,7 +20,7 @@ * [#1523](https://github.com/netbox-community/netbox/issues/1523) - Improved the natural ordering of interfaces (thanks to [@tarkatronic](https://github.com/tarkatronic)) * [#1536](https://github.com/netbox-community/netbox/issues/1536) - Improved formatting of aggregate prefix statistics -## Bug Fixes +### Bug Fixes * [#1469](https://github.com/netbox-community/netbox/issues/1469) - Allow a NAT IP to be assigned as the primary IP for a device * [#1472](https://github.com/netbox-community/netbox/issues/1472) - Prevented truncation when displaying secret strings containing HTML characters @@ -30,9 +32,9 @@ --- -# v2.1.4 (2017-08-30) +## v2.1.4 (2017-08-30) -## Enhancements +### Enhancements * [#1326](https://github.com/netbox-community/netbox/issues/1326) - Added dropdown widget with common values for circuit speed fields * [#1341](https://github.com/netbox-community/netbox/issues/1341) - Added a `MEDIA_ROOT` configuration setting to specify where uploaded files are stored on disk @@ -42,7 +44,7 @@ * [#1432](https://github.com/netbox-community/netbox/issues/1432) - Added a `commit_rate` field to the circuits list search form * [#1460](https://github.com/netbox-community/netbox/issues/1460) - Hostnames with no domain are now acceptable in custom URL fields -## Bug Fixes +### Bug Fixes * [#1429](https://github.com/netbox-community/netbox/issues/1429) - Fixed uptime formatting on device status page * [#1433](https://github.com/netbox-community/netbox/issues/1433) - Fixed `devicetype_id` filter for DeviceType components @@ -51,9 +53,9 @@ --- -# v2.1.3 (2017-08-15) +## v2.1.3 (2017-08-15) -## Bug Fixes +### Bug Fixes * [#1330](https://github.com/netbox-community/netbox/issues/1330) - Raise validation error when assigning an unrelated IP as the primary IP for a device * [#1389](https://github.com/netbox-community/netbox/issues/1389) - Avoid splitting carat/prefix on prefix list @@ -66,23 +68,23 @@ --- -# v2.1.2 (2017-08-04) +## v2.1.2 (2017-08-04) -## Enhancements +### Enhancements * [#992](https://github.com/netbox-community/netbox/issues/992) - Allow the creation of multiple services per device with the same protocol and port * Tweaked navigation menu styling -## Bug Fixes +### Bug Fixes * [#1388](https://github.com/netbox-community/netbox/issues/1388) - Fixed server error when searching globally for IPs/prefixes (rolled back #1379) * [#1390](https://github.com/netbox-community/netbox/issues/1390) - Fixed IndexError when viewing available IPs within large IPv6 prefixes --- -# v2.1.1 (2017-08-02) +## v2.1.1 (2017-08-02) -## Enhancements +### Enhancements * [#893](https://github.com/netbox-community/netbox/issues/893) - Allow filtering by null values for NullCharacterFields (e.g. return only unnamed devices) * [#1368](https://github.com/netbox-community/netbox/issues/1368) - Render reservations in rack elevations view @@ -90,18 +92,18 @@ * [#1375](https://github.com/netbox-community/netbox/issues/1375) - Renamed `NETBOX_USERNAME` and `NETBOX_PASSWORD` configuration parameters to `NAPALM_USERNAME` and `NAPALM_PASSWORD` * [#1379](https://github.com/netbox-community/netbox/issues/1379) - Allow searching devices by interface MAC address in global search -## Bug Fixes +### Bug Fixes * [#461](https://github.com/netbox-community/netbox/issues/461) - Display a validation error when attempting to assigning a new child device to a rack face/position * [#1385](https://github.com/netbox-community/netbox/issues/1385) - Connected device API endpoint no longer requires authentication if `LOGIN_REQUIRED` is False --- -# v2.1.0 (2017-07-25) +## v2.1.0 (2017-07-25) -## New Features +### New Features -### IP Address Roles ([#819](https://github.com/netbox-community/netbox/issues/819)) +#### IP Address Roles ([#819](https://github.com/netbox-community/netbox/issues/819)) The IP address model now supports the assignment of a functional role to help identify special-purpose IPs. These include: @@ -113,15 +115,15 @@ The IP address model now supports the assignment of a functional role to help id * HSRP * GLBP -### Automatic Provisioning of Next Available IP ([#1246](https://github.com/netbox-community/netbox/issues/1246)) +#### Automatic Provisioning of Next Available IP ([#1246](https://github.com/netbox-community/netbox/issues/1246)) A new API endpoint has been added at `/api/ipam/prefixes//available-ips/`. A GET request to this endpoint will return a list of available IP addresses within the prefix (up to the pagination limit). A POST request will automatically create and return the next available IP address. -### NAPALM Integration ([#1348](https://github.com/netbox-community/netbox/issues/1348)) +#### NAPALM Integration ([#1348](https://github.com/netbox-community/netbox/issues/1348)) The [NAPALM automation](https://napalm-automation.net/) library provides an abstracted interface for pulling live data (e.g. uptime, software version, running config, LLDP neighbors, etc.) from network devices. The NetBox API has been extended to support executing read-only NAPALM methods on devices defined in NetBox. To enable this functionality, ensure that NAPALM has been installed (`pip install napalm`) and the `NETBOX_USERNAME` and `NETBOX_PASSWORD` [configuration parameters](http://netbox.readthedocs.io/en/stable/configuration/optional-settings/#netbox_username) have been set in configuration.py. -## Enhancements +### Enhancements * [#838](https://github.com/netbox-community/netbox/issues/838) - Display details of all objects being edited/deleted in bulk * [#1041](https://github.com/netbox-community/netbox/issues/1041) - Added enabled and MTU fields to the interface model @@ -132,7 +134,7 @@ The [NAPALM automation](https://napalm-automation.net/) library provides an abst * [#1269](https://github.com/netbox-community/netbox/issues/1269) - Added circuit termination to interface serializer * [#1320](https://github.com/netbox-community/netbox/issues/1320) - Removed checkbox from confirmation dialog -## Bug Fixes +### Bug Fixes * [#1079](https://github.com/netbox-community/netbox/issues/1079) - Order interfaces naturally via API * [#1285](https://github.com/netbox-community/netbox/issues/1285) - Enforce model validation when creating/editing objects via the API @@ -140,7 +142,7 @@ The [NAPALM automation](https://napalm-automation.net/) library provides an abst * [#1362](https://github.com/netbox-community/netbox/issues/1362) - Raise validation error when attempting to create an API key that's too short * [#1371](https://github.com/netbox-community/netbox/issues/1371) - Extend DeviceSerializer.parent_device to include standard fields -## API changes +### API changes * Added a new API endpoint which makes [NAPALM](https://github.com/napalm-automation/napalm) accessible via NetBox * Device components (console ports, power ports, interfaces, etc.) can only be filtered by a single device name or ID. This limitation was necessary to allow the natural ordering of interfaces according to the device's parent device type. diff --git a/docs/release-notes/version-2.2.md b/docs/release-notes/version-2.2.md index 1e5815c73..905b7a8d1 100644 --- a/docs/release-notes/version-2.2.md +++ b/docs/release-notes/version-2.2.md @@ -1,6 +1,8 @@ -# v2.2.10 (2018-02-21) +# NetBox v2.2 Release Notes -## Enhancements +## v2.2.10 (2018-02-21) + +### Enhancements * [#78](https://github.com/netbox-community/netbox/issues/78) - Extended topology maps to support console and power connections * [#1693](https://github.com/netbox-community/netbox/issues/1693) - Allow specifying loose or exact matching for custom field filters @@ -8,7 +10,7 @@ * [#1876](https://github.com/netbox-community/netbox/issues/1876) - Added explanatory title text to disabled NAPALM buttons on device view * [#1885](https://github.com/netbox-community/netbox/issues/1885) - Added a device filter field for primary IP -## Bug Fixes +### Bug Fixes * [#1858](https://github.com/netbox-community/netbox/issues/1858) - Include device/VM count for cluster list in global search results * [#1859](https://github.com/netbox-community/netbox/issues/1859) - Implemented support for line breaks within CSV fields @@ -18,9 +20,9 @@ --- -# v2.2.9 (2018-01-31) +## v2.2.9 (2018-01-31) -## Enhancements +### Enhancements * [#144](https://github.com/netbox-community/netbox/issues/144) - Implemented bulk import/edit/delete views for InventoryItems * [#1073](https://github.com/netbox-community/netbox/issues/1073) - Include prefixes/IPs from all VRFs when viewing the children of a container prefix in the global table @@ -29,7 +31,7 @@ * [#1824](https://github.com/netbox-community/netbox/issues/1824) - Add virtual machine count to platforms list * [#1835](https://github.com/netbox-community/netbox/issues/1835) - Consistent positioning of previous/next rack buttons -## Bug Fixes +### Bug Fixes * [#1621](https://github.com/netbox-community/netbox/issues/1621) - Tweaked LLDP interface name evaluation logic * [#1765](https://github.com/netbox-community/netbox/issues/1765) - Improved rendering of null options for model choice fields in filter forms @@ -41,9 +43,9 @@ --- -# v2.2.8 (2017-12-20) +## v2.2.8 (2017-12-20) -## Enhancements +### Enhancements * [#1771](https://github.com/netbox-community/netbox/issues/1771) - Added name filter for racks * [#1772](https://github.com/netbox-community/netbox/issues/1772) - Added position filter for devices @@ -51,7 +53,7 @@ * [#1774](https://github.com/netbox-community/netbox/issues/1774) - Include a button to refine search results for all object types under global search * [#1784](https://github.com/netbox-community/netbox/issues/1784) - Added `cluster_type` filters for virtual machines -## Bug Fixes +### Bug Fixes * [#1766](https://github.com/netbox-community/netbox/issues/1766) - Fixed display of "select all" button on device power outlets list * [#1767](https://github.com/netbox-community/netbox/issues/1767) - Use proper template for 404 responses @@ -62,14 +64,14 @@ --- -# v2.2.7 (2017-12-07) +## v2.2.7 (2017-12-07) -## Enhancements +### Enhancements * [#1722](https://github.com/netbox-community/netbox/issues/1722) - Added virtual machine count to site view * [#1737](https://github.com/netbox-community/netbox/issues/1737) - Added a `contains` API filter to find all prefixes containing a given IP or prefix -## Bug Fixes +### Bug Fixes * [#1712](https://github.com/netbox-community/netbox/issues/1712) - Corrected tenant inheritance for new IP addresses created from a parent prefix * [#1721](https://github.com/netbox-community/netbox/issues/1721) - Differentiated child IP count from utilization percentage for prefixes @@ -81,13 +83,13 @@ --- -# v2.2.6 (2017-11-16) +## v2.2.6 (2017-11-16) -## Enhancements +### Enhancements * [#1669](https://github.com/netbox-community/netbox/issues/1669) - Clicking "add an IP" from the prefix view will default to the first available IP within the prefix -## Bug Fixes +### Bug Fixes * [#1397](https://github.com/netbox-community/netbox/issues/1397) - Display global search in navigation menu unless display is less than 1200px wide * [#1599](https://github.com/netbox-community/netbox/issues/1599) - Reduce mobile cut-off for navigation menu to 960px @@ -97,16 +99,16 @@ --- -# v2.2.5 (2017-11-14) +## v2.2.5 (2017-11-14) -## Enhancements +### Enhancements * [#1512](https://github.com/netbox-community/netbox/issues/1512) - Added a view to search for an IP address being assigned to an interface * [#1679](https://github.com/netbox-community/netbox/issues/1679) - Added IP address roles to device/VM interface lists * [#1683](https://github.com/netbox-community/netbox/issues/1683) - Replaced default 500 handler with custom middleware to provide preliminary troubleshooting assistance * [#1684](https://github.com/netbox-community/netbox/issues/1684) - Replaced prefix `parent` filter with `within` and `within_include` -## Bug Fixes +### Bug Fixes * [#1471](https://github.com/netbox-community/netbox/issues/1471) - Correct bulk selection of IP addresses within a prefix assigned to a VRF * [#1642](https://github.com/netbox-community/netbox/issues/1642) - Validate device type classification when creating console server ports and power outlets @@ -121,17 +123,17 @@ --- -# v2.2.4 (2017-10-31) +## v2.2.4 (2017-10-31) -## Bug Fixes +### Bug Fixes * [#1670](https://github.com/netbox-community/netbox/issues/1670) - Fixed server error when calling certain filters (regression from #1649) --- -# v2.2.3 (2017-10-31) +## v2.2.3 (2017-10-31) -## Enhancements +### Enhancements * [#999](https://github.com/netbox-community/netbox/issues/999) - Display devices on which circuits are terminated in circuits list * [#1491](https://github.com/netbox-community/netbox/issues/1491) - Added initial data for the virtualization app @@ -139,7 +141,7 @@ * [#1631](https://github.com/netbox-community/netbox/issues/1631) - Added a `post_run` method to the Report class * [#1666](https://github.com/netbox-community/netbox/issues/1666) - Allow modifying the owner of a rack reservation -## Bug Fixes +### Bug Fixes * [#1513](https://github.com/netbox-community/netbox/issues/1513) - Correct filtering of custom field choices * [#1603](https://github.com/netbox-community/netbox/issues/1603) - Hide selection checkboxes for tables with no available actions @@ -153,14 +155,14 @@ --- -# v2.2.2 (2017-10-17) +## v2.2.2 (2017-10-17) -## Enhancements +### Enhancements * [#1580](https://github.com/netbox-community/netbox/issues/1580) - Allow cluster assignment when bulk importing devices * [#1587](https://github.com/netbox-community/netbox/issues/1587) - Add primary IP column for virtual machines in global search results -## Bug Fixes +### Bug Fixes * [#1498](https://github.com/netbox-community/netbox/issues/1498) - Avoid duplicating nodes when generating topology maps * [#1579](https://github.com/netbox-community/netbox/issues/1579) - Devices already assigned to a cluster cannot be added to a different cluster @@ -172,31 +174,31 @@ --- -# v2.2.1 (2017-10-12) +## v2.2.1 (2017-10-12) -## Bug Fixes +### Bug Fixes * [#1576](https://github.com/netbox-community/netbox/issues/1576) - Moved PostgreSQL validation logic into the relevant migration (fixed ImproperlyConfigured exception on init) --- -# v2.2.0 (2017-10-12) +## v2.2.0 (2017-10-12) **Note:** This release requires PostgreSQL 9.4 or higher. Do not attempt to upgrade unless you are running at least PostgreSQL 9.4. **Note:** The release replaces the deprecated pycrypto library with [pycryptodome](https://github.com/Legrandin/pycryptodome). The upgrade script has been extended to automatically uninstall the old library, but please verify your installed packages with `pip freeze | grep pycrypto` if you run into problems. -## New Features +### New Features -### Virtual Machines and Clusters ([#142](https://github.com/netbox-community/netbox/issues/142)) +#### Virtual Machines and Clusters ([#142](https://github.com/netbox-community/netbox/issues/142)) Our second-most popular feature request has arrived! NetBox now supports the creation of virtual machines, which can be assigned virtual interfaces and IP addresses. VMs are arranged into clusters, each of which has a type and (optionally) a group. -### Custom Validation Reports ([#1511](https://github.com/netbox-community/netbox/issues/1511)) +#### Custom Validation Reports ([#1511](https://github.com/netbox-community/netbox/issues/1511)) Users can now create custom reports which are run to validate data in NetBox. Reports work very similar to Python unit tests: Each report inherits from NetBox's Report class and contains one or more test method. Reports can be run and retrieved via the web UI, API, or CLI. See [the docs](http://netbox.readthedocs.io/en/stable/miscellaneous/reports/) for more info. -## Enhancements +### Enhancements * [#494](https://github.com/netbox-community/netbox/issues/494) - Include asset tag in device info pop-up on rack elevation * [#1444](https://github.com/netbox-community/netbox/issues/1444) - Added a `serial` field to the rack model @@ -208,14 +210,14 @@ Users can now create custom reports which are run to validate data in NetBox. Re * [#1556](https://github.com/netbox-community/netbox/issues/1556) - Added CPAK, CFP2, and CFP4 100GE interface form factors * Added CSV import views for all object types -## Bug Fixes +### Bug Fixes * [#1550](https://github.com/netbox-community/netbox/issues/1550) - Corrected interface connections link in navigation menu * [#1554](https://github.com/netbox-community/netbox/issues/1554) - Don't require form_factor when creating an interface assigned to a virtual machine * [#1557](https://github.com/netbox-community/netbox/issues/1557) - Added filtering for virtual machine interfaces * [#1567](https://github.com/netbox-community/netbox/issues/1567) - Prompt user for session key when importing secrets -## API Changes +### API Changes * Introduced the virtualization app and its associated endpoints at `/api/virtualization` * Added the `/api/extras/reports` endpoint for fetching and running reports diff --git a/docs/release-notes/version-2.3.md b/docs/release-notes/version-2.3.md index 419adc9ac..810999b0b 100644 --- a/docs/release-notes/version-2.3.md +++ b/docs/release-notes/version-2.3.md @@ -1,10 +1,12 @@ -# v2.3.7 (2018-07-26) +# NetBox v2.3 Release Notes -## Enhancements +## v2.3.7 (2018-07-26) + +### Enhancements * [#2166](https://github.com/netbox-community/netbox/issues/2166) - Enable partial matching on device asset_tag during search -## Bug Fixes +### Bug Fixes * [#1977](https://github.com/netbox-community/netbox/issues/1977) - Fixed exception when creating a virtual chassis with a non-master device in position 1 * [#1992](https://github.com/netbox-community/netbox/issues/1992) - Isolate errors when one of multiple NAPALM methods fails @@ -19,29 +21,29 @@ --- -# v2.3.6 (2018-07-16) +## v2.3.6 (2018-07-16) -## Enhancements +### Enhancements * [#2107](https://github.com/netbox-community/netbox/issues/2107) - Added virtual chassis to global search * [#2125](https://github.com/netbox-community/netbox/issues/2125) - Show child status in device bay list -## Bug Fixes +### Bug Fixes * [#2214](https://github.com/netbox-community/netbox/issues/2214) - Error when assigning a VLAN to an interface on a VM in a cluster with no assigned site * [#2239](https://github.com/netbox-community/netbox/issues/2239) - Pin django-filter to version 1.1.0 --- -# v2.3.5 (2018-07-02) +## v2.3.5 (2018-07-02) -## Enhancements +### Enhancements * [#2159](https://github.com/netbox-community/netbox/issues/2159) - Allow custom choice field to specify a default choice * [#2177](https://github.com/netbox-community/netbox/issues/2177) - Include device serial number in rack elevation pop-up * [#2194](https://github.com/netbox-community/netbox/issues/2194) - Added `address` filter to IPAddress model -## Bug Fixes +### Bug Fixes * [#1826](https://github.com/netbox-community/netbox/issues/1826) - Corrected description of security parameters under API definition * [#2021](https://github.com/netbox-community/netbox/issues/2021) - Fix recursion error when viewing API docs under Python 3.4 @@ -54,9 +56,9 @@ --- -# v2.3.4 (2018-06-07) +## v2.3.4 (2018-06-07) -## Bug Fixes +### Bug Fixes * [#2066](https://github.com/netbox-community/netbox/issues/2066) - Catch `AddrFormatError` exception on invalid IP addresses * [#2075](https://github.com/netbox-community/netbox/issues/2075) - Enable tenant assignment when creating a rack reservation via the API @@ -72,13 +74,13 @@ --- -# v2.3.3 (2018-04-19) +## v2.3.3 (2018-04-19) -## Enhancements +### Enhancements * [#1990](https://github.com/netbox-community/netbox/issues/1990) - Improved search function when assigning an IP address to an interface -## Bug Fixes +### Bug Fixes * [#1975](https://github.com/netbox-community/netbox/issues/1975) - Correct filtering logic for custom boolean fields * [#1988](https://github.com/netbox-community/netbox/issues/1988) - Order interfaces naturally when bulk renaming @@ -93,9 +95,9 @@ --- -# v2.3.2 (2018-03-22) +## v2.3.2 (2018-03-22) -## Enhancements +### Enhancements * [#1586](https://github.com/netbox-community/netbox/issues/1586) - Extend bulk interface creation to support alphanumeric characters * [#1866](https://github.com/netbox-community/netbox/issues/1866) - Introduced AnnotatedMultipleChoiceField for filter forms @@ -105,7 +107,7 @@ * [#1949](https://github.com/netbox-community/netbox/issues/1949) - Added a button to view elevations on rack groups list * [#1952](https://github.com/netbox-community/netbox/issues/1952) - Implemented a more robust mechanism for assigning VLANs to interfaces -## Bug Fixes +### Bug Fixes * [#1948](https://github.com/netbox-community/netbox/issues/1948) - Fix TypeError when attempting to add a member to an existing virtual chassis * [#1951](https://github.com/netbox-community/netbox/issues/1951) - Fix TypeError exception when importing platforms @@ -116,13 +118,13 @@ --- -# v2.3.1 (2018-03-01) +## v2.3.1 (2018-03-01) -## Enhancements +### Enhancements * [#1910](https://github.com/netbox-community/netbox/issues/1910) - Added filters for cluster group and cluster type -## Bug Fixes +### Bug Fixes * [#1915](https://github.com/netbox-community/netbox/issues/1915) - Redirect to device view after deleting a component * [#1919](https://github.com/netbox-community/netbox/issues/1919) - Prevent exception when attempting to create a virtual machine without selecting devices @@ -137,19 +139,19 @@ --- -# v2.3.0 (2018-02-26) +## v2.3.0 (2018-02-26) -## New Features +### New Features -### Virtual Chassis ([#99](https://github.com/netbox-community/netbox/issues/99)) +#### Virtual Chassis ([#99](https://github.com/netbox-community/netbox/issues/99)) A virtual chassis represents a set of physical devices with a shared control plane; for example, a stack of switches managed as a single device. Viewing the master device of a virtual chassis will show all member interfaces and IP addresses. -### Interface VLAN Assignments ([#150](https://github.com/netbox-community/netbox/issues/150)) +#### Interface VLAN Assignments ([#150](https://github.com/netbox-community/netbox/issues/150)) Interfaces can now be assigned an 802.1Q mode (access or trunked) and associated with particular VLANs. Thanks to [John Anderson](https://github.com/lampwins) for his work on this! -### Bulk Object Creation via the API ([#1553](https://github.com/netbox-community/netbox/issues/1553)) +#### Bulk Object Creation via the API ([#1553](https://github.com/netbox-community/netbox/issues/1553)) The REST API now supports the creation of multiple objects of the same type using a single POST request. For example, to create multiple devices: @@ -163,7 +165,7 @@ curl -X POST -H "Authorization: Token " -H "Content-Type: application/jso Bulk creation is all-or-none: If any of the creations fails, the entire operation is rolled back. -### Automatic Provisioning of Next Available Prefixes ([#1694](https://github.com/netbox-community/netbox/issues/1694)) +#### Automatic Provisioning of Next Available Prefixes ([#1694](https://github.com/netbox-community/netbox/issues/1694)) Similar to IP addresses, NetBox now supports automated provisioning of available prefixes from within a parent prefix. For example, to retrieve the next three available /28s within a parent /24: @@ -177,11 +179,11 @@ curl -X POST -H "Authorization: Token " -H "Content-Type: application/jso If the parent prefix cannot accommodate all requested prefixes, the operation is cancelled and no new prefixes are created. -### Bulk Renaming of Device/VM Components ([#1781](https://github.com/netbox-community/netbox/issues/1781)) +#### Bulk Renaming of Device/VM Components ([#1781](https://github.com/netbox-community/netbox/issues/1781)) Device components (interfaces, console ports, etc.) can now be renamed in bulk via the web interface. This was implemented primarily to support the bulk renumbering of interfaces whose parent is part of a virtual chassis. -## Enhancements +### Enhancements * [#1283](https://github.com/netbox-community/netbox/issues/1283) - Added a `time_zone` field to the site model * [#1321](https://github.com/netbox-community/netbox/issues/1321) - Added `created` and `last_updated` fields for relevant models to their API serializers @@ -192,7 +194,7 @@ Device components (interfaces, console ports, etc.) can now be renamed in bulk v * [#1821](https://github.com/netbox-community/netbox/issues/1821) - Added a `description` field to the site model * [#1864](https://github.com/netbox-community/netbox/issues/1864) - Added a `status` field to the circuit model -## Bug Fixes +### Bug Fixes * [#1136](https://github.com/netbox-community/netbox/issues/1136) - Enforce model validation during bulk update * [#1645](https://github.com/netbox-community/netbox/issues/1645) - Simplified interface serialzier for IP addresses and optimized API view queryset @@ -206,11 +208,11 @@ Device components (interfaces, console ports, etc.) can now be renamed in bulk v \* New since v2.3-beta2 -## Breaking Changes +### Breaking Changes * Constants representing device status have been renamed for clarity (for example, `STATUS_ACTIVE` is now `DEVICE_STATUS_ACTIVE`). Custom validation reports will need to be updated if they reference any of these constants. -## API Changes +### API Changes * API creation calls now accept either a single JSON object or a list of JSON objects. If multiple objects are passed and one or more them fail validation, no objects will be created. * Added `created` and `last_updated` fields for objects inheriting from CreatedUpdatedModel. diff --git a/docs/release-notes/version-2.4.md b/docs/release-notes/version-2.4.md index b477ba9db..5a55a6358 100644 --- a/docs/release-notes/version-2.4.md +++ b/docs/release-notes/version-2.4.md @@ -1,13 +1,14 @@ +# NetBox v2.4 Release Notes -# v2.4.9 (2018-12-07) +## v2.4.9 (2018-12-07) -## Enhancements +### Enhancements * [#2089](https://github.com/netbox-community/netbox/issues/2089) - Add SONET interface form factors * [#2495](https://github.com/netbox-community/netbox/issues/2495) - Enable deep-merging of config context data * [#2597](https://github.com/netbox-community/netbox/issues/2597) - Add FibreChannel SFP28 (32GFC) interface form factor -## Bug Fixes +### Bug Fixes * [#2400](https://github.com/netbox-community/netbox/issues/2400) - Correct representation of nested object assignment in API docs * [#2576](https://github.com/netbox-community/netbox/issues/2576) - Correct type for count_* fields in site API representation @@ -20,14 +21,14 @@ --- -# v2.4.8 (2018-11-20) +## v2.4.8 (2018-11-20) -## Enhancements +### Enhancements * [#2490](https://github.com/netbox-community/netbox/issues/2490) - Added bulk editing for config contexts * [#2557](https://github.com/netbox-community/netbox/issues/2557) - Added object view for tags -## Bug Fixes +### Bug Fixes * [#2473](https://github.com/netbox-community/netbox/issues/2473) - Fix encoding of long (>127 character) secrets * [#2558](https://github.com/netbox-community/netbox/issues/2558) - Filter on all tags when multiple are passed @@ -38,15 +39,15 @@ --- -# v2.4.7 (2018-11-06) +## v2.4.7 (2018-11-06) -## Enhancements +### Enhancements * [#2388](https://github.com/netbox-community/netbox/issues/2388) - Enable filtering of devices/VMs by region * [#2427](https://github.com/netbox-community/netbox/issues/2427) - Allow filtering of interfaces by assigned VLAN or VLAN ID * [#2512](https://github.com/netbox-community/netbox/issues/2512) - Add device field to inventory item filter form -## Bug Fixes +### Bug Fixes * [#2502](https://github.com/netbox-community/netbox/issues/2502) - Allow duplicate VIPs inside a uniqueness-enforced VRF * [#2514](https://github.com/netbox-community/netbox/issues/2514) - Prevent new connections to already connected interfaces @@ -56,14 +57,14 @@ --- -# v2.4.6 (2018-10-05) +## v2.4.6 (2018-10-05) -## Enhancements +### Enhancements * [#2479](https://github.com/netbox-community/netbox/issues/2479) - Add user permissions for creating/modifying API tokens * [#2487](https://github.com/netbox-community/netbox/issues/2487) - Return abbreviated API output when passed `?brief=1` -## Bug Fixes +### Bug Fixes * [#2393](https://github.com/netbox-community/netbox/issues/2393) - Fix Unicode support for CSV import under Python 2 * [#2483](https://github.com/netbox-community/netbox/issues/2483) - Set max item count of API-populated form fields to MAX_PAGE_SIZE @@ -74,16 +75,16 @@ --- -# v2.4.5 (2018-10-02) +## v2.4.5 (2018-10-02) -## Enhancements +### Enhancements * [#2392](https://github.com/netbox-community/netbox/issues/2392) - Implemented local context data for devices and virtual machines * [#2402](https://github.com/netbox-community/netbox/issues/2402) - Order and format JSON data in form fields * [#2432](https://github.com/netbox-community/netbox/issues/2432) - Link remote interface connections to the Interface view * [#2438](https://github.com/netbox-community/netbox/issues/2438) - API optimizations for tagged objects -## Bug Fixes +### Bug Fixes * [#2406](https://github.com/netbox-community/netbox/issues/2406) - Remove hard-coded limit of 1000 objects from API-populated form fields * [#2414](https://github.com/netbox-community/netbox/issues/2414) - Tags field missing from device/VM component creation forms @@ -95,16 +96,16 @@ --- -# v2.4.4 (2018-08-22) +## v2.4.4 (2018-08-22) -## Enhancements +### Enhancements * [#2168](https://github.com/netbox-community/netbox/issues/2168) - Added Extreme SummitStack interface form factors * [#2356](https://github.com/netbox-community/netbox/issues/2356) - Include cluster site as read-only field in VirtualMachine serializer * [#2362](https://github.com/netbox-community/netbox/issues/2362) - Implemented custom admin site to properly handle BASE_PATH * [#2254](https://github.com/netbox-community/netbox/issues/2254) - Implemented searchability for Rack Groups -## Bug Fixes +### Bug Fixes * [#2353](https://github.com/netbox-community/netbox/issues/2353) - Handle `DoesNotExist` exception when deleting a device with connected interfaces * [#2354](https://github.com/netbox-community/netbox/issues/2354) - Increased maximum MTU for interfaces to 65536 bytes @@ -117,13 +118,13 @@ --- -# v2.4.3 (2018-08-09) +## v2.4.3 (2018-08-09) -## Enhancements +### Enhancements * [#2333](https://github.com/netbox-community/netbox/issues/2333) - Added search filters for ConfigContexts -## Bug Fixes +### Bug Fixes * [#2334](https://github.com/netbox-community/netbox/issues/2334) - TypeError raised when WritableNestedSerializer receives a non-integer value * [#2335](https://github.com/netbox-community/netbox/issues/2335) - API requires group field when creating/updating a rack @@ -135,9 +136,9 @@ --- -# v2.4.2 (2018-08-08) +## v2.4.2 (2018-08-08) -## Bug Fixes +### Bug Fixes * [#2318](https://github.com/netbox-community/netbox/issues/2318) - ImportError when viewing a report * [#2319](https://github.com/netbox-community/netbox/issues/2319) - Extend ChoiceField to properly handle true/false choice keys @@ -149,9 +150,9 @@ --- -# v2.4.1 (2018-08-07) +## v2.4.1 (2018-08-07) -## Bug Fixes +### Bug Fixes * [#2303](https://github.com/netbox-community/netbox/issues/2303) - Always redirect to parent object when bulk editing/deleting components * [#2308](https://github.com/netbox-community/netbox/issues/2308) - Custom fields panel absent from object view in UI @@ -162,29 +163,29 @@ --- -# v2.4.0 (2018-08-06) +## v2.4.0 (2018-08-06) -## New Features +### New Features -### Webhooks ([#81](https://github.com/netbox-community/netbox/issues/81)) +#### Webhooks ([#81](https://github.com/netbox-community/netbox/issues/81)) Webhooks enable NetBox to send a representation of an object every time one is created, updated, or deleted. Webhooks are sent from NetBox to external services via HTTP, and can be limited by object type. Services which receive a webhook can act on the data provided by NetBox to automate other tasks. Special thanks to [John Anderson](https://github.com/lampwins) for doing the heavy lifting for this feature! -### Tagging ([#132](https://github.com/netbox-community/netbox/issues/132)) +#### Tagging ([#132](https://github.com/netbox-community/netbox/issues/132)) Tags are free-form labels which can be assigned to a variety of objects in NetBox. Tags can be used to categorize and filter objects in addition to built-in and custom fields. Objects to which tags apply now include a `tags` field in the API. -### Contextual Configuration Data ([#1349](https://github.com/netbox-community/netbox/issues/1349)) +#### Contextual Configuration Data ([#1349](https://github.com/netbox-community/netbox/issues/1349)) 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 (expressed in JSON format) to devices and virtual machines grouped by region, site, role, platform, and/or tenancy. 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. -### Change Logging ([#1898](https://github.com/netbox-community/netbox/issues/1898)) +#### Change Logging ([#1898](https://github.com/netbox-community/netbox/issues/1898)) When an object is created, updated, or deleted, NetBox now automatically records a serialized representation of that object (similar to how it appears in the REST API) as well the event time and user account associated with the change. -## Enhancements +### Enhancements * [#238](https://github.com/netbox-community/netbox/issues/238) - Allow racks with the same name within a site (but in different groups) * [#971](https://github.com/netbox-community/netbox/issues/971) - Add a view to show all VLAN IDs available within a group @@ -199,12 +200,12 @@ When an object is created, updated, or deleted, NetBox now automatically records * [#2157](https://github.com/netbox-community/netbox/issues/2157) - Fixed natural ordering of objects when sorted by name * [#2225](https://github.com/netbox-community/netbox/issues/2225) - Add "view elevations" button for site rack groups -## Bug Fixes +### Bug Fixes * [#2272](https://github.com/netbox-community/netbox/issues/2272) - Allow subdevice_role to be null on DeviceTypeSerializer" * [#2286](https://github.com/netbox-community/netbox/issues/2286) - Fixed "mark connected" button for PDU outlet connections -## API Changes +### API Changes * Introduced the `/extras/config-contexts/`, `/extras/object-changes/`, and `/extras/tags/` API endpoints * API writes now return a nested representation of related objects (rather than only a numeric ID) @@ -213,15 +214,15 @@ When an object is created, updated, or deleted, NetBox now automatically records * The ipam.Service and secrets.Secret serializers now include custom fields * The dcim.Platform serializer now includes a free-form (JSON) `napalm_args` field -## Changes Since v2.4-beta1 +### Changes Since v2.4-beta1 -### Enhancements +#### Enhancements * [#2229](https://github.com/netbox-community/netbox/issues/2229) - Allow mapping of ConfigContexts to tenant groups * [#2259](https://github.com/netbox-community/netbox/issues/2259) - Add changelog tab to interface view * [#2264](https://github.com/netbox-community/netbox/issues/2264) - Added "map it" link for site GPS coordinates -### Bug Fixes +#### Bug Fixes * [#2137](https://github.com/netbox-community/netbox/issues/2137) - Fixed JSON serialization of dates * [#2258](https://github.com/netbox-community/netbox/issues/2258) - Include changed object type on home page changelog diff --git a/docs/release-notes/version-2.5.md b/docs/release-notes/version-2.5.md index 45a1ba0d0..666ecb6f1 100644 --- a/docs/release-notes/version-2.5.md +++ b/docs/release-notes/version-2.5.md @@ -1,6 +1,8 @@ -# v2.5.13 (2019-05-31) +# NetBox v2.5 Release Notes -## Enhancements +## v2.5.13 (2019-05-31) + +### Enhancements * [#2813](https://github.com/netbox-community/netbox/issues/2813) - Add tenant group filters * [#3085](https://github.com/netbox-community/netbox/issues/3085) - Catch all exceptions during export template rendering @@ -11,7 +13,7 @@ * [#3185](https://github.com/netbox-community/netbox/issues/3185) - Improve performance for custom field access within templates * [#3186](https://github.com/netbox-community/netbox/issues/3186) - Add interface name filter for IP addresses -## Bug Fixes +### Bug Fixes * [#3031](https://github.com/netbox-community/netbox/issues/3031) - Fixed form field population of tags with spaces * [#3132](https://github.com/netbox-community/netbox/issues/3132) - Circuit termination missing from available cable termination types @@ -25,9 +27,9 @@ --- -# v2.5.12 (2019-05-01) +## v2.5.12 (2019-05-01) -## Bug Fixes +### Bug Fixes * [#3127](https://github.com/netbox-community/netbox/issues/3127) - Fix natural ordering of device components @@ -35,17 +37,17 @@ 2.5.11 (2019-04-29) -## Notes +### Notes This release upgrades the Django framework to version 2.2. -## Enhancements +### Enhancements * [#2986](https://github.com/netbox-community/netbox/issues/2986) - Improve natural ordering of device components * [#3023](https://github.com/netbox-community/netbox/issues/3023) - Add support for filtering cables by connected device * [#3070](https://github.com/netbox-community/netbox/issues/3070) - Add decommissioning status for devices -## Bug Fixes +### Bug Fixes * [#2621](https://github.com/netbox-community/netbox/issues/2621) - Upgrade Django requirement to 2.2 to fix object deletion issue in the changelog middleware * [#3072](https://github.com/netbox-community/netbox/issues/3072) - Preserve multiselect filter values when updating per-page count for list views @@ -55,13 +57,13 @@ This release upgrades the Django framework to version 2.2. --- -# v2.5.10 (2019-04-08) +## v2.5.10 (2019-04-08) -## Enhancements +### Enhancements * [#3052](https://github.com/netbox-community/netbox/issues/3052) - Add Jinja2 support for export templates -## Bug Fixes +### Bug Fixes * [#2937](https://github.com/netbox-community/netbox/issues/2937) - Redirect to list view after editing an object from list view * [#3036](https://github.com/netbox-community/netbox/issues/3036) - DCIM interfaces API endpoint should not include VM interfaces @@ -73,15 +75,15 @@ This release upgrades the Django framework to version 2.2. --- -# v2.5.9 (2019-04-01) +## v2.5.9 (2019-04-01) -## Enhancements +### Enhancements * [#2933](https://github.com/netbox-community/netbox/issues/2933) - Add username to outbound webhook requests * [#3011](https://github.com/netbox-community/netbox/issues/3011) - Add SSL support for django-rq (requires django-rq v1.3.1+) * [#3025](https://github.com/netbox-community/netbox/issues/3025) - Add request ID to outbound webhook requests (for correlating all changes part of a single request) -## Bug Fixes +### Bug Fixes * [#2207](https://github.com/netbox-community/netbox/issues/2207) - Fixes deterministic ordering of interfaces * [#2577](https://github.com/netbox-community/netbox/issues/2577) - Clarification of wording in API regarding filtering @@ -98,13 +100,13 @@ This release upgrades the Django framework to version 2.2. --- -# v2.5.8 (2019-03-11) +## v2.5.8 (2019-03-11) -## Enhancements +### Enhancements * [#2435](https://github.com/netbox-community/netbox/issues/2435) - Printer friendly CSS -## Bug Fixes +### Bug Fixes * [#2065](https://github.com/netbox-community/netbox/issues/2065) - Correct documentation for VM interface serializer * [#2705](https://github.com/netbox-community/netbox/issues/2705) - Fix endpoint grouping in API docs @@ -128,9 +130,9 @@ This release upgrades the Django framework to version 2.2. --- -# v2.5.7 (2019-02-21) +## v2.5.7 (2019-02-21) -## Enhancements +### Enhancements * [#2357](https://github.com/netbox-community/netbox/issues/2357) - Enable filtering of devices by rack face * [#2638](https://github.com/netbox-community/netbox/issues/2638) - Add button to copy unlocked secret to clipboard @@ -140,7 +142,7 @@ This release upgrades the Django framework to version 2.2. * [#2898](https://github.com/netbox-community/netbox/issues/2898) - Enable filtering cables list by connection status * [#2903](https://github.com/netbox-community/netbox/issues/2903) - Clarify purpose of tags field on interface edit form -## Bug Fixes +### Bug Fixes * [#2852](https://github.com/netbox-community/netbox/issues/2852) - Allow filtering devices by null rack position * [#2884](https://github.com/netbox-community/netbox/issues/2884) - Don't display connect button for wireless interfaces @@ -156,16 +158,16 @@ This release upgrades the Django framework to version 2.2. --- -# v2.5.6 (2019-02-13) +## v2.5.6 (2019-02-13) -## Enhancements +### Enhancements * [#2758](https://github.com/netbox-community/netbox/issues/2758) - Add cable trace button to pass-through ports * [#2839](https://github.com/netbox-community/netbox/issues/2839) - Add "110 punch" type for pass-through ports * [#2854](https://github.com/netbox-community/netbox/issues/2854) - Enable bulk editing of pass-through ports * [#2866](https://github.com/netbox-community/netbox/issues/2866) - Add cellular interface types (GSM/CDMA/LTE) -## Bug Fixes +### Bug Fixes * [#2841](https://github.com/netbox-community/netbox/issues/2841) - Fix filtering by VRF for prefix and IP address lists * [#2844](https://github.com/netbox-community/netbox/issues/2844) - Correct display of far cable end for pass-through ports @@ -179,15 +181,15 @@ This release upgrades the Django framework to version 2.2. --- -# v2.5.5 (2019-01-31) +## v2.5.5 (2019-01-31) -## Enhancements +### Enhancements * [#2805](https://github.com/netbox-community/netbox/issues/2805) - Allow null route distinguisher for VRFs * [#2809](https://github.com/netbox-community/netbox/issues/2809) - Remove VRF child prefixes table; link to main prefixes view * [#2825](https://github.com/netbox-community/netbox/issues/2825) - Include directly connected device for front/rear ports -## Bug Fixes +### Bug Fixes * [#2824](https://github.com/netbox-community/netbox/issues/2824) - Fix template exception when viewing rack elevations list * [#2833](https://github.com/netbox-community/netbox/issues/2833) - Fix form widget for front port template creation @@ -196,9 +198,9 @@ This release upgrades the Django framework to version 2.2. --- -# v2.5.4 (2019-01-29) +## v2.5.4 (2019-01-29) -## Enhancements +### Enhancements * [#2516](https://github.com/netbox-community/netbox/issues/2516) - Implemented Select2 for all Model backed selection fields * [#2590](https://github.com/netbox-community/netbox/issues/2590) - Implemented the color picker with Select2 to show colors in the background @@ -211,7 +213,7 @@ This release upgrades the Django framework to version 2.2. * [#2808](https://github.com/netbox-community/netbox/issues/2808) - Loosen version pinning for Django to allow patch releases * [#2810](https://github.com/netbox-community/netbox/issues/2810) - Include description fields in interface connections export -## Bug Fixes +### Bug Fixes * [#2779](https://github.com/netbox-community/netbox/issues/2779) - Include "none" option when filter IP addresses by role * [#2783](https://github.com/netbox-community/netbox/issues/2783) - Fix AttributeError exception when attempting to delete region(s) @@ -222,9 +224,9 @@ This release upgrades the Django framework to version 2.2. --- -# v2.5.3 (2019-01-11) +## v2.5.3 (2019-01-11) -## Enhancements +### Enhancements * [#1630](https://github.com/netbox-community/netbox/issues/1630) - Enable bulk editing of prefix/IP mask length * [#1870](https://github.com/netbox-community/netbox/issues/1870) - Add per-page toggle to object lists @@ -234,7 +236,7 @@ This release upgrades the Django framework to version 2.2. * [#2693](https://github.com/netbox-community/netbox/issues/2693) - Additional cable colors * [#2726](https://github.com/netbox-community/netbox/issues/2726) - Include cables in global search -## Bug Fixes +### Bug Fixes * [#2742](https://github.com/netbox-community/netbox/issues/2742) - Preserve cluster assignment when editing a device * [#2757](https://github.com/netbox-community/netbox/issues/2757) - Always treat first/last IPs within a /31 or /127 as usable @@ -244,14 +246,14 @@ This release upgrades the Django framework to version 2.2. --- -# v2.5.2 (2018-12-21) +## v2.5.2 (2018-12-21) -## Enhancements +### Enhancements * [#2561](https://github.com/netbox-community/netbox/issues/2561) - Add 200G and 400G interface types * [#2701](https://github.com/netbox-community/netbox/issues/2701) - Enable filtering of prefixes by exact prefix value -## Bug Fixes +### Bug Fixes * [#2673](https://github.com/netbox-community/netbox/issues/2673) - Fix exception on LLDP neighbors view for device with a circuit connected * [#2691](https://github.com/netbox-community/netbox/issues/2691) - Cable trace should follow circuits @@ -266,14 +268,14 @@ This release upgrades the Django framework to version 2.2. --- -# v2.5.1 (2018-12-13) +## v2.5.1 (2018-12-13) -## Enhancements +### Enhancements * [#2655](https://github.com/netbox-community/netbox/issues/2655) - Add 128GFC Fibrechannel interface type * [#2674](https://github.com/netbox-community/netbox/issues/2674) - Enable filtering changelog by object type under web UI -## Bug Fixes +### Bug Fixes * [#2662](https://github.com/netbox-community/netbox/issues/2662) - Fix ImproperlyConfigured exception when rendering API docs * [#2663](https://github.com/netbox-community/netbox/issues/2663) - Prevent duplicate interfaces from appearing under VLAN members view @@ -287,33 +289,33 @@ This release upgrades the Django framework to version 2.2. --- -# v2.5.0 (2018-12-10) +## v2.5.0 (2018-12-10) -## Notes +### Notes -### Python 3 Required +#### Python 3 Required As promised, Python 2 support has been completed removed. Python 3.5 or higher is now required to run NetBox. Please see [our Python 3 migration guide](https://netbox.readthedocs.io/en/stable/installation/migrating-to-python3/) for assistance with upgrading. -### Removed Deprecated User Activity Log +#### Removed Deprecated User Activity Log The UserAction model, which was deprecated by the new change logging feature in NetBox v2.4, has been removed. If you need to archive legacy user activity, do so prior to upgrading to NetBox v2.5, as the database migration will remove all data associated with this model. -### View Permissions in Django 2.1 +#### View Permissions in Django 2.1 Django 2.1 introduces view permissions for object types (not to be confused with object-level permissions). Implementation of [#323](https://github.com/netbox-community/netbox/issues/323) is planned for NetBox v2.6. Users are encourage to begin assigning view permissions as desired in preparation for their eventual enforcement. -### upgrade.sh No Longer Invokes sudo +#### upgrade.sh No Longer Invokes sudo The `upgrade.sh` script has been tweaked so that it no longer invokes `sudo` internally. This was done to ensure compatibility when running NetBox inside a Python virtual environment. If you need elevated permissions when upgrading NetBox, call the upgrade script with `sudo upgrade.sh`. -## New Features +### New Features -### Patch Panels and Cables ([#20](https://github.com/netbox-community/netbox/issues/20)) +#### Patch Panels and Cables ([#20](https://github.com/netbox-community/netbox/issues/20)) NetBox now supports modeling physical cables for console, power, and interface connections. The new pass-through port component type has also been introduced to model patch panels and similar devices. -## Enhancements +### Enhancements * [#450](https://github.com/netbox-community/netbox/issues/450) - Added `outer_width` and `outer_depth` fields to rack model * [#867](https://github.com/netbox-community/netbox/issues/867) - Added `description` field to circuit terminations @@ -329,7 +331,7 @@ NetBox now supports modeling physical cables for console, power, and interface c * [#2426](https://github.com/netbox-community/netbox/issues/2426) - Introduced `SESSION_FILE_PATH` configuration setting for authentication without write access to database * [#2594](https://github.com/netbox-community/netbox/issues/2594) - `upgrade.sh` no longer invokes sudo -## Changes From v2.5-beta2 +### Changes From v2.5-beta2 * [#2474](https://github.com/netbox-community/netbox/issues/2474) - Add `cabled` and `connection_status` filters for device components * [#2616](https://github.com/netbox-community/netbox/issues/2616) - Convert Rack `outer_unit` and Cable `length_unit` to integer-based choice fields @@ -341,7 +343,7 @@ NetBox now supports modeling physical cables for console, power, and interface c * [#2648](https://github.com/netbox-community/netbox/issues/2648) - Include the `connection_status` field in nested represenations of connectable device components * [#2649](https://github.com/netbox-community/netbox/issues/2649) - Add `connected_endpoint_type` to connectable device component API representations -## API Changes +### API Changes * The `/extras/recent-activity/` endpoint (replaced by change logging in v2.4) has been removed * The `rpc_client` field has been removed from dcim.Platform (see #2367) diff --git a/docs/release-notes/version-2.6.md b/docs/release-notes/version-2.6.md index 9fd258b0f..e8228920d 100644 --- a/docs/release-notes/version-2.6.md +++ b/docs/release-notes/version-2.6.md @@ -1,6 +1,8 @@ -# v2.6.12 (2020-01-13) +# NetBox v2.6 Release Notes -## Enhancements +## v2.6.12 (2020-01-13) + +### Enhancements * [#1982](https://github.com/netbox-community/netbox/issues/1982) - Improved NAPALM method documentation in Swagger (OpenAPI) * [#2050](https://github.com/netbox-community/netbox/issues/2050) - Preview image attachments when hovering over the link @@ -18,7 +20,7 @@ * [#3851](https://github.com/netbox-community/netbox/issues/3851) - Allow passing initial data to custom script forms * [#3891](https://github.com/netbox-community/netbox/issues/3891) - Add `local_context_data` filter for virtual machines -## Bug Fixes +### Bug Fixes * [#3589](https://github.com/netbox-community/netbox/issues/3589) - Fix validation on tagged VLANs of an interface * [#3849](https://github.com/netbox-community/netbox/issues/3849) - Fix ordering of models when dumping data to JSON @@ -35,18 +37,18 @@ --- -# v2.6.11 (2020-01-03) +## v2.6.11 (2020-01-03) -## Bug Fixes +### Bug Fixes * [#3831](https://github.com/netbox-community/netbox/issues/3831) - Fix API-driven filter field rendering (#3812 regression) * [#3833](https://github.com/netbox-community/netbox/issues/3833) - Add missing region filters for multiple objects --- -# v2.6.10 (2020-01-02) +## v2.6.10 (2020-01-02) -## Enhancements +### Enhancements * [#2233](https://github.com/netbox-community/netbox/issues/2233) - Add ability to move inventory items between devices * [#2892](https://github.com/netbox-community/netbox/issues/2892) - Extend admin UI to allow deleting old report results @@ -58,7 +60,7 @@ * [#3812](https://github.com/netbox-community/netbox/issues/3812) - Optimize size of pages containing a dynamic selection field * [#3827](https://github.com/netbox-community/netbox/issues/3827) - Allow filtering console/power/interface connections by device ID -## Bug Fixes +### Bug Fixes * [#3106](https://github.com/netbox-community/netbox/issues/3106) - Restrict queryset of chained fields when form validation fails * [#3695](https://github.com/netbox-community/netbox/issues/3695) - Include A/Z termination sites for circuits in global search @@ -70,15 +72,15 @@ --- -# v2.6.9 (2019-12-16) +## v2.6.9 (2019-12-16) -## Enhancements +### Enhancements * [#3152](https://github.com/netbox-community/netbox/issues/3152) - Include direct link to rack elevations on site view * [#3441](https://github.com/netbox-community/netbox/issues/3441) - Move virtual machine results near devices in global search * [#3761](https://github.com/netbox-community/netbox/issues/3761) - Added copy button for API tokens -## Bug Fixes +### Bug Fixes * [#2170](https://github.com/netbox-community/netbox/issues/2170) - Prevent the deletion of a virtual chassis when a cross-member LAG is present * [#2358](https://github.com/netbox-community/netbox/issues/2358) - Respect custom field default values when creating objects via the REST API @@ -87,9 +89,9 @@ --- -# v2.6.8 (2019-12-10) +## v2.6.8 (2019-12-10) -## Enhancements +### Enhancements * [#3139](https://github.com/netbox-community/netbox/issues/3139) - Disable password change form for LDAP-authenticated users * [#3457](https://github.com/netbox-community/netbox/issues/3457) - Display cable colors on device view @@ -97,7 +99,7 @@ * [#3663](https://github.com/netbox-community/netbox/issues/3663) - Add query filters for `created` and `last_updated` fields * [#3722](https://github.com/netbox-community/netbox/issues/3722) - Allow the underscore character in IPAddress DNS names -## Bug Fixes +### Bug Fixes * [#3312](https://github.com/netbox-community/netbox/issues/3312) - Fix validation error when editing power cables in bulk * [#3644](https://github.com/netbox-community/netbox/issues/3644) - Fix exception when connecting a cable to a RearPort with no corresponding FrontPort @@ -111,9 +113,9 @@ --- -# v2.6.7 (2019-11-01) +## v2.6.7 (2019-11-01) -## Enhancements +### Enhancements * [#3445](https://github.com/netbox-community/netbox/issues/3445) - Add support for additional user defined headers to be added to webhook requests * [#3499](https://github.com/netbox-community/netbox/issues/3499) - Add `ca_file_path` to Webhook model to support user supplied CA certificate verification of webhook requests @@ -121,7 +123,7 @@ * [#3619](https://github.com/netbox-community/netbox/issues/3619) - Add 400GE OSFP interface type * [#3659](https://github.com/netbox-community/netbox/issues/3659) - Add filtering for objects in admin UI -## Bug Fixes +### Bug Fixes * [#3309](https://github.com/netbox-community/netbox/issues/3309) - Rewrite change logging middleware to resolve sporadic testing failures * [#3340](https://github.com/netbox-community/netbox/issues/3340) - Add missing options to connect front ports to console ports @@ -135,13 +137,13 @@ --- -# v2.6.6 (2019-10-10) +## v2.6.6 (2019-10-10) -## Notes +### Notes * This release includes a migration which automatically updates all existing cables to enable filtering by site/rack (see [#3259](https://github.com/netbox-community/netbox/issues/3259)). This migration may take several minutes to complete on installations with tens of thousands of cables defined. -## Enhancements +### Enhancements * [#1941](https://github.com/netbox-community/netbox/issues/1941) - Add InfiniBand interface types * [#3259](https://github.com/netbox-community/netbox/issues/3259) - Add `rack` and `site` filters for cables @@ -151,7 +153,7 @@ * [#3580](https://github.com/netbox-community/netbox/issues/3580) - Render text and URL fields as textareas in the custom link form * [#3581](https://github.com/netbox-community/netbox/issues/3581) - Introduce `commit_default` custom script attribute to not commit changes by default -## Bug Fixes +### Bug Fixes * [#3458](https://github.com/netbox-community/netbox/issues/3458) - Prevent primary IP address for a device/VM from being reassigned * [#3463](https://github.com/netbox-community/netbox/issues/3463) - Correct CSV headers for exported power feeds @@ -165,9 +167,9 @@ --- -# v2.6.5 (2019-09-25) +## v2.6.5 (2019-09-25) -## Enhancements +### Enhancements * [#3297](https://github.com/netbox-community/netbox/issues/3297) - Include reserved units when calculating rack utilization * [#3347](https://github.com/netbox-community/netbox/issues/3347) - Extend upgrade script to automatically remove stale content types @@ -176,7 +178,7 @@ * [#3524](https://github.com/netbox-community/netbox/issues/3524) - Enable bulk editing of power outlet/power port associations * [#3529](https://github.com/netbox-community/netbox/issues/3529) - Enable filtering circuits list by region -## Bug Fixes +### Bug Fixes * [#3435](https://github.com/netbox-community/netbox/issues/3435) - Change IP/prefix CSV export to reference VRF name instead of RD * [#3464](https://github.com/netbox-community/netbox/issues/3464) - Fix foreground text color on color picker fields @@ -189,9 +191,9 @@ --- -# v2.6.4 (2019-09-19) +## v2.6.4 (2019-09-19) -## Enhancements +### Enhancements * [#2160](https://github.com/netbox-community/netbox/issues/2160) - Add bulk editing for interface VLAN assignment * [#3027](https://github.com/netbox-community/netbox/issues/3028) - Add `local_context_data` boolean filter for devices @@ -200,7 +202,7 @@ * [#3485](https://github.com/netbox-community/netbox/issues/3485) - Enable embedded graphs for devices * [#3510](https://github.com/netbox-community/netbox/issues/3510) - Add minimum/maximum prefix length enforcement for `IPNetworkVar` -## Bug Fixes +### Bug Fixes * [#3489](https://github.com/netbox-community/netbox/issues/3489) - Prevent exception triggered by webhook upon object deletion * [#3501](https://github.com/netbox-community/netbox/issues/3501) - Fix rendering of checkboxes on custom script forms @@ -210,17 +212,17 @@ --- -# v2.6.3 (2019-09-04) +## v2.6.3 (2019-09-04) -## New Features +### New Features -### Custom Scripts ([#3415](https://github.com/netbox-community/netbox/issues/3415)) +#### Custom Scripts ([#3415](https://github.com/netbox-community/netbox/issues/3415)) Custom scripts allow for the execution of arbitrary code via the NetBox UI. They can be used to automatically create, manipulate, or clean up objects or perform other tasks within NetBox. Scripts are defined as Python files which contain one or more subclasses of `extras.scripts.Script`. Variable fields can be defined within scripts, which render as form fields within the web UI to prompt the user for input data. Scripts are executed and information is logged via the web UI. Please see [the docs](https://netbox.readthedocs.io/en/stable/additional-features/custom-scripts/) for more detail. Note: There are currently no API endpoints for this feature. These are planned for the upcoming v2.7 release. -## Enhancements +### Enhancements * [#3386](https://github.com/netbox-community/netbox/issues/3386) - Add `mac_address` filter for virtual machines * [#3391](https://github.com/netbox-community/netbox/issues/3391) - Update Bootstrap CSS to v3.4.1 @@ -230,7 +232,7 @@ Note: There are currently no API endpoints for this feature. These are planned f * [#3454](https://github.com/netbox-community/netbox/issues/3454) - Enable filtering circuits by region * [#3456](https://github.com/netbox-community/netbox/issues/3456) - Enable bulk editing of tag color -## Bug Fixes +### Bug Fixes * [#3392](https://github.com/netbox-community/netbox/issues/3392) - Add database index for ObjectChange time * [#3420](https://github.com/netbox-community/netbox/issues/3420) - Serial number filter for racks, devices, and inventory items is now case-insensitive @@ -241,9 +243,9 @@ Note: There are currently no API endpoints for this feature. These are planned f --- -# v2.6.2 (2019-08-02) +## v2.6.2 (2019-08-02) -## Enhancements +### Enhancements * [#984](https://github.com/netbox-community/netbox/issues/984) - Allow ordering circuits by A/Z side * [#3307](https://github.com/netbox-community/netbox/issues/3307) - Add power panels count to home page @@ -252,7 +254,7 @@ Note: There are currently no API endpoints for this feature. These are planned f * [#3368](https://github.com/netbox-community/netbox/issues/3368) - Indicate indefinite changelog retention when applicable * [#3370](https://github.com/netbox-community/netbox/issues/3370) - Add filter class to VirtualChassis API -## Bug Fixes +### Bug Fixes * [#3018](https://github.com/netbox-community/netbox/issues/3018) - Components connected via a cable must have an equal number of positions * [#3289](https://github.com/netbox-community/netbox/issues/3289) - Prevent position from being nullified when moving a device to a new rack @@ -266,15 +268,15 @@ Note: There are currently no API endpoints for this feature. These are planned f --- -# v2.6.1 (2019-06-25) +## v2.6.1 (2019-06-25) -## Enhancements +### Enhancements * [#3154](https://github.com/netbox-community/netbox/issues/3154) - Add `virtual_chassis_member` device filter * [#3277](https://github.com/netbox-community/netbox/issues/3277) - Add cable trace buttons for console and power ports * [#3281](https://github.com/netbox-community/netbox/issues/3281) - Hide custom links which render as empty text -## Bug Fixes +### Bug Fixes * [#3229](https://github.com/netbox-community/netbox/issues/3229) - Limit rack group selection by parent site on racks list * [#3269](https://github.com/netbox-community/netbox/issues/3269) - Raise validation error when specifying non-existent cable terminations @@ -286,11 +288,11 @@ Note: There are currently no API endpoints for this feature. These are planned f --- -# v2.6.0 (2019-06-20) +## v2.6.0 (2019-06-20) -## New Features +### New Features -### Power Panels and Feeds ([#54](https://github.com/netbox-community/netbox/issues/54)) +#### Power Panels and Feeds ([#54](https://github.com/netbox-community/netbox/issues/54)) NetBox now supports power circuit modeling via two new models: power panels and power feeds. Power feeds are terminated to power panels and are optionally associated with individual racks. Each power feed defines a supply type (AC/DC), @@ -301,7 +303,7 @@ Additionally, the power port model, which represents a device's power input, has denoting maximum and allocated draw, in volt-amperes. This allows a device (e.g. a PDU) to calculate its total load compared to its connected power feed. -### Caching ([#2647](https://github.com/netbox-community/netbox/issues/2647)) +#### Caching ([#2647](https://github.com/netbox-community/netbox/issues/2647)) To improve performance, NetBox now supports caching for most object and list views. Caching is implemented using Redis, which is now a required dependency. (Previously, Redis was required only if webhooks were enabled.) @@ -309,11 +311,11 @@ which is now a required dependency. (Previously, Redis was required only if webh A new configuration parameter is available to control the cache timeout: ``` -# Cache timeout (in seconds) +## Cache timeout (in seconds) CACHE_TIMEOUT = 900 ``` -### View Permissions ([#323](https://github.com/netbox-community/netbox/issues/323)) +#### View Permissions ([#323](https://github.com/netbox-community/netbox/issues/323)) Django 2.1 introduced the ability to enforce view-only permissions for different object types. NetBox now enforces these by default. You can grant view permission to a user or group by assigning the "can view" permission for the @@ -335,7 +337,7 @@ To exclude _all_ objects, effectively disabling view permissions and restoring p EXEMPT_VIEW_PERMISSIONS = ['*'] ``` -### Custom Links ([#969](https://github.com/netbox-community/netbox/issues/969)) +#### Custom Links ([#969](https://github.com/netbox-community/netbox/issues/969)) Custom links are created under the admin UI and will be displayed on each object of the selected type. Link text and URLs can be formed from Jinja2 template code, with the viewed object passed as context data. For example, to link to an @@ -348,7 +350,7 @@ https://nms.example.com/nodes/?name={{ obj.name }} Custom links appear as buttons at the top of the object view. Grouped links will render as a dropdown menu beneath a single button. -### Prometheus Metrics ([#3104](https://github.com/netbox-community/netbox/issues/3104)) +#### Prometheus Metrics ([#3104](https://github.com/netbox-community/netbox/issues/3104)) NetBox now supports exposing native Prometheus metrics from the application. [Prometheus](https://prometheus.io/) is a popular time series metric platform used for monitoring. Metric exposition can be toggled with the `METRICS_ENABLED` @@ -372,9 +374,9 @@ different types of metrics, including: For the exhaustive list of exposed metrics, visit the `/metrics` endpoint on your NetBox instance. See the documentation for more details on using Prometheus metrics in NetBox. -## Changes +### Changes -### New Dependency: Redis +#### New Dependency: 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 now required to support NetBox's new caching @@ -401,7 +403,7 @@ an additional `CACHE_DATABASE` setting has been added with a default value of 1 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 during cache flushing events. -### API Support for Specifying Related Objects by Attributes([#3077](https://github.com/netbox-community/netbox/issues/3077)) +#### API Support for Specifying Related Objects by Attributes([#3077](https://github.com/netbox-community/netbox/issues/3077)) Previously, specifying a related object in an API request required knowing the primary key (integer ID) of that object. For example, when creating a new device, its rack would be specified as an integer: @@ -433,7 +435,7 @@ rack can be identified by its name and parent site: There is no limit to the depth of nested references. Note that if the provided parameters do not return exactly one object, a validation error is raised. -### API Device/VM Config Context Included by Default ([#2350](https://github.com/netbox-community/netbox/issues/2350)) +#### API Device/VM Config Context Included by Default ([#2350](https://github.com/netbox-community/netbox/issues/2350)) The rendered config context for devices and VMs is now included by default in all API results (list and detail views). Previously, the rendered config context was available only in the detail view for individual objects. Users with large @@ -441,19 +443,19 @@ amounts of context data may observe a performance drop when returning multiple o the rendered config context is not needed, the query parameter `?exclude=config_context` may be appended to the request URL to exclude the config context data from the API response. -### Changes to Tag Permissions +#### Changes to Tag Permissions NetBox now makes use of its own `Tag` model instead of the stock model which ships with django-taggit. This new model lives in the `extras` app and thus any permissions that you may have configured using "Taggit | Tag" should be changed to now use "Extras | Tag." Also note that the admin interface for tags has been removed as it was redundant to the functionality provided by the front end UI. -### CORS_ORIGIN_WHITELIST Requires URI Scheme +#### CORS_ORIGIN_WHITELIST Requires URI Scheme If you have the `CORS_ORIGIN_WHITELIST` configuration parameter defined, note that each origin must now incldue a URI scheme. This change was introuced in django-cors-headers 3.0. -## Enhancements +### Enhancements * [#166](https://github.com/netbox-community/netbox/issues/166) - Add `dns_name` field to IPAddress * [#524](https://github.com/netbox-community/netbox/issues/524) - Added power utilization graphs to power feeds, devices, and racks @@ -467,14 +469,14 @@ scheme. This change was introuced in django-cors-headers 3.0. * [#3038](https://github.com/netbox-community/netbox/issues/3038) - OR logic now used when multiple values of a query filter are passed * [#3264](https://github.com/netbox-community/netbox/issues/3264) - Annotate changelog retention time on UI -## Bug Fixes +### Bug Fixes * [#2968](https://github.com/netbox-community/netbox/issues/2968) - Correct API documentation for SerializerMethodFields * [#3176](https://github.com/netbox-community/netbox/issues/3176) - Add cable trace button for console server ports and power outlets * [#3231](https://github.com/netbox-community/netbox/issues/3231) - Fixed cosmetic error indicating a missing schema migration * [#3239](https://github.com/netbox-community/netbox/issues/3239) - Corrected count of tags reported via API -## Bug Fixes From v2.6-beta1 +### Bug Fixes From v2.6-beta1 * [#3123](https://github.com/netbox-community/netbox/issues/3123) - Exempt `/metrics` view from authentication * [#3125](https://github.com/netbox-community/netbox/issues/3125) - Fix exception when viewing PDUs @@ -487,7 +489,7 @@ scheme. This change was introuced in django-cors-headers 3.0. * [#3207](https://github.com/netbox-community/netbox/issues/3207) - Fix link for connecting interface to rear port * [#3258](https://github.com/netbox-community/netbox/issues/3258) - Exception raised when creating/viewing a circuit with a non-connected termination -## API Changes +### API Changes * New API endpoints for power modeling: `/api/dcim/power-panels/` and `/api/dcim/power-feeds/` * New API endpoint for custom field choices: `/api/extras/_custom_field_choices/` diff --git a/docs/release-notes/version-2.7.md b/docs/release-notes/version-2.7.md index 72d88b743..52399be1f 100644 --- a/docs/release-notes/version-2.7.md +++ b/docs/release-notes/version-2.7.md @@ -1,8 +1,10 @@ -# v2.7.9 (FUTURE) +# NetBox v2.7 Release Notes + +## v2.7.9 (FUTURE) **Note:** This release will deploy a Python virtual environment on upgrade in the `venv/` directory. This will require modifying the paths to your Python and gunicorn executables in the systemd service files. For more detail, please see the [upgrade instructions](https://netbox.readthedocs.io/en/stable/installation/upgrading/). -## Enhancements +### Enhancements * [#3949](https://github.com/netbox-community/netbox/issues/3949) - Revised the installation docs and upgrade script to employ a Python virtual environment * [#4119](https://github.com/netbox-community/netbox/issues/4119) - Extend upgrade script to clear expired user sessions @@ -13,7 +15,7 @@ * [#4290](https://github.com/netbox-community/netbox/issues/4290) - Include device name in tooltip on rack elevations * [#4305](https://github.com/netbox-community/netbox/issues/4305) - Add 10-inch option for rack width -## Bug Fixes +### Bug Fixes * [#4274](https://github.com/netbox-community/netbox/issues/4274) - Fix incorrect schema definition of `int` type choicefields * [#4277](https://github.com/netbox-community/netbox/issues/4277) - Fix filtering of clusters by tenant @@ -27,9 +29,9 @@ --- -# v2.7.8 (2020-02-25) +## v2.7.8 (2020-02-25) -## Enhancements +### Enhancements * [#3145](https://github.com/netbox-community/netbox/issues/3145) - Add a "decommissioning" cable status * [#4173](https://github.com/netbox-community/netbox/issues/4173) - Return graceful error message when webhook queuing fails @@ -38,7 +40,7 @@ * [#4262](https://github.com/netbox-community/netbox/issues/4262) - Extend custom scripts to pass the `commit` value via `run()` * [#4267](https://github.com/netbox-community/netbox/issues/4267) - Denote rack role on rack elevations list -## Bug Fixes +### Bug Fixes * [#4221](https://github.com/netbox-community/netbox/issues/4221) - Fix exception when deleting a device with interface connections when an interfaces webhook is defined * [#4222](https://github.com/netbox-community/netbox/issues/4222) - Escape double quotes on encapsulated values during CSV export @@ -56,7 +58,7 @@ --- -# v2.7.7 (2020-02-20) +## v2.7.7 (2020-02-20) **Note:** This release fixes a bug affecting the natural ordering of interfaces. If any interfaces appear unordered in NetBox, run the following management command to recalculate their naturalized values after upgrading: @@ -65,7 +67,7 @@ NetBox, run the following management command to recalculate their naturalized va python3 manage.py renaturalize dcim.Interface ``` -## Enhancements +### Enhancements * [#1529](https://github.com/netbox-community/netbox/issues/1529) - Enable display of device images in rack elevations * [#2511](https://github.com/netbox-community/netbox/issues/2511) - Compare object change to the previous change @@ -75,7 +77,7 @@ python3 manage.py renaturalize dcim.Interface * [#4206](https://github.com/netbox-community/netbox/issues/4206) - Add RJ-11 console port type * [#4209](https://github.com/netbox-community/netbox/issues/4209) - Enable filtering interfaces list view by enabled -## Bug Fixes +### Bug Fixes * [#2519](https://github.com/netbox-community/netbox/issues/2519) - Avoid race condition when provisioning "next available" IPs/prefixes via the API * [#3967](https://github.com/netbox-community/netbox/issues/3967) - Fix missing migration for interface templates of type "other" @@ -92,19 +94,19 @@ python3 manage.py renaturalize dcim.Interface --- -# v2.7.6 (2020-02-13) +## v2.7.6 (2020-02-13) -## Bug Fixes +### Bug Fixes * [#4166](https://github.com/netbox-community/netbox/issues/4166) - Fix schema migrations to enforce maximum character length for naturalized fields --- -# v2.7.5 (2020-02-13) +## v2.7.5 (2020-02-13) **Note:** This release includes several database schema migrations that calculate and store copies of names for certain objects to improve natural ordering performance (see [#3799](https://github.com/netbox-community/netbox/issues/3799)). These migrations may take a few minutes to run if you have a very large number of objects defined in NetBox. -## Enhancements +### Enhancements * [#3766](https://github.com/netbox-community/netbox/issues/3766) - Allow custom script authors to specify the form widget for each variable * [#3799](https://github.com/netbox-community/netbox/issues/3799) - Greatly improve performance when ordering device components @@ -116,7 +118,7 @@ python3 manage.py renaturalize dcim.Interface * [#4116](https://github.com/netbox-community/netbox/issues/4116) - Enable bulk edit and delete functions for device component list views * [#4129](https://github.com/netbox-community/netbox/issues/4129) - Add buttons to delete individual device type components -## Bug Fixes +### Bug Fixes * [#3507](https://github.com/netbox-community/netbox/issues/3507) - Fix filtering IP addresses by multiple devices * [#3995](https://github.com/netbox-community/netbox/issues/3995) - Make dropdown menus in the navigation bar scrollable on small screens @@ -135,9 +137,9 @@ python3 manage.py renaturalize dcim.Interface --- -# v2.7.4 (2020-02-04) +## v2.7.4 (2020-02-04) -## Enhancements +### Enhancements * [#568](https://github.com/netbox-community/netbox/issues/568) - Allow custom fields to be imported and exported using CSV * [#2921](https://github.com/netbox-community/netbox/issues/2921) - Replace tags filter with Select2 widget @@ -145,7 +147,7 @@ python3 manage.py renaturalize dcim.Interface * [#3886](https://github.com/netbox-community/netbox/issues/3886) - Enable assigning config contexts by cluster and cluster group * [#4051](https://github.com/netbox-community/netbox/issues/4051) - Disable the `makemigrations` management command -## Bug Fixes +### Bug Fixes * [#4030](https://github.com/netbox-community/netbox/issues/4030) - Fix exception when bulk editing interfaces (revised) * [#4043](https://github.com/netbox-community/netbox/issues/4043) - Fix toggling of required fields in custom scripts @@ -159,9 +161,9 @@ python3 manage.py renaturalize dcim.Interface --- -# v2.7.3 (2020-01-28) +## v2.7.3 (2020-01-28) -## Enhancements +### Enhancements * [#3310](https://github.com/netbox-community/netbox/issues/3310) - Pre-select site/rack for B side when creating a new cable * [#3338](https://github.com/netbox-community/netbox/issues/3338) - Include circuit terminations in API representation of circuits @@ -169,7 +171,7 @@ python3 manage.py renaturalize dcim.Interface * [#3978](https://github.com/netbox-community/netbox/issues/3978) - Add VRF filtering to search NAT IP * [#4005](https://github.com/netbox-community/netbox/issues/4005) - Include timezone context in webhook timestamps -## Bug Fixes +### Bug Fixes * [#3950](https://github.com/netbox-community/netbox/issues/3950) - Automatically select parent manufacturer when specifying initial device type during device creation * [#3982](https://github.com/netbox-community/netbox/issues/3982) - Restore tooltip for reservations on rack elevations @@ -188,15 +190,15 @@ python3 manage.py renaturalize dcim.Interface --- -# v2.7.2 (2020-01-21) +## v2.7.2 (2020-01-21) -## Enhancements +### Enhancements * [#3135](https://github.com/netbox-community/netbox/issues/3135) - Documented power modelling * [#3842](https://github.com/netbox-community/netbox/issues/3842) - Add 802.11ax interface type * [#3954](https://github.com/netbox-community/netbox/issues/3954) - Add `device_bays` filter for devices and device types -## Bug Fixes +### Bug Fixes * [#3721](https://github.com/netbox-community/netbox/issues/3721) - Allow Unicode characters in tag slugs * [#3923](https://github.com/netbox-community/netbox/issues/3923) - Indicate validation failure when using SSH-style RSA keys @@ -212,9 +214,9 @@ python3 manage.py renaturalize dcim.Interface --- -# v2.7.1 (2020-01-16) +## v2.7.1 (2020-01-16) -## Bug Fixes +### Bug Fixes * [#3941](https://github.com/netbox-community/netbox/issues/3941) - Fixed exception when attempting to assign IP to interface * [#3943](https://github.com/netbox-community/netbox/issues/3943) - Prevent rack elevation links from opening new tabs/windows @@ -222,16 +224,16 @@ python3 manage.py renaturalize dcim.Interface --- -# v2.7.0 (2020-01-16) +## v2.7.0 (2020-01-16) **Note:** This release completely removes the topology map feature ([#2745](https://github.com/netbox-community/netbox/issues/2745)). **Note:** NetBox v2.7 is the last major release that will support Python 3.5. Beginning with NetBox v2.8, Python 3.6 or higher will be required. -## New Features +### New Features -### Enhanced Device Type Import ([#451](https://github.com/netbox-community/netbox/issues/451)) +#### Enhanced Device Type Import ([#451](https://github.com/netbox-community/netbox/issues/451)) NetBox now supports the import of device types and related component templates using definitions written in YAML or JSON. For example, the following will create a new device type with four network interfaces, two power ports, and a @@ -261,7 +263,7 @@ console-ports: This new functionality replaces the old CSV-based import form, which did not allow for bulk import of component templates. -### Bulk Import of Device Components ([#822](https://github.com/netbox-community/netbox/issues/822)) +#### Bulk Import of Device Components ([#822](https://github.com/netbox-community/netbox/issues/822)) Device components such as console ports, power ports, and interfaces can now be imported in bulk to multiple devices in CSV format. Here's an example showing the bulk import of interfaces to several devices: @@ -276,7 +278,7 @@ Switch2,Vlan200,Virtual The import form for each type of device component is available under the "Devices" item in the navigation menu. -### External File Storage ([#1814](https://github.com/netbox-community/netbox/issues/1814)) +#### External File Storage ([#1814](https://github.com/netbox-community/netbox/issues/1814)) In prior releases, the only option for storing uploaded files (e.g. image attachments) was to save them to the local filesystem on the NetBox server. This release introduces support for several remote storage backends provided by the @@ -312,7 +314,7 @@ STORAGE_CONFIG = { Thanks to [@steffann](https://github.com/steffann) for contributing this work! -### Rack Elevations Rendered via SVG ([#2248](https://github.com/netbox-community/netbox/issues/2248)) +#### Rack Elevations Rendered via SVG ([#2248](https://github.com/netbox-community/netbox/issues/2248)) NetBox v2.7 introduces a new method of rendering rack elevations as an [SVG image](https://en.wikipedia.org/wiki/Scalable_Vector_Graphics) via a REST API endpoint. This replaces the prior @@ -341,20 +343,20 @@ request either the `front` or `rear` of the elevation. Below is in example reque Thanks to [@hellerve](https://github.com/hellerve) for doing the heavy lifting on this! -## Changes +### Changes -### Topology Maps Removed ([#2745](https://github.com/netbox-community/netbox/issues/2745)) +#### Topology Maps Removed ([#2745](https://github.com/netbox-community/netbox/issues/2745)) The topology maps feature has been removed to help focus NetBox development efforts. Please replicate any required data to another source before upgrading NetBox to v2.7, as any existing topology maps will be deleted. -### Supervisor Replaced with systemd ([#2902](https://github.com/netbox-community/netbox/issues/2902)) +#### Supervisor Replaced with systemd ([#2902](https://github.com/netbox-community/netbox/issues/2902)) The NetBox [installation documentation](https://netbox.readthedocs.io/en/stable/installation/) has been updated to provide instructions for managing the WSGI and RQ services using systemd instead of supervisor. This removes the need to install supervisor and simplifies administration of the processes. -### Redis Configuration ([#3282](https://github.com/netbox-community/netbox/issues/3282)) +#### Redis Configuration ([#3282](https://github.com/netbox-community/netbox/issues/3282)) NetBox v2.6 introduced request caching and added the `CACHE_DATABASE` option to the existing `REDIS` database configuration parameter. This did not, however, allow for using two different Redis connections for the separate caching @@ -402,14 +404,14 @@ Note that the `CACHE_DATABASE` parameter has been removed and the connection set `webhooks` and `caching`. This allows the user to make use of separate Redis instances if desired. It is fine to use the same Redis service for both functions, although the database identifiers should be different. -### WEBHOOKS_ENABLED Configuration Setting Removed ([#3408](https://github.com/netbox-community/netbox/issues/3408)) +#### WEBHOOKS_ENABLED Configuration Setting Removed ([#3408](https://github.com/netbox-community/netbox/issues/3408)) As `django-rq` is now a required library, NetBox assumes that the RQ worker process is running. The installation and upgrade documentation has been updated to reflect this, and the `WEBHOOKS_ENABLED` configuration parameter is no longer used. Please ensure that both the NetBox WSGI service and the RQ worker process are running on all production installations. -### API Choice Fields Now Use String Values ([#3569](https://github.com/netbox-community/netbox/issues/3569)) +#### API Choice Fields Now Use String Values ([#3569](https://github.com/netbox-community/netbox/issues/3569)) NetBox's REST API presents fields which reference a particular choice as a dictionary with two keys: `value` and `label`. In previous versions, `value` was an integer which represented a particular choice in the database. This has @@ -441,7 +443,7 @@ Note that that all v2.7 releases will continue to accept the legacy integer valu `PATCH`) to maintain backward compatibility. Additionally, the legacy numeric identifier is conveyed in the `id` field for convenient reference as consumers adopt to the new string values. This behavior will be discontinued in NetBox v2.8. -## Enhancements +### Enhancements * [#33](https://github.com/netbox-community/netbox/issues/33) - Add ability to clone objects (pre-populate form fields) * [#648](https://github.com/netbox-community/netbox/issues/648) - Pre-populate form fields when selecting "create and @@ -464,7 +466,7 @@ for convenient reference as consumers adopt to the new string values. This behav * [#3731](https://github.com/netbox-community/netbox/issues/3731) - Change Graph.type to a ContentType foreign key field * [#3801](https://github.com/netbox-community/netbox/issues/3801) - Use YAML for export of device types -## Bug Fixes +### Bug Fixes * [#3830](https://github.com/netbox-community/netbox/issues/3830) - Ensure deterministic ordering for all models * [#3900](https://github.com/netbox-community/netbox/issues/3900) - Fix exception when deleting device types @@ -476,12 +478,12 @@ for convenient reference as consumers adopt to the new string values. This behav * [#3930](https://github.com/netbox-community/netbox/issues/3930) - Fix API rendering of the `family` field for aggregates -## Bug Fixes (From Beta) +### Bug Fixes (From Beta) * [#3868](https://github.com/netbox-community/netbox/issues/3868) - Fix creation of interfaces for virtual machines * [#3878](https://github.com/netbox-community/netbox/issues/3878) - Fix database migration for cable status field -## API Changes +### API Changes * Choice fields now use human-friendly strings for their values instead of integers (see [#3569](https://github.com/netbox-community/netbox/issues/3569)). diff --git a/mkdocs.yml b/mkdocs.yml index b415cdb74..7e278b7f2 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -78,13 +78,3 @@ nav: - Version 2.2: 'release-notes/version-2.2.md' - Version 2.1: 'release-notes/version-2.1.md' - Version 2.0: 'release-notes/version-2.0.md' - - Version 1.9: 'release-notes/version-1.9.md' - - Version 1.8: 'release-notes/version-1.8.md' - - Version 1.7: 'release-notes/version-1.7.md' - - Version 1.6: 'release-notes/version-1.6.md' - - Version 1.5: 'release-notes/version-1.5.md' - - Version 1.4: 'release-notes/version-1.4.md' - - Version 1.3: 'release-notes/version-1.3.md' - - Version 1.2: 'release-notes/version-1.2.md' - - Version 1.1: 'release-notes/version-1.1.md' - - Version 1.0: 'release-notes/version-1.0.md' From 7d236b607e91393d002a754eccb440cbf7c96e86 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 5 Mar 2020 17:30:55 -0500 Subject: [PATCH 26/27] Tweak navigation max depth --- mkdocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkdocs.yml b/mkdocs.yml index 7e278b7f2..4bc6c955d 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -6,7 +6,7 @@ python: - requirements: docs/requirements.txt theme: name: readthedocs - navigation_depth: 6 + navigation_depth: 3 markdown_extensions: - admonition: - markdown_include.include: From c50714ec42aa0d0c01301956b2065a10eb864c62 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Fri, 6 Mar 2020 09:35:58 -0500 Subject: [PATCH 27/27] Introduce DOCS_ROOT configuration parameter --- docs/configuration/optional-settings.md | 8 ++++++++ netbox/netbox/settings.py | 1 + netbox/templates/utilities/obj_edit.html | 12 ++++++++---- netbox/utilities/templatetags/helpers.py | 16 +++++++++++++--- 4 files changed, 30 insertions(+), 7 deletions(-) diff --git a/docs/configuration/optional-settings.md b/docs/configuration/optional-settings.md index cbe01728c..337b41b1b 100644 --- a/docs/configuration/optional-settings.md +++ b/docs/configuration/optional-settings.md @@ -98,6 +98,14 @@ This parameter serves as a safeguard to prevent some potentially dangerous behav --- +## 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: diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py index 7f4f44b1a..df1ab908a 100644 --- a/netbox/netbox/settings.py +++ b/netbox/netbox/settings.py @@ -75,6 +75,7 @@ DATE_FORMAT = getattr(configuration, 'DATE_FORMAT', 'N j, Y') DATETIME_FORMAT = getattr(configuration, 'DATETIME_FORMAT', 'N j, Y g:i a') DEBUG = getattr(configuration, 'DEBUG', False) DEVELOPER = getattr(configuration, 'DEVELOPER', False) +DOCS_ROOT = getattr(configuration, 'DOCS_ROOT', os.path.join(os.path.dirname(BASE_DIR), 'docs')) EMAIL = getattr(configuration, 'EMAIL', {}) ENFORCE_GLOBAL_UNIQUE = getattr(configuration, 'ENFORCE_GLOBAL_UNIQUE', False) EXEMPT_VIEW_PERMISSIONS = getattr(configuration, 'EXEMPT_VIEW_PERMISSIONS', []) diff --git a/netbox/templates/utilities/obj_edit.html b/netbox/templates/utilities/obj_edit.html index 286563a23..0d7760f30 100644 --- a/netbox/templates/utilities/obj_edit.html +++ b/netbox/templates/utilities/obj_edit.html @@ -11,9 +11,11 @@

-
- -
+ {% if settings.DOCS_ROOT %} +
+ +
+ {% endif %} {% block title %}{% if obj.pk %}Editing {{ obj_type }} {{ obj }}{% else %}Add a new {{ obj_type }}{% endif %}{% endblock %}

{% block tabs %}{% endblock %} @@ -49,5 +51,7 @@
- {% include 'inc/modal.html' with name='docs' content=obj|get_docs %} + {% if settings.DOCS_ROOT %} + {% include 'inc/modal.html' with name='docs' content=obj|get_docs %} + {% endif %} {% endblock %} diff --git a/netbox/utilities/templatetags/helpers.py b/netbox/utilities/templatetags/helpers.py index a57cfc66d..5cede8a7e 100644 --- a/netbox/utilities/templatetags/helpers.py +++ b/netbox/utilities/templatetags/helpers.py @@ -4,6 +4,7 @@ import re import yaml from django import template +from django.conf import settings from django.urls import NoReverseMatch, reverse from django.utils.html import strip_tags from django.utils.safestring import mark_safe @@ -222,9 +223,18 @@ def get_docs(model): """ Render and return documentation for the specified model. """ - path = '../docs/models/{}/{}.md'.format(model._meta.app_label, model._meta.model_name) - with open(path) as docfile: - content = docfile.read() + path = '{}/models/{}/{}.md'.format( + settings.DOCS_ROOT, + model._meta.app_label, + model._meta.model_name + ) + try: + with open(path) as docfile: + content = docfile.read() + except FileNotFoundError: + return "Unable to load documentation, file not found: {}".format(path) + except IOError: + return "Unable to load documentation, error reading file: {}".format(path) # Render Markdown with the admonition extension content = markdown(content, extensions=['admonition', 'fenced_code'])