WIP
This commit is contained in:
parent
915fb12f01
commit
f457d4b8b4
@ -150,6 +150,21 @@ class Server():
|
|||||||
response.status_code = 400
|
response.status_code = 400
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
def update_client_data(request_user, self):
|
||||||
|
request_content_type = request.headers.get('Content-Type')
|
||||||
|
if request_content_type == 'application/json':
|
||||||
|
json_object = request.json
|
||||||
|
try:
|
||||||
|
pass
|
||||||
|
except Exception as ex:
|
||||||
|
response = jsonify({
|
||||||
|
"message": "Internal server error",
|
||||||
|
"data": None,
|
||||||
|
"error": str(ex)
|
||||||
|
})
|
||||||
|
response.status_code = 400
|
||||||
|
return response
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
# add admin user to dataabse (or update existing one)
|
# add admin user to dataabse (or update existing one)
|
||||||
salt = bcrypt.gensalt()
|
salt = bcrypt.gensalt()
|
||||||
|
Binary file not shown.
@ -21,6 +21,7 @@ class Client(Base):
|
|||||||
vm_list_on_machine = relationship(
|
vm_list_on_machine = relationship(
|
||||||
"VMImage",
|
"VMImage",
|
||||||
secondary=client_image_table,
|
secondary=client_image_table,
|
||||||
|
back_populates="clients"
|
||||||
)
|
)
|
||||||
|
|
||||||
def has_vm_installed(self, vm_object):
|
def has_vm_installed(self, vm_object):
|
||||||
@ -43,7 +44,8 @@ class VMImage(Base):
|
|||||||
image_name_version_combo = Column(String(600), nullable=False, unique=True)
|
image_name_version_combo = Column(String(600), nullable=False, unique=True)
|
||||||
clients = relationship(
|
clients = relationship(
|
||||||
"Client",
|
"Client",
|
||||||
secondary=client_image_table
|
secondary=client_image_table,
|
||||||
|
back_populates="vm_list_on_machine"
|
||||||
)
|
)
|
||||||
|
|
||||||
def as_dict(self):
|
def as_dict(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user