rz = nsc.add_zone(reverse_for=rev)
rz[""].NS(['ns1.example.org', 'ns2.example.org'])
-nsc.add_zone('example.net', secondary_for='10.42.0.1')
+nsc.add_zone('example.net', follow_primary='10.42.0.1')
import example.example_org
def add_zone(self,
name: Optional[str] = None,
reverse_for: str | IPNetwork | None = None,
- secondary_for: str | IPAddress | None = None,
+ follow_primary: str | IPAddress | None = None,
inherit_config: Optional[NscZoneConfig] = None,
**kwargs) -> Zone:
if inherit_config is None:
assert name not in self.zones
z: NscZone
- if secondary_for is None:
+ if follow_primary is None:
z = NscZonePrimary(self, name, reverse_for=reverse_for, inherit_config=inherit_config, **kwargs)
else:
- if isinstance(secondary_for, str):
- secondary_for = ip_address(secondary_for)
- z = NscZoneSecondary(self, name, reverse_for=reverse_for, primary_server=secondary_for, inherit_config=inherit_config, **kwargs)
+ 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)
self.zones[name] = z
return z