OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vlan_port_binding_ovsdb.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Juniper Networks, Inc. All rights reserved.
3  */
4 
5 #ifndef SRC_VNSW_AGENT_OVS_TOR_AGENT_OVSDB_CLIENT_VLAN_PORT_BINDING_OVSDB_H_
6 #define SRC_VNSW_AGENT_OVS_TOR_AGENT_OVSDB_CLIENT_VLAN_PORT_BINDING_OVSDB_H_
7 
8 #include <ovsdb_entry.h>
9 #include <ovsdb_object.h>
10 
11 class PhysicalDeviceVn;
13 
14 namespace OVSDB {
16 public:
18  virtual ~VlanPortBindingTable();
19 
20  KSyncEntry *Alloc(const KSyncEntry *key, uint32_t index);
23  const OvsdbDBEntry *ovsdb_entry);
24  std::string GetLogicalSwitchName(const DBEntry *entry) const;
25 
26 private:
28 };
29 
31 public:
33  const std::string &physical_device,
34  const std::string &physical_port,
35  uint16_t vlan_tag, const std::string &logical_switch);
37  const VlanPortBindingEntry *key);
39  const VlanLogicalInterface *entry);
40 
41  void PreAddChange();
42  void PostDelete();
43  void AddMsg(struct ovsdb_idl_txn *);
44  void ChangeMsg(struct ovsdb_idl_txn *);
45  void DeleteMsg(struct ovsdb_idl_txn *);
46  bool Sync(DBEntry*);
47  bool IsLess(const KSyncEntry&) const;
48  std::string ToString() const {return "Vlan Port Binding";}
50 
51  const std::string &logical_switch_name() const;
52  const std::string &physical_port_name() const;
53  const std::string &physical_device_name() const;
54  uint16_t vlan() const;
55 
56 protected:
57  // we don't want to create a transaction for this entry
58  bool IsNoTxnEntry() { return true; }
59 
60 private:
61  friend class VlanPortBindingTable;
62 
64  std::string logical_switch_name_;
65  std::string physical_port_name_;
66  std::string physical_device_name_;
67  uint16_t vlan_;
72 };
73 };
74 
75 #endif //SRC_VNSW_AGENT_OVS_TOR_AGENT_OVSDB_CLIENT_VLAN_PORT_BINDING_OVSDB_H_
76 
OvsdbDBObject * table()
Definition: ovsdb_entry.h:96
DISALLOW_COPY_AND_ASSIGN(VlanPortBindingTable)
const std::string & logical_switch_name() const
VlanPortBindingTable(OvsdbClientIdl *idl)
void AddMsg(struct ovsdb_idl_txn *)
DBFilterResp OvsdbDBEntryFilter(const DBEntry *entry, const OvsdbDBEntry *ovsdb_entry)
boost::uuids::uuid uuid
KSyncEntry * Alloc(const KSyncEntry *key, uint32_t index)
std::string GetLogicalSwitchName(const DBEntry *entry) const
const std::string & physical_port_name() const
DISALLOW_COPY_AND_ASSIGN(VlanPortBindingEntry)
boost::intrusive_ptr< KSyncEntry > KSyncEntryPtr
Definition: ksync_entry.h:68
VlanPortBindingEntry(VlanPortBindingTable *table, const std::string &physical_device, const std::string &physical_port, uint16_t vlan_tag, const std::string &logical_switch)
void DeleteMsg(struct ovsdb_idl_txn *)
void ChangeMsg(struct ovsdb_idl_txn *)
KSyncEntry * DBToKSyncEntry(const DBEntry *)
bool IsLess(const KSyncEntry &) const
const std::string & physical_device_name() const