Skip to content

Commit 5715578

Browse files
committed
Revert "add options-data to kea in global reservations"
This reverts commit 1310e62. We cannot use option 234, because the flex_option expression only has access to the DHCPDISCOVER, not reservations.
1 parent 1310e62 commit 5715578

1 file changed

Lines changed: 16 additions & 14 deletions

File tree

  • python/ironic-understack/ironic_understack/dhcp

python/ironic-understack/ironic_understack/dhcp/kea.py

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -90,26 +90,28 @@ def _update_host_reservation(self, hw_address, boot_file_prefix=None, remove=Fal
9090
found = False
9191
for reservation in reservations:
9292
if reservation.get("hw-address") == hw_address:
93-
reservation["option-data"] = [
94-
{
95-
"name": "boot-file-base",
96-
"data": boot_file_prefix,
97-
"always-send": True,
98-
}
99-
]
93+
# reservation["option-data"] = [
94+
# {
95+
# "name": "boot-file-base",
96+
# "data": boot_file_prefix,
97+
# "always-send": True,
98+
# }
99+
# ]
100+
reservation["client-classes"] = ["BOOTSRV_A"]
100101
found = True
101102
break
102103
if not found:
103104
reservations.append(
104105
{
105106
"hw-address": hw_address,
106-
"option-data": [
107-
{
108-
"name": "boot-file-base",
109-
"data": boot_file_prefix,
110-
"always-send": True,
111-
},
112-
],
107+
# "option-data": [
108+
# {
109+
# "name": "boot-file-base",
110+
# "data": boot_file_prefix,
111+
# "always-send": True,
112+
# },
113+
# ],
114+
"client-classes": ["BOOTSRV_A"],
113115
}
114116
)
115117
dhcp4_config["reservations"] = reservations

0 commit comments

Comments
 (0)