Giter Site home page Giter Site logo

Implement stricter input about netdiff HOT 9 CLOSED

openwisp avatar openwisp commented on September 28, 2024
Implement stricter input

from netdiff.

Comments (9)

acoul avatar acoul commented on September 28, 2024

unfortunately this change breaks https://github.com/coxley/aspath_graph which I use to convert BGP txt dump to json

from netdiff.

nemesifier avatar nemesifier commented on September 28, 2024

@acoul: upgrading client code is very easy, it just requires to specify if the input is a url, file or data.

See the changes in the tests to understand what I mean: aa81003

One question, I don't understand what do you mean for breaking aspath_graph, I thought that package did not use netdiff.

from netdiff.

acoul avatar acoul commented on September 28, 2024

this is the error I am getting:

[ERROR 2017-09-21 15:06:26,309] module: contextmanagers, process: 20937, thread: -1213524224
Failed to perform update on <Topology: AWMN - NetJSON NetworkGraph>
Traceback (most recent call last):
File "/awmn/.local/lib/python3.4/site-packages/django_netjsongraph/contextmanagers.py", line 10, in log_failure
yield
File "/awmn/.local/lib/python3.4/site-packages/django_netjsongraph/base/topology.py", line 305, in update_all
topology.update()
File "/awmn/.local/lib/python3.4/site-packages/django_netjsongraph/base/topology.py", line 185, in update
diff = self.diff(data)
File "/awmn/.local/lib/python3.4/site-packages/django_netjsongraph/base/topology.py", line 133, in diff
latest = self.get_topology_data(data)
File "/awmn/.local/lib/python3.4/site-packages/django_netjsongraph/base/topology.py", line 114, in get_topology_data
latest = self.parser_class(data, timeout=TIMEOUT)
File "/awmn/.local/lib/python3.4/site-packages/netdiff/parsers/base.py", line 56, in init
self.original_data = self.to_python(data)
File "/awmn/.local/lib/python3.4/site-packages/netdiff/parsers/base.py", line 89, in to_python
raise ConversionException('Could not recognize format', data=data)
netdiff.exceptions.ConversionException: Could not recognize format

from netdiff.

acoul avatar acoul commented on September 28, 2024

I am not sure if this issue should be reported here or @ https://github.com/netjson/django-netjsongraph

FWIW I was able to get going again by reverting this: 42484a9

I simply updated the .local/lib/python3.4/site-packages/netdiff/parsers/base.py by hand

from netdiff.

nemesifier avatar nemesifier commented on September 28, 2024

If you don't want issues, stick to django-netjsongraph 0.3.4 and netdiff 0.4.8.

from netdiff.

acoul avatar acoul commented on September 28, 2024

the above netdiff 0.5.0 revert actually produces a 0.4.8 IMHO

I was just following this: https://github.com/netjson/django-netjsongraph/blob/master/requirements.txt

netdiff>=0.5.0,<=6.0

from netdiff.

nemesifier avatar nemesifier commented on September 28, 2024

yes, is correct

from netdiff.

acoul avatar acoul commented on September 28, 2024

this was my bad: openwisp/django-netjsongraph#57

all seem to work as they should. sorry for the noise.

Edit: to clarify things, aspath_graph is working fine

from netdiff.

nemesifier avatar nemesifier commented on September 28, 2024

@acoul: thx for the update!

from netdiff.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.