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 function junos.diff fails with TypeError: diff() missing 1 required positional argument: 'd_id' #96

Closed
rsmekala opened this issue Apr 8, 2019 · 2 comments

Comments

@rsmekala
Copy link

rsmekala commented Apr 8, 2019

Description of Issue/Question

Applying salt state file with function junos.diff fails with TypeError: diff() missing 1 required positional argument: 'd_id'

root@olympics-salt:/srv/salt# salt "vmx1" state.apply junos_diff

vmx1:
----------
          ID: get the diff
    Function: junos.diff
      Result: False
     Comment: An exception occurred in this state: Traceback (most recent call last):
                File "/usr/local/lib/python3.4/dist-packages/salt/state.py", line 1933, in call
                  **cdata['kwargs'])
                File "/usr/local/lib/python3.4/dist-packages/salt/loader.py", line 1939, in wrapper
                  return f(*args, **kwargs)
                File "/usr/local/lib/python3.4/dist-packages/salt/states/junos.py", line 27, in wrapper
                  ret = function(*args, **kwargs)
              TypeError: diff() missing 1 required positional argument: 'd_id'
     Started: 20:09:27.477812
    Duration: 0.779 ms
     Changes:   

Summary for vmx1
------------
Succeeded: 0
Failed:    1
------------
Total states run:     1
Total run time:   0.779 ms
ERROR: Minions returned with non-zero exit code
root@olympics-salt:/srv/salt# cat junos_diff.sls 
get the diff:
  junos.diff

root@olympics-salt:/srv/salt# salt "vmx1" state.apply junos_diff

vmx1:
----------
          ID: get the diff
    Function: junos.diff
      Result: False
     Comment: An exception occurred in this state: Traceback (most recent call last):
                File "/usr/local/lib/python3.4/dist-packages/salt/state.py", line 1933, in call
                  **cdata['kwargs'])
                File "/usr/local/lib/python3.4/dist-packages/salt/loader.py", line 1939, in wrapper
                  return f(*args, **kwargs)
                File "/usr/local/lib/python3.4/dist-packages/salt/states/junos.py", line 27, in wrapper
                  ret = function(*args, **kwargs)
              TypeError: diff() got an unexpected keyword argument 'id'
     Started: 20:16:10.420242
    Duration: 0.716 ms
     Changes:   

Summary for vmx1
------------
Succeeded: 0
Failed:    1
------------
Total states run:     1
Total run time:   0.716 ms
ERROR: Minions returned with non-zero exit code
root@olympics-salt:/srv/salt# cat junos_diff.sls 
get the diff:
  junos.diff:
   - id: 0


root@olympics-salt:/srv/salt# salt "vmx1" state.apply junos_diff

vmx1:
----------
          ID: get the diff
    Function: junos.diff
      Result: False
     Comment: An exception occurred in this state: Traceback (most recent call last):
                File "/usr/local/lib/python3.4/dist-packages/salt/state.py", line 1933, in call
                  **cdata['kwargs'])
                File "/usr/local/lib/python3.4/dist-packages/salt/loader.py", line 1939, in wrapper
                  return f(*args, **kwargs)
                File "/usr/local/lib/python3.4/dist-packages/salt/states/junos.py", line 27, in wrapper
                  ret = function(*args, **kwargs)
                File "/usr/local/lib/python3.4/dist-packages/salt/states/junos.py", line 217, in diff
                  ret['changes'] = __salt__['junos.diff'](d_id)
              TypeError: diff() takes 0 positional arguments but 1 was given
     Started: 20:16:42.985934
    Duration: 2.189 ms
     Changes:   

Summary for vmx1
------------
Succeeded: 0
Failed:    1
------------
Total states run:     1
Total run time:   2.189 ms
ERROR: Minions returned with non-zero exit code
root@olympics-salt:/srv/salt# cat junos_diff.sls 
get the diff:
  junos.diff:
   - d_id: 0
@rsmekala rsmekala changed the title junos.diff stat eis broken in 2019.2 branch Applying salt state file with function junos.diff fails with TypeError: diff() missing 1 required positional argument: 'd_id' Apr 8, 2019
@rsmekala rsmekala self-assigned this Apr 8, 2019
@rsmekala
Copy link
Author

rsmekala commented Apr 8, 2019

Internal PR: 1428549

@rsmekala
Copy link
Author

Closed PR: 1428549

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