Skip to content

Commit 39c707b

Browse files
author
Thomas
committed
added delete_interface_connection method.
1 parent 56c47ef commit 39c707b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

netbox/dcim.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ def delete_interface_by_id(self, interface_id):
363363
"""Delete interface by id
364364
365365
:param interface_id: id of interface to remove
366-
:return:
366+
:return: bool True if successful otherwise raise DeleteException
367367
"""
368368
return self.netbox_con.delete('/dcim/interfaces/', interface_id)
369369

@@ -385,3 +385,11 @@ def create_interface_connection(self, interface_a, interface_b, **kwargs):
385385
"""
386386
required_fields = {"interface_a": interface_a, "interface_b": interface_b}
387387
return self.netbox_con.post('/dcim/interface-connections/', required_fields, **kwargs)
388+
389+
def delete_interface_connection(self, interface_connection_id):
390+
"""Delete interface by id
391+
392+
:param interface_connection_id: id of interface to remove
393+
:return: bool True if successful otherwise raise DeleteException
394+
"""
395+
return self.netbox_con.delete('/dcim/interface-connections/', interface_connection_id)

0 commit comments

Comments
 (0)