1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00
This commit is contained in:
jeremystretch
2022-05-06 16:17:27 -04:00
parent 304282bd4f
commit b44bfa1aa6
3 changed files with 25 additions and 14 deletions

View File

@ -39,13 +39,15 @@ def flatten_path(path):
return ret
def create_cablepath(node):
def create_cablepath(terminations):
"""
Create CablePaths for all paths originating from the specified node.
Create CablePaths for all paths originating from the specified set of nodes.
:param terminations: Iterable of CableTermination objects
"""
from dcim.models import CablePath
cp = CablePath.from_origin(node)
cp = CablePath.from_origin(terminations)
if cp:
cp.save()