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

nr.snmp #40

Open
bodleytunes opened this issue Jul 24, 2024 · 0 comments
Open

nr.snmp #40

bodleytunes opened this issue Jul 24, 2024 · 0 comments

Comments

@bodleytunes
Copy link

Hi, I was testing out the nr.snmp feature, but hitting a bit of a blocker with what could be the inventory.
I'm getting

2 - connection puresnmp, retry attempt 9, error: 'name 'PyWrapper' is not defined'
[ERROR   ] name 'PyWrapper' is not defined
Traceback (most recent call last):
  File "/home/kmx/assets/custom-libs/nornir-salt/nornir_salt/plugins/runners/RetryRunner.py", line 574, in connector
    host.open_connection(
  File "/home/kmx/.venv/lib/python3.9/site-packages/nornir/core/inventory.py", line 546, in open_connection
    conn_obj.open(
  File "/home/kmx/assets/custom-libs/nornir-salt/nornir_salt/plugins/connections/PureSNMPPlugin.py", line 153, in open
    self.connection = PyWrapper(

And my inventory I think is now correct.

groups:
                - juniper
                - junos
                - juniper_junos
                - junos
                - REGION_ALL
                - common
                - connection_params_snmpv2c


and the group is there in the inventory

       connection_params_snmpv2c:
            ----------
            connection_options:
                ----------
                puresnmp:
                    ----------
                    extras:
                        ----------
                        community:
                            *****
                        version:
                            v2c
                    hostname:
                        None
                    password:
                        None
                    platform:
                        None
                    port:
                        161
                    username:
                        None
            data:
                ----------
            groups:
            hostname:
                None
            name:
                connection_params_snmpv2c
            password:
                None
            platform:
                None
            port:
                None
            username:
                None

I stepped through the code and could see the correct variables pulled from inventory being used in the pursnmp plugin but always getting this error.

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

No branches or pull requests

1 participant