Actions
Bug #17082
closedNew host form network tab validations are broken
Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Host creation
Target version:
-
Description
With Foreman 1.13, it looks like I can create invalid hosts with:
A) two same MAC addresses
B) empty or same NIC identifiers
When I try to Edit Host and Submit it without any change, now validations trigger correctly. Looks like we need to execute those validations for new hosts as well as existing hosts. In the NIC codebase we have this remark:
# we can't use standard unique validation on interface since we can't properly handle :scope => :host_id # for new hosts host_id does not exist at that moment, validation would work only for persisted records
Therefore it looks like this kind of validation (for new hosts) was done in JavaScript and there was a regression there.
Actions