napalm-automation / napalm-salt

Modules for event-driven network automation and orchestration using Salt
Apache License 2.0
128 stars 36 forks source link

netusers.managed failing, is this something outside of my control? #66

Open nzurku opened 4 years ago

nzurku commented 4 years ago

Hello.

I'm trying to run the netusers.managed via a state. I'm actualy using the example SLS as referenced here: https://docs.saltstack.com/en/master/ref/states/all/salt.states.netusers.html

[root@salt-junos]# salt 'spsw-1*' state.apply pit1/baseline test=True
spsw-101.pit1:
----------
          ID: netusers_example
    Function: netusers.managed
      Result: False
     Comment: An exception occurred in this state: Traceback (most recent call last):
                File "/usr/lib/python3.6/site-packages/salt/state.py", line 1981, in call
                  **cdata['kwargs'])
                File "/usr/lib/python3.6/site-packages/salt/loader.py", line 1977, in wrapper
                  return f(*args, **kwargs)
                File "/usr/lib/python3.6/site-packages/salt/states/netusers.py", line 339, in managed
                  expected_users = _expand_users(users, defaults)
                File "/usr/lib/python3.6/site-packages/salt/states/netusers.py", line 80, in _expand_users
                  expected_users.update(device_users)
              AttributeError: 'NoneType' object has no attribute 'update'
     Started: 12:29:42.927069
    Duration: 1.572 ms
     Changes:

Summary for spsw-101.pit1
------------
Succeeded: 0
Failed:    1
------------
Total states run:     1
Total run time:   1.572 ms
Salt Version:
           Salt: 3000.1

Dependency Versions:
           cffi: 1.11.5
       cherrypy: Not Installed
       dateutil: 2.6.1
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
         Jinja2: 2.10.1
        libgit2: Not Installed
       M2Crypto: 0.35.2
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.6.2
   mysql-python: Not Installed
      pycparser: 2.14
       pycrypto: Not Installed
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 3.6.8 (default, Nov 21 2019, 19:31:34)
   python-gnupg: Not Installed
         PyYAML: 5.3.1
          PyZMQ: 17.0.0
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.5.3
            ZMQ: 4.3.2

System Versions:
           dist: centos 8.1.1911 Core
         locale: UTF-8
        machine: x86_64
        release: 4.18.0-147.5.1.el8_1.x86_64
         system: Linux
        version: CentOS Linux 8.1.1911 Core

I get healthy replies of modules such as netusers.config, and I can even create/delete users via the proper modules. I just can't use this managed module.