Add neutron dns_assignments schema

Add a workaround for having a correct dns_assignment schema.

Change-Id: I2a21a3179a47c2eaaa4fb676c90f66f9c9e8ae71
This commit is contained in:
Artem Goncharov 2024-07-08 12:49:50 +02:00
parent fdf8bda6be
commit 7eecc0e895
No known key found for this signature in database
GPG Key ID: 334C245686980408

@ -898,6 +898,28 @@ class NeutronGenerator(OpenStackServerSourceBase):
)
elif field == "binding:vif_details":
js_schema.update({"type": "object"})
elif resource_key == "port" and field == "dns_assignment":
js_schema.update(
{
"type": "array",
"items": {
"type": "object",
"properties": {
"fqdn": {
"type": "string",
"format": "hostname",
},
"hostname": {
"type": "string",
"format": "hostname",
},
"ip_address": {
"type": "string",
},
},
},
}
)
if data.get(f"allow_{method.lower()}", False):
send_props[field] = js_schema
if data.get("is_visible", False):