Skip to content

v1.6.0

Compare
Choose a tag to compare
@rmadsen rmadsen released this 18 May 23:20
· 223 commits to master since this release

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)