38 , m_grd(grd.singular())
60 gbp_vxlan::mk_name(uint32_t
vni)
64 s << GBP_VXLAN_NAME <<
"-" <<
vni;
78 return (m_vni == vt.m_vni);
106 m_db.release(
key(),
this);
112 std::ostringstream s;
113 s <<
"gbp-vxlan:[" << m_vni <<
"]";
118 std::shared_ptr<gbp_vxlan>
121 return (m_db.find(key));
125 gbp_vxlan::update(
const gbp_vxlan& desired)
140 std::shared_ptr<gbp_vxlan>
141 gbp_vxlan::find_or_add(
const gbp_vxlan& temp)
143 return (m_db.find_or_add(temp.
key(), temp));
146 std::shared_ptr<gbp_vxlan>
149 return find_or_add(*
this);
152 std::shared_ptr<interface>
153 gbp_vxlan::singular_i()
const 155 return find_or_add(*
this);
170 std::shared_ptr<gbp_vxlan_cmds::dump_cmd>
cmd =
171 std::make_shared<gbp_vxlan_cmds::dump_cmd>();
176 for (
auto& record : *cmd) {
177 auto& payload = record.get_payload();
207 gbp_vxlan::event_handler::handle_replay()
213 gbp_vxlan::event_handler::order()
const
static void dump(std::ostream &os)
Dump all L3Configs into the stream provided.
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.
HW::item< handle_t > m_hdl
The SW interface handle VPP has asigned to the interface.
static void register_handler(const std::vector< std::string > &cmds, const std::string &help, command_handler *ch)
Register a command handler for inspection.
static rc_t write()
Write/Execute all commands hitherto enqueued.
static const log_level_t DEBUG
A command class that creates an Bridge-Domain.
static std::shared_ptr< gbp_bridge_domain > find(const key_t &k)
Find the instnace of the bridge_domain domain in the OM.
const std::string & name() const
Return the interface type.
std::shared_ptr< gbp_vxlan > singular() const
Return the matching 'singular instance'.
A entry in the ARP termination table of a Bridge Domain.
A representation of a GBP_VXLAN Tunnel in VPP.
virtual std::string to_string() const
Debug rpint function.
A Database to store the unique 'singular' instances of a single object type.
A cmd class that Delete an Bridge-Domain.
The admin state of the interface.
A representation of an interface in VPP.
gbp_vxlan(uint32_t vni, const gbp_bridge_domain &gbd)
Construct a new object matching the desried state.
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 const rc_t OK
The HW write was successfull.
static void enqueue(cmd *f)
Enqueue A command for execution.
A entry in the ARP termination table of a Route Domain.
Then L2/objects that bind to interfaces, BD, ACLS, etc.
const key_t key() const
Return the object's key.
The VPP Object Model (VOM) library.
A representation of a method call to VPP.
static std::shared_ptr< gbp_route_domain > find(const key_t &k)
Find the instnace of the route_domain domain in the OM.
uint32_t key_t
The VNI is the key.
static std::shared_ptr< gbp_vxlan > find(const key_t k)
Find the GBP_VXLAN tunnel in the OM.
static bool register_listener(listener *listener)
Register a listener of events.
const std::string GBP_VXLAN_NAME
bool operator==(const gbp_vxlan &vt) const