Skip to content

Commit

Permalink
Changelog & documentation for #7854
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremystretch committed Nov 11, 2022
1 parent b374351 commit 2cc2d2c
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 4 deletions.
33 changes: 33 additions & 0 deletions docs/models/dcim/virtualdevicecontext.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Virtual Device Context

A virtual device context (VDC) represents a logical partition within a physical device, to which interfaces from the parent device can be allocated. Each VDC effectively provides an isolated control plane, but relies on shared resources of the parent device. A VDC is somewhat similar to a virtual machine in that it effects isolation between various components, but stops short of delivering a fully virtualized environment.

Each VDC must be assigned to a device upon creation, after which interfaces belonging to that device can be assigned to one or more of its VDCs. A VDC can have any number of interfaces assigned to it, and an interface can belong to any number of VDCs.

!!! info "A VDC by Any Other Name"
Network vendors use differing names for this concept. Cisco uses the term VDC, whereas Juniper refers to it as a _Virtual Routing Instance_, and Fortinet uses _Virtual Domain_, for instance. While there may be some nuance among the vendors' unique implementations, the general concept remains the same for each.

## Fields

### Device

The device to which this VDC belongs.

### Name

The VDC's configured name. Must be unique to the assigned device.

### Status

The operational status of the VDC.

### Identifier

A vendor-prescribed unique identifier for the VDC (optional). Must be unique to the assigned device if defined.

### Primary IPv4 & IPv6 Addresses

Each VDC may designate one primary IPv4 address and/or one primary IPv6 address for management purposes.

!!! tip
NetBox will prefer IPv6 addresses over IPv4 addresses by default. This can be changed by setting the `PREFER_IPV4` configuration parameter.
7 changes: 7 additions & 0 deletions docs/release-notes/version-3.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@

NetBox's global search functionality has been completely overhauled and replaced by a new cache-based lookup.

#### Virtual Device Contexts ([#7854](https://github.com/netbox-community/netbox/issues/7854))

A new model representing virtual device contexts (VDCs) has been added. VDCs are logical partitions of resources within a device that can be managed independently. A VDC is created within a device and may have device interfaces assigned to it. An interface can be allocated to any number of VDCs on its device.

### JSON/YAML Bulk Imports ([#4347](https://github.com/netbox-community/netbox/issues/4347))

NetBox's bulk import feature, which was previously limited to CSV-formatted data for most objects, has been extended to support the import of objects from JSON and/or YAML data as well.
Expand Down Expand Up @@ -75,6 +79,7 @@ A new `PluginMenu` class has been introduced, which enables a plugin to inject a

### REST API Changes

* Added the `/api/dcim/virtual-device-contexts/` endpoint
* circuits.provider
* Removed the `asn`, `noc_contact`, `admin_contact`, and `portal_url` fields
* Added a `description` field
Expand All @@ -87,6 +92,8 @@ A new `PluginMenu` class has been introduced, which enables a plugin to inject a
* Added optional `weight` and `weight_unit` fields
* dcim.Module
* Added a `description` field
* dcim.Interface
* Added the `vdcs` field
* dcim.ModuleType
* Added a `description` field
* Added optional `weight` and `weight_unit` fields
Expand Down
4 changes: 2 additions & 2 deletions netbox/dcim/migrations/0166_virtualdevicecontext.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ class Migration(migrations.Migration):
),
migrations.AddConstraint(
model_name='virtualdevicecontext',
constraint=models.UniqueConstraint(fields=('device', 'identifier'), name='dcim_virtualdevicecontext_device_identifiers'),
constraint=models.UniqueConstraint(fields=('device', 'identifier'), name='dcim_virtualdevicecontext_device_identifier'),
),
migrations.AddConstraint(
model_name='virtualdevicecontext',
constraint=models.UniqueConstraint(fields=('device', 'name'), name='dcim_virtualdevicecontext_name'),
constraint=models.UniqueConstraint(fields=('device', 'name'), name='dcim_virtualdevicecontext_device_name'),
),
]
4 changes: 2 additions & 2 deletions netbox/dcim/models/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -1117,11 +1117,11 @@ class Meta:
constraints = (
models.UniqueConstraint(
fields=('device', 'identifier',),
name='%(app_label)s_%(class)s_device_identifiers'
name='%(app_label)s_%(class)s_device_identifier'
),
models.UniqueConstraint(
fields=('device', 'name',),
name='%(app_label)s_%(class)s_name'
name='%(app_label)s_%(class)s_device_name'
),
)

Expand Down

0 comments on commit 2cc2d2c

Please sign in to comment.