File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -48,15 +48,15 @@ def trace(self):
48
48
this_hop_ret .append (hop_item_data )
49
49
continue
50
50
51
+ # the url for this item will be something like:
52
+ # https://netbox/api/dcim/rear-ports/12761/
51
53
# TODO: Move this to a more general function.
52
54
app_endpoint = "/" .join (
53
- urlsplit (hop_item_data ["url" ][ len ( self . api . base_url ) :]). path . split (
54
- "/"
55
- )[1 :3 ]
55
+ urlsplit (hop_item_data ["url" ])
56
+ . path [ len ( urlsplit ( self . api . base_url ). path ) :]
57
+ . split ( "/" )[1 :3 ]
56
58
)
57
-
58
59
return_obj_class = uri_to_obj_class_map .get (app_endpoint , Record ,)
59
-
60
60
this_hop_ret .append (
61
61
return_obj_class (hop_item_data , self .endpoint .api , self .endpoint )
62
62
)
@@ -162,11 +162,11 @@ class RUs(Record):
162
162
device = Devices
163
163
164
164
165
- class FrontPorts (Record ):
165
+ class FrontPorts (TraceableRecord ):
166
166
device = Devices
167
167
168
168
169
- class RearPorts (Record ):
169
+ class RearPorts (TraceableRecord ):
170
170
device = Devices
171
171
172
172
You can’t perform that action at this time.
0 commit comments