Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F27785279
Example for netbox script
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
Volans
Jan 3 2019, 7:22 PM
2019-01-03 19:22:47 (UTC+0)
Size
579 B
Referenced Files
None
Subscribers
None
Example for netbox script
View Options
@property
def interfaces(self):
if self._interfaces: # those are the formatted ones
return self._interfaces
if not self._device_interfaces: # to cache them
with self.connect():
self._device_interfaces = self.device.get_interfaces()
interfaces = {}
# all the code for mangling the interfaces calling self.optics, etc...
# if this is getting too large it can be moved to something like
# def _get_formatted_interfaces(self)
self._interfaces = interfaces # or self._get_formatted_interfaces()
return self._interfaces
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
6918897
Default Alt Text
Example for netbox script (579 B)
Attached To
Mode
P7957 Example for netbox script
Attached
Detach File
Event Timeline
Log In to Comment