예제 #1
0
    def _get_api(self, wait):
        if wait:
            self.wait_for_ssh()
            try:
                testlib.assert_true_within_long(
                    lambda: self.service('ovirt-engine').alive())

                api = []
                testlib.assert_true_within_short(
                    lambda: api.append(self._create_api()) or True)
            except AssertionError:
                raise RuntimeError('Failed to connect to the engine')
        return api.pop()
예제 #2
0
    def _get_api(self, wait):
        if wait:
            self.wait_for_ssh()
            try:
                testlib.assert_true_within_long(
                    lambda: self.service('ovirt-engine').alive()
                )

                api = []
                testlib.assert_true_within_short(
                    lambda: api.append(self._create_api()) or True
                )
            except AssertionError:
                raise RuntimeError('Failed to connect to the engine')
        return api.pop()
예제 #3
0
파일: virt.py 프로젝트: tlitovsk/lago
 def get():
     instance = self._create_api()
     if instance:
         api.append(instance)
         return True
     return False
예제 #4
0
파일: virt.py 프로젝트: irosenzw/lago
 def get():
     instance = self._create_api()
     if instance:
         api.append(instance)
         return True
     return False