当前位置: 首页>>代码示例>>Python>>正文


Python db.agent_build_get_by_triple函数代码示例

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


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

示例1: test_agent_build_get_by_triple

 def test_agent_build_get_by_triple(self):
     self.mox.StubOutWithMock(db, 'agent_build_get_by_triple')
     db.agent_build_get_by_triple(self.context, 'fake-hv', 'fake-os',
                                  'fake-arch').AndReturn('it worked')
     self.mox.ReplayAll()
     result = self.conductor.agent_build_get_by_triple(self.context,
                                                       'fake-hv',
                                                       'fake-os',
                                                       'fake-arch')
     self.assertEqual(result, 'it worked')
开发者ID:gminator,项目名称:nova,代码行数:10,代码来源:test_conductor.py

示例2: modify

 def modify(self, os, architecture, version, url, md5hash,
            hypervisor='xen'):
     """Update an existing agent build."""
     ctxt = context.get_admin_context()
     agent_build_ref = db.agent_build_get_by_triple(ctxt,
                               hypervisor, os, architecture)
     db.agent_build_update(ctxt, agent_build_ref['id'],
                           {'version': version,
                            'url': url,
                            'md5hash': md5hash})
开发者ID:AnyBucket,项目名称:nova,代码行数:10,代码来源:manage.py

示例3: test_agent_build_get_by_triple

 def test_agent_build_get_by_triple(self):
     self.mox.StubOutWithMock(db, "agent_build_get_by_triple")
     db.agent_build_get_by_triple(self.context, "fake-hv", "fake-os", "fake-arch").AndReturn("it worked")
     self.mox.ReplayAll()
     result = self.conductor.agent_build_get_by_triple(self.context, "fake-hv", "fake-os", "fake-arch")
     self.assertEqual(result, "it worked")
开发者ID:jdurgin,项目名称:nova,代码行数:6,代码来源:test_conductor.py

示例4: get_by_triple

 def get_by_triple(cls, context, hypervisor, os, architecture):
     db_agent = db.agent_build_get_by_triple(context, hypervisor,
                                             os, architecture)
     if not db_agent:
         return None
     return cls._from_db_object(context, objects.Agent(), db_agent)
开发者ID:Dynavisor,项目名称:nova,代码行数:6,代码来源:agent.py

示例5: agent_build_get_by_triple

 def agent_build_get_by_triple(self, context, hypervisor, os, architecture):
     return db.agent_build_get_by_triple(context,
                                         hypervisor, os, architecture)
开发者ID:gajen,项目名称:nova,代码行数:3,代码来源:fake.py

示例6: delete

 def delete(self, os, architecture, hypervisor='xen'):
     """Deletes an existing agent build."""
     ctxt = context.get_admin_context()
     agent_build_ref = db.agent_build_get_by_triple(ctxt,
                               hypervisor, os, architecture)
     db.agent_build_destroy(ctxt, agent_build_ref['id'])
开发者ID:AnyBucket,项目名称:nova,代码行数:6,代码来源:manage.py

示例7: modify

 def modify(self, os, architecture, version, url, md5hash, hypervisor="xen"):
     """Update an existing agent build."""
     ctxt = context.get_admin_context()
     agent_build_ref = db.agent_build_get_by_triple(ctxt, hypervisor, os, architecture)
     db.agent_build_update(ctxt, agent_build_ref["id"], {"version": version, "url": url, "md5hash": md5hash})
开发者ID:comstud,项目名称:nova,代码行数:5,代码来源:manage.py


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