Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
34a07ef7
Commit
34a07ef7
authored
Nov 14, 2013
by
Christos Stavrakakis
Browse files
cyclades: Add '--active' filter to ip-list cmd
Add filter to display only IPs that are currently active.
parent
7a8958c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
snf-cyclades-app/synnefo/api/management/commands/ip-list.py
View file @
34a07ef7
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment