Closed mailorderbribes closed 4 years ago
Hi, Isn't it more an issue with the driver itself? If it is, you should open a bugreport directly on its repository.
Hi, why is it using the stubparser? i have a driver installed. Do i need to install the driver also under vendors in the importer dir?
The Junos driver also has no attribute get_interface mode
Can you try the dev
branch and tell me if it fixes it?
Edit: I'm sorry I've misread your bug report, I've read that using napalm directly gave you the same error… Indeed it was calling a missing method in the StubParser (which is used because your device is not supported by a more specific parser).
ERROR: netbox_importer: Error when polling device huaweicloudenginge : 'StubParser' object has no attribute 'get_interface_vlans' 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:19<00:00, 19.66s/it]
getting closer :)
Hmm, ok, I'm going to see everything missing in the abstract class.
Thanks for testing it!
Happy to test for you. I am active again with this project.
Hi,
i4networks asked me to look into this and tested a small fix in a clone of this project. This worked well for i4networks on two different Huawei devices. Maybe others can also benefit from this fix. What is the way to contribute this fix to this project?
With the fix in the dev
branch as a guideline I made these changes:
In vendors.base._AbstractVendorParser
I've added the method:
@abstractmethod
def get_interface_vlans(self, interface):
pass
In vendors.__init__.StubParser
:
def get_interface_vlans(self, interface):
raise NotImplementedError
Best, Remco
@rvandenbergh: Ok, thanks, I will check if no other abstract method is missing. Indeed the fix is pretty trivial, I just didn't take the time to look at it this week.
Can you test again the dev
branch please? I added a few methods in the StubParser to avoid the issue.
Thanks. I don't have access to the devices so I've asked @i4networks to test your dev
branch.
Works like a charm :) Thnx
Thanks, I'm doing a new release with that fix.
Hi Scaleway,
When using the napalm community driver Huawei-CE i get this error. 'StubParser' object has no attribute 'get_interface_mode'
Running napalm from commandline with same driver gives me no errors.
Best,
I4Networks