OpenIxia / ixnetwork_restpy

The IxNetwork python client.
https://openixia.github.io/ixnetwork_restpy/#/
MIT License
30 stars 16 forks source link

AresOne - how to disable AutoInstrumentation ? #23

Closed priteshjmodi closed 4 years ago

priteshjmodi commented 4 years ago

Hi there,

I am trying to completely disable auto instrumentation on a traffic item. In the IxExplorer GUI, I can see the option and remove it. Please let me know how to completely disable AutoInstrumentation from scripts.

image

But when I try to setup this via restpy script using below option, it does not work.

/usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:794: ------------------------------------------

          self.vports_obj[vport_name].L1Config.AresOneFourHundredGigLan.AutoInstrumentation = 'endOfFrame'
            File "/usr/local/lib/python2.7/dist-packages/ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/l1config/aresonefourhundredgiglan/aresonefourhundredgiglan.py", line 47, in AutoInstrumentation
                self._set_attribute('autoInstrumentation', value)
                  File "/usr/local/lib/python2.7/dist-packages/ixnetwork_restpy/base.py", line 141, in _set_attribute
                      raise e
                      BadRequestError: Port does not support 'endOfFrame'
ajbalogh commented 4 years ago

Remove all traffic item tracking to disable instrumentation.

image

from ixnetwork_restpy import SessionAssistant

session_assistant = SessionAssistant(IpAddress='127.0.0.1', RestPort=11009, ClearConfig=True) vport1 = session_assistant.Ixnetwork.Vport.add() vport2 = session_assistant.Ixnetwork.Vport.add() traffic1 = session_assistant.Ixnetwork.Traffic.TrafficItem.add(TrafficType='raw') traffic1.EndpointSet.add(Sources=vport1.Protocols.find(), Destinations=vport2.Protocols.find()) tracking = traffic1.Tracking.find() tracking.TrackBy = []

priteshjmodi commented 4 years ago

Thank you! It works.