-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathstream-results.yaml
114 lines (98 loc) · 2.29 KB
/
stream-results.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# -*- coding: utf-8 -*-
# @Author: rjezequel
# @Date: 2019-12-20 09:18:14
# @Last Modified by: ronanjs
# @Last Modified time: 2020-01-13 15:45:28
-
name: Create session
stc:
action: session
user: ansible
name: stream_results
chassis: "{{ hostvars[inventory_hostname].chassis }}"
-
name: Create 2 base ports
stc:
action: create
count: 2
objects:
- project:
- port:
location: "//${chassis[item]}/1/1"
name: "port-$item"
-
name: create one Emulated Device under port 1
stc:
action: perform
command: DeviceCreate
properties:
ParentList: ref:/project
CreateCount: 1
DeviceCount: 1
Port: ref:/port[@Name='port-0']
IfStack: Ipv4If EthIIIf
IfCount: 1 1
name: "device-0"
-
name: create one Emulated Device under and 2
stc:
action: perform
command: DeviceCreate
properties:
ParentList: ref:/project
CreateCount: 1
DeviceCount: 1
Port: ref:/port[@Name='port-1']
IfStack: Ipv4If EthIIIf
IfCount: 1 1
name: "device-1"
-
name: Create a stream block
stc:
action: create
under: ref:/project
objects:
- streamblock:
# TrafficPattern: Mesh
EnableBidirectionalTraffic: True
EnableStreamOnlyGeneration: true
SrcBinding-targets: ref:/EmulatedDevice[0]/Ipv4If
DstBinding-targets: ref:/EmulatedDevice[1]/Ipv4If
AffiliationStreamBlockLoadProfile:
Load: 10
-
name: Take the ports online
stc:
action: perform
command: AttachPorts
properties:
RevokeOwner: true
PortList: ref:/port
-
name: subscribe to streamblock results
register: results
stc:
action: perform
command: SubscribeResultsView
properties:
ExecuteSynchronous: true
TemplateUri: /Result Views/Stream Results/Stream Block Results.xml
-
name: Get the stream block result object
register: results
stc:
action: get
objects: ref:/port/StreamBlock
-
name: Get the stream block result object
register: results
stc:
action: get
objects: ref:/port/StreamBlock/TxStreamBlockResults
-
name: Take the ports offline
stc:
action: perform
command: DetachPortsCommand
properties:
PortList: ref:/port