Revision 9621c777 snf-cyclades-app/synnefo/api/management/commands/flavor-modify.py

b/snf-cyclades-app/synnefo/api/management/commands/flavor-modify.py
37 37
from synnefo.management.common import get_flavor
38 38

  
39 39

  
40

  
41 40
class Command(BaseCommand):
42 41
    args = "<flavor id>"
43 42
    help = "Modify a flavor"
44 43

  
45 44
    option_list = BaseCommand.option_list + (
46
        make_option('--set-deleted',
45
        make_option(
46
            '--set-deleted',
47 47
            action='store_true',
48 48
            dest='deleted',
49 49
            help="Mark a server as deleted"),
50
        make_option('--set-undeleted',
50
        make_option(
51
            '--set-undeleted',
51 52
            action='store_true',
52 53
            dest='undeleted',
53 54
            help="Mark a server as not deleted"),
54
        )
55
    )
55 56

  
56 57
    def handle(self, *args, **options):
57 58
        if len(args) != 1:
58 59
            raise CommandError("Please provide a flavor ID")
59 60

  
60

  
61 61
        flavor = get_flavor(args[0])
62 62

  
63 63
        if options.get('deleted'):

Also available in: Unified diff