feat: Enhance instance creation with additional parameters and improve error handling
This commit is contained in:
@@ -104,7 +104,7 @@ class instace:
|
||||
def __init__():
|
||||
return list()
|
||||
|
||||
def new(name: str):
|
||||
def new(name: str, address: str, postal_code: str, city: str, school_number: str, it_admin: str) -> int:
|
||||
"""
|
||||
Generates a new instance with the subdomain [name].invario.eu
|
||||
|
||||
@@ -118,9 +118,22 @@ class instace:
|
||||
port = port_starter
|
||||
for i in instace.list():
|
||||
port =+ 1
|
||||
|
||||
|
||||
if execute_script(_var, _cmd, "add", clear_special(name), port):
|
||||
add_dns(name, port)
|
||||
try:
|
||||
necessary_info = {
|
||||
"name": f"name={name}",
|
||||
"address": f"address={address}",
|
||||
"postal_code": f"postal_code={postal_code}",
|
||||
"city": f"city={city}",
|
||||
"school_number": f"school_number={school_number}",
|
||||
"it_admin": f"it_admin={it_admin}"
|
||||
}
|
||||
if execute_script(_var, _cmd, "school", clear_special(name), str(necessary_info)):
|
||||
pass
|
||||
except:
|
||||
return False
|
||||
return int(port)
|
||||
else:
|
||||
return False
|
||||
|
||||
@@ -20,7 +20,9 @@
|
||||
<h2>Support</h2>
|
||||
<p><strong>E-Mail:</strong> support@invario.de</p>
|
||||
<p><strong>Telefon:</strong> +49 (0) 123 / 456790</p>
|
||||
<p>Mo - Fr: 11:00 - 13:00 Uhr</p>
|
||||
<p>Bei laufendem Betrieb, störenden Fehlern oder dringenden Rückfragen im Schulalltag.</p>
|
||||
<p><strong>Support-Tickets:</strong> Über das Kundenportal können jederzeit Support-Tickets erstellt und der Bearbeitungsstatus verfolgt werden mit einer Antwort innerhalb von 24 Stunden.</p>
|
||||
</article>
|
||||
|
||||
<article class="contact-card">
|
||||
|
||||
Reference in New Issue
Block a user