mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
v3.7 documentation updates
This commit is contained in:
13
docs/models/virtualization/virtualdisk.md
Normal file
13
docs/models/virtualization/virtualdisk.md
Normal file
@ -0,0 +1,13 @@
|
||||
# Virtual Disks
|
||||
|
||||
A virtual disk is used to model discrete virtual hard disks assigned to [virtual machines](./virtualmachine.md).
|
||||
|
||||
## Fields
|
||||
|
||||
### Name
|
||||
|
||||
A human-friendly name that is unique to the assigned virtual machine.
|
||||
|
||||
### Size
|
||||
|
||||
The allocated disk size, in gigabytes.
|
@ -60,6 +60,10 @@ class MyModel(NetBoxModel):
|
||||
|
||||
This attribute specifies the URL at which the documentation for this model can be reached. By default, it will return `/static/docs/models/<app_label>/<model_name>/`. Plugin models can override this to return a custom URL. For example, you might direct the user to your plugin's documentation hosted on [ReadTheDocs](https://readthedocs.org/).
|
||||
|
||||
#### `_netbox_private`
|
||||
|
||||
By default, any model introduced by a plugin will appear in the list of available object types e.g. when creating a custom field or certain dashboard widgets. If your model is intended only for "behind the scenes use" and should not be exposed to end users, set `_netbox_private` to True. This will omit it from the list of general-purpose object types.
|
||||
|
||||
### Enabling Features Individually
|
||||
|
||||
If you prefer instead to enable only a subset of these features for a plugin model, NetBox provides a discrete "mix-in" class for each feature. You can subclass each of these individually when defining your model. (Your model will also need to inherit from Django's built-in `Model` class.)
|
||||
|
Reference in New Issue
Block a user