-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add 'created' and 'last_updated' attributes to virtualization component models #6257
Comments
These fields already exist on these models. What specific change(s) are you proposing? |
Hi, Jeremy. Yes, you are correct. I found the Issue. is the attribute filter "last_updated__gte" supported for data models with the "last_updated" attribute? I used following query {
"id": 8801,
"url": "https://example.com/api/dcim/interfaces/8801/",
"display": "ge-0",
"device": {
"id": 480,
"url": "https://example.com/api/dcim/devices/480/",
"display": "1000",
"name": "1000",
"display_name": "1000"
},
"name": "ge-0",
"label": "",
"type": {
"value": "1000base-t",
"label": "1000BASE-T (1GE)"
},
"enabled": true,
"parent": null,
"lag": null,
"mtu": null,
"mac_address": "AA:BB:CC:DD:EE:FF",
"mgmt_only": false,
"description": "",
"mode": null,
"untagged_vlan": null,
"tagged_vlans": [],
"mark_connected": false,
"cable": {
"id": 1548,
"url": "https://example.com/api/dcim/cables/1548/",
"display": "#1548",
"label": ""
},
"cable_peer": {
"id": 8277,
"url": "https://example.com/api/dcim/interfaces/8277/",
"display": "ge-0/0/0",
"device": {
"id": 472,
"url": "https://example.com/api/dcim/devices/472/",
"display": "juEX34-04",
"name": "juEX34-04",
"display_name": "juEX34-04"
},
"name": "ge-0/0/0",
"cable": 1548,
"_occupied": true
},
"cable_peer_type": "dcim.interface",
"connected_endpoint": {
"id": 8277,
"url": "https://example.com/api/dcim/interfaces/8277/",
"display": "ge-0/0/0",
"device": {
"id": 472,
"url": "https://example.com/api/dcim/devices/472/",
"display": "juEX34-04",
"name": "juEX34-04",
"display_name": "juEX34-04"
},
"name": "ge-0/0/0",
"cable": 1548,
"_occupied": true
},
"connected_endpoint_type": "dcim.interface",
"connected_endpoint_reachable": true,
"tags": [],
"custom_fields": {},
"created": "2021-04-23",
"last_updated": "2021-04-23T10:21:19.028563Z",
"count_ipaddresses": 0,
"_occupied": true
} I tested it for Should I file a new bug for this? |
Yes, please open a new bug if there's specific, reproducible behavior that you believe is incorrect. Be sure to include the set of steps that someone else can take to replicate the suspected bug. |
NetBox version
v2.11.1
Feature type
Data model extension
Proposed functionality
Add
created
andlast_updated
attributes tovirtualization
models.See: #5369 and #5901
Use case
I use Netbox as source for our monitoring system. There it is important to get interface data for all interfaces of Device/VM. In order to avoid requesting all interfaces of all devices/VMs a caching was implemented to get only interface objects which have changed since last request cycle. This works pretty well for devices, VMs and IP addresses but interfaces don't support these fields. Our NetBox instance contains thousends of interfaces and retreiving them all takes a long time.
This change would speed up the reading of interface data by A LOT.
Database changes
Yes. Adding 'created' and 'last_updated' to all virtualization models would be necessary.
External dependencies
None
The text was updated successfully, but these errors were encountered: