Пример #1
0
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'])
Пример #2
0
    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))
Пример #3
0
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'])
Пример #4
0
    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))
Пример #5
0
 def configure(self, arch):
     netboot.configure_all(TEST_FQDN, arch, 1234,
                           'file://%s' % self.kernel.name,
                           'file://%s' % self.initrd.name, "",
                           self.tftp_root)
Пример #6
0
 def configure(self, arch):
     netboot.configure_all(TEST_FQDN, arch, 1234,
         'file://%s' % self.kernel.name,
         'file://%s' % self.initrd.name, "")
Пример #7
0
 def configure(self, arch):
     netboot.configure_all(
         TEST_FQDN, [arch], 1234, "file://%s" % self.kernel.name, "file://%s" % self.initrd.name, ""
     )