~ubuntu-branches/ubuntu/quantal/virtinst/quantal-proposed

« back to all changes in this revision

Viewing changes to virtinst/Clock.py

  • Committer: Bazaar Package Importer
  • Author(s): Marc Deslauriers
  • Date: 2011-02-01 15:40:11 UTC
  • mfrom: (1.3.16 experimental)
  • Revision ID: james.westby@ubuntu.com-20110201154011-op0nusgc240xajvb
Tags: 0.500.5-1ubuntu1
* Merge from debian experimental. Remaining changes:
  - debian/patches/9001_Ubuntu.patch:
     + Updated to add maverick and natty to OS list and enable virtio
       for them.
  - debian/patches/9003-fix-path-to-hvmloader-in-testsuite.patch: adjust
    testsuite for 0001-fix-path-to-hvmloader.patch and
    0002-Fix-path-to-pygrub.patch. (refreshed)
  - debian/control: added acl package to depends.
  - Demote virt-viewer to Suggests, as it's in universe.
  - Recommends libvirt-bin
* Removed patches:
  - debian/patches/9002-libvirt_disk_format.patch: Upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18
18
# MA 02110-1301 USA.
19
19
 
20
 
class Clock(object):
 
20
import XMLBuilderDomain
 
21
from XMLBuilderDomain import _xml_property
 
22
 
 
23
class Clock(XMLBuilderDomain.XMLBuilderDomain):
21
24
    """
22
25
    Class for generating <clock> XML
23
26
    """
24
27
 
25
 
    def __init__(self, conn):
26
 
        self.conn = conn
 
28
    _dumpxml_xpath = "/domain/clock"
 
29
    def __init__(self, conn, parsexml=None, parsexmlnode=None, caps=None):
 
30
        XMLBuilderDomain.XMLBuilderDomain.__init__(self, conn, parsexml,
 
31
                                                   parsexmlnode, caps)
27
32
 
28
33
        self._offset = None
29
34
 
31
36
        return self._offset
32
37
    def set_offset(self, val):
33
38
        self._offset = val
34
 
    offset = property(get_offset, set_offset)
 
39
    offset = _xml_property(get_offset, set_offset,
 
40
                           xpath="./clock/@offset")
35
41
 
36
 
    def get_xml_config(self):
 
42
    def _get_xml_config(self):
37
43
        if not self.offset:
38
44
            return ""
39
45