1
0
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:
Jeremy Stretch
2023-11-28 13:11:30 -05:00
parent e4989300de
commit 8e7146cd06
2 changed files with 17 additions and 0 deletions

View 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.

View File

@ -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.)