mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-31 22:15:23 +00:00
remove old zone commands
git-svn-id: svn://bind10.isc.org/svn/bind10/branches/jelte-datadef@349 e5f2f494-b856-4b98-b285-d166d9295462
This commit is contained in:
@@ -4,20 +4,6 @@ import ISC
|
|||||||
|
|
||||||
|
|
||||||
def _prepare_fake_data(bigtool):
|
def _prepare_fake_data(bigtool):
|
||||||
add_cmd = CommandInfo(name = "add", desc = "add one zone")
|
|
||||||
remove_cmd = CommandInfo(name = 'remove', desc = 'remove one zone')
|
|
||||||
list_cmd = CommandInfo(name = 'list', desc = 'list all zones',
|
|
||||||
need_inst_param = False)
|
|
||||||
|
|
||||||
zone_module = ModuleInfo(name = "zone",
|
|
||||||
inst_name = "zone_name",
|
|
||||||
inst_type = STRING_TYPE,
|
|
||||||
inst_desc = "the name of one zone",
|
|
||||||
desc = "manage all the zones")
|
|
||||||
zone_module.add_command(add_cmd)
|
|
||||||
zone_module.add_command(remove_cmd)
|
|
||||||
zone_module.add_command(list_cmd)
|
|
||||||
|
|
||||||
shutdown_param = ParamInfo(name = "module_name", desc = "the name of module")
|
shutdown_param = ParamInfo(name = "module_name", desc = "the name of module")
|
||||||
shutdown_cmd = CommandInfo(name = 'shutdown', desc = "stop bind10",
|
shutdown_cmd = CommandInfo(name = 'shutdown', desc = "stop bind10",
|
||||||
need_inst_param = False)
|
need_inst_param = False)
|
||||||
@@ -25,7 +11,6 @@ def _prepare_fake_data(bigtool):
|
|||||||
boss_module = ModuleInfo(name = "boss", desc = "boss of bind10")
|
boss_module = ModuleInfo(name = "boss", desc = "boss of bind10")
|
||||||
boss_module.add_command(shutdown_cmd)
|
boss_module.add_command(shutdown_cmd)
|
||||||
|
|
||||||
bigtool.add_module_info(zone_module)
|
|
||||||
bigtool.add_module_info(boss_module)
|
bigtool.add_module_info(boss_module)
|
||||||
|
|
||||||
def prepare_module_commands(bigtool, module_name, module_commands):
|
def prepare_module_commands(bigtool, module_name, module_commands):
|
||||||
|
@@ -100,8 +100,7 @@ class BoB:
|
|||||||
self.c_channel_port)
|
self.c_channel_port)
|
||||||
c_channel_env = { "ISC_MSGQ_PORT": str(self.c_channel_port), }
|
c_channel_env = { "ISC_MSGQ_PORT": str(self.c_channel_port), }
|
||||||
try:
|
try:
|
||||||
#c_channel = ProcessInfo("msgq", "msgq", c_channel_env, True)
|
c_channel = ProcessInfo("msgq", "msgq", c_channel_env, True)
|
||||||
c_channel = ProcessInfo("msgq", "msgq", c_channel_env)
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return "Unable to start msgq; " + str(e)
|
return "Unable to start msgq; " + str(e)
|
||||||
self.processes[c_channel.pid] = c_channel
|
self.processes[c_channel.pid] = c_channel
|
||||||
|
@@ -124,13 +124,6 @@ CommandSession::getCommand(int counter) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
cout << "[parkinglot] saw message: " << data << endl;
|
cout << "[parkinglot] saw message: " << data << endl;
|
||||||
cmd = data->get("zone_added");
|
|
||||||
if (cmd != NULL)
|
|
||||||
return std::pair<string, ElementPtr>("addzone", cmd);
|
|
||||||
cmd = data->get("zone_deleted");
|
|
||||||
if (cmd != NULL) {
|
|
||||||
return std::pair<string, ElementPtr>("delzone", cmd);
|
|
||||||
}
|
|
||||||
// todo: common interface for config updates?
|
// todo: common interface for config updates?
|
||||||
cmd = data->get("config_update");
|
cmd = data->get("config_update");
|
||||||
if (cmd != NULL) {
|
if (cmd != NULL) {
|
||||||
|
@@ -190,11 +190,7 @@ ParkingLot::processMessage() {
|
|||||||
|
|
||||||
void
|
void
|
||||||
ParkingLot::command(pair<string,ElementPtr> cmd) {
|
ParkingLot::command(pair<string,ElementPtr> cmd) {
|
||||||
if (cmd.first == "addzone")
|
if (cmd.first == "shutdown")
|
||||||
serve(cmd.second->string_value());
|
|
||||||
else if (cmd.first == "delzone")
|
|
||||||
zones.forget(cmd.second->string_value());
|
|
||||||
else if (cmd.first == "shutdown")
|
|
||||||
exit(0);
|
exit(0);
|
||||||
else if (cmd.first == "config_update") {
|
else if (cmd.first == "config_update") {
|
||||||
// what to do with port settings?
|
// what to do with port settings?
|
||||||
|
Reference in New Issue
Block a user