device_db: make best_effort parameter optional for controllers

This commit is contained in:
Sebastien Bourdeauducq 2015-10-18 14:37:08 +08:00
parent a5606768ad
commit 03e317780b
2 changed files with 2 additions and 6 deletions

View File

@ -22,8 +22,8 @@ def _create_device(desc, device_mgr):
device_class = getattr(module, desc["class"])
return device_class(device_mgr, **desc["arguments"])
elif ty == "controller":
if desc["best_effort"]:
cl = BestEffortClient
if desc.get("best_effort", False):
cls = BestEffortClient
else:
cls = Client
# Automatic target can be specified either by the absence of

View File

@ -92,28 +92,24 @@
"qc_q1_0": {
"type": "controller",
"best_effort": false,
"host": "::1",
"port": 4000,
"command": "pdq2_controller -p {port} --bind {bind} --simulation --dump qc_q1_0.bin"
},
"qc_q1_1": {
"type": "controller",
"best_effort": false,
"host": "::1",
"port": 4001,
"command": "pdq2_controller -p {port} --bind {bind} --simulation --dump qc_q1_1.bin"
},
"qc_q1_2": {
"type": "controller",
"best_effort": false,
"host": "::1",
"port": 4002,
"command": "pdq2_controller -p {port} --bind {bind} --simulation --dump qc_q1_2.bin"
},
"qc_q1_3": {
"type": "controller",
"best_effort": false,
"host": "::1",
"port": 4003,
"command": "pdq2_controller -p {port} --bind {bind} --simulation --dump qc_q1_3.bin"