Updates for upstream IP handling
This commit is contained in:
parent
630940c186
commit
44874b9056
@ -236,7 +236,7 @@ def _create(vm_sizes, operating_systems, public_keys_for_account, server_data):
|
||||
""")
|
||||
|
||||
if len(errors) == 0:
|
||||
id = makeCapsulId()
|
||||
id = make_capsul_id()
|
||||
get_model().create_vm(
|
||||
email=session["account"],
|
||||
id=id,
|
||||
|
@ -10,7 +10,7 @@ from nanoid import generate
|
||||
from capsulflask.auth import account_required
|
||||
from capsulflask.db import get_model
|
||||
|
||||
bp = Blueprint("webapi", __name__, url_prefix="/api")
|
||||
bp = Blueprint("publicapi", __name__, url_prefix="/api")
|
||||
|
||||
@bp.route("/capsul/create", methods=["POST"])
|
||||
@account_required
|
||||
@ -25,6 +25,8 @@ def capsul_create():
|
||||
account_balance = get_account_balance(get_vms(), get_payments(), datetime.datetime.utcnow())
|
||||
capacity_avaliable = current_app.config["HUB_MODEL"].capacity_avaliable(512*1024*1024)
|
||||
|
||||
request.json['ssh_authorized_key_count'] = 1
|
||||
|
||||
id, errors = _create(
|
||||
vm_sizes,
|
||||
operating_systems,
|
||||
|
@ -1,2 +0,0 @@
|
||||
DROP TABLE api_keys;
|
||||
UPDATE schemaversion SET version = 15;
|
2
capsulflask/schema_migrations/17_down_api_tokens.py
Normal file
2
capsulflask/schema_migrations/17_down_api_tokens.py
Normal file
@ -0,0 +1,2 @@
|
||||
DROP TABLE api_keys;
|
||||
UPDATE schemaversion SET version = 16;
|
@ -6,4 +6,4 @@ CREATE TABLE api_tokens (
|
||||
token TEXT NOT NULL
|
||||
);
|
||||
|
||||
UPDATE schemaversion SET version = 16;
|
||||
UPDATE schemaversion SET version = 17;
|
Loading…
Reference in New Issue
Block a user