Closed NickKeating closed 6 years ago
Hi Nick,
I think you're using an older version of IxNetwork, which doesn't have the stackTypeId key. I analyzed the API and I agree displayName is better to use and I enhanced this API so it prints all the packet header names out to show users the spelling so they could enter it properly in order to get the stack object handle. Please pull an update.
Thanks, Hubert
Hi,
I am using the 'modifyTrafficItemIpPriorityTos' function in IxNetRestApiTraffic.py to configure different ToS values across a number of traffic streams..
In the function 'getTrafficItemPktHeaderStackObj', the following call is made:
The subsequent 'for' loop then references the dictionary key 'stackTypeId' (eachStack['stackTypeId']) which is not a valid key in the response of this call, resulting in a KeyError.
Sample of dictionaries returned in the list:
I have the following patch file that is applied during my packaging process that modifies the
eachStack['stackTypeId']
toeachStack['displayName']
within this snippet to get the function to work as I think it is intended.Thanks, Nick