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


Python Factory.create_kvm_job方法代码示例

本文整理汇总了Python中lava_dispatcher.pipeline.test.test_basic.Factory.create_kvm_job方法的典型用法代码示例。如果您正苦于以下问题:Python Factory.create_kvm_job方法的具体用法?Python Factory.create_kvm_job怎么用?Python Factory.create_kvm_job使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在lava_dispatcher.pipeline.test.test_basic.Factory的用法示例。


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

示例1: setUp

# 需要导入模块: from lava_dispatcher.pipeline.test.test_basic import Factory [as 别名]
# 或者: from lava_dispatcher.pipeline.test.test_basic.Factory import create_kvm_job [as 别名]
 def setUp(self):
     """
     Attempt to setup a valid group with clients and test the protocol
     """
     super(TestMultinode, self).setUp()
     factory = Factory()
     self.client_job = factory.create_kvm_job('sample_jobs/kvm-multinode-client.yaml')
     self.server_job = factory.create_kvm_job('sample_jobs/kvm-multinode-server.yaml')
     self.coord = TestCoordinator()
开发者ID:dawei1991,项目名称:lava-dispatcher,代码行数:11,代码来源:test_multinode.py

示例2: test_kvm_simulation

# 需要导入模块: from lava_dispatcher.pipeline.test.test_basic import Factory [as 别名]
# 或者: from lava_dispatcher.pipeline.test.test_basic.Factory import create_kvm_job [as 别名]
    def test_kvm_simulation(self):  # pylint: disable=too-many-statements
        """
        Build a pipeline which simulates a KVM LAVA job
        without using the formal objects (to avoid validating
        data known to be broken). The details are entirely
        arbitrary.
        """
        factory = Factory()
        job = factory.create_kvm_job('sample_jobs/kvm.yaml')
        pipe = Pipeline()
        action = Action()
        action.name = "deploy_linaro_image"
        action.description = "deploy action using preset subactions in an internal pipe"
        action.summary = "deploy_linaro_image"
        action.job = job
        # deliberately unlikely location
        # a successful validation would need to use the cwd
        action.parameters = {"image": "file:///none/images/bad-kvm-debian-wheezy.img"}
        pipe.add_action(action)
        self.assertEqual(action.level, "1")
        deploy_pipe = Pipeline(action)
        action = Action()
        action.name = "downloader"
        action.description = "download image wrapper, including an internal retry pipe"
        action.summary = "downloader"
        action.job = job
        deploy_pipe.add_action(action)
        self.assertEqual(action.level, "1.1")
        # a formal RetryAction would contain a pre-built pipeline which can be inserted directly
        retry_pipe = Pipeline(action)
        action = Action()
        action.name = "wget"
        action.description = "do the download with retries"
        action.summary = "wget"
        action.job = job
        retry_pipe.add_action(action)
        self.assertEqual(action.level, "1.1.1")
        action = Action()
        action.name = "checksum"
        action.description = "checksum the downloaded file"
        action.summary = "md5sum"
        action.job = job
        deploy_pipe.add_action(action)
        self.assertEqual(action.level, "1.2")
        action = Action()
        action.name = "overlay"
        action.description = "apply lava overlay"
        action.summary = "overlay"
        action.job = job
        deploy_pipe.add_action(action)
        self.assertEqual(action.level, "1.3")
        action = Action()
        action.name = "boot"
        action.description = "boot image"
        action.summary = "qemu"
        action.job = job
        # cmd_line built from device configuration
        action.parameters = {
            'cmd_line': [
                'qemu-system-x86_64',
                '-machine accel=kvm:tcg',
                '-hda'
                '%s' % "tbd",
                '-nographic',
                '-net',
                'nic,model=virtio'
                '-net user'
            ]
        }
        pipe.add_action(action)
        self.assertEqual(action.level, "2")

        action = Action()
        action.name = "simulated"
        action.description = "lava test shell"
        action.summary = "simulated"
        action.job = job
        # a formal lava test shell action would include an internal pipe
        # which would handle the run.sh
        pipe.add_action(action)
        self.assertEqual(action.level, "3")
        # just a fake action
        action = Action()
        action.name = "fake"
        action.description = "faking results"
        action.summary = "fake action"
        action.job = job
        pipe.add_action(action)
        self.assertEqual(action.level, "4")
        self.assertEqual(len(pipe.describe()), 4)
开发者ID:dawei1991,项目名称:lava-dispatcher,代码行数:92,代码来源:test_kvm.py

示例3: setUp

# 需要导入模块: from lava_dispatcher.pipeline.test.test_basic import Factory [as 别名]
# 或者: from lava_dispatcher.pipeline.test.test_basic.Factory import create_kvm_job [as 别名]
 def setUp(self):
     super(TestKVMInlineTestDeploy, self).setUp()
     factory = Factory()
     self.job = factory.create_kvm_job('sample_jobs/kvm-inline.yaml', mkdtemp())
开发者ID:dawei1991,项目名称:lava-dispatcher,代码行数:6,代码来源:test_kvm.py

示例4: setUp

# 需要导入模块: from lava_dispatcher.pipeline.test.test_basic import Factory [as 别名]
# 或者: from lava_dispatcher.pipeline.test.test_basic.Factory import create_kvm_job [as 别名]
 def setUp(self):
     super(TestMonitor, self).setUp()
     factory = Factory()
     self.job = factory.create_kvm_job('sample_jobs/qemu-monitor.yaml', mkdtemp())
开发者ID:BayLibre,项目名称:lava-dispatcher,代码行数:6,代码来源:test_kvm.py

示例5: setUp

# 需要导入模块: from lava_dispatcher.pipeline.test.test_basic import Factory [as 别名]
# 或者: from lava_dispatcher.pipeline.test.test_basic.Factory import create_kvm_job [as 别名]
 def setUp(self):
     super(TestDefinitionHandlers, self).setUp()
     factory = Factory()
     self.job = factory.create_kvm_job("sample_jobs/kvm.yaml")
开发者ID:dawei1991,项目名称:lava-dispatcher,代码行数:6,代码来源:test_defs.py

示例6: setUp

# 需要导入模块: from lava_dispatcher.pipeline.test.test_basic import Factory [as 别名]
# 或者: from lava_dispatcher.pipeline.test.test_basic.Factory import create_kvm_job [as 别名]
 def setUp(self):
     super(TestRepeatBootTest, self).setUp()
     factory = Factory()
     self.job = factory.create_kvm_job('sample_jobs/kvm-repeat.yaml', mkdtemp())
开发者ID:dawei1991,项目名称:lava-dispatcher,代码行数:6,代码来源:test_repeat.py


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