5 #include <boost/uuid/uuid_io.hpp>
6 #include <vnc_cfg_types.h>
29 NULL, true, boost::uuids::nil_uuid()),
30 display_name_(), physical_device_(NULL) {
37 return "Remote-PORT <" +
name() +
">";
65 if (new_vrf !=
vrf_.get()) {
90 boost::uuids::nil_uuid(), name, false) {
122 const string &vrf_name,
const uuid &device_uuid) :
124 display_name_(display_name),
125 device_uuid_(device_uuid) {
126 RemotePhysicalPortInit(vrf_name);
147 autogen::PhysicalRouter *router =
148 static_cast<autogen::PhysicalRouter *
>(adj_node->
GetObject());
149 autogen::IdPermsType id_perms = router->id_perms();
150 CfgUuidSet(id_perms.uuid.uuid_mslong, id_perms.uuid.uuid_lslong,
161 autogen::PhysicalInterface *port =
162 static_cast <autogen::PhysicalInterface *>(node->
GetObject());
181 const string &display_name,
const string &vrf_name,
182 const uuid &device_uuid) {
185 vrf_name, device_uuid));
190 const string &display_name,
191 const string &vrf_name,
192 const uuid &device_uuid) {
194 SetReq(&req, fqdn, display_name, vrf_name, device_uuid);
199 const string &display_name,
200 const string &vrf_name,
201 const uuid &device_uuid) {
203 SetReq(&req, fqdn, display_name, vrf_name, device_uuid);
209 const string &fqdn) {
212 req.
data.reset(NULL);
217 const string &fqdn) {
220 req.
data.reset(NULL);
friend struct RemotePhysicalInterfaceKey
virtual ~RemotePhysicalInterfaceData()
RemotePhysicalInterfaceKey(const std::string &name)
InterfaceKey * Clone() const
static void CfgUuidSet(uint64_t ms_long, uint64_t ls_long, boost::uuids::uuid &u)
boost::uuids::uuid device_uuid_
static void DeleteReq(InterfaceTable *table, const std::string &ifname)
PhysicalDeviceTable * physical_device_table() const
ConfigManager * config_manager() const
~RemotePhysicalInterfaceKey()
static void SetReq(DBRequest *req, const string &fqdn, const string &display_name, const string &vrf_name, const uuid &device_uuid)
std::unique_ptr< DBRequestData > data
AgentDBEntry * FindActiveEntry(const DBEntry *key)
bool Enqueue(DBRequest *req)
virtual KeyPtr GetDBRequestKey() const
std::unique_ptr< DBRequestKey > KeyPtr
std::string display_name_
static RemotePhysicalInterfaceKey * BuildKey(IFMapNode *node)
virtual ~RemotePhysicalInterface()
const std::string & fabric_vrf_name() const
PhysicalDevice * Find(const boost::uuids::uuid &u)
IFMapNode * FindAdjacentIFMapNode(IFMapNode *node, const char *type)
static void Create(InterfaceTable *table, const std::string &fqdn, const std::string &display_name, const std::string &vrf_name, const boost::uuids::uuid &device_uuid)
RemotePhysicalInterface(const std::string &name)
std::string display_name_
std::unique_ptr< DBRequestKey > key
uint32_t pi_ifnode_to_req_
virtual void GetOsParams(Agent *agent)
virtual void Process(DBRequest &req)
const std::string & name() const
VrfTable * vrf_table() const
IFMapObject * GetObject()
RemotePhysicalInterfaceData(Agent *agent, IFMapNode *node, const std::string &display_name, const std::string &vrf_name, const boost::uuids::uuid &device_uuid)
Interface * AllocEntry(const InterfaceTable *table) const
static void CreateReq(InterfaceTable *table, const std::string &fqdn, const std::string &display_name, const std::string &vrf_name, const boost::uuids::uuid &device_uuid)
virtual std::string ToString() const
static const uint32_t kInvalidIndex
struct InterfaceOsParams os_params_
const std::string & name() const
bool RemotePhysicalInterfaceIFNodeToReq(IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u)
virtual bool OnChange(const InterfaceTable *table, const RemotePhysicalInterfaceData *data)
static RemotePhysicalInterfaceData * BuildData(Agent *agent, IFMapNode *node, const autogen::PhysicalInterface *port)
PhysicalDeviceRef physical_device_
virtual bool CmpInterface(const DBEntry &rhs) const