Revision 77fccdd4 snf-cyclades-app/synnefo/api/management/commands/server-create.py

b/snf-cyclades-app/synnefo/api/management/commands/server-create.py
49 49

  
50 50
    option_list = BaseCommand.option_list + (
51 51
            make_option("--backend-id", dest="backend_id",
52
                        help="The ID of the Ganeti backend"),
52
                        help="ID of the Ganeti backend"),
53 53
            make_option("--name", dest="name",
54 54
                        help="Name of the server."),
55 55
            make_option("--user-id", dest="user_id",
56
                        help="The owner of the server"),
57
            make_option("--image-id", dest="image_id"),
58
            make_option("--flavor-id", dest="flavor_id"),
59
            make_option("--password", dest="password")
56
                        help="ID of the Owner of the server."),
57
            make_option("--image-id", dest="image_id",
58
                        help="ID of the image."),
59
            make_option("--flavor-id", dest="flavor_id",
60
                        help="ID of the flavor"),
61
            make_option("--password", dest="password",
62
                        help="Password for the new server")
60 63
        )
61 64

  
62 65
    def handle(self, *args, **options):
63 66
        if args:
64 67
            raise CommandError("Command doesn't accept any arguments")
65 68

  
66

  
67 69
        name = options['name']
68 70
        user_id = options['user_id']
69 71
        backend_id = options['backend_id']
......
119 121
            if not backend:
120 122
                raise CommandError("Can not allocate VM")
121 123

  
122

  
123 124
        # Get Public address
124 125
        (network, address) = allocate_public_address(backend)
125 126
        if address is None:

Also available in: Unified diff