Revision 6193628f snf-cyclades-app/synnefo/api/management/commands/server-create.py
b/snf-cyclades-app/synnefo/api/management/commands/server-create.py | ||
---|---|---|
36 | 36 |
from django.core.management.base import BaseCommand, CommandError |
37 | 37 |
from synnefo.management import common |
38 | 38 |
|
39 |
from synnefo.api import util |
|
40 | 39 |
from synnefo.logic import servers |
41 | 40 |
|
42 | 41 |
HELP_MSG = """ |
... | ... | |
97 | 96 |
image = common.get_image(image_id, user_id) |
98 | 97 |
if backend_id: |
99 | 98 |
backend = common.get_backend(backend_id) |
99 |
else: |
|
100 |
backend = None |
|
100 | 101 |
|
101 | 102 |
servers.create(user_id, name, password, flavor, image, |
102 |
backend=backend) |
|
103 |
use_backend=backend) |
Also available in: Unified diff