enums removed
This commit is contained in:
parent
77741f363d
commit
272bbcd5c6
2 changed files with 1 additions and 8 deletions
6
enums.py
6
enums.py
|
@ -1,6 +0,0 @@
|
|||
from enum import Enum
|
||||
|
||||
|
||||
class VmStatus(Enum):
|
||||
REQUESTED_NEW = "REQUESTED_NEW"
|
||||
SCHEDULED_DEPLOY = "SCHEDULED_DEPLOY"
|
3
main.py
3
main.py
|
@ -5,7 +5,6 @@ from helper import check_otp
|
|||
from flask import Flask
|
||||
from flask_restful import Resource, Api, reqparse
|
||||
from decouple import config
|
||||
from enums import VmStatus
|
||||
from uuid import uuid4
|
||||
|
||||
app = Flask(__name__)
|
||||
|
@ -35,7 +34,7 @@ class CreateVM(Resource):
|
|||
vm_entry = {"owner": name,
|
||||
"specs": specs,
|
||||
"hostname": "",
|
||||
"status": VmStatus.REQUESTED_NEW.value}
|
||||
"status": "REQUESTED_NEW"}
|
||||
|
||||
etcd_client.put(f"/v1/vm/{uuid4().hex}", json.dumps(vm_entry))
|
||||
|
||||
|
|
Loading…
Reference in a new issue