예제 #1
0
 def __init__(self, topic, host=None):
     super(AgentManager, self).__init__(CONF)
     self.topic = topic
     self.host = host or CONF.host
     self.fpga_driver = FPGADriver()
     self.cond_api = cond_api.ConductorAPI()
     self._rt = ResourceTracker(host, self.cond_api)
예제 #2
0
 def __init__(self, topic, host=None):
     super(AgentManager, self).__init__(CONF)
     #can only use in the same node, change it to RPC to conductor
     self.conductor_api = conductor_api.ConductorAPI()
     self.topic = topic
     self.host = host or CONF.host
     self.fpga_driver = FPGADriver()
     self._rt = ResourceTracker(host, self.conductor_api)
예제 #3
0
 def setUp(self):
     super(TestResourceTracker, self).setUp()
     self.syspath = sysinfo.SYS_FPGA
     sysinfo.SYS_FPGA = "/sys/class/fpga"
     tmp_sys_dir = self.useFixture(fixtures.TempDir())
     prepare_test_data.create_fake_sysfs(tmp_sys_dir.path)
     sysinfo.SYS_FPGA = os.path.join(
         tmp_sys_dir.path, sysinfo.SYS_FPGA.split("/", 1)[-1])
     utils.SYS_FPGA_PATH = sysinfo.SYS_FPGA
     self.host = CONF.host
     self.cond_api = cond_api.ConductorAPI()
     self.rt = ResourceTracker(self.host, self.cond_api)
예제 #4
0
 def setUp(self):
     super(TestResourceTracker, self).setUp()
     self.host = CONF.host
     self.cond_api = cond_api.ConductorAPI()
     self.rt = ResourceTracker(self.host, self.cond_api)
예제 #5
0
파일: hooks.py 프로젝트: yihleong/cyborg
 def __init__(self):
     self.conductor_api = rpcapi.ConductorAPI()