Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/cloud_discovery/models/source_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,14 @@ def to_dict(self) -> Dict[str, Any]:
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* Fields in `self.additional_properties` are added to the output dict.
"""
excluded_fields: Set[str] = set([
"account_schedule_id",
"created_at",
"deleted_at",
"id",
"updated_at",
"additional_properties",
])
Expand Down
4 changes: 2 additions & 2 deletions src/ipam/docs/DHCPConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ Name | Type | Description | Notes
**filters** | **List[str]** | The resource identifier. | [optional]
**filters_large_selection** | **List[str]** | The resource identifier. | [optional]
**filters_v6** | **List[str]** | The resource identifier. | [optional]
**hold_reclaimed_time** | **int** | The hold reclaimed time in seconds for IPv4 clients. | [optional] [default to 3600]
**hold_reclaimed_time_v6** | **int** | The hold reclaimed time in seconds for IPv6 clients. | [optional] [default to 3600]
**hold_reclaimed_time** | **int** | The hold reclaimed time in seconds for IPv4 clients. | [optional] [readonly]
**hold_reclaimed_time_v6** | **int** | The hold reclaimed time in seconds for IPv6 clients. | [optional] [readonly]
**ignore_client_uid** | **bool** | Enable to ignore the client UID when issuing a DHCP lease. Use this option to prevent assigning two IP addresses for a client which does not have a UID during one phase of PXE boot but acquires one for the other phase. | [optional] [default to False]
**ignore_list** | [**List[IgnoreItem]**](IgnoreItem.md) | The list of clients to ignore requests from. | [optional]
**lease_time** | **int** | The lease duration in seconds. | [optional] [default to 3600]
Expand Down
14 changes: 8 additions & 6 deletions src/ipam/models/dhcp_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ class DHCPConfig(BaseModel):
filters_v6: Optional[List[StrictStr]] = Field(
default=None, description="The resource identifier.")
hold_reclaimed_time: Optional[StrictInt] = Field(
default=3600,
default=None,
description="The hold reclaimed time in seconds for IPv4 clients.")
hold_reclaimed_time_v6: Optional[StrictInt] = Field(
default=3600,
default=None,
description="The hold reclaimed time in seconds for IPv6 clients.")
ignore_client_uid: Optional[StrictBool] = Field(
default=False,
Expand Down Expand Up @@ -113,9 +113,13 @@ def to_dict(self) -> Dict[str, Any]:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* Fields in `self.additional_properties` are added to the output dict.
"""
excluded_fields: Set[str] = set([
"hold_reclaimed_time",
"hold_reclaimed_time_v6",
"additional_properties",
])

Expand Down Expand Up @@ -173,11 +177,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"filters_v6":
obj.get("filters_v6"),
"hold_reclaimed_time":
obj.get("hold_reclaimed_time")
if obj.get("hold_reclaimed_time") is not None else 3600,
obj.get("hold_reclaimed_time"),
"hold_reclaimed_time_v6":
obj.get("hold_reclaimed_time_v6")
if obj.get("hold_reclaimed_time_v6") is not None else 3600,
obj.get("hold_reclaimed_time_v6"),
"ignore_client_uid":
obj.get("ignore_client_uid")
if obj.get("ignore_client_uid") is not None else False,
Expand Down
Loading