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

Feat(eos_cli_config_gen): Add support for configuring dhcp server ipv4 and dhcp server ipv6 for Port-Channel interfaces #4885

Merged
merged 5 commits into from
Jan 20, 2025

Conversation

Shivani-gslab
Copy link
Contributor

@Shivani-gslab Shivani-gslab commented Jan 16, 2025

Change Summary

Add support for configuring dhcp server ipv4 and dhcp server ipv6 for Port-Channel interfaces

Related Issue(s)

Fixes #4875

Component(s) name

arista.avd.eos_cli_config_gen

Proposed changes

Adding new key dhcp_server_ipv4 under port-channel-interfaces.

port_channel_interfaces:
     - dhcp_server_ipv4: <bool>

How to test

Test added in molecule, verify the EOS CLI

Checklist

User Checklist

  • N/A

Repository Checklist

  • My code has been rebased from devel before I start
  • I have read the CONTRIBUTING document.
  • My change requires a change to the documentation and documentation have been updated accordingly.
  • I have updated molecule CI testing accordingly. (check the box if not applicable)

Copy link

Review docs on Read the Docs

To test this pull request:

# Create virtual environment for this testing below the current directory
python -m venv test-avd-pr-4885
# Activate the virtual environment
source test-avd-pr-4885/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/Shivani-gslab/avd.git@dhcp_server_ipv4_#4875#subdirectory=python-avd" --force
# Point Ansible collections path to the Python virtual environment
export ANSIBLE_COLLECTIONS_PATH=$VIRTUAL_ENV/ansible_collections
# Install Ansible collection
ansible-galaxy collection install git+https://github.com/Shivani-gslab/avd.git#/ansible_collections/arista/avd/,dhcp_server_ipv4_#4875 --force
# Optional: Install AVD examples
cd test-avd-pr-4885
ansible-playbook arista.avd.install_examples

@github-actions github-actions bot added role: eos_cli_config_gen issue related to eos_cli_config_gen role state: CI Updated CI scenario have been updated in the PR state: Documentation role Updated labels Jan 16, 2025
@laxmikantchintakindi
Copy link
Contributor

Need to correct PR title and also I think it would be better to add dhcp_server_ipv6 also.

@Shivani-gslab Shivani-gslab changed the title Feat(eos_cli_config_gen): Add support for configuring for a Port-Channel interface Feat(eos_cli_config_gen): Add support for configuring dhcp sever ipv4 for a Port-Channel interface Jan 16, 2025
@Shivani-gslab Shivani-gslab changed the title Feat(eos_cli_config_gen): Add support for configuring dhcp sever ipv4 for a Port-Channel interface Feat(eos_cli_config_gen): Add support for configuring dhcp server ipv4 for a Port-Channel interface Jan 16, 2025
@Shivani-gslab Shivani-gslab changed the title Feat(eos_cli_config_gen): Add support for configuring dhcp server ipv4 for a Port-Channel interface Feat(eos_cli_config_gen): Add support for configuring dhcp server ipv4 for Port-Channel interfaces Jan 16, 2025
@gmuloc
Copy link
Contributor

gmuloc commented Jan 17, 2025

@Shivani-gslab - if this merges after #4752 we will need to update the configuration there

@Shivani-gslab
Copy link
Contributor Author

Shivani-gslab commented Jan 17, 2025

@Shivani-gslab - if this merges after #4752 we will need to update the configuration there

@gmuloc shall I add dhcp_server_ipv6 also ? and make this open, we can merge this earlier?

@Shivani-gslab Shivani-gslab marked this pull request as ready for review January 17, 2025 11:52
@Shivani-gslab Shivani-gslab requested review from a team as code owners January 17, 2025 11:52
@Shivani-gslab Shivani-gslab changed the title Feat(eos_cli_config_gen): Add support for configuring dhcp server ipv4 for Port-Channel interfaces Feat(eos_cli_config_gen): Add support for configuring dhcp server ipv4 and dhcp server ipv6 for Port-Channel interfaces Jan 17, 2025
@Shivani-gslab Shivani-gslab marked this pull request as draft January 17, 2025 12:47
@Shivani-gslab Shivani-gslab force-pushed the dhcp_server_ipv4_#4875 branch from eb01803 to 8156912 Compare January 17, 2025 13:27
Copy link
Contributor

@Vibhu-gslab Vibhu-gslab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Vibhu-gslab Vibhu-gslab marked this pull request as ready for review January 17, 2025 14:31
@gmuloc gmuloc merged commit 1d03bf3 into aristanetworks:devel Jan 20, 2025
48 checks passed
{% for ethernet_interface in ethernet_interfaces_dhcp_server | arista.avd.natural_sort %}
| {{ ethernet_interface.name }} | {{ ethernet_interface.dhcp_server_ipv4 | arista.avd.default(false) }} | {{ ethernet_interface.dhcp_server_ipv6 | arista.avd.default(false) }} |
{% endfor %}
{% if ethernet_interfaces_dhcp_server | length > 0 %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This if is not needed. The for loop would just not loop if the list is empty. Same for v6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rn: Feat(eos_cli_config_gen) role: eos_cli_config_gen issue related to eos_cli_config_gen role state: CI Updated CI scenario have been updated in the PR state: Documentation role Updated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support to eos_cli_config_gen for configuring "dhcp server ipv4" for a Port-Channel interface
5 participants