Giter Site home page Giter Site logo

Comments (10)

muthvar1 avatar muthvar1 commented on September 26, 2024

JFYI: I did'nt put the whole code. But I do have the username,pwd,port etc initialized

if osPlatform == 'linux':
platform = 'linux'
apiServerIp = '10.23.239.233'
apiServerPort = 443
username = 'admin'
password = 'admin'

from ixnetwork.

whandjr avatar whandjr commented on September 26, 2024

It may not matter, but i assume you passed the point of starting traffic? My guess is there is no data if traffic is never started.

from ixnetwork.

ajbalogh avatar ajbalogh commented on September 26, 2024

from ixnetwork.

muthvar1 avatar muthvar1 commented on September 26, 2024

Hi Wes,
Yes, I did start traffic earlier.

Andy,
Like I mentioned during our webex. For backward compatibility with a lot of our scripts we need to use the csv snapshot, which is what consumers of the ixia infra expect.
I will attach the restpy log

from ixnetwork.

muthvar1 avatar muthvar1 commented on September 26, 2024

RestPy Log

2019-03-08 23:05:09 [ixnetwork_restpy.connection] [INFO] using python version 2.7.8 (default, Jun 30 2015, 14:28:51)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-11)]
2019-03-08 23:05:09 [ixnetwork_restpy.connection] [WARNING] ixnetwork-restpy not installed using pip, unable to determine version
2019-03-08 23:05:10 [ixnetwork_restpy.connection] [DEBUG] POST https://10.23.239.233:443/api/v1/auth/session {"username": "admin", "password": "admin"}
2019-03-08 23:05:10 [ixnetwork_restpy.connection] [DEBUG] 307 Temporary Redirect
2019-03-08 23:05:10 [ixnetwork_restpy.connection] [DEBUG] POST https://10.23.239.233:443/platform/api/v1/auth/session?redirectedFromDeprecatedApi=true {"username": "admin", "password": "admin"}
2019-03-08 23:05:11 [ixnetwork_restpy.connection] [DEBUG] 200 OK
2019-03-08 23:05:36 [ixnetwork_restpy.connection] [DEBUG] GET https://10.23.239.233:443/api/v1/sessions None
2019-03-08 23:05:36 [ixnetwork_restpy.connection] [DEBUG] 200 OK
2019-03-08 23:06:26 [ixnetwork_restpy.connection] [DEBUG] GET https://10.23.239.233/ixnetworkweb/api/v1/sessions/3/ixnetwork/globals None
2019-03-08 23:06:29 [ixnetwork_restpy.connection] [DEBUG] 200 OK
2019-03-08 23:06:29 [ixnetwork_restpy.connection] [DEBUG] GET https://10.23.239.233/ixnetworkweb/api/v1/sessions/3/ixnetwork None
2019-03-08 23:06:29 [ixnetwork_restpy.connection] [DEBUG] 200 OK
2019-03-08 23:06:29 [ixnetwork_restpy.connection] [DEBUG] GET https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/files None
2019-03-08 23:06:29 [ixnetwork_restpy.connection] [DEBUG] 200 OK
2019-03-08 23:06:29 [ixnetwork_restpy.connection] [DEBUG] POST https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/operations/select {"selects": [{"inlines": [], "from": "/api/v1/sessions/3/ixnetwork/", "properties": [], "children": [{"properties": [""], "filters": [], "child": "statistics"}]}]}
2019-03-08 23:06:29 [ixnetwork_restpy.connection] [DEBUG] 202 Accepted
2019-03-08 23:06:29 [ixnetwork_restpy.connection] [DEBUG] POST https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/operations/select {"selects": [{"inlines": [], "from": "/api/v1/sessions/3/ixnetwork/statistics", "properties": [], "children": [{"properties": ["
"], "filters": [{"regex": "^Flow Statistics$", "property": "caption"}], "child": "view"}]}]}
2019-03-08 23:06:29 [ixnetwork_restpy.connection] [DEBUG] 202 Accepted
2019-03-08 23:06:29 [ixnetwork_restpy.connection] [DEBUG] POST https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/operations/select {"selects": [{"inlines": [], "from": "/api/v1/sessions/3/ixnetwork/statistics/view/14", "properties": [], "children": [{"properties": [""], "filters": [], "child": "data"}]}]}
2019-03-08 23:06:29 [ixnetwork_restpy.connection] [DEBUG] 202 Accepted
2019-03-08 23:06:45 [ixnetwork_restpy.connection] [DEBUG] POST https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/operations/select {"selects": [{"inlines": [], "from": "/api/v1/sessions/3/ixnetwork/statistics", "properties": [], "children": [{"properties": ["
"], "filters": [], "child": "csvSnapshot"}]}]}
2019-03-08 23:06:45 [ixnetwork_restpy.connection] [DEBUG] 202 Accepted
2019-03-08 23:06:45 [ixnetwork_restpy.connection] [DEBUG] PATCH https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/statistics/csvSnapshot {"csvStringQuotes": false}
2019-03-08 23:06:45 [ixnetwork_restpy.connection] [DEBUG] 200 OK
2019-03-08 23:06:45 [ixnetwork_restpy.connection] [DEBUG] POST https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/operations/select {"selects": [{"inlines": [], "from": "/api/v1/sessions/3/ixnetwork/statistics", "properties": [], "children": [{"properties": [""], "filters": [], "child": "csvSnapshot"}]}]}
2019-03-08 23:06:45 [ixnetwork_restpy.connection] [DEBUG] 202 Accepted
2019-03-08 23:06:45 [ixnetwork_restpy.connection] [DEBUG] PATCH https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/statistics/csvSnapshot {"snapshotViewContents": "allPages"}
2019-03-08 23:06:45 [ixnetwork_restpy.connection] [DEBUG] 200 OK
2019-03-08 23:06:45 [ixnetwork_restpy.connection] [DEBUG] POST https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/operations/select {"selects": [{"inlines": [], "from": "/api/v1/sessions/3/ixnetwork/statistics", "properties": [], "children": [{"properties": ["
"], "filters": [], "child": "csvSnapshot"}]}]}
2019-03-08 23:06:45 [ixnetwork_restpy.connection] [DEBUG] 202 Accepted
2019-03-08 23:06:45 [ixnetwork_restpy.connection] [DEBUG] PATCH https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/statistics/csvSnapshot {"snapshotViewCsvGenerationMode": "overwriteCSVFile"}
2019-03-08 23:06:45 [ixnetwork_restpy.connection] [DEBUG] 200 OK
2019-03-08 23:06:45 [ixnetwork_restpy.connection] [DEBUG] POST https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/operations/select {"selects": [{"inlines": [], "from": "/api/v1/sessions/3/ixnetwork/statistics", "properties": [], "children": [{"properties": [""], "filters": [], "child": "csvSnapshot"}]}]}
2019-03-08 23:06:45 [ixnetwork_restpy.connection] [DEBUG] 202 Accepted
2019-03-08 23:06:45 [ixnetwork_restpy.connection] [DEBUG] PATCH https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/statistics/csvSnapshot {"csvLocation": "/root/.local/share/Ixia/sdmStreamManager/common"}
2019-03-08 23:06:46 [ixnetwork_restpy.connection] [DEBUG] 200 OK
2019-03-08 23:06:46 [ixnetwork_restpy.connection] [DEBUG] POST https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/operations/select {"selects": [{"inlines": [], "from": "/api/v1/sessions/3/ixnetwork/statistics", "properties": [], "children": [{"properties": ["
"], "filters": [], "child": "csvSnapshot"}]}]}
2019-03-08 23:06:46 [ixnetwork_restpy.connection] [DEBUG] 202 Accepted
2019-03-08 23:06:46 [ixnetwork_restpy.connection] [DEBUG] PATCH https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/statistics/csvSnapshot {"csvName": "ixnetwork.restpy.Flow Statistics"}
2019-03-08 23:06:46 [ixnetwork_restpy.connection] [DEBUG] 200 OK
2019-03-08 23:06:46 [ixnetwork_restpy.connection] [DEBUG] POST https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/operations/select {"selects": [{"inlines": [], "from": "/api/v1/sessions/3/ixnetwork/statistics", "properties": [], "children": [{"properties": [""], "filters": [], "child": "csvSnapshot"}]}]}
2019-03-08 23:06:46 [ixnetwork_restpy.connection] [DEBUG] 202 Accepted
2019-03-08 23:06:46 [ixnetwork_restpy.connection] [DEBUG] PATCH https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/statistics/csvSnapshot {"views": ["/api/v1/sessions/3/ixnetwork/statistics/view/14"]}
2019-03-08 23:06:46 [ixnetwork_restpy.connection] [DEBUG] 200 OK
2019-03-08 23:06:46 [ixnetwork_restpy.connection] [DEBUG] POST https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/operations/select {"selects": [{"inlines": [], "from": "/api/v1/sessions/3/ixnetwork/statistics", "properties": [], "children": [{"properties": ["
"], "filters": [], "child": "csvSnapshot"}]}]}
2019-03-08 23:06:46 [ixnetwork_restpy.connection] [DEBUG] 202 Accepted
2019-03-08 23:06:46 [ixnetwork_restpy.connection] [DEBUG] POST https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/statistics/csvSnapshot/operations/takecsvsnapshot {"Arg1": "/api/v1/sessions/3/ixnetwork/statistics/csvSnapshot"}
2019-03-08 23:06:51 [ixnetwork_restpy.connection] [DEBUG] 202 Accepted
2019-03-08 23:06:52 [ixnetwork_restpy.connection] [DEBUG] GET https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/statistics/csvSnapshot/operations/takecsvsnapshot/11 None
2019-03-08 23:06:52 [ixnetwork_restpy.connection] [DEBUG] 200 OK
2019-03-08 23:06:53 [ixnetwork_restpy.connection] [DEBUG] GET https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/statistics/csvSnapshot/operations/takecsvsnapshot/11 None
2019-03-08 23:06:53 [ixnetwork_restpy.connection] [DEBUG] 200 OK
2019-03-08 23:06:54 [ixnetwork_restpy.connection] [DEBUG] GET https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/statistics/csvSnapshot/operations/takecsvsnapshot/11 None
2019-03-08 23:06:55 [ixnetwork_restpy.connection] [DEBUG] 200 OK
2019-03-08 23:06:56 [ixnetwork_restpy.connection] [DEBUG] GET https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/statistics/csvSnapshot/operations/takecsvsnapshot/11 None
2019-03-08 23:06:56 [ixnetwork_restpy.connection] [DEBUG] 200 OK
2019-03-08 23:06:57 [ixnetwork_restpy.connection] [DEBUG] GET https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/statistics/csvSnapshot/operations/takecsvsnapshot/11 None
2019-03-08 23:06:57 [ixnetwork_restpy.connection] [DEBUG] 200 OK
2019-03-08 23:06:58 [ixnetwork_restpy.connection] [DEBUG] GET https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/statistics/csvSnapshot/operations/takecsvsnapshot/11 None
2019-03-08 23:06:58 [ixnetwork_restpy.connection] [DEBUG] 200 OK
2019-03-08 23:06:59 [ixnetwork_restpy.connection] [DEBUG] GET https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/statistics/csvSnapshot/operations/takecsvsnapshot/11 None
2019-03-08 23:06:59 [ixnetwork_restpy.connection] [DEBUG] 200 OK
2019-03-08 23:07:00 [ixnetwork_restpy.connection] [DEBUG] GET https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/statistics/csvSnapshot/operations/takecsvsnapshot/11 None
2019-03-08 23:07:00 [ixnetwork_restpy.connection] [DEBUG] 200 OK
2019-03-08 23:07:00 [ixnetwork_restpy.connection] [DEBUG] POST https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/operations/select {"selects": [{"inlines": [], "from": "/api/v1/sessions/3/ixnetwork/statistics", "properties": [], "children": [{"properties": ["*"], "filters": [], "child": "csvSnapshot"}]}]}
2019-03-08 23:07:00 [ixnetwork_restpy.connection] [DEBUG] 202 Accepted
~
~
~
~
~
~

from ixnetwork.

ajbalogh avatar ajbalogh commented on September 26, 2024

from ixnetwork.

muthvar1 avatar muthvar1 commented on September 26, 2024

I don't think so right? I though you could enumerate only rows. statsview class initilization only returns a statsview object right? I think .rows is an iterator

print stats
2019-03-08 23:58:53 [ixnetwork_restpy.connection] [DEBUG] POST https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/operations/select {"selects": [{"in
2019-03-08 23:58:53 [ixnetwork_restpy.connection] [DEBUG] POST https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/operations/select {"selects": [{"in
lines": [], "from": "/api/v1/sessions/3/ixnetwork/statistics", "properties": [], "children": [{"properties": [""], "filters": [], "child": "csvSnapshot
2019-03-08 23:58:54 [ixnetwork_restpy.connection] [DEBUG] POST https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/operations/select {"selects": [{"in
lines": [], "from": "/api/v1/sessions/3/ixnetwork/statistics", "properties": [], "children": [{"properties": ["
"], "filters": [], "child": "csvSnapshot
2019-03-08 23:58:54 [ixnetwork_restpy.connection] [DEBUG] POST https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/operations/select {"selects": [{"in
lines": [], "from": "/api/v1/sessions/3/ixnetwork/statistics", "properties": [], "children": [{"properties": [""], "filters": [], "child": "csvSnapshot
2019-03-08 23:58:54 [ixnetwork_restpy.connection] [DEBUG] POST https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/operations/select {"selects": [{"in
lines": [], "from": "/api/v1/sessions/3/ixnetwork/statistics", "properties": [], "children": [{"properties": ["
"], "filters": [], "child": "csvSnapshot
2019-03-08 23:58:54 [ixnetwork_restpy.connection] [DEBUG] POST https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/operations/select {"selects": [{"in
lines": [], "from": "/api/v1/sessions/3/ixnetwork/statistics", "properties": [], "children": [{"properties": [""], "filters": [], "child": "csvSnapshot
2019-03-08 23:58:54 [ixnetwork_restpy.connection] [DEBUG] POST https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/operations/select {"selects": [{"in
lines": [], "from": "/api/v1/sessions/3/ixnetwork/statistics", "properties": [], "children": [{"properties": ["
"], "filters": [], "child": "csvSnapshot
2019-03-08 23:58:55 [ixnetwork_restpy.connection] [DEBUG] POST https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/operations/select {"selects": [{"in
lines": [], "from": "/api/v1/sessions/3/ixnetwork/statistics", "properties": [], "children": [{"properties": [""], "filters": [], "child": "csvSnapshot
2019-03-08 23:58:55 [ixnetwork_restpy.connection] [DEBUG] POST https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/statistics/csvSnapshot/operations/t
2019-03-08 23:59:01 [ixnetwork_restpy.connection] [DEBUG] GET https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/statistics/csvSnapshot/operations/ta
2019-03-08 23:59:02 [ixnetwork_restpy.connection] [DEBUG] GET https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/statistics/csvSnapshot/operations/ta
2019-03-08 23:59:03 [ixnetwork_restpy.connection] [DEBUG] GET https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/statistics/csvSnapshot/operations/ta
2019-03-08 23:59:04 [ixnetwork_restpy.connection] [DEBUG] GET https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/statistics/csvSnapshot/operations/ta
2019-03-08 23:59:05 [ixnetwork_restpy.connection] [DEBUG] GET https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/statistics/csvSnapshot/operations/ta
2019-03-08 23:59:06 [ixnetwork_restpy.connection] [DEBUG] GET https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/statistics/csvSnapshot/operations/ta
2019-03-08 23:59:08 [ixnetwork_restpy.connection] [DEBUG] POST https://10.23.239.233:443/api/v1/sessions/3/ixnetwork/operations/select {"selects": [{"in
lines": [], "from": "/api/v1/sessions/3/ixnetwork/statistics", "properties": [], "children": [{"properties": ["
"], "filters": [], "child": "csvSnapshot
"}]}]}3-08 23:59:08 [ixnetwork_restpy.connection] [DEBUG] 200 OK
2019-03-08 23:59:08 [ixnetwork_restpy.connection] [DEBUG] 202 Accepted

from ixnetwork.

ajbalogh avatar ajbalogh commented on September 26, 2024

from ixnetwork.

muthvar1 avatar muthvar1 commented on September 26, 2024

Hmm.. maybe your right.. it probably is something else that is wrong.. cause even if I print I get nothing. But I do see the flow stats in the api browser. What could I be doing wrong? I followed the example as in the bgpNgpf.py sample script

from ixnetwork.

muthvar1 avatar muthvar1 commented on September 26, 2024

per Hubert's request I updated to the latest SDK and now this works fine.
FYI: The issue was that there was a bug in the SDK where in stats were not working in the case where the api server session was started on the chassis itself. This may not be a problem for sessions started on dedicated linux VMs. Either way, the latest update should solve this.

from ixnetwork.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.