Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
thecraigus opened this issue Jan 22, 2022 · 1 comment
Open

Comments

@thecraigus
Copy link

thecraigus commented Jan 22, 2022

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:
- davidban77.gns3
tasks:
- name: Get server version
gns3_facts:
url: "{{ gns3_url }}"
port: 80
get_images: all
get_compute_ports: yes
register: resultado

- debug: var=resultado
- name: Creation/Active section
  when: execute == "create"
  block:
    - import_role:
        name: create_lab

    - name: Get nodes inventory
      gns3_nodes_inventory:
        url: "{{ gns3_url }}"
        port: 80
        project_name: "{{ gns3_project_name }}"
      register: nodes_inventory

    - debug: var=nodes_inventory

- import_role:
    name: delete_lab
  when: execute == "delete"

`

can anyone help?

@Yassine-Latreche
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants