davidban77 / gns3fy

Python library wrapper around GNS3 Server REST API
https://davidban77.github.io/gns3fy/
57 stars 28 forks source link

New link-style attribute in GNS3 2.2.22 is not supported and causes loading projects created in that version to fail #95

Closed brownhami closed 2 years ago

brownhami commented 3 years ago

GNS3 2.2.22 introduced a new link styling feature. Opening projects created in GNS3 >=2.2.22 now fails because of a new link_style attribute in the response from GET /v2/projects/{project_id}/links

  Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "H:\Documents\PycharmProjects\<redacted>", line 22, in select_project
    self._project.get()
  File "H:\Documents\PycharmProjects\<redacted>\venv\lib\site-packages\gns3fy\gns3fy.py", line 1195, in get
    self.get_links()
  File "H:\Documents\PycharmProjects\<redacted>\venv\lib\site-packages\gns3fy\gns3fy.py", line 514, in wrapper
    return f(self, *args, **kwargs)
  File "H:\Documents\PycharmProjects\<redacted>\venv\lib\site-packages\gns3fy\gns3fy.py", line 1405, in get_links
    _l = Link(connector=self.connector, **_link)
TypeError: __init__() got an unexpected keyword argument 'link_style'
brownhami commented 3 years ago

I have created a pull request https://github.com/davidban77/gns3fy/pull/96 to fix this issue.

Krlosromero commented 2 years ago

Merged on #98