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

Applying salt state file with funciton junos.rpc fails with TypeError: rpc() takes at most 2 arguments (3 given) #99

Closed
rsmekala opened this issue Apr 11, 2019 · 1 comment

Comments

@rsmekala
Copy link

Description of Issue

root@nms5-salt-master-b:/srv/salt# cat junos_rpc.sls 
get-system-information:
    junos.rpc
root@nms5-salt-master-b:/srv/salt# salt "vmx1" state.apply junos_rpc
[WARNING ] /usr/local/lib/python2.7/site-packages/salt/payload.py:149: DeprecationWarning: encoding is deprecated, Use raw=False instead.
  ret = msgpack.loads(msg, use_list=True, ext_hook=ext_type_decoder, encoding=encoding)

[ERROR   ] An exception occurred in this state: Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/salt/state.py", line 1933, in call
    **cdata['kwargs'])
  File "/usr/local/lib/python2.7/site-packages/salt/loader.py", line 1939, in wrapper
    return f(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/salt/states/junos.py", line 27, in wrapper
    ret = function(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/salt/states/junos.py", line 82, in rpc
    ret['changes'] = __salt__['junos.rpc'](name, dest, format, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/salt/modules/junos.py", line 99, in wrapper
    return function(*args, **kwargs)
TypeError: rpc() takes at most 2 arguments (3 given)

vmx1:
----------
          ID: get-system-information
    Function: junos.rpc
      Result: False
     Comment: An exception occurred in this state: Traceback (most recent call last):
                File "/usr/local/lib/python2.7/site-packages/salt/state.py", line 1933, in call
                  **cdata['kwargs'])
                File "/usr/local/lib/python2.7/site-packages/salt/loader.py", line 1939, in wrapper
                  return f(*args, **kwargs)
                File "/usr/local/lib/python2.7/site-packages/salt/states/junos.py", line 27, in wrapper
                  ret = function(*args, **kwargs)
                File "/usr/local/lib/python2.7/site-packages/salt/states/junos.py", line 82, in rpc
                  ret['changes'] = __salt__['junos.rpc'](name, dest, format, **kwargs)
                File "/usr/local/lib/python2.7/site-packages/salt/modules/junos.py", line 99, in wrapper
                  return function(*args, **kwargs)
              TypeError: rpc() takes at most 2 arguments (3 given)
     Started: 20:03:26.052930
    Duration: 7.296 ms
     Changes:   

Summary for vmx1
------------
Succeeded: 0
Failed:    1
------------
Total states run:     1
Total run time:   7.296 ms
ERROR: Minions returned with non-zero exit code
@rsmekala rsmekala self-assigned this Apr 11, 2019
@rsmekala rsmekala changed the title pplying salt state file with funciton junos.rpc fails with TypeError: rpc() takes at most 2 arguments (3 given) Applying salt state file with funciton junos.rpc fails with TypeError: rpc() takes at most 2 arguments (3 given) Apr 11, 2019
@rsmekala
Copy link
Author

Closed PR: 1429647

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

No branches or pull requests

1 participant