Commit 34a07ef7 authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

cyclades: Add '--active' filter to ip-list cmd

Add filter to display only IPs that are currently active.
parent 7a8958c2
......@@ -47,11 +47,17 @@ class Command(ListCommand):
make_option(
'--address',
dest='address',
help="Get logs about a specif IP"),
help="Display IP history only for this address"),
make_option(
'--server',
dest='server',
help="Get logs about a specif server"),
help="Display IP history only for this server"),
make_option(
'--active',
dest="active",
action="store_true",
default=False,
help="Display only IPs that are currently in use")
)
object_class = IPAddressLog
......@@ -73,3 +79,5 @@ class Command(ListCommand):
self.filters["address"] = options["address"]
if options["server"]:
self.filters["server_id"] = options["server"]
if options["active"]:
self.filters["active"] = True
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