Skip to content

Update Reclaimed Time for DHCP Config as ReadOnly Fields#47

Merged
unasra merged 1 commit into
infobloxopen:mainfrom
AnilGadiyarHJ:dhcpconf_revert
Jul 16, 2026
Merged

Update Reclaimed Time for DHCP Config as ReadOnly Fields#47
unasra merged 1 commit into
infobloxopen:mainfrom
AnilGadiyarHJ:dhcpconf_revert

Conversation

@AnilGadiyarHJ

@AnilGadiyarHJ AnilGadiyarHJ commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Marks the reclaimed_time field on the DHCPConfig model as read-only to correctly reflect the upstream IPAM API contract, where this field is server-populated and must not be set by the client.

Type of Change

  • 🆕 New API / Model
  • 🔧 Update Existing Schema or Model
  • 🐛 Bug Fix
  • 📝 Documentation
  • 🧹 Maintenance (dependency upgrades, CI, refactoring)

Affected Packages

  • anycast
  • cloud_discovery
  • dfp
  • dns_config
  • dns_data
  • dtc
  • fw
  • infra_mgmt
  • infra_provision
  • ipam
  • ipam_federation
  • keys
  • redirect
  • upgrade_policy
  • universal_ddi_client

Resource / Model: DHCPConfig
Description: Changed reclaimed_time on DHCPConfig to a read-only field to match the IPAM API schema.

Schema Changes

  • New model added
  • New field(s) added to existing model
  • Field(s) removed or renamed
  • Required fields changed
Detailed Changes (click to expand)
File Change
src/ipam/models/dhcp_config.py Annotated reclaimed_time as read-only; removed it from the writable field set
src/ipam/docs/DHCPConfig.md Updated field documentation to mark reclaimed_time as read-only

Ticket / Issue

Fixes #

Changelog Inclusion

  • Consider for changelog and release notes addition

Additional Context

The reclaimed_time field is populated by the IPAM server to record when an address was last reclaimed; it is not a client-settable value. Marking it read-only prevents accidental writes and aligns the Python client with the API's actual behaviour.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the IPAM DHCPConfig model serialization/docs to treat the “hold reclaimed time” fields as non-writable (excluded from to_dict()), and adjusts their defaulting behavior.

Changes:

  • Changes hold_reclaimed_time / hold_reclaimed_time_v6 defaults from 3600 to None and removes the from_dict() fallback to 3600.
  • Excludes hold_reclaimed_time / hold_reclaimed_time_v6 from DHCPConfig.to_dict() output (effectively making them client-non-writable).
  • Updates DHCPConfig markdown docs to mark these fields as [readonly].

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/ipam/models/dhcp_config.py Removes defaulting for hold_reclaimed_time* and excludes them from to_dict() output.
src/ipam/docs/DHCPConfig.md Marks hold_reclaimed_time* as read-only in the published model docs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/ipam/models/dhcp_config.py
Comment thread src/ipam/docs/DHCPConfig.md
Comment thread src/ipam/models/dhcp_config.py
@unasra
unasra merged commit 473820a into infobloxopen:main Jul 16, 2026
5 checks passed
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.

3 participants