-
Notifications
You must be signed in to change notification settings - Fork 516
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
I'm runing nornir 2.0 in a bad way that I couldn't identify the issue, need help. #28
Comments
Looks like your inventory format is probably wrong. You would have to post your inventory here for me to be able to help. Obviously obfuscate anything that is confidential. |
Hi Kirk, I have the code and the nornir package in the same folder in my windows machine (windows 7 professional). I'm just not sure what I'm doing wrong here. |
@pravinrajgit You are using an old format of Nornir's inventory (before 2.X.X). You need to convert over to the new Nornir inventory format. See this tutorial for more details: https://nornir.readthedocs.io/en/stable/tutorials/intro/inventory.html |
I am not sure what you are trying to show me there? Please don't include screen-shots i.e. copy-and paste is much better (as it is much easier to read and to reproduce if needed). It still looks like your inventory format is probably incorrect. |
Hi Kirk,,
I followed your document of "Introduction to nornir' and facing the issues on nornir with windows OS.
The debugger logs :
c:\users\tkmamja.pycharmce2019.1\venv\scripts\lpthw\test\ktbyers\hey\heyhey.py(1)()
-> from nornir import InitNornir
(Pdb) n
When I ran the program I get this :
$ python heyhey.py
Traceback (most recent call last):
File "heyhey.py", line 5, in
nr = InitNornir()
File "C:\Users\TKMAMJA.PyCharmCE2019.1\venv\lib\site-packages\nornir\init_nornir.py", line 78, in InitNornir
**conf.inventory.options,
File "C:\Users\TKMAMJA.PyCharmCE2019.1\venv\lib\site-packages\nornir\core\deserializer\inventory.py", line 129, in deserialize
deserialized = cls(*args, **kwargs)
File "C:\Users\TKMAMJA.PyCharmCE2019.1\venv\lib\site-packages\nornir\plugins\inventory\simple.py", line 55, in init
super().init(hosts=hosts, groups=groups, defaults=defaults, *args, **kwargs)
File "C:\Users\TKMAMJA.PyCharmCE2019.1\venv\lib\site-packages\pydantic\main.py", line 142, in init
self.setstate(self._process_values(data))
File "C:\Users\TKMAMJA.PyCharmCE2019.1\venv\lib\site-packages\pydantic\main.py", line 312, in _process_values
return validate_model(self, input_data)
File "C:\Users\TKMAMJA.PyCharmCE2019.1\venv\lib\site-packages\pydantic\main.py", line 474, in validate_model
raise ValidationError(errors)
pydantic.error_wrappers.ValidationError: 4 validation errors
hosts -> rtr1 -> nornir_host
extra fields not permitted (type=value_error.extra)
groups -> defaults -> nornir_password
extra fields not permitted (type=value_error.extra)
groups -> defaults -> nornir_username
extra fields not permitted (type=value_error.extra)
groups -> cisco_ios -> nornir_nos
extra fields not permitted (type=value_error.extra)
What am I doing wrong here?????????? Could be great help.
The text was updated successfully, but these errors were encountered: