davidban77 / ansible-collection-gns3

Ansible Collection for GNS3 Server REST API using gns3fy
https://galaxy.ansible.com/davidban77/gns3
MIT License
39 stars 20 forks source link

"msg": "__init__() got an unexpected keyword argument 'link_style'" #16

Open thecraigus opened 2 years ago

thecraigus commented 2 years ago

Trying to create/state a topology on GNS3 2.2.29

get the following error

fatal: [localhost]: FAILED! => { "changed": false, "invocation": { "module_args": { "links_spec": null, "nodes_delay": 10, "nodes_spec": null, "nodes_state": "started", "nodes_strategy": "all", "password": null, "poll_wait_time": 5, "port": 80, "project_id": null, "project_name": "test_ansible_55", "state": "opened", "url": "http://192.168.78.129", "user": null } }, "msg": "__init__() got an unexpected keyword argument 'link_style'" }

I have the lastest gns3fy installed as below:

pip install --upgrade gns3fy Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: gns3fy in /home/craig/.local/lib/python3.8/site-packages (0.7.1) Requirement already satisfied: requests<3.0,>=2.22 in /usr/lib/python3/dist-packages (from gns3fy) (2.22.0) Requirement already satisfied: pydantic<2.0,>=1.0 in /home/craig/.local/lib/python3.8/site-packages (from gns3fy) (1.9.0) Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.8/dist-packages (from pydantic<2.0,>=1.0->gns3fy) (4.0.1)

main.yaml playbook as below:

`- hosts: localhost collections:

can anyone help?

Yassine-Latreche commented 2 years ago

Hi @thecraigus

I just had the same problem, and the thing I did was I edited the gns3fy.py file form the module and added the link_style attribute to the Link class:

    link_style: Optional[Any] = None

I hope you will find this helpful