Skip to content

Commit

Permalink
Register nil_uuid filter for health check
Browse files Browse the repository at this point in the history
Conflicts:
	src/vnsw/agent/cfg/cfg_filter.cc
	src/vnsw/agent/cfg/cfg_init.h

Change-Id: I7d4f814e8db7a1dbd32de90d958af4c842eedbd0
closes-bug: #1661167
  • Loading branch information
haripk committed Feb 9, 2017
1 parent 4de6a8d commit d07eec7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/vnsw/agent/cfg/cfg_filter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ int CfgFilter::GetIdPermsPropertyId(DBTable *table) const {
return LogicalInterface::ID_PERMS;
if (table == agent_cfg_->cfg_physical_device_table())
return PhysicalRouter::ID_PERMS;
if (table == agent_cfg_->cfg_health_check_table())
return ServiceHealthCheck::ID_PERMS;
return -1;
}

Expand Down Expand Up @@ -139,6 +141,9 @@ void CfgFilter::Init() {

agent_cfg_->cfg_physical_device_table()->RegisterPreFilter
(boost::bind(&CfgFilter::CheckProperty, this, _1, _2, _3));

agent_cfg_->cfg_health_check_table()->RegisterPreFilter
(boost::bind(&CfgFilter::CheckProperty, this, _1, _2, _3));
}

void CfgFilter::Shutdown() {
Expand Down
4 changes: 4 additions & 0 deletions src/vnsw/agent/cfg/cfg_init.cc
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ void AgentConfig::RegisterDBClients(DB *db) {
"physical-router")));
assert(cfg_physical_device_table_);

cfg_health_check_table_ = (static_cast<IFMapAgentTable *>
(IFMapTable::FindTable(agent_->db(),
"service-health-check")));
assert(cfg_health_check_table_);

cfg_interface_client_->Init();
}
Expand Down
5 changes: 5 additions & 0 deletions src/vnsw/agent/cfg/cfg_init.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ class AgentConfig {
return cfg_physical_device_table_;
}

IFMapAgentTable *cfg_health_check_table() const {
return cfg_health_check_table_;
}

Agent *agent() const { return agent_; }
CfgFilter *cfg_filter() const { return cfg_filter_.get(); }
IFMapAgentParser *cfg_parser() const { return cfg_parser_.get(); }
Expand Down Expand Up @@ -133,6 +137,7 @@ class AgentConfig {
IFMapAgentTable *cfg_service_instance_table_;
IFMapAgentTable *cfg_security_group_table_;
IFMapAgentTable *cfg_physical_device_table_;
IFMapAgentTable *cfg_health_check_table_;

DISALLOW_COPY_AND_ASSIGN(AgentConfig);
};
Expand Down

0 comments on commit d07eec7

Please sign in to comment.