Revision a6e6fe48 snf-cyclades-app/synnefo/logic/management/commands/floating-ip-detach.py
b/snf-cyclades-app/synnefo/logic/management/commands/floating-ip-detach.py | ||
---|---|---|
1 |
# Copyright 2012 GRNET S.A. All rights reserved. |
|
1 |
# Copyright 2012-2014 GRNET S.A. All rights reserved.
|
|
2 | 2 |
# |
3 | 3 |
# Redistribution and use in source and binary forms, with or |
4 | 4 |
# without modification, are permitted provided that the following |
... | ... | |
49 | 49 |
floating_ip_id = args[0] |
50 | 50 |
|
51 | 51 |
#get the floating-ip |
52 |
floating_ip = common.get_floating_ip_by_id(floating_ip_id,
|
|
53 |
for_update=True)
|
|
52 |
floating_ip = common.get_resource("floating-ip", floating_ip_id,
|
|
53 |
for_update=True) |
|
54 | 54 |
|
55 | 55 |
if not floating_ip.nic: |
56 | 56 |
raise CommandError('This floating IP is not attached to a device') |
Also available in: Unified diff