l2_binding::event_handler::handle_populate(const client_db::key_t& key)
{
/*
-* dump VPP Bridge domains
-*/
- std::shared_ptr<binding_cmds::l2_dump_cmd> cmd(
- new binding_cmds::l2_dump_cmd());
+ * dump VPP Bridge domains
+ */
+ std::shared_ptr<binding_cmds::l2_dump_cmd> cmd =
+ std::make_shared<binding_cmds::l2_dump_cmd>();
HW::enqueue(cmd);
HW::write();
void
l3_binding::event_handler::handle_populate(const client_db::key_t& key)
{
- std::shared_ptr<binding_cmds::l3_dump_cmd> cmd(
- new binding_cmds::l3_dump_cmd());
+ std::shared_ptr<binding_cmds::l3_dump_cmd> cmd =
+ std::make_shared<binding_cmds::l3_dump_cmd>();
HW::enqueue(cmd);
HW::write();
* Constructor
*/
dump_cmd() = default;
- dump_cmd(const dump_cmd& d) = default;
/**
* Issue the command to VPP/HW
m_evh.order();
/*
-* dump VPP Bridge domains
-*/
- std::shared_ptr<list_cmds::l2_dump_cmd> cmd(new list_cmds::l2_dump_cmd());
+ * dump VPP Bridge domains
+ */
+ std::shared_ptr<list_cmds::l2_dump_cmd> cmd =
+ std::make_shared<list_cmds::l2_dump_cmd>();
HW::enqueue(cmd);
HW::write();
VOM_LOG(log_level_t::DEBUG) << "dump: " << acl.to_string();
/*
-* Write each of the discovered ACLs into the OM,
-* but disable the HW Command q whilst we do, so that no
-* commands are sent to VPP
-*/
+ * Write each of the discovered ACLs into the OM,
+ * but disable the HW Command q whilst we do, so that no
+ * commands are sent to VPP
+ */
OM::commit(key, acl);
}
}
m_evh.order();
/*
-* dump VPP Bridge domains
-*/
- std::shared_ptr<list_cmds::l3_dump_cmd> cmd(new list_cmds::l3_dump_cmd());
+ * dump L3 ACLs Bridge domains
+ */
+ std::shared_ptr<list_cmds::l3_dump_cmd> cmd =
+ std::make_shared<list_cmds::l3_dump_cmd>();
HW::enqueue(cmd);
HW::write();
VOM_LOG(log_level_t::DEBUG) << "dump: " << acl.to_string();
/*
-* Write each of the discovered ACLs into the OM,
-* but disable the HW Command q whilst we do, so that no
-* commands are sent to VPP
-*/
+ * Write each of the discovered ACLs into the OM,
+ * but disable the HW Command q whilst we do, so that no
+ * commands are sent to VPP
+ */
OM::commit(key, acl);
}
}
bridge_domain::event_handler::handle_populate(const client_db::key_t& key)
{
/*
- * dump VPP Bridge domains
- */
- std::shared_ptr<bridge_domain_cmds::dump_cmd> cmd(
- new bridge_domain_cmds::dump_cmd());
+ * dump VPP Bridge domains
+ */
+ std::shared_ptr<bridge_domain_cmds::dump_cmd> cmd =
+ std::make_shared<bridge_domain_cmds::dump_cmd>();
HW::enqueue(cmd);
HW::write();
void
bridge_domain_entry::event_handler::handle_populate(const client_db::key_t& key)
{
- std::shared_ptr<bridge_domain_entry_cmds::dump_cmd> cmd(
- new bridge_domain_entry_cmds::dump_cmd());
+ std::shared_ptr<bridge_domain_entry_cmds::dump_cmd> cmd =
+ std::make_shared<bridge_domain_entry_cmds::dump_cmd>();
HW::enqueue(cmd);
HW::write();
*/
virtual ~dump_cmd() {}
+ dump_cmd(const dump_cmd& d) = default;
+
/**
* Constant iterator to the start of the records retunred during the dump
*/
/*
* dump VPP current states
*/
- interface_cmds::dump_cmd* cmd = new interface_cmds::dump_cmd();
+ std::shared_ptr<interface_cmds::dump_cmd> cmd =
+ std::make_shared<interface_cmds::dump_cmd>();
HW::enqueue(cmd);
HW::write();
void
interface_span::event_handler::handle_populate(const client_db::key_t& key)
{
- std::shared_ptr<interface_span_cmds::dump_cmd> cmd(
- new interface_span_cmds::dump_cmd());
+ std::shared_ptr<interface_span_cmds::dump_cmd> cmd =
+ std::make_shared<interface_span_cmds::dump_cmd>();
HW::enqueue(cmd);
HW::write();
l2_binding::event_handler::handle_populate(const client_db::key_t& key)
{
/**
- * This is done while populating the bridge-domain
- */
+ * This is done while populating the bridge-domain
+ */
}
dependency_t
while (it != m_db.cend()) {
/*
- * The key in the DB is a pair of the interface's name and prefix.
- * If the keys match, save the L3-config
- */
+ * The key in the DB is a pair of the interface's name and prefix.
+ * If the keys match, save the L3-config
+ */
auto key = it->first;
if (i.key() == key.first) {
l3_binding::event_handler::handle_populate(const client_db::key_t& key)
{
/**
- * This is done while populating the interfaces
- */
+ * This is done while populating the interfaces
+ */
}
dependency_t
void
ip_route::event_handler::handle_populate(const client_db::key_t& key)
{
- std::shared_ptr<ip_route_cmds::dump_v4_cmd> cmd_v4(
- new ip_route_cmds::dump_v4_cmd());
- std::shared_ptr<ip_route_cmds::dump_v6_cmd> cmd_v6(
- new ip_route_cmds::dump_v6_cmd());
+ std::shared_ptr<ip_route_cmds::dump_v4_cmd> cmd_v4 =
+ std::make_shared<ip_route_cmds::dump_v4_cmd>();
+ std::shared_ptr<ip_route_cmds::dump_v6_cmd> cmd_v6 =
+ std::make_shared<ip_route_cmds::dump_v6_cmd>();
HW::enqueue(cmd_v4);
HW::enqueue(cmd_v6);
/*
* dump VPP current states
*/
- std::shared_ptr<tap_interface_cmds::dump_cmd> cmd(
- new tap_interface_cmds::dump_cmd());
+ std::shared_ptr<tap_interface_cmds::dump_cmd> cmd =
+ std::make_shared<tap_interface_cmds::dump_cmd>();
HW::enqueue(cmd);
HW::write();
/*
* dump VPP current states
*/
- std::shared_ptr<vxlan_tunnel_cmds::dump_cmd> cmd(
- new vxlan_tunnel_cmds::dump_cmd());
+ std::shared_ptr<vxlan_tunnel_cmds::dump_cmd> cmd =
+ std::make_shared<vxlan_tunnel_cmds::dump_cmd>();
HW::enqueue(cmd);
HW::write();