Revision 0f89715b snf-cyclades-app/synnefo/api/management/commands/floating-ip-remove.py
b/snf-cyclades-app/synnefo/api/management/commands/floating-ip-remove.py | ||
---|---|---|
34 | 34 |
#from optparse import make_option |
35 | 35 |
|
36 | 36 |
from django.db import transaction |
37 |
from django.core.management.base import BaseCommand, CommandError |
|
37 |
from django.core.management.base import CommandError |
|
38 |
from snf_django.management.commands import RemoveCommand |
|
38 | 39 |
from synnefo.management import common |
39 | 40 |
from synnefo.logic import ips |
40 | 41 |
|
41 | 42 |
|
42 |
class Command(BaseCommand):
|
|
43 |
class Command(RemoveCommand):
|
|
43 | 44 |
help = "Release a floating IP" |
44 | 45 |
|
45 | 46 |
@common.convert_api_faults |
... | ... | |
48 | 49 |
if not args: |
49 | 50 |
raise CommandError("Please provide a floating-ip address") |
50 | 51 |
|
52 |
force = options['force'] |
|
53 |
self.confirm_deletion(force, "floating ip(s)", args) |
|
54 |
|
|
51 | 55 |
floating_ip_id = args[0] |
52 | 56 |
|
53 | 57 |
floating_ip = common.get_floating_ip_by_id(floating_ip_id, |
Also available in: Unified diff