Skip to content

Releases: aristanetworks/EosSdk

EOS SDK v1.12.0

12 Feb 22:14
Compare
Choose a tag to compare

Resources

Bugs fixes and improvements

  • The EosSdk-mp RPM is now merged with the EosSdk RPM.
  • Calling nexthop_group_set() on a nexthop group that already exists, that is carrying the same name and type, no longer retains old entries from the larger existing group when autosize is enabled.
  • get_fib_mgr() no longer crashes when returning a read-only FIB manager.
  • New FibAclSync example which monitors routes in a VRF and ensures a corresponding permit ACL rule exists for each route. User is able to configure options such as IPv4 ACL, IPv6 ACL, VRF name, route type, and ACL batch update timer min/max.

EOS SDK v1.11.0

14 Dec 23:00
Compare
Choose a tag to compare

Resources

Features

  • Added the ability to set the dynamic resizing of nexthop groups. When enabled, automatic resizing removes unresolved entries from nexthop groups which reduces the number of entries occupying the hardware table and decreases the amount of time traffic will be hashed to an unreachable destination. The feature is disabled by default and can be turned on with the new autosize_is() setter in nexthop_group.h. Enabling the feature causes re-hashing of existing flows when a group’s resolved entries set changes.
  • Added neighbor_table_status_iter() to neighbor_table.h, which iterates over resolved ARP and Neighbor Discovery tables.

Bugs fixes and improvements

  • API Change: neighbor_table.h
    • Added manager function neighbor_table_status_iter(), which iterates over resolved ARP and Neighbor Discovery tables.
  • Handlers and manager methods are now thread-safe and automatically grab the scoped lock. Iterator objects are not protected after being returned. Customers should grab the scoped lock prior to accessing iterators.
  • When an EosSdk agent listens to an existing BFD session, the first callback of on_bfd_session_status() for that session will yield the session’s actual status instead of BFD_SESSION_STATUS_DOWN.
  • Added support for additional MAC entry types in mac_table.h. New types are:
    • MAC_ENTRY_EVPN_DYNAMIC_REMOTE
    • MAC_ENTRY_EVPN_CONFIGURED_REMOTE
    • MAC_ENTRY_PEER_EVPN_REMOTE
    • MAC_ENTRY_CONFIGURED_ROUTER
    • MAC_ENTRY_PEER_ROUTER
    • MAC_ENTRY_EVPN_INTF
  • Improved error handling in directflow.h with new enum type FLOW_REJECTED_ACTIONS_UNSUPPORTED.
  • Helpful debug tracing added before panicing when not able to grab the scoped lock.

EOS SDK v1.10.2

20 Oct 22:02
Compare
Choose a tag to compare

Resources

Bugs fixes and improvements

  • The SDK now keeps track of how many agents have grabbed the sdk_scoped_lock. In a multithreaded/multiple-agent scenario where an agent releases its lock, the SDK will no longer erroneously report that the lock has not been grabbed.
  • Fix unsafe usage of fprintf() in the EOS SDK stubs, which caused some compilers to throw a format-security error.

EOS SDK v1.10.1

12 Oct 20:59
Compare
Choose a tag to compare

Resources

Features

  • The acl.h module now follows dynamic/persistent semantics. To mark an ACL as persistent (i.e., have it show up in running-config), call acl_mgr->persistent_is(acl_key, true). By default, ACLs will be programmed as dynamic (non-persistent) so they won’t show up in the CLI and conflict with config-replace operations.

Bugs fixes and improvements

  • Expose ip_route_via_t’s during iteration for nexthop_group and drop routes. This regression was introduced in 1.10.0.

EOS SDK v1.10.0

22 Sep 23:01
Compare
Choose a tag to compare

Resources

Features

  • New method register_vrf() for VRF-awareness in the Forwarding Information Base fib.h module.
  • New system_mac() method in system.h to retrieve the system MAC address of the device.
  • intf.h now provides new methods to translate between kernel and EOS interface names.
  • In multithreaded applications, EOS SDK will now throw an exception if the agent does not grab a scoped lock before making an SDK call. This prevents race conditions when multiple threads attempt to use the SDK simultaneously.

Bugs fixes and improvements

  • API Change: bfd.h
    • New BFD_SESSION_TYPE_MICRORFC7130 value for bfd_session_type_t enumerated type.
  • API Change: mac_table.h
    • New MAC_ENTRY_EVPN_REMOTE_MAC and MAC_ENTRY_PEER_EVPN_REMOTE_MAC values for mac_entry_type_t enumerated type.
  • API Change: nexthop_group.h
    • New NEXTHOP_GROUP_IP value for nexthop_group_encap_t enumerated type, for IP type with no encapsulation.
  • ACLs that have not been committed are now no longer deleted when enabling counters or fragments with acl_counters_enabled_set() or acl_fragments_enabled_set() in acl.h
  • class_map.h now handles IPv6 match rules.
  • ip_route.h We now set the Nexthop Group name attribute of an ip_route_t in ip_route_set() if the route is already programmed with an existing
    ip_route_t if the Nexthop Group via ip_route_via_t exists. This reduces update churn.
  • ip_addr_mask_ts now print in a consistent format for both IPv4 and IPv6 address masks.
  • All SDK custom types now have hash functions.
  • Examples:
    • PolicyDemo.cpp has been cleaned up to use the API properly when setting class-maps and policy-maps via use of the persistent flag attribute.
  • Improvements to the API’s documentation.

EOS SDK v1.8.0

29 Mar 00:20
Compare
Choose a tag to compare

Resources

Features

  • A new bfd.h module that provides access to Bidirectional Forwarding Detection status and configuration, thereby allowing clients to monitor connectivity to their neighboring devices. Using these APIs, an EOS SDK agent can configure new BFD sessions and, most importantly, react to a session's connection status.
  • In mpls_route.h, new APIs expose handlers and getters for the LFIB. The new mpls_route_handler notifies clients when an MPLS route is added or removed from the switch's hardware tables, while the new status iterators and getters in the mpls_route_mgr let clients inspect the current state about which MPLS routes and vias are programmed into hardware.
  • New features in the fib.h module:
    • A fib_via_t now exposes the MPLS label for a via in the FIB.
    • VRF support.
  • An additional handler in policy_map.h, on_policy_map_config_set, that provides alerts when a Policy Map's configuration changes.
  • The acl.h now exposes the Nexthop group for the acl_rule_ip_t type.

Bugs fixes and improvements

  • API Change: lldp.h
    • This module is no longer in BETA.
    • Breaking change (from BETA release): all manager and handler methods now use lldp_neighbor_t instead of intf_id_t as an input parameter.
    • New lldp_neighbor_t and lldp_remote_system_t types, to identify a remote system seen from the local switch.
    • New iterators for remote systems, LLDP interfaces, and LLDP neighbors.
  • API Change: fib.h
    • New ROUTE_TYPE_OSPF3 value for fib_route_type_t enumerated type.
  • API Change: policy_map.h
    • policy_map_rule_t now has new policy_map_rule_type_t enumerated type and acl_rule_ip_t IP address attributes for matching class maps or raw match rules.
    • policy_action_t now has an attribute to store the VRF.
  • API Change: nexthop_group.h
    • New NEXTHOP_GROUP_MPLS_OVER_GRE value for nexthop_group_encap_t enumerated type.
  • Various examples:
    • RibToFibProfiler.cpp, which profiles the amount of time it takes for a route to be programmed in the FIB.
  • Improvements to the API’s documentation.

EOS SDK v1.7.0

14 Oct 00:49
Compare
Choose a tag to compare

Resources

Features

  • Greatly expand the mac_table.h module, including:
    • A new mac_table_handler that provides on_mac_entry_set() and on_mac_entry_del() callbacks when unicast MAC entries are learned or forgotten. This allows agents to take action when a MAC entry is programmed into hardware, both for dynamically learned and statically configured entries.
    • An expanded mac_table_mgr, which provides accessors and mutators to retrieve status about MAC entries, as well as modify the MAC address table.
  • Introduce a new hardware_table.h module that exposes the usage statistics for the various hardware tables used by the system. This is useful for agents that want to track how many entries are used or available across the various tables, either for monitoring purposes or so they can take specific actions when a table is close to becoming full. This module includes the following APIs:
    • A hardware_table_handler, which provides callbacks when the usage statistics for a single table/feature/chip combination update.
    • A hardware_table_mgr that provides iterators, accessors, and additional details for the various hardware tables on the system.
    • This modules is only compatible on EOS releases numbered 4.15.2F or greater, and is currently supported for a subset of Arista's platforms.
  • A new lldp.h module, currently in beta, which provides access to the switch's LLDP configuration and status. This includes:
    • A new lldp_handler class, containing handler methods to react to various changes advertised by a remote system, including the remote interface, version, and ip address, among other pieces of information.
    • A new lldp_mgr class, containing accessor and mutator methods to check the status of TLV entries and modify the set of TLVs.
  • Add utility methods on the eth_addr_t value type that let agents determine whether a MAC address is a unicast, multicast, or broadcast address.
  • Add a membership_del() method to eth_lag_intf_mgr.
  • Introduce a new ip_route_set(ip_route_t, ip_route_action_t) method that now takes a 'type' parameter. This optional hint lets the SDK program nexthop-group and drop routes more efficiently, if the agent knows in advance what type of vias will be associated with the route.
  • Add a new exists(vrf_name) method, which checks if a VRF has been configured.
  • Introduce a neighbor_table_iter manager method to iterate over configured neighbor entries.
  • Add the ability to flush the event_loop to ensure that all updates from the agent have made it to Sysdb. This is useful for event_loop scripts that want to make sure all updates have applied before exiting.
  • Expost the Management0 interface in both the intf.h and eth_intf.h modules.
  • Create a utility neighbor_key_t(ip_addr_t) constructor to make querying ARP entries easier.
  • Create a utility mpls_route_via_t constructor that takes a label action mpls_action_t.
  • Add examples to demonstrate usage of some of these new EOS SDK features.
  • Add a helper Python module at examples/eossdk_utils.py that provides debugging utilities for users developing Python agents.

Bugs fixes and improvements

  • API Change: The vrf.h module has been improved to maintain consistency with other EOS SDK APIs, and includes the following changes:
    • Deprecate the vrf() accessor and add a top level accessor to be more consistent with other managers.
    • Breaking change: new watch_vrf and watch_all_vrfs methods to enable or suppress handler events. Agents that wish to receive VRF status updates must now call watch_all_vrfs(true) or watch_vrf(vrf_name, true).
    • Bug fix: Our handlers now properly react to VRF status changes for VRFs that existed before the agent started up.
    • Remove VRF_CONFIGURED enum value.
    • The iterator has been simplified to yield the vrf_name and only iterates over configured entries.
  • API Change: The neighbor_table.h module has been improved to maintain consistency with other EOS SDK APIs, and includes the following changes:
    • Breaking change: new watch_neighbor_entry() and watch_all_neighbor_entries() methods to enable or suppress handler events. Agents that wish to receive status updates must now call watch_all_neighbor_entries(true).
    • Neighbor table accessors no longer panic, and instead return sane default values (for example, neighbor_entry_del() is now idempotent, and neighbor_entry() returns an empty neighbor_entry_t() if the entry does not exist.
  • API Change: Getter for ip_route_mgr now does not panic, and instead returns an empty ip_route_t() object.
  • Bug fix: We now suppress duplicate directflow_handler::on_flow_status notifications during internal state changes.
  • Bug fix: Properly fill-in the mpls_label_t for ip_route_via_t objects returned by ip_route_mgr::ip_route_via_iter().
  • Bug fix: The acl_rule_del() and acl_del() mutator functions have been fixed and now take effect after acl_commit().
  • Panic if an mpls_route_via_t object contains a MPLS_ACTION_POP action, but no hop is set.
  • Fix a potential deadlock when the agent receives a SIGINT or SIGTERM.
  • In ip_intf.h, the ip_addrs(intf_id_t) accessor now returns an empty set instead of panicking when an intf_id_t does not exist in the routing table.
  • The directflow.h module returns a new FLOW_STATUS_UNKNOWN enum value instead of panicking for unknown OpenFlow status.
  • Improvements to the API’s documentation.

v1.6.0

18 May 23:20
Compare
Choose a tag to compare

EOS SDK v1.6.0

Resources

Features

  • Make our various intf handlers more consistent. Previously, the SDK had no guarantees that an interface that was valid in one interface manager could also be used in a different manager upon interface creation. Now an interface that exists() for one manager consistently exists() for all other compatible managers. For example, when a new PortChannel is created, the on_*_intf_create() handlers for eth_lag_intf, eth_intf and intf will fire, and all of the methods those managers expose will work on the newly created interface. For more details, see the appendix at the bottom.
  • Introduce APIs to determine if a front panel port is physically present through the new eth_phy_intf.h's on_eth_phy_intf_hardware_present(...) handler and eth_phy_intf_mgr::hardware_present() accessor. This is useful for modular systems where physical interfaces can dynamically show up independent of when the configuration exists.
  • Add a counter() accessor to the nexthop_group.h module, which lets users access the per-entry byte and packet counters for a nexthop group.
  • Introduce handlers when a LAG interface is created or deleted in eth_lag_intf.
  • Add an accessor for getting existing decap group configuration in decap_group.h
  • Expose VXLAN type interfaces as interface type eos::INTF_TYPE_VXLAN
  • Add an exists() method to the subintf and eth_lag_intf managers.
  • Let users configure mpls_route_via_t's to bypass any configured egress ACLs with the skip_egress_acl() flag.
  • Add setters to eth_lag_intf.h's manager for updating a LAG's min_links, fallback_type, and fallback_timeout.
  • Add an exists() method to the subintf.h module.
  • Move to Swig 1.3.0, which generally improves our Python bindings.

Bugs and fixes

  • API Change: Interfaces now look at configuration to determine existence, and iterates over interfaces that have a valid configuration, as opposed to a status.
  • API Change: Re-organize the eth_lag_intf.h module. Contained in this set of changes is:
    • Introduce top level accessors for getting and setting attributes of a port channel, instead of returning large status objects. We've made this change to be more consistent with our other managers and to make this module easier to use.
    • Remove the cumbersome eth_lag_intf_ prefix to manager methods. The old methods still exist, but are now deprecated, and now names are much more succinct, i.e. lag_mgr->membership_status(...) instead of lag_mgr->eth_lag_intf_membership_status(...). This also applies to the member_mode and member_priority accessors.
    • eth_lag_intf_membership_t and eth_lag_intf_t are now deprecated, as we now have top level accessors for their corresponding data. Additionally we've removed their mutator functions. These types have always been read-only, but previously had useless setters for its attributes. A new constructor lets this type be created in one shot instead of using the setters.
    • eth_lag_intf_is() now has a void return type, consistent with our other manager's.
  • Properly expose nexthop group vias and drop vias in the ip_route_via_iter_t. Previously, this iterator would sometimes omit these routes
  • Properly set decap_group_t's persistent() flag on read.
  • Increase the maximum nexthopgroup name size to 256 characters.
  • Improvements to the ip_intf.h module, including supporting internal_vlan_id() for VLAN interfaces, letting users call ip_addr_is() with overlapping subsets of IPv4 addresses over subsequent calls, and suppressing duplicate on_ip_addr_add handler events in certain circumstances.
  • More robust handling of our internal interface types. Previously, certain internal interfaces could cause an agent crash when their state changed.
  • Make tracing.h's methods const.
  • Move the enum mgr_mode_type_t's definition from base.h to types/sdk.h, and make the enum accessible from Python
  • Make Python handle SIGTERM properly. Previously Python agents would not respond Ctrl-C, now Python gracefully exit on SIGTERM and SIGINT. These default signal handlers can be overridden using the Linux signal() APIs, and can be manually invoked by sdk.h's new default_signal_handler method.
  • Produce a Python stack trace when a Python exception bubbles up from a handler.
  • More consistent usage of exceptions when agents make invalid SDK calls.
  • Better internal tracing (which are visible by changing the agent's trace settings to include EosSdk*)
  • Improve comments throughout our header files.

Appendix: Interface interaction

The following table shows which interface types are compatible with which manager:

Example intf eos::INTF_TYPE intf_mgr eth_intf_mgr eth_phy_intf eth_lag_intf_mgr subintf_mgr
Ethernet3/1 _ETH X X X
Management1 _ETH X X X
Port-Chanel6 _LAG X X X
Ethernet2.2 inherited X X X
Vlan3 _VLAN X X
Vxlan8 _VXLAN X X
Loopback2 _LOOPBACK X

Null0 and the Cpu interfaces are symbolic, and are not compatible with any interface manager. Subinterfaces may be of type _ETH or _LAG, and can be identified using the intf_id_t::is_subintf() accessor.

The example output of a simple agent that just traces all handler activity it sees, for various interfaces. The lines preceded by ! were the CLI commands that triggered the following traces. As you can see, when an interface is created, all of the corresponding manager's on_intf_create methods also fire. The order is from the most specific manager to the least specific manager.

===== Output from /mnt/flash/IntfReactor [] (PID=13234) started May 17 14:44:12 ===
2015-05-17 14:44:13.683743 13234 IntfReactor          0 Agent initialized

! lf202(config)#int vlan3
2015-05-17 14:44:43.493104 13234 IntfReactor          0 on_eth_intf_create(Vlan3)
2015-05-17 14:44:43.493978 13234 IntfReactor          0 on_intf_create(Vlan3)

! lf202(config-if-Po5)#
2015-05-17 14:45:12.463805 13234 IntfReactor          0 on_eth_lag_intf_create(Port-Channel5)
2015-05-17 14:45:12.464738 13234 IntfReactor          0 on_eth_intf_create(Port-Channel5)
2015-05-17 14:45:12.465467 13234 IntfReactor          0 on_intf_create(Port-Channel5)

! lf202(config-if-Po5)#int et2
! lf202(config-if-Et2)#channel-group 5 mode on
2015-05-17 14:46:02.337321 13234 IntfReactor          0 LAG Port-Channel5 added member Ethernet2
2015-05-17 14:46:02.337522 13234 IntfReactor          0 LAG Port-Channel5 changed speed to 10000

! lf202(config-if-Et2)#no channel-group 5
2015-05-17 14:46:29.452142 13234 IntfReactor          0 LAG Port-Channel5 removed member Ethernet2
2015-05-17 14:46:29.452325 13234 IntfReactor          0 LAG Port-Channel5 changed speed to 0

! lf202(config)#int et2.2
2015-05-17 14:46:56.842031 13234 IntfReactor          0 on_eth_intf_create(Ethernet2.2)
2015-05-17 14:46:56.842862 13234 IntfReactor          0 on_intf_create(Ethernet2.2)

v1.5.4

18 May 23:15
Compare
Choose a tag to compare

EOS SDK v1.5.4

Features

  • Add a handler and accessor for interface descriptions in intf.h. Agents can now react to a description changing via on_intf_description and retrieve an interface's current description via intf_mgr->description(eos::intf_id_t("Ethe\ rnet1"))
  • Add a on_eth_phy_intf_link_speed handler in eth_phy_intf.h, which notifies agents when a front panel port changes its link speed.
  • Introduce a new API in eos/sdk.h: eos::internal_connection_buffer_size_is, which lets users increase the size of the internal buffer used for enqueuing state updates. This API should be used by clients that need to dump a lot of updates to Sysdb without yielding to the event loop (i.e. programming 60,000 new routes). This API should only be used by clients that need it; in upcoming releases large batch updates will be handled by the EOS SDK infrastructure without needing this work-around.

Bugs and fixes

  • Make exists() for interfaces consistent within intf.h and eth_intf.h. Previously there was a race between when an interface was created (causing on_intf_create and on_eth_intf_create to fire) and when exists() would be true. Now exists() will be true whenever the interface has been created.
  • Fix route insertion during mpls_route.h's resync mode. Previously, if you re-added a route during resync mode, it would delete any existing vias that you had already added. For example, if an agent added route1, via1 and then re-added route1, then via1 would be removed from the final set. Now vias added during resync will not be deleted on route re-entry.
  • Make attributes represented by a std::forward_list usable from Python. For example, a eossdk.FibFec() can now be used via the Python bindings.

v1.5.3

18 May 23:14
Compare
Choose a tag to compare

EOS SDK v1.5.3

Features

  • Introduce accessors for reading custom statuses that the agent previously set. In eos/agent.h, we've added a status(key) and status_iter() method for retrieving previously set statuses. This may be useful for agents who want to store data across agent restarts. Note that this data will not persist across reboots.
  • Add an agent_option_iter() method in eos/agent.h to let users read all options currently set.
  • Add a new on_lag_intf_speed handler in eos/eth_lag_intf.h. This handler is fired when the operational speed of a LAG (or Port-Channel) interface is updated.
  • Introduce support for Custom CLI Plugins. Users can now define their own CLIs and use EOS SDK bindings to set and read state from Sysdb. Future releases will contain examples and documentation regarding this feature.
  • Add a hash() function to intf_id_ts.

Bugs and fixes

  • API change: A LAG's speed in megabits is now represented by a uint64_t rather than a double. This is a compatible change, but requires existing agents to be re-compiled against the new headers.
  • API change: Deprecated headers in eos/gopenflow.h have been removed, as they are now superseded by the APIs exposed in eos/agent.h.
  • No longer trigger duplicate on_oper_status(INTF_OPER_DOWN) notifications when a LAG's operational status changes between internal values.
  • No longer automatically invoke LAG handlers for pre-existing LAGs on agent initialization.
  • LAG handlers are properly bound to pre-existing LAGs after an agent restart.
  • Eliminated unecessary churn when resyncing pre-existing routes that point to a nexthop-group via. Previously, a resync in this scenario would cause the route and via to be erased and then re-entered, now this is effectively a no-op.
  • Python bindings: if a hash() is defined on a value type, use that function in the __hash__() function. Previously the expression len(set([eossdk.IntfId("Ethernet1"), eossdk.IntfId("Ethernet1")])) reported the length of the set as 2. With this fix, both interfaces have the same hash value and the length is correctly reported as 1.