Closed narasimha928 closed 3 years ago
The value in vport['Port_1'] is <ixnetwork_restpy.testplatform.sessions.ixnetwork.vport.vport.Vport at 0x7ffb71b172d0> which is RestPy Ixnetwork.Vport object. You can print out the attribute of this object with print(). You can try print(vport['Port_1']). It should show all the attributes and their values:
Please check https://openixia.github.io/ixnetwork_restpy/#/ for sample scripts and API reference guide.
Thanks a lot for the feedback.i will check it.
On Wed, Sep 9, 2020 at 5:39 PM therkong notifications@github.com wrote:
Closed #116 https://github.com/OpenIxia/IxNetwork/issues/116.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/OpenIxia/IxNetwork/issues/116#event-3748368266, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE7Y3H5AUNL56U2WMVHAWSDSFAN4TANCNFSM4QMLSVMA .
Hi Team,
I am using Ixia RestPy for automation. during the automation i observed vport is a dict and it is returing key:val and val is a object. How would i know what values does it contain. Please let me know.
In [31]: vport
Out[31]: {'Port_1': <ixnetwork_restpy.testplatform.sessions.ixnetwork.vport.vport.Vport at 0x7ffb71b172d0>, 'Port_2': <ixnetwork_restpy.testplatform.sessions.ixnetwork.vport.vport.Vport at 0x7ffb71932b88>}
isinstance(vport['Port_1'],object)
Here Poet_1 is a key and val is a object.
Thanks Narasimha