diff --git a/docs/plugins/netbox_custom_field_module.rst b/docs/plugins/netbox_custom_field_module.rst index f8603426a..db2c34b8e 100644 --- a/docs/plugins/netbox_custom_field_module.rst +++ b/docs/plugins/netbox_custom_field_module.rst @@ -612,6 +612,98 @@ Parameters - :ansible-option-choices-entry:`"multiobject"` + .. raw:: html + + + + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_custom_field_module__parameter-data/ui_editable: + + .. rst-class:: ansible-option-title + + **ui_editable** + + .. raw:: html + + + + .. rst-class:: ansible-option-type-line + + :ansible-option-type:`string` + + :ansible-option-versionadded:`added in netbox.netbox 3.17.0` + + + .. raw:: html + +
+ + - .. raw:: html + +
+ + Whether the custom field is editable in the UI + + + .. rst-class:: ansible-option-line + + :ansible-option-choices:`Choices:` + + - :ansible-option-choices-entry:`"yes"` + - :ansible-option-choices-entry:`"no"` + - :ansible-option-choices-entry:`"hidden"` + + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. _ansible_collections.netbox.netbox.netbox_custom_field_module__parameter-data/ui_visible: + + .. rst-class:: ansible-option-title + + **ui_visible** + + .. raw:: html + + + + .. rst-class:: ansible-option-type-line + + :ansible-option-type:`string` + + :ansible-option-versionadded:`added in netbox.netbox 3.17.0` + + + .. raw:: html + +
+ + - .. raw:: html + +
+ + Whether the custom field is displayed in the UI + + + .. rst-class:: ansible-option-line + + :ansible-option-choices:`Choices:` + + - :ansible-option-choices-entry:`"always"` + - :ansible-option-choices-entry:`"if-set"` + - :ansible-option-choices-entry:`"hidden"` + + .. raw:: html
diff --git a/plugins/modules/netbox_custom_field.py b/plugins/modules/netbox_custom_field.py index eadfad6d5..c5aae753d 100644 --- a/plugins/modules/netbox_custom_field.py +++ b/plugins/modules/netbox_custom_field.py @@ -106,9 +106,30 @@ required: false type: str version_added: "3.10.0" + ui_editable: + description: + - Whether the custom field is editable in the UI + required: false + choices: + - "yes" + - "no" + - hidden + type: str + version_added: "3.17.0" + ui_visible: + description: + - Whether the custom field is displayed in the UI + required: false + choices: + - always + - if-set + - hidden + type: str + version_added: "3.17.0" ui_visibility: description: - The UI visibility of the custom field + - Replaced by O(ui_visible) and O(ui_editable) in NetBox 3.7 required: false choices: - read-write @@ -245,6 +266,24 @@ def main(): weight=dict(required=False, type="int"), search_weight=dict(required=False, type="int"), group_name=dict(required=False, type="str"), + ui_editable=dict( + required=False, + choices=[ + "yes", + "no", + "hidden", + ], + type="str", + ), + ui_visible=dict( + required=False, + choices=[ + "always", + "if-set", + "hidden", + ], + type="str", + ), ui_visibility=dict( required=False, choices=[