From d2ff812734e7cc3ad51f654784a4a81621ff26b9 Mon Sep 17 00:00:00 2001 From: Hari Date: Thu, 2 Feb 2017 12:25:04 +0530 Subject: [PATCH] Register nil_uuid filter for health check Change-Id: I7d4f814e8db7a1dbd32de90d958af4c842eedbd0 closes-bug: #1661167 --- src/vnsw/agent/cfg/cfg_filter.cc | 5 +++++ src/vnsw/agent/cfg/cfg_init.cc | 4 ++++ src/vnsw/agent/cfg/cfg_init.h | 5 +++++ 3 files changed, 14 insertions(+) diff --git a/src/vnsw/agent/cfg/cfg_filter.cc b/src/vnsw/agent/cfg/cfg_filter.cc index 4d0dc0b0d49..ccc6657d05f 100644 --- a/src/vnsw/agent/cfg/cfg_filter.cc +++ b/src/vnsw/agent/cfg/cfg_filter.cc @@ -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; if (table == agent_cfg_->cfg_qos_table()) return autogen::QosConfig::ID_PERMS; if (table == agent_cfg_->cfg_qos_queue_table()) @@ -146,6 +148,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)); + agent_cfg_->cfg_qos_table()->RegisterPreFilter (boost::bind(&CfgFilter::CheckProperty, this, _1, _2, _3)); diff --git a/src/vnsw/agent/cfg/cfg_init.cc b/src/vnsw/agent/cfg/cfg_init.cc index 71da6611dae..56be61e1277 100644 --- a/src/vnsw/agent/cfg/cfg_init.cc +++ b/src/vnsw/agent/cfg/cfg_init.cc @@ -190,6 +190,10 @@ void AgentConfig::RegisterDBClients(DB *db) { "physical-router"))); assert(cfg_physical_device_table_); + cfg_health_check_table_ = (static_cast + (IFMapTable::FindTable(agent_->db(), + "service-health-check"))); + assert(cfg_health_check_table_); cfg_qos_table_ = (static_cast (IFMapTable::FindTable(agent_->db(), diff --git a/src/vnsw/agent/cfg/cfg_init.h b/src/vnsw/agent/cfg/cfg_init.h index 9d8defd4144..97327d3625f 100644 --- a/src/vnsw/agent/cfg/cfg_init.h +++ b/src/vnsw/agent/cfg/cfg_init.h @@ -99,6 +99,10 @@ class AgentConfig { return cfg_forwarding_class_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(); } @@ -157,6 +161,7 @@ class AgentConfig { IFMapAgentTable *cfg_service_instance_table_; IFMapAgentTable *cfg_security_group_table_; IFMapAgentTable *cfg_physical_device_table_; + IFMapAgentTable *cfg_health_check_table_; IFMapAgentTable *cfg_qos_table_; IFMapAgentTable *cfg_global_qos_table_; IFMapAgentTable *cfg_qos_queue_table_;