Commit 342fdf3d authored by Michael Graff's avatar Michael Graff
Browse files

kill API support for subscription types. 'meonly' is the default. Comment...

kill API support for subscription types.  'meonly' is the default.  Comment out lines in callers which used 'meonly'

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/parkinglot@335 e5f2f494-b856-4b98-b285-d166d9295462
parent f222c667
......@@ -32,9 +32,9 @@ def _prepare_fake_data(bigtool):
if __name__ == '__main__':
try:
cc = ISC.CC.Session()
cc.group_subscribe("BigTool", "*", "meonly")
cc.group_subscribe("ConfigManager", "*", "meonly")
cc.group_subscribe("Boss", "*", "meonly")
#cc.group_subscribe("BigTool", "*", "meonly")
#cc.group_subscribe("ConfigManager", "*", "meonly")
#cc.group_subscribe("Boss", "*", "meonly")
tool = BigTool(cc)
_prepare_fake_data(tool)
......
......@@ -42,8 +42,8 @@ CommandSession::CommandSession() :
session_.establish();
session_.subscribe("ParkingLot", "*");
session_.subscribe("Boss", "ParkingLot");
session_.subscribe("ConfigManager", "*", "meonly");
session_.subscribe("statistics", "*", "meonly");
//session_.subscribe("ConfigManager", "*", "meonly");
//session_.subscribe("statistics", "*", "meonly");
} catch (...) {
throw std::runtime_error("SessionManager: failed to open sessions");
}
......
......@@ -197,14 +197,13 @@ Session::recvmsg(ElementPtr& env, ElementPtr& msg, bool nonblock)
}
void
Session::subscribe(std::string group, std::string instance, std::string subtype)
Session::subscribe(std::string group, std::string instance)
{
ElementPtr env = Element::create(std::map<std::string, ElementPtr>());
env->set("type", Element::create("subscribe"));
env->set("group", Element::create(group));
env->set("instance", Element::create(instance));
env->set("subtype", Element::create(subtype));
sendmsg(env);
}
......
......@@ -43,8 +43,7 @@ namespace ISC {
ISC::Data::ElementPtr& msg,
bool nonblock = true);
void subscribe(std::string group,
std::string instance = "*",
std::string subtype = "normal");
std::string instance = "*");
void unsubscribe(std::string group,
std::string instance = "*");
unsigned int group_sendmsg(ISC::Data::ElementPtr& msg,
......
......@@ -125,13 +125,11 @@ class Session:
self._sequence += 1
return self._sequence
def group_subscribe(self, group, instance = "*", subtype = "normal"):
"""subtype can be 'normal' or 'meonly'"""
def group_subscribe(self, group, instance = "*"):
self.sendmsg({
"type": "subscribe",
"group": group,
"instance": instance,
"subtype": subtype,
})
def group_unsubscribe(self, group, instance = "*"):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment