netdevopsbr / netbox-proxbox

Netbox Plugin for integration between Proxmox and Netbox
Apache License 2.0
321 stars 45 forks source link

Different site_id for different clusters possible? #145

Open a118n opened 10 months ago

a118n commented 10 months ago

Hello, I can see that multi-cluster support was added to the plugin, but I can't seem to figure out how to define different site_id for each of the cluster. For example I have the following clusters in the config:

PLUGINS_CONFIG = {
    'netbox_proxbox': {
        'proxmox': [
            {
                'domain': 'dc01-pve01.example.org',
                'http_port': 8006,
                'user': 'root@pam',
                'password': '123456',
                'ssl': False
            },
            {
                'domain': 'dc02-pve01.example.org',
                'http_port': 8006,
                'user': 'root@pam',
                'password': '123456',
                'ssl': False
            }
        ],
        'netbox': {
            'domain': 'localhost',
            'http_port': 8001,
            'token': 'abcgsuydsfkjdsklf12312',
            'ssl': False,
            'settings': {
                'virtualmachine_role_id' : 47,
                'node_role_id' : 29,
                'site_id': ???
            }
        }
    }
}

site_id is defined outside of clusters scope and is global for all of them?