enums removed

This commit is contained in:
ahmadbilalkhalid 2019-06-25 15:18:32 +05:00
parent 77741f363d
commit 272bbcd5c6
2 changed files with 1 additions and 8 deletions

View file

@ -1,6 +0,0 @@
from enum import Enum
class VmStatus(Enum):
REQUESTED_NEW = "REQUESTED_NEW"
SCHEDULED_DEPLOY = "SCHEDULED_DEPLOY"

View file

@ -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))