grnet / maas2netbox

Enrich NetBox from MaaS gathered information
GNU General Public License v3.0
22 stars 6 forks source link

Check inconsistency between NetBox and MaaS status || what is this mean ? #22

Closed moelsabagh closed 3 years ago

moelsabagh commented 3 years ago

when updating status between netbox & maas gives " Check inconsistency between NetBox and MaaS status "

skatsaounis commented 3 years ago

Hi @moelsabagh. This check tries to find out if the MaaS node status is properly marked at NetBox node object. For example when a MaaS node is "Deployed" the expected declared node status in NetBox should be Active.

Here you can find the dictionary with statuses translation between MaaS and NetBox.

https://github.com/moelsabagh/maas2netbox/blob/master/maas2netbox/config.py#L31

moelsabagh commented 3 years ago

Hi @moelsabagh. This check tries to find out if the MaaS node status is properly marked at NetBox node object. For example when a MaaS node is "Deployed" the expected declared node status in NetBox should be Active.

Here you can find the dictionary with statuses translation between MaaS and NetBox.

https://github.com/moelsabagh/maas2netbox/blob/master/maas2netbox/config.py#L31

Hi @skatsaounis , i got that , but i wanna to sync nodes firstly from MaaS to NetBox ,, i do that by updating status , is this correct ? if not , how can i sync all MaaS nodes to NetBox ?

skatsaounis commented 3 years ago

This tool assumes that the nodes are already present in the NetBox and MaaS respectively. It does not create missing MaaS nodes in NetBox.

In your case, you could create the nodes in NetBox beforehand with pynetbox (https://github.com/digitalocean/pynetbox) and then let this tool sync their status from MaaS. Please be careful to name the nodes with same name as MaaS (https://github.com/grnet/maas2netbox#conventions)

moelsabagh commented 3 years ago

This tool assumes that the nodes are already present in the NetBox and MaaS respectively. It does not create missing MaaS nodes in NetBox.

In your case, you could create the nodes in NetBox beforehand with pynetbox (https://github.com/digitalocean/pynetbox) and then let this tool sync their status from MaaS. Please be careful to name the nodes with same name as MaaS (https://github.com/grnet/maas2netbox#conventions)

@skatsaounis Many Thanks for your effort. Now, i am working on building an Ansible playbook to create MaaS nodes on NetBox by using netbox ansbile collection which use pynetbox . then i will use your project to sync status betwen MaaS & NetBox.