23 singular_db<arp_proxy_config::key_t, arp_proxy_config> arp_proxy_config::m_db;
28 const boost::asio::ip::address_v4& high)
38 , m_config(o.m_config)
47 m_db.release(std::make_pair(m_low, m_high),
this);
51 arp_proxy_config::sweep()
67 arp_proxy_config::replay()
79 <<
" low:" << m_low.to_string() <<
" high:" << m_high.to_string();
92 std::shared_ptr<arp_proxy_config>
95 return (m_db.find_or_add(std::make_pair(temp.m_low, temp.m_high), temp));
98 std::shared_ptr<arp_proxy_config>
101 return find_or_add(*
this);
112 arp_proxy_config::event_handler::handle_replay()
120 std::shared_ptr<arp_proxy_config_cmds::dump_cmd>
cmd =
121 std::make_shared<arp_proxy_config_cmds::dump_cmd>();
126 for (
auto& record : *cmd) {
127 auto& payload = record.get_payload();
138 arp_proxy_config::event_handler::order()
const 152 os <<
"[" << key.first <<
", " << key.second <<
"]";
static void dump(std::ostream &os)
Dump all LLDP configs into the stream provided.
Global Configuration has no dependency.
void db_dump(const DB &db, std::ostream &os)
Print each of the objects in the DB into the stream provided.
const std::string key_t
In the opflex world each entity is known by a URI which can be converted into a string.
static void register_handler(const std::vector< std::string > &cmds, const std::string &help, command_handler *ch)
Register a command handler for inspection.
std::shared_ptr< arp_proxy_config > singular() const
Return the 'singular' of the LLDP config that matches this object.
static rc_t write()
Write/Execute all commands hitherto enqueued.
arp_proxy_config(const boost::asio::ip::address_v4 &low, const boost::asio::ip::address_v4 &high)
Construct a new object matching the desried state.
~arp_proxy_config()
Destructor.
std::string to_string() const
convert to string format for debug purposes
static rc_t commit(const client_db::key_t &key, const OBJ &obj)
Make the State in VPP reflect the expressed desired state.
void event_handler(void *tls_async)
dependency_t
There needs to be a strict order in which object types are read from VPP (at boot time) and replayed ...
static void enqueue(cmd *f)
Enqueue A command for execution.
A representation of LLDP client configuration on an interface.
std::ostream & operator<<(std::ostream &os, const std::pair< direction_t, interface::key_t > &key)
The VPP Object Model (VOM) library.
const neighbour::flags_t from_api(vapi_enum_ip_neighbor_flags f)
A representation of a method call to VPP.
A cmd class that Unconfigs ArpProxy Config from an interface.
A command class that adds the ARP Proxy config.
std::pair< boost::asio::ip::address_v4, boost::asio::ip::address_v4 > key_t
Key type.
static bool register_listener(listener *listener)
Register a listener of events.