Skip to content

Commit 3f1470f

Browse files
committed
Initial commit
1 parent e0c6f9f commit 3f1470f

File tree

5 files changed

+272
-0
lines changed

5 files changed

+272
-0
lines changed
Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
ixNetworkApiServerIp: 192.168.28.10
2+
3+
# Below are for Linux API server only
4+
username: hgee
5+
password: IxiaIxia1234!
6+
apiKey: None
7+
deleteSession: False
8+
9+
forceTakePortOwnership: True
10+
releasePorts: False
11+
restPort: None
12+
logLevel: info
13+
14+
ports:
15+
- name: Host1
16+
port: 192.168.28.5, 1, 1
17+
packetCapture:
18+
enable: True
19+
rxMode: captureAndMeasure
20+
controlPlane: False
21+
dataPlane: True
22+
sliceSize: 80
23+
24+
- name: Host2
25+
port: 192.168.28.5, 1, 2
26+
packetCapture:
27+
enable: True
28+
rxMode: captureAndMeasure
29+
controlPlane: False
30+
dataPlane: True
31+
sliceSize: 80
32+
33+
topologies:
34+
- name: Host1
35+
ports:
36+
- Host1
37+
deviceGroups:
38+
- name: Host1
39+
multiplier: 1
40+
ethernet:
41+
name: Host1
42+
ipv4:
43+
name: Host1
44+
ipStartValue: 1.1.1.1
45+
ipStepValue: 0.0.0.0
46+
subnet: 255.255.255.0
47+
ipGatewayStartValue: 1.1.1.2
48+
ipGatewayStepValue: 0.0.0.0
49+
50+
- name: Host2
51+
ports:
52+
- Host2
53+
deviceGroups:
54+
- name: Host2
55+
multiplier: 1
56+
ethernet:
57+
name: Host2
58+
ipv4:
59+
name: Host2
60+
ipStartValue: 1.1.1.2
61+
ipStepValue: 0.0.0.0
62+
subnet: 255.255.255.0
63+
ipGatewayStartValue: 1.1.1.1
64+
ipGatewayStepValue: 0.0.0.0
65+
66+
67+
trafficItems:
68+
- name: Host1
69+
enable: True
70+
trafficType: raw
71+
srcPortName: Host1
72+
destPortName: Host2
73+
biDirection: True
74+
frameRate:
75+
type: percentLineRate
76+
rate: 50
77+
transmissionControl:
78+
# fixedFrameCount | continuous
79+
type: fixedFrameCount
80+
frameCount: 100
81+
frameSize: 128
82+
packetHeaders:
83+
ethernet:
84+
src:
85+
valueType: increment
86+
startValue: ngpfSrcMac
87+
stepValue: 00:00:00:00:00:00
88+
count: 1
89+
dst:
90+
valueType: increment
91+
startValue: ngpfResolvedGatewayMac
92+
stepValue: 00:00:00:00:00:01
93+
count: 1
94+
ipv4:
95+
appendToStack: ethernet
96+
src:
97+
valueType: increment
98+
startValue: 1.1.1.1
99+
stepValue: 0.0.0.1
100+
count: 1
101+
dst:
102+
valueType: increment
103+
startValue: 1.1.1.2
104+
stepValue: 0.0.0.1
105+
count: 1
106+
udp:
107+
appendToStack: ipv4
108+
dstPort:
109+
startValue: 4791
110+
srcPort:
111+
startValue: 1111
112+
113+
114+
- name: Host2
115+
enable: True
116+
trafficType: raw
117+
srcPortName: Host2
118+
destPortName: Host1
119+
biDirection: True
120+
frameRate:
121+
type: percentLineRate
122+
rate: 50
123+
transmissionControl:
124+
# fixedFrameCount | continuous
125+
type: fixedFrameCount
126+
frameCount: 100
127+
frameSize: 128
128+
packetHeaders:
129+
ethernet:
130+
src:
131+
valueType: increment
132+
startValue: ngpfSrcMac
133+
stepValue: 00:00:00:00:00:00
134+
count: 1
135+
dst:
136+
valueType: increment
137+
startValue: ngpfResolvedGatewayMac
138+
stepValue: 00:00:00:00:00:01
139+
count: 1
140+
ipv4:
141+
appendToStack: ethernet
142+
src:
143+
valueType: increment
144+
startValue: 2.2.2.1
145+
stepValue: 0.0.0.1
146+
count: 1
147+
dst:
148+
valueType: increment
149+
startValue: 2.2.2.2
150+
stepValue: 0.0.0.1
151+
count: 1
152+
udp:
153+
appendToStack: ipv4
154+
dstPort:
155+
startValue: 4791
156+
srcPort:
157+
startValue: 1111
158+
159+
160+
161+
162+
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
# Can this env be used in parallel with other Modules
3+
# Default = False
4+
parallelUsage: False
5+
6+
ixNetworkApiServerIp: 192.168.28.10
7+
8+
# Below are for Linux API server only
9+
username: admin
10+
password: admin
11+
12+
ixChassis: 192.168.128.5
13+
ports:
14+
- 1, 1
15+
- 1, 2
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
globalSettings:
3+
loginCredentialKey: None
4+
abortModuleFailure: False
5+
abortStageFailure: False
6+
7+
stages:
8+
Test:
9+
enable: True
10+
runModulesInParallel: False
11+
abortModuleFailure: False
12+
13+
modules:
14+
- /Modules/IxNetworkDataModel:
15+
enable: True
16+
env: ixNet
17+
playlist:
18+
- /Modules/IxNetworkDataModel/Testcases/captureRawTraffic.yml
19+
20+
21+
22+
23+
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
globalSettings:
3+
loginCredentialKey: regressionTest
4+
abortModuleFailure: False
5+
abortStageFailure: False
6+
env: Samples/pythonSample
7+
#autoSelectEnvGroup: envPoolGroup1
8+
9+
stages:
10+
Test:
11+
enable: True
12+
runModulesInParallel: False
13+
abortModuleFailure: False
14+
15+
modules:
16+
- /Modules/IxNetworkDataModel:
17+
enable: True
18+
abortModuleFailure: False
19+
env: pythonSample
20+
variables:
21+
serverName: regressionServer
22+
serverIp: 10.10.10.1
23+
playlist:
24+
- /Modules/IxNetworkDataModel/Testcases/captureRawTraffic.yml
25+
26+
27+
28+
29+
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import sys, traceback
2+
3+
from ixNetworkDataModelConfig import ConfigIxNetworkRestPy
4+
from keystackEnv import keystackObj
5+
6+
dataModelYamlFile = keystackObj.configParamsFileFullPath
7+
8+
try:
9+
mainObj = ConfigIxNetworkRestPy(dataModelFile=dataModelYamlFile,
10+
sessionName=None, sessionId=None, apiKey=None, clearConfig=True,
11+
logLevel='info', logFilename=None, keystackObj=keystackObj)
12+
13+
mainObj.ports.assignPorts()
14+
mainObj.portCapture.configure()
15+
mainObj.closeAllTabs()
16+
mainObj.ngpf.configure()
17+
mainObj.ngpf.startAllProtocols()
18+
mainObj.ngpf.verifyProtocolsUp()
19+
ngpfMacAddresses = mainObj.ngpf.getNgpfLearnedMacAddresses()
20+
mainObj.trafficItem.configRawTrafficItems(ngpfMacAddresses=ngpfMacAddresses)
21+
mainObj.trafficItem.generateAll()
22+
mainObj.trafficItem.apply()
23+
mainObj.portCapture.start()
24+
mainObj.trafficItem.start()
25+
mainObj.trafficItem.waitForTrafficCompletion(maxCounter=10)
26+
mainObj.portCapture.stop()
27+
mainObj.portCapture.getDataPlaneCaptureFile(writeCaptureToFile=False,
28+
amountOfPacketsToWrite=5,
29+
captureFileDestPath=keystackObj.moduleProperties['artifactsRepo'])
30+
31+
32+
if mainObj.configs['releasePorts']:
33+
mainObj.ports.releasePorts()
34+
35+
if mainObj.configs['deleteSession']:
36+
mainObj.deleteSession()
37+
38+
except Exception as errMsg:
39+
if 'mainObj' in locals():
40+
mainObj.logFailed(traceback.format_exc(None, errMsg))
41+
42+
43+

0 commit comments

Comments
 (0)