Skip to content

Commit b586d3f

Browse files
committed
test to get integration tests in ok status inventory v3.5
1 parent fb3cdc2 commit b586d3f

File tree

9 files changed

+1562
-93
lines changed

9 files changed

+1562
-93
lines changed

tests/integration/targets/inventory-v3.5/files/reference.json

Lines changed: 1402 additions & 0 deletions
Large diffs are not rendered by default.

tests/integration/targets/inventory-v3.5/files/test-inventory-bearer-token.json

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"hostvars": {
44
"R1-Device": {
55
"asset_tag": "345678901",
6+
"cluster_device": "",
67
"config_context": {},
78
"custom_fields": {},
89
"device_type": "cisco-test",
@@ -26,6 +27,7 @@
2627
},
2728
"Test Nexus One": {
2829
"ansible_host": "172.16.180.12",
30+
"cluster_device": "",
2931
"config_context": {},
3032
"custom_fields": {},
3133
"device_type": "nexus-parent",
@@ -44,27 +46,27 @@
4446
"custom_fields": {},
4547
"description": "",
4648
"device": {
47-
"display": "Test Nexus One",
48-
"id": 4,
49-
"name": "Test Nexus One"
49+
"display": "Test Nexus Child One",
50+
"id": 5,
51+
"name": "Test Nexus Child One"
5052
},
51-
"display": "Ethernet1/1",
53+
"display": "Ethernet2/1",
5254
"duplex": null,
5355
"enabled": true,
54-
"id": 1,
56+
"id": 2,
5557
"ip_addresses": [
5658
{
57-
"address": "172.16.180.11/24",
59+
"address": "172.16.180.12/24",
5860
"comments": "",
5961
"custom_fields": {},
6062
"description": "",
61-
"display": "172.16.180.11/24",
62-
"dns_name": "",
63+
"display": "172.16.180.12/24",
64+
"dns_name": "nexus.example.com",
6365
"family": {
6466
"label": "IPv4",
6567
"value": 4
6668
},
67-
"id": 3,
69+
"id": 4,
6870
"nat_inside": null,
6971
"nat_outside": [],
7072
"role": null,
@@ -88,7 +90,7 @@
8890
"mode": null,
8991
"module": null,
9092
"mtu": null,
91-
"name": "Ethernet1/1",
93+
"name": "Ethernet2/1",
9294
"parent": null,
9395
"poe_mode": null,
9496
"poe_type": null,
@@ -124,27 +126,27 @@
124126
"custom_fields": {},
125127
"description": "",
126128
"device": {
127-
"display": "Test Nexus Child One",
128-
"id": 5,
129-
"name": "Test Nexus Child One"
129+
"display": "Test Nexus One",
130+
"id": 4,
131+
"name": "Test Nexus One"
130132
},
131-
"display": "Ethernet2/1",
133+
"display": "Ethernet1/1",
132134
"duplex": null,
133135
"enabled": true,
134-
"id": 2,
136+
"id": 1,
135137
"ip_addresses": [
136138
{
137-
"address": "172.16.180.12/24",
139+
"address": "172.16.180.11/24",
138140
"comments": "",
139141
"custom_fields": {},
140142
"description": "",
141-
"display": "172.16.180.12/24",
142-
"dns_name": "nexus.example.com",
143+
"display": "172.16.180.11/24",
144+
"dns_name": "",
143145
"family": {
144146
"label": "IPv4",
145147
"value": 4
146148
},
147-
"id": 4,
149+
"id": 3,
148150
"nat_inside": null,
149151
"nat_outside": [],
150152
"role": null,
@@ -168,7 +170,7 @@
168170
"mode": null,
169171
"module": null,
170172
"mtu": null,
171-
"name": "Ethernet2/1",
173+
"name": "Ethernet1/1",
172174
"parent": null,
173175
"poe_mode": null,
174176
"poe_type": null,
@@ -296,6 +298,7 @@
296298
},
297299
"Test VM With Spaces": {
298300
"cluster": "Test Cluster 2",
301+
"cluster_device": "",
299302
"cluster_type": "test-cluster-type",
300303
"config_context": {},
301304
"custom_fields": {},
@@ -389,6 +392,7 @@
389392
"tags": []
390393
},
391394
"TestDeviceR1": {
395+
"cluster_device": "",
392396
"config_context": {},
393397
"custom_fields": {},
394398
"device_type": "cisco-test",
@@ -417,6 +421,10 @@
417421
},
418422
"test100": {
419423
"asset_tag": "123456789",
424+
"cluster": "Test Cluster",
425+
"cluster_device": "",
426+
"cluster_group": "test-cluster-group",
427+
"cluster_type": "test-cluster-type",
420428
"config_context": {
421429
"ntp_servers": [
422430
"pool.ntp.org"
@@ -1130,6 +1138,7 @@
11301138
},
11311139
"cluster_Test_Cluster": {
11321140
"hosts": [
1141+
"test100",
11331142
"test100-vm",
11341143
"test101-vm",
11351144
"test102-vm",
@@ -1144,6 +1153,7 @@
11441153
},
11451154
"cluster_group_test_cluster_group": {
11461155
"hosts": [
1156+
"test100",
11471157
"test100-vm",
11481158
"test101-vm",
11491159
"test102-vm",
@@ -1153,6 +1163,7 @@
11531163
"cluster_type_test_cluster_type": {
11541164
"hosts": [
11551165
"Test VM With Spaces",
1166+
"test100",
11561167
"test100-vm",
11571168
"test101-vm",
11581169
"test102-vm",

tests/integration/targets/inventory-v3.5/files/test-inventory-jinja2-filter.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"hostvars": {
44
"Test Nexus One": {
55
"ansible_host": "172.16.180.12",
6+
"cluster_device": "",
67
"config_context": {},
78
"custom_fields": {},
89
"device_type": "nexus-parent",
@@ -272,6 +273,7 @@
272273
"tags": []
273274
},
274275
"TestDeviceR1": {
276+
"cluster_device": "",
275277
"config_context": {},
276278
"custom_fields": {},
277279
"device_type": "cisco-test",
@@ -300,6 +302,10 @@
300302
},
301303
"test100": {
302304
"asset_tag": "123456789",
305+
"cluster": "Test Cluster",
306+
"cluster_device": "",
307+
"cluster_group": "test-cluster-group",
308+
"cluster_type": "test-cluster-type",
303309
"config_context": {
304310
"ntp_servers": [
305311
"pool.ntp.org"
@@ -992,6 +998,7 @@
992998
},
993999
"cluster_Test_Cluster": {
9941000
"hosts": [
1001+
"test100",
9951002
"test100-vm",
9961003
"test101-vm",
9971004
"test102-vm",
@@ -1000,6 +1007,7 @@
10001007
},
10011008
"cluster_group_test_cluster_group": {
10021009
"hosts": [
1010+
"test100",
10031011
"test100-vm",
10041012
"test101-vm",
10051013
"test102-vm",
@@ -1008,6 +1016,7 @@
10081016
},
10091017
"cluster_type_test_cluster_type": {
10101018
"hosts": [
1019+
"test100",
10111020
"test100-vm",
10121021
"test101-vm",
10131022
"test102-vm",

tests/integration/targets/inventory-v3.5/files/test-inventory-jinja2.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"Test_Cluster": {
33
"hosts": [
4+
"test100",
45
"test100-vm",
56
"test101-vm",
67
"test102-vm",
@@ -27,6 +28,7 @@
2728
"hostvars": {
2829
"R1-Device": {
2930
"asset_tag": "345678901",
31+
"cluster_device": "",
3032
"custom_fields": {},
3133
"device_type": "cisco-test",
3234
"is_virtual": false,
@@ -48,6 +50,7 @@
4850
},
4951
"Test VM With Spaces": {
5052
"cluster": "Test Cluster 2",
53+
"cluster_device": "",
5154
"cluster_type": "test-cluster-type",
5255
"custom_fields": {},
5356
"is_virtual": true,
@@ -61,6 +64,7 @@
6164
"tags": []
6265
},
6366
"TestDeviceR1": {
67+
"cluster_device": "",
6468
"custom_fields": {},
6569
"device_type": "cisco-test",
6670
"is_virtual": false,
@@ -87,6 +91,7 @@
8791
},
8892
"VC1": {
8993
"ansible_host": "nexus.example.com",
94+
"cluster_device": "",
9095
"custom_fields": {},
9196
"device_type": "nexus-parent",
9297
"dns_name": "nexus.example.com",
@@ -113,6 +118,10 @@
113118
},
114119
"test100": {
115120
"asset_tag": "123456789",
121+
"cluster": "Test Cluster",
122+
"cluster_device": "",
123+
"cluster_group": "test-cluster-group",
124+
"cluster_type": "test-cluster-type",
116125
"custom_fields": {},
117126
"device_type": "cisco-test",
118127
"is_virtual": false,
@@ -336,6 +345,7 @@
336345
},
337346
"test_cluster_group": {
338347
"hosts": [
348+
"test100",
339349
"test100-vm",
340350
"test101-vm",
341351
"test102-vm",
@@ -345,6 +355,7 @@
345355
"test_cluster_type": {
346356
"hosts": [
347357
"Test VM With Spaces",
358+
"test100",
348359
"test100-vm",
349360
"test101-vm",
350361
"test102-vm",

tests/integration/targets/inventory-v3.5/files/test-inventory-legacy.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"hostvars": {
44
"R1-Device": {
55
"asset_tag": "345678901",
6+
"cluster_device": "",
67
"custom_fields": {},
78
"device_roles": [
89
"core-switch"
@@ -37,6 +38,7 @@
3738
},
3839
"Test Nexus One": {
3940
"ansible_host": "172.16.180.12",
41+
"cluster_device": "",
4042
"custom_fields": {},
4143
"device_roles": [
4244
"core-switch"
@@ -98,6 +100,7 @@
98100
},
99101
"Test VM With Spaces": {
100102
"cluster": "Test Cluster 2",
103+
"cluster_device": "",
101104
"cluster_type": "test-cluster-type",
102105
"custom_fields": {},
103106
"is_virtual": true,
@@ -139,6 +142,7 @@
139142
"tags": []
140143
},
141144
"TestDeviceR1": {
145+
"cluster_device": "",
142146
"custom_fields": {},
143147
"device_roles": [
144148
"core-switch"
@@ -178,6 +182,10 @@
178182
},
179183
"test100": {
180184
"asset_tag": "123456789",
185+
"cluster": "Test Cluster",
186+
"cluster_device": "",
187+
"cluster_group": "test-cluster-group",
188+
"cluster_type": "test-cluster-type",
181189
"custom_fields": {},
182190
"device_roles": [
183191
"core-switch"

0 commit comments

Comments
 (0)