Esempio n. 1
0
 def live_disk_name(self):
     """get the device name of the live-media we are booting from
     """
     from ovirtnode.ovirtfunctions import get_live_disk
     name = get_live_disk()
     if not "/dev/mapper" in name:
         # FIXME explain ...
         name = "/dev/%s" % name.rstrip('0123456789')
     return name
Esempio n. 2
0
 def live_disk_name(self):
     """get the device name of the live-media we are booting from
     """
     from ovirtnode.ovirtfunctions import get_live_disk
     name = get_live_disk()
     if not "/dev/mapper" in name:
         # FIXME explain ...
         name = "/dev/%s" % name.rstrip('0123456789')
     return name
Esempio n. 3
0
    def live_disk_name(self):
        """get the device name of the live-media we are booting from
        BEWARE: Because querying this is so expensive we cache this result
                Assumption: Live disk name does not change
        """
        if self._cached_live_disk_name:
            return self._cached_live_disk_name

        from ovirtnode.ovirtfunctions import get_live_disk
        name = get_live_disk()
        if not "/dev/mapper" in name:
            # FIXME explain ...
            name = "/dev/%s" % name.rstrip('0123456789')
        self._cached_live_disk_name = name
        return name