++stuff
This commit is contained in:
parent
d2bd6ba200
commit
9b00ef11fb
3 changed files with 33 additions and 4 deletions
|
|
@ -7,6 +7,7 @@ from datetime import datetime, timedelta
|
|||
from uncloud_pay.models import *
|
||||
#import opennebula.models as one
|
||||
from uncloud_vm.models import *
|
||||
import sys
|
||||
|
||||
def vm_price_2020(cpu=1, ram=2, v6only=False):
|
||||
if v6only:
|
||||
|
|
@ -49,15 +50,23 @@ class Command(BaseCommand):
|
|||
|
||||
|
||||
# 25206
|
||||
vm25206 = VMProduct.objects.create(name="OpenNebula 25206",
|
||||
vm25206 = VMProduct(name="OpenNebula 25206",
|
||||
cores=1,
|
||||
ram_in_gb=4,
|
||||
owner=user)
|
||||
|
||||
vm25206_ssd = VMDiskProduct.objects.create(vm=vm25206,
|
||||
vm25206.create_order_at(timezone.make_aware(datetime.datetime(2020,3,3)))
|
||||
vm25206.save()
|
||||
|
||||
vm25206_ssd = VMDiskProduct(vm=vm25206,
|
||||
owner=user,
|
||||
size_in_gb=30)
|
||||
|
||||
vm25206_ssd.create_order_at(timezone.make_aware(datetime.datetime(2020,3,3)))
|
||||
vm25206_ssd.save()
|
||||
|
||||
sys.exit(0)
|
||||
|
||||
vm25206.cores = 2
|
||||
vm25206.ram_in_gb = 8
|
||||
vm25206.save()
|
||||
|
|
@ -107,6 +116,7 @@ class Command(BaseCommand):
|
|||
vm25208_ssd.create_or_update_order(when_to_start=timezone.make_aware(datetime.datetime(2020,8,5)))
|
||||
|
||||
|
||||
# 25207
|
||||
vm25207 = VMProduct.objects.create(name="OpenNebula 25207",
|
||||
cores=1,
|
||||
ram_in_gb=4,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue