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

api_modify unsupported keys #115

Closed
snookit opened this issue Oct 13, 2022 · 1 comment · Fixed by #121
Closed

api_modify unsupported keys #115

snookit opened this issue Oct 13, 2022 · 1 comment · Fixed by #121
Labels
enhancement New feature or request

Comments

@snookit
Copy link

snookit commented Oct 13, 2022

Hello there,
I've started to work with this collection to configure routeros hardware, first of all thanks for this great piece of software it's a real pleasure working with it !

SUMMARY

I've encountered some keys unsupported by api_modify :

- name: ip firewall filter
  community.routeros.api_modify:
    path: ip firewall filter
    data: 
      "{{ firewall_filters }}"

loop item :
        {
            "action": "fasttrack-connection",
            "chain": "forward",
            "connection-state": "established,related",
            "hw-offload": true,
        },

result:
TASK [mikrotik : ip firewall filter] 
FAILED! => {"changed": false, "msg": "Unknown key \"hw-offload\" at index 1."}

Same here :

- name: interface ethernet
  community.routeros.api_modify:
    path: interface ethernet
    data: 
      "{{ interfaces_ethernet }}"

loop item: 
        {
            "default-name": "ether5",
            "name": "ether5-test",
            "poe-out": "auto-on"
        },

result:
TASK [mikrotik : interface ethernet] 
FAILED! => {"changed": false, "msg": "Unknown key \"poe-out\" for default-name=\"ether5\"."}

I don't use it but I noticed poe-priority key is also missing for "interface ethernet" path

I've added these keys in my local plugins/module_utils/_api_data.py file and these tasks are running happily

ISSUE TYPE
  • Bug Report
COMPONENT NAME

community.routeros.api_modify

ANSIBLE VERSION
ansible [core 2.12.9]
  python version = 3.10.7 (main, Sep  7 2022, 00:00:00) [GCC 12.2.1 20220819 (Red Hat 12.2.1-1)]
  jinja version = 3.0.3
  libyaml = True
COLLECTION VERSION
Collection         Version
------------------ -------
community.routeros 2.3.0
OS / ENVIRONMENT

Mikrotik ROS 7.5 (stable)

@felixfontein
Copy link
Collaborator

I created #121 for this. I saw some more missing fields in interface ethernet. About hw-offload: that doesn't seem to exist on my router, maybe it needs ROS7 or a better model. In any case I also added it so that folks who have it can use it.

@felixfontein felixfontein added the enhancement New feature or request label Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants