Commit a57e3e04 authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

helpdesk: Order IPs by allocation time

parent 623d23b5
......@@ -46,7 +46,7 @@ from urllib import unquote
import astakosclient
from snf_django.lib import astakos
from synnefo.db.models import VirtualMachine, IPAddress, Network, IPAddressLog
from synnefo.db.models import VirtualMachine, Network, IPAddressLog
# server actions specific imports
from synnefo.api import util
......@@ -276,7 +276,8 @@ def search_by_ip(request, search_query):
retry=2, use_pool=True,
logger=logger)
ips = IPAddressLog.objects.filter(address=search_query)
ips = IPAddressLog.objects.filter(address=search_query)\
.order_by("allocated_at")
for ip in ips:
# Annotate IPs with the VM, Network and account attributes
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment