~ubuntu-branches/ubuntu/quantal/nova/quantal-proposed

« back to all changes in this revision

Viewing changes to nova/tests/test_libvirt_config.py

  • Committer: Package Import Robot
  • Author(s): Adam Gandelman, Adam Gandelman, Chuck Short
  • Date: 2012-08-27 15:37:18 UTC
  • mfrom: (1.1.60)
  • Revision ID: package-import@ubuntu.com-20120827153718-lj8er44eqqz1gsrj
Tags: 2012.2~rc1~20120827.15815-0ubuntu1
[ Adam Gandelman ]
* New upstream release.

[ Chuck Short ]
* debian/patches/0001-Update-tools-hacking-for-pep8-1.2-and-
  beyond.patch: Dropped we dont run pep8 tests anymore.
* debian/control: Drop pep8 build depends
* debian/*.upstart.in: Make sure we transition correctly from runlevel
  1 to 2. (LP: #820694)

Show diffs side-by-side

added added

removed removed

Lines of Context:
319
319
              <target bus="ide" dev="/dev/hda"/>
320
320
            </disk>""")
321
321
 
 
322
    def test_config_file_serial(self):
 
323
        obj = config.LibvirtConfigGuestDisk()
 
324
        obj.source_type = "file"
 
325
        obj.source_path = "/tmp/hello"
 
326
        obj.target_dev = "/dev/hda"
 
327
        obj.target_bus = "ide"
 
328
        obj.serial = "7a97c4a3-6f59-41d4-bf47-191d7f97f8e9"
 
329
 
 
330
        xml = obj.to_xml()
 
331
        self.assertXmlEqual(xml, """
 
332
            <disk type="file" device="disk">
 
333
              <source file="/tmp/hello"/>
 
334
              <target bus="ide" dev="/dev/hda"/>
 
335
              <serial>7a97c4a3-6f59-41d4-bf47-191d7f97f8e9</serial>
 
336
            </disk>""")
 
337
 
322
338
    def test_config_block(self):
323
339
        obj = config.LibvirtConfigGuestDisk()
324
340
        obj.source_type = "block"