DNS classless in-arpa.addr delegations are defined in RFC2317 [0].
Per the RFC, the zone name usually contains the '/' character in the zone name, example:
* 0/29.1.168.192.in-addr.arpa. (delegation for 192.168.1.0/29)
* 0/25.0.1.10.in-addr.arpa. (delegation for 10.1.0.0/25)
In Designate, when trying to create a zone with such a name, it is reported as invalid:
$ openstack zone create [..] 0/29.57.15.185.in-addr.arpa.
Provided object is not valid. Got a ValueError error with message Domain 0/29.57.15.185.in-addr.arpa. is not match
This error backtrace is:
ERROR designate.objects.adapters.base Traceback (most recent call last):
ERROR designate.objects.adapters.base File "/usr/lib/python3/dist-packages/designate/objects/adapters/base.py", line 188, in parse
ERROR designate.objects.adapters.base values, output_object, *args, **kwargs)
ERROR designate.objects.adapters.base File "/usr/lib/python3/dist-packages/designate/objects/adapters/api_v2/zone.py", line 88, in _parse_object
ERROR designate.objects.adapters.base values, object, *args, **kwargs)
ERROR designate.objects.adapters.base File "/usr/lib/python3/dist-packages/designate/objects/adapters/base.py", line 295, in _parse_object
ERROR designate.objects.adapters.base setattr(output_object, obj_key, value)
ERROR designate.objects.adapters.base File "/usr/lib/python3/dist-packages/designate/objects/base.py", line 144, in __setattr__
ERROR designate.objects.adapters.base super(DesignateObject, self).__setattr__(name, value)
ERROR designate.objects.adapters.base File "/usr/lib/python3/dist-packages/designate/objects/base.py", line 498, in setter
ERROR designate.objects.adapters.base field_value = field.coerce(self, name, value)
ERROR designate.objects.adapters.base File "/usr/lib/python3/dist-packages/designate/objects/fields.py", line 205, in coerce
ERROR designate.objects.adapters.base raise ValueError("Domain %s is not match" % value)
ERROR designate.objects.adapters.base ValueError: Domain 0/29.57.15.185.in-addr.arpa. is not match
Basically, the input seems to don't match this regex [1]:
RE_ZONENAME = r'^(?!.{255,})(?:(?!\-)[A-Za-z0-9_\-]{1,63}(?<!\-)\.)+\Z'
The fix should be to allow the '/' character in the zone name, as recommended in the RFC.
[0] https://tools.ietf.org/html/rfc2317
[1] https://opendev.org/openstack/designate/src/branch/master/designate/objects/fields.py#L95
We should update the docs to say that we should replace the `/` in the examples with something like `-` for designate as we will reject a zone with `/`