• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python availability_zones.reset_cache函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中nova.availability_zones.reset_cache函数的典型用法代码示例。如果您正苦于以下问题:Python reset_cache函数的具体用法?Python reset_cache怎么用?Python reset_cache使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了reset_cache函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: setUp

 def setUp(self):
     super(AvailabilityZoneApiTest, self).setUp()
     availability_zones.reset_cache()
     self.stubs.Set(db, 'service_get_all', fake_service_get_all)
     self.stubs.Set(availability_zones, 'set_availability_zones',
                    fake_set_availability_zones)
     self.stubs.Set(servicegroup.API, 'service_is_up', fake_service_is_up)
开发者ID:aaaaatoz,项目名称:nova,代码行数:7,代码来源:test_availability_zone.py


示例2: setUp

 def setUp(self):
     super(ExtendedServerAttributesTest, self).setUp()
     availability_zones.reset_cache()
     fakes.stub_out_nw_api(self.stubs)
     self.stubs.Set(compute.api.API, 'get', fake_compute_get)
     self.stubs.Set(compute.api.API, 'get_all', fake_compute_get_all)
     self.stubs.Set(availability_zones, 'get_host_availability_zone',
                    fake_get_host_availability_zone)
开发者ID:Charu-Sharma,项目名称:nova,代码行数:8,代码来源:test_extended_availability_zone.py


示例3: setUp

 def setUp(self):
     super(AvailabilityZoneApiTestV21, self).setUp()
     availability_zones.reset_cache()
     self.stubs.Set(db, 'service_get_all', fake_service_get_all)
     self.stubs.Set(availability_zones, 'set_availability_zones',
                    fake_set_availability_zones)
     self.stubs.Set(servicegroup.API, 'service_is_up', fake_service_is_up)
     self.controller = self.availability_zone.AvailabilityZoneController()
     self.req = fakes.HTTPRequest.blank('')
开发者ID:ezhangle,项目名称:nova,代码行数:9,代码来源:test_availability_zone.py


示例4: setUp

 def setUp(self):
     super(ExtendedServerAttributesTest, self).setUp()
     availability_zones.reset_cache()
     fakes.stub_out_nw_api(self.stubs)
     self.stubs.Set(compute.api.API, "get", fake_compute_get)
     self.stubs.Set(compute.api.API, "get_all", fake_compute_get_all)
     self.stubs.Set(availability_zones, "get_host_availability_zone", fake_get_host_availability_zone)
     return_server = fakes.fake_instance_get()
     self.stubs.Set(db, "instance_get_by_uuid", return_server)
开发者ID:pacharya-pf9,项目名称:nova,代码行数:9,代码来源:test_extended_availability_zone.py


示例5: setUp

 def setUp(self):
     super(ExtendedAvailabilityZoneTestV21, self).setUp()
     availability_zones.reset_cache()
     fakes.stub_out_nw_api(self.stubs)
     self.stubs.Set(compute.api.API, 'get', fake_compute_get)
     self.stubs.Set(compute.api.API, 'get_all', fake_compute_get_all)
     self.stubs.Set(availability_zones, 'get_host_availability_zone',
                    fake_get_host_availability_zone)
     return_server = fakes.fake_instance_get()
     self.stubs.Set(db, 'instance_get_by_uuid', return_server)
开发者ID:csdhome,项目名称:nova,代码行数:10,代码来源:test_extended_availability_zone.py


示例6: setUp

 def setUp(self):
     super(AvailabilityZoneApiTestV21, self).setUp()
     availability_zones.reset_cache()
     self.stubs.Set(db, 'service_get_all', fake_service_get_all)
     self.stubs.Set(availability_zones, 'set_availability_zones',
                    fake_set_availability_zones)
     self.stubs.Set(servicegroup.API, 'service_is_up', fake_service_is_up)
     self.controller = self.availability_zone.AvailabilityZoneController()
     self.admin_webreq = webob.Request.blank('')
     self.admin_webreq.environ['nova.context'] = context.get_admin_context()
开发者ID:dtroyer,项目名称:nova,代码行数:10,代码来源:test_availability_zone.py


示例7: setUp

 def setUp(self):
     super(AvailabilityZoneApiTestV21, self).setUp()
     availability_zones.reset_cache()
     fakes.stub_out_nw_api(self)
     self.stub_out('nova.db.api.service_get_all', fake_service_get_all)
     self.stub_out('nova.availability_zones.set_availability_zones',
                   lambda c, services: services)
     self.stub_out('nova.servicegroup.API.service_is_up',
                   lambda s, service: service['binary'] != u"nova-network")
     self.controller = self.availability_zone.AvailabilityZoneController()
     self.req = fakes.HTTPRequest.blank('')
开发者ID:klmitch,项目名称:nova,代码行数:11,代码来源:test_availability_zone.py


示例8: setUp

 def setUp(self):
     super(ExtendedAvailabilityZoneTestV21, self).setUp()
     availability_zones.reset_cache()
     fakes.stub_out_nw_api(self)
     fakes.stub_out_secgroup_api(self)
     self.stub_out('nova.compute.api.API.get', fake_compute_get)
     self.stub_out('nova.compute.api.API.get_all', fake_compute_get_all)
     self.stub_out('nova.availability_zones.get_host_availability_zone',
                    fake_get_host_availability_zone)
     return_server = fakes.fake_instance_get()
     self.stub_out('nova.db.instance_get_by_uuid', return_server)
开发者ID:Juniper,项目名称:nova,代码行数:11,代码来源:test_extended_availability_zone.py


示例9: setUp

    def setUp(self):
        super(ExtendedServerAttributesTest, self).setUp()
        availability_zones.reset_cache()
        fakes.stub_out_nw_api(self.stubs)
        self.stubs.Set(compute.api.API, 'get', fake_compute_get)
        self.stubs.Set(compute.api.API, 'get_all', fake_compute_get_all)
        self.stubs.Set(availability_zones, 'get_host_availability_zone',
                       fake_get_host_availability_zone)

        self.flags(
            osapi_compute_extension=[
                'nova.api.openstack.compute.contrib.select_extensions'],
            osapi_compute_ext_list=['Extended_availability_zone'])
开发者ID:Charu-Sharma,项目名称:nova,代码行数:13,代码来源:test_extended_availability_zone.py


示例10: setUp

 def setUp(self):
     super(AvailabilityZoneApiTestV21, self).setUp()
     availability_zones.reset_cache()
     fakes.stub_out_nw_api(self)
     self.stub_out('nova.availability_zones.set_availability_zones',
                   lambda c, services: services)
     self.stub_out('nova.servicegroup.API.service_is_up',
                   lambda s, service: service['binary'] != u"nova-network")
     self.controller = self.availability_zone.AvailabilityZoneController()
     self.mock_service_get_all = mock.patch.object(
         self.controller.host_api, 'service_get_all',
         side_effect=fake_service_get_all).start()
     self.addCleanup(self.mock_service_get_all.stop)
     self.req = fakes.HTTPRequest.blank('')
开发者ID:mahak,项目名称:nova,代码行数:14,代码来源:test_availability_zone.py


示例11: setUp

    def setUp(self):
        super(ExtendedAvailabilityZoneTest, self).setUp()
        availability_zones.reset_cache()
        fakes.stub_out_nw_api(self.stubs)
        self.stubs.Set(compute.api.API, 'get', fake_compute_get)
        self.stubs.Set(compute.api.API, 'get_all', fake_compute_get_all)
        self.stubs.Set(availability_zones, 'get_host_availability_zone',
                       fake_get_host_availability_zone)
        return_server = fakes.fake_instance_get()
        self.stubs.Set(db, 'instance_get_by_uuid', return_server)

        self.flags(
            osapi_compute_extension=[
                'nova.api.openstack.compute.contrib.select_extensions'],
            osapi_compute_ext_list=['Extended_availability_zone'])
开发者ID:AsherBond,项目名称:nova,代码行数:15,代码来源:test_extended_availability_zone.py


示例12: test_rest_availability_zone_reset_cache

 def test_rest_availability_zone_reset_cache(self):
     az._get_cache().add('cache', 'fake_value')
     az.reset_cache()
     self.assertIsNone(az._get_cache().get('cache'))
开发者ID:Juniper,项目名称:nova,代码行数:4,代码来源:test_availability_zones.py


示例13: test_rest_availability_zone_reset_cache

 def test_rest_availability_zone_reset_cache(self):
     az.reset_cache()
     self.assertEqual(az._get_cache().get("cache"), None)
开发者ID:kobtea,项目名称:nova,代码行数:3,代码来源:test_availability_zones.py



注:本文中的nova.availability_zones.reset_cache函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap