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

Fix(dhcp_configuration) Per dhcp client registration setting not working #606

Closed

Conversation

kmueller68
Copy link

Change Summary

This fixes the behaviour that the dhcp bootfile-name option is now also rendered on a per client basis instead of only global.
Futher it aligns to the AVD documentation now.

Related Issue(s)

Fixes #605

Component(s) name

arista.cvp.dhcp_configuration

Proposed changes

dhcp.conf.j2 is adjusted:
old:
option bootfile-name "{{ ztp.default.registration }}";

new:

{%     if client.registration is defined %}
    option bootfile-name "{{ client.registration }}";
{%     elif ztp.default.registration is defined %}
    option bootfile-name "{{ ztp.default.registration }}";
{%     endif %}

How to test

Use the key registrationper dhcp client:

---
ztp:
  default:
    registration: 'http://10.0.110.12/ztp/bootstrap'
    nameservers:
      - '10.0.0.21'
  general:
    subnets:
      - network: 10.0.110.0
        netmask: 255.255.255.0
        gateway: 10.0.110.1
        nameservers:
          - '10.0.0.21'
        start: 10.0.110.240
        end: 10.0.110.254
        lease_time: 300
    - name: KHM-SW-SPINE-101
      mac: '50:DE:01:02:00:00'
      ip4: 10.0.110.10
      registration: 'http://10.0.110.17/ztp/bootstrap'
      gateway: 10.0.110.1

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. (check the box if not applicable)
  • I have updated molecule CI testing accordingly. (check the box if not applicable)

@github-actions github-actions bot requested a review from sugetha24 April 5, 2023 06:51
@github-actions github-actions bot added the role: ztp_configuration Issue related to ztp_configuration role label Apr 5, 2023
@github-actions
Copy link

github-actions bot commented Jul 5, 2023

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 15 days

@github-actions github-actions bot added the state: stale Staled issues waiting for closure label Jul 5, 2023
@github-actions github-actions bot closed this Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
role: ztp_configuration Issue related to ztp_configuration role state: stale Staled issues waiting for closure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug(dhcp_configuration): registration key is not rendered if set per client
1 participant