Skip to content

nr.snmp #40

Open
Open
@bodleytunes

Description

@bodleytunes

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions