aboutsummaryrefslogtreecommitdiffstats
path: root/lib/python2.7/site-packages/autobuilder/buildsteps/DaftGetDevices.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python2.7/site-packages/autobuilder/buildsteps/DaftGetDevices.py')
-rw-r--r--lib/python2.7/site-packages/autobuilder/buildsteps/DaftGetDevices.py44
1 files changed, 0 insertions, 44 deletions
diff --git a/lib/python2.7/site-packages/autobuilder/buildsteps/DaftGetDevices.py b/lib/python2.7/site-packages/autobuilder/buildsteps/DaftGetDevices.py
deleted file mode 100644
index a6e87e7f..00000000
--- a/lib/python2.7/site-packages/autobuilder/buildsteps/DaftGetDevices.py
+++ /dev/null
@@ -1,44 +0,0 @@
-import os
-from buildbot.steps.transfer import FileUpload
-from buildbot.process.buildstep import BuildStep
-
-from lib.daft import DeployScanner
-from autobuilder.config import DAFT_WORKER_DEVICES_CFG
-
-class DaftGetDevices(FileUpload):
- haltOnFailure = True
-
- name = "DaftGetDevices"
-
- def __init__(self, factory, argdict=None, **kwargs):
- self.tests = None
- self.factory = factory
- for k, v in argdict.iteritems():
- setattr(self, k, v)
- self.description = "Getting devices configuration"
- self.timeout = 100000
- kwargs['timeout']=self.timeout
-
- super(DaftGetDevices, self).__init__(DAFT_WORKER_DEVICES_CFG,
- os.path.join('/tmp', 'devices.cfg'))
-
- def finished(self, result):
- if self.cmd:
- ds = DeployScanner(devsconf_file = self.masterdest)
- devices = ds.getDevices()
-
- found = False
- dut_label = self.getProperty('custom_dut')
- for d in devices:
- if d['dut_label'] == dut_label:
- self.setProperty('dut_name', d['dut_label'], 'DaftGetDevices')
- self.setProperty('server_ip', d['server_address'], 'DaftGetDevices')
- target_ip = "%s:%s" % (d['ctrl_address'], d['dut_sshport'])
- self.setProperty('target_ip', target_ip, 'DaftGetDevices')
-
- found = True
-
- if not found:
- return BuildStep.finished(self, FAILURE)
-
- return super(DaftGetDevices, self).finished(result)