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

[BUG]: Can not set Port speed via ansible using sonic_interfaces module #467

Closed
TafkaMax opened this issue Oct 11, 2024 · 1 comment
Closed

Comments

@TafkaMax
Copy link
Contributor

TafkaMax commented Oct 11, 2024

Bug Description

I wish to set the speed of the interfaces via the interfaces module: the https://docs.ansible.com/ansible/latest/collections/dellemc/enterprise_sonic/sonic_interfaces_module.html#ansible-collections-dellemc-enterprise-sonic-sonic-interfaces-module

But my ansible is returning this error.

FAILED! => {"changed": false, "msg": "Unable to configure speed in port group member. Please use port group module to change the speed"}

You can set the speed via CLI - so it should be supported.

Example from CLI:

#output from show interface status
Ethernet11          -                             down           admin-down     off       10000          9100           Eth1/12
switch# configure terminal
switch(config)# interface Ethernet 11
switch(config-if-Ethernet11)# speed 1000
switch(config-if-Ethernet11)# end
switch# show interface status
Ethernet11          -                             down           admin-down     off       1000           9100           Eth1/12

Product Name

Dell Enterprise Sonic

Component or Module Name

httpapi

DellEMC Enterprise SONiC Ansible Collection Version

main branch from commit 26157a2

SONiC Software Version

Software Version : 4.4.0-Enterprise_Standard

Configuration

CONFIG_FILE() = /home/tansper/ansible/ansible.cfg
DEFAULT_HOST_LIST(/home/tansper/ansible/ansible.cfg) = ['/home/tansper/ansible/hosts']
DEFAULT_LOOKUP_PLUGIN_PATH(/home/tansper/ansible/ansible.cfg) = ['/home/tansper/ansible/plugins/lookup']
DEFAULT_VAULT_PASSWORD_FILE(/home/tansper/ansible/ansible.cfg) = /home/tansper/ansible/scripts/vault_password.sh
EDITOR(env: EDITOR) = vim
HOST_KEY_CHECKING(/home/tansper/ansible/ansible.cfg) = False
PAGER(env: PAGER) = less

Steps to Reproduce

Do this on a 10GB port for example.

- name: Configure interfaces
  sonic_interfaces:
    config:
      - name: Ethernet1
        speed: SPEED_1GB
    state: merged

Expected Behavior

You can set the speed of the interface via the API.

Actual Behavior

It shows an error to use the port_group API

Logs

FAILED! => {"changed": false, "msg": "Unable to configure speed in port group member. Please use port group module to change the speed"}

Screenshots

No response

Additional Information

No response

@TafkaMax
Copy link
Contributor Author

The change in #470 worked. Thank you for the quick response!

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

1 participant