本文整理汇总了Python中nova.db.instance_get_active_by_window_joined函数的典型用法代码示例。如果您正苦于以下问题:Python instance_get_active_by_window_joined函数的具体用法?Python instance_get_active_by_window_joined怎么用?Python instance_get_active_by_window_joined使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了instance_get_active_by_window_joined函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_instance_get_active_by_window_joined
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"
)
示例2: test_instance_get_active_by_window_joined
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')
示例3: _get_active_by_window_joined
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)
示例4: _db_instance_get_active_by_window_joined
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)