forked from uncloud/uncloud
Move django-based uncloud to top-level
This commit is contained in:
parent
0560063326
commit
95d43f002f
265 changed files with 0 additions and 0 deletions
28
uncloud/management/commands/uncloud.py
Normal file
28
uncloud/management/commands/uncloud.py
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
import sys
|
||||
from datetime import datetime
|
||||
|
||||
from django.core.management.base import BaseCommand
|
||||
|
||||
from django.contrib.auth import get_user_model
|
||||
|
||||
from opennebula.models import VM as VMModel
|
||||
from uncloud_vm.models import VMHost, VMProduct, VMNetworkCard, VMDiskImageProduct, VMDiskProduct, VMCluster
|
||||
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'General uncloud commands'
|
||||
|
||||
def add_arguments(self, parser):
|
||||
parser.add_argument('--bootstrap', action='store_true', help='Bootstrap a typical uncloud installation')
|
||||
|
||||
def handle(self, *args, **options):
|
||||
|
||||
if options['bootstrap']:
|
||||
self.bootstrap()
|
||||
|
||||
def bootstrap(self):
|
||||
default_cluster = VMCluster.objects.get_or_create(name="default")
|
||||
# local_host =
|
||||
Loading…
Add table
Add a link
Reference in a new issue