Metadata-Version: 2.1
Name: netbox-fusioninventory-plugin
Version: 0.4
Summary: A Plugin for import devices from fusion inventory agent
Home-page: https://gitlab.com/Milka64/netbox-fusioninventory-plugin
Author: Michael Ricart
License: BSD License
Platform: UNKNOWN
Description-Content-Type: text/markdown
Requires-Dist: bs4
Requires-Dist: lxml

# netbox-fusioninventory-plugin

This plugin can add devices from fusioninventory-agent or ocsinventory-agent.

```
fusioninventory-agent -s http://netbox.local/plugins/fusion-inventory/
```

### what working:

* add device name
* Device Type
* Serial Number
* Asset Tag

### todo 

* add components
* add config
* add interfaces
* add ip

## Installation

First, add netbox-fusioninventory-plugin to your `/opt/netbox/local_requirements.txt` file. Create it if it doesn't exist.

Then enable the plugin in `/opt/netbox/netbox/netbox/configuration.py`, like:

```python

   PLUGINS = [
       'netbox_fusioninventory_plugin',
       ]
```

And finally run `/opt/netbox/upgrade.sh`. This will download and install the plugin and update the database when necessary. Don't forget to run sudo systemctl restart netbox netbox-rq like upgrade.sh tells you!

## configuration

You can overwrite fields with xml content or use internal objects.

```python
PLUGINS_CONFIG = {
        'netbox_fusioninventory_plugin':{
            "name":"xml:request.content.hardware.name",
            "device_role":"object:DeviceRole:unknow",
            "tenant":None,
            "manufacturer":"xml:request.content.bios.mmanufacturer",
            "device_type":"xml:request.content.bios.mmodel",
            "platform":"xml:request.content.hardware.osname",
            "serial":"xml:request.content.bios.msn",
            "asset_tag":"xml:request.content.bios.assettag",
            "status":"str:active",
            "site":"object:Site:unknow",
            "location":None,
            "rack":None,
            "position":None,
            "face":None,
            "virtual_chassis":None,
            "vc_position":None,
            "vc_priority":None,
            "cluster":None,
            "comments":None,
        }
    }
```


