Merge into master
This commit is contained in:
parent
9aeb05987b
commit
4a3c81852a
12 changed files with 18 additions and 364 deletions
4
common_fields.py
Normal file → Executable file
4
common_fields.py
Normal file → Executable 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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue