示例#1
0
 def test_fetch_twice(self):
     netboot.fetch_images(1234, "file://%s" % self.kernel.name, "file://%s" % self.initrd.name, TEST_FQDN)
     netboot.fetch_images(1234, "file://%s" % self.kernel.name, "file://%s" % self.initrd.name, TEST_FQDN)
     self.check_netboot_configured("images")
     kernel_path = os.path.join(self.tftp_root, "images", TEST_FQDN, "kernel")
     initrd_path = os.path.join(self.tftp_root, "images", TEST_FQDN, "initrd")
     self.assertEquals(os.path.getsize(kernel_path), 4 * 1024 * 1024)
     self.assertEquals(os.path.getsize(initrd_path), 8 * 1024 * 1024)
示例#2
0
    def test_fetch_then_clear(self):
        netboot.fetch_images(1234, 'file://%s' % self.kernel.name,
                'file://%s' % self.initrd.name,
                TEST_FQDN)
        self.check_netboot_configured("images")
        kernel_path = os.path.join(self.tftp_root, 'images', TEST_FQDN, 'kernel')
        initrd_path = os.path.join(self.tftp_root, 'images', TEST_FQDN, 'initrd')
        self.assertEquals(os.path.getsize(kernel_path), 4 * 1024 * 1024)
        self.assertEquals(os.path.getsize(initrd_path), 8 * 1024 * 1024)

        netboot.clear_images(TEST_FQDN)
        self.check_netboot_cleared("images")
示例#3
0
 def test_fetch_twice(self):
     netboot.fetch_images(1234, 'file://%s' % self.kernel.name,
             'file://%s' % self.initrd.name,
             TEST_FQDN)
     netboot.fetch_images(1234, 'file://%s' % self.kernel.name,
             'file://%s' % self.initrd.name,
             TEST_FQDN)
     self.check_netboot_configured("images")
     kernel_path = os.path.join(self.tftp_root, 'images', TEST_FQDN, 'kernel')
     initrd_path = os.path.join(self.tftp_root, 'images', TEST_FQDN, 'initrd')
     self.assertEquals(os.path.getsize(kernel_path), 4 * 1024 * 1024)
     self.assertEquals(os.path.getsize(initrd_path), 8 * 1024 * 1024)