Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove vlan and hardcoded interface type #11

Merged
merged 3 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion diode-napalm-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ diode:

Variables (using `${ENV}` syntax) can be referenced in the configuration file from environmental variables or from a provided `.env` file.

The `driver` device attribute is optional. If not specified, the agent will attempt to find a match from NAPALM supported drivers.
The `driver` device attribute is optional. If not specified, the agent will attempt to find a match from NAPALM supported and installed drivers.

Detailed information about `optional_args` can be found in the NAPALM [documentation](https://napalm.readthedocs.io/en/latest/support/#optional-arguments).

Expand Down Expand Up @@ -100,6 +100,19 @@ The default supported drivers are the natively supported [NAPALM](https://napalm
- Cisco NX-OS ("nxos")
- Juniper JunOS ("junos")

For NAPALM [community drivers](https://github.com/napalm-automation-community) installed in the environment, they can be referenced in the agent policy and will be used for automatic driver matching if no driver is specified.

### Supported Netbox Object Types

The Diode NAPALM agent tries to fetch information from network devices about the following NetBox object types:

- [DCIM.Device](https://netboxlabs.com/docs/netbox/en/stable/models/dcim/device/)
- [DCIM.DeviceType](https://netboxlabs.com/docs/netbox/en/stable/models/dcim/devicetype/)
- [DCIM.Interface](https://netboxlabs.com/docs/netbox/en/stable/models/dcim/interface/)
- [DCIM.Platform](https://netboxlabs.com/docs/netbox/en/stable/models/dcim/platform/)
- [IPAM.IPAddress](https://netboxlabs.com/docs/netbox/en/stable/models/ipam/ipaddress/)
- [IPAM.Prefix](https://netboxlabs.com/docs/netbox/en/stable/models/ipam/prefix/)

## License

Distributed under the Apache 2.0 License. See [LICENSE.txt](./diode-proto/LICENSE.txt) for more information.
1 change: 0 additions & 1 deletion diode-napalm-agent/diode_napalm/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ def run_driver(info: Napalm, config: DiscoveryConfig):
"device": device.get_facts(),
"interface": device.get_interfaces(),
"interface_ip": device.get_interfaces_ip(),
"vlan": device.get_vlans(),
}
Client().ingest(info.hostname, data)

Expand Down
1 change: 0 additions & 1 deletion diode-napalm-agent/diode_napalm/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import logging
import threading
from typing import Optional

from netboxlabs.diode.sdk import DiodeClient

Expand Down
1 change: 0 additions & 1 deletion diode-napalm-agent/diode_napalm/translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ def translate_interface(
interface = Interface(
device=device,
name=if_name,
type="other",
enabled=interface_info.get("is_enabled"),
mtu=interface_info.get("mtu"),
mac_address=interface_info.get("mac_address"),
Expand Down
Loading