summaryrefslogtreecommitdiffstats
path: root/src/plugins/lb/lb.api
diff options
context:
space:
mode:
authorHongjun Ni <hongjun.ni@intel.com>2019-06-10 19:43:48 +0800
committerAndrew Yourtchenko <ayourtch@gmail.com>2019-07-31 19:35:13 +0000
commit3efcd0d7c3e73b812dece730396cf8816951d8ad (patch)
treebe6ea249ce63f3595c1271ba8e005881e02b9d86 /src/plugins/lb/lb.api
parent515eed42583a52d4783ff4906afa01244899e030 (diff)
lb: vip and as dump/detail api's
- lb_vip_dump/lb_vip_details - get all vip. - lb_as_dump/lb_as_details - get all as list per vip. - adds api unit test. - adds vpp_lb to test framework. Ticket: Type: feature Change-Id: I24be50d62c5234f3535cc840603ddd9df7eb3f07 Signed-off-by: Hongjun Ni <hongjun.ni@intel.com> Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com> Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
Diffstat (limited to 'src/plugins/lb/lb.api')
-rw-r--r--src/plugins/lb/lb.api95
1 files changed, 73 insertions, 22 deletions
diff --git a/src/plugins/lb/lb.api b/src/plugins/lb/lb.api
index c24440936d3..867832df966 100644
--- a/src/plugins/lb/lb.api
+++ b/src/plugins/lb/lb.api
@@ -1,5 +1,5 @@
option version = "1.0.0";
-import "vnet/ip/ip_types.api";
+import "plugins/lb/lb_types.api";
/** \brief Configure Load-Balancer global parameters (unlike the CLI, both ip4_src_address and ip6_src_address need to be specified.
@param client_index - opaque cookie to identify the sender
@@ -24,8 +24,7 @@ autoreply manual_print define lb_conf
/** \brief Add a virtual address (or prefix)
@param client_index - opaque cookie to identify the sender
@param context - sender context, to match reply w/ request
- @param ip_prefix - IP address (IPv4 in lower order 32 bits).
- @param prefix_length - IP prefix length (96 + 'IPv4 prefix length' for IPv4).
+ @param pfx - ip prefix and length
@param protocol - tcp or udp.
@param port - destination port. (0) means 'all-port VIP'
@param encap - Encap is ip4 GRE(0) or ip6 GRE(1) or L3DSR(2) or NAT4(3) or NAT6(4).
@@ -40,24 +39,22 @@ autoreply manual_print define lb_conf
autoreply manual_print define lb_add_del_vip {
u32 client_index;
u32 context;
- u8 ip_prefix[16];
- u8 prefix_length;
- u8 protocol;
+ vl_api_prefix_t pfx;
+ u8 protocol [default=255];
u16 port;
- u8 encap;
+ vl_api_lb_encap_type_t encap;
u8 dscp;
- u8 type;
+ vl_api_lb_srv_type_t type ; /* LB_API_SRV_TYPE_CLUSTERIP */
u16 target_port;
u16 node_port;
- u32 new_flows_table_length;
- u8 is_del;
+ u32 new_flows_table_length [default=1024];
+ bool is_del;
};
/** \brief Add an application server for a given VIP
@param client_index - opaque cookie to identify the sender
@param context - sender context, to match reply w/ request
- @param vip_ip_prefix - VIP IP address (IPv4 in lower order 32 bits).
- @param vip_prefix_length - VIP IP prefix length (96 + 'IPv4 prefix length' for IPv4).
+ @param pfx - ip prefix and length
@param protocol - tcp or udp.
@param port - destination port.
@param as_address - The application server address (IPv4 in lower order 32 bits).
@@ -67,28 +64,82 @@ autoreply manual_print define lb_add_del_vip {
autoreply manual_print define lb_add_del_as {
u32 client_index;
u32 context;
- u8 vip_ip_prefix[16];
- u8 vip_prefix_length;
- u8 protocol;
+ vl_api_prefix_t pfx;
+ u8 protocol [default=255];
u16 port;
- u8 as_address[16];
- u8 is_del;
- u8 is_flush;
+ vl_api_address_t as_address;
+ bool is_del;
+ bool is_flush;
};
/** \brief Flush a given vip
@param client_index - opaque cookie to identify the sender
@param context - sender context, to match reply w/ request
- @param ip_prefix - IP address (IPv4 in lower order 32 bits).
- @param prefix_length - IP prefix length (96 + 'IPv4 prefix length' for IPv4).
+ @param pfx - ip prefix and length
@param protocol - tcp or udp.
@param port - destination port.
*/
autoreply manual_print define lb_flush_vip {
u32 client_index;
u32 context;
- u8 ip_prefix[16];
- u8 prefix_length;
+ vl_api_prefix_t pfx;
+ u8 protocol;
+ u16 port;
+};
+
+/** \brief Dump all vips
+ @param client_index - opaque cookie to identify the sender
+ @param context - sender context, to match reply w/ request
+*/
+define lb_vip_dump{
+ u32 client_index;
+ u32 context;
+ vl_api_prefix_t pfx;
+ vl_api_prefix_matcher_t pfx_matcher;
+ u8 protocol [default=255];
+ u16 port;
+
+};
+
+/** \brief Reply all configured vip
+ @param context - sender context, to match reply w/ request
+ @param vip - all vip addrs.
+*/
+define lb_vip_details {
+ u32 context;
+ vl_api_lb_vip_t vip;
+ vl_api_lb_encap_type_t encap;
+ vl_api_ip_dscp_t dscp;
+ vl_api_lb_srv_type_t srv_type;
+ u16 target_port;
+ u16 flow_table_length;
+};
+
+/** \brief dump AS list per VIP or all ASs for all VIPs
+ @param client_index - opaque cookie to identify the sender
+ @param context - sender context, to match reply w/ request
+ @param pfx - ip prefix and length.
+ @param protocol - tcp or udp.
+ @param port - destination port.
+*/
+define lb_as_dump{
+ u32 client_index;
+ u32 context;
+ /* vip */
+ vl_api_prefix_t pfx;
u8 protocol;
u16 port;
};
+
+/** \brief lb_as_details
+ @param context - sender context, to match reply w/ request
+ @param as - AS detail record
+*/
+define lb_as_details {
+ u32 context;
+ vl_api_lb_vip_t vip;
+ vl_api_address_t app_srv;
+ u8 flags;
+ u32 in_use_since;
+};
+