-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathdevice-create-ipv6-dual-vlan.yaml
126 lines (112 loc) · 3.01 KB
/
device-create-ipv6-dual-vlan.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
114
115
116
117
118
119
120
121
122
123
124
125
-
name: Create session
stc:
action: session
user: ansible
name: device_create_ipv6_dual_vlan
chassis: "{{ hostvars[inventory_hostname].chassis }}"
-
name: Create the base ports
stc:
action: create
objects:
- project:
- port:
location: "//${chassis[0]}/1/1"
name: Port1
- port:
location: "//${chassis[1]}/1/1"
name: Port2
-
name: Create 1 emulated devices - port1
stc:
action: create
under: ref:/project
count: 1
objects:
- emulateddevice:
AffiliatedPort: ref:/port[@name='Port1']
DeviceCount: 1
name: "ipv6_dual_vlan_1"
PrimaryIf: ref:./Ipv6If
TopLevelIf: ref:./Ipv6If
EthIIIf:
SourceMac: be:ef:00:00:00:00
VlanIf:
VlanId: 100
Ipv6If:
AddrStep: ::1
Address: 2001::2
Gateway: 2001::1
-
name: Create ipv6if
stc:
action: create
under: ref:/EmulatedDevice[@Name="ipv6_dual_vlan_1"]
count: 1
objects:
- Ipv6If:
AddrStep: ::1
Address: fe80::1
PrimaryIfSource: ref:/EmulatedDevice[@Name="ipv6_dual_vlan_1"]
TopLevelIfSource: ref:/EmulatedDevice[@Name="ipv6_dual_vlan_1"]
-
name: create VlanIf under port1
stc:
action: create
under: ref:/EmulatedDevice[@Name="ipv6_dual_vlan_1"]
count: 1
objects:
- VlanIf:
VlanId: 100
StackedOnEndpoint-targets: ref:/EmulatedDevice[@Name="ipv6_dual_vlan_1"]/VlanIf[0]
-
name: config ipv6if for port1
stc:
action: config
count: 1
objects: ref:/EmulatedDevice[@Name="ipv6_dual_vlan_1"]/Ipv6If[0]
properties:
StackedOnEndpoint-targets: ref:/EmulatedDevice[@Name="ipv6_dual_vlan_1"]/VlanIf[1]
-
name: config VlanIf for port1
stc:
action: config
count: 1
objects: ref:/EmulatedDevice[@Name="ipv6_dual_vlan_1"]/VlanIf[0]
properties:
StackedOnEndpoint-targets: ref:/EmulatedDevice[@Name="ipv6_dual_vlan_1"]/EthIIIf
-
name: config Ipv6If for port1
stc:
action: config
count: 1
objects: ref:/EmulatedDevice[@Name="ipv6_dual_vlan_1"]/Ipv6If[1]
properties:
StackedOnEndpoint-targets: ref:/EmulatedDevice[@Name="ipv6_dual_vlan_1"]/VlanIf[1]
-
name: create 1 block of 1 devices - ipv6 dual vlan
stc:
action: perform
command: DeviceCreate
properties:
ParentList: ref:/project
CreateCount: 1
DeviceCount: 1
Port: ref:/port[@Name='Port2']
IfStack: Ipv6If VlanIf VlanIf EthIIIf
IfCount: '1 1 1 1'
name: "ipv6_dual_vlan_2"
-
name: Create ipv6if
stc:
action: create
under: ref:/EmulatedDevice[@Name="ipv6_dual_vlan_2"]
count: 1
objects:
- Ipv6If:
AddrStep: ::1
Address: fe80::3
PrimaryIfSource: ref:/EmulatedDevice[@Name="ipv6_dual_vlan_2"]
TopLevelIfSource: ref:/EmulatedDevice[@Name="ipv6_dual_vlan_2"]
StackedOnEndpoint-targets: ref:/EmulatedDevice[@Name="ipv6_dual_vlan_2"]/VlanIf[0]