[bind10-dev] Enabling the user interface

zhanglikun/张立坤 zhanglikun at cnnic.cn
Thu Sep 17 13:24:33 UTC 2009


Hi all:
below is my suggestions for user interface.

1. 
There will be one entry command for listing all the modules in bind10. 
like: 
                 BigTool>> list module              
                 config_manager
                 zone
                 c_channel

2. 
Each module has one or more class, and each class has its instances.
class has some functions, both class and instance have its "attribute". 

Take module "zone" as example, check all the function/attribute by inputing:
              BigTool>>list zone         // or some other command name
              function: 
                    add_zone()
                    remove_zone()
                    reload()
              class attribute:
          	      zone_count
                    zones
              instance attribute:
                    master
                    allow_update
                    provide_ixfr 

Suppose there are two zones, "example.com" and "zlk.cn". Administrator can
get the zone count by checking zone's attribute "zone_count".
             BigTool>> zone.zone_count
             2

List all the zones' name
            BigTool>> zone.zones
            example.com.
            zlk.cn.

Add one zone by calling function "add_zone" of class "zone"
            BigTool>>zone.add_zone("good.com")

Set master to zone "example.com" by operating on zone instance's attribute
"master"
           BigTool>>zone("example.com").master = "218.241.108.199"

Add master to zone "example.com"
           BigTool>>zone("example.com").master += "218.241.108.1"

Welcome any comment from you.

zhanglikun
CNNIC




More information about the bind10-dev mailing list