+
+ std::shared_ptr<bond_interface_cmds::dump_cmd> bcmd =
+ std::make_shared<bond_interface_cmds::dump_cmd>();
+
+ HW::enqueue(bcmd);
+ HW::write();
+
+ for (auto& bond_itf_record : *bcmd) {
+ std::shared_ptr<bond_interface> bond_itf =
+ interface_factory::new_bond_interface(bond_itf_record.get_payload());
+
+ VOM_LOG(log_level_t::DEBUG) << " bond-dump:" << bond_itf->to_string();
+
+ /*
+ * Write each of the discovered interfaces into the OM,
+ * but disable the HW Command q whilst we do, so that no
+ * commands are sent to VPP
+ */
+ OM::commit(key, *bond_itf);
+
+ std::shared_ptr<bond_group_binding_cmds::dump_cmd> scmd =
+ std::make_shared<bond_group_binding_cmds::dump_cmd>(
+ bond_group_binding_cmds::dump_cmd(bond_itf->handle()));
+
+ HW::enqueue(scmd);
+ HW::write();
+
+ bond_group_binding::enslaved_itf_t enslaved_itfs;
+
+ for (auto& slave_itf_record : *scmd) {
+ bond_member slave_itf = interface_factory::new_bond_member_interface(
+ slave_itf_record.get_payload());
+
+ VOM_LOG(log_level_t::DEBUG) << " slave-dump:" << slave_itf.to_string();
+
+ /*
+ * Write each of the discovered interfaces into the OM,
+ * but disable the HW Command q whilst we do, so that no
+ * commands are sent to VPP
+ */
+ // OM::commit(slave_itf->key(), *slave_itf);
+ enslaved_itfs.insert(slave_itf);
+ }
+
+ if (!enslaved_itfs.empty()) {
+ bond_group_binding bid(*bond_itf, enslaved_itfs);
+ /*
+ * Write each of the discovered interfaces into the OM,
+ * but disable the HW Command q whilst we do, so that no
+ * commands are sent to VPP
+ */
+ OM::commit(key, bid);
+ }
+ }