OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
remote_physical_interface.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
3  */
4 #ifndef src_vnsw_agent_oper_remote_physical_interface_hpp
5 #define src_vnsw_agent_oper_remote_physical_interface_hpp
6 
8 
10 // Remote Physical Ports represents physical ports on an external device
11 // UUID is the key
14 public:
15  RemotePhysicalInterface(const std::string &name);
16  virtual ~RemotePhysicalInterface();
17 
18  virtual bool CmpInterface(const DBEntry &rhs) const;
19  virtual void GetOsParams(Agent *agent);
20  virtual std::string ToString() const;
21  virtual KeyPtr GetDBRequestKey() const;
22  virtual bool OnChange(const InterfaceTable *table,
23  const RemotePhysicalInterfaceData *data);
24 
25  const std::string &display_name() const { return display_name_; }
27  return physical_device_.get();
28  }
29 
30  // Helper functions
31  static void CreateReq(InterfaceTable *table, const std::string &fqdn,
32  const std::string &display_name,
33  const std::string &vrf_name,
34  const boost::uuids::uuid &device_uuid);
35  static void Create(InterfaceTable *table, const std::string &fqdn,
36  const std::string &display_name,
37  const std::string &vrf_name,
38  const boost::uuids::uuid &device_uuid);
39  static void DeleteReq(InterfaceTable *table, const std::string &ifname);
40  static void Delete(InterfaceTable *table, const std::string &ifname);
41 
43 private:
44  std::string display_name_;
47 };
48 
50  RemotePhysicalInterfaceKey(const std::string &name);
52 
53  Interface *AllocEntry(const InterfaceTable *table) const;
54  Interface *AllocEntry(const InterfaceTable *table,
55  const InterfaceData *data) const;
56  InterfaceKey *Clone() const;
57 };
58 
61  const std::string &display_name,
62  const std::string &vrf_name,
63  const boost::uuids::uuid &device_uuid);
65 
66  std::string display_name_;
68 };
69 
70 #endif // src_vnsw_agent_oper_remote_physical_interface_hpp
RemotePhysicalInterfaceKey(const std::string &name)
static void DeleteReq(InterfaceTable *table, const std::string &ifname)
boost::uuids::uuid uuid
virtual KeyPtr GetDBRequestKey() const
std::unique_ptr< DBRequestKey > KeyPtr
Definition: db_entry.h:25
Definition: agent.h:358
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)
PhysicalDevice * physical_device() const
const std::string & display_name() const
virtual void GetOsParams(Agent *agent)
void Delete()
Definition: db_entry.cc:131
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)
const Agent * agent() const
Definition: oper_db.h:65
virtual std::string ToString() const
const std::string & name() const
Definition: interface.h:114
boost::intrusive_ptr< PhysicalDevice > PhysicalDeviceRef
Definition: agent.h:153
virtual bool OnChange(const InterfaceTable *table, const RemotePhysicalInterfaceData *data)
DISALLOW_COPY_AND_ASSIGN(RemotePhysicalInterface)
virtual bool CmpInterface(const DBEntry &rhs) const