Revision 1229a55f snf-cyclades-app/synnefo/logic/management/commands/floating-ip-list.py
b/snf-cyclades-app/synnefo/logic/management/commands/floating-ip-list.py | ||
---|---|---|
48 | 48 |
astakos_token = CYCLADES_SERVICE_TOKEN |
49 | 49 |
filters = {'floating_ip': True} |
50 | 50 |
|
51 |
def get_machine(ip):
|
|
51 |
def get_server(ip):
|
|
52 | 52 |
try: |
53 | 53 |
return ip.nic.machine_id |
54 | 54 |
except AttributeError: |
... | ... | |
58 | 58 |
"id": ("id", "Floating IP UUID"), |
59 | 59 |
"user.uuid": ("userid", "The UUID of the server's owner"), |
60 | 60 |
"address": ("address", "IP Address"), |
61 |
"pool": ("network", "Floating IP Pool (network)"),
|
|
62 |
"machine": (get_machine, "VM using this Floating IP"),
|
|
61 |
"network": ("network_id", "Network ID"),
|
|
62 |
"server": (get_server, "Server using this Floating IP"),
|
|
63 | 63 |
"created": ("created", "Datetime this IP was reserved"), |
64 | 64 |
"deleted": ("deleted", "If the floating IP is deleted"), |
65 | 65 |
} |
66 | 66 |
|
67 |
fields = ["id", "address", "pool", "user.uuid", "machine", "created"] |
|
67 |
fields = ["id", "address", "network", "user.uuid", "server", "created"] |
Also available in: Unified diff