Revision 666b9edc
b/snf-cyclades-app/synnefo/logic/management/commands/floating-ip-list.py | ||
---|---|---|
45 | 45 |
user_uuid_field = "userid" |
46 | 46 |
astakos_url = ASTAKOS_BASE_URL |
47 | 47 |
astakos_token = CYCLADES_SERVICE_TOKEN |
48 |
filters = {'floating_ip' : True} |
|
49 |
|
|
50 |
def get_machine(ip): |
|
51 |
try: |
|
52 |
machine = ip.nic.machine |
|
53 |
except AttributeError: |
|
54 |
return None |
|
48 | 55 |
|
49 | 56 |
FIELDS = { |
50 | 57 |
"id": ("id", "Floating IP UUID"), |
51 | 58 |
"user.uuid": ("userid", "The UUID of the server's owner"), |
52 |
"address": ("ipv4", "IPv4 Address"),
|
|
59 |
"address": ("address", "IP Address"),
|
|
53 | 60 |
"pool": ("network", "Floating IP Pool (network)"), |
54 |
"machine": ("machine", "VM using this Floating IP"),
|
|
61 |
"machine": (get_machine, "VM using this Floating IP"),
|
|
55 | 62 |
"created": ("created", "Datetime this IP was reserved"), |
56 | 63 |
"deleted": ("deleted", "If the floating IP is deleted"), |
57 | 64 |
} |
Also available in: Unified diff