From: Miod Vallat Date: Thu, 10 Jul 2025 19:04:55 +0000 (+0200) Subject: Use singular for views as object name in pdnsutil. X-Git-Tag: rec-5.4.0-alpha0~14^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8399d44647e4ccfe69e3ea782ccbe2ba97f1d998;p=thirdparty%2Fpdns.git Use singular for views as object name in pdnsutil. Signed-off-by: Miod Vallat --- diff --git a/docs/views.rst b/docs/views.rst index 0c50f0ed16..f28ddba880 100644 --- a/docs/views.rst +++ b/docs/views.rst @@ -149,12 +149,12 @@ outcome when resolving domain queries. Let's differentiate these views now:: - pdnsutil views add-zone internal example.com..internal - pdnsutil views add-zone internal example2.com..secret + pdnsutil view add-zone internal example.com..internal + pdnsutil view add-zone internal example2.com..secret - pdnsutil views add-zone trusted example.com..trusted + pdnsutil view add-zone trusted example.com..trusted -Note that the `views add-zone` command does not create any zone! You will need +Note that the `view add-zone` command does not create any zone! You will need to create these zones, like you would do for any other "regular" zone:: pdnsutil zone create example.com..internal @@ -179,13 +179,13 @@ As seen in this example, a given view may cause multiple zones to be resolved differently. At any time, you can check which views are setup, and the details of a given view:: - $ pdnsutil views list-all + $ pdnsutil view list-all internal trusted - $ pdnsutil views list internal + $ pdnsutil view list internal example.com..internal example2.com..secret - $ pdnsutil views list trusted + $ pdnsutil view list trusted example.com..trusted Bind configuration adaptation @@ -218,8 +218,8 @@ The equivalent PowerDNS setup would be:: pdnsutil network set 192.168.23.0/24 trusted pdnsutil network set 0.0.0.0/0 badguys - pdnsutil views add-zone trusted primary.example.com..internal - pdnsutil views add-zone badguys primary.example.com..external + pdnsutil view add-zone trusted primary.example.com..internal + pdnsutil view add-zone badguys primary.example.com..external pdnsutil zone load example.com..internal internal/primary.example.com pdnsutil zone load example.com..external external/primary.example.com diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index 32305f027e..6953d6cb87 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -582,7 +582,7 @@ static const commandDispatcher topLevelDispatcher{ {"rrset", {true, {rrsetCommands}}}, {"tsig-key", {false, {TSIGKEYCommands}}}, // sugar {"tsigkey", {true, {TSIGKEYCommands}}}, - {"views", {true, {viewsCommands}}}, + {"view", {true, {viewsCommands}}}, {"zone", {true, {zoneMainCommands, zoneSecondaryCommands, zoneDNSSECCommands, zoneKeyCommands}}} };