[bind10-dev] Enabling the user interface
Jelte Jansen
jelte at isc.org
Mon Sep 14 09:41:47 UTC 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Shane Kerr wrote:
>
> The details about the configuration stuff are still unknown. But
> basically it will consist of a hierarchical set of attribute/value
> pairs, as described in Jelte's "configuration experiment" e-mail:
>
> https://lists.isc.org/pipermail/bind10-dev/2009-September/000099.html
>
or (let's make it confusing), we could go a more generative way, as described in:
https://lists.isc.org/pipermail/bind10-dev/2009-September/000110.html
i just wrote up a mock-up of what the datamodel specification could look like
(syntax based a bit on yang, but quite a bit easier, even if it is actually
already more complicated than i would prefer)
the config part will contain the data (and transaction/transfer/storage
functions, although i don't know what those will look like yet), one can define
types, which will be separate classes and objects, and enumerations.
basic types would have some possible limitation-settings, depending on their
type, for instance an int could have a minimum and a maximum, and a string could
have a regular expression. In both cases an error could be defined to show when
a value is not accepted.
i'm mostly thinking of generating the classes that contain the data in-memory
this way, but maybe it could probably also serve to generate other interfaces.
virtual chairs may now be thrown
- -------------------
/* namespace for the generated classes */
namespace ISC::AuthModule;
/* yeah yeah regex is incomplete, thinking about making
internet address a basic type and inlining checks for them */
type address {
string address {
must-match
"([0-9]+(\.[0-9]){3})|([0-9a-fA-F]{1-4}(:[[0-9a-fA-F]{1,4}){1,7})";
error "Does not look like an address";
};
}
type acl {
enum permissions { allow-notify, allow-transfer, (etc) };
address address;
list[permissions];
}
type zone {
enum zonetype {
master, slave
}
string name;
zonetype type;
string file;
list[address] masters;
list[acl] acls;
}
config {
/* ":attr" in a list type means the interface will have
direct accessors on that attribute of the type; in
this case it would be something like
Zone config.getZone("name") { /*code*/ };
*/
list[zone:name] zones;
string version {
default "BIND 10.0.1";
};
int listen-port {
min 1;
max 65535;
error "Port number must be 1-65535";
}
}
- ----------------------------
Jelte
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkquD9sACgkQ4nZCKsdOncWS4gCfYCWncgKzGs8wGGj5bLlLom6j
n88AnRf//MJhGfnUROJ5lJramoBmllxT
=4yaB
-----END PGP SIGNATURE-----
More information about the bind10-dev
mailing list