forked from 3wordchant/capsul-flask
Support dualstack ipv6 in the console controller
This commit updates the console controller logic and a few bits in the model in order to support multiple address families (ipv4 and ipv6)
This commit is contained in:
@ -179,10 +179,14 @@ class DBModel:
|
||||
self.cursor.fetchall()
|
||||
))
|
||||
|
||||
def update_vm_ip(self, email, id, ipv4):
|
||||
def update_vm_ipv4(self, email, id, ipv4):
|
||||
self.cursor.execute("UPDATE vms SET public_ipv4 = %s WHERE email = %s AND id = %s", (ipv4, email, id))
|
||||
self.connection.commit()
|
||||
|
||||
def update_vm_ipv6(self, email, id, ipv6):
|
||||
self.cursor.execute("UPDATE vms SET public_ipv6 = %s WHERE email = %s AND id = %s", (ipv6, email, id))
|
||||
self.connection.commit()
|
||||
|
||||
def update_vm_ssh_host_keys(self, email, id, ssh_host_keys):
|
||||
for key in ssh_host_keys:
|
||||
self.cursor.execute("""
|
||||
|
Reference in New Issue
Block a user