VOM: bond: Add support for LACP
[vpp.git] / src / vpp-api / vom / interface.hpp
index da0db40..0099bde 100644 (file)
@@ -90,6 +90,16 @@ public:
      */
     const static type_t TAP;
 
+    /**
+     * vhost-user interface type
+     */
+    const static type_t VHOST;
+
+    /**
+     * bond interface type
+     */
+    const static type_t BOND;
+
     /**
      * Convert VPP's name of the interface to a type
      */
@@ -157,7 +167,10 @@ public:
   /**
    * Construct a new object matching the desried state
    */
-  interface(const std::string& name, type_t type, admin_state_t state);
+  interface(const std::string& name,
+            type_t type,
+            admin_state_t state,
+            const std::string& tag = "");
   /**
    * Construct a new object matching the desried state mapped
    * to a specific route_domain
@@ -165,7 +178,8 @@ public:
   interface(const std::string& name,
             type_t type,
             admin_state_t state,
-            const route_domain& rd);
+            const route_domain& rd,
+            const std::string& tag = "");
   /**
    * Destructor
    */
@@ -214,6 +228,11 @@ public:
    */
   const l2_address_t& l2_address() const;
 
+  /**
+   * Set the admin state of the interface
+   */
+  void set(const admin_state_t& state);
+
   /**
    * Set the L2 Address
    */
@@ -224,6 +243,11 @@ public:
    */
   void set(const oper_state_t& state);
 
+  /**
+   * Set the tag to the interface
+   */
+  void set(const std::string& tag);
+
   /**
    * Comparison operator - only used for UT
    */
@@ -335,7 +359,7 @@ public:
     void succeeded() {}
 
     /**
-     * add the created interface to the DB
+     * remove the deleted interface from the DB
      */
     void remove_interface() { interface::remove(this->item()); }
 
@@ -580,6 +604,11 @@ private:
    */
   oper_state_t m_oper;
 
+  /**
+   * tag of the interface
+   */
+  std::string m_tag;
+
   /**
    * A map of all interfaces keyed against VPP's handle
    */