|
|
@@ -663,6 +663,7 @@ class DeviceSerializer(NetBoxModelSerializer):
|
|
|
primary_ip = NestedIPAddressSerializer(read_only=True)
|
|
|
primary_ip4 = NestedIPAddressSerializer(required=False, allow_null=True)
|
|
|
primary_ip6 = NestedIPAddressSerializer(required=False, allow_null=True)
|
|
|
+ oob_ip = NestedIPAddressSerializer(required=False, allow_null=True)
|
|
|
parent_device = serializers.SerializerMethodField()
|
|
|
cluster = NestedClusterSerializer(required=False, allow_null=True)
|
|
|
virtual_chassis = NestedVirtualChassisSerializer(required=False, allow_null=True, default=None)
|
|
|
@@ -686,11 +687,11 @@ class DeviceSerializer(NetBoxModelSerializer):
|
|
|
fields = [
|
|
|
'id', 'url', 'display', 'name', 'device_type', 'device_role', 'tenant', 'platform', 'serial', 'asset_tag',
|
|
|
'site', 'location', 'rack', 'position', 'face', 'latitude', 'longitude', 'parent_device', 'status',
|
|
|
- 'airflow', 'primary_ip', 'primary_ip4', 'primary_ip6', 'cluster', 'virtual_chassis', 'vc_position',
|
|
|
- 'vc_priority', 'description', 'comments', 'config_template', 'local_context_data', 'tags', 'custom_fields',
|
|
|
- 'created', 'last_updated', 'console_port_count', 'console_server_port_count', 'power_port_count',
|
|
|
- 'power_outlet_count', 'interface_count', 'front_port_count', 'rear_port_count', 'device_bay_count',
|
|
|
- 'module_bay_count', 'inventory_item_count',
|
|
|
+ 'airflow', 'primary_ip', 'primary_ip4', 'primary_ip6', 'oob_ip', 'cluster', 'virtual_chassis',
|
|
|
+ 'vc_position', 'vc_priority', 'description', 'comments', 'config_template', 'local_context_data', 'tags',
|
|
|
+ 'custom_fields', 'created', 'last_updated', 'console_port_count', 'console_server_port_count',
|
|
|
+ 'power_port_count', 'power_outlet_count', 'interface_count', 'front_port_count', 'rear_port_count',
|
|
|
+ 'device_bay_count', 'module_bay_count', 'inventory_item_count',
|
|
|
]
|
|
|
|
|
|
@extend_schema_field(NestedDeviceSerializer)
|
|
|
@@ -712,11 +713,11 @@ class DeviceWithConfigContextSerializer(DeviceSerializer):
|
|
|
fields = [
|
|
|
'id', 'url', 'display', 'name', 'device_type', 'device_role', 'tenant', 'platform', 'serial', 'asset_tag',
|
|
|
'site', 'location', 'rack', 'position', 'face', 'parent_device', 'status', 'airflow', 'primary_ip',
|
|
|
- 'primary_ip4', 'primary_ip6', 'cluster', 'virtual_chassis', 'vc_position', 'vc_priority', 'description',
|
|
|
- 'comments', 'local_context_data', 'tags', 'custom_fields', 'config_context', 'config_template',
|
|
|
- 'created', 'last_updated', 'console_port_count', 'console_server_port_count', 'power_port_count',
|
|
|
- 'power_outlet_count', 'interface_count', 'front_port_count', 'rear_port_count', 'device_bay_count',
|
|
|
- 'module_bay_count', 'inventory_item_count',
|
|
|
+ 'primary_ip4', 'primary_ip6', 'oob_ip', 'cluster', 'virtual_chassis', 'vc_position', 'vc_priority',
|
|
|
+ 'description', 'comments', 'local_context_data', 'tags', 'custom_fields', 'config_context',
|
|
|
+ 'config_template', 'created', 'last_updated', 'console_port_count', 'console_server_port_count',
|
|
|
+ 'power_port_count', 'power_outlet_count', 'interface_count', 'front_port_count', 'rear_port_count',
|
|
|
+ 'device_bay_count', 'module_bay_count', 'inventory_item_count',
|
|
|
]
|
|
|
|
|
|
@extend_schema_field(serializers.JSONField(allow_null=True))
|