def test_admin_config(self):
        args = Arguments()
        default_test_args(args)
        args.adminnodememory = 2097152
        args.adminvcpus = 1
        args.adminnodedisk = "/dev/cloud/cloud.admin"
        args.localreposrc = ""
        args.localrepotgt = ""
        cpu_flags = libvirt_setup.readfile(
            "{0}/cpu-intel.xml".format(TEMPLATE_DIR))

        should_config = libvirt_setup.readfile(
            "{0}/cloud-admin.xml".format(FIXTURE_DIR))
        is_config = filter_vm_xml(libvirt_setup.admin_config(args, cpu_flags))
        self.assertEqual(is_config, should_config)
    def test_admin_config(self):
        args = Arguments()
        args.cloud = "cloud"
        args.adminnodememory = 2097152
        args.adminvcpus = 1
        args.emulator = "/usr/bin/qemu-system-x86_64"
        args.adminnodedisk = "/dev/cloud/cloud.admin"
        args.localreposrc = ""
        args.localrepotgt = ""
        cpu_flags = libvirt_setup.readfile(
            "{0}/cpu-intel.xml".format(TEMPLATE_DIR))

        should_config = libvirt_setup.readfile(
            "{0}/cloud-admin.xml".format(FIXTURE_DIR))
        is_config = libvirt_setup.admin_config(args, cpu_flags)
        self.assertEqual(is_config, should_config)
示例#3
0
    def test_admin_config(self):
        args = Arguments()
        default_test_args(args)
        args.adminnodememory = 2097152
        args.adminvcpus = 1
        args.adminnodedisk = "/dev/cloud/cloud.admin"
        args.localreposrc = ""
        args.localrepotgt = ""
        cpu_flags = libvirt_setup.readfile(
            "{0}/cpu-intel.xml".format(TEMPLATE_DIR))

        should_config = libvirt_setup.readfile(
            "{0}/cloud-admin.xml".format(FIXTURE_DIR))
        is_config = filter_vm_xml(
            libvirt_setup.admin_config(args, cpu_flags))
        self.assertEqual(is_config, should_config)
    def test_admin_config(self):
        args = arg_parse([
            "cloud", "adminnodememory", "adminvcpus", "emulator",
            "adminnodedisk", "localrepositorymount"
        ])
        args.cloud = "cloud"
        args.adminnodememory = "2097152"
        args.adminvcpus = "1"
        args.emulator = "/usr/bin/qemu-system-x86_64"
        args.adminnodedisk = "/dev/cloud/cloud.admin"
        args.localreposrc = ""
        args.localrepotgt = ""
        cpu_flags = libvirt_setup.readfile(
            "{0}/cpu-intel.xml".format(TEMPLATE_DIR))

        should_config = libvirt_setup.readfile(
            "{0}/cloud-admin.xml".format(FIXTURE_DIR))
        is_config = libvirt_setup.admin_config(args, cpu_flags)
        self.assertEqual(is_config, should_config)
示例#5
0
    def test_admin_config(self):
        args = arg_parse(
            ["cloud",
             "adminnodememory",
             "adminvcpus",
             "emulator",
             "adminnodedisk",
             "localrepositorymount"])
        args.cloud = "cloud"
        args.adminnodememory = "2097152"
        args.adminvcpus = "1"
        args.emulator = "/usr/bin/qemu-system-x86_64"
        args.adminnodedisk = "/dev/cloud/cloud.admin"
        args.localreposrc = ""
        args.localrepotgt = ""
        cpu_flags = libvirt_setup.readfile(
            "{0}/cpu-intel.xml".format(TEMPLATE_DIR))

        should_config = libvirt_setup.readfile(
            "{0}/cloud-admin.xml".format(FIXTURE_DIR))
        is_config = libvirt_setup.admin_config(args, cpu_flags)
        self.assertEqual(is_config, should_config)
示例#6
0
 def test_admin_config_uefi(self):
     self.args.firmwaretype = "uefi"
     should_config = libvirt_setup.readfile(
         "{0}/cloud-admin-uefi.xml".format(FIXTURE_DIR))
     is_config = libvirt_setup.admin_config(self.args, self.cpu_flags)
     self.assertEqual(is_config, should_config)
示例#7
0
 def test_admin_config(self):
     should_config = libvirt_setup.readfile(
         "{0}/cloud-admin.xml".format(FIXTURE_DIR))
     is_config = libvirt_setup.admin_config(self.args, self.cpu_flags)
     self.assertEqual(is_config, should_config)
 def test_admin_config_uefi(self):
     self.args.firmwaretype = "uefi"
     should_config = libvirt_setup.readfile(
         "{0}/cloud-admin-uefi.xml".format(FIXTURE_DIR))
     is_config = libvirt_setup.admin_config(self.args, self.cpu_flags)
     self.assertEqual(is_config, should_config)
 def test_admin_config(self):
     should_config = libvirt_setup.readfile(
         "{0}/cloud-admin.xml".format(FIXTURE_DIR))
     is_config = libvirt_setup.admin_config(self.args, self.cpu_flags)
     self.assertEqual(is_config, should_config)