Revision 0f89715b snf-cyclades-app/synnefo/logic/management/commands/pool-remove.py

b/snf-cyclades-app/synnefo/logic/management/commands/pool-remove.py
31 31
# interpreted as representing official policies, either expressed
32 32
# or implied, of GRNET S.A.
33 33

  
34
from django.core.management.base import BaseCommand, CommandError
34
from django.core.management.base import CommandError
35
from snf_django.management.commands import RemoveCommand
35 36
from optparse import make_option
36 37

  
37 38
from synnefo.management.common import pool_table_from_type
......
39 40
POOL_CHOICES = ['bridge', 'mac-prefix']
40 41

  
41 42

  
42
class Command(BaseCommand):
43
class Command(RemoveCommand):
43 44
    help = "Remove a pool."
44 45
    args = "<pool ID>"
45 46
    output_transaction = True
46
    option_list = BaseCommand.option_list + (
47
    option_list = RemoveCommand.option_list + (
47 48
        make_option("--type", dest="type",
48 49
                    choices=POOL_CHOICES,
49 50
                    help="Type of pool"
......
58 59

  
59 60
        pool_table = pool_table_from_type(type_)
60 61

  
62
        force = options['force']
63
        self.confirm_deletion(force, "pool(s)", args)
64

  
61 65
        try:
62 66
            pool_id = int(args[0])
63 67
            pool = pool_table.objects.get(id=pool_id)

Also available in: Unified diff