You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Move Module & ModuleType models to a separate file
* Add ModuleTypeProfile & related fields
* Initial work on JSON schema validation
* Add attributes property on ModuleType
* Introduce MultipleOfValidator
* Introduce JSONSchemaProperty
* Enable dynamic form field rendering
* Misc cleanup
* Fix migration conflict
* Ensure deterministic ordering of attriubte fields
* Support choices & default values
* Include module type attributes on module view
* Enable modifying individual attributes via REST API
* Enable filtering by attribute values
* Add documentation & tests
* Schema should be optional
* Include attributes column for profiles
* Profile is nullable
* Include some initial profiles to be installed via migration
* Fix migrations conflict
* Fix filterset test
* Misc cleanup
* Fixes#19023: get_field_value() should respect null values in bound forms (#19024)
* Skip filters which do not specify a JSON-serializable value
* Fix handling of array item types
* Fix initial data in schema field during bulk edit
* Implement sanity checking for JSON schema definitions
* Fall back to filtering by string value
Copy file name to clipboardExpand all lines: docs/models/dcim/moduletype.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,3 +43,11 @@ The numeric weight of the module, including a unit designation (e.g. 3 kilograms
43
43
### Airflow
44
44
45
45
The direction in which air circulates through the device chassis for cooling.
46
+
47
+
### Profile
48
+
49
+
The assigned [profile](./moduletypeprofile.md) for the type of module. Profiles can be used to classify module types by function (e.g. power supply, hard disk, etc.), and they support the addition of user-configurable attributes on module types. The assignment of a module type to a profile is optional.
50
+
51
+
### Attributes
52
+
53
+
Depending on the module type's assigned [profile](./moduletypeprofile.md) (if any), one or more user-defined attributes may be available to configure.
!!! info "This model was introduced in NetBox v4.3."
4
+
5
+
Each [module type](./moduletype.md) may optionally be assigned a profile according to its classification. A profile can extend module types with user-configured attributes. For example, you might want to specify the input current and voltage of a power supply, or the clock speed and number of cores for a processor.
6
+
7
+
Module type attributes are managed via the configuration of a [JSON schema](https://json-schema.org/) on the profile. For example, the following schema introduces three module type attributes, two of which are designated as required attributes.
8
+
9
+
```json
10
+
{
11
+
"properties": {
12
+
"type": {
13
+
"type": "string",
14
+
"title": "Disk type",
15
+
"enum": ["HD", "SSD", "NVME"],
16
+
"default": "HD"
17
+
},
18
+
"capacity": {
19
+
"type": "integer",
20
+
"title": "Capacity (GB)",
21
+
"description": "Gross disk size"
22
+
},
23
+
"speed": {
24
+
"type": "integer",
25
+
"title": "Speed (RPM)"
26
+
}
27
+
},
28
+
"required": [
29
+
"type", "capacity"
30
+
]
31
+
}
32
+
```
33
+
34
+
The assignment of module types to a profile is optional. The designation of a schema for a profile is also optional: A profile can be used simply as a mechanism for classifying module types if the addition of custom attributes is not needed.
35
+
36
+
## Fields
37
+
38
+
### Schema
39
+
40
+
This field holds the [JSON schema](https://json-schema.org/) for the profile. The configured JSON schema must be valid (or the field must be null).
0 commit comments