forked from 3wordchant/capsul-flask
Merge branch 'master' into multiple-hosts
Conflicts: capsulflask/console.py capsulflask/db.py capsulflask/shared.py capsulflask/virt_model.py
This commit is contained in:
@ -1,18 +1,27 @@
|
||||
import re
|
||||
|
||||
from flask import current_app
|
||||
from typing import List
|
||||
|
||||
class OnlineHost:
|
||||
def __init__(self, id: str, url: str):
|
||||
self.id = id
|
||||
self.url = url
|
||||
|
||||
# I decided to just use dict everywhere instead because I have to use dict to read it from json
|
||||
# class SSHHostKey:
|
||||
# def __init__(self, key_type=None, content=None, sha256=None):
|
||||
# self.key_type = key_type
|
||||
# self.content = content
|
||||
# self.sha256 = sha256
|
||||
|
||||
class VirtualMachine:
|
||||
def __init__(self, id, host, ipv4=None, ipv6=None):
|
||||
def __init__(self, id, host, ipv4=None, ipv6=None, ssh_host_keys: List[dict] = list()):
|
||||
self.id = id
|
||||
self.host = host
|
||||
self.ipv4 = ipv4
|
||||
self.ipv6 = ipv6
|
||||
self.ssh_host_keys = ssh_host_keys
|
||||
|
||||
class VirtualizationInterface:
|
||||
def capacity_avaliable(self, additional_ram_bytes: int) -> bool:
|
||||
|
Reference in New Issue
Block a user