def test_get_default_deploy_ids(self): self.instance["extra_specs"] = {} self.flags(deploy_kernel="aaaa", group="baremetal") self.flags(deploy_ramdisk="bbbb", group="baremetal") self.assertEqual(pxe.get_deploy_aki_id(self.instance), "aaaa") self.assertEqual(pxe.get_deploy_ari_id(self.instance), "bbbb")
def test_get_instance_deploy_ids(self): self.instance["extra_specs"] = {"baremetal:deploy_kernel_id": "aaaa", "baremetal:deploy_ramdisk_id": "bbbb"} self.flags(deploy_kernel="fail", group="baremetal") self.flags(deploy_ramdisk="fail", group="baremetal") self.assertEqual(pxe.get_deploy_aki_id(self.instance), "aaaa") self.assertEqual(pxe.get_deploy_ari_id(self.instance), "bbbb")
def test_get_default_deploy_ids(self): self.instance['extra_specs'] = {} self.flags(deploy_kernel="aaaa", group='baremetal') self.flags(deploy_ramdisk="bbbb", group='baremetal') self.assertEqual('aaaa', pxe.get_deploy_aki_id(self.instance)) self.assertEqual('bbbb', pxe.get_deploy_ari_id(self.instance))
def test_get_instance_deploy_ids(self): self.instance['extra_specs'] = { 'baremetal:deploy_kernel_id': 'aaaa', 'baremetal:deploy_ramdisk_id': 'bbbb', } self.flags(deploy_kernel="fail", group='baremetal') self.flags(deploy_ramdisk="fail", group='baremetal') self.assertEqual('aaaa', pxe.get_deploy_aki_id(self.instance)) self.assertEqual('bbbb', pxe.get_deploy_ari_id(self.instance))