OpenIxia / IxNetwork

A central location for IxNetwork sample scripts and utilities. Please also visit http://openixia.com
MIT License
51 stars 59 forks source link

Loadconfig.py not able to find the rfcquicktest object/href #122

Closed raghavendrachari08 closed 3 years ago

raghavendrachari08 commented 3 years ago

Hi , Am using the loadConfig.py to load ixia config file, it is loading properly in to the IxNetwork but when am trying to fetch the object using ixnetwork.QuickTest.Rfc2544Throughput.find(), it is returning empty object. When i used to check it under API browser it exist, but using the resypy am not able to fetch the rfctest object.

Running Traffic without DUT configuration 2020-12-25 14:55:55 [ixnetwork_restpy.connection] [INFO] using python version 3.9.1 (tags/v3.9.1:1e5d33e, Dec 7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)] 2020-12-25 14:55:55 [ixnetwork_restpy.connection] [INFO] using ixnetwork-restpy version 1.0.60 2020-12-25 14:55:55 [ixnetwork_restpy.connection] [WARNING] Verification of certificates is disabled 2020-12-25 14:55:55 [ixnetwork_restpy.connection] [INFO] Determining the platform and rest_port using the 127.0.0.1 address... 2020-12-25 14:55:55 [ixnetwork_restpy.connection] [INFO] Connection established to http://127.0.0.1:11009 on windows 2020-12-25 14:55:55 [ixnetwork_restpy.connection] [DEBUG] POST http://127.0.0.1:11009/api/v1/auth/session {"username": "admin", "password": "admin"} 2020-12-25 14:55:55 [ixnetwork_restpy.connection] [DEBUG] POST https://127.0.0.1:11009/api/v1/auth/session {"username": "admin", "password": "admin"} 2020-12-25 14:55:55 [ixnetwork_restpy.connection] [DEBUG] 200 OK b'{"apiKey":"00000000000000000000000000000000","sessionName":"ixnetwork","sessionId":"00000000-0000-0000-0000-000000000000","username":"admin","userAccountUrl":""}' 2020-12-25 14:55:55 [ixnetwork_restpy.connection] [DEBUG] POST https://127.0.0.1:11009/api/v1/sessions {"applicationType": "ixnrest"} 2020-12-25 14:55:55 [ixnetwork_restpy.connection] [DEBUG] 201 Created b'{"id":1,"applicationType":"ixnetwork","backendType":"ixnetwork","userId":"00000000-0000-0000-0000-000000000000","userName":"","state":"ACTIVE","subState":null,"createdOn":"12/25/2020 14:54:42","startedOn":"12/25/2020 14:54:42","stoppedOn":null,"testInfo":null,"mwSdmPath":null,"mwSdmProcessId":1840,"mwSdmIpAddress":"127.0.0.1","mwSdmPort":52729,"loadConfig":null,"debugTrace":false,"links":[{"rel":"self","method":"GET","href":"/api/v1/sessions/1"}]}' 2020-12-25 14:55:55 [ixnetwork_restpy.connection] [DEBUG] GET https://127.0.0.1:11009/api/v1/sessions/1 2020-12-25 14:55:55 [ixnetwork_restpy.connection] [DEBUG] 200 OK b'{"id":1,"applicationType":"ixnetwork","backendType":"ixnetwork","userId":"00000000-0000-0000-0000-000000000000","userName":"","state":"ACTIVE","subState":null,"createdOn":"12/25/2020 14:54:42","startedOn":"12/25/2020 14:54:42","stoppedOn":null,"testInfo":null,"mwSdmPath":null,"mwSdmProcessId":1840,"mwSdmIpAddress":"127.0.0.1","mwSdmPort":52729,"loadConfig":null,"debugTrace":false}' 2020-12-25 14:55:55 [ixnetwork_restpy.connection] [DEBUG] GET https://127.0.0.1:11009/api/v1/sessions/1/ixnetwork/globals 2020-12-25 14:55:56 [ixnetwork_restpy.connection] [DEBUG] 200 OK b'{"configFileName":"C:\\Users\\guest\\AppData\\Local\\Ixia\\IxNetwork\\data\\NewConfig.guest.1840.ixncfg","username":"IxNetwork/DESKTOP-9BTQL0J/guest","ixosBuildNumber":"not installed","configSummary":[{"arg1":"Module","arg2":"IxNetwork Version","arg3":[{"arg1":"Created With","arg2":"9.05.2001.10"}]}],"commandArgs":"IxNetwork.exe -tclPort 8020 -restPort 11009 -restonallinterfaces","protocolbuildNumber":"9.05.2001.34","buildNumber":"9.05.2001.10","persistencePath":"C:\\Users\\guest\\AppData\\Local\\Ixia\\IxNetwork","isConfigDifferent":true,"links":[{"rel":"self","method":"GET","href":"/api/v1/sessions/1/ixnetwork/globals"},{"rel":"meta","method":"OPTIONS","href":"/api/v1/sessions/1/ixnetwork/globals"}]}' 2020-12-25 14:55:56 [ixnetwork_restpy.connection] [INFO] Using IxNetwork api server version 9.05.2001.10 2020-12-25 14:55:56 [ixnetwork_restpy.connection] [INFO] User info IxNetwork/DESKTOP-9BTQL0J/guest 2020-12-25 14:55:56 [ixnetwork_restpy.connection] [DEBUG] GET https://127.0.0.1:11009/api/v1/sessions/1/ixnetwork 2020-12-25 14:55:56 [ixnetwork_restpy.connection] [DEBUG] 200 OK b'{"links":[{"rel":"self","method":"GET","href":"/api/v1/sessions/1/ixnetwork/"},{"rel":"meta","method":"OPTIONS","href":"/api/v1/sessions/1/ixnetwork/"}]}' 2020-12-25 14:55:56 [ixnetwork_restpy.connection] [DEBUG] POST https://127.0.0.1:11009/api/v1/sessions/1/ixnetwork/operations/newconfig 2020-12-25 14:55:57 [ixnetwork_restpy.connection] [DEBUG] 202 Accepted b'{"executionTimeMs":1560.0,"id":"","state":"SUCCESS","progress":100,"message":null,"url":"","resultUrl":"","result":"kVoid"}' 2020-12-25 14:55:57 [ixnetwork_restpy.connection] [DEBUG] POST https://127.0.0.1:11009/api/v1/sessions/1/ixnetwork/files?filename=THOR_B0.ixncfg 2020-12-25 14:55:57 [ixnetwork_restpy.connection] [DEBUG] 201 Created b'{"absolute":null,"files":[{"name":"THOR_B0.ixncfg","length":137634,"modifiedUnixTime":1608879358,"createdUnixTime":1608510796}],"directories":[]}' 2020-12-25 14:55:57 [ixnetwork_restpy.connection] [DEBUG] POST https://127.0.0.1:11009/api/v1/sessions/1/ixnetwork/operations/loadconfig {"Arg1": "THOR_B0.ixncfg"} 2020-12-25 14:56:02 [ixnetwork_restpy.connection] [DEBUG] 202 Accepted b'{"executionTimeMs":5000.0,"id":"1","state":"IN_PROGRESS","progress":0,"message":null,"url":"/api/v1/sessions/1/ixnetwork/operations/loadconfig/1","resultUrl":"","result":null}' 2020-12-25 14:56:03 [ixnetwork_restpy.connection] [DEBUG] GET https://127.0.0.1:11009/api/v1/sessions/1/ixnetwork/operations/loadconfig/1 2020-12-25 14:56:03 [ixnetwork_restpy.connection] [DEBUG] 200 OK b'{"executionTimeMs":6003.0,"id":"1","state":"IN_PROGRESS","progress":0,"message":null,"url":"/api/v1/sessions/1/ixnetwork/operations/loadconfig/1","resultUrl":"","result":null}' 2020-12-25 14:56:04 [ixnetwork_restpy.connection] [DEBUG] GET https://127.0.0.1:11009/api/v1/sessions/1/ixnetwork/operations/loadconfig/1 2020-12-25 14:56:04 [ixnetwork_restpy.connection] [DEBUG] 200 OK b'{"executionTimeMs":6356.0,"id":"1","state":"SUCCESS","progress":100,"message":null,"url":"/api/v1/sessions/1/ixnetwork/operations/loadconfig/1","resultUrl":"","result":"kVoid"}' 2020-12-25 14:56:04 [ixnetwork_restpy.connection] [DEBUG] POST https://127.0.0.1:11009/api/v1/sessions/1/ixnetwork/operations/select {"selects": [{"from": "/api/v1/sessions/1/ixnetwork/", "properties": [], "children": [{"child": "quickTest", "properties": [""], "filters": []}], "inlines": []}]} 2020-12-25 14:56:04 [ixnetwork_restpy.connection] [DEBUG] 202 Accepted b'{"executionTimeMs":37.0,"id":"","state":"SUCCESS","progress":100,"message":null,"url":"","resultUrl":"","result":[{"href":"/api/v1/sessions/1/ixnetwork","quickTest":{"href":"/api/v1/sessions/1/ixnetwork/quickTest"}}]}' 2020-12-25 14:56:04 [ixnetwork_restpy.connection] [DEBUG] POST https://127.0.0.1:11009/api/v1/sessions/1/ixnetwork/operations/select {"selects": [{"from": "/api/v1/sessions/1/ixnetwork/quickTest", "properties": [], "children": [{"child": "rfc2544throughput", "properties": [""], "filters": []}], "inlines": []}]} 2020-12-25 14:56:04 [ixnetwork_restpy.connection] [DEBUG] 202 Accepted b'{"executionTimeMs":3.0,"id":"","state":"SUCCESS","progress":100,"message":null,"url":"","resultUrl":"","result":[{"href":"/api/v1/sessions/1/ixnetwork/quickTest"}]}'

please see the image below showing rfcthroughput config under restapi

image

therkong commented 3 years ago

Hi,

Try ixnetwork.QuickTest.Rfc2544Throughput.find() instead of ixnetwork.QuickTest.Rfc2544Throughputtest.find()

This worked for me: tputtest = ixNetwork.QuickTest.Rfc2544throughput.find() print(tputtest) Rfc2544throughput[0]: /api/v1/sessions/1/ixnetwork/quickTest/rfc2544throughput/1 ForceApplyQTConfig: True InputParameters: {} Mode: existingMode Name: QuickTest1

raghavendrachari08 commented 3 years ago

Sorry for typo Rfc2544Throughputtest i used Rfc2544Throughput.find() only, but it is throwing error what i mentioned above description.

therkong commented 3 years ago

Do you have RFC2544 test configured in the config? Can you open a support ticket by sending email to support.ix@keysight.com with your ixNetwork activation code?
Please send in the config file that you're using. We need to take a look at your config.

raghavendrachari08 commented 3 years ago

THOR_B1_RFC2544.zip Please find the config file attached.

therkong commented 3 years ago

Hi, I tried with your config. I can load it and run the loadQuickTest.py script. ixNetwork.QuickTest.Rfc2544throughput.find() returns the quickTestObj handle.

To debug further, can you open a support ticket by sending email to support.ix@keysight.com with your ixNetwork activation code? or you can send me an email with ixNetwork activation code. My email is theresa.kong@keysight.com.

therkong commented 3 years ago

This needs to be debugged by support team member.