vxlan: vxlan/vxlan.api API cleanup
[vpp.git] / extras / vom / vom / gbp_endpoint_group.hpp
index b60b155..e15a188 100644 (file)
 
 #include "vom/gbp_bridge_domain.hpp"
 #include "vom/gbp_route_domain.hpp"
+#include "vom/gbp_types.hpp"
 
 namespace VOM {
 
-/**
- * EPG IDs are 32 bit integers
- */
-typedef uint32_t epg_id_t;
-
 /**
  * A entry in the ARP termination table of a Bridge Domain
  */
 class gbp_endpoint_group : public object_base
 {
 public:
+  /**
+   * Endpoint Retention Policy Settings
+   */
+  struct retention_t
+  {
+    retention_t();
+    retention_t(uint32_t remote_ep_timeout);
+
+    retention_t(const retention_t&) = default;
+    retention_t& operator=(const retention_t&) = default;
+
+    bool operator==(const retention_t& o) const;
+    std::string to_string() const;
+
+    /**
+     * Remote Endpoint timeout/ageing
+     */
+    uint32_t remote_ep_timeout;
+  };
+
   /**
    * The key for a GBP endpoint group is its ID
    */
-  typedef epg_id_t key_t;
+  typedef sclass_t key_t;
 
   /**
    * Construct a GBP endpoint_group
    */
-  gbp_endpoint_group(epg_id_t epg_id,
+  gbp_endpoint_group(vnid_t vnid,
+                     sclass_t sclass,
                      const interface& itf,
                      const gbp_route_domain& rd,
                      const gbp_bridge_domain& bd);
-  gbp_endpoint_group(epg_id_t epg_id,
-                     const gbp_route_domain& rd,
-                     const gbp_bridge_domain& bd);
-  gbp_endpoint_group(epg_id_t epg_id,
-                     uint16_t sclass,
-                     const interface& itf,
+  gbp_endpoint_group(vnid_t vnid,
+                     sclass_t sclass,
                      const gbp_route_domain& rd,
                      const gbp_bridge_domain& bd);
-  gbp_endpoint_group(epg_id_t epg_id,
-                     uint16_t sclass,
+  gbp_endpoint_group(sclass_t sclass,
                      const gbp_route_domain& rd,
                      const gbp_bridge_domain& bd);
 
@@ -109,11 +121,14 @@ public:
   /**
    * Get the ID of the EPG
    */
-  epg_id_t id() const;
+  vnid_t vnid() const;
+  sclass_t sclass() const;
 
   const std::shared_ptr<gbp_route_domain> get_route_domain() const;
   const std::shared_ptr<gbp_bridge_domain> get_bridge_domain() const;
 
+  void set(const retention_t& retention);
+
 private:
   /**
    * Class definition for listeners to OM events
@@ -184,7 +199,7 @@ private:
   /**
    * The EPG ID
    */
-  epg_id_t m_epg_id;
+  vnid_t m_vnid;
 
   /**
    * The SClass on the wire
@@ -206,6 +221,11 @@ private:
    */
   std::shared_ptr<gbp_bridge_domain> m_bd;
 
+  /**
+   * The Group's EP retention Policy
+   */
+  retention_t m_retention;
+
   /**
    * A map of all bridge_domains
    */