Skip to content

Commit

Permalink
EOS SDK v2.22.4 (EOS 4.30.2F)
Browse files Browse the repository at this point in the history
  • Loading branch information
prufer committed Jul 31, 2023
1 parent 16feefe commit ba0a8ac
Show file tree
Hide file tree
Showing 85 changed files with 4,042 additions and 4,198 deletions.
18 changes: 5 additions & 13 deletions EosSdk.i
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ except ImportError:
// Change all some_class_t names to just SomeClass:
// The <<""< uses automatic string concatination to get around the
// conflict marker limitation.
%rename("%(command:python $SRCDIR/SwigRenamer.py --classname <<""<)s", %$isclass) "";
%rename("%(command:python3 $SRCDIR/SwigRenamer.py --classname <<""<)s", %$isclass) "";
// Don't do anything for enum values, functions or variables.

// Cause SWIG to produce basic documentation in the generated eossdk.py
Expand Down Expand Up @@ -169,14 +169,11 @@ typedef uint64_t uint64_be_t;
%feature("nodirector") eos::eth_phy_intf_mgr;
%feature("nodirector") eos::eth_phy_intf_counter_mgr;
%feature("nodirector") eos::fib_mgr;
%feature("nodirector") eos::fpga_mgr;
%feature("nodirector") eos::ham_mgr;
%feature("nodirector") eos::hardware_table_mgr;
%feature("nodirector") eos::intf_mgr;
%feature("nodirector") eos::intf_counter_mgr;
%feature("nodirector") eos::ip_intf_mgr;
%feature("nodirector") eos::ip_route_mgr;
%feature("nodirector") eos::l1_source_mgr;
%feature("nodirector") eos::lldp_mgr;
%feature("nodirector") eos::macsec_mgr;
%feature("nodirector") eos::mac_table_mgr;
Expand All @@ -194,10 +191,12 @@ typedef uint64_t uint64_be_t;
%feature("nodirector") eos::vrf_mgr;
%feature("nodirector") eos::xcvr_mgr;

// Do not generate Python bindings for the old programmed callback in the extended
// nexthop group handler class
// Do not generate Python bindings for the old programmed callbacks in the extended
// nexthop group handlers
%feature("nodirector") eos::nexthop_group_handler_v2::on_nexthop_group_programmed(
std::string const &);
%feature("nodirector") eos::nexthop_group_handler_v3::on_nexthop_group_programmed(
std::string const &);

%{
#include "eos/acl.h"
Expand All @@ -218,16 +217,13 @@ typedef uint64_t uint64_be_t;
#include "eos/exception.h"
#include "eos/fd.h"
#include "eos/fib.h"
#include "eos/fpga.h"
#include "eos/ham.h"
#include "eos/hardware_table.h"
#include "eos/hash_mix.h"
#include "eos/intf.h"
#include "eos/ip.h"
#include "eos/ip_intf.h"
#include "eos/ip_route.h"
#include "eos/iterator.h"
#include "eos/l1_source.h"
#include "eos/lldp.h"
#include "eos/macsec.h"
#include "eos/mac_table.h"
Expand Down Expand Up @@ -407,9 +403,6 @@ wrap_iterator(eos::class_map_iter_t, eos::class_map_iter_impl, eos::class_map_ke
wrap_iterator(eos::fib_fec_iter_t, eos::fib_fec_iter_impl, eos::fib_fec_t);
wrap_iterator(eos::fib_route_iter_t, eos::fib_route_iter_impl, eos::fib_route_t);
wrap_iterator(eos::flow_entry_iter_t, eos::flow_entry_iter_impl, eos::flow_entry_t);
wrap_iterator(eos::fpga_iter_t, eos::fpga_iter_impl, eos::fpga_t);
wrap_iterator(eos::fpga_reservation_iter_t, eos::fpga_reservation_iter_impl, eos::fpga_reservation_t);
wrap_iterator(eos::fpga_reservation_status_iter_t, eos::fpga_reservation_status_iter_impl, eos::fpga_reservation_status_t);
wrap_iterator(eos::eth_intf_iter_t, eos::eth_intf_iter_impl, eos::intf_id_t);
wrap_iterator(eos::eth_lag_intf_iter_t, eos::eth_lag_intf_iter_impl, eos::intf_id_t);
wrap_iterator(eos::eth_lag_intf_member_iter_t, eos::eth_lag_intf_member_iter_impl, eos::intf_id_t);
Expand All @@ -419,7 +412,6 @@ wrap_iterator(eos::intf_iter_t, eos::intf_iter_impl, eos::intf_id_t);
wrap_iterator(eos::ip_route_iter_t, eos::ip_route_iter_impl, eos::ip_route_t);
wrap_iterator(eos::ip_route_via_iter_t, eos::ip_route_via_iter_impl, eos::ip_route_via_t);
wrap_iterator(eos::decap_group_iter_t, eos::decap_group_iter_impl, eos::decap_group_t);
wrap_iterator(eos::l1_source_iter_t, eos::l1_source_iter_impl, eos::intf_id_t);
wrap_iterator(eos::lldp_remote_system_iter_t, eos::lldp_remote_system_iter_impl, lldp_remote_system_t);
wrap_iterator(eos::lldp_intf_iter_t, eos::lldp_intf_iter_impl, intf_id_t);
wrap_iterator(eos::lldp_neighbor_iter_t, eos::lldp_neighbor_iter_impl, lldp_neighbor_t);
Expand Down
10 changes: 1 addition & 9 deletions GoEosSdk.i
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
// Change all some_class_t names to just SomeClass:
// The <<""< uses automatic string concatination to get around the
// conflict marker limitation.
%rename("%(command:python $SRCDIR/SwigRenamer.py --classname --go <<""<)s", %$isclass) "";
%rename("%(command:python3 $SRCDIR/SwigRenamer.py --classname --go <<""<)s", %$isclass) "";
// Don't do anything for enum values, functions or variables.

// Cause SWIG to produce basic documentation in the generated eossdk.go
Expand Down Expand Up @@ -80,14 +80,11 @@ typedef uint64_t uint64_be_t;
%feature("nodirector") eos::eth_phy_intf_mgr;
%feature("nodirector") eos::eth_phy_intf_counter_mgr;
%feature("nodirector") eos::fib_mgr;
%feature("nodirector") eos::fpga_mgr;
%feature("nodirector") eos::ham_mgr;
%feature("nodirector") eos::hardware_table_mgr;
%feature("nodirector") eos::intf_mgr;
%feature("nodirector") eos::intf_counter_mgr;
%feature("nodirector") eos::ip_intf_mgr;
%feature("nodirector") eos::ip_route_mgr;
%feature("nodirector") eos::l1_source_mgr;
%feature("nodirector") eos::lldp_mgr;
%feature("nodirector") eos::macsec_mgr;
%feature("nodirector") eos::mac_table_mgr;
Expand Down Expand Up @@ -124,16 +121,13 @@ typedef uint64_t uint64_be_t;
#include "eos/exception.h"
#include "eos/fd.h"
#include "eos/fib.h"
#include "eos/fpga.h"
#include "eos/ham.h"
#include "eos/hardware_table.h"
#include "eos/hash_mix.h"
#include "eos/intf.h"
#include "eos/ip.h"
#include "eos/ip_intf.h"
#include "eos/ip_route.h"
#include "eos/iterator.h"
#include "eos/l1_source.h"
#include "eos/lldp.h"
#include "eos/macsec.h"
#include "eos/mac_table.h"
Expand Down Expand Up @@ -237,7 +231,6 @@ wrap_iterator(eos::class_map_iter_t, eos::class_map_iter_impl, eos::class_map_ke
wrap_iterator(eos::fib_fec_iter_t, eos::fib_fec_iter_impl, eos::fib_fec_t);
wrap_iterator(eos::fib_route_iter_t, eos::fib_route_iter_impl, eos::fib_route_t);
wrap_iterator(eos::flow_entry_iter_t, eos::flow_entry_iter_impl, eos::flow_entry_t);
wrap_iterator(eos::fpga_iter_t, eos::fpga_iter_impl, eos::fpga_t);
wrap_iterator(eos::eth_intf_iter_t, eos::eth_intf_iter_impl, eos::intf_id_t);
wrap_iterator(eos::eth_lag_intf_iter_t, eos::eth_lag_intf_iter_impl, eos::intf_id_t);
wrap_iterator(eos::eth_lag_intf_member_iter_t, eos::eth_lag_intf_member_iter_impl, eos::intf_id_t);
Expand All @@ -247,7 +240,6 @@ wrap_iterator(eos::intf_iter_t, eos::intf_iter_impl, eos::intf_id_t);
wrap_iterator(eos::ip_route_iter_t, eos::ip_route_iter_impl, eos::ip_route_t);
wrap_iterator(eos::ip_route_via_iter_t, eos::ip_route_via_iter_impl, eos::ip_route_via_t);
wrap_iterator(eos::decap_group_iter_t, eos::decap_group_iter_impl, eos::decap_group_t);
wrap_iterator(eos::l1_source_iter_t, eos::l1_source_iter_impl, eos::intf_id_t);
wrap_iterator(eos::lldp_remote_system_iter_t, eos::lldp_remote_system_iter_impl, lldp_remote_system_t);
wrap_iterator(eos::lldp_intf_iter_t, eos::lldp_intf_iter_impl, intf_id_t);
wrap_iterator(eos::lldp_neighbor_iter_t, eos::lldp_neighbor_iter_impl, lldp_neighbor_t);
Expand Down
14 changes: 2 additions & 12 deletions Includes.i
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@
%include "eos/types/intf.h"
%include "eos/types/bfd.h"
%include "eos/types/eth_phy_intf.h"
%include "eos/types/fpga.h"
%include "eos/types/ham.h"
%include "eos/types/hardware_table.h"
%include "eos/types/lldp.h"
%include "eos/types/macsec.h"
%include "eos/types/mpls.h"
%include "eos/types/mpls_vrf_label.h"
%include "eos/types/nexthop_group.h"
%include "eos/types/structured_filter.h"
%include "eos/types/vrf.h"
%include "eos/types/subintf.h"
%include "eos/ip.h"
Expand All @@ -35,7 +34,6 @@
%include "eos/types/eth_lag_intf.h"
%include "eos/mpls.h"
%include "eos/types/ip_route.h"
%include "eos/types/l1_source.h"
%include "eos/types/mac_table.h"
%include "eos/types/mpls_route.h"
%include "eos/types/neighbor_table.h"
Expand Down Expand Up @@ -67,16 +65,12 @@
%include "eos/inline/types/eapi.h"
%include "eos/inline/types/sdk.h"
%include "eos/timer.h"
%include "eos/fpga.h"
%include "eos/ham.h"
%include "eos/hardware_table.h"
%include "eos/inline/agent.h"
%include "eos/inline/types/acl.h"
%include "eos/inline/types/bfd.h"
%include "eos/inline/types/eth.h"
%include "eos/inline/types/eth_phy_intf.h"
%include "eos/inline/types/fpga.h"
%include "eos/inline/types/ham.h"
%include "eos/inline/types/hardware_table.h"
%include "eos/inline/types/intf.h"
%include "eos/inline/types/ip.h"
Expand All @@ -85,15 +79,14 @@
%include "eos/inline/types/mpls.h"
%include "eos/inline/types/mpls_vrf_label.h"
%include "eos/inline/types/nexthop_group.h"
%include "eos/inline/types/structured_filter.h"
%include "eos/inline/types/vrf.h"
%include "eos/sdk.h"
%include "eos/vrf.h"
%include "eos/xcvr.h"
%include "eos/bfd.h"
%include "eos/eth_intf.h"
%include "eos/eth_phy_intf.h"
%include "eos/inline/fpga.h"
%include "eos/inline/ham.h"
%include "eos/inline/hardware_table.h"
%include "eos/inline/intf.h"
%include "eos/inline/sdk.h"
Expand Down Expand Up @@ -128,12 +121,10 @@
%include "eos/inline/types/directflow.h"
%include "eos/inline/types/eth_lag_intf.h"
%include "eos/inline/types/ip_route.h"
%include "eos/inline/types/l1_source.h"
%include "eos/inline/types/mac_table.h"
%include "eos/inline/types/mpls_route.h"
%include "eos/inline/types/neighbor_table.h"
%include "eos/inline/types/nexthop_group_tunnel.h"
%include "eos/l1_source.h"
%include "eos/mac_table.h"
%include "eos/mpls_route.h"
%include "eos/mpls_vrf_label.h"
Expand All @@ -144,7 +135,6 @@
%include "eos/inline/bgp_path.h"
%include "eos/inline/directflow.h"
%include "eos/inline/eth_lag_intf.h"
%include "eos/inline/l1_source.h"
%include "eos/inline/mac_table.h"
%include "eos/inline/mpls_route.h"
%include "eos/inline/neighbor_table.h"
Expand Down
11 changes: 5 additions & 6 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ lib_LTLIBRARIES = libeos.la

AM_CXXFLAGS = -fvisibility=hidden
AM_CXXFLAGS += -Wextra -Wall -Wnon-virtual-dtor -Werror -Wno-unused-parameter -Wno-error=unused-value
AM_CXXFLAGS += $(EXTRA_CFLAGS)
AM_LDFLAGS = -Wl,--no-undefined


PUBLISHED_HEADER_FILES := $(wildcard eos/*.h) $(wildcard eos/inline/*.h) $(wildcard eos/types/*.h) $(wildcard eos/inline/types/*.h)
nobase_include_HEADERS = $(PUBLISHED_HEADER_FILES)

Expand Down Expand Up @@ -39,7 +41,6 @@ libeos_la_SOURCES += eth_phy_intf.cpp
libeos_la_SOURCES += event_loop.cpp
libeos_la_SOURCES += exception.cpp
libeos_la_SOURCES += fd.cpp
libeos_la_SOURCES += ham.cpp
libeos_la_SOURCES += hardware_table.cpp
libeos_la_SOURCES += intf.cpp
libeos_la_SOURCES += intf_types.cpp
Expand All @@ -49,9 +50,7 @@ libeos_la_SOURCES += ip_types.cpp
libeos_la_SOURCES += ip_intf.cpp
libeos_la_SOURCES += ip_route.cpp
libeos_la_SOURCES += fib.cpp
libeos_la_SOURCES += fpga.cpp
libeos_la_SOURCES += iterator.cpp
libeos_la_SOURCES += l1_source.cpp
libeos_la_SOURCES += macsec.cpp
libeos_la_SOURCES += mac_table.cpp
libeos_la_SOURCES += mlag.cpp
Expand Down Expand Up @@ -79,13 +78,14 @@ libeos_la_SOURCES += lldp.cpp
libeos_la_SOURCES += xcvr.cpp
libeos_la_SOURCES += nexthop_group_tunnel.cpp

libeos_la_CPPFLAGS = $(AM_CPPFLAGS) $(SHIPPING_FLAG)
libeos_la_CPPFLAGS = $(AM_CPPFLAGS) $(SHIPPING_FLAG) -fPIC -fPIE
libeos_la_LDFLAGS = -version-info $(SDK_LIBTOOL_VERSION) -lrt
libeos_la_LDFLAGS += -soname libeos.so.$(SDK_VERSION_MAJOR).$(SDK_VERSION_MINOR)

noinst_PROGRAMS = HelloWorld
HelloWorld_SOURCES = examples/HelloWorld.cpp
HelloWorld_LDADD = libeos.la
HelloWorld_CPPFLAGS = -fPIE

# --------- #
# SWIG libs #
Expand All @@ -106,8 +106,7 @@ _eossdk_la_CPPFLAGS = -I/usr/include/python$(PYTHON_VERSION)
_eossdk_la_LIBADD = libeos.la

$(srcdir)/eossdk_wrap.cpp: $(SWIG_FILES) $(nobase_include_HEADERS) $(srcdir)/eossdk_wrap.cpp
echo ./build_eossdk_wrap_py2 # built in python2 virtual-env
SRCDIR=$(srcdir) prefix [stubs-swig] $(SWIG) -threads -c++ -python -dirvtable -O -I$(srcdir) -o $@-t $(srcdir)/EosSdk.i
SRCDIR=$(srcdir) prefix [stubs-swig] $(SWIG) -threads -c++ -python -py3 -dirvtable -O -I$(srcdir) -o $@-t $(srcdir)/EosSdk.i
patch --batch --no-backup-if-mismatch -p0 <$(srcdir)/swig.patch
mv $@-t $@
sed 's/#define PyString_AS_STRING.x. PyUnicode_AS_STRING.x./#define PyString_AS_STRING(x) PyBytes_AS_STRING(x)/' -i eossdk_wrap.cpp
Expand Down
6 changes: 0 additions & 6 deletions SdkImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,12 @@ namespace eos {
eth_lag_intf_mgr_(0), \
event_loop_(0), \
fib_mgr_(0), \
fpga_mgr_(0), \
ham_mgr_(0), \
hardware_table_mgr_(0), \
intf_mgr_helper_(0), \
intf_mgr_(0), \
intf_counter_mgr_(0), \
ip_intf_mgr_(0), \
ip_route_mgr_(0), \
l1_source_mgr_(0), \
lldp_mgr_(0), \
macsec_mgr_(0), \
mac_table_mgr_(0), \
Expand Down Expand Up @@ -112,14 +109,11 @@ INIT_STUB_MGR(eth_intf_mgr)
INIT_STUB_MGR(eth_phy_intf_mgr)
INIT_STUB_MGR(eth_phy_intf_counter_mgr)
INIT_STUB_MGR(eth_lag_intf_mgr)
INIT_STUB_MGR(fpga_mgr)
INIT_STUB_MGR(ham_mgr)
INIT_STUB_MGR(hardware_table_mgr)
INIT_STUB_MGR(intf_mgr)
INIT_STUB_MGR(intf_counter_mgr)
INIT_STUB_MGR(ip_intf_mgr)
INIT_STUB_MGR(ip_route_mgr)
INIT_STUB_MGR(l1_source_mgr)
INIT_STUB_MGR(lldp_mgr)
INIT_STUB_MGR(macsec_mgr)
INIT_STUB_MGR(mac_table_mgr)
Expand Down
24 changes: 0 additions & 24 deletions SdkImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,12 @@ class eth_phy_intf_mgr;
class eth_phy_intf_counter_mgr;
class event_loop;
class fib_mgr;
class fpga_mgr;
class ham_mgr;
class hardware_table_mgr;
class intf_mgr_helper;
class intf_mgr;
class intf_counter_mgr;
class ip_intf_mgr;
class ip_route_mgr;
class l1_source_mgr;
class lldp_mgr;
class macsec_mgr;
class mac_table_mgr;
Expand Down Expand Up @@ -128,14 +125,11 @@ class EOS_SDK_PUBLIC sdk::SdkImpl {
void init_eth_phy_intf_counter_mgr();
void init_event_loop();
void init_fib_mgr(mgr_mode_type_t mode=MODE_TYPE_READ_ONLY);
void init_fpga_mgr();
void init_ham_mgr();
void init_hardware_table_mgr();
void init_intf_mgr();
void init_intf_counter_mgr();
void init_ip_intf_mgr();
void init_ip_route_mgr();
void init_l1_source_mgr();
void init_lldp_mgr();
void init_macsec_mgr();
void init_mac_table_mgr();
Expand Down Expand Up @@ -169,14 +163,11 @@ class EOS_SDK_PUBLIC sdk::SdkImpl {
eth_phy_intf_counter_mgr * get_eth_phy_intf_counter_mgr();
event_loop * get_event_loop();
fib_mgr * get_fib_mgr(mgr_mode_type_t mode=MODE_TYPE_READ_ONLY);
fpga_mgr * get_fpga_mgr();
ham_mgr * get_ham_mgr();
hardware_table_mgr * get_hardware_table_mgr();
intf_mgr * get_intf_mgr();
intf_counter_mgr * get_intf_counter_mgr();
ip_intf_mgr * get_ip_intf_mgr();
ip_route_mgr * get_ip_route_mgr();
l1_source_mgr * get_l1_source_mgr();
lldp_mgr * get_lldp_mgr();
macsec_mgr * get_macsec_mgr();
mac_table_mgr * get_mac_table_mgr();
Expand Down Expand Up @@ -218,15 +209,12 @@ class EOS_SDK_PUBLIC sdk::SdkImpl {
eth_lag_intf_mgr * eth_lag_intf_mgr_;
event_loop * event_loop_;
fib_mgr * fib_mgr_;
fpga_mgr * fpga_mgr_;
ham_mgr * ham_mgr_;
hardware_table_mgr * hardware_table_mgr_;
intf_mgr_helper * intf_mgr_helper_;
intf_mgr * intf_mgr_;
intf_counter_mgr * intf_counter_mgr_;
ip_intf_mgr * ip_intf_mgr_;
ip_route_mgr * ip_route_mgr_;
l1_source_mgr * l1_source_mgr_;
lldp_mgr * lldp_mgr_;
macsec_mgr * macsec_mgr_;
mac_table_mgr * mac_table_mgr_;
Expand Down Expand Up @@ -370,14 +358,6 @@ inline fib_mgr * sdk::SdkImpl::get_fib_mgr(mgr_mode_type_t mode) {
return fib_mgr_;
}

inline fpga_mgr * sdk::SdkImpl::get_fpga_mgr() {
GET_MGR(fpga)
}

inline ham_mgr * sdk::SdkImpl::get_ham_mgr() {
GET_MGR(ham)
}

inline hardware_table_mgr * sdk::SdkImpl::get_hardware_table_mgr() {
GET_MGR(hardware_table)
}
Expand Down Expand Up @@ -412,10 +392,6 @@ inline intf_mgr_helper * sdk::SdkImpl::get_intf_mgr_helper() {
return intf_mgr_helper_;
}

inline l1_source_mgr * sdk::SdkImpl::get_l1_source_mgr() {
GET_MGR(l1_source)
}

inline macsec_mgr * sdk::SdkImpl::get_macsec_mgr() {
GET_MGR(macsec)
}
Expand Down
3 changes: 1 addition & 2 deletions SwigRenamer.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Copyright (c) 2013 Arista Networks, Inc. All rights reserved.
# Arista Networks, Inc. Confidential and Proprietary.
from __future__ import print_function
import string
import sys

Expand Down
Loading

0 comments on commit ba0a8ac

Please sign in to comment.