Skip to content

[dhcp_server] match mode core logic in dhcp-server - #30361

Open
nishant111 wants to merge 9 commits into
sonic-net:masterfrom
nishant111:nishant/dhcp-server-match-mode-phase3-core-stacked
Open

nishant111 wants to merge 9 commits into
sonic-net:masterfrom
nishant111:nishant/dhcp-server-match-mode-phase3-core-stacked

Conversation

@nishant111

@nishant111 nishant111 commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Why I did it

This is Phase 3 of DHCP server MATCH mode, following the HLD. It makes the DHCP server actually use the MATCH configuration added by the earlier phases.

This PR lets a VLAN run in MATCH mode. Address pools are picked by composable match conditions: the client's port (Option 82 circuit-id) and/or its vendor class (Option 60). PORT mode keeps working as before.

Test plan: sonic-net/sonic-mgmt#28933

Work item tracking
  • Microsoft ADO (number only):37184085

How I did it

YANG / docs

  • sonic-dhcp-server-ipv4.yang: the mode leaf now accepts MATCH.
  • YANG tests updated to match.
  • Removed the "not consumed yet" note from Configuration.md.

Config generation (dhcp_cfggen.py)

  • Each MATCH entry becomes a Kea client-class test.
    • circuit_id is matched against the relay agent's Option 82 sub-option 1.
    • option60 is matched as option[60].hex.
    • Values are byte-exact. Values that are ambiguous or longer than 255 bytes are rejected.
  • Each binding becomes a client class plus pool(s) inside the VLAN subnet that contains them.
    • A binding with several matches ANDs them together.
    • When two bindings can match the same client, the more specific class excludes that client from the more general one. For example, port + vendor wins over port only.
  • Conflicts that would make Kea behaviour ambiguous fail the whole generation with ValueError:
    • a binding with both ips and ranges;
    • duplicate matches or pools;
    • overlapping pools across bindings;
    • a pool that fits more than one distinct VLAN prefix.
  • Problems that only affect one binding make generation skip that binding with a syslog warning. Generation continues. These are:
    • a missing match;
    • a missing range;
    • a port that is not in the VLAN;
    • a pool outside the VLAN subnet.

dhcpservd / DB monitor

  • New event checkers subscribe to the match and binding tables:
    • DhcpMatchTableEventChecker watches matches in use;
    • DhcpBindingTableEventChecker watches bindings on enabled MATCH interfaces.
  • dhcpservd writes a candidate config, validates it with kea-dhcp4 -t, and only then activates it with an atomic rename.

CLI (dhcp_server.py)

  • binding add/update now runs the same cross-binding validation the generator uses, so a bad config is rejected before it is written to Config DB. This includes:
    • overlapping pools;
    • ambiguous subnet membership;
    • surviving pools after a VLAN prefix shrinks.
  • binding update replaces the entry with DEL + HSET in a single Redis MULTI/EXEC via swsscommon.RedisTransactioner. With separate writes, dhcpservd could briefly generate a config without the binding.

How to verify it

  • Unit tests:
    • dockers/docker-dhcp-server/cli-plugin-tests: 399 passed.
    • src/sonic-dhcp-utilities/tests: 437 passed. This includes the new test_dhcp_match_cfggen.py.

Which release branch to backport (provide reason below if selected)

  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511
  • 202512
  • 202605
  • 202608

Tracking issue/work item for backport/cherry-pick request (GitHub issue or Microsoft ADO):
Failure type:

Tested branch

  • master
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511
  • 202512
  • 202605
  • 202608
  • N/A

Test result

master, head  9031ac764 :
• Unit tests: CLI 402 passed; dhcp-utilities 437 passed
• End-to-end (KVM vms-kvm-t0, image patched to  0b7d65fe5 ): automated tests are sonic-net/sonic-mgmt#29054; the test plan is #28933.
• F: 34 passed, 1 skipped (F14, not applicable with the SONiC relay), 1 failed. The failure was F01 related to ISC relay restart, F01 passed 2/2 on rerun.
• C 36/36, V 11/11, L 16/16, M 4/4, S 4/4.
• On the switch,  redis-cli monitor  confirmed  binding update  sends  MULTI / DEL / HSET / EXEC .
•  9031ac764  on the same testbed: the overlapping force-delete/recreate scenario is rejected (exit 2, no range written), and a valid recreate is applied with Kea running

Description for the changelog

[dhcp_server] Add MATCH mode to dhcpservd: compile DHCP_SERVER_IPV4_MATCH/BINDING into Kea client classes and pools (Option 82 circuit-id / Option 60), with validated, atomic config activation.

Link to config_db schema for YANG module changes

https://github.com/sonic-net/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md#dhcp_server_ipv4

A picture of a cute animal (not mandatory but encouraged)

Copilot AI balanced review requested due to automatic review settings October 26, 2026 05:58
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@nishant111 nishant111 changed the title [dhcpserver match mode phase3 core stacked [dhcp_server] match mode core logic in kea and dhcp Oct 26, 2026
@nishant111
nishant111 marked this pull request as draft October 26, 2026 05:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Unresolved validation and mapping issues can leave accepted changes unapplied, keep deleted pools serving, or prevent DHCP startup.

5 open issues
What changed in this PR

Adds match-based DHCPv4 address assignment across SONiC’s configuration model, CLI, and Kea configuration generator, alongside lease-clearing support.

Changes:

  • Adds circuit-ID and vendor-class conditions, pool bindings, validation, and configuration/show commands.
  • Generates specificity-based Kea client classes and validates candidate configurations before replacing the live file.
  • Adds scoped lease clearing, recovery monitoring, documentation, and regression tests.
File Description
src/​sonic-yang-models/​yang-models/​sonic-dhcp-server-ipv4.yang Defines MATCH mode, conditions, bindings, and constraints.
src/​sonic-yang-models/​tests/​yang_model_tests/​tests/​dhcp_server_ipv4_match.json Defines schema validation cases.
src/​sonic-yang-models/​tests/​yang_model_tests/​tests_config/​dhcp_server_ipv4_match.json Supplies schema test configurations.
src/​sonic-yang-models/​tests/​yang_model_pytests/​test_dhcp_server_ipv4_match.py Tests key whitespace and circuit-ID ambiguity.
src/​sonic-yang-models/​doc/​Configuration.md Documents match tables and binding precedence.
src/​sonic-yang-mgmt/​tests/​libyang-python-tests/​test_sonic_yang.py Tests translation recovery and key preservation.
src/​sonic-yang-mgmt/​sonic_yang_ext.py Preserves DHCP keys and resets traversal state after failures.
src/​sonic-dhcp-utilities/​tests/​test_smart_switch.py Updates smart-switch generation expectations.
src/​sonic-dhcp-utilities/​tests/​test_dhcpservd.py Tests candidate validation and recovery behavior.
src/​sonic-dhcp-utilities/​tests/​test_dhcp_match_cfggen.py Tests match compilation, precedence, and pool validation.
src/​sonic-dhcp-utilities/​tests/​test_dhcp_db_monitor.py Tests match/binding events and recovery monitoring.
src/​sonic-dhcp-utilities/​tests/​test_dhcp_cfggen.py Updates generator results and hook expectations.
src/​sonic-dhcp-utilities/​tests/​test_data/​kea-dhcp4.conf.j2 Adds the lease-command hook to the test template.
src/​sonic-dhcp-utilities/​dhcp_utilities/​dhcpservd/​dhcpservd.py Validates candidate files and tracks recovery subscriptions.
src/​sonic-dhcp-utilities/​dhcp_utilities/​dhcpservd/​dhcp_cfggen.py Compiles MATCH bindings into Kea pools and classes.
src/​sonic-dhcp-utilities/​dhcp_utilities/​common/​dhcp_db_monitor.py Monitors match/binding changes and recovery events.
dockers/​docker-dhcp-server/​kea-dhcp4.conf.j2 Enables Kea lease commands.
dockers/​docker-dhcp-server/​cli/​show/​plugins/​show_dhcp_server.py Displays match conditions and bindings.
dockers/​docker-dhcp-server/​cli/​config/​plugins/​dhcp_server.py Adds MATCH configuration commands and validation.
dockers/​docker-dhcp-server/​cli/​clear/​plugins/​clear_dhcp_server.py Clears scoped leases and waits for State DB synchronization.
dockers/​docker-dhcp-server/​cli-plugin-tests/​test_show_dhcp_server_match.py Tests filtered and literal-name display commands.
dockers/​docker-dhcp-server/​cli-plugin-tests/​test_config_dhcp_server.py Adjusts interface deletion coverage for new fixtures.
dockers/​docker-dhcp-server/​cli-plugin-tests/​test_config_dhcp_server_match.py Tests match/binding commands and validation.
dockers/​docker-dhcp-server/​cli-plugin-tests/​test_clear_dhcp_server.py Tests lease-clearing scope, synchronization, and failures.
dockers/​docker-dhcp-server/​cli-plugin-tests/​mock_config_db.json Adds port aliases, conditions, and binding fixtures.

Review effort: Balanced

@nishant111
nishant111 force-pushed the nishant/dhcp-server-match-mode-phase3-core-stacked branch from f036cb3 to 3283ba3 Compare October 26, 2026 23:27
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@nishant111 nishant111 changed the title [dhcp_server] match mode core logic in kea and dhcp [dhcp_server] match mode core logic in dhcp-server Oct 27, 2026
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@nishant111
nishant111 force-pushed the nishant/dhcp-server-match-mode-phase3-core-stacked branch from 742239d to b4ed7d7 Compare October 28, 2026 03:45
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@nishant111
nishant111 marked this pull request as ready for review October 28, 2026 23:33
Copilot AI balanced review requested due to automatic review settings October 28, 2026 23:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot AI balanced review requested due to automatic review settings October 30, 2026 05:23
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@StormLiangMS

Copy link
Copy Markdown
Contributor

@nishant111 Thanks for the updates. Re-reviewed head 0b7d65fe55600f77bc9d8fcb76ef0f597d5f6948: both concerns in my earlier comment are addressed. CLI/generator validation now agrees on distinct VLAN prefixes, and binding replacement uses a single Redis MULTI/EXEC transaction.

One additional P2 remains before merge: recreating a referenced range bypasses cross-binding validation.

dhcp_server_ipv4_range_add writes the range directly, unlike range update, which calls validate_range_update. Force-deleting a range intentionally leaves bindings referencing its name, so adding that name again can reactivate an invalid pool configuration.

Reproduced with a MATCH-enabled Vlan1000 on 192.0.2.0/24:

  1. A specific port + VendorA binding uses r1 = 192.0.2.21-192.0.2.22; a general port-only fallback binding uses 192.0.2.100,192.0.2.101.
  2. range update r1 192.0.2.100 192.0.2.102 correctly rejects the partial pool overlap.
  3. range del r1 --force followed by range add r1 192.0.2.100 192.0.2.102 succeeds instead.
  4. The generator then raises a partial-overlap error. A running daemon retains its last-known-good configuration, but restarting with this Config DB state fails initial generation/startup.

Please apply the same prospective-range/cross-binding validation before adding a range referenced by existing bindings, and add regression coverage for force-delete/recreate, including rejection without writing the invalid range.

Please also update the test evidence to identify the exact tested head and include results/logs for the follow-up fixes and this regression. The description still names c78343ce3 and points to sonic-net/sonic-mgmt#28933 as the executable suite; #28933 is the test plan, while sonic-net/sonic-mgmt#29054 contains the automated tests. At this check, DCO/CLA pass, but Azure build 1284728 is still in progress.

Copilot AI balanced review requested due to automatic review settings November 24, 2026 02:09
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Human assessment is needed because suppressed fatal validation errors can make DHCP changes report success while leaving the previous configuration active.

No open issues 🎉

Review effort: Balanced

@nishant111

Copy link
Copy Markdown
Contributor Author

/azpw ms_conflict

1 similar comment
@nishant111

Copy link
Copy Markdown
Contributor Author

/azpw ms_conflict

Copy link
Copy Markdown
Contributor Author

/azp run Azure.sonic-buildimage

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

A forced range delete leaves bindings referencing the range name, so
re-adding that name could reintroduce a pool configuration the generator
rejects (partial overlap or off-subnet). Validate range add against
existing references like range update, before any Config DB write.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Nishant Sharma <nshntsharma86@gmail.com>
@nishant111
nishant111 force-pushed the nishant/dhcp-server-match-mode-phase3-core-stacked branch from 9031ac7 to 412a5dc Compare November 24, 2026 22:38
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

StormLiangMS pushed a commit to sonic-net/sonic-mgmt that referenced this pull request Nov 26, 2026
<!--
Please make sure you've read and understood our contributing guidelines;
https://github.com/sonic-net/SONiC/blob/gh-pages/CONTRIBUTING.md

Please provide following information to help code review process a bit
easier:
-->
### Description of PR
<!--
- Please include a summary of the change and which issue is fixed.
- Please also include relevant motivation and context. Where should
reviewer start? background context?
- List any dependencies that are required for this change.
-->

Summary:
Add a test plan for IPv4 DHCP server MATCH mode, covering Circuit ID
(Option 82) and Vendor Class Identifier (Option 60) matching.

The plan defines 43 scenarios covering address assignment, AND/OR
matching, specificity and exhaustion, runtime configuration changes, CLI
validation, lease clearing, persistence, PORT/MATCH coexistence, and
scale.

This PR contains documentation only; automated tests will follow
separately.

Related design and implementation:
- HLD: sonic-net/SONiC#2535
- YANG model: sonic-net/sonic-buildimage#29925
- CLI: sonic-net/sonic-buildimage#30159
- Core implementation:
sonic-net/sonic-buildimage#30361

Executing the planned tests requires an image containing the applicable
model, CLI and core implementation changes.

Fixes # (issue): N/A — feature test-plan documentation.
<!--
If you request a backport/cherry-pick below, link the GitHub issue or
ADO work
item here (for example, "Fixes #<issue>" or "ADO: <work item URL>").
-->

### Type of change
Documentation only

<!--
- Fill x for your type of change.
- e.g.
- [x] Bug fix
-->

- [ ] Bug fix
- [ ] Testbed and Framework(new/improvement)
- [ ] New Test case
    - [ ] Skipped for non-supported platforms
- [ ] Test case improvement


### Back port request
<!--
Only check a release or feature branch when the PR links a GitHub issue
or ADO
work item above. The linked tracker should explain the failure in
detail,
including whether it is a day-one issue or a regression, the affected
branch/image/platform/test, and why this branch needs the fix. Backport
or
cherry-pick requests without a linked issue/work item may not be
favored.

If you request a backport/cherry-pick, provide both:
1. A GitHub issue or Microsoft ADO work item tracking the change.
2. Test evidence from the target branch(es) requested below.
-->
- [ ] 202311
- [ ] 202405
- [ ] 202411
- [ ] 202505
- [ ] 202511
- [ ] 202512
- [ ] 202605

Tracking issue/work item for backport/cherry-pick request (GitHub issue
or Microsoft ADO):
Failure type: <!-- day-one issue / regression / other -->

### Tested branch
<!--
Select each branch where the change was tested. If you request a
backport/cherry-pick, select the base branch and the tested target
release
branch(es).
-->
- [ ] master
- [ ] 202311
- [ ] 202405
- [ ] 202411
- [ ] 202505
- [ ] 202511
- [ ] 202512
- [ ] 202605
- [ ] N/A

### Test result
<!--
Provide the tested image version and test evidence for each selected
branch.
For example:
- master: 20260716.01 - <test result or link>
- 202605: 20260531.42 - <test result or link>
-->

### Approach
#### What is the motivation for this PR?
Define end-to-end acceptance and regression coverage for DHCP server
MATCH mode before implementing sonic-mgmt tests. The plan complements
product unit tests by covering real relay behaviour, packaged Kea,
SWSS/State DB synchronization, and lease deletion persistenc

#### How did you do it?
Reviewed the MATCH HLD, product model/CLI/core changes, and existing
DHCP server tests. Organized the coverage into compact scenario tables
with expected results, shared setup guidance, and topology requirements.

#### How did you verify/test it?
<!--
Summarize the overall validation here. For a backport/cherry-pick
request,
provide branch-specific image versions and evidence in the Test result
section.
-->
na

#### Any platform specific information?
na
#### Supported testbed topology if it's a new test case?
na
### Documentation
<!--
(If it's a new feature, new test case)
Did you update documentation/Wiki relevant to your implementation?
Link to the wiki page?
-->
na

---------

Signed-off-by: Nishant Sharma <nshntsharma86@gmail.com>
@nishant111

Copy link
Copy Markdown
Contributor Author

@nishant111 Thanks for the updates. Re-reviewed head 0b7d65fe55600f77bc9d8fcb76ef0f597d5f6948: both concerns in my earlier comment are addressed. CLI/generator validation now agrees on distinct VLAN prefixes, and binding replacement uses a single Redis MULTI/EXEC transaction.

One additional P2 remains before merge: recreating a referenced range bypasses cross-binding validation.

dhcp_server_ipv4_range_add writes the range directly, unlike range update, which calls validate_range_update. Force-deleting a range intentionally leaves bindings referencing its name, so adding that name again can reactivate an invalid pool configuration.

Reproduced with a MATCH-enabled Vlan1000 on 192.0.2.0/24:

  1. A specific port + VendorA binding uses r1 = 192.0.2.21-192.0.2.22; a general port-only fallback binding uses 192.0.2.100,192.0.2.101.
  2. range update r1 192.0.2.100 192.0.2.102 correctly rejects the partial pool overlap.
  3. range del r1 --force followed by range add r1 192.0.2.100 192.0.2.102 succeeds instead.
  4. The generator then raises a partial-overlap error. A running daemon retains its last-known-good configuration, but restarting with this Config DB state fails initial generation/startup.

Please apply the same prospective-range/cross-binding validation before adding a range referenced by existing bindings, and add regression coverage for force-delete/recreate, including rejection without writing the invalid range.

Please also update the test evidence to identify the exact tested head and include results/logs for the follow-up fixes and this regression. The description still names c78343ce3 and points to sonic-net/sonic-mgmt#28933 as the executable suite; #28933 is the test plan, while sonic-net/sonic-mgmt#29054 contains the automated tests. At this check, DCO/CLA pass, but Azure build 1284728 is still in progress.

Addressed this comment, CI is now passing, the one failed is optional and is failing for other PR's as well

@StormLiangMS StormLiangMS left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@nishant111 - Request changes: one reproduced validation mismatch can make a successful match update prevent all subsequent Kea configuration generation and daemon startup. See the inline finding at validate_vlan_bindings().

Reviewed head: 412a5dcab051cef922492e982977483bf2ff2380.

The description covers motivation, implementation, testing, and schema changes. DCO, EasyCLA, builds, and required test checks pass. The optional dualtor-vpp check failed in Prepare Testbed with 'NoneType' object has no attribute 'client'; zero tests ran in that job.

34 existing MATCH generator tests passed in an isolated Windows run with native SONiC adapters stubbed. The focused reproducer additionally confirmed successful CLI persistence, whole-generation failure, last-known-good config retention, and startup exit 1. The full native SONiC suite could not run here because swsscommon is unavailable.

dhcp_cfggen skips a binding whose match is missing or whose circuit ID
port left the VLAN, but fails the whole generation for other binding
errors such as two matches of the same type. The CLI accepted any update
to an already-invalid binding, so retyping a match on a stale binding
could persist a configuration that stops dhcpservd from starting.

Raise StaleBindingError for the conditions dhcp_cfggen skips, and reject
an update that turns a skipped binding into a generation failure.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Nishant Sharma <nshntsharma86@gmail.com>
Copilot AI balanced review requested due to automatic review settings November 27, 2026 05:26
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

5 open issues

Review effort: Lite

Comment on lines +114 to +119
validation = subprocess.run(
[self.kea_dhcp4_binary, "-t", candidate_path],
capture_output=True,
text=True,
timeout=KEA_VALIDATION_TIMEOUT
)
Comment on lines +103 to +105
REDIS_REPLY_INTEGER = 3


for command in (["DEL", key], ["HSET", key] + fields):
redis_command = swsscommon.RedisCommand()
redis_command.format(command)
transaction.enqueue(redis_command, REDIS_REPLY_INTEGER)
Comment on lines +103 to +112
with tempfile.NamedTemporaryFile(
mode="w",
dir=config_dir,
prefix=".{}.".format(os.path.basename(self.kea_dhcp4_config_path)),
delete=False
) as candidate:
candidate_path = candidate.name
candidate.write(kea_dhcp4_config)
candidate.flush()
os.fsync(candidate.fileno())
self._enable_recovery_checkers()
return False

os.replace(candidate_path, self.kea_dhcp4_config_path)
dhcp_cfggen skips a binding while its circuit ID port is outside the VLAN
and restores it when the port is re-added. The CLI ignored such bindings
entirely, so a new binding or range update could partially overlap a
skipped binding's pool; re-adding the port then failed generation and
stopped dhcpservd from starting.

Keep the pools of skipped bindings in the CLI pool overlap and prefix
checks, while still excluding them from the predicate checks.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Nishant Sharma <nshntsharma86@gmail.com>
Copilot AI balanced review requested due to automatic review settings November 27, 2026 05:49
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

return intervals


def get_match_entry(dbconn, match_name, match_overrides=None):
Comment on lines +191 to +192
if not entry.get("value") or len(entry["value"].encode("utf-8")) > 255:
click.get_current_context().fail("Match {} has an invalid value or exceeds 255 UTF-8 bytes".format(match_name))


def validate_ip_pool(ips, subnets, dhcp_interface):
REDIS_REPLY_INTEGER = 3
)
dhcpservd.enabled_checker = enabled_checker
assert dhcpservd.dump_dhcp4_config()
# Verfiy whether generate() func of dhcp_cfggen is called
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

Successfully merging this pull request may close these issues.

4 participants