forked from 3wordchant/capsul-flask
Updates for upstream IP handling
This commit is contained in:
@ -239,17 +239,12 @@ def _create(vm_sizes, operating_systems, public_keys_for_account, affordable_vm_
|
||||
""")
|
||||
|
||||
if len(errors) == 0:
|
||||
id = makeCapsulId()
|
||||
get_model().create_vm(
|
||||
email=session["account"],
|
||||
id=id,
|
||||
size=size,
|
||||
os=os,
|
||||
ssh_authorized_keys=list(map(lambda x: x["name"], posted_keys))
|
||||
)
|
||||
id = make_capsul_id()
|
||||
current_app.config["HUB_MODEL"].create(
|
||||
email = session["account"],
|
||||
id=id,
|
||||
os=os,
|
||||
size=size,
|
||||
template_image_file_name=operating_systems[os]['template_image_file_name'],
|
||||
vcpus=vm_sizes[size]['vcpus'],
|
||||
memory_mb=vm_sizes[size]['memory_mb'],
|
||||
@ -267,6 +262,7 @@ def create():
|
||||
public_keys_for_account = get_model().list_ssh_public_keys_for_account(session["account"])
|
||||
account_balance = get_account_balance(get_vms(), get_payments(), datetime.utcnow())
|
||||
capacity_avaliable = current_app.config["HUB_MODEL"].capacity_avaliable(512*1024*1024)
|
||||
errors = list()
|
||||
|
||||
affordable_vm_sizes = dict()
|
||||
for key, vm_size in vm_sizes.items():
|
||||
|
Reference in New Issue
Block a user