示例#1
0
 def __init__(self, client, xml_compat):
     self._vdsmapi = vdsmapi.get_api()
     self._client = client
     self._xml_compat = xml_compat
     self._timeouts = {
         'migrationCreate': config.getint(
             'vars', 'migration_create_timeout'),
     }
示例#2
0
文件: Bridge.py 项目: mykaul/vdsm
 def __init__(self):
     self.api = vdsmapi.get_api()
     self._threadLocal = threading.local()
     self.log = logging.getLogger('DynamicBridge')
示例#3
0
 def _getAPI(self):
     testPath = os.path.realpath(__file__)
     dirName = os.path.split(testPath)[0]
     apiPath = os.path.join(
         dirName, '..', 'lib', 'api', 'vdsmapi-schema.json')
     return vdsmapi.get_api(apiPath)
示例#4
0
 def testSchemaParse(self):
     self.assertTrue(isinstance(vdsmapi.get_api(), dict))
示例#5
0
 def load_api(self, data):
     vdsmapi._api_info = None
     data = textwrap.dedent(data)
     with temporaryPath(data=data) as filename:
         yield vdsmapi.get_api(filename)
示例#6
0
 def testSchemaParse(self):
     self.assertTrue(isinstance(vdsmapi.get_api(), dict))
示例#7
0
 def load_api(self, data):
     vdsmapi._api_info = None
     data = textwrap.dedent(data)
     with temporaryPath(data=data) as filename:
         yield vdsmapi.get_api(filename)
示例#8
0
文件: Bridge.py 项目: fancyKai/vdsm
 def __init__(self):
     self.api = vdsmapi.get_api()
     self._threadLocal = threading.local()
     self.log = logging.getLogger('DynamicBridge')
示例#9
0
 def __init__(self, client, xml_compat):
     self._vdsmapi = vdsmapi.get_api()
     self._client = client
     self._xml_compat = xml_compat
示例#10
0
 def _getAPI(self):
     testPath = os.path.realpath(__file__)
     dirName = os.path.split(testPath)[0]
     apiPath = os.path.join(dirName, '..', 'lib', 'api',
                            'vdsmapi-schema.json')
     return vdsmapi.get_api(apiPath)