25 singular_db<bond_group_binding::key_t, bond_group_binding>
26 bond_group_binding::m_db;
32 : m_itf(itf.singular())
40 , m_mem_itfs(o.m_mem_itfs)
41 , m_binding(o.m_binding)
50 m_db.release(
key(),
this);
56 return (m_itf->key() +
"-binding");
60 bond_group_binding::sweep()
63 auto it = m_mem_itfs.cbegin();
64 while (
it != m_mem_itfs.cend()) {
81 bond_group_binding::replay()
83 auto it = m_mem_itfs.cbegin();
84 while (
it != m_mem_itfs.cend()) {
97 auto it = m_mem_itfs.cbegin();
99 s <<
"bond-interface-binding: " << m_itf->to_string() <<
" slave-itfs: [";
100 while (
it != m_mem_itfs.cend()) {
101 s <<
" " <<
it->to_string();
114 auto it = m_mem_itfs.cbegin();
115 while (
it != m_mem_itfs.cend()) {
124 std::shared_ptr<bond_group_binding>
127 return (m_db.find_or_add(temp.
key(), temp));
130 std::shared_ptr<bond_group_binding>
133 return find_or_add(*
this);
144 bond_group_binding::event_handler::handle_replay()
158 bond_group_binding::event_handler::order()
const 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.
virtual interfaces - those that depend on some real interface
const key_t key() const
get the key to this object
static void register_handler(const std::vector< std::string > &cmds, const std::string &help, command_handler *ch)
Register a command handler for inspection.
A cmd class that detach slave from a bond interface.
static rc_t write()
Write/Execute all commands hitherto enqueued.
std::shared_ptr< bond_group_binding > singular() const
Return the 'singular' of the bond interface binding that matches this object.
A representation of bond interface binding.
bond_group_binding(const bond_interface &itf, const enslaved_itf_t &mem)
Construct a new object matching the desried state.
static void dump(std::ostream &os)
Dump all bond interface bindings into the stream provided.
std::set< bond_member > enslaved_itf_t
The container type for enslaved itfs.
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.
The VPP Object Model (VOM) library.
std::string to_string() const
convert to string format for debug purposes
~bond_group_binding()
Destructor.
save_rewrite_length must be aligned so that reass doesn t overwrite it
std::string key_t
The KEY can be used to uniquely identify the Bond Binding.
static bool register_listener(listener *listener)
Register a listener of events.
A command class that binds the slave interface to the bond interface.