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) {
140 (
Agent *agent,
IFMapNode *node,
const autogen::PhysicalInterface *port) {
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) {
199 const string &display_name,
200 const string &vrf_name,
201 const uuid &device_uuid) {
209 const string &fqdn) {
212 req.
data.reset(NULL);
217 const string &fqdn) {
220 req.
data.reset(NULL);
static void CfgUuidSet(uint64_t ms_long, uint64_t ls_long, boost::uuids::uuid &u)
AgentDBEntry * FindActiveEntry(const DBEntry *key)
virtual void Process(DBRequest &req)
ConfigManager * config_manager() const
VrfTable * vrf_table() const
PhysicalDeviceTable * physical_device_table() const
const std::string & fabric_vrf_name() const
IFMapNode * FindAdjacentIFMapNode(IFMapNode *node, const char *type)
std::unique_ptr< DBRequestKey > KeyPtr
bool Enqueue(DBRequest *req)
const std::string & name() const
IFMapObject * GetObject()
bool RemotePhysicalInterfaceIFNodeToReq(IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u)
uint32_t pi_ifnode_to_req_
const std::string & name() const
struct InterfaceOsParams os_params_
static const uint32_t kInvalidIndex
PhysicalDevice * Find(const boost::uuids::uuid &u)
friend struct RemotePhysicalInterfaceKey
virtual std::string ToString() const
RemotePhysicalInterface(const std::string &name)
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 bool OnChange(const InterfaceTable *table, const RemotePhysicalInterfaceData *data)
virtual KeyPtr GetDBRequestKey() const
static void DeleteReq(InterfaceTable *table, const std::string &ifname)
const std::string & display_name() const
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)
virtual bool CmpInterface(const DBEntry &rhs) const
virtual void GetOsParams(Agent *agent)
virtual ~RemotePhysicalInterface()
std::string display_name_
PhysicalDeviceRef physical_device_
static void SetReq(DBRequest *req, const string &fqdn, const string &display_name, const string &vrf_name, const uuid &device_uuid)
static RemotePhysicalInterfaceKey * BuildKey(IFMapNode *node)
static RemotePhysicalInterfaceData * BuildData(Agent *agent, IFMapNode *node, const autogen::PhysicalInterface *port)
std::unique_ptr< DBRequestKey > key
std::unique_ptr< DBRequestData > data
void RemotePhysicalPortInit(const std::string &vrf_name)
RemotePhysicalInterfaceData(Agent *agent, IFMapNode *node, const std::string &display_name, const std::string &vrf_name, const boost::uuids::uuid &device_uuid)
std::string display_name_
boost::uuids::uuid device_uuid_
virtual ~RemotePhysicalInterfaceData()
RemotePhysicalInterfaceKey(const std::string &name)
~RemotePhysicalInterfaceKey()
Interface * AllocEntry(const InterfaceTable *table) const
InterfaceKey * Clone() const