did some more testing and realized our script was clearing the config (applying an empty config) before checking the chassis properties. so the issue seems to be that clearing the config does not clear the chassis/location object anymore
def enable_latency_stats(traffic_api: snappi.Api, config:snappi.snappi.Config):
# if setup is not UHD, enable latency stats
traffic_api.set_config(traffic_api.config())
ixn_session = traffic_api.assistant.Session.Ixnetwork
chassis = ixn_session.AvailableHardware.Chassis.find()
try:
chassis.href #only UHD has an empty session prepopulated with a chassis
except:
print("Enabling latency metrics")
for flow in config.flows:
flow.metrics.latency.enable = True
did some more testing and realized our script was clearing the config (applying an empty config) before checking the chassis properties. so the issue seems to be that clearing the config does not clear the chassis/location object anymore
Originally posted by @dgalan-xxia in https://github.com/open-traffic-generator/snappi-ixnetwork/issues/496#issuecomment-1063487813