Ejemplo n.º 1
0
 def test_instance_get_active_by_window_joined(self):
     self.mox.StubOutWithMock(db, "instance_get_active_by_window_joined")
     db.instance_get_active_by_window_joined(self.context, "fake-begin", "fake-end", "fake-proj", "fake-host")
     self.mox.ReplayAll()
     self.conductor.instance_get_active_by_window_joined(
         self.context, "fake-begin", "fake-end", "fake-proj", "fake-host"
     )
Ejemplo n.º 2
0
 def test_instance_get_active_by_window_joined(self):
     self.mox.StubOutWithMock(db, 'instance_get_active_by_window_joined')
     db.instance_get_active_by_window_joined(self.context, 'fake-begin',
                                             'fake-end', 'fake-proj',
                                             'fake-host')
     self.mox.ReplayAll()
     self.conductor.instance_get_active_by_window_joined(
         self.context, 'fake-begin', 'fake-end', 'fake-proj', 'fake-host')
Ejemplo n.º 3
0
 def test_instance_get_active_by_window_joined(self):
     self.mox.StubOutWithMock(db, 'instance_get_active_by_window_joined')
     db.instance_get_active_by_window_joined(self.context, 'fake-begin',
                                             'fake-end', 'fake-proj',
                                             'fake-host')
     self.mox.ReplayAll()
     self.conductor.instance_get_active_by_window_joined(
         self.context, 'fake-begin', 'fake-end', 'fake-proj', 'fake-host')
Ejemplo n.º 4
0
 def _get_active_by_window_joined(cls, context, begin, end=None, project_id=None, host=None, expected_attrs=None):
     # NOTE(mriedem): We need to convert the begin/end timestamp strings
     # to timezone-aware datetime objects for the DB API call.
     begin = timeutils.parse_isotime(begin)
     end = timeutils.parse_isotime(end) if end else None
     db_inst_list = db.instance_get_active_by_window_joined(context, begin, end, project_id, host)
     return _make_instance_list(context, cls(), db_inst_list, expected_attrs)
Ejemplo n.º 5
0
 def _get_active_by_window_joined(cls, context, begin, end=None,
                                 project_id=None, host=None,
                                 expected_attrs=None,
                                 use_slave=False):
     # NOTE(mriedem): We need to convert the begin/end timestamp strings
     # to timezone-aware datetime objects for the DB API call.
     begin = timeutils.parse_isotime(begin)
     end = timeutils.parse_isotime(end) if end else None
     db_inst_list = db.instance_get_active_by_window_joined(
         context, begin, end, project_id, host,
         columns_to_join=_expected_cols(expected_attrs))
     return _make_instance_list(context, cls(), db_inst_list,
                                expected_attrs)
Ejemplo n.º 6
0
 def _db_instance_get_active_by_window_joined(
         context, begin, end, project_id, host, columns_to_join,
         use_slave=False):
     return db.instance_get_active_by_window_joined(
         context, begin, end, project_id, host,
         columns_to_join=columns_to_join)