X-Git-Url: https://gerrit.fd.io/r/gitweb?p=vpp.git;a=blobdiff_plain;f=extras%2Fvom%2Fvom%2Fgbp_subnet.cpp;h=8404dcd2e6566e74d2a8afcb81eb45feaec96acf;hp=2221c616dbb67ced301c243b5e06f8a7ff726e54;hb=b6a4795;hpb=d40c3e652d487f0f165d5e595864c4ccd464de3b diff --git a/extras/vom/vom/gbp_subnet.cpp b/extras/vom/vom/gbp_subnet.cpp index 2221c616dbb..8404dcd2e65 100644 --- a/extras/vom/vom/gbp_subnet.cpp +++ b/extras/vom/vom/gbp_subnet.cpp @@ -62,6 +62,18 @@ gbp_subnet::gbp_subnet(const gbp_route_domain& rd, { } +gbp_subnet::gbp_subnet(const gbp_route_domain& rd, + const route::prefix_t& prefix, + const gbp_endpoint_group& epg) + : m_hw(false) + , m_rd(rd.singular()) + , m_prefix(prefix) + , m_type(type_t::L3_OUT) + , m_recirc(nullptr) + , m_epg(epg.singular()) +{ +} + gbp_subnet::gbp_subnet(const gbp_subnet& o) : m_hw(o.m_hw) , m_rd(o.m_rd) @@ -215,6 +227,15 @@ gbp_subnet::event_handler::handle_populate(const client_db::key_t& key) VOM_LOG(log_level_t::DEBUG) << "read: " << gs.to_string(); break; } + case GBP_API_SUBNET_L3_OUT: { + std::shared_ptr epg = + gbp_endpoint_group::find(payload.subnet.epg_id); + + gbp_subnet gs(*rd, pfx, *epg); + OM::commit(key, gs); + VOM_LOG(log_level_t::DEBUG) << "read: " << gs.to_string(); + break; + } case GBP_API_SUBNET_STITCHED_EXTERNAL: { std::shared_ptr itf = interface::find(payload.subnet.sw_if_index);