rz = nsc.add_zone(reverse_for=rev)
rz.root.NS('ns1.example.org', 'ns2.example.org')
-nsc.add_zone('example.net', follow_primary='10.42.0.1')
+nsc.add_zone('example.net', secondary_to='10.42.0.1')
rz = nsc.add_zone(reverse_for='10.3.0.0/16')
rz.delegate_classless('10.3.16.0/20').NS('ns1.example.org')
*,
reverse_for: str | IPNetwork | None = None,
alias_for: Optional[NscZonePrimary] = None,
- follow_primary: str | IPAddress | None = None,
+ secondary_to: str | IPAddress | None = None,
inherit_config: Optional[NscZoneConfig] = None,
**kwargs) -> Zone:
if inherit_config is None:
z: NscZone
if alias_for is not None:
- assert follow_primary is None
+ assert secondary_to is None
z = NscZoneAlias(self, name, reverse_for=reverse_for, alias_for=alias_for, inherit_config=inherit_config, **kwargs)
- elif follow_primary is None:
+ elif secondary_to is None:
z = NscZonePrimary(self, name, reverse_for=reverse_for, inherit_config=inherit_config, **kwargs)
else:
- if isinstance(follow_primary, str):
- follow_primary = ip_address(follow_primary)
- z = NscZoneSecondary(self, name, reverse_for=reverse_for, primary_server=follow_primary, inherit_config=inherit_config, **kwargs)
+ if isinstance(secondary_to, str):
+ secondary_to = ip_address(secondary_to)
+ z = NscZoneSecondary(self, name, reverse_for=reverse_for, primary_server=secondary_to, inherit_config=inherit_config, **kwargs)
self.zones[name] = z
return z