File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed
tests/integration/targets/latest/tasks Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 124
124
- Any tags that the interface may need to be associated with
125
125
required: false
126
126
type: list
127
+ mark_connected:
128
+ description:
129
+ - Mark an interface as connected without a cable attached (netbox >= 2.11 required)
130
+ required: false
131
+ type: bool
127
132
required: true
128
133
type: dict
129
134
update_vc_child:
235
240
name: GigabitEthernet2/0/1
236
241
enabled: false
237
242
update_vc_child: True
243
+ - name: Mark interface as connected without a cable (netbox >= 2.11 required)
244
+ netbox.netbox.netbox_device_interface:
245
+ netbox_url: http://netbox.local
246
+ netbox_token: thisIsMyToken
247
+ data:
248
+ device: test100
249
+ name: GigabitEthernet1
250
+ mark_connected: true
251
+ state: present
238
252
"""
239
253
240
254
RETURN = r"""
@@ -288,6 +302,7 @@ def main():
288
302
untagged_vlan = dict (required = False , type = "raw" ),
289
303
tagged_vlans = dict (required = False , type = "raw" ),
290
304
tags = dict (required = False , type = "list" ),
305
+ mark_connected = dict (required = False , type = "bool" ),
291
306
),
292
307
),
293
308
)
Original file line number Diff line number Diff line change 289
289
that :
290
290
- test_eleven is failed
291
291
- test_eleven['msg'] == "Must set update_vc_child to True to allow child device interface modification"
292
+
293
+ - name : " 12 - Create interface and mark it as connected"
294
+ netbox.netbox.netbox_device_interface :
295
+ netbox_url : " http://localhost:32768"
296
+ netbox_token : " 0123456789abcdef0123456789abcdef01234567"
297
+ data :
298
+ device : test100
299
+ name : GigabitEthernet5
300
+ type : 1000Base-T (1GE)
301
+ mark_connected : true
302
+ register : test_twelve
303
+
304
+ - name : " 12- ASSERT"
305
+ assert :
306
+ that :
307
+ - test_twelve is changed
308
+ - test_twelve['msg'] == "interface GigabitEthernet5 created"
309
+ - test_twelve['diff']['before']['state'] == 'absent'
310
+ - test_twelve['diff']['after']['state'] == 'present'
311
+ - test_twelve['interface']['name'] == "GigabitEthernet5"
312
+ - test_twelve['interface']['device'] == 1
313
+ - test_twelve['interface']['mark_connected'] == true
You can’t perform that action at this time.
0 commit comments