[bind10-dev] command line syntax for bind10

Jelte Jansen jelte at isc.org
Wed Nov 25 11:30:05 UTC 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Paul Vixie wrote:
> noting that i'm not on this list and my replies will have to be approved
> by a moderator, i want to make clear, i hated DCL, and i'm not talking
> about DCL here.  i'm talking very specifically about NCL.
> 
> what i'm hoping for is an assertive declarative language with strong verbs
> and qualifiers.  "ADD NODE DECWRL ADDRESS 10::455" for example.

hmm, here's a rough draft of what i had in mind so far for this, though it's at
this point much simpler (as in features) than the NCL described in that big
document there, and could certainly use at least some form of where-clauses like
in sql, not to mention finding all the little devils hiding in them details. But
this discussion prompted me to share it now, so let's see if we're on the right
track here.

- ---

Through the command line (or any UI, but this is only about the cli), there are
two types of commands; configuration and direct commands to modules.

Configuration
- -------------

Enter 'config' to go into configuration mode (this might not even be necessary)

There are 8 basic commands concerning configuration
- - 'go' (better word is welcome, it resembles 'cd') go to specific part of the
configuration
- - 'show [name] [all] [number-number]': show the options in the current item of
configuration; if 'name' is given, show the options in that specific item. If
the current item is a list, by default only 10 items will be shown at a time,
unless 'all' or 'number-number' is given as an argument. if 'more' is specified
as the next, the next 10 items are given.


- - 'set [name] <value>' change or set the value of an option
- - 'unset [name]' remove a configuration option (errors if not optional)
- - 'add [name] <value>' add a value to a list
- - 'remove [name] <value>' remove a value from a list

- - 'revert' revert all changes made so far
- - 'commit' commit all the changes made so far

the value of set depends on what is being changed; for a simple int or string
configuration value, a simple string or int can be used, more complicated values
(like full lists or maps) will be filled in by defaults if possible, or
otherwise have to be provided in full.

every command can take the argument 'help'
show also shows the description of the different options

for every 'map' value, 'go' can be used to go to the set of values in there. If
multiple maps are nested, a '/' character can be used as a separator; 'go
parkinglot/port'. This can also be used as the optional name argument in show,
set, unset, add and remove; 'set parkinglot/port 53'

Example session with parkinglot (note that i use port here since that is the one
setting we have for it at this point, though changing it may be difficult while
running, so please ignore that fact for now):

> config
[/]
> go parkinglot
[/parkinglot]
> show
port		the port to listen on
zones		the list of zones served by parkinglot
[/parkinglot]
> show port
[/parkinglot]
> set port 54
[/parkinglot]
> go port
[/parkinglot/port]
> set "asdf"
Error: value must be an integer
[/parkinglot/port]
> set 53
[/parkinglot/port]
> go /parkinglot
[/parkinglot]
> go zones
[/parkinglot/zones]
> show
a.com
b.com
c.com
d.com
e.com
f.com
g.com
h.com
i.com
j.com
(15 more, enter 'more' to show the next 10)
[/parkinglot/zones]
> set [ "a.com", "b.com" ]
[/condif/zones]
> show
a.com
b.com
[/parkinglot/zones]
> add "c.com"
[/parkinglot/zones]
> show
a.com
b.com
c.com
[/parkinglot/zones]
>


Direct commands
- ---------------

these are specified by the modules themselves, but do all have one thing in common:
help shows all modules (and if any, the command to go into configuration mode)
<modulename> help shows the commands and their descriptions
<modulename> <command> help shows the description of that specific command

(this direct command part is already mostly implemented by bigtool actually)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAksNFT0ACgkQ4nZCKsdOncVm8wCdEHHSDBXt7CPxhYyL/VmLS8SX
4WsAniUk8kcf4p67S9XESQ9AOkroxgm1
=nT4/
-----END PGP SIGNATURE-----



More information about the bind10-dev mailing list