Comments (10)
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.
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.
from ixnetwork.
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.
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.
from ixnetwork.
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.
from ixnetwork.
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.
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)
- How to read vport object HOT 3
- Any timeout for one session HOT 3
- RestPy: CsvSnapshot.update doesn't work HOT 3
- What's sdmPort used for? HOT 1
- method startQuickTest in IxNetRestApiQuickTest.py not work HOT 1
- Bug in function getTrafficItemPktHeaderStackObj HOT 1
- Loadconfig.py not able to find the rfcquicktest object/href HOT 6
- TakeSnapshotPy method used by concurrent sessions can overwrite results
- Cannot start single traffic item HOT 1
- StatViewAssistant - Statistics view does not exist
- ixnetwork-restpy 1.1.5 with IxNetwork 9.20 error with InstanceId is not a string for field stack operation HOT 3
- loadQuickTest.py doesn't download all CSV files properly
- Packet capture does not capture IGMP related data HOT 1
- Incorrect snapshot file at debugging session HOT 1
- Ethernet destination field cannot be updated HOT 2
- prefixAddrStep not available to configNetworkGroup() in IxNetRestApiProtocol.py
- Create a QuickTest without configuration file (ixncfg or json)
- Route range endpoint not selected in traffic destinations HOT 4
- Using IxNetwork RestPy
- VLAN HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ixnetwork.