Merge into master

This commit is contained in:
Ahmed Bilal 2019-09-03 18:01:40 +02:00
commit 4a3c81852a
12 changed files with 18 additions and 364 deletions

4
common_fields.py Normal file → Executable file
View file

@ -1,5 +1,5 @@
from etcd3_wrapper import Etcd3Wrapper
from specs_parser import SpecsParser
from config import etcd_client as client
specs_parser = SpecsParser(exceptional_devices=["cpu"])
@ -43,8 +43,6 @@ class VmUUIDField(Field):
self.validation = self.vm_uuid_validation
def vm_uuid_validation(self):
client = Etcd3Wrapper()
r = client.get(f"/v1/vm/{self.uuid}")
if not r:
self.add_error(f"VM with uuid {self.uuid} does not exists")