本文整理汇总了Python中nova.db.fixed_ip_disassociate_all_by_timeout函数的典型用法代码示例。如果您正苦于以下问题:Python fixed_ip_disassociate_all_by_timeout函数的具体用法?Python fixed_ip_disassociate_all_by_timeout怎么用?Python fixed_ip_disassociate_all_by_timeout使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了fixed_ip_disassociate_all_by_timeout函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: tearDown
def tearDown(self):
"""Runs after each test method to finalize/tear down test
environment."""
try:
self.mox.UnsetStubs()
self.stubs.UnsetAll()
self.stubs.SmartUnsetAll()
self.mox.VerifyAll()
# NOTE(vish): Clean up any ips associated during the test.
ctxt = context.get_admin_context()
db.fixed_ip_disassociate_all_by_timeout(ctxt, FLAGS.host,
self.start)
db.network_disassociate_all(ctxt)
rpc.Consumer.attach_to_eventlet = self.originalAttach
for x in self.injected:
try:
x.stop()
except AssertionError:
pass
if FLAGS.fake_rabbit:
fakerabbit.reset_all()
db.security_group_destroy_all(ctxt)
super(TestCase, self).tearDown()
finally:
self.reset_flags()
开发者ID:anotherjesse,项目名称:nova,代码行数:27,代码来源:test.py
示例2: test_fixed_ip_disassociate_all_by_timeout_multi_host
def test_fixed_ip_disassociate_all_by_timeout_multi_host(self):
now = timeutils.utcnow()
ctxt = context.get_admin_context()
self._timeout_test(ctxt, now, True)
result = db.fixed_ip_disassociate_all_by_timeout(ctxt, 'foo', now)
self.assertEqual(result, 1)
result = db.fixed_ip_disassociate_all_by_timeout(ctxt, 'bar', now)
self.assertEqual(result, 0)
开发者ID:matiu2,项目名称:nova,代码行数:8,代码来源:test_db_api.py
示例3: test_fixed_ip_disassociate_all_by_timeout_single_host
def test_fixed_ip_disassociate_all_by_timeout_single_host(self):
now = utils.utcnow()
ctxt = context.get_admin_context()
self._timeout_test(ctxt, now, False)
result = db.fixed_ip_disassociate_all_by_timeout(ctxt, "foo", now)
self.assertEqual(result, 0)
result = db.fixed_ip_disassociate_all_by_timeout(ctxt, "bar", now)
self.assertEqual(result, 1)
开发者ID:hiteshwadekar,项目名称:nova,代码行数:8,代码来源:test_db_api.py
示例4: _disassociate_all_by_timeout
def _disassociate_all_by_timeout(cls, context, host, time_str):
time = timeutils.parse_isotime(time_str)
return db.fixed_ip_disassociate_all_by_timeout(context, host, time)
开发者ID:csdhome,项目名称:nova,代码行数:3,代码来源:fixed_ip.py
注:本文中的nova.db.fixed_ip_disassociate_all_by_timeout函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论