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

napalm-panos driver #10

Open
misho23-23 opened this issue May 4, 2023 · 5 comments
Open

napalm-panos driver #10

misho23-23 opened this issue May 4, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@misho23-23
Copy link

Hello,

Is your feature request related to a problem? Please describe.
I have panos driver as a part of Napalm, used in Netbox v3.5.0 and direction to panos device is: "dcim/devices/5/status/" but there is table "Environment" with associated method get_environment. Unfortunately, napalm-panos doesn't support this getter method instead of table "Device Facts" with get_facts is working ok. How can I remove this table "Environment" for panos devices in Netbox?

also
Device Config - dcim/devices/5/config/ is getting data but received config it's not formatted.
image

Describe the solution you'd like
remove table "Environment" with method get_environment "dcim/devices/5/status/" for all devices with platforms associated Napalm driver = panos.

format config output in XML

Thgank you!

@misho23-23 misho23-23 added the enhancement New feature or request label May 4, 2023
@ryanmerolle
Copy link
Contributor

@misho23-23 I was a little confused by the wording of this request, so let me repeat it back to you as I understand it and more generalized. To be more specific, you would like to check if a platform driver supports the getter used by a netbox-napalm feature. If it does not it should present the user with something like f"NAPALM driver for {<platform.} does not have support for getter{<getter_name>}.

The other way I sort of read it was that for drivers like panos, you want a way to specify another getter to use in place of the getters netbox-napalm uses.

Please verify my first understanding is correct.

@misho23-23
Copy link
Author

@misho23-23 I was a little confused by the wording of this request, so let me repeat it back to you as I understand it and more generalized. To be more specific, you would like to check if a platform driver supports the getter used by a netbox-napalm feature. If it does not it should present the user with something like f"NAPALM driver for {<platform.} does not have support for getter{<getter_name>}.

The other way I sort of read it was that for drivers like panos, you want a way to specify another getter to use in place of the getters netbox-napalm uses.

Please verify my first understanding is correct.

Hi @ryanmerolle,

I'd like to know if is possible to somehow customize page of the PANOS device where by
/dcim/devices/5/status/
I'm receiving error: "Method get_environment not implemented for NAPALM driver <class 'napalm_panos.panos.PANOSDriver'>" what make sense because panos driver doesn't support get_environment.
I want to remove Environment info from device where platform include NAPALM Driver = panos
image

Sorry for explanation, I'm trying to describe as best as I can :)

Thank you for your time!

@ryanmerolle
Copy link
Contributor

ryanmerolle commented May 5, 2023

Yea That is what I was trying to say with the first write up.

If the getter is not valid for a driver show the tab, but say why it cannot be populated. If you remove the environment tab, people will think its another issue.

If the driver ever adds environment getter then nothing would need to be reverted for this approach. The approach also works with any other driver besides PANOS.

@ekrichbaum
Copy link

Couple of options (although I like error trapping around a missing getter)... You can fork the napalm driver and add a get_environment method. Return an object with blank strings for the pieces (cpu, available_ram, used_ram, fans, temperature, power). Then (or second) find a way to get that data into a real function and submit it back upstream.

@ekrichbaum
Copy link

Realizing that this has been a while.

https://github.com/ekrichbaum/napalm-panos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants