From 8edcf6584db764ea4e005e9179878c134d4b5235 Mon Sep 17 00:00:00 2001 From: devopstales <42894256+devopstales@users.noreply.github.com> Date: Sat, 8 Jul 2023 10:48:26 +0200 Subject: [PATCH] feat(Multi server): Update README and add custom fields csv https://github.com/netdevopsbr/netbox-proxbox/issues/33 Signed-off-by: devopstales <42894256+devopstales@users.noreply.github.com> --- README.md | 27 +++++++++++++++------------ netbox_custom_fields.csv | 5 +++++ 2 files changed, 20 insertions(+), 12 deletions(-) create mode 100644 netbox_custom_fields.csv diff --git a/README.md b/README.md index f0cec9d..75e8d30 100755 --- a/README.md +++ b/README.md @@ -153,17 +153,19 @@ Replace the values with your own following the [Configuration Parameters](#2-con ```python PLUGINS_CONFIG = { 'netbox_proxbox': { - 'proxmox': { - 'domain': 'proxbox.example.com', # May also be IP address - 'http_port': 8006, - 'user': 'root@pam', # always required - 'password': 'Strong@P4ssword', # only required, if you don't want to use token based authentication - 'token': { - 'name': 'tokenID', # Only type the token name and not the 'user@pam:tokenID' format - 'value': '039az154-23b2-4be0-8d20-b66abc8c4686' - }, - 'ssl': False - }, + 'proxmox': [ + { + 'domain': 'proxbox.example.com', # May also be IP address + 'http_port': 8006, + 'user': 'root@pam', # always required + 'password': 'Strong@P4ssword', # only required, if you don't want to use token based authentication + 'token': { + 'name': 'tokenID', # Only type the token name and not the 'user@pam:tokenID' format + 'value': '039az154-23b2-4be0-8d20-b66abc8c4686' + }, + 'ssl': False + } + ], 'netbox': { 'domain': 'localhost', # Ensure localhost is added to ALLOWED_HOSTS 'http_port': 8001, # Gunicorn port. @@ -194,6 +196,7 @@ PLUGINS_CONFIG = { ``` (venv) $ cd /opt/netbox/netbox/ (venv) $ python3 manage.py migrate +(venv) $ python3 manage.py collectstatic --no-input ``` --- @@ -211,7 +214,7 @@ Restart the WSGI service to load the new plugin: The following options are available: -* `proxmox`: (Dict) Proxmox related configuration to use proxmoxer. +* `proxmox`: (List) Proxmox related configuration to use proxmoxer. * `proxmox.domain`: (String) Domain or IP address of Proxmox. * `proxmox.http_port`: (Integer) Proxmox HTTP port (default: 8006). * `proxmox.user`: (String) Proxmox Username. diff --git a/netbox_custom_fields.csv b/netbox_custom_fields.csv new file mode 100644 index 0000000..5d69a33 --- /dev/null +++ b/netbox_custom_fields.csv @@ -0,0 +1,5 @@ +Name,Content types,Label,Group name,Type,Required,Description,ID,Default,Search weight,Filter logic,UI visibility,Cloneable,Display weight,Choices,Created,Last updated +proxmox_id,virtualization.virtualmachine,[Proxmox] ID,,Integer,False,Proxmox VM/CT ID,1,,1000,Loose,Read/Write,False,100,[],2023-07-06 12:49,2023-07-06 12:50 +proxmox_keep_interface,dcim.interface,,,Boolean (true/false),False,,4,,1000,Loose,Read/Write,False,100,[],2023-07-06 12:53,2023-07-06 12:53 +proxmox_node,virtualization.virtualmachine,[Proxmox] Node,,Text,False,Proxmox Node (Server),2,,1000,Loose,Read/Write,False,100,[],2023-07-06 12:51,2023-07-06 12:51 +proxmox_type,virtualization.virtualmachine,[Proxmox] Type,,Selection,False,Proxmox type (VM or CT),3,,1000,Loose,Read/Write,False,100,"['qemu', 'lxc']",2023-07-06 12:52,2023-07-06 12:52