You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def create(name, type, view, ttl, comment=None, **kwargs):
if type == 'SRV':
labels = name.split('.')
if len(labels) < 2 or not labels[0].startswith('_') or not labels[1].startswith('_'):
raise InvalidParameterError('SRV records must start with two _ labels service and proto')
kwargs = RR.validate_args(type, **kwargs)
rr = RR(name=name, type=type, view=view, ttl=ttl, comment=comment)
for field in list(kwargs.keys()):
if field == 'ip':
rr.ipblock = kwargs['ip']
elif field in RRType.target_fields:
rr.target = make_fqdn(kwargs[field], view.zone.name)
rr.value = RR.get_class(type).value_from_fields(**kwargs)
return rr
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: