def handle_configure_netboot(command): netboot.configure_all(command['fqdn'], command['netboot']['arch'], command['netboot']['distro_tree_id'], command['netboot']['kernel_url'], command['netboot']['initrd_url'], command['netboot']['kernel_options'])
def test_configure_then_clear(self): netboot.configure_all(TEST_FQDN, 'ppc64', 1234, 'file://%s' % self.kernel.name, 'file://%s' % self.initrd.name, 'netbootloader=myawesome/netbootloader') bootloader_config_symlink = os.path.join(self.tftp_root, 'bootloader', TEST_FQDN, 'image') self.assertTrue(os.path.lexists(bootloader_config_symlink)) self.assertEquals( os.path.realpath(bootloader_config_symlink), os.path.join(self.tftp_root, 'myawesome/netbootloader')) # this tests ppc64 netboot creation grub2_config_file = os.path.join(self.tftp_root, 'bootloader', TEST_FQDN, 'grub.cfg-7F0000FF') self.assertTrue(os.path.exists(grub2_config_file)) self.check_netbootloader_leak(grub2_config_file) # Clear netboot.clear_netbootloader_directory(TEST_FQDN) # the FQDN directory is not removed self.assertTrue( os.path.exists( os.path.join(self.tftp_root, 'bootloader', TEST_FQDN))) # the image symlink is removed self.assertFalse(os.path.lexists(bootloader_config_symlink)) # The config files for grub2 should be removed (since this is for PPC64) self.assertFalse(os.path.exists(grub2_config_file))
def test_configure_then_clear(self): netboot.configure_all(TEST_FQDN, 'ppc64', 1234, 'file://%s' % self.kernel.name, 'file://%s' % self.initrd.name, 'netbootloader=myawesome/netbootloader' ) bootloader_config_symlink = os.path.join(self.tftp_root, 'bootloader', TEST_FQDN, 'image') self.assertTrue(os.path.lexists(bootloader_config_symlink)) self.assertEquals(os.path.realpath(bootloader_config_symlink), os.path.join(self.tftp_root, 'myawesome/netbootloader')) # this tests ppc64 netboot creation grub2_config_file = os.path.join(self.tftp_root, 'bootloader', TEST_FQDN, 'grub.cfg-7F0000FF') self.assertTrue(os.path.exists(grub2_config_file)) self.check_netbootloader_leak(grub2_config_file) # Clear netboot.clear_netbootloader_directory(TEST_FQDN) # the FQDN directory is not removed self.assertTrue(os.path.exists(os.path.join(self.tftp_root, 'bootloader', TEST_FQDN))) # the image symlink is removed self.assertFalse(os.path.lexists(bootloader_config_symlink)) # The config files for grub2 should be removed (since this is for PPC64) self.assertFalse(os.path.exists(grub2_config_file))
def configure(self, arch): netboot.configure_all(TEST_FQDN, arch, 1234, 'file://%s' % self.kernel.name, 'file://%s' % self.initrd.name, "", self.tftp_root)
def configure(self, arch): netboot.configure_all(TEST_FQDN, arch, 1234, 'file://%s' % self.kernel.name, 'file://%s' % self.initrd.name, "")
def configure(self, arch): netboot.configure_all( TEST_FQDN, [arch], 1234, "file://%s" % self.kernel.name, "file://%s" % self.initrd.name, "" )