diff --git a/capsulflask/console.py b/capsulflask/console.py index c161e7f..302644e 100644 --- a/capsulflask/console.py +++ b/capsulflask/console.py @@ -117,9 +117,6 @@ def detail(id): vm["created"] = vm['created'].strftime("%b %d %Y %H:%M") vm["ssh_authorized_keys"] = ", ".join(vm["ssh_authorized_keys"]) if len(vm["ssh_authorized_keys"]) > 0 else "" - - current_app.logger.info(f"asd {needs_ssh_host_keys} {json.dumps(vm['ssh_host_keys'])})") - return render_template( "capsul-detail.html", csrf_token = session["csrf-token"], @@ -139,10 +136,6 @@ def create(): account_balance = get_account_balance(get_vms(), get_payments(), datetime.utcnow()) capacity_avaliable = current_app.config["VIRTUALIZATION_MODEL"].capacity_avaliable(512*1024*1024) errors = list() - - ssh_keys_from_db_string = "\n".join(list(map(lambda x: f"name: {x['name']}**content: {x['content']}", public_keys_for_account))) - email_to_log = session["account"] - current_app.logger.info(f"create for {email_to_log}: ssh keys from db:\n {ssh_keys_from_db_string}") if request.method == "POST": if "csrf-token" not in request.form or request.form['csrf-token'] != session['csrf-token']: @@ -167,15 +160,11 @@ def create(): errors.append("something went wrong with ssh keys") else: for i in range(0, posted_keys_count): - to_log_bool = f"ssh_key_{i}" in request.form - current_app.logger.info(f"checking for ssh_key_{i}: {to_log_bool}") if f"ssh_key_{i}" in request.form: posted_name = request.form[f"ssh_key_{i}"] - current_app.logger.info(f"ssh key posted_name: {posted_name}") key = None for x in public_keys_for_account: if x['name'] == posted_name: - current_app.logger.info(f"ssh key posted_name {posted_name} was found") key = x if key: posted_keys.append(key) @@ -192,9 +181,6 @@ def create(): host(s) at capacity. no capsuls can be created at this time. sorry. """) - posted_keys_string = "\n".join(list(map(lambda x: f"name: {x['name']}**content: {x['content']}", posted_keys))) - current_app.logger.info(f"create for {email_to_log}: posted_keys:\n {posted_keys_string}") - if len(errors) == 0: id = makeCapsulId() get_model().create_vm( diff --git a/capsulflask/db_model.py b/capsulflask/db_model.py index fe362eb..82638f5 100644 --- a/capsulflask/db_model.py +++ b/capsulflask/db_model.py @@ -123,8 +123,6 @@ class DBModel: ) for ssh_authorized_key in ssh_authorized_keys: - current_app.logger.info(f"INSERT INTO vm_ssh_authorized_key (email, vm_id, ssh_public_key_name) VALUES (\"{email}\", \"{id}\", \"{ssh_authorized_key}\")") - self.cursor.execute(""" INSERT INTO vm_ssh_authorized_key (email, vm_id, ssh_public_key_name) VALUES (%s, %s, %s) diff --git a/capsulflask/static/style.css b/capsulflask/static/style.css index 4ad29f6..9382ef3 100644 --- a/capsulflask/static/style.css +++ b/capsulflask/static/style.css @@ -102,9 +102,6 @@ main { .row.grid-large > div { flex: 1 1 20em; } -.row.grid-medium > div { - flex: 1 1 13em; -} .row.grid-small > div { flex: 0 0 8em; } diff --git a/capsulflask/virt_model.py b/capsulflask/virt_model.py index 1859a9f..0a15c23 100644 --- a/capsulflask/virt_model.py +++ b/capsulflask/virt_model.py @@ -147,8 +147,6 @@ class ShellScriptVirtualization(VirtualizationInterface): ssh_keys_string = "\n".join(ssh_authorized_keys) - current_app.logger.info(f"create vm virt model ssh_keys_string: {ssh_keys_string}") - completedProcess = run([ join(current_app.root_path, 'shell_scripts/create.sh'), id, @@ -170,8 +168,6 @@ class ShellScriptVirtualization(VirtualizationInterface): ssh_authorized_keys={ssh_keys_string} """ - current_app.logger.info(f"create vm status: {status} vmSettings: {vmSettings}") - if not status == "success": raise ValueError(f"""failed to create vm for {email} with: {vmSettings}