mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fixes #4930: Replicate label values when instantiating device type components
This commit is contained in:
@ -12,6 +12,7 @@
|
|||||||
* [#4912](https://github.com/netbox-community/netbox/issues/4912) - Fix image attachment API endpoint
|
* [#4912](https://github.com/netbox-community/netbox/issues/4912) - Fix image attachment API endpoint
|
||||||
* [#4914](https://github.com/netbox-community/netbox/issues/4914) - Fix toggling cable status under device view
|
* [#4914](https://github.com/netbox-community/netbox/issues/4914) - Fix toggling cable status under device view
|
||||||
* [#4921](https://github.com/netbox-community/netbox/issues/4921) - Render non-viewable devices as unavailable space in rack elevations
|
* [#4921](https://github.com/netbox-community/netbox/issues/4921) - Render non-viewable devices as unavailable space in rack elevations
|
||||||
|
* [#4930](https://github.com/netbox-community/netbox/issues/4930) - Replicate label values when instantiating device type components
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -100,6 +100,7 @@ class ConsolePortTemplate(ComponentTemplateModel):
|
|||||||
return ConsolePort(
|
return ConsolePort(
|
||||||
device=device,
|
device=device,
|
||||||
name=self.name,
|
name=self.name,
|
||||||
|
label=self.label,
|
||||||
type=self.type
|
type=self.type
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -122,6 +123,7 @@ class ConsoleServerPortTemplate(ComponentTemplateModel):
|
|||||||
return ConsoleServerPort(
|
return ConsoleServerPort(
|
||||||
device=device,
|
device=device,
|
||||||
name=self.name,
|
name=self.name,
|
||||||
|
label=self.label,
|
||||||
type=self.type
|
type=self.type
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -156,6 +158,7 @@ class PowerPortTemplate(ComponentTemplateModel):
|
|||||||
return PowerPort(
|
return PowerPort(
|
||||||
device=device,
|
device=device,
|
||||||
name=self.name,
|
name=self.name,
|
||||||
|
label=self.label,
|
||||||
type=self.type,
|
type=self.type,
|
||||||
maximum_draw=self.maximum_draw,
|
maximum_draw=self.maximum_draw,
|
||||||
allocated_draw=self.allocated_draw
|
allocated_draw=self.allocated_draw
|
||||||
@ -205,6 +208,7 @@ class PowerOutletTemplate(ComponentTemplateModel):
|
|||||||
return PowerOutlet(
|
return PowerOutlet(
|
||||||
device=device,
|
device=device,
|
||||||
name=self.name,
|
name=self.name,
|
||||||
|
label=self.label,
|
||||||
type=self.type,
|
type=self.type,
|
||||||
power_port=power_port,
|
power_port=power_port,
|
||||||
feed_leg=self.feed_leg
|
feed_leg=self.feed_leg
|
||||||
@ -239,6 +243,7 @@ class InterfaceTemplate(ComponentTemplateModel):
|
|||||||
return Interface(
|
return Interface(
|
||||||
device=device,
|
device=device,
|
||||||
name=self.name,
|
name=self.name,
|
||||||
|
label=self.label,
|
||||||
type=self.type,
|
type=self.type,
|
||||||
mgmt_only=self.mgmt_only
|
mgmt_only=self.mgmt_only
|
||||||
)
|
)
|
||||||
@ -293,6 +298,7 @@ class FrontPortTemplate(ComponentTemplateModel):
|
|||||||
return FrontPort(
|
return FrontPort(
|
||||||
device=device,
|
device=device,
|
||||||
name=self.name,
|
name=self.name,
|
||||||
|
label=self.label,
|
||||||
type=self.type,
|
type=self.type,
|
||||||
rear_port=rear_port,
|
rear_port=rear_port,
|
||||||
rear_port_position=self.rear_port_position
|
rear_port_position=self.rear_port_position
|
||||||
@ -320,6 +326,7 @@ class RearPortTemplate(ComponentTemplateModel):
|
|||||||
return RearPort(
|
return RearPort(
|
||||||
device=device,
|
device=device,
|
||||||
name=self.name,
|
name=self.name,
|
||||||
|
label=self.label,
|
||||||
type=self.type,
|
type=self.type,
|
||||||
positions=self.positions
|
positions=self.positions
|
||||||
)
|
)
|
||||||
@ -336,5 +343,6 @@ class DeviceBayTemplate(ComponentTemplateModel):
|
|||||||
def instantiate(self, device):
|
def instantiate(self, device):
|
||||||
return DeviceBay(
|
return DeviceBay(
|
||||||
device=device,
|
device=device,
|
||||||
name=self.name
|
name=self.name,
|
||||||
|
label=self.label
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user